From 6b61353c0a0320ee15bb6488149735381fed62ec Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 16 Apr 2004 12:51:06 +0000 Subject: [PATCH] Sync to HEAD --- AUTHORS | 12 +- ChangeLog | 158 +- MAINTAINERS | 2 + Makefile.in | 33 +- admin/ChangeLog | 24 + admin/README | 2 + admin/admin.el | 1 + admin/alloc-colors.c | 3 + admin/build-configs | 2 + admin/check-doc-strings | 1 + admin/cus-test.el | 13 +- admin/diff-tar-files | 1 + admin/emacs-pretesters | 2 + admin/make-announcement | 2 + admin/make-changelog-diff | 2 + admin/make-emacs | 2 + admin/make-tarball.txt | 43 +- admin/notes/cpp | 2 + admin/notes/iftc | 2 + admin/notes/trailing-whitespace | 2 + admin/nt/dump.bat | 4 + admin/nt/makedist.bat | 4 + admin/quick-install-emacs | 17 +- admin/revdiff | 2 + autogen.sh | 2 + config.bat | 8 +- configure | 4403 ++-- configure.in | 67 +- etc/ChangeLog | 95 + etc/DEBUG | 2 + etc/GNU | 12 +- etc/HELLO | 126 +- etc/MACHINES | 35 +- etc/MAILINGLISTS | 2 + etc/MH-E-NEWS | 2 + etc/MORE.STUFF | 37 +- etc/Makefile | 1 + etc/NEWS | 787 +- etc/ONEWS | 3 +- etc/ONEWS.1 | 2 + etc/ONEWS.2 | 2 + etc/ONEWS.3 | 2 + etc/ONEWS.4 | 2 + etc/OTHER.EMACSES | 2 + etc/PROBLEMS | 59 +- etc/SERVICE | 1 + etc/TODO | 39 +- etc/TUTORIAL | 2 + etc/TUTORIAL.bg | 2391 +-- etc/TUTORIAL.cn | 2 + etc/TUTORIAL.cs | 2 + etc/TUTORIAL.de | 98 +- etc/TUTORIAL.es | 2 + etc/TUTORIAL.fr | 4 +- etc/TUTORIAL.it | 2 + etc/TUTORIAL.ja | 2 + etc/TUTORIAL.ko | 2 + etc/TUTORIAL.nl | 540 +- etc/TUTORIAL.pl | 1 + etc/TUTORIAL.ro | 2 + etc/TUTORIAL.ru | 2 + etc/TUTORIAL.sk | 2 + etc/TUTORIAL.sl | 2 + etc/TUTORIAL.sv | 2 + etc/TUTORIAL.th | 1 + etc/TUTORIAL.translators | 4 +- etc/TUTORIAL.zh | 2 + etc/Xkeymap.txt | 2 + etc/calccard.tex | 2 + etc/compilation.txt | 345 + etc/cs-dired-ref.tex | 2 + etc/cs-refcard.tex | 2 + etc/cs-survival.tex | 7 +- etc/ctags.1 | 2 + etc/de-refcard.tex | 2 + etc/dired-ref.tex | 1 + etc/emacs.1 | 2 + etc/emacs.bash | 1 + etc/emacs.csh | 2 + etc/emacsclient.1 | 2 + etc/emacstool.1 | 2 + etc/etags.1 | 2 + etc/fr-drdref.tex | 1 + etc/fr-refcard.tex | 2 + etc/fr-survival.tex | 7 +- etc/gfdl.1 | 2 + etc/ledit.l | 2 + etc/ms-7bkermit | 2 + etc/ms-kermit | 1 + etc/pl-refcard.tex | 7 +- etc/ps-prin1.ps | 9 +- etc/refcard.tex | 2 + etc/ses-example.ses | 2 + etc/sk-dired-ref.tex | 2 + etc/sk-refcard.tex | 2 + etc/sk-survival.tex | 7 +- etc/survival.tex | 2 + etc/tasks.texi | 4 + etc/termcap.src | 1 - etc/ulimit.hack | 2 + etc/vipcard.tex | 2 + etc/viperCard.tex | 2 + info/dir | 8 +- leim/CXTERM-DIC/4Corner.tit | 3 +- leim/CXTERM-DIC/ARRAY30.tit | 2 + leim/CXTERM-DIC/CCDOSPY.tit | 3 +- leim/CXTERM-DIC/ECDICT.tit | 1 + leim/CXTERM-DIC/ETZY.tit | 2 + leim/CXTERM-DIC/PY-b5.tit | 2 + leim/CXTERM-DIC/Punct-b5.tit | 2 + leim/CXTERM-DIC/Punct.tit | 3 +- leim/CXTERM-DIC/QJ-b5.tit | 2 + leim/CXTERM-DIC/QJ.tit | 3 +- leim/CXTERM-DIC/SW.tit | 3 +- leim/CXTERM-DIC/TONEPY.tit | 3 +- leim/CXTERM-DIC/ZOZY.tit | 2 + leim/ChangeLog | 56 +- leim/MISC-DIC/CTLau-b5.html | 3 + leim/MISC-DIC/CTLau.html | 3 + leim/Makefile.in | 15 +- leim/ja-dic/ja-dic.el | 1 + leim/makefile.nt | 10 +- leim/makefile.w32-in | 12 +- leim/quail/croatian.el | 2 + leim/quail/cyril-jis.el | 1 + leim/quail/cyrillic.el | 76 +- leim/quail/czech.el | 1 + leim/quail/ethiopic.el | 1 + leim/quail/georgian.el | 1 + leim/quail/greek.el | 1 + leim/quail/hangul.el | 1 + leim/quail/hangul3.el | 1 + leim/quail/hanja-jis.el | 1 + leim/quail/hanja.el | 1 + leim/quail/hanja3.el | 1 + leim/quail/hebrew.el | 9 +- leim/quail/indian.el | 1 + leim/quail/ipa.el | 1 + leim/quail/japanese.el | 1 + leim/quail/lao.el | 1 + leim/quail/latin-alt.el | 1 + leim/quail/latin-ltx.el | 15 +- leim/quail/latin-post.el | 1 + leim/quail/latin-pre.el | 6 +- leim/quail/lrt.el | 1 + leim/quail/py-punct.el | 1 + leim/quail/pypunct-b5.el | 1 + leim/quail/rfc1345.el | Bin 31701 -> 31752 bytes leim/quail/sgml-input.el | 1 + leim/quail/slovak.el | 1 + leim/quail/symbol-ksc.el | 1 + leim/quail/thai.el | 1 + leim/quail/tibetan.el | 1 + leim/quail/uni-input.el | 1 + leim/quail/viqr.el | 1 + leim/quail/vntelex.el | 1 + leim/quail/welsh.el | 1 + lib-src/ChangeLog | 119 +- lib-src/Makefile.in | 18 +- lib-src/README | 2 +- lib-src/b2m.c | 2 + lib-src/b2m.pl | 4 +- lib-src/cvtmail.c | 3 + lib-src/digest-doc.c | 3 + lib-src/ebrowse.c | 3 + lib-src/emacsclient.c | 161 +- lib-src/emacstool.c | 3 + lib-src/etags.c | 5 +- lib-src/fakemail.c | 3 + lib-src/getopt.c | 3 + lib-src/getopt.h | 3 + lib-src/getopt1.c | 2 + lib-src/grep-changelog | 63 +- lib-src/hexl.c | 3 + lib-src/leditcfns.c | 3 + lib-src/make-docfile.c | 33 +- lib-src/makefile.nt | 2 + lib-src/makefile.w32-in | 4 +- lib-src/movemail.c | 3 + lib-src/ntlib.c | 3 + lib-src/ntlib.h | 3 + lib-src/pop.c | 3 + lib-src/pop.h | 3 + lib-src/profile.c | 3 + lib-src/rcs-checkin | 1 + lib-src/rcs2log | 50 +- lib-src/sorted-doc.c | 3 + lib-src/test-distrib.c | 3 + lib-src/update-game-score.c | 3 + lib-src/vcdiff | 6 +- lib-src/yow.c | 2 + lisp/.gitignore | 1 + lisp/ChangeLog | 30295 ++++++---------------------- lisp/ChangeLog.1 | 2 + lisp/{ChangeLog => ChangeLog.10} | 989 +- lisp/ChangeLog.2 | 2 + lisp/ChangeLog.3 | 2 + lisp/ChangeLog.4 | 2 + lisp/ChangeLog.5 | 2 + lisp/ChangeLog.6 | 2 + lisp/ChangeLog.7 | 2 + lisp/ChangeLog.8 | 2 + lisp/ChangeLog.9 | 2 + lisp/Makefile.in | 67 +- lisp/abbrev.el | 16 +- lisp/abbrevlist.el | 3 +- lisp/add-log.el | 6 +- lisp/align.el | 1 + lisp/allout.el | 12 +- lisp/ansi-color.el | 1 + lisp/apropos.el | 89 +- lisp/arc-mode.el | 3 +- lisp/array.el | 1 + lisp/autoarg.el | 1 + lisp/autoinsert.el | 1 + lisp/autorevert.el | 163 +- lisp/avoid.el | 1 + lisp/battery.el | 120 +- lisp/bindings.el | 40 +- lisp/bookmark.el | 299 +- lisp/bs.el | 125 +- lisp/buff-menu.el | 114 +- lisp/button.el | 1 + lisp/calc/calc-aent.el | 1 + lisp/calc/calc-alg.el | 1 + lisp/calc/calc-arith.el | 1 + lisp/calc/calc-bin.el | 1 + lisp/calc/calc-comb.el | 1 + lisp/calc/calc-cplx.el | 1 + lisp/calc/calc-embed.el | 6 +- lisp/calc/calc-ext.el | 8 +- lisp/calc/calc-fin.el | 1 + lisp/calc/calc-forms.el | 7 +- lisp/calc/calc-frac.el | 1 + lisp/calc/calc-funcs.el | 1 + lisp/calc/calc-graph.el | 1 + lisp/calc/calc-help.el | 1 + lisp/calc/calc-incom.el | 1 + lisp/calc/calc-keypd.el | 1 + lisp/calc/calc-lang.el | 1 + lisp/calc/calc-macs.el | 1 + lisp/calc/calc-maint.el | 1 + lisp/calc/calc-map.el | 8 +- lisp/calc/calc-math.el | 1 + lisp/calc/calc-misc.el | 1 + lisp/calc/calc-mode.el | 1 + lisp/calc/calc-mtx.el | 1 + lisp/calc/calc-poly.el | 1 + lisp/calc/calc-prog.el | 1 + lisp/calc/calc-rewr.el | 1 + lisp/calc/calc-rules.el | 1 + lisp/calc/calc-sel.el | 1 + lisp/calc/calc-stat.el | 1 + lisp/calc/calc-store.el | 1 + lisp/calc/calc-stuff.el | 1 + lisp/calc/calc-trail.el | 1 + lisp/calc/calc-undo.el | 1 + lisp/calc/calc-units.el | 1 + lisp/calc/calc-vec.el | 1 + lisp/calc/calc-yank.el | 1 + lisp/calc/calc.el | 20 +- lisp/calc/calcalg2.el | 1 + lisp/calc/calcalg3.el | 1 + lisp/calc/calccomp.el | 1 + lisp/calc/calcsel2.el | 1 + lisp/calculator.el | 1 + lisp/calendar/appt.el | 455 +- lisp/calendar/cal-china.el | 1 + lisp/calendar/cal-coptic.el | 5 +- lisp/calendar/cal-dst.el | 1 + lisp/calendar/cal-french.el | 5 +- lisp/calendar/cal-hebrew.el | 23 +- lisp/calendar/cal-islam.el | 13 +- lisp/calendar/cal-iso.el | 1 + lisp/calendar/cal-julian.el | 5 +- lisp/calendar/cal-mayan.el | 9 +- lisp/calendar/cal-menu.el | 83 +- lisp/calendar/cal-move.el | 22 + lisp/calendar/cal-persia.el | 1 + lisp/calendar/cal-tex.el | 1 + lisp/calendar/cal-x.el | 13 +- lisp/calendar/calendar.el | 157 +- lisp/calendar/diary-lib.el | 144 +- lisp/calendar/holidays.el | 1 + lisp/calendar/lunar.el | 1 + lisp/calendar/parse-time.el | 2 + lisp/calendar/solar.el | 1 + lisp/calendar/time-date.el | 1 + lisp/calendar/timeclock.el | 54 +- lisp/calendar/todo-mode.el | 8 +- lisp/case-table.el | 1 + lisp/cdl.el | 1 + lisp/chistory.el | 1 + lisp/cmuscheme.el | 1 + lisp/comint.el | 526 +- lisp/compare-w.el | 234 +- lisp/complete.el | 29 +- lisp/completion.el | 1 + lisp/composite.el | 4 +- lisp/cus-dep.el | 2 + lisp/cus-edit.el | 52 +- lisp/cus-face.el | 1 + lisp/cus-start.el | 8 + lisp/cus-theme.el | 1 + lisp/custom.el | 30 +- lisp/cvs-status.el | 5 +- lisp/dabbrev.el | 20 +- lisp/delim-col.el | 7 +- lisp/delsel.el | 1 + lisp/desktop.el | 349 +- lisp/diff-mode.el | 290 +- lisp/diff.el | 475 +- lisp/dired-aux.el | 124 +- lisp/dired-x.el | 96 +- lisp/dired.el | 425 +- lisp/dirtrack.el | 1 + lisp/disp-table.el | 19 +- lisp/dos-fns.el | 1 + lisp/dos-vars.el | 1 + lisp/dos-w32.el | 7 +- lisp/double.el | 1 + lisp/ebuff-menu.el | 1 + lisp/echistory.el | 1 + lisp/ediff-diff.el | 5 +- lisp/ediff-help.el | 1 + lisp/ediff-hook.el | 1 + lisp/ediff-init.el | 8 +- lisp/ediff-merg.el | 1 + lisp/ediff-mult.el | 14 +- lisp/ediff-ptch.el | 5 +- lisp/ediff-util.el | 49 +- lisp/ediff-vers.el | 1 + lisp/ediff-wind.el | 1 + lisp/ediff.el | 108 +- lisp/edmacro.el | 18 +- lisp/ehelp.el | 1 + lisp/electric.el | 8 +- lisp/elide-head.el | 1 + lisp/emacs-lisp/advice.el | 51 +- lisp/emacs-lisp/assoc.el | 1 + lisp/emacs-lisp/authors.el | 3 +- lisp/emacs-lisp/autoload.el | 1 + lisp/emacs-lisp/backquote.el | 11 +- lisp/emacs-lisp/benchmark.el | 2 + lisp/emacs-lisp/bindat.el | 1 + lisp/emacs-lisp/byte-opt.el | 246 +- lisp/emacs-lisp/byte-run.el | 22 +- lisp/emacs-lisp/bytecomp.el | 258 +- lisp/emacs-lisp/checkdoc.el | 30 +- lisp/emacs-lisp/cl-compat.el | 1 + lisp/emacs-lisp/cl-extra.el | 1 + lisp/emacs-lisp/cl-indent.el | 1 + lisp/emacs-lisp/cl-macs.el | 9 +- lisp/emacs-lisp/cl-seq.el | 1 + lisp/emacs-lisp/cl-specs.el | 2 +- lisp/emacs-lisp/cl.el | 8 +- lisp/emacs-lisp/copyright.el | 6 +- lisp/emacs-lisp/crm.el | 1 + lisp/emacs-lisp/cust-print.el | 1 + lisp/emacs-lisp/debug.el | 1 + lisp/emacs-lisp/derived.el | 1 + lisp/emacs-lisp/disass.el | 1 + lisp/emacs-lisp/easy-mmode.el | 57 +- lisp/emacs-lisp/easymenu.el | 11 +- lisp/emacs-lisp/edebug.el | 108 +- lisp/emacs-lisp/eldoc.el | 41 +- lisp/emacs-lisp/elint.el | 4 +- lisp/emacs-lisp/elp.el | 1 + lisp/emacs-lisp/ewoc.el | 1 + lisp/emacs-lisp/find-func.el | 1 + lisp/emacs-lisp/find-gc.el | 1 + lisp/emacs-lisp/float-sup.el | 1 + lisp/emacs-lisp/gulp.el | 1 + lisp/emacs-lisp/helper.el | 1 + lisp/emacs-lisp/levents.el | 1 + lisp/emacs-lisp/lisp-mnt.el | 33 +- lisp/emacs-lisp/lisp-mode.el | 87 +- lisp/emacs-lisp/lisp.el | 45 +- lisp/emacs-lisp/lmenu.el | 1 + lisp/emacs-lisp/lselect.el | 1 + lisp/emacs-lisp/lucid.el | 1 + lisp/emacs-lisp/macroexp.el | 197 + lisp/emacs-lisp/map-ynp.el | 1 + lisp/emacs-lisp/pp.el | 13 +- lisp/emacs-lisp/re-builder.el | 1 + lisp/emacs-lisp/regexp-opt.el | 1 + lisp/emacs-lisp/regi.el | 1 + lisp/emacs-lisp/ring.el | 1 + lisp/emacs-lisp/rx.el | 84 +- lisp/emacs-lisp/shadow.el | 3 +- lisp/emacs-lisp/sregex.el | 1 + lisp/emacs-lisp/syntax.el | 2 + lisp/emacs-lisp/tcover-ses.el | 712 + lisp/emacs-lisp/tcover-unsafep.el | 140 + lisp/emacs-lisp/testcover.el | 60 +- lisp/emacs-lisp/timer.el | 1 + lisp/emacs-lisp/tq.el | 5 +- lisp/emacs-lisp/trace.el | 1 + lisp/emacs-lisp/unsafep.el | 1 + lisp/emacs-lisp/warnings.el | 69 +- lisp/emacs-lock.el | 1 + lisp/emerge.el | 5 +- lisp/emulation/crisp.el | 1 + lisp/emulation/cua-base.el | 16 +- lisp/emulation/cua-gmrk.el | 1 + lisp/emulation/cua-rect.el | 1 + lisp/emulation/edt-lk201.el | 1 + lisp/emulation/edt-mapper.el | 1 + lisp/emulation/edt-pc.el | 1 + lisp/emulation/edt-vt100.el | 1 + lisp/emulation/edt.el | 1 + lisp/emulation/keypad.el | 1 + lisp/emulation/pc-mode.el | 1 + lisp/emulation/pc-select.el | 1 + lisp/emulation/tpu-edt.el | 3 +- lisp/emulation/tpu-extras.el | 1 + lisp/emulation/tpu-mapper.el | 1 + lisp/emulation/vi.el | 16 +- lisp/emulation/vip.el | 1 + lisp/emulation/viper-cmd.el | 1 + lisp/emulation/viper-ex.el | 5 +- lisp/emulation/viper-init.el | 1 + lisp/emulation/viper-keym.el | 1 + lisp/emulation/viper-macs.el | 1 + lisp/emulation/viper-mous.el | 1 + lisp/emulation/viper-util.el | 23 +- lisp/emulation/viper.el | 1 + lisp/emulation/ws-mode.el | 1 + lisp/env.el | 1 + lisp/eshell/em-alias.el | 5 +- lisp/eshell/em-banner.el | 3 +- lisp/eshell/em-basic.el | 1 + lisp/eshell/em-cmpl.el | 1 + lisp/eshell/em-dirs.el | 1 + lisp/eshell/em-glob.el | 1 + lisp/eshell/em-hist.el | 5 +- lisp/eshell/em-ls.el | 5 +- lisp/eshell/em-pred.el | 5 +- lisp/eshell/em-prompt.el | 1 + lisp/eshell/em-rebind.el | 1 + lisp/eshell/em-script.el | 1 + lisp/eshell/em-smart.el | 5 +- lisp/eshell/em-term.el | 1 + lisp/eshell/em-unix.el | 1 + lisp/eshell/em-xtra.el | 1 + lisp/eshell/esh-arg.el | 1 + lisp/eshell/esh-cmd.el | 6 +- lisp/eshell/esh-ext.el | 1 + lisp/eshell/esh-io.el | 1 + lisp/eshell/esh-maint.el | 1 + lisp/eshell/esh-mode.el | 5 +- lisp/eshell/esh-module.el | 1 + lisp/eshell/esh-opt.el | 1 + lisp/eshell/esh-proc.el | 1 + lisp/eshell/esh-test.el | 1 + lisp/eshell/esh-util.el | 1 + lisp/eshell/esh-var.el | 3 +- lisp/eshell/eshell.el | 3 +- lisp/expand.el | 1 + lisp/facemenu.el | 2 + lisp/faces.el | 74 +- lisp/fast-lock.el | 1 + lisp/ffap.el | 104 +- lisp/filecache.el | 79 +- lisp/files.el | 163 +- lisp/filesets.el | 1 + lisp/find-dired.el | 27 +- lisp/find-file.el | 4 +- lisp/find-lisp.el | 1 + lisp/finder.el | 39 +- lisp/flow-ctrl.el | 1 + lisp/foldout.el | 5 +- lisp/follow.el | 1 + lisp/font-core.el | 1 + lisp/font-lock.el | 133 +- lisp/format.el | 23 +- lisp/forms-d2.el | 1 + lisp/forms-pass.el | 1 + lisp/forms.el | 8 +- lisp/frame.el | 38 +- lisp/fringe.el | 99 +- lisp/generic-x.el | 34 +- lisp/generic.el | 5 +- lisp/gnus/ChangeLog | 17 + lisp/gnus/gnus-art.el | 79 +- lisp/gnus/gnus-score.el | 12 +- lisp/gnus/gnus-srvr.el | 2 +- lisp/gnus/imap.el | 8 +- lisp/gs.el | 1 + lisp/help-at-pt.el | 357 + lisp/help-fns.el | 79 +- lisp/help-macro.el | 1 + lisp/help-mode.el | 69 +- lisp/help.el | 130 +- lisp/hexl.el | 95 +- lisp/hi-lock.el | 1 + lisp/hilit-chg.el | 192 +- lisp/hippie-exp.el | 1 + lisp/hl-line.el | 42 +- lisp/ibuf-ext.el | 1 + lisp/ibuf-macs.el | 1 + lisp/ibuffer.el | 26 +- lisp/icomplete.el | 1 + lisp/ido.el | 220 +- lisp/ielm.el | 23 +- lisp/image-file.el | 1 + lisp/image.el | 4 +- lisp/imenu.el | 14 +- lisp/indent.el | 1 + lisp/info-look.el | 23 +- lisp/info-xref.el | 162 +- lisp/info.el | 1100 +- lisp/informat.el | 1 + lisp/international/ccl.el | 4 +- lisp/international/characters.el | 69 + lisp/international/codepage.el | 1 + lisp/international/encoded-kb.el | 1 + lisp/international/fontset.el | 1 + lisp/international/isearch-x.el | 1 + lisp/international/iso-acc.el | 1 + lisp/international/iso-ascii.el | 1 + lisp/international/iso-cvt.el | 1 + lisp/international/iso-insert.el | 1 + lisp/international/iso-swed.el | 1 + lisp/international/iso-transl.el | 1 + lisp/international/ja-dic-cnv.el | 1 + lisp/international/ja-dic-utl.el | 1 + lisp/international/kinsoku.el | 28 +- lisp/international/kkc.el | 1 + lisp/international/latin1-disp.el | 221 +- lisp/international/mule-cmds.el | 129 +- lisp/international/mule-conf.el | 10 +- lisp/international/mule-util.el | 72 +- lisp/international/mule.el | 258 +- lisp/international/ogonek.el | 1 + lisp/international/quail.el | 13 +- lisp/international/swedish.el | 1 + lisp/international/titdic-cnv.el | 8 +- lisp/international/utf-7.el | 2 + lisp/isearch.el | 264 +- lisp/iswitchb.el | 27 +- lisp/jit-lock.el | 150 +- lisp/jka-compr.el | 39 +- lisp/kermit.el | 1 + lisp/kmacro.el | 177 +- lisp/language/china-util.el | 1 + lisp/language/chinese.el | 7 +- lisp/language/cyril-util.el | 1 + lisp/language/cyrillic.el | 29 +- lisp/language/czech.el | 1 + lisp/language/devan-util.el | 23 +- lisp/language/devanagari.el | 1 + lisp/language/english.el | 1 + lisp/language/ethio-util.el | 18 +- lisp/language/ethiopic.el | 1 + lisp/language/european.el | 12 +- lisp/language/georgian.el | 1 + lisp/language/greek.el | 1 + lisp/language/hebrew.el | 1 + lisp/language/ind-util.el | 8 +- lisp/language/indian.el | 1 + lisp/language/japan-util.el | 1 + lisp/language/japanese.el | 1 + lisp/language/kannada.el | 54 + lisp/language/knd-util.el | 541 + lisp/language/korea-util.el | 1 + lisp/language/korean.el | 1 + lisp/language/lao-util.el | 1 + lisp/language/lao.el | 1 + lisp/language/malayalam.el | 1 + lisp/language/misc-lang.el | 1 + lisp/language/mlm-util.el | 2 + lisp/language/romanian.el | 1 + lisp/language/slovak.el | 1 + lisp/language/tamil.el | 1 + lisp/language/thai-util.el | 1 + lisp/language/thai.el | 1 + lisp/language/tibet-util.el | 1 + lisp/language/tibetan.el | 1 + lisp/language/tml-util.el | 2 + lisp/language/utf-8-lang.el | 2 + lisp/language/viet-util.el | 1 + lisp/language/vietnamese.el | 1 + lisp/lazy-lock.el | 1 + lisp/ldefs-boot.el | 26024 ++++++++++++++++++++++++ lisp/ledit.el | 1 + lisp/loaddefs.el | 2637 ++- lisp/loadhist.el | 38 +- lisp/loadup.el | 5 +- lisp/locate.el | 1 + lisp/log-edit.el | 31 +- lisp/log-view.el | 1 + lisp/lpr.el | 1 + lisp/ls-lisp.el | 57 +- lisp/macros.el | 1 + lisp/mail/blessmail.el | 1 + lisp/mail/emacsbug.el | 11 + lisp/mail/feedmail.el | 1 + lisp/mail/footnote.el | 1 + lisp/mail/mail-extr.el | 37 +- lisp/mail/mail-hist.el | 1 + lisp/mail/mail-utils.el | 73 +- lisp/mail/mailabbrev.el | 16 +- lisp/mail/mailalias.el | 1 + lisp/mail/mailheader.el | 1 + lisp/mail/mailpost.el | 1 + lisp/mail/metamail.el | 2 +- lisp/mail/mspools.el | 1 + lisp/mail/reporter.el | 2 + lisp/mail/rfc2368.el | 37 +- lisp/mail/rfc822.el | 25 +- lisp/mail/rmail-spam-filter.el | 548 +- lisp/mail/rmail.el | 10 +- lisp/mail/rmailedit.el | 1 + lisp/mail/rmailkwd.el | 1 + lisp/mail/rmailmsc.el | 1 + lisp/mail/rmailout.el | 1 + lisp/mail/rmailsort.el | 1 + lisp/mail/rmailsum.el | 14 +- lisp/mail/sendmail.el | 33 +- lisp/mail/smtpmail.el | 171 +- lisp/mail/supercite.el | 1 + lisp/mail/uce.el | 1 + lisp/mail/undigest.el | 1 + lisp/mail/unrmail.el | 1 + lisp/mail/vms-pmail.el | 1 + lisp/makefile.nt | 2 + lisp/makefile.w32-in | 25 +- lisp/makesum.el | 1 + lisp/man.el | 97 +- lisp/master.el | 1 + lisp/menu-bar.el | 20 +- lisp/mh-e/ChangeLog | 2 + lisp/mh-e/mh-alias.el | 1 + lisp/mh-e/mh-comp.el | 1 + lisp/mh-e/mh-customize.el | 1 + lisp/mh-e/mh-e.el | 1 + lisp/mh-e/mh-funcs.el | 1 + lisp/mh-e/mh-identity.el | 1 + lisp/mh-e/mh-inc.el | 1 + lisp/mh-e/mh-index.el | 1 + lisp/mh-e/mh-junk.el | 1 + lisp/mh-e/mh-loaddefs.el | 2 + lisp/mh-e/mh-mime.el | 1 + lisp/mh-e/mh-pick.el | 1 + lisp/mh-e/mh-seq.el | 1 + lisp/mh-e/mh-speed.el | 1 + lisp/mh-e/mh-utils.el | 1 + lisp/mh-e/mh-xemacs-compat.el | 1 + lisp/mh-e/mh-xemacs-icons.el | 1 + lisp/midnight.el | 5 +- lisp/minibuf-eldef.el | 1 + lisp/misc.el | 22 +- lisp/mouse-copy.el | 1 + lisp/mouse-drag.el | 1 + lisp/mouse-sel.el | 18 +- lisp/mouse.el | 26 +- lisp/msb.el | 1 + lisp/mwheel.el | 5 +- lisp/net/ange-ftp.el | 31 +- lisp/net/browse-url.el | 51 +- lisp/net/eudc-bob.el | 1 + lisp/net/eudc-export.el | 1 + lisp/net/eudc-hotlist.el | 1 + lisp/net/eudc-vars.el | 1 + lisp/net/eudc.el | 1 + lisp/net/eudcb-bbdb.el | 1 + lisp/net/eudcb-ldap.el | 1 + lisp/net/eudcb-ph.el | 1 + lisp/net/goto-addr.el | 1 + lisp/net/ldap.el | 26 +- lisp/net/net-utils.el | 1 + lisp/net/netrc.el | 1 + lisp/net/quickurl.el | 1 + lisp/net/rcompile.el | 1 + lisp/net/rlogin.el | 3 +- lisp/net/snmp-mode.el | 1 + lisp/net/telnet.el | 3 +- lisp/net/tls.el | 1 + lisp/net/tramp-ftp.el | 20 +- lisp/net/tramp-smb.el | 162 +- lisp/net/tramp-util.el | 2 + lisp/net/tramp-uu.el | 2 + lisp/net/tramp-vc.el | 12 +- lisp/net/tramp.el | 925 +- lisp/net/trampver.el | 3 +- lisp/net/webjump.el | 6 +- lisp/net/zone-mode.el | 3 +- lisp/newcomment.el | 53 +- lisp/novice.el | 1 + lisp/obsolete/auto-show.el | 1 + lisp/obsolete/awk-mode.el | 1 + lisp/obsolete/float.el | 1 + lisp/obsolete/hilit19.el | 1 + lisp/obsolete/hscroll.el | 1 + lisp/obsolete/mlsupport.el | 1 + lisp/obsolete/ooutline.el | 1 + lisp/obsolete/options.el | 1 + lisp/obsolete/profile.el | 1 + lisp/obsolete/rnews.el | 1 + lisp/obsolete/rnewspost.el | 1 + lisp/obsolete/rsz-mini.el | 3 +- lisp/obsolete/sc.el | 3 + lisp/obsolete/scribe.el | 1 + lisp/obsolete/sun-curs.el | 1 + lisp/obsolete/sun-fns.el | 1 + lisp/obsolete/uncompress.el | 1 + lisp/obsolete/x-apollo.el | 1 + lisp/obsolete/x-menu.el | 1 + lisp/outline.el | 11 +- lisp/paren.el | 1 + lisp/patcomp.el | 1 + lisp/paths.el | 1 + lisp/pcmpl-cvs.el | 1 + lisp/pcmpl-gnu.el | 1 + lisp/pcmpl-linux.el | 1 + lisp/pcmpl-rpm.el | 1 + lisp/pcmpl-unix.el | 1 + lisp/pcomplete.el | 1 + lisp/pcvs-defs.el | 4 +- lisp/pcvs-info.el | 10 +- lisp/pcvs-parse.el | 1 + lisp/pcvs-util.el | 1 + lisp/pcvs.el | 42 +- lisp/play/5x5.el | 1 + lisp/play/animate.el | 13 +- lisp/play/blackbox.el | 1 + lisp/play/bruce.el | 1 + lisp/play/cookie1.el | 1 + lisp/play/decipher.el | 1 + lisp/play/dissociate.el | 1 + lisp/play/doctor.el | 1 + lisp/play/dunnet.el | 1 + lisp/play/fortune.el | 1 + lisp/play/gamegrid.el | 3 +- lisp/play/gametree.el | 1 + lisp/play/gomoku.el | 1 + lisp/play/handwrite.el | 4 +- lisp/play/hanoi.el | 1 + lisp/play/landmark.el | 3 +- lisp/play/life.el | 1 + lisp/play/meese.el | 1 + lisp/play/morse.el | 9 +- lisp/play/mpuz.el | 1 + lisp/play/pong.el | 1 + lisp/play/snake.el | 1 + lisp/play/solitaire.el | 1 + lisp/play/spook.el | 1 + lisp/play/studly.el | 1 + lisp/play/tetris.el | 1 + lisp/play/yow.el | 1 + lisp/play/zone.el | 5 +- lisp/printing.el | 370 +- lisp/progmodes/ada-mode.el | 23 +- lisp/progmodes/ada-prj.el | 2 +- lisp/progmodes/ada-stmt.el | 3 +- lisp/progmodes/ada-xref.el | 1 + lisp/progmodes/antlr-mode.el | 163 +- lisp/progmodes/asm-mode.el | 1 + lisp/progmodes/autoconf.el | 6 +- lisp/progmodes/cc-align.el | 54 +- lisp/progmodes/cc-awk.el | 2 + lisp/progmodes/cc-bytecomp.el | 1 + lisp/progmodes/cc-cmds.el | 51 +- lisp/progmodes/cc-compat.el | 2 + lisp/progmodes/cc-defs.el | 41 +- lisp/progmodes/cc-engine.el | 435 +- lisp/progmodes/cc-fonts.el | 54 +- lisp/progmodes/cc-langs.el | 38 +- lisp/progmodes/cc-menus.el | 1 + lisp/progmodes/cc-mode.el | 2 + lisp/progmodes/cc-styles.el | 6 + lisp/progmodes/cc-vars.el | 36 +- lisp/progmodes/cfengine.el | 251 + lisp/progmodes/cmacexp.el | 1 + lisp/progmodes/compile.el | 4137 ++-- lisp/progmodes/cperl-mode.el | 354 +- lisp/progmodes/cpp.el | 1 + lisp/progmodes/cwarn.el | 1 + lisp/progmodes/dcl-mode.el | 1 + lisp/progmodes/delphi.el | 7 +- lisp/progmodes/ebnf-abn.el | 663 + lisp/progmodes/ebnf-bnf.el | 64 +- lisp/progmodes/ebnf-dtd.el | 1349 ++ lisp/progmodes/ebnf-ebx.el | 668 + lisp/progmodes/ebnf-iso.el | 39 +- lisp/progmodes/ebnf-otz.el | 50 +- lisp/progmodes/ebnf-yac.el | 73 +- lisp/progmodes/ebnf2ps.el | 836 +- lisp/progmodes/ebrowse.el | 25 +- lisp/progmodes/etags.el | 1 + lisp/progmodes/executable.el | 24 +- lisp/progmodes/f90.el | 16 +- lisp/progmodes/fortran.el | 100 +- lisp/progmodes/gdb-ui.el | 1990 ++ lisp/progmodes/glasses.el | 1 + lisp/progmodes/grep.el | 566 + lisp/progmodes/gud.el | 233 +- lisp/progmodes/hideif.el | 1 + lisp/progmodes/hideshow.el | 85 +- lisp/progmodes/icon.el | 3 +- lisp/progmodes/idlw-rinfo.el | 1 + lisp/progmodes/idlw-shell.el | 3 +- lisp/progmodes/idlw-toolbar.el | 2 +- lisp/progmodes/idlwave.el | 11 +- lisp/progmodes/inf-lisp.el | 1 + lisp/progmodes/ld-script.el | 135 + lisp/progmodes/m4-mode.el | 1 + lisp/progmodes/make-mode.el | 14 +- lisp/progmodes/mantemp.el | 1 + lisp/progmodes/meta-mode.el | 1 + lisp/progmodes/mixal-mode.el | 2 + lisp/progmodes/modula2.el | 1 + lisp/progmodes/octave-hlp.el | 1 + lisp/progmodes/octave-inf.el | 3 +- lisp/progmodes/octave-mod.el | 39 +- lisp/progmodes/pascal.el | 1 + lisp/progmodes/perl-mode.el | 1 + lisp/progmodes/prolog.el | 89 +- lisp/progmodes/ps-mode.el | 1 + lisp/progmodes/python.el | 1614 ++ lisp/progmodes/scheme.el | 9 +- lisp/progmodes/sh-script.el | 300 +- lisp/progmodes/simula.el | 1 + lisp/progmodes/sql.el | 1576 +- lisp/progmodes/tcl.el | 2 +- lisp/progmodes/vhdl-mode.el | 2 +- lisp/progmodes/which-func.el | 29 +- lisp/progmodes/xscheme.el | 9 +- lisp/ps-bdf.el | 1 + lisp/ps-mule.el | 1 + lisp/ps-print.el | 81 +- lisp/recentf.el | 85 +- lisp/rect.el | 1 + lisp/register.el | 8 +- lisp/repeat.el | 1 + lisp/replace.el | 10 +- lisp/reposition.el | 1 + lisp/resume.el | 1 + lisp/reveal.el | 1 + lisp/rfn-eshadow.el | 1 + lisp/rot13.el | 1 + lisp/ruler-mode.el | 348 +- lisp/s-region.el | 1 + lisp/saveplace.el | 64 + lisp/scroll-all.el | 1 + lisp/scroll-bar.el | 39 +- lisp/select.el | 1 + lisp/server.el | 25 +- lisp/ses.el | 952 +- lisp/shadowfile.el | 1 + lisp/shell.el | 43 +- lisp/simple.el | 297 +- lisp/skeleton.el | 1 + lisp/smerge-mode.el | 229 +- lisp/sort.el | 24 +- lisp/soundex.el | 1 + lisp/speedbar.el | 5 +- lisp/startup.el | 136 +- lisp/strokes.el | 39 +- lisp/subr.el | 373 +- lisp/tabify.el | 1 + lisp/talk.el | 1 + lisp/tar-mode.el | 5 +- lisp/tempo.el | 1 + lisp/term.el | 70 +- lisp/term/AT386.el | 1 + lisp/term/apollo.el | 1 + lisp/term/bg-mouse.el | 1 + lisp/term/bobcat.el | 1 + lisp/term/internal.el | 1 + lisp/term/iris-ansi.el | 1 + lisp/term/keyswap.el | 1 + lisp/term/linux.el | 1 + lisp/term/lk201.el | 1 + lisp/term/mac-win.el | 1 + lisp/term/news.el | 1 + lisp/term/pc-win.el | 1 + lisp/term/rxvt.el | 1 + lisp/term/sun-mouse.el | 1 + lisp/term/sun.el | 1 + lisp/term/sup-mouse.el | 1 + lisp/term/tty-colors.el | 3 +- lisp/term/tvi970.el | 1 + lisp/term/vt100.el | 1 + lisp/term/vt102.el | 1 + lisp/term/vt125.el | 1 + lisp/term/vt200.el | 1 + lisp/term/vt201.el | 1 + lisp/term/vt220.el | 1 + lisp/term/vt240.el | 1 + lisp/term/vt300.el | 1 + lisp/term/vt320.el | 1 + lisp/term/vt400.el | 1 + lisp/term/vt420.el | 1 + lisp/term/w32-win.el | 1 + lisp/term/wyse50.el | 1 + lisp/term/x-win.el | 372 +- lisp/term/xterm.el | 1 + lisp/terminal.el | 1 + lisp/textmodes/artist.el | 1 + lisp/textmodes/bib-mode.el | 2 + lisp/textmodes/bibtex.el | 10 +- lisp/textmodes/enriched.el | 1 + lisp/textmodes/fill.el | 60 +- lisp/textmodes/flyspell.el | 9 +- lisp/textmodes/ispell.el | 3 +- lisp/textmodes/makeinfo.el | 1 + lisp/textmodes/nroff-mode.el | 1 + lisp/textmodes/page-ext.el | 2 + lisp/textmodes/page.el | 1 + lisp/textmodes/paragraphs.el | 14 +- lisp/textmodes/picture.el | 1 + lisp/textmodes/po.el | 1 + lisp/textmodes/refbib.el | 1 + lisp/textmodes/refer.el | 9 +- lisp/textmodes/refill.el | 2 + lisp/textmodes/reftex-auc.el | 103 +- lisp/textmodes/reftex-cite.el | 821 +- lisp/textmodes/reftex-dcr.el | 415 +- lisp/textmodes/reftex-global.el | 251 +- lisp/textmodes/reftex-index.el | 1839 +- lisp/textmodes/reftex-parse.el | 869 +- lisp/textmodes/reftex-ref.el | 728 +- lisp/textmodes/reftex-sel.el | 485 +- lisp/textmodes/reftex-toc.el | 833 +- lisp/textmodes/reftex-vars.el | 356 +- lisp/textmodes/reftex.el | 1292 +- lisp/textmodes/sgml-mode.el | 1 + lisp/textmodes/spell.el | 1 + lisp/textmodes/table.el | 9 +- lisp/textmodes/tex-mode.el | 34 +- lisp/textmodes/texinfmt.el | 8 + lisp/textmodes/texinfo.el | 40 +- lisp/textmodes/texnfo-upd.el | 51 +- lisp/textmodes/text-mode.el | 3 +- lisp/textmodes/tildify.el | 1 + lisp/textmodes/two-column.el | 1 + lisp/textmodes/underline.el | 1 + lisp/thingatpt.el | 1 + lisp/thumbs.el | 737 + lisp/time-stamp.el | 1 + lisp/time.el | 9 +- lisp/timezone.el | 5 +- lisp/tmm.el | 1 + lisp/toolbar/gud-n.pbm | Bin 0 -> 81 bytes lisp/toolbar/gud-n.xpm | 34 + lisp/toolbar/gud-ni.pbm | Bin 0 -> 81 bytes lisp/toolbar/gud-ni.xpm | 33 + lisp/toolbar/gud-s.pbm | Bin 0 -> 81 bytes lisp/toolbar/gud-s.xpm | 33 + lisp/toolbar/gud-si.pbm | Bin 0 -> 81 bytes lisp/toolbar/gud-si.xpm | 32 + lisp/toolbar/gud-watch.pbm | Bin 0 -> 81 bytes lisp/toolbar/gud-watch.xpm | 38 + lisp/toolbar/tool-bar.el | 1 + lisp/tooltip.el | 1 + lisp/type-break.el | 67 +- lisp/uniquify.el | 2 + lisp/userlock.el | 1 + lisp/vc-arch.el | 421 + lisp/vc-cvs.el | 54 +- lisp/vc-hooks.el | 64 +- lisp/vc-mcvs.el | 27 +- lisp/vc-rcs.el | 11 +- lisp/vc-sccs.el | 25 +- lisp/vc-svn.el | 1 + lisp/vc.el | 413 +- lisp/vcursor.el | 10 +- lisp/version.el | 3 + lisp/view.el | 1 + lisp/vms-patch.el | 1 + lisp/vmsproc.el | 1 + lisp/vt-control.el | 1 + lisp/vt100-led.el | 1 + lisp/w32-fns.el | 1 + lisp/w32-vars.el | 1 + lisp/whitespace.el | 20 +- lisp/wid-browse.el | 1 + lisp/wid-edit.el | 118 +- lisp/widget.el | 1 + lisp/windmove.el | 1 + lisp/window.el | 49 +- lisp/winner.el | 1 + lisp/woman.el | 46 +- lisp/x-dnd.el | 877 + lisp/xml.el | 164 +- lisp/xt-mouse.el | 1 + lispintro/ChangeLog | 22 +- lispintro/Makefile.am | 2 + lispintro/Makefile.in | 2 + lispintro/Makefile.old | 2 + lispintro/configure.in | 4 + lispintro/emacs-lisp-intro.texi | 49 +- lispintro/makefile.w32-in | 73 + lispintro/mkinstalldirs | 2 - lispintro/texinfo.tex | 6 +- lwlib/ChangeLog | 32 +- lwlib/Makefile.in | 2 + lwlib/lwlib-Xaw.c | 20 +- lwlib/lwlib-Xaw.h | 3 + lwlib/lwlib-Xlw.c | 33 +- lwlib/lwlib-Xlw.h | 3 + lwlib/lwlib-Xm.c | 36 + lwlib/lwlib-Xm.h | 3 + lwlib/lwlib-int.h | 3 + lwlib/lwlib-utils.c | 3 + lwlib/lwlib-utils.h | 3 + lwlib/lwlib.c | 2 + lwlib/lwlib.h | 3 + lwlib/xlwmenu.c | 112 +- lwlib/xlwmenu.h | 6 +- lwlib/xlwmenuP.h | 4 + mac/ChangeLog | 21 + mac/INSTALL | 20 +- mac/inc/alloca.h | 3 + mac/inc/config.h | 3 + mac/inc/defs-cw6.h | 3 + mac/inc/dirent.h | 3 + mac/inc/epaths.h | 3 + mac/inc/grp.h | 36 + mac/inc/m-mac.h | 3 + mac/inc/pwd.h | 3 + mac/inc/s-mac.h | 3 + mac/inc/sys/file.h | 3 + mac/inc/sys/ioctl.h | 3 + mac/inc/sys/param.h | 3 + mac/inc/sys/stat.h | 3 + mac/inc/sys/time.h | 3 + mac/inc/sys/types.h | 3 + mac/inc/termio.h | 3 + mac/inc/utime.h | 3 + mac/inc/utsname.h | 3 + mac/make-package | 1 + mac/makefile.MPW | 1 + mac/src/Emacs.r | 6 +- mac/src/chdir.c | 3 + man/ChangeLog | 414 +- man/Makefile.in | 11 +- man/abbrevs.texi | 4 + man/ack.texi | 25 +- man/ada-mode.texi | 4 + man/anti.texi | 4 + man/autotype.texi | 4 + man/back.texi | 4 + man/basic.texi | 10 +- man/buffers.texi | 42 +- man/building.texi | 129 +- man/calc.texi | 5 +- man/calendar.texi | 75 +- man/cc-mode.texi | 5048 +++-- man/cl.texi | 8 +- man/cmdargs.texi | 186 +- man/commands.texi | 34 +- man/custom.texi | 295 +- man/dired-x.texi | 49 +- man/dired.texi | 40 +- man/display.texi | 36 +- man/doclicense.texi | 4 + man/ebrowse.texi | 4 + man/ediff.texi | 12 +- man/emacs-mime.texi | 4 + man/emacs.texi | 44 +- man/entering.texi | 4 + man/eshell.texi | 9 +- man/eudc.texi | 4 + man/faq.texi | 32 +- man/files.texi | 69 +- man/fixit.texi | 6 +- man/forms.texi | 4 + man/frames.texi | 51 +- man/glossary.texi | 53 +- man/gnu.texi | 4 + man/gnus-faq.texi | 3 + man/gnus.texi | 4 + man/help.texi | 32 +- man/idlwave.texi | 4 + man/indent.texi | 4 + man/info.texi | 80 +- man/killing.texi | 8 +- man/m-x.texi | 4 + man/macos.texi | 6 +- man/maintaining.texi | 4 + man/major.texi | 4 + man/makefile.w32-in | 329 + man/mark.texi | 5 +- man/message.texi | 4 + man/mh-e.texi | 7 +- man/mini.texi | 12 +- man/misc.texi | 110 +- man/msdog.texi | 13 +- man/mule.texi | 120 +- man/pcl-cvs.texi | 13 +- man/picture.texi | 4 + man/programs.texi | 58 +- man/reftex.texi | 3 + man/regs.texi | 4 + man/rmail.texi | 6 +- man/sc.texi | 4 + man/screen.texi | 28 +- man/search.texi | 154 +- man/sending.texi | 8 +- man/ses.texi | 28 +- man/smtpmail.texi | 24 +- man/speedbar.texi | 11 +- man/texinfo.tex | 6 +- man/text.texi | 7 +- man/tramp.texi | 395 +- man/trampver.texi | 10 +- man/trouble.texi | 12 +- man/vip.texi | 8 +- man/viper.texi | 8 +- man/widget.texi | 47 +- man/windows.texi | 4 + man/woman.texi | 31 +- man/xresources.texi | 46 +- mkinstalldirs | 2 - msdos/ChangeLog | 34 + msdos/is_exec.c | 3 + msdos/mainmake | 2 + msdos/mainmake.v2 | 4 +- msdos/sed1.inp | 2 + msdos/sed1v2.inp | 5 +- msdos/sed1x.inp | 2 + msdos/sed2.inp | 2 + msdos/sed2v2.inp | 6 + msdos/sed2x.inp | 2 + msdos/sed3.inp | 2 + msdos/sed3v2.inp | 5 +- msdos/sed4.inp | 2 + msdos/sed5x.inp | 2 + msdos/sed6.inp | 14 + msdos/sedleim.inp | 2 + msdos/sedlisp.inp | 5 + msdos/sigaction.c | 2 + nt/.gitignore | 1 + nt/ChangeLog | 44 +- nt/INSTALL | 6 + nt/addpm.c | 3 + nt/addsection.c | 3 + nt/cmdproxy.c | 3 + nt/config.nt | 3 + nt/configure.bat | 7 + nt/ddeclient.c | 3 + nt/ebuild.bat | 4 + nt/fast-install.bat | 4 + nt/ftime-nostartup.bat | 4 + nt/ftime.bat | 4 + nt/gmake.defs | 3 + nt/inc/arpa/inet.h | 3 + nt/inc/gettext.h | 3 + nt/inc/grp.h | 36 + nt/inc/netdb.h | 3 + nt/inc/netinet/in.h | 3 + nt/inc/pwd.h | 3 + nt/inc/sys/dir.h | 3 + nt/inc/sys/file.h | 3 + nt/inc/sys/ioctl.h | 3 + nt/inc/sys/param.h | 3 + nt/inc/sys/socket.h | 3 + nt/inc/sys/time.h | 3 + nt/inc/unistd.h | 3 + nt/install.bat | 4 + nt/makefile.def | 2 + nt/makefile.nt | 2 + nt/makefile.w32-in | 18 +- nt/nmake.defs | 3 + nt/paths.h | 14 +- nt/preprep.c | 3 + nt/runemacs.c | 5 +- oldXMenu/Activate.c | 4 +- oldXMenu/AddPane.c | 4 +- oldXMenu/AddSel.c | 4 +- oldXMenu/ChangeLog | 2 + oldXMenu/ChgPane.c | 4 +- oldXMenu/ChgSel.c | 4 +- oldXMenu/Create.c | 4 +- oldXMenu/DelPane.c | 4 +- oldXMenu/DelSel.c | 4 +- oldXMenu/Destroy.c | 4 +- oldXMenu/Error.c | 3 +- oldXMenu/EvHand.c | 3 +- oldXMenu/FindPane.c | 4 +- oldXMenu/FindSel.c | 4 +- oldXMenu/Imakefile | 3 + oldXMenu/InsPane.c | 4 +- oldXMenu/InsSel.c | 4 +- oldXMenu/Internal.c | 3 +- oldXMenu/Locate.c | 4 +- oldXMenu/Makefile.in | 2 + oldXMenu/Post.c | 4 +- oldXMenu/Recomp.c | 4 +- oldXMenu/SetAEQ.c | 4 +- oldXMenu/SetFrz.c | 4 +- oldXMenu/SetPane.c | 4 +- oldXMenu/SetSel.c | 4 +- oldXMenu/X10.h | 4 +- oldXMenu/XCrAssoc.c | 4 +- oldXMenu/XDelAssoc.c | 3 +- oldXMenu/XDestAssoc.c | 3 +- oldXMenu/XLookAssoc.c | 3 +- oldXMenu/XMakeAssoc.c | 3 +- oldXMenu/XMenu.h | 4 +- oldXMenu/XMenuInt.h | 4 +- oldXMenu/copyright.h | 3 +- oldXMenu/insque.c | 3 + src/.gdbinit | 210 +- src/.gitignore | 9 +- src/ChangeLog | 2723 ++- src/ChangeLog.1 | 2 + src/ChangeLog.2 | 2 + src/ChangeLog.3 | 2 + src/ChangeLog.4 | 2 + src/ChangeLog.5 | 2 + src/ChangeLog.6 | 2 + src/ChangeLog.7 | 2 + src/ChangeLog.8 | 2 + src/ChangeLog.9 | 2 + src/Makefile.in | 108 +- src/abbrev.c | 13 +- src/acldef.h | 3 + src/alloc.c | 88 +- src/alloca.c | 51 +- src/atimer.c | 7 +- src/atimer.h | 10 + src/blockinput.h | 3 + src/buffer.c | 124 +- src/buffer.h | 28 +- src/bytecode.c | 32 +- src/callint.c | 47 +- src/callproc.c | 20 + src/casefiddle.c | 3 + src/casetab.c | 3 + src/ccl.c | 5 +- src/ccl.h | 3 + src/chartab.c | 8 +- src/chpdef.h | 3 + src/cm.c | 3 + src/cm.h | 3 + src/cmds.c | 5 +- src/commands.h | 3 + src/composite.h | 3 + src/config.in | 36 +- src/cxux-crt0.s | 3 + src/data.c | 143 +- src/dired.c | 109 +- src/dispextern.h | 248 +- src/dispnew.c | 303 +- src/disptab.h | 3 + src/doc.c | 9 +- src/doprnt.c | 3 + src/dosfns.c | 3 + src/dosfns.h | 3 + src/ecrt0.c | 3 + src/editfns.c | 6 +- src/emacs.c | 155 +- src/epaths.in | 3 + src/eval.c | 21 +- src/fileio.c | 80 +- src/filelock.c | 3 + src/filemode.c | 3 + src/firstfile.c | 2 + src/floatfns.c | 7 +- src/fns.c | 130 +- src/frame.c | 62 +- src/frame.h | 11 +- src/fringe.c | 1358 ++ src/getloadavg.c | 3 + src/getpagesize.h | 3 + src/gmalloc.c | 16 +- src/gnu.h | 3 + src/gtkutil.c | 346 +- src/gtkutil.h | 20 +- src/hftctl.c | 3 + src/image.c | 7532 +++++++ src/indent.c | 25 +- src/indent.h | 2 + src/insdel.c | 11 +- src/intervals.c | 35 +- src/intervals.h | 4 + src/ioctl.h | 3 + src/keyboard.c | 714 +- src/keyboard.h | 27 +- src/keymap.c | 28 +- src/keymap.h | 3 + src/lastfile.c | 5 +- src/lisp.h | 273 +- src/lread.c | 6 +- src/m/7300.h | 3 + src/m/acorn.h | 3 + src/m/alliant-2800.h | 3 + src/m/alliant.h | 3 + src/m/alliant1.h | 3 + src/m/alliant4.h | 3 + src/m/alpha.h | 3 + src/m/altos.h | 3 + src/m/amdahl.h | 3 + src/m/amdx86-64.h | 14 +- src/m/apollo.h | 3 + src/m/arm.h | 3 + src/m/att3b.h | 3 + src/m/aviion-intel.h | 3 + src/m/aviion.h | 2 + src/m/celerity.h | 3 + src/m/clipper.h | 3 + src/m/cnvrgnt.h | 3 + src/m/convex.h | 3 + src/m/cydra5.h | 3 + src/m/delta88k.h | 3 + src/m/dpx2.h | 2 + src/m/dual.h | 3 + src/m/elxsi.h | 3 + src/m/ews4800.h | 3 + src/m/f301.h | 3 + src/m/gould-np1.h | 2 + src/m/gould.h | 3 + src/m/hp800.h | 9 +- src/m/hp9000s300.h | 3 + src/m/i860.h | 3 + src/m/ia64.h | 12 +- src/m/ibm370aix.h | 3 + src/m/ibmps2-aix.h | 3 + src/m/ibmrs6000.h | 3 + src/m/ibmrs6000.inp | 2 + src/m/ibmrt-aix.h | 3 + src/m/ibmrt.h | 3 + src/m/ibms390.h | 3 + src/m/intel386.h | 3 + src/m/iris4d.h | 12 +- src/m/irist.h | 3 + src/m/is386.h | 3 + src/m/isi-ov.h | 3 + src/m/m68k.h | 3 + src/m/macppc.h | 3 + src/m/masscomp.h | 3 + src/m/mega68.h | 3 + src/m/mg1.h | 3 + src/m/mips-siemens.h | 9 +- src/m/mips.h | 10 +- src/m/mips4.h | 3 + src/m/ncr386.h | 3 + src/m/news-r6.h | 6 +- src/m/news-risc.h | 3 + src/m/news.h | 2 + src/m/next.h | 3 + src/m/nh3000.h | 3 + src/m/nh4000.h | 3 + src/m/ns16000.h | 3 + src/m/ns32000.h | 3 + src/m/nu.h | 3 + src/m/orion.h | 3 + src/m/orion105.h | 3 + src/m/paragon.h | 3 + src/m/pfa50.h | 3 + src/m/plexus.h | 3 + src/m/pmax.h | 3 + src/m/powermac.h | 3 + src/m/powerpcle.h | 3 + src/m/pyramid.h | 3 + src/m/pyrmips.h | 2 + src/m/sequent-ptx.h | 2 + src/m/sequent.h | 3 + src/m/sparc.h | 3 + src/m/sps7.h | 3 + src/m/sr2k.h | 9 +- src/m/stride.h | 3 + src/m/sun1.h | 3 + src/m/sun2.h | 3 + src/m/sun3-68881.h | 3 + src/m/sun3-fpa.h | 3 + src/m/sun3-soft.h | 3 + src/m/sun3.h | 3 + src/m/sun386.h | 3 + src/m/symmetry.h | 3 + src/m/tad68k.h | 3 + src/m/tahoe.h | 3 + src/m/tandem-s2.h | 3 + src/m/targon31.h | 3 + src/m/tek4300.h | 3 + src/m/tekxd88.h | 3 + src/m/template.h | 3 + src/m/tower32.h | 3 + src/m/tower32v3.h | 3 + src/m/ustation.h | 3 + src/m/vax.h | 3 + src/m/wicat.h | 3 + src/m/windowsnt.h | 3 + src/m/xps100.h | 3 + src/mac.c | 18 + src/macfns.c | 5075 +---- src/macgui.h | 38 +- src/macmenu.c | 32 +- src/macros.c | 3 + src/macros.h | 3 + src/macterm.c | 1495 +- src/macterm.h | 71 +- src/makefile.nt | 2 + src/makefile.w32-in | 41 +- src/marker.c | 3 + src/md5.c | 3 + src/md5.h | 3 + src/mem-limits.h | 3 + src/minibuf.c | 335 +- src/mktime.c | 3 + src/msdos.c | 24 +- src/msdos.h | 3 + src/ndir.h | 3 + src/param.h | 3 + src/point.h | 3 + src/pre-crt0.c | 3 + src/prefix-args.c | 3 + src/print.c | 99 +- src/process.c | 883 +- src/process.h | 18 + src/puresize.h | 5 +- src/ralloc.c | 3 + src/region-cache.c | 7 +- src/region-cache.h | 3 + src/s/386-ix.h | 3 + src/s/386bsd.h | 3 + src/s/aix3-1.h | 2 + src/s/aix3-2-5.h | 3 + src/s/aix3-2.h | 3 + src/s/aix4-1.h | 3 + src/s/aix4-2.h | 3 + src/s/aix4.h | 3 + src/s/bsd386.h | 3 + src/s/bsd4-1.h | 3 + src/s/bsd4-2.h | 3 + src/s/bsd4-3.h | 2 + src/s/bsdos2-1.h | 3 + src/s/bsdos2.h | 3 + src/s/bsdos3.h | 3 + src/s/bsdos4.h | 3 + src/s/cxux.h | 3 + src/s/cxux7.h | 3 + src/s/cygwin.h | 11 +- src/s/darwin.h | 14 +- src/s/dgux.h | 3 + src/s/dgux4.h | 3 + src/s/dgux5-4-3.h | 3 + src/s/dgux5-4r2.h | 3 + src/s/domain.h | 3 + src/s/esix.h | 3 + src/s/esix5r4.h | 3 + src/s/freebsd.h | 14 + src/s/gnu-linux.h | 3 + src/s/gnu.h | 3 + src/s/hiuxmpp.h | 2 + src/s/hiuxwe2.h | 2 + src/s/hpux.h | 3 + src/s/hpux10-20.h | 2 + src/s/hpux10.h | 3 + src/s/hpux11.h | 3 + src/s/hpux8.h | 3 + src/s/hpux9-x11r4.h | 2 + src/s/hpux9.h | 2 + src/s/hpux9shr.h | 3 + src/s/hpux9shxr4.h | 2 + src/s/iris3-5.h | 3 + src/s/iris3-6.h | 3 + src/s/irix3-3.h | 3 + src/s/irix4-0.h | 3 + src/s/irix5-0.h | 3 + src/s/irix5-2.h | 3 + src/s/irix6-0.h | 3 + src/s/irix6-5.h | 3 + src/s/isc2-2.h | 3 + src/s/isc3-0.h | 3 + src/s/isc4-0.h | 3 + src/s/isc4-1.h | 3 + src/s/lynxos.h | 3 + src/s/mach-bsd4-3.h | 3 + src/s/ms-w32.h | 3 + src/s/msdos.h | 3 + src/s/netbsd.h | 2 + src/s/newsos5.h | 3 + src/s/newsos6.h | 3 + src/s/nextstep.h | 3 + src/s/openbsd.h | 3 + src/s/osf1.h | 3 + src/s/osf5-0.h | 3 + src/s/ptx.h | 3 + src/s/ptx4-2.h | 3 + src/s/ptx4.h | 3 + src/s/riscix1-1.h | 3 + src/s/riscix12.h | 3 + src/s/riscos5.h | 3 + src/s/rtu.h | 3 + src/s/sco4.h | 3 + src/s/sco5.h | 3 + src/s/sol2-3.h | 3 + src/s/sol2-4.h | 2 + src/s/sol2-5.h | 3 + src/s/sol2-6.h | 3 + src/s/sol2.h | 3 + src/s/sunos4-0.h | 3 + src/s/sunos4-1.h | 3 + src/s/sunos413.h | 3 + src/s/sunos4shr.h | 3 + src/s/template.h | 3 + src/s/ultrix4-3.h | 3 + src/s/umax.h | 3 + src/s/umips.h | 3 + src/s/unipl5-2.h | 3 + src/s/unixware.h | 3 + src/s/usg5-0.h | 3 + src/s/usg5-2-2.h | 3 + src/s/usg5-2.h | 3 + src/s/usg5-3.h | 3 + src/s/usg5-4-2.h | 3 + src/s/usg5-4-3.h | 3 + src/s/usg5-4.h | 3 + src/s/ux4800.h | 3 + src/s/uxpds.h | 3 + src/s/uxpv.h | 3 + src/s/vms.h | 3 + src/s/vms4-0.h | 3 + src/s/vms4-2.h | 2 + src/s/vms4-4.h | 2 + src/s/vms5-5.h | 3 + src/s/windows95.h | 3 + src/s/xenix.h | 3 + src/scroll.c | 3 + src/sound.c | 3 + src/strftime.c | 3 + src/sunfns.c | 5 +- src/syntax.c | 17 +- src/sysdep.c | 40 +- src/sysselect.h | 3 + src/syssignal.h | 3 + src/systime.h | 3 + src/systty.h | 3 + src/syswait.h | 3 + src/term.c | 127 +- src/termcap.c | 49 + src/termchar.h | 3 + src/termhooks.h | 5 +- src/terminfo.c | 3 + src/termopts.h | 3 + src/textprop.c | 28 + src/tparam.c | 17 +- src/uaf.h | 3 + src/undo.c | 3 + src/unexaix.c | 3 + src/unexalpha.c | 3 + src/unexapollo.c | 3 + src/unexconvex.c | 2 + src/unexec.c | 3 + src/unexelf.c | 3 + src/unexenix.c | 3 + src/unexhp9k800.c | 3 + src/unexmacosx.c | 86 +- src/unexmips.c | 3 + src/unexnext.c | 3 + src/unexsni.c | 3 + src/unexsol.c | 3 + src/unexsunos4.c | 3 + src/unexw32.c | 3 + src/vlimit.h | 3 + src/vm-limit.c | 3 + src/w16select.c | 3 + src/w32.c | 36 +- src/w32.h | 3 + src/w32bdf.c | 11 +- src/w32bdf.h | 3 + src/w32console.c | 3 + src/w32fns.c | 6202 +----- src/w32gui.h | 3 + src/w32heap.c | 3 + src/w32heap.h | 3 + src/w32inevt.c | 28 +- src/w32inevt.h | 7 +- src/w32menu.c | 4 +- src/w32proc.c | 3 + src/w32reg.c | 3 + src/w32select.c | 3 + src/w32term.c | 399 +- src/w32term.h | 3 + src/w32xfns.c | 3 + src/widget.c | 3 + src/widget.h | 3 + src/widgetprv.h | 3 + src/window.c | 333 +- src/window.h | 6 + src/xdisp.c | 2046 +- src/xfaces.c | 146 +- src/xfns.c | 5954 +----- src/xmenu.c | 56 +- src/xrdb.c | 3 + src/xselect.c | 387 +- src/xsmfns.c | 69 +- src/xterm.c | 1353 +- src/xterm.h | 73 +- update-subdirs | 10 +- vms/README | 5 + vms/make-mms-derivative.el | 136 + vpath.sed | 2 + 1598 files changed, 99584 insertions(+), 69768 deletions(-) rewrite etc/HELLO (60%) rewrite etc/TUTORIAL.bg (95%) create mode 100644 etc/compilation.txt rewrite lisp/ChangeLog (94%) copy lisp/{ChangeLog => ChangeLog.10} (96%) rewrite lisp/diff.el (71%) create mode 100644 lisp/emacs-lisp/macroexp.el create mode 100644 lisp/emacs-lisp/tcover-ses.el create mode 100644 lisp/emacs-lisp/tcover-unsafep.el create mode 100644 lisp/help-at-pt.el create mode 100644 lisp/language/kannada.el create mode 100644 lisp/language/knd-util.el create mode 100644 lisp/ldefs-boot.el create mode 100644 lisp/progmodes/cfengine.el rewrite lisp/progmodes/compile.el (74%) create mode 100644 lisp/progmodes/ebnf-abn.el create mode 100644 lisp/progmodes/ebnf-dtd.el create mode 100644 lisp/progmodes/ebnf-ebx.el create mode 100644 lisp/progmodes/gdb-ui.el create mode 100644 lisp/progmodes/grep.el create mode 100644 lisp/progmodes/ld-script.el create mode 100644 lisp/progmodes/python.el create mode 100644 lisp/thumbs.el create mode 100644 lisp/toolbar/gud-n.pbm create mode 100644 lisp/toolbar/gud-n.xpm create mode 100644 lisp/toolbar/gud-ni.pbm create mode 100644 lisp/toolbar/gud-ni.xpm create mode 100644 lisp/toolbar/gud-s.pbm create mode 100644 lisp/toolbar/gud-s.xpm create mode 100644 lisp/toolbar/gud-si.pbm create mode 100644 lisp/toolbar/gud-si.xpm create mode 100644 lisp/toolbar/gud-watch.pbm create mode 100644 lisp/toolbar/gud-watch.xpm create mode 100644 lisp/vc-arch.el create mode 100644 lisp/x-dnd.el create mode 100644 lispintro/makefile.w32-in create mode 100755 mac/inc/grp.h create mode 100644 man/makefile.w32-in create mode 100755 nt/inc/grp.h create mode 100644 src/fringe.c create mode 100644 src/image.c create mode 100644 vms/make-mms-derivative.el diff --git a/AUTHORS b/AUTHORS index 2c7a2cbccb..88d4edbebd 100644 --- a/AUTHORS +++ b/AUTHORS @@ -502,17 +502,15 @@ Florian Weimer: changed gnus-msg.el mm-bodies.el message.el mm-util.el mml.el mailcap.el rfc2047.el gnus-cite.el gnus-score.el gnus-spec.el gnus-uu.el mm-encode.el nnultimate.el qp.el -Francesco Potorti: wrote cmacexp.el +Francesco Potort,Al(B: wrote cmacexp.el and changed etags.c man.el delta.h uniquify.el latin-post.el latin-alt.el rmail.el sgml-mode.el Makefile.in comint.el configure.in etags.1 filelock.c gud.el hanoi.el mailalias.el sendmail.el simple.el - skeleton.el vc-hooks.el b2m.c and 16 other files - -Francesco Potort,Al(B: changed undigest.el comint.el etags.el data.c + skeleton.el vc-hooks.el b2m.c undigest.el etags.el data.c generic-x.el tetris.el admin.el ange-ftp.el configure.in delta.h dired-aux.el dos-w32.el etags.1 fileio.c files.el fns.c maintaining.texi make-announcement make-tarball.txt mule.el pong.el - and 5 other files + and 21 other files Francis J. Wright: wrote woman.el @@ -884,7 +882,7 @@ Jonathan Stigelman: wrote hilit19.el Jonathan Vail: changed vc.el -Jonathan Yavner: wrote ses.el testcover-ses.el testcover-unsafep.el +Jonathan Yavner: wrote ses.el tcover-ses.el tcover-unsafep.el testcover.el unsafep.el and changed Makefile.in files.el ses-example.ses ses.texi @@ -1920,3 +1918,5 @@ Zoltan Kemenczy: changed gud.el Local Variables: coding: iso-2022-7bit End: + +arch-tag: 7ec2c5ea-4fe4-4937-b2cf-863e3cadc5c3 diff --git a/ChangeLog b/ChangeLog index 42f7aede59..db4f7a2aac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,120 @@ -2003-09-29 Dave Love +2004-04-04 Eli Zaretskii - * configure.in: Merge from HEAD. + * config.bat (lib-src): Recognize comment lines in Makefile.in + that have a TAB after the #, to avoid errors in preprocessing with + GCC 3.3.3. + +2004-03-31 Luc Teirlinck + + * Makefile.in: Mention in comment that `make maintainer-clean' + deletes .elc files. + +2004-03-22 Stefan Monnier + + * update-subdirs: Add local variables to prevent byte-compiling. + +2004-03-21 Dave Love + + * configure.in: Fix previous change. + +2004-03-18 Dave Love + + * configure.in: Add -znocombreloc to LDFLAGS if compiler supports it. + +2004-03-15 Luc Teirlinck + + * info/dir (File): Add SMTP and SES. + +2004-03-02 Stefan Monnier + + * Makefile.in (maintainer-clean): Clean in the lisp dir as well. + (bootstrap): Use the new bootstrap-prepare target in lisp. + +2004-02-18 Kim F. Storm + + * INSTALL.CVS: Add info about ssh/cvs related problems and work-around. + +2004-02-16 Eli Zaretskii + + * make-dist: Don't link index.*perm and permute-index into tempdir. + +2004-02-14 Jonathan Yavner + + * AUTHORS (JonathanYavner): Rename testcover-*.el to tcover-*.el + to match previous changes by Eli Zaretskii. + +2004-02-09 Luc Teirlinck + + * Makefile.in: Set CDPATH to an empty string. + +2004-01-27 Stefan Monnier + + * configure.in : Use fink packages if available. + +2004-01-25 Jerome Marant (tiny change) + + * make-dist (lispref): Do include lispref/index.texi. + +2004-01-06 Eric Hanchrow (tiny change) + + * make-dist (tempdir): Include cursors in nt/icons. + +2003-12-30 Eli Zaretskii + + * INSTALL.CVS: Renamed from INSTALL-CVS to avoid file-name + clashes with install-sh on 8+3 filesystems. + +2003-12-08 Miles Bader + + * .cvsignore: Add .arch-inventory. + +2003-12-24 Andreas Schwab + + * configure.in: Check for . Include it before + including . Move check for before its use. + +2003-12-24 Jan Dj,Ad(Brv + + * Makefile.in (install-arch-dep): Don't let cd output go into + pipe for carbon_appdir. + +2003-12-24 Andreas Schwab + + * configure.in (PKG_CHECK_MODULES): Fix quoting. + +2003-12-01 Andreas Schwab + + * configure.in (powerpc-apple-darwin*): Use ${CC-cc} instead of + hardcoding gcc. + * configure: Rebuild. + +2003-11-16 Jan Dj,Ad(Brv + + * configure.in (HAVE_GTK_MULTIDISPLAY): Check if GTK can handle + multiple displays. + Wrong number of args to AC_CHECK_LIB for HAVE_X_SM test corrected. + +2003-09-23 Dave Love + + * configure.in: Check members of struct ifreq. + +2003-09-14 Kim F. Storm + + * configure.in: Add checks for sys/ioctl.h and net/if.h. + +2003-09-12 Luc Teirlinck + + * Makefile.in (install-arch-indep, uninstall): Add SES manual. + +2003-08-18 Lute Kamstra + + * configure.in: Revert the change of 2003-07-29 as GTK+ 2.2 is not + required anymore. + +2003-08-07 Andrew Choi + + * configure.in [powerpc-apple-darwin*]: Use the -no-cpp-precomp + option instead of -traditional-cpp for CPP. 2003-07-29 Richard M. Stallman @@ -308,7 +422,7 @@ (*-sunos5.6*, *-solaris2.6*): New alternative. (*-sunos5*): Use version 2.6 as default. -2002-09-06 Kai Gro,b_(Bjohann +2002-09-06 Kai Gro,A_(Bjohann * configure.in: Fix typo. @@ -343,15 +457,15 @@ * configure.in (gamedir): Handle it like lispdir. (--with-game-dir option): Delete. -2002-06-21 Pavel Jan,Bm(Bk +2002-06-21 Pavel Jan,Am(Bk * configure.in: Add support for mipseb-*-netbsd* machines. -2002-06-18 Kai Gro,b_(Bjohann +2002-06-18 Kai Gro,A_(Bjohann * Makefile.in (install-arch-indep, uninstall): Add Tramp. -2002-06-17 Kai Gro,b_(Bjohann +2002-06-17 Kai Gro,A_(Bjohann * info/dir (File): Add an entry for Tramp. @@ -375,7 +489,7 @@ * configure.in (emacs_cv_speed_t): Add square brackets for clarity. -2002-05-04 Pavel Jan,Bm(Bk +2002-05-04 Pavel Jan,Am(Bk * make-dist: Do not distribute lock/ directory. @@ -389,7 +503,7 @@ * configure.in: Delete configure check for access to the game user. -2002-04-29 Pavel Jan,Bm(Bk +2002-04-29 Pavel Jan,Am(Bk * make-dist: lwlib/Imakefile is removed. @@ -400,7 +514,7 @@ * make-dist: Create directories in mac/Emacs.app. -2002-04-25 Pavel Jan,Bm(Bk +2002-04-25 Pavel Jan,Am(Bk * make-dist: lwlib-Xol* are removed. @@ -427,7 +541,7 @@ * configure.in: Add --game-dir, --game-user. Test to see if we can use them. -2002-04-08 Pavel Jan,Bm(Bk +2002-04-08 Pavel Jan,Am(Bk * configure.in: Add --with-sound. @@ -515,7 +629,7 @@ * configure.in (hppa*-*-linux-gnu*): New alternative. -2001-12-08 Pavel Jan,Bm(Bk +2001-12-08 Pavel Jan,Am(Bk * make-dist: Copy COPYING to leim/, lwlib/, mac/ and nt/ when creating distribution. @@ -528,12 +642,12 @@ (HAVE_DES_H, HAVE_KRB5_H): Properly quote args of AC_CHECK_HEADERS; this is required by recent Autoconf versions. -2001-12-02 Pavel Jan,Bm(Bk +2001-12-02 Pavel Jan,Am(Bk * make-dist: Do not try to link removed files (aclocal.m4, _emacs, TODO, vms-pp.trans and others). -2001-11-29 Pavel Jan,Bm(Bk +2001-11-29 Pavel Jan,Am(Bk * make-dist: Use COPYING from the top-level directory. @@ -541,7 +655,7 @@ * configure.in: Add support for FreeBSD/Alpha. -2001-11-29 Pavel Jan,Bm(Bk +2001-11-29 Pavel Jan,Am(Bk * make-dist: Add COPYING to the top-level directory of the distribution. Simplify the logic behind copying. @@ -586,7 +700,7 @@ 2001-11-22 Colin Walters * Makefile.in (install-arch-indep): Install the calc .info files. - (uninstall): Handle deletion of calc .info files (thanks Pavel Jan,Bm(Bk). + (uninstall): Handle deletion of calc .info files (thanks Pavel Jan,Am(Bk). 2001-11-17 Eli Zaretskii @@ -597,14 +711,14 @@ * configure.in: Add coff.h to the list in AC_CHECK_HEADERS. -2001-11-15 Pavel Jan,Bm(Bk +2001-11-15 Pavel Jan,Am(Bk * Makefile.in (uninstall): Fix previous change. * configure.in, Makefile.in: Add support for --program-prefix, --program-suffix and --program-transform-name options. -2001-11-13 Pavel Jan,Bm(Bk +2001-11-13 Pavel Jan,Am(Bk * Makefile.in (install-arch-indep): Use `${manext}' instead of `.1'. (install-arch-indep): Install emacsclient manual page. @@ -613,9 +727,9 @@ 2001-11-12 Eli Zaretskii * make-dist: Add lispref/index.*perm files to the distribution. - From Pavel Jan,Bm(Bk . + From Pavel Jan,Am(Bk . -2001-11-12 Pavel Jan,Bm(Bk +2001-11-12 Pavel Jan,Am(Bk * Makefile.in (uninstall): Remove gfdl.1 when uninstalling. @@ -652,7 +766,7 @@ * configure.in: Added a check for -2001-11-01 Pavel Jan,Bm(Bk +2001-11-01 Pavel Jan,Am(Bk * configure.in: Reindent --help output. From Per Starback (starback@ling.uu.se). @@ -5692,10 +5806,12 @@ to match build-install and paths.h. ;; Local Variables: -;; coding: iso-2022-7bit-unix +;; coding: iso-2022-7bit ;; End: Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: ac61a779-1480-4884-b292-d0c39c127a73 diff --git a/MAINTAINERS b/MAINTAINERS index 4d3fe1c98c..c9e16c9c9a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -211,3 +211,5 @@ src/xmenu.c src/xrdb.c src/xselect.c src/xterm.c + +;;; arch-tag: 869126d4-4851-41b2-8470-14dd492a3c98 diff --git a/Makefile.in b/Makefile.in index 3549350b3e..97d9a2a107 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2,8 +2,8 @@ # DIST: make most of the changes to this file you might want, so try # DIST: that first. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 1992,93,94,95,96,97,98,1999,2000,01,02,03,2004 +# Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -45,14 +45,19 @@ # make maintainer-clean # Delete everything from the current directory that can be # reconstructed with this Makefile. This typically includes -# everything deleted by distclean, plus more: C source files -# produced by Bison, tags tables, info files, and so on. +# everything deleted by distclean, plus more: .elc files, +# C source files produced by Bison, tags tables, info files, +# and so on. # # make extraclean # Still more severe - delete backup and autosave files, too. SHELL = /bin/sh +# This may not work with certain non-GNU make's. It only matters when +# inheriting a CDPATH not starting with the current directory. +CDPATH= + # If Make doesn't predefine MAKE, set it here. @SET_MAKE@ @@ -367,9 +372,9 @@ install-arch-dep: mkdir done if test "${carbon_appdir}" != ""; then \ umask 022; mkdir -p ${carbon_appdir}/Emacs.app; \ - (cd mac/Emacs.app; tar -chf - . ) | \ + (cd mac/Emacs.app; (tar -chf - . | \ (cd ${carbon_appdir}/Emacs.app; umask 022; tar -xvf - \ - && cat > /dev/null) || exit 1; \ + && cat > /dev/null))) || exit 1; \ fi ### Install the files that are machine-independent. @@ -440,9 +445,11 @@ install-arch-indep: mkdir info if [ `(cd ./etc; /bin/pwd)` != `(cd ${docdir}; /bin/pwd)` ]; \ then \ echo "Copying etc/DOC-* to ${docdir} ..." ; \ - (cd ./etc; tar -chf - DOC*) \ + (cd ./etc; tar -chf - DOC* compilation.txt) \ |(cd ${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \ - (cd $(docdir); chown $${LOGNAME:-$$USERNAME} DOC*; chmod a+r DOC*; \ + (cd $(docdir); \ + chown $${LOGNAME:-$$USERNAME} DOC* compilation.txt; \ + chmod a+r DOC* compilation.txt; \ if test "`echo DOC-*`" != "DOC-*"; then rm DOC; fi); \ else true; fi -unset CDPATH; \ @@ -468,7 +475,7 @@ install-arch-indep: mkdir info chmod a+r ${infodir}/dir); \ fi; \ cd ${srcdir}/info ; \ - for f in ada-mode* autotype* calc* ccmode* cl* dired-x* ebrowse* ediff* efaq* eintr* elisp* emacs* eshell* eudc* forms* gnus* idlwave* info* message* mh-e* pcl-cvs* reftex* sc* speedbar* tramp* vip* widget* woman* smtpmail*; do \ + for f in ada-mode* autotype* calc* ccmode* cl* dired-x* ebrowse* ediff* efaq* eintr* elisp* emacs* eshell* eudc* forms* gnus* idlwave* info* message* mh-e* pcl-cvs* reftex* sc* ses* speedbar* tramp* vip* widget* woman* smtpmail*; do \ (cd $${thisdir}; \ ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f; \ chmod a+r ${infodir}/$$f); \ @@ -478,7 +485,7 @@ install-arch-indep: mkdir info thisdir=`/bin/pwd`; \ if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \ then \ - for f in ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq elisp eintr emacs emacs-mime eshell eudc forms gnus idlwave info message mh-e pcl-cvs reftex sc speedbar tramp vip viper widget woman smtpmail; do \ + for f in ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq elisp eintr emacs emacs-mime eshell eudc forms gnus idlwave info message mh-e pcl-cvs reftex sc ses speedbar tramp vip viper widget woman smtpmail; do \ (cd $${thisdir}; \ ${INSTALL_INFO} --info-dir=${infodir} ${infodir}/$$f); \ done; \ @@ -544,7 +551,7 @@ uninstall: done (cd ${archlibdir} && rm -f fns-*) -rm -rf ${libexecdir}/emacs/${version} - (cd ${infodir} && rm -f cl* ada-mode* autotype* calc* ccmode* ebrowse* efaq* eintr elisp* eshell* eudc* idlwave* message* pcl-cvs* reftex* speedbar* tramp* widget* woman* dired-x* ediff* emacs* forms* gnus* info* mh-e* sc* vip* smtpmail*) + (cd ${infodir} && rm -f cl* ada-mode* autotype* calc* ccmode* ebrowse* efaq* eintr elisp* eshell* eudc* idlwave* message* pcl-cvs* reftex* speedbar* tramp* widget* woman* dired-x* ediff* emacs* forms* gnus* info* mh-e* sc* ses* vip* smtpmail*) (cd ${man1dir} && rm -f emacs${manext} emacsclient${manext} etags${manext} ctags${manext}) (cd ${bindir} && rm -f $(EMACSFULL) $(EMACS)) @@ -630,6 +637,7 @@ maintainer-clean: FRC -(cd lispref && $(MAKE) $(MFLAGS) maintainer-clean) -(cd lispintro && $(MAKE) $(MFLAGS) maintainer-clean) (cd leim; $(MAKE) $(MFLAGS) maintainer-clean) + (cd lisp; $(MAKE) $(MFLAGS) maintainer-clean) ${top_distclean} ### This doesn't actually appear in the coding standards, but Karl @@ -730,7 +738,7 @@ maybe_bootstrap: fi bootstrap: bootstrap-clean-before info FRC - (cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean) + (cd lisp; $(MAKE) $(MFLAGS) bootstrap-prepare) (cd src; $(MAKE) $(MFLAGS) bootstrap) (cd lisp; $(MAKE) $(MFLAGS) bootstrap EMACS=../src/bootstrap-emacs${EXEEXT}) (cd src; $(MAKE) $(MFLAGS) mostlyclean) @@ -748,3 +756,4 @@ bootstrap-clean-before: FRC -(cd lispintro && $(MAKE) $(MFLAGS) clean) (cd leim; $(MAKE) $(MFLAGS) clean) +# arch-tag: c1162ff6-e0a8-4366-bc1a-2eb544007156 diff --git a/admin/ChangeLog b/admin/ChangeLog index 5671c872ff..cca47783b6 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,25 @@ +2003-10-01 Miles Bader + + * quick-install-emacs: Don't use "function" keyword when defining + shell functions. + +2003-09-27 Miles Bader + + * quick-install-emacs: Remove fns-* pruning, since that file no + longer seems to be generated. + (AVOID): Quote literal periods. Quote braces in a way acceptable + to all parties (gawk gets bitchy about using `\'). + +2003-08-19 Miles Bader + + * quick-install-emacs: Add arch-specific ignored files to + quick-install-emacs. Use quoting for periods that's acceptable + to recent versions of gawk. + +2003-08-11 Markus Rost + + * cus-test.el: Remove obsolete workaround. + 2003-04-22 Andrew Innes * nt/makedist.bat: Fix multi-file .zip distribution, by splitting @@ -136,3 +158,5 @@ Copyright (C) 2001 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 97728c77-77c0-4156-b669-0e8c07d94e5a diff --git a/admin/README b/admin/README index 439d7874a5..6f09464e0a 100644 --- a/admin/README +++ b/admin/README @@ -22,3 +22,5 @@ Brief description of sub-directories: charsets scripts for generating charset map files in ../etc/charsets + +# arch-tag: 812b9461-bc0a-46a7-925e-24bd41118463 diff --git a/admin/admin.el b/admin/admin.el index e16b26eb6a..8048ccc78e 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -89,4 +89,5 @@ Root must be the root of an Emacs source tree." (rx (and "EMACSVER" (1+ space) (submatch (1+ (in "0-9."))))))) +;;; arch-tag: 4ea83636-2293-408b-884e-ad64f22a3bf5 ;; admin.el ends here. diff --git a/admin/alloc-colors.c b/admin/alloc-colors.c index 4be2038ef1..0aacb68723 100644 --- a/admin/alloc-colors.c +++ b/admin/alloc-colors.c @@ -111,3 +111,6 @@ main (int argc, char **argv) XCloseDisplay (dpy); return 0; } + +/* arch-tag: f1be90ac-5b70-43c2-835e-5a6432a25145 + (do not change this comment) */ diff --git a/admin/build-configs b/admin/build-configs index 06ea9cb287..1a21b90c17 100755 --- a/admin/build-configs +++ b/admin/build-configs @@ -97,3 +97,5 @@ foreach $config (@configs) # Local Variables: # mode: cperl # End: + +# arch-tag: 20a4452d-610a-4e54-9abc-ffe79f5c0d30 diff --git a/admin/check-doc-strings b/admin/check-doc-strings index f5f750925e..ce2166fce8 100755 --- a/admin/check-doc-strings +++ b/admin/check-doc-strings @@ -298,3 +298,4 @@ foreach my $fun (sort keys %texi_funtype) { } } +# arch-tag: e75331f5-5d1b-4393-ad5b-b0f87b5d47b0 diff --git a/admin/cus-test.el b/admin/cus-test.el index bebf89cdeb..cf00bf214f 100644 --- a/admin/cus-test.el +++ b/admin/cus-test.el @@ -150,18 +150,6 @@ ;; This avoids a hang of `cus-test-apropos' in 21.2. ;; (add-to-list 'cus-test-skip-list 'sh-alias-alist) -;; Don't create a file `filesets-menu-cache-file'. -(setq filesets-menu-cache-file "") -;; Disable filesets hooks. -(add-hook - 'cus-test-after-load-libs-hook - (lambda nil - (remove-hook 'menu-bar-update-hook 'filesets-build-menu-maybe) - (remove-hook 'kill-emacs-hook 'filesets-exit) - (remove-hook 'kill-buffer-hook 'filesets-remove-from-ubl) - (remove-hook 'first-change-hook 'filesets-reset-filename-on-change) - )) - ;; Loading dunnet in batch mode leads to a Dead end. (let (noninteractive) (load "dunnet")) (add-to-list 'cus-test-libs-noloads "dunnet") @@ -538,4 +526,5 @@ in the Emacs source directory." (provide 'cus-test) +;;; arch-tag: a4991a31-548d-48fb-8ba1-1ebbe68eb2e7 ;;; cus-test.el ends here diff --git a/admin/diff-tar-files b/admin/diff-tar-files index 6536a5e109..d827de3ec3 100755 --- a/admin/diff-tar-files +++ b/admin/diff-tar-files @@ -42,3 +42,4 @@ diff -u $old_tmp $new_tmp rm -f $new_tmp $old_tmp +# arch-tag: ef2c96e2-ea67-4668-925c-d9a6f3d205cf diff --git a/admin/emacs-pretesters b/admin/emacs-pretesters index 10ab3fd0da..169c7ee466 100644 --- a/admin/emacs-pretesters +++ b/admin/emacs-pretesters @@ -438,3 +438,5 @@ args[0]). Local Variables: mode: text End: + +# arch-tag: caf47b2c-b56b-44f7-a760-b5bfbed15fd3 diff --git a/admin/make-announcement b/admin/make-announcement index 9f69889e17..cc9d68726a 100755 --- a/admin/make-announcement +++ b/admin/make-announcement @@ -64,3 +64,5 @@ EOF make-changelog-diff $oldtag $newtag echo " announcement created in $outfile" >&2 + +# arch-tag: 605e00c7-7330-4c45-81e1-2ed53a13c39f diff --git a/admin/make-changelog-diff b/admin/make-changelog-diff index 45a7798683..7d98d22ddf 100755 --- a/admin/make-changelog-diff +++ b/admin/make-changelog-diff @@ -24,3 +24,5 @@ cvs -q diff -b -r $1 -r $2 $(find -name ChangeLog|sort) | x s/^\n// p" + +# arch-tag: 7604a259-40b4-4f97-86b2-496a9c546f0a diff --git a/admin/make-emacs b/admin/make-emacs index fa7310ce94..faa5dc2a39 100755 --- a/admin/make-emacs +++ b/admin/make-emacs @@ -185,3 +185,5 @@ exit system "$make CC=\"$cc\" CFLAGS=\"$opts\" @ARGV"; # Local Variables: # mode: cperl # End: + +# arch-tag: 5c3f9713-9ece-4a12-b3f8-deaff15974ba diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index a9753f3fc4..3af7cb81da 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -1,5 +1,6 @@ Instructions to create pretest or release tarballs. --- originally written by Eli Zaretskii, amended by Francesco Potortì +-- originally written by Gerd Moellmann, amended by Francesco Potortì + with the initial help of Eli Zaretskii For each step, check for possible errors. @@ -9,24 +10,30 @@ For each step, check for possible errors. make sure that the later tagged version will bootstrap, should it be necessary to check it out. -3. Set the version number (M-x load-file RET admin/admin.el RET, then +3. Regenerate Emacs' AUTHORS file (M-x load-file RET + lisp/emacs-lisp/authors.el RET, then M-x authors RET, then save + the *Authors* buffer). This may require fixing syntactically + incorrect ChangeLog entries beforehand. + +4. Set the version number (M-x load-file RET admin/admin.el RET, then M-x set-version RET). For a release, add released change log entries (M-x add-release-logs RET). -4. rm configure; make bootstrap +5. rm configure; make bootstrap -5. Commit configure, README, lisp/loaddefs.el, lisp/cus-load.el, - lisp/finder-inf.el, lisp/version.el, man/emacs.texi. For a release, - also commit the ChangeLog files in all directories. +6. Commit configure, README, AUTHORS, lisp/loaddefs.el, + lisp/cus-load.el, lisp/finder-inf.el, lisp/version.el, + man/emacs.texi. For a release, also commit the ChangeLog files in + all directories. -6. make-dist --snapshot. Check the contents of the new tar with +7. make-dist --snapshot. Check the contents of the new tar with admin/diff-tar-files against an older tar file. Some old pretest tarballs are kept under fencepost.gnu.org:~pot/emacs-pretest/, while old emacs tarballs are at . -7. xdelta delta emacs-OLD.tar.gz emacs-NEW.tar.gz emacs-OLD-NEW.xdelta +8. xdelta delta emacs-OLD.tar.gz emacs-NEW.tar.gz emacs-OLD-NEW.xdelta -8. tar -zxf emacs-NEW.tar.gz; cd emacs-NEW +9. tar -zxf emacs-NEW.tar.gz; cd emacs-NEW configure && make && make -n install Use `script' or M-x compile to save the compilation log in compile-NEW.log and compare it against an old one. The easiest way @@ -34,28 +41,36 @@ For each step, check for possible errors. number of the old Emacs to __, do the same with the new log and do M-x ediff. Especially check that Info files aren't built. -9. cd EMACS_ROOT_DIR; cvs tag TAG +10. cd EMACS_ROOT_DIR; cvs tag TAG TAG is EMACS_PRETEST_XX_YY_ZZZ for a pretest, EMACS_XX_YY for a release. -10. admin/make-announcement OLD NEW +11. admin/make-announcement OLD NEW This creates an announcement for pretests. OLD is the version used to make deltas with respect to NEW. Anouncements for pretests need to be crafted by hand. Use an older announcement to start with. -11. For a pretest, do: +12. For the moment, put the tarballs on a public site and send a GPG + signed email to with the URLs of the tarballs + and their md5sum signatures. As of 2003-10, the GNU maintainers are + working on a better procedure. For reference, here are the previous + instructions, which are no more valid after the break-in of 2003-08: + ==== + For a pretest, do: rsync -aP emacs-NEW.tar.gz emacs-OLD-NEW.xdelta compile-NEW.log \ emacs-NEW.announce alpha.gnu.org:/home/alpha/gnu/emacs/pretest/. For a release, do: rsync -aP emacs-NEW.tar.gz emacs-OLD-NEW.xdelta \ alpha.gnu.org:/home/ftp/gnu/emacs/. -12. Verify that the files are visible at +13. Verify that the files are visible at ftp://alpha.gnu.org/gnu/emacs/pretest/ for a pretest, at ftp://ftp.gnu.org/gnu/emacs/ for a release. -13. For a pretest, let Richard Stallman know about the new pretest and +14. For a pretest, let Richard Stallman know about the new pretest and tell him to announce it using the announcement you prepared. Remind him to set a Reply-to header to . For a release, Richard should prepare the announcement himself, possibly starting from a previous announcment. + +# arch-tag: c23c771f-ca26-4584-8a04-50ecf0989390 diff --git a/admin/notes/cpp b/admin/notes/cpp index 6815b88ccc..4f61a595f5 100644 --- a/admin/notes/cpp +++ b/admin/notes/cpp @@ -16,3 +16,5 @@ this should not be defined for normal .c file compilation. there has been discussion on eliminating this use of cpp and relying solely on autoconf processing. rms says to leave it be. + +;;; arch-tag: d654291e-9fc8-41b7-ab0c-d3cde842a8e0 diff --git a/admin/notes/iftc b/admin/notes/iftc index 294464a860..e8dcdd3a6d 100644 --- a/admin/notes/iftc +++ b/admin/notes/iftc @@ -23,3 +23,5 @@ The comment /* iftc */ is used to mark this type of casting to differentiate it from other casting. We commit the changes and can now go about modifying LOW and HIGH separately. When HIGH is ready to handle the type change, the cast can be removed. + +;;; arch-tag: 3309cc41-5d59-421b-b7be-c94b04083bb5 diff --git a/admin/notes/trailing-whitespace b/admin/notes/trailing-whitespace index bbf5c05f17..e29456b3a2 100644 --- a/admin/notes/trailing-whitespace +++ b/admin/notes/trailing-whitespace @@ -4,3 +4,5 @@ apparently there was a big discussion on emacs-devel wrt trailing whitespace. there was a mass-change to remove such from various branches in cvs. probably it's a good idea to avoid adding trailing whitespace in new code/docs and in changes. + +;;; arch-tag: de441379-c345-4826-a784-352b5413a698 diff --git a/admin/nt/dump.bat b/admin/nt/dump.bat index 34f24d3a91..b332e7471f 100755 --- a/admin/nt/dump.bat +++ b/admin/nt/dump.bat @@ -19,3 +19,7 @@ copy ..\etc\DOC* obj\etc copy temacs.exe obj\i386 obj\i386\temacs -batch -l loadup dump copy obj\i386\emacs.exe . + +goto skipArchTag + arch-tag: 0ca3036d-3a1e-47ea-87c6-9c0845253496 +:skipArchTag diff --git a/admin/nt/makedist.bat b/admin/nt/makedist.bat index f34e7e532f..feb6799080 100755 --- a/admin/nt/makedist.bat +++ b/admin/nt/makedist.bat @@ -122,3 +122,7 @@ 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 + arch-tag: 6e2ddd92-c1c9-4992-b6b5-207aaab72f68 +:skipArchTag diff --git a/admin/quick-install-emacs b/admin/quick-install-emacs index ba39f7962f..16cd936a78 100755 --- a/admin/quick-install-emacs +++ b/admin/quick-install-emacs @@ -8,7 +8,7 @@ PUBLIC_LIBSRC_BINARIES='b2m emacsclient etags ctags ebrowse' PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin' -AVOID="CVS -DIC README COPYING ChangeLog ~ \.orig$ \.rej$ Makefile makefile stamp-subdir .cvsignore \.[cho]$ make-docfile testfile test-distrib" +AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile makefile stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib" # Prune old binaries lying around in the source tree PRUNE=no @@ -133,7 +133,8 @@ elif test ! -r "$BUILD/config.status"; then fi CONFIG_STATUS="$BUILD/config.status" -function get_config_var () { +get_config_var () +{ if ! sed -n "s/^s\(.\)@$1@\1\(.*\)\1.*$/\2/p" $CONFIG_STATUS | sed q | grep '' then echo 1>&2 "$me: $1: Configuration variable not found in $CONFIG_STATUS" @@ -153,7 +154,8 @@ DST_BIN="$prefix/bin" DST_LIBEXEC="$prefix/libexec/emacs/$VERSION/$ARCH" DST_INFO="$prefix/info" -function maybe_mkdir () { +maybe_mkdir () +{ if ! test -d "$1"; then $MKDIR "$1" 2>&1 | sed "s/^mkdir:/$me:/" 1>&2 fi @@ -177,15 +179,12 @@ if test x"$PRUNE" != xno; then echo $REMOVE_CMD $D PRUNED="$PRUNED $D" done - for D in `ls -1t $BUILD/lib-src/fns-* | sed 1d`; do - echo $REMOVE_CMD $D - PRUNED="$PRUNED $D" - done fi test x"$PRUNE" = xonly && exit 0 -function maybe_emit_copy () { +maybe_emit_copy () +{ if test "$FORCE" = yes || ! cmp -s $1 $2; then echo $LINK_CMD $1 $2 fi @@ -338,3 +337,5 @@ END { done ) | eval $EXEC + +# arch-tag: 9322b572-9755-4cf7-a67a-21e6505f1477 diff --git a/admin/revdiff b/admin/revdiff index 416c572d19..5c9d2251c8 100755 --- a/admin/revdiff +++ b/admin/revdiff @@ -133,3 +133,5 @@ while (@ARGV) # Local Variables: # mode: cperl # End: + +# arch-tag: 2798b20d-c7f2-4c78-8378-7bb529c36a09 diff --git a/autogen.sh b/autogen.sh index 4b74b45a0e..89d6b9c437 100755 --- a/autogen.sh +++ b/autogen.sh @@ -5,3 +5,5 @@ echo "Please read INSTALL-CVS for instructions on how to build Emacs from CVS." # Exit with failure, since people may have generic build scripts that # try things like "autogen.sh && ./configure && make". exit 1 + +# arch-tag: a123408c-fada-4bf7-98a0-a786cff918f0 diff --git a/config.bat b/config.bat index 5d9f7718c7..732c4021aa 100644 --- a/config.bat +++ b/config.bat @@ -1,7 +1,7 @@ @echo off rem ---------------------------------------------------------------------- rem Configuration script for MSDOS -rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001 +rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2004 rem Free Software Foundation, Inc. rem This file is part of GNU Emacs. @@ -191,7 +191,7 @@ rem ---------------------------------------------------------------------- Echo Configuring the library source directory... cd lib-src rem Create "makefile" from "makefile.in". -sed -e "1,/== start of cpp stuff ==/s@^# .*$@@" junk.c +sed -e "1,/== start of cpp stuff ==/s@^#[ ].*$@@" junk.c gcc -E -traditional -I. -I../src junk.c | sed -e "s/^ / /" -e "/^#/d" -e "/^[ ]*$/d" >makefile.new If "%DJGPP_VER%" == "2" goto libsrc-v2 sed -f ../msdos/sed3.inp Makefile @@ -276,3 +276,7 @@ set $foo$= set X11= set nodebug= set djgpp_ver= + +goto skipArchTag + arch-tag: 2d2fed23-4dc6-4006-a2e4-49daf0031f33 +:skipArchTag diff --git a/configure b/configure index 2d1d5beeba..13d1baa6cf 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57. +# Generated by GNU Autoconf 2.54. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. @@ -36,10 +36,7 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME +for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var @@ -85,15 +82,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi - rm -f conf$$.sh + rm -f conftest.sh fi @@ -950,7 +947,7 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi - cd "$ac_popdir" + cd $ac_popdir done fi @@ -971,7 +968,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.57. Invocation command line was +generated by GNU Autoconf 2.54. Invocation command line was $ $0 $@ @@ -1023,54 +1020,24 @@ _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= -ac_configure_args0= -ac_configure_args1= ac_sep= -ac_must_keep_next=false -for ac_pass in 1 2 +for ac_arg do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - esac - done + case $ac_arg in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n ) continue ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1147,7 +1114,7 @@ _ASBOX echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && + rm -f core core.* *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 @@ -2576,7 +2543,13 @@ _ACEOF powerpc-apple-darwin* ) machine=powermac opsys=darwin # Define CPP as follows to make autoconf work correctly. - CPP="gcc -E -no-cpp-precomp" + CPP="${CC-cc} -E -no-cpp-precomp" + # Use fink packages if available. + if test -d /sw/include && test -d /sw/lib; then + GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" + CPP="${CPP} ${GCC_TEST_OPTIONS}" + NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} + fi ;; ## AMD x86-64 Linux-based GNU system @@ -2961,10 +2934,8 @@ fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. @@ -2989,11 +2960,7 @@ ac_compiler=`set X $ac_compile; echo $2` cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" int main () @@ -3004,7 +2971,7 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.exe" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. @@ -3023,39 +2990,27 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out -do +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; - * ) - break;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + a.out ) # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool --akim. + export ac_cv_exeext + break;; + * ) break;; esac done else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 +check \`config.log' for details." >&5 echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} +check \`config.log' for details." >&2;} { (exit 77); exit 77; }; } fi @@ -3082,11 +3037,9 @@ if test "$cross_compiling" != yes; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 +If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} +If you meant to cross compile, use \`--host'." >&2;} { (exit 1); exit 1; }; } fi fi @@ -3094,7 +3047,7 @@ fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. @@ -3125,10 +3078,8 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi @@ -3146,11 +3097,7 @@ if test "${ac_cv_objext+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" int main () @@ -3175,12 +3122,9 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 done else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} +cat conftest.$ac_ext >&5 +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} { (exit 1); exit 1; }; } fi @@ -3197,11 +3141,7 @@ if test "${ac_cv_c_compiler_gnu+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" int main () @@ -3229,8 +3169,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -3250,11 +3189,7 @@ if test "${ac_cv_prog_cc_g+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" int main () @@ -3279,8 +3214,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -3311,11 +3245,7 @@ else ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include #include @@ -3378,8 +3308,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done @@ -3420,7 +3349,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ - '' \ + ''\ + '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ @@ -3429,13 +3359,9 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration +#include "confdefs.h" #include +$ac_declaration int main () { @@ -3459,18 +3385,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 : else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_declaration int main () @@ -3495,8 +3416,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done @@ -3509,8 +3429,7 @@ fi else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c @@ -3588,22 +3507,12 @@ for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif +#include "confdefs.h" +#include Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -3626,8 +3535,7 @@ if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi @@ -3637,11 +3545,7 @@ rm -f conftest.err conftest.$ac_ext # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -3665,8 +3569,7 @@ if test -z "$ac_cpp_err"; then continue else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break @@ -3695,22 +3598,12 @@ for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif +#include "confdefs.h" +#include Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -3733,8 +3626,7 @@ if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi @@ -3744,11 +3636,7 @@ rm -f conftest.err conftest.$ac_ext # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -3772,8 +3660,7 @@ if test -z "$ac_cpp_err"; then continue else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break @@ -3786,10 +3673,8 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -4089,6 +3974,42 @@ then fi +late_LDFLAGS=$LDFLAGS +if test $GCC = yes; then + LDFLAGS="$LDFLAGS -Wl,-znocombreloc" +else + LDFLAGS="$LDFLAGS -znocombreloc" +fi + +echo "$as_me:$LINENO: checking For -znocombreloc" >&5 +echo $ECHO_N "checking For -znocombreloc... $ECHO_C" >&6 + +cat >conftest.$ac_ext <<_ACEOF +main(){return 0;} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +LDFLAGS=$late_LDFLAGS + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 @@ -4110,11 +4031,7 @@ echo "$as_me:$LINENO: checking for AIX" >&5 echo $ECHO_N "checking for AIX... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #ifdef _AIX yes #endif @@ -4310,11 +4227,7 @@ else # so use the C compiler's -n32 option if that helps. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, @@ -4347,8 +4260,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext CC="$CC -n32" @@ -4367,8 +4279,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_sys_largefile_CC=' -n32'; break else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext break @@ -4392,11 +4303,7 @@ else ac_cv_sys_file_offset_bits=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, @@ -4429,17 +4336,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -4473,8 +4375,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_sys_file_offset_bits=64; break else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext break @@ -4499,11 +4400,7 @@ else ac_cv_sys_large_files=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, @@ -4536,17 +4433,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -4580,8 +4472,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_sys_large_files=1; break else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext break @@ -4609,54 +4500,43 @@ if test "${ac_cv_header_stdc+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include #include #include -int -main () -{ - - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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); }; }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no + cat conftest.$ac_ext >&5 + ac_cv_header_stdc=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF @@ -4674,11 +4554,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF @@ -4699,18 +4575,13 @@ if test $ac_cv_header_stdc = yes; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) @@ -4743,12 +4614,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -4783,11 +4653,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> @@ -4807,8 +4673,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -4845,11 +4710,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -4868,8 +4729,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -4881,11 +4741,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -4908,8 +4764,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -4922,32 +4777,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -4979,11 +4816,7 @@ else LIBS="-lossaudio $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -5015,8 +4848,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_ossaudio__oss_ioctl=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_ossaudio__oss_ioctl=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -5076,11 +4908,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -5099,8 +4927,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -5112,11 +4939,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -5139,8 +4962,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -5153,32 +4975,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -5211,11 +5015,7 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -5238,8 +5038,7 @@ if test -z "$ac_cpp_err"; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_ext @@ -5262,54 +5061,43 @@ if test "${ac_cv_header_stdc+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include #include #include -int -main () -{ - - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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); }; }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_stdc=no + cat conftest.$ac_ext >&5 + ac_cv_header_stdc=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF @@ -5327,11 +5115,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF @@ -5352,18 +5136,13 @@ if test $ac_cv_header_stdc = yes; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) @@ -5396,12 +5175,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -5422,11 +5200,7 @@ if test "${ac_cv_header_time+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include #include @@ -5455,8 +5229,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -5478,11 +5251,7 @@ if test "${ac_cv_have_decl_sys_siglist+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default int main () @@ -5510,8 +5279,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_have_decl_sys_siglist=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_have_decl_sys_siglist=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -5543,11 +5311,7 @@ if test "${ac_cv_have_decl___sys_siglist+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default int main () @@ -5575,8 +5339,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_have_decl___sys_siglist=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_have_decl___sys_siglist=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -5614,11 +5377,7 @@ if test "${ac_cv_header_sys_wait_h+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include #ifndef WEXITSTATUS @@ -5653,8 +5412,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -5677,11 +5435,7 @@ if test "${emacs_cv_struct_utimbuf+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #ifdef TIME_WITH_SYS_TIME #include #include @@ -5718,8 +5472,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 emacs_cv_struct_utimbuf=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_struct_utimbuf=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -5741,11 +5494,7 @@ if test "${ac_cv_type_signal+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include #ifdef signal @@ -5780,8 +5529,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_type_signal=int fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -5802,11 +5550,7 @@ if test "${emacs_cv_speed_t+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -5831,8 +5575,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 emacs_cv_speed_t=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_speed_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -5854,11 +5597,7 @@ if test "${emacs_cv_struct_timeval+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #ifdef TIME_WITH_SYS_TIME #include #include @@ -5892,8 +5631,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 emacs_cv_struct_timeval=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_struct_timeval=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -5916,11 +5654,7 @@ if test "${emacs_cv_struct_exception+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -5945,8 +5679,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 emacs_cv_struct_exception=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_struct_exception=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -5962,28 +5695,27 @@ _ACEOF fi -echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 -echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 -if test "${ac_cv_struct_tm+set}" = set; then + +for ac_header in sys/socket.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include - -int -main () -{ -struct tm *tp; tp->tm_sec; - ; - return 0; -} +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -5997,18 +5729,179 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_struct_tm=time.h + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_struct_tm=sys/time.h +cat conftest.$ac_ext >&5 +ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 -echo "${ECHO_T}$ac_cv_struct_tm" >&6 -if test $ac_cv_struct_tm = sys/time.h; then +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 $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat 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 in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in net/if.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +if test "${ac_cv_struct_tm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include + +int +main () +{ +struct tm *tp; tp->tm_sec; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_struct_tm=time.h +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_struct_tm=sys/time.h +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6 +if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 @@ -6023,11 +5916,7 @@ if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include <$ac_cv_struct_tm> @@ -6057,15 +5946,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include <$ac_cv_struct_tm> @@ -6095,8 +5979,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -6126,77 +6009,537 @@ echo $ECHO_N "checking for tzname... $ECHO_C" >&6 if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#endif + +int +main () +{ +atoi(*tzname); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_var_tzname=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_var_tzname=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6 + if test $ac_cv_var_tzname = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 +_ACEOF + + fi +fi + +echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5 +echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6 +if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include + +int +main () +{ +static struct tm ac_aggr; +if (ac_aggr.tm_gmtoff) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_tm_tm_gmtoff=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include + +int +main () +{ +static struct tm ac_aggr; +if (sizeof ac_aggr.tm_gmtoff) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_tm_tm_gmtoff=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_member_struct_tm_tm_gmtoff=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6 +if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TM_GMTOFF 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5 +echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6 +if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif + +int +main () +{ +static struct ifreq ac_aggr; +if (ac_aggr.ifr_flags) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_ifreq_ifr_flags=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif + +int +main () +{ +static struct ifreq ac_aggr; +if (sizeof ac_aggr.ifr_flags) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_ifreq_ifr_flags=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_member_struct_ifreq_ifr_flags=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5 +echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6 +if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 +_ACEOF + + +fi +echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5 +echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6 +if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif + +int +main () +{ +static struct ifreq ac_aggr; +if (ac_aggr.ifr_hwaddr) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_ifreq_ifr_hwaddr=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif + +int +main () +{ +static struct ifreq ac_aggr; +if (sizeof ac_aggr.ifr_hwaddr) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_ifreq_ifr_hwaddr=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_member_struct_ifreq_ifr_hwaddr=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5 +echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6 +if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 +_ACEOF + + +fi +echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5 +echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6 +if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif + +int +main () +{ +static struct ifreq ac_aggr; +if (ac_aggr.ifr_netmask) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_ifreq_ifr_netmask=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif + +int +main () +{ +static struct ifreq ac_aggr; +if (sizeof ac_aggr.ifr_netmask) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_ifreq_ifr_netmask=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_member_struct_ifreq_ifr_netmask=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5 +echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6 +if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 +_ACEOF + + +fi +echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5 +echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6 +if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif + +int +main () +{ +static struct ifreq ac_aggr; +if (ac_aggr.ifr_broadaddr) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_ifreq_ifr_broadaddr=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#ifndef tzname /* For SGI. */ -extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#include "confdefs.h" +$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include #endif int main () { -atoi(*tzname); +static struct ifreq ac_aggr; +if (sizeof ac_aggr.ifr_broadaddr) +return 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_var_tzname=yes + ac_cv_member_struct_ifreq_ifr_broadaddr=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_var_tzname=no +cat conftest.$ac_ext >&5 +ac_cv_member_struct_ifreq_ifr_broadaddr=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 -echo "${ECHO_T}$ac_cv_var_tzname" >&6 - if test $ac_cv_var_tzname = yes; then +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5 +echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6 +if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_TZNAME 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 _ACEOF - fi -fi -echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5 -echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6 -if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then +fi +echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5 +echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6 +if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include +#include "confdefs.h" +$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif int main () { -static struct tm ac_aggr; -if (ac_aggr.tm_gmtoff) +static struct ifreq ac_aggr; +if (ac_aggr.ifr_addr) return 0; ; return 0; @@ -6214,25 +6557,26 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_member_struct_tm_tm_gmtoff=yes + ac_cv_member_struct_ifreq_ifr_addr=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include +#include "confdefs.h" +$ac_includes_default +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif int main () { -static struct tm ac_aggr; -if (sizeof ac_aggr.tm_gmtoff) +static struct ifreq ac_aggr; +if (sizeof ac_aggr.ifr_addr) return 0; ; return 0; @@ -6250,25 +6594,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_member_struct_tm_tm_gmtoff=yes + ac_cv_member_struct_ifreq_ifr_addr=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_member_struct_tm_tm_gmtoff=no +cat conftest.$ac_ext >&5 +ac_cv_member_struct_ifreq_ifr_addr=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6 -if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then +echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5 +echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6 +if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_TM_GMTOFF 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_ADDR 1 _ACEOF + fi @@ -6300,11 +6644,7 @@ if test "${ac_cv_c_volatile+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" int main () @@ -6331,8 +6671,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_c_volatile=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_c_volatile=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -6354,11 +6693,7 @@ if test "${ac_cv_c_const+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" int main () @@ -6429,8 +6764,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -6452,11 +6786,7 @@ if test "${emacs_cv_void_star+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" int main () @@ -6481,8 +6811,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 emacs_cv_void_star=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_void_star=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -6503,15 +6832,15 @@ fi -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: - @echo 'ac_maketemp="$(MAKE)"' + @echo 'ac_maketemp="${MAKE}"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` @@ -6684,11 +7013,7 @@ if test "$ac_x_includes" = no; then # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -6712,8 +7037,7 @@ if test -z "$ac_cpp_err"; then ac_x_includes= else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir @@ -6732,11 +7056,7 @@ if test "$ac_x_libraries" = no; then LIBS="-lXt $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -6763,8 +7083,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_x_libraries= else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do @@ -6912,44 +7231,31 @@ if test "${ac_cv_func_malloc_get_state+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char malloc_get_state (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char malloc_get_state (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char malloc_get_state (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state) choke me #else -char (*f) () = malloc_get_state; -#endif -#ifdef __cplusplus -} +f = malloc_get_state; #endif -int -main () -{ -return f != malloc_get_state; ; return 0; } @@ -6969,8 +7275,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_malloc_get_state=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_func_malloc_get_state=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -6990,44 +7295,31 @@ if test "${ac_cv_func_malloc_set_state+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char malloc_set_state (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char malloc_set_state (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char malloc_set_state (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state) choke me #else -char (*f) () = malloc_set_state; -#endif -#ifdef __cplusplus -} +f = malloc_set_state; #endif -int -main () -{ -return f != malloc_set_state; ; return 0; } @@ -7047,8 +7339,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_malloc_set_state=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_func_malloc_set_state=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -7068,11 +7359,7 @@ if test "${emacs_cv_var___after_morecore_hook+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" extern void (* __after_morecore_hook)(); int main () @@ -7097,8 +7384,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 emacs_cv_var___after_morecore_hook=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_var___after_morecore_hook=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -7149,11 +7435,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -7172,8 +7454,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -7185,11 +7466,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -7212,8 +7489,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -7226,32 +7502,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -7284,44 +7542,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -7341,8 +7586,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -7367,11 +7611,7 @@ else else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc @@ -7514,12 +7754,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 @@ -7549,11 +7788,7 @@ else LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -7585,8 +7820,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_dnet_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_dnet_dnet_ntoa=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -7613,11 +7847,7 @@ else LIBS="-lXbsd $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" int @@ -7643,8 +7873,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_Xbsd_main=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_Xbsd_main=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -7667,11 +7896,7 @@ else LIBS="-lpthreads $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -7703,8 +7928,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_pthreads_cma_open=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_pthreads_cma_open=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -7750,11 +7974,7 @@ else LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" int main () @@ -7779,8 +7999,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 : else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 gdb_cv_bigtoc= fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -7818,11 +8037,7 @@ if test "${HAVE_X11}" = "yes"; then echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" int main () @@ -7847,8 +8062,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 xlinux_first_failure=no else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 xlinux_first_failure=yes fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -7863,11 +8077,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS -b i486-linuxaout" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" int main () @@ -7892,8 +8102,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 xlinux_second_failure=no else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 xlinux_second_failure=yes fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -7922,11 +8131,7 @@ echo "${ECHO_T}no" >&6 echo $ECHO_N "checking for Xkb... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include int @@ -7952,8 +8157,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 emacs_xkb=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_xkb=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -7982,44 +8186,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -8039,8 +8230,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -8065,11 +8255,7 @@ echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -8097,8 +8283,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 emacs_cv_x11_version_6=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_x11_version_6=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -8126,11 +8311,7 @@ echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -8158,8 +8339,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 emacs_cv_x11_version_5=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_x11_version_5=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -8298,6 +8478,8 @@ echo "$as_me: error: Library requirements ($GTK_MODULES) not met; consider adjus C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" HAVE_GTK=yes cat >>confdefs.h <<\_ACEOF @@ -8307,6 +8489,85 @@ _ACEOF USE_X_TOOLKIT=none with_toolkit_scroll_bars=yes + + HAVE_GTK_MULTIDISPLAY=no + +for ac_func in gdk_display_open +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + HAVE_GTK_MULTIDISPLAY=yes +fi +done + + if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GTK_MULTIDISPLAY 1 +_ACEOF + + fi fi if test x"${USE_X_TOOLKIT}" = xmaybe; then @@ -8318,11 +8579,7 @@ echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include @@ -8349,8 +8606,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 emacs_cv_x11_version_5_with_xaw=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_x11_version_5_with_xaw=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -8380,11 +8636,7 @@ echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -8412,8 +8664,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 emacs_cv_x11_toolkit_version_6=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_x11_toolkit_version_6=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -8449,11 +8700,7 @@ else LIBS="-lXmu $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -8485,8 +8732,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_Xmu_XmuConvertStandardSelection=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -8519,11 +8765,7 @@ else LIBS="-lXext $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -8555,8 +8797,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_Xext_XShapeQueryExtension=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_Xext_XShapeQueryExtension=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -8591,11 +8832,7 @@ else CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -8620,8 +8857,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 emacs_cv_lesstif=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_lesstif=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -8647,11 +8883,7 @@ if test "${emacs_cv_motif_version_2_1+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -8680,8 +8912,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 emacs_cv_motif_version_2_1=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_motif_version_2_1=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -8705,11 +8936,7 @@ else LIBS="-lXp $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -8741,8 +8968,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_Xp_XpCreateContext=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_Xp_XpCreateContext=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -8775,11 +9001,7 @@ if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -8802,8 +9024,7 @@ if test -z "$ac_cpp_err"; then ac_cv_header_X11_Xaw3d_Scrollbar_h=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_cv_header_X11_Xaw3d_Scrollbar_h=no fi rm -f conftest.err conftest.$ac_ext @@ -8820,11 +9041,7 @@ else LIBS="-lXaw3d $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -8856,8 +9073,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -8912,11 +9128,7 @@ fi cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include @@ -8948,8 +9160,7 @@ _ACEOF else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 HAVE_XIM=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -8971,11 +9182,7 @@ if test "${HAVE_XIM}" != "no"; then fi cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include @@ -9015,8 +9222,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 emacs_cv_arg6_star=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -9052,11 +9258,7 @@ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5 echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include _ACEOF @@ -9075,8 +9277,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -9088,11 +9289,7 @@ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5 echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -9115,8 +9312,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -9129,32 +9325,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for X11/xpm.h" >&5 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6 @@ -9177,11 +9355,7 @@ else LIBS="-lXpm -lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9213,8 +9387,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_Xpm_XpmReadFileToPixmap=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -9234,11 +9407,7 @@ fi echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include "X11/xpm.h" #ifndef XpmReturnAllocPixels no_return_alloc_pixels @@ -9291,11 +9460,7 @@ echo "$as_me:$LINENO: checking jerror.h usability" >&5 echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include _ACEOF @@ -9314,8 +9479,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -9327,11 +9491,7 @@ echo "$as_me:$LINENO: checking jerror.h presence" >&5 echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -9354,8 +9514,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -9368,32 +9527,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for jerror.h" >&5 echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6 @@ -9416,11 +9557,7 @@ else LIBS="-ljpeg $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9452,8 +9589,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_jpeg_jpeg_destroy_compress=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_jpeg_jpeg_destroy_compress=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -9478,11 +9614,7 @@ _ACEOF cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include version=JPEG_LIB_VERSION @@ -9528,11 +9660,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -9551,8 +9679,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -9564,11 +9691,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -9591,8 +9714,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -9605,32 +9727,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -9662,11 +9766,7 @@ else LIBS="-lpng -lz -lm $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9698,8 +9798,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_png_png_get_channels=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_png_png_get_channels=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -9741,11 +9840,7 @@ echo "$as_me:$LINENO: checking tiffio.h usability" >&5 echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include _ACEOF @@ -9764,8 +9859,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -9777,11 +9871,7 @@ echo "$as_me:$LINENO: checking tiffio.h presence" >&5 echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -9804,8 +9894,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -9818,32 +9907,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for tiffio.h" >&5 echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6 @@ -9869,11 +9940,7 @@ else LIBS="-ltiff $tifflibs $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -9905,8 +9972,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_tiff_TIFFGetVersion=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_tiff_TIFFGetVersion=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -9950,11 +10016,7 @@ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5 echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include _ACEOF @@ -9973,8 +10035,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -9986,11 +10047,7 @@ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5 echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -10013,8 +10070,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -10027,32 +10083,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for gif_lib.h" >&5 echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6 @@ -10077,11 +10115,7 @@ else LIBS="-lungif $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -10113,8 +10147,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_ungif_EGifPutExtensionLast=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_ungif_EGifPutExtensionLast=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -10157,11 +10190,7 @@ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5 echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include _ACEOF @@ -10180,8 +10209,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -10193,11 +10221,7 @@ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5 echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -10220,8 +10244,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -10234,32 +10257,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5 echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6 @@ -10315,11 +10320,7 @@ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5 echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include _ACEOF @@ -10338,8 +10339,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -10351,11 +10351,7 @@ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5 echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -10378,8 +10374,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -10392,32 +10387,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5 echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6 @@ -10437,14 +10414,10 @@ if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lSM $LIBS" +LIBS="-lSM -lICE $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -10476,8 +10449,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_SM_SmcOpenConnection=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_SM_SmcOpenConnection=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -10487,8 +10459,6 @@ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6 if test $ac_cv_lib_SM_SmcOpenConnection = yes; then HAVE_X_SM=yes -else - -lICE fi fi @@ -10516,11 +10486,7 @@ if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -10545,8 +10511,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 emacs_cv_netdb_declares_h_errno=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_netdb_declares_h_errno=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -10570,11 +10535,7 @@ if test "${ac_cv_working_alloca_h+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -10599,8 +10560,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -10622,11 +10582,7 @@ if test "${ac_cv_func_alloca_works+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #ifdef __GNUC__ # define alloca __builtin_alloca #else @@ -10671,8 +10627,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -10706,11 +10661,7 @@ if test "${ac_cv_os_cray+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray #else @@ -10739,44 +10690,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -10796,8 +10734,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -10826,11 +10763,7 @@ else else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" int find_stack_direction () { @@ -10866,12 +10799,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 @@ -10897,11 +10829,7 @@ else LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -10933,8 +10861,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_m_sqrt=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_m_sqrt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -10964,11 +10891,7 @@ else LIBS="-lmail $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -11000,8 +10923,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_mail_maillock=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_mail_maillock=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -11028,11 +10950,7 @@ else LIBS="-llockfile $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -11064,8 +10982,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_lockfile_maillock=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_lockfile_maillock=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -11145,44 +11062,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -11202,8 +11106,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -11236,11 +11139,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -11259,8 +11158,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -11272,11 +11170,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -11299,8 +11193,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -11313,32 +11206,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -11446,44 +11321,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -11503,8 +11365,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -11538,11 +11399,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -11561,8 +11418,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -11574,11 +11430,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -11601,8 +11453,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -11615,32 +11466,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -11682,11 +11515,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -11705,8 +11534,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -11718,11 +11546,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -11745,8 +11569,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -11759,32 +11582,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -11817,44 +11622,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -11874,8 +11666,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -11900,11 +11691,7 @@ else else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Test program from Paul Eggert and Tony Leneis. */ #if TIME_WITH_SYS_TIME # include @@ -12066,12 +11853,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_working_mktime=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5 @@ -12106,44 +11892,31 @@ if test "${ac_cv_func_getloadavg+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char getloadavg (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char getloadavg (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getloadavg (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getloadavg) || defined (__stub___getloadavg) choke me #else -char (*f) () = getloadavg; -#endif -#ifdef __cplusplus -} +f = getloadavg; #endif -int -main () -{ -return f != getloadavg; ; return 0; } @@ -12163,8 +11936,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_getloadavg=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_func_getloadavg=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -12190,44 +11962,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -12247,8 +12006,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -12275,11 +12033,7 @@ else LIBS="-lkstat $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -12311,8 +12065,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_kstat_kstat_open=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_kstat_kstat_open=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -12345,11 +12098,7 @@ else LIBS="-lelf $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -12381,8 +12130,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_elf_elf_begin=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_elf_elf_begin=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -12405,11 +12153,7 @@ else LIBS="-lkvm $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -12441,8 +12185,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_kvm_kvm_open=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_kvm_kvm_open=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -12464,11 +12207,7 @@ else LIBS="-lutil $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -12500,8 +12239,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_util_getloadavg=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_util_getloadavg=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -12529,11 +12267,7 @@ else LIBS="-lgetloadavg $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -12565,8 +12299,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_getloadavg_getloadavg=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_getloadavg_getloadavg=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -12595,44 +12328,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -12652,8 +12372,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -12688,11 +12407,7 @@ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5 echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include _ACEOF @@ -12711,8 +12426,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -12724,11 +12438,7 @@ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5 echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -12751,8 +12461,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -12765,32 +12474,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5 echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6 @@ -12820,11 +12511,7 @@ else LIBS="-ldgc $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -12856,8 +12543,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_dgc_dg_sys_info=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_dgc_dg_sys_info=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -12892,11 +12578,7 @@ echo "$as_me:$LINENO: checking locale.h usability" >&5 echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include _ACEOF @@ -12915,8 +12597,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -12928,11 +12609,7 @@ echo "$as_me:$LINENO: checking locale.h presence" >&5 echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -12955,8 +12632,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -12969,32 +12645,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for locale.h" >&5 echo $ECHO_N "checking for locale.h... $ECHO_C" >&6 @@ -13020,44 +12678,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -13077,8 +12722,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -13121,11 +12765,7 @@ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5 echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include _ACEOF @@ -13144,8 +12784,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -13157,11 +12796,7 @@ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5 echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -13184,8 +12819,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -13198,32 +12832,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5 echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6 @@ -13268,11 +12884,7 @@ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5 echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include _ACEOF @@ -13291,8 +12903,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -13304,11 +12915,7 @@ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5 echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -13331,8 +12938,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -13345,32 +12951,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5 echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6 @@ -13412,11 +13000,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -13435,8 +13019,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -13448,11 +13031,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -13475,8 +13054,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -13489,32 +13067,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -13556,11 +13116,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -13579,8 +13135,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -13592,11 +13147,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -13619,8 +13170,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -13633,32 +13183,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -13682,11 +13214,7 @@ if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int @@ -13714,15 +13242,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_member_struct_nlist_n_un_n_name=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int @@ -13750,8 +13273,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_member_struct_nlist_n_un_n_name=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_member_struct_nlist_n_un_n_name=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -13790,11 +13312,7 @@ if test "${ac_cv_func_getloadavg_setgid+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include "$srcdir/$ac_config_libobj_dir/getloadavg.c" #ifdef LDAV_PRIVILEGED Yowza Am I SETGID yet @@ -13860,11 +13378,7 @@ else ac_cv_sys_largefile_source=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -13889,17 +13403,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #define _LARGEFILE_SOURCE 1 #include int @@ -13925,8 +13434,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_sys_largefile_source=1; break else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext break @@ -13953,11 +13461,7 @@ if test "${ac_cv_func_fseeko+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -13982,8 +13486,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_fseeko=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_func_fseeko=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14007,11 +13510,7 @@ else # Use it with a single arg. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default int main () @@ -14036,8 +13535,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_func_getpgrp_void=no else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_func_getpgrp_void=yes fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -14065,44 +13563,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -14122,8 +13607,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14146,11 +13630,7 @@ else LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -14182,8 +13662,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_intl_strftime=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_intl_strftime=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14215,44 +13694,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -14272,8 +13738,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14301,44 +13766,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -14358,8 +13810,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14389,11 +13840,7 @@ else LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -14425,8 +13872,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_ncurses_tparm=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_ncurses_tparm=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14455,44 +13901,31 @@ if test "${ac_cv_func_res_send+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char res_send (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char res_send (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char res_send (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_res_send) || defined (__stub___res_send) choke me #else -char (*f) () = res_send; -#endif -#ifdef __cplusplus -} +f = res_send; #endif -int -main () -{ -return f != res_send; ; return 0; } @@ -14512,8 +13945,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_res_send=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_func_res_send=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14530,44 +13962,31 @@ if test "${ac_cv_func___res_send+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char __res_send (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char __res_send (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char __res_send (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub___res_send) || defined (__stub_____res_send) choke me #else -char (*f) () = __res_send; -#endif -#ifdef __cplusplus -} +f = __res_send; #endif -int -main () -{ -return f != __res_send; ; return 0; } @@ -14587,8 +14006,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func___res_send=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_func___res_send=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14607,11 +14025,7 @@ else LIBS="-lresolv $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -14643,8 +14057,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_resolv_res_send=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_resolv_res_send=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14664,11 +14077,7 @@ else LIBS="-lresolv $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -14700,8 +14109,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_resolv___res_send=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_resolv___res_send=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14736,44 +14144,31 @@ if test "${ac_cv_func_hes_getmailhost+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char hes_getmailhost (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char hes_getmailhost (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char hes_getmailhost (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_hes_getmailhost) || defined (__stub___hes_getmailhost) choke me #else -char (*f) () = hes_getmailhost; -#endif -#ifdef __cplusplus -} +f = hes_getmailhost; #endif -int -main () -{ -return f != hes_getmailhost; ; return 0; } @@ -14793,8 +14188,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_hes_getmailhost=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_func_hes_getmailhost=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14813,11 +14207,7 @@ else LIBS="-lhesiod $RESOLVLIB $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -14849,8 +14239,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_hesiod_hes_getmailhost=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_hesiod_hes_getmailhost=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14884,11 +14273,7 @@ else LIBS="-lcom_err $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -14920,8 +14305,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_com_err_com_err=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_com_err_com_err=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -14948,11 +14332,7 @@ else LIBS="-lk5crypto $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -14984,8 +14364,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -15012,11 +14391,7 @@ else LIBS="-lcrypto $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -15048,8 +14423,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_crypto_mit_des_cbc_encrypt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -15076,11 +14450,7 @@ else LIBS="-lkrb5 $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -15112,8 +14482,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_krb5_krb5_init_context=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_krb5_krb5_init_context=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -15141,11 +14510,7 @@ else LIBS="-ldes425 $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -15177,8 +14542,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_des425_des_cbc_encrypt=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_des425_des_cbc_encrypt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -15204,11 +14568,7 @@ else LIBS="-ldes $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -15240,8 +14600,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_des_des_cbc_encrypt=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_des_des_cbc_encrypt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -15270,11 +14629,7 @@ else LIBS="-lkrb4 $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -15306,8 +14661,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_krb4_krb_get_cred=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_krb4_krb_get_cred=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -15333,11 +14687,7 @@ else LIBS="-lkrb $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -15369,8 +14719,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_krb_krb_get_cred=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_krb_krb_get_cred=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -15410,11 +14759,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -15433,8 +14778,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -15446,11 +14790,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -15473,8 +14813,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -15487,32 +14826,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -15553,11 +14874,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -15576,8 +14893,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -15589,11 +14905,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -15616,8 +14928,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -15630,32 +14941,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -15692,11 +14985,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -15715,8 +15004,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -15728,11 +15016,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -15755,8 +15039,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -15769,32 +15052,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -15831,11 +15096,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -15854,8 +15115,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -15867,11 +15127,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -15894,8 +15150,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -15908,32 +15163,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -15981,11 +15218,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -16004,8 +15237,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -16017,11 +15249,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -16044,8 +15272,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -16058,32 +15285,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -16120,11 +15329,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -16143,8 +15348,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -16156,11 +15360,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -16183,8 +15383,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -16197,32 +15396,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -16259,11 +15440,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -16282,8 +15459,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -16295,11 +15471,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -16322,8 +15494,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -16336,32 +15507,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -16410,11 +15563,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -16433,8 +15582,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -16446,11 +15594,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -16473,8 +15617,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -16487,32 +15630,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -16548,11 +15673,7 @@ else LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -16584,8 +15705,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_intl_dgettext=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_lib_intl_dgettext=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -16615,11 +15735,7 @@ emacs_cv_localtime_cache=yes else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include extern char **environ; unset_TZ () @@ -16665,12 +15781,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ( exit $ac_status ) emacs_cv_localtime_cache=yes fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If we lack tzset, report that localtime does not cache TZ, @@ -16700,44 +15815,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -16757,8 +15859,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -16781,11 +15882,7 @@ if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #ifdef TIME_WITH_SYS_TIME #include @@ -16821,8 +15918,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 emacs_cv_gettimeofday_two_arguments=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_gettimeofday_two_arguments=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -16847,11 +15943,7 @@ if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include <$ac_cv_struct_tm> @@ -16881,15 +15973,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #include <$ac_cv_struct_tm> @@ -16919,8 +16006,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -16952,11 +16038,7 @@ if test "${ac_cv_var_tzname+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include #ifndef tzname /* For SGI. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */ @@ -16985,8 +16067,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_var_tzname=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -17011,11 +16092,7 @@ if test "${emacs_cv_struct_timezone+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -17042,11 +16119,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #ifdef TIME_WITH_SYS_TIME #include @@ -17079,17 +16152,15 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ( exit $ac_status ) emacs_cv_struct_timezone=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_struct_timezone=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -17106,44 +16177,31 @@ if test "${ac_cv_func_socket+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char socket (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char socket (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char socket (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_socket) || defined (__stub___socket) choke me #else -char (*f) () = socket; -#endif -#ifdef __cplusplus -} +f = socket; #endif -int -main () -{ -return f != socket; ; return 0; } @@ -17163,8 +16221,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_socket=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_func_socket=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -17192,11 +16249,7 @@ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5 echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include _ACEOF @@ -17215,8 +16268,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -17228,11 +16280,7 @@ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5 echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -17255,8 +16303,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -17269,32 +16316,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for netinet/in.h" >&5 echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6 @@ -17330,11 +16359,7 @@ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5 echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include _ACEOF @@ -17353,8 +16378,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -17366,11 +16390,7 @@ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5 echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -17393,8 +16413,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -17407,32 +16426,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for arpa/inet.h" >&5 echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6 @@ -17461,6 +16462,121 @@ _ACEOF fi + +for ac_header in sys/ioctl.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f 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 $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat 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 in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + if test -f /usr/lpp/X11/bin/smt.exp; then cat >>confdefs.h <<\_ACEOF @@ -17491,11 +16607,7 @@ if test "${ac_cv_type_pid_t+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default int main () @@ -17523,8 +16635,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -17560,11 +16671,7 @@ echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF @@ -17583,8 +16690,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -17596,11 +16702,7 @@ echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 @@ -17623,8 +16725,7 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + cat conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -17637,32 +16738,14 @@ case $ac_header_compiler:$ac_header_preproc in { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------ ## -## Report this to bug-autoconf@gnu.org. ## -## ------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 @@ -17696,44 +16779,31 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $ac_func (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" -{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); +char (*f) (); + +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} +f = $ac_func; #endif -int -main () -{ -return f != $ac_func; ; return 0; } @@ -17753,8 +16823,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -17807,12 +16876,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_fork_works=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 @@ -17846,17 +16914,11 @@ else else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include -#include #include #include -#include #if HAVE_UNISTD_H # include #endif @@ -17869,7 +16931,7 @@ cat >>conftest.$ac_ext <<_ACEOF (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ -static void +static #ifdef __cplusplus sparc_address_test (int arg) # else @@ -17897,7 +16959,7 @@ main () pid_t parent = getpid (); pid_t child; - sparc_address_test (0); + sparc_address_test (); child = vfork (); @@ -17962,12 +17024,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_vfork_works=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 @@ -18009,11 +17070,7 @@ if test "${emacs_cv_langinfo_codeset+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" #include int main () @@ -18038,8 +17095,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 emacs_cv_langinfo_codeset=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_langinfo_codeset=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -18062,11 +17118,7 @@ if test "${ac_cv_type_size_t+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default int main () @@ -18094,8 +17146,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -18119,11 +17170,7 @@ if test "${ac_cv_type_mbstate_t+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" $ac_includes_default # include int @@ -18149,8 +17196,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_mbstate_t=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 ac_cv_type_mbstate_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -18178,11 +17224,7 @@ if test "${emacs_cv_c_restrict+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" void fred (int *restrict x); int main () @@ -18207,15 +17249,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 emacs_cv_c_restrict=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" void fred (int *__restrict x); int main () @@ -18240,8 +17277,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 emacs_cv_c_restrict=__restrict else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_c_restrict=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -18270,11 +17306,7 @@ if test "${emacs_cv_c_restrict_arr+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" void fred (int x[__restrict]); int main () @@ -18299,8 +17331,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 emacs_cv_c_restrict_arr=yes else echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +cat conftest.$ac_ext >&5 emacs_cv_c_restrict_arr=no fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -18515,11 +17546,7 @@ test "${exec_prefix}" != NONE && cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +#include "confdefs.h" yes..yes _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | @@ -18578,7 +17605,7 @@ _ACEOF t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else +if cmp -s $cache_file confcache; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file @@ -18638,8 +17665,6 @@ cat >$CONFIG_STATUS <<_ACEOF # configure, is in config.log if it exists. debug=false -ac_cs_recheck=false -ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF @@ -18674,10 +17699,7 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME +for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var @@ -18723,15 +17745,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi - rm -f conf$$.sh + rm -f conftest.sh fi @@ -18894,7 +17916,7 @@ _ASBOX cat >&5 <<_CSEOF This file was extended by $as_me, which was -generated by GNU Autoconf 2.57. Invocation command line was +generated by GNU Autoconf 2.54. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18934,7 +17956,6 @@ Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit - -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] @@ -18957,7 +17978,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.57, +configured by $0, generated by GNU Autoconf 2.54, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 @@ -18994,9 +18015,12 @@ do case $ac_option in # Handling of the options. _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; + echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" + exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) @@ -19018,9 +18042,6 @@ Try \`$0 --help' for more information." >&2;} $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 @@ -19035,20 +18056,6 @@ Try \`$0 --help' for more information." >&2;} shift done -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - _ACEOF cat >>$CONFIG_STATUS <<_ACEOF @@ -19095,9 +18102,6 @@ if $ac_need_defaults; then test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { @@ -19106,17 +18110,17 @@ $debug || } # Create a (secure) tmp directory for tmp files. - +: ${TMPDIR=/tmp} { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM + tmp=$TMPDIR/cs$$-$RANDOM (umask 077 && mkdir $tmp) } || { - echo "$me: cannot create a temporary directory in ." >&2 + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 { (exit 1); exit 1; } } @@ -19601,7 +18605,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + if cmp -s $ac_file $tmp/config.h 2>/dev/null; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else @@ -19802,11 +18806,8 @@ ac_clean_files=$ac_clean_files_save # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + $SHELL $CONFIG_STATUS || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. diff --git a/configure.in b/configure.in index 060a89bd36..3e89bea0c2 100644 --- a/configure.in +++ b/configure.in @@ -1134,7 +1134,13 @@ dnl see the `changequote' comment above. powerpc-apple-darwin* ) machine=powermac opsys=darwin # Define CPP as follows to make autoconf work correctly. - CPP="gcc -E -no-cpp-precomp" + CPP="${CC-cc} -E -no-cpp-precomp" + # Use fink packages if available. + if test -d /sw/include && test -d /sw/lib; then + GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" + CPP="${CPP} ${GCC_TEST_OPTIONS}" + NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} + fi ;; ## AMD x86-64 Linux-based GNU system @@ -1267,6 +1273,25 @@ then ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" fi +dnl We need -znocombreloc if we're using a relatively recent GNU ld. +dnl If we can link with the flag, it shouldn't do any harm anyhow. +dnl (Don't use `-z nocombreloc' as -z takes no arg on Irix.) +dnl Treat GCC specially since it just gives a non-fatal `unrecognized option' +dnl if not built to support GNU ld. + +late_LDFLAGS=$LDFLAGS +if test $GCC = yes; then + LDFLAGS="$LDFLAGS -Wl,-znocombreloc" +else + LDFLAGS="$LDFLAGS -znocombreloc" +fi + +AC_MSG_CHECKING([For -znocombreloc]) +AC_LINK_IFELSE([main(){return 0;}], + [AC_MSG_RESULT(yes)], + LDFLAGS=$late_LDFLAGS + [AC_MSG_RESULT(no)]) + dnl checks for Unix variants AC_AIX @@ -1507,6 +1532,12 @@ if test $emacs_cv_struct_exception != yes; then AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.]) fi +AC_CHECK_HEADERS(sys/socket.h) +AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT +#if HAVE_SYS_SOCKET_H +#include +#endif]) + dnl checks for structure members AC_STRUCT_TM AC_STRUCT_TIMEZONE @@ -1514,6 +1545,16 @@ AC_CHECK_MEMBER(struct tm.tm_gmtoff, [AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define to 1 if `tm_gmtoff' is member of `struct tm'.])],, [#include ]) +AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr, + struct ifreq.ifr_netmask, struct ifreq.ifr_broadaddr, + struct ifreq.ifr_addr], , , + [AC_INCLUDES_DEFAULT +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif]) dnl checks for compiler characteristics @@ -1842,7 +1883,7 @@ dnl This function defintion taken from Gnome 2.0 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page dnl also defines GSTUFF_PKG_ERRORS on error -AC_DEFUN(PKG_CHECK_MODULES, [ +AC_DEFUN([PKG_CHECK_MODULES], [ succeeded=no if test -z "$PKG_CONFIG"; then @@ -1890,7 +1931,7 @@ AC_DEFUN(PKG_CHECK_MODULES, [ if test $succeeded = yes; then ifelse([$3], , :, [$3]) else - ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) + ifelse([$4], , [AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.])], [$4]) fi ]) @@ -1912,13 +1953,24 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" HAVE_GTK=yes AC_DEFINE(HAVE_GTK, 1, [Define to 1 if using GTK.]) USE_X_TOOLKIT=none - dnl GTK scrollbars resembles toolkit scrollbars alot, so to avoid + dnl GTK scrollbars resemble toolkit scrollbars a lot, so to avoid dnl a lot if #ifdef:s, say we have toolkit scrollbars. with_toolkit_scroll_bars=yes + + dnl Check if we can use multiple displays with this GTK version. + dnl If gdk_display_open exists, assume all others are there also. + HAVE_GTK_MULTIDISPLAY=no + AC_CHECK_FUNCS(gdk_display_open, HAVE_GTK_MULTIDISPLAY=yes) + if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then + AC_DEFINE(HAVE_GTK_MULTIDISPLAY, 1, + [Define to 1 if GTK can handle more than one display.]) + fi fi dnl Do not put whitespace before the #include statements below. @@ -2241,7 +2293,7 @@ fi HAVE_X_SM=no if test "${HAVE_X11}" = "yes"; then AC_CHECK_HEADER(X11/SM/SMlib.h, - AC_CHECK_LIB(SM, SmcOpenConnection, HAVE_X_SM=yes, -lICE)) + AC_CHECK_LIB(SM, SmcOpenConnection, HAVE_X_SM=yes, , -lICE)) if test "${HAVE_X_SM}" = "yes"; then AC_DEFINE(HAVE_X_SM, 1, [Define to 1 if you have the SM library (-lSM).]) @@ -2496,6 +2548,8 @@ dnl Fixme: Not used. Should this be HAVE_SOCKETS? [Define to 1 if you have inet sockets.]) fi +AC_CHECK_HEADERS(sys/ioctl.h) + if test -f /usr/lpp/X11/bin/smt.exp; then AC_DEFINE(HAVE_AIX_SMT_EXP, 1, [Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists.]) @@ -3085,3 +3139,6 @@ touch src/config.stamp ], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"]) +m4_if(dnl Do not change this comment + arch-tag: 156a4dd5-bddc-4d18-96ac-f37742cf6a5e +)dnl diff --git a/etc/ChangeLog b/etc/ChangeLog index 90836d87d4..580c256f12 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,96 @@ +2004-04-14 Jan Nieuwenhuizen + + * TUTORIAL.nl: Update Delete/Delback translation. + +2004-04-05 Jesper Harder + + * TODO: Remove index-apropos entry. + +2004-04-01 Juri Linkov + + * HELLO: Add Javanese. + +2004-03-29 Vinicius Jose Latorre + + * ps-prin1.ps: Clip the header and footer area, so text will not be + printed outside header or footer, respectively. + (HeaderClip, FooterClip): New PostScript funs. + (HeaderText, FooterText): Adjust PostScript code. + +2004-03-29 Jan Dj,Ad(Brv + + * TODO: Removed drag-and-drop entry (DONE). + +2004-03-19 Kim F. Storm + + * TODO: Remove entries for fringe related issues (DONE). + Remove entry about image-relative coordinates of mouse clicks (DONE). + +2004-03-11 Daniel Pfeiffer + + * compilation.txt: New file. + +2004-02-29 Juanma Barranquero + + * NEWS: Remove bogus reference to user option unicode-data. + +2004-02-16 Klaus Zeitler + + * PROBLEMS: Document crashes on X when build with GCC and GNU ld. + +2004-02-08 Andreas Schwab + + * NEWS: Fix typo. + +2003-12-29 Ognyan Kulev + + * TUTORIAL.bg: Use windows-1251 encoding. Fix punctuation errors. + +2003-11-21 Lars Hansen + + * TODO: Add plans for change of file attributes UID and GID from + integer to string. + +2003-11-10 Kailash C. Chowksey + + * HELLO: Add Kannada. + +2003-11-05 Juri Linkov + + * HELLO: Fix language names. Add C, Braille, Georgian, Ukrainian. + Add IPA pronunciation to English. Fix tab widths. + +2003-11-03 David Ponce + + * PROBLEMS: Document segfaults with Linux kernels that enable the + Exec-shield functionality. + +2003-10-30 Kenichi Handa + + * HELLO: Fix cases of language names. Make German lines one. + Delete FORTRAN, add Mathematics. + +2003-10-24 Jan Dj,Ad(Brv + + * PROBLEMS: Characters are displayed as empty boxes or + with wrong font under X. + +2003-09-30 Werner Lemberg + + * TUTORIAL.de: Minor updates and grammatical fixes. + +2003-09-02 Glenn Morris + + * TODO: Add invisible text kill/yank issue. + +2003-08-29 Wim Nieuwenhuizen + + * TUTORIAL.nl: Many changes. + +2003-08-20 Stephen Eglen + + * MORE.STUFF: Update URLs for several projects. + 2003-07-22 Andrew Choi * PROBLEMS: Truncated process output with pty's on Mac OS X. @@ -1563,3 +1656,5 @@ Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 094f3a51-bd72-44d0-8fac-2ac242c6c5b1 diff --git a/etc/DEBUG b/etc/DEBUG index eb2a336444..bcc0bd8418 100644 --- a/etc/DEBUG +++ b/etc/DEBUG @@ -647,3 +647,5 @@ temporarily, you will see an old value for it. Again, you need to look at the disassembly to determine which registers are being used, and look at those registers directly, to see the actual current values of these variables. + +;;; arch-tag: fbf32980-e35d-481f-8e4c-a2eca2586e6b diff --git a/etc/GNU b/etc/GNU index f85e6d7a25..1df59f049e 100644 --- a/etc/GNU +++ b/etc/GNU @@ -1,4 +1,4 @@ -Copyright (C) 1985, 1993 Free Software Foundation, Inc. +Copyright (C) 1985, 1993, 2003 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document, in any medium, provided that the copyright notice and @@ -341,7 +341,7 @@ that.) other people's lives; and it is usually used to make their lives more difficult. - People who have studied the issue of intellectual property rights + People who have studied the issue of intellectual property rights(6) carefully (such as lawyers) say that there is no intrinsic right to intellectual property. The kinds of supposed intellectual property rights that the government recognizes were created by specific acts of @@ -530,3 +530,11 @@ this way. Have you done your part? (5) A group of computer companies recently pooled funds to support maintenance of the GNU C Compiler. + (6) In the 80s I had not yet realized how confusing it was to speak +of "the issue" of "intellectual property". That term is obviously +biased; more subtle is the fact that it lumps together various +disparate laws which raise very different issues. Nowadays I urge +people to reject the term "intellectual property" entirely, lest it +lead others to suppose this is one coherent issue. The way to be +clear is to to discuss patents, copyrights, and trademarks separately. +See http://www.gnu.org/philosophy/words-to-avoid.html. \ No newline at end of file diff --git a/etc/HELLO b/etc/HELLO dissimilarity index 60% index 7b8f13fcd4..f7f1d9dee0 100644 --- a/etc/HELLO +++ b/etc/HELLO @@ -1,58 +1,68 @@ -This is a list of ways to say hello in various languages. -Its purpose is to illustrate a number of scripts. - ---------------------------------------------------------- -Amharic ($(3"c!(B -Arabic (,GIqjHQYdG(B) ,GecjdY(B ,GeGdqSdG(B -Czech (,Bh(Besky) Dobr,B}(B den -Danish (dansk) Hej, Goddag -Dutch (Nederlands) Hallo, Dag -English Hello -Esperanto Saluton (E,C6(Bo,C~(Ban,Cx(Bo ,Cf(Biu,C<(Ba,C}(Bde) -Estonian (eesti keel) Tere, Tervist -FORTRAN PROGRAM -Finnish (Suomi) Hei -French (fran,Ag(Bais) Bonjour, Salut -German (Deutsch) Guten Tag, Gr,A|_(B Gott -Greek (,Fekkgmij\(B) ,FCei\(B ,Fsar(B -Hebrew (,Hzixar(B) ,Hylem(B -Hindi ($,15y55B5f6 (B) $,15h5n5x6-5d6'(B, $,15h5n5x6-5U5~5p(B $,16D(B -Italian (italiano) Ciao, Buon giorno -Lao ((1>RJRERG(B) (1JP:R-4U(B, (1"mcKib*!4U(B -Malayalam ($,1@N@R@O@^@S@"(B) $,1@H@N@X@m@5@^@P@"(B -Maltese (il-Malti) Bon,Cu(Bu, Sa,C11(Ba -Mathematics $,1x (B p $,1x((B world $,1s"(B hello p $,2!a(B -Norwegian (norsk) Hei, God dag -Polish (j,Bj(Bzyk polski) Dzie,Bq(B dobry! Cze,B6f(B! -Russian (,L`caaZXY(B) ,L7T`PRabRcYbU(B! -Slovak (slovensky) Dobr,B}(B de,Br(B -Slovenian (sloven,B9h(Bina) Pozdravljeni! -Spanish (espa,Aq(Bol) ,A!(BHola! -Swedish (svenska) Hej, Goddag -Tamil ($,1(B -Tigrigna ($(3"8#r!N"^(B) $(3!Q!,!<"8(B -Turkish (T,M|(Brk,Mg(Be) Merhaba -Vietnamese (ti,1*(Bng Vi,1.(Bt) Ch,1`(Bo b,1U(Bn - -Japanese ($BF|K\8l(B) $B$3$s$K$A$O(B, (I:]FAJ(B -Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B -Cantonese ($(0GnM$(B,$(0N]0*Hd(B) $(0*/=((B, $(0+$)p(B -Korean ($(CGQ1[(B) $(C>H3gGO<H3gGO=J4O1n(B - -Difference among chinese characters in GB, JIS, KSC, BIG5: - GB -- $AT*Fx(B $A?*7"(B - JIS -- $B855$(B $B3+H/(B - KSC -- $(Cj*Q((B $(CKR[!(B - BIG5 -- $(0&x86(B $(0DeBv(B - -Just for a test of JISX0212: $BqV$(DiQ(B (the second character is of JISX0212) - -A short test for Unicode characters: -Czech ($,1 -(Besky) Dobr,A}(B den -Esperanto Saluton (E$,1 E(Bo$,1 }(Ban$,1 =(Bo $,1 )(Biu$,1 U(Ba$,1!-(Bde) -Greek ($,1&u';';'7'='9':',(B) $,1&s'5'9',(B $,1'C'1'B(B -Hebrew $,1-),|,u,}(B -Russian ($,1(@(c(a(a(Z(X(Y(B) $,1(7(T(`(P(R(a(b(R(c(Y(b(U(B! -Maltese (Malti) Bon$,1 A(Bu, Sa$,1 G G(Ba +This is a list of ways to say hello in various languages. +Its purpose is to illustrate a number of scripts. +--------------------------------------------------------- +Amharic ($,1O M[MmN{(B) $,1M`MKM](B +Arabic (,GIqjHQYdG(B) ,GecjdY(B ,GeGdqSdG(B +Braille $,2(3(1('('(5(B +C printf ("Hello, world!\n"); +Czech (,Bh(Besky) Dobr,A}(B den +Danish (dansk) Hej, Goddag +Dutch (Nederlands) Hallo, Dag +Emacs emacs --no-splash -f view-hello-file +English [$(O+S(Bi,D?(B-gli$(O*h(B] Hello +Esperanto Saluton (E,C6(Bo,C~(Ban,Cx(Bo ,Cf(Biu,C<(Ba,C}(Bde) +Estonian (eesti keel) Tere, Tervist +Finnish (Suomi) Hei +French (fran,Ag(Bais) Bonjour, Salut +Georgian ($,1JEJ0J@J7J5J4J:J8(B) $,1J2J0J;J0J@JOJ=J1J0(B +German (Deutsch) Guten Tag, Gr,A|_(B Gott +Greek (,Fekkgmij\(B) ,FCei\(B ,Fsar(B +Hebrew (,Hzixar(B) ,Hylem(B +Hindi ($,15y55B5f6 (B) $,15h5n5x6-5d6'(B, $,15h5n5x6-5U5~5p(B $,16D(B +Italian (italiano) Ciao, Buon giorno +Javanese (Jawa) System.out.println("Halo, selamat sore!"); +Kannada ($,1>u?(?M?(?!(B) $,1?(?.?8?M>u?>?0(B +Lao ((1>RJRERG(B) (1JP:R-4U(B, (1"mcKib*!4U(B +Malayalam ($,1@N@R@O@^@S@"(B) $,1@H@N@X@m@5@^@P@"(B +Maltese (il-Malti) Bon,Cu(Bu, Sa,C11(Ba +Mathematics $B"O(B p $A!J(B world $(O#@(B hello p $A!u(B +Nederlands, Vlaams Hallo, Dag +Norwegian (norsk) Hei, God dag +Polish (j,Bj(Bzyk polski) Dzie,Bq(B dobry! Cze,B6f(B! +Russian (,L`caaZXY(B) ,L7T`PRabRcYbU(B! +Slovak (sloven,Bh(Bina) Dobr,A}(B de,Br(B +Slovenian (sloven,B9h(Bina) Pozdravljeni! +Spanish (espa,Aq(Bol) ,A!(BHola! +Swedish (p,Ae(B svenska) Hej, Goddag +Tamil ($,1(B +Tigrigna ($,1NUP-MmN{(B) $,1MpMKM[NU(B +Turkish (T,A|(Brk,Ag(Be) Merhaba +Ukrainian (,LcZ`Pw]alZP(B) ,L2vbPn(B +Vietnamese (ti,1*(Bng Vi,1.(Bt) Ch,A`(Bo b,1U(Bn + +Japanese ($AHU1>$(Gk#(B) $A$3$s$K$A$O(B, (I:]FAJ(B +Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B +Cantonese ($(Gemk#(B,$(Gl]N)fc(B) $ATg3?(B, $ADc:C(B +Korean ($(CGQ1[(B) $(C>H3gGO<H3gGO=J4O1n(B + +Difference among chinese characters in GB, JIS, KSC, BIG5: +GB $AT*Fx(B $A?*7"(B +JIS $AT*$B5$(B $(Gbd$BH/(B +KSC $AT*$(GV4(B $(Gbd`u(B +BIG5 $AT*$(GV4(B $(Gbd`u(B + +Just for a test of JISX0212: $(HdYnG(B (the second character is of JISX0212) + +A short test for Unicode characters: +Czech (,Bh(Besky) Dobr,A}(B den +Esperanto Saluton (E,C6(Bo,C~(Ban,Cx(Bo ,Cf(Biu,C<(Ba,C}(Bde) +Greek (,FEkkgmij\(B) ,FCei\(B ,Fsar(B +Hebrew ,Hylem(B +Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B! +Maltese (Malti) Bon,Cu(Bu, Sa,C11(Ba + +;;; Local Variables: +;;; tab-width: 32 +;;; End: diff --git a/etc/MACHINES b/etc/MACHINES index 9a4a700b53..e87510f6d0 100644 --- a/etc/MACHINES +++ b/etc/MACHINES @@ -755,25 +755,13 @@ Iris 2500 and Iris 2500 Turbo (m68k-sgi-iris3.5 or m68k-sgi-iris3.6) Iris 4D (mips-sgi-irix[456].*) + Emacs 21.3 is reported to work on IRIX 6.5.x. + You can build a 64-bit executable (with larger maximum buffer size) on Irix 6.5 by specifying the 64-bit ABI using the `-64' compiler flag or otherwise (see cc(1)). This may work on earlier Irix 6 systems if you edit src/s/irix6-0.h following irix6-5.h. - Building Emacs 21.1 and 21.2 on versions of Irix before 6.5.10, - especially when Emacs is built with GCC, was reported to have subtle - problems such as being unable to print to stdout under the -batch - command-line option. Building with the native compiler or upgrading - the OS to a newer version solves these problems. There's evidence - that these problems are actually related to the runtime libraries - (before IRIX 6.5.10, the IRIX runtimes were based on the MIPSpro 7.2 - compilers), so installing patches for the runtime from - http://www.sgi.com/support/patch_intro.html could solve the problem - even without upgrading the OS. The dump process is the crucial - step that needs the upgraded runtime, so a workaround is to dump - Emacs on a machine with a newer OS, then copy the binary to the - older OS. - If compiling with GCC on Irix 6 yields an error "conflicting types for `initstate'", install GCC 2.95 or a newer version, and this problem should go away. It is possible that this problem results @@ -781,23 +769,6 @@ Iris 4D (mips-sgi-irix[456].*) could also try reinstalling the same version of GCC, and telling us whether that fixes the problem. - The 19.26 pretest was reported to work on IRIX 4.0.5 and 5.2. - 19.23 was reported to work on IRIX 5.2, but you may need to install - the "compiler_dev.hdr.internal" subsystem in order to compile unexelfsgi.c. - 19.22 was known to work on all Silicon Graphics machines running - IRIX 4.0.5 or IRIX 5.1. - - Compiling with -O using IRIX compilers prior to 3.10.1 may not work. - Don't use -O or use GCC instead. - - Most IRIX 3.3 systems do not have an ANSI C compiler, but a few do. - Compile Emacs 18 with the -cckr switch on these machines. - - There is a bug in IRIX 3.3 that can sometimes leave ptys owned by root - with a permission of 622. This causes malfunctions in use of - subprocesses of Emacs. Irix versions 4.0 and later with GNU Emacs - versions 18.59 and later fix this bug. - Masscomp (m68k-masscomp-rtu) 18.36 worked on a 5500DP running RTU v3.1a and compiler version 3.2 @@ -1498,3 +1469,5 @@ Local variables: mode: indented-text fill-prefix: " " End: + +arch-tag: 7d2e93c7-e982-40ec-9055-3cd064042473 diff --git a/etc/MAILINGLISTS b/etc/MAILINGLISTS index c9fe8e0670..6c22e66834 100644 --- a/etc/MAILINGLISTS +++ b/etc/MAILINGLISTS @@ -1521,3 +1521,5 @@ Local variables: mode: outline fill-column: 72 End: + +arch-tag: 6e42bba8-7532-4a23-8486-99dbc5770a8e diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS index 415a7aabe8..8861a10096 100644 --- a/etc/MH-E-NEWS +++ b/etc/MH-E-NEWS @@ -1733,3 +1733,5 @@ Local variables: mode: outline paragraph-separate: "[ ]*$" end: + +arch-tag: f6696cad-eb1b-4c5f-8057-4e3954a98d18 diff --git a/etc/MORE.STUFF b/etc/MORE.STUFF index b739925723..2e1803ae8b 100644 --- a/etc/MORE.STUFF +++ b/etc/MORE.STUFF @@ -25,6 +25,11 @@ Packages posted to the gnu.emacs.sources newsgroup (see etc/MAILINGLISTS) might be archived specifically (try a web search engine) or retrievable from general Usenet archive services. +* emacswiki.org + +The Emacs Wiki has an area for storing elisp files +. + * Maintenance versions of some packages distributed with Emacs You might find bug-fixes or enhancements in these places. @@ -39,7 +44,7 @@ You might find bug-fixes or enhancements in these places. * BibTeX: - * BS: + * BS: * Calculator: @@ -47,7 +52,7 @@ You might find bug-fixes or enhancements in these places. * CPerl: - * Ediff and Viper: + * Ediff and Viper: * Eldoc and Rlogin: @@ -86,9 +91,9 @@ You might find bug-fixes or enhancements in these places. * QuickURL: - * RefTeX: + * RefTeX: - * Speedbar, Checkdoc etc: + * Speedbar, Checkdoc etc: * SQL: @@ -118,7 +123,7 @@ the future. You might like to check whether they are packaged for your system. Several are for Debian GNU/Linux in particular. - * AUCTeX: fancy (La)TeX support: + * AUCTeX: fancy (La)TeX support: There's an AUCTeX mail list/newsgroup: . @@ -133,15 +138,17 @@ Several are for Debian GNU/Linux in particular. mirrors of the `CTAN' TeX archives. * Dismal: spreadsheet: - + * EDB: database: Not maintained? + * Ee: categorizing information manager: + + * EIEIO (object system), ETalk (interface to Internet talk): - + * EFS: enhanced version of ange-ftp: @@ -151,6 +158,9 @@ Several are for Debian GNU/Linux in particular. From GNU distribution mirrors. (Much of this functionality is now in Emacs.) + * Emacs statistical system (ESS): statistical programming within Emacs + + * Emacspeak -- A Speech Output Subsystem For Emacs: @@ -176,8 +186,8 @@ Several are for Debian GNU/Linux in particular. Provides an interactive environment for manipulating an inferior process running some form of Lisp. - * JDE: - Provides a Java-specific `Integrated Development Environment'. + * JDE: + Provides a Java development environment for Emacs. * Mailcrypt: @@ -187,6 +197,9 @@ Several are for Debian GNU/Linux in particular. * Pointers to MIME packages: + * Preview LaTeX: embed preview LaTeX images in source buffer. + + * PSGML: DTD-aware serious SGML/XML editing. @@ -199,7 +212,7 @@ Several are for Debian GNU/Linux in particular. SJ3 Ver.2 * Tramp: Remote file access via rsh/ssh - + * VM (View Mail): Alternative mail reader. There is a VM newsgroup: @@ -218,3 +231,5 @@ mode: text mode: view eval: (goto-address) End: + +arch-tag: c1d4e7c8-db85-44e6-909e-659e2b20fefa diff --git a/etc/Makefile b/etc/Makefile index da96f9618e..0ccd107ddf 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -30,3 +30,4 @@ TIC=tic e/eterm: e/eterm.ti TERMINFO=`pwd`; export TERMINFO; $(TIC) e/eterm.ti +# arch-tag: 4261f003-cf77-4478-a10a-5284e9d8f797 diff --git a/etc/NEWS b/etc/NEWS index 53ed01cf6d..46989c2079 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1,5 +1,5 @@ GNU Emacs NEWS -- history of user-visible changes. 2003-05-21 -Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. See the end for copying conditions. Please send Emacs bug reports to bug-gnu-emacs@gnu.org. @@ -89,6 +89,9 @@ eight-bit-control/eight-bit-graphic charsets aren't now in the range * Installation Changes in Emacs 21.4 +--- +** A Bulgarian translation of the Emacs Tutorial is available. + ** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk' when you run configure. This requires Gtk+ 2.0 or newer. This port provides a way to display multilingual text in menus (with some caveats). @@ -154,10 +157,171 @@ See the files mac/README and mac/INSTALL for build instructions. --- ** A French translation of the Emacs Tutorial is available. +** Building with -DENABLE_CHECKING does not automatically build with union +types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. * Changes in Emacs 21.4 +** New command line option -Q. + +This is like using -q --no-site-file, but in addition it also disables +the menu-bar, the tool-bar, the scroll-bars, tool tips, the blinking +cursor, and the fancy startup screen. + +** C-h v and C-h f commands now include a hyperlink to the C source for +variables and functions defined in C (if the C source is available). + +** When used interactively, `format-write-file' now asks for confirmation +before overwriting an existing file, unless a prefix argument is +supplied. This behavior is analogous to `write-file'. + +** You can now use Auto Revert mode to `tail' a file. +If point is at the end of a file buffer before reverting, Auto Revert +mode keeps it at the end after reverting. Similarly if point is +displayed at the end of a file buffer in any window, it will stay at +the end of the buffer in that window. This allows to tail a file: +just put point at the end of the buffer and it will stay there. This +rule applies to file buffers. For non-file buffers, the behavior may +be mode dependent. + +** Auto Revert mode is now more careful to avoid excessive reverts and +other potential problems when deciding which non-file buffers to +revert. This matters especially if Global Auto Revert mode is enabled +and `global-auto-revert-non-file-buffers' is non-nil. Auto Revert +mode will only revert a non-file buffer if the buffer has a non-nil +`revert-buffer-function' and a non-nil `buffer-stale-function', which +decides whether the buffer should be reverted. Currently, this means +that auto reverting works for Dired buffers (although this may not +work properly on all operating systems) and for the Buffer Menu. + +** If the new user option `auto-revert-check-vc-info' is non-nil, Auto +Revert mode reliably updates version control info (such as the version +control number in the mode line), in all version controlled buffers in +which it is active. If the option is nil, the default, then this info +only gets updated whenever the buffer gets reverted. + +** New command `Buffer-menu-toggle-files-only' toggles display of file +buffers only in the Buffer Menu. It is bound to `T' in Buffer Menu +mode. + +** M-x compile has become more robust and reliable + +Quite a few more kinds of messages are recognized. Messages that are +recognized as warnings or informational come in orange or green, instead of +red. Informational messages are by default skipped with `next-error' +(controlled by `compilation-skip-threshold'). + +Location data is collected on the fly as the *compilation* buffer changes. +This means you could modify messages to make them point to different files. +This also means you can not go to locations of messages you may have deleted. + +The variable `compilation-error-regexp-alist' has now become customizable. If +you had added your own regexps to this, you'll probably need to include a +leading `^', otherwise they'll match anywhere on a line. There is now also a +`compilation-mode-font-lock-keywords' and it nicely handles all the checks +that configure outputs and -o options so you see at a glance where you are. + +The new file etc/compilation.txt gives examples of each type of message. + +** M-x grep has been adapted to new compile + +Hits are fontified in green, and hits in binary files in orange. Grep buffers +can be saved and will again be loaded with the new `grep-mode'. + +** M-x diff uses diff-mode instead of compilation-mode. + +** M-x compare-windows now can automatically skip non-matching text to +resync points in both windows. + +** New command `strokes-global-set-stroke-string'. +This is like `strokes-global-set-stroke', but it allows you to bind +the stroke directly to a string to insert. This is convenient for +using strokes as an input method. + +--- +** The saveplace.el package now filters out unreadable files. +When you exit Emacs, the saved positions in visited files no longer +include files that aren't readable, e.g. files that don't exist. +Customize the new option `save-place-forget-unreadable-files' to nil +to get the old behavior. The new options `save-place-save-skipped' +and `save-place-skip-check-regexp' allow further fine-tuning of this +feature. + +** You can have several Emacs servers on the same machine. + + % emacs --eval '(setq server-name "foo")' -f server-start & + % emacs --eval '(setq server-name "bar")' -f server-start & + % emacsclient -s foo file1 + % emacsclient -s bar file2 + +** On window systems, lines which are exactly as wide as the window +(not counting the final newline character) are no longer broken into +two lines on the display (with just the newline on the second line). +Instead, the newline now "overflows" into the right fringe, and the +cursor will be displayed in the fringe when positioned on that newline. + +The new user option 'overflow-newline-into-fringe' may be set to nil to +revert to the old behaviour of continuing such lines. + +** The buffer boundaries (i.e. first and last line in the buffer) may +now be marked with angle bitmaps in the fringes. In addition, up and +down arrow bitmaps may be shown at the top and bottom of the left or +right fringe if the window can be scrolled in either direction. + +This behavior is activated by setting the buffer-local variable +`indicate-buffer-boundaries' to a non-nil value. The default value of +this variable is found in `default-indicate-buffer-boundaries'. + +If value is `left' or `right', both angle and arrow bitmaps are +displayed in the left or right fringe, resp. Any other non-nil value +causes the bitmap on the top line to be displayed in the left fringe, +and the bitmap on the bottom line in the right fringe. + +If value is a cons (ANGLES . ARROWS), the car specifies the position +of the angle bitmaps, and the cdr specifies the position of the arrow +bitmaps. + +For example, (t . right) places the top angle bitmap in left fringe, +the bottom angle bitmap in right fringe, and both arrow bitmaps in +right fringe. To show just the angle bitmaps in the left fringe, but +no arrow bitmaps, use (left . nil). + +** New command `display-local-help' displays any local help at point +in the echo area. It is bound to `C-h .'. It normally displays the +same string that would be displayed on mouse-over using the +`help-echo' property, but, in certain cases, it can display a more +keyboard oriented alternative. + +** New user option `help-at-pt-display-when-idle' allows to +automatically show the help provided by `display-local-help' on +point-over, after suitable idle time. The amount of idle time is +determined by the user option `help-at-pt-timer-delay' and defaults +to one second. This feature is turned off by default. + +** New commands `scan-buf-next-region' and `scan-buf-previous-region' +move to the start of the next (previous, respectively) region with +non-nil help-echo property and display any help found there in the +echo area, using `display-local-help'. + ++++ +** Help mode now only makes hyperlinks for faces when the face name is +preceded or followed by the word `face'. It no longer makes +hyperlinks for variables without variable documentation, unless +preceded by one of the words `variable' or `option'. It now makes +hyperlinks to Info anchors (or nodes) if the anchor (or node) name is +enclosed in single quotes and preceded by `info anchor' or `Info +anchor' (in addition to earlier `info node' and `Info node'). + +** The max size of buffers and integers has been doubled. +On 32bit machines, it is now 256M (i.e. 268435455). + ++++ +** The -f option, used from the command line to call a function, +now reads arguments for the function interactively if it is +an interactively callable function. + + ** sql changes. *** The variable `sql-product' controls the highlightng of different @@ -204,7 +368,7 @@ highlighted in `font-lock-doc-face'. *** Microsoft SQLServer support has been significantly improved. Keyword highlighting for SqlServer 2000 is implemented. sql-interactive-mode defaults to use osql, rather than isql, because -osql flushes it's error stream more frequently. Thus error messages +osql flushes its error stream more frequently. Thus error messages are displayed when they occur rather than when the session is terminated. @@ -249,11 +413,47 @@ restores the previous value of `buffer-invisibility-spec'. ** New command `kill-whole-line' kills an entire line at once. By default, it is bound to C-S-. +** Dired mode: + +*** New faces dired-header, dired-mark, dired-marked, dired-flagged, +dired-ignored, dired-directory, dired-symlink, dired-warning +introduced for Dired mode instead of font-lock faces. + +*** New Dired command `dired-compare-directories' to mark files with +different file attributes in two dired buffers. + ++++ +*** In Dired's ! command (dired-do-shell-command), `*' and `?' now +control substitution of the file names only when they are surrounded +by whitespace. This means you can now use them as shell wildcards +too. If you want to use just plain `*' as a wildcard, type `*""'; the +doublequotes make no difference in the shell, but they prevent +special treatment in `dired-do-shell-command'. + ++++ +*** Dired's v command now runs external viewers to view certain +types of files. The variable `dired-view-command-alist' controls +what external viewers to use and when. + +*** In Dired, the w command now copies the current line's file name +into the kill ring. + +** Info mode: +++ -** Info now hides node names in menus and cross references by default. +*** Info now hides node names in menus and cross references by default. If you prefer the old behavior, you can set the new user option `Info-hide-note-references' to nil. +*** The new command `info-apropos' searches the indices of the known +Info files on your system for a string, and builds a menu of the +possible matches. + ++++ +*** The default value for `Info-scroll-prefer-subnodes' is now nil. + +--- +*** Info-index offers completion. + ** Support for the SQLite interpreter has been added to sql.el by calling 'sql-sqlite'. @@ -295,6 +495,16 @@ Such individual settings are now preserved when windows are split horizontally or vertically, a saved window configuration is restored, or when the frame is resized. +** New functions frame-current-scroll-bars and window-current-scroll-bars. + +These functions return the current locations of the vertical and +horizontal scroll bars in a frame or window. + +--- +** Emacs now supports drag and drop for X. Dropping a file on a window + opens it, dropping text inserts the text. Dropping a file on a dired + buffer copies or moves the file to that directory. + ** Under X, mouse-wheel-mode is turned on by default. ** The X resource useXIM can be used to turn off use of XIM, which may @@ -303,9 +513,6 @@ speed up Emacs with slow networking to the X server. If the configure option `--without-xim' was used to turn off use of XIM by default, the X resource useXIM can be used to turn it on. -** `describe-char' can show data from the Unicode database file. See -user option `unicode-data'. - ** `undo-only' does an undo which does not redo any previous undo. ** `uniquify-strip-common-suffix' tells uniquify to prefer @@ -429,7 +636,7 @@ now look at the character after point. If a face or faces are specified for that character, the commands by default customize those faces. -** New language environments: French, Ukrainian, Windows-1251, Tajik, +** New language environments: French, Ukrainian, Tajik, Bulgarian, Belarusian, Ukrainian, UTF-8, Windows-1255, Welsh, Latin-6, Latin-7, Lithuanian, Latvian, Swedish, Slovenian, Croatian, Georgian, Italian, Russian, Malayalam, Tamil, Russian, Chinese-EUC-TW. (Set up @@ -457,7 +664,10 @@ Big 5 is then converted to CNS. --- ** Many new coding systems are available by loading the `code-pages' library. These include complete versions of most of those in -codepage.el, based on Unicode mappings. +codepage.el, based on Unicode mappings. `codepage-setup' is now +obsolete and is used only in the MS-DOS port of Emacs. windows-1252 +and windows-1251 are preloaded since the former is so common and the +latter is used by GNU locales. ** The utf-8/16 coding systems have been enhanced. By default, untranslatable utf-8 sequences (mostly representing CJK @@ -513,12 +723,27 @@ command. On the other hand, the size of the thumb does not represent the actual amount of text shown any more (only a crude approximation of it). +--- +** The pop up menus for Lucid now stay up if you do a fast click and can +be navigated with the arrow keys (like Gtk+ and W32). + +--- +** Dialogs for Lucid/Athena and Lesstif/Motif pops down when pressing ESC. + ++++ +** The file selection dialog for Gtk+, W32 and Motif/Lesstif can be +disabled by customizing the variable `use-file-dialog'. + +++ ** Emacs can produce an underscore-like (horizontal bar) cursor. The underscore cursor is set by putting `(cursor-type . hbar)' in default-frame-alist. It supports variable heights, like the `bar' cursor does. ++++ +** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is +now controlled by the variable `blink-cursor-alist'. + ** Filesets are collections of files. You can define a fileset in various ways, such as based on a directory tree or based on program files that include other program files. @@ -538,11 +763,6 @@ when Emacs visits them. default, all trivial operations involving whole lines are performed automatically. The game uses faces for better visual feedback. -+++ -** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is -now shown as a hollow box or a thin bar. However, you can control how -it blinks off by setting the variable `blink-cursor-alist'. - ** The new variable `x-select-request-type' controls how Emacs requests X selection. The default value is nil, which means that Emacs requests X selection with types COMPOUND_TEXT and UTF8_STRING, @@ -584,6 +804,13 @@ different Emacs window will select that window (minibuffer window can be selected only when it is active). The default is nil, so that this feature is not enabled. +** On X, when the window manager requires that you click on a frame to +select it (give it focus), the selected window and cursor position +normally changes according to the mouse click position. If you set +the variable x-mouse-click-focus-ignore-position to t, the selected +window and cursor position do not change when you click on a frame +to give it focus. + +++ ** The new command `describe-char' (C-u C-x =) pops up a buffer with description various information about a character, including its @@ -643,9 +870,6 @@ mode-line. in a directory or in a file. See the documentation of the user option `display-time-mail-directory'. -+++ -** The default value for `Info-scroll-prefer-subnodes' is now nil. - --- ** LDAP support now defaults to ldapsearch from OpenLDAP version 2. @@ -684,6 +908,13 @@ than 8 colors. For example, for `xterm', 16-color, 88-color, and the extended number of colors, and defines the appropriate entries for all of these colors. ++++ +*** Emacs now uses the full range of available colors for the default +faces when running on a color terminal, including 16-, 88-, and +256-color xterms. This means that when you run "emacs -nw" on an +88-color or 256-color xterm, you will see essentially the same face +colors as on X. + --- *** There's a new support for colors on `rxvt' terminal emulator. @@ -695,9 +926,6 @@ When Emacs is invoked on a window system, the new command-line options whose width, height, or both width and height take up the entire screen size. (For now, this does not work with some window managers.) ---- -** Info-index offers completion. - --- ** Emacs now tries to set up buffer coding systems for HTML/XML files automatically. @@ -831,20 +1059,7 @@ counter to the specified source line (the one where point is). +++ ** hide-ifdef-mode now uses overlays rather than selective-display to hide its text. This should be mostly transparent but slightly -changes the behavior of motion commands line C-e and C-p. - -+++ -** In Dired's ! command (dired-do-shell-command), `*' and `?' now -control substitution of the file names only when they are surrounded -by whitespace. This means you can now use them as shell wildcards -too. If you want to use just plain `*' as a wildcard, type `*""'; the -doublequotes make no difference in the shell, but they prevent -special treatment in `dired-do-shell-command'. - -+++ -** Dired's v command now runs external viewers to view certain -types of files. The variable `dired-view-command-alist' controls -what external viewers to use and when. +changes the behavior of motion commands like C-e and C-p. +++ ** Unquoted `$' in file names do not signal an error any more when @@ -853,13 +1068,20 @@ Instead, the `$ENVVAR' text is left as is, so that `$$' quoting is only rarely needed. --- -** jit-lock can now be delayed with `jit-lock-defer-time'. +** JIT-lock changes +*** jit-lock can now be delayed with `jit-lock-defer-time'. If this variable is non-nil, its value should be the amount of Emacs idle time in seconds to wait before starting fontification. For example, if you set `jit-lock-defer-time' to 0.25, fontification will only happen after 0.25s of idle time. +*** contextual refontification is now separate from stealth fontification. + +jit-lock-defer-contextually is renamed jit-lock-contextually and +jit-lock-context-time determines the delay after which contextual +refontification takes place. + +++ ** Marking commands extend the region when invoked multiple times. If you hit M-C-SPC (mark-sexp), M-@ (mark-word), M-h (mark-paragraph), or @@ -907,9 +1129,6 @@ With positive arg, M-h marks the current and the following paragraphs; if the arg is negative, it marks the current and the preceding paragraphs. -** In Dired, the w command now copies the current line's file name -into the kill ring. - +++ ** The variables dired-free-space-program and dired-free-space-args have been renamed to directory-free-space-program and @@ -958,7 +1177,7 @@ attempt to construct a unique auto-save name (e.g. for remote files). +++ ** Diary sexp entries can have custom marking in the calendar. Diary sexp functions which only apply to certain days (such as -`diary-block' or `diary-cyclic' now take an optional parameter MARK, +`diary-block' or `diary-cyclic') now take an optional parameter MARK, which is the name of a face or a single-character string indicating how to highlight the day in the calendar display. Specifying a single-character string as @var{mark} places the character next to the @@ -966,6 +1185,21 @@ day in the calendar. Specifying a face highlights the day with that face. This lets you have different colors or markings for vacations, appointments, paydays or anything else using a sexp. ++++ +** The new function `calendar-goto-day-of-year' (g D) prompts for a +year and day number, and moves to that date. Negative day numbers +count backward from the end of the year. + +** The function `simple-diary-display' now by default sets a header line. +This can be controlled through the variables `diary-header-line-flag' +and `diary-header-line-format'. + ++++ +** The procedure for activating appointment reminders has changed: use +the new function `appt-activate'. The new variable +`appt-display-format' controls how reminders are displayed, replacing +appt-issue-message, appt-visible, and appt-msg-window. + ** VC Changes *** The key C-x C-q no longer checks files in or out, it only changes @@ -1445,16 +1679,46 @@ candidate is a directory. to the text before point. If there is text in the buffer after point, it remains unchanged. +** Visual feedback of *Completions* buffer is enhanced. +Faces are put on the common prefix substrings and the first uncommon +charachters of each completion candidate in the *Completions* buffer. +`completion-de-emphasis' is put on the common prefix substrings as the +face; and `completion-emphasis' is put on the first uncommon +charachters. By default `completion-de-emphasis' is inherited from +`default' face. `completion-emphasis' is inherited from `bold' face. + +++ ** New user option `inhibit-startup-buffer-menu'. When loading many files, for instance with `emacs *', Emacs normally displays a buffer menu. This option turns the buffer menu off. -** New user option `compilation-environment'. +** Compilation mode enhancements: + +*** New user option `compilation-environment'. This option allows you to specify environment variables for inferior compilation processes without affecting the environment that all subprocesses inherit. +*** `next-error' now temporarily highlights the corresponding source line. + +** Grep has been decoupled from compilation mode setup. + +*** Grep commands now have their own submenu and customization group. + +*** The new variables `grep-window-height', `grep-auto-highlight', and +`grep-scroll-output' can be used to override the corresponding +compilation mode settings for grep commands. + +*** Source line is temporarily highlighted when going to next match. + +*** New key bindings in grep output window: +SPC and DEL scrolls window up and down. C-n and C-p moves to next and +previous match in the grep window. RET jumps to the source line of +the current match. `n' and `p' shows next and previous match in +other window, but does not switch buffer. `{' and `}' jumps to the +previous or next file in the grep output. TAB also jumps to the next +file. + --- ** Rmail now displays 5-digit message ids in its summary buffer. @@ -1512,7 +1776,30 @@ Meta and Alt: (setq x-alt-keysym 'meta) (setq x-meta-keysym 'alt) -* New modes and packages in 21.4 ++++ +** vc-annotate-mode enhancements + +In vc-annotate mode, you can now use the following key bindings for +enhanced functionality to browse the annotations of past revisions, or +to view diffs or log entries directly from vc-annotate-mode: + + P: annotates the previous revision + N: annotates the next revision + J: annotates the revision at line + A: annotates the revision previous to line + D: shows the diff of the revision at line with its previous revision + L: shows the log of the revision at line + W: annotates the workfile (most up to date) version + +* New modes and packages in Emacs 21.4 + +** The new python.el package is used to edit Python and Jython programs. + +** The URL package (which had been part of W3) is now part of Emacs. + ++++ +** The new global minor mode `size-indication-mode' (off by default) +shows the size of accessible part of the buffer on the mode line. ** GDB-Script-mode is used for files like .gdbinit. @@ -1724,9 +2011,294 @@ in Indented-Text mode. `query-replace' and related functions simply ignore a match if part of it has a read-only property. +** The new Lisp library fringe.el controls the apperance of fringes. + +** `cfengine-mode' is a major mode for editing GNU Cfengine +configuration files. * Lisp Changes in Emacs 21.4 +** The display space :width and :align-to text properties are now +supported on text terminals. + +** Enhancements to stretch display properties + +The display property stretch specification form `(space PROPS)', where +PROPS is a property list now allows pixel based width and height +specifications, as well as enhanced horizontal text alignment. + +The value of these properties can now be a (primitive) expression +which is evaluated during redisplay. The following expressions +are supported: + +EXPR ::= NUM | (NUM) | UNIT | ELEM | POS | IMAGE | FORM +NUM ::= INTEGER | FLOAT | SYMBOL +UNIT ::= in | mm | cm | width | height +ELEM ::= left-fringe | right-fringe | left-margin | right-margin + | scroll-bar | text +POS ::= left | center | right +FORM ::= (NUM . EXPR) | (OP EXPR ...) +OP ::= + | - + +The form `NUM' specifies a fractional width or height of the default +frame font size. The form `(NUM)' specifies an absolute number of +pixels. If a symbol is specified, its buffer-local variable binding +is used. The `in', `mm', and `cm' units specifies the number of +pixels per inch, milli-meter, and centi-meter, resp. The `width' and +`height' units correspond to the width and height of the current face +font. An image specification corresponds to the width or height of +the image. + +The `left-fringe', `right-fringe', `left-margin', `right-margin', +`scroll-bar', and `text' elements specify to the width of the +corresponding area of the window. + +The `left', `center', and `right' positions can be used with :align-to +to specify a position relative to the left edge, center, or right edge +of the text area. One of the above window elements (except `text') +can also be used with :align-to to specify that the position is +relative to the left edge of the given area. Once the base offset for +a relative position has been set (by the first occurrence of one of +these symbols), further occurences of these symbols are interpreted as +the width of the area. + +For example, to align to the center of the left-margin, use + :align-to (+ left-margin (0.5 . left-margin)) + +If no specific base offset is set for alignment, it is always relative +to the left edge of the text area. For example, :align-to 0 in a +header-line aligns with the first text column in the text area. + +The value of the form `(NUM . EXPR)' is the value of NUM multiplied by +the value of the expression EXPR. For example, (2 . in) specifies a +width of 2 inches, while (0.5 . IMAGE) specifies half the width (or +height) of the specified image. + +The form `(+ EXPR ...)' adds up the value of the expressions. +The form `(- EXPR ...)' negates or subtracts the value of the expressions. + +** New macro with-local-quit temporarily sets inhibit-quit to nil for use +around potentially blocking or long-running code in timers +and post-command-hooks. + ++++ +** New face attribute `min-colors' can be used to tailor the face color +to the number of colors supported by a display, and define the +foreground and background colors accordingly so that they look best on +a terminal that supports at least this many colors. This is now the +preferred method for defining default faces in a way that makes a good +use of the capabilities of the display. + +** New function 'define-fringe-bitmap' can now be used to change the +built-in fringe bitmaps, as well as create new fringe bitmaps. +The return value is a number identifying the new fringe bitmap. + +To change a built-in bitmap, do (require 'fringe) and identify the +bitmap to change with the value of the corresponding symbol, like +`left-truncation-fringe-bitmap' or `continued-line-fringe-bitmap'. + +** New function 'destroy-fringe-bitmap' may be used to destroy a +previously created bitmap, or restore a built-in bitmap. + +** New function 'set-fringe-bitmap-face' can now be used to set a +specific face to be used for a specific fringe bitmap. Normally, +this should be a face derived from the `fringe' face, specifying +the foreground color as the desired color of the bitmap. + +** There are new display properties, left-fringe and right-fringe, +that can be used to show a specific bitmap in the left or right fringe +bitmap of the display line. + +Format is 'display '(left-fringe BITMAP [FACE]), where BITMAP is a +number identifying a fringe bitmap, either built-in or as returned by +`define-fringe-bitmap', and FACE is an optional face name to be used +for displaying the bitmap. + +** New function `fringe-bitmaps-at-pos' returns a cons (LEFT . RIGHT) +identifying the current fringe bitmaps in the display line at a given +buffer position. A nil value means no bitmap. + +** Multiple overlay arrows can now be defined and managed via the new +variable `overlay-arrow-variable-list'. It contains a list of +varibles which contain overlay arrow position markers, including +the original `overlay-arrow-position' variable. + +Each variable on this list may have individual `overlay-arrow-string' +and `overlay-arrow-bitmap' properties that specify an overlay arrow +string (for non-window terminals) or fringe bitmap (for window +systems) to display at the corresponding overlay arrow position. +If either property is not set, the default `overlay-arrow-string' or +'overlay-arrow-fringe-bitmap' will be used. + ++++ +** New function `line-number-at-pos' returns line number of current +line in current buffer, or if optional buffer position is given, line +number of corresponding line in current buffer. + +** The default value of `sentence-end' is now defined using the new +variable `sentence-end-without-space' which contains such characters +that end a sentence without following spaces. + ++++ +** The flags, width, and precision options for %-specifications in function +`format' are now documented. Some flags that were accepted but not +implemented (such as "*") are no longer accepted. + +** New function `macroexpand-all' expands all macros in a form. +It is similar to the Common-Lisp function of the same name. +One difference is that it guarantees to return the original argument +if no expansion is done, which may be tested using `eq'. + ++++ +** New function `delete-dups' destructively removes `equal' duplicates +from a list. Of several `equal' occurrences of an element in the list, +the first one is kept. + ++++ +** `declare' is now a macro. This change was made mostly for +documentation purposes and should have no real effect on Lisp code. + +** The new hook `before-save-hook' is invoked by `basic-save-buffer' +before saving buffers. This allows packages to perform various final +tasks, for example; it can be used by the copyright package to make +sure saved files have the current year in any copyright headers. + ++++ +** The function `insert-for-yank' now supports strings where the +`yank-handler' property does not span the first character of the +string. The old behavior is available if you call +`insert-for-yank-1' instead. + +** New function `get-char-property-and-overlay' accepts the same +arguments as `get-char-property' and returns a cons whose car is the +return value of `get-char-property' called with those arguments and +whose cdr is the overlay in which the property was found, or nil if +it was found as a text property or not found at all. + +** The mouse pointer shape in void text areas (i.e. after the end of a +line or below the last line in the buffer) of the text window is now +controlled by the new variable `void-text-area-pointer'. The default +is to use the `arrow' (non-text) pointer. Other choices are `text' +(or nil), `hand', `vdrag', `hdrag', `modeline', and `hourglass'. + +** The mouse pointer shape over an image can now be controlled by the +:pointer image property. + +** The mouse pointer shape over ordinary text or images may now be +controlled/overriden via the `pointer' text property. + +** Images may now have an associated image map via the :map property. + +An image map is an alist where each element has the format (AREA ID PLIST). +An AREA is specified as either a rectangle, a circle, or a polygon: +A rectangle is a cons (rect . ((x0 . y0) . (x1 . y1))) specifying the +pixel coordinates of the upper left and bottom right corners. +A circle is a cons (circle . ((x0 . y0) . r)) specifying the center +and the radius of the circle; r may be a float or integer. +A polygon is a cons (poly . [x0 y0 x1 y1 ...]) where each pair in the +vector describes one corner in the polygon. + +When the mouse pointer is above a hot-spot area of an image, the +PLIST of that hot-spot is consulted; if it contains a `help-echo' +property it defines a tool-tip for the hot-spot, and if it contains +a `pointer' property, it defines the shape of the mouse cursor when +it is over the hot-spot. See the variable 'void-area-text-pointer' +for possible pointer shapes. + +When you click the mouse when the mouse pointer is over a hot-spot, +an event is composed by combining the ID of the hot-spot with the +mouse event, e.g. [area4 mouse-1] if the hot-spot's ID is `area4'. + +** Mouse event enhancements: + +*** Mouse clicks on fringes now generates left-fringe or right-fringes +events, rather than a text area click event. + +*** Mouse clicks in the left and right marginal areas now includes a +sensible buffer position corresponding to the first character in the +corresponding text row. + +*** Function `mouse-set-point' now works for events outside text area. + ++++ +*** Mouse events now includes buffer position for all event types. + ++++ +*** `posn-point' now returns buffer position for non-text area events. + ++++ +*** New function `posn-area' returns window area clicked on (nil means +text area). + ++++ +*** Mouse events include actual glyph column and row for all event types. + ++++ +*** New function `posn-actual-col-row' returns actual glyph coordinates. + ++++ +*** Mouse events may now include image object in addition to string object. + ++++ +*** Mouse events include relative x and y pixel coordinates relative to +the top left corner of the object (image or character) clicked on. + ++++ +*** Mouse events include the pixel width and height of the object +(image or character) clicked on. + ++++ +*** New functions 'posn-object', 'posn-object-x-y', and +'posn-object-width-height' return the image or string object of a mouse +click, the x and y pixel coordinates relative to the top left corner +of that object, and the total width and height of that object. + +** New function `force-window-update' can initiate a full redisplay of +one or all windows. Normally, this is not needed as changes in window +contents are detected automatically. However, certain implicit +changes to mode lines, header lines, or display properties may require +forcing an explicit window update. + +** New function `redirect-debugging-output' can be used to redirect +debugging output on the stderr file handle to a file. + ++++ +** `split-string' now includes null substrings in the returned list if +the optional argument SEPARATORS is non-nil and there are matches for +SEPARATORS at the beginning or end of the string. If SEPARATORS is +nil, or if the new optional third argument OMIT-NULLS is non-nil, all +empty matches are omitted from the returned list. + ++++ +** `makehash' is now obsolete. Use `make-hash-table' instead. + ++++ +** If optional third argument APPEND to `add-to-list' is non-nil, a +new element gets added at the end of the list instead of at the +beginning. This change actually occurred in Emacs-21.1, but was not +documented. + +** Major modes can define `eldoc-print-current-symbol-info-function' +locally to provide Eldoc functionality by some method appropriate to +the language. + +--- +** New coding system property `mime-text-unsuitable' indicates that +the coding system's `mime-charset' is not suitable for MIME text +parts, e.g. utf-16. + ++++ +** The argument to forward-word, backward-word, forward-to-indentation +and backward-to-indentation is now optional, and defaults to 1. + ++++ +** (char-displayable-p CHAR) returns non-nil if Emacs ought to be able +to display CHAR. More precisely, if the selected frame's fontset has +a font to display the character set that CHAR belongs to. + +Fontsets can specify a font on a per-character basis; when the fontset +does that, this value may not be accurate. + +++ ** The new function `window-inside-edges' returns the edges of the actual text portion of the window, not including the scroll bar or @@ -1939,8 +2511,11 @@ such as `error'. The brown splotches are skipped for forms that are expected to always evaluate to the same value, such as (setq x 14). *** For difficult cases, you can add do-nothing macros to your code to help -out the test coverage tool. The macro 1value suppresses a brown splotch for -its argument. The macro noreturn suppresses a red splotch. +out the test coverage tool. The macro `noreturn' suppresses a red splotch. +It is an error if the argument to `noreturn' does return. The macro 1value +suppresses a brown splotch for its argument. This macro is a no-op except +during test-coverage -- then it signals an error if the argument actually +returns differing values. +++ ** New function unsafep returns nil if the given Lisp form can't possibly @@ -1984,6 +2559,7 @@ hash tables defined by the Lisp function `define-translation-hash-table'. argument is a minibuffer. If the argument is omitted it defaults to the current buffer. ++++ ** There is a new Warnings facility; see the functions `warn' and `display-warning'. @@ -2007,12 +2583,14 @@ file, you can put a `coding:' tags to override it.) ** The new function `merge-coding-systems' fills in unspecified aspects of one coding system from another coding system. ++++ ** The variable `safe-local-eval-forms' specifies a list of forms that are ok to evaluate when they appear in an `eval' local variables specification. Normally Emacs asks for confirmation before evaluating such a form, but if the form appears in this list, no confirmation is needed. +--- ** If a function has a non-nil `safe-local-eval-function' property, that means it is ok to evaluate some calls to that function when it appears in an `eval' local variables specification. If the property @@ -2023,6 +2601,7 @@ with the form as argument, and if any returns t, the form is ok to call. If the form is not "ok to call", that means Emacs asks for confirmation as before. ++++ ** Controlling the default left and right fringe widths. The default left and right fringe widths for all windows of a frame @@ -2042,6 +2621,7 @@ width which is the minimum number of pixels necessary to display any of the currently defined fringe bitmaps. The width of the built-in fringe bitmaps is 8 pixels. ++++ ** Per-window fringes settings Windows can now have their own individual fringe widths and position @@ -2062,6 +2642,7 @@ settings. To make `left-fringe-width', `right-fringe-width', and displaying the buffer in a window, or use `set-window-buffer' to force an update of the display margins. ++++ ** Per-window vertical scroll-bar settings Windows can now have their own individual scroll-bar settings @@ -2075,6 +2656,7 @@ used to obtain the current settings. To make `scroll-bar-mode' and the buffer in a window, or use `set-window-buffer' to force an update of the display margins. ++++ ** The function `set-window-buffer' now has an optional third argument KEEP-MARGINS which will preserve the window's current margin, fringe, and scroll-bar settings if non-nil. @@ -2087,33 +2669,38 @@ write-file-hooks to write-file-functions, write-contents-hooks to write-contents-functions. Marked local-write-file-hooks as obsolete (use the LOCAL arg of `add-hook'). ++++ ** The new variable `delete-frame-functions' replaces `delete-frame-hook'. It was renamed to follow the naming conventions for abnormal hooks. The old name remains available as an alias, but has been marked obsolete. ++++ ** The `read-file-name' function now takes an additional argument which specifies a predicate which the file name read must satify. The new variable `read-file-name-predicate' contains the predicate argument while reading the file name from the minibuffer; the predicate in this variable is used by read-file-name-internal to filter the completion list. +--- ** The new variable `read-file-name-function' can be used by lisp code to override the internal read-file-name function. ++++ ** The new function `read-directory-name' can be used instead of `read-file-name' to read a directory name; when used, completion will only show directories. ++++ ** The new function `file-remote-p' tests a file name and returns non-nil if it specifies a remote file (one that Emacs accesses using its own special methods and not directly through the file system). +--- ** When a Lisp file uses CL functions at run-time, compiling the file now issues warnings about these calls, unless the file performs (require 'cl) when loaded. -** The new Lisp library fringe.el controls the apperance of fringes. - ++++ ** The `defmacro' form may contain declarations specifying how to indent the macro in Lisp mode and how to debug it with Edebug. The syntax of defmacro has been extended to @@ -2130,6 +2717,7 @@ declaration specifiers supported are: Set NAME's `edebug-form-spec' property to DEBUG. (This is equivalent to writing a `def-edebug-spec' for the macro. ++++ ** Interactive commands can be remapped through keymaps. This is an alternative to using defadvice or substitute-key-definition @@ -2186,12 +2774,14 @@ The following changes have been made to provide command remapping: command before remapping. It is equal to `this-command' when the command was not remapped. ++++ ** New variable emulation-mode-map-alists. Lisp packages using many minor mode keymaps can now maintain their own keymap alist separate from minor-mode-map-alist by adding their keymap alist to this list. ++++ ** Atomic change groups. To perform some changes in the current buffer "atomically" so that @@ -2257,6 +2847,7 @@ properties. It works at the same level as `default-text-properties', although it applies to overlays as well. This variable was introduced to implement the `font-lock-face' property. ++++ ** New special text property `font-lock-face'. This property acts like the `face' property, but it is controlled by @@ -2264,12 +2855,14 @@ M-x font-lock-mode. It is not, strictly speaking, a builtin text property. Instead, it is implemented inside font-core.el, using the new variable `char-property-alias-alist'. ++++ ** New function remove-list-of-text-properties. The new function `remove-list-of-text-properties' is almost the same as `remove-text-properties'. The only difference is that it takes a list of property names as argument rather than a property list. ++++ ** New function insert-for-yank. This function normally works like `insert' but removes the text @@ -2278,20 +2871,23 @@ inserted text has a `yank-handler' text property on the first character of the string, the insertion of the text may be modified in a number of ways. See the description of `yank-handler' below. ++++ ** New function insert-buffer-substring-as-yank. This function works like `insert-buffer-substring', but removes the text properties in the `yank-excluded-properties' list. ++++ ** New function insert-buffer-substring-no-properties. This function is like insert-buffer-substring, but removes all text properties from the inserted substring. ++++ ** New `yank-handler' text property may be used to control how previously killed text on the kill-ring is reinserted. -The value of the yank-handler property must be a list with one to five +The value of the yank-handler property must be a list with one to four elements with the following format: (FUNCTION PARAM NOEXCLUDE UNDO). @@ -2315,9 +2911,9 @@ by `yank-pop' to undo the insertion of the current object. It is called with two arguments, the start and end of the current region. FUNCTION may set `yank-undo-function' to override the UNDO value. -*** The functions kill-new, kill-append, and kill-region now has an -optional third argument to specify the yank-handler text property -to put on the killed text. +*** The functions kill-new, kill-append, and kill-region now have an +optional argument to specify the yank-handler text property to put on +the killed text. *** The function yank-pop will now use a non-nil value of the variable `yank-undo-function' (instead of delete-region) to undo the previous @@ -2325,6 +2921,7 @@ yank or yank-pop command (or a call to insert-for-yank). The function insert-for-yank automatically sets that variable according to the UNDO element of the string argument's yank-handler text property if present. ++++ ** New function display-supports-face-attributes-p may be used to test whether a given set of face attributes is actually displayable. @@ -2332,13 +2929,16 @@ A new predicate `supports' has also been added to the `defface' face specification language, which can be used to do this test for faces defined with defface. ++++ ** face-attribute, face-foreground, face-background, and face-stipple now accept a new optional argument, INHERIT, which controls how face inheritance is used when determining the value of a face attribute. ++++ ** New functions face-attribute-relative-p and merge-face-attribute help with handling relative face attributes. ++++ ** Enhancements to process support *** Function list-processes now has an optional argument; if non-nil, @@ -2360,7 +2960,18 @@ and modify elements on this property list. The new low-level functions process-plist and set-process-plist are used to access and replace the entire property list of a process. +??? +*** Adaptive read buffering of subprocess output. +On some systems, when emacs reads the output from a subprocess, the +output data is read in very small blocks, potentially resulting in +very poor performance. This behaviour can be remedied to some extent +by setting the new variable process-adaptive-read-buffering to a +non-nil value (the default), as it will automatically delay reading +from such processes, to allowing them to produce more output before +emacs tries to read it. + ++++ ** Enhanced networking support. *** There is a new `make-network-process' function which supports @@ -2423,14 +3034,29 @@ the fifth is the port number. connections are accepted in the stopped state. For a client process, no input is received in the stopped state. +*** New function network-interface-list. + +This function returns a list of network interface names and their +current network addresses. + +*** New function network-interface-info. + +This function returns the network address, hardware address, current +status, and other information about a specific network interface. + ++++ ** New function copy-tree. ++++ ** New function substring-no-properties. ++++ ** New function minibuffer-selected-window. ++++ ** New function `call-process-shell-command'. +--- ** The dummy function keys made by easymenu are now always lower case. If you specify the menu item name "Ada", for instance, it uses `ada' @@ -2439,11 +3065,13 @@ as the "key" bound by that key binding. This is relevant only if Lisp code looks for the bindings that were made with easymenu. ++++ ** The function `commandp' takes an additional optional argument. If it is non-nil, then `commandp' checks for a function that could be called with `call-interactively', and does not return t for keyboard macros. +--- ** master-mode.el implements a minor mode for scrolling a slave buffer without leaving your current buffer, the master buffer. @@ -2464,6 +3092,7 @@ SQL buffer. (function (lambda () (master-set-slave sql-buffer)))) ++++ ** File local variables. A file local variables list cannot specify a string with text @@ -2475,16 +3104,19 @@ properties--any specified text properties are discarded. This is like window-height but does not count the mode line or the header line. ++++ ** New function format-mode-line. This returns the mode-line or header-line of the selected (or a specified) window as a string with or without text properties. ++++ ** New functions `lax-plist-get' and `lax-plist-put'. These functions are like `plist-get' and `plist-put' except that they compare the property name using `equal' rather than `eq'. ++++ ** New function `tool-bar-local-item-from-menu' The `tool-bar-add-item-from-menu' must not be used (as previously @@ -2514,8 +3146,19 @@ for color support on character terminal frames. Its value can be a number of colors to support, or a symbol. See the Emacs Lisp Reference manual for more detailed documentation. -** Mode line display ignores text properties in the value -of a variable whose `risky-local-variables' property is nil. ++++ +** The new mode-line construct `(:propertize ELT PROPS...)' can be +used to add text properties to mode-line elements. + ++++ +** Mode line display ignores text properties as well as the +:propertize and :eval forms in the value of a variable whose +`risky-local-variable' property is nil. + ++++ +** The new `%i' and `%I' constructs for `mode-line-format' can be used +to display the size of the accessible part of the buffer on the mode +line. --- ** Indentation of simple and extended loop forms has been added to the @@ -2528,6 +3171,7 @@ indentation of keywords and forms in loop forms. ** Indentation of backquoted forms has been made customizable in the cl-indent package. See the new user option `lisp-backquote-indentation'. ++++ ** Already true in Emacs 21.1, but not emphasized clearly enough: Multibyte buffers can now faithfully record all 256 character codes @@ -2543,12 +3187,15 @@ the time it takes to convert the format. 3. For binary files where format conversion would be pointless and wasteful. ++++ ** If text has a `keymap' property, that keymap takes precedence over minor mode keymaps. ++++ ** A hex escape in a string forces the string to be multibyte. An octal escape makes it unibyte. ++++ ** At the end of a command, point moves out from within invisible text, in the same way it moves out from within text covered by an image or composition property. @@ -2559,29 +3206,6 @@ unexpected side-effects since the property applies to everything (including `goto-char', ...) whereas this new code is only run after post-command-hook and thus does not care about intermediate states. -** Only one of the beginning or end of an invisible, intangible region is -considered an acceptable value for point; which one is determined by -examining how the invisible/intangible properties are inherited when new -text is inserted adjacent to them. (The `front-sticky' and `rear-sticky' -properties control this.) - -If the invisible/intangible would be inherited by any text inserted -before this region, then the position before it is considered -unacceptable, and point is forced to continue (if moving forwards, to -the position following the invisible/intangible text; if moving -backwards, to one position before). If the properties would be -inherited by any text inserted after, then the position after is -considered unacceptable, and point is forced to keep moving (if moving -backwards, to the position preceding the invisible/intangible text; if -moving forwards, to one position later). - -Thus, point can only go to one end of an invisible, intangible region, but -not the other one. This prevents C-f and C-b from appearing to stand still -on the screen. - -You should not set it up so that both the position before and the position -after are unacceptable. - +++ ** field-beginning and field-end now accept an additional optional argument, LIMIT. @@ -2636,7 +3260,7 @@ refontification of `bar' whenever the `e' is added/removed. called to print the entries' values. It defaults to `princ'. ** defcustom and other custom declarations now use a default group -(the last group defined in the same file) when no :group was given. +(the last prior group defined in the same file) when no :group was given. +++ ** emacsserver now runs pre-command-hook and post-command-hook when @@ -2776,15 +3400,17 @@ formerly used for that purpose is now an alias for locale-coding-system. display a prompt but don't use the minibuffer, now display the prompt using the text properties (esp. the face) of the prompt string. +** New function x-send-client-message sends a client message when +running under X. + ** New packages: *** The new package gdb-ui.el provides an enhanced graphical interface to GDB. You can interact with GDB through the GUD buffer in the usual way, but there are also further buffers which control the execution and describe the state of your program. It separates the input/output of your program from -that of GDB and displays expressions and their current values in their own -buffers. It also uses features of Emacs 21 such as the display margin for -breakpoints, and the toolbar. +that of GDB and watches expressions in the speedbar. It also uses features of +Emacs 21 such as the display margin for breakpoints, and the toolbar. Use M-x gdba to start GDB-UI. @@ -5241,7 +5867,7 @@ comparison is done with `eq'. ** The meaning of the `:weakness WEAK' argument of make-hash-table has been changed: WEAK can now have new values `key-or-value' and -`key-and-value', in addition the `nil', `key', `value', and `t'. +`key-and-value', in addition to `nil', `key', `value', and `t'. ** Function `aset' stores any multibyte character in any string without signaling "Attempt to change char length of a string". It may @@ -7090,7 +7716,8 @@ Additional image properties supported are: `:index INDEX' INDEX must be an integer >= 0. Load image number INDEX from a -multi-image GIF file. An error is signaled if INDEX is too large. +multi-image GIF file. If INDEX is too large, the image displays +as a hollow box. This could be used to implement limited support for animated GIFs. For example, the following function displays a multi-image GIF file @@ -12151,3 +12778,5 @@ Local variables: mode: outline paragraph-separate: "[ ]*$" end: + +arch-tag: 1aca9dfa-2ac4-4d14-bebf-0007cee12793 diff --git a/etc/ONEWS b/etc/ONEWS index 283e7b9cba..e92965c89d 100644 --- a/etc/ONEWS +++ b/etc/ONEWS @@ -1029,7 +1029,7 @@ your working file with the latest version from the master. *** RCS customization. There is a new variable vc-consult-headers. If it is t (the default), -VC searches for RCS headers in working files (like `$Id: ONEWS,v 1.7 2002/08/21 00:18:46 rms Exp $') and +VC searches for RCS headers in working files (like `$Id: ONEWS,v 1.8 2003/02/04 14:30:40 lektu Exp $') and determines the state of the file from them, not from the master file. This is fast and more reliable when you use branches. (The variable was already present in Emacs 19.29, but didn't get mentioned in the @@ -6482,3 +6482,4 @@ mode: outline paragraph-separate: "[ ]*$" end: +arch-tag: 944be39b-afe8-4217-9977-c745b68a7ca2 diff --git a/etc/ONEWS.1 b/etc/ONEWS.1 index 3e16b02e7b..4f75a7bc6e 100644 --- a/etc/ONEWS.1 +++ b/etc/ONEWS.1 @@ -1163,3 +1163,5 @@ Copyright (C) 1985 Richard M. Stallman Local variables: mode: text end: + +arch-tag: c006f958-d769-44c7-a9f4-e2faf070624d diff --git a/etc/ONEWS.2 b/etc/ONEWS.2 index a4500eeb31..d9f75c278e 100644 --- a/etc/ONEWS.2 +++ b/etc/ONEWS.2 @@ -1346,3 +1346,5 @@ Copyright (C) 1985 Richard M. Stallman Local variables: mode: text end: + +arch-tag: 33dc900d-9c58-473b-87c9-b6d7222323ea diff --git a/etc/ONEWS.3 b/etc/ONEWS.3 index 02d4cb9f3f..f7f36c4b1d 100644 --- a/etc/ONEWS.3 +++ b/etc/ONEWS.3 @@ -1607,3 +1607,5 @@ Copyright (C) 1988 Free Software Foundation, Inc. Local variables: mode: text end: + +arch-tag: 8fed393b-c9c5-47d1-afbb-c0e7a135094a diff --git a/etc/ONEWS.4 b/etc/ONEWS.4 index 1fcb3d1859..f3da0d6e62 100644 --- a/etc/ONEWS.4 +++ b/etc/ONEWS.4 @@ -1689,3 +1689,5 @@ Copyright (C) 1992 Free Software Foundation, Inc. Local variables: mode: text end: + +arch-tag: 373312be-99a8-46d5-bcb0-a62577ab5045 diff --git a/etc/OTHER.EMACSES b/etc/OTHER.EMACSES index a00b1190b1..9b19648460 100644 --- a/etc/OTHER.EMACSES +++ b/etc/OTHER.EMACSES @@ -1047,3 +1047,5 @@ truncation (at either margin) with "$". The command to resume a tags-search or tags-query-replace in GNU Emacs is Meta-Comma. + +arch-tag: e5a3da2f-f13d-400e-95e2-b6e1a520af90 diff --git a/etc/PROBLEMS b/etc/PROBLEMS index a8faff7143..c3e9ce2a16 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -5,6 +5,46 @@ in compiling, installing and running GNU Emacs. It's completely redundant now, as far as we know. +* Segfault on GNU/Linux using certain recent versions of the Linux kernel. + +With certain recent Linux kernels (like the one of Redhat Fedora Core +1), the new "Exec-shield" functionality is enabled by default, which +creates a different memory layout that breaks the emacs dumper. + +You can check the Exec-shield state like this: + + cat /proc/sys/kernel/exec-shield + +It returns 1 or 2 when Exec-shield is enabled, 0 otherwise. Please +read your system documentation for more details on Exec-shield and +associated commands. + +When Exec-shield is enabled, building Emacs will segfault during the +execution of this command: + +temacs --batch --load loadup [dump|bootstrap] + +To work around this problem, it is necessary to temporarily disable +Exec-shield while building Emacs, using the `setarch' command like +this: + + setarch i386 ./configure + setarch i386 make + +* Characters are displayed as empty boxes or with wrong font under X. + +This can occur when two different versions of FontConfig are used. +For example, XFree86 4.3.0 has one version and Gnome usually comes +with a newer version. Emacs compiled with --with-gtk will then use +the newer version. In most cases the problem can be temporarily +fixed by stopping the application that has the error (it can be +Emacs or any other application), removing ~/.fonts.cache-1, +and then start the application again. +If removing ~/.fonts.cache-1 and restarting doesn't help, the +application with problem must be recompiled with the same version +of FontConfig as the rest of the system uses. For KDE, it is +sufficient to recompile Qt. + * Process output truncated on Mac OS X (Carbon) when using pty's. There appears to be a problem with the implementation of pty's on the @@ -22,6 +62,18 @@ xrealloc(). Relinking the application (by deleting src/temacs and running make) will solve the problem. It appears to be caused by some problems with the unexec code and its interaction with libSystem.B. +* Emacs crashes with SIGSEGV in XtInitializeWidgetClass + +It crashes on X, but runs fine when called with option "-nw". + +This has been observed when Emacs is linked with GNU ld but without passing +the -z nocombreloc flag. Emacs normally knows to pass the -z nocombreloc +flag when needed, so if you come across a situation where the flag is +necessary but missing, please report it via M-x report-emacs-bug. + +On platforms such as Solaris, you can also work around this problem by +configuring your compiler to use the native linker instead of GNU ld. + * Characters from the mule-unicode charsets aren't displayed under X. XFree86 4 contains many fonts in iso10646-1 encoding which have @@ -592,7 +644,8 @@ The solution is to remove this line from `etc/fstab'. * Emacs binary is not in executable format, and cannot be run. This was reported to happen when Emacs is built in a directory mounted -via NFS. Usually, the file `emacs' produced in these cases is full of +via NFS, for some combinations of NFS client and NFS server. +Usually, the file `emacs' produced in these cases is full of binary null characters, and the `file' utility says: emacs: ASCII text, with no line terminators @@ -929,7 +982,7 @@ An example of such an error is: x-complement-fontset-spec: "Wrong type argument: stringp, nil" -This can be another symptom of stale *.elc files in your classpath. +This can be another symptom of stale *.elc files in your load-path. The following command will print any duplicate Lisp files that are present in load-path: @@ -3396,3 +3449,5 @@ Local variables: mode: outline paragraph-separate: "[ ]*$" end: + +arch-tag: 49fc0d95-88cb-4715-b21c-f27fb5a4764a diff --git a/etc/SERVICE b/etc/SERVICE index 3862843342..40b12ac4a0 100644 --- a/etc/SERVICE +++ b/etc/SERVICE @@ -1365,3 +1365,4 @@ A current version should be available on our web site at http://www.gnu.org. ** Please keep the entries in this file alphabetical ** +arch-tag: 1253ce32-1cbd-428a-ac36-70ed9e3999fc diff --git a/etc/TODO b/etc/TODO index ac09b9d7de..d6607a94d4 100644 --- a/etc/TODO +++ b/etc/TODO @@ -12,6 +12,12 @@ Small but important fixes needed in existing features: * Make compile.el record the markers that point to error loci on text properties in the error message lines. +* Fix the kill/yank treatment of invisible text. At the moment, + invisible text is placed in the kill-ring, so that the contents of + the ring may not correspond to the text as displayed to the user. It + ought to be possible to omit text which is invisible (due to a + text-property, overlay, or selective display) from the kill-ring. + Important features: * Provide user-friendly ways to list all available font families, @@ -19,7 +25,8 @@ Important features: font selection for Emacs 22.] * Program Enriched mode to read and save in RTF. [Is there actually a - decent single definition of RTF?] + decent single definition of RTF? Maybe see info at + http://latex2rtf.sourceforge.net/.] * Implement something better than the current Refill mode. This probably needs some primitive support. @@ -56,14 +63,6 @@ Important features: * Remove the limitation that window and frame widths and heights can be only full columns/lines. -* Move fringe to be displayed between display margins and text area. - [KFS is looking into this]. - -* Set fringe widths per-window/per-buffer. - -* Make fringe bitmaps user configurable. Maybe add ability to add - additional bitmaps to the fringe from lisp. - Other features we would like: * Have a command suggestion help system that recognizes patterns @@ -164,9 +163,6 @@ Other features we would like: * Check what hooks would help Emacspeak -- see the defadvising in W3. -* Implement some variety of (non-gtk) drag-and-drop support under X. - Using libdnd might be a good start. - * Add horizontal scroll bars. * Provide an optional feature which computes a scroll bar slider's @@ -178,8 +174,6 @@ Other features we would like: compilation of selected bytecode functions to subrs. Converting CCL programs to native code is probably the first thing to try, though. -* Add a feature to Info similar to "info --apropos SUBJECT". - * Add support for SVG (Scalable Vector Graphics) rendering to Emacs. @@ -256,10 +250,6 @@ Other features we would like: cvs-status (should be described in PCL-CVS manual); other progmodes, probably in separate manual. -* Provide a means to extract image-relative coordinates from mouse - clicks on images. (Needed for W3, at least.) Also useful for W3 - and Gnus: allow images to scroll properly. - * Convert the XPM bitmaps to PPM, replace the PBMs with them and scrap the XPMs so that the colour versions work generally. (Requires care with the colour used for the transparent regions.) @@ -270,3 +260,16 @@ Other features we would like: other variable, without changing the value of `values'. * Fix skip-chars-{for,back}ward to allow character classes. + +* (Controlled by a flag) make open and close syntax match exactly, + i.e. `(' doesn't match `]'. + +* Specify parameter ID-FORMAT in all calls to `file-attributes' and + `directory-files-and-attributes' where attributes UID or GID are used. + Whenever possible, use value 'string. + When done, change meaning of default value from 'integer to 'string. + If value 'integer is used nowhere, remove the parameter ID-FORMAT from + the definition of `file-attributes' and `directory-files-and-attributes' + and from the calls. + +;;; arch-tag: b0a3e40b-726a-457d-9999-ba848321b036 diff --git a/etc/TUTORIAL b/etc/TUTORIAL index d2aaf79e9c..ee92a6ae23 100644 --- a/etc/TUTORIAL +++ b/etc/TUTORIAL @@ -1116,3 +1116,5 @@ The conditions for copying Emacs itself are more complex, but in the same spirit. Please read the file COPYING and then do give copies of GNU Emacs to your friends. Help stamp out software obstructionism ("ownership") by using, writing, and sharing free software! + +;;; arch-tag: a0f84628-777f-4238-8865-451a73167f55 diff --git a/etc/TUTORIAL.bg b/etc/TUTORIAL.bg dissimilarity index 95% index 5741a5bea2..8bd4b2a19a 100644 --- a/etc/TUTORIAL.bg +++ b/etc/TUTORIAL.bg @@ -1,1194 +1,1197 @@ -÷ÉÅ ÇÌÅÄÁÔÅ ×ß×ÅÄÅÎÉÅÔÏ ÎÁ åÍÁËÓ. õÓÌÏ×ÉÑÔÁ ÚÁ ËÏÐÉÒÁÎÅ ÓÁ × ËÒÁÑ ÎÁ ÔÅËÓÔÁ. -Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation. - -ëÏÍÁÎÄÉÔÅ ÎÁ åÍÁËÓ ÎÁÊ-ÞÅÓÔÏ ×ËÌÀÞ×ÁÔ ËÌÁ×ÉÛÉÔÅ CONTROL (ÐÏÎÑËÏÇÁ -ÏÔÂÅÌÑÚ×ÁÎ Ó CTRL ÉÌÉ CTL) É META (ÐÏÎÑËÏÇÁ ÏÔÂÅÌÑÚ×ÁÎ Ó EDIT ÉÌÉ -ALT). ÷ÍÅÓÔÏ ÄÁ ÓÅ ÉÚÐÉÓ×ÁÔ Ó ÐßÌÎÏ ÉÍÅ ×ÓÅËÉ ÐßÔ, ÎÉÅ ÝÅ ÉÚÐÏÌÚ×ÁÍÅ -ÓÌÅÄÎÉÔÅ ÓßËÒÁÝÅÎÉÑ: - - C-<ÚÎÁË> ÏÚÎÁÞÁ×Á ÚÁÄßÒÖÁÎÅ ÎÁ ËÌÁ×ÉÛÁ CONTROL ÄÏËÁÔÏ ÓÅ - ÎÁÔÉÓËÁ ÚÎÁËÁ <ÚÎÁË>. ôÁËÁ C-f ÝÅ ÏÚÎÁÞÁ×Á: ÄÏËÁÔÏ - ÓÅ ÚÁÄßÒÖÁ ÎÁÔÉÓÎÁÔ ËÌÁ×ÉÛÁ CONTROL ÓÅ ÎÁÔÉÓËÁ f. - M-<ÚÎÁË> ÏÚÎÁÞÁ×Á ÚÁÄßÒÖÁÎÅ ÎÁÔÉÓÎÁÔ ÎÁ ËÌÁ×ÉÛÁ META (ÉÌÉ EDIT - ÉÌÉ ALT) ÄÏËÁÔÏ ÓÅ ÎÁÔÉÓËÁ <ÚÎÁË>. áËÏ ÎÑÍÁ ËÌÁ×ÉÛ - META, EDIT ÉÌÉ ALT, ×ÍÅÓÔÏ ÎÅÇÏ ÎÁÔÉÓÎÅÔÅ É ÏÔÐÕÓÎÅÔÅ - ËÌÁ×ÉÛÁ ESC É ÓÌÅÄ ÔÏ×Á ×ß×ÅÄÅÔÅ <ÚÎÁË>. îÉÅ - ÚÁÐÉÓ×ÁÍÅ ÚÁ ÄÁ ÏÔÂÅÌÅÖÉÍ ËÌÁ×ÉÛÁ ESC. - -÷ÁÖÎÁ ÂÅÌÅÖËÁ: × ËÒÁÑ ÎÁ åÍÁËÓ ÓÅÓÉÑÔÁ ×ß×ÅÄÅÔÅ Ä×ÁÔÁ ÚÎÁËÁ C-x C-c. -úÎÁÃÉÔÅ ">>" ÏÔÌÑ×Ï ×É ÄÁ×ÁÔ ÕËÁÚÁÎÉÅ ÄÁ ÉÚÐßÌÎÉÔÅ ËÏÍÁÎÄÁ. îÁÐÒÉÍÅÒ: -<> ->> óÅÇÁ ×ß×ÅÄÅÔÅ C-v (ðÏËÁÖÉ ÓÌÅÄ×ÁÝÉÑ ÅËÒÁÎ) ÚÁ ÄÁ ÓÅ ÐÒÉÄ×ÉÖÉÔÅ ËßÍ -ÓÌÅÄ×ÁÝÉÑ ÅËÒÁÎ. - (îÁÐÒÁ×ÅÔÅ ÇÏ ÓÅÇÁ, ÚÁÄÒßÖÔÅ CONTROL ÄÏËÁÔÏ ÎÁÔÉÓËÁÔÅ v). - ïÔÓÅÇÁ ÎÁÔÁÔßË ×ÉÅ ÝÅ ÐÒÁ×ÉÔÅ ÔÏ×Á ×ÉÎÁÇÉ ËÏÇÁÔÏ ÐÒÏÞÅÔÅÔÅ - ÅËÒÁÎÁ. - -úÁÂÅÌÅÖÅÔÅ, ÞÅ ÉÍÁ ÐÒÉÐÏËÒÉ×ÁÎÅ ÎÁ Ä×Á ÒÅÄÁ, ËÏÇÁÔÏ ÓÅ ÐÒÉÄ×ÉÖ×ÁÔÅ ÏÔ -ÅËÒÁÎ × ÅËÒÁÎ; ÔÏ×Á ÏÓÉÇÕÒÑ×Á ÎÑËÁË×Á ÐÒÉÅÍÓÔ×ÅÎÏÓÔ, ÔÁËÁ ÞÅ ÄÁ ÍÏÖÅÔÅ -ÐÏ-ÌÅÓÎÏ ÄÁ ÐÒÏÄßÌÖÉÔÅ Ó ÞÅÔÅÎÅÔÏ ÎÁ ÔÅËÓÔÁ. - -ðßÒ×ÏÔÏ ÎÅÝÏ, ËÏÅÔÏ ÔÒÑÂ×Á ÄÁ ÚÎÁÅÔÅ, Å ËÁË ÄÁ ÓÅ ÐÒÉÄ×ÉÖ×ÁÔÅ ÏÔ ÅÄÎÏ -ÍÑÓÔÏ ÎÁ ÔÅËÓÔÁ ËßÍ ÄÒÕÇÏ. ÷ÉÅ ×ÅÞÅ ÚÎÁÅÔÅ ËÁË ÄÁ ÓÅ ÐÒÉÄ×ÉÖ×ÁÔÅ -ÅËÒÁÎ ÎÁÐÒÅÄ, Ó C-v. úÁ ÄÁ ÓÅ ÐÒÉÄ×ÉÖÉÔÅ ÅËÒÁÎ ÎÁÚÁÄ, ×ß×ÅÄÅÔÅ M-v -(ÚÁÄÒßÖÔÅ ËÌÁ×ÉÛÁ META É ÎÁÔÉÓÎÅÔÅ v, ÉÌÉ ×ß×ÅÄÅÔÅ v ÁËÏ ÎÑÍÁÔÅ -ËÌÁ×ÉÛ META, EDIT ÉÌÉ ALT). - ->> ïÐÉÔÁÊÔÅ ÓÅ ÄÁ ×ß×ÅÄÅÔÅ M-v É ÓÌÅÄ ÔÏ×Á C-v ÎÑËÏÌËÏ ÐßÔÉ. - - -* ïâïâýåîéå ------------ - -óÌÅÄ×ÁÝÉÔÅ ËÏÍÁÎÄÉ ÓÁ ÐÏÌÅÚÎÉ ÐÒÉ ÐßÌÎÏÅËÒÁÎÎÏ ÒÁÚÇÌÅÖÄÁÎÅ: - - C-v ðÒÉÄ×ÉÖ×ÁÎÅ ÎÁÐÒÅÄ Ó ÅÄÉÎ ÅËÒÁÎ - M-v ðÒÉÄ×ÉÖ×ÁÎÅ ÎÁÚÁÄ Ó ÅÄÉÎ ÅËÒÁÎ - C-l éÚÞÉÓÔ×ÁÎÅ ÎÁ ÅËÒÁÎÁ É ÐÒÅÞÅÒÔÁ×ÁÎÅ ÎÁ ÃÅÌÉÑ ÔÅËÓÔ, - ÐÒÅÍÅÓÔ×ÁÊËÉ ÔÅËÓÔÁ ÏËÏÌÏ ËÕÒÓÏÒÁ - × ÓÒÅÄÁÔÁ ÎÁ ÅËÒÁÎÁ. - (ôÏ×Á Å CONTROL-L, ÎÅ CONTROL-1.) - ->> îÁÍÅÒÅÔÅ ËÕÒÓÏÒÁ É ÓÉ ÚÁÐÏÍÎÅÔÅ ËÁËß× Å ÔÅËÓÔßÔ ÏËÏÌÏ ÎÅÇÏ. - óÌÅÄ ÔÏ×Á ×ß×ÅÄÅÔÅ C-l. - îÁÍÅÒÅÔÅ ÐÁË ËÕÒÓÏÒÁ É ×ÉÖÔÅ, ÞÅ ÓßÝÉÑÔ ÔÅËÓÔ Å ÐÁË ÏËÏÌÏ ËÕÒÓÏÒÁ. - -íÏÖÅ ÓßÝÏ ÄÁ ÉÚÐÏÌÚ×ÁÔÅ ËÌÁ×ÉÛÉÔÅ PageUp É PageDn ÚÁ ÐÒÉÄ×ÉÖ×ÁÎÅ ÐÏ -ÅËÒÁÎÉ ÁËÏ ×ÁÛÉÑÔ ÔÅÒÍÉÎÁÌ ÇÉ ÐÒÉÔÅÖÁ×Á, ÎÏ ×ÉÅ ÍÏÖÅÔÅ ÄÁ ÒÅÄÁËÔÉÒÁÔÅ -ÐÏ-ÅÆÅËÔÉ×ÎÏ ÁËÏ ÉÚÐÏÌÚ×ÁÔÅ C-v É M-v. - - -* ïóîï÷é îá õðòá÷ìåîéåôï îá ëõòóïòá ------------------------------------ - -ðÒÉÄ×ÉÖ×ÁÎÅÔÏ ÏÔ ÅËÒÁÎ ÎÁ ÅËÒÁÎ Å ÐÏÌÅÚÎÏ, ÎÏ ËÁË ÄÁ ÓÅ ÐÒÉÄ×ÉÖÉÔÅ ÄÏ -ÏÐÒÅÄÅÌÅÎÏ ÍÑÓÔÏ ×ßÔÒÅ × ÔÅËÓÔÁ ÎÁ ÅËÒÁÎÁ? - -éÍÁ ÎÑËÏÌËÏ ÎÁÞÉÎÁ ÄÁ ÇÏ ÎÁÐÒÁ×ÉÔÅ. íÏÖÅ ÄÁ ÉÚÐÏÌÚ×ÁÔÅ ËÌÁ×ÉÛÉÔÅ -ÓÔÒÅÌËÉ, ÎÏ Å ÐÏ-ÅÆÅËÔÉ×ÎÏ ÄÁ ÄßÒÖÉÔÅ ÒßÃÅÔÅ ÓÉ × ÓÔÁÎÄÁÒÔÎÏ ÐÏÌÏÖÅÎÉÅ -É ÄÁ ÉÚÐÏÌÚ×ÁÔÅ ËÏÍÁÎÄÉÔÅ C-p, C-b, C-f É C-n. ôÅÚÉ ÚÎÁÃÉ ÓÁ -ÅË×É×ÁÌÅÎÔÎÉ ÎÁ ÞÅÔÉÒÉÔÅ ËÌÁ×ÉÛÉ ÓÔÒÅÌËÉ, ÅÔÏ ÔÁËÁ: - - ðÒÅÄÉÛÅÎ ÒÅÄ (Previous), C-p - : - : - îÁÚÁÄ, C-b .... ôÅËÕÝÁ ÐÏÚÉÃÉÑ ÎÁ ËÕÒÓÏÒÁ .... îÁÐÒÅÄ, C-f - (Backward) : (Forward) - : - óÌÅÄ×ÁÝ ÒÅÄ (Next), C-n - ->> ðÒÉÄ×ÉÖÅÔÅ ËÕÒÓÏÒÁ ÄÏ ÒÅÄÁ × ÓÒÅÄÁÔÁ ÎÁ ÔÁÚÉ ÄÉÁÇÒÁÍÁ ÉÚÐÏÌÚ×ÁÊËÉ - C-n É C-p. óÌÅÄ ÔÏ×Á ÎÁÔÉÓÎÅÔÅ C-l ÚÁ ÄÁ ×ÉÄÉÔÅ ÃÑÌÁÔÁ ÄÉÁÇÒÁÍÁ - ÃÅÎÔÒÉÒÁÎÁ ÎÁ ÅËÒÁÎÁ. - -ýÅ ÎÁÍÅÒÉÔÅ, ÞÅ ÚÁÐÏÍÎÑÎÅÔÏ ÎÁ ÔÅÚÉ ÂÕË×É ÐÏ ÄÕÍÉÔÅ ÎÁ ÁÎÇÌÉÊÓËÉ ÎÁ -ÄÅÊÓÔ×ÉÑÔÁ, ËÏÉÔÏ ÉÚ×ßÒÛ×ÁÔ, Å ÌÅÓÎÏ: P ÚÁ Previous (ÐÒÅÄÉÛÅÎ), N ÚÁ -Next (ÓÌÅÄ×ÁÝ), B ÚÁ Backward (ÎÁÚÁÄ) É F ÚÁ Forward (ÎÁÐÒÅÄ). ÷ÉÅ ÝÅ -ÉÚÐÏÌÚ×ÁÔÅ ÔÅÚÉ ÏÓÎÏ×ÎÉ ËÏÍÁÎÄÉ ÚÁ ÐÒÉÄ×ÉÖ×ÁÎÅ ÎÁ ËÕÒÓÏÒÁ ÐÒÅÚ ÃÑÌÏÔÏ -×ÒÅÍÅ. - ->> îÁÐÒÁ×ÅÔÅ ÎÑËÏÌËÏ C-n ÚÁ ÄÁ ÄÏ×ÅÄÅÔÅ ËÕÒÓÏÒÁ ÄÏ ÔÏÚÉ ÒÅÄ. - ->> ðÒÉÄ×ÉÖÅÔÅ ÓÅ × ÒÅÄÁ Ó ÎÑËÏÌËÏ C-f É ÓÌÅÄ ÔÏ×Á Ó ÎÑËÏÌËÏ C-p. - ÷ÉÖÔÅ ËÁË×Ï ÐÒÁ×É C-p, ËÏÇÁÔÏ ËÕÒÓÏÒßÔ Å × ÓÒÅÄÁÔÁ ÎÁ ÒÅÄÁ. - -÷ÓÅËÉ ÒÅÄ ÏÔ ÔÅËÓÔ ÚÁ×ßÒÛ×Á ÓßÓ ÚÎÁË ÚÁ ÎÏ× ÒÅÄ, ËÏÊÔÏ ÓÌÕÖÉ ÚÁ -ÏÔÄÅÌÑÎÅÔÏ ÎÁ ÒÅÄÁ ÏÔ ÓÌÅÄ×ÁÝÉÑ ÒÅÄ. ðÏÓÌÅÄÎÉÑÔ ÒÅÄ ×ß× ×ÁÛÉÑ ÆÁÊÌ -ÔÒÑÂ×Á ÄÁ ÉÍÁ ÚÎÁË ÚÁ ÎÏ× ÒÅÄ × ËÒÁÑ (ÎÏ åÍÁËÓ ÎÅ ÉÚÉÓË×Á ÔÁËß×, -ËÏÇÁÔÏ ÐÒÏÞÉÔÁ ÆÁÊÌÁ). - ->> ïÐÉÔÁÊÔÅ C-b × ÎÁÞÁÌÏÔÏ ÎÁ ÒÅÄ. ôÏ×Á ÔÒÑÂ×Á ÄÁ ×É ÐÒÉÄ×ÉÖÉ × ËÒÁÑ - ÎÁ ÐÒÅÄÉÛÎÉÑ ÒÅÄ. ôÏ×Á Å ÔÁËÁ, ÚÁÝÏÔÏ ËÕÒÓÏÒßÔ ÓÅ ÐÒÉÄ×ÉÖ×Á ËßÍ - ÚÎÁËÁ ÚÁ ÎÏ× ÒÅÄ ÎÁ ÐÒÅÄÉÛÎÉÑ ÒÅÄ. - -C-f ÍÏÖÅ ÄÁ ÐÒÉÄ×ÉÖ×Á ÐÒÅÚ ÚÎÁË ÚÁ ÎÏ× ÒÅÄ ÔÏÞÎÏ ËÁËÔÏ C-b. - ->> îÁÐÒÁ×ÅÔÅ ÎÑËÏÌËÏ C-b ÐÒÉÄ×ÉÖ×ÁÎÉÑ, ÔÁËÁ ÞÅ ÄÁ ÄÏÂÉÅÔÅ ÕÓÅÝÁÎÅ ËßÄÅ - ÓÅ ÎÁÍÉÒÁ ËÕÒÓÏÒÁ. óÌÅÄ ÔÏ×Á ÎÑËÏÌËÏ C-f ÚÁ ÄÁ ÓÅ ×ßÒÎÅÔÅ × ËÒÁÑ - ÎÁ ÒÅÄÁ. óÌÅÄ ÔÏ×Á ÏÝÅ ÎÑËÏÌËÏ C-f ÚÁ ÄÁ ÓÅ ÐÒÉÄ×ÉÖÉÔÅ ÄÏ - ÓÌÅÄ×ÁÝÉÑ ÒÅÄ. - -ëÏÇÁÔÏ ÓÅ ÐÒÉÄ×ÉÖ×ÁÔÅ ÓÌÅÄ ÇÏÒÎÉÑ ÉÌÉ ÄÏÌÎÉÑ ËÒÁÊ ÎÁ ÅËÒÁÎÁ, ÔÅËÓÔßÔ -ÏÔ×ßÄ ËÒÁÑ ÓÅ ÉÚÍÅÓÔ×Á ËßÍ ÅËÒÁÎÁ. ôÏ×Á ÓÅ ÎÁÒÉÞÁ "ÓËÒÏÌÉÒÁÎÅ". ôÏ -ÐÏÚ×ÏÌÑ×Á ÎÁ åÍÁËÓ ÄÁ ÐÒÉÄ×ÉÖ×Á ËÕÒÓÏÒÁ ËßÍ ÚÁÄÁÄÅÎÏÔÏ ÍÑÓÔÏ × ÔÅËÓÔÁ -ÂÅÚ ÄÁ ÇÏ ÉÚËÁÒ×Á ÉÚ×ßÎ ÅËÒÁÎÁ. - ->> ïÐÉÔÁÊÔÅ ÓÅ ÄÁ ÐÒÉÄ×ÉÖÉÔÅ ËÕÒÓÏÒÁ ÓÌÅÄ ÄÏÌÎÉÑ ËÒÁÊ ÎÁ ÅËÒÁÎÁ Ó C-n - É ×ÉÖÔÅ ËÁË×Ï ÓÅ ÓÌÕÞ×Á. - -áËÏ ÐÒÉÄ×ÉÖ×ÁÎÅÔÏ ÐÏ ÚÎÁÃÉ Å Ô×ßÒÄÅ ÂÁ×ÎÏ, ÍÏÖÅ ÄÁ ÐÒÏÂ×ÁÔÅ -ÐÒÉÄ×ÉÖ×ÁÎÅ ÐÏ ÄÕÍÉ. M-f (META-f) ÐÒÉÄ×ÉÖ×Á ËÕÒÓÏÒÁ ÄÕÍÁ ÎÁÐÒÅÄ, Á -M-b ÐÒÉÄ×ÉÖ×Á ÄÕÍÁ ÎÁÚÁÄ. - ->> ÷ß×ÅÄÅÔÅ ÎÑËÏÌËÏ M-f É M-b. - -ëÏÇÁÔÏ ÓÔÅ × ÓÒÅÄÁÔÁ ÎÁ ÄÕÍÁ, M-f ÐÒÉÄ×ÉÖ×Á × ËÒÁÑ ÎÁ ÄÕÍÁÔÁ. ëÏÇÁÔÏ -ÓÔÅ × ÐÒÁÚÎÏ ÍÑÓÔÏ ÍÅÖÄÕ ÄÕÍÉ, M-f ÐÒÉÄ×ÉÖ×Á × ËÒÁÑ ÎÁ ÓÌÅÄ×ÁÝÁÔÁ -ÄÕÍÁ. M-b ÒÁÂÏÔÉ ÐÏ ÐÏÄÏÂÅÎ ÎÁÞÉÎ × ÐÒÏÔÉ×ÏÐÏÌÏÖÎÁÔÁ ÐÏÓÏËÁ. - ->> ÷ß×ÅÄÅÔÅ M-f É M-b ÎÑËÏÌËÏ ÐßÔÉ, ÒÁÚÍÅÓÅÎÉ Ó C-f É C-b, ÔÁËÁ ÞÅ ÄÁ - ÍÏÖÅÔÅ ÄÁ ÎÁÂÌÀÄÁ×ÁÔÅ ÄÅÊÓÔ×ÉÅÔÏ ÎÁ M-f É M-b × ÒÁÚÌÉÞÎÉ ÍÅÓÔÁ - ×ßÔÒÅ É ÍÅÖÄÕ ÄÕÍÉÔÅ. - -úÁÂÅÌÅÖÅÔÅ ÐÒÉÌÉËÁÔÁ ÍÅÖÄÕ C-f É C-b ÏÔ ÅÄÎÁ ÓÔÒÁÎÁ, É M-f É M-b ÏÔ -ÄÒÕÇÁ. íÎÏÇÏ ÞÅÓÔÏ Meta-ÚÎÁÃÉÔÅ ÓÁ ÉÚÐÏÌÚ×ÁÎÉ ÚÁ ÄÅÊÓÔ×ÉÑ ×ßÒÈÕ -ÅÄÉÎÉÃÉ ÄÅÆÉÎÉÒÁÎÉ ÏÔ ÅÚÉËÁ (ÄÕÍÉ, ÉÚÒÅÞÅÎÉÑ, ÁÂÚÁÃÉ), ÄÏËÁÔÏ -Control-ÚÎÁÃÉÔÅ ÄÅÊÓÔ×ÁÔ ×ßÒÈÕ ÏÓÎÏ×ÎÉ ÅÄÉÎÉÃÉ, ËÏÉÔÏ ÓÁ ÎÅÚÁ×ÉÓÉÍÉ ÏÔ -ÔÏ×Á ËÁË×Ï ÒÅÄÁËÔÉÒÁÔÅ (ÚÎÁÃÉ, ÒÅÄÏ×Å É ÄÒÕÇÉ). - -ôÁÚÉ ÐÒÉÌÉËÁ ÓÅ ÐÒÉÌÁÇÁ ×ßÒÈÕ ÒÅÄÏ×Å É ÉÚÒÅÞÅÎÉÑ: C-a É C-e ÐÒÉÄ×ÉÖ×ÁÔ -ÄÏ ÎÁÞÁÌÏÔÏ ÉÌÉ ËÒÁÑ ÎÁ ÒÅÄ, Á M-a É M-e ÐÒÉÄ×ÉÖ×ÁÔ ÄÏ ÎÁÞÁÌÏÔÏ É ËÒÁÑ -ÎÁ ÉÚÒÅÞÅÎÉÅ. - ->> ïÐÉÔÁÊÔÅ ÎÑËÏÌËÏ C-a, Á ÓÌÅÄ ÔÏ×Á ÎÑËÏÌËÏ C-e. - ïÐÉÔÁÊÔÅ ÎÑËÏÌËÏ M-a, Á ÓÌÅÄ ÔÏ×Á ÎÑËÏÌËÏ M-e. - -÷ÉÖÔÅ ËÁË ÐÏ×ÔÁÒÑÎÅÔÏ ÎÁ C-a ÎÅ ÐÒÁ×É ÎÉÝÏ, ÄÏËÁÔÏ ÐÏ×ÔÁÒÑÎÅÔÏ ÎÁ M-a -ÐÒÏÄßÌÖÁ×Á ÐÒÉÄ×ÉÖ×ÁÎÅÔÏ Ó ÏÝÅ ÅÄÎÏ ÉÚÒÅÞÅÎÉÅ. ÷ßÐÒÅËÉ ÞÅ ÔÅÚÉ -ËÌÁ×ÉÛÎÉ ËÏÍÂÉÎÁÃÉÉ ÎÅ ÓÁ ÔÏÞÎÏ ÁÎÁÌÏÇÉÞÎÉ, ×ÓÑËÁ ÅÄÎÁ ÏÔ ÔÑÈ ÉÚÇÌÅÖÄÁ -ÅÓÔÅÓÔ×ÅÎÁ. - -ðÏÌÏÖÅÎÉÅÔÏ ÎÁ ËÕÒÓÏÒÁ × ÔÅËÓÔÁ ÓÅ ÎÁÒÉÞÁ ÓßÝÏ "ÔÏÞËÁ". -ðÅÒÅÆÒÁÚÉÒÁÎÏ, ËÕÒÓÏÒßÔ ÐÏËÁÚ×Á ÎÁ ÅËÒÁÎÁ ËßÄÅ Å ÒÁÚÐÏÌÏÖÅÎÁ ÔÏÞËÁÔÁ × -ÔÅËÓÔÁ. - -åÔÏ ÏÂÏÂÝÅÎÉÅ ÎÁ ÐÒÏÓÔÉÔÅ ÄÅÊÓÔ×ÉÑ Ä×ÉÖÅÝÉ ËÕÒÓÏÒÁ, ×ËÌÀÞÉÔÅÌÎÏ -ÐÒÉÄ×ÉÖ×ÁÝÉÔÅ ÐÏ ÄÕÍÁ É ÉÚÒÅÞÅÎÉÅ: - - C-f ðÒÉÄ×ÉÖ×Á ÎÁÐÒÅÄ Ó ÅÄÉÎ ÚÎÁË - C-b ðÒÉÄ×ÉÖ×Á ÎÁÚÁÄ Ó ÅÄÉÎ ÚÎÁË - - M-f ðÒÉÄ×ÉÖ×Á ÎÁÐÒÅÄ Ó ÅÄÎÁ ÄÕÍÁ - M-b ÐÒÉÄ×ÉÖ×Á ÎÁÚÁÄ Ó ÅÄÎÁ ÄÕÍÁ - - C-n ðÒÉÄ×ÉÖ×Á ÄÏ ÓÌÅÄ×ÁÝÉÑ ÒÅÄ - C-p ðÒÉÄ×ÉÖ×Á ÄÏ ÐÒÅÄÉÛÎÉÑ ÒÅÄ - - C-a ðÒÉÄ×ÉÖ×Á ÄÏ ÎÁÞÁÌÏÔÏ ÎÁ ÒÅÄ - C-e ðÒÉÄ×ÉÖ×Á ÄÏ ËÒÁÑ ÎÁ ÒÅÄ - - M-a ðÒÉÄ×ÉÖ×Á ÄÏ ÎÁÞÁÌÏÔÏ ÎÁ ÉÚÒÅÞÅÎÉÅ - M-e ðÒÉÄ×ÉÖ×Á ÄÏ ËÒÁÑ ÎÁ ÉÚÒÅÞÅÎÉÅ - ->> óÅÇÁ ÏÐÉÔÁÊÔÅ ×ÓÉÞËÉ ÔÅÚÉ ËÏÍÁÎÄÉ ÎÑËÏÌËÏ ÐßÔÉ ÚÁ ÐÒÁËÔÉËÁ. ôÅÚÉ - ÓÁ ÎÁÊ-ÞÅÓÔÏ ÉÚÐÏÌÚ×ÁÎÉÔÅ ËÏÍÁÎÄÉ. - -ä×Å ÄÒÕÇÉ ×ÁÖÎÉ ËÏÍÁÎÄÉ ÚÁ Ä×ÉÖÅÎÉÅ ÎÁ ËÕÒÓÏÒÁ ÓÁ M-< (Meta ÐÏ-ÍÁÌËÏ), -ËÏÑÔÏ ÐÒÉÄ×ÉÖ×Á ÄÏ ÎÁÞÁÌÏÔÏ ÎÁ ÃÅÌÉÑ ÔÅËÓÔ, É M-> (Meta ÐÏ-ÇÏÌÑÍÏ), -ËÏÑÔÏ ÐÒÅÍÅÓÔ×Á ÄÏ ËÒÁÑ ÎÁ ÃÅÌÉÑ ÔÅËÓÔ. - -ðÒÉ ÐÏ×ÅÞÅÔÏ ÔÅÒÍÉÎÁÌÉ, ÚÎÁËßÔ "<" Å ÏÔÂÅÌÑÚÁÎ ÎÁÄ ÚÁÐÅÔÁÑÔÁ, ÔÁËÁ ÞÅ -ÔÒÑÂ×Á ÄÁ ÉÚÐÏÌÚ×ÁÔÅ ËÌÁ×ÉÛÁ Shift ÚÁ ÄÁ ÇÏ ÎÁÐÉÛÅÔÅ. îÁ ÔÅÚÉ -ÔÅÒÍÉÎÁÌÉ ÔÒÑÂ×Á ÄÁ ÉÚÐÏÌÚ×ÁÔÅ Shift ÚÁ ÄÁ ×ß×ÅÄÅÔÅ É M-<; ÂÅÚ ËÌÁ×ÉÛÁ -Shift ÂÉÈÔÅ ×ß×ÅÌÉ M-ÚÁÐÅÔÁÑ. - ->> ïÐÉÔÁÊÔÅ M-< ÓÅÇÁ, ÚÁ ÄÁ ÓÅ ÐÒÉÄ×ÉÖÉÔÅ ÄÏ ÎÁÞÁÌÏÔÏ ÎÁ ×ß×ÅÄÅÎÉÅÔÏ. - óÌÅÄ ÔÏ×Á ÉÚÐÏÌÚ×ÁÊÔÅ C-v ËÏÌËÏÔÏ Å ÎÕÖÎÏ ÐßÔÉ, ÚÁ ÄÁ ÓÅ ÐÒÉÄ×ÉÖÉÔÅ - ÄÏ ÔÕË. - ->> ïÐÉÔÁÊÔÅ M-> ÓÅÇÁ, ÚÁ ÄÁ ÓÅ ÐÒÉÄ×ÉÖÉÔÅ ÄÏ ËÒÁÑ ÎÁ ×ß×ÅÄÅÎÉÅÔÏ. - óÌÅÄ ÔÏ×Á ÉÚÐÏÌÚ×ÁÊÔÅ M-v ËÏÌËÏÔÏ Å ÎÕÖÎÏ ÐßÔÉ, ÚÁ ÄÁ ÓÅ ÐÒÉÄ×ÉÖÉÔÅ - ÄÏ ÔÕË. - -÷ÉÅ ÍÏÖÅÔÅ ÓßÝÏ ÄÁ ÓÅ ÐÒÉÄ×ÉÖ×ÁÔÅ Ó ËÌÁ×ÉÛÉÔÅ-ÓÔÒÅÌËÉ, ÁËÏ ×ÁÛÉÑÔ -ÔÅÒÍÉÎÁÌ ÉÍÁ ÔÁËÉ×Á. îÉÅ ÐÒÅÐÏÒßÞ×ÁÍÅ ÄÁ ÎÁÕÞÉÔÅ C-b, C-f, C-n É C-p -ÐÏ ÔÒÉ ÐÒÉÞÉÎÉ. ðßÒ×Ï, ÔÅ ÒÁÂÏÔÑÔ ÎÁ ×ÓÉÞËÉ ×ÉÄÏ×Å ÔÅÒÍÉÎÁÌÉ. ÷ÔÏÒÏ, -×ÅÄÎßÖ ÓÌÅÄ ËÁÔÏ ÄÏÂÉÅÔÅ ÐÒÁËÔÉËÁ × ÉÚÐÏÌÚ×ÁÎÅÔÏ ÎÁ åÍÁËÓ, ÝÅ -ÏÔËÒÉÅÔÅ, ÞÅ ×ß×ÅÖÄÁÎÅÔÏ ÎÁ ÔÅÚÉ Control-ÚÎÁÃÉ Å ÐÏ-ÂßÒÚÏ ÏÔ -×ß×ÅÖÄÁÎÅÔÏ ÎÁ ËÌÁ×ÉÛÉÔÅ ÓÔÒÅÌËÉ, ÚÁÝÏÔÏ ÎÅ ÔÒÑÂ×Á ÄÁ ÐÒÅÍÅÓÔ×ÁÔÅ -ÒßËÁÔÁ ÓÉ ÄÁÌÅÞ ÏÔ ÏÂÌÁÓÔÔÁ ÎÁ ËÌÁ×ÉÛÉÔÅ Ó ÂÕË×É. ôÒÅÔÏ, ×ÅÄÎßÖ ÓÌÅÄ -ËÁÔÏ ÓÉ ÏÆÏÒÍÉÔÅ ÎÁ×ÉË ÄÁ ÉÚÐÏÌÚ×ÁÔÅ ÔÅÚÉ ËÏÍÁÎÄÉ Ó Control ÚÎÁÃÉ, ×ÉÅ -ÍÏÖÅÔÅ ÓßÝÏ ÔÁËÁ ÌÅÓÎÏ ÄÁ ÎÁÕÞÉÔÅ ÐÏ-ÎÁÐÒÅÄÎÁÌÉÔÅ ËÏÍÁÎÄÉ ÚÁ Ä×ÉÖÅÎÉÅ -ÎÁ ËÕÒÓÏÒÁ. - -ðÏ×ÅÞÅÔÏ åÍÁËÓ ËÏÍÁÎÄÉ ÐÒÉÅÍÁÔ ÞÉÓÌÏ× ÁÒÇÕÍÅÎÔ; ÚÁ ÐÏ×ÅÞÅÔÏ ÏÔ ÔÑÈ ÔÏÊ -ÓÌÕÖÉ ËÁÔÏ ÂÒÏÑÞ ÎÁ ÐÏ×ÔÏÒÅÎÉÑ. îÁÞÉÎßÔ, ÐÏ ËÏÊÔÏ ÄÁ×ÁÔÅ ÞÉÓÌÏ× -ÂÒÏÑÞ, Å Ó ×ß×ÅÖÄÁÎÅ ÎÁ C-u, ÐÏÓÌÅÄ×ÁÎÏ ÏÔ ×ß×ÅÖÄÁÎÅ ÎÁ ÃÉÆÒÉÔÅ, É -×ÓÉÞËÏ ÔÏ×Á ÐÒÅÄÉ ×ß×ÅÖÄÁÎÅ ÎÁ ÓÁÍÁÔÁ ËÏÍÁÎÄÁ. áËÏ ÉÍÁÔÅ ËÌÁ×ÉÛ META -(ÉÌÉ EDIT ÉÌÉ ALT), ÉÍÁ ÄÒÕÇ, ÁÌÔÅÒÎÁÔÉ×ÅÎ ÎÁÞÉÎ ÄÁ ×ß×ÅÄÅÔÅ ÞÉÓÌÏ× -ÁÒÇÕÍÅÎÔ: ×ß×ÅÄÅÔÅ ÃÉÆÒÉÔÅ ÄÏËÁÔÏ ÚÁÄßÒÖÁÔÅ ËÌÁ×ÉÛÁ META. îÉÅ -ÐÒÅÐÏÒßÞ×ÁÍÅ ÄÁ ÎÁÕÞÉÔÅ ÎÁÞÉÎÁ Ó C-u, ÚÁÝÏÔÏ ÔÏÊ ÒÁÂÏÔÉ ÎÁ ËÏÊÔÏ É ÄÁ -Å ÔÅÒÍÉÎÁÌ. þÉÓÌÏ×ÉÑÔ ÁÒÇÕÍÅÎÔ ÓÅ ÎÁÒÉÞÁ ÓßÝÏ "ÐÒÅÆÉËÓÅÎ ÁÒÇÕÍÅÎÔ", -ÚÁÝÏÔÏ ÇÏ ×ß×ÅÖÄÁÔÅ ÐÒÅÄÉ ËÏÍÁÎÄÁÔÁ, ÚÁ ËÏÑÔÏ Å ÐÒÅÄÎÁÚÎÁÞÅÎ. - -îÁÐÒÉÍÅÒ, C-u 8 C-f ÐÒÉÄ×ÉÖ×Á ÏÓÅÍ ÚÎÁËÁ ÎÁÐÒÅÄ. - ->> ïÐÉÔÁÊÔÅ ÉÚÐÏÌÚ×ÁÎÅÔÏ ÎÁ C-n ÉÌÉ C-p Ó ÞÉÓÌÏ× ÁÒÇÕÍÅÎÔ, ÚÁ ÄÁ - ÐÒÉÄ×ÉÖÉÔÅ ËÕÒÓÏÒÁ ÄÏ ÒÅÄ ÂÌÉÚßË ÄÏ ÔÏÚÉ ÓÁÍÏ Ó ÅÄÎÁ ËÏÍÁÎÄÁ. - -ðÏ×ÅÞÅÔÏ ËÏÍÁÎÄÉ ÉÚÐÏÌÚ×ÁÔ ÞÉÓÌÏ×ÉÑ ÁÒÇÕÍÅÎÔ ËÁÔÏ ÂÒÏÑÞ ÎÁ -ÐÏ×ÔÏÒÅÎÉÑÔÁ, ÎÏ ÎÑËÏÉ ÇÏ ÉÚÐÏÌÚ×ÁÔ ÚÁ ÄÒÕÇÉ ÃÅÌÉ. îÑËÏÌËÏ ËÏÍÁÎÄÉ -(ÎÏ ÎÉËÏÑ ÏÔ ÔÅÚÉ, ËÏÉÔÏ ÓÔÅ ÎÁÕÞÉÌÉ ÄÏÓÅÇÁ) ÇÏ ÉÚÐÏÌÚ×ÁÔ ËÁÔÏ ÆÌÁÇ -- -ÐÒÉÓßÓÔ×ÉÅÔÏ ÎÁ ÞÉÓÌÏ× ÁÒÇÕÍÅÎÔ, ÎÅÚÁ×ÉÓÉÍÏ ÏÔ ÓÔÏÊÎÏÓÔÁ ÍÕ, ËÁÒÁ -ËÏÍÁÎÄÁÔÁ ÄÁ ×ßÒÛÉ ÎÅÝÏ ÒÁÚÌÉÞÎÏ. - -C-v É M-v ÓÁ ÄÒÕÇ ×ÉÄ ÉÚËÌÀÞÅÎÉÅ. ëÏÇÁÔÏ ÉÍ Å ÄÁÄÅÎ ÁÒÇÕÍÅÎÔ, ÔÅ -ÓËÒÏÌÉÒÁÔ ÅËÒÁÎÁ ÎÁÇÏÒÅ ÉÌÉ ÎÁÄÏÌÕ ÓßÓ ÚÁÄÁÄÅÎÉÑ ÂÒÏÊ ÒÅÄÁ, ×ÍÅÓÔÏ Ó -ÅËÒÁÎÉ. îÁÐÒÉÍÅÒ, C-u 8 C-v ÓËÒÏÌÉÒÁ ÅËÒÁÎÁ Ó 8 ÒÅÄÁ. - ->> óÅÇÁ ÏÐÉÔÁÊÔÅ C-u 8 C-v. - -ôÏ×Á ÂÉ ÔÒÑÂ×ÁÌÏ ÄÁ ÓËÒÏÌÉÒÁ ÅËÒÁÎÁ Ó 8 ÒÅÄÁ. áËÏ ÉÓËÁÔÅ ÄÁ -ÓËÒÏÌÉÒÁÔÅ ÏÔÎÏ×Ï ÎÁÄÏÌÕ, ÍÏÖÅ ÄÁ ÄÁÄÅÔÅ ÁÒÇÕÍÅÎÔ ÎÁ M-v. - -áËÏ ÉÚÐÏÌÚ×ÁÔÅ ÇÒÁÆÉÞÅÎ ÉÎÔÅÒÆÅÊÓ, ËÁÔÏ X11 ÉÌÉ MS-Windows, ÂÉ -ÔÒÑÂ×ÁÌÏ ÄÁ ÉÍÁ ÔßÎËÁ ÐÒÁ×ÏßÇßÌÎÁ ÏÂÌÁÓÔ ÎÁÒÅÞÅÎÁ ÐÌßÚÇÁÞ (scroll bar) -× ÌÑ×ÁÔÁ ÓÔÒÁÎÁ ÎÁ ÐÒÏÚÏÒÅÃÁ ÎÁ åÍÁËÓ. ÷ÉÅ ÍÏÖÅÔÅ ÄÁ ÓËÒÏÌÉÒÁÔÅ -ÔÅËÓÔÁ ÝÒÁËÁÊËÉ Ó ÍÉÛËÁÔÁ × ÐÌßÚÇÁÞÁ. - ->> ïÐÉÔÁÊÔÅ ÄÁ ÎÁÔÉÓÎÅÔÅ ÓÒÅÄÎÉÑ ÂÕÔÏÎ ÎÁ ×ßÒÈÁ ÎÁ ÏÓ×ÅÔÅÎÁÔÁ ÏÂÌÁÓÔ - ×ßÔÒÅ × ÐÌßÚÇÁÞÁ. ôÏ×Á ÂÉ ÔÒÑÂ×ÁÌÏ ÄÁ ÓËÒÏÌÉÒÁ ÔÅËÓÔÁ ËßÍ - ÐÏÌÏÖÅÎÉÅ, ÏÐÒÅÄÅÌÅÎÏ ÏÔ ÔÏ×Á ËÏÌËÏ ×ÉÓÏËÏ ÉÌÉ ÎÉÓËÏ ÓÔÅ ÝÒÁËÎÁÌÉ. - ->> ïÐÉÔÁÊÔÅ ÓÅ ÄÁ Ä×ÉÖÉÔÅ ÍÉÛËÁÔÁ ÎÁÇÏÒÅ É ÎÁÄÏÌÕ, ÄÏËÁÔÏ ÓÔÅ - ÚÁÄßÒÖÁÌÉ ÄÅÓÎÉÑ ÂÕÔÏÎ ÎÁÔÉÓÎÁÔ. ýÅ ×ÉÄÉÔÅ, ÞÅ ÔÅËÓÔßÔ ÓÅ ÓËÒÏÌÉÒÁ - ÎÁÇÏÒÅ É ÎÁÄÏÌÕ ËÁÔÏ Ä×ÉÖÉÔÅ ÍÉÛËÁÔÁ. - - -* ëïçáôï åíáëó å âìïëéòáì -------------------------- - -áËÏ åÍÁËÓ ÓÐÒÅ ÄÁ ÏÔÇÏ×ÁÒÑ ÎÁ ×ÁÛÉÔÅ ËÏÍÁÎÄÉ, ×ÉÅ ÍÏÖÅÔÅ ÄÁ ÇÏ ÓÐÒÅÔÅ -ÂÅÚÏÐÁÓÎÏ ËÁÔÏ ×ß×ÅÄÅÔÅ C-g. íÏÖÅ ÄÁ ÉÚÐÏÌÚ×ÁÔÅ C-g ÚÁ ÄÁ ÓÐÒÅÔÅ -ËÏÍÁÎÄÁ, ËÏÑÔÏ ÓÅ ÉÚÐßÌÎÑ×Á Ô×ßÒÄÅ ÄßÌÇÏ. - -óßÝÏ ÍÏÖÅÔÅ ÄÁ ÉÚÐÏÌÚ×ÁÔÅ C-g ÚÁ ÄÁ ÏÔÍÅÎÉÔÅ ÞÉÓÌÏ× ÁÒÇÕÍÅÎÔ ÉÌÉ -ÎÁÞÁÌÏÔÏ ÎÁ ËÏÍÁÎÄÁ, ËÏÑÔÏ ÎÅ ÉÓËÁÔÅ ÄÁ ÚÁ×ßÒÛÉÔÅ. - ->> ÷ß×ÅÄÅÔÅ C-u 100 ÚÁ ÄÁ ÎÁÐÒÁ×ÉÔÅ ÞÉÓÌÏ× ÁÒÇÕÍÅÎÔ 100, É ×ß×ÅÄÅÔÅ - C-g. óÅÇÁ ×ß×ÅÄÅÔÅ C-f. ôÒÑÂ×Á ÄÁ ÓÅ ÐÒÉÄ×ÉÖÉÔÅ Ó ÔÏÞÎÏ ÅÄÉÎ - ÚÎÁË, ÚÁÝÏÔÏ ×ÉÅ ÐÒÅËÒÁÔÉÈÔÅ ÁÒÇÕÍÅÎÔßÔ Ó C-g. - -áËÏ ÓÔÅ ×ß×ÅÌÉ ÐÏ ÐÏÇÒÅÛËÁ, ÍÏÖÅÔÅ ÄÁ ÓÅ ÉÚÍßËÎÅÔÅ Ó C-g. - - -* úáâòáîåîé ëïíáîäé -------------------- - -îÑËÏÉ ËÏÍÁÎÄÉ ÎÁ åÍÁËÓ ÓÁ "ÚÁÂÒÁÎÅÎÉ", ÔÁËÁ ÞÅ ÎÁÞÉÎÁÅÝÉÔÅ ÐÏÔÒÅÂÉÔÅÌÉ -ÄÁ ÎÅ ÍÏÇÁÔ ÄÁ ÇÉ ÕÐÏÔÒÅÂÑÔ ÐÏ ÐÏÇÒÅÛËÁ. - -áËÏ ×ß×ÅÄÅÔÅ ÎÑËÏÑ ÏÔ ÚÁÂÒÁÎÅÎÉÔÅ ËÏÍÁÎÄÉ, åÍÁËÓ ÉÚ×ÅÖÄÁ ÓßÏÂÝÅÎÉÅ, -ËÁÚ×ÁÊËÉ ËÁË×Á Å ÂÉÌÁ ËÏÍÁÎÄÁÔÁ É ÐÉÔÁÊËÉ ×É ÄÁÌÉ ÉÓËÁÔÅ ÄÁ ÐÒÏÄßÌÖÉÔÅ -ÎÁÐÒÅÄ É ÄÁ ÉÚÐßÌÎÉÔÅ ËÏÍÁÎÄÁÔÁ. - -áËÏ ÎÁÉÓÔÉÎÁ ÉÓËÁÔÅ ÄÁ ÉÚÐÒÏÂ×ÁÔÅ ËÏÍÁÎÄÁÔÁ, ×ß×ÅÄÅÔÅ ËÌÁ×ÉÛÁ ÉÎÔÅÒ×ÁÌ -× ÏÔÇÏ×ÏÒ ÎÁ ×ßÐÒÏÓÁ. ïÂÉËÎÏ×ÅÎÏ ÁËÏ ÎÅ ÉÓËÁÔÅ ÄÁ ÉÚÐßÌÎÉÔÅ -ÚÁÂÒÁÎÅÎÁÔÁ ËÏÍÁÎÄÁ, ÏÔÇÏ×ÁÒÑÔÅ ÎÁ ×ßÐÒÏÓÁ Ó "n". - ->> ÷ß×ÅÄÅÔÅ C-x C-l (ËÏÑÔÏ Å ÚÁÂÒÁÎÅÎÁ ËÏÍÁÎÄÁ), É ÓÌÅÄ ÔÏ×Á ×ß×ÅÄÅÔÅ - "n" × ÏÔÇÏ×ÏÒ ÎÁ ×ßÐÒÏÓÁ. - - -* ðòïúïòãé ----------- - -åÍÁËÓ ÍÏÖÅ ÄÁ ÕÐÒÁ×ÌÑ×Á ÎÑËÏÌËÏ ÐÒÏÚÏÒÅÃÁ, ×ÓÅËÉ ÉÚ×ÅÖÄÁÊËÉ Ó×ÏÊ -ÓÏÂÓÔ×ÅÎ ÔÅËÓÔ. îÉÅ ÝÅ ÏÂÑÓÎÉÍ ÐÏ-ËßÓÎÏ ËÁË ÄÁ ÉÚÐÏÌÚ×ÁÔÅ ÎÑËÏÌËÏ -ÐÒÏÚÏÒÅÃÁ. ôÏÞÎÏ ÓÅÇÁ ÎÉÅ ÉÓËÁÍÅ ÄÁ ÏÂÑÓÎÉÍ ËÁË ÄÁ ÓÅ ÏÔßÒ×ÅÔÅ ÏÔ -ÄÏÐßÌÎÉÔÅÌÎÉ ÐÒÏÚÏÒÃÉ É ÄÁ ÓÅ ×ßÒÎÅÔÅ ËßÍ ÏÓÎÏ×ÎÏÔÏ ÒÅÄÁËÔÉÒÁÎÅ Ó ÅÄÉÎ -ÐÒÏÚÏÒÅÃ. ðÒÏÓÔÏ Å: - - C-x 1 åÄÉÎ ÐÒÏÚÏÒÅà (Ô.Å. ÐÒÅÍÁÈÎÉ ×ÓÉÞËÉ ÄÒÕÇÉ ÐÒÏÚÏÒÃÉ). - -ôÏ×Á Å CONTROL-x ÐÏÓÌÅÄ×ÁÎÏ ÏÔ ÃÉÆÒÁÔÁ 1. C-x 1 ÒÁÚÛÉÒÑ×Á ÐÒÏÚÏÒÅÃÁ -ÓßÄßÒÖÁÝ ËÕÒÓÏÒÁ, ÚÁ ÄÁ ÍÏÖÅ ÄÁ ÚÁÐßÌÎÉ ÃÅÌÉÑ ÅËÒÁÎ. ôÑ ÐÒÅÍÁÈ×Á -×ÓÉÞËÉ ÄÒÕÇÉ ÐÒÏÚÏÒÃÉ. - ->> ðÒÉÄ×ÉÖÅÔÅ ËÕÒÓÏÒÁ ÄÏ ÔÏÚÉ ÒÅÄ É ×ß×ÅÄÅÔÅ C-u 0 C-l. ->> ÷ß×ÅÄÅÔÅ C-h k C-f. - ÷ÉÖÔÅ ËÁË ÔÏÚÉ ÐÒÏÚÏÒÅà ÓÅ Ó×É×Á, ÄÏËÁÔÏ ÄÒÕÇ ÓÅ ÐÏÑ×Ñ×Á ÚÁ ÄÁ - ÉÚ×ÅÄÅ ÄÏËÕÍÅÎÔÁÃÉÑ ÎÁ ËÏÍÁÎÄÁÔÁ C-f. - ->> ÷ß×ÅÄÅÔÅ C-x 1 É ×ÉÖÔÅ ËÁË ÐÒÏÚÏÒÅÃÁ Ó ÄÏËÕÍÅÎÔÁÃÉÑÔÁ ÉÚÞÅÚ×Á. - -ôÁÚÉ ËÏÍÁÎÄÁ ÎÅ Å ËÁÔÏ ÄÒÕÇÉÔÅ ËÏÍÁÎÄÉ, ËÏÉÔÏ ÓÔÅ ÎÁÕÞÉÌÉ, × ÔÏ×Á -ÏÔÎÏÛÅÎÉÅ, ÞÅ ÓÅ ÓßÓÔÏÉ ÏÔ Ä×Á ÚÎÁËÁ. úÁÐÏÞ×Á ÓßÓ ÚÎÁËÁ C-x. éÍÁ -ÃÑÌÁ ÒÅÄÉÃÁ ÏÔ ËÏÍÁÎÄÉ, ËÏÉÔÏ ÚÁÐÏÞ×ÁÔ Ó C-x; ÍÎÏÇÏ ÏÔ ÔÑÈ ÉÍÁÔ ÎÅÝÏ -ÏÂÝÏ Ó ÐÒÏÚÏÒÃÉ, ÆÁÊÌÏ×Å, ÂÕÆÅÒÉ É Ó×ßÒÚÁÎÉÔÅ Ó ÔÑÈ ÎÅÝÁ. ôÅÚÉ -ËÏÍÁÎÄÉ ÓÁ ÏÔ Ä×Á, ÔÒÉ ÉÌÉ ÞÅÔÉÒÉ ÚÎÁËÁ. - - -* ÷íÿë÷áîå é éúôòé÷áîå ----------------------- - -áËÏ ÉÓËÁÔÅ ÄÁ ×ÍßËÎÅÔÅ ÔÅËÓÔ, ÐÒÏÓÔÏ ÇÏ ×ß×ÅÄÅÔÅ. úÎÁÃÉÔÅ, ËÏÉÔÏ -ÍÏÇÁÔ ÄÁ ÓÅ ×ÉÖÄÁÔ, ËÁÔÏ á, 7, * É Ô.Î., ÓÅ ×ßÚÐÒÉÅÍÁÔ ÏÔ åÍÁËÓ ËÁÔÏ -ÔÅËÓÔ É ÓÅ ×ÍßË×ÁÔ ×ÅÄÎÁÇÁ. ÷ß×ÅÄÅÔÅ (ËÌÁ×ÉÛßÔ ÚÁ ×ÒßÝÁÎÅ × -ÎÁÞÁÌÏÔÏ ÎÁ ÒÅÄÁ) ÚÁ ÄÁ ×ÍßËÎÅÔÅ ÚÎÁË ÚÁ ÎÏ× ÒÅÄ. - -íÏÖÅ ÄÁ ÉÚÔÒÉÅÔÅ ÐÏÓÌÅÄÎÉÑ ÚÎÁË, ËÏÊÔÏ ÓÔÅ ×ß×ÅÌÉ, Ó ×ß×ÅÖÄÁÎÅ ÎÁ -. Å ËÌÁ×ÉÛ ÏÔ ËÌÁ×ÉÁÔÕÒÁÔÁ -- ÓßÝÉÑÔ, ËÏÊÔÏ -ÏÂÉËÎÏ×ÅÎÏ ÉÚÐÏÌÚ×ÁÔÅ ÉÚ×ßÎ åÍÁËÓ ÚÁ ÄÁ ÉÚÔÒÉÅÔÅ ÐÏÓÌÅÄÎÉÑ ×ß×ÅÄÅÎ ÏÔ -×ÁÓ ÚÎÁË. ïÂÉËÎÏ×ÅÎÏ Å ÇÏÌÑÍ ËÌÁ×ÉÛ ÎÁ ÎÑËÏÌËÏ ÒÅÄÁ ÒÁÚÓÔÏÑÎÉÅ ÏÔ -ËÌÁ×ÉÛÁ , É ÏÂÉËÎÏ×ÅÎÏ Å ÏÔÂÅÌÑÚÁÎ Ó "Delete", "Del" ÉÌÉ -"Backspace". - -áËÏ ÇÏÌÅÍÉÑÔ ËÌÁ×ÉÛ ÔÁÍ Å Ó ÅÔÉËÅÔ "Backspace", ÔÏÇÁ×Á ÔÏÊ Å ÔÏÚÉ, -ËÏÊÔÏ ÝÅ ÉÚÐÏÌÚ×ÁÔÅ ÚÁ . íÏÖÅ ÄÁ ÉÍÁ ÏÝÅ ÅÄÉÎ ËÌÁ×ÉÛ Ó -ÅÔÉËÅÔ "Delete" ÎÑËßÄÅ ÄÒÕÇÁÄÅ, ÎÏ ÔÏÊ ÎÅ Å . - -ðÏ-ÏÂÝÏ ËÁÚÁÎÏ, ÉÚÔÒÉ×Á ÚÎÁËÁ ÔÏÞÎÏ ÐÒÅÄÉ ÔÅËÕÝÏÔÏ ÍÑÓÔÏ ÎÁ -ËÕÒÓÏÒÁ. - ->> îÁÐÒÁ×ÅÔÅ ÔÏ×Á ÓÅÇÁ -- ÎÁÐÉÛÅÔÅ ÎÑËÏÌËÏ ÚÎÁËÁ, ÐÏÓÌÅ ÇÉ ÉÚÔÒÉÊÔÅ Ó - ×ß×ÅÖÄÁÎÅ ÎÁ ÎÑËÏÌËÏ ÐßÔÉ. îÅ ÓÅ ÂÅÚÐÏËÏÊÔÅ, ÞÅ ÔÏÚÉ - ÆÁÊÌ ÝÅ ÂßÄÅ ÐÒÏÍÅÎÅÎ; ×ÉÅ ÎÑÍÁ ÄÁ ÐÒÏÍÅÎÉÔÅ ÐßÒ×ÏÎÁÞÁÌÎÏÔÏ - ×ß×ÅÄÅÎÉÅ. ôÏ×Á Å ×ÁÛÅ ÌÉÞÎÏ ËÏÐÉÅ. - -ëÏÇÁÔÏ ÒÅÄ ÏÔ ÔÅËÓÔÁ ÓÔÁÎÅ Ô×ßÒÄÅ ÄßÌßÇ ÚÁ ÄÁ ÓÅ ÓßÂÅÒÅ × ÒÅÄ ÏÔ -ÅËÒÁÎÁ, ÒÅÄßÔ ÏÔ ÔÅËÓÔÁ ÓÅ "ÐÒÏÄßÌÖÁ×Á" ÎÁ ÓÌÅÄ×ÁÝÉÑ ÒÅÄ. ïÂÒÁÔÎÁ -ÎÁËÌÏÎÅÎÁ ÞÅÒÔÁ ("\") (ÉÌÉ, ÁËÏ ÉÚÐÏÌÚ×ÁÔÅ ÇÒÁÆÉÞÅÎ ÉÎÔÅÒÆÅÊÓ, ÍÁÌËÁ -ÉÚËÒÉ×ÅÎÁ ÓÔÒÅÌËÁ) × ÄÑÓÎÁÔÁ ÇÒÁÎÉÃÁ ÏÔÂÅÌÑÚ×Á ÒÅÄ, ËÏÊÔÏ Å ÂÉÌ -ÐÒÏÄßÌÖÅÎ. - ->> ÷ß×ÅÄÅÔÅ ÔÅËÓÔ ÄÏËÁÔÏ ÓÔÉÇÎÅÔÅ ÄÑÓÎÁÔÁ ÇÒÁÎÉÃÁ, É ÐÒÏÄßÌÖÅÔÅ Ó - ×ÍßË×ÁÎÅÔÏ. ýÅ ×ÉÄÉÔÅ ÐÒÏÄßÌÖÅÎÉÅÔÏ ÄÁ ÒÅÄÁ ÄÁ ÓÅ ÐÏËÁÚ×Á. - ->> éÚÐÏÌÚ×ÁÊÔÅ ÎÑËÏÌËÏ ÚÁ ÄÁ ÉÚÔÒÉÅÔÅ ÔÅËÓÔÁ ÄÏËÁÔÏ ÒÅÄßÔ ÓÅ - ×ÍÅÓÔÉ × ÅÄÉÎ ÅËÒÁÎÅÎ ÒÅÄ. ðÒÏÄßÌÖÅÎÉÅÔÏ ÎÁ ÒÅÄÁ ÉÚÞÅÚ×Á. - -íÏÖÅ ÄÁ ÉÚÔÒÉÅÔÅ ÚÎÁËÁ ÚÁ ÎÏ× ÒÅÄ ÔÏÞÎÏ ËÁËÔÏ ×ÓÅËÉ ÄÒÕÇ ÚÎÁË. -éÚÔÒÉ×ÁÎÅÔÏ ÎÁ ÚÎÁËÁ ÚÁ ÎÏ× ÒÅÄ ÍÅÖÄÕ Ä×Á ÒÅÄÁ ÇÉ ÓÌÉ×Á × ÅÄÉÎ ÒÅÄ. -áËÏ ÐÏÌÕÞÅÎÉÑÔ ËÏÍÂÉÎÉÒÁÎ ÒÅÄ Å Ô×ßÒÄÅ ÄßÌßÇ, ÚÁ ÄÁ ÓÅ ×ÍÅÓÔÉ × -ÛÉÒÉÎÁÔÁ ÎÁ ÅËÒÁÎÁ, ÔÏÊ ÝÅ ÂßÄÅ ÐÏËÁÚÁÎ ËÁÔÏ ÐÒÏÄßÌÖÅÎ ÒÅÄ. - ->> ðÒÉÄ×ÉÖÅÔÅ ËÕÒÓÏÒÁ × ÎÁÞÁÌÏÔÏ ÎÁ ÒÅÄ É ×ß×ÅÄÅÔÅ . ôÏ×Á ÝÅ - ÓÌÅÅ ÔÏÚÉ ÒÅÄ Ó ÐÒÅÄÉÛÎÉÑ. - ->> ÷ß×ÅÄÅÔÅ ÚÁ ÄÁ ×ÍßËÎÅÔÅ ÎÁÎÏ×Ï ÚÎÁËÁ ÚÁ ÎÏ× ÒÅÄ, ËÏÊÔÏ - ÉÚÔÒÉÈÔÅ. - -úÁÐÏÍÎÅÔÅ, ÞÅ ÎÁ ÐÏ×ÅÞÅÔÏ ËÏÍÁÎÄÉ ÎÁ åÍÁËÓ ÍÏÖÅ ÄÁ ÂßÄÅ ÚÁÄÁÄÅÎ ÂÒÏÑÞ -ÎÁ ÐÏ×ÔÏÒÅÎÉÑÔÁ; ÔÏ×Á ×ËÌÀÞ×Á ×ÍßË×ÁÎÅÔÏ ÎÁ ÔÅËÓÔÏ×É ÚÎÁÃÉ. -ðÏ×ÔÁÒÑÎÅÔÏ ÎÁ ÔÅËÓÔÏ× ÚÎÁË ÇÏ ×ÍßË×Á ÎÑËÏÌËÏ ÐßÔÉ. - ->> ïÐÉÔÁÊÔÅ ÔÏ×Á ÓÅÇÁ -- ×ß×ÅÄÅÔÅ C-u 8 * ÚÁ ÄÁ ×ÍßËÎÅÔÅ ********. - -óÅÇÁ ×ÉÅ ÓÔÅ ÎÁÕÞÉÌÉ ÎÁÊ-ÏÓÎÏ×ÎÉÔÅ ÎÁÞÉÎÉ ÚÁ ×ß×ÅÖÄÁÎÅ ÎÁ ÎÅÝÏ × åÍÁËÓ -É ÐÏÐÒÁ×ÑÎÅÔÏ ÎÁ ÇÒÅÛËÉ. íÏÖÅÔÅ ÓßÝÏ ÔÁËÁ ÄÁ ÉÚÔÒÉ×ÁÔÅ ÄÕÍÉ ÉÌÉ -ÒÅÄÏ×Å. åÔÏ ÏÂÏÂÝÅÎÉÅ ÎÁ ÉÚÔÒÉ×ÁÝÉÔÅ ÄÅÊÓÔ×ÉÑ: - - ÉÚÔÒÉ×ÁÎÅ ÎÁ ÚÎÁËÁ ÔÏÞÎÏ ÐÒÅÄÉ ËÕÒÓÏÒÁ - C-d ÉÚÔÒÉ×ÁÎÅ ÎÁ ÚÎÁËÁ ÔÏÞÎÏ ÓÌÅÄ ËÕÒÓÏÒÁ - - M- ÉÚÔÒÉ×ÁÎÅ ÎÁ ÄÕÍÁÔÁ ÎÅÐÏÓÒÅÄÓÔ×ÅÎÏ ÐÒÅÄÉ ËÕÒÓÏÒÁ - M-d ÉÚÔÒÉ×ÁÎÅ ÎÁ ÄÕÍÁÔÁ ÓÌÅÄ ËÕÒÓÏÒÁ - - C-k ÉÚÔÒÉ×ÁÎÅ ÏÔ ÍÑÓÔÏÔÏ ÎÁ ËÕÒÓÏÒÁ ÄÏ ËÒÁÑ ÎÁ ÒÅÄÁ - M-k ÉÚÔÒÉ×ÁÎÅ ÄÏ ËÒÁÑ ÎÁ ÔÅËÕÝÏÔÏ ÉÚÒÅÞÅÎÉÅ - -úÁÂÅÌÅÖÅÔÅ, ÞÅ É C-d ÓÒÁ×ÎÅÎÉ Ó M- É M-d ÒÁÚÛÉÒÑ×ÁÔ -ÐÏÄÏÂÉÅÔÏ ÚÁÐÏÞÎÁÔÏ ÏÔ C-f É M-f (ÄÏÂÒÅ, ÎÅ Å ÎÁÉÓÔÉÎÁ -ËÏÎÔÒÏÌÉÒÁÝ ÚÎÁË, ÎÏ ÎÅËÁ ÎÅ ÓÅ ÂÅÚÐÏËÏÉÍ ÚÁ ÔÏ×Á). C-k É M-k ÓÁ -ÐÏÄÏÂÎÉ ÎÁ C-e É M-e × ÓÍÉÓßÌ, ÞÅ ÅÄÎÉÔÅ ÓÁ ÚÁ ÒÅÄÏ×Å, Á ÄÒÕÇÉÔÅ ÚÁ -ÉÚÒÅÞÅÎÉÑ. - -íÏÖÅÔÅ ÓßÝÏ ÄÁ ÐÒÅÍÁÈÎÅÔÅ ×ÓÑËÁ ÞÁÓÔ ÏÔ ÂÕÆÅÒÁ Ó ÅÄÉÎ ÕÎÉ×ÅÒÓÁÌÅÎ -ÎÁÞÉÎ. ðÒÉÄ×ÉÖÅÔÅ ÓÅ ÄÏ ÅÄÉÎÉÑ ËÒÁÊ ÎÁ ÞÁÓÔÔÁ É ×ß×ÅÄÅÔÅ C-@ ÉÌÉ -C-ÉÎÔÅÒ×ÁÌ (ËÏÅÔÏ É ÄÁ Å ÏÔ Ä×ÅÔÅ). ðÒÉÄ×ÉÖÅÔÅ ÓÅ ÄÏ ÄÒÕÇÉÑ ËÒÁÊ ÎÁ -ÞÁÓÔÔÁ É ×ß×ÅÄÅÔÅ C-w. ôÏ×Á ÝÅ ÐÒÅÍÁÈÎÅ ÃÅÌÉÑ ÔÅËÓÔ ÍÅÖÄÕ ÔÅÚÉ Ä×Á -ËÒÁÑ. - ->> ðÒÉÄ×ÉÖÅÔÅ ËÕÒÓÏÒÁ ÄÏ ÚÎÁËÁ í × ÎÁÞÁÌÏÔÏ ÎÁ ÐÒÅÄÉÛÎÉÑ ÁÂÚÁÃ. ->> ÷ß×ÅÄÅÔÅ C-ÉÎÔÅÒ×ÁÌ. åÍÁËÓ ÔÒÑÂ×Á ÄÁ ÉÚ×ÅÄÅ ÓßÏÂÝÅÎÉÅ "Mark set" × - ÄÏÌÎÉÑ ËÒÁÊ ÎÁ ÅËÒÁÎÁ. ->> ðÒÉÄ×ÉÖÅÔÅ ËÕÒÓÏÒÁ ÄÏ ÂÕË×ÁÔÁ Ò × "ËÒÁÊ", ÎÁ ×ÔÏÒÉÑ ÒÅÄ ÏÔ ÁÂÚÁÃÁ. ->> ÷ß×ÅÄÅÔÅ C-w. ôÏ×Á ÝÅ ÐÒÅÍÁÈÎÅ ÔÅËÓÔÁ ÚÁÐÏÞ×ÁÝ ÏÔ í É ÚÁ×ßÒÛ×ÁÝ - ÔÏÞÎÏ ÐÒÅÄÉ Ò. - -òÁÚÌÉËÁÔÁ ÍÅÖÄÕ "ÐÒÅÍÁÈ×ÁÎÅ" (killing) É "ÉÚÔÒÉ×ÁÎÅ" (deleting) Å, ÞÅ -"ÐÒÅÍÁÈÎÁÔÉÑÔ" ÔÅËÓÔ ÍÏÖÅ ÄÁ ×ÍßËÎÁÔ ÎÁÎÏ×Ï, ÄÏËÁÔÏ "ÉÚÔÒÉÔÉÔÅ" ÎÅÝÁ -ÎÅ ÍÏÇÁÔ ÄÁ ÓÅ ×ÍßËÎÁÔ ÎÁÎÏ×Ï. ÷ÍßË×ÁÎÅÔÏ ÎÁÎÏ×Ï ÎÁ ÐÒÅÍÁÈÎÁÔ ÔÅËÓÔ -ÓÅ ÎÁÒÉÞÁ "ÉÚ×ÁÖÄÁÎÅ" (yanking). ïÂÝÏ ËÁÚÁÎÏ, ËÏÍÁÎÄÉÔÅ, ËÏÉÔÏ -ÏÔÓÔÒÁÎÑ×ÁÔ ÍÎÏÇÏ ÔÅËÓÔ, ÇÏ ÐÒÅÍÁÈ×ÁÔ (ÔÁËÁ ÞÅ ÔÏÊ ÄÁ ÍÏÖÅ ÄÁ ÂßÄÅ -ÉÚ×ÁÄÅÎ), ÄÏËÁÔÏ ËÏÍÁÎÄÉÔÅ, ËÏÉÔÏ ÏÔÓÔÒÁÎÑ×ÁÔ ÓÁÍÏ ÅÄÉÎ ÚÎÁË ÉÌÉ -ÉÚÔÒÉ×ÁÔ ÓÁÍÏ ÐÒÁÚÎÉ ÒÅÄÏ×Å É ÚÎÁÃÉ, ÉÚ×ßÒÛ×ÁÔ ÉÚÔÒÉ×ÁÎÅ (ÔÁËÁ ÞÅ ÎÅ -ÍÏÖÅÔÅ ÄÁ ÉÚ×ÁÄÉÔÅ ÔÏÚÉ ÔÅËÓÔ). - ->> ðÒÉÄ×ÉÖÅÔÅ ËÕÒÓÏÒÁ ÄÏ ÎÁÞÁÌÏÔÏ ÎÁ ÒÅÄ, ËÏÊÔÏ ÎÅ Å ÐÒÁÚÅÎ. ôÏÇÁ×Á - ×ß×ÅÄÅÔÅ C-k ÚÁ ÄÁ ÐÒÅÍÁÈÎÅÔÅ ÔÅËÓÔÁ ÎÁ ÔÏÚÉ ÒÅÄ. ->> ÷ß×ÅÄÅÔÅ C-k ×ÔÏÒÉ ÐßÔ. ýÅ ×ÉÄÉÔÅ, ÞÅ ÔÏ×Á ÐÒÅÍÁÈ×Á ÚÎÁËÁ ÚÁ ÎÏ× - ÒÅÄ, ËÏÊÔÏ ÓÌÅÄ×Á ÒÅÄÁ. - -úÁÂÅÌÅÖÅÔÅ, ÞÅ ÅÄÉÎÉÞÎÏ C-k ÐÒÅÍÁÈ×Á ÓßÄßÒÖÁÎÉÅÔÏ ÎÁ ÒÅÄÁ, Á -ÓÌÅÄ×ÁÝÏÔÏ C-k ÐÒÅÍÁÈ×Á ÃÅÌÉÑ ÒÅÄ, É ÐÒÁ×É ÄÒÕÇÉÔÅ ÒÅÄÏ×Å ÄÁ ÓÅ -ÐÒÉÄ×ÉÖÁÔ ÎÁÇÏÒÅ. C-k ÏÂÒÁÂÏÔ×Á ÞÉÓÌÏ×ÉÔÅ ÁÒÇÕÍÅÎÔÉ ÐÏ ÓÐÅÃÉÁÌÅÎ -ÎÁÞÉÎ: ÐÒÅÍÁÈ×ÁÔ ÓÅ ÔÏÌËÏ×Á ÎÁ ÂÒÏÊ ÒÅÄÏ×Å é ÔÑÈÎÏÔÏ ÓßÄßÒÖÁÎÉÅ. ôÏ×Á -ÎÅ Å ÐÒÏÓÔÏ ÐÏ×ÔÏÒÅÎÉÅ. C-u 2 C-k ÐÒÅÍÁÈ×Á Ä×Á ÒÅÄÁ É ÔÅÈÎÉÔÅ ÚÎÁÃÉ -ÚÁ ÎÏ× ÒÅÄ; ×ß×ÅÖÄÁÎÅÔÏ ÎÁ C-k Ä×Á ÐßÔÉ ÎÅ ÐÒÁ×É ÔÏ×Á. - -÷ÒßÝÁÎÅÔÏ ÏÂÒÁÔÎÏ ÎÁ ÔÅËÓÔ ÓÅ ÎÁÒÉÞÁ "ÉÚ×ÁÖÄÁÎÅ". (íÉÓÌÅÔÅ ÚÁ ÎÅÇÏ -ËÁÔÏ ÚÁ ÉÚ×ÁÖÄÁÎÅ ÏÂÒÁÔÎÏ, ÉÌÉ ÄÒßÐ×ÁÎÅ ÏÂÒÁÔÎÏ, ÎÁ ÔÅËÓÔ, ËÏÊÔÏ Å ÂÉÌ -ÐÒÅÍÁÈÎÁÔ.) íÏÖÅÔÅ ÄÁ ÉÚ×ÁÖÄÁÔÅ ÐÒÅÍÁÈÎÁÔÉÑ ÔÅËÓÔ ÉÌÉ ÎÁ ÓßÝÏÔÏ -ÍÑÓÔÏ, ÏÔËßÄÅÔÏ Å ÂÉÌ ÐÒÅÍÁÈÎÁÔ, ÉÌÉ ÎÁ ÄÒÕÇÏ ÍÑÓÔÏ × ÂÕÆÅÒÁ, ÄÁÖÅ É × -ÒÁÚÌÉÞÅÎ ÆÁÊÌ. íÏÖÅÔÅ ÄÁ ÉÚ×ÁÖÄÁÔÅ ÅÄÉÎ É ÓßÝ ÔÅËÓÔ ÎÑËÏÌËÏ ÐßÔÉ; -ÔÏ×Á ÐÒÁ×É ÎÑËÏÌËÏ ËÏÐÉÑ ÏÔ ÎÅÇÏ. - -ëÏÍÁÎÄÁÔÁ ÚÁ ÉÚ×ÁÖÄÁÎÅ Å C-y. ôÑ ×ÍßË×Á ÎÁÎÏ×Ï ÐÏÓÌÅÄÎÉÑ ÐÒÅÍÁÈÎÁÔ -ÔÅËÓÔ × ÔÅËÕÝÏÔÏ ÍÑÓÔÏ ÎÁ ËÕÒÓÏÒÁ. - ->> ïÐÉÔÁÊÔÅ ÇÏ: ×ß×ÅÄÅÔÅ C-y ÚÁ ÄÁ ÉÚ×ÅÄÅÔÅ ÔÅËÓÔÁ ÏÂÒÁÔÎÏ. - -áËÏ ÎÁÐÒÁ×ÉÔÅ ÎÑËÏÌËÏ C-k × ÒÅÄ, ×ÓÉÞËÏ ÏÔ ÐÒÅÍÁÈÎÁÔÉÑ ÔÅËÓÔ ÓÅ -ÚÁÐÁÚ×Á ÚÁÅÄÎÏ, ÔÁËÁ ÞÅ ÅÄÎÏ C-y ÝÅ ÉÚ×ÁÄÉ ×ÓÉÞËÉ ÒÅÄÏ×Å ÎÁ×ÅÄÎßÖ. - ->> îÁÐÒÁ×ÅÔÅ ÔÏ×Á ÓÅÇÁ, ×ß×ÅÄÅÔÅ C-k ÎÑËÏÌËÏ ÐßÔÉ. - -óÅÇÁ ÚÁ ÄÁ ÉÚËÁÒÁÔÅ ÐÒÅÍÁÈÎÁÔÉÑ ÔÅËÓÔ: - ->> ÷ß×ÅÄÅÔÅ C-y. óÌÅÄ ÔÏ×Á ÐÒÉÄ×ÉÖÅÔÅ ËÕÒÓÏÒÁ ÎÁÄÏÌÕ ÎÑËÏÌËÏ ÒÅÄÁ É - ×ß×ÅÄÅÔÅ C-y ÏÔÎÏ×Ï. óÅÇÁ ×ÉÖÄÁÔÅ ËÁË ÄÁ ËÏÐÉÒÁÔÅ ÎÑËÁËß× ÔÅËÓÔ. - -ëÁË×Ï ÄÁ ÐÒÁ×ÉÔÅ ÁËÏ ÉÍÁÔÅ ÎÑËÁËß× ÔÅËÓÔ, ËÏÊÔÏ ÉÓËÁÔÅ ÄÁ ÉÚ×ÁÄÉÔÅ -ÏÂÒÁÔÎÏ, É ÓÌÅÄ ÔÏ×Á ÐÒÅÍÁÈÎÅÔÅ ÎÅÝÏ ÄÒÕÇÏ? C-y ÝÅ ÉÚ×ÁÄÉ ÐÏÓÌÅÄÎÏÔÏ -ÐÒÅÍÁÈ×ÁÎÅ. îÏ ÐÒÅÄÉÛÎÉÑÔ ÔÅËÓÔ ÎÅ Å ÚÁÇÕÂÅÎ. íÏÖÅÔÅ ÄÁ ÇÏ ×ßÒÎÅÔÅ -ÏÂÒÁÔÎÏ ÉÚÐÏÌÚ×ÁÊËÉ ËÏÍÁÎÄÁÔÁ M-y. óÌÅÄ ËÁÔÏ ÉÚÐßÌÎÉÔÅ C-y ÚÁ ÄÁ -×ÚÅÍÅÔÅ ÐÏÓÌÅÄÎÏÔÏ ÐÒÅÍÁÈ×ÁÎÅ, ×ß×ÅÖÄÁÎÅÔÏ ÎÁ M-y ÚÁÍÅÎÑ ÔÏÚÉ ÉÚ×ÁÄÅÎ -ÔÅËÓÔ Ó ÐÒÅÄÉÛÎÏÔÏ ÐÒÅÍÁÈ×ÁÎÅ. ÷ß×ÅÖÄÁÎÅÔÏ ÎÁ M-y ÏÔÎÏ×Ï É ÏÔÎÏ×Ï -×ÒßÝÁ ÐÏ-ÒÁÎÎÉ É ÐÏ-ÒÁÎÎÉ ÐÒÅÍÁÈ×ÁÎÉÑ. ëÏÇÁÔÏ ÓÔÉÇÎÅÔÅ ÔÅËÓÔÁ, ËÏÊÔÏ -ÔßÒÓÉÔÅ, ÎÅ Å ÎÕÖÎÏ ÄÁ ÐÒÁ×ÉÔÅ ÎÉÝÏ ÐÏ×ÅÞÅ, ÚÁ ÄÁ ÇÏ ÚÁÄßÒÖÉÔÅ. -ðÒÏÓÔÏ ÐÒÏÄßÌÖÅÔÅ Ó ÒÅÄÁËÔÉÒÁÎÅÔÏ, ÏÓÔÁ×ÑÊËÉ ÉÚ×ÁÄÅÎÉÑ ÔÅËÓÔ ËßÄÅÔÏ ÓÉ -Å. - -áËÏ ×ß×ÅÄÅÔÅ M-y ÄÏÓÔÁÔßÞÅÎ ÂÒÏÊ ÐßÔÉ ÝÅ ÓÅ ×ßÒÎÅÔÅ × ÎÁÞÁÌÎÏÔÏ -ÐÏÌÏÖÅÎÉÅ (ÐÏÓÌÅÄÎÏÔÏ ÐÒÅÍÁÈ×ÁÎÅ). - ->> ðÒÅÍÁÈÎÅÔÅ ÒÅÄ, ÐÒÉÄ×ÉÖÅÔÅ ÓÅ ÎÑËßÄÅ, ÐÒÅÍÁÈÎÅÔÅ ÄÒÕÇ ÒÅÄ. - éÚÐßÌÎÅÔÅ C-y ÚÁ ÄÁ ×ßÒÎÅÔÅ ÏÂÒÁÔÎÏ ×ÔÏÒÉÑ ÐÒÅÍÁÈÎÁÔ ÒÅÄ. - éÚÐßÌÎÅÔÅ M-y É ÔÏÚÉ ×ßÒÎÁÔ ÔÅËÓÔ ÝÅ ÂßÄÅ ÚÁÍÅÎÅÎ Ó ÐßÒ×ÉÑ - ÐÒÅÍÁÈÎÁÔ ÒÅÄ. - éÚÐßÌÎÅÔÅ ÎÑËÏÌËÏ M-y É ×ÉÖÔÅ ËÁË×Ï ÓÅ ÐÏÌÕÞÁ×Á. éÚÐßÌÎÑ×ÁÊÔÅ ÔÏ×Á - ÄÏËÁÔÏ ×ÔÏÒÉÑÔ ÐÒÅÍÁÈÎÁÔ ÒÅÄ ÓÅ ×ßÒÎÅ, É ÓÌÅÄ ÔÏ×Á ÏÝÅ ÎÑËÏÌËÏ - ÐßÔÉ. - áËÏ ÉÓËÁÔÅ, ÍÏÖÅ ÄÁ ÐÒÏÂ×ÁÔÅ ÄÁ ÄÁÄÅÔÅ ÎÁ M-y ÐÏÌÏÖÉÔÅÌÎÉ É - ÏÔÒÉÃÁÔÅÌÎÉ ÞÉÓÌÏ×É ÁÒÇÕÍÅÎÔÉ. - - -* ïôíñîá --------- - -áËÏ ÎÁÐÒÁ×ÉÔÅ ÐÒÏÍÑÎÁ × ÔÅËÓÔÁ É ÓÌÅÄ ÔÏ×Á ÒÅÛÉÔÅ, ÞÅ ÔÏ×Á Å ÂÉÌÏ -ÇÒÅÛËÁ, ×ÉÅ ÍÏÖÅÔÅ ÄÁ ÏÔÍÅÎÉÔÅ ÐÒÏÍÑÎÁÔÁ Ó ËÏÍÁÎÄÁÔÁ ÚÁ ÏÔÍÅÎÑÎÅ, C-x -u. - -ïÂÉËÎÏ×ÅÎÏ, C-x u ÏÔÍÅÎÑ ÐÒÏÍÅÎÉÔÅ ÎÁÐÒÁ×ÅÎÉ ÏÔ ÅÄÎÁ ËÏÍÁÎÄÁ; ÁËÏ -ÐÏ×ÔÁÒÑÔÅ C-x u ÎÑËÏÌËÏ ÐßÔÉ ÐÏÓÌÅÄÏ×ÁÔÅÌÎÏ, ×ÓÑËÏ ÐÏ×ÔÏÒÅÎÉÅ ÏÔÍÅÎÑ -ÏÝÅ ÅÄÎÁ ËÏÍÁÎÄÁ. - -îÏ ÉÍÁ Ä×Å ÉÚËÌÀÞÅÎÉÑ: ËÏÍÁÎÄÉÔÅ, ËÏÉÔÏ ÎÅ ÐÒÏÍÅÎÑÔ ÔÅËÓÔÁ ÎÅ ÓÅ ÂÒÏÑÔ -(ÔÏ×Á ×ËÌÀÞ×Á ÐÒÉÄ×ÉÖ×ÁÎÅÔÏ ÎÁ ËÕÒÓÏÒÁ É ÓËÒÏÌÉÒÁÝÉÔÅ ËÏÍÁÎÄÉ), É -ÓÁÍÏ×ÍßË×ÁÝÉÔÅ ÓÅ ÚÎÁÃÉ ÏÂÉËÎÏ×ÅÎÏ ÓÅ ÏÂÒÁÂÏÔ×ÁÔ ÎÁ ÇÒÕÐÉ, ×ÓÑËÁ ÄÏ 20 -ÚÎÁËÁ. (ôÏ×Á ÎÁÍÁÌÑ×Á ÂÒÏÑ ÎÁ C-x u, ËÏÉÔÏ ÔÒÑÂ×Á ÄÁ ×ß×ÅÄÅÔÅ ÚÁ ÄÁ -ÏÔÍÅÎÉÔÅ ×ß×ÅÄÅÎ ÔÅËÓÔ.) - ->> ðÒÅÍÁÈÎÅÔÅ ÔÏÚÉ ÒÅÄ Ó C-k, ÓÌÅÄ ÔÏ×Á ×ß×ÅÄÅÔÅ C-x u É ÔÏÊ ÔÒÑÂ×Á ÄÁ - ÓÅ ÐÏÑ×É ÏÔÎÏ×Ï. - -C-_ Å ÁÌÔÅÒÎÁÔÉ×ÎÁ ÏÔÍÅÎÑÝÁ ËÏÍÁÎÄÁ; ÔÑ ÒÁÂÏÔÉ ÔÏÞÎÏ ËÁÔÏ C-x u, ÎÏ Å -ÐÏ-ÌÅÓÎÁ ÚÁ ×ß×ÅÖÄÁÎÅ ÎÑËÏÌËÏ ÐßÔÉ ÐÏÓÌÅÄÏ×ÁÔÅÌÎÏ. îÅÄÏÓÔÁÔßËßÔ ÎÁ -C_- Å, ÞÅ ÎÁ ÎÑËÏÉ ËÌÁ×ÉÁÔÕÒÉ ÎÅ Å ÏÞÅ×ÉÄÎÏ ËÁË ÔÒÑÂ×Á ÄÁ ÓÅ ×ß×ÅÄÅ. -úÁÔÏ×Á ÏÓÉÇÕÒÑ×ÁÍÅ É C-x u. îÁ ÎÑËÏÉ ÔÅÒÍÉÎÁÌÉ ÍÏÖÅ ÄÁ ×ß×ÅÄÅÔÅ C-_ Ó -×ß×ÅÖÄÁÎÅ ÎÁ / ÄÏËÁÔÏ ÓÔÅ ÚÁÄßÒÖÁÌÉ CONTROL. - -þÉÓÌÏ× ÁÒÇÕÍÅÎÔ ËßÍ C-_ ÉÌÉ C-x u ÄÅÊÓÔ×Á ËÁÔÏ ÂÒÏÑÞ ÎÁ ÐÏ×ÔÏÒÅÎÉÑÔÁ. - -íÏÖÅ ÄÁ ÏÔÍÅÎÑÔÁ ÉÚÔÒÉ×ÁÎÅ ÎÁ ÔÅËÓÔ ÔÏÞÎÏ ËÁËÔÏ ÏÔÍÅÎÑÔÅ ÐÒÅÍÁÈ×ÁÎÅ ÎÁ -ÔÅËÓÔ. òÁÚÌÉÞÉÅÔÏ ÍÅÖÄÕ ÐÒÅÍÁÈ×ÁÎÅÔÏ ÎÁ ÎÅÝÏ É ÉÚÔÒÉ×ÁÎÅÔÏ ÍÕ -×ßÚÄÅÊÓÔ×Á ÄÁÌÉ ÝÅ ÍÏÖÅ ÄÁ ÇÏ ÉÚ×ÁÄÉÔÅ Ó C-y; ÚÁ ÏÔÍÅÎÑÎÅÔÏ ÎÑÍÁ -ÒÁÚÌÉËÁ ÍÅÖÄÕ Ä×ÁÔÁ ×ÉÄÁ. - - -* æáêìï÷å ---------- - -úÁ ÄÁ ÎÁÐÒÁ×ÉÔÅ ÔÅËÓÔÁ, ËÏÊÔÏ ÒÅÄÁËÔÉÒÁÔÅ, ÐÏÓÔÏÑÎÅÎ, ÔÒÑÂ×Á ÄÁ ÇÏ -ÓÌÏÖÉÔÅ ×ß× ÆÁÊÌ. ÷ ÐÒÏÔÉ×ÅÎ ÓÌÕÞÁÊ ÔÏÊ ÝÅ ÉÚÞÅÚÎÅ, ËÏÇÁÔÏ åÍÁËÓ -ÐÒÉËÌÀÞÉ. úÁ ÄÁ ÓÌÏÖÉÔÅ ×ÁÛÉÑ ÔÅËÓÔ ×ß× ÆÁÊÌ, ÔÒÑÂ×Á ÄÁ "ÎÁÍÅÒÉÔÅ" -ÆÁÊÌÁ ÐÒÅÄÉ ÄÁ ×ß×ÅÖÄÁÔÅ ÔÅËÓÔÁ. (ôÏ×Á ÓßÝÏ ÓÅ ÎÁÒÉÞÁ "ÐÏÓÅÝÁ×ÁÎÅ" ÎÁ -ÆÁÊÌÁ.) - -îÁÍÉÒÁÎÅ ÎÁ ÆÁÊÌ ÏÚÎÁÞÁ×Á, ÞÅ ×ÉÖÄÁÔÅ ÓßÄßÒÖÁÎÉÅÔÏ ÍÕ × åÍÁËÓ. ÷ -ÍÎÏÇÏ ÓÌÕÞÁÉ ÔÏ×Á Å ËÁÔÏ ÄÁ ÒÅÄÁËÔÉÒÁÔÅ ÓÁÍÉÑ ÆÁÊÌ. ïÂÁÞÅ, ÐÒÏÍÅÎÉÔÅ, -ËÏÉÔÏ ÐÒÁ×ÉÔÅ ÉÚÐÏÌÚ×ÁÊËÉ åÍÁËÓ, ÎÅ ÏÓÔÁ×ÁÔ ÐÏÓÔÏÑÎÎÉ ÄÏËÁÔÏ ÎÅ -"ÚÁÐÉÛÅÔÅ" ÆÁÊÌÁ. ôÏ×Á Å ÔÁËÁ ÚÁ ÄÁ ÓÅ ÐÒÅÄÏÔ×ÒÁÔÉ ÏÓÔÁ×ÑÎÅÔÏ ÎÁ -ÐÏÌÕÐÒÏÍÅÎÅÎ ÆÁÊÌ × ÓÉÓÔÅÍÁÔÁ, ËÏÇÁÔÏ ÎÅ ÉÓËÁÔÅ ÔÏ×Á. äÏÒÉ ËÏÇÁÔÏ -ÚÁÐÉÓ×ÁÔÅ, åÍÁËÓ ÏÓÔÁ×Ñ ÎÁÞÁÌÎÉÑ ÆÁÊÌ ÐÏÄ ÐÒÏÍÅÎÅÎÏ ÉÍÅ × ÓÌÕÞÁÊ, ÞÅ -ÐÏ-ËßÓÎÏ ÒÅÛÉÔÅ, ÞÅ ×ÁÛÉÔÅ ÐÒÏÍÅÎÉ ÓÁ ÂÉÌÉ ÇÒÅÛËÁ. - -áËÏ ÐÏÇÌÅÄÎÅÔÅ × ÄßÎÏÔÏ ÎÁ ÅËÒÁÎÁ ÝÅ ×ÉÄÉÔÅ ÒÅÄ, ËÏÊÔÏ ÚÁÐÏÞ×Á É -ÚÁ×ßÒÛ×Á Ó ÔÉÒÅÔÁ É ÚÁÐÏÞ×Á Ó "--:-- TUTORIAL" ÉÌÉ ÎÅÝÏ ÐÏÄÏÂÎÏ. ôÁÚÉ -ÞÁÓÔ ÏÔ ÅËÒÁÎÁ ÐÏËÁÚ×Á ÉÍÅÔÏ ÎÁ ÆÁÊÌÁ, ËÏÊÔÏ ÓÔÅ ÐÏÓÅÔÉÌÉ. ôÏÞÎÏ ÓÅÇÁ -×ÉÅ ÓÔÅ ÐÏÓÅÔÉÌÉ ÆÁÊÌ ÎÁÒÅÞÅÎ "TUTORIAL", ËÏÊÔÏ Å ×ÁÛÅÔÏ ÌÉÞÎÏ -ËÏÐÉÅ-ÞÅÒÎÏ×Á ÎÁ åÍÁËÓ ×ß×ÅÄÅÎÉÅÔÏ. ëÏÇÁÔÏ ÎÁÍÅÒÉÔÅ ÆÁÊÌ × åÍÁËÓ, -ÉÍÅÔÏ ÎÁ ÔÏÚÉ ÆÁÊÌ ÝÅ ÓÅ ÐÏÑ×É ÎÁ ÓßÝÏÔÏ ÍÑÓÔÏ. - -ïÓÏÂÅÎÏÓÔ ËÏÍÁÎÄÁÔÁ ÚÁ ÎÁÍÉÒÁÎÅ ÎÁ ÆÁÊÌ Å, ÞÅ ÔÒÑÂ×Á ÄÁ ËÁÖÅÔÅ ÉÍÅÔÏ -ÎÁ ÆÁÊÌÁ, ËÏÊÔÏ ÉÓËÁÔÅ. îÉÅ ÇÏ ÎÁÒÉÞÁÍÅ "ÞÅÔÅÎÅ ÎÁ ÁÒÇÕÍÅÎÔ ÏÔ -ÔÅÒÍÉÎÁÌÁ" (× ÔÏÚÉ ÓÌÕÞÁÊ ÁÒÇÕÍÅÎÔßÔ Å ÉÍÅÔÏ ÎÁ ÆÁÊÌÁ). óÌÅÄ ËÁÔÏ -×ß×ÅÄÅÔÅ ËÏÍÁÎÄÁÔÁ - - C-x C-f îÁÍÉÒÁÎÅ ÎÁ ÆÁÊÌ - -åÍÁËÓ ×É ÐÏÄËÁÎÑ ÄÁ ×ß×ÅÄÅÔÅ ÉÍÅÔÏ ÎÁ ÆÁÊÌÁ. éÍÅÔÏ ÎÁ ÆÁÊÌÁ, ËÏÅÔÏ -ÎÁÐÉÛÅÔÅ, ÓÅ ÐÏÑ×Ñ×Á × ÄßÎÏÔÏ ÎÁ ÅËÒÁÎÁ. òÅÄßÔ × ÄßÎÏÔÏ ÎÁ ÅËÒÁÎÁ ÓÅ -ÎÁÒÉÞÁ ÍÉÎÉÂÕÆÅÒ, ËÏÇÁÔÏ ÓÅ ÉÚÐÏÌÚ×Á ÚÁ ÔÏÚÉ ×ÉÄ ×ÈÏÄ. íÏÖÅÔÅ ÄÁ -ÉÚÐÏÌÚ×ÁÔÅ ÏÂÉËÎÏ×ÅÎÉÔÅ ËÏÍÁÎÄÉ ÚÁ ÒÅÄÁËÔÉÒÁÎÅ ÎÁ åÍÁËÓ ÚÁ ÄÁ -ÒÅÄÁËÔÉÒÁÔÅ ÉÍÅÔÏ ÎÁ ÆÁÊÌÁ. - -ëÏÇÁÔÏ ×ß×ÅÖÄÁÔÅ ÉÍÅÔÏ ÎÁ ÆÁÊÌÁ (ÉÌÉ ËÁËß×ÔÏ É ÄÁ Å ×ÈÏÄ × -ÍÉÎÉÂÕÆÅÒÁ), ÍÏÖÅÔÅ ÄÁ ÐÒÅËÒÁÔÉÔÅ ËÏÍÁÎÄÁÔÁ Ó C-g. - ->> ÷ß×ÅÄÅÔÅ C-x C-f É ÓÌÅÄ ÔÏ×Á C-g. ôÏ×Á ÐÒÅËÒÁÔÑ×Á ÍÉÎÉÂÕÆÅÒÁ, Á - ÓßÝÏ É ËÏÍÁÎÄÁÔÁ C-x C-f, ËÏÑÔÏ ÓÅ ÉÚÐßÌÎÑ×ÁÛÅ × ÍÉÎÉÂÕÆÅÒÁ. ôÁËÁ - ÞÅ ÎÅ ÎÁÍÉÒÁÔÅ ÆÁÊÌ. - -ëÏÇÁÔÏ ÐÒÉËÌÀÞÉÔÅ Ó ×ß×ÅÖÄÁÎÅÔÏ ÎÁ ÉÍÅÔÏ ÎÁ ÆÁÊÌÁ, ×ß×ÅÄÅÔÅ -ÚÁ ÄÁ ÐÏËÁÖÅÔÅ ÔÏ×Á. ôÏÇÁ×Á C-x C-f ÔÒßÇ×Á ÄÁ ÒÁÂÏÔÉ É ÎÁÍÉÒÁ ÆÁÊÌÁ, -ËÏÊÔÏ ÓÔÅ ÉÚÂÒÁÌÉ. íÉÎÉÂÕÆÅÒßÔ ÉÚÞÅÚ×Á, ËÏÇÁÔÏ ËÏÍÁÎÄÁÔÁ C-x C-f -Ó×ßÒÛÉ. - -óÌÅÄ ÍÁÌËÏ ÓßÄßÒÖÁÎÉÅÔÏ ÎÁ ÆÁÊÌÁ ÓÅ ÐÏÑ×Ñ×Á ÎÁ ÅËÒÁÎÁ É ×ÉÅ ÍÏÖÅÔÅ ÄÁ -ÒÅÄÁËÔÉÒÁÔÅ ÓßÄßÒÖÁÎÉÅÔÏ ÍÕ. ëÏÇÁÔÏ ÐÏÖÅÌÁÅÔÅ ÄÁ ÚÁÐÁÚÉÔÅ ×ÁÛÉÔÅ -ÐÒÏÍÅÎÉ ÚÁ ÐÏÓÔÏÑÎÎÏ, ×ß×ÅÄÅÔÅ ËÏÍÁÎÄÁÔÁ - - C-x C-s úÁÐÁÚ×ÁÎÅ ÎÁ ÆÁÊÌÁ - -ôÏ×Á ËÏÐÉÒÁ ÔÅËÓÔÁ ÏÔ åÍÁËÓ ×ß× ÆÁÊÌÁ. ðßÒ×ÉÑÔ ÐßÔ, ËÏÇÁÔÏ ÔÏ×Á ÓÅ -ÎÁÐÒÁ×É, åÍÁËÓ ÐÒÅÉÍÅÎÕ×Á ÎÁÞÁÌÎÉÑ ÆÁÊÌ Ó ÎÏ×Ï ÉÍÅ, ÔÁËÁ ÞÅ ÔÏÊ ÄÁ ÎÅ -ÓÅ ÉÚÇÕÂÉ. îÏ×ÏÔÏ ÉÍÅ ÓÅ ÐÏÓÔÒÏÑ×Á Ó ÄÏÂÁ×ÑÎÅ ÎÁ "~" × ËÒÁÑ ÎÁ ÉÍÅÔÏ -ÎÁ ÎÁÞÁÌÎÉÑ ÆÁÊÌ. - -ëÏÇÁÔÏ ÚÁÐÁÚ×ÁÎÅÔÏ Å Ó×ßÒÛÉÌÏ, åÍÁËÓ ÉÚ×ÅÖÄÁ ÉÍÅÔÏ ÎÁ ÆÁÊÌÁ, ËÏÊÔÏ Å -ÂÉÌ ÚÁÐÉÓÁÎ. ôÒÑÂ×Á ÄÁ ÚÁÐÉÓ×ÁÔÅ ÄÏÓÔÁÔßÞÎÏ ÞÅÓÔÏ, ÔÁËÁ ÞÅ ÄÁ ÎÅ -ÉÚÇÕÂÉÔÅ ÍÎÏÇÏ ÒÁÂÏÔÁ ÁËÏ ÓÉÓÔÅÍÁÔÁ ÓÅ ÓÒÉÎÅ. - ->> ÷ß×ÅÄÅÔÅ C-x C-s, ÚÁÐÁÚ×ÁÊËÉ ×ÁÛÅÔÏ ËÏÐÉÅ ÏÔ ×ß×ÅÄÅÎÉÅÔÏ. - ôÏ×Á ÔÒÑÂ×Á ÄÁ ÉÚ×ÅÄÅ "Wrote ...TUTORIAL" × ÄßÎÏÔÏ ÎÁ ÅËÒÁÎÁ. - -úáâåìåöëá: îÁ ÎÑËÏÉ ÓÉÓÔÅÍÉ ×ß×ÅÖÄÁÎÅÔÏ ÎÁ C-x C-s ÝÅ ÚÁÍÒßÚÉ ÅËÒÁÎÁ É -×ÉÅ ÎÑÍÁ ÄÁ ×ÉÖÄÁÔÅ ÐÏ×ÅÞÅ ÉÚÈÏÄ ÏÔ åÍÁËÓ. ôÏ×Á ÐÏËÁÚ×Á, ÞÅ ÅÄÎÁ -"ÓÐÏÓÏÂÎÏÓÔ" ÎÁ ÏÐÅÒÁÃÉÏÎÎÁÔÁ ÓÉÓÔÅÍÁ ÎÁÒÉÞÁÎÁ "ÕÐÒÁ×ÌÅÎÉÅ ÎÁ ÐÏÔÏËÁ" -(flow control) Å ÐÒÉÈ×ÁÎÁÌÁ C-s É ÎÅ ÇÏ ÐÒÏÐÕÓËÁ ËßÍ åÍÁËÓ. úÁ ÄÁ -ÒÁÚÍÒÁÚÉÔÅ ÅËÒÁÎÁ, ×ß×ÅÄÅÔÅ C-q. ôÏÇÁ×Á ×ÉÖÔÅ ÓÅËÃÉÑÔÁ "óÐÏÎÔÁÎÎÏ -×ËÌÀÞ×ÁÎÅ ÎÁ ÐÏÓÔßÐËÏ×Ï ÔßÒÓÅÎÅ" (Spontaneous Entry to Incremental -Search) × ÒßËÏ×ÏÄÓÔ×ÏÔÏ ÎÁ åÍÁËÓ ÚÁ Óß×ÅÔ ËÁË ÄÁ ÓÅ ÓÐÒÁ×ÉÔÅ Ó ÔÁÚÉ -"ÓÐÏÓÏÂÎÏÓÔ". - -íÏÖÅ ÄÁ ÎÁÍÅÒÉÔÅ ÓßÝÅÓÔ×Õ×ÁÝ ÆÁÊÌ, ÄÁ ÇÏ ÒÁÚÇÌÅÄÁÔÅ É ÄÁ ÇÏ -ÒÅÄÁËÔÉÒÁÔÅ. íÏÖÅÔÅ ÓßÝÏ ÄÁ ÎÁÍÅÒÉÔÅ ÆÁÊÌ, ËÏÊÔÏ ÎÅ ÓßÝÅÓÔ×Õ×Á. ôÏ×Á -Å ÎÁÞÉÎßÔ ÚÁ ÓßÚÄÁ×ÁÎÅ ÎÁ ÎÏ×É ÆÁÊÌÏ×Å × åÍÁËÓ: ÎÁÍÉÒÁÔÅ ÆÁÊÌÁ, ËÏÊÔÏ -ÝÅ ÂßÄÅ × ÎÁÞÁÌÏÔÏ ÐÒÁÚÅÎ, É ÔÏÇÁ×Á ÚÁÐÏÞ×ÁÔÅ ×ÍßË×ÁÎÅÔÏ ÎÁ ÔÅËÓÔÁ ÚÁ -ÆÁÊÌÁ. ëÏÇÁÔÏ ÇÏ×ÏÒÉÔÅ ÚÁ "ÚÁÐÉÓ×ÁÎÅ" ÎÁ ÆÁÊÌÁ, åÍÁËÓ ×ÓßÝÎÏÓÔ ÝÅ -ÓßÚÄÁÄÅ ÆÁÊÌÁ Ó ÔÅËÓÔÁ, ËÏÊÔÏ ÓÔÅ ×ß×ÅÌÉ. ïÔ ÔÁÍ ÎÁÔÁÔßË ÍÏÖÅ ÄÁ -ÓÞÉÔÁÔÅ, ÞÅ ÒÅÄÁËÔÉÒÁÔÅ ×ÅÞÅ ÓßÝÅÓÔ×Õ×ÁÝ ÆÁÊÌ. - - -* âõæåòé --------- - -áËÏ ÎÁÍÅÒÉÔÅ ×ÔÏÒÉ ÆÁÊÌ Ó C-x C-f, ÐßÒ×ÉÑÔ ÆÁÊÌ ÏÓÔÁ×Á × åÍÁËÓ. -íÏÖÅÔÅ ÄÁ ÐÒÅ×ËÌÀÞÉÔÅ ÏÂÒÁÔÎÏ ËßÍ ÎÅÇÏ ËÁÔÏ ÇÏ ÎÁÍÅÒÉÔÅ ÐÁË Ó C-x -C-f. ðÏ ÔÏÚÉ ÎÁÞÉÎ ÍÏÖÅ ÄÁ ÐÏÌÕÞÉÔÅ ÄÏÓÔÁ ÎÁ ÂÒÏÊ ÆÁÊÌÏ×Å × åÍÁËÓ. - ->> óßÚÄÁÊÔÅ ÆÁÊÌ Ó ÉÍÅ "foo" ×ß×ÅÖÄÁÊËÉ C-x C-f foo . - ÷ÍßËÎÅÔÅ ÍÁÌËÏ ÔÅËÓÔ, ÒÅÄÁËÔÉÒÁÊÔÅ ÇÏ É ÇÏ ÚÁÐÁÚÅÔÅ "foo" Ó - ×ß×ÅÖÄÁÎÅ ÎÁ C-x C-s. - îÁËÒÁÑ ×ß×ÅÄÅÔÅ C-x C-f TUTORIAL ÚÁ ÄÁ ÓÅ ×ßÒÎÅÔÅ ÏÂÒÁÔÎÏ - ×ß× ×ß×ÅÄÅÎÉÅÔÏ. - -åÍÁËÓ ÚÁÐÁÚ×Á ÔÅËÓÔÁ ÎÁ ×ÓÅËÉ ÆÁÊÌ × ÏÂÅËÔ ÎÁÒÉÞÁÎ "ÂÕÆÅÒ". -îÁÍÉÒÁÎÅÔÏ ÎÁ ÆÁÊÌ ÐÒÁ×É ÎÏ× ÂÕÆÅÒ × åÍÁËÓ. úÁ ÄÁ ×ÉÄÉÔÅ ÓÐÉÓßË ÎÁ -ÂÕÆÅÒÉÔÅ, ËÏÉÔÏ × ÍÏÍÅÎÔÁ ÓßÝÅÓÔ×Õ×ÁÔ ×ß× ×ÁÛÉÑ åÍÁËÓ, ×ß×ÅÄÅÔÅ - - C-x C-b ðÏËÁÚ×ÁÎÅ ÎÁ ÂÕÆÅÒÉÔÅ - ->> ïÐÉÔÁÊÔÅ C-x C-b ÓÅÇÁ. - -÷ÉÖÔÅ ËÁË ×ÓÅËÉ ÂÕÆÅÒ ÉÍÁ ÉÍÅ, Á ÐÏÎÑËÏÇÁ É ÉÍÅ ÎÁ ÆÁÊÌ ÚÁ ÆÁÊÌÁ, -ÞÉÅÔÏ ÓßÄßÒÖÁÎÉÅ ÄßÒÖÉ. ÷óåëé ÔÅËÓÔ, ËÏÊÔÏ ×ÉÖÄÁÔÅ × åÍÁËÓ ÐÒÏÚÏÒÅÃ, -Å ×ÉÎÁÇÉ ÞÁÓÔ ÏÔ ÎÑËÁËß× ÂÕÆÅÒ. - ->> ÷ß×ÅÄÅÔÅ C-x 1 ÚÁ ÄÁ ÍÁÈÎÅÔÅ ÓÐÉÓßËÁ Ó ÂÕÆÅÒÉÔÅ. - -ëÏÇÁÔÏ ÉÍÁÔÅ ÎÑËÏÌËÏ ÂÕÆÅÒÁ, ÓÁÍÏ ÅÄÉÎ ÏÔ ÔÑÈ Å "ÔÅËÕÝ" × ÄÁÄÅÎ ÍÏÍÅÎÔ -ÏÔ ×ÒÅÍÅ. ôÏ×Á Å ÂÕÆÅÒßÔ, ËÏÊÔÏ ÒÅÄÁËÔÉÒÁÔÅ. áËÏ ÉÓËÁÔÅ ÄÁ -ÒÅÄÁËÔÉÒÁÔÅ ÄÒÕÇ ÂÕÆÅÒ ÓÅ ÎÕÖÄÁÅÔÅ ÏÔ "ÐÒÅ×ËÌÀÞ×ÁÎÅ" ËßÍ ÎÅÇÏ. áËÏ -ÉÓËÁÔÅ ÄÁ ÓÅ ÐÒÅ×ËÌÀÞÉÔÅ ËßÍ ÂÕÆÅÒ, ËÏÊÔÏ ÓßÏÔ×ÅÔÓÔ×Á ÎÁ ÆÁÊÌ, ÍÏÖÅÔÅ -ÄÁ ÇÏ ÎÁÐÒÁ×ÉÔÅ ËÁÔÏ ÐÒÏÓÔÏ ÐÏÓÅÔÉÔÅ ÆÁÊÌÁ ÏÔÎÏ×Ï Ó C-x C-f. îÏ ÉÍÁ É -ÐÏ-ÌÅÓÅÎ ÎÁÞÉÎ: ÉÚÐÏÌÚ×ÁÎÅÔÏ ÎÁ ËÏÍÁÎÄÁÔÁ C-x b. ÷ ÔÁÚÉ ËÏÍÁÎÄÁ -ÔÒÑÂ×Á ÄÁ ×ß×ÅÄÅÔÅ ÉÍÅÔÏ ÎÁ ÂÕÆÅÒÁ. - ->> ÷ß×ÅÄÅÔÅ C-x b foo ÚÁ ÄÁ ÓÅ ×ßÒÎÅÔÅ ËßÍ ÂÕÆÅÒÁ "foo", - ËÏÊÔÏ ÄßÒÖÉ ÔÅËÓÔÁ ÎÁ ÆÁÊÌÁ "foo". ôÏÇÁ×Á ×ß×ÅÄÅÔÅ C-x b TUTORIAL - ÚÁ ÄÁ ÓÅ ×ßÒÎÅÔÅ × ÔÏ×Á ×ß×ÅÄÅÎÉÅ. - -÷ ÐÏ×ÅÞÅÔÏ ÓÌÕÞÁÉ ÉÍÅÔÏ ÎÁ ÂÕÆÅÒÁ Å ÓßÝÏÔÏ ËÁÔÏ ÉÍÅÔÏ ÎÁ ÆÁÊÌÁ (ÂÅÚ -ÞÁÓÔÔÁ × ËÏÑ ÄÉÒÅËÔÏÒÉÑ ÓÅ ÎÁÍÉÒÁ). ïÂÁÞÅ ÔÏ×Á ÎÅ ×ÉÎÁÇÉ Å ×ÑÒÎÏ. -óÐÉÓßËßÔ Ó ÂÕÆÅÒÉÔÅ, ËÏÊÔÏ ÐÒÁ×ÉÔÅ Ó C-x C-b, ×ÉÎÁÇÉ ×É ÐÏËÁÚ×Á ÉÍÅÔÏ -ÎÁ ×ÓÅËÉ ÂÕÆÅÒ. - -÷óåëé ÔÅËÓÔ, ËÏÊÔÏ ×ÉÖÄÁÔÅ × åÍÁËÓ ÐÒÏÚÏÒÅÃ, Å ×ÉÎÁÇÉ ÞÁÓÔ ÏÔ ÎÑËÁËß× -ÂÕÆÅÒ. îÑËÏÉ ÂÕÆÅÒÉ ÎÅ ÓßÏÔ×ÅÔÓÔ×ÁÔ ÎÁ ÆÁÊÌÏ×Å. îÁÐÒÉÍÅÒ, ÂÕÆÅÒßÔ -ÉÍÅÎÕ×ÁÎ "*Buffer List*" ÎÅ ÓßÏÔ×ÅÔÓÔ×Á ÎÁ ÆÁÊÌ. ôÏ×Á Å ÂÕÆÅÒßÔ, -ËÏÊÔÏ ÓßÄßÒÖÁ ÓÐÉÓßËÁ Ó ÂÕÆÅÒÉÔÅ, ËÏÉÔÏ ÓÔÅ ÎÁÐÒÁ×ÉÌÉ Ó C-x C-b. -âÕÆÅÒßÔ ÉÍÅÎÕ×ÁÎ "*Messages*" ÓßÝÏ ÎÅ ÓßÏÔ×ÅÔÓÔ×Á ÎÁ ÆÁÊÌ; ÔÏÊ ÓßÄßÒÖÁ -ÓßÏÂÝÅÎÉÑÔÁ, ËÏÉÔÏ ÓÅ ÐÏÑ×Á×ÁÔ × ÄßÎÏÔÏ ÎÁ ÅËÒÁÎÁ ÐÏ ×ÒÅÍÅ ÎÁ åÍÁËÓ -ÓÅÓÉÑÔÁ. - ->> ÷ß×ÅÄÅÔÅ C-x b *Messages* ÚÁ ÄÁ ×ÉÄÉÔÅ ÂÕÆÅÒÁ ÓßÓ - ÓßÏÂÝÅÎÉÑÔÁ. óÌÅÄ ÔÏ×Á ×ß×ÅÄÅÔÅ C-x C-b TUTORIAL ÚÁ ÄÁ ÓÅ - ×ßÒÎÅÔÅ ËßÍ ÔÏ×Á ×ß×ÅÄÅÎÉÅ. - -áËÏ ÎÁÐÒÁ×ÉÔÅ ÐÒÏÍÅÎÉ × ÔÅËÓÔÁ ÎÁ ÅÄÉÎ ÆÁÊÌ, É ÔÏÇÁ×Á ÎÁÍÅÒÉÔÅ ÄÒÕÇ -ÆÁÊÌ, ÔÏ×Á ÎÑÍÁ ÄÁ ÚÁÐÉÛÅ ÐßÒ×ÉÑ ÆÁÊÌ. îÅÇÏ×ÉÔÅ ÐÒÏÍÅÎÉ ÏÓÔÁ×ÁÔ ×ßÔÒÅ -× åÍÁËÓ, × ÂÕÆÅÒÁ ÎÁ ÆÁÊÌÁ. óßÚÄÁ×ÁÎÅÔÏ ÉÌÉ ÒÅÄÁËÔÉÒÁÎÅÔÏ ÎÁ ÂÕÆÅÒÁ -ÎÁ ×ÔÏÒÉÑ ÆÁÊÌ ÎÑÍÁ ÅÆÅËÔ ×ßÒÈÕ ÂÕÆÅÒÁ ÎÁ ÐßÒ×ÉÑ ÆÁÊÌ. ôÏ×Á Å ÍÎÏÇÏ -ÐÏÌÅÚÎÏ, ÎÏ ÓßÝÏ ÏÚÎÁÞÁ×Á, ÞÅ ÓÅ ÎÕÖÄÁÅÔÅ ÏÔ ÕÄÏÂÅÎ ÎÁÞÉÎ ÄÁ ÚÁÐÁÚÉÔÅ -ÂÕÆÅÒÁ ÎÁ ÐßÒ×ÉÑ ÆÁÊÌ. ýÅ Å ÎÅÕÄÏÂÎÏ ÄÁ ÐÒÅ×ËÌÀÞÉÔÅ ÏÂÒÁÔÎÏ Ó C-x C-f -ÚÁ ÄÁ ÇÏ ÚÁÐÁÚÉÔÅ Ó C-x C-s. ôÁËÁ ÞÅ ÉÍÁÍÅ - - C-x s úÁÐÁÚ×Á ÎÑËÏÉ ÂÕÆÅÒÉ - -C-x s ÐÉÔÁ ÚÁ ×ÓÅËÉ ÂÕÆÅÒ, ËÏÊÔÏ ÓßÄßÒÖÁ ÐÒÏÍÅÎÉ, ËÏÉÔÏ ÎÅ ÓÔÅ -ÚÁÐÁÚÉÌÉ. ÷ßÐÒÏÓßÔ ÚÁ ×ÓÅËÉ ÔÁËß× ÂÕÆÅÒ Å ÄÁÌÉ ÄÁ ÂßÄÅ ÚÁÐÁÚÅÎ. - ->> ÷ÍßËÎÅÔÅ ÒÅÄ × ÔÅËÓÔÁ, ÓÌÅÄ ÔÏ×Á ×ß×ÅÄÅÔÅ C-x s. - ôÒÑÂ×Á ÄÁ ÂßÄÅÔÅ ÐÏÐÉÔÁÎ ÄÁÌÉ ÄÁ ÚÁÐÁÚÉÔÅ ÂÕÆÅÒÁ ÉÍÅÎÕ×ÁÎ TUTORIAL. - ïÔÇÏ×ÏÒÅÔÅ Ó ÄÁ ÎÁ ×ßÐÒÏÓÁ ËÁÔÏ ×ß×ÅÄÅÔÅ "y". - - -* òáúûéòñ÷áîå îá îáâïòá ëïíáîäé -------------------------------- - -éÍÁ ÍÎÏÇÏ, ÍÎÏÇÏ ÐÏ×ÅÞÅ ËÏÍÁÎÄÉ ÎÁ åÍÁËÓ, ÏÔËÏÌËÏÔÏ ÍÏÇÁÔ ÄÁ ÓÅ ÓÌÏÖÁÔ -ÍÁ ×ÓÉÞËÉ ËÏÎÔÒÏÌÎÉ É ÍÅÔÁ ÚÎÁÃÉ. åÍÁËÓ ÚÁÏÂÉËÁÌÑ ÔÏ×Á Ó X (eXtended) -ËÏÍÁÎÄÁÔÁ. ôÏ×Á ÓÔÁ×Á ÐÏ Ä×Á ÎÁÞÉÎÁ: - - C-x úÎÁËÏ×Ï ÒÁÚÛÉÒÑ×ÁÎÅ. ðÏÓÌÅÄ×ÁÎÏ ÏÔ ÅÄÉÎ ÚÎÁË. - M-x òÁÚÛÉÒÑ×ÁÎÅ Ó ÉÍÅÎÕ×ÁÎÁ ËÏÍÁÎÄÁ. ðÏÓÌÅÄ×ÁÎÏ ÏÔ ÄßÌÇÏ - ÉÍÅ. - -ôÅÚÉ ËÏÍÁÎÄÉ ÓÁ ÏÂÝÏ ×ÚÅÔÏ ÐÏÌÅÚÎÉ, ÎÏ ÐÏ-ÍÁÌËÏ ÏÔËÏÌËÏÔÏ ËÏÍÁÎÄÉÔÅ, -ËÏÉÔÏ ÄÏÓÅÇÁ ÓÔÅ ÎÁÕÞÉÌÉ. ÷ÅÞÅ ×ÉÄÑÈÔÅ Ä×Å ÏÔ ÔÑÈ: ËÏÍÁÎÄÉÔÅ ×ßÒÈÕ -ÆÁÊÌÏ×Å C-x C-f ÚÁ ÎÁÍÉÒÁÎÅ (Find) É C-x C-s ÚÁ ÚÁÐÁÚ×ÁÎÅ (Save). -äÒÕÇ ÐÒÉÍÅÒ Å ËÏÍÁÎÄÁÔÁ ÚÁ ËÒÁÊ ÎÁ åÍÁËÓ ÓÅÓÉÑÔÁ -- ÔÏ×Á Å ËÏÍÁÎÄÁÔÁ -C-x C-c. (îÅ ÓÅ ÂÅÚÐÏËÏÊÔÅ, ÞÅ ÍÏÖÅ ÄÁ ÉÚÇÕÂÉÔÅ ×ÓÉÞËÉ ÐÒÏÍÅÎÉ, ËÏÉÔÏ -ÓÔÅ ÎÁÐÒÁ×ÉÌÉ; C-x C-c ÐÒÅÄÌÁÇÁ ÄÁ ÚÁÐÁÚÉ ×ÓÅËÉ ÐÒÏÍÅÎÅÎ ÆÁÊÌ ÐÒÅÄÉ ÄÁ -ÐÒÅÍÁÈÎÅ åÍÁËÓ.) - -C-z Å ËÏÍÁÎÄÁÔÁ ÚÁ ÉÚÌÉÚÁÎÅ ÏÔ åÍÁËÓ *×ÒÅÍÅÎÎÏ* -- ÔÁËÁ ÞÅ ÄÁ ÍÏÖÅÔÅ -ÄÁ ÓÅ ×ßÒÎÅÔÅ ËßÍ ÓßÝÁÔÁ åÍÁËÓ ÓÅÓÉÑ ÐÏ-ËßÓÎÏ. - -îÁ ÓÉÓÔÅÍÉ, ËÏÉÔÏ ÐÏÚ×ÏÌÑ×ÁÔ ÔÏ×Á, C-z "ÉÚÏÓÔÁ×Ñ" (suspend) åÍÁËÓ, -Ô.Å. ×ÒßÝÁ ËßÍ ÏÂ×É×ËÁÔÁ, ÎÏ ÎÅ ÒÁÚÒÕÛÁ×Á åÍÁËÓ. ÷ ÐÏ×ÅÞÅÔÏ ÏÂ×É×ËÉ -ÍÏÖÅÔÅ ÄÁ ÐÒÏÄßÌÖÉÔÅ åÍÁËÓ ÓÅÓÉÑÔÁ Ó ËÏÍÁÎÄÁÔÁ `fg' ÉÌÉ Ó `%emacs'. - -îÁ ÓÉÓÔÅÍÉ, ËÏÉÔÏ ÎÅ ÐÏÚ×ÏÌÑ×ÁÔ ÉÚÏÓÔÁ×ÑÎÅ, C-z ÓßÚÄÁ×Á ÎÏ×Á -ÐÏÄÏÂ×É×ËÁ, ËÏÑÔÏ ×ßÒ×É ÐÏÄ åÍÁËÓ, ÚÁ ÄÁ ×É ÄÁÄÅ ÛÁÎÓ ÄÁ ÓÔÁÒÔÉÒÁÔÅ -ÄÒÕÇÉ ÐÒÏÇÒÁÍÉ É ÄÁ ÓÅ ×ßÒÎÅÔÅ ËßÍ åÍÁËÓ ÓÌÅÄ ÔÏ×Á; ÔÏ×Á ÎÅ Å ÉÓÔÉÎÓËÏ -"ÉÚÌÉÚÁÎÅ" ÏÔ åÍÁËÓ. ÷ ÔÏÚÉ ÓÌÕÞÁÊ ËÏÍÁÎÄÁÔÁ ÎÁ ÏÂ×É×ËÁÔÁ `exit' Å -ÏÂÉËÎÏ×ÅÎÉÑÔ ÎÁÞÉÎ ÄÁ ÓÅ ×ßÒÎÅÔÅ ÏÂÒÁÔÎÏ ËßÍ åÍÁËÓ ÏÔ ÐÏÄÏÂ×É×ËÁÔÁ. - -íÏÍÅÎÔßÔ ÄÁ ÉÚÐÏÌÚ×ÁÔÅ C-x C-c Å, ËÏÇÁÔÏ ÉÓËÁÔÅ ÄÁ ÉÚÌÅÚÅÔÅ ÏÔ -ÓÉÓÔÅÍÁÔÁ. ôÏ×Á Å É ÐÒÁ×ÉÌÎÁÔÁ ËÏÍÁÎÄÁ ÚÁ ÉÚÌÉÚÁÎÅ, ËÏÇÁÔÏ åÍÁËÓ Å -ÉÚ×ÉËÁÎ ÏÔ ÐÏÝÅÎÓËÁ ÐÒÏÇÒÁÍÁ ÉÌÉ ÄÒÕÇÉ ÓÔÒÁÎÉÞÎÉ ÐÒÏÇÒÁÍÉ, ÔßÊ ËÁÔÏ ÔÅ -ÍÏÖÅ É ÄÁ ÎÅ ÚÎÁÑÔ ËÁË ÄÁ ÓÅ ÓÐÒÁ×ÑÔ Ó ÉÚÏÓÔÁ×ÑÎÅÔÏ ÎÁ åÍÁËÓ. ðÒÉ -ÏÂÉËÎÏ×ÅÎÉ ÏÂÓÔÏÑÔÅÌÓÔ×Á, ÏÂÁÞÅ, ÁËÏ ÎÅ ÓÔÅ ÔÒßÇÎÁÌÉ ÄÁ ÉÚÌÉÚÁÔÅ ÏÔ -ÓÉÓÔÅÍÁÔÁ, ÐÏ-ÄÏÂÒÅ Å ÄÁ ÉÚÏÓÔÁ×ÉÔÅ åÍÁËÓ Ó C-z ×ÍÅÓÔÏ ÄÁ ÉÚÌÉÚÁÔÅ ÏÔ -åÍÁËÓ. - -éÍÁ ÍÎÏÇÏ ËÏÍÁÎÄÉ C-x. åÔÏ ÓÐÉÓßË ÎÁ ÔÅÚÉ, ËÏÉÔÏ ÓÔÅ ÎÁÕÞÉÌÉ: - - C-x C-f îÁÍÉÒÁÎÅ ÎÁ ÆÁÊÌ. - C-x C-s úÁÐÁÚ×ÁÎÅ ÎÁ ÆÁÊÌ. - C-x C-b óÐÉÓßË ÎÁ ÂÕÆÅÒÉÔÅ. - C-x C-c éÚÌÉÚÁÎÅ ÏÔ åÍÁËÓ. - C-x 1 éÚÔÒÉ×ÁÎÅ ÎÁ ×ÓÉÞËÉ ÐÒÏÚÏÒÃÉ ÏÓ×ÅÎ ÅÄÉÎ. - C-x u ïÔÍÑÎÁ. - -éÍÅÎÕ×ÁÎÉÔÅ ÒÁÚÛÉÒÅÎÉ ËÏÍÁÎÄÉ ÓÁ ËÏÍÁÎÄÉ, ËÏÉÔÏ ÓÅ ÉÚÐÏÌÚ×ÁÔ ÄÁÖÅ ÏÝÅ -ÐÏ-ÒÑÄËÏ, ÉÌÉ ËÏÍÁÎÄÉ, ËÏÉÔÏ ÓÅ ÉÚÐÏÌÚ×ÁÔ ÓÁÍÏ × ÏÐÒÅÄÅÌÅÎÉ ÒÅÖÉÍÉ. -ðÒÉÍÅÒ Å ËÏÍÁÎÄÁÔÁ replace-string, ËÏÑÔÏ ÚÁÍÅÎÑ ÇÌÏÂÁÌÎÏ ÅÄÉÎ ÎÉÚ Ó -ÄÒÕÇ. ëÏÇÁÔÏ ×ß×ÅÄÅÔÅ M-x, åÍÁËÓ ×É ÐÏÄÓËÁÚ×Á × ÄßÎÏÔÏ ÎÁ ÅËÒÁÎÁ Ó -M-x É ×ÉÅ ÔÒÑÂ×Á ÄÁ ×ß×ÅÄÅÔÅ ÉÍÅÔÏ ÎÁ ËÏÍÁÎÄÁÔÁ, × ÔÏÚÉ ÓÌÕÞÁÊ -"replace-string". ðÒÏÓÔÏ ×ß×ÅÄÅÔÅ "repl s" É åÍÁËÓ ÝÅ ÚÁ×ßÒÛÉ -ÉÍÅÔÏ. ( Å ËÌÁ×ÉÛßÔ Tab, ÏÂÉËÎÏ×ÅÎÏ ÎÁÍÉÒÁÝ ÓÅ ÎÁÄ ËÌÁ×ÉÛÁ -CapsLock ÉÌÉ ËÌÁ×ÉÛÁ Shift ÂÌÉÚÏ ÄÏ ÌÅ×ÉÑ ËÒÁÊ ÎÁ ËÌÁ×ÉÁÔÕÒÁÔÁ.) -úÁ×ßÒÛÅÔÅ ÉÍÅÔÏ ÎÁ ËÏÍÁÎÄÁÔÁ Ó . - -ëÏÍÁÎÄÁÔÁ replace-string ÉÚÉÓË×Á Ä×Á ÁÒÇÕÍÅÎÔÁ -- ÎÉÚßÔ, ËÏÊÔÏ ÝÅ ÂßÄÅ -ÚÁÍÅÎÑÎ, É ÎÉÚßÔ, ËÏÊÔÏ ÝÅ ÇÏ ÚÁÍÅÎÉ. ôÒÑÂ×Á ÄÁ ÚÁ×ßÒÛÉÔÅ ×ß×ÅÖÄÁÎÅÔÏ -ÎÁ ×ÓÅËÉ ÁÒÇÕÍÅÎÔ Ó . - ->> ðÒÉÄ×ÉÖÅÔÅ ËÕÒÓÏÒÁ ÄÏ ÐÒÁÚÎÉÑ ÒÅÄ Ä×Á ÒÅÄÁ ÎÁÄÏÌÕ ÐÏÄ ÔÏÚÉ. - ôÏÇÁ×Á ×ß×ÅÄÅÔÅ M-x repl sÐÒÏÍÅÎÑ - - úÁÂÅÌÅÖÅÔÅ ËÁË ÔÏÚÉ ÒÅÄ ÓÅ ÐÒÏÍÅÎÑ: ×ÉÅ ÚÁÍÅÎÉÈÔÅ ÄÕÍÁÔÁ - Ð-Ò-Ï-Í-Å-Î-Ñ Ó "ÉÚÍÅÎÑ", ËßÄÅÔÏ É ÄÁ ÓÅ ÎÁÍÉÒÁ ÓÌÅÄ ÎÁÞÁÌÎÏÔÏ - ÍÑÓÔÏ ÎÁ ËÕÒÓÏÒÁ. - -úáâåìåöëá: ðÒÅ×ËÌÀÞ×ÁÎÅÔÏ ËßÍ ×ß×ÅÖÄÁÎÅ ÎÁ ËÉÒÉÌÓËÉ ÂÕË×Á ÓÔÁ×Á Ó C-\. - - -* á÷ôïíáôéþîï úáðáú÷áîå ------------------------ - -ëÏÇÁÔÏ ÓÔÅ ÎÁÐÒÁ×ÉÌÉ ÐÒÏÍÅÎÉ ×ß× ÆÁÊÌ, ÎÏ ÏÝÅ ÎÅ ÓÔÏ ÇÏ ÚÁÐÁÚÉÌÉ, ÔÅ -ÍÏÇÁÔ ÄÁ ÂßÄÁÔ ÚÁÇÕÂÅÎÉ ÁËÏ ËÏÍÐÀÔßÒßÔ ×ÎÅÚÁÐÎÏ ÓÅ ÉÚËÌÀÞÉ. úÁ ÄÁ ÓÅ -ÚÁÐÁÚÉÔÅ ÏÔ ÔÁËÉ×Á ÓÉÔÕÁÃÉÉ, åÍÁËÓ ÐÅÒÉÏÄÉÞÎÏ ÚÁÐÁÚ×Á "Á×ÔÏÍÁÔÉÞÎÏ -ÚÁÐÁÚ×ÁÎ" ÆÁÊÌ ÚÁ ×ÓÅËÉ ÆÁÊÌ, ËÏÊÔÏ ÒÅÄÁËÔÉÒÁÔÅ. éÍÅÔÏ ÎÁ Á×ÔÏÍÁÔÉÞÎÏ -ÚÁÐÁÚ×ÁÎÉÑ ÆÁÊÌ ÉÍÁ # × ÎÁÞÁÌÏÔÏ É × ËÒÁÑ; ÎÁÐÒÉÍÅÒ, ÁËÏ ×ÁÛÉÑÔ ÆÁÊÌ Å -Ó ÉÍÅ "hello.c", ÉÍÅÔÏ ÎÁ ÎÅÇÏ×ÉÑ Á×ÔÏÍÁÔÉÞÎÏ ÚÁÐÁÚ×ÁÎ ÆÁÊÌ ÝÅ ÂßÄÅ -"#hello.c#". ëÏÇÁÔÏ ÚÁÐÁÚ×ÁÔÅ ÆÁÊÌ ÐÏ ÏÂÉËÎÏ×ÅÎÉÑ ÎÁÞÉÎ, åÍÁËÓ -ÉÚÔÒÉ×Á ÎÅÇÏ×ÉÑ Á×ÔÏÍÁÔÉÞÎÏ ÚÁÐÉÓ×ÁÎ ÆÁÊÌ. - -áËÏ ËÏÍÐÀÔßÒßÔ ÚÁ×ÉÓÎÅ, ÍÏÖÅ ÄÁ ×ßÚÓÔÁÎÏ×ÉÔÅ ×ÁÛÁÔÁ Á×ÔÏÍÁÔÉÞÎÏ -ÚÁÐÁÚ×ÁÎÁ ÒÅÄÁËÃÉÑ ËÁÔÏ ÎÁÍÅÒÉÔÅ ÆÁÊÌÁ ËÁËÔÏ ÏÂÉËÎÏ×ÅÎÏ (ÆÁÊÌßÔ, ËÏÊÔÏ -ÓÔÅ ÒÅÄÁËÔÉÒÁÌÉ, ÎÅ Á×ÔÏÍÁÔÉÞÎÏ ÚÁÐÁÚ×ÁÎÉÑ) É ÓÌÅÄ ÔÏ×Á ×ß×ÅÄÅÔÅ M-x -recover file. ëÏÇÁÔÏ ËÏÍÁÎÄÁÔÁ ÉÚÉÓËÁ ÐÏÔ×ßÒÖÄÅÎÉÅ, ×ß×ÅÄÅÔÅ -yes ÚÁ ÄÁ ÐÒÏÄßÌÖÉÔÅ É ÄÁ ×ßÚÓÔÁÎÏ×ÉÔÅ Á×ÔÏÍÁÔÉÞÎÏ ÚÁÐÁÚ×ÁÎÉÔÅ -ÄÁÎÎÉ. - - -* åèï ïâìáóôôá --------------- - -áËÏ åÍÁËÓ ×ÉÄÉ, ÞÅ ×ß×ÅÖÄÁÔÅ ÍÎÏÇÏÚÎÁËÏ×É ËÏÍÁÎÄÉ ÂÁ×ÎÏ, ÝÅ ×É ÇÉ -ÐÏËÁÖÅ × ÄßÎÏÔÏ ÎÁ ÅËÒÁÎÁ × ÏÂÌÁÓÔ ÎÁÒÉÞÁÎÁ "ÅÈÏ ÏÂÌÁÓÔ". åÈÏ -ÏÂÌÁÓÔÔÁ ÏÂÈ×ÁÝÁ ÐÏÓÌÅÄÎÉÑ ÒÅÄ ÏÔ ÅËÒÁÎÁ. - - -* òåä îá òåöéíá ---------------- - -òÅÄßÔ ÔÏÞÎÏ ÎÁÄ ÅÈÏ ÏÂÌÁÓÔÔÁ ÓÅ ÎÁÒÉÞÁ "ÒÅÄ ÎÁ ÒÅÖÉÍÁ" (mode line). -ôÏÊ ÐÏËÁÚ×Á ÎÅÝÏ ËÁÔÏ: - ---:** TUTORIAL (Fundamental)--L670--58%---------------- - -ôÏÚÉ ÒÅÄ ÄÁ×Á ÐÏÌÅÚÎÁ ÉÎÆÏÒÍÁÃÉÑ ÚÁ ÓßÓÔÏÑÎÉÅÔÏ ÎÁ åÍÁËÓ É ÔÅËÓÔÁ, -ËÏÊÔÏ ÒÅÄÁËÔÉÒÁÔÅ. - -÷ÅÞÅ ÚÎÁÅÔÅ ËÁË×Ï ÏÚÎÁÞÁ×Á ÉÍÅÔÏ ÎÁ ÆÁÊÌÁ -- ÔÏ×Á Å ÆÁÊÌßÔ, ËÏÊÔÏ ÓÔÅ -ÎÁÍÅÒÉÌÉ. -NN%-- ÐÏËÁÚ×Á ×ÁÛÁÔÁ ÔÅËÕÝÁ ÐÏÚÉÃÉÑ × ÔÅËÓÔÁ; ÔÏ×Á -ÏÚÎÁÞÁ×Á, ÞÅ NN ÐÒÏÃÅÎÔÁ ÏÔ ÔÅËÓÔÁ Å ÎÁÄ ×ßÒÈÁ ÎÁ ÅËÒÁÎÁ. áËÏ -ÎÁÞÁÌÏÔÏ ÎÁ ÆÁÊÌÁ Å ÎÁ ÅËÒÁÎÁ, ÝÅ ÓÅ ÐÏËÁÚ×Á --Top-- (×ÒßÈ) ×ÍÅÓÔÏ ---00%--. áËÏ ËÒÁÑ ÎÁ ÆÁÊÌÁ Å ÎÁ ÅËÒÁÎÁ, ÝÅ ÓÅ ÐÏËÁÚ×Á --Bot-- (ÄßÎÏ). -áËÏ ÇÌÅÄÁÔÅ ÔÅËÓÔ, ËÏÊÔÏ Å ÔÏÌËÏ×Á ÍÁÌßË, ÞÅ ÓÅ ÐÏËÁÚ×Á ÉÚÃÑÌÏ ÎÁ -ÅËÒÁÎÁ, ÒÅÄßÔ ÎÁ ÒÅÖÉÍÁ ÝÅ ÉÚ×ÅÄÅ --All--. - -úÎÁËßÔ L É ÃÉÆÒÉÔÅ ÐÏËÁÚ×ÁÔ ÍÑÓÔÏÔÏ ÐÏ ÄÒÕÇ ÎÁÞÉÎ: ÔÏ×Á Å ÎÏÍÅÒßÔ ÎÁ -ÔÅËÕÝÉÑ ÒÅÄ ÎÁ ÔÏÞËÁÔÁ. - -ú×ÅÚÄÉÔÅ ÂÌÉÚÏ ÄÏ ÎÁÞÁÌÏÔÏ ÏÚÎÁÞÁ×ÁÔ, ÞÅ ÓÔÅ ÎÁÐÒÁ×ÉÌÉ ÐÒÏÍÅÎÉ × -ÔÅËÓÔÁ. ÷ÅÄÎÁÇÁ ÓÌÅÄ ËÁÔÏ ÐÏÓÅÔÉÔÅ ÉÌÉ ÚÁÐÁÚÉÔÅ ÆÁÊÌ ÔÁÚÉ ÞÁÓÔ ÏÔ -ÒÅÄÁ ÎÁ ÒÅÖÉÍÁ ×ÅÞÅ ÎÅ ÐÏËÁÚ×Á Ú×ÅÚÄÉ, Á ÓÁÍÏ ÔÉÒÅÔÁ. - -þÁÓÔÔÁ ÏÔ ÒÅÄÁ ÎÁ ÒÅÖÉÍÁ ×ßÔÒÅ × ÓËÏÂÉÔÅ Å ÚÁ ÄÁ ×É ÐÏËÁÖÅ × ËÁËß× -ÒÅÖÉÍ ÎÁ ÒÅÄÁËÔÉÒÁÎÅ ÓÅ ÎÁÍÉÒÁÔÅ. ðÏÄÒÁÚÂÉÒÁÝÉÑÔ ÓÅ ÒÅÖÉÍ Å -Fundamental (ïÓÎÏ×ÅÎ), ËÏÊÔÏ ÉÚÐÏÌÚ×ÁÔÅ × ÍÏÍÅÎÔÁ. ôÏ×Á Å ÐÒÉÍÅÒ ÚÁ -"ÇÌÁ×ÅÎ ÒÅÖÉÍ" (major mode). - -åÍÁËÓ ÉÍÁ ÍÎÏÇÏ ÇÌÁ×ÎÉ ÒÅÖÉÍÉ. îÑËÏÉ ÏÔ ÔÑÈ ÓÁ ÐÒÅÄ×ÉÄÅÎÉ ÚÁ -ÒÅÄÁËÔÉÒÁÎÅ ÎÁ ÒÁÚÌÉÞÎÉ ÅÚÉÃÉ É/ÉÌÉ ×ÉÄÏ×Å ÔÅËÓÔ, ËÁÔÏ ÎÁÐÒÉÍÅÒ ÒÅÖÉÍ -ìÉÓÐ, ÒÅÖÉÍ ôÅËÓÔ É ÄÒÕÇÉ. ÷ß× ×ÓÅËÉ ÅÄÉÎ ÍÏÍÅÎÔ ÏÔ ×ÒÅÍÅ ÔÏÞÎÏ ÅÄÉÎ -ÇÌÁ×ÅÎ ÒÅÖÉÍ Å ÁËÔÉ×ÅÎ É ÎÅÇÏ×ÏÔÏ ÉÍÅ ÍÏÖÅ ×ÉÎÁÇÉ ÄÁ ÂßÄÅ ÎÁÍÅÒÅÎÏ × -ÒÅÄÁ ÎÁ ÒÅÖÉÍÁ ÔÏÞÎÏ ËÁËÔÏ "Fundamental" ÓÅÇÁ. - -÷ÓÅËÉ ÇÌÁ×ÅÎ ÒÅÖÉÍ ÐÒÁ×É ÎÑËÏÉ ËÏÍÁÎÄÉ ÄÁ ÓÅ ÄßÒÖÁÔ ÐÏ ÒÁÚÌÉÞÅÎ -ÎÁÞÉÎ. îÁÐÒÉÍÅÒ, ÉÍÁ ËÏÍÁÎÄÉ ÚÁ ÒÅÄÁËÔÉÒÁÎÅ ÎÁ ËÏÍÅÎÔÁÒÉ × ÐÒÏÇÒÁÍÉ, -É ÔßÊ ËÁÔÏ ×ÓÅËÉ ÐÒÏÇÒÁÍÅÎ ÅÚÉË ÉÍÁ ÒÁÚÌÉÞÎÁ ÉÄÅÑ ÚÁ ÔÏ×Á ËÁË ÔÒÑÂ×Á -ÄÁ ÉÚÇÌÅÖÄÁÔ ËÏÍÅÎÔÁÒÉÔÅ, ×ÓÅËÉ ÇÌÁ×ÅÎ ÒÅÖÉÍ ÔÒÑÂ×Á ÄÁ ×ÍßË×Á -ËÏÍÅÎÔÁÒÉ ÐÏ ÒÁÚÌÉÞÅÎ ÎÁÞÉÎ. ÷ÓÅËÉ ÇÌÁ×ÅÎ ÒÅÖÉÍ Å ÉÍÅ ÎÁ ÒÁÚÛÉÒÅÎÁ -ËÏÍÁÎÄÁ, Ó ËÏÑÔÏ ÐÒÅ×ËÌÀÞ×ÁÔÅ ËßÍ ÔÏÚÉ ÒÅÖÉÍ. îÁÐÒÉÍÅÒ, M-x -fundamental-mode Å ËÏÍÁÎÄÁ ÚÁ ÐÒÅ×ËÌÀÞ×ÁÎÅ ËßÍ ÒÅÖÉÍ Fundamental. - -ëÏÇÁÔÏ ÒÅÄÁËÔÉÒÁÔÅ ÔÅËÓÔ ÎÁ ÅÓÔÅÓÔ×ÅÎ ÅÚÉË, ËÁÔÏ ÔÏÚÉ ÆÁÊÌ, -ÎÁÊ-×ÅÒÏÑÔÎÏ ÔÒÑÂ×Á ÄÁ ÉÚÐÏÌÚ×ÁÔÅ ÒÅÖÉÍ ôÅËÓÔ. - ->> ÷ß×ÅÄÅÔÅ M-x text mode. - -îÅ ÓÅ ÂÅÚÐÏËÏÊÔÅ, ÎÉËÏÑ ÏÔ åÍÁËÓ ËÏÍÁÎÄÉÔÅ, ËÏÉÔÏ ÓÔÅ ÎÁÕÞÉÌÉ, ÎÑÍÁ ÄÁ -ÓÅ ÐÒÏÍÅÎÉ ÐÏ ÎÑËÁËß× ÓßÝÅÓÔ×ÅÎ ÎÁÞÉÎ. îÏ ÍÏÖÅ ÄÁ ÚÁÂÅÌÅÖÉÔÅ, ÞÅ M-f -É M-b ÓÅÇÁ ×ßÚÐÒÉÅÍÁÔ ÁÐÏÓÔÒÏÆÉÔÅ (') ËÁÔÏ ÞÁÓÔ ÏÔ ÄÕÍÉÔÅ. ðÒÅÄÉ -ÔÏ×Á, × ÏÓÎÏ×ÎÉÑ ÒÅÖÉÍ (Fundamental) M-f É M-b ÓÅ ×ßÚÐÒÉÅÍÁÈÁ ËÁÔÏ -ÒÁÚÄÅÌÉÔÅÌÉ ÎÁ ÄÕÍÉ. - -çÌÁ×ÎÉÔÅ ÒÅÖÉÍÉ ÏÂÉËÎÏ×ÅÎÏ ÐÒÁ×ÑÔ ÍÁÌËÉ ÐÒÏÍÅÎÉ ËÁÔÏ ÔÁÚÉ: ÐÏ×ÅÞÅÔÏ -ËÏÍÁÎÄÉ ×ßÒÛÁÔ "ÓßÝÁÔÁ ÒÁÂÏÔÁ" ×ß× ×ÓÅËÉ ÇÌÁ×ÅÎ ÒÅÖÉÍ, ÎÏ ÒÁÂÏÔÑÔ ÐÏ -ÍÁÌËÏ ÐÏ-ÒÁÚÌÉÞÅÎ ÎÁÞÉÎ. - -úÁ ÄÁ ×ÉÄÉÔÅ ÄÏËÕÍÅÎÔÁÃÉÑÔÁ ÎÁ ×ÁÛÉÑ ÔÅËÕÝ ÇÌÁ×ÅÎ ÒÅÖÉÍ, ×ß×ÅÄÅÔÅ C-h -m. - ->> õÐÏÔÒÅÂÅÔÅ C-u C-v ×ÅÄÎßÖ ÉÌÉ ÐÏ×ÅÞÅ ÐßÔÉ ÚÁ ÄÁ ÄÏËÁÒÁÔÅ ÔÏÚÉ ÒÅÄ - ÂÌÉÚÏ ÄÏ ×ßÒÈÁ ÎÁ ÅËÒÁÎÁ. ->> ÷ß×ÅÄÅÔÅ C-h m, ÚÁ ÄÁ ×ÉÄÉÔÅ ËÁË ÔÅËÓÔÏ×ÉÑÔ ÒÅÖÉÍ ÓÅ ÒÁÚÌÉÞÁ×Á ÏÔ - ÏÓÎÏ×ÎÉÑ ÒÅÖÉÍ. ->> ÷ß×ÅÄÅÔÅ C-x 1 ÚÁ ÄÁ ÐÒÅÍÁÈÎÅÔÅ ÄÏËÕÍÅÎÔÁÃÉÑÔÁ ÏÔ ÅËÒÁÎÁ. - -çÌÁ×ÎÉÔÅ ÒÅÖÉÍÉ ÓÅ ÎÁÒÉÞÁÔ ÇÌÁ×ÎÉ, ÚÁÝÏÔÏ ÉÍÁ É ÍÁÌËÉ ÒÅÖÉÍÉ (minor -modes). íÁÌËÉÔÅ ÒÅÖÉÍÉ ÎÅ ÓÁ ÁÌÔÅÒÎÁÔÉ×É ÎÁ ÇÌÁ×ÎÉÔÅ, Á ÐÒÏÓÔÏ ÍÁÌËÉ -ÐÒÏÍÅÎÉ ËßÍ ÔÑÈ. ÷ÓÅËÉ ÍÁÌßË ÒÅÖÉÍ ÍÏÖÅ ÄÁ ÂßÄÅ ×ËÌÀÞÅÎ ÉÌÉ ÉÚËÌÀÞÅÎ -ÓÁÍ ÚÁ ÓÅÂÅ ÓÉ, ÎÅÚÁ×ÉÓÉÍÏ ÏÔ ×ÓÉÞËÉ ÄÒÕÇÉ ÍÁÌËÉ ÒÅÖÉÍÉ, É ÎÅÚÁ×ÉÓÉÍÏ -ÏÔ ×ÁÛÉÑ ÇÌÁ×ÅÎ ÒÅÖÉÍ. ôÁËÁ ÞÅ ÍÏÖÅ ÄÁ ÎÅ ÉÚÐÏÌÚ×ÁÔÅ ÍÁÌËÉ ÒÅÖÉÍÉ, ÄÁ -ÉÚÐÏÌÚ×ÁÔÅ ÅÄÉÎ ÍÁÌßË ÒÅÖÉÍ, ÉÌÉ ÄÁ ÉÚÐÏÌÚ×ÁÔÅ ÎÑËÁË×Á ËÏÍÂÉÎÁÃÉÑ ÏÔ -ÎÑËÏÌËÏ ÍÁÌËÉ ÒÅÖÉÍÁ. - -åÄÉÎ ÇÌÁ×ÅÎ ÒÅÖÉÍ, ËÏÊÔÏ Å ÍÎÏÇÏ ÐÏÌÅÚÅÎ, ÏÓÏÂÅÎÏ ÚÁ ÒÅÄÁËÔÉÒÁÎÅ ÎÁ -ÔÅËÓÔ ÎÁ ÅÓÔÅÓÔ×ÅÎ ÅÚÉË, Å ÒÅÖÉÍßÔ ÎÁ Á×ÔÏÍÁÔÉÞÎÏ ÚÁÐßÌ×ÁÎÅ (Auto Fill -mode). ëÏÇÁÔÏ ÔÏÚÉ ÒÅÖÉÍ Å ×ËÌÀÞÅÎ, åÍÁËÓ Á×ÔÏÍÁÔÉÞÎÏ ÒÁÚÄÅÌÑ ÒÅÄÁ -ÐÒÉ ÍÑÓÔÏÔÏ ÍÅÖÄÕ ÄÕÍÉÔÅ, ËÏÇÁÔÏ ×ÍßË×ÁÔÅ ÔÅËÓÔ É ÎÁÐÒÁ×ÉÔÅ ÒÅÄ, ËÏÊÔÏ -Å Ô×ßÒÄÅ ÄßÌßÇ. - -íÏÖÅ ÄÁ ×ËÌÀÞÉÔÅ ÒÅÖÉÍÁ ÎÁ Á×ÔÏÍÁÔÉÞÎÏ ÚÁÐßÌ×ÁÎÅ ËÁÔÏ ÉÚÐßÌÎÉÔÅ M-x -auto fill mode. ëÏÇÁÔÏ ÒÅÖÉÍßÔ Å ×ËÌÀÞÅÎ, ÍÏÖÅ ÄÁ ÇÏ -ÉÚËÌÀÞÉÔÅ Ó M-x auto fill mode. áËÏ ÒÅÖÉÍßÔ Å ÉÚËÌÀÞÅÎ, ÔÁÚÉ -ËÏÍÁÎÄÁ ÇÏ ×ËÌÀÞ×Á, Á ÁËÏ Å ×ËÌÀÞÅÎ, ÇÏ ÉÚËÌÀÞ×Á. ëÁÚ×ÁÍÅ, ÞÅ -ËÏÍÁÎÄÁÔÁ "ÏÂÒßÝÁ ÒÅÖÉÍÁ". - ->> ÷ß×ÅÄÅÔÅ M-x auto fill mode ÓÅÇÁ. óÌÅÄ ÔÏ×Á ×ÍßËÎÅÔÅ ÒÅÄ - ÏÔ "asdf " ÏÔÎÏ×Ï É ÏÔÎÏ×Ï ÄÏËÁÔÏ ÎÅ ×ÉÄÉÔÅ, ÞÅ ÔÅËÓÔÁ ÓÅ ÒÁÚÄÅÌÑ - ÎÁ Ä×Á ÒÅÄÁ. ôÒÑÂ×Á ÄÁ ÓÌÁÇÁÔÅ ÉÎÔÅÒ×ÁÌÉ ÍÅÖÄÕ ÄÕÍÉÔÅ, ÚÁÝÏÔÏ - Á×ÔÏÍÁÔÉÞÎÏÔÏ ÚÁÐßÌ×ÁÎÅ ÒÁÚÄÅÌÑ ÒÅÄÏ×ÅÔÅ ÓÁÍÏ ÐÒÉ ÉÎÔÅÒ×ÁÌÉÔÅ. - -çÒÁÎÉÃÁÔÁ ÏÂÉËÎÏ×ÅÎÏ Å ÚÁÄÁÄÅÎÁ ÎÁ 70 ÚÎÁËÁ, ÎÏ ÍÏÖÅÔÅ ÄÁ Ñ ÐÒÏÍÅÎÉÔÅ -Ó ËÏÍÁÎÄÁÔÁ C-x f. ôÒÑÂ×Á ÄÁ ÚÁÄÁ×ÁÔÅ ÔÁÚÉ ÇÒÁÎÉÃÁ ËÁÔÏ ÞÉÓÌÏ× -ÁÒÇÕÍÅÎÔ ÎÁ ËÏÍÁÎÄÁÔÁ. - ->> ÷ß×ÅÄÅÔÅ C-x f Ó ÁÒÇÕÍÅÎÔ 20. (C-u 2 0 C-x f). - óÅÇÁ ×ß×ÅÄÅÔÅ ÎÑËÁËß× ÔÅËÓÔ É ×ÉÖÔÅ ËÁË åÍÁËÓ ÚÁÐßÌ×Á ÒÅÄÏ×ÅÔÅ Ó ÐÏ - ÎÅ ÐÏ×ÅÞÅ ÏÔ 20 ÚÎÁËÁ. ðÏÓÌÅ ×ßÒÎÅÔÅ ÏÂÒÁÔÎÏ ÇÒÁÎÉÃÁÔÁ ÎÁ 70 - ÉÚÐÏÌÚ×ÁÊËÉ C-x f ÏÔÎÏ×Ï. - -áËÏ ÎÁÐÒÁ×ÉÔÅ ÐÒÏÍÅÎÉ × ÓÒÅÄÁÔÁ ÎÁ ÁÂÚÁÃ, ÒÅÖÉÍßÔ ÎÁ Á×ÔÏÍÁÔÉÞÎÏ -ÚÁÐßÌ×ÁÎÅ ÎÑÍÁ ÄÁ ÇÏ ÚÁÐßÌÎÉ ÎÁÎÏ×Ï ÚÁ ×ÁÓ. -úÁ ÄÁ ÚÁÐßÌÎÉÔÅ ÎÁÎÏ×Ï ÁÂÚÁà ×ß×ÅÖÄÁÊÔÅ M-q (META-q) ÄÏËÁÔÏ ËÕÒÓÏÒßÔ Å -×ßÔÒÅ × ÁÂÚÁÃÁ. - ->> ðÒÉÄ×ÉÖÅÔÅ ËÕÒÓÏÒÁ ×ßÔÒÅ × ÐÒÅÄÉÛÎÉÑ ÁÂÚÁÃ É ×ß×ÅÄÅÔÅ M-q. - - -* ôÿòóåîå ---------- - -åÍÁËÓ ÍÏÖÅ ÄÁ ÉÚ×ßÒÛ×Á ÔßÒÓÅÎÉÑ ÎÁ ÎÉÚÏ×Å (ÔÏ×Á ÓÁ ÐÏÓÌÅÄÏ×ÁÔÅÌÎÏÓÔÉ -ÏÔ ÚÎÁÃÉ ÉÌÉ ÄÕÍÉ) ÉÌÉ ÎÁÐÒÅÄ × ÔÅËÓÔÁ ÉÌÉ ÎÁÚÁÄ × ÎÅÇÏ. ôßÒÓÅÎÅÔÏ ÎÁ -ÎÉÚ Å ÐÒÉÄ×ÉÖ×ÁÝÁ ËÕÒÓÏÒÁ ËÏÍÁÎÄÁ; ÔÑ ÐÒÅÍÅÓÔ×Á ËÕÒÓÏÒÁ ÎÁ ÓÌÅÄ×ÁÝÏÔÏ -ÍÑÓÔÏ, ËßÄÅÔÏ ÓÅ ÓÒÅÝÁ ÎÉÚßÔ. - -ëÏÍÁÎÄÁÔÁ ÚÁ ÔßÒÓÅÎÅ ÎÁ åÍÁËÓ ÓÅ ÒÁÚÌÉÞÁ×Á ÏÔ ËÏÍÁÎÄÁÔÁ ÚÁ ÔßÒÓÅÎÅ ÎÁ -ÐÏ×ÅÞÅÔÏ ÒÅÄÁËÔÏÒÉ ÐÏ ÔÏ×Á, ÞÅ ÔÑ Å "ÐÏÓÔßÐËÏ×Á". ôÏ×Á ÏÚÎÁÞÁ×Á, ÞÅ -ÔßÒÓÅÎÅÔÏ ÓÅ ÉÚ×ßÒÛ×Á ÏÝÅ ÄÏËÁÔÏ ×ß×ÅÖÄÁÔÅ ÔÅËÓÔÁ, ËÏÊÔÏ ÔßÒÓÉÔÅ. - -ëÏÍÁÎÄÁÔÁ ÚÁ ÚÁÐÏÞ×ÁÎÅ ÎÁ ÔßÒÓÅÎÅ Å C-s ÚÁ ÔßÒÓÅÎÅ ÎÁÐÒÅÄ, É C-r ÚÁ -ÔßÒÓÅÎÅ ÎÁÚÁÄ. îï ðïþáëáêôå! îÅ ÇÉ ÐÒÏÂ×ÁÊÔÅ ÓÅÇÁ. - -ëÏÇÁÔÏ ×ß×ÅÄÅÔÅ C-s ÝÅ ÚÁÂÅÌÅÖÉÔÅ, ÞÅ ÎÉÚßÔ "I-search" ÓÅ ÐÏÑ×Ñ×Á ËÁÔÏ -ÐÏÄÓËÁÚËÁ × ÅÈÏ ÏÂÌÁÓÔÔÁ. ôÏ×Á ×É ËÁÚ×Á, ÞÅ åÍÁËÓ Å × ÔÏ×Á, ËÏÅÔÏ ÓÅ -ÎÁÒÉÞÁ ÐÏÓÔßÐËÏ×Ï ÔßÒÓÅÎÅ, ÞÁËÁÊËÉ ×É ÄÁ ×ß×ÅÖÄÁÔÅ ÔÅËÓÔÁ, ËÏÊÔÏ -ÉÓËÁÔÅ ÄÁ ÔßÒÓÉÔÅ. ÐÒÉËÌÀÞ×Á ÔßÒÓÅÎÅÔÏ. - ->> óÅÇÁ ×ß×ÅÄÅÔÅ C-s ÚÁ ÄÁ ÚÁÐÏÞÎÅÔÅ ÔßÒÓÅÎÅÔÏ. âá÷îï, ÂÕË×Á ÐÏ - ÂÕË×Á, ×ß×ÅÄÅÔÅ ÄÕÍÁÔÁ "ÔßÒÓÅÎÅ", ÉÚÞÁË×ÁÊËÉ ÓÌÅÄ ×ß×ÅÖÄÁÎÅÔÏ ÎÁ - ×ÓÅËÉ ÚÎÁË, ÚÁ ÄÁ ÍÏÖÅ ÄÁ ÚÁÂÅÌÅÖÉÔÅ ËÁË×Ï ÓÔÁ×Á Ó ËÕÒÓÏÒÁ. óÅÇÁ - ÉÚ×ßÒÛÉÈÔÅ ÔßÒÓÅÎÅ ÎÁ "ÔßÒÓÅÎÅ" ×ÅÄÎßÖ. ->> ÷ß×ÅÄÅÔÅ ÏÔÎÏ×Ï C-s, ÚÁ ÄÁ ÔßÒÓÉÔÅ ÄÒÕÇÏ Óß×ÐÁÄÅÎÉÅ Ó "ÔßÒÓÅÎÅ". ->> óÅÇÁ ×ß×ÅÄÅÔÅ ÔÒÉ ÐßÔÉ É ×ÉÖÔÅ ËÁË ÓÅ ÐÒÉÄ×ÉÖ×Á ËÕÒÓÏÒÁ. ->> ÷ß×ÅÄÅÔÅ ÚÁ ÄÁ ÐÒÅËÒÁÔÉÔÅ ÔßÒÓÅÎÅÔÏ. - -úÁÂÅÌÑÚÁÈÔÅ ÌÉ ËÁË×Ï ÓÔÁÎÁ? åÍÁËÓ, ËÏÇÁÔÏ ÔßÒÓÉ ÐÏÓÔßÐËÏ×Ï, ÓÅ ÏÐÉÔ×Á -ÄÁ ÎÁÍÅÒÉ ÓÌÅÄ×ÁÝÏÔÏ Óß×ÐÁÄÅÎÉÅ ÎÁ ÎÉÚÁ, ËÏÊÔÏ ÓÅ ×ß×ÅÖÄÁ. úÁ ÄÁ -ÏÔÉÄÅÔÅ ÎÁ ÓÌÅÄ×ÁÝÏÔÏ Óß×ÐÁÄÅÎÉÅ ÎÁ "ÔßÒÓÎÅ" ÐÒÏÓÔÏ ÏÔÎÏ×Ï ×ß×ÅÄÅÔÅ -C-s. áËÏ ÎÑÍÁ ÔÁËÏ×Á Óß×ÐÁÄÅÎÉÅ, åÍÁËÓ ÂÉÂÉÐ×Á É ×É ËÁÚ×Á, ÞÅ -ÔßÒÓÅÎÅÔÏ Å "ÐÒÏ×ÁÌÅÎÏ" (failing). C-g ÓßÝÏ ÐÒÅËÒÁÔÑ×Á ÔßÒÓÅÎÅÔÏ. - -úáâåìåöëá: îÁ ÎÑËÏÉ ÓÉÓÔÅÍÉ ×ß×ÅÖÄÁÎÅÔÏ ÎÁ C-s ÝÅ ÚÁÍÒÁÚÉ ÅËÒÁÎÁ É ×ÉÅ -ÎÑÍÁ ÄÁ ÍÏÖÅ ÄÁ ×ÉÄÉÔÅ ÐÏ×ÅÞÅ ÒÅÁËÃÉÑ ÏÔ åÍÁËÓ. ôÏ×Á ÐÏËÁÚ×Á, ÞÅ -"ÓÐÏÓÏÂÎÏÓÔ" ÎÁ ÏÐÅÒÁÃÉÏÎÎÁÔÁ ÓÉÓÔÅÍÁ ÎÁÒÅÞÅÎÁ "ÕÐÒÁ×ÌÅÎÉÅ ÎÁ ÐÏÔÏËÁ" -Å ÐÒÉÈ×ÁÎÁÌÁ C-s É ÎÅ ÇÏ ÐÕÓËÁ ÄÏ åÍÁËÓ. úÁ ÄÁ ÒÁÚÍÒÁÚÉÔÅ ÅËÒÁÎÁ -×ß×ÅÄÅÔÅ C-q. ôÏÇÁ×Á ×ÉÖÔÅ ÓÅËÃÉÑÔÁ "óÐÏÎÔÁÎÎÏ ×ËÌÀÞ×ÁÎÅ ÎÁ -ÐÏÓÔßÐËÏ×ÏÔÏ ÔßÒÓÅÎÅ" (Spontaneous Entry to Incremental Search) × -ÒßËÏ×ÏÄÓÔ×ÏÔÏ ÎÁ åÍÁËÓ ÚÁ Óß×ÅÔ ËÁË ÄÁ ÓÅ ÓÐÒÁ×ÉÔÅ Ó ÔÁÚÉ -"ÓÐÏÓÏÂÎÏÓÔ". - -áËÏ ÓÔÅ × ÓÒÅÄÁÔÁ ÎÁ ÐÏÓÔßÐËÏ×Ï ÔßÒÓÅÎÅ É ×ß×ÅÄÅÔÅ ÝÅ -ÚÁÂÅÌÅÖÉÔÅ, ÞÅ ÐÏÓÌÅÄÎÉÑÔ ÚÎÁË × ÔßÒÓÅÎÉÑ ÎÉÚ ÓÅ ÉÚÔÒÉ×Á É ÔßÒÓÅÎÅÔÏ -ÓÅ ×ÒßÝÁ ËßÍ ÐÏÓÌÅÄÎÏÔÏ ÍÑÓÔÏ ÎÁ ÔßÒÓÅÎÅ. îÁÐÒÉÍÅÒ, ÐÒÅÄÐÏÌÏÖÅÔÅ, ÞÅ -ÓÔÅ ×ß×ÅÌÉ "Ô", ÚÁ ÄÁ ÎÁÍÅÒÉÔÅ ÐßÒ×ÏÔÏ Óß×ÐÁÄÅÎÉÅ Ó "Ô". óÅÇÁ ÁËÏ -×ß×ÅÄÅÔÅ "ß" ËÕÒÓÏÒßÔ ÝÅ ÓÅ ÐÒÉÄ×ÉÖÉ ËßÍ ÐßÒ×ÏÔÏ Óß×ÐÁÄÅÎÉÅ ÎÁ "Ôß". -óÅÇÁ ×ß×ÅÄÅÔÅ . ôÏ×Á ÉÚÔÒÉ×Á ÚÎÁËÁ "ß" ÏÔ ÎÉÚÁ ÚÁ ÔßÒÓÅÎÅ, É -ËÕÒÓÏÒßÔ ÓÅ ÐÒÅÍÅÓÔ×Á ÎÁÚÁÄ ÄÏ ÐßÒ×ÏÔÏ Óß×ÐÁÄÅÎÉÅ Ó "Ô". - -áËÏ ÓÔÅ × ÓÒÅÄÁÔÁ ÎÁ ÔßÒÓÅÎÅ É ×ß×ÅÄÅÔÅ ËÏÎÔÒÏÌÅÎ ÉÌÉ ÍÅÔÁ ÚÎÁË (Ó -ÎÑËÏÌËÏ ÉÚËÌÀÞÅÎÉÑ -- ÚÎÁÃÉÔÅ, ËÏÉÔÏ ÓÁ ÓÐÅÃÉÁÌÎÉ ÐÏ ×ÒÅÍÅ ÎÁ ÔßÒÓÅÎÅ, -ËÁÔÏ C-s É C-r), ÔßÒÓÅÎÅÔÏ ÓÅ ÐÒÅËÒÁÔÑ×Á. - -C-s ÚÁÐÏÞ×Á ÔßÒÓÅÎÅ, ËÏÅÔÏ ÇÌÅÄÁ ÚÁ Óß×ÐÁÄÅÎÉÅ Ó ÎÉÚÁ ÄÁÄÅÎ ÚÁ ÔßÒÓÅÎÅ -óìåä ÔÅËÕÝÏÔÏ ÍÑÓÔÏ ÎÁ ËÕÒÓÏÒÁ. áËÏ ÉÓËÁÔÅ ÄÁ ÔßÒÓÉÔÅ ÎÅÝÏ ÐÏ-ÒÁÎÎÏ -ÏÔ ÔÅËÓÔÁ, ×ÍÅÓÔÏ ÔÏ×Á ×ß×ÅÄÅÔÅ C-r. ÷ÓÉÞËÏ, ËÏÅÔÏ ËÁÚÁÈÍÅ ÚÁ C-s, -×ÁÖÉ É ÚÁ C-r, ÏÓ×ÅÎ ÞÅ ÐÏÓÏËÁÔÁ ÎÁ ÔßÒÓÅÎÅ Å ÏÂßÒÎÁÔÁ. - - -* íîïöåóô÷ï ðòïúïòãé ----------------- - -åÄÎÁ ÏÔ ÐÒÉ×ÌÅËÁÔÅÌÎÉÔÅ ÓÐÏÓÏÂÎÏÓÔÉ ÎÁ åÍÁËÓ Å ÔÁÚÉ, ÞÅ ÍÏÖÅ ÄÁ -ÇÌÅÄÁÔÅ ÐÏ×ÅÞÅ ÏÔ ÅÄÉÎ ÐÒÏÚÏÒÅà ÎÁ ÅËÒÁÎÁ × ÄÁÄÅÎ ÍÏÍÅÎÔ ÏÔ ×ÒÅÍÅ. - ->> ðÒÉÄ×ÉÖÅÔÅ ËÕÒÓÏÒÁ ÄÏ ÔÏÚÉ ÒÅÄ É ×ß×ÅÄÅÔÅ C-u 0 C-l (ÔÏ×Á Å - CONTROL-L, ÎÅ CONTROL-1). - ->> óÅÇÁ ×ß×ÅÄÅÔÅ C-x 2, ËÏÅÔÏ ÝÅ ÒÁÚÄÅÌÉ ÅËÒÁÎÁ ÎÁ Ä×Á ÏÔÄÅÌÎÉ - ÐÒÏÚÏÒÅÃÁ. ä×ÁÔÁ ÐÒÏÚÏÒÅÃÁ ÐÏËÁÚ×ÁÔ ÔÏ×Á ×ß×ÅÄÅÎÉÅ. ëÕÒÓÏÒßÔ - ÏÓÔÁ×Á ÎÁ ÐÏ-ÇÏÒÎÉÑ ÐÒÏÚÏÒÅÃ. - ->> ÷ß×ÅÄÅÔÅ C-M-v ÚÁ ÄÁ ÓËÒÏÌÉÒÁÔÅ ÄÏÌÎÉÑ ÐÒÏÚÏÒÅÃ. (áËÏ ÎÑÍÁÔÅ - ÉÓÔÉÎÓËÉ ËÌÁ×ÉÛ META, ×ß×ÅÄÅÔÅ ESC C-v.) - ->> ÷ß×ÅÄÅÔÅ C-x o ("o" ÏÔ "other" -- "ÄÒÕÇ") ÚÁ ÄÁ ÐÒÉÄ×ÉÖÉÔÅ ËÕÒÓÏÒÁ - × ÄÏÌÎÉÑ ÐÒÏÚÏÒÅÃ. ->> éÚÐÏÌÚ×ÁÊÔÅ C-v É M-v × ÄÏÌÎÉÑ ÐÒÏÚÏÒÅà ÚÁ ÄÁ ÇÏ ÓËÒÏÌÉÒÁÔÅ. - ðÒÏÄßÌÖÅÔÅ ÞÅÔÅÎÅÔÏ ÎÁ ÔÅÚÉ ÎÁÓÏËÉ ÏÔ ×ß×ÅÄÅÎÉÔÅÏ × ÇÏÒÎÉÑ - ÐÒÏÚÏÒÅÃ. - ->> ÷ß×ÅÄÅÔÅ C-x o ÏÔÎÏ×Ï ÚÁ ÄÁ ÐÒÉÄ×ÉÖÉÔÅ ËÕÒÓÏÒÁ ÏÔÎÏ×Ï × ÇÏÒÎÉÑ - ÐÒÏÚÏÒÅÃ. ëÕÒÓÏÒßÔ × ÇÏÒÎÉÑ ÐÒÏÚÏÒÅà ŠÔÏÞÎÏ ÔÁÍ, ËßÄÅÔÏ Å ÂÉÌ - ÐÒÅÄÉ. - -íÏÖÅ ÄÁ ÐÒÏÄßÌÖÉÔÅ ÄÁ ÉÚÐÏÌÚ×ÁÔÅ C-x o ÚÁ ÄÁ ÐÒÅ×ËÌÀÞ×ÁÔÅ ÍÅÖÄÕ -ÐÒÏÚÏÒÃÉÔÅ. ÷ÓÅËÉ ÐÒÏÚÏÒÅà ÉÍÁ ÓÏÂÓÔ×ÅÎÏ ÍÑÓÔÏ ÎÁ ËÕÒÓÏÒÁ, ÎÏ ÓÁÍÏ -ÅÄÉÎ ÐÒÏÚÏÒÅà ÐÏËÁÚ×Á ËÕÒÓÏÒ. ÷ÓÉÞËÉ ÏÂÉËÎÏ×ÅÎÉ ËÏÍÁÎÄÉ ÚÁ -ÒÅÄÁËÔÉÒÁÎÅ ÓÅ ÐÒÉÌÁÇÁÔ × ÐÒÏÚÏÒÅÃÁ, × ËÏÊÔÏ Å ËÕÒÓÏÒßÔ. îÉÅ ÎÁÒÉÞÁÍÅ -ÔÏÚÉ ÐÒÏÚÏÒÅà "ÔÅËÕÝ ÐÒÏÚÏÒÅÃ". - -ëÏÍÁÎÄÁÔÁ C-M-v Å ÍÎÏÇÏ ÐÏÌÅÚÎÁ, ËÏÇÁÔÏ ÒÅÄÁËÔÉÒÁÔÅ ÔÅËÓÔ × ÅÄÉÎ -ÐÒÏÚÏÒÅÃ É ÉÚÐÏÌÚ×ÁÔÅ ÄÒÕÇÉÑ ÐÒÏÚÏÒÅà ÐÒÏÓÔÏ ÚÁ ÓÐÒÁ×ËÁ. íÏÖÅ ÄÁ -ÄßÒÖÉÔÅ ËÕÒÓÏÒÁ ×ÉÎÁÇÉ × ÐÒÏÚÏÒÅÃÁ, ËßÄÅÔÏ ÒÅÄÁËÔÉÒÁÔÅ, É ÄÁ -ÎÁÐÒÅÄ×ÁÔÅ ÐÏÓÌÅÄÏ×ÁÔÅÌÎÏ × ÄÒÕÇÉÑ ÐÒÏÚÏÒÅà ÞÒÅÚ C-M-v. - -C-M-v Å ÐÒÉÍÅÒ ÚÁ ÚÎÁË CONTROL-META. áËÏ ÉÍÁÔÅ ÉÓÔÉÎÓËÉ ËÌÁ×ÉÛ META, -ÍÏÖÅ ÄÁ ×ß×ÅÖÄÁÔÅ C-M-v ÚÁÄßÒÖÁÊËÉ ÅÄÎÏ×ÒÅÍÅÎÎÏ CONTROL É META ÄÏËÁÔÏ -×ß×ÅÖÄÁÔÅ v. îÑÍÁ ÚÎÁÞÅÎÉÅ ÄÁÌÉ CONTROL ÉÌÉ META "Å ÎÁÔÉÓÎÁÔ ÐßÒ×É", -ÚÁÝÏÔÏ É Ä×ÁÔÁ ËÌÁ×ÉÛÁ ÄÅÊÓÔ×ÁÔ ÍÏÄÉÆÉÃÉÒÁÊËÉ ÚÎÁËÁ, ËÏÊÔÏ ÓÔÅ ×ß×ÅÌÉ. - -áËÏ ÎÑÍÁÔÅ ÉÓÔÉÎÓËÉ ËÌÁ×ÉÛ META, É ÉÚÐÏÌÚ×ÁÔÅ ESC ×ÍÅÓÔÏ ÔÏ×Á, ÒÅÄßÔ -ÉÍÁ ÚÎÁÞÅÎÉÅ: ÔÒÑÂ×Á ÄÁ ×ß×ÅÖÄÁÔÅ ESC ÐÏÓÌÅÄ×ÁÎ ÏÔ CONTROL-v, ÚÁÝÏÔÏ -CONTROL-ESC v ÎÑÍÁ ÄÁ ÒÁÂÏÔÉ. ôÏ×Á Å ÔÁËÁ, ÚÁÝÏÔÏ ESC Å ÓÏÂÓÔ×ÅÎ -ÚÎÁË, Á ÎÅ ÍÏÄÉÆÉËÁÔÏÒ. - ->> ÷ß×ÅÄÅÔÅ C-x 1 (× ÇÏÒÎÉÑ ÐÒÏÚÏÒÅÃ) ÚÁ ÄÁ ÍÁÈÎÅÔÅ ÄÏÌÎÉÑ ÐÒÏÚÏÒÅÃ. - -(áËÏ ÓÔÅ ×ß×ÅÌÉ C-x 1 × ÄÏÌÎÉÑ ÐÒÏÚÏÒÅÃ, ÔÏ×Á ÝÅ ÍÁÈÎÅ ÇÏÒÎÉÑ. -íÉÓÌÅÔÅ ÚÁ ÔÁÚÉ ËÏÍÁÎÄÁ ËÁÔÏ "úÁÄÒßÖ ÔÏÞÎÏ ÅÄÉÎ ÐÒÏÚÏÒÅà -- ÔÏÚÉ, × -ËÏÊÔÏ ÓßÍ ÓÅÇÁ".) - -îÑÍÁ ÎÕÖÄÁ ÄÁ ÉÚ×ÅÖÄÁÔÅ ÅÄÉÎ É ÓßÝÉ ÂÕÆÅÒ × Ä×ÁÔÁ ÐÒÏÚÏÒÅÃÁ. áËÏ -ÉÚÐÏÌÚ×ÁÔÅ C-x C-f ÚÁ ÄÁ ÎÁÍÅÒÉÔÅ ÆÁÊÌ × ÅÄÉÎÉÑ ÐÒÏÚÏÒÅÃ, ÄÒÕÇÉÑÔ -ÐÒÏÚÏÒÅà ÎÅ ÓÅ ÐÒÏÍÅÎÑ. íÏÖÅ ÄÁ ÎÁÍÉÒÁÔÅ ÆÁÊÌ ÏÔÄÅÌÎÏ ×ß× ×ÓÅËÉ ÆÁÊÌ. - -åÔÏ ÏÝÅ ÅÄÉÎ ÎÁÞÉÎ ÄÁ ÉÚÐÏÌÚ×ÁÔÅ Ä×Á ÐÒÏÚÏÒÅÃÁ ÚÁ ÄÁ ÐÏËÁÖÅÔÅ Ä×Å -ÒÁÚÌÉÞÎÉ ÎÅÝÁ: - ->> ÷ß×ÅÄÅÔÅ C-x 4 C-f ÐÏÓÌÅÄ×ÁÎÏ ÏÔ ÉÍÅÔÏ ÎÁ ÅÄÉÎ ÏÔ ×ÁÛÉÔÅ ÆÁÊÌÏ×Å. - úÁ×ßÒÛÅÔÅ Ó . ÷ÉÖÔÅ ËÁË ÔÏÚÉ ÆÁÊÌ ÓÅ ÐÏÑ×Ñ×Á × ÄÏÌÎÉÑ - ÐÒÏÚÏÒÅÃ. ëÕÒÓÏÒßÔ ÓßÝÏ ÏÔÉ×Á ÔÁÍ. - ->> ÷ß×ÅÄÅÔÅ C-x o, ÚÁ ÄÁ ÓÅ ×ßÒÎÅÔÅ × ÇÏÒÎÉÑ ÐÒÏÚÏÒÅÃ, É C-x 1 ÚÁ ÄÁ - ÉÚÔÒÉÅÔÅ ÄÏÌÎÉÑ. - - -* ÷ìïöåîé îé÷á îá òåäáëôéòáîå --------------------------------- - -ðÏÎÑËÏÇÁ ÝÅ ÓÅ ÏÚÏ×ÅÔÅ × ÔÏ×Á, ËÏÅÔÏ ÓÅ ÎÁÒÉÞÁ "×ÌÏÖÅÎÏ ÎÉ×Ï ÎÁ -ÒÅÄÁËÔÉÒÁÎÅ" (recursive editing level). ôÏ×Á ÓÅ ÏÔÂÅÌÑÚ×Á ÏÔ -Ë×ÁÄÒÁÔÎÉ ÓËÏÂÉ × ÒÅÄÁ ÎÁ ÒÅÖÉÍÁ, ËÏÉÔÏ ÏÇÒÁÖÄÁÔ ÓËÏÂÉÔÅ ÏËÏÌÏ ÉÍÅÔÏ -ÎÁ ÇÌÁ×ÎÉÑ ÒÅÖÉÍ. îÁÐÒÉÍÅÒ, ÍÏÖÅ ÄÁ ×ÉÄÉÔÅ [(Fundamental)] ×ÍÅÓÔÏ -(Fundamental). - -úÁ ÄÁ ÓÅ ÍÁÈÎÅÔÅ ÏÔ ×ÌÏÖÅÎÏÔÏ ÎÉ×Ï ÎÁ ÒÅÄÁËÔÉÒÁÎÅ, ×ß×ÅÄÅÔÅ ESC ESC -ESC. ôÏ×Á Å ÏÂÝÁ ËÏÍÁÎÄÁ ÚÁ "ÉÚÌÉÚÁÎÅ". íÏÖÅ É ÄÁ Ñ ÉÚÐÏÌÚ×ÁÔÅ ÚÁ -ÍÁÈÁÎÅ ÎÁ ÄÏÐßÌÎÉÔÅÌÎÉ ÐÒÏÚÏÒÃÉ, É ÍÁÈÁÎÅ ÏÔ ÍÉÎÉÂÕÆÅÒÁ. - ->> ÷ß×ÅÄÅÔÅ M-x ÚÁ ÄÁ ×ÌÅÚÅÔÅ × ÍÉÎÉÂÕÆÅÒ; ÔÏÇÁ×Á ×ß×ÅÄÅÔÅ ESC ESC ESC - ÚÁ ÄÁ ÉÚÌÅÚÅÔÅ. - -îÅ ÍÏÖÅÔÅ ÄÁ ÉÚÐÏÌÚ×ÁÔÅ C-g ÚÁ ÄÁ ÉÚÌÅÚÅÔÅ ÏÔ ×ÌÏÖÅÎÏ ÎÉ×Ï ÎÁ -ÒÅÄÁËÔÉÒÁÎÅ. ôÏ×Á Å ÔÁËÁ, ÚÁÝÏÔÏ C-g ÓÅ ÉÚÐÏÌÚ×Á ÚÁ ÐÒÅËÒÁÔÑ×ÁÎÅ ÎÁ -ËÏÍÁÎÄÉ É ÁÒÇÕÍÅÎÔÉ ÷ÿôòå ×ß× ×ÌÏÖÅÎÏ ÎÉ×Ï ÎÁ ÒÅÄÁËÔÉÒÁÎÅ. - - -* ðïìõþá÷áîå îá äïðÿìîéôåìîá ðïíïý ----------------------------------- - -÷ ÔÏ×Á ×ß×ÅÄÅÎÉÅ ÓÅ ÏÐÉÔÁÈÍÅ ÄÁ ÏÓÉÇÕÒÉÍ ÄÏÓÔÁÔßÞÎÏ ÉÎÆÏÒÍÁÃÉÑ, ÚÁ ÄÁ -ÚÁÐÏÞÎÅÔÅ ÄÁ ÉÚÐÏÌÚ×ÁÔÅ åÍÁËÓ. éÍÁ ÔÏÌËÏ×Á ÍÎÏÇÏ ÏÝÅ × åÍÁËÓ, ÞÅ ÎÅ Å -×ßÚÍÏÖÎÏ ÔÏ ÄÁ ÂßÄÅ ÏÂÑÓÎÅÎÏ ×ÓÉÞËÏÔÏ ÔÕË. ïÂÁÞÅ ÍÏÖÅ ÄÁ ÐÏÉÓËÁÔÅ ÄÁ -ÎÁÕÞÉÔÅ ÐÏ×ÅÞÅ ÚÁ åÍÁËÓ, ÔßÊ ËÁÔÏ ÔÏÊ ÐÒÉÔÅÖÁ×Á ÏÝÅ ÍÎÏÇÏ ÐÏÌÅÚÎÉ -ÓÐÏÓÏÂÎÏÓÔÉ. åÍÁËÓ ÉÍÁ ËÏÍÁÎÄÉ ÚÁ ÞÅÔÅÎÅ ÎÁ ÄÏËÕÍÅÎÔÁÃÉÑÔÁ ÎÁ åÍÁËÓ -ËÏÍÁÎÄÉÔÅ. ôÅÚÉ "ÐÏÍÏÝÎÉ" ËÏÍÁÎÄÉ ×ÓÉÞËÉ ÚÁÐÏÞ×ÁÔ ÓßÓ ÚÎÁËÁ -CONTROL-h, ËÏÊÔÏ ÓÅ ÎÁÒÉÞÁ "ÚÎÁËßÔ ÚÁ ÐÏÍÏÝ". - -úÁ ÄÁ ÉÚÐÏÌÚ×ÁÔÅ ÓÐÏÓÏÂÎÏÓÔÉÔÅ ÎÁ ÔÁÚÉ ÐÏÍÏÝ, ×ß×ÅÄÅÔÅ ÚÎÁËÁ C-h, É -ÓÌÅÄ ÔÏ×Á ÚÎÁËÁ, ËÁÚ×ÁÝ ËÁËß× ×ÉÄ ÐÏÍÏÝ ÉÓËÁÔÅ. áËÏ îáéóôéîá ÓÔÅ ÓÅ -ÉÚÇÕÂÉÌÉ ×ß×ÅÄÅÔÅ C-h ? É åÍÁËÓ ÝÅ ×É ËÁÖÅ Ó ËÁË×Ï ÍÏÖÅ ÄÁ ×É -ÐÏÍÏÇÎÅ. áËÏ ÓÔÅ ×ß×ÅÌÉ C-h É ÒÅÛÉÔÅ, ÞÅ ÎÅ ÓÅ ÎÕÖÄÁÅÔÅ ÏÔ ÐÏÍÏÝ, -ÐÒÏÓÔÏ ×ß×ÅÄÅÔÅ C-g ÚÁ ÄÁ Ñ ÐÒÅËÒÁÔÉÔÅ. - -(îÑËÏÉ ËÏÍÐÀÔÒÉ ÐÒÏÍÅÎÑÔ ÚÎÁÞÅÎÉÅÔÏ ÎÁ ÚÎÁËÁ C-h. ôÅ ÎÁÉÓÔÉÎÁ ÎÅ -ÔÒÑÂ×Á ÄÁ ÐÒÁ×ÑÔ ÔÏ×Á ËÁÔÏ ÓÌÑÐÁ ÍÑÒËÁ ÚÁ ×ÓÉÞËÉ ÐÏÔÒÅÂÉÔÅÌÉ, ÔÁËÁ ÞÅ -ÉÍÁÔÅ ÏÓÎÏ×ÁÎÉÅ ÄÁ ÓÅ ÏÐÌÁÞÅÔÅ ÎÁ ÓÉÓÔÅÍÎÉÑ ÁÄÍÉÎÉÓÔÒÁÔÏÒ. íÅÖÄÕ -ÄÒÕÇÏÔÏ, ÁËÏ C-h ÎÅ ÉÚ×ÅÖÄÁ ÓßÏÂÝÅÎÉÅ ÚÁ ÐÏÍÏÝ × ÄßÎÏÔÏ ÎÁ ÅËÒÁÎÁ, -ÏÐÉÔÁÊÔÅ ËÌÁ×ÉÛÁ F1 ÉÌÉ M-x help ×ÍÅÓÔÏ ÔÏ×Á.) - -îÁÊ-ÏÓÎÏ×ÎÁÔÁ ÐÏÍÏÝÎÁ ÓÐÏÓÏÂÎÏÓÔ Å C-h c. ÷ß×ÅÄÅÔÅ C-h, ÚÎÁËÁ c, É -ËÏÍÁÎÄÅÎ ÚÎÁË ÉÌÉ ÐÏÓÌÅÄÏ×ÁÔÅÌÎÏÓÔ ÏÔ ÚÎÁÃÉ ÏÂÒÁÚÕ×ÁÝÁ ËÏÍÁÎÄÁ; ÔÏÇÁ×Á -åÍÁËÓ ÝÅ ÉÚ×ÅÄÅ ÍÎÏÇÏ ËÒÁÔËÏ ÏÐÉÓÁÎÉÅ ÎÁ ËÏÍÁÎÄÁÔÁ. - ->> Type C-h c C-p. - ôÏ×Á ÓßÏÂÝÅÎÉÅ ÔÒÑÂ×Á ÄÁ ÉÚ×ÅÄÅ ÎÅÝÏ ËÁÔÏ - - C-p runs the command previous-line - (C-p ÉÚÐßÌÎÑ×Á ËÏÍÁÎÄÁÔÁ ÐÒÅÄÉÛÅÎ-ÒÅÄ) - -ôÏ×Á ×É ËÁÚ×Á "ÉÍÅÔÏ ÎÁ ÆÕÎËÃÉÑÔÁ". éÍÅÎÁÔÁ ÎÁ ÆÕÎËÃÉÉÔÅ ÓÅ ÉÚÐÏÌÚ×ÁÔ -ÎÁÊ-×ÅÞÅ ÚÁ ÎÁÓÔÒÏÊ×ÁÎÅ É ÒÁÚÛÉÒÑ×ÁÎÅ ÎÁ åÍÁËÓ. îÏ ÔßÊ ËÁÔÏ ÉÍÅÎÁÔÁ -ÎÁ ÆÕÎËÃÉÉÔÅ ÓÁ ÉÚÂÒÁÎÉ ÔÁËÁ, ÞÅ ÄÁ ÐÏËÁÚ×ÁÔ ËÁË×Ï ÐÒÁ×É ËÏÍÁÎÄÁÔÁ, ÔÅ -ÍÏÇÁÔ ÄÁ ÓÌÕÖÁÔ É ÚÁ ÍÎÏÇÏ ËÒÁÔËÁ ÄÏËÕÍÅÎÔÁÃÉÑ -- ÄÏÓÔÁÔßÞÎÁ ÚÁ ÄÁ ×É -ÐÒÉÐÏÍÎÉ ËÏÍÁÎÄÉ, ËÏÉÔÏ ×ÅÞÅ ÓÔÅ ÕÞÉÌÉ. - -íÎÏÇÏÚÎÁËÏ×É ËÏÍÁÎÄÉ, ËÁÔÏ C-x C-s É (ÁËÏ ÎÑÍÁÔÅ ËÌÁ×ÉÛ META ÉÌÉ EDIT -ÉÌÉ ALT) v ÓßÝÏ ÓÁ ÐÏÚ×ÏÌÅÎÉ ÓÌÅÄ C-h c. - -úÁ ÄÁ ÐÏÌÕÞÉÔÅ ÏÝÅ ÉÎÆÏÒÍÁÃÉÑ ÚÁ ËÏÍÁÎÄÁ, ÉÚÐÏÌÚ×ÁÊÔÅ C-h k ×ÍÅÓÔÏ C-h -c. - ->> ÷ß×ÅÄÅÔÅ C-h k C-p. - -ôÏ×Á ÉÚ×ÅÖÄÁ ÄÏËÕÍÅÎÔÁÃÉÑÔÁ ÎÁ ÆÕÎËÃÉÑÔÁ, ËÁËÔÏ É ÎÅÊÎÏÔÏ ÉÍÅ, × -ÏÔÄÅÌÅÎ åÍÁËÓ ÐÒÏÚÏÒÅÃ. ëÏÇÁÔÏ Ñ ÐÒÏÞÅÔÅÔÅ, ×ß×ÅÄÅÔÅ C-x 1 ÚÁ ÄÁ -ÍÁÈÎÅÔÅ ÐÏÍÏÝÎÉÑ ÔÅËÓÔ. îÅ Å ÎÕÖÎÏ ÄÁ ÐÒÁ×ÉÔÅ ÔÏ×Á ÔÏÞÎÏ ÓÅÇÁ. íÏÖÅ -ÄÁ ÒÅÄÁËÔÉÒÁÔÅ ÄÏËÁÔÏ ÓÅ ÏÂÒßÝÁÔÅ ËßÍ ÐÏÍÏÝÎÉÑ ÔÅËÓÔ ÚÁ ÓÐÒÁ×ËÁ, É -ÓÌÅÄ ÔÏ×Á ÄÁ ×ß×ÅÄÅÔÅ C-x 1. - -åÔÏ ÏÝÅ ÎÑËÏÌËÏ ÐÏÌÅÚÎÉ C-h ×ßÚÍÏÖÎÏÓÔÉ: - - C-h f ïÐÉÓ×Á ÆÕÎËÃÉÑ. ôÒÑÂ×Á ÄÁ ×ß×ÅÄÅÔÅ ÉÍÅÔÏ ÎÁ - ÆÕÎËÃÉÑÔÁ. - ->> ïÐÉÔÁÊÔÅ Ó ×ß×ÅÖÄÁÎÅ ÎÁ C-h f previous-line. - ôÏ×Á ÉÚ×ÅÖÄÁ ÃÑÌÁÔÁ ÉÎÆÏÒÍÁÃÉÑ, ËÏÑÔÏ åÍÁËÓ ÚÎÁÅ ÚÁ ÆÕÎËÃÉÑÔÁ, - ËÏÑÔÏ ÏÓßÝÅÓÔ×Ñ×Á ËÏÍÁÎÄÁÔÁ C-p. - -ðÏÄÏÂÎÁ ËÏÍÁÎÄÁ, C-h v, ÉÚ×ÅÖÄÁ ÄÏËÕÍÅÎÔÁÃÉÑÔÁ ÎÁ ÐÒÏÍÅÎÌÉ×ÉÔÅ, ËÏÉÔÏ -ÍÏÖÅ ÄÁ ÐÒÏÍÅÎÑÔÅ, ÚÁ ÄÁ ÎÁÓÔÒÏÊ×ÁÔÅ ÐÏ×ÅÄÅÎÉÅÔÏ ÎÁ åÍÁËÓ. ôÒÑÂ×Á ÄÁ -×ß×ÅÄÅÔÅ ÉÍÅÔÏ ÎÁ ÐÒÏÍÅÎÌÉ×ÁÔÁ, ËÏÇÁÔÏ åÍÁËÓ ×É ÐÏÄÓËÁÖÅ ÔÏ×Á. - - C-h a ëÏÍÁÎÄÁ áÐÒÏÐÏÓ. ÷ß×ÅÖÄÁÔÅ ËÌÀÞÏ×Á ÄÕÍÁ É åÍÁËÓ ÝÅ - ÐÏËÁÖÅ ÓÐÉÓßË ÎÁ ×ÓÉÞËÉ ËÏÍÁÎÄÉ, ÞÉÅÔÏ ÉÍÅ ÓßÄßÒÖÁ - ÔÁÚÉ ËÌÀÞÏ×Á ÄÕÍÁ. ôÅÚÉ ËÏÍÁÎÄÉ ÍÏÇÁÔ ×ÓÉÞËÉ ÄÁ ÂßÄÁÔ - ÉÚ×ÉËÁÎÉ ÞÒÅÚ META-x. úÁ ÎÑËÏÉ ËÏÍÁÎÄÉ ËÏÍÁÎÄÁÔÁ - áÐÒÏÐÏÓ ÝÅ ÉÚ×ÅÄÅ ÄÏÐßÌÎÉÔÅÌÎÏ ÅÄÎÏÚÎÁËÏ×Á ÉÌÉ - Ä×ÕÚÎÁËÏ×Á ÐÏÓÌÅÄÏ×ÁÔÅÌÎÏÓÔ ÏÔ ËÌÁ×ÉÛÉ, ËÏÑÔÏ ÐÕÓËÁÔ - ÓßÝÁÔÁ ËÏÍÁÎÄÁ. - ->> ÷ß×ÅÄÅÔÅ C-h a file. - -ôÏ×Á ÉÚ×ÅÖÄÁ × ÄÒÕÇ ÐÒÏÚÏÒÅà ÓÐÉÓßË ÎÁ ×ÓÉÞËÉ M-x ËÏÍÁÎÄÉ, ËÏÉÔÏ -ÓßÄßÒÖÁÔ "file" × ÔÑÈÎÏÔÏ ÉÍÅ. ýÅ ×ÉÄÉÔÅ ÚÎÁËÏ×É ËÏÍÁÎÄÉ ËÁÔÏ C-x C-f -ÉÚÂÒÏÅÎÉ ÉÚÍÅÖÄÕ ÓßÏÔ×ÅÔÎÉÔÅ ÉÍÅÎÁ ÎÁ ËÏÍÁÎÄÉ, ËÁÔÏ find-file. - ->> ÷ß×ÅÄÅÔÅ C-M-v ÚÁ ÄÁ ÓËÒÏÌÉÒÁÔÅ ÐÏÍÏÝÎÉÑ ÐÒÏÚÏÒÅÃ. îÁÐÒÁ×ÅÔÅ ÇÏ - ÎÑËÏÌËÏ ÐßÔÉ. - ->> ÷ß×ÅÄÅÔÅ C-x 1 ÚÁ ÄÁ ÉÚÔÒÉÅÔÅ ÐÏÍÏÝÎÉÑ ÐÒÏÚÏÒÅÃ. - - C-h i þÅÔÅÎÅ ÎÁ ÒßËÏ×ÏÄÓÔ×Á (Info). ôÁÚÉ ËÏÍÁÎÄÁ ×É ÐÒÁÝÁ × - ÓÐÅÃÉÁÌÅÎ ÂÕÆÅÒ ÎÁÒÉÞÁÎ `*info*', ËßÄÅÔÏ ÍÏÖÅ ÄÁ - ÞÅÔÅÔÅ ÒßËÏ×ÏÄÓÔ×ÁÔÁ ÎÁ ÉÎÓÔÁÌÉÒÁÎÉÔÅ ×ß× ×ÁÛÁÔÁ - ÓÉÓÔÅÍÁ ÐÁËÅÔÉ. ÷ß×ÅÄÅÔÅ m emacs ÚÁ ÄÁ - ÞÅÔÅÔÅ ÒßËÏ×ÏÄÓÔ×ÏÔÏ ÎÁ åÍÁËÓ. áËÏ ÎÉËÏÇÁ ÐÒÅÄÉ ÔÏ×Á - ÎÅ ÓÔÅ ÉÚÐÏÌÚ×ÁÌÉ Info, ×ß×ÅÄÅÔÅ ? É åÍÁËÓ ÝÅ ×ËÌÀÞÉ - ×ß×ÅÄÅÎÉÅ ÚÁ ×ßÚÍÏÖÎÏÓÔÉÔÅ ÎÁ ÒÅÖÉÍÁ éÎÆÏ. ÷ÅÄÎßÖ ÓÌÅÄ - ËÁÔÏ ÓÔÅ ÐÒÅÍÉÎÁÌÉ ÔÏ×Á ×ß×ÅÄÅÎÉÅ, ÔÒÑÂ×Á ÄÁ ÓÅ - ËÏÎÓÕÌÔÉÒÁÔÅ Ó åÍÁËÓ éÎÆÏ ÒßËÏ×ÏÄÓÔ×ÏÔÏ ËÁÔÏ ×ÁÛÁ - ÏÓÎÏ×ÎÁ ÄÏËÕÍÅÎÔÁÃÉÑ. - - -* ïýå ÷ÿúíïöîïóôé ------------------ - -íÏÖÅ ÄÁ ÎÁÕÞÉÔÅ ÐÏ×ÅÞÅ ÚÁ åÍÁËÓ Ó ÞÅÔÅÎÅ ÎÁ ÎÅÇÏ×ÏÔÏ ÒßËÏ×ÏÄÓÔ×Ï, ÉÌÉ -ËÁÔÏ ËÎÉÇÁ, ÉÌÉ × éÎÆÏ (ÉÚÐÏÌÚ×ÁÊÔÅ ÍÅÎÀÔÏ ÐÏÍÏÝ (Help) ÉÌÉ ×ß×ÅÄÅÔÅ -F10 h r). ä×Å ×ßÚÍÏÖÎÏÓÔÉ, ËÏÉÔÏ ÍÏÖÅ ÄÁ ÖÅÌÁÅÔÅ × ÎÁÞÁÌÏÔÏ, ÓÁ -ÄÏ×ßÒÛ×ÁÎÅ (completion), ËÏÅÔÏ ÓÐÅÓÔÑ×Á ÐÉÓÁÎÅ, É dired, ËÏÊÔÏ -ÏÐÒÏÓÔÑ×Á ÂÏÒÁ×ÅÎÅÔÏ Ó ÆÁÊÌÏ×Å. - -äÏ×ßÒÛ×ÁÎÅÔÏ Å ÎÁÞÉÎ ÄÁ ÉÚÂÑÇ×ÁÔÅ ÎÅÎÕÖÎÏ ÐÉÓÁÎÅ. îÁÐÉÒÍÅÒ, ÁËÏ -ÉÓËÁÔÅ ÄÁ ÐÒÅ×ËÌÀÞÉÔÅ ËßÍ ÂÕÆÅÒÁ *Messages*, ÍÏÖÅ ÄÁ ×ß×ÅÄÅÔÅ C-x b -*M É åÍÁËÓ ÝÅ ÚÁÐßÌÎÉ ÏÓÔÁÎÁÌÁÔÁ ÞÁÓÔ ÏÔ ÉÍÅÔÏ ÎÁ ÂÕÆÅÒÁ, -ÄÏËÏÌËÏÔÏ ÍÏÖÅ ÄÁ ÓÅ ÏÐÒÅÄÅÌÉ ÏÔ ÔÏ×Á, ËÏÊÔÏ ÓÔÅ ×ß×ÅÌÉ. äÏ×ßÒÛ×ÁÎÅÔÏ -Å ÏÐÉÓÁÎÏ × éÎÆÏ-ÒßËÏ×ÏÄÓÔ×ÏÔÏ ÎÁ åÍÁËÓ × ÐÁÒÞÅÔÏ "äÏ×ßÒÛ×ÁÎÅ" -("Completion"). - -Dired ×É ÐÏÚ×ÏÌÑ×Á ÄÁ ÇÌÅÄÁÔÅ ÓÐÉÓßËÁ ÏÔ ÆÁÊÌÏ×Å × ÄÉÒÅËÔÏÒÉÑ (É ËÁÔÏ -×ßÚÍÏÖÎÏÓÔ ÎÅÊÎÉÔÅ ÐÏÄÄÉÒÅËÔÏÒÉÉ), ÄÁ ÓÅ ÐÒÉÄ×ÉÖ×ÁÔÅ × ÔÏÚÉ ÓÐÉÓßË, ÄÁ -ÐÏÓÅÝÁ×ÁÔÅ, ÐÒÅÉÍÅÎÕ×ÁÔÅ, ÉÚÔÒÉ×ÁÔÅ É ÉÚÏÂÝÏ ÄÅÊÓÔ×ÁÔÅ ×ßÒÈÕ -ÆÁÊÌÏ×ÅÔÅ. Dired Å ÏÐÉÓÁÎ × éÎÆÏ-ÒßËÏ×ÏÄÓÔ×ÏÔÏ ÎÁ åÍÁËÓ × ÐÁÒÞÅÔÏ -"Dired". - -òßËÏ×ÏÄÓÔ×ÏÔÏ ÎÁ åÍÁËÓ ÏÐÉÓ×Á ÏÝÅ ÍÎÏÇÏ ÄÒÕÇÉ ×ßÚÍÏÖÎÏÓÔÉ ÎÁ -ÒÅÄÁËÔÏÒÁ. - - -* úáëìàþåîéå ------------- - -úÁÐÏÍÎÅÔÅ, ÚÁ ÄÁ ÉÚÌÅÚÅÔÅ ÂÅÚ×ßÚ×ÒÁÔÎÏ ÏÔ åÍÁËÓ ÉÚÐÏÌÚ×ÁÊÔÅ C-x C-c. -úÁ ÄÁ ÉÚÌÅÚÅÔÅ ×ÒÅÍÅÎÎÏ × ÏÂ×É×ËÁ, ÔÁËÁ ÞÅ ÄÁ ÓÅ ×ßÒÎÅÔÅ × åÍÁËÓ -ÐÏ-ËßÓÎÏ, ÉÚÐÏÌÚ×ÁÊÔÅ C-z. - -ôÏ×Á ×ß×ÅÄÅÎÉÅ Å ÐÒÅÄ×ÉÄÅÎÏ ÄÁ ÂßÄÅ ÒÁÚÂÉÒÁÅÍÏ ÚÁ ×ÓÉÞËÉ ÎÏ×É -ÐÏÔÒÅÂÉÔÅÌÉ, ÔÁËÁ ÞÅ ÁËÏ ÎÁÍÉÒÁÔÅ ÎÅÝÏ ÎÅÑÓÎÏ, ÎÅ ÓÅ ÓÁÍÏÏÂ×ÉÎÑ×ÁÊÔÅ --- ÏÐÌÁÞÅÔÅ ÓÅ! - - -* ëïðéòáîå ----------- - -ôÏ×Á ×ß×ÅÄÅÎÉÅ ÐÒÏÉÚÌÉÚÁ ÏÔ ÄßÌÇÁ ÐÏÒÅÄÉÃÁ ×ß×ÅÄÅÎÉÑ × åÍÁËÓ -ÚÁÐÏÞ×ÁÊËÉ ÏÔ ÅÄÎÏ ÎÁÐÉÓÁÎÏ ÏÔ óÔÀßÒÔ ëÒÁËÒÁÆÔ ÚÁ ÎÁÞÁÌÎÉÑ åÍÁËÓ. - -ôÁÚÉ ×ÅÒÓÉÑ ÎÁ ×ß×ÅÄÅÎÉÅÔÏ, ËÁËÔÏ É çîõ åÍÁËÓ, Å ÚÁÝÉÔÅÎÁ Ó Á×ÔÏÒÓËÉ -ÐÒÁ×Á É ÉÄ×Á Ó ÒÁÚÒÅÛÅÎÉÅ ÄÁ ÒÁÚÐÒÏÓÔÒÁÎÑ×ÁÔÅ ËÏÐÉÑ ÐÒÉ ÓÌÅÄÎÉÔÅ -ÕÓÌÏ×ÉÑ: - -This version of the tutorial, like GNU Emacs, is copyrighted, and -comes with permission to distribute copies on certain conditions: - -Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation - - Permission is granted to anyone to make or distribute verbatim copies - of this document as received, in any medium, provided that the - copyright notice and permission notice are preserved, - and that the distributor grants the recipient permission - for further redistribution as permitted by this notice. - - Permission is granted to distribute modified versions - of this document, or of portions of it, - under the above conditions, provided also that they - carry prominent notices stating who last altered them. - -õÓÌÏ×ÉÑÔÁ ÚÁ ËÏÐÉÒÁÎÅ ÎÁ ÓÁÍÉÑ åÍÁËÓ ÓÁ ÐÏ-ÓÌÏÖÎÉ, ÎÏ × ÓßÝÉÑ ÄÕÈ. -íÏÌÑ ÐÒÏÞÅÔÅÔÅ ÆÁÊÌÁ COPYING É ÔÏÇÁ×Á ÄÁ×ÁÊÔÅ ËÏÐÉÑ ÎÁ çîõ åÍÁËÓ ÎÁ -Ó×ÏÉ ÐÒÉÑÔÅÌÉ. ðÏÍÏÇÎÅÔÅ ÄÁ ÓÐÒÅÍ ÚÁÔ×ÏÒÅÎÏÓÔÔÁ ÎÁ ÐÒÏÇÒÁÍÉÔÅ -("ÐÒÉÔÅÖÁÎÉÅÔÏ") ËÁÔÏ ÉÚÐÏÌÚ×ÁÍÅ, ÐÉÛÅÍ É ÓÐÏÄÅÌÑÍÅ Ó×ÏÂÏÄÅÎ ÓÏÆÔÕÅÒ! - -ðÒÅ×ÏÄßÔ ÎÁ ÂßÌÇÁÒÓËÉ Å ÉÚ×ßÒÛÅÎ ÏÔ ïÇÎÑÎ ëÕÌÅ× -. - -;;; Local Variables: -;;; coding: koi8-r -;;; End: \ No newline at end of file +Âèå ãëåäàòå âúâåäåíèåòî íà Åìàêñ. Óñëîâèÿòà çà êîïèðàíå ñà â êðàÿ íà òåêñòà. +Copyright (c) 1985, 1996, 1998, 2001, 2002, 2003 Free Software Foundation. + +Êîìàíäèòå íà Åìàêñ íàé-÷åñòî âêëþ÷âàò êëàâèøèòå CONTROL (ïîíÿêîãà +îòáåëÿçâàí ñ CTRL èëè CTL) è META (ïîíÿêîãà îòáåëÿçâàí ñ EDIT èëè +ALT). Âìåñòî äà ñå èçïèñâàò ñ ïúëíî èìå âñåêè ïúò, íèå ùå èçïîëçâàìå +ñëåäíèòå ñúêðàùåíèÿ: + + C-<çíàê> îçíà÷àâà çàäúðæàíå íà êëàâèøà CONTROL, äîêàòî ñå + íàòèñêà çíàêà <çíàê>. Òàêà C-f ùå îçíà÷àâà: äîêàòî + ñå çàäúðæà íàòèñíàò êëàâèøà CONTROL, ñå íàòèñêà f. + M-<çíàê> îçíà÷àâà çàäúðæàíå íàòèñíàò íà êëàâèøà META (èëè EDIT, + èëè ALT), äîêàòî ñå íàòèñêà <çíàê>. Àêî íÿìà êëàâèø + META, EDIT èëè ALT, âìåñòî íåãî íàòèñíåòå è îòïóñíåòå + êëàâèøà ESC è ñëåä òîâà âúâåäåòå <çíàê>. Íèå + çàïèñâàìå , çà äà îòáåëåæèì êëàâèøà ESC. + +Âàæíà áåëåæêà: â êðàÿ íà Åìàêñ ñåñèÿòà âúâåäåòå äâàòà çíàêà C-x C-c. +Çíàöèòå ">>" îòëÿâî âè äàâàò óêàçàíèå äà èçïúëíèòå êîìàíäà. Íàïðèìåð: +<> +>> Ñåãà âúâåäåòå C-v (Ïîêàæè ñëåäâàùèÿ åêðàí), çà äà ñå ïðèäâèæèòå êúì +ñëåäâàùèÿ åêðàí. + (Íàïðàâåòå ãî ñåãà, çàäðúæòå CONTROL, äîêàòî íàòèñêàòå v). + Îòñåãà íàòàòúê âèå ùå ïðàâèòå òîâà âèíàãè, êîãàòî ïðî÷åòåòå + åêðàíà. + +Çàáåëåæåòå, ÷å èìà ïðèïîêðèâàíå íà äâà ðåäà, êîãàòî ñå ïðèäâèæâàòå îò +åêðàí â åêðàí; òîâà îñèãóðÿâà íÿêàêâà ïðèåìñòâåíîñò, òàêà ÷å äà ìîæåòå +ïî-ëåñíî äà ïðîäúëæèòå ñ ÷åòåíåòî íà òåêñòà. + +Ïúðâîòî íåùî, êîåòî òðÿáâà äà çíàåòå, å êàê äà ñå ïðèäâèæâàòå îò åäíî +ìÿñòî íà òåêñòà êúì äðóãî. Âèå âå÷å çíàåòå êàê äà ñå ïðèäâèæâàòå +åêðàí íàïðåä, ñ C-v. Çà äà ñå ïðèäâèæèòå åêðàí íàçàä, âúâåäåòå M-v +(çàäðúæòå êëàâèøà META è íàòèñíåòå v, èëè âúâåäåòå v, àêî íÿìàòå +êëàâèø META, EDIT èëè ALT). + +>> Îïèòàéòå ñå äà âúâåäåòå M-v è ñëåä òîâà C-v íÿêîëêî ïúòè. + + +* ÎÁÎÁÙÅÍÈÅ +----------- + +Ñëåäâàùèòå êîìàíäè ñà ïîëåçíè ïðè ïúëíîåêðàííî ðàçãëåæäàíå: + + C-v Ïðèäâèæâàíå íàïðåä ñ åäèí åêðàí + M-v Ïðèäâèæâàíå íàçàä ñ åäèí åêðàí + C-l Èç÷èñòâàíå íà åêðàíà è ïðå÷åðòàâàíå íà öåëèÿ òåêñò, + ïðåìåñòâàéêè òåêñòà îêîëî êóðñîðà â ñðåäàòà íà åêðàíà. + (Òîâà å CONTROL-L, íå CONTROL-1.) + +>> Íàìåðåòå êóðñîðà è ñè çàïîìíåòå êàêúâ å òåêñòúò îêîëî íåãî. + Ñëåä òîâà âúâåäåòå C-l. + Íàìåðåòå ïàê êóðñîðà è âèæòå, ÷å ñúùèÿò òåêñò å ïàê îêîëî êóðñîðà. + +Ìîæå ñúùî äà èçïîëçâàòå êëàâèøèòå PageUp è PageDown çà ïðèäâèæâàíå ïî +åêðàíè, àêî âàøèÿò òåðìèíàë ãè ïðèòåæàâà, íî âèå ìîæåòå äà ðåäàêòèðàòå +ïî-åôåêòèâíî, àêî èçïîëçâàòå C-v è M-v. + + +* ÎÑÍÎÂÈ ÍÀ ÓÏÐÀÂËÅÍÈÅÒÎ ÍÀ ÊÓÐÑÎÐÀ +----------------------------------- + +Ïðèäâèæâàíåòî îò åêðàí íà åêðàí å ïîëåçíî, íî êàê äà ñå ïðèäâèæèòå äî +îïðåäåëåíî ìÿñòî âúòðå â òåêñòà íà åêðàíà? + +Èìà íÿêîëêî íà÷èíà äà ãî íàïðàâèòå. Ìîæå äà èçïîëçâàòå êëàâèøèòå +ñòðåëêè, íî å ïî-åôåêòèâíî äà äúðæèòå ðúöåòå ñè â ñòàíäàðòíî ïîëîæåíèå +è äà èçïîëçâàòå êîìàíäèòå C-p, C-b, C-f è C-n. Òåçè çíàöè ñà +åêâèâàëåíòíè íà ÷åòèðèòå êëàâèøè ñòðåëêè, åòî òàêà: + + Ïðåäèøåí ðåä (Previous), C-p + : + : + Íàçàä, C-b .... Òåêóùà ïîçèöèÿ íà êóðñîðà .... Íàïðåä, C-f + (Backward) : (Forward) + : + Ñëåäâàù ðåä (Next), C-n + +>> Ïðèäâèæåòå êóðñîðà äî ðåäà â ñðåäàòà íà òàçè äèàãðàìà, èçïîëçâàéêè + C-n è C-p. Ñëåä òîâà íàòèñíåòå C-l, çà äà âèäèòå öÿëàòà äèàãðàìà, + öåíòðèðàíà íà åêðàíà. + +Ùå íàìåðèòå, ÷å çàïîìíÿíåòî íà òåçè áóêâè ïî äóìèòå íà àíãëèéñêè íà +äåéñòâèÿòà, êîèòî èçâúðøâàò, å ëåñíî: P çà Previous (ïðåäèøåí), N çà +Next (ñëåäâàù), B çà Backward (íàçàä) è F çà Forward (íàïðåä). Âèå ùå +èçïîëçâàòå òåçè îñíîâíè êîìàíäè çà ïðèäâèæâàíå íà êóðñîðà ïðåç öÿëîòî +âðåìå. + +>> Âúâåäåòå íÿêîëêî C-n, çà äà äîâåäåòå êóðñîðà äî òîçè ðåä. + +>> Ïðèäâèæåòå ñå â ðåäà ñ íÿêîëêî C-f è ñëåä òîâà ñ íÿêîëêî C-p. + Âèæòå êàêâî ïðàâè C-p, êîãàòî êóðñîðúò å â ñðåäàòà íà ðåäà. + +Âñåêè ðåä îò òåêñò çàâúðøâà ñúñ çíàê çà íîâ ðåä, êîéòî ñëóæè çà +îòäåëÿíåòî íà ðåäà îò ñëåäâàùèÿ ðåä. Ïîñëåäíèÿò ðåä âúâ âàøèÿ ôàéë +òðÿáâà äà èìà çíàê çà íîâ ðåä â êðàÿ (íî Åìàêñ íå èçèñêâà òàêúâ, +êîãàòî ïðî÷èòà ôàéëà). + +>> Îïèòàéòå C-b â íà÷àëîòî íà ðåä. Òîâà òðÿáâà äà âè ïðèäâèæè â êðàÿ + íà ïðåäèøíèÿ ðåä. Òîâà å òàêà, çàùîòî êóðñîðúò ñå ïðèäâèæâà êúì + çíàêà çà íîâ ðåä íà ïðåäèøíèÿ ðåä. + +C-f ìîæå äà ïðèäâèæâà ïðåç çíàê çà íîâ ðåä òî÷íî êàêòî C-b. + +>> Íàïðàâåòå íÿêîëêî C-b ïðèäâèæâàíèÿ, òàêà ÷å äà äîáèåòå óñåùàíå êúäå + ñå íàìèðà êóðñîðúò. Ñëåä òîâà íÿêîëêî C-f, çà äà ñå âúðíåòå â êðàÿ + íà ðåäà. Ñëåä òîâà îùå íÿêîëêî C-f, çà äà ñå ïðèäâèæèòå äî + ñëåäâàùèÿ ðåä. + +Êîãàòî ñå ïðèäâèæâàòå ñëåä ãîðíèÿ èëè äîëíèÿ êðàé íà åêðàíà, òåêñòúò +îòâúä êðàÿ ñå èçìåñòâà êúì åêðàíà. Òîâà ñå íàðè÷à "ñêðîëèðàíå". Òî +ïîçâîëÿâà íà Åìàêñ äà ïðèäâèæâà êóðñîðà êúì çàäàäåíîòî ìÿñòî â òåêñòà, +áåç äà ãî èçêàðâà èçâúí åêðàíà. + +>> Îïèòàéòå ñå äà ïðèäâèæèòå êóðñîðà ñëåä äîëíèÿ êðàé íà åêðàíà ñ C-n + è âèæòå êàêâî ñå ñëó÷âà. + +Àêî ïðèäâèæâàíåòî ïî çíàöè å òâúðäå áàâíî, ìîæå äà ïðîáâàòå +ïðèäâèæâàíå ïî äóìè. M-f (META-f) ïðèäâèæâà êóðñîðà äóìà íàïðåä, à +M-b ïðèäâèæâà äóìà íàçàä. + +>> Âúâåäåòå íÿêîëêî M-f è M-b. + +Êîãàòî ñòå â ñðåäàòà íà äóìà, M-f ïðèäâèæâà â êðàÿ íà äóìàòà. Êîãàòî +ñòå â ïðàçíî ìÿñòî ìåæäó äóìè, M-f ïðèäâèæâà â êðàÿ íà ñëåäâàùàòà +äóìà. M-b ðàáîòè ïî ïîäîáåí íà÷èí â ïðîòèâîïîëîæíàòà ïîñîêà. + +>> Âúâåäåòå M-f è M-b íÿêîëêî ïúòè, ðàçìåñåíè ñ C-f è C-b, òàêà ÷å äà + ìîæåòå äà íàáëþäàâàòå äåéñòâèåòî íà M-f è M-b â ðàçëè÷íè ìåñòà + âúòðå è ìåæäó äóìèòå. + +Çàáåëåæåòå ïðèëèêàòà ìåæäó C-f è C-b, îò åäíà ñòðàíà, è M-f è M-b, îò +äðóãà. Ìíîãî ÷åñòî Meta-çíàöèòå ñà èçïîëçâàíè çà äåéñòâèÿ âúðõó +åäèíèöè, äåôèíèðàíè îò åçèêà (äóìè, èçðå÷åíèÿ, àáçàöè), äîêàòî +Control-çíàöèòå äåéñòâàò âúðõó îñíîâíè åäèíèöè, êîèòî ñà íåçàâèñèìè îò +òîâà, êàêâî ðåäàêòèðàòå (çíàöè, ðåäîâå è äðóãè). + +Òàçè ïðèëèêà ñå ïðèëàãà âúðõó ðåäîâå è èçðå÷åíèÿ: C-a è C-e ïðèäâèæâàò +äî íà÷àëîòî èëè êðàÿ íà ðåä, à M-a è M-e ïðèäâèæâàò äî íà÷àëîòî è êðàÿ +íà èçðå÷åíèå. + +>> Îïèòàéòå íÿêîëêî C-a, à ñëåä òîâà íÿêîëêî C-e. + Îïèòàéòå íÿêîëêî M-a, à ñëåä òîâà íÿêîëêî M-e. + +Âèæòå êàê ïîâòàðÿíåòî íà C-a íå ïðàâè íèùî, äîêàòî ïîâòàðÿíåòî íà M-a +ïðîäúëæàâà ïðèäâèæâàíåòî ñ îùå åäíî èçðå÷åíèå. Âúïðåêè ÷å òåçè +êëàâèøíè êîìáèíàöèè íå ñà òî÷íî àíàëîãè÷íè, âñÿêà åäíà îò òÿõ èçãëåæäà +åñòåñòâåíà. + +Ïîëîæåíèåòî íà êóðñîðà â òåêñòà ñå íàðè÷à ñúùî "òî÷êà". +Ïåðåôðàçèðàíî, êóðñîðúò ïîêàçâà íà åêðàíà êúäå å ðàçïîëîæåíà òî÷êàòà â +òåêñòà. + +Åòî îáîáùåíèå íà ïðîñòèòå äåéñòâèÿ, äâèæåùè êóðñîðà, âêëþ÷èòåëíî +ïðèäâèæâàùèòå ïî äóìà è èçðå÷åíèå: + + C-f Ïðèäâèæâà íàïðåä ñ åäèí çíàê + C-b Ïðèäâèæâà íàçàä ñ åäèí çíàê + + M-f Ïðèäâèæâà íàïðåä ñ åäíà äóìà + M-b ïðèäâèæâà íàçàä ñ åäíà äóìà + + C-n Ïðèäâèæâà äî ñëåäâàùèÿ ðåä + C-p Ïðèäâèæâà äî ïðåäèøíèÿ ðåä + + C-a Ïðèäâèæâà äî íà÷àëîòî íà ðåä + C-e Ïðèäâèæâà äî êðàÿ íà ðåä + + M-a Ïðèäâèæâà äî íà÷àëîòî íà èçðå÷åíèå + M-e Ïðèäâèæâà äî êðàÿ íà èçðå÷åíèå + +>> Ñåãà îïèòàéòå âñè÷êè òåçè êîìàíäè íÿêîëêî ïúòè çà ïðàêòèêà. Òåçè + ñà íàé-÷åñòî èçïîëçâàíèòå êîìàíäè. + +Äâå äðóãè âàæíè êîìàíäè çà äâèæåíèå íà êóðñîðà ñà M-< (Meta ïî-ìàëêî), +êîÿòî ïðèäâèæâà äî íà÷àëîòî íà öåëèÿ òåêñò, è M-> (Meta ïî-ãîëÿìî), +êîÿòî ïðåìåñòâà äî êðàÿ íà öåëèÿ òåêñò. + +Ïðè ïîâå÷åòî òåðìèíàëè çíàêúò "<" å îòáåëÿçàí íàä çàïåòàÿòà, òàêà ÷å +òðÿáâà äà èçïîëçâàòå êëàâèøà Shift, çà äà ãî íàïèøåòå. Íà òåçè +òåðìèíàëè òðÿáâà äà èçïîëçâàòå Shift, çà äà âúâåäåòå è M-<; áåç êëàâèøà +Shift áèõòå âúâåëè M-çàïåòàÿ. + +>> Îïèòàéòå M-< ñåãà, çà äà ñå ïðèäâèæèòå äî íà÷àëîòî íà âúâåäåíèåòî. + Ñëåä òîâà èçïîëçâàéòå C-v êîëêîòî å íóæíî ïúòè, çà äà ñå ïðèäâèæèòå + äî òóê. + +>> Îïèòàéòå M-> ñåãà, çà äà ñå ïðèäâèæèòå äî êðàÿ íà âúâåäåíèåòî. + Ñëåä òîâà èçïîëçâàéòå M-v êîëêîòî å íóæíî ïúòè, çà äà ñå ïðèäâèæèòå + äî òóê. + +Âèå ìîæåòå ñúùî äà ñå ïðèäâèæâàòå ñ êëàâèøèòå-ñòðåëêè, àêî âàøèÿò +òåðìèíàë èìà òàêèâà. Íèå ïðåïîðú÷âàìå äà íàó÷èòå C-b, C-f, C-n è C-p +ïî òðè ïðè÷èíè. Ïúðâî, òå ðàáîòÿò íà âñè÷êè âèäîâå òåðìèíàëè. Âòîðî, +âåäíúæ ñëåä êàòî äîáèåòå ïðàêòèêà â èçïîëçâàíåòî íà Åìàêñ, ùå +îòêðèåòå, ÷å âúâåæäàíåòî íà òåçè Control-çíàöè å ïî-áúðçî îò +âúâåæäàíåòî íà êëàâèøèòå ñòðåëêè, çàùîòî íå òðÿáâà äà ïðåìåñòâàòå +ðúêàòà ñè äàëå÷ îò îáëàñòòà íà êëàâèøèòå ñ áóêâè. Òðåòî, âåäíúæ ñëåä +êàòî ñè îôîðìèòå íàâèê äà èçïîëçâàòå òåçè êîìàíäè ñ Control çíàöè, âèå +ìîæåòå ñúùî òàêà ëåñíî äà íàó÷èòå ïî-íàïðåäíàëèòå êîìàíäè çà äâèæåíèå +íà êóðñîðà. + +Ïîâå÷åòî Åìàêñ êîìàíäè ïðèåìàò ÷èñëîâ àðãóìåíò; çà ïîâå÷åòî îò òÿõ òîé +ñëóæè êàòî áðîÿ÷ íà ïîâòîðåíèÿ. Íà÷èíúò, ïî êîéòî äàâàòå ÷èñëîâ +áðîÿ÷, å ñ âúâåæäàíå íà C-u, ïîñëåäâàíî îò âúâåæäàíå íà öèôðèòå, è +âñè÷êî òîâà ïðåäè âúâåæäàíå íà ñàìàòà êîìàíäà. Àêî èìàòå êëàâèø META +(èëè EDIT èëè ALT), èìà äðóã, àëòåðíàòèâåí íà÷èí äà âúâåäåòå ÷èñëîâ +àðãóìåíò: âúâåäåòå öèôðèòå, äîêàòî çàäúðæàòå êëàâèøà META. Íèå +ïðåïîðú÷âàìå äà íàó÷èòå íà÷èíà ñ C-u, çàùîòî òîé ðàáîòè íà êîéòî è äà +å òåðìèíàë. ×èñëîâèÿò àðãóìåíò ñå íàðè÷à ñúùî "ïðåôèêñåí àðãóìåíò", +çàùîòî ãî âúâåæäàòå ïðåäè êîìàíäàòà, çà êîÿòî å ïðåäíàçíà÷åí. + +Íàïðèìåð, C-u 8 C-f ïðèäâèæâà îñåì çíàêà íàïðåä. + +>> Îïèòàéòå èçïîëçâàíåòî íà C-n èëè C-p ñ ÷èñëîâ àðãóìåíò, çà äà + ïðèäâèæèòå êóðñîðà äî ðåä, áëèçúê äî òîçè, ñàìî ñ åäíà êîìàíäà. + +Ïîâå÷åòî êîìàíäè èçïîëçâàò ÷èñëîâèÿ àðãóìåíò êàòî áðîÿ÷ íà +ïîâòîðåíèÿòà, íî íÿêîè ãî èçïîëçâàò çà äðóãè öåëè. Íÿêîëêî êîìàíäè +(íî íèêîÿ îò òåçè, êîèòî ñòå íàó÷èëè äîñåãà) ãî èçïîëçâàò êàòî ôëàã -- +ïðèñúñòâèåòî íà ÷èñëîâ àðãóìåíò, íåçàâèñèìî îò ñòîéíîñòà ìó, êàðà +êîìàíäàòà äà âúðøè íåùî ðàçëè÷íî. + +C-v è M-v ñà äðóã âèä èçêëþ÷åíèå. Êîãàòî èì å äàäåí àðãóìåíò, òå +ñêðîëèðàò åêðàíà íàãîðå èëè íàäîëó ñúñ çàäàäåíèÿ áðîé ðåäîâå, âìåñòî ñ +åêðàíè. Íàïðèìåð, C-u 8 C-v ñêðîëèðà åêðàíà ñ 8 ðåäà. + +>> Ñåãà îïèòàéòå C-u 8 C-v. + +Òîâà áè òðÿáâàëî äà ñêðîëèðà åêðàíà ñ 8 ðåäà. Àêî èñêàòå äà +ñêðîëèðàòå îòíîâî íàäîëó, ìîæå äà äàäåòå àðãóìåíò íà M-v. + +Àêî èçïîëçâàòå ãðàôè÷åí èíòåðôåéñ, êàòî X11 èëè MS-Windows, áè +òðÿáâàëî äà èìà òúíêà ïðàâîúãúëíà îáëàñò, íàðå÷åíà ïëúçãà÷ (scroll +bar), â ëÿâàòà ñòðàíà íà ïðîçîðåöà íà Åìàêñ. Âèå ìîæåòå äà ñêðîëèðàòå +òåêñòà, ùðàêàéêè ñ ìèøêàòà â ïëúçãà÷à. + +>> Îïèòàéòå äà íàòèñíåòå ñðåäíèÿ áóòîí íà âúðõà íà îñâåòåíàòà îáëàñò + âúòðå â ïëúçãà÷à. Òîâà áè òðÿáâàëî äà ñêðîëèðà òåêñòà êúì + ïîëîæåíèå, îïðåäåëåíî îò òîâà êîëêî âèñîêî èëè íèñêî ñòå ùðàêíàëè. + +>> Îïèòàéòå ñå äà äâèæèòå ìèøêàòà íàãîðå è íàäîëó, äîêàòî ñòå + çàäúðæàëè äåñíèÿ áóòîí íàòèñíàò. Ùå âèäèòå, ÷å òåêñòúò ñå ñêðîëèðà + íàãîðå è íàäîëó, êàòî äâèæèòå ìèøêàòà. + + +* ÊÎÃÀÒÎ ÅÌÀÊÑ Å ÁËÎÊÈÐÀË +------------------------- + +Àêî Åìàêñ ñïðå äà îòãîâàðÿ íà âàøèòå êîìàíäè, âèå ìîæåòå äà ãî ñïðåòå +áåçîïàñíî, êàòî âúâåäåòå C-g. Ìîæå äà èçïîëçâàòå C-g, çà äà ñïðåòå +êîìàíäà, êîÿòî ñå èçïúëíÿâà òâúðäå äúëãî. + +Ñúùî ìîæåòå äà èçïîëçâàòå C-g, çà äà îòìåíèòå ÷èñëîâ àðãóìåíò èëè +íà÷àëîòî íà êîìàíäà, êîÿòî íå èñêàòå äà çàâúðøèòå. + +>> Âúâåäåòå C-u 100, çà äà íàïðàâèòå ÷èñëîâ àðãóìåíò 100, è âúâåäåòå + C-g. Ñåãà âúâåäåòå C-f. Òðÿáâà äà ñå ïðèäâèæèòå ñ òî÷íî åäèí + çíàê, çàùîòî âèå ïðåêðàòèõòå àðãóìåíòúò ñ C-g. + +Àêî ñòå âúâåëè ïî ïîãðåøêà, ìîæåòå äà ñå èçìúêíåòå ñ C-g. + + +* ÇÀÁÐÀÍÅÍÈ ÊÎÌÀÍÄÈ +------------------- + +Íÿêîè êîìàíäè íà Åìàêñ ñà "çàáðàíåíè", òàêà ÷å íà÷èíàåùèòå ïîòðåáèòåëè +äà íå ìîãàò äà ãè óïîòðåáÿò ïî ïîãðåøêà. + +Àêî âúâåäåòå íÿêîÿ îò çàáðàíåíèòå êîìàíäè, Åìàêñ èçâåæäà ñúîáùåíèå, +êàçâàéêè êàêâà å áèëà êîìàíäàòà è ïèòàéêè âè äàëè èñêàòå äà ïðîäúëæèòå +íàïðåä è äà èçïúëíèòå êîìàíäàòà. + +Àêî íàèñòèíà èñêàòå äà èçïðîáâàòå êîìàíäàòà, âúâåäåòå êëàâèøà èíòåðâàë +â îòãîâîð íà âúïðîñà. Îáèêíîâåíî àêî íå èñêàòå äà èçïúëíèòå +çàáðàíåíàòà êîìàíäà, îòãîâàðÿòå íà âúïðîñà ñ "n". + +>> Âúâåäåòå C-x C-l (êîÿòî å çàáðàíåíà êîìàíäà), è ñëåä òîâà âúâåäåòå + "n" â îòãîâîð íà âúïðîñà. + + +* ÏÐÎÇÎÐÖÈ +---------- + +Åìàêñ ìîæå äà óïðàâëÿâà íÿêîëêî ïðîçîðåöà, âñåêè èçâåæäàéêè ñâîé +ñîáñòâåí òåêñò. Íèå ùå îáÿñíèì ïî-êúñíî êàê äà èçïîëçâàòå íÿêîëêî +ïðîçîðåöà. Òî÷íî ñåãà íèå èñêàìå äà îáÿñíèì êàê äà ñå îòúðâåòå îò +äîïúëíèòåëíè ïðîçîðöè è äà ñå âúðíåòå êúì îñíîâíîòî ðåäàêòèðàíå ñ åäèí +ïðîçîðåö. Ïðîñòî å: + + C-x 1 Åäèí ïðîçîðåö (ò.å. ïðåìàõíè âñè÷êè äðóãè ïðîçîðöè). + +Òîâà å CONTROL-x, ïîñëåäâàí îò öèôðàòà 1. C-x 1 ðàçøèðÿâà ïðîçîðåöà, +ñúäúðæàù êóðñîðà, çà äà ìîæå äà çàïúëíè öåëèÿ åêðàí. Òÿ ïðåìàõâà +âñè÷êè äðóãè ïðîçîðöè. + +>> Ïðèäâèæåòå êóðñîðà äî òîçè ðåä è âúâåäåòå C-u 0 C-l. +>> Âúâåäåòå C-h k C-f. + Âèæòå êàê òîçè ïðîçîðåö ñå ñâèâà, äîêàòî äðóã ñå ïîÿâÿâà, çà äà + èçâåäå äîêóìåíòàöèÿòà íà êîìàíäàòà C-f. + +>> Âúâåäåòå C-x 1 è âèæòå êàê ïðîçîðåöúò ñ äîêóìåíòàöèÿòà èç÷åçâà. + +Òàçè êîìàíäà íå å êàòî äðóãèòå êîìàíäè, êîèòî ñòå íàó÷èëè, â òîâà +îòíîøåíèå, ÷å ñå ñúñòîè îò äâà çíàêà. Çàïî÷âà ñúñ çíàêà C-x. Èìà +öÿëà ðåäèöà îò êîìàíäè, êîèòî çàïî÷âàò ñ C-x; ìíîãî îò òÿõ èìàò íåùî +îáùî ñ ïðîçîðöè, ôàéëîâå, áóôåðè è ñâúðçàíèòå ñ òÿõ íåùà. Òåçè +êîìàíäè ñà îò äâà, òðè èëè ÷åòèðè çíàêà. + + +* ÂÌÚÊÂÀÍÅ È ÈÇÒÐÈÂÀÍÅ +---------------------- + +Àêî èñêàòå äà âìúêíåòå òåêñò, ïðîñòî ãî âúâåäåòå. Çíàöèòå, êîèòî +ìîãàò äà ñå âèæäàò, êàòî À, 7, * è ò.í., ñå âúçïðèåìàò îò Åìàêñ êàòî +òåêñò è ñå âìúêâàò âåäíàãà. Âúâåäåòå (êëàâèøúò çà âðúùàíå â +íà÷àëîòî íà ðåäà), çà äà âìúêíåòå çíàê çà íîâ ðåä. + +Ìîæå äà èçòðèåòå ïîñëåäíèÿ çíàê, êîéòî ñòå âúâåëè, ñ âúâåæäàíå íà +. å êëàâèø îò êëàâèàòóðàòà -- ñúùèÿò, êîéòî +îáèêíîâåíî èçïîëçâàòå èçâúí Åìàêñ, çà äà èçòðèåòå ïîñëåäíèÿ âúâåäåí îò +âàñ çíàê. Îáèêíîâåíî å ãîëÿì êëàâèø, íà íÿêîëêî ðåäà ðàçñòîÿíèå îò +êëàâèøà , è îáèêíîâåíî å îòáåëÿçàí ñ "Delete", "Del" èëè +"Backspace". + +Àêî ãîëåìèÿò êëàâèø òàì å ñ åòèêåò "Backspace", òîãàâà òîé å òîçè, +êîéòî ùå èçïîëçâàòå çà . Ìîæå äà èìà îùå åäèí êëàâèø ñ +åòèêåò "Delete" íÿêúäå äðóãàäå, íî òîé íå å . + +Ïî-îáùî êàçàíî, èçòðèâà çíàêà òî÷íî ïðåäè òåêóùîòî ìÿñòî íà +êóðñîðà. + +>> Íàïðàâåòå òîâà ñåãà -- íàïèøåòå íÿêîëêî çíàêà, ïîñëå ãè èçòðèéòå ñ + âúâåæäàíå íà íÿêîëêî ïúòè. Íå ñå áåçïîêîéòå, ÷å òîçè + ôàéë ùå áúäå ïðîìåíåí; âèå íÿìà äà ïðîìåíèòå ïúðâîíà÷àëíîòî + âúâåäåíèå. Òîâà å âàøå ëè÷íî êîïèå. + +Êîãàòî ðåä îò òåêñòà ñòàíå òâúðäå äúëúã, çà äà ñå ñúáåðå â ðåä îò +åêðàíà, ðåäúò îò òåêñòà ñå "ïðîäúëæàâà" íà ñëåäâàùèÿ ðåä. Îáðàòíà +íàêëîíåíà ÷åðòà ("\") (èëè, àêî èçïîëçâàòå ãðàôè÷åí èíòåðôåéñ, ìàëêà +èçêðèâåíà ñòðåëêà) â äÿñíàòà ãðàíèöà îòáåëÿçâà ðåä, êîéòî å áèë +ïðîäúëæåí. + +>> Âúâåäåòå òåêñò, äîêàòî ñòèãíåòå äÿñíàòà ãðàíèöà, è ïðîäúëæåòå ñ + âìúêâàíåòî. Ùå âèäèòå ïðîäúëæåíèåòî íà ðåäà äà ñå ïîêàçâà. + +>> Èçïîëçâàéòå íÿêîëêî , çà äà èçòðèåòå òåêñòà, äîêàòî ðåäúò + ñå âìåñòè â åäèí åêðàíåí ðåä. Ïðîäúëæåíèåòî íà ðåäà èç÷åçâà. + +Ìîæå äà èçòðèåòå çíàêà çà íîâ ðåä òî÷íî êàêòî âñåêè äðóã çíàê. +Èçòðèâàíåòî íà çíàêà çà íîâ ðåä ìåæäó äâà ðåäà ãè ñëèâà â åäèí ðåä. +Àêî ïîëó÷åíèÿò êîìáèíèðàí ðåä å òâúðäå äúëúã, çà äà ñå âìåñòè â +øèðèíàòà íà åêðàíà, òîé ùå áúäå ïîêàçàí êàòî ïðîäúëæåí ðåä. + +>> Ïðèäâèæåòå êóðñîðà â íà÷àëîòî íà ðåä è âúâåäåòå . Òîâà ùå + ñëåå òîçè ðåä ñ ïðåäèøíèÿ. + +>> Âúâåäåòå , çà äà âìúêíåòå íàíîâî çíàêà çà íîâ ðåä, êîéòî + èçòðèõòå. + +Çàïîìíåòå, ÷å íà ïîâå÷åòî êîìàíäè íà Åìàêñ ìîæå äà áúäå çàäàäåí áðîÿ÷ +íà ïîâòîðåíèÿòà; òîâà âêëþ÷âà âìúêâàíåòî íà òåêñòîâè çíàöè. +Ïîâòàðÿíåòî íà òåêñòîâ çíàê ãî âìúêâà íÿêîëêî ïúòè. + +>> Îïèòàéòå òîâà ñåãà -- âúâåäåòå C-u 8 *, çà äà âìúêíåòå ********. + +Ñåãà âèå ñòå íàó÷èëè íàé-îñíîâíèòå íà÷èíè çà âúâåæäàíå íà íåùî â Åìàêñ +è ïîïðàâÿíå íà ãðåøêè. Ìîæåòå ñúùî òàêà äà èçòðèâàòå äóìè èëè ðåäîâå. +Åòî îáîáùåíèå íà èçòðèâàùèòå äåéñòâèÿ: + + èçòðèâàíå íà çíàêà òî÷íî ïðåäè êóðñîðà + C-d èçòðèâàíå íà çíàêà òî÷íî ñëåä êóðñîðà + + M- èçòðèâàíå íà äóìàòà íåïîñðåäñòâåíî ïðåäè êóðñîðà + M-d èçòðèâàíå íà äóìàòà ñëåä êóðñîðà + + C-k èçòðèâàíå îò ìÿñòîòî íà êóðñîðà äî êðàÿ íà ðåäà + M-k èçòðèâàíå äî êðàÿ íà òåêóùîòî èçðå÷åíèå + +Çàáåëåæåòå, ÷å è C-d, ñðàâíåíè ñ M- è M-d, +ðàçøèðÿâàò ïîäîáèåòî, çàïî÷íàòî îò C-f è M-f (äîáðå, íå å +íàèñòèíà êîíòðîëèðàù çíàê, íî íåêà íå ñå áåçïîêîèì çà òîâà). C-k è +M-k ñà ïîäîáíè íà C-e è M-e â ñìèñúë, ÷å åäíèòå ñà çà ðåäîâå, à +äðóãèòå -- çà èçðå÷åíèÿ. + +Ìîæåòå ñúùî äà ïðåìàõíåòå âñÿêà ÷àñò îò áóôåðà ñ åäèí óíèâåðñàëåí +íà÷èí. Ïðèäâèæåòå ñå äî åäèíèÿ êðàé íà ÷àñòòà è âúâåäåòå C-@ èëè +C-èíòåðâàë (êîåòî è äà å îò äâåòå). Ïðèäâèæåòå ñå äî äðóãèÿ êðàé íà +÷àñòòà è âúâåäåòå C-w. Òîâà ùå èçðåæå öåëèÿ òåêñò ìåæäó òåçè äâà +êðàÿ. + +>> Ïðèäâèæåòå êóðñîðà äî çíàêà "Ì" â íà÷àëîòî íà ïðåäèøíèÿ àáçàö. +>> Âúâåäåòå C-èíòåðâàë. Åìàêñ òðÿáâà äà èçâåäå ñúîáùåíèå "Mark set" â + äîëíèÿ êðàé íà åêðàíà. +>> Ïðèäâèæåòå êóðñîðà äî áóêâàòà "ð" â "êðàé" íà âòîðèÿ ðåä îò àáçàöà. +>> Âúâåäåòå C-w. Òîâà ùå èçðåæå òåêñòà, çàïî÷âàù îò "Ì" è çàâúðøâàù + òî÷íî ïðåäè "ð". + +Ðàçëèêàòà ìåæäó "èçðÿçâàíå" (kill, cut) è "èçòðèâàíå" (delete) å, ÷å +"èçðÿçàíèÿò" òåêñò ìîæå äà áúäå âìúêíàò íàíîâî, äîêàòî "èçòðèòèòå" +íåùà íå ìîãàò äà ñå âìúêíàò íàíîâî. Ïîñòàâÿíåòî íàíîâî íà èçðÿçàí +òåêñò ñå íàðè÷à "âìúêâàíå" (yank, paste). Îáùî êàçàíî, êîìàíäèòå, +êîèòî îòñòðàíÿâàò ìíîãî òåêñò, ãî èçðÿçâàò (òàêà ÷å òîé äà ìîæå äà +áúäå âìúêíàò), äîêàòî êîìàíäèòå, êîèòî îòñòðàíÿâàò ñàìî åäèí çíàê èëè +èçòðèâàò ñàìî ïðàçíè ðåäîâå è çíàöè, èçâúðøâàò èçòðèâàíå (òàêà ÷å íå +ìîæåòå äà âìúêíåòå íàíîâî òîçè òåêñò). + +>> Ïðèäâèæåòå êóðñîðà äî íà÷àëîòî íà ðåä, êîéòî íå å ïðàçåí. Òîãàâà + âúâåäåòå C-k, çà äà èçðåæåòå òåêñòà íà òîçè ðåä. +>> Âúâåäåòå C-k âòîðè ïúò. Ùå âèäèòå, ÷å òîâà èçðÿçâà çíàêà çà íîâ + ðåä, êîéòî ñëåäâà ðåäà. + +Çàáåëåæåòå, ÷å åäèíè÷íî C-k èçðÿçâà ñúäúðæàíèåòî íà ðåäà, à ñëåäâàùîòî +C-k èçðÿçâà öåëèÿ ðåä è ïðàâè äðóãèòå ðåäîâå äà ñå ïðèäâèæàò íàãîðå. +C-k îáðàáîòâà ÷èñëîâèòå àðãóìåíòè ïî ñïåöèàëåí íà÷èí: ïðåìàõâàò ñå +òîëêîâà íà áðîé ðåäîâå È òÿõíîòî ñúäúðæàíèå. Òîâà íå å ïðîñòî +ïîâòîðåíèå. C-u 2 C-k èçðÿçâà äâà ðåäà è òåõíèòå çíàöè çà íîâ ðåä; +âúâåæäàíåòî íà C-k äâà ïúòè íå ïðàâè òîâà. + +Âðúùàíåòî îáðàòíî íà òåêñò ñå íàðè÷à "âìúêâàíå". (Ìèñëåòå çà íåãî +êàòî çà èçâàæäàíå îáðàòíî, èëè äðúïâàíå îáðàòíî, íà òåêñò, êîéòî å áèë +èçðÿçàí.) Ìîæåòå äà âìúêâàòå èçðÿçàíèÿ òåêñò èëè íà ñúùîòî ìÿñòî, +îòêúäåòî å áèë ïðåìàõíàò, èëè íà äðóãî ìÿñòî â áóôåðà, äàæå è â +ðàçëè÷åí ôàéë. Ìîæåòå äà âìúêâàòå åäèí è ñúù òåêñò íÿêîëêî ïúòè; òîâà +ïðàâè íÿêîëêî êîïèÿ îò íåãî. + +Êîìàíäàòà çà âìúêâàíå å C-y. Òÿ âìúêâà íàíîâî ïîñëåäíèÿ èçðÿçàí òåêñò +â òåêóùîòî ìÿñòî íà êóðñîðà. + +>> Îïèòàéòå ãî: âúâåäåòå C-y, çà äà èçâåäåòå òåêñòà îáðàòíî. + +Àêî íàïðàâèòå íÿêîëêî C-k â ðåä, âñè÷êî îò èçðÿçàíèÿ òåêñò ñå çàïàçâà +çàåäíî, òàêà ÷å åäíî C-y ùå èçâàäè âñè÷êè ðåäîâå íàâåäíúæ. + +>> Íàïðàâåòå òîâà ñåãà, âúâåäåòå C-k íÿêîëêî ïúòè. + +Ñåãà, çà äà èçêàðàòå èçðÿçàíèÿ òåêñò: + +>> Âúâåäåòå C-y. Ñëåä òîâà ïðèäâèæåòå êóðñîðà íàäîëó íÿêîëêî ðåäà è + âúâåäåòå C-y îòíîâî. Ñåãà âèæäàòå êàê äà êîïèðàòå íÿêàêúâ òåêñò. + +Êàêâî äà ïðàâèòå, àêî èìàòå íÿêàêúâ òåêñò, êîéòî èñêàòå äà âìúêíåòå +îáðàòíî, è ñëåä òîâà èçðåæåòå íåùî äðóãî? C-y ùå èçâàäè ïîñëåäíîòî +èçðÿçâàíå. Íî ïðåäèøíèÿò òåêñò íå å çàãóáåí. Ìîæåòå äà ãî âúðíåòå +îáðàòíî, èçïîëçâàéêè êîìàíäàòà M-y. Ñëåä êàòî èçïúëíèòå C-y, çà äà +âçåìåòå ïîñëåäíîòî èçðÿçâàíå, âúâåæäàíåòî íà M-y çàìåíÿ òîçè èçâàäåí +òåêñò ñ ïðåäèøíîòî èçðÿçâàíå. Âúâåæäàíåòî íà M-y îòíîâî è îòíîâî +âðúùà ïî-ðàííè è ïî-ðàííè èçðÿçâàíèÿ. Êîãàòî ñòèãíåòå òåêñòà, êîéòî +òúðñèòå, íå å íóæíî äà ïðàâèòå íèùî ïîâå÷å, çà äà ãî çàäúðæèòå. +Ïðîñòî ïðîäúëæåòå ñ ðåäàêòèðàíåòî, îñòàâÿéêè èçâàäåíèÿ òåêñò, êúäåòî +ñè å. + +Àêî âúâåäåòå M-y äîñòàòú÷åí áðîé ïúòè, ùå ñå âúðíåòå â íà÷àëíîòî +ïîëîæåíèå (ïîñëåäíîòî èçðÿçâàíå). + +>> Èçðåæåòå ðåä, ïðèäâèæåòå ñå íÿêúäå, èçðåæåòå äðóã ðåä. + Èçïúëíåòå C-y, çà äà âúðíåòå îáðàòíî âòîðèÿ èçðÿçàí ðåä. + Èçïúëíåòå M-y è òîçè âúðíàò òåêñò ùå áúäå çàìåíåí ñ ïúðâèÿ + èçðÿçàí ðåä. + Èçïúëíåòå íÿêîëêî M-y è âèæòå êàêâî ñå ïîëó÷àâà. Èçïúëíÿâàéòå òîâà, + äîêàòî âòîðèÿò èçðÿçàí ðåä ñå âúðíå, è ñëåä òîâà îùå íÿêîëêî ïúòè. + Àêî èñêàòå, ìîæå äà ïðîáâàòå äà äàäåòå íà M-y ïîëîæèòåëíè è + îòðèöàòåëíè ÷èñëîâè àðãóìåíòè. + + +* ÎÒÌßÍÀ +-------- + +Àêî íàïðàâèòå ïðîìÿíà â òåêñòà è ñëåä òîâà ðåøèòå, ÷å òîâà å áèëî +ãðåøêà, âèå ìîæåòå äà îòìåíèòå ïðîìÿíàòà ñ êîìàíäàòà çà îòìåíÿíå, C-x +u. + +Îáèêíîâåíî C-x u îòìåíÿ ïðîìåíèòå, íàïðàâåíè îò åäíà êîìàíäà; àêî +ïîâòàðÿòå C-x u íÿêîëêî ïúòè ïîñëåäîâàòåëíî, âñÿêî ïîâòîðåíèå îòìåíÿ +îùå åäíà êîìàíäà. + +Íî èìà äâå èçêëþ÷åíèÿ: êîìàíäèòå, êîèòî íå ïðîìåíÿò òåêñòà, íå ñå +áðîÿò (òîâà âêëþ÷âà ïðèäâèæâàíåòî íà êóðñîðà è ñêðîëèðàùèòå êîìàíäè), +è ñàìîâìúêâàùèòå ñå çíàöè îáèêíîâåíî ñå îáðàáîòâàò íà ãðóïè, âñÿêà äî +20 çíàêà. (Òîâà íàìàëÿâà áðîÿ íà C-x u, êîèòî òðÿáâà äà âúâåäåòå, çà +äà îòìåíèòå âúâåäåí òåêñò.) + +>> Èçðåæåòå òîçè ðåä ñ C-k, ñëåä òîâà âúâåäåòå C-x u è òîé òðÿáâà äà + ñå ïîÿâè îòíîâî. + +C-_ å àëòåðíàòèâíà îòìåíÿùà êîìàíäà; òÿ ðàáîòè òî÷íî êàòî C-x u, íî å +ïî-ëåñíà çà âúâåæäàíå íÿêîëêî ïúòè ïîñëåäîâàòåëíî. Íåäîñòàòúêúò íà +C_- å, ÷å íà íÿêîè êëàâèàòóðè íå å î÷åâèäíî êàê òðÿáâà äà ñå âúâåäå. +Çàòîâà îñèãóðÿâàìå è C-x u. Íà íÿêîè òåðìèíàëè ìîæå äà âúâåäåòå C-_ ñ +âúâåæäàíå íà /, äîêàòî çàäúðæàòå CONTROL. + +×èñëîâ àðãóìåíò êúì C-_ èëè C-x u äåéñòâà êàòî áðîÿ÷ íà ïîâòîðåíèÿòà. + +Ìîæå äà îòìåíÿòà èçòðèâàíå íà òåêñò òî÷íî êàêòî îòìåíÿòå èçðÿçâàíå íà +òåêñò. Ðàçëè÷èåòî ìåæäó èçðÿçâàíåòî íà íåùî è èçòðèâàíåòî ìó +âúçäåéñòâà äàëè ùå ìîæå äà ãî èçâàäèòå ñ C-y; çà îòìåíÿíåòî íÿìà +ðàçëèêà ìåæäó äâàòà âèäà. + + +* ÔÀÉËÎÂÅ +--------- + +Çà äà íàïðàâèòå òåêñòà, êîéòî ðåäàêòèðàòå, ïîñòîÿíåí, òðÿáâà äà ãî +ñëîæèòå âúâ ôàéë.  ïðîòèâåí ñëó÷àé òîé ùå èç÷åçíå, êîãàòî Åìàêñ +ïðèêëþ÷è. Çà äà ñëîæèòå âàøèÿ òåêñò âúâ ôàéë, òðÿáâà äà "íàìåðèòå" +ôàéëà ïðåäè äà âúâåæäàòå òåêñò. (Òîâà ñúùî ñå íàðè÷à "ïîñåùàâàíå" íà +ôàéëà.) + +Íàìèðàíå íà ôàéë îçíà÷àâà, ÷å âèæäàòå ñúäúðæàíèåòî ìó â Åìàêñ.  +ìíîãî ñëó÷àè òîâà å êàòî äà ðåäàêòèðàòå ñàìèÿ ôàéë. Îáà÷å ïðîìåíèòå, +êîèòî ïðàâèòå, èçïîëçâàéêè Åìàêñ, íå îñòàâàò ïîñòîÿííè, äîêàòî íå +"çàïèøåòå" ôàéëà. Òîâà å òàêà, çà äà ñå ïðåäîòâðàòè îñòàâÿíåòî íà +ïîëóïðîìåíåí ôàéë â ñèñòåìàòà, êîãàòî íå èñêàòå òîâà. Äîðè êîãàòî +çàïèñâàòå, Åìàêñ îñòàâÿ íà÷àëíèÿ ôàéë ïîä ïðîìåíåíî èìå, â ñëó÷àé, ÷å +ïî-êúñíî ðåøèòå, ÷å âàøèòå ïðîìåíè ñà áèëè ãðåøêà. + +Àêî ïîãëåäíåòå â äúíîòî íà åêðàíà, ùå âèäèòå ðåä, êîéòî çàïî÷âà è +çàâúðøâà ñ òèðåòà è çàïî÷âà ñ "-R:-- TUTORIAL.bg" èëè íåùî ïîäîáíî. +Òàçè ÷àñò îò åêðàíà ïîêàçâà èìåòî íà ôàéëà, êîéòî ñòå ïîñåòèëè. Òî÷íî +ñåãà âèå ñòå ïîñåòèëè ôàéë, íàðå÷åí "TUTORIAL.bg", êîéòî å âàøåòî +ëè÷íî êîïèå-÷åðíîâà íà Åìàêñ âúâåäåíèåòî. Êîãàòî íàìåðèòå ôàéë â +Åìàêñ, èìåòî íà òîçè ôàéë ùå ñå ïîÿâè íà ñúùîòî ìÿñòî. + +Îñîáåíîñò íà êîìàíäàòà çà íàìèðàíå íà ôàéë å, ÷å òðÿáâà äà êàæåòå +èìåòî íà ôàéëà, êîéòî èñêàòå. Íèå ãî íàðè÷àìå "÷åòåíå íà àðãóìåíò îò +òåðìèíàëà" (â òîçè ñëó÷àé àðãóìåíòúò å èìåòî íà ôàéëà). Ñëåä êàòî +âúâåäåòå êîìàíäàòà + + C-x C-f Íàìèðàíå íà ôàéë + +Åìàêñ âè ïîäêàíÿ äà âúâåäåòå èìåòî íà ôàéëà. Èìåòî íà ôàéëà, êîåòî +íàïèøåòå, ñå ïîÿâÿâà â äúíîòî íà åêðàíà. Ðåäúò â äúíîòî íà åêðàíà ñå +íàðè÷à ìèíèáóôåð, êîãàòî ñå èçïîëçâà çà òîçè âèä âõîä. Ìîæåòå äà +èçïîëçâàòå îáèêíîâåíèòå êîìàíäè çà ðåäàêòèðàíå íà Åìàêñ, çà äà +ðåäàêòèðàòå èìåòî íà ôàéëà. + +Êîãàòî âúâåæäàòå èìåòî íà ôàéëà (èëè êàêúâòî è äà å âõîä â +ìèíèáóôåðà), ìîæåòå äà ïðåêðàòèòå êîìàíäàòà ñ C-g. + +>> Âúâåäåòå C-x C-f è ñëåä òîâà C-g. Òîâà ïðåêðàòÿâà ìèíèáóôåðà, à + ñúùî è êîìàíäàòà C-x C-f, êîÿòî ñå å èçïúëíÿâàëà â ìèíèáóôåðà. + Òàêà ÷å íå íàìèðàòå ôàéë. + +Êîãàòî ïðèêëþ÷èòå ñ âúâåæäàíåòî íà èìåòî íà ôàéëà, âúâåäåòå , +çà äà ïîêàæåòå òîâà. Òîãàâà C-x C-f òðúãâà äà ðàáîòè è íàìèðà ôàéëà, +êîéòî ñòå èçáðàëè. Ìèíèáóôåðúò èç÷åçâà, êîãàòî êîìàíäàòà C-x C-f +ñâúðøè. + +Ñëåä ìàëêî ñúäúðæàíèåòî íà ôàéëà ñå ïîÿâÿâà íà åêðàíà è âèå ìîæåòå äà +ðåäàêòèðàòå ñúäúðæàíèåòî ìó. Êîãàòî ïîæåëàåòå äà çàïàçèòå âàøèòå +ïðîìåíè çà ïîñòîÿííî, âúâåäåòå êîìàíäàòà + + C-x C-s Çàïàçâàíå íà ôàéëà + +Òîâà êîïèðà òåêñòà îò Åìàêñ âúâ ôàéëà. Ïúðâèÿ ïúò, êîãàòî òîâà ñå +íàïðàâè, Åìàêñ ïðåèìåíóâà íà÷àëíèÿ ôàéë ñ íîâî èìå, òàêà ÷å òîé äà íå +ñå èçãóáè. Íîâîòî èìå ñå ïîñòðîÿâà ñ äîáàâÿíå íà "~" â êðàÿ íà èìåòî +íà íà÷àëíèÿ ôàéë. + +Êîãàòî çàïàçâàíåòî å ñâúðøèëî, Åìàêñ èçâåæäà èìåòî íà ôàéëà, êîéòî å +áèë çàïèñàí. Òðÿáâà äà çàïèñâàòå äîñòàòú÷íî ÷åñòî, òàêà ÷å äà íå +èçãóáèòå ìíîãî ðàáîòà, àêî ñèñòåìàòà ñå ñðèíå ïî íÿêàêâà ïðè÷èíà. + +>> Âúâåäåòå C-x C-s, çàïàçâàéêè âàøåòî êîïèå îò âúâåäåíèåòî. + Òîâà òðÿáâà äà èçâåäå "Wrote ...TUTORIAL.bg" â äúíîòî íà åêðàíà. + +ÇÀÁÅËÅÆÊÀ: Íà íÿêîè ñèñòåìè âúâåæäàíåòî íà C-x C-s ùå çàìðúçè åêðàíà è +âèå íÿìà äà âèæäàòå ïîâå÷å èçõîä îò Åìàêñ. Òîâà ïîêàçâà, ÷å åäíà +"ñïîñîáíîñò" íà îïåðàöèîííàòà ñèñòåìà, íàðè÷àíà "óïðàâëåíèå íà ïîòîêà" +(flow control), å ïðèõâàíàëà C-s è íå ãî ïðîïóñêà êúì Åìàêñ. Çà äà +ðàçìðàçèòå åêðàíà, âúâåäåòå C-q. Òîãàâà âèæòå ñåêöèÿòà "Ñïîíòàííî +âêëþ÷âàíå íà ïîñòúïêîâî òúðñåíå" (Spontaneous Entry to Incremental +Search) â ðúêîâîäñòâîòî íà Åìàêñ çà ñúâåò êàê äà ñå ñïðàâèòå ñ òàçè +"ñïîñîáíîñò". + +Ìîæå äà íàìåðèòå ñúùåñòâóâàù ôàéë, äà ãî ðàçãëåäàòå è äà ãî +ðåäàêòèðàòå. Ìîæåòå ñúùî äà íàìåðèòå ôàéë, êîéòî íå ñúùåñòâóâà. Òîâà +å íà÷èíúò çà ñúçäàâàíå íà íîâè ôàéëîâå â Åìàêñ: íàìèðàòå ôàéëà, êîéòî +ùå áúäå â íà÷àëîòî ïðàçåí, è òîãàâà çàïî÷âàòå âìúêâàíåòî íà òåêñòà çà +ôàéëà. Êîãàòî ãîâîðèòå çà "çàïèñâàíå" íà ôàéë, Åìàêñ âñúùíîñò ùå +ñúçäàäå ôàéëà ñ òåêñòà, êîéòî ñòå âúâåëè. Îòòàì íàòàòúê ìîæå äà +ñ÷èòàòå, ÷å ðåäàêòèðàòå âå÷å ñúùåñòâóâàù ôàéë. + + +* ÁÓÔÅÐÈ +-------- + +Àêî íàìåðèòå âòîðè ôàéë ñ C-x C-f, ïúðâèÿò ôàéë îñòàâà â Åìàêñ. +Ìîæåòå äà ïðåâêëþ÷èòå îáðàòíî êúì íåãî, êàòî ãî íàìåðèòå ïàê ñ C-x +C-f. Ïî òîçè íà÷èí ìîæå äà ïîëó÷èòå äîñòà íà áðîé ôàéëîâå â Åìàêñ. + +>> Ñúçäàéòå ôàéë ñ èìå "foo", âúâåæäàéêè C-x C-f foo . + Âìúêíåòå ìàëêî òåêñò, ðåäàêòèðàéòå ãî è çàïàçåòå "foo" ñ âúâåæäàíå + íà C-x C-s. + Íàêðàÿ âúâåäåòå C-x C-f TUTORIAL.bg , çà äà ñå âúðíåòå + îáðàòíî âúâ âúâåäåíèåòî. + +Åìàêñ çàïàçâà òåêñòà íà âñåêè ôàéë â îáåêò, íàðè÷àí "áóôåð". +Íàìèðàíåòî íà ôàéë ïðàâè íîâ áóôåð â Åìàêñ. Çà äà âèäèòå ñïèñúê íà +áóôåðèòå, êîèòî â ìîìåíòà ñúùåñòâóâàò âúâ âàøèÿ Åìàêñ, âúâåäåòå + + C-x C-b Ïîêàçâàíå íà áóôåðèòå + +>> Îïèòàéòå C-x C-b ñåãà. + +Âèæòå êàê âñåêè áóôåð èìà èìå, à ïîíÿêîãà è èìå íà ôàéë çà ôàéëà, +÷èåòî ñúäúðæàíèå äúðæè. ÂÑÅÊÈ òåêñò, êîéòî âèæäàòå â Åìàêñ ïðîçîðåö, +å âèíàãè ÷àñò îò íÿêàêúâ áóôåð. + +>> Âúâåäåòå C-x 1, çà äà ìàõíåòå ñïèñúêà ñ áóôåðèòå. + +Êîãàòî èìàòå íÿêîëêî áóôåðà, ñàìî åäèí îò òÿõ å "òåêóù" â äàäåí ìîìåíò +îò âðåìå. Òîâà å áóôåðúò, êîéòî ðåäàêòèðàòå. Àêî èñêàòå äà +ðåäàêòèðàòå äðóã áóôåð, ñå íóæäàåòå îò "ïðåâêëþ÷âàíå" êúì íåãî. Àêî +èñêàòå äà ñå ïðåâêëþ÷èòå êúì áóôåð, êîéòî ñúîòâåòñòâà íà ôàéë, ìîæåòå +äà ãî íàïðàâèòå, êàòî ïðîñòî ïîñåòèòå ôàéëà îòíîâî ñ C-x C-f. Íî èìà +è ïî-ëåñåí íà÷èí: èçïîëçâàíåòî íà êîìàíäàòà C-x b.  òàçè êîìàíäà +òðÿáâà äà âúâåäåòå èìåòî íà áóôåðà. + +>> Âúâåäåòå C-x b foo , çà äà ñå âúðíåòå êúì áóôåðà "foo", + êîéòî äúðæè òåêñòà íà ôàéëà "foo". Òîãàâà âúâåäåòå C-x b TUTORIAL + , çà äà ñå âúðíåòå â òîâà âúâåäåíèå. + + ïîâå÷åòî ñëó÷àè èìåòî íà áóôåðà å ñúùîòî êàòî èìåòî íà ôàéëà (áåç +÷àñòòà â êîÿ äèðåêòîðèÿ ñå íàìèðà). Îáà÷å òîâà íå âèíàãè å âÿðíî. +Ñïèñúêúò ñ áóôåðèòå, êîéòî ïðàâèòå ñ C-x C-b, âèíàãè âè ïîêàçâà èìåòî +íà âñåêè áóôåð. + +ÂÑÅÊÈ òåêñò, êîéòî âèæäàòå â Åìàêñ ïðîçîðåö, å âèíàãè ÷àñò îò íÿêàêúâ +áóôåð. Íÿêîè áóôåðè íå ñúîòâåòñòâàò íà ôàéëîâå. Íàïðèìåð áóôåðúò, +èìåíóâàí "*Buffer List*", íå ñúîòâåòñòâà íà ôàéë. Òîâà å áóôåðúò, +êîéòî ñúäúðæà ñïèñúêà ñ áóôåðèòå, êîèòî ñòå íàïðàâèëè ñ C-x C-b. +Áóôåðúò, èìåíóâàí "*Messages*", ñúùî íå ñúîòâåòñòâà íà ôàéë; òîé +ñúäúðæà ñúîáùåíèÿòà, êîèòî ñå ïîÿâÿâàò â äúíîòî íà åêðàíà ïî âðåìå íà +Åìàêñ ñåñèÿòà. + +>> Âúâåäåòå C-x b *Messages* , çà äà âèäèòå áóôåðà ñúñ + ñúîáùåíèÿòà. Ñëåä òîâà âúâåäåòå C-x C-b TUTORIAL , çà äà + ñå âúðíåòå êúì òîâà âúâåäåíèå. + +Àêî íàïðàâèòå ïðîìåíè â òåêñòà íà åäèí ôàéë è òîãàâà íàìåðèòå äðóã +ôàéë, òîâà íÿìà äà çàïèøå ïúðâèÿ ôàéë. Íåãîâèòå ïðîìåíè îñòàâàò âúòðå +â Åìàêñ, â áóôåðà íà ôàéëà. Ñúçäàâàíåòî èëè ðåäàêòèðàíåòî íà áóôåðà +íà âòîðèÿ ôàéë íÿìà åôåêò âúðõó áóôåðà íà ïúðâèÿ ôàéë. Òîâà å ìíîãî +ïîëåçíî, íî ñúùî îçíà÷àâà, ÷å ñå íóæäàåòå îò óäîáåí íà÷èí äà çàïàçèòå +áóôåðà íà ïúðâèÿ ôàéë. Ùå å íåóäîáíî äà ïðåâêëþ÷èòå îáðàòíî ñ C-x +C-f, çà äà ãî çàïàçèòå ñ C-x C-s. Òàêà ÷å èìàìå + + C-x s Çàïàçâà íÿêîè áóôåðè + +C-x s ïèòà çà âñåêè áóôåð, êîéòî ñúäúðæà ïðîìåíè, êîèòî íå ñòå +çàïàçèëè. Âúïðîñúò çà âñåêè òàêúâ áóôåð å äàëè äà áúäå çàïàçåí. + +>> Âìúêíåòå ðåä â òåêñòà, ñëåä òîâà âúâåäåòå C-x s. + Òðÿáâà äà áúäåòå ïîïèòàí äàëè äà çàïàçèòå áóôåðà, èìåíóâàí "TUTORIAL". + Îòãîâîðåòå ñ "äà" íà âúïðîñà, êàòî âúâåäåòå "y". + + +* ÐÀÇØÈÐßÂÀÍÅ ÍÀ ÍÀÁÎÐÀ ÊÎÌÀÍÄÈ +------------------------------- + +Èìà ìíîãî, ìíîãî ïîâå÷å êîìàíäè íà Åìàêñ, îòêîëêîòî ìîãàò äà ñå ñëîæàò +íà âñè÷êè êîíòðîëíè è ìåòà çíàöè. Åìàêñ çàîáèêàëÿ òîâà ñ X (eXtended) +êîìàíäàòà. Òîâà ñòàâà ïî äâà íà÷èíà: + + C-x Çíàêîâî ðàçøèðÿâàíå. Ïîñëåäâàíî îò åäèí çíàê. + M-x Ðàçøèðÿâàíå ñ èìåíóâàíà êîìàíäà. Ïîñëåäâàíî îò äúëãî + èìå. + +Òåçè êîìàíäè ñà îáùî âçåòî ïîëåçíè, íî ïî-ìàëêî, îòêîëêîòî êîìàíäèòå, +êîèòî äîñåãà ñòå íàó÷èëè. Âå÷å âèäÿõòå äâå îò òÿõ: êîìàíäèòå âúðõó +ôàéëîâå C-x C-f çà íàìèðàíå (Find) è C-x C-s çà çàïàçâàíå (Save). +Äðóã ïðèìåð å êîìàíäàòà çà êðàé íà Åìàêñ ñåñèÿòà -- òîâà å êîìàíäàòà +C-x C-c. (Íå ñå áåçïîêîéòå, ÷å ìîæå äà èçãóáèòå âñè÷êè ïðîìåíè, êîèòî +ñòå íàïðàâèëè; C-x C-c ïðåäëàãà äà çàïàçè âñåêè ïðîìåíåí ôàéë, ïðåäè +äà ïðåìàõíå Åìàêñ.) + +C-z å êîìàíäàòà çà èçëèçàíå îò Åìàêñ *âðåìåííî* -- òàêà ÷å äà ìîæåòå +äà ñå âúðíåòå êúì ñúùàòà Åìàêñ ñåñèÿ ïî-êúñíî. + +Íà ñèñòåìè, êîèòî ïîçâîëÿâàò òîâà, C-z "èçîñòàâÿ" (suspend) Åìàêñ, +ò.å. âðúùà êúì îáâèâêàòà, íî íå ðàçðóøàâà Åìàêñ.  ïîâå÷åòî îáâèâêè +ìîæåòå äà ïðîäúëæèòå Åìàêñ ñåñèÿòà ñ êîìàíäàòà "fg" èëè ñ "%emacs". + +Íà ñèñòåìè, êîèòî íå ïîçâîëÿâàò èçîñòàâÿíå, C-z ñúçäàâà íîâà +ïîäîáâèâêà, êîÿòî âúðâè ïîä Åìàêñ, çà äà âè äàäå øàíñ äà ñòàðòèðàòå +äðóãè ïðîãðàìè è äà ñå âúðíåòå êúì Åìàêñ ñëåä òîâà; òîâà íå å èñòèíñêî +"èçëèçàíå" îò Åìàêñ.  òîçè ñëó÷àé êîìàíäàòà íà îáâèâêàòà "exit" å +îáèêíîâåíèÿò íà÷èí äà ñå âúðíåòå îáðàòíî êúì Åìàêñ îò ïîäîáâèâêàòà. + +Ìîìåíòúò äà èçïîëçâàòå C-x C-c å, êîãàòî èñêàòå äà èçëåçåòå îò +ñèñòåìàòà. Òîâà å è ïðàâèëíàòà êîìàíäà çà èçëèçàíå, êîãàòî Åìàêñ å +èçâèêàí îò ïîùåíñêà ïðîãðàìà èëè äðóãè ñòðàíè÷íè ïðîãðàìè, òúé êàòî òå +ìîæå è äà íå çíàÿò êàê äà ñå ñïðàâÿò ñ èçîñòàâÿíåòî íà Åìàêñ. Ïðè +îáèêíîâåíè îáñòîÿòåëñòâà, îáà÷å, àêî íå ñòå òðúãíàëè äà èçëèçàòå îò +ñèñòåìàòà, ïî-äîáðå å äà èçîñòàâèòå Åìàêñ ñ C-z, âìåñòî äà èçëèçàòå îò +Åìàêñ. + +Èìà ìíîãî êîìàíäè C-x. Åòî ñïèñúê íà òåçè, êîèòî ñòå íàó÷èëè: + + C-x C-f Íàìèðàíå íà ôàéë. + C-x C-s Çàïàçâàíå íà ôàéë. + C-x C-b Ñïèñúê íà áóôåðèòå. + C-x C-c Èçëèçàíå îò Åìàêñ. + C-x 1 Èçòðèâàíå íà âñè÷êè ïðîçîðöè îñâåí åäèí. + C-x u Îòìÿíà. + +Èìåíóâàíèòå ðàçøèðåíè êîìàíäè ñà êîìàíäè, êîèòî ñå èçïîëçâàò äàæå îùå +ïî-ðÿäêî, èëè êîìàíäè, êîèòî ñå èçïîëçâàò ñàìî â îïðåäåëåíè ðåæèìè. +Ïðèìåð å êîìàíäàòà replace-string, êîÿòî çàìåíÿ ãëîáàëíî åäèí íèç ñ +äðóã. Êîãàòî âúâåäåòå M-x, Åìàêñ âè ïîäñêàçâà â äúíîòî íà åêðàíà ñ +M-x è âèå òðÿáâà äà âúâåäåòå èìåòî íà êîìàíäàòà, â òîçè ñëó÷àé +"replace-string". Ïðîñòî âúâåäåòå "repl s" è Åìàêñ ùå çàâúðøè +èìåòî. ( å êëàâèøúò Tab, îáèêíîâåíî íàìèðàù ñå íàä êëàâèøà +CapsLock èëè êëàâèøà Shift áëèçî äî ëåâèÿ êðàé íà êëàâèàòóðàòà.) +Çàâúðøåòå èìåòî íà êîìàíäàòà ñ . + +Êîìàíäàòà replace-string èçèñêâà äâà àðãóìåíòà -- íèçúò, êîéòî ùå áúäå +çàìåíÿí, è íèçúò, êîéòî ùå ãî çàìåíè. Òðÿáâà äà çàâúðøèòå âúâåæäàíåòî +íà âñåêè àðãóìåíò ñ . + +>> Ïðèäâèæåòå êóðñîðà äî ïðàçíèÿ ðåä, äâà ðåäà íàäîëó ïîä òîçè. + Òîãàâà âúâåäåòå M-x repl sïðîìåíÿèçìåíÿ + + Çàáåëåæåòå êàê òîçè ðåä ñå ïðîìåíÿ: âèå çàìåíèõòå äóìàòà + ï-ð-î-ì-å-í-ÿ ñ "èçìåíÿ", êúäåòî è äà ñå íàìèðà ñëåä íà÷àëíîòî + ìÿñòî íà êóðñîðà. + +ÇÀÁÅËÅÆÊÀ: Ïðåâêëþ÷âàíåòî êúì âúâåæäàíå íà êèðèëñêè áóêâà ñòàâà ñ C-\. + + +* ÀÂÒÎÌÀÒÈ×ÍÎ ÇÀÏÀÇÂÀÍÅ +----------------------- + +Êîãàòî ñòå íàïðàâèëè ïðîìåíè âúâ ôàéë, íî îùå íå ñòå ãî çàïàçèëè, òå +ìîãàò äà áúäàò çàãóáåíè, àêî êîìïþòúðúò âíåçàïíî ñå èçêëþ÷è. Çà äà âè +ïðåäïàçè îò òàêèâà ñèòóàöèè, Åìàêñ ïåðèîäè÷íî çàïàçâà "àâòîìàòè÷íî +çàïàçâàí" ôàéë çà âñåêè ôàéë, êîéòî ðåäàêòèðàòå. Èìåòî íà àâòîìàòè÷íî +çàïàçâàíèÿ ôàéë èìà # â íà÷àëîòî è â êðàÿ; íàïðèìåð, àêî âàøèÿò ôàéë å +ñ èìå "hello.c", èìåòî íà íåãîâèÿ àâòîìàòè÷íî çàïàçâàí ôàéë ùå áúäå +"#hello.c#". Êîãàòî çàïàçâàòå ôàéë ïî îáèêíîâåíèÿ íà÷èí, Åìàêñ +èçòðèâà íåãîâèÿ àâòîìàòè÷íî çàïèñâàí ôàéë. + +Àêî êîìïþòúðúò çàâèñíå, ìîæå äà âúçñòàíîâèòå âàøàòà àâòîìàòè÷íî +çàïàçâàíà ðåäàêöèÿ, êàòî íàìåðèòå ôàéëà êàêòî îáèêíîâåíî (ôàéëúò, +êîéòî ñòå ðåäàêòèðàëè, íå àâòîìàòè÷íî çàïàçâàíèÿ) è ñëåä òîâà âúâåäåòå +M-x recover file. Êîãàòî êîìàíäàòà èçèñêà ïîòâúðæäåíèå, +âúâåäåòå yes, çà äà ïðîäúëæèòå è äà âúçñòàíîâèòå àâòîìàòè÷íî +çàïàçâàíèòå äàííè. + + +* ÅÕÎ ÎÁËÀÑÒÒÀ +-------------- + +Àêî Åìàêñ âèäè, ÷å âúâåæäàòå ìíîãîçíàêîâè êîìàíäè áàâíî, ùå âè ãè +ïîêàæå â äúíîòî íà åêðàíà, â îáëàñò, íàðè÷àíà "åõî îáëàñò". Åõî +îáëàñòòà îáõâàùà ïîñëåäíèÿ ðåä îò åêðàíà. + + +* ÐÅÄ ÍÀ ÐÅÆÈÌÀ +---------------- + +Ðåäúò òî÷íî íàä åõî îáëàñòòà ñå íàðè÷à "ðåä íà ðåæèìà" (mode line). +Òîé ïîêàçâà íåùî êàòî: + +-R:** TUTORIAL.bg (Fundamental)--L670--58%---------------- + +Òîçè ðåä äàâà ïîëåçíà èíôîðìàöèÿ çà ñúñòîÿíèåòî íà Åìàêñ è òåêñòà, +êîéòî ðåäàêòèðàòå. + +Âå÷å çíàåòå êàêâî îçíà÷àâà èìåòî íà ôàéëà -- òîâà å ôàéëúò, êîéòî ñòå +íàìåðèëè. -NN%-- ïîêàçâà âàøàòà òåêóùà ïîçèöèÿ â òåêñòà; òîâà +îçíà÷àâà, ÷å NN ïðîöåíòà îò òåêñòà å íàä âúðõà íà åêðàíà. Àêî +íà÷àëîòî íà ôàéëà å íà åêðàíà, ùå ñå ïîêàçâà --Top-- (âðúõ) âìåñòî +--00%--. Àêî êðàÿ íà ôàéëà å íà åêðàíà, ùå ñå ïîêàçâà --Bot-- (äúíî). +Àêî ãëåäàòå òåêñò, êîéòî å òîëêîâà ìàëúê, ÷å ñå ïîêàçâà èçöÿëî íà +åêðàíà, ðåäúò íà ðåæèìà ùå èçâåäå --All--. + +Çíàêúò L è öèôðèòå ïîêàçâàò ìÿñòîòî ïî äðóã íà÷èí: òîâà å íîìåðúò íà +òåêóùèÿ ðåä íà òî÷êàòà. + +Çâåçäèòå áëèçî äî íà÷àëîòî îçíà÷àâàò, ÷å ñòå íàïðàâèëè ïðîìåíè â +òåêñòà. Âåäíàãà ñëåä êàòî ïîñåòèòå èëè çàïàçèòå ôàéë, òàçè ÷àñò îò +ðåäà íà ðåæèìà âå÷å íå ïîêàçâà çâåçäè, à ñàìî òèðåòà. + +×àñòòà îò ðåäà íà ðåæèìà âúòðå â ñêîáèòå å, çà äà âè ïîêàæå â êàêúâ +ðåæèì íà ðåäàêòèðàíå ñå íàìèðàòå. Ïîäðàçáèðàùèÿò ñå ðåæèì å +Fundamental (Îñíîâåí), êîéòî èçïîëçâàòå â ìîìåíòà. Òîâà å ïðèìåð çà +"ãëàâåí ðåæèì" (major mode). + +Åìàêñ èìà ìíîãî ãëàâíè ðåæèìè. Íÿêîè îò òÿõ ñà ïðåäâèäåíè çà +ðåäàêòèðàíå íà ðàçëè÷íè åçèöè è/èëè âèäîâå òåêñò, êàòî íàïðèìåð ðåæèì +Ëèñï, ðåæèì Òåêñò è äðóãè. Âúâ âñåêè åäèí ìîìåíò îò âðåìå òî÷íî åäèí +ãëàâåí ðåæèì å àêòèâåí è íåãîâîòî èìå ìîæå âèíàãè äà áúäå íàìåðåíî â +ðåäà íà ðåæèìà, òî÷íî êàêòî "Fundamental" ñåãà. + +Âñåêè ãëàâåí ðåæèì ïðàâè íÿêîè êîìàíäè äà ñå äúðæàò ïî ðàçëè÷åí íà÷èí. +Íàïðèìåð, èìà êîìàíäè çà ðåäàêòèðàíå íà êîìåíòàðè â ïðîãðàìè, è òúé +êàòî âñåêè ïðîãðàìåí åçèê èìà ðàçëè÷íà èäåÿ çà òîâà êàê òðÿáâà äà +èçãëåæäàò êîìåíòàðèòå, âñåêè ãëàâåí ðåæèì òðÿáâà äà âìúêâà êîìåíòàðè +ïî ðàçëè÷åí íà÷èí. Âñåêè ãëàâåí ðåæèì å èìå íà ðàçøèðåíà êîìàíäà, ñ +êîÿòî ïðåâêëþ÷âàòå êúì òîçè ðåæèì. Íàïðèìåð, M-x fundamental-mode å +êîìàíäà çà ïðåâêëþ÷âàíå êúì ðåæèì Fundamental. + +Êîãàòî ðåäàêòèðàòå òåêñò íà åñòåñòâåí åçèê, êàòî òîçè ôàéë, +íàé-âåðîÿòíî òðÿáâà äà èçïîëçâàòå ðåæèì Òåêñò (text). + +>> Âúâåäåòå M-x text mode. + +Íå ñå áåçïîêîéòå, íèêîÿ îò Åìàêñ êîìàíäèòå, êîèòî ñòå íàó÷èëè, íÿìà äà +ñå ïðîìåíè ïî íÿêàêúâ ñúùåñòâåí íà÷èí. Íî ìîæå äà çàáåëåæèòå, ÷å M-f +è M-b ñåãà âúçïðèåìàò àïîñòðîôèòå (') êàòî ÷àñò îò äóìèòå. Ïðåäè +òîâà, â îñíîâíèÿ ðåæèì (Fundamental), M-f è M-b ñå âúçïðèåìàõà êàòî +ðàçäåëèòåëè íà äóìè. + +Ãëàâíèòå ðåæèìè îáèêíîâåíî ïðàâÿò ìàëêè ïðîìåíè êàòî òàçè: ïîâå÷åòî +êîìàíäè âúðøàò "ñúùàòà ðàáîòà" âúâ âñåêè ãëàâåí ðåæèì, íî ðàáîòÿò ïî +ìàëêî ïî-ðàçëè÷åí íà÷èí. + +Çà äà âèäèòå äîêóìåíòàöèÿòà íà âàøèÿ òåêóù ãëàâåí ðåæèì, âúâåäåòå C-h +m. + +>> Óïîòðåáåòå C-u C-v âåäíúæ èëè ïîâå÷å ïúòè, çà äà äîêàðàòå òîçè ðåä + áëèçî äî âúðõà íà åêðàíà. +>> Âúâåäåòå C-h m, çà äà âèäèòå êàê òåêñòîâèÿò ðåæèì ñå ðàçëè÷àâà îò + îñíîâíèÿ ðåæèì. +>> Âúâåäåòå C-x 1, çà äà ïðåìàõíåòå äîêóìåíòàöèÿòà îò åêðàíà. + +Ãëàâíèòå ðåæèìè ñå íàðè÷àò ãëàâíè, çàùîòî èìà è ìàëêè (âòîðîñòåïåííè) +ðåæèìè (minor modes). Ìàëêèòå ðåæèìè íå ñà àëòåðíàòèâè íà ãëàâíèòå, à +ïðîñòî ìàëêè ïðîìåíè êúì òÿõ. Âñåêè ìàëúê ðåæèì ìîæå äà áúäå âêëþ÷åí +èëè èçêëþ÷åí ñàì çà ñåáå ñè, íåçàâèñèìî îò âñè÷êè äðóãè ìàëêè ðåæèìè +è íåçàâèñèìî îò âàøèÿ ãëàâåí ðåæèì. Òàêà ÷å ìîæå äà íå èçïîëçâàòå +ìàëêè ðåæèìè, äà èçïîëçâàòå åäèí ìàëúê ðåæèì, èëè äà èçïîëçâàòå +íÿêàêâà êîìáèíàöèÿ îò íÿêîëêî ìàëêè ðåæèìà. + +Åäèí ãëàâåí ðåæèì, êîéòî å ìíîãî ïîëåçåí, îñîáåíî çà ðåäàêòèðàíå íà +òåêñò íà åñòåñòâåí åçèê, å ðåæèìúò íà àâòîìàòè÷íî çàïúëâàíå (Auto Fill +mode). Êîãàòî òîçè ðåæèì å âêëþ÷åí, Åìàêñ àâòîìàòè÷íî ðàçäåëÿ ðåäà +ïðè ìÿñòîòî ìåæäó äóìèòå, êîãàòî âìúêâàòå òåêñò è íàïðàâèòå ðåä, êîéòî +å òâúðäå äúëúã. + +Ìîæå äà âêëþ÷èòå ðåæèìà íà àâòîìàòè÷íî çàïúëâàíå, êàòî èçïúëíèòå M-x +auto fill mode. Êîãàòî ðåæèìúò å âêëþ÷åí, ìîæå äà ãî +èçêëþ÷èòå ñ M-x auto fill mode. Àêî ðåæèìúò å èçêëþ÷åí, òàçè +êîìàíäà ãî âêëþ÷âà, à àêî å âêëþ÷åí, ãî èçêëþ÷âà. Êàçâàìå, ÷å +êîìàíäàòà "îáðúùà ðåæèìà". + +>> Âúâåäåòå M-x auto fill mode ñåãà. Ñëåä òîâà âìúêíåòå ðåä + îò "asdf " îòíîâî è îòíîâî, äîêàòî íå âèäèòå, ÷å òåêñòúò ñå ðàçäåëÿ + íà äâà ðåäà. Òðÿáâà äà ñëàãàòå èíòåðâàëè ìåæäó äóìèòå, çàùîòî + àâòîìàòè÷íîòî çàïúëâàíå ðàçäåëÿ ðåäîâåòå ñàìî ïðè èíòåðâàëèòå. + +Ãðàíèöàòà îáèêíîâåíî å çàäàäåíà íà 70 çíàêà, íî ìîæåòå äà ÿ ïðîìåíèòå +ñ êîìàíäàòà C-x f. Òðÿáâà äà çàäàâàòå òàçè ãðàíèöà êàòî ÷èñëîâ +àðãóìåíò íà êîìàíäàòà. + +>> Âúâåäåòå C-x f ñ àðãóìåíò 20. (C-u 2 0 C-x f). + Ñåãà âúâåäåòå íÿêàêúâ òåêñò è âèæòå êàê Åìàêñ çàïúëâà ðåäîâåòå ñ ïî + íå ïîâå÷å îò 20 çíàêà. Ïîñëå âúðíåòå îáðàòíî ãðàíèöàòà íà 70, + èçïîëçâàéêè C-x f îòíîâî. + +Àêî íàïðàâèòå ïðîìåíè â ñðåäàòà íà àáçàö, ðåæèìúò íà àâòîìàòè÷íî +çàïúëâàíå íÿìà äà ãî çàïúëíè íàíîâî çà âàñ. +Çà äà çàïúëíèòå íàíîâî àáçàö, âúâåæäàéòå M-q (META-q), äîêàòî êóðñîðúò +å âúòðå â àáçàöà. + +>> Ïðèäâèæåòå êóðñîðà âúòðå â ïðåäèøíèÿ àáçàö è âúâåäåòå M-q. + + +* ÒÚÐÑÅÍÅ +--------- + +Åìàêñ ìîæå äà èçâúðøâà òúðñåíèÿ íà íèçîâå (òîâà ñà ïîñëåäîâàòåëíîñòè +îò çíàöè èëè äóìè) èëè íàïðåä â òåêñòà, èëè íàçàä â íåãî. Òúðñåíåòî +íà íèç å ïðèäâèæâàùà êóðñîðà êîìàíäà; òÿ ïðåìåñòâà êóðñîðà íà +ñëåäâàùîòî ìÿñòî, êúäåòî ñå ñðåùà íèçúò. + +Êîìàíäàòà çà òúðñåíå íà Åìàêñ ñå ðàçëè÷àâà îò êîìàíäàòà çà òúðñåíå íà +ïîâå÷åòî ðåäàêòîðè ïî òîâà, ÷å òÿ å "ïîñòúïêîâà". Òîâà îçíà÷àâà, ÷å +òúðñåíåòî ñå èçâúðøâà îùå äîêàòî âúâåæäàòå òåêñòà, êîéòî òúðñèòå. + +Êîìàíäàòà çà çàïî÷âàíå íà òúðñåíå å C-s çà òúðñåíå íàïðåä, è C-r çà +òúðñåíå íàçàä. ÍÎ ÏÎ×ÀÊÀÉÒÅ! Íå ãè ïðîáâàéòå ñåãà. + +Êîãàòî âúâåäåòå C-s, ùå çàáåëåæèòå, ÷å íèçúò "I-search" ñå ïîÿâÿâà +êàòî ïîäñêàçêà â åõî îáëàñòòà. Òîâà âè êàçâà, ÷å Åìàêñ å â òîâà, +êîåòî ñå íàðè÷à ïîñòúïêîâî òúðñåíå, ÷àêàéêè âè äà âúâåæäàòå òåêñòà, +êîéòî èñêàòå äà òúðñèòå. ïðèêëþ÷âà òúðñåíåòî. + +>> Ñåãà âúâåäåòå C-s, çà äà çàïî÷íåòå òúðñåíåòî. ÁÀÂÍÎ, áóêâà ïî + áóêâà, âúâåäåòå äóìàòà "òúðñåíå", èç÷àêâàéêè ñëåä âúâåæäàíåòî íà + âñåêè çíàê, çà äà ìîæå äà çàáåëåæèòå êàêâî ñòàâà ñ êóðñîðà. Ñåãà + èçâúðøèõòå òúðñåíå íà "òúðñåíå" âåäíúæ. +>> Âúâåäåòå îòíîâî C-s, çà äà òúðñèòå äðóãî ñúâïàäåíèå ñ "òúðñåíå". +>> Ñåãà âúâåäåòå òðè ïúòè è âèæòå êàê ñå ïðèäâèæâà êóðñîðà. +>> Âúâåäåòå , çà äà ïðåêðàòèòå òúðñåíåòî. + +Çàáåëÿçàõòå ëè êàêâî ñòàíà? Åìàêñ, êîãàòî òúðñè ïîñòúïêîâî, ñå îïèòâà +äà íàìåðè ñëåäâàùîòî ñúâïàäåíèå íà íèçà, êîéòî ñå âúâåæäà. Çà äà +îòèäåòå íà ñëåäâàùîòî ñúâïàäåíèå íà "òúðñíå", ïðîñòî îòíîâî âúâåäåòå +C-s. Àêî íÿìà òàêîâà ñúâïàäåíèå, Åìàêñ áèáèïâà è âè êàçâà, ÷å +òúðñåíåòî å "ïðîâàëåíî" (failing). C-g ñúùî ïðåêðàòÿâà òúðñåíåòî. + +ÇÀÁÅËÅÆÊÀ: Íà íÿêîè ñèñòåìè âúâåæäàíåòî íà C-s ùå çàìðàçè åêðàíà è âèå +íÿìà äà ìîæå äà âèäèòå ïîâå÷å ðåàêöèÿ îò Åìàêñ. Òîâà ïîêàçâà, ÷å +"ñïîñîáíîñò" íà îïåðàöèîííàòà ñèñòåìà, íàðå÷åíà "óïðàâëåíèå íà ïîòîêà" +(flow control), å ïðèõâàíàëà C-s è íå ãî ïðîïóñêà äî Åìàêñ. Çà äà +ðàçìðàçèòå åêðàíà, âúâåäåòå C-q. Òîãàâà âèæòå ñåêöèÿòà "Ñïîíòàííî +âêëþ÷âàíå íà ïîñòúïêîâîòî òúðñåíå" (Spontaneous Entry to Incremental +Search) â ðúêîâîäñòâîòî íà Åìàêñ çà ñúâåò êàê äà ñå ñïðàâèòå ñ òàçè +"ñïîñîáíîñò". + +Àêî ñòå â ñðåäàòà íà ïîñòúïêîâî òúðñåíå è âúâåäåòå , ùå +çàáåëåæèòå, ÷å ïîñëåäíèÿò çíàê â òúðñåíèÿ íèç ñå èçòðèâà è òúðñåíåòî +ñå âðúùà êúì ïîñëåäíîòî ìÿñòî íà òúðñåíå. Íàïðèìåð, ïðåäïîëîæåòå, ÷å +ñòå âúâåëè "ò", çà äà íàìåðèòå ïúðâîòî ñúâïàäåíèå ñ "ò". Ñåãà, àêî +âúâåäåòå "ú", êóðñîðúò ùå ñå ïðèäâèæè êúì ïúðâîòî ñúâïàäåíèå íà "òú". +Ñåãà âúâåäåòå . Òîâà èçòðèâà çíàêà "ú" îò íèçà çà òúðñåíå è +êóðñîðúò ñå ïðåìåñòâà íàçàä, äî ïúðâîòî ñúâïàäåíèå ñ "ò". + +Àêî ñòå â ñðåäàòà íà òúðñåíå è âúâåäåòå êîíòðîëåí èëè ìåòà çíàê (ñ +íÿêîëêî èçêëþ÷åíèÿ -- çíàöèòå, êîèòî ñà ñïåöèàëíè ïî âðåìå íà òúðñåíå, +êàòî C-s è C-r), òúðñåíåòî ñå ïðåêðàòÿâà. + +C-s çàïî÷âà òúðñåíå, êîåòî ãëåäà çà ñúâïàäåíèå ñ íèçà, äàäåí çà +òúðñåíå ÑËÅÄ òåêóùîòî ìÿñòî íà êóðñîðà. Àêî èñêàòå äà òúðñèòå íåùî +ïî-ðàííî îò òåêñòà, âìåñòî òîâà âúâåäåòå C-r. Âñè÷êî, êîåòî êàçàõìå +çà C-s, âàæè è çà C-r, îñâåí ÷å ïîñîêàòà íà òúðñåíå å îáúðíàòà. + + +* ÌÍÎÆÅÑÒÂÎ ÏÐÎÇÎÐÖÈ +---------------- + +Åäíà îò ïðèâëåêàòåëíèòå ñïîñîáíîñòè íà Åìàêñ å òàçè, ÷å ìîæå äà +ãëåäàòå ïîâå÷å îò åäèí ïðîçîðåö íà åêðàíà â äàäåí ìîìåíò îò âðåìå. + +>> Ïðèäâèæåòå êóðñîðà äî òîçè ðåä è âúâåäåòå C-u 0 C-l (òîâà å + CONTROL-L, íå CONTROL-1). + +>> Ñåãà âúâåäåòå C-x 2, êîåòî ùå ðàçäåëè åêðàíà íà äâà îòäåëíè + ïðîçîðåöà. Äâàòà ïðîçîðåöà ïîêàçâàò òîâà âúâåäåíèå. Êóðñîðúò + îñòàâà íà ïî-ãîðíèÿ ïðîçîðåö. + +>> Âúâåäåòå C-M-v, çà äà ñêðîëèðàòå äîëíèÿ ïðîçîðåö. (Àêî íÿìàòå + èñòèíñêè êëàâèø META, âúâåäåòå ESC C-v.) + +>> Âúâåäåòå C-x o ("o" îò "other" -- "äðóã"), çà äà ïðèäâèæèòå + êóðñîðà â äîëíèÿ ïðîçîðåö. +>> Èçïîëçâàéòå C-v è M-v â äîëíèÿ ïðîçîðåö, çà äà ãî ñêðîëèðàòå. + Ïðîäúëæåòå ÷åòåíåòî íà òåçè íàñîêè îò âúâåäåíèåòî â ãîðíèÿ + ïðîçîðåö. + +>> Âúâåäåòå C-x o îòíîâî, çà äà ïðèäâèæèòå êóðñîðà îòíîâî â ãîðíèÿ + ïðîçîðåö. Êóðñîðúò â ãîðíèÿ ïðîçîðåö å òî÷íî òàì, êúäåòî å áèë + ïðåäè. + +Ìîæå äà ïðîäúëæèòå äà èçïîëçâàòå C-x o, çà äà ïðåâêëþ÷âàòå ìåæäó +ïðîçîðöèòå. Âñåêè ïðîçîðåö èìà ñîáñòâåíî ìÿñòî íà êóðñîðà, íî ñàìî +åäèí ïðîçîðåö ïîêàçâà êóðñîð. Âñè÷êè îáèêíîâåíè êîìàíäè çà +ðåäàêòèðàíå ñå ïðèëàãàò â ïðîçîðåöà, â êîéòî å êóðñîðúò. Íèå íàðè÷àìå +òîçè ïðîçîðåö "òåêóù ïðîçîðåö". + +Êîìàíäàòà C-M-v å ìíîãî ïîëåçíà, êîãàòî ðåäàêòèðàòå òåêñò â åäèí +ïðîçîðåö è èçïîëçâàòå äðóãèÿ ïðîçîðåö ïðîñòî çà ñïðàâêà. Ìîæå äà +äúðæèòå êóðñîðà âèíàãè â ïðîçîðåöà, êúäåòî ðåäàêòèðàòå, è äà +íàïðåäâàòå ïîñëåäîâàòåëíî â äðóãèÿ ïðîçîðåö ÷ðåç C-M-v. + +C-M-v å ïðèìåð çà çíàê CONTROL-META. Àêî èìàòå èñòèíñêè êëàâèø META, +ìîæå äà âúâåæäàòå C-M-v, çàäúðæàéêè åäíîâðåìåííî CONTROL è META, +äîêàòî âúâåæäàòå v. Íÿìà çíà÷åíèå äàëè CONTROL èëè META "å íàòèñíàò +ïúðâè", çàùîòî è äâàòà êëàâèøà äåéñòâàò, ìîäèôèöèðàéêè çíàêà, êîéòî +ñòå âúâåëè. + +Àêî íÿìàòå èñòèíñêè êëàâèø META è èçïîëçâàòå ESC âìåñòî òîâà, ðåäúò +èìà çíà÷åíèå: òðÿáâà äà âúâåæäàòå ESC, ïîñëåäâàí îò CONTROL-v, çàùîòî +CONTROL-ESC v íÿìà äà ðàáîòè. Òîâà å òàêà, çàùîòî ESC å ñîáñòâåí +çíàê, à íå ìîäèôèêàòîð. + +>> Âúâåäåòå C-x 1 (â ãîðíèÿ ïðîçîðåö), çà äà ìàõíåòå äîëíèÿ ïðîçîðåö. + +(Àêî ñòå âúâåëè C-x 1 â äîëíèÿ ïðîçîðåö, òîâà ùå ìàõíå ãîðíèÿ. +Ìèñëåòå çà òàçè êîìàíäà êàòî "Çàäðúæ òî÷íî åäèí ïðîçîðåö -- òîçè, â +êîéòî ñúì ñåãà".) + +Íÿìà íóæäà äà èçâåæäàòå åäèí è ñúùè áóôåð â äâàòà ïðîçîðåöà. Àêî +èçïîëçâàòå C-x C-f, çà äà íàìåðèòå ôàéë â åäèíèÿ ïðîçîðåö, äðóãèÿò +ïðîçîðåö íå ñå ïðîìåíÿ. Ìîæå äà íàìèðàòå ôàéë âúâ âñåêè ïðîçîðåö, +íåçàâèñèìî îò òîâà êàêâî èìà â äðóãèòå ïðîçîðöè. + +Åòî îùå åäèí íà÷èí äà èçïîëçâàòå äâà ïðîçîðåöà, çà äà ïîêàæåòå äâå +ðàçëè÷íè íåùà: + +>> Âúâåäåòå C-x 4 C-f, ïîñëåäâàíî îò èìåòî íà åäèí îò âàøèòå ôàéëîâå. + Çàâúðøåòå ñ . Âèæòå êàê òîçè ôàéë ñå ïîÿâÿâà â äîëíèÿ + ïðîçîðåö. Êóðñîðúò ñúùî îòèâà òàì. + +>> Âúâåäåòå C-x o, çà äà ñå âúðíåòå â ãîðíèÿ ïðîçîðåö, è C-x 1, çà äà + èçòðèåòå äîëíèÿ. + + +* ÂËÎÆÅÍÈ ÍÈÂÀ ÍÀ ÐÅÄÀÊÒÈÐÀÍÅ +----------------------------- + +Ïîíÿêîãà ùå ñå îçîâåòå â òîâà, êîåòî ñå íàðè÷à "âëîæåíî íèâî íà +ðåäàêòèðàíå" (recursive editing level). Òîâà ñå îòáåëÿçâà îò +êâàäðàòíè ñêîáè â ðåäà íà ðåæèìà, êîèòî îãðàæäàò ñêîáèòå îêîëî èìåòî +íà ãëàâíèÿ ðåæèì. Íàïðèìåð, ìîæå äà âèäèòå [(Fundamental)] âìåñòî +(Fundamental). + +Çà äà ñå ìàõíåòå îò âëîæåíîòî íèâî íà ðåäàêòèðàíå, âúâåäåòå ESC ESC +ESC. Òîâà å îáùà êîìàíäà çà "èçëèçàíå". Ìîæå è äà ÿ èçïîëçâàòå çà +ìàõàíå (ñêðèâàíå) íà äîïúëíèòåëíè ïðîçîðöè, êàêòî è çà äà ñå ìàõíåòå +îò ìèíèáóôåðà. + +>> Âúâåäåòå M-x, çà äà âëåçåòå â ìèíèáóôåð; òîãàâà âúâåäåòå ESC ESC + ESC, çà äà èçëåçåòå. + +Íå ìîæåòå äà èçïîëçâàòå C-g, çà äà èçëåçåòå îò âëîæåíî íèâî íà +ðåäàêòèðàíå. Òîâà å òàêà, çàùîòî C-g ñå èçïîëçâà çà ïðåêðàòÿâàíå íà +êîìàíäè è àðãóìåíòè ÂÚÒÐÅ âúâ âëîæåíî íèâî íà ðåäàêòèðàíå. + + +* ÏÎËÓ×ÀÂÀÍÅ ÍÀ ÄÎÏÚËÍÈÒÅËÍÀ ÏÎÌÎÙ +---------------------------------- + + òîâà âúâåäåíèå ñå îïèòàõìå äà îñèãóðèì äîñòàòú÷íî èíôîðìàöèÿ, çà äà +çàïî÷íåòå äà èçïîëçâàòå Åìàêñ. Èìà òîëêîâà ìíîãî îùå â Åìàêñ, ÷å íå å +âúçìîæíî òî äà áúäå îáÿñíåíî âñè÷êîòî òóê. Îáà÷å ìîæå äà ïîèñêàòå äà +íàó÷èòå ïîâå÷å çà Åìàêñ, òúé êàòî òîé ïðèòåæàâà îùå ìíîãî ïîëåçíè +ñïîñîáíîñòè. Åìàêñ èìà êîìàíäè çà ÷åòåíå íà äîêóìåíòàöèÿòà íà Åìàêñ +êîìàíäèòå. Òåçè "ïîìîùíè" êîìàíäè âñè÷êè çàïî÷âàò ñúñ çíàêà +CONTROL-h, êîéòî ñå íàðè÷à "çíàêúò çà ïîìîù". + +Çà äà èçïîëçâàòå âúçìîæíîñòèòå íà òàçè ïîìîù, âúâåäåòå çíàêà C-h è +ñëåä òîâà çíàêà, êàçâàù êàêúâ âèä ïîìîù èñêàòå. Àêî ÍÀÈÑÒÈÍÀ ñòå ñå +èçãóáèëè, âúâåäåòå C-h ? è Åìàêñ ùå âè êàæå ñ êàêâî ìîæå äà âè +ïîìîãíå. Àêî ñòå âúâåëè C-h è ðåøèòå, ÷å íå ñå íóæäàåòå îò ïîìîù, +ïðîñòî âúâåäåòå C-g, çà äà ÿ ïðåêðàòèòå. + +(Íÿêîè êîìïþòðè ïðîìåíÿò çíà÷åíèåòî íà çíàêà C-h. Òå íàèñòèíà íå +òðÿáâà äà ïðàâÿò òîâà êàòî ñëÿïà ìÿðêà çà âñè÷êè ïîòðåáèòåëè, òàêà ÷å +èìàòå îñíîâàíèå äà ñå îïëà÷åòå íà ñèñòåìíèÿ àäìèíèñòðàòîð. Ìåæäó +äðóãîòî, àêî C-h íå èçâåæäà ñúîáùåíèå çà ïîìîù â äúíîòî íà åêðàíà, +îïèòàéòå êëàâèøà F1 èëè M-x help âìåñòî òîâà.) + +Íàé-îñíîâíîòî ïîìîùíî ñðåäñòâî å C-h c. Âúâåäåòå C-h, çíàêà c è +êîìàíäåí çíàê èëè ïîñëåäîâàòåëíîñò îò çíàöè, îáðàçóâàùè êîìàíäà; +òîãàâà Åìàêñ ùå èçâåäå ìíîãî êðàòêî îïèñàíèå íà êîìàíäàòà. + +>> Type C-h c C-p. + +Èçâåäåíîòî îïèñàíèå òðÿáâà äà áúäå íåùî êàòî + + C-p runs the command previous-line + (C-p èçïúëíÿâà êîìàíäàòà ïðåäèøåí-ðåä) + +Òîâà âè êàçâà "èìåòî íà ôóíêöèÿòà". Èìåíàòà íà ôóíêöèèòå ñå èçïîëçâàò +íàé-âå÷å çà íàñòðîéâàíå è ðàçøèðÿâàíå íà Åìàêñ. Íî òúé êàòî èìåíàòà +íà ôóíêöèèòå ñà èçáðàíè òàêà, ÷å äà ïîêàçâàò êàêâî ïðàâè êîìàíäàòà, òå +ìîãàò äà ñëóæàò è çà ìíîãî êðàòêà äîêóìåíòàöèÿ -- äîñòàòú÷íà, çà äà âè +ïðèïîìíè êîìàíäè, êîèòî âå÷å ñòå ó÷èëè. + +Ìíîãîçíàêîâè êîìàíäè, êàòî C-x C-s è (àêî íÿìàòå êëàâèø META èëè EDIT +èëè ALT) v, ñúùî ñà ïîçâîëåíè ñëåä C-h c. + +Çà äà ïîëó÷èòå îùå èíôîðìàöèÿ çà êîìàíäà, èçïîëçâàéòå C-h k âìåñòî C-h +c. + +>> Âúâåäåòå C-h k C-p. + +Òîâà èçâåæäà äîêóìåíòàöèÿòà íà ôóíêöèÿòà, êàêòî è íåéíîòî èìå, â +îòäåëåí Åìàêñ ïðîçîðåö. Êîãàòî ÿ ïðî÷åòåòå, âúâåäåòå C-x 1, çà äà +ìàõíåòå ïîìîùíèÿ òåêñò. Íå å íóæíî äà ïðàâèòå òîâà òî÷íî ñåãà. Ìîæå +äà ðåäàêòèðàòå, äîêàòî ñå îáðúùàòå êúì ïîìîùíèÿ òåêñò çà ñïðàâêà, è +ñëåä òîâà äà âúâåäåòå C-x 1. + +Åòî îùå íÿêîëêî ïîëåçíè C-h âúçìîæíîñòè: + + C-h f Îïèñâà ôóíêöèÿ. Òðÿáâà äà âúâåäåòå èìåòî íà + ôóíêöèÿòà. + +>> Îïèòàéòå ñ âúâåæäàíå íà C-h f previous-line. + Òîâà èçâåæäà öÿëàòà èíôîðìàöèÿ, êîÿòî Åìàêñ çíàå çà ôóíêöèÿòà, + êîÿòî îñúùåñòâÿâà êîìàíäàòà C-p. + +Ïîäîáíà êîìàíäà, C-h v, èçâåæäà äîêóìåíòàöèÿòà íà ïðîìåíëèâèòå, êîèòî +ìîæå äà ïðîìåíÿòå, çà äà íàñòðîéâàòå ïîâåäåíèåòî íà Åìàêñ. Òðÿáâà äà +âúâåäåòå èìåòî íà ïðîìåíëèâàòà, êîãàòî Åìàêñ âè ïîäñêàæå òîâà. + + C-h a Êîìàíäà Àïðîïîñ. Âúâåäåòå êëþ÷îâà äóìà è Åìàêñ ùå + ïîêàæå ñïèñúê íà âñè÷êè êîìàíäè, ÷èåòî èìå ñúäúðæà + òàçè êëþ÷îâà äóìà. Òåçè êîìàíäè ìîãàò âñè÷êè äà áúäàò + èçâèêàíè ÷ðåç META-x. Çà íÿêîè êîìàíäè êîìàíäàòà + Àïðîïîñ ùå èçâåäå äîïúëíèòåëíî åäíîçíàêîâà èëè + äâóçíàêîâà ïîñëåäîâàòåëíîñò îò êëàâèøè, êîÿòî ïóñêà + ñúùàòà êîìàíäà. + +>> Âúâåäåòå C-h a file. + +Òîâà èçâåæäà â äðóã ïðîçîðåö ñïèñúê íà âñè÷êè M-x êîìàíäè, êîèòî +ñúäúðæàò "file" â òÿõíîòî èìå. Ùå âèäèòå çíàêîâè êîìàíäè êàòî C-x +C-f, èçáðîåíè èçìåæäó ñúîòâåòíèòå èìåíà íà êîìàíäè, êàòî find-file. + +>> Âúâåäåòå C-M-v, çà äà ñêðîëèðàòå ïîìîùíèÿ ïðîçîðåö. Íàïðàâåòå ãî + íÿêîëêî ïúòè. + +>> Âúâåäåòå C-x 1, çà äà èçòðèåòå ïîìîùíèÿ ïðîçîðåö. + + C-h i ×åòåíå íà ðúêîâîäñòâà (Info). Òàçè êîìàíäà âè ïðàùà â + ñïåöèàëåí áóôåð, íàðè÷àí "*info*", êúäåòî ìîæå äà + ÷åòåòå ðúêîâîäñòâàòà íà èíñòàëèðàíèòå âúâ âàøàòà + ñèñòåìà ïàêåòè. Âúâåäåòå m emacs , çà äà + ÷åòåòå ðúêîâîäñòâîòî íà Åìàêñ. Àêî íèêîãà ïðåäè òîâà + íå ñòå èçïîëçâàëè Info, âúâåäåòå ? è Åìàêñ ùå âêëþ÷è + âúâåäåíèå âúâ âúçìîæíîñòèòå íà ðåæèìà Èíôî. Âåäíúæ + ñëåä êàòî ñòå ïðåìèíàëè òîâà âúâåäåíèå, òðÿáâà äà ñå + êîíñóëòèðàòå ñ Åìàêñ Èíôî ðúêîâîäñòâîòî êàòî âàøà + îñíîâíà äîêóìåíòàöèÿ. + + +* ÎÙÅ ÂÚÇÌÎÆÍÎÑÒÈ +----------------- + +Ìîæå äà íàó÷èòå ïîâå÷å çà Åìàêñ ñ ÷åòåíå íà íåãîâîòî ðúêîâîäñòâî, èëè +êàòî êíèãà, èëè â Èíôî (èçïîëçâàéòå ìåíþòî ïîìîù (Help) èëè âúâåäåòå +F10 h r). Äâå âúçìîæíîñòè, êîèòî ìîæå äà æåëàåòå â íà÷àëîòî, ñà +äîâúðøâàíå (completion), êîåòî ñïåñòÿâà ïèñàíå, è dired, êîéòî +îïðîñòÿâà áîðàâåíåòî ñ ôàéëîâå. + +Äîâúðøâàíåòî å íà÷èí äà èçáÿãâàòå íåíóæíî ïèñàíå. Íàïðèìåð, àêî +èñêàòå äà ïðåâêëþ÷èòå êúì áóôåðà *Messages*, ìîæå äà âúâåäåòå C-x b +*M è Åìàêñ ùå çàïúëíè îñòàíàëàòà ÷àñò îò èìåòî íà áóôåðà, +äîêîëêîòî ìîæå äà ñå îïðåäåëè îò òîâà, êîåòî ñòå âúâåëè. Äîâúðøâàíåòî +å îïèñàíî â Èíôî-ðúêîâîäñòâîòî íà Åìàêñ â ñòðàíèöàòà "Äîâúðøâàíå" +("Completion"). + +Dired âè ïîçâîëÿâà äà ãëåäàòå ñïèñúêà îò ôàéëîâå â äèðåêòîðèÿ (è êàòî +âúçìîæíîñò: íåéíèòå ïîääèðåêòîðèè), äà ñå ïðèäâèæâàòå â òîçè ñïèñúê, +äà ïîñåùàâàòå, ïðåèìåíóâàòå, èçòðèâàòå è èçîáùî äåéñòâàòå âúðõó +ôàéëîâåòå. Dired å îïèñàí â Èíôî-ðúêîâîäñòâîòî íà Åìàêñ â ñòðàíèöàòà +"Dired". + +Ðúêîâîäñòâîòî íà Åìàêñ îïèñâà îùå ìíîãî äðóãè âúçìîæíîñòè íà +ðåäàêòîðà. + + +* ÇÀÊËÞ×ÅÍÈÅ +------------ + +Çàïîìíåòå: çà äà èçëåçåòå áåçâúçâðàòíî îò Åìàêñ, èçïîëçâàéòå C-x C-c. +Çà äà èçëåçåòå âðåìåííî â îáâèâêà, òàêà ÷å äà ñå âúðíåòå â Åìàêñ +ïî-êúñíî, èçïîëçâàéòå C-z. + +Òîâà âúâåäåíèå å ïðåäâèäåíî äà áúäå ðàçáèðàåìî çà âñè÷êè íîâè +ïîòðåáèòåëè, òàêà ÷å àêî íàìèðàòå íåùî íåÿñíî, íå ñå ñàìîîáâèíÿâàéòå +-- îïëà÷åòå ñå! + + +* ÊÎÏÈÐÀÍÅ +---------- + +Òîâà âúâåäåíèå ïðîèçëèçà îò äúëãà ïîðåäèöà âúâåäåíèÿ â Åìàêñ, +çàïî÷âàéêè îò åäíî, íàïèñàíî îò Ñòþúðò Êðàêðàôò çà íà÷àëíèÿ Åìàêñ. + +Òàçè âåðñèÿ íà âúâåäåíèåòî, êàêòî è ÃÍÓ Åìàêñ, å çàùèòåíà ñ àâòîðñêè +ïðàâà è èäâà ñ ðàçðåøåíèå äà ðàçïðîñòðàíÿâàòå êîïèÿ ïðè ñëåäíèòå +óñëîâèÿ: + +This version of the tutorial, like GNU Emacs, is copyrighted, and +comes with permission to distribute copies on certain conditions: + +Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and permission notice are preserved, + and that the distributor grants the recipient permission + for further redistribution as permitted by this notice. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last altered them. + +Óñëîâèÿòà çà êîïèðàíå íà ñàìèÿ Åìàêñ ñà ïî-ñëîæíè, íî â ñúùèÿ äóõ. +Ìîëÿ, ïðî÷åòåòå ôàéëà COPYING è òîãàâà äàâàéòå êîïèÿ íà ÃÍÓ Åìàêñ íà +ñâîè ïðèÿòåëè. Ïîìîãíåòå äà ñïðåì çàòâîðåíîñòòà íà ïðîãðàìèòå +("ïðèòåæàíèåòî"), êàòî èçïîëçâàìå, ïèøåì è ñïîäåëÿìå ñâîáîäåí ñîôòóåð! + +Ïðåâîäúò íà áúëãàðñêè å èçâúðøåí îò Îãíÿí Êóëåâ +. + +;;; Local Variables: +;;; coding: windows-1251 +;;; End: +;;; arch-tag: 70cf6ad7-c2e4-41fe-8199-74aa52683b0e diff --git a/etc/TUTORIAL.cn b/etc/TUTORIAL.cn index dec4d3cad4..cb3e93d956 100644 --- a/etc/TUTORIAL.cn +++ b/etc/TUTORIAL.cn @@ -1083,3 +1083,5 @@ Chinese Translation by Chao-Hong Liu (2002, 2003) ;;; Local Variables: ;;; coding: chinese-iso-8bit ;;; End: + +;;; arch-tag: 46a53d82-a85a-46b6-bdc7-583aca063578 diff --git a/etc/TUTORIAL.cs b/etc/TUTORIAL.cs index 316098c0e7..525e481d3d 100644 --- a/etc/TUTORIAL.cs +++ b/etc/TUTORIAL.cs @@ -1042,3 +1042,5 @@ GNU Emacsu sv ;;; Local Variables: ;;; coding: iso-latin-2 ;;; End: + +;;; arch-tag: 479ef577-3d4d-4384-aeea-9fe79d5e89ca diff --git a/etc/TUTORIAL.de b/etc/TUTORIAL.de index 81f01b60ad..a007fef752 100644 --- a/etc/TUTORIAL.de +++ b/etc/TUTORIAL.de @@ -1,4 +1,4 @@ -Einführung in Emacs. (c) 2002 Free Software Foundation, Inc. +Einführung in Emacs. (c) 2002, 2003 Free Software Foundation, Inc. Emacs-Befehle beinhalten im allgemeinen die CONTROL-Taste (manchmal auch als CTRL, CTL oder STRG beschriftet) sowie die META-Taste (auch @@ -187,7 +187,7 @@ Textsuche in wissenschaftlichen Texten oft vorteilhaft ist.] [Anmerkung 2: Die Tasten `Home' (Pos1) und `End' (Ende) verhalten sich standardmäßig wie C-a und C-e, wie wohl die meisten Benutzer -annehmen würden.] +annehmen.] Die aktuelle Position des Cursors wird im Englischen auch `point' (Punkt) genannt. Beachten Sie bitte, daß sich `point' stets @@ -220,7 +220,7 @@ Kleiner-als) und M-> (META Gr Ende des ganzen Textes springen. Bei den meisten Terminal-Tastaturen befindet sich `<' über dem Komma, -d.h. Sie müssen zusätzlich die SHIFT-Taste verwenden (der Umschalter +d.h., Sie müssen zusätzlich die SHIFT-Taste verwenden (der Umschalter ist auf deutschen Tastaturen normalerweise mit einem dicken Aufwärtspfeil markiert). Ohne SHIFT-Taste würden Sie M-Komma eingeben. @@ -252,14 +252,14 @@ Markierungsring ansteuern. ein, bis Sie wieder an dieser Position angelangt sind. Die meisten Emacs-Befehle akzeptieren ein numerisches Argument, das in -der Regel als Wiederholungszähler dient (d.h. wie oft der Befehl +der Regel als Wiederholungszähler dient (d.h., wie oft der Befehl ausgeführt werden soll). Eingegeben wird diese Zahl mit C-u, dann die Ziffern und dann der Befehl selbst. Alternativ können Sie die META-Taste (bzw. EDIT- oder ALT-Taste) gedrückt halten und dann die Ziffern des Wiederholungszählers eingeben. Wir empfehlen allerdings, die C-u-Methode zu lernen, da sie mit jedem Terminal funktioniert. -Das numerische Argument wird auch `Präfix-Argument' genannt, da man -es vor dem zugehörigen Befehl eingibt. +Das numerische Argument wird auch `Präfix-Argument' genannt, da man es +vor dem zugehörigen Befehl eingibt. Beispiel: C-u 8 C-f bewegt den Cursor acht Zeichen vorwärts. @@ -582,8 +582,7 @@ Anzahl der notwendigen C-x u-Befehle zu reduzieren. C-_ ist ein alternativer Undo-Befehl; er arbeitet genauso wie C-x u, ist jedoch einfacher zu tippen, wenn Sie den Befehl mehrmals hintereinander ausführen möchten. Der Nachteil von C-_ ist, daß bei -manchen Tastaturen es nicht sofort einsichtig ist, wie man das -eingibt. +manchen Tastaturen nicht sofort einsichtig ist, wie man das eingibt. Eine weitere Eingabemöglichkeit bei vielen Terminals ist C-/. @@ -791,9 +790,9 @@ Auf den meisten Systemen wie Linux oder FreeBSD wird Emacs `suspendiert', wenn Sie C-z drücken, d.h., Sie kehren zurück zur Eingabezeile des Betriebssystems, ohne Emacs zu beenden. In der Regel können Sie dann mittels des Befehls `fg' bzw. `%emacs' wieder zu Emacs -umschalten. Bei X bewirkt C-z in der Regel, daß Emacs ikonofiziert -wird, also als Ikone (`Icon') darauf wartet, mit einem Mausklick bei -Bedarf wieder vergrößert zu werden. +umschalten. Unter X Window System bewirkt C-z in der Regel, daß Emacs +ikonofiziert wird, also als Ikone (`Icon') darauf wartet, mit einem +Mausklick bei Bedarf wieder vergrößert zu werden. Bei Betriebssystemen bzw. Shells, die Suspension von Programmen nicht implementiert haben (z.B. MS-DOS), startet C-z einen @@ -882,7 +881,7 @@ werden kann.] Die Bildschirmzeile unmittelbar über dem Echo-Bereich ist die Statuszeile (`mode line'). Sie schaut ungefähr so aus: --1:** TUTORIAL.de (Fundamental)--L865--58%---------------- +-1:** TUTORIAL.de 58% L865 (Fundamental)---------------------- Diese Zeile gibt nützliche Hinweise über den momentanen Zustand von Emacs und den Text, den Sie gerade editieren. @@ -890,10 +889,10 @@ Emacs und den Text, den Sie gerade editieren. Sie wissen bereits, was der Dateiname bedeutet. `--NN%--' zeigt die momentane Position innerhalb des Textes an: NN Prozent davon sind oberhalb des Bildschirms. Ist der Dateianfang zu sehen, dann -erscheint `--Top--' anstelle von `--00%--'. Analog dazu erscheint -`--Bot--' (für das englische Wort `bottom'), wenn das Dateiende -sichtbar ist. Wenn Sie einen Text betrachten, der komplett auf den -Bildschirm paßt, dann erscheint `--All--'.] +erscheint `Top' anstelle von `00%'. Analog dazu erscheint `Bot' (für +das englische Wort `bottom'), wenn das Dateiende sichtbar ist. Wenn +Sie einen Text betrachten, der komplett auf den Bildschirm paßt, dann +erscheint `All'. Das `L' und die nachfolgenden Ziffern geben die aktuelle Zeilennummer an, in denen sich der Cursor befindet. @@ -962,7 +961,7 @@ Dokumentation zum derzeit aktuellen Hauptmodus bekommen Sie mit C-h m. >> Drücken Sie C-u C-v ein- oder mehrmals, um diese Zeile in die Nähe des oberen Bildschirmrands zu bringen. ->> Lesen Sie nun mittels C-h m die englischeDokumentation zum +>> Lesen Sie nun mittels C-h m die englische Dokumentation zum Textmodus. >> Entfernen Sie schließlich das Dokumentationsfenster mit C-x 1. @@ -972,7 +971,7 @@ Verf (z.B. der Überschreibmodus: Zeichen werden nicht eingefügt, sondern überschreiben den Text). Man kann Nebenmodi ein- und ausschalten unabhängig von anderen Nebenmodi und Hauptmodi; mit anderen Worten, -Sie können zu Ihrem Hauptmodus, keinen, einen oder sogar mehrere +Sie können zu Ihrem Hauptmodus keinen, einen oder sogar mehrere Nebenmodi haben. Ein Nebenmodus, welcher äußerst nützlich ist, besonders für das @@ -989,7 +988,7 @@ ausgeschaltet bzw. eingeschaltet war. Wir sagen, da den Modus umschaltet (`toggle'). >> Geben Sie nun M-x auto-fill-mode ein. Fügen Sie - anschließend eine Zeile ein, die aus lauter "asdf " besteht, und + anschließend eine Zeile ein, die aus lauter `asdf ' besteht, und zwar so lange, bis die Zeile automatisch umgebrochen wird. Vergessen Sie nicht, Leerzeichen einzugeben, da nur dort ein Umbruch erfolgt. @@ -1016,21 +1015,22 @@ Absatzes stehen mu * SUCHEN -------- -Emacs kann Zeichenketten (`strings') entweder vorwärts (`forward') -oder rückwärts (`backward') suchen. Gleichzeitig wird der Cursor an -die nächste Stelle bewegt, wo diese Zeichenkette erscheint. +Emacs kann Zeichenketten (`strings') entweder in Richtung Pufferende +(vorwärts, `forward') oder in Richtung Pufferanfang (rückwärts, +`backward') suchen. Gleichzeitig wird der Cursor an die nächste +Stelle bewegt, wo diese Zeichenkette erscheint. Hier unterscheidet sich Emacs von vielen anderen Editoren, da nämlich die Standard-Suchoperation inkrementelles Suchen ist, d.h., die Suche beginnt dann, wenn Sie die Zeichen eingeben. -Der Befehl für Vorwärtssuchen ist C-s, und C-r für Rückwärtssuchen. +Der Befehl für Vorwärtssuchen ist C-s und C-r für Rückwärtssuchen. ABER HALT! Probieren Sie bitte diese Befehle noch nicht. -Wenn Sie C-s eingeben, dann erscheint die Zeichenkette "I-search:" als -Eingabeaufforderung im Echobereich. Das bedeutet, daß Emacs jetzt in -einer inkrementellen Suche ist und darauf wartet, daß Sie den -gewünschten Suchstring eingeben. beendet die Suche. +Wenn Sie C-s eingeben, dann erscheint die Zeichenkette `I-search:' als +Eingabeaufforderung im Echobereich. Das bedeutet, daß Emacs jetzt +eine inkrementellen Suche ausführt und darauf wartet, daß Sie die zu +suchende Zeichenkette eingeben. beendet die Suche. >> Geben Sie jetzt C-s ein, um einen Suchvorgang zu starten. Schreiben Sie LANGSAM, einen Buchstaben nach dem anderen, das Wort `Cursor', @@ -1061,16 +1061,16 @@ erwecken, geben Sie C-q ein, und lesen Sie dann den Abschnitt am besten tun kann. Wenn Sie sich mitten in einer inkrementellen Suche befinden und - drücken, dann wird das letzte Zeichen im Suchstring gelöscht, -und der Cursor springt zurück auf die letzte Suchposition. -Angenommen, Sie haben "c" eingegeben, um das erste Auftreten von "c" -zu suchen. Geben Sie jetzt "u" ein, dann springt der Cursor zu dem -ersten Auftreten der Zeichenkette "cu". Wenn Sie jetzt mit -das "u" vom Suchstring löschen, dann springt der Cursor zurück zum -ersten "c". Drücken Sie dagegen ein paar mal C-s, um weitere -"cu"-Zeichenketten zu finden, dann bewirkt , daß Sie zum -letzten Auftreten von "cu" zurückspringen, und erst wenn es kein -weiteres "cu" mehr gibt, springt der Cursor zum ersten "c" zurück. + drücken, wird das letzte Zeichen im Suchstring gelöscht, und +der Cursor springt zurück auf die letzte Suchposition. Angenommen, +Sie haben `c' eingegeben, um das erste Auftreten von `c' zu suchen. +Geben Sie jetzt `u' ein, dann springt der Cursor zu dem ersten +Auftreten der Zeichenkette `cu'. Wenn Sie jetzt mit das `u' +vom Suchstring löschen, dann springt der Cursor zurück zum ersten `c'. +Drücken Sie dagegen ein paar mal C-s, um weitere `cu'-Zeichenketten zu +finden, dann bewirkt , daß Sie zum letzten Auftreten von `cu' +zurückspringen, und erst wenn es kein weiteres `cu' mehr gibt, springt +der Cursor zum ersten `c' zurück. Die Suche wird ebenfalls beendet, wenn Sie ein CONTROL- oder META-Zeichen eingeben (mit ein paar Ausnahmen -- Zeichen, die @@ -1210,28 +1210,30 @@ Eingabem Der Standard-Zeichensatz für Deutsch ist Latin-1 (auch bekannt unter dem Namen ISO-8859-1). Wenn anstelle der deutschen Umlaute -unansehnliche Konstrukte wie `\201ä' dargestellt werden, dann ist -die sogenannte Multibyte-Zeichenunterstützung deaktiviert (intern -werden in Emacs nicht-ASCII Zeichensätze durch mehr als ein Byte +unansehnliche Konstrukte wie `\201ä' dargestellt werden, dann ist die +sogenannte Multibyte-Zeichenunterstützung deaktiviert (intern werden +in Emacs nicht-ASCII Zeichensätze durch mehr als ein Byte repräsentiert). Durch den Befehl `M-x toggle-enable-multibyte-characters' wird die -Multibyte-Zeichenunterstützung aktiviert. +Multibyte-Zeichenunterstützung aktiviert. Denken Sie daran, die +Tabulatortaste zur Vervollständigung von Befehlsnamen zu benützen, +z.B. `M-x toggle-e'. Wenn anstelle der Umlaute `ä', `ö' oder `ü' die Zeichen `d', `v' und -`|' erscheinen (also `kleines D', `kleines V', und ein senkrechter +`|' erscheinen (also `kleines D', `kleines V' und ein senkrechter Strich), dann wird das achte Bit von jedem Byte abgeschnitten, sodaß nur ASCII-Zeichen dargestellt werden können. In der Regel gibt es zwei Ursachen für dieses Problem: Sie haben sich nicht `8-bit clean' (z.B. mittels `telnet -8 ...') eingeloggt oder Ihr Telekommunikationsprogramm ist nicht für 8-bit konfiguriert. ->> Geben Sie C-x m ein. Die deutschen Umlaute (so sie von - Ihrem Terminal darstellbar sind) verschwinden und werden durch - Zahlenkonstrukte ersetzt. So wird zum Beispiel Umlaut a (`ä') - dargestellt als `\201ä'. +>> Geben Sie `M-x toggle-enable-multibyte-characters' ein. Die + deutschen Umlaute (so sie von Ihrem Terminal darstellbar sind) + verschwinden und werden durch Zahlenkonstrukte ersetzt. So wird + zum Beispiel Umlaut a (`ä') dargestellt als `\201ä'. >> Aktivieren Sie wieder die Multibyte-Zeichenunterstützung mittels - C-x m. + `M-x toggle-enable-multibyte-characters'. Sehen Sie anstelle der Umlaute leere Kästchen (unter X), dann sollten Sie mit C-x C-c Emacs beenden und folgendermaßen neu starten: @@ -1483,3 +1485,5 @@ freie Software verwenden, verteilen, oder sogar selber schreiben. ;;; Local Variables: ;;; coding: latin-1 ;;; End: + +;;; arch-tag: a8f2fe06-631d-4ae1-887e-446f971b0baa diff --git a/etc/TUTORIAL.es b/etc/TUTORIAL.es index fea5ca6b31..9cd6100e84 100644 --- a/etc/TUTORIAL.es +++ b/etc/TUTORIAL.es @@ -1237,3 +1237,5 @@ compartiendo software libre! ;;; Local Variables: ;;; coding: latin-1 ;;; End: + +;;; arch-tag: 66aae86e-6f86-4a3e-b82a-44a783f774fd diff --git a/etc/TUTORIAL.fr b/etc/TUTORIAL.fr index 3733054ca6..953e9edb64 100644 --- a/etc/TUTORIAL.fr +++ b/etc/TUTORIAL.fr @@ -638,7 +638,7 @@ fichiers mais la liste obtenue par C-x C-b. Le tampon "*Messages*" ne correspond pas non plus à un fichier ; il contient la liste des messages apparus dans la ligne d'état pendant votre session Emacs. ->> Faites C-x C-b *Messages* pour visualiser le tampon des +>> Faites C-x b *Messages* pour visualiser le tampon des messages. Puis, faites C-x b TUTORIAL pour revenir à ce didacticiel. @@ -1198,3 +1198,5 @@ Cette traduction fran ;;; Local Variables: ;;; coding: latin-1 ;;; End: + +;;; arch-tag: f6c5c2ff-bf24-477c-bd18-32f76f51ba65 diff --git a/etc/TUTORIAL.it b/etc/TUTORIAL.it index 4d8936243b..7936bbd298 100644 --- a/etc/TUTORIAL.it +++ b/etc/TUTORIAL.it @@ -1113,3 +1113,5 @@ stesso spirito. Per favore, leggete il file COPYING e poi distribuite copie di GNU Emacs ai vostri amici. Aiutateci a combattere l'ostruzionismo al software ("la proprietà") usando, scrivendo e condividendo software libero! + +;;; arch-tag: c6f7079d-8032-473d-91d4-36754af15719 diff --git a/etc/TUTORIAL.ja b/etc/TUTORIAL.ja index 06a76a5908..ad25a0a31c 100644 --- a/etc/TUTORIAL.ja +++ b/etc/TUTORIAL.ja @@ -1069,3 +1069,5 @@ GNU Emacs to your friends. Help stamp out software obstructionism ;;; Local Variables: ;;; coding: iso-2022-jp ;;; End: + +;;; arch-tag: 7136abc2-eb97-4f51-80a2-fa690ba4cfe8 diff --git a/etc/TUTORIAL.ko b/etc/TUTORIAL.ko index ba92994a39..72782dc330 100644 --- a/etc/TUTORIAL.ko +++ b/etc/TUTORIAL.ko @@ -1003,3 +1003,5 @@ GNU $(C@L8F=:?M(B $(C00@L(B $(C@L(B $(CAvD'<-(B $(CFG@:(B $(C@z@[1G@L COPYING$(C@L6s4B(B $(CFD@O@;(B $(C@P0m(B $(C3-(B $(CHD?!(B GNU $(C@L8F=:@G(B $(C:9;g:;@;(B $(CD#18?!0T(B $(CAV=J=C?@(B. $(C@Z@/(B $(Cn8&(B $(C>20m(B $(C885i0m(B $(C0x@/GT@87N=a(B $(Cn(B $(C9fGX8&(B ("$(Cv als je geen META, EDIT of ALT toets hebt). @@ -37,7 +37,7 @@ en type v, of type v als je geen META, EDIT of ALT toets hebt). * SAMENVATTING -------------- -De volgende commando's zijn handig volledige schermen te bekijken: +De volgende commando's zijn handig om volledige schermen te bekijken: C-v ga een scherm vooruit M-v ga een scherm terug @@ -57,9 +57,9 @@ De volgende commando's zijn handig volledige schermen te bekijken: Het is handig om per scherm te bewegen, maar hoe beweeg je nu naar een specifieke plaats op het scherm? -Er is een aantal manieren waarop je dit kan doen. De basismanier is +Er is een aantal manieren waarop je dit kunt doen. De basismanier is m.b.v de commando's C-p, C-b, C-f en C-n. Elk van deze commando's -verplaatst de cursor precies een rij of colomn in een bepaalde richting +verplaatst de cursor precies een regel of teken in een bepaalde richting op het scherm. Hier volgt een figuur met de vier commando's en de richting waarin ze de cursor bewegen: @@ -75,7 +75,7 @@ richting waarin ze de cursor bewegen: de figuur. Type dan C-l om de hele figuur in het midden van het centrum te plaatsen. -Met een beetje kennis van het engels zijn deze commando's gemakkelijk te +Met een beetje kennis van het Engels zijn deze commando's gemakkelijk te onthouden: de P komt van previous (vorige), de N van next (volgende), de B van backward (achteruit) en de F van forward (vooruit). Dit zijn de basiscommando's om de cursor te bewegen, dus je zult ze CONTINUE @@ -84,65 +84,68 @@ gebruiken: Het is slim als je ze nu leert te gebruiken. >> Type een paar keer C-n om de cursor op deze regel te krijgen. >> Beweeg binnen de regel met C-f (herhaaldelijk) en terug omhoog met C-p - Let op wat C-P doet als de cursor midden in een regel staan. + Let op wat C-p doet als de cursor midden in een regel staat. -Elke regel eindigt met een Newline teken (het engelse `new line' betekent +Elke regel eindigt met een Newline teken (het Engelse `new line' betekent `nieuwe regel'); dit teken scheidt elke regel van de volgende. De laatste regel in een bestand moet eigenlijk ook met een Newline eindigen (maar dat is niet noodzakelijk voor Emacs ). ->> Type een C-b terwijl de cursor aan het begin van een regel staat. - De cursor zal naar het eind van de vorige regel bewegen, omdat je - achteruit over het Newline teken gaat. +>> Type het commando C-b terwijl de cursor aan het begin van een regel + staat. De cursor zal naar het eind van de vorige regel bewegen, + omdat je achteruit over het Newline teken gaat. Net als C-b kan ook C-f over Newline tekens heen bewegen. ->> Type nog wat C-b's zodat je door krijgt waar de cursor is. - Type dan C-f's om terug naar het einde van de regel te bewegen. - Een C-f beweegt dan naar de volgende regel. +>> Type nog een aantal keren het commando C-b, zodat je door krijgt waar de + cursor is. + Type dan enkele keren C-f om de cursor terug naar het einde van de regel + te bewegen. + Een C-f commnado beweegt de cursor dan naar de volgende regel. Wanneer je de cursor voorbij het begin of het einde van het scherm beweegt zal de tekst over het scherm heen schuiven. Dit heet `scrollen', of -`schuiven' in goed nederlands. Door te scrollen zorgt Emacs ervoor dat -de cursor de gewenste beweging kan doen zonder dat de cursor van het -scherm af beweegt. +`schuiven' in goed Nederlands. Door te scrollen zorgt Emacs ervoor dat de +cursor de gewenste beweging kan doen zonder dat de cursor van het scherm +af beweegt. >> Probeer de cursor voorbij de onderkant van het scherm te bewegen met C-n en zie wat er gebeurt. -Als beweging op karakterbasis te langzaam gaat, kan je ook per woord -bewegen. M-f (Meta-f) beweegt een woord vooruit en M-b een woord -achteruit. +Als beweging op letterteken te langzaam gaat, kun je de cursor ook per +woord bewegen. M-f (Meta-f) beweegt de cursor een woord vooruit en M-b +een woord achteruit. ->> Type een paar M-f's en M-b's. +>> Type enkele keren M-f en M-b. -Als je midden in een woord staan beweegt M-f naar het eind van het -woord. Als je op witruimte tussen woorden staat beweegt M-f naar het -eind van het volgende woord. M-b beweegt analoog, de andere kant op. +Als je midden in een woord staat beweegt M-f de cursor naar het eind van +het woord. Als je op een witte ruimte tussen woorden staat beweegt M-f de +cursor naar het eind van het volgende woord. Het commando M-b beweegt +analoog, de andere kant op. ->> Type een paar M-f's en M-b's met tussendoor wat C-f's en C-b's zodat - je ziet wat M-f en M-b doen vanaf bepaalde plaatsen in een woord en - tussen twee woorden. +>> Type enkele keren M-f en M-b en daar tussendoor enkele keren C-f en C-b, + zodat je ziet wat M-f en M-b doen vanaf bepaalde plaatsen in een + woord en tussen twee woorden. Merk op dat er een analogie zit tussen enerzijds C-f en C-b en anderzijds M-f en M-b. Het is bij veel commando's zo dat Meta tekens gebruikt worden om iets te doen in eenheden van de taal (woorden, -zinnen, paragrafen) terwijl Control tekens te maken hebben met dingen -die los staan van wat je aan het editen bent (tekens, regels, etc). +zinnen, alinea's) terwijl Control tekens te maken hebben met dingen die +los staan van wat je aan het editten bent (tekens, regels, etc). -Deze analogie gaat ook op voor regels en zinnen: C-a en C-e bewegen naar -het begin of eind van een regel, terwijl M-a en M-e naar het begin of -eind van een zin gaan. +Deze analogie gaat ook op voor regels en zinnen: C-a en C-e bewegen de +cursor naar het begin of eind van een regel, terwijl met M-a, +respectievelijk M-e, de cursor naar het begin of eind van een zin gaat. ->> Probeer een paar C-a's gevolgd door een paar C-e's. - Probeer een paar M-a's gevolgd door een paar M-e's. +>> Type enkele keren C-a en dan enkele keren C-e. + Type enkele keren M-a en dan enkele keren M-e. -Zie hoe herhaalde C-a's niets doen, terwijl herhaalde M-a's steeds een -zin terug bewegen. Alhoewel ze niet volledig overeenkomen is het gedrag -van allebei niet onnatuurlijk. +Zie hoe herhaalde C-a commando's niets doen, terwijl herhaalde M-a +commando's steeds een zin terug bewegen. Alhoewel ze niet volledig +overeenkomen is het gedrag van allebei niet onnatuurlijk. De plaats van de cursor in de tekst wordt `punt' genoemd (zonder -lidwoord, `point' in het engels). Anders gezegd: de cursor laat op het +lidwoord, `point' in het Engels). Anders gezegd: de cursor laat op het scherm de plek zien waarop punt in de tekst staat. Nu volgt een samenvatting van eenvoudige cursorbewegingsoperaties, @@ -167,11 +170,11 @@ inclusief die commando's die per woord of zin bewegen: Deze commando's worden het frequentst gebruikt. Er zijn nog twee belangrijk cursorbewegingsoperaties: M-< -(Meta kleiner-dan) beweegt naar het begin van het bestand, -en M-> (Meta groter-dan) beweegt naar het eind. +(Meta kleiner-dan) beweegt de cursor naar het begin van het bestand, +en M-> (Meta groter-dan) beweegt de cursor naar het eind. -Op de meeste toetsenborden zit de "<" boven de comma, zodat je de Shift -toets (ook wel bekend als de hoofdlettertoets) moet gebruiken om het "<" +Op de meeste toetsenborden zit de '<' boven de komma, zodat je de Shift +toets (ook wel bekend als de hoofdlettertoets) moet gebruiken om het '<' teken in te typen. Op deze toetsenborden moet je ook de shift gebruiken om M-< in te typen: zonder shift zou je M-, (Meta komma) typen. @@ -181,30 +184,30 @@ om M-< in te typen: zonder shift zou je M-, (Meta komma) typen. >> Type nu M-> om naar het eind van het bestand te springen. Gebruik daarna M-v om hier weer terug te komen. -Als je toetsenbord pijltjestoetsen heeft kan je ook die gebruiken om de +Als je toetsenbord pijltjestoetsen heeft kun je ook die gebruiken om de cursor te verplaatsen. We raden je aan om C-b, C-f, C-n en C-p op zijn minst te leren, om drie redenen. Ten eerste werken ze op alle toetsenborden, ook die zonder pijltjestoetsen. Ten tweede zul je merken -dat, wanneer je eenmaal wat ervaring hebt opgedaan in omgaan met Emacs, -het gebruik van deze CTRL tekens sneller is dan de pijltjestoetsen (omdat -je handen in de typehouding kunnen blijven). Ten derde, als je eenmaal -gewend bent aan deze commando's met CTRL tekens, kan je makkelijk andere -geavanceerde cursorbewegingscommandos leren. +dat, wanneer je eenmaal wat ervaring hebt opgedaan in het omgaan met +Emacs, het gebruik van deze CTRL tekens sneller gaat dan het werken met +pijltjestoetsen (omdat je handen in de typehouding kunnen blijven). Ten +derde, als je eenmaal gewend bent aan deze commando's met CTRL tekens, +kun je makkelijk andere geavanceerde cursorbewegingscommando's leren. De meeste Emacs commando's accepteren een numeriek argument. Voor de meeste commando's is dit argument het aantal keren dat het commando -herhaald moet worden. Je geeft dit numerieke argument aan door voor het -commando, C-u gevolgd door de cijfers van het getal te typen. Als je -toetsenbord een META (of EDIT of ALT) toets heeft, is er ook een andere -manier om het getal aan te geven: type de cijfers terwijl je de META toets -ingedrukt houdt. We raden je aan de C-u manier te leren omdat die werkt -op elk willekeurig toetsenbord. +herhaald moet worden. Je geeft dit numerieke argument aan, dat vooraf +gegaan wordt door het commando C-u, de cijfers van het getal te typen. +Als je toetsenbord een META (of EDIT of ALT) toets heeft, is er ook +een andere manier om het getal aan te geven: type de cijfers terwijl +je de META toets ingedrukt houdt. We raden je aan de C-u manier te +leren omdat die werkt op elk willekeurig toetsenbord. Bijvoorbeeld, C-u 8 C-f beweegt de cursor 8 plaatsen naar voren. ->> Probeer eens om met C-n of C-p en een numeriek argument de cursor - met slechts een commando naar een regel in de buurt van deze zin - te bewegen. +>> Probeer eens om met C-n of C-p en één numeriek argument de cursor + met slechts een commando naar een regel in de buurt van deze zin te + bewegen. Voor de meeste commando's is het numerieke argument het aantal keren dat het commando herhaald moet worden. Voor sommige commando's betekent het @@ -215,13 +218,13 @@ de tekst 4 regels. >> Probeer nu C-u 8 C-v. -Als het goed is is de tekst daarmee 8 regels opgeschoven. Als je het weer -terug omlaag wil scrollen kan je een argument aan M-v geven. +Als het goed is is de tekst daarmee 8 regels opgeschoven. Als je weer +terug omlaag wil scrollen kun je een argument aan M-v geven. Als je een windowing systeem gebruikt, zoals X Windows, dan zou je een lange rechthoek moeten zien aan de linkerkant van het Emacs window. Deze rechthoek heet een scrollbar (misschien is `verschuifbalk' een goede -vertaling). Je kan de tekst scrollen door met de muis in de scrollbar te +vertaling). Je kunt de tekst scrollen door met de muis in de scrollbar te klikken. >> Klik met de middelste muisknop bovenaan het donkere gebied in de @@ -229,24 +232,25 @@ klikken. afhankelijk is van hoe hoog of laag je klikt. >> Beweeg de muis heen en weer terwijl je de middelste muisknop ingedrukt - houdt. Je zal zien dat de tekst met de muis mee heen en weer scrollt. + houdt. Je zult zien dat de tekst met de muis mee heen en weer scrollt. * ALS EMACS HANGT ----------------- -Als Emacs niet meer op commando's reageert kan je haar veilig onderbreken -door C-g te typen. Je kan C-g gebruiken om een commando te stoppen als -het te lang duurt om uit te voeren. +Als Emacs niet meer op commando's reageert kun je haar veilig onderbreken +door C-g te typen. Je kunt C-g gebruiken om een commando te stoppen als +het te lang duurt om het uit te voeren. -Je kan C-g ook gebruiken om een numeriek argument weg te gooien of +Je kunt C-g ook gebruiken om een numeriek argument weg te gooien of om het begin van een commando dat je niet wilt afmaken te vergeten. >> Type nu C-u 100 om een numeriek argument te maken met de waarde 100, en type dan C-g. Type vervolgens C-f. Als het goed is is de cursor maar - een positie verplaatst, omdat het argument weggegooid hebt met C-g. + één positie verplaatst, omdat je het argument weggegooid hebt met C-g. -Als je per ongeluk een typt kan je daarvan komen met een C-g. +Als je per ongeluk een typt kun je dat ongedaan maken met het +commando C-g. * ONMOGELIJKE COMMANDO'S @@ -255,7 +259,7 @@ Als je per ongeluk een typt kan je daarvan komen met een C-g. Sommige Emacs commando's zijn onmogelijk gemaakt zodat beginnende gebruikers ze niet per ongeluk kunnen uitvoeren. -Als je een van de onmogelijke commando's intypt laat Emacs uitleg zien +Als je één van de onmogelijke commando's intypt laat Emacs uitleg zien over het commando dat je gegeven hebt en vraagt of je het werkelijk uit wilt voeren. @@ -271,9 +275,9 @@ uitvoeren en beantwoord je de vraag met "n" (van `no' of `nee'). ---------- Emacs kan meerdere vensters laten zien, elk venster met zijn eigen tekst. -We zullen later uitleggen hoe je met meerdere vensters om kan gaan. Op +We zullen later uitleggen hoe je met meerdere vensters om kunt gaan. Op dit moment willen we slechts uitleggen hoe je van extra vensters af kunt -komen en terug kan keren naar simpelweg editen met 1 venster. Het is +komen en terug kunt keren naar simpelweg editten met 1 venster. Het is eenvoudig: C-x 1 een enkel venster (i.e. gooi alle andere vensters weg) @@ -294,96 +298,100 @@ worden weggegooid. ----------------------- Als je tekst toe wilt voegen type je die eenvoudigweg in. Tekens die je -kan zien, zoals A, 7, *, en dergelijke, worden door Emacs als tekst -ge-interpreteerd en meteen aan de tekst toegevoegd. Type (de -`volgende regel' toets) om een Newline toe te voegen en dus een nieuwe -regel te beginnen. +kunt zien, zoals A, 7, *, en dergelijke, worden door Emacs als tekst +geïnterpreteerd en meteen aan de tekst. Type (de `volgende regel' +toets) om een Newline toe te voegen en dus een nieuwe regel te beginnen. + +Je kunt het laatste teken dat je intypte weghalen door te typen. + is een toets op het toetsenbord--dezelfde toets die je normaal +gesproken gebruikt, buiten Emacs, om het laatst ingetypte teken te wissen. +Het is meestal een grote toets, een paar rijen boven de toets, +waar "Delete", "Del" of "Backspace" op staat. -Je kan het laatste teken dat je intypte weghalen door te typen. - is een toets op het toetsenbord, die misschien ook wel "Del" -heet. In sommige gevallen dient de "Backspace" toets als , maar -niet altijd! +Als er op die grote toets "Backspace" staat, dan is dat degene die je +gebruikt voor . Er kan op een andere plaats ook nog een andere +toets zijn waarop "Delete" staat, maar dat is niet . -In het algemeen haalt het teken dat juist voor de cursorpositie +In het algemeen haalt het teken dat juist voor de cursorpositie staat weg. >> Probeer dit nu: type een paar letters en haal ze weer weg door een paar - keer op te drukken. Maak je niet druk over het feit dat dit - bestand verandert; je zal niets veranderen aan de originele versie van - deze uitleg. Je zit slechts je eigen copie te wijzigen. + keer op te drukken. Maak je niet druk over het feit dat dit + bestand verandert; je zult niets veranderen aan de originele versie van + deze uitleg. Je zit slechts je eigen kopie te wijzigen. -Als een regel tekst te lang wordt om op een regel op het scherm te laten +Als een regel tekst te lang wordt om de regel op het scherm te laten zien dan gaat de regel verder op een volgende schermregel. Een backslash ("\") in de rechtermarge laat dan zien dat de regel op de volgende schermregel verder gaat. >> Voeg nu tekst toe totdat je de rechter kantlijn raakt, en blijf - toevoegen. Je zal zien dat er een vervolgregel verschijnt. + toevoegen. Je zult zien dat er een vervolgregel verschijnt. ->> Type weer wat s om zoveel tekens weg te halen tot de regel weer - op een schermregel past. De vervolgregel zal verdwijnen. +>> Type weer enkele keren om zoveel tekens weg te halen tot + de regel weer op een schermregel past. De vervolgregel zal verdwijnen. -Je kan een Newline weggooien als elk ander teken. Als je een Newline +Je kunt een Newline weggooien als elk ander teken. Als je een Newline weggooit voeg je de twee regels waar de Newline tussen staat samen tot een enkele regel. Als de regel die het resultaat is van deze operatie niet op -een schermregel past zal ze getoond worden met een vervolgregel. +een schermregel past zal hij getoond worden met een vervolgregel. ->> Beweeg de cursor naar het begin van een regel en type . Dit +>> Beweeg de cursor naar het begin van een regel en type . Dit voegt de huidige en vorige regel samen. >> Type om de Newline die je net weggooide weer toe te voegen. Je herinnert je dat je bij de meeste Emacs commando's het aantal keren dat -het herhaald moet worden op kan geven. Dit geldt ook voor gewone tekens. +iets herhaald moet worden, op kunt geven. Dit geldt ook voor gewone tekens. Als je een gewoon teken herhaalt wordt dat teken herhaaldelijk toegevoegd. >> Probeer dat nu: type C-u 8 * om ******** toe te voegen. Je hebt nu de basismanier geleerd om iets in Emacs te typen en fouten te -corrigeren. Je kan tekst ook per woord of regel weggooien. Hier volgt +corrigeren. Je kunt tekst ook per woord of regel weggooien. Hier volgt een samenvatting van de commando's om tekst te verwijderen: - haal het teken weg dat voor de cursor staat - C-d haal het teken weg dat achter de cursor staat + haal het teken weg dat voor de cursor staat + C-d haal het teken weg dat achter de cursor staat - M- gooi het woord weg dat voor de cursor staat + M- gooi het woord weg dat voor de cursor staat M-d gooi het woord weg dat achter de cursor staat C-k gooi alles weg van de cursor tot het eind van de regel M-k gooi alles weg van de cursor tot het eind van de zin -Merk op dat en C-d met M- en M-d de analogie die begon +Merk op dat en C-d met M- en M-d de analogie die begon met C-f en M-f verder trekken (waarbij we voor het gemak even vergeten dat - niet echt een control teken is). C-k en M-k lijken enigzins op + niet echt een control teken is). C-k en M-k lijken enigzins op C-e en M-e in hun relatie tot regels en zinnen. Als je meer dan een enkel teken tegelijk weghaalt bewaart Emacs de tekst -die je weggooit zodat je haar weer terug kan halen. Weggegooide tekst -terughalen heet "yanken". Je kan weggegooide tekst terugbrengen op de -plaats waar je haar hebt weggegooid of op een andere plaats in de tekst. -Je kan ook meerdere keren yanken om er meedere copi-en van te maken. Het +die je weggooit zodat je hem weer terug kunt halen. Weggegooide tekst +terughalen heet "yanken". Je kunt weggegooide tekst terugbrengen op de +plaats waar je hem hebt weggegooid of op een andere plaats in de tekst. +Je kunt ook meerdere keren yanken om er meedere kopieën van te maken. Het yank-commando is C-y. Merk op dat er een verschil is tussen het weghalen en weggooien van iets: -iets dat je hebt weggooid kan je terugbrengen, maar iets dat je hebt -weggehaald niet. (In het engels is het verschil tussen `killing' en -`deleting' duidelijker dan tussen de nederlandse vertaling `weggooien' en +iets dat je hebt weggooid kun je terugbrengen, maar iets dat je hebt +weggehaald niet. (In het Engels is het verschil tussen `killing' en +`deleting' duidelijker dan tussen de Nederlandse vertaling `weggooien' en `weghalen'.) In het algemeen geldt dat de commando's die meer tekst dan -een enkel teken, Newline of spatie verwijderen deze tekst bewaren zodat ze +een enkel teken, Newline of spatie verwijderen deze tekst bewaren zodat die geyankt kan worden, terwijl dat niet geldt voor commando's die slechts een enkel teken weghalen. ->> Zet de cursor op het begin van een regel die niet leef is. - Type C-k om de tekst op die regl weg te gooien. +>> Zet de cursor op het begin van een regel die niet leeg is. + Type C-k om de tekst op die regel weg te gooien. >> Type C-k een tweede keer. Nu gooit dit commando het Newline teken - weggooit. + weg. -Merk op hoe een enkele C-k de inhoud van een regel weggooit, een tweede -C-k de regel zelf zodat alle volgende regels een regel omhoog komen. Het -numerieke argument is voor C-k bijzonder: het aangegeven aantal regels zal -worden weggegooid, inclusief de inhoud. Dit is meer dan simpelweg -herhaling: C-u 2 C-k gooit twee regels weg, terwijl tweemaal C-k typen dat -niet doet. +Merk op hoe een enkel C-k commando de inhoud van een regel weggooit, een +tweede C-k commando de regel zelf zodat alle volgende regels een regel +omhoog komen. Het numerieke argument is voor C-k bijzonder: het aangegeven +aantal regels zal worden weggegooid, inclusief de inhoud. Dit is meer dan +simpelweg herhaling: C-u 2 C-k gooit twee regels weg, terwijl tweemaal +C-k typen dat niet doet. Om de laatst weggegooide tekst terug te halen naar de plaats waar de cursor nu op staat (te yanken), type C-y. @@ -399,19 +407,19 @@ in een keer terugbrengt. Om de weggegooide tekst terug te halen: ->> Type C-y. Beweeg de cursor wat regels naar beneden en type weer C-y. - Je ziet nu hoe je tekst kan copieren. +>> Type C-y. Beweeg de cursor enkele regels naar beneden en type weer C-y. + Je ziet nu hoe je tekst kunt kopiëren. -Wat nu te doen als je wat tekst terug wilt brengen, maar je hebt intussen -al iets anders weggegooid? C-y zou datgene terugbrengen wat je het +Wat nu te doen als je tekst terug wilt brengen, maar je hebt intussen al +iets anders weggegooid? C-y zou datgene terugbrengen wat je het recentst hebt weggegooid. Gelukkig is de voorgaande tekst niet verloren gegaan. Je kunt die tekst terughalen met M-y. Nadat je C-y hebt getypt om de recentst weggegooide tekst terug te halen, vervangt M-y die tekst met de tekst die je daarvoor had weggegooid. Je kunt M-y herhalen om -tekst terug te halen die je steeds langer geleden hebt weggegooid. Als je -de tekst te pakken hebt die je zocht hoe je niets te doen om die daar te -houden. Je kan gewoon verder werken en de teruggehaalde tekst met rust -laten. +tekst terug te halen die je reeds langer geleden hebt weggegooid. Als +je de tekst te pakken hebt die je zocht hoef je niets te doen om die +daar te houden. Je kunt gewoon verder werken en de teruggehaalde tekst +met rust laten. Als je M-y vaak genoeg typt kom je terug waar je begon, bij de recentst weggegooide tekst. @@ -420,17 +428,17 @@ weggegooide tekst. Type C-y om de tweede regel die je weggooide terug te halen. Type nog een M-y en die regel wordt vervangen door de eerste regel die je weggooide. - Type nog wat M-y's en zie wat er langs komt. Herhaal dit tot de + Type nog enkele keren M-y en zie wat er langs komt. Herhaal dit tot de tweede regel weer langs komt, en dan nog een paar keer. - Je kan ook experimenteren met positieve en negatieve argumenten aan + Je kunt ook experimenteren met positieve en negatieve argumenten aan M-y. * HERSTELLEN ------------ -Als je de tekst veranderd hebt en je daar toch niet tevreden mee bent, -dan kan je de verandering ongedaan maken met het herstel commando, C-x u. +Als je de tekst veranderd hebt en als je daar toch niet tevreden mee bent, +dan kun je de verandering ongedaan maken met het herstel commando, C-x u. Normaal gesproken herstelt C-x u de veranderingen die het gevolg zijn van een enkel commando; door herhaaldelijk C-x u te typen, worden steeds @@ -439,16 +447,16 @@ eerdere commando's hersteld. Er zijn echter twee uitzonderingen: commando's die de tekst niet wijzigen, zoals cursorbewegingen, worden overgeslagen, en commando's die simpelweg de ingetypte letter aan de tekst toevoegen worden meestal gegroepeerd -in groepjes van maximaal 20 tekens, zodat je minder C-x u's hoeft te -type om het toevoegen van teksts te herstellen. +in groepjes van maximaal 20 tekens, zodat je minder vaak het commando +C-x u hoeft te typen om het toevoegen van tekst te herstellen. ->> Gooi deze regel weg met C-k; met C-x u zou ze weer moeten verschijnen. +>> Gooi deze regel weg met C-k; met C-x u zou hij weer moeten verschijnen. C-_ is een alternatief voor C-x u. Het levert exact hetzelfde resultaat -op, maar is makkelijker om een paar keer achter elkaar te typen. Een -nadeel van C-_ is dat op sommige toetsenborden het intypen ervan niet -triviaal is. Dat is ook de reden het alternatief, C-x u. Op sommige -terminals kan je C-_ typen door te doen alsof je C-/ typt. +op, maar het is makkelijker om dat een paar keer achter elkaar te typen. +Een nadeel van C-_ is dat op sommige toetsenborden het intypen ervan +niet triviaal is. Dat is ook de reden voor het alternatief, C-x u. Op +sommige terminals kun je C-_ typen door te doen alsof je C-/ typt. Een numeriek argument aan C-_ of C-x u duidt het aantal herhalingen aan. @@ -457,15 +465,15 @@ Een numeriek argument aan C-_ of C-x u duidt het aantal herhalingen aan. ----------- Om een tekst die je gemaakt of veranderd hebt op te slaan moet je de -tekst in een bestand bewaren (`to save a file' in het engels). Als je +tekst in een bestand bewaren (`to save a file' in het Engels). Als je dat niet doet ben je die veranderingen kwijt op het moment dat je uit -Emacs gaat. Je kan een bestand veranderen door het bestand `bezoeken'. -(Ook wel `vinden'; `finding' of `visiting' in het engels.) +Emacs gaat. Je kunt een bestand veranderen door het bestand te `bezoeken'. +(Ook wel `vinden'; `finding' of `visiting' in het Engels.) Het bezoeken van een bestand betekent dat je de inhoud van dat bestand in Emacs ziet. Het lijkt er dan op alsof je het bestand aan het veranderen bent. Echter, deze veranderingen zijn slechts tijdelijk -zolang je het bestand niet bewaart. Op deze manier kan je nooit per +zolang je het bestand niet bewaart. Op deze manier kun je nooit per ongeluk een half gewijzigd bestand op het systeem achterlaten. Zelfs als je het bestand bewaart, zorgt Emacs ervoor dat het originele bestand onder een gewijzigde naam nog steeds beschikbaar is, voor het @@ -476,11 +484,11 @@ In de buurt van de onderkant van het scherm zie je een regel die begint en eindigt met streepjes, met aan het begin "--:-- TUTORIAL.nl" of iets dergelijks. Dit deel van het scherm laat normaal de naam van het bestand zien dat je op dat moment bezoekt. Op dit moment bezoek je een bestand -dat "TUTORIAL.nl" heet; het is je eigen copie van de nederlandstalige -Emacs uitleg (`tutorial' in het engels). Als je in Emacs een bestand +dat "TUTORIAL.nl" heet; het is je eigen kopie van de Nederlandstalige +Emacs uitleg (`tutorial' in het Engels). Als je in Emacs een bestand bezoekt dan staat de naam van het bestand altijd op deze plaats. -De commando's om een bestand te bezoek of te bewaren zijn anders dan de +De commando's om een bestand te bezoeken of te bewaren zijn anders dan de commando's die je tot nu toe geleerd hebt; ze bestaan namelijk uit twee tekens. Beide commando's beginnen met het teken Control-x. Er zijn een heleboel commando's die met Control-x beginnen. Veel van die commando's @@ -496,37 +504,37 @@ Nadat je het commando hebt getypt vraagt Emacs om de naam van het bestand. De naam die je intypt verschijnt op de onderste regel van het scherm. Wanneer die regel -voor dit soort invoer gebruikt wordt, heet ze de minibuffer. Je kan de +voor dit soort invoer gebruikt wordt, heet ze de minibuffer. Je kunt de gebruikelijke Emacs commando's gebruiken om de filename in te typen. Tijdens het invoeren van de naam van het bestand (of willekeurig wat -voor minibuffer invoer) kan je het commando afbreken met C-g. +voor minibuffer invoer) kun je het commando afbreken met C-g. ->> Type C-x C-f gevolgd door C-g. Dit breekt de minibuffer af en +>> Type C-x C-f gevolgd door C-g. Dit commando breekt de minibuffer af en ook het C-x C-f commando dat van de minibuffer gebruik maakte. Netto resultaat is dat je geen bestand bezoekt. Als je de naam van een bestand hebt ingevoerd, type dan om het -af te sluiten. Hierna gaat het C-x C-f commando aan het werk en bezoekt -het bestand dat je aangegeven hebt. Als het C-x C-f commando klaar is, -verdwijnt de minibuffer. +af te sluiten. Hierna gaat het C-x C-f commando aan het werk en haalt +het bestand op dat je aangegeven hebt. Als het C-x C-f commando daarmee +klaar is,verdwijnt de minibuffer. -Na korte tijd verschijnt de inhoud van het bestand op het scherm en kan +Na korte tijd verschijnt de inhoud van het bestand op het scherm en kun je de inhoud wijzigen. Als je de wijzigingen op wilt slaan, type dan het commando C-x C-s bewaar bestand (met de s van `save file') -Dit bewaart de tekst zoals Emacs die nu heeft in het bestand. De eerste -keer dat je dit doet bewaart Emacs het originele bestand onder een andere -naam zodat het nog niet verloren is. De nieuwe naam bestaat uit de oude -naam gevolgd door een "~". +Dit commando bewaart de tekst zoals Emacs die nu heeft in het bestand. +De eerstekeer dat je dit doet bewaart Emacs het originele bestand onder een +andere naam zodat het nog niet verloren is. De nieuwe naam bestaat uit de +oude naam gevolgd door een "~". Als Emacs klaar is het bestand te bewaren laat ze de naam van het bestand zien. Het is een goede gewoonte een bestand redelijk vaak te bewaren zodat er niet teveel werk verloren gaat als het systeem hangt of crasht. ->> Type C-x C-s, om je copie van deze uitleg te bewaren. Als het goed is +>> Type C-x C-s, om je kopie van deze uitleg te bewaren. Als het goed is verschijnt "Wrote ...TUTORIAL" op de onderste schermregel. OPMERKING: Op sommige systemen gebeurt er helemaal niets als je C-x C-s @@ -537,11 +545,11 @@ deze situatie te herstellen, type C-q. Lees daarna de "Spontaneous Entry to Incremental Search" sectie in het Emacs handboek over hoe om te gaan met deze situatie. -Je kan een bestaand bestand bezoeken, om het te bekijken of het te -wijzigen. Je kan ook een bestand bezoeken dat nog niet bestaat. Dit is -de manier om met Emacs een nieuw bestand te maken: bezoek het bestand, dat +Je kunt een bestaand bestand bezoeken, om het te bekijken of het te +wijzigen. Je kunt ook een bestand bezoeken dat nog niet bestaat. Dit is +dé manier om met Emacs een nieuw bestand te maken: bezoek het bestand, dat initieel leeg zal zijn, en voeg tekst toe. Zodra je de tekst bewaart -wordt het bestand werkelijk gecreeerd, met de tekst als inhoud. Vanaf dat +wordt het bestand werkelijk gecreëerd, met de tekst als inhoud. Vanaf dat moment ben je dus bezig met een bestaand bestand. @@ -549,12 +557,12 @@ moment ben je dus bezig met een bestaand bestand. --------- Als je een tweede bestand bezoekt met C-x C-f blijft het eerste bestand -gewoon in Emacs. Je kan naar dat bestand terug door het gewoon nog een -keer te bezoeken met C-x C-f. Op deze manier kan je een behoorlijk aantal +gewoon in Emacs. Je kunt naar dat bestand terug door het gewoon nog een +keer te bezoeken met C-x C-f. Op deze manier kun je een behoorlijk aantal bestanden in Emacs krijgen. ->> Cre-eer een bestand dat "foo" heet door te typen: C-f C-f foo - . Voeg hieraan wat tekst toe, wijzig haar, en bewaar "foo" +>> Creëer een bestand dat "foo" heet door te typen: C-f C-f foo + . Voeg hieraan wat tekst toe en bewaar "foo" door C-x C-s te typen. Type hierna C-x C-f TUTORIAL om weer hier, in de uitleg, terug te komen. @@ -577,22 +585,22 @@ Emacs venster ziet is altijd onderdeel van een of andere buffer. Als je de tekst van het ene bestand verandert en dan een ander bestand bezoekt dan wordt het eerste bestand niet bewaard. De wijzigingen blijven -in Emacs, in de buffer die bij het bestand hoort. Het cre-eren of +in Emacs, in de buffer die bij het bestand hoort. Het creëren of modificeren van de buffer van het tweede bestand heeft geen effect op de eerste buffer. Dit is erg nuttig, maar betekent ook dat er een eenvoudige manier nodig is om het eerste bestand te bewaren. Het zou erg vervelend zijn om er eerst naar terug te moeten gaan met C-x C-f om het dan te -kunnen bewaren met C-x C-s. Dus hebben we +kunnen bewaren met C-x C-s. Dus hebben we het commando: - C-x s bewaar een paar buffers + C-x s bewaar een paar buffers C-x s vraagt voor elke buffer die veranderingen heeft die nog niet opgeslagen zijn, of je de buffer wilt bewaren. ->> Voeg een wat tekst toe en type C-x s. +>> Voeg wat tekst toe en type C-x s. Emacs vraagt nu of je de buffer die TUTORIAL.nl heet wilt bewaren. - Bewantwoord deze vraag positief door een "y" in te typen (de y van - "yes", engels voor "ja"). + Beantwoord deze vraag positief door een "y" in te typen (de y van + "yes", Engels voor "ja"). * UITGEBREIDE COMMANDO'S @@ -602,7 +610,7 @@ Er zijn veel meer Emacs commando's dan er op de toetsen van het toetsenbord passen, zelfs als we hun aantal kunnen vergroten door de control of meta toets te gebruiken. Emacs lost dit probleem op met het X commando (met de X van eXtensie of uitbreiding). Het X commando komt in -twee smaken: +twee smaken voor: C-x teken eXtensie; wordt gevolgd door een teken M-x genaamd commando eXtensie; wordt gevolgd door een naam. @@ -616,21 +624,21 @@ die niet bewaard zijn; C-x C-c vraagt of je veranderde buffers wilt bewaren voordat Emacs daadwerkelijk eindigt.) C-z is het commando om Emacs *tijdelijk* te verlaten, zodat je daarna weer -terug kan keren in dezelfde Emacs sessie. +terug kunt keren in dezelfde Emacs sessie. Op systemen die deze mogelijkheid bieden, zet C-z Emacs stil: je komt weer -terug in de shell, maar Emacs is nog aanwezig. In de meeste shells kan je +terug in de shell, maar Emacs is nog aanwezig. In de meeste shells kun je Emacs weer activeren met het "fg" commando, of met "%emacs". Op systemen die niet de mogelijkheid bieden om programma's stil te zetten -cre-eert C-z een subshell onder Emacs om je zo in de gelegenheid te +creëert C-z een subshell onder Emacs om je zo in de gelegenheid te stellen andere programma's uit te voeren en daarna weer in Emacs terug te keren; Emacs wordt dus niet werkelijk verlaten. In dit geval is het shellcommando "exit" de normale manier om de subshell te verlaten en in Emacs terug te keren. Het moment om C-x C-c te gebruiken is wanneer je uit gaat loggen. Het is -ook het juiste commando om Emacs te be-eindigen wanneer Emacs opgestart +ook het juiste commando om Emacs te beëindigen wanneer Emacs opgestart was door een mail programma of iets dergelijks, aangezien die misschien niet met een stilgezette Emacs om kunnen gaan. Normaal gezien is het echter beter Emacs stil te zetten met C-z dan om Emacs te verlaten, @@ -645,13 +653,14 @@ kent: C-x C-c verlaat Emacs C-x u herstel -Genaamde uitgebreide commando's worden nog minder vaak gebruikt, of worden -alleen onder bepaalde omstandigheden gebruikt. Een voorbeeld is het -commando replace-string, dat in de hele tekst een string vervangt door een -andere string (`to replace' betekent `vervangen'). Als je M-x typt echoot -Emacs onderaan het scherm `M-x' en moet je de naam van het commando -intypen, in dit geval "replace-string". Als je gewoon "repl s" typt -maakt Emacs de naam zelf af. Be-eindig het commando met . +Commando's waaraan een uitgebreid commando wordt toegevoegd, worden nog +minder vaak gebruikt, of worden alleen onder bepaalde omstandigheden gebruikt. +Een voorbeeld is het commando replace-string, dat in de hele tekst een string +vervangt door een andere string (`to replace' betekent `vervangen'). +Als je M-x typt echoot Emacs onderaan het scherm `M-x' en moet je de naam van +het commando intypen, in dit geval "replace-string". Als je gewoon +"repl s" typt maakt Emacs de naam zelf af. Beëindig het commando +met . Het replace-string commando heeft twee argumenten nodig: de string die vervangen moet worden en de string waarmee die vervangen moet worden. @@ -660,8 +669,8 @@ Je sluit elk argument af met . >> Plaats de cursor op de lege regel twee regels onder deze. Type dan M-x repl sgewijzigdveranderd. - Zie hoe deze regel daardoor gewijzigd is. Je hebt elk voorkomen van - het woord g-e-w-i-j-z-i-g-d vervangen door "veranderd"; beginnend op + Zie hoe deze regel daardoor gewijzigd is. Je hebt elke keer dat het woord +"g-e-w-i-j-z-i-g-d" voor kwam, vervangen door "veranderd"; beginnend op de plek waar de cursor staat. @@ -669,7 +678,7 @@ Je sluit elk argument af met . --------------------- Als je een bestand veranderd hebt maar het nog niet bewaard hebt, zouden -de veranderinge verloren kunnen gaan als het systeem zou hangen of +de veranderingen verloren kunnen gaan als het systeem zou hangen of herstarten. Om je hiertegen te beschermen bewaart Emacs om de zoveel tijd de veranderde tekst automatisch. De naam van het bestand waarin de tekst automatisch bewaard wordt begint en eindigt met een #. Bijvoorbeeld, als @@ -678,10 +687,10 @@ automatisch bewaard in een bestand dat "#hello.c#" heet. Zodra je het bestand werkelijk bewaart, wordt het automatisch bewaarde bestand weer weggegooid. -Als de computer crasht kan je de automatisch bewaarde tekst terugkrijgen -door de file normal te bezoeken (de originele file, niet de automatisch +Als de computer crasht kun je de automatisch bewaarde tekst terugkrijgen +door de file normaal te bezoeken (de originele file, niet de automatisch bewaarde), gevolgd door M-x recover file. Als Emacs vraagt om -bevestiging, antwoord dan yes en de automatisch bewaarde +bevestiging, antwoord dan:"yes", en de automatisch bewaarde informatie wordt teruggehaald. @@ -690,14 +699,14 @@ informatie wordt teruggehaald. Als je een commando langzaam intypt echoot Emacs de tekens aan de onderkant van het scherm, in een deel dat het "echo gebied" genoemd wordt. -Dit gebied bevat de onderste regel van het scherm. +Dit gebied omvat de onderste regel van het scherm. * MODE-REGEL ------------ De regel direct boven het echo gebied heet de "mode-regel". De mode-regel -zier er ongeveer zo uit: +ziet er ongeveer zo uit: --**-Emacs: TUTORIAL.nl (Fundamental)--68%------------------------ @@ -709,7 +718,7 @@ dat je bezoekt. -NN%-- geeft je huidige positie in de tekst aan: NN procent van de tekst bevindt zich boven het scherm. Als het bestand vanaf het begin op het scherm staat, staat er --Top-- in plaats van --00%--. Als het laatste stuk tekst op het scherm staat, zal er --Bot-- staan (van -`bottom', `onderkant' in het nederlands). Als de tekst zo klein is dat ze +`bottom', `onderkant' in het Nederlands). Als de tekst zo klein is dat die volledig op het scherm past staat --All-- in de mode-regel. De sterretjes aan het begin betekenen dat je de tekst gemodificeerd hebt. @@ -717,39 +726,39 @@ Direct na het bezoeken of bewaren staan er gewoon streepjes. In de mode-regel staat tussen haakjes in welke mode je aan het werken bent. Tenzij een andere mode gewenst is, zit je in de "Fundamental" mode -zoals nu (`fundamental' is `basis' in het nederlands). Een dergelijke -mode heet een hoofdmode (`major mode' in het engels). +zoals nu (`fundamental' is `basis' in het Nederlands). Een dergelijke +mode heet een hoofdmode (`major mode' in het Engels). -Emacs heeft verschillende hoofdmodes. Sommige daarvan zijn bedoelt voor +Emacs heeft verschillende hoofdmodes. Sommige daarvan zijn bedoeld voor het bewerken van verschillende talen of soorten tekst, zoals bijvoorbeeld Lisp mode, Text mode, etc. Op elk moment is er altijd precies een mode actief, en de naam daarvan staat in de mode-regel, op de plaats waar nu "Fundamental" staat. -Elke hoofdmode zorgt ervoor dat sommige commando's zich anders gedragen. -Zo bestaat er een commando om een commentaar in een programma te typen, en -aangezien elke programmeertaal een ander idee heeft over hoe commentaar -eruit moet zien, moet elke hoofdmode op een andere manier het commentaar -beginnen. Elke hoofdmode is de naam van een uitgebreid commando, en met -dat commando schakel je om naar die hoofdmode. Zo is bijvoorbeeld +Het komt voor dat sommige commado's zich in verschillende modes anders +gedragen. Zo bestaat er een commando om een commentaar in een programma te +typen, en aangezien elke programmeertaal een ander idee heeft over hoe +commentaar eruit moet zien, moet elke hoofdmode op een andere manier het +commentaar beginnen. Elke hoofdmode is de naam van een uitgebreid commando, +en met dat commando schakel je om naar die hoofdmode. Zo is bijvoorbeeld M-x fundamental-mode het commando om naar de basismode om te schakelen. -Als je nederlandse of engelse tekst wil gaan bewerken, zoals bijvoorbeeld -dit bestand, kan je beter "text mode" gebruiken, de mode om tekst in een +Als je Nederlandse of Engelse tekst wil gaan bewerken, zoals bijvoorbeeld +dit bestand, kun je beter "text mode" gebruiken, de mode om tekst in een gewone taal te bewerken: >> Type M-x text-mode. Wees gerust; geen van de commando's die je geleerd hebt zorgen voor -grondige veranderingen in Emacs. Een van de dingen die je kan merken is -bijvoorbeeld dat M-f en M-b nu apostrophes als onderdeel van een woord +grondige veranderingen in Emacs. Een van de dingen die je kunt merken is +bijvoorbeeld dat M-f en M-b nu apostrofs als onderdeel van een woord beschouwen. In de vorige, Fundamental, mode behandelen M-f en M-b de -apostrophe als ruimte tussen twee woorden. +apostrof als ruimte tussen twee woorden. Het is gebruikelijk dat hoofdmodes dergelijke subtiele verschillen hebben. De meeste commando's doen dus min of meer hetzelfde in elke hoofdmode. -Met het commando C-h m kan je de documentatie over de huidige hoofdmode +Met het commando C-h m kun je de documentatie over de huidige hoofdmode lezen. >> Gebruik C-u C-v een paar keer om deze zin in de buurt van de bovenkant @@ -760,39 +769,39 @@ lezen. Hoofdmodes heten hoofdmodes omdat er ook bijmodes zijn. Bijmodes zijn geen alternatieven voor hoofdmodes; het zijn slechts kleine modificaties daarvan. Elke bijmode kan aan- of uitgezet worden, onafhankelijk van -andere bijmodes en onafhankelijk van de hoofdmode. Je kan dus nul, een, +andere bijmodes en onafhankelijk van de hoofdmode. Je kunt dus nul, een, of willekeurig veel minor modes gebruiken. Een nuttige bijmode voor het bewerken van tekst in een natuurlijke taal, -zoals nederlands, is Auto Fill mode (`auto fill' betekent automatisch +zoals Nederlands, is Auto Fill mode (`auto fill' betekent automatisch uitvullen). Wanneer deze mode aanstaat breekt Emacs automatisch een regel tussen twee woorden af als de regel anders te lang zou worden. -Je kan Auto Fill mode aanzetten met M-x auto-fill-mode. Als deze -mode al aanstaat, kan je hem uitzetten met M-x auto-fill-mode. +Je kunt Auto Fill mode aanzetten met M-x auto-fill-mode. Als deze +mode al aanstaat, kun je hem uitzetten met M-x auto-fill-mode. Als de mode uitstaat zet dit commando de mode aan; als ze aanstaat zet dit commando de mode uit. Het commando zet de mode steeds aan en uit zet (`to -toggle' in het engels). +toggle' in het Engels). >> Type nu M-x auto-fill-mode. Type nu vele malen asdf op een - regel zodat je kan zien dat de regel in twee-en gesplitst wordt. Er + regel zodat je kunt zien dat de regel in tweeën gesplitst wordt. Er moeten wel spaties tussen de woorden staan, omdat de Auto Fill mode - alleen op spaties de regel breekt. + alleen op spaties de regel afbreekt. -De rechter kantlijn staat meestal op 70 tekens, maar die kan je veranderen +De rechter kantlijn staat meestal op 70 tekens, maar die kun je veranderen met het C-x f commando. Dit commando accepteert een numeriek argument -dat de gewenste kantlijn is. +om de gewenste kantlijn te verkrijgen. >> Type C-x f met 20 als argument (C-u 20 C-x f). Type wat tekst en zie dat Emacs de regels afbreekt bij 20 tekens. - Zet de kantlijn nu terug op 70, weer met C-x f. + Zet de kantlijn nu terug op 70, dus met C-u 70 C-x f. Als je de tekst midden in een regel verandert vult Auto Fill mode de regel niet opnieuw. -Om een paragraaf opnieuw te vullen, type M-q (Meta-q) terwijl de -cursor in de paragraaf staat. +Om een alinea opnieuw te vullen, type M-q (Meta-q) terwijl de +cursor in de alinea staat. ->> Plaats de cursor in de voorgaande paragraaf en type M-q. +>> Plaats de cursor in de voorgaande alinea en type M-q. * ZOEKEN @@ -813,56 +822,49 @@ search', i.e. zoeken); C-r start het zoeken achteruit (met de `r' van Als je C-s typt verschijnt de string "I-search" in het echo gebied. Dit betekent dat Emacs bezig is met een `incremental search' (incrementele -zoekopdracht) en wacht op het intypen van de zoekstring. be-eindigt +zoekopdracht) en wacht op het intypen van de zoekstring. beëindigt het zoeken. ->> Type nu C-s om het zoeken te start. Type nu, LANGZAAM, een letter per - keer, het woord `cursor', met een pauze na elke letter zodat je kan +>> Type nu C-s om het zoeken te starten. Type nu, LANGZAAM, één letter per + keer, het woord `cursor', met een pauze na elke letter zodat je kunt zien wat er met de cursor gebeurt. Je hebt nu eenmaal naar het woord `cursor' gezocht. ->> Type nogmaals C-s, om naar het volgende voorkomen van `cursor' te - zoeken. ->> Type nu viermaal en let op de cursorbewegingen. ->> Type om het zoeken te be-eindigen. +>> Type nogmaals C-s, om het volgende woord `cursor' te zoeken + +> Type nu viermaal en let op de cursorbewegingen. +>> Type om het zoeken te beëindigen. Zag je wat er gebeurde? Tijdens incrementeel zoeken probeert Emacs naar de eerste plek te gaan waar de string staat die je tot dan toe getypt hebt. Om naar de volgende plek te gaan, type je C-s nog een keer. Als er -geen volgende plek is piept Emacs en vertelt je dat de zoekopdracht faalt -(`failing' in het engels); met C-g kan je het zoeken afbreken. - -OPMERKING: Op sommige systemen gebeurt er helemaal niets als je C-x C-s -typt, en daarna ook niets meer. Dit komt door een eigenschap van de -machine waarop je werkt die te maken heeft met `flow control'. Met C-s -stopt de `flow' en komt niets meer van wat je typt bij Emacs terecht. Om -deze situatie te herstellen, type C-q. Lees daarna de "Spontaneous Entry -to Incremental Search" sectie in het Emacs handboek over hoe om te gaan -met deze situatie. +geen volgende plek is gevonden piept Emacs en vertelt je dat de zoekopdracht +is beëindigd. (`failing' in het Engels); met C-g kun je het zoeken afbreken. -Als je tijdens incrementeel zoeken typt, zal je zien dat het +Als je tijdens incrementeel zoeken typt, zul je zien dat het laatste teken dat je in de zoekstring typte weggehaald wordt en dat het zoeken teruggaat naar de voorgaande plaats. Als je bijvoorbeeld begint -met zoeken en je typt een "c" dan ga je naar het eerste voorkomen van een -"c". Type je vervolgens een "u" dan gaat de cursor naar het eerste -voorkomen van de string "cu". Als je nu typt, dan wordt de "u" -van de zoekstring afgehaald en gaat de cursor terug naar de plaats waar -hij stond voordat je de "u" intypte, i.e. het eerste voorkomen van de "c". +met zoeken en je typt een "c" dan ga je naar de plaats waar de "c" het +eerst voorkomt. Type je vervolgens een "u" dan gaat de cursor naar de +plaats waar de string "cu" het eerst voorkomt". Als je nu typt, dan +wordt de "u" van de zoekstring afgehaald en gaat de cursor terug naar de +plaats waar hij stond voordat je de "u" intypte, i.e. de plaats waar "c" het +eerst voorkomt. Als je tijdens een zoekoperatie een control- of meta-teken intypt dan -wordt het zoeken be-eindigd. Er zijn een paar uitzonderingen, namelijk +wordt het zoeken beëindigd. Er zijn een paar uitzonderingen, namelijk tekens die tijdens zoeken een speciale betekenis hebben, zoals C-s en C-r. -Met C-s begin je te zoeken naar het eerste voorkomen van de zoekstring NA -de huidige cursorpositie. Als je iets wilt zoeken dat eerder in de tekst -moet voorkomen, gebruik dan C-r i.p.v. C-s. Alles wat we nu weten over -C-s geldt ook voor C-r, alleen de zoekrichting is omgedraaid. +Met C-s begin je te zoeken naar de plaats waar de zoekstring voor het eerst +voorkomt NA de huidige cursorpositie. Als je iets wilt zoeken dat eerder in +de tekst moet voorkomen, gebruik dan C-r i.p.v. C-s. Alles wat we nu weten +over C-s geldt ook voor C-r, alleen de zoekrichting is omgedraaid. * MEERDERE VENSTERS ------------------- Een van Emacs' aardige eigenschappen is dat je meerdere vensters op het -scherm kan laten zien. +scherm kunt laten zien. >> Zet de cursor op deze regel en type C-u 0 C-l. @@ -873,7 +875,7 @@ scherm kan laten zien. >> Type C-M-v om de tekst in het onderste venster te verschuiven. (Als je geen Meta toets hebt, type dan ESC C-v.) ->> Type C-x o (met de `o' van `other'; `ander' in het nederlands) +>> Type C-x o (met de `o' van `other'; `ander' in het Nederlands) om de cursor naar het andere venster te verplaatsen. >> Verschuif de tekst in het onderste venster, m.b.v. C-v en M-v. @@ -883,23 +885,23 @@ scherm kan laten zien. te zetten. De cursor staat weer precies op de plaats waar hij stond toen je het venster verliet. -Je kan C-x o blijven gebruiken om van venster naar venster te gaan. Elk +Je kunt C-x o blijven gebruiken om van venster naar venster te gaan. Elk venster heeft zijn eigen cursorpositie; de cursor is altijd maar zichtbaar in een daarvan. Alle normale commando's hebben betrekking op het venster -waar de cursor in staat. Dit venster is het `geselecteerde venster' -(`selected window' in het engels). +waarin de cursor staat. Dit venster is het `geselecteerde venster' +(`selected window' in het Engels). Het C-M-v commando is erg nuttig wanneer je tekst aan het bewerken bent in het ene venster, terwijl je het andere venster als referentie gebruikt. -Je kan de cursor dan altijd in het venster houden waarin je bezig bent, +Je kunt de cursor dan altijd in het venster houden waarin je bezig bent, terwijl je met C-M-v door de tekst in het andere venster loopt. C-M-v is een voorbeeld van een CONTROL-META teken. Als je een echte META -toets hebt kan je C-M-v intypen door zowel CTRL als META ingedrukt te +toets hebt kun je C-M-v intypen door zowel CTRL als META ingedrukt te houden terwijl je v typt. Het maakt niet uit in welke volgorde je de CTRL -en META indrukt; het gaat erom welke ingedrukt zijn terwijl je typt. +en META indrukt; het gaat erom welke toetsen ingedrukt zijn terwijl je typt. -Als je geen echte META toets hebt kan je ESC gebruiken; de volgorde maakt +Als je geen echte META toets hebt kun je ESC gebruiken; de volgorde maakt dan wel uit. Je moet dan ESC typen, gevolgd door CTRL-v; CTRL-ESC v zal niet werken. Dit komt doordat ESC zelf een teken is, terwijl CTRL en META dat niet zijn. @@ -925,13 +927,13 @@ laten zien: * RECURSIEVE BEWERKINGSNIVEAUS ------------------------------ -Soms kom je in Emacs in een recursief bewerkingsniveau terecht (engels: +Soms kom je in Emacs in een recursief bewerkingsniveau terecht (Engels: `recursive editing level'). Dit is te zien in de moderegel aan de rechte -haken om de haakjes die om naam van de hoofdmode staan. Dan staat er +haken die om de haakjes van de naam van de hoofdmode staan. Dan staat er bijvoorbeeld [(Fundamental)] in plaats van (Fundamental). Type ESC ESC ESC Om uit een recursief bewerkingsniveau te komen. Dit is -een generiek `ontsnappingscommando'. Je kan het ook gebruiken om extra +een generiek `ontsnappingscommando'. Je kunt het ook gebruiken om extra vensters weg te gooien of om uit de minibuffer te komen. >> Type M-x om in een minibuffer te komen, en type dan ESC ESC ESC @@ -973,7 +975,7 @@ commando zien. C-p runs the command previous-line - (nederlands: C-p voert het commando previous-line uit.) + (Nederlands: C-p voert het commando previous-line uit.) Dit commando vertelt je `de naam van de functie'. Functies worden vooral gebruikt om Emacs uit te breiden of aan de wensen van de gebruiker aan te @@ -992,7 +994,7 @@ C-h c. Dit laat de documentatie van de functie zien, inclusief de naam van de functies, in een apart venster. Als je klaar bent met lezen, type C-x 1 om van dat venster af te komen. Je hoeft dat natuurlijk niet meteen te -doen. Je kan ook eerst wat anders doen voordat je C-x 1 typt. +doen. Je kunt ook eerst wat anders doen voordat je C-x 1 typt. Hier zijn nog wat nuttige mogelijkheden van C-h: @@ -1012,7 +1014,7 @@ Hier zijn nog wat nuttige mogelijkheden van C-h: >> Type C-h a file. Dit laat in een ander venster alle M-x commando's zien met `file' in hun -naam. Je zal teken-commando's zien als C-x C-f naast de overeenkomende +naam. Je zult teken-commando's zien als C-x C-f naast de overeenkomende commandonaam zoals find-file. >> Type C-M-v herhaaldelijk om de tekst in het hulpvenster te verschuiven. @@ -1031,30 +1033,30 @@ Emacs gebruikers. Als je dus iets onduidelijks bent tegengekomen blijf dan niet zitten en maak jezelf geen verwijten. Klaag erover! -* COPI-EREN +* KOPIËREN ----------- -(De engelse versie van) deze uitleg is voorafgegaan door een lange reeks +(De Engelse versie van) deze uitleg is voorafgegaan door een lange reeks van Emacs tutorials, die begon met de uitleg die Stuart Cracraft schreef -voor de originele Emacs. Deze nederlandse vertaling is gemaakt door +voor de originele Emacs. Deze Nederlandse vertaling is gemaakt door Pieter Schoenmakers op basis van de GNU Emacs 20.2 TUTORIAL. -(Wat nu volgt is een vertaling naar het nederlands van de condities voor +(Wat nu volgt is een vertaling naar het Nederlands van de condities voor gebruik en verspreiding van deze uitleg. Deze vertaling is niet gecontroleerd door een jurist. Er kunnen derhalve geen rechten aan de -vertaling worden ontleend, en de vertaling wordt gevolgd door het engelse +vertaling worden ontleend, en de vertaling wordt gevolgd door het Engelse origineel.) Deze versie van de uitleg valt onder copyright, net als GNU Emacs. -Je mag deze uitleg distribu-eren onder bepaalde condities: +Je mag deze uitleg distribueren onder bepaalde condities: Copyright (c) 1985, 1996, 1997 Free Software Foundation - Iedereen mag letterlijke copi-en van dit document, zoals ontvangen, + Iedereen mag letterlijke kopieën van dit document, zowel ontvangen als verspreiden, op elke medium, vooropgesteld dat de copyrightmelding en toestemmingsmelding niet aangetast worden en dat de verspreider aan de - ontvanger dezelfde distributierechten verleend als aan hem verleend + ontvanger dezelfde distributierechten verleent als aan hem verleend door deze melding. Toestemming wordt verleend om gemodificeerde versies van dit document, @@ -1062,11 +1064,11 @@ Copyright (c) 1985, 1996, 1997 Free Software Foundation vooropgesteld dat ze ook duidelijk melding maken van degene die als laatste modificaties doorgevoerd heeft. -De condities voor het copi-eren van Emacs zelf zijn complexer dan dit, +De condities voor het kopiëren van Emacs zelf zijn complexer dan dit, maar gebaseerd op dezelfde gedachte. Lees het bestand COPYING en geef -vervolgens copi-en van Emacs aan al je vrienden. Help bij het uitroeien +vervolgens kopieën van Emacs aan al je vrienden. Help bij het uitroeien van softwarebeschermingspolitiek (`software eigendom') door vrije software -te gebruiken, schrijven en delen! +te gebruiken, te schrijven en te delen! (Engels origineel van de copyrightmelding en condities: @@ -1090,3 +1092,5 @@ The conditions for copying Emacs itself are more complex, but in the same spirit. Please read the file COPYING and then do give copies of GNU Emacs to your friends. Help stamp out software obstructionism ("ownership") by using, writing, and sharing free software!) + +;;; arch-tag: 3399e308-e605-4125-8fbb-b2fe91ac3149 diff --git a/etc/TUTORIAL.pl b/etc/TUTORIAL.pl index daedfe0f39..012cd143c4 100644 --- a/etc/TUTORIAL.pl +++ b/etc/TUTORIAL.pl @@ -1248,3 +1248,4 @@ u +;;; arch-tag: 6c6b7445-4cd5-44ca-a101-7f4697b92f60 diff --git a/etc/TUTORIAL.ro b/etc/TUTORIAL.ro index 2bf71cebfb..670c39bc45 100644 --- a/etc/TUTORIAL.ro +++ b/etc/TUTORIAL.ro @@ -1110,3 +1110,5 @@ Condi spirit. Citiþi fiºierul COPYING ºi apoi distribuiþi prietenilor copii ale Emacs-ului. Contribuiþi la eliminarea obstrucþionismului software folosind, scriind ºi distribuind free software! + +;;; arch-tag: dcf252cf-bd67-4f8d-a440-1ec4b8dbfd70 diff --git a/etc/TUTORIAL.ru b/etc/TUTORIAL.ru index 0076728c24..bb7480d913 100644 --- a/etc/TUTORIAL.ru +++ b/etc/TUTORIAL.ru @@ -1078,3 +1078,5 @@ Copyright (c) 1985, 1996 Free Software Foundation // Alex Ott. // âÏÌØÛÏÅ ÓÐÁÓÉÂÏ ÷ÌÁÄÉÍÉÒÕ âÏÒÍÏÔÏ×Õ, ÎÁ ÂÁÚÅ ÐÅÒÅ×ÏÄÁ ËÏÔÏÒÏÇÏ ÂÙÌ ÓÄÅÌÁÎ // ÜÔÏÔ ÐÅÒÅ×ÏÄ + +;;; arch-tag: ad4e5698-ea8b-45b7-b236-ed5ad5b72d2b diff --git a/etc/TUTORIAL.sk b/etc/TUTORIAL.sk index 2adfb42f1f..f294088aba 100644 --- a/etc/TUTORIAL.sk +++ b/etc/TUTORIAL.sk @@ -1101,3 +1101,5 @@ GNU Emacsu svojim priate ;;; Local Variables: ;;; coding: iso-latin-2 ;;; End: + +;;; arch-tag: 87861cfa-5cf6-4b87-9fab-86c93c5ca9f3 diff --git a/etc/TUTORIAL.sl b/etc/TUTORIAL.sl index 856605557a..ea901564a7 100644 --- a/etc/TUTORIAL.sl +++ b/etc/TUTORIAL.sl @@ -1135,3 +1135,5 @@ pi ;;; Local Variables: ;;; coding: iso-latin-2 ;;; End: + +;;; arch-tag: 985059e4-44c6-4ac9-b627-46c8db57acf6 diff --git a/etc/TUTORIAL.sv b/etc/TUTORIAL.sv index 6cda75bcef..f4dcc842e5 100644 --- a/etc/TUTORIAL.sv +++ b/etc/TUTORIAL.sv @@ -1088,3 +1088,5 @@ The conditions for copying Emacs itself are more complex, but in the same spirit. Please read the file COPYING and then do give copies of GNU Emacs to your friends. Help stamp out software obstructionism ("ownership") by using, writing, and sharing free software! + +;;; arch-tag: b352f774-622b-4cc6-85ce-43e3baf4fc1b diff --git a/etc/TUTORIAL.th b/etc/TUTORIAL.th index 4f33ad8d03..a585229632 100644 --- a/etc/TUTORIAL.th +++ b/etc/TUTORIAL.th @@ -1005,3 +1005,4 @@ virach@nectec.or.th Translate - January 1999 by Virach Sornlertlamvanich +;;; arch-tag: 79ad252a-448a-4dc9-a4cb-2097dd1ec014 diff --git a/etc/TUTORIAL.translators b/etc/TUTORIAL.translators index a03ca8e3c8..b4d26c85ca 100644 --- a/etc/TUTORIAL.translators +++ b/etc/TUTORIAL.translators @@ -16,13 +16,15 @@ TUTORIAL.pl: Beatę Wierzchołowską Janusz S. Bien TUTORIAL.ro: Tudor Hulubei TUTORIAL.ru: Alex Ott -TUTORIAL.sv: Mats Lidell TUTORIAL.sk: Miroslav VaÅ¡ko Pavel Janík TUTORIAL.sl: Primož Peterlin +TUTORIAL.sv: Mats Lidell TUTORIAL.th: Virach Sornlertlamvanich TUTORIAL.zh: Chao-Hong Liu ;;; Local Variables: ;;; coding: utf-8 ;;; End: + +;;; arch-tag: 8788b16b-e739-4304-a7f2-729bdb999fa0 diff --git a/etc/TUTORIAL.zh b/etc/TUTORIAL.zh index 59896f2a3e..a1383dc26b 100644 --- a/etc/TUTORIAL.zh +++ b/etc/TUTORIAL.zh @@ -1083,3 +1083,5 @@ Chinese Translation by Chao-Hong Liu (2002, 2003) ;;; Local Variables: ;;; coding: chinese-big5 ;;; End: + +;;; arch-tag: a51dafb4-e602-432b-8020-5d5d5f150811 diff --git a/etc/Xkeymap.txt b/etc/Xkeymap.txt index 31aef8bdac..fcdbbf4321 100644 --- a/etc/Xkeymap.txt +++ b/etc/Xkeymap.txt @@ -96,3 +96,5 @@ # local variables: # tab-width: 4 # End: + +# arch-tag: cbaa71af-719b-4647-a2c1-cd4d36a4fc64 diff --git a/etc/calccard.tex b/etc/calccard.tex index ae999c8869..bbb3d64aa7 100644 --- a/etc/calccard.tex +++ b/etc/calccard.tex @@ -667,3 +667,5 @@ Variable names are single digits or whole words. % Local variables: % compile-command: "tex calccard" % End: + +% arch-tag: a2764f34-ec23-4083-bd5c-53f9e70a5da9 diff --git a/etc/compilation.txt b/etc/compilation.txt new file mode 100644 index 0000000000..6420580fe6 --- /dev/null +++ b/etc/compilation.txt @@ -0,0 +1,345 @@ +* Introduction -*-compilation-*- + +This shows the different kinds of messages compile recognizes by default and +how they are rendered. It is intended both to help you decide which matchers +you need and as a test of the matchers. Move the mouse over a colored part or +use `compilation-message-face', to see how much text was actually matched. + +The important part is the symbol(s) line at the beginning of each entry. +These are the symbols you can customize `compilation-error-regexp-alist' for, +to match the messages shown in that entry. A few complex cases have more than +one symbol, which should be selected together. + + +* Absoft FORTRAN 77 Compiler 3.1.3 + +symbol: absoft + +Error on line 3 of t.f: Execution error unclassifiable statement +Line 45 of "foo.c": bloofle undefined +error on line 19 of fplot.f: spelling error? +warning on line 17 of fplot.f: data type is undefined for variable d + + +* Ada & Mpatrol (memory leak debugger) + +symbol: ada + +This matches only the end of line, the beginning is covered by GNU style. + +foo.adb:61:11: [...] in call to size declared at foo.ads:11 + 0x8008621 main+16 at error.c:17 + + +* IBM AIX PS/2 C version 1.1 + +symbol: aix + +****** Error number 140 in line 8 of file errors.c ****** + + +* Ant Java: works at least for jikes and javac + +symbol: ant + +The regexps found on http://ant.apache.org/faq.html, and since integrated in +both Emacsen, were hairy. Why so many numbers for jikes -- is one a column +number? + + [javac] /src/DataBaseTestCase.java:27: unreported exception ... + [javac] /src/DataBaseTestCase.java:49: warning: finally clause cannot complete normally + [jikes] foo.java:3:5:7:9: blah blah + + +* Bash v2 + +symbol: bash + +a.sh: line 1: ls-l: command not found + + +* Borland C++, C++Builder + +symbol: borland + +Error ping.c 15: Unable to open include file 'sys/types.h' +Warning ping.c 68: Call to function 'func' with no prototype +Error E2010 ping.c 15: Unable to open include file 'sys/types.h' +Warning W1022 ping.c 68: Call to function 'func' with no prototype + + +* Caml & Python + +symbol: caml + +File "foobar.ml", lines 5-8, characters 20-155: blah blah +File "F:\ocaml\sorting.ml", line 65, characters 2-145: +Warning: this expression should have type unit. + File "/usr/share/gdesklets/display/TargetGauge.py", line 41, in add_children + File \lib\python\Products\PythonScripts\PythonScript.py, line 302, in _exec + File "/tmp/foo.py", line 10 + + +* Apollo cc, 4.3BSD fc & IBM RS6000/AIX xlc compiler & Microtec mcc68k & GNAT (July 94) + +symbol: comma + +"foo.f", line 3: Error: syntax error near end of statement +"vvouch.c", line 19.5: 1506-046 (S) Syntax error. +"foo.c", line 32 pos 1; (E) syntax error; unexpected symbol: "lossage" +"foo.adb", line 2(11): warning: file name does not match ... +"src/swapping.c", line 30.34: 1506-342 (W) "/*" detected in comment. + + +* EPC F90 compiler + +symbol: epc + +Error 24 at (2:progran.f90) : syntax error + + +* IAR Systems C Compiler + +symbol: iar + +"foo.c",3 Error[32]: Error message +"foo.c",3 Warning[32]: Error message + + +* IBM C/C++ Tools 2.01 + +symbol: ibm + +foo.c(2:0) : informational EDC0804: Function foo is not referenced. +foo.c(3:8) : warning EDC0833: Implicit return statement encountered. +foo.c(5:5) : error EDC0350: Syntax error. + + +* Ultrix MIPS RISC CC & DEC AXP OSF/1 cc & IRIX 5.2 + +symbol: irix + +ccom: Error: foo.c, line 2: syntax error +cc: Info: foo.c, line 27: ... +cfe: Warning 712: foo.c, line 2: illegal combination of pointer and ... +cfe: Warning 600: xfe.c: 170: Not in a conditional directive while ... +/usr/lib/cmplrs/cc/cfe: Error: foo.c: 1: blah blah +/usr/lib/cmplrs/cc/cfe: warning: foo.c: 1: blah blah + + +* Java Exception & Valgrind (memory debugger for x86 GNU/Linux) + +symbol: java + +Register 6 contains wrong type + at org.foo.ComponentGateway.doGet(ComponentGateway.java:172) + at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) +==1332== Invalid write of size 1 +==1332== at 0x4040743C: System::getErrorString() (../src/Lib/System.cpp:217) +==1332== by 0x8008621: main (vtest.c:180) + + +* IBM jikes + +symbols: jikes-file jikes-line + +Jikes separates file names from the actual error messages. For visual +feedback the underline and the word "Error" on the 3rd line is fontified like +a file name would be. + +Found 2 semantic errors compiling "../javax/swing/BorderFactory.java": + + 150. case '{': + <-> +*** Error: The type of this expression, "char", is not ... + + 312. return new CompoundBorder(outside, inside); + <---------------------------------> +*** Error: No match was found for constructor ... + +Issued 1 semantic warning compiling "java/awt/Toolkit.java": + + 504. void imgProduceImage( ImageNativeProducer prod, Ptr imgData); + <-----------------> +*** Warning: The type "ImageNativeProducer" is defined ... + + +* GCC include message + +symbol: gcc-include + +The last file, i.e. the one you are compiling, is the interesting one. + +In file included from /usr/include/c++/3.3/backward/warn.h:4, + from /usr/include/c++/3.3/backward/iostream.h:31, + from test_clt.cc:1: + + +* GNU style + +symbol: gnu + +foo.c:8: message +../foo.c:8: W: message +/tmp/foo.c:8:warning message +foo/bar.py:8: FutureWarning message +foo.py:8: RuntimeWarning message +foo.c:8:I: message +foo.c:8.23: info: message +foo.c:8:23:information: message +foo.c:8.23-45: Informational: message +foo.c:8-23: message +foo.c:8-45.3: message +foo.c:8.23-9.1: message +jade:dbcommon.dsl:133:17:E: missing argument for function call +G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found. +file:G:/cygwin/dev/build-myproj.xml:54: Compiler Adapter 'javac' can't be found. + + +* Lucid Compiler, lcc 3.x + +symbol: lcc + +E, file.cc(35,52) Illegal operation on pointers +W, file.cc(36,52) blah blah + + +* makepp 1.20 + +symbol: makepp + +makepp: Scanning `/foo/bar.c' +makepp: warning: bla bla `/foo/bar.c' and `/foo/bar.h' +makepp: bla bla `/foo/Makeppfile:12' bla +makepp: bla bla `/foo/bar.c' and `/foo/bar.h' + + +* MIPS lint; looks good for SunPro lint also + +symbols: mips-1 mips-2 + +This can match multiple times on a line. + +TrimMask (255) in solomon.c may be indistinguishable from TrimMasks (93) in solomon.c due to truncation +name defined but never used: LinInt in cmap_calc.c(199) + + +* Microsoft C/C++ + +symbol: msft + +This used to be less selective and allowed characters other than parens around +the line number, but that caused confusion for GNU-style error messages. This +used to reject spaces and dashes in file names, but they are valid now; so I +made it more strict about the error message that follows. + +keyboard handler.c(537) : warning C4005: 'min' : macro redefinition +d:\tmp\test.c(23) : error C2143: syntax error : missing ';' before 'if' + + +* Oracle pro*c + +symbol: oracle + +Semantic error at line 528, column 5, file erosacqdb.pc: + + +* Perl + +symbol: perl + +syntax error at automake line 922, near "':'" +Died at test.pl line 27. +store::odrecall('File_A', 'x2') called at store.pm line 90 + + +* RXP + +symbol: rxp + +GPL XML validator at http://www.cogsci.ed.ac.uk/~richard/rxp.html + +Error: Mismatched end tag: expected , got +in unnamed entity at line 71 char 8 of file:///home/reto/test/group.xml +Warning: Start tag for undeclared element geroup +in unnamed entity at line 4 char 8 of file:///home/reto/test/group.xml + + +* Sparc Pascal + +symbols: sparc-pascal-file sparc-pascal-line sparc-pascal-example + +These messages don't contain a file name. Instead the compiler gives a +message whenever the file being compiled is changed. For visual feedback the +error code is fontified like a file name would be. + +Thu May 14 10:46:12 1992 mom3.p: + 20 linjer : array[1..4] of linje; +w 18480-----------^--- Inserted ';' + 20 linjer : array[1..4] of linje; +e 18480-----------^--- Inserted ';' +w 18520 line 61 - 0 is undefined +E 18520 line 61 - 0 is undefined + + +* SGI IRIX MipsPro 7.3 & Sun F90 & Cray C + +symbol: sun + +cc-1020 CC: REMARK File = CUI_App.h, Line = 735 +cc-1070 cc: WARNING File = linkl.c, Line = 38 +cf90-113 f90comp: ERROR NSE, File = Hoved.f90, Line = 16, Column = 3 + + +* Sun Ada (VADS, Solaris) + +symbol: sun-ada + +/home3/xdhar/rcds_rc/main.a, line 361, char 6:syntax error: "," inserted + + +* Ultrix 3.0 f77 & Some SGI cc version + +symbol: ultrix + +fort: Severe: addstf.f, line 82: Missing operator or delimiter symbol +cfe: Warning 835: foo.c, line 2: something + + +* 4.3BSD grep, cc, lint + +symbol: 4bsd + +/usr/src/foo/foo.c(8): warning: w may be used before set +/usr/src/foo/foo.c(9): error: w is used before set +strcmp: variable # of args. llib-lc(359) :: /usr/src/foo/foo.c(8) +bloofle defined( /users/wolfgang/foo.c(4) ), but never used + + +* Directory tracking + +Directories are matched via `compilation-directory-matcher'. Files which are +not shown as full paths are searched for relative to the directory where the +message was issued. + +Entering directory `/a/b/c' +Leaving directory `/a/b/c' +gmake[2]: Entering directory `/a/b/c' +makepp: Leaving directory `/a/b/c' + + +* Miscellaneous + +These are not messages that can be gone to. They are only highlighted via +`compilation-mode-font-lock-keywords' to recognize some useful information at +a glance. + +checking dynamic linker characteristics... GNU/Linux ld.so +checking if libtool supports shared libraries... yes +checking whether to build shared libraries... yes +checking whether -lc should be explicitly linked in... (cached) no +checking For GLIB - version >= 2.0.0... yes (version 2.1.0) +checking FONTCONFIG_CFLAGS... +g++ -o foo.o foo.cc +tool1 -output=foo foo.x +tool2 --outfile foo foo.y diff --git a/etc/cs-dired-ref.tex b/etc/cs-dired-ref.tex index 103752fdb6..cecfcb3909 100644 --- a/etc/cs-dired-ref.tex +++ b/etc/cs-dired-ref.tex @@ -400,3 +400,5 @@ Foundation, Inc., 675 Massachusetts Ave, Cambridge MA 02139. %\copyrightnotice \bye + +% arch-tag: dd78e947-5b89-4e5b-8bab-b6003719dce5 diff --git a/etc/cs-refcard.tex b/etc/cs-refcard.tex index 893557c468..16d50f1053 100644 --- a/etc/cs-refcard.tex +++ b/etc/cs-refcard.tex @@ -664,3 +664,5 @@ V % Local variables: % compile-command: "csplain cs-refcard" % End: + +% arch-tag: 24ab5519-539c-4941-9a95-4ed9d819030f diff --git a/etc/cs-survival.tex b/etc/cs-survival.tex index 6a170e06aa..a77d84c114 100644 --- a/etc/cs-survival.tex +++ b/etc/cs-survival.tex @@ -2,9 +2,6 @@ % Title: GNU Emacs Survival Card % Author: Wlodek Bzyl % -% $Revision: 1.1 $ -% $Date: 2001/04/18 13:59:16 $ -% %**start of header % User interface is `plain.tex' and macros described below @@ -24,7 +21,7 @@ \endinput \fi -% Copyright (c) 2000 Free Software Foundation, Inc. +% Copyright (c) 2000, 2004 Free Software Foundation, Inc. % This file is part of GNU Emacs. @@ -411,3 +408,5 @@ m % Local variables: % compile-command: "csplain survival" % End: + +% arch-tag: 86b21d3f-d8b6-412d-8d77-e6e8728f590e diff --git a/etc/ctags.1 b/etc/ctags.1 index 1eab02f214..9a6505b020 100644 --- a/etc/ctags.1 +++ b/etc/ctags.1 @@ -1 +1,3 @@ .so man1/etags.1 + +.\" arch-tag: 54d4579b-9d66-4ba5-9fda-f01ec83612ad diff --git a/etc/de-refcard.tex b/etc/de-refcard.tex index 5931436933..892c057584 100644 --- a/etc/de-refcard.tex +++ b/etc/de-refcard.tex @@ -639,3 +639,5 @@ Ar\-gu\-men\-te be\-reit\-ge\-stellt wer\-den, wenn die Funktion inter\-aktiv au % Local variables: % compile-command: "tex refcard" % End: + +% arch-tag: af0a2666-f289-49f1-a9cc-cedab9783314 diff --git a/etc/dired-ref.tex b/etc/dired-ref.tex index ec01c40fb1..52d3f3eaad 100644 --- a/etc/dired-ref.tex +++ b/etc/dired-ref.tex @@ -394,3 +394,4 @@ Foundation, Inc., 675 Massachusetts Ave, Cambridge MA 02139. \bye +% arch-tag: 483e7bb4-4576-4733-9fca-0eae1c861484 diff --git a/etc/emacs.1 b/etc/emacs.1 index 37d0c4b648..8605a0e7b9 100644 --- a/etc/emacs.1 +++ b/etc/emacs.1 @@ -550,3 +550,5 @@ Permission is granted to copy and distribute translations of this document into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. + +.\" arch-tag: 04dfd376-b46e-4924-919a-cecc3b257eaa diff --git a/etc/emacs.bash b/etc/emacs.bash index 5648a0b195..80930f80d7 100644 --- a/etc/emacs.bash +++ b/etc/emacs.bash @@ -43,3 +43,4 @@ function edit () } +# arch-tag: 1e1b74b9-bf2c-4b23-870f-9eebff7515cb diff --git a/etc/emacs.csh b/etc/emacs.csh index f25404ef86..411feedaef 100644 --- a/etc/emacs.csh +++ b/etc/emacs.csh @@ -23,3 +23,5 @@ alias edit 'set emacs_command=("emacs -nw \!*" "fg %emacs" "emacs -i \!* &"\ @ whichjob = 1 + $isjob + $?DISPLAY * 2 + $?WINDOW_PARENT * 4; \ test -S ~/.emacs_server && emacsclient \!* \ || echo `pwd` \!* >! ~/.emacs_args && eval $emacs_command[$whichjob]' + +# arch-tag: 433d58df-15b9-446f-ad37-f0393e3a23d4 diff --git a/etc/emacsclient.1 b/etc/emacsclient.1 index 5f52846b2f..e562d37360 100644 --- a/etc/emacsclient.1 +++ b/etc/emacsclient.1 @@ -76,3 +76,5 @@ This manual page was written by Stephane Bortzmeyer , for the Debian GNU/Linux system (but may be used by others). .SH COPYING This manual page is in the public domain. + +.\" arch-tag: 2b35e723-b197-4073-8752-231bc8b3d3f3 diff --git a/etc/emacstool.1 b/etc/emacstool.1 index b302fc703a..664e1c1028 100644 --- a/etc/emacstool.1 +++ b/etc/emacstool.1 @@ -151,3 +151,5 @@ Permission is granted to copy and distribute translations of this document into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. + +.\" arch-tag: a1f44815-5163-4026-89c1-4404e4b81d37 diff --git a/etc/etags.1 b/etc/etags.1 index 0d08f8df95..5b95b6c10c 100644 --- a/etc/etags.1 +++ b/etc/etags.1 @@ -300,3 +300,5 @@ Permission is granted to copy and distribute translations of this document into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. + +.\" arch-tag: 9534977f-af78-42f0-991d-1df6b6c05573 diff --git a/etc/fr-drdref.tex b/etc/fr-drdref.tex index 2a5e549eb8..922ce65f62 100644 --- a/etc/fr-drdref.tex +++ b/etc/fr-drdref.tex @@ -409,3 +409,4 @@ Foundation, Inc., 675 Massachusetts Ave, Cambridge MA 02139. \bye +% arch-tag: ffe6a489-24a2-4083-b8c3-5d03b621689d diff --git a/etc/fr-refcard.tex b/etc/fr-refcard.tex index d4b4fdf372..8290620cf2 100644 --- a/etc/fr-refcard.tex +++ b/etc/fr-refcard.tex @@ -662,3 +662,5 @@ plus de pr\'ecisions. % Local variables: % compile-command: "tex fr-refcard" % End: + +% arch-tag: 39d6dc6e-1a4a-4071-84db-4719d4e9e40d diff --git a/etc/fr-survival.tex b/etc/fr-survival.tex index a53f06b6a8..06422fe77a 100644 --- a/etc/fr-survival.tex +++ b/etc/fr-survival.tex @@ -3,9 +3,6 @@ % Title: GNU Emacs Survival Card % Author: Wlodek Bzyl % -% $Revision: 1.1 $ -% $Date: 2001/11/18 18:33:57 $ -% %**start of header % User interface is `plain.tex' and macros described below @@ -25,7 +22,7 @@ \endinput \fi -% Copyright (c) 2000 Free Software Foundation, Inc. +% Copyright (c) 2000, 2004 Free Software Foundation, Inc. % This file is part of GNU Emacs. @@ -415,3 +412,5 @@ contient entre parenth\`eses le nom des modes en cours. % Local variables: % compile-command: "tex survival" % End: + +% arch-tag: 2fb4e93f-8bfa-4ab4-bc6d-b475131d766a diff --git a/etc/gfdl.1 b/etc/gfdl.1 index 68aa0715f3..63e1d7a4e3 100644 --- a/etc/gfdl.1 +++ b/etc/gfdl.1 @@ -391,3 +391,5 @@ If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. + +.\" arch-tag: 3a15de89-40c2-46b8-a9a2-0710357a9baa diff --git a/etc/ledit.l b/etc/ledit.l index 0c572fa07a..d53c5d2601 100644 --- a/etc/ledit.l +++ b/etc/ledit.l @@ -148,3 +148,5 @@ (if (symbolp arg) (set_proc_str (get-pname arg)) (error arg " is illegal argument to set-proc-str")))) + +;;; arch-tag: 2e76c01f-8d6a-4d04-b9ab-0eaabec96aee diff --git a/etc/ms-7bkermit b/etc/ms-7bkermit index a5b47b3001..28847b0613 100644 --- a/etc/ms-7bkermit +++ b/etc/ms-7bkermit @@ -310,3 +310,5 @@ set key \2455 \khomscn set key \2463 \kendscn set key \2457 \kupscn set key \2465 \kdnscn + +;;; arch-tag: b066a884-e956-4f46-9d9c-13502f6cf7a6 diff --git a/etc/ms-kermit b/etc/ms-kermit index 4d1fe5b649..e25c3dbe64 100644 --- a/etc/ms-kermit +++ b/etc/ms-kermit @@ -165,3 +165,4 @@ set key \2857 \254 ;; m-~ set key \2318 \255 ;; m-del +;;; arch-tag: 93cefb0a-2b07-4d09-ae78-4d807b15645d diff --git a/etc/pl-refcard.tex b/etc/pl-refcard.tex index b61f6e43d5..713eaba7a8 100644 --- a/etc/pl-refcard.tex +++ b/etc/pl-refcard.tex @@ -1,8 +1,5 @@ %&mex %===================================================================== -% $Revision: 1.2 $ -% $Date: 2001/09/23 17:45:20 $ -%===================================================================== % Reference Card for GNU Emacs version 20 on Unix systems was % translated into Polish language by W{\l}odek Bzyl (matwb@univ.gda.pl) % who also added new section on `Dired' and added info about Polish @@ -35,7 +32,7 @@ \columnsperpage=2 -% Copyright (c) 1999 Free Software Foundation, Inc. +% Copyright (c) 1999, 2004 Free Software Foundation, Inc. % This file is part of GNU Emacs. @@ -992,3 +989,5 @@ przez wywo/lanie \kbd{C-h f interactive}. \copyrightnotice \bye + +% arch-tag: 19d15a16-70be-40c8-ad91-88899aac32a9 diff --git a/etc/ps-prin1.ps b/etc/ps-prin1.ps index f21acd54cd..8e9479e112 100644 --- a/etc/ps-prin1.ps +++ b/etc/ps-prin1.ps @@ -1,7 +1,7 @@ % === BEGIN ps-print prologue 1 % version: 6.0 -% Copyright (C) 2000, 2001 Free Software Foundation, Inc. +% Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % @@ -751,6 +751,9 @@ StandardEncoding 46 82 getinterval aload pop FooterLineHeight FooterLines 1 sub mul add }def +/HeaderClip{HeaderFrameStart moveto HeaderFramePath clip}def +/FooterClip{FooterFrameStart moveto FooterFramePath clip}def + /strcat{ dup length 3 -1 roll dup length dup 4 -1 roll add string dup 0 5 -1 roll putinterval @@ -815,17 +818,21 @@ StandardEncoding 46 82 getinterval aload pop }def /HeaderText{ + gsave HeaderClip HeaderLinesRight HeaderLinesLeft /HeaderStart HeaderLineHeight HeaderPad HeaderFrameProperties 0 get HeaderOrFooterText + grestore }def /FooterText{ + gsave FooterClip FooterLinesRight FooterLinesLeft /FooterStart FooterLineHeight FooterPad FooterFrameProperties 0 get HeaderOrFooterText + grestore }def /ReportFontInfo{ diff --git a/etc/refcard.tex b/etc/refcard.tex index 7e6234d45d..b48dfb6958 100644 --- a/etc/refcard.tex +++ b/etc/refcard.tex @@ -651,3 +651,5 @@ Type \kbd{C-h f interactive} for more details. % Local variables: % compile-command: "tex refcard" % End: + +% arch-tag: d67bdf5d-b77c-44eb-a22e-f4f7d25174d2 diff --git a/etc/ses-example.ses b/etc/ses-example.ses index 67e3f0d334..fdbdb0cfca 100644 --- a/etc/ses-example.ses +++ b/etc/ses-example.ses @@ -205,3 +205,5 @@ Sales summary - Acme fundraising ;;; life-universe-everything: 42 ;;; symbolic-formulas: (("Eastern area") ("West-district") ("North&South") ("Other")) ;;; End: + +;;; arch-tag: 4fcb0843-e3f9-4270-b8fb-998129190765 diff --git a/etc/sk-dired-ref.tex b/etc/sk-dired-ref.tex index 165743ddbe..59ed9e9f53 100644 --- a/etc/sk-dired-ref.tex +++ b/etc/sk-dired-ref.tex @@ -406,3 +406,5 @@ Foundation, Inc., 675 Massachusetts Ave, Cambridge MA 02139. % Local variables: % compile-command: "csplain sk-dired-ref" % End: + +% arch-tag: d5b57e24-16ec-4981-9315-14d3d16d3062 diff --git a/etc/sk-refcard.tex b/etc/sk-refcard.tex index 82ec7f6e93..d65f81619e 100644 --- a/etc/sk-refcard.tex +++ b/etc/sk-refcard.tex @@ -665,3 +665,5 @@ Viac sa dozviete po vykonan % Local variables: % compile-command: "csplain sk-refcard" % End: + +% arch-tag: 9f8eacf2-daf9-4162-bc8d-4af7b269f3d3 diff --git a/etc/sk-survival.tex b/etc/sk-survival.tex index 2355923661..77801c8138 100644 --- a/etc/sk-survival.tex +++ b/etc/sk-survival.tex @@ -2,9 +2,6 @@ % Title: GNU Emacs Survival Card % Author: Wlodek Bzyl % -% $Revision: 1.1 $ -% $Date: 2001/04/18 13:58:29 $ -% %**start of header % User interface is `plain.tex' and macros described below @@ -24,7 +21,7 @@ \endinput \fi -% Copyright (c) 2000 Free Software Foundation, Inc. +% Copyright (c) 2000, 2004 Free Software Foundation, Inc. % This file is part of GNU Emacs. @@ -414,3 +411,5 @@ m % Local variables: % compile-command: "csplain sk-survival" % End: + +% arch-tag: 126389ad-40b2-4bf9-ac1d-e5105d0986b9 diff --git a/etc/survival.tex b/etc/survival.tex index a5c558c170..e30d14f8d7 100644 --- a/etc/survival.tex +++ b/etc/survival.tex @@ -410,3 +410,5 @@ contains names of the current modes, in parentheses. % Local variables: % compile-command: "tex survival" % End: + +% arch-tag: 4f9a0562-617b-4843-aee1-450c41d6b22c diff --git a/etc/tasks.texi b/etc/tasks.texi index 7984cac663..c4ecca49ff 100644 --- a/etc/tasks.texi +++ b/etc/tasks.texi @@ -958,3 +958,7 @@ time-stamp-end: "$" time-stamp-format: "%:b %:d, %:y" compile-command: "make just-tasks" End: + +@ignore + arch-tag: 7ed10085-fa7c-47d4-9ed5-39e885603e5c +@end ignore diff --git a/etc/termcap.src b/etc/termcap.src index c982aececf..d656d02845 100644 --- a/etc/termcap.src +++ b/etc/termcap.src @@ -10,7 +10,6 @@ # #------------------------------------------------------------------------------ # Version 10.2.1 -# $Date: 2002/04/20 07:38:53 $ # terminfo syntax # # Eric S. Raymond (current maintainer) diff --git a/etc/ulimit.hack b/etc/ulimit.hack index 1baeecc40d..17105158c4 100644 --- a/etc/ulimit.hack +++ b/etc/ulimit.hack @@ -36,3 +36,5 @@ chmod 0754 /etc/init exit 0 # # Upon system reboot, all processes will inherit the new large ulimit. + +# arch-tag: 6f9a7072-9d07-4431-b0bb-e867648ad0b4 diff --git a/etc/vipcard.tex b/etc/vipcard.tex index 33e87aefc5..7ec8165887 100644 --- a/etc/vipcard.tex +++ b/etc/vipcard.tex @@ -679,3 +679,5 @@ moves 11 lines below current line to the end of buffer. % Local variables: % compile-command: "tex refcard" % End: + +% arch-tag: 342a9548-4de4-499d-b864-74fb426b6729 diff --git a/etc/viperCard.tex b/etc/viperCard.tex index fa7fcc262c..868be3d2f1 100644 --- a/etc/viperCard.tex +++ b/etc/viperCard.tex @@ -744,3 +744,5 @@ Ex commands can be made to have history. See the manual for details. % Local variables: % compile-command: "tex viperCard" % End: + +% arch-tag: e287b45c-4c5e-4bf9-ae28-ead4cd9f68e3 diff --git a/info/dir b/info/dir index 90faa0d7eb..4af6f37174 100644 --- a/info/dir +++ b/info/dir @@ -8,10 +8,10 @@ File: dir Node: Top This is the top of the INFO tree The Info Directory ****************** - The Info Directory is the top-level menu of major Info topics. + The Info Directory is the top-level menu of major Info topics. Type "d" in Info to return to the Info Directory. Type "q" to exit Info. Type "?" for a list of Info commands, or "h" to visit an Info tutorial. - Type "m" to choose a menu item--for instance, + Type "m" to choose a menu item--for instance, "mEmacs" visits the Emacs manual. In Emacs Info, you can click mouse button 2 on a menu item or cross reference to follow it to its target. @@ -44,8 +44,9 @@ Emacs * Message: (message). Mail and news composition mode that goes with Gnus. * MH-E: (mh-e). Emacs interface to the MH mail system. * MIME: (emacs-mime). Emacs MIME de/composition library. -* SC: (sc). Supercite lets you cite parts of messages you're +* SC: (sc). Supercite lets you cite parts of messages you're replying to, in flexible ways. +* SMTP: (smtpmail). Emacs library for sending mail via SMTP. * Autotype: (autotype). Convenient features for text that you enter frequently in Emacs. @@ -55,6 +56,7 @@ Emacs * Forms: (forms). Emacs package for editing data bases by filling in forms. * RefTeX: (reftex). Emacs support for LaTeX cross-references and citations. +* SES: (ses). Simple Emacs Spreadsheet * Tramp: (tramp). Transparent Remote (file) Access, Multiple Protocol. Edit remote files via a remote shell (rsh, ssh, telnet). diff --git a/leim/CXTERM-DIC/4Corner.tit b/leim/CXTERM-DIC/4Corner.tit index e9d7212060..8b52b531d6 100644 --- a/leim/CXTERM-DIC/4Corner.tit +++ b/leim/CXTERM-DIC/4Corner.tit @@ -1,4 +1,3 @@ -# $Id: 4Corner.tit,v 1.3 1995/01/02 06:09:19 ygz Exp $ # HANZI input table for cxterm # To be used by cxterm, convert me to .cit format first # .cit version 2 @@ -6682,3 +6681,5 @@ BEGINDICTIONARY 99901 æÎ 99903 ¿¢ 99904 ºa + +# arch-tag: aa089b66-ed25-422f-97e2-78574370efa5 diff --git a/leim/CXTERM-DIC/ARRAY30.tit b/leim/CXTERM-DIC/ARRAY30.tit index 9943294a1f..55919c862d 100644 --- a/leim/CXTERM-DIC/ARRAY30.tit +++ b/leim/CXTERM-DIC/ARRAY30.tit @@ -13184,3 +13184,5 @@ rfk; napa ùÚ # ---> 6v1-0^1- 0 ,nr\040 ùÛ # ---> 8v6v4^ 0 weu\040 ùÜ # ---> 2^3^7^ 0 + +# arch-tag: 344d9e2d-e34b-4c61-ac52-aa46da44347d diff --git a/leim/CXTERM-DIC/CCDOSPY.tit b/leim/CXTERM-DIC/CCDOSPY.tit index 3e2f5666f3..5b135288de 100644 --- a/leim/CXTERM-DIC/CCDOSPY.tit +++ b/leim/CXTERM-DIC/CCDOSPY.tit @@ -1,4 +1,3 @@ -# $Id: CCDOSPY.tit,v 1.1 1991/10/27 06:21:16 ygz Exp $ # HANZI input table for cxterm # To be used by cxterm, convert me to .cit format first # .cit version 1 @@ -541,3 +540,5 @@ zui zuj ×ê×ë߬çÚõò zun ×ð×ñߤé×÷® zuo ×ò×ó×ô×õ×ö×÷×ø×ùßòàÜâôëÑìñ + +# arch-tag: cc94b635-0552-40f3-8513-5edab6f13ce5 diff --git a/leim/CXTERM-DIC/ECDICT.tit b/leim/CXTERM-DIC/ECDICT.tit index 7508e6b1f2..8b3beec828 100644 --- a/leim/CXTERM-DIC/ECDICT.tit +++ b/leim/CXTERM-DIC/ECDICT.tit @@ -7837,3 +7837,4 @@ zoological zoology °Êª«¾Ç +# arch-tag: 618eec81-84f6-42ce-b2e7-01569fb3f8cb diff --git a/leim/CXTERM-DIC/ETZY.tit b/leim/CXTERM-DIC/ETZY.tit index 370440e921..befb511f56 100644 --- a/leim/CXTERM-DIC/ETZY.tit +++ b/leim/CXTERM-DIC/ETZY.tit @@ -1579,3 +1579,5 @@ z\040 z2 ¼õ±Î¾C¿¬¹Èîg÷´ÆRÃïö}á¼ævæ©Ámólâ°ê¢ä»å­çWðjðæòj z3 ÃͶþͽØD z4 ¶Æ¿D¶ø¾ÒéMØ´Êó鮩íÛäéj + +# arch-tag: 7f36821c-dc1c-4119-8679-f354a58ff15f diff --git a/leim/CXTERM-DIC/PY-b5.tit b/leim/CXTERM-DIC/PY-b5.tit index e1764ff33d..5ef45b8546 100644 --- a/leim/CXTERM-DIC/PY-b5.tit +++ b/leim/CXTERM-DIC/PY-b5.tit @@ -2279,3 +2279,5 @@ zuo2 zuo3 ¥ª¦õðw zuo4 °µ§@§¤®yÜ`¯®Æw¬gÌ©Ð_ÍÚßÜÑY zuo5 + +# arch-tag: cd75d187-c91f-4197-8e77-1ee1a89a38bb diff --git a/leim/CXTERM-DIC/Punct-b5.tit b/leim/CXTERM-DIC/Punct-b5.tit index 3614598368..89ee06a3c0 100644 --- a/leim/CXTERM-DIC/Punct-b5.tit +++ b/leim/CXTERM-DIC/Punct-b5.tit @@ -137,3 +137,5 @@ unit | ¡U¡ý¡Y¢x¡ü } ¡¢¡b¡d ~ ¡\¡ã¡Û + +# arch-tag: 6c85fd95-a46d-4b07-8a87-2121eb14e132 diff --git a/leim/CXTERM-DIC/Punct.tit b/leim/CXTERM-DIC/Punct.tit index b3fb1cd9e2..61c3d4f907 100644 --- a/leim/CXTERM-DIC/Punct.tit +++ b/leim/CXTERM-DIC/Punct.tit @@ -1,4 +1,3 @@ -# $Id: Punct.tit,v 1.1 1991/10/27 06:21:16 ygz Exp $ # HANZI input table for cxterm # To be used by cxterm, convert me to .cit format first # .cit version 1 @@ -75,3 +74,5 @@ punct symbol ¡á¡â¡ã¡ä¡å¡æ¡ç¡è¡é¡ê¡ë¡ì¡í | £ü¡¬¡Î ~ £þ¡«¡×¡Ø¡Þ + +# arch-tag: 4d0e14b7-4eb2-4310-9582-e981f4c4a7f0 diff --git a/leim/CXTERM-DIC/QJ-b5.tit b/leim/CXTERM-DIC/QJ-b5.tit index fcf85ec101..eb5a558bfb 100644 --- a/leim/CXTERM-DIC/QJ-b5.tit +++ b/leim/CXTERM-DIC/QJ-b5.tit @@ -114,3 +114,5 @@ z | ¡U } ¡b ~ ¡ã + +# arch-tag: 5c41662d-6b85-467f-a977-ba80a6bd9f2c diff --git a/leim/CXTERM-DIC/QJ.tit b/leim/CXTERM-DIC/QJ.tit index 6c3a96040a..b591f1326a 100644 --- a/leim/CXTERM-DIC/QJ.tit +++ b/leim/CXTERM-DIC/QJ.tit @@ -1,4 +1,3 @@ -# $Id: QJ.tit,v 1.1 1991/10/27 06:21:16 ygz Exp $ # HANZI input table for cxterm # To be used by cxterm, convert me to .cit format first # .cit version 1 @@ -110,3 +109,5 @@ z | £ü } £ý ~ £þ + +# arch-tag: 3ee780cd-600a-49e7-a77b-85b898adc205 diff --git a/leim/CXTERM-DIC/SW.tit b/leim/CXTERM-DIC/SW.tit index f447276ce1..fed48d62e6 100644 --- a/leim/CXTERM-DIC/SW.tit +++ b/leim/CXTERM-DIC/SW.tit @@ -1,4 +1,3 @@ -# $Id: SW.tit,v 1.1 1991/10/27 06:21:16 ygz Exp $ # HANZI input table for cxterm # To be used by cxterm, convert me to .cit format first # .cit version 1 @@ -726,3 +725,5 @@ zv zy °±´Ôµª¶Ì·Õ·ú¸×º¤ºÐÂÈÄÊÆóÆøÇâÇèÉÏЩÐéÑõÕ½Ö¹ÙÚÙÝÙÞê¨ zy ë­ë®ë¯ë°ë±ë²ë³ë´ëµõºö´÷ª zz ´Ó¿¨Áì­ƵÇêÈËÌ°Õ§ÕêÖÚêßì£ì¨ò¢ò¥ + +# arch-tag: 0e108249-9190-46f4-884f-6af10a9aeb89 diff --git a/leim/CXTERM-DIC/TONEPY.tit b/leim/CXTERM-DIC/TONEPY.tit index bbc98d1993..a93bf9dcb6 100644 --- a/leim/CXTERM-DIC/TONEPY.tit +++ b/leim/CXTERM-DIC/TONEPY.tit @@ -1,4 +1,3 @@ -# $Id: TONEPY.tit,v 1.1 1991/10/27 06:28:34 ygz Exp $ # HANZI input table for cxterm # To be used by cxterm, convert me to .cit format first # .cit version 1 @@ -2098,3 +2097,5 @@ zuo2 zuo3 ´é×ó×ô zuo4 Ôä×õ×ö×÷×ø×ùÚèßòâôëÑìñõ¡ zuo5 + +# arch-tag: 6a2668ac-399a-4504-bb7a-5c641cb8e0ef diff --git a/leim/CXTERM-DIC/ZOZY.tit b/leim/CXTERM-DIC/ZOZY.tit index 8b7d4f7b9b..5c445ffdaf 100644 --- a/leim/CXTERM-DIC/ZOZY.tit +++ b/leim/CXTERM-DIC/ZOZY.tit @@ -1579,3 +1579,5 @@ zp3 zp4 ¥÷©Á¾Ä¼«¤ÀÁTàóô\Ê®ÏýèßéÃêëðx zp6 ¼XµI¨WÌÞÙÈÓÇóFñãånåýóVï´Ê·ÍZÓbãËøtÊÒêýöc zul4 ßú + +# arch-tag: e40a2740-dae5-4fd9-a32e-bedf6503dc65 diff --git a/leim/ChangeLog b/leim/ChangeLog index b991d0532f..5ef6b3d446 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,55 @@ +2004-04-09 Andrew Innes + + * makefile.w32-in (distclean clean): Remove nmake specific + stamp-subdir test. + +2004-02-28 Kenichi Handa + + * Makefile.in (all): Depends on ${WORLD} instead of ${TIT} and + ${MISC-DIC}. + (clean, mostlyclean): Don't delete *.elc distributed with tarball. + (maintainer-clean): Delete files that are not in CVS repository. + + * makefile.nt (all): Depends on $(WORLD) instead of $(TIT) and + $(MISC-DIC). + (clean, mostlyclean): Don't delete *.elc distributed with tarball. + (maintainer-clean): Delete files that are not in CVS repository. + + * makefile.w32-in (all): Depends on $(WORLD) instead of $(TIT) and + $(MISC-DIC). + (clean, mostlyclean): Don't delete *.elc distributed with tarball. + (maintainer-clean): Delete files that are not in CVS repository. + +2004-02-16 J,bi(Br,bt(Bme Marant (tiny change) + + * Makefile.in (distclean maintainer-clean): Depend on clean. + +2004-01-27 Ognyan Kulev (tiny change) + + * quail/cyrillic.el ("bulgarian-bds"): Docstring fixed. + +2004-01-22 Ognyan Kulev (tiny change) + + * quail/cyrillic.el ("bulgarian-phonetic"): Docstring fixed. + Duplicated entry removed. + ("bulgarian-bds"): Docstring fixed. + +2003-10-06 Dave Love + + * quail/latin-ltx.el: Several additions. + +2003-08-25 Jesper Harder (tiny change) + + * quail/latin-pre.el ("german-prefix"): Fix typo in the docstring. + +2003-08-20 Dave Love + + * quail/latin-ltx.el: Add \rhd. + +2003-08-19 Markus Rost + + * quail/latin-pre.el ("french-prefix"): Fix spacing in docstring. + 2003-07-21 KAWABATA, Taichi * quail/indian.el (quail-indian-update-translation): Adjusted the @@ -675,7 +727,7 @@ translation. * quail/japanese.el ("japanese"): Delete the key sequence for - Roman transliteration from the docstring because it's now shonw + Roman transliteration from the docstring because it's now shown automatically. ("japanese-ascii", "japanese-zenkaku") ("japanese-hankaku-kana", "japanese-hiragana") @@ -1343,3 +1395,5 @@ Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 4b364045-a476-4ff7-92ad-dde58dbd45b4 diff --git a/leim/MISC-DIC/CTLau-b5.html b/leim/MISC-DIC/CTLau-b5.html index 85be9d4f53..2162c2f04a 100644 --- a/leim/MISC-DIC/CTLau-b5.html +++ b/leim/MISC-DIC/CTLau-b5.html @@ -682,3 +682,6 @@ YUNG \YOO èÛø[¡¼¡¼ì{ì|ÂDïjÂCïlù\ÂBóÐñÇùÎÅ¿÷®ö­÷²ÃXÄJóÈóÖóËÄI¡¼óÍóÎÄK¡¼óÏ¡¼õkÆsÄÏõnõv¡¼¡¼¡¼ö®Å`ö¯÷¯ÅÀ÷«¡¼¡¼ÅíÅëøWø× \YUK êé³bߢ×L×K×E§¿¡¼µËµÍ¡¼¡¼ßs¡¼ã¦¡¼¡¼ÜæÜù»Mæý¡¼íêí衼¦G¡¼Ëx¡¼ÌÒ¡¼ªÐªÒÍ°¡¼¡¼¡¼Ä¤Ð[Ð_ÐgÐeÎú­O×H¯Ö¡¼¡¼¯â®Ó¡¼
+ + diff --git a/leim/MISC-DIC/CTLau.html b/leim/MISC-DIC/CTLau.html index 48872caf71..2a8ca5857f 100644 --- a/leim/MISC-DIC/CTLau.html +++ b/leim/MISC-DIC/CTLau.html @@ -682,3 +682,6 @@ YUNG Ó¿Ó¹ \YOO öÐöÑöÒöÓöÖöØöÙöÚöÛöÜöÝöÞößöáöâöãöäöåöæöçöëöíöîöïöðöñöòöóöôöõööö÷öøöùöúöûöüöýöþ÷Ý÷£÷¤÷¥÷¦÷§÷¨÷ª÷«÷¬÷­÷®÷¯ \YUK ì¢ëàëáëâëãëäÄòëæëçëéëêëëëíëïëðëñëòëóëôëöëùëúëûëþì¡ë¾ë¿ëÀëÂëÃëÄëÅëÆëÇëÉëËëÌëÍëÏëÑëÒëÓëÔëÕëÖë×ëÛëÜëÝëÞëß
+ + diff --git a/leim/Makefile.in b/leim/Makefile.in index 80c78bf52e..8ee38f3da4 100644 --- a/leim/Makefile.in +++ b/leim/Makefile.in @@ -150,7 +150,7 @@ NON-TIT=${CHINESE-NON-TIT} ${JAPANESE} ${KOREAN} ${EUROPEAN} ${MISC} .el.elc: ${RUN-EMACS} -f batch-byte-compile $< -all: ${BUILT-EMACS} ${SUBDIRS} ${TIT} ${MISC-DIC} leim-list.el +all: ${BUILT-EMACS} ${SUBDIRS} ${WORLD} leim-list.el # To ensure that we can run Emacs. This target is ignored (never # being hit) if a user changes default value of EMACS. @@ -226,12 +226,17 @@ install: all -chmod -R a+r ${INSTALLDIR} clean mostlyclean: - rm -f ${TIT} ${NON-TIT} ${WORLD} ${TIT:.elc=.el} \ - ${MISC-DIC} ${MISC-DIC:.elc=.el} leim-list.el + rm -f ${TIT} ${TIT:.elc=.el} ${MISC-DIC} ${MISC-DIC:.elc=.el} \ + leim-list.el -distclean maintainer-clean: +distclean: clean if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi rm -f Makefile -extraclean: distclean +maintainer-clean: distclean + rm -f ${WORLD} + +extraclean: maintainer-clean -rm -f *~ \#* m/?*~ s/?*~ + +# arch-tag: f666a939-8145-4d64-a6a6-cc1f61bd32ca diff --git a/leim/ja-dic/ja-dic.el b/leim/ja-dic/ja-dic.el index 7cfbacdac7..434924a2bd 100644 --- a/leim/ja-dic/ja-dic.el +++ b/leim/ja-dic/ja-dic.el @@ -54582,4 +54582,5 @@ ;; (provide 'ja-dic) +;;; arch-tag: 18f1f3f5-d706-4c5d-bdac-a6a762de287d ;;; ja-dic.el ends here diff --git a/leim/makefile.nt b/leim/makefile.nt index 4785f31ca3..41dc8e2030 100644 --- a/leim/makefile.nt +++ b/leim/makefile.nt @@ -132,7 +132,7 @@ WORLD=$(ASIA) $(EUROPEAN) $(MISC) TIT=$(CHINESE_TIT) NON_TIT=$(CHINESE_NON_TIT) $(JAPANESE) $(KOREAN) $(EUROPEAN) $(MISC) -all: $(BUILT_EMACS) $(SUBDIRS) $(TIT) $(MISC_DIC) leim-list.el +all: $(BUILT_EMACS) $(SUBDIRS) $(WORLD) leim-list.el # To ensure that we can run Emacs. This target is ignored (never # being hit) if a user changes default value of EMACS. @@ -196,9 +196,13 @@ clean mostlyclean: for %%f in ($(TIT_EL:/=\)) do $(DEL) %%f for %%f in ($(MISC_DIC:/=\)) do $(DEL) %%f for %%f in ($(MISC_DIC_EL:/=\)) do $(DEL) %%f - for %%f in ($(WORLD:/=\)) do $(DEL) %%f $(DEL) leim-list.el -distclean maintainer-clean: +distclean: clean if exist stamp-subdir $(DELTREE) $(SUBDIRS) $(DEL) stamp-subdir + +maintainer-clean: distclean + for %%f in ($(WORLD:/=\)) do $(DEL) %%f + +# arch-tag: cded53b4-4803-496b-8c05-7daff80e5b3b diff --git a/leim/makefile.w32-in b/leim/makefile.w32-in index 0c338d19c1..bb4461c810 100644 --- a/leim/makefile.w32-in +++ b/leim/makefile.w32-in @@ -142,7 +142,7 @@ NON_TIT=$(CHINESE_NON_TIT) $(JAPANESE) $(KOREAN) $(EUROPEAN) $(MISC) .el.elc: $(RUN_EMACS) -f batch-byte-compile $< -all: $(BUILT_EMACS) $(SUBDIRS) $(TIT) $(MISC_DIC) leim-list.el +all: $(BUILT_EMACS) $(SUBDIRS) $(WORLD) leim-list.el # To ensure that we can run Emacs. This target is ignored (never # being hit) if a user changes default value of EMACS. @@ -192,12 +192,16 @@ install: all clean mostlyclean: - $(FOREACH) $(TIT) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) - - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) - $(FOREACH) $(MISC_DIC) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) - $(FOREACH) $(TIT:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) - $(FOREACH) $(MISC_DIC:.elc=.el) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) - $(DEL) leim-list.el -distclean maintainer-clean: - if exist stamp-subdir $(DELTREE) $(SUBDIRS) +distclean clean: + - $(DELTREE) $(SUBDIRS) - $(DEL) stamp-subdir + +maintainer-clean: distclean + - $(FOREACH) $(WORLD) $(FORDO) $(DEL) $(FORVAR) $(ENDFOR) + +# arch-tag: 08250c45-fa9c-4f39-a175-a0c5c36dd67b diff --git a/leim/quail/croatian.el b/leim/quail/croatian.el index ca41673729..c6b440676f 100644 --- a/leim/quail/croatian.el +++ b/leim/quail/croatian.el @@ -194,3 +194,5 @@ dd -> ("dd" ?ð) ("DD" ?Ð) ("Dd" ?Ð)) + +;;; arch-tag: 8cb44078-9c51-4e81-9ef8-7d5b89f62e31 diff --git a/leim/quail/cyril-jis.el b/leim/quail/cyril-jis.el index 56ddee6e28..ef35ce50c4 100644 --- a/leim/quail/cyril-jis.el +++ b/leim/quail/cyril-jis.el @@ -141,4 +141,5 @@ ;; coding: iso-2022-7bit ;; End: +;;; arch-tag: 3a0cc2ac-de48-42fe-9e80-05d8aa6faa36 ;;; cyril-jis.el ends here diff --git a/leim/quail/cyrillic.el b/leim/quail/cyrillic.el index 47a6352bcc..b805ac9fd9 100644 --- a/leim/quail/cyrillic.el +++ b/leim/quail/cyrillic.el @@ -52,8 +52,8 @@ nil t t t t nil nil nil nil nil t) ;; 1! 2" 3' 4* 5: 6, 7. 8; 9( 0) -_ =+ ,L!(B -;; ,L9(B ,LF(B ,LC(B ,L:(B ,L5(B ,L=(B ,L3(B ,LH(B ,LI(B ,L7(B ,LE(B ,Lj(B -;; ,LD(B ,LK(B ,L2(B ,L0(B ,L?(B ,L@(B ,L>(B ,L;(B ,L4(B ,L6(B ,LM(B +;; ,L9(B ,LF(B ,LC(B ,L:(B ,L5(B ,L=(B ,L3(B ,LH(B ,LI(B ,L7(B ,LE(B ,LJ(B +;; ,LD(B ,LK(B ,L2(B ,L0(B ,L?(B ,L@(B ,L>(B ,L;(B ,L4(B ,L6(B ,LM(B ;; ,LO(B ,LG(B ,LA(B ,L<(B ,L8(B ,LB(B ,LL(B ,L1(B ,LN(B /? (quail-define-rules @@ -174,8 +174,8 @@ nil t t t t nil nil nil nil nil t) ;; 1! 2" 3,Lp(B 4; 5% 6: 7? 8* 9( 0) -_ =+ ,Lq!(B -;; ,L9(B ,LF(B ,LC(B ,L:(B ,L5(B ,L=(B ,L3(B ,LH(B ,LI(B ,L7(B ,LE(B ,Lj(B -;; ,LD(B ,LK(B ,L2(B ,L0(B ,L?(B ,L@(B ,L>(B ,L;(B ,L4(B ,L6(B ,LM(B +;; ,L9(B ,LF(B ,LC(B ,L:(B ,L5(B ,L=(B ,L3(B ,LH(B ,LI(B ,L7(B ,LE(B ,LJ(B +;; ,LD(B ,LK(B ,L2(B ,L0(B ,L?(B ,L@(B ,L>(B ,L;(B ,L4(B ,L6(B ,LM(B ;; ,LO(B ,LG(B ,LA(B ,L<(B ,L8(B ,LB(B ,LL(B ,L1(B ,LN(B ., (quail-define-rules @@ -999,8 +999,8 @@ as follows. (quail-define-package "cyrillic-translit" "Cyrillic" ",L6(Bt" nil "Intuitively transliterated keyboard layout. -Most convenient for entering Russian but all Cyrillic characters are included. -Should handle most cases. However: +Most convenient for entering Russian, but all Cyrillic characters +are included. Should handle most cases. However: for ,Lf(B (TSE) use \"c\", never \"ts\" ,Li(B (SHCHA = Bulgarian SHT) = \"shch\", \"sj\", \"/sht\" or \"/t\", ,Lm(B (REVERSE ROUNDED E) = \"e'\" or \"e`\" @@ -1072,8 +1072,8 @@ Unicode based." nil t t t t nil nil nil nil nil t) ;; $,1(q(!(B 1! 2" 3N 4; 5% 6: 7? 8* 9( 0) -_ =+ -;; $,1(9(B $,1(F(B $,1(C(B $,1(:(B $,1(5(B $,1(=(B $,1(3(B $,1(H(B $,1(.(B $,1(7(B $,1(E(B ' -;; $,1(D(B $,1(K(B $,1(2(B $,1(0(B $,1(?(B $,1(@(B $,1(>(B $,1(;(B $,1(4(B $,1(6(B $,1(M(B +;; $,1(9(B $,1(F(B $,1(C(B $,1(:(B $,1(5(B $,1(=(B $,1(3(B $,1(H(B $,1(.(B $,1(7(B $,1(E(B ' +;; $,1(D(B $,1(K(B $,1(2(B $,1(0(B $,1(?(B $,1(@(B $,1(>(B $,1(;(B $,1(4(B $,1(6(B $,1(M(B ;; $,1(O(B $,1(G(B $,1(A(B $,1(<(B $,1(&(B $,1(B(B $,1(L(B $,1(1(B $,1(N(B ., (quail-define-rules @@ -1169,12 +1169,15 @@ Unicode based." The layout is similar to `cyrillic-translit', but all Bulgarian characters are typed with a single key. -Use /& for ,A'(B (Cyrillic paragraph) and /# for $,1uV(B." +Use /& for ,A'(B (Cyrillic paragraph) and /# for $,1uV(B. + +The letters $,1(G(B, $,1(H(B, $,1(I(B and $,1(N(B are not affected by Caps Lock." nil t t t t nil nil nil nil nil t) -;; $,1(O(B $,1(2(B $,1(5(B $,1(@(B $,1(B(B $,1(J(B $,1(C(B $,1(8(B $,1(>(B $,1(?(B $,1(H(B $,1(I(B -;; $,1(0(B $,1(A(B $,1(4(B $,1(D(B $,1(3(B $,1(E(B $,1(9(B $,1(:(B $,1(;(B $,1(G(B -;; $,1(N(B $,1(7(B $,1(L(B $,1(F(B $,1(6(B $,1(1(B $,1(=(B $,1(<(B +;; $,1(G(B +;; $,1(O(B $,1(2(B $,1(5(B $,1(@(B $,1(B(B $,1(J(B $,1(C(B $,1(8(B $,1(>(B $,1(?(B $,1(H(B $,1(I(B +;; $,1(0(B $,1(A(B $,1(4(B $,1(D(B $,1(3(B $,1(E(B $,1(9(B $,1(:(B $,1(;(B $,1(N(B +;; $,1(7(B $,1(L(B $,1(F(B $,1(6(B $,1(1(B $,1(=(B $,1(<(B (quail-define-rules ("/&" ?,A'(B) @@ -1238,7 +1241,6 @@ Use /& for ,A'(B (Cyrillic paragraph) and /# for $,1uV(B." ("y" ?$,1(j(B) ("x" ?$,1(l(B) ("\\" ?$,1(n(B) - ("|" ?$,1(N(B) ("q" ?$,1(o(B)) ;; Based on an implementation by Ognyan Kulev . @@ -1248,36 +1250,34 @@ Use /& for ,A'(B (Cyrillic paragraph) and /# for $,1uV(B." "bulgarian-bds" "Bulgarian" "$,1(1(4(A(B" nil "Bulgarian standard keyboard layout (BDS) -This keyboard layout is standard for Bulgarian typewriters." +This keyboard layout is standard for Bulgarian typewriters. + +The letters $,1(F(B, $,1(<(B, $,1(G(B, $,1(@(B, $,1(;(B, $,1(1(B and $,1(K(B are not affected by Caps Lock. + +In addition to original Bulgarian typewriter layout, keys \\ and | +are transformed into ' and $,1(K(B respectively. Some keyboards mark these +keys as being transformed into ( and ) respectively. For ( and ), use +` and ~ respectively. This input method follows XKB." nil t t t t nil nil nil nil nil t) -;; 1! 2? 3+ 4" 5% 6= 7: 8/ 9_ 0$,1uV(B -I .V -;; ,$,1(k(B $,1(C(B $,1(5(B $,1(8(B $,1(H(B $,1(I(B $,1(:(B $,1(A(B $,1(4(B $,1(7(B $,1(F(B ;,A'(B -;; $,1(l(B $,1(O(B $,1(0(B $,1(>(B $,1(6(B $,1(3(B $,1(B(B $,1(=(B $,1(2(B $,1(<(B $,1(G(B () -;; $,1(N(B $,1(9(B $,1(J(B $,1(M(B $,1(D(B $,1(E(B $,1(?(B $,1(@(B $,1(;(B $,1(1(B +;; () 1! 2? 3+ 4" 5% 6= 7: 8/ 9_ 0$,1uV(B -I .V +;; ,$,1(k(B $,1(C(B $,1(5(B $,1(8(B $,1(H(B $,1(I(B $,1(:(B $,1(A(B $,1(4(B $,1(7(B $,1(F(B ;,A'(B +;; $,1(L(B $,1(O(B $,1(0(B $,1(>(B $,1(6(B $,1(3(B $,1(B(B $,1(=(B $,1(2(B $,1(<(B $,1(G(B '$,1(K(B +;; $,1(N(B $,1(9(B $,1(J(B $,1(M(B $,1(D(B $,1(E(B $,1(?(B $,1(@(B $,1(;(B $,1(1(B (quail-define-rules ("1" ?1) ("!" ?!) - ("2" ?2) - ("@" ??) - ("3" ?3) - ("#" ?+) - ("4" ?4) - ("$" ?\") + ("2" ?2) ("@" ??) + ("3" ?3) ("#" ?+) + ("4" ?4) ("$" ?\") ("5" ?5) ("%" ?%) - ("6" ?6) - ("^" ?=) - ("7" ?7) - ("&" ?:) - ("8" ?8) - ("*" ?/) - ("9" ?9) - ("(" ?_) - ("0" ?0) - (")" ?$,1uV(B) - ("-" ?-) - ("_" ?I) + ("6" ?6) ("^" ?=) + ("7" ?7) ("&" ?:) + ("8" ?8) ("*" ?/) + ("9" ?9) ("(" ?_) + ("0" ?0) (")" ?$,1uV(B) + ("-" ?-) ("_" ?I) ("=" ?.) ("+" ?V) ("q" ?,) ("Q" ?$,1(k(B) @@ -1291,8 +1291,7 @@ This keyboard layout is standard for Bulgarian typewriters." ("o" ?$,1(T(B) ("O" ?$,1(4(B) ("p" ?$,1(W(B) ("P" ?$,1(7(B) ("[" ?$,1(f(B) ("{" ?$,1(F(B) - ("]" ?\;) - ("}" ?,A'(B) ;; not in XKB's bg + ("]" ?\;) ("}" ?,A'(B) ("a" ?$,1(l(B) ("A" ?$,1(L(B) ("s" ?$,1(o(B) ("S" ?$,1(O(B) @@ -1323,4 +1322,5 @@ This keyboard layout is standard for Bulgarian typewriters." ;; coding: iso-2022-7bit ;; End: +;;; arch-tag: e6d34b16-8710-4181-a17e-819a1df0334f ;;; cyrillic.el ends here diff --git a/leim/quail/czech.el b/leim/quail/czech.el index 20559e0fa2..04d94d12b6 100644 --- a/leim/quail/czech.el +++ b/leim/quail/czech.el @@ -567,4 +567,5 @@ All other keys are the same as on standard US keyboard." ([kp-0] ?0) ([kp-add] ?+)) +;;; arch-tag: 0a27dffc-a5e1-479f-9da2-a9eb91b34d8a ;;; czech.el ends here diff --git a/leim/quail/ethiopic.el b/leim/quail/ethiopic.el index 8cda85ea88..83d4a94cf4 100644 --- a/leim/quail/ethiopic.el +++ b/leim/quail/ethiopic.el @@ -1146,4 +1146,5 @@ C-' or `M-x ethio-gemination' (if (ethio-prefer-amharic-p) ?$(3"c(B ?$(3"f(B) "ethiopic")) +;;; arch-tag: 66c182a8-d802-40fa-9c0d-d8ebe2f909d5 ;;; ethiopic.el ends here diff --git a/leim/quail/georgian.el b/leim/quail/georgian.el index c10aaa368e..d823b2c4cd 100644 --- a/leim/quail/georgian.el +++ b/leim/quail/georgian.el @@ -82,4 +82,5 @@ ("e1" ?) ;; Letter not in Unicode (private use code). ) +;;; arch-tag: 7b26f205-7091-435e-a2cf-8778f899dc8a ;;; georgian.el ends here diff --git a/leim/quail/greek.el b/leim/quail/greek.el index d81aa7cf8c..a0c75df5d4 100644 --- a/leim/quail/greek.el +++ b/leim/quail/greek.el @@ -1314,4 +1314,5 @@ e.g. ("y;:" ?,F`(B)) +;;; arch-tag: 2a37e042-db1b-4ecf-b755-117775a3c150 ;;; greek.el ends here diff --git a/leim/quail/hangul.el b/leim/quail/hangul.el index 6cd15cccd6..4d1b10e28b 100644 --- a/leim/quail/hangul.el +++ b/leim/quail/hangul.el @@ -2603,4 +2603,5 @@ For instance, typing \"S\" followed by TAB will tell you ("SC/" ?$(C!K(B) ("SF" ?$(C"5(B)) +;;; arch-tag: 26bc93fc-64ee-4fb1-b26d-22220d132dbe ;;; hangul.el ends here diff --git a/leim/quail/hangul3.el b/leim/quail/hangul3.el index a91c2ef219..f4d31c4701 100644 --- a/leim/quail/hangul3.el +++ b/leim/quail/hangul3.el @@ -3567,4 +3567,5 @@ ("mdq" ?$(CH}(B) ("mda" ?$(CH~(B)) +;;; arch-tag: 20ea2223-ab47-414f-8e28-d03dc83617b7 ;;; hangul3.el ends here diff --git a/leim/quail/hanja-jis.el b/leim/quail/hanja-jis.el index a7fddef9fb..1a55fbb0a6 100644 --- a/leim/quail/hanja-jis.el +++ b/leim/quail/hanja-jis.el @@ -524,4 +524,5 @@ ("glf" "$B5Merk#pvs\(B") ("unknown" "$B4#<5DNFJFdFuJ=KsL]QeRIRpS&S9SuS{T*T+T8T:T>TBTCTKTNTQTWT\T_UNU~V&V,V-V.V/V0V2V4V8VNW;WjWnWpY0YKY^Z1Zs[=[b[n\)\-\.\/\0\1\O\S\j\n\o\p\q\x]&]6]B]i^<^L^c_&_1`b,Hu(B ?. +;; 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ ;~ +;; /Q 'W ,Hw(BE ,Hx(BR ,H`(BT ,Hh(BY ,He(BU ,Ho(BI ,Hm(BO ,Ht(BP [{ ]} +;; ,Hy(BA ,Hc(BS ,Hb(BD ,Hk(BF ,Hr(BG ,Hi(BH ,Hg(BJ ,Hl(BK ,Hj(BL ,Hs(B: ," \| +;; ,Hf(BZ ,Hq(BX ,Ha(BC ,Hd(BV ,Hp(BB ,Hn(BN ,Hv(BM ,Hz(B< ,Hu(B> .? ;; (quail-define-rules @@ -75,4 +75,5 @@ Hebrew letters are assigned to lowercases. ("/" ?.) ("'" ?,)) +;;; arch-tag: 771b887d-15af-4a4d-b4ce-a4a86f5ca0cf ;;; hebrew.el ends here diff --git a/leim/quail/indian.el b/leim/quail/indian.el index 4ad2308ef9..b095e4b863 100644 --- a/leim/quail/indian.el +++ b/leim/quail/indian.el @@ -273,4 +273,5 @@ "tamil-inscript" "Tamil" "TmlIS" "Tamil keyboard Inscript.") +;;; arch-tag: 9e5a621e-f7d5-4fce-9543-0a51b407c940 ;;; indian.el ends here diff --git a/leim/quail/ipa.el b/leim/quail/ipa.el index 99e1d67de7..759393b077 100644 --- a/leim/quail/ipa.el +++ b/leim/quail/ipa.el @@ -108,4 +108,5 @@ Upside-down characters are obtained by a preceding slash (/)." ("`" ?,0q(B) (":" ?,0r(B)) +;;; arch-tag: cf2614cc-ecce-4ef5-ba51-37faeed41691 ;;; ipa.el ends here diff --git a/leim/quail/japanese.el b/leim/quail/japanese.el index e859c63bdc..5713ef75c9 100644 --- a/leim/quail/japanese.el +++ b/leim/quail/japanese.el @@ -543,4 +543,5 @@ qq: toggle between this input method and the input method `japanese-ascii'. (vector (japanese-katakana (aref trans 0)))) (t trans))))) +;;; arch-tag: 47e0bfd4-6ecc-4d01-89a8-d687c5e01ff7 ;;; japanese.el ends here diff --git a/leim/quail/lao.el b/leim/quail/lao.el index 9367569c49..003cbb43be 100644 --- a/leim/quail/lao.el +++ b/leim/quail/lao.el @@ -197,4 +197,5 @@ (v-state (lao-vowel-key-alist . t-state)) (t-state lao-tone-key-alist)))) +;;; arch-tag: 23863a30-a8bf-402c-b7ce-c517a7aa8570 ;;; lao.el ends here diff --git a/leim/quail/latin-alt.el b/leim/quail/latin-alt.el index 87c961e03c..f5831e51c6 100644 --- a/leim/quail/latin-alt.el +++ b/leim/quail/latin-alt.el @@ -2041,4 +2041,5 @@ Doubling the postfix separates the letter and postfix: e.g. a'' -> a' ("z~~" ["z~"]) ) +;;; arch-tag: 722466a6-363d-431c-9161-879e16e2da5d ;;; latin-alt.el ends here diff --git a/leim/quail/latin-ltx.el b/leim/quail/latin-ltx.el index afb6810862..9eb7a0b7dc 100644 --- a/leim/quail/latin-ltx.el +++ b/leim/quail/latin-ltx.el @@ -679,6 +679,7 @@ system, including many technical ones. Examples: ("\\lesssim" ?$,1y2(B) ("\\lfloor" ?$,1zj(B) ("\\lhd" ?$,2"!(B) + ("\\rhd" ?$,2!w(B) ("\\ll" ?$,1y*(B) ("\\llcorner" ?$,1z~(B) ("\\lnapprox" ?$,1zF(B) @@ -940,6 +941,16 @@ system, including many technical ones. Examples: ;; by analogy with lq, rq: ("\\ldq" ?\$,1r|(B) ("\\rdq" ?\$,1r}(B) -) - + ("\\minus" ?$,1x2(B) + ("\\defs" ?$,1xy(B) ; per fuzz/zed +;; ("\\sqrt[3]" ?$,1x;(B) + ("\\llbracket" ?\$,2=Z(B) ; stmaryrd + ("\\rrbracket" ?\$,2=[(B) +;; ("\\lbag" ?\$,2=Z(B) ; fuzz +;; ("\\rbag" ?\$,2=[(B) + ("\\ldata" ?\$,2=J(B) ; fuzz/zed + ("\\rdata" ?\$,2=K(B) + ) + +;;; arch-tag: 3daae613-2c53-446e-a0a1-ee2e1ebed15f ;;; latin-ltx.el ends here diff --git a/leim/quail/latin-post.el b/leim/quail/latin-post.el index 7859d11f28..98e4f19516 100644 --- a/leim/quail/latin-post.el +++ b/leim/quail/latin-post.el @@ -2482,4 +2482,5 @@ Doubling the postfix separates the letter and postfix: e.g. a'' -> a' ("s<" ?Å¡) ("z<" ?ž)) +;;; arch-tag: 170180fb-9617-4d58-9d51-65ca23c05d94 ;;; latin-post.el ends here diff --git a/leim/quail/latin-pre.el b/leim/quail/latin-pre.el index 023dbd4446..d542cbec0b 100644 --- a/leim/quail/latin-pre.el +++ b/leim/quail/latin-pre.el @@ -260,7 +260,7 @@ Key translation rules are: acute | ' | 'e -> é grave | ` | `a -> à circumflex | ^ | ^a -> â - diaeresis | \" | \"i -> ï + diaeresis | \" | \"i -> ï cedilla | ~ or , | ~c -> ç ,c -> ç symbol | ~ | ~> -> » ~< -> « " nil t nil nil nil nil nil nil nil nil t) @@ -351,7 +351,7 @@ Key translation rules are: "german-prefix" "German" "DE>" t "German (Deutsch) input method with prefix modifiers Key translation rules are: - \"A -> Ä -> \"O -> Ö \"U -> Ü \"s -> ?ß + \"A -> Ä -> \"O -> Ö \"U -> Ü \"s -> ß " nil t nil nil nil nil nil nil nil nil t) (quail-define-rules @@ -1183,4 +1183,6 @@ of characters from a single Latin-N charset. ("~|" ?¦) ("~~" ?¸) ) + +;;; arch-tag: 83017837-6b84-4366-b183-e0577e3ed838 ;;; latin-pre.el ends here diff --git a/leim/quail/lrt.el b/leim/quail/lrt.el index e12219f83f..2a6784abc6 100644 --- a/leim/quail/lrt.el +++ b/leim/quail/lrt.el @@ -76,4 +76,5 @@ lao-transcription-tone-alist) (t-state lao-transcription-tone-alist)))) +;;; arch-tag: f65e4038-e187-4906-997b-d2de7ed813d2 ;;; lrt.el ends here diff --git a/leim/quail/py-punct.el b/leim/quail/py-punct.el index 9d07bfb640..53dc296713 100644 --- a/leim/quail/py-punct.el +++ b/leim/quail/py-punct.el @@ -74,4 +74,5 @@ For instance, typing `v' and `%' insert `$A#%(B'. (quail-defrule "v" (nth 2 (assoc "chinese-punct" quail-package-alist))) +;;; arch-tag: 941fd2ac-2d26-4b0e-8458-b5e485c5aa7d ;;; py-punct.el ends here diff --git a/leim/quail/pypunct-b5.el b/leim/quail/pypunct-b5.el index 0b7d55ac19..7c7bc550d8 100644 --- a/leim/quail/pypunct-b5.el +++ b/leim/quail/pypunct-b5.el @@ -53,4 +53,5 @@ For instance, typing `v' and `%' insert `$(0"h(B'. (quail-defrule "v" (nth 2 (assoc "chinese-punct-b5" quail-package-alist))) +;;; arch-tag: fe8176d3-b467-47d5-9ed9-75b6e27cf29b ;;; pypunct-b5.el ends here diff --git a/leim/quail/rfc1345.el b/leim/quail/rfc1345.el index dd8280b90f3fa5b1dc93c35b151eeaf2f6382334..87c62b2c65dc5808da5cd032a8049ad2fd16481b 100644 GIT binary patch delta 60 zcmccmow4Hwj_ QX~`z3rUpincUMaR0Hp#G@Bjb+ delta 13 VcmeD9!FcsM á" ("‌" ?\‌) ;; ZERO WIDTH NON-JOINER ) +;;; arch-tag: ad2a65ea-f903-423b-b3bd-08d0912ae41f ;;; sgml-input.el ends here diff --git a/leim/quail/slovak.el b/leim/quail/slovak.el index ff3457f3d2..372f953e8d 100644 --- a/leim/quail/slovak.el +++ b/leim/quail/slovak.el @@ -478,4 +478,5 @@ All other keys are the same as on standard US keyboard." ([kp-0] ?0) ([kp-add] ?+)) +;;; arch-tag: 8aedb992-e191-4eec-ad0d-71a352e02a3d ;;; slovak.el ends here diff --git a/leim/quail/symbol-ksc.el b/leim/quail/symbol-ksc.el index 7ff32def1d..7cfa4424f3 100644 --- a/leim/quail/symbol-ksc.el +++ b/leim/quail/symbol-ksc.el @@ -198,4 +198,5 @@ ("Russ" "$(C,",#,$,%,&,',(,),*,+,,,-,.,/,0,1,2,3,4,5,6,7,8,9,:,;,<,=,>,?,@,A(B") ("russ" "$(C,Q,R,S,T,U,V,W,X,Y,[,Z,\,],^,_,`,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q(B")) +;;; arch-tag: a77d89b9-9847-41d2-8e3a-7cce841ebb3b ;;; symbol-ksc.el ends here diff --git a/leim/quail/thai.el b/leim/quail/thai.el index a3fec13d1c..ee3e39bf9e 100644 --- a/leim/quail/thai.el +++ b/leim/quail/thai.el @@ -95,4 +95,5 @@ The difference from the ordinal Thai keyboard: ",T;(B" ",Th(B" ",T:(B" ",TO(B" ",Tm(B" ",TF(B" ",T%(B" 0 ; x .. DEL ]) +;;; arch-tag: fed6c468-0616-44b0-88bf-47347bf64825 ;;; thai.el ends here diff --git a/leim/quail/tibetan.el b/leim/quail/tibetan.el index eed2b70c69..3bc155cc65 100644 --- a/leim/quail/tibetan.el +++ b/leim/quail/tibetan.el @@ -450,4 +450,5 @@ (tibetan-vowel-tibkey-alist . m-state)) (m-state tibetan-modifier-tibkey-alist)))) +;;; arch-tag: 828fdb1a-733f-4c7b-b882-a19d2449ac99 ;;; tibetan.el ends here diff --git a/leim/quail/uni-input.el b/leim/quail/uni-input.el index 1881edf8c9..49a6f840cf 100644 --- a/leim/quail/uni-input.el +++ b/leim/quail/uni-input.el @@ -129,4 +129,5 @@ Input as Unicode: U or u, where is a four-digit hex number."))) (provide 'uni-input) +;;; arch-tag: e0d91c7c-19a1-43d3-8f2b-28c0e031efaa ;;; uni-input.el ends here diff --git a/leim/quail/viqr.el b/leim/quail/viqr.el index 6df2935984..95078394a9 100644 --- a/leim/quail/viqr.el +++ b/leim/quail/viqr.el @@ -68,4 +68,5 @@ (viet-quail-define-rules) +;;; arch-tag: d2c29221-5a2e-46b2-898b-0e56bc4eb858 ;;; viqr.el ends here diff --git a/leim/quail/vntelex.el b/leim/quail/vntelex.el index 9748e446b0..0447b19995 100644 --- a/leim/quail/vntelex.el +++ b/leim/quail/vntelex.el @@ -427,4 +427,5 @@ and postfix: Eee -> Ee, ajj -> aj, etc. ;; coding: iso-2022-7bit ;; End: +;;; arch-tag: 60db6880-0c9f-4456-b9fe-628de053a5ab ;;; vntelex.el ends here diff --git a/leim/quail/welsh.el b/leim/quail/welsh.el index d7807dc162..6491ee3402 100644 --- a/leim/quail/welsh.el +++ b/leim/quail/welsh.el @@ -200,4 +200,5 @@ ;; ("w\"" ?,A>(B)) +;;; arch-tag: aeef0eae-0a50-4606-9120-020d59d5e208 ;;; welsh.el ends here diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index e6b6b4c2ef..75b3be839e 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,103 @@ +2004-04-07 Stefan Monnier + + * make-docfile.c (xmalloc): Fix return type. + (put_filename): New fun. + (scan_file): Use it. + +2004-03-09 Juanma Barranquero + + * grep-changelog: Changes to support ChangeLog.10+. + (main): Tidy up usage string. Fix "Use of uninitialized value" + warning. Set version to 0.2. Parse the directory listing to get + any ChangeLog.n file, not just 1..9. + (header_match_p, entry_match_p, print_log, parse_changelog): + Remove Perl prototypes (their purpose is to help the parser, which + isn't needed here, not declare arguments). + (parse_changelog): Make --reverse faster on big batches by not + modifying the entries list. + +2004-03-01 Juanma Barranquero + + * makefile.w32-in (obj): Add fringe.c. + +2004-02-14 Paul Eggert + + * rcs2log: Work correctly if CVSROOT specifies :fork: or + :local: methods, or omits the colon between the hostname + and the path. Allow :/ in repository path, since CVS does. + Fix typo: "pository" should be set from $CVSROOT, not $repository. + This fixes a bug reported by Wolfgang Scherer in + , + along with some related bugs I discovered by inspecting how + CVS itself parses $CVSROOT. + +2004-02-04 J,bi(Br,bt(Bme Marant (tiny change) + + * emacsclient.c (decode_options): Fix handling of alternate editor. + +2004-01-27 Stefan Monnier + + * emacsclient.c (main): Don't use the hostname in the socket name. + Look for relative socket names in the /tmp dir rather than in cwd. + +2004-01-24 Richard M. Stallman + + * emacsclient.c (main): Restore errno from saved_errno, + so the error message comes from socket_status. + +2004-01-20 Stefan Monnier + + * emacsclient.c (main): Stop if socket name too long. + Only try su-fallback if the socket name was not explicit. + Check socket name length in su-fallback case as well. + +2004-01-08 Andreas Schwab + + * emacsclient.c (main): Save errno from socket_status. + +2004-01-04 Andreas Schwab + + * emacsclient.c (main): Fix socket name when using another user. + +2003-12-27 Paul Eggert + + * rcs2log (rlog_options): Append -rbranchtag if CVS/Tag indicates + a tag, and if the user has not specified an rlog option. + Adapted from a suggestion by Martin Stjernholm in + . + (Copyright): Update to 2003. + +2003-12-24 Thien-Thi Nguyen + + * make-docfile.c (main): For return code, no longer special-case VMS. + Instead, use `EXIT_SUCCESS' and `EXIT_FAILURE' from stdlib.h. + +2003-09-28 Andreas B,A|(Bsching (tiny change) + + * emacsclient.c (quote_file_name): Print the result instead of + returning it. Fix the return type accordingly. + (main): With --eval, if no file name, read from stdin. + Quote file names. + +2003-09-10 Richard M. Stallman + + * emacsclient.c (main): Use socket_name. + +2003-09-10 Andreas B,A|(Bsching (tiny change) + + * emacsclient.c (socket_name): New variable. + (longopts, decode_options, print_help_and_exit): + Handle --socket-name argument. + +2003-08-25 Takaaki Ota (tiny change) + + * etags.c (consider_token): Check C++ `operator' only when the + token len is long enough. + +2003-08-20 Dave Love + + * Makefile.in: Remove obsolete references to alloca. + 2003-07-29 Ken Brush * emacsclient.c (main) @@ -1554,7 +1654,7 @@ Now used as element of a linked list. (patterns, num_patterns): Global variables deleted. (p_head): New global variable. - (forced_lang): New global variable (replaces lang_func). + (forced_lang): New global variable (replaces lang_func). (get_language_from_name, get_language_from_interpreter) (get_language_from_suffix): Semantics changed. All callers changed. (last_node): New global variable. @@ -2818,7 +2918,7 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker * etags.c (lowcase): Use the standard tolower function. (substitute): Remove some wrong and some useless code related with - escape `\` character in regexp replacement string. + escape '\' character in regexp replacement string. (TEX_defenv): Added part, appendix, entry, index. Removed typeout. (lang_suffixes): New suffixes: .hpp for C++; .f90 for Fortran; .bib, .ltx, .TeX for TeX (.bbl, .dtx removed); .ml for Lisp; @@ -3839,7 +3939,7 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker 1994-02-17 Francesco Potorti` (pot@cnuce.cnr.it) - * etags.c (--absolute-pathnames): option removed. + * etags.c (--absolute-pathnames): Option removed. 1994-02-16 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -4300,8 +4400,8 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker 1993-05-30 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) - * Makefile.in: (${archlibdir}): Use `(cd foo && pwd)` instead of - `(cd foo ; pwd)` to get the canonical name of a directory; cd + * Makefile.in: (${archlibdir}): Use `(cd foo && pwd)' instead of + `(cd foo ; pwd)' to get the canonical name of a directory; cd might fail, and have pwd print out the current directory. * movemail.c [MAIL_USE_POP] (main): Don't use non-portable @@ -4986,7 +5086,7 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker * etags.c (C_entries): Process token before handling end of line. When inner loops reach end of line, just back up. Let the real end of line processing happen in just one place. - (consider_token): Likewise. + (consider_token): Likewise. 1991-04-11 Jim Blandy (jimb@geech.gnu.ai.mit.edu) @@ -5099,7 +5199,7 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker 1990-03-14 Joseph Arceneaux (jla@churchy.ai.mit.edu) - * etags.c (getit): Recognize '$' as beginning identifiers. + * etags.c (getit): Recognize '$' as beginning identifiers. 1990-02-22 David Lawrence (tale@pogo.ai.mit.edu) @@ -5430,7 +5530,10 @@ Tue Jul 1 01:09:07 1997 Geoff Voelker ;; coding: iso-2022-7bit ;; End: - Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002 + Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, + 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 2d979296-954c-448e-95c1-b46d134513dc diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 1554b34711..7868364148 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -27,7 +27,6 @@ SHELL = /bin/sh CC=@CC@ CFLAGS=@CFLAGS@ -ALLOCA=@ALLOCA@ version=@version@ configuration=@configuration@ EXEEXT=@EXEEXT@ @@ -145,12 +144,6 @@ MOVE_FLAGS= #define NOT_C_CODE #include "../src/config.h" -/* We won't really call alloca; - don't let the file name alloca.c get messed up. */ -#ifdef alloca -#undef alloca -#endif - /* Some machines don\'t find the standard C libraries in the usual place. */ #ifndef ORDINARY_LINK #ifndef LIB_STANDARD_LIBSRC @@ -389,14 +382,12 @@ test-distrib${EXEEXT}: ${srcdir}/test-distrib.c $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c ./test-distrib ${srcdir}/testfile -GETOPTOBJS = getopt.o getopt1.o $(ALLOCA) +GETOPTOBJS = getopt.o getopt1.o GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c -alloca.o: ${srcdir}/alloca.c - ${CC} -Demacs -c ${BASE_CFLAGS} ${srcdir}/alloca.c #ifdef REGEXP_IN_LIBC REGEXPOBJ = @@ -429,8 +420,8 @@ make-docfile${EXEEXT}: ${srcdir}/make-docfile.c ../src/config.h digest-doc${EXEEXT}: ${srcdir}/digest-doc.c $(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc -sorted-doc${EXEEXT}: ${srcdir}/sorted-doc.c ${ALLOCA} - $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc +sorted-doc${EXEEXT}: ${srcdir}/sorted-doc.c + $(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c $(LOADLIBES) -o sorted-doc b2m${EXEEXT}: ${srcdir}/b2m.c ../src/config.h $(GETOPTDEPS) $(CC) ${ALL_CFLAGS} ${srcdir}/b2m.c -DVERSION="\"${version}\"" \ @@ -487,3 +478,6 @@ xveterm${EXEEXT}: ${srcdir}/emacstool.c $(CC) -o xveterm -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c \ -lxview -lolgx -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \ $(LOADLIBES) + +/* arch-tag: cc40144d-fbd2-436b-9a22-dcb5b5b6a2af + (do not change this comment) */ diff --git a/lib-src/README b/lib-src/README index fa3074e518..4d29931a6e 100644 --- a/lib-src/README +++ b/lib-src/README @@ -1,3 +1,3 @@ This directory contains the source code for the architecture-dependent -files that go in ../arch-lib. At present, these are mostly utility +files that go in ${archlibdir}. At present, these are mostly utility programs used by Emacs. diff --git a/lib-src/b2m.c b/lib-src/b2m.c index 05caa1424e..5a1f9e8547 100644 --- a/lib-src/b2m.c +++ b/lib-src/b2m.c @@ -301,3 +301,5 @@ fatal (message) exit (BAD); } +/* arch-tag: 5a3ad2af-a802-408f-83cc-e7cf5e98653e + (do not change this comment) */ diff --git a/lib-src/b2m.pl b/lib-src/b2m.pl index 86f9b948b3..38eb96e076 100644 --- a/lib-src/b2m.pl +++ b/lib-src/b2m.pl @@ -30,7 +30,7 @@ use Mail::Address; use Date::Parse; my($whoami) = basename $0; -my($version) = '$Revision: 1.4 $'; +my($version) = '$Revision: 1.5 $'; my($usage) = "Usage: $whoami [--help] [--version] [--[no]full-headers] [Babyl-file] \tBy default, full headers are printed.\n"; @@ -152,3 +152,5 @@ while (<>) { } close(STDOUT) || die "$whoami: Error closing stdout: $!\n"; + +# arch-tag: 8c7c8ab0-721c-46d7-ba3e-139801240aa8 diff --git a/lib-src/cvtmail.c b/lib-src/cvtmail.c index 5a4d3c7095..28a4ae4c70 100644 --- a/lib-src/cvtmail.c +++ b/lib-src/cvtmail.c @@ -180,3 +180,6 @@ xrealloc (ptr, size) fatal ("virtual memory exhausted", 0); return result; } + +/* arch-tag: b93c25a9-9012-44f1-b78b-9cc7aed44a7a + (do not change this comment) */ diff --git a/lib-src/digest-doc.c b/lib-src/digest-doc.c index 24d1348b0e..09878543d4 100644 --- a/lib-src/digest-doc.c +++ b/lib-src/digest-doc.c @@ -65,3 +65,6 @@ main () } return 0; } + +/* arch-tag: 2ba2c9b0-4157-4eba-bd9f-967e3677e35f + (do not change this comment) */ diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 611c0f74c7..eeeb0eb3ef 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -3975,3 +3975,6 @@ main (argc, argv) /* ebrowse.c ends here. */ + +/* arch-tag: fc03b4bc-91a9-4c3d-b3b9-12a77fa86dd8 + (do not change this comment) */ diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index fc85ba6744..c8b2596198 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1,5 +1,5 @@ /* Client process that communicates with GNU Emacs acting as server. - Copyright (C) 1986, 1987, 1994, 1999, 2000, 2001, 2003 + Copyright (C) 1986, 1987, 1994, 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -67,6 +67,9 @@ char *display = NULL; is not running. --alternate-editor. */ const char * alternate_editor = NULL; +/* If non-NULL, the filename of the UNIX socket. */ +char *socket_name = NULL; + void print_help_and_exit (); struct option longopts[] = @@ -76,6 +79,7 @@ struct option longopts[] = { "help", no_argument, NULL, 'H' }, { "version", no_argument, NULL, 'V' }, { "alternate-editor", required_argument, NULL, 'a' }, + { "socket-name", required_argument, NULL, 's' }, { "display", required_argument, NULL, 'd' }, { 0, 0, 0, 0 } }; @@ -88,16 +92,16 @@ decode_options (argc, argv) int argc; char **argv; { + alternate_editor = getenv ("ALTERNATE_EDITOR"); + while (1) { int opt = getopt_long (argc, argv, - "VHnea:d:", longopts, 0); + "VHnea:s:d:", longopts, 0); if (opt == EOF) break; - alternate_editor = getenv ("ALTERNATE_EDITOR"); - switch (opt) { case 0: @@ -109,6 +113,10 @@ decode_options (argc, argv) alternate_editor = optarg; break; + case 's': + socket_name = optarg; + break; + case 'd': display = optarg; break; @@ -152,6 +160,8 @@ The following OPTIONS are accepted:\n\ -n, --no-wait Don't wait for the server to return\n\ -e, --eval Evaluate the FILE arguments as ELisp expressions\n\ -d, --display=DISPLAY Visit the file in the given display\n\ +-s, --socket-name=FILENAME\n\ + Set the filename of the UNIX socket for communication\n\ -a, --alternate-editor=EDITOR\n\ Editor to fallback to if the server is not running\n\ \n\ @@ -159,14 +169,14 @@ Report bugs to bug-gnu-emacs@gnu.org.\n", progname); exit (0); } -/* Return a copy of NAME, inserting a & - before each &, each space, each newline, and any initial -. - Change spaces to underscores, too, so that the +/* In NAME, insert a & before each &, each space, each newline, and + any initial -. Change spaces to underscores, too, so that the return value never contains a space. */ -char * -quote_file_name (name) +void +quote_file_name (name, stream) char *name; + FILE *stream; { char *copy = (char *) malloc (strlen (name) * 2 + 1); char *p, *q; @@ -196,7 +206,9 @@ quote_file_name (name) } *q++ = 0; - return copy; + fprintf (stream, copy); + + free (copy); } /* Like malloc but get fatal error if memory is exhausted. */ @@ -287,8 +299,6 @@ main (argc, argv) int argc; char **argv; { - char *system_name; - int system_name_length; int s, i, needlf = 0; FILE *out, *in; struct sockaddr_un server; @@ -300,7 +310,7 @@ main (argc, argv) /* Process options. */ decode_options (argc, argv); - if (argc - optind < 1) + if ((argc - optind < 1) && !eval) { fprintf (stderr, "%s: file name or argument required\n", progname); fprintf (stderr, "Try `%s --help' for more information\n", progname); @@ -321,37 +331,38 @@ main (argc, argv) server.sun_family = AF_UNIX; { - char *dot; - system_name_length = 32; + int sock_status = 0; + int default_sock = !socket_name; + int saved_errno; + char *server_name = "server"; + + if (socket_name && !index (socket_name, '/') && !index (socket_name, '\\')) + { /* socket_name is a file name component. */ + server_name = socket_name; + socket_name = NULL; + default_sock = 1; /* Try both UIDs. */ + } - while (1) + if (default_sock) { - system_name = (char *) xmalloc (system_name_length + 1); - - /* system_name must be null-terminated string. */ - system_name[system_name_length] = '\0'; - - if (gethostname (system_name, system_name_length) == 0) - break; - - free (system_name); - system_name_length *= 2; + socket_name = alloca (100 + strlen (server_name)); + sprintf (socket_name, "/tmp/emacs%d/%s", + (int) geteuid (), server_name); } - /* We always use the non-dotted host name, for simplicity. */ - dot = index (system_name, '.'); - if (dot) - *dot = '\0'; - } - - { - int sock_status = 0; - - sprintf (server.sun_path, "/tmp/emacs%d-%s/server", (int) geteuid (), system_name); + if (strlen (socket_name) < sizeof (server.sun_path)) + strcpy (server.sun_path, socket_name); + else + { + fprintf (stderr, "%s: socket-name %s too long", + argv[0], socket_name); + exit (1); + } /* See if the socket exists, and if it's owned by us. */ sock_status = socket_status (server.sun_path); - if (sock_status) + saved_errno = errno; + if (sock_status && default_sock) { /* Failing that, see if LOGNAME or USER exist and differ from our euid. If so, look for a socket based on the UID @@ -359,19 +370,35 @@ main (argc, argv) that init_editfns uses to set the global Vuser_full_name. */ char *user_name = (char *) getenv ("LOGNAME"); + if (!user_name) user_name = (char *) getenv ("USER"); if (user_name) { struct passwd *pw = getpwnam (user_name); + if (pw && (pw->pw_uid != geteuid ())) { /* We're running under su, apparently. */ - sprintf (server.sun_path, "/tmp/esrv%d-%s", - (int) pw->pw_uid, system_name); + socket_name = alloca (100 + strlen (server_name)); + sprintf (socket_name, "/tmp/emacs%d/%s", + (int) pw->pw_uid, server_name); + + if (strlen (socket_name) < sizeof (server.sun_path)) + strcpy (server.sun_path, socket_name); + else + { + fprintf (stderr, "%s: socket-name %s too long", + argv[0], socket_name); + exit (1); + } + sock_status = socket_status (server.sun_path); + saved_errno = errno; } + else + errno = saved_errno; } } @@ -389,14 +416,14 @@ main (argc, argv) case 2: /* `stat' failed */ - if (errno == ENOENT) + if (saved_errno == ENOENT) fprintf (stderr, "%s: can't find socket; have you started the server?\n\ To start the server in Emacs, type \"M-x server-start\".\n", argv[0]); else fprintf (stderr, "%s: can't stat %s: %s\n", - argv[0], server.sun_path, strerror (errno)); + argv[0], server.sun_path, strerror (saved_errno)); fail (argc, argv); break; } @@ -455,24 +482,47 @@ To start the server in Emacs, type \"M-x server-start\".\n", fprintf (out, "-eval "); if (display) - fprintf (out, "-display %s ", quote_file_name (display)); + { + fprintf (out, "-display "); + quote_file_name (display, out); + fprintf (out, " "); + } - for (i = optind; i < argc; i++) + if ((argc - optind > 0)) { - if (eval) - ; /* Don't prepend any cwd or anything like that. */ - else if (*argv[i] == '+') + for (i = optind; i < argc; i++) { - char *p = argv[i] + 1; - while (isdigit ((unsigned char) *p) || *p == ':') p++; - if (*p != 0) - fprintf (out, "%s/", quote_file_name (cwd)); + if (eval) + ; /* Don't prepend any cwd or anything like that. */ + else if (*argv[i] == '+') + { + char *p = argv[i] + 1; + while (isdigit ((unsigned char) *p) || *p == ':') p++; + if (*p != 0) + { + quote_file_name (cwd, out); + fprintf (out, "/"); + } + } + else if (*argv[i] != '/') + { + quote_file_name (cwd, out); + fprintf (out, "/"); + } + + quote_file_name (argv[i], out); + fprintf (out, " "); } - else if (*argv[i] != '/') - fprintf (out, "%s/", quote_file_name (cwd)); - - fprintf (out, "%s ", quote_file_name (argv[i])); } + else + { + while ((str = fgets (string, BUFSIZ, stdin))) + { + quote_file_name (str, out); + } + fprintf (out, " "); + } + fprintf (out, "\n"); fflush (out); @@ -519,3 +569,6 @@ strerror (errnum) } #endif /* ! HAVE_STRERROR */ + +/* arch-tag: f39bb9c4-73eb-477e-896d-50832e2ca9a7 + (do not change this comment) */ diff --git a/lib-src/emacstool.c b/lib-src/emacstool.c index dcbc20feee..f9185c21c0 100644 --- a/lib-src/emacstool.c +++ b/lib-src/emacstool.c @@ -498,3 +498,6 @@ int interpose_on_window (argc, argv) (tty_view, input_event_filter_function, NOTIFY_SAFE); } #endif XVIEW + +/* arch-tag: 7a2e7105-c059-418a-b3d9-5b5de96abb4e + (do not change this comment) */ diff --git a/lib-src/etags.c b/lib-src/etags.c index 9633cf37ad..e9fab1be3e 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -3116,7 +3116,7 @@ consider_token (str, len, c, c_extp, cblev, parlev, is_func_or_var) fvdef = vignore; return FALSE; } - if (strneq (str+len-10, "::operator", 10)) + if (len >= 10 && strneq (str+len-10, "::operator", 10)) { if (*c_extp & C_AUTO) /* automatic detection of C++ */ *c_extp = (*c_extp | C_PLPL) & ~C_AUTO; @@ -6785,3 +6785,6 @@ xrealloc (ptr, size) * c-font-lock-extra-types: ("FILE" "bool" "language" "linebuffer" "fdesc" "node" "regexp") * End: */ + +/* arch-tag: 8a9b748d-390c-4922-99db-2eeefa921051 + (do not change this comment) */ diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c index a4ac44cf96..944a728a28 100644 --- a/lib-src/fakemail.c +++ b/lib-src/fakemail.c @@ -750,3 +750,6 @@ main (argc, argv) #endif /* not MSDOS */ #endif /* not BSD 4.2 (or newer) */ + +/* arch-tag: acb0afa6-315a-4c5b-b9e3-def5725c8783 + (do not change this comment) */ diff --git a/lib-src/getopt.c b/lib-src/getopt.c index c17aecaefd..a4b0a65147 100644 --- a/lib-src/getopt.c +++ b/lib-src/getopt.c @@ -1283,3 +1283,6 @@ main (argc, argv) } #endif /* TEST */ + +/* arch-tag: 0e6da124-7269-4785-a9de-094c263d20dc + (do not change this comment) */ diff --git a/lib-src/getopt.h b/lib-src/getopt.h index 4d6adeea0d..0d4c40c52d 100644 --- a/lib-src/getopt.h +++ b/lib-src/getopt.h @@ -178,3 +178,6 @@ extern int _getopt_internal (); #undef __need_getopt #endif /* getopt.h */ + +/* arch-tag: 9adb7828-e6a6-40cd-8512-0cdf1f20ddd4 + (do not change this comment) */ diff --git a/lib-src/getopt1.c b/lib-src/getopt1.c index 60baeb8528..f08cd72638 100644 --- a/lib-src/getopt1.c +++ b/lib-src/getopt1.c @@ -194,3 +194,5 @@ main (argc, argv) #endif /* TEST */ +/* arch-tag: 28a5c558-b0c0-4bff-b5bc-e2e20291d4b6 + (do not change this comment) */ diff --git a/lib-src/grep-changelog b/lib-src/grep-changelog index 82a14efb38..38fce879c7 100755 --- a/lib-src/grep-changelog +++ b/lib-src/grep-changelog @@ -1,6 +1,6 @@ #! /usr/bin/perl -# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc. # # This file is part of GNU Emacs. # @@ -56,34 +56,36 @@ $result = 0 if $to_date && $to_date !~ /^\d\d\d\d-\d\d-\d\d$/; if ($result == 0 || $help) { print < 0) { - @ARGV = ("ChangeLog", map {"ChangeLog.$_"} reverse 1..9); + @ARGV = ("ChangeLog"); + + push @ARGV, + map {"ChangeLog.$_"} + sort {$b <=> $a} + map {/\.(\d+)$/; $1} + do { + opendir D, '.'; + grep /^ChangeLog\.\d+$/, readdir D; + }; + @ARGV = reverse @ARGV if $reverse; } @@ -241,4 +253,5 @@ while (defined (my $log = shift @ARGV)) { } +# arch-tag: 9e4f6749-e053-4bb7-b3ad-11947318418e # grep-changelog ends here. diff --git a/lib-src/hexl.c b/lib-src/hexl.c index cbab66a2a1..0cfb88445b 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c @@ -279,3 +279,6 @@ usage () fprintf (stderr, "usage: %s [-de] [-iso]\n", progname); exit (1); } + +/* arch-tag: 20e04fb7-926e-4e48-be86-64fe869ecdaa + (do not change this comment) */ diff --git a/lib-src/leditcfns.c b/lib-src/leditcfns.c index b8a7a6bfe1..239db1cd1f 100644 --- a/lib-src/leditcfns.c +++ b/lib-src/leditcfns.c @@ -16,3 +16,6 @@ set_proc_str(ptr) char *ptr; { else printf("string too long for set-proc-str: %s\n", ptr); } + +/* arch-tag: eb7ae804-0d6e-4077-ab42-7173821410c3 + (do not change this comment) */ diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index ed6dde3a0b..ba73f5800a 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -1,5 +1,5 @@ /* Generate doc-string file for GNU Emacs from source files. - Copyright (C) 1985, 86, 92, 93, 94, 97, 1999, 2000, 2001 + Copyright (C) 1985, 86, 92, 93, 94, 97, 1999, 2000, 01, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */ of GNU Emacs. .elc and .el and .c files are allowed. A .o file can also be specified; the .c file it was made from is used. This helps the makefile pass the correct list of files. + Option -d DIR means change to DIR before looking for files. The results, which go to standard output or to a file specified with -a or -o (-a to append, -o to start from nothing), @@ -104,11 +105,11 @@ fatal (s1, s2) /* Like malloc but get fatal error if memory is exhausted. */ -long * +void * xmalloc (size) unsigned int size; { - long *result = (long *) malloc (size); + void *result = (void *) malloc (size); if (result == NULL) fatal ("virtual memory exhausted", 0); return result; @@ -174,10 +175,23 @@ main (argc, argv) if (j == i) err_count += scan_file (argv[i]); } -#ifndef VMS - exit (err_count > 0); -#endif /* VMS */ - return err_count > 0; + return (err_count > 0 ? EXIT_FAILURE : EXIT_SUCCESS); +} + +/* Add a source file name boundary marker in the output file. */ +void +put_filename (filename) + char *filename; +{ + char *tmp = filename; + int len; + + while ((tmp = index (filename, '/'))) + filename = tmp + 1; + + putc (037, outfile); + putc ('S', outfile); + fprintf (outfile, "%s\n", filename); } /* Read file FILENAME and output its doc strings to outfile. */ @@ -188,6 +202,8 @@ scan_file (filename) char *filename; { int len = strlen (filename); + + put_filename (filename); if (len > 4 && !strcmp (filename + len - 4, ".elc")) return scan_lisp_file (filename, READ_BINARY); else if (len > 3 && !strcmp (filename + len - 3, ".el")) @@ -1185,3 +1201,6 @@ scan_lisp_file (filename, mode) fclose (infile); return 0; } + +/* arch-tag: f7203aaf-991a-4238-acb5-601db56f2894 + (do not change this comment) */ diff --git a/lib-src/makefile.nt b/lib-src/makefile.nt index d955321633..29282eea45 100644 --- a/lib-src/makefile.nt +++ b/lib-src/makefile.nt @@ -413,3 +413,5 @@ $(BLD)\timer.obj : \ $(BLD)\yow.obj : \ $(SRC)\yow.c \ $(EMACS_ROOT)\lib-src\..\src\paths.h + +# arch-tag: 59e1b54b-4cc2-4086-bb0b-ecfad4b683e9 diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index faab36e087..20cf472736 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -126,7 +126,7 @@ $(BLD)/ctags.$(O): ctags.c # # From ..\src\makefile.nt. # -obj = abbrev.c alloc.c alloca.c buffer.c bytecode.c callint.c callproc.c casefiddle.c casetab.c category.c ccl.c charset.c cm.c cmds.c coding.c data.c dired.c dispnew.c doc.c doprnt.c editfns.c emacs.c eval.c fileio.c filelock.c filemode.c floatfns.c fns.c fontset.c frame.c gmalloc.c indent.c insdel.c intervals.c keyboard.c keymap.c lastfile.c lread.c macros.c marker.c minibuf.c print.c process.c ralloc.c regex.c region-cache.c scroll.c search.c sound.c strftime.c syntax.c sysdep.c term.c termcap.c textprop.c tparam.c undo.c unexw32.c vm-limit.c w32.c w32console.c w32fns.c w32heap.c w32inevt.c w32menu.c w32proc.c w32reg.c w32select.c w32term.c w32xfns.c window.c xdisp.c xfaces.c xfaces.c +obj = abbrev.c alloc.c alloca.c buffer.c bytecode.c callint.c callproc.c casefiddle.c casetab.c category.c ccl.c charset.c cm.c cmds.c coding.c data.c dired.c dispnew.c doc.c doprnt.c editfns.c emacs.c eval.c fileio.c filelock.c filemode.c floatfns.c fns.c fontset.c frame.c fringe.c gmalloc.c indent.c insdel.c intervals.c keyboard.c keymap.c lastfile.c lread.c macros.c marker.c minibuf.c print.c process.c ralloc.c regex.c region-cache.c scroll.c search.c sound.c strftime.c syntax.c sysdep.c term.c termcap.c textprop.c tparam.c undo.c unexw32.c vm-limit.c w32.c w32console.c w32fns.c w32heap.c w32inevt.c w32menu.c w32proc.c w32reg.c w32select.c w32term.c w32xfns.c window.c xdisp.c xfaces.c xfaces.c # # These are the lisp files that are loaded up in loadup.el # @@ -422,3 +422,5 @@ $(BLD)/timer.$(O) : \ $(BLD)/yow.$(O) : \ $(SRC)/yow.c \ $(EMACS_ROOT)/lib-src/../src/paths.h + +# arch-tag: c051bc02-a6de-474b-889a-27f7b2fbbcea diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 89714a0742..2d0cd9043f 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -954,3 +954,6 @@ strerror (errnum) } #endif /* ! HAVE_STRERROR */ + +/* arch-tag: 1c323112-41fe-4fe5-8de9-494de631f73f + (do not change this comment) */ diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c index 31bf758197..261a6b4161 100644 --- a/lib-src/ntlib.c +++ b/lib-src/ntlib.c @@ -208,3 +208,6 @@ sys_chdir (const char * path) { return _chdir (path); } + +/* arch-tag: 7b63fb83-70ee-4124-8822-54e53e5d0773 + (do not change this comment) */ diff --git a/lib-src/ntlib.h b/lib-src/ntlib.h index e6bce58074..523e3d6fd4 100644 --- a/lib-src/ntlib.h +++ b/lib-src/ntlib.h @@ -114,3 +114,6 @@ int fchown (int fd, int uid, int gid); #undef _WINSOCK_H /* end of ntlib.h */ + +/* arch-tag: 93444f66-7b98-4aa5-a5cd-01444094af28 + (do not change this comment) */ diff --git a/lib-src/pop.c b/lib-src/pop.c index b51e82c82b..adf80c544b 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -1607,3 +1607,6 @@ find_crlf (in_string, len) } #endif /* MAIL_USE_POP */ + +/* arch-tag: ceb37041-b7ad-49a8-a63d-286618b8367d + (do not change this comment) */ diff --git a/lib-src/pop.h b/lib-src/pop.h index cfd333ccaf..8954e1d536 100644 --- a/lib-src/pop.h +++ b/lib-src/pop.h @@ -81,3 +81,6 @@ extern int pop_quit _ARGS((popserver server)); extern void pop_close _ARGS((popserver)); #undef _ARGS + +/* arch-tag: 76cc5f58-8e86-48fa-bc72-a7c6cb1c4f1c + (do not change this comment) */ diff --git a/lib-src/profile.c b/lib-src/profile.c index 9c43c16e77..ec77936f74 100644 --- a/lib-src/profile.c +++ b/lib-src/profile.c @@ -102,3 +102,6 @@ main () } exit (1); } + +/* arch-tag: 8db68f7e-2322-4944-a315-dba349bdbf39 + (do not change this comment) */ diff --git a/lib-src/rcs-checkin b/lib-src/rcs-checkin index 75616c3564..365050e958 100755 --- a/lib-src/rcs-checkin +++ b/lib-src/rcs-checkin @@ -115,3 +115,4 @@ $file" ci -d -q -u $owner -m"entered into RCS" "$file" || exit done +# arch-tag: 89c86949-ef04-4380-838b-bc1444dcb074 diff --git a/lib-src/rcs2log b/lib-src/rcs2log index a304df9adb..b7466b6c13 100755 --- a/lib-src/rcs2log +++ b/lib-src/rcs2log @@ -29,10 +29,10 @@ Options: Report bugs to .' -Id='$Id: rcs2log,v 1.49 2001/11/28 23:55:08 eggert Exp eggert $' +Id='$Id: rcs2log,v 1.52 2003/12/27 08:18:08 uid65632 Exp $' -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, +# 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -49,7 +49,7 @@ Id='$Id: rcs2log,v 1.49 2001/11/28 23:55:08 eggert Exp eggert $' # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -Copyright='Copyright (C) 2002 Free Software Foundation, Inc. +Copyright='Copyright (C) 2004 Free Software Foundation, Inc. This program comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of this program under the terms of the GNU General Public License. @@ -195,8 +195,9 @@ case $rlogfile in # If no rlog options are given, # log the revisions checked in since the first ChangeLog entry. - # Since ChangeLog is only by date, some of these revisions may be duplicates of - # what's already in ChangeLog; it's the user's responsibility to remove them. + # Since ChangeLog is only by date, some of these revisions may be + # duplicates of what's already in ChangeLog; it's the user's + # responsibility to remove them. case $rlog_options in '') if test -s "$changelog" @@ -250,18 +251,24 @@ case $rlogfile in rlog='cvs -q log' repository=`sed 1q &2 "$0: $CVSROOT: CVSROOT has multiple ':/'s" - exit 1;; - *:/*) + /* | :fork:* | :local:*) ;; + */*) # remote repository - pository=`expr "X$repository" : '.*:\(/.*\)'`;; - *) + pository=`expr "X$CVSROOT" : '[^/]*\(.*\)'`;; + esac + case $pository in + '') # local repository case $repository in /*) ;; - *) repository=${CVSROOT?}/$repository;; + *) + repository=${CVSROOT?}/$repository + case $repository in + :fork:* | :local:*) + repository=`expr "$repository" : ':[^:]*:\(.*\)'`;; + esac;; esac if test ! -d "$repository" then @@ -281,6 +288,21 @@ case $rlogfile in esac done + # If no rlog options are given, and if we are in a tagged CVS branch, + # log only the changes in that branch. + case $rlog_options in + '') + if test -f CVS/Tag + then + CVSTAG=`cat &2 "$0: invalid CVS/Tag"; exit 1;; + esac + fi;; + esac fi # Use $rlog's -zLT option, if $rlog supports it. @@ -729,3 +751,5 @@ exec rm -fr $logdir # Local Variables: # tab-width:4 # End: + +# arch-tag: cea067bd-a552-4254-ba17-078208933073 diff --git a/lib-src/sorted-doc.c b/lib-src/sorted-doc.c index 185295a929..05a3e69cc9 100644 --- a/lib-src/sorted-doc.c +++ b/lib-src/sorted-doc.c @@ -281,3 +281,6 @@ main () return 0; } + +/* arch-tag: ce28f204-1e70-4b34-8210-3d54a5662071 + (do not change this comment) */ diff --git a/lib-src/test-distrib.c b/lib-src/test-distrib.c index 973d110439..f7b3a8b800 100644 --- a/lib-src/test-distrib.c +++ b/lib-src/test-distrib.c @@ -105,3 +105,6 @@ have been corrupted in the files of Emacs, and it will not work.\n", #endif return (0); } + +/* arch-tag: 3a89005d-df98-4c32-aa9f-33570e16a26a + (do not change this comment) */ diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index af691d394a..74fa2b0692 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -528,3 +528,6 @@ unlock_file (filename, state) errno = saved_errno; return ret; } + +/* arch-tag: 2bf5c52e-4beb-463a-954e-c58b9c64736b + (do not change this comment) */ diff --git a/lib-src/vcdiff b/lib-src/vcdiff index 5fdc345eb9..9c513ac820 100755 --- a/lib-src/vcdiff +++ b/lib-src/vcdiff @@ -3,7 +3,7 @@ # Enhanced sccs diff utility for use with vc mode. # This version is more compatible with rcsdiff(1). # -# Copyright (C) 1992, 1993, 1995, 1997, 2001 +# Copyright (C) 1992, 1993, 1995, 1997, 2001, 2004 # Free Software Foundation, Inc. # # This file is part of GNU Emacs. @@ -23,8 +23,6 @@ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # -# $Id: vcdiff,v 1.6 1997/01/01 05:33:42 eggert Exp $ -# DIFF="diff" usage="$0: Usage: vcdiff [--brief] [-q] [-r] [-r] [diffopts] sccsfile..." @@ -111,3 +109,5 @@ do then status=$s fi done + +# arch-tag: 4344ba3a-bcbe-4f77-971c-f43c1606953a diff --git a/lib-src/yow.c b/lib-src/yow.c index 02bcc6642e..10f0fad1ce 100644 --- a/lib-src/yow.c +++ b/lib-src/yow.c @@ -178,3 +178,5 @@ yow (fp) printf("%s\n", buf); } +/* arch-tag: e40fc0df-bafb-4001-af24-5c883d1c685e + (do not change this comment) */ diff --git a/lisp/.gitignore b/lisp/.gitignore index b2fa7fa2a2..48c6dafa2e 100644 --- a/lisp/.gitignore +++ b/lisp/.gitignore @@ -5,3 +5,4 @@ elc.tar.gz cus-load.el finder-inf.el subdirs.el +loaddefs.el diff --git a/lisp/ChangeLog b/lisp/ChangeLog dissimilarity index 94% index b9b8390d04..8571f7edd1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,24506 +1,5789 @@ -2003-08-05 Kenichi Handa - - * international/code-pages.el: Don't require mule-diag. - - * international/mule-diag.el (non-iso-charset-alist): Add - autoload cookie. - - * language/devan-util.el (dev-glyph-order): Add an entry for the - glyph code #xC4. - -2003-08-03 Glenn Morris - - * calendar/calendar.el (diary-file, diary-file-name-prefix) - (european-calendar-style, diary-date-forms) - (calendar-day-name-array, calendar-month-name-array): Doc change. - (generate-calendar-month): Adapt for new behaviour of - `calendar-day-name' function. - (calendar-abbrev-length, calendar-day-abbrev-array) - (calendar-month-abbrev-array): New variables. - (calendar-abbrev-construct): New function. - (calendar-day-name, calendar-month-name): Use new abbrev arrays, - rather than fixing abbrevs at some width. Calling syntax change. - (calendar-make-alist): Use abbrev arrays. Calling syntax change. - (calendar-date-string): Adapt for new behaviours of - `calendar-day-name' and `calendar-month-name' functions. - - * calendar/diary-lib.el (list-diary-entries): Adapt for new - behaviour of `calendar-day-name' and `calendar-month-name' - functions. - (diary-name-pattern): Use abbrev arrays, rather than fixing - abbrevs at three chars. Calling syntax change. - (mark-diary-entries): Adapt for new behaviours of - `diary-name-pattern' and `calendar-make-alist' functions. - (fancy-diary-font-lock-keywords): Adapt for new behaviour of - `diary-name-pattern' function. - (font-lock-diary-date-forms): Use abbrev arrays, rather than - fixing abbrevs at three chars. Calling syntax change. - (cal-hebrew, cal-islam): Require when compiling. - (diary-font-lock-keywords): Adapt for new behaviour of - `font-lock-diary-date-forms' function. - - * calendar/cal-hebrew.el: Reposition some code so defined before used. - (calendar-hebrew-month-name-array-common-year) - (calendar-hebrew-month-name-array-leap-year): Add doc strings. - (list-hebrew-diary-entries): Adapt for new behaviours of - `calendar-day-name' and `add-to-diary-list' functions. - (mark-hebrew-diary-entries): Adapt for new behaviours of - `diary-name-pattern' and `calendar-make-alist' functions. - - * calendar/cal-islam.el (calendar-islamic-month-name-array): Add - doc string. - (list-islamic-diary-entries): Adapt for new behaviours of - `calendar-day-name' and `add-to-diary-list' functions. - (mark-islamic-diary-entries): Adapt for new behaviours of - `diary-name-pattern' and `calendar-make-alist' functions. - - * calendar/cal-menu.el (cal-menu-update): Adapt for new behaviour of - `calendar-month-name' function. - - * calendar/cal-coptic.el (coptic-name): defvar rather than defconst. - - * calendar/solar.el (solar-seasons-data): Move definition before use. - - * calendar/cal-tex.el (cal-tex-day-name-format): Doc fix. - (cal-tex-LaTeX-hourbox): Move definition before use. - - * calendar/cal-china.el, cal-hebrew.el, cal-islam.el, - cal-julian.el, cal-menu.el, cal-move.el, holidays.el, - lunar.el, solar.el - (displayed-month, displayed-year): Define for compiler. - -2003-08-03 Martin Stjernholm - - * progmodes/cc-mode.el (c-init-language-vars-for): Add argument - MODE. Renamed from c-init-c-language-vars'. - (c-initialize-cc-mode): Change accordingly. - (c-common-init): Ditto. - (c-mode): Ditto. - (c++-mode): Use function. - (objc-mode): Ditto. - (java-mode): Ditto. - (idl-mode): Ditto. - (pike-mode): Ditto. - (awk-mode): Ditto. - -2003-08-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-end-of-current-token): Return whether - or not the point moved. - - (c-search-decl-header-end): Don't trip up on operator identifiers - in C++ and operators like == in all languages. - - * progmodes/cc-engine.el (c-backward-to-decl-anchor): Detect - leading labels correctly. - -2003-08-02 Andreas Schwab - - * textmodes/ispell.el: Don't redo key bindings on loading, put - them only in loaddefs.el. - * bookmark.el: Likewise. - * dabbrev.el: Likewise. - * emerge.el: Likewise. - - * apropos.el (apropos-words-to-regexp): Only add `wild' if `words' - has more than one member. - - * progmodes/sh-script.el (sh-mode): Don't set mode-class property. - -2003-08-01 Vinicius Jose Latorre - - * lpr.el (printify-region): It was ending conversion before the - expected position. Reported by Keiichi Suzuki . - -2003-07-31 John Paul Wallington - - * net/browse-url.el (browse-url-epiphany): Doc fix. - -2003-07-30 Kenichi Handa - - * international/fontset.el (setup-default-fontset): Change - registry names of Akurti fonts. - -2003-07-29 Jesper Harder (tiny change) - - * comint.el (comint-read-noecho): Use `clear-string' instead of - `fillarray'. - -2003-07-29 Thomas W Murphy (tiny change) - - * outline.el (outline-mode-hook): Add defvar. - -2003-07-28 Nick Roberts - - * gdb-ui.el (gdb-setup-windows, gdb-restore-windows): Restore - assembler in source window if that is what has been selected. - (menu): Add gdb-restore-windows to menu. Make gdba - specific menus only visible from gdba. - -2003-07-28 Tak Ota (tiny change) - - * progmodes/compile.el (compilation-environment): New user variable. - (compile-internal): Respect it. - -2003-07-23 Masatake YAMATO - - * progmodes/gud.el (gdb-script-font-lock-keywords): - Put `font-lock-function-name-face' on a symbol which includes - `-' like `hook-run'. Put font-lock-variable-name-face - on a symbol starting with $. - -2003-07-27 Markus Rost - - * files.el (set-visited-file-name): Use truename for buffer-file-name. - -2003-07-26 Markus Rost - - * vc-hooks.el (vc-file-not-found-hook): Doc fix. - -2003-07-26 Andre Spiegel - - * vc-hooks.el (vc-default-registered, vc-make-version-backup): - Use with-no-warnings. - (vc-file-not-found-hook): Add this to find-file-not-found-functions, - rather than to find-file-not-found-hook, which doesn't exist. - -2003-07-26 Markus Rost - - * international/quail.el (quail-translate-key): Fix previous - change. - -2003-07-25 John Paul Wallington - - * server.el (server-start): Check `server-process' is non-nil - before killing it to avoid killing current buffer's process. - - * simple.el (choose-completion-string): Use `minibufferp'; - test `completion-reference-buffer' if `buffer' arg is nil. - (push-mark): Use `when' and `unless'. - (pop-mark): Use `when'. - - * mouse-sel.el (mouse-sel-get-selection-function): - Check `x-last-selected-text-primary'. Don't barf if it or - `x-last-selected-text' aren't bound. - -2003-07-25 Kevin Rodgers (tiny change) - - * menu-bar.el (menu-bar-tools-menu): Minor change in strings. - -2003-07-23 Stefan Monnier - - * vc-svn.el (vc-svn-diff-switches): Don't default to vc-diff-switches. - -2003-07-23 John Paul Wallington - - * tooltip.el (defface tooltip): Inherit from variable-pitch. - -2003-07-23 Glenn Morris - - * emacs-lisp/derived.el (define-derived-mode): Mention hook in doc - string. Defvar the derived hook. - - * macros.el (insert-kbd-macro): Escape double quote character. - From Thomas W Murphy . - -2003-07-22 Stefan Monnier - - * textmodes/fill.el (fill-comment-paragraph): Construct a regexp - to match the specific mark rather than reusing comment-start-skip. - -2003-07-22 Thien-Thi Nguyen - - * progmodes/hideshow.el (hs-special-modes-alist): - Clarify MDATA-SELECTOR doc; nfc. - -2003-07-21 Markus Rost - - * progmodes/idlwave.el (idlwave-comment-indent-char): Fix default - value using ?\s. - -2003-07-21 John Paul Wallington - - * subr.el (with-selected-window): Add closing paren. - -2003-07-21 Richard M. Stallman - - * emacs-lisp/lisp-mode.el (emacs-lisp-mode): Use run-mode-hooks. - (lisp-mode): Likewise. - - * subr.el (with-selected-window): Copy code form save-selected-window - so as to call select-window with norecord arg. - (dynamic-completion-table): Doc fix. - (lazy-completion-table): Doc fix. - - * international/mule-cmds.el (set-locale-environment): - langinfo renamed to locale-info. - - * international/mule.el (auto-coding-functions): Doc fix. - -2003-07-21 Kenichi Handa - - * international/quail.el (quail-translate-key): - Update quail-current-str correctly. - -2003-07-21 Andreas Schwab - - * progmodes/sh-script.el (sh-mode-syntax-table): Change syntax of - ?, to "_". - -2003-07-20 Kai Gro,A_(Bjohann - Version 2.0.36 of Tramp released. - - * net/tramp.el (tramp-default-password-end-of-line): Rename from - tramp-password-end-of-line. - (tramp-password-end-of-line): New method parameter. - (tramp-get-password-end-of-line): Function to access method - parameter `tramp-password-end-of-line', or variable - `tramp-default-password-end-of-line' (default value). - (tramp-methods): Add entries for new parameter - tramp-password-end-of-line. - (tramp-enter-password): Use new function - `tramp-get-password-end-of-line'. - (tramp-handle-insert-file-contents): Do not - unconditionally inhibit the file operation file-local-copy, only - do that when the inhibit-file-name-operation is currently - insert-file-contents. This fixes finding remote CVS-controlled - files. (It would barf on inserting the CVS/Entries file - literally, because the file-local-copy handler wasn't called.) - (tramp-handle-shell-command): Support optional third arg ERROR-BUFFER. - (tramp-sh-extra-args): Adapt defcustom type to XEmacs. - (tramp-initial-commands): New variable. - (tramp-process-initial-commands): New function, using the variable. - (tramp-open-connection-setup-interactive-shell): Call the new function. - (tramp-buffer-name, tramp-debug-buffer-name): Always put the - method into the buffer name, never use nil. Reported by Hanak - David . - (tramp-open-connection-setup-interactive-shell): Erase buffer - before sending "stty -onlcr". - - * net/tramp-vc.el (vc-workfile-unchanged-p): Add comment. - -2003-07-19 Markus Rost - - * textmodes/artist.el (artist-erase-char): Fix default value using ?\s. - -2003-07-19 John Paul Wallington - - * textmodes/artist.el (artist-butlast-fn, artist-draw-sline) - (artist-draw-rect, artist-draw-square): Doc fixes. - - * textmodes/enriched.el (enriched-decode-display-prop): Doc fix. - - * textmodes/two-column.el (2C-mode-line-format): Doc fix. - -2003-07-19 Kenichi Handa - - * international/kkc.el (kkc-show-conversion-list-update): - Highlight the correct candidate in the message. - -2003-07-18 John Paul Wallington - - * simple.el (current-word): Don't include punctuation char when - `really-word' arg is non-nil. - -2003-07-17 Martin Stjernholm - - * progmodes/awk-mode.el: Obsoleted by the AWK support in CC Mode - - moved to the directory obsolete. - -2003-07-16 Stefan Monnier - - * info.el (Info-menu-entry-name-re): Allow newlines in - menu entry names. - - * emacs-lisp/syntax.el (syntax-ppss-flush-cache): Rename from - syntax-ppss-after-change-function. - (syntax-ppss-after-change-function): New alias. Update uses. - (syntax-ppss): Catch the case where the buffer is narrowed. - -2003-07-16 Martin Stjernholm - - * progmodes/cc-defs.el (c-langelem-sym, c-langelem-pos) - (c-langelem-2nd-pos): Add accessor functions for syntactic elements. - -2003-07-16 Martin Stjernholm - - * progmodes/cc-engine.el (c-literal-faces): Declare as a variable - since it might be modified. - - * progmodes/cc-langs.el (c++-make-template-syntax-table) - (c-syntactic-ws-start, c-syntactic-ws-end): Give more consistent - names to these language constants. - -2003-07-15 Kim F. Storm - - * apropos.el (apropos-sort-by-scores): Rename from apropos-show-scores. - All uses changed. - -2003-07-14 Mark A. Hershberger - - * xml.el (xml-parse-tag, xml-parse-file, xml-parse-region): - Namespace support. - -2003-07-13 Juanma Barranquero - - * frame.el (modify-all-frames-parameters): Reinstall (copyright - papers received). - -2003-07-13 Karl Eichwalder - - * textmodes/po.el (po-find-charset): White space at the start of the - Content-Type field body is non-mandatory. - -2003-07-13 Masayuki Ataka (tiny change) - - * textmodes/texinfo.el (texinfo-section-list): - Append appendixsection; a synonym for appendixsec. - -2003-07-13 Jari Aalto - - * man.el (Man-translate-cleanup): New. - (Man-translate-references): Call `Man-translate-cleanup' to clean - leading, trailing and middle spaces. - -2003-07-13 Lars Hansen - - * desktop.el (desktop-buffer-dired-misc-data, desktop-buffer-dired): - Handle `dired-directory' being a list. - -2003-07-13 Jesper Harder (tiny change) - - * mail/smtpmail.el (smtpmail-send-it): Create smtpmail-queue-dir if - it doesn't exist. - -2003-07-12 Richard M. Stallman - - * progmodes/cc-engine.el (c-declare-lang-variables): Don't use mapcan. - - * progmodes/cc-defs.el (c-make-keywords-re): - Don't use delete-duplicates. - (c-lang-const): Don't use mapcan. - - * apropos.el (apropos-show-scores): Make it customizable. - Document new meaning. - (apropos): Compute scores from symbols. - (apropos-print): Don't sort by scores if apropos-show-scores is nil. - -2003-07-11 Vinicius Jose Latorre - - * ps-bdf.el: Fix copyright line. - (bdf-directory-list): Fix initialization code. - -2003-07-11 John Paul Wallington - - * emacs-lisp/ring.el (ring-empty-p): Use `zerop'. - (ring-p, ring-plus1, ring-minus1, ring-length, ring-index) - (ring-empty-p, ring-size, ring-copy, ring-ref): Doc fixes. - -2003-07-11 NAKAJIMA Mikio (tiny change) - - * emacs-lisp/ring.el (ring-elements): Doc fix. - -2003-07-11 Glenn Morris - - * calendar/timeclock.el (timeclock-relative) - (timeclock-ask-before-exiting, timeclock-use-display-time): - Doc changes. - (timeclock-modeline-display): Give a message if - `timeclock-use-display-time' is non-nil but `display-time-mode' - is not active. - -2003-07-11 Kenichi Handa - - * international/mule-cmds.el (set-language-environment): - Set current-language-environment to the correct string. - -2003-07-10 Vinicius Jose Latorre - - * ps-print.el: Print line number correctly in a region. Reported by - Tim Allen - (ps-print-version): New version number (6.6.2). - (ps-printing-region): Code fix. - -2003-07-10 John Paul Wallington - - * progmodes/etags.el (visit-tags-table-buffer): Add autoload cookie; - this function can be called from `add-completions-from-tags-table'. - -2003-07-10 Glenn Morris - - * calendar/timeclock.el (timeclock-use-display-time) - (timeclock-day-over-hook, timeclock-workday-remaining) - (timeclock-status-string, timeclock-when-to-leave) - (timeclock-when-to-leave-string, timeclock-log-data) - (timeclock-find-discrep, timeclock-day-base) - (timeclock-generate-report, timeclock-visit-timelog): Doc fix. - (timeclock-modeline-display): Set the variable - `timeclock-modeline-display'. - (timeclock-update-modeline): Doc fix. Respect value of - `timeclock-relative'. - -2003-07-09 Richard M. Stallman - - * textmodes/reftex-parse.el (reftex-all-document-files): - Add autoload cookie. - - * textmodes/reftex.el (reftex-all-document-files): Delete autoload. - (reftex-scanning-info-available-p): Add autoload cookie. - - * international/mule-cmds.el (set-display-table-and-terminal-coding-system): - Delete duplicate aset on standard-display-table. - - * view.el (view-file): If existing buffer's major mode is special, - don't go into view mode. - - * dired.el (dired-move-to-filename-regexp): Allow quote in months. - -2003-07-08 Martin Stjernholm - - * progmodes/cc-engine.el (c-guess-basic-syntax): Do not do hidden - buffer changes; there's third party code that calls this function - directly. - -2003-07-08 Martin Stjernholm - - * progmodes/cc-fonts.el (javadoc-font-lock-keywords) - (autodoc-font-lock-keywords): Don't byte compile on font lock - initialization when running from byte compiled files. - -2003-07-08 Alan Mackenzie - - * progmodes/cc-engine.el: Fix AWK mode indentation when previous - statement ends with auto-increment "++". - -2003-07-08 Martin Stjernholm - - * progmodes/cc-langs.el, progmodes/cc-styles.el (c-style-alist) - (c-lang-variable-inits, c-lang-variable-inits-tail): The values of - these are changed, so declare them as variables and not constants. - -2003-07-08 Markus Rost - - * subr.el (dolist, dotimes): Doc fix. - -2003-07-08 Kim F. Storm - - * international/mule-cmds.el (set-display-table-and-terminal-coding-system): - Don't break bootstrap if standard-display-table isn't setup yet. - -2003-07-07 Richard M. Stallman - - * ehelp.el (ehelp-command): Use defalias to define ehelp-command. - Give it a doc string, and autoload it. - - * desktop.el (desktop-buffer-info, desktop-buffer-mh): - Use with-no-warnings. - - * info.el (Info-search): If find invisible text, search again. - - * isearch.el (search-whitespace-regexp): Add a shy group around it. - - * man.el (Man-name-regexp): Match + as part of name. - - * simple.el (visible-mode): Rename from vis-mode. - (vis-mode-saved-buffer-invisibility-spec): Doc fix. - - * simple.el (current-word): New arg REALLY-WORD specifies - don't include punctuation chars. - - * emacs-lisp/debug.el (debug, debugger-env-macro): - Use with-no-warnings while accessing and binding unread-command-char. - - * international/mule-cmds.el (set-display-table-and-terminal-coding-system): - Use explicit loop instead of calling standard-display-default. - - * net/ange-ftp.el (ange-ftp-file-symlink-p): - Use condition-case to catch error in ange-ftp-get-files. - - * net/browse-url.el (browse-url-browser-function): - Add alternative for Epiphany. - (browse-url-epiphany-program, browse-url-epiphany-arguments) - (browse-url-epiphany-startup-arguments) - (browse-url-epiphany-new-window-is-tab): New variables. - (browse-url-epiphany, browse-url-epiphany-sentinel): New functions. - - * progmodes/compile.el (compile-auto-highlight): Default now t. - (compile): Doc fix. - (compilation-next-error): Fix previous change. - - * textmodes/tex-mode.el (tex-main-file): Use with-no-warnings. - - * textmodes/sgml-mode.el (xml-mode): Add autoload cookie. - -2003-07-07 Nick Roberts - - * gdb-ui.el (gdb-source-info): Display current frame when - attaching to an existing process. - (gdb-setup-windows, gdb-source-info): Start with gud-comint-buffer - while laying out windows when attaching to an existing process. - -2003-07-07 Stefan Monnier - - * info.el (Info-menu): Use Info-menu-entry-name-re. - -2003-07-06 Stefan Monnier - - * vc-hooks.el (vc-stay-local, vc-stay-local-p): Move from vc.el. - * vc.el (vc-stay-local, vc-stay-local-p): Move to vc-hooks.el. - - * info.el (Info-menu-entry-name-re): Be careful to avoid multiple ways - to match the same text. - -2003-07-06 John Paul Wallington - - * vc.el (vc-annotate-offset): Move defvar up. - -2003-07-06 Kim F. Storm - - * info.el (Info-menu-entry-name-re): Add `:' to second [] part. - This should fix the infinite loop when extracting menu names. - -2003-07-05 Martin Stjernholm - - * files.el (auto-mode-alist, interpreter-mode-alist): - Remove entries to CC Mode modes to avoid duplicates; they are now added - with autoload directives in cc-mode.el. - -2003-07-05 Martin Stjernholm - - * progmodes/cc-langs.el, progmodes/cc-styles.el (c-style-alist) - (c-lang-variable-inits, c-lang-variable-inits-tail): The values of - these are changed, so declare them as variables and not constants. - - * progmodes/cc-mode.el: Fix some autoload problems: Try to - ensure that the entry for ".c" extension comes before the one for - ".C" on `auto-mode-alist', to behave better on case insensitive OS:es. - Fix incorrect entries that were added to `interpreter-mode-alist'. - Move the autoload directives for AWK to the top level since they - aren't recognized anywhere else. Do not use the new AWK mode doc - in the autoload form for the old AWK mode. - -2003-06-30 Roland Winkler - - * textmodes/bibtex.el (bibtex-sort-entry-class): New entry catch-all. - (bibtex-sort-ignore-string-entries): Default value t. - (bibtex-entry-kill-ring-max): Reintroduce as it was removed - erroneously in previous version. - (bibtex-string-files): Docstring reflects new parsing scheme. - (bibtex-autokey-transcriptions): Merge some rewrite entries, fix - docstring, add # as one of the chars to crush - (bibtex-autokey-prefix-string, bibtex-autokey-names) - (bibtex-autokey-names-stretch, bibtex-autokey-additional-names) - (bibtex-autokey-name-change-strings) - (bibtex-autokey-name-case-convert, bibtex-autokey-name-length) - (bibtex-autokey-name-separator, bibtex-autokey-year-length) - (bibtex-autokey-use-crossref, bibtex-autokey-titlewords) - (bibtex-autokey-title-terminators) - (bibtex-autokey-titlewords-stretch) - (bibtex-autokey-titleword-ignore) - (bibtex-autokey-titleword-case-convert) - (bibtex-autokey-titleword-abbrevs) - (bibtex-autokey-titleword-abbrevs) - (bibtex-autokey-titleword-change-strings) - (bibtex-autokey-titleword-length) - (bibtex-autokey-titleword-separator) - (bibtex-autokey-name-year-separator) - (bibtex-autokey-year-title-separator) - (bibtex-autokey-before-presentation-function) - (bibtex-entry-type-history, bibtex-entry-maybe-empty-head): - Fix docstring. - (bibtex-strings, bibtex-reference-keys): - Use lazy-completion-table and make-variable-buffer-local. - (bibtex-sort-entry-class-alist): Use downcase, account for catch-all. - (bibtex-braced-string-syntax-table) - (bibtex-quoted-string-syntax-table): New variables. - (bibtex-parse-nested-braces): Remove. - (bibtex-parse-field-string): Use syntax table and forward-sexp. - (bibtex-parse-association): Simplify. - (bibtex-parse-field-name): Obey bibtex-autoadd-commas. - (bibtex-parse-field-text): Simplify. - (bibtex-search-forward-field, bibtex-search-backward-field): - argument BOUND can take value t. - (bibtex-start-of-field, bibtex-start-of-name-in-field) - (bibtex-end-of-name-in-field, bibtex-end-of-field) - (bibtex-start-of-text-in-field, bibtex-end-of-text-in-field) - (bibtex-start-of-text-in-string, bibtex-end-of-text-in-string) - (bibtex-end-of-string, bibtex-type-in-head): Use defsubst. - (bibtex-skip-to-valid-entry): Return buffer position of beginning - and ending of entry. Update for changes of bibtex-search-entry. - Simplify. - (bibtex-map-entries): FUN is called with three arguments. - (bibtex-search-entry): Return a cons pair with buffer positions of - beginning and end of entry. - (bibtex-enclosing-field): Simplify. - (bibtex-format-entry): Use booktitle to set a missing title. - (bibtex-autokey-get-names): Fiddle with regexps. - (bibtex-generate-autokey): Use identity. - (bibtex-parse-keys): Use simplified parsing algorithm if - bibtex-parse-keys-fast is non-nil. Simplify. Change order of - arguments. Return alist of keys. - (bibtex-parse-strings): Simplify. Return alist of strings. - (bibtex-complete-string-cleanup): Fix docstring. - (bibtex-read-key): New function. - (bibtex-mode): Fix docstring. Do not parse for keys and - strings when the mode is entered. Set fill-paragraph-function to - bibtex-fill-field. Setup font-lock-mark-block-function the way - font-lock intended. - (bibtex-entry): Use bibtex-read-key. Obey bibtex-autofill-types. - (bibtex-parse-entry, bibtex-autofill-entry): New functions. - (bibtex-print-help-message, bibtex-remove-OPT-or-ALT) - (bibtex-Preamble): Avoid hard coded constants. - (bibtex-make-field): Fix docstring. Simplify. - (bibtex-beginning-of-entry): Always return new position of point. - (bibtex-end-of-entry): Rearrange cond clauses. - (bibtex-count-entries, bibtex-validate, bibtex-reformat): - Update for changes of bibtex-map-entries. - (bibtex-ispell-abstract): Do not move point. - (bibtex-entry-index): Use downcase. Simplify. - (bibtex-lessp): Handle catch-all. - (bibtex-find-crossref): Turn into a command. - (bibtex-find-entry): Simplify. Use bibtex-read-key. Fix regexp. - (bibtex-clean-entry): Use bibtex-read-key. Handle string and - preamble entries. - (bibtex-fill-field-bounds): New function. - (bibtex-fill-field): New command. Bound to fill-paragraph-function. - (bibtex-fill-entry): Use bibtex-fill-field-bounds - (bibtex-String): Use bibtex-strings. Always obey - bibtex-sort-ignore-string-entries. - -2003-07-05 John Paul Wallington - - * cus-theme.el (customize-create-theme): - Call `customize-create-theme' in Reset widget's notify function. - - * ibuffer.el (ibuffer-backward-line, ibuffer-forward-line) - (ibuffer-mark-interactive): Use `or' instead of `unless'. - (define-ibuffer-column name): Add summarizer. - (define-ibuffer-column size): Likewise. - (define-ibuffer-column filename): Likewise. - (define-ibuffer-column process): Likewise. Change BODY's output too. - (define-ibuffer-column filename-and-process): Likewise, likewise. - (ibuffer): Remove local vars `already-in' and `need-update'. - - * ibuf-ext.el: Don't require `derived' at compile-time. - -2003-07-05 Kim F. Storm - - * info.el: Disable paragraph refilling. - (Info-refill-paragraphs): New defcustom. - (Info-fontify-node): Use it. - -2003-07-04 Stefan Monnier - - * emacs-lisp/cl-macs.el (cl-transform-lambda): Strip &cl-defs - thingies from constructors created by defstruct. - - * emacs-lisp/bytecomp.el (byte-compile-defvar): Check and set - the default value of the variable. - (byte-code-meter): Move declaration to top level. - - * pcvs-parse.el (cvs-parse-status): Ignore extra fields from CVSNT. - - * info.el (Info-following-node-name-re): New fun. - (Info-following-node-name): Remove. - (Info-insert-dir): Use the new fun. - (Info-extract-pointer): Don't save restriction; use new fun. - (Info-menu-entry-name-re): New const. - (Info-menu-entry-name-re): Use it along with new fun. - (Info-node-spec-re): Use new fun. - (Info-complete-menu-item, Info-fontify-node): Use new const. - (Info-goto-node, Info-follow-reference, Info-menu-update): - Use match-string. - (Info-follow-reference): Use assoc-string. - Use a list of strings for the completion table. - (Info-fontify-node): Use match-string, line-end-position. - Limit the search for `node:' to the first line. - - * newcomment.el (uncomment-region): Remove padding coming from - comment-start rather than just from comment-padding. - - * vc-cvs.el (vc-cvs-repository-hostname): New operation. - (vc-cvs-stay-local-p): Use vc-stay-local-p. - (vc-cvs-rename-file): Remove (use the default). - (vc-cvs-register): Register parent dir if needed. - (vc-cvs-could-register): Return non-nil if parent can be registered. - (vc-cvs-state, vc-cvs-dir-state, vc-cvs-print-log, vc-cvs-diff) - (vc-cvs-diff-tree, vc-cvs-make-version-backups-p): Use vc-stay-local-p. - - * vc-svn.el (vc-svn-use-edit): Make it into a const. - (vc-svn-update): Fix the arguments to `svn'. - (vc-svn-diff-tree): Just use `vc-svn-diff'. - (vc-svn-create-snapshot, vc-svn-retrieve-snapshot): - Simple implementations, assuming `name' is a URL. - - * progmodes/sh-script.el (sh-font-lock-paren): Add [ and ] to the - set of chars allowed unquoted in a case pattern. - - * font-core.el (font-lock-defaults-alist): Remove obsolete entries. - - * font-lock.el (font-lock-extra-types-widget) - (c-font-lock-extra-types, c++-font-lock-extra-types) - (objc-font-lock-extra-types, java-font-lock-extra-types) - (c-font-lock-keywords-1, c-font-lock-keywords-2, c-font-lock-keywords) - (c-font-lock-keywords-3, c-font-lock-syntactic-face-function) - (font-lock-match-c++-style-declaration-item-and-skip-to-next) - (font-lock-match-c++-structor-declaration) - (c++-font-lock-keywords-1, c++-font-lock-keywords-2) - (c++-font-lock-keywords-3, c++-font-lock-keywords) - (objc-font-lock-keywords-1, objc-font-lock-keywords-2) - (objc-font-lock-keywords-3, objc-font-lock-keywords) - (java-font-lock-keywords-1, java-font-lock-keywords-2) - (java-font-lock-keywords-3, java-font-lock-keywords) - (java-font-lock-syntactic-face-function): Remove obsolete code - and constants. It's all in cc-fonts.el now. - -2003-07-04 Glenn Morris - - * mail/sendmail.el (mail-specify-envelope-from) - (mail-envelope-from): Doc fix. - -2003-07-04 Martin Stjernholm - - * generic-x.el: Do away with the dependency on `c-emacs-features' - when populating `rul-generic-mode-syntax-table'; we already know - this isn't XEmacs. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-menus.el (cc-imenu-init): Do not set - `imenu-create-index-function' if the second argument is left - out. This bug broke the imenu support in C, C++ and Java modes. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el, progmodes/cc-align.el - (c-add-stmt-syntax, c-lineup-arglist) - (c-lineup-arglist-close-under-paren): Fixes to cope with - special brace lists in Pike. - -2003-07-03 Alan Mackenzie - - * progmodes/cc-mode.el: awk-mode: Call c-awk-after-change to - ensure syntax-table props at loading. - - * progmodes/cc-fonts.el: Put (cc-require-when-compile 'cc-awk) - to eliminate compile-time errors. - -2003-07-03 Alan Mackenzie - - * progmodes/cc-awk.el, progmodes/cc-engine.el: Add code to - analyze AWK top-level forms properly (c-guess-basic-syntax - CASE 5P), c-awk-backward-syntactic-ws. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-fix.el: cc-mode-19.el has been renamed to - progmodes/cc-fix.el since it now contains compatibility stuff - for later versions than (X)Emacs 19. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el (c-paren-nontype-kwds): New language constant. - - (c-other-decl-kwds, c-postfix-decl-spec-kwds): Add compiler - specific declspec keywords: __attribute__ for gcc and - __declspec for msvc. - - * progmodes/cc-fonts.el (c-font-lock-declarations) - (c-complex-decl-matchers): Support specifiers in a couple more - contexts to cope with msvc '__declspec'. - - * progmodes/cc-engine.el (c-forward-keyword-clause): - Support `c-paren-nontype-kwds'. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el (c-primary-expr-regexp): Don't match a - bare period as a float. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-bytecomp.el (cc-bytecomp-setup-environment): - Do not cover functions that have been bound. - - (cc-external-require): New macro to use for requiring external - packages, to handle the environment correctly. - - * progmodes/cc-defs.el, progmodes/cc-fix.el, - progmodes/cc-fonts.el, progmodes/cc-mode.el: Replaced external - require's with `cc-external-require'. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-member-init-list) - (c-guess-basic-syntax): Fixes in handling of bitfields. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el (comment-end): Put a space in front of - the comment ender in C, as it was before the move from cc-mode.el. - -2003-07-03 Alan Mackenzie - - * progmodes/cc-fonts.el: Do not load progmodes/cc-awk.elc or - awk-font-lock-keywords unless there is an AWK Mode buffer. - -2003-07-03 Alan Mackenzie - - * progmodes/cc-awk.el: New file that implements AWK support, - superseding the old separate derived mode in awk-mode.el. - - * progmodes/cc-vars.el, cc-mode-19.el, progmodes/cc-langs.el, - progmodes/cc-mode.el, progmodes/cc-defs.el, - progmodes/cc-engine.el, progmodes/cc-fonts.el: Changes for the - new AWK support. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el, progmodes/cc-langs.el - (c-decl-block-key, c-search-uplist-for-classkey): Check that - the modifier is followed by "{" in Pike before considering it - to start a class-like block. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el (c-initialize-cc-mode): Add some - compatibility to make this function behave somewhat more as - documented for derived modes. It's still not enough to make - the old AWK mode behave reasonably, but it's been like this a - long time now so fixing it more might cause trouble - elsewhere. :P - -2003-07-03 Martin Stjernholm - - * progmodes/cc-fonts.el (c-remove-font-lock-face): New macro - to remove a font lock face properly (especially in XEmacs). - - * progmodes/cc-bytecomp.el (cc-bytecomp-obsolete-fun): - Add the same kludge as in `cc-bytecomp-obsolete-var' to avoid a - confused compiler warning. - - * progmodes/cc-engine.el (c-forward-type): Fix a bug in the - handling of concatenated types when the component types are known. - - * progmodes/cc-fonts.el (c-constant-face-name): Add face name variable - to avoid the use of `font-lock-constant-face' for constants in - emacsen that doesn't have it. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-styles.el, progmodes/cc-vars.el, - progmodes/cc-cmds.el: Fixes for the syntactic symbols for - module and composition blocks. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el (c-basic-common-init): - Use `open-paren-in-column-0-is-defun-start' if it exists and works. - - * progmodes/cc-vars.el (c-emacs-features): Add `col-0-paren' - to detect when `open-paren-in-column-0-is-defun-start' exists - and actually works. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el (c-lineup-argcont, c-lineup-gcc-asm-reg): - Don't quote nil in docstrings. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-vars.el, progmodes/cc-langs.el - (c-primitive-type-kwds, c-font-lock-extra-types): "complex" - and "imaginary" aren't keywords in C99, only macros that - expand to the keywords "_Complex" and "_Imaginary", so make - the former a bit less hardcoded by putting it on - `c-font-lock-extra-types' instead. There are also "bool" and - "_Bool" that work the same way. - (c-constant-kwds): "false" and "true" are standard constant - macros in C99. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-menus.el, progmodes/cc-langs.el, - progmodes/cc-engine.el, progmodes/cc-fonts.el, - progmodes/cc-cmds.el: Fixed various regexps to use POSIX char - classes when that is supported. - - * progmodes/cc-defs.el (c-alpha, c-alnum, c-digit, c-upper, c-lower): - New constants to make it easier to create regexps - that use POSIX char classes in emacsen that support them. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-vars.el (c-emacs-features): Detect in the - regexp engine understands POSIX char classes. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el (c-after-change): Add kludge for bug - where this function sometimes gets positions outside the - buffer range. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-member-init-list): - Better handling of paretheses in unexpected places. - - * progmodes/cc-engine.el (c-forward-<>-arglist-recur): Fix a - regexp match order problem that could cause empty template - args on the form "<>" to be missed. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-parse-state): Add kludge to - avoid an infinite loop when Emacs' open-paren-in-column-zero - rule kicks in and causes the sexp functions to misbehave. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-member-init-list): - Fix bug when C++-like code is encountered in non-C++ mode. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-defs.el (c-make-keywords-re): Add option to - specify the language to look up `c-nonsymbol-key' in. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-cmds.el, progmodes/cc-engine.el - (c-auto-newline-analysis): New dynamically bound variable to - turn off the topmost-intro-cont/statement-cont kludge for - brace lists during the analysis for the auto newline feature. - This fixes some cases where the setting for `brace-list-open' - on `c-hanging-braces-alist' didn't have any effect. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el (c-literal-start-regexp): Yet another - language variable. - - * progmodes/cc-fonts.el (c-font-lock-doc-comments) - (c-find-invalid-doc-markup, javadoc-font-lock-keywords): - Fix fontification of the markup in Javadoc comments. - - * progmodes/cc-engine.el: Fixes in face handling to cope with - doc comments. - - (c-find-decl-spots): More failsafe skipping of comments and - strings that only have been partially fontified. - - * progmodes/cc-defs.el (c-got-face-at): New subst to test - faces at positions easier. - - * progmodes/cc-defs.el (c-safe-scan-lists): New wrapper macro - to avoid the warnings with too many args to `scan-lists' in Emacs. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-syntactic-skip-backward): - New function to make syntactic searches in the backward direction - easier. - - (c-beginning-of-statement-1): Optimize skipping over large paren - sexps somewhat. - - (c-safe-position): Remove the odd macro handling which was - centered around the point instead of the passed position. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-in-knr-argdecl): Do not trip up on - initialization expressions. - - * progmodes/cc-align.el (c-lineup-arglist) - (c-lineup-close-paren, c-lineup-arglist-close-under-paren): - Tune the "macro block" heuristics to work better in nested - arglist situations. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-styles.el (c-set-offset): Don't find a default - syntactic element through syntactic analysis if called outside - a CC Mode buffer. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el (c-basic-common-init): - Install `c-fill-paragraph' on `fill-paragraph-function'. - Although it's not the normal way to call it in a CC Mode buffer it - makes a direct call to `fill-paragraph' work better. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-vars.el, progmodes/cc-mode.el - (c-require-final-newline): Make this variable an alist to - specify a value for each language. The default value causes - `require-final-newline' to be set to t only in languages where - the standard requires a final newline. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el, progmodes/cc-vars.el - (c-require-final-newline): Add a variable to make the - initialization of `require-final-newline' more configurable. - - * progmodes/cc-vars.el (c-mode-common-hook): Do not change the - format string to "CC Mode Common Hook" since that causes - confusion (although it is a more accurate name). - -2003-07-03 Martin Stjernholm - - * progmodes/cc-fonts.el (javadoc-font-lock-keywords) - (autodoc-font-lock-keywords): Support for Javadoc and Pike - Autodoc doc comments. - - * progmodes/cc-vars.el (c-doc-comment-style): New variable to - control the fontification of documentation comments on top of - the normal mode font lock. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el, progmodes/cc-fonts.el - (c-primary-expr-regexp, c-font-lock-declarations): Avoid false - recognition of parens as casts when they are followed by an - operator that is both prefix and infix. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-cmds.el (c-guess-fill-prefix): Tune the - heuristics of when to use `c-block-comment-prefix' for an - unclosed block comment. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el, progmodes/cc-langs.el - (c-nonsymbol-sexp-kwds, c-forward-keyword-clause): - Handle keywords like "extern" that can be followed by e.g. a string - literal. - - * progmodes/cc-defs.el (c-make-keywords-re): Make a regexp - correctly with one submatch when adorn is set and the list is empty. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-fonts.el (c-font-lock-declarations): Fix a - search that could go far past the relevant region and cause - slowness. Do not limit the declaration detection to the - fontified region since that can cause misfontification in - multiline declarations. - - * progmodes/cc-engine.el (c-find-decl-spots): Add limit - argument to handle declarations spanning the fontification - limit better. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-in-literal, c-literal-limits) - (c-literal-limits-fast, c-beginning-of-inheritance-list): - Use the paren cache instead of the impaired ad hoc in - `beginning-of-defun', so that these functions doesn't trip up - on "{" in the first column inside strings or comments. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-vars.el (c-hanging-braces-alist): - Add `statement-cont' and made it auto newline free by default. - - * progmodes/cc-cmds.el (c-electric-brace): - Add `statement-cont' to the list of syntactic symbols to consider - for auto newlines since it can be used for in-statement brace lists. - - * progmodes/cc-vars.el (c-emacs-features): There's no need to - have this constant autoloaded. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-fonts.el (c-font-lock-declarations): - Use `c-recognize-typeless-decls' to avoid fontifying some macro - constructs as declarations in languages where a preceding type - is mandatory. - - * progmodes/cc-langs.el (c-recognize-typeless-decls): - New language variable. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el (c-lineup-close-paren): - Use `c-syntactic-eol' when checking if the open paren ends its line. - - * progmodes/cc-langs.el (c-syntactic-eol): Handle a line - continuation backslash. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el (c-snug-do-while): Compatibility fix - for changed structure in `c-syntactic-context'. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-parse-state): Filter angle bracket - arglist parens in a better way than disabling the syntax table - properties completely. - - * progmodes/cc-fonts.el (c-cpp-matchers): Handle line - continuations in cpp expressions. Do not fontify symbols after - #ifdef etc as variables since that isn't consistent with how - the face is used elsewhere (i.e. only for the definition of - the symbol). - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el: Add autoload directives for the - interface functions in cc-langs. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-fonts.el (c-font-lock-declarations): Add a - property to handle refontication in multiline declaration - arglists better. - (c-font-lock-<>-arglists): Fix to handle recursive template - arglists better. (As a side effect this will make - fontification work better in older emacsen too.) - - * progmodes/cc-engine.el (c-forward-<>-arglist) - (c-remove-<>-arglist-properties): Use a common text property - `c-type' for all sorts of CC Mode char classification, to - avoid cases when then same char is given conflicting types. - (c-forward-<>-arglist): New reparse argument to control that - aspect explicitly. - (c-forward-name, c-forward-type): Changes in the handling of - recursive template arglists. Fixes to cope with the new 'known - type classification. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el (c-basic-common-init): Add the new - char property `c-type' to `text-property-default-nonsticky'. - - * progmodes/cc-defs.el (c-put-char-property) - (c-get-char-property, c-clear-char-property) - (c-clear-char-properties): Generalize `c-put-char-syntax' and - `c-get-char-syntax' to handle any property. - - * progmodes/cc-bytecomp.el (cc-bytecomp-defun): Fix bug that - caused existing function definitions to be overridden by - phonies when the bytecomp environment is restored. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-cmds.el (c-mask-paragraph): Masking is - necessary in normal code too to avoid getting a fill prefix - from a nearby comment. Change the name from `c-mask-comment' - to a more accurate one. - - * progmodes/cc-defs.el, progmodes/cc-mode.el: Change the - auto-load-alist strategy to not add entries on package load, - to be defensive in the case that autoloads are updated in - older emacsen. The bug that would occur in that case would - probably be rather nasty for the average user. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-fonts.el (c-font-lock-declarations): - Fine tuning of the decision tree that tells declarations from - expressions to produce better results in some ambiguous cases. - - * progmodes/cc-fonts.el (c-font-lock-syntactic-face-function): - Remove since it doesn't give the control we want. - (c-font-lock-invalid-string): Replacement for - `c-font-lock-syntactic-face-function' that puts the error face - on the string opener only, to avoid the annoying excessive use - of the error face while a string literal is being written. - (c-basic-matchers-before): Use `c-font-lock-invalid-string'. - - * progmodes/cc-engine.el (c-string-syntax) - (c-string-limit-regexp): Add constants to use when handling - string limits, since not all old emacsen react well to the "|" - syntax class. - - (c-literal-limits, c-literal-limits-fast, c-literal-type): - Use `c-string-syntax' and `c-string-limit-regexp'. Replace some - hardcoded comment start regexps with `c-comment-start-regexp'. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el: Added an association for pike-mode on - `intepreter-mode-alist'. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el: Add the `auto-mode-alist' entries to - the end instead of the start of the list, to avoid overriding - user additions that are made before this file is loaded when - the entries don't correspond to any already on `auto-mode-alist'. - This is done through the third append argument to - `add-to-alist'. That doesn't exist in older (X)Emacsen, so - the function is advised in cc-defs. However, that advice - doesn't help if the autoloads are updated in an old (X)Emacs - with this version of CC Mode, but I believe it's unlikely that - anyone does that when CC Mode isn't distributed with with it. - - * progmodes/cc-defs.el (add-to-list): Add advice to get the - optional third append argument in older (X)Emacsen. - - * progmodes/cc-langs.el (c-keywords-obarray): Kludge for - strange bug in Emacs that gives so odd errors that I frankly - don't even muster to begin trying to narrow it down. - If someone is so inclined, restore the commented code, byte - compile, and try to open a C++ file or something in font lock mode. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el: Update the IDL support from the - specs. This also adds the keywords for the variants PSDL and - CIDL. (This is mostly done from reading the grammars only; - very lightly tested.) - - * progmodes/cc-langs.el (c-type-list-kwds): Add "new" in Java. - - * progmodes/cc-fonts.el: Make sure that - `parse-sexp-lookup-properties' is properly insulated from - clobbering by the font-lock package at all relevant entry points. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el (c-opt-after-id-concat-key): - New language constant to make the recognition of identifier - qualifiers more flexible. Recognize the identifier before - ".*" as a qualifier in Java. - (c-identifier-key): Recognize "::*" inside identifiers in C++. - Recognize identifiers ending with ".*" in Java for the sake of - import directives. - (c-type-list-kwds, c-ref-list-kwds): Recognize "import" and - "package" declarations in Java. - - * progmodes/cc-vars.el (c-doc-face, c-doc-marker-face) - (c-doc-markup-face): Remove since they aren't used (and - probably won't be). - - * progmodes/cc-langs.el (c-ref-list-kwds): New language - constant to specify keywords followed by references. - (c-last-identifier-range): New variable to avoid going back to - search for the identifier to font lock after a call to - `c-forward-name'. - (c-type-prefix-kwds, c-type-list-kwds): Fix classification of - "@interface" etc in Objective-C. - - * progmodes/cc-engine.el (c-forward-keyword-clause): - Fix handling of keyword prefixes in `c-type-list-kwds' and - `c-colon-type-list-kwds' clauses. - (c-keyword-sym, c-keyword-member): New functions to lookup and - categorize keywords. - (c-forward-keyword-clause): New function to move over a keyword - and its associated clause according to `c-<>-arglist-kwds' etc. - - * progmodes/cc-langs.el (c-typeless-decl-kwds) - (c-type-list-kwds, c-colon-type-list-kwds) - (c-colon-type-list-re, c-paren-type-kwds): New language - constants and variables to generalize the recognition of - various language constructs. - (c-keywords): Did away with the list of `*-kwds' constants. - It's now built through macro expansion. - (c-keywords-obarray): New language variable which contains each - keyword as a symbol, to make fast reverse lookup of keywords to - the `*-kwds' lists they come from. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-defs.el (c-lang-defconst-eval-immediately): - Add macro to be able to do direct evaluation in - `c-lang-defconst' forms. - - * progmodes/cc-engine.el (c-syntactic-re-search-forward): - Fix a bug which could cause the point to end up outside the - containing sexp if PAREN-LEVEL was used. - - * progmodes/cc-engine.el, progmodes/cc-fonts.el, - progmodes/cc-langs.el: Generalize the C++ template arglist - support to handle angle bracket arglists in any language. - (c-recognize-<>-arglists, c-<>-arglist-kwds) - (c-opt-<>-arglist-start): New language variables to control - angle bracket arglists. - (c-opt-type-suffix-key): Use `c-recognize-<>-arglists' in - Objective-C instead of matching a protocol reference list as a - type suffix. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el (c-gnu-impose-minimum): Fix a missing - `save-excursion' that caused the point to jump around. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el, progmodes/cc-menus.el (objc-mode) - (cc-imenu-init): Fix initialization bug that has made the - Objective-C support inoperational since 5.26. - (cc-imenu-objc-generic-expression): Update submatch indices - due to changes in `cc-imenu-c++-generic-expression'. - (cc-imenu-objc-function): Don't add an empty "C" menu since - imenu doesn't like that. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el (c-lineup-arglist) - (c-lineup-arglist-close-under-paren, c-lineup-close-paren): - Add DWIM to the functions that line up at or after the - arglist open paren to avoid that if there are brace blocks - inside, e.g. when a macro contains a code block. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-vars.el (objc-font-lock-extra-types): - Change default to treat identifiers starting with capital letters as - types, according to Objective-C naming conventions. The types - previously on the list is part of the language and therefore - on `c-primitive-type-kwds' instead. - - * progmodes/cc-fonts.el: Fix font locking in Objective-C. - Be more careful about returning nil from functions used - directly as font-lock matchers. - - * progmodes/cc-mode.el (c-font-lock-init): Make the syntax - table modification element of `font-lock-defaults' - parameterized over the languages. - - * progmodes/cc-langs.el: Update the Objective-C constants - according to the language spec. The "@" chars that start - directives are now considered part of the keywords to make - things easier. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-defs.el: (c-(up|down)-list-(forward|backward)): - Make the position optional and added docstrings. - - (c-go-(up|down)-list-(forward|backward)): Add variants of the - above that move point and return successfulness instead. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-fonts.el (c-font-lock-<>-arglists): - New function to fontify all occurrences of template arglists in C++. - - * progmodes/cc-engine.el (c-disallow-comma-in-<>-arglists): - New variable to be able to avoid false recognition of template - arglists in some cases. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-fonts.el, progmodes/cc-langs.el - (c-decl-prefix-re, c-font-lock-declarations): Match template - open brackets to get a declaration in the first template argument. - (c-complex-decl-matchers): Fontify the second type in a "class - X = Y" expression in C++. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-forward-<>-arglist): Break out the - recursive part to a new function to improve efficiency when a - nested template arglist search turns out to be futile. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-menus.el (cc-imenu-java-generic-expression): - Improve to avoid false matches on e.g. "else if (foo)". - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-forward-token-2) - (c-backward-token-2): New functions that work like the -1 - variants but that handle multicharacter operator tokens. - - * progmodes/cc-engine.el (c-inside-bracelist-p) - (c-guess-basic-syntax): Do away with the hardcoded regexps to - recognize "typedef" declaration prefixes, "extern" and - "namespace" blocks, "enum"-style brace list declarations and - Java-style array initializers with "new". - - * progmodes/cc-langs.el (c-brace-list-decl-kwds) - (c-brace-list-key, c-inexpr-brace-list-kwds) - (c-opt-inexpr-brace-list-key): New language constants and - variables to parameterize some more of the hardcoded regexps - in cc-engine. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el (c-lineup-cascaded-calls): Do not - allow cascaded call lists containing both "->" and ".". - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el, progmodes/cc-cmds.el, - progmodes/cc-defs.el, progmodes/cc-engine.el, - progmodes/cc-fonts.el, progmodes/cc-langs.el, - progmodes/cc-mode.el, progmodes/cc-styles.el: New language - variable system to make it easier to set up optimized language - variables and to extend them in third party derived modes. - cc-langs is no longer required at runtime. - - * progmodes/cc-mode.el (c-basic-common-init): No longer - initializes the language variables. It's necessary that the - caller does that directly since the evaluated values for them - now get compiled in directly. - (c-font-lock-init, c-common-init): Separate the font-lock - initialization from `c-common-init'. - - * progmodes/cc-mode.el (c-define-abbrev-table): Do not - override an existing abbrev table. - (c-Java-defun-prompt-regexp): Move here from cc-langs since - cc-langs isn't always loaded at runtime. - - * progmodes/cc-langs.el (c-make-init-lang-vars-fun) - (c-init-language-vars): Change to allow language variable - initialization from derived modes. - (c-mode-menu): New language variable for the mode menu. - (c-make-mode-syntax-table, c-mode-syntax-table) - (make-c++-template-syntax-table): New language variables for syntax - tables. The code that initializes them has been moved to cc-mode - to make it possible to avoid loading cc-langs at runtime. - - * progmodes/cc-engine.el, progmodes/cc-langs.el - (c-hungry-delete-key, c-auto-newline, c-auto-hungry-string): - Move these state variables from cc-langs to cc-engine to make - it possible to avoid loading cc-langs at runtime. - - * progmodes/cc-defs.el (c-lang-defconst, c-lang-const): - Move from cc-langs and rewritten to make the language constant - system usable from derived modes. - - (c-add-language): New function intended for use from derived modes - that add new C-like languages. - - * progmodes/cc-defs.el, progmodes/cc-vars.el - (c-buffer-is-cc-mode): Move from cc-vars to cc-defs to define - it during compilation. - - * progmodes/cc-bytecomp.el (cc-require-when-compile): - New support macro for compile time `require's. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-defs.el, progmodes/cc-mode.el (c-version): - Move from cc-mode to cc-defs to make it accessible to the - other components. - - * progmodes/cc-engine.el (c-forward-token-1, c-backward-token-1): - Compatibility fix for emacsen that doesn't understand generic - string delimiters. - - * progmodes/cc-vars.el (c-emacs-features): Add detection of - generic string and comment delimiters. - - * progmodes/cc-defs.el, progmodes/cc-langs.el - (c-make-keywords-re): Change interface to make it more extensible. - - * progmodes/cc-langs.el, progmodes/cc-defs.el (c-regexp-opt) - (c-regexp-opt-depth, c-make-keywords-re): Move from cc-langs - to cc-defs since they are generally useful. - - * progmodes/cc-bytecomp.el, progmodes/cc-defs.el - (cc-eval-when-compile): Move from cc-bytecomp to cc-defs to - allow use at runtime. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-bytecomp.el (cc-eval-when-compile): - Workaround for a bug with nested `eval-when-compile' in XEmacs 21. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el: Added autoloaded forms to install the - appropriate file suffixes on `auto-mode-alist'. Necessary in - XEmacs 21.5, and it can be useful elsewhere too. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el (c-lineup-cascaded-calls): Handle "." - too, for use in Java. - - * progmodes/cc-engine.el (c-forward-sws, c-backward-sws): - Do not handle cpp directives in languages that doesn't have any. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el (c-operators): Add a high level description - of all operators, along with their precedence and associativity. - - * progmodes/cc-align.el (c-lineup-multi-inher): Fix bug - where the position of the point and not the beginning of the - line was used to calculate the indentation. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-defs.el, progmodes/cc-engine.el - (c-backward-single-comment, c-backward-comments): Add kludge - for the bug in `forward-comment' in most (X)Emacs versions - where it moves back over the "*/" of a block comment if - there's no matching "/*". This has become more important now - since it can cause incorrect caching by `c-backward-sws'. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-cmds.el (c-hungry-backspace) - (c-hungry-delete-forward): New functions to do hungry deletion - regardless of hungry-delete mode. Contributed by Kevin Ryde. - - * progmodes/cc-engine.el (c-forward-sws, c-backward-sws) - (c-invalidate-sws-region): Use text properties to cache regions - with complex syntactic whitespace. This helps a lot in - improving responsiveness when there are lots of comments and - cpp directives before point. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-guess.el, progmodes/cc-langs.el, - progmodes/cc-menus.el, progmodes/cc-mode.el, - progmodes/cc-styles.el, progmodes/cc-vars.el, - progmodes/cc-engine.el, progmodes/cc-fonts.el, - progmodes/cc-cmds.el, progmodes/cc-defs.el: Introduce a - classification of functions into those that make "hidden - buffer changes" and those who don't. This is prompted by the - increasing use of text properties for various things, to - correctly cover the silly buffer modifications that is caused - by text property changes. - (c-save-buffer-state): New macro that's put around any code that - can manipulate text properties. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el (c-basic-common-init): - Setup `text-property-default-nonsticky' to avoid messing with the - rear-nonsticky property on each character in Emacs 21. - - * progmodes/cc-defs.el (c-clear-char-syntax, c-put-char-syntax): - Macros that sets and removes the - syntax-table property on a single character and makes the - property nonsticky in both directions in a suitable way for - each (X)Emacs flavor. - - * progmodes/cc-vars.el, progmodes/cc-defs.el, - progmodes/cc-engine.el, progmodes/cc-mode.el: - Use `lookup-syntax-properties' in XEmacs to control whether the - syntax-table property has any effect or not. - - (c-parse-sexp-lookup-properties): New macro that expands to either - `parse-sexp-lookup-properties' or `lookup-syntax-properties'. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-defs.el, progmodes/cc-engine.el, - progmodes/cc-fonts.el: Put the faces into the buffer in the - same way as the font-lock package does. This fixes a - compatibility problem with XEmacs which sets an extra - font-lock property. - - * progmodes/cc-fonts.el (c-put-font-lock-face): A macro that - finds out the right way to put font lock faces at compile - time. We're definitely not byte code portable between Emacs - and XEmacs now. - - * progmodes/cc-engine.el (c-forward-sws, c-backward-sws): - Implement a cache for the last large skipped over syntactic - whitespace. This also has most effect after many macros. - - * progmodes/cc-engine.el, progmodes/cc-defs.el - (c-forward-syntactic-ws, c-backward-syntactic-ws): Utilize the - limit better when one is passed. These are now macros to - avoid a little overhead when no limit is given. - (c-forward-sws, c-backward-sws): New functions called by the - macros above to do the unbounded search. - - * progmodes/cc-fonts.el (c-font-lock-declarations): - Implement a cache for the first backward search for a - preceding `c-decl-prefix-re' match. This typically speeds up - interactive refontification a lot on the top level of macro - heavy header files. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-vars.el (c-emacs-features): Add check for - syntax text properties. - - * progmodes/cc-mode.el (c-basic-common-init): Turn on - `parse-sexp-lookup-properties' if it's supported. Define the - variable in any case since it's used at runtime to check on this. - - * progmodes/cc-langs.el (c-identifier-key): Support C++ - destructor names. - (c-identifier-start, c-op-token-regexp, c-type-modifier-kwds) - (c-opt-type-modifier-key, c-opt-type-component-key) - (c-typedef-specifier-kwds, c-typedef-specifier-key) - (c-paren-stmt-kwds, c-paren-stmt-key, c-syntactic-ws-start): - A bunch of new language constants and variables to support the - improved handling of names and types. - - * progmodes/cc-fonts.el (c-font-lock-declarators) - (c-font-lock-declarations): Handle C++ template declarations - and template references. Fontify complex types and names more - accurately by delegating it to `c-forward-type' and - `c-forward-name'. Fontify the identifiers in typedef - declarations as types. - - * progmodes/cc-engine.el (c-forward-<>-arglist): New function - to move forward over a C++ template arglist. It also marks - the '<' and '>' chars with paren syntax using the syntax-table - property, to speed up later calls in emacsen that support - syntax text properties (Emacs >= 20 and (undocumented) XEmacs 21). - This also has the very interesting effect that if font locking - is used with decoration level 3 or higher in these emacsen - then template arglists will behave just like paren sexps with - the various sexp movement commands. - (c-forward-name): New function to move over a name. Simple in - most languages except C++ where a name can contain template - arglists and therefore almost arbitrary expressions. - (c-on-identifier): Fix for Pike operator identifiers. - (c-simple-skip-symbol-backward, c-syntactic-content) - (c-remove-<>-paren-properties): New helper functions. - - * progmodes/cc-defs.el: (c-clear-char-syntax) - (c-mark-paren-open, c-mark-paren-close): New support functions - to handle syntactic properties on C++ template arglist brackets. - (c-put-type-face, c-put-reference-face): Helpers to put faces on - regions, since there are a bit of that inside `c-forward-name' etc - in progmodes/cc-engine.el. - - * progmodes/cc-engine.el, progmodes/cc-fonts.el, - progmodes/cc-langs.el: Fix the names on a number of regexp - language variables to conform to the nomenclature and - shortened some names. - - * progmodes/cc-align.el, progmodes/cc-cmds.el, - progmodes/cc-fonts.el, progmodes/cc-engine.el - (c-syntactic-re-search-forward): Remove the COUNT argument - since it's never used. Add an argument to tell which - subexpression whose end should be tested for syntactic - relevance. Using this also removes some optimizations, so - that it's possible to use a look behind subexpression that - matches the end of a literal or a close paren when PAREN-LEVEL - is used. - - (c-guess-continued-construct): Don't match <<= or >>= for the - stream-op syntactic element. - - * progmodes/cc-defs.el (c-paren-re, c-identifier-re): - Remove these helper macros since better and more correct tools are - now available in progmodes/cc-langs.el. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el (c-lineup-string-cont): New lineup - function to line up string literals that will be concatenated. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el (c-populate-syntax-table): - XEmacs classifies the hard space character as a symbol character - but it's better to let it be in the punctuation class so that it's - always highlighted with the inverted invalid face. It can - perhaps be argued that that character is allowed in - identifiers in some languages (haven't checked), but using it - would still be extremely confusing. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-statement-1): Fix a - case when a labeled substatement caused incorrect association - of the following continuation clause. - - * progmodes/cc-engine.el (c-syntactic-re-search-forward): - Handle the case when the syntactic match position is in the - middle of a comment starter. - - (c-guess-continued-construct): Analyze the "K&R region" of a - function nested inside a function as func-decl-cont and not - statement-cont. New case E. Also clean up case C (stream-op - recognition) a bit. - - * progmodes/cc-engine.el (c-parse-state, c-check-state-cache): - Move the check on `c-state-cache-start' from - `c-check-state-cache' to `c-parse-state' so that the state - cache isn't zapped if `c-check-state-cache' but not - `c-parse-state' is called during a temporary narrowing. - This fixes a performance problem that could occur when - `fill-paragraph' is used in font lock mode on a comment at the - end of a large class or function. - - (c-state-cache-start): Fix buffer localness. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el: Updates from the C99 standard (or - actually from the latest web accessible draft of it). - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el: Update the keywords and operator - tokens from the latest C++ and Java standards. Some other - multichar token corrections. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-cmds.el, progmodes/cc-engine.el, - progmodes/cc-vars.el (c-syntactic-context) - (c-syntactic-element): Do not bind any values to these - variables globally since they should always be dynamically - bound. This makes it much easier to debug cases when they've - gotten global values somehow. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el (c-regexp-opt): Fix to work around the - non-greedy behavior that the regexp engine sometimes exposes. - This bug only shows in (X)Emacs 19 where there's no regexp-opt package. - - * progmodes/cc-engine.el (c-syntactic-re-search-forward): - Add a feature to filter out matches in the middle of tokens. - Changed the comment to a docstring since I consider this - function generally useful. - - * progmodes/cc-defs.el (c-mode-symbol): Break out a part of - `c-mode-var'. - - * progmodes/cc-align.el (c-lineup-cascaded-calls) - (c-lineup-gcc-asm-reg): Cope with that `c-most-enclosing-brace' - might return nil. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-found-types, c-clear-found-types) - (c-add-type, c-check-type, c-add-complex-type) - (c-list-found-types, c-forward-type): Add a sort of symbol - table for types: If a name is recognized as a type in a - declaration it's added in an obarray to be able to recognize - it in other ambiguous declarations. - - (c-remove-ws): New helper function to canonicalize fully - qualified identifiers for `c-found-types'. - - * progmodes/cc-defs.el (c-mode-var): New defsubst to access - mode prefixed variables uniformly. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el (c-lineup-arglist-close-under-paren): - Work correctly with nested arglist-cont-nonempty symbols. - - (c-lineup-arglist-operators): New lineup function to line up infix - operators under the open paren of the surrounding sexp. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-forward-syntactic-ws): Fix a bug - that could cause an infinite loop if something that looks like - a macro begins in the middle of a line. - - (c-parse-state): Fix a bug that could cause `c-state-cache' - to contain two conses in sequence when there's an unbalanced - open paren in a macro. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-defs.el (c-face-name-p): A defsubst to - recognize the name of a face in a way that works also in XEmacs. - - * progmodes/cc-engine.el (c-forward-type): New function to - move past a type spec. - - * progmodes/cc-engine.el (c-syntactic-re-search-forward): - Fix behavior when the limit is reached inside a comment, - string, or a macro. - - * progmodes/cc-align.el, progmodes/cc-cmds.el, - progmodes/cc-engine.el (c-forward-single-comment, - c-forward-comments, c-backward-single-comment, - c-backward-comments): New replacements for `c-forward-comment' - that wraps `forward-comment' more efficiently in each of the - four different cases it's actually used. These replacements - also treats line continuations as whitespace. - - (c-forward-comment): Remove. The four different cases above - are basically different, so it's better to make them into - separate functions than choose between them at runtime using - the argument. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el (c-gnu-impose-minimum): Fix bug due - to the new placement of cpp-macro and comment-intro in the - syntactic context, as pointed out by Kevin Ryde. Change the - method that decides whether point is inside a top-level - construct to one that doesn't depend on the set of syntactic - elements so much. - - * progmodes/cc-defs.el (c-point): Use the functions - `line-beginning-position' and `line-end-position' in emacsen - that have them (currently Emacs 20 and later). - -2003-07-03 Martin Stjernholm - - * progmodes/cc-cmds.el (c-mask-comment): Fix a bug that - sometimes caused code after a closed block comment to be taken - into account when the fill prefix is calculated. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el (c-lineup-arglist, c-lineup-argcont) - (c-lineup-math, c-lineup-cascaded-calls, c-lineup-gcc-asm-reg): - Fixes to cope correctly with nested arglists for the lineups - that can be used with arglist-cont-nonempty. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-add-stmt-syntax, c-guess-basic-syntax): - Change the anchor position of - arglist-cont-nonempty and arglist-close so that a relative - indentation like + can be used with consistent results. - Prior to this, the indentation engine more or less assumed that - arglist-cont-nonempty always used `c-lineup-arglist'. - Those two syntax symbols also get the opening paren as an extra - position, to make it possible for `c-lineup-arglist' to - continue to do a proper job. - - * progmodes/cc-engine.el (c-get-syntactic-indentation): - A vector with an absolute indentation column now only overrides - the indentation for surrounding structures, i.e. those whose - syntactic elements are earlier in the `c-syntactic-context' - list, but not nested ones. This so that - e.g. `c-lineup-arglist' can reliably line up with the first - argument but still allow relative indentation changes for - nested things, e.g. the arglist-close of a nested argument - list. This change means that the order in - `c-syntactic-context' has become more essential. - (c-guess-basic-syntax): Changes to make the nesting order of the - returned syntax list correct. - - Compatibility note: This change means that `c-lineup-dont-change' - now (again) isn't absolutely sure to keep the current indentation. - However, I believe that most people use it for comments, macros - and string literals, and since those are nested innermost it won't - matter. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el, progmodes/cc-defs.el, - progmodes/cc-engine.el, progmodes/cc-vars.el - (c-guess-basic-syntax, c-calc-offset) - (c-get-syntactic-indentation, c-syntactic-context): - Extend the representation of the syntactic context: Previously it was - a list containing cons cells of the found syntactic symbols - and their relpos values. Now each element is instead a list - containing the syntactic symbol in the first element and the - relpos (if any) in the second. After that there might be more - elements, depending on the syntactic symbol. The line-up - functions get these additional elements as extra arguments. - - This change is slightly incompatible. Although the calling - convention for line-up functions is strictly extended, the format - of the `c-syntactic-context' variable has changed slightly. It's - believed that this incompatibility is minor, though; not a single - line-up function distributed with CC Mode needed to be changed, - for instance. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-styles.el (c-set-style, c-set-style-1): - Add another state for the `dont-override' flag where it only keeps - globally set variables. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-mode.el (c-postprocess-file-styles): Do nothing - except in CC Mode modes. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-vars.el, progmodes/cc-fonts.el, - progmodes/cc-langs.el, progmodes/cc-mode.el: Add font lock support. - - * progmodes/cc-engine.el (c-beginning-of-syntax): New function - to be used for font-lock-beginning-of-syntax-function. - It uses the state cache to quickly find a good position. - - * progmodes/cc-defs.el (c-major-mode-is): Allow a list of - modes. Made it a macro ensure that it's optimized to either - eq or memq for constant arguments. - - * progmodes/cc-mode.el (c-common-init): Do away with the - hardcoded setting of `comment-column'; it's a user variable - that we have no business meddling with. Since the default - value for it is 32 in all supported (X)Emacs versions, it's - also safe from a compatibility perspective. - - * progmodes/cc-mode.el (c-basic-common-init): New function - that contains only the syntax and line breaking/filling - initialization. It's intended for use by other modes that - embed CC Mode. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-add-stmt-syntax): Fix some cases - of wrong anchoring, e.g. for else-if compounds. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-guess-basic-syntax): Fix anchor - position for defun-open in K&R style functions. - - * progmodes/cc-engine.el (c-in-knr-argdecl): Don't trip up on macros. - - (c-search-decl-header-end): Handle C++ template arguments more - correctly. - - (c-beginning-of-decl-1): Fix when the declaration is first in a macro. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-decl-1): Better way - to handle protection labels, one which doesn't get confused by - inherit colons. - - (c-end-of-decl-1): Don't treat functions that have "class" or - "struct" in the return type as classes or structs. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-langs.el (c-make-keywords-re): Fix the - keyword adornment so that it works when a keyword ends with "_". - -2003-07-03 Martin Stjernholm - - * progmodes/cc-cmds.el (c-mask-comment): More fixes when used - from `c-do-auto-fill' and point is at or near the limit of the - comment. Fix bug when the prefix from `c-guess-fill-prefix' - is longer than the text on the first line of the comment when - it's masked. - -2003-07-03 Martin Stjernholm - - * progmodes/cc-cmds.el (c-mask-comment): Fix bug where point - was moved to the following line when it was at the first line - of a block comment where comment-start-skip matched to eol. - -2003-07-01 Luc Teirlinck - - * info.el (Info-fontify-menu-headers): Only fontify `* Menu:' at - the beginning of a line. - (Info-extract-menu-node-name): Correctly initialize while loop. - (Info-scroll-prefer-subnodes): Change default to nil. - - * simple.el (vis-mode): Update documentation string to reflect - earlier changes. - -2003-06-30 Richard M. Stallman - - * loadup.el (pure-space-overflow): Set it if overflow. - - * startup.el (pure-space-overflow): New variable. - (fancy-splash-screens-1): Display warning if overflow. - (normal-splash-screen): Likewise. - - * vc.el (vc-default-show-log-entry): Use with-no-warnings. - - * subr.el (lazy-completion-table, dynamic-completion-table): - New macros. - -2003-06-28 Richard M. Stallman - - * menu-bar.el (menu-bar-options-menu): Move mouse-set-fonts item here. - - * international/mule-cmds.el (mule-menu-keymap): - Delete mouse-set-fonts item here. - -2003-06-29 Nick Roberts - - * gdb-ui.el (gdb-display-number-end): Don't re-initialise local - variables to preserve array slices. - (gdb-array-slice): Rename gdb-mouse-array-slice. - (gdb-array-slice): Interactive function bound to "\r" for text - terminals. - (gdb-view-source): Rename gdb-view-source-function. - Set uninitialised variables (defvars) to nil. - -2003-06-29 Kai Gro,A_(Bjohann - - * international/mule-cmds.el - (set-display-table-and-terminal-coding-system): Remove CVS - conflict markers and some code. - -2003-06-27 Kai Gro,A_(Bjohann - - * international/mule-cmds.el (menu-bar-options-menu): - Move `mouse-set-fonts' here from Options/Mule submenu. - -2003-06-26 Stephen Eglen - - * iswitchb.el (iswitchb-read-buffer): Remove redundant variable - iswitchb-prepost-hooks. - (iswitchb-xemacs): Delete variable and use (featurep 'xemacs) - and fboundp instead. - (iswitchb-completions): Remove two redundant arguments and local - variables. (All above from Stefan Monnier). - -2003-06-20 Masatake YAMATO - - * progmodes/asm-mode.el (asm-font-lock-keywords): - Support labels starting with "." and directives starting with ".". - -2003-06-22 Andreas Schwab - - * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): - Avoid variable as format argument for error. - Don't call symbol-name on string. - - * eshell/esh-opt.el (eshell-do-opt): Avoid variable as format - argument for error. - - * simple.el (vis-mode): Doc fix. - -2003-06-22 Glenn Morris - - * calendar/diary-lib.el (diary-check-diary-file): New function. - (diary, view-diary-entries, show-all-diary-entries) - (mark-diary-entries): Use it. - (view-other-diary-entries): Doc fix. Use `prefix-numeric-value'. - (diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix. - (diary-modified, d-file): No need to defvar (for compiler). - (list-diary-entries): No need for `let*' so use `let'. - (simple-diary-display): Use `diary-file' directly rather than - inheriting `d-file' from `list-diary-entries' caller. - (make-fancy-diary-buffer, show-all-diary-entries): - `mode-line-format' already buffer-local. - (diary-mail-addr): Set to the empty string (rather than nil) if - undefined, as per `user-mail-address'. - (diary-mail-entries): Doc fix. Error if `diary-mail-address' unset. - (mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice. - Remove an un-needed `if'. - (list-sexp-diary-entries): Remove local vars mark and s-entry, and - use `let' rather than `let*'. - (diary-date, insert-monthly-diary-entry) - (insert-yearly-diary-entry, insert-anniversary-diary-entry) - (insert-block-diary-entry, insert-cyclic-diary-entry) - (font-lock-diary-date-forms): No need for `let*' so use `let'. - (make-diary-entry): Doc fix. Use `or' rather than `if'. - (diary-font-lock-keywords): Use `when'. `cal-islam' is required - feature, not `cal-islamic'. - `calendar-islamic-month-name-array-leap-year' does not exist - use - `calendar-islamic-month-name-array'. - -2003-06-21 Kenichi Handa - - * international/utf-16.el: Many name changes: utf-16-{be,le} -> - utf-16{be,le}. - (mule-utf-16-le, utf-16-le, mule-utf-16-be, utf-16-be): New coding - system aliases for backward compatibility. - - * international/utf-7.el: Adjusted for the name change: - xxx-utf-16-{le,be} -> xxx-utf-16{le,be}. - - * international/ucs-tables.el (ucs-unify-8859, ucs-fragment-8859): - Adjust for the name change: xxx-utf-16-{le,be} -> - xxx-utf-16{le,be}. - - * international/mule-conf.el: Adjusted for the name change: - xxx-utf-16-{le,be} -> xxx-utf-16{le,be}. - - * international/mule-cmds.el (reset-language-environment): - Adjust for the name change: xxx-utf-16-{le,be} -> - xxx-utf-16{le,be}. - -2003-06-20 Luc Teirlinck - - * vc.el (vc-rename-file): Fix typo. - -2003-06-19 Andreas Schwab - - * info.el (Info-fontify-node): Improve calculation of other-tag. - -2003-06-19 Stefan Monnier - - * progmodes/cc-mode.el (c-mode): Reverting last change. - -2003-06-18 Stefan Monnier - - * progmodes/gud.el (gud-find-expr-function): Rename from gud-find-expr. - (gud-find-fortran-expr): Move to fortran.el. - - * progmodes/fortran.el (fortran-gud-find-expr): Move from gud.el - where it was called gud-find-fortran-expr. - (fortran-mode): Set gud-find-expr-function. - -2003-06-18 Nick Roberts - - * gdb-ui.el (gud-display1): Keep the gdb command, "display", in - the command history. - (gdb-restore-windows): Make restore work when gdb-many-windows - is nil. - (gdb-source-info, gdba): Display assembler if there is no symbol - table for main, or message if there is no main. - (gdb-assembler-custom): Move point to current line of assembler. - - * progmodes/gud.el (gud-menu-map): Add dbx support for "run" and - "nexti". - (dbx): Define gud-nexti and gud-run. - (gud-find-expr, gud-find-fortran-expr): New functions. - (gud-find-expr): New variable. - (gud-find-c-expr): Simplify. - - * progmodes/fortran.el (fortran-gud-syntax-table): Syntax table - for parsing Fortran expressions for gud-print. (Stefan Monnier) - (fortran-mode): Add local variable gud-find-expr. - - * progmodes/cc-mode.el (c-mode): Add local variable gud-find-expr. - -2003-06-18 Stefan Monnier - - * subr.el (looking-back): Handle the case of non-trivial regexps. - Add an optional `limit' argument. - (push, pop, with-temp-file, with-temp-message, delay-mode-hooks) - (with-syntax-table): Add edebug info. - -2003-06-17 Stefan Monnier - - * simple.el (kill-new): Leave yank-handler property alone if no - explicit yank-handler is specified. - (vis-mode-saved-buffer-invisibility-spec): Rename from - saved-buffer-invisibility-spec. - (vis-mode): Correctly handle the case where the mode is turned on - or off several times in a row. - -2003-06-17 Luc Teirlinck - - * info.el (Info-fontify-node): Give only the last whitespace - character after the node name the display property. Give all - other such whitespace the invisibility property. - -2003-06-17 Pinku Surana - - * progmodes/sql.el: Add support for SQLite interpreter. - -2003-06-17 Kai Gro,A_(Bjohann - - Version 2.0.35 of Tramp released. - - * net/tramp.el (tramp-password-end-of-line): Use "xy" with plink. - (tramp-completion-function-alist): Add completion function for - "remcp", "remsh" and "plink1". - Factor out the `regular' file name handling via a remote shell of - some sort into a specific function. Intent is to later put that - part of Tramp into a special file, so that the Tramp `core' is - just a dispatcher that dispatches to various handlers. - (tramp-sh-file-name-handler): New function. - (tramp-foreign-file-name-handler-alist): New default value. - Call tramp-sh-file-name-handler as default case. - (tramp-file-name-handler): Do not invoke the old remote-shell handler. - (tramp-find-foreign-file-name-handler): Return after first match - is found. From Francis Litterio . - (tramp-handle-file-newer-than-file-p): `tramp-time-diff' returns - integer, not list. Do not apply `car' to the return value of - `tramp-time-diff'. Reported by David D. Smith - . - (tramp-time-diff): Convert return value of subtract-time to a - number of seconds in a correct manner, by applying float-time or - time-to-seconds. Also correct compat code accordingly. - The XEmacs branch for itimer-time-difference didn't need correction, - it returned a float already. Reported by David D. Smith - . - (tramp-handle-insert-file-contents): When calling - `file-local-copy', let-bind `inhibit-file-name-operation' - accordingly. This makes sure that jka-compr is not called when - `insert-file-contents-literally' is invoked. From Katsumi Yamaoka - . - (tramp-do-copy-or-rename-via-buffer): Avoid calling jka-compr when - writing the target file. - (tramp-foreign-file-name-handler-alist): Add comment about default - value having to come last. - (tramp-handle-file-local-copy, tramp-handle-write-region): Add the - "-p" hack. - (tramp-handle-copy-file): Set file modes of target file. - (tramp-handle-file-local-copy) - (tramp-do-copy-or-rename-via-buffer): Use binary coding system, - instead of no-conversion. They are the same on Emacs but - different on XEmacs. - (tramp-shell-prompt-pattern): Allow multiple escape - sequences (each with optional trailing space). - - * net/tramp-uu.el: - * net/tramp-util.el: - * net/tramp-efs.el: Use iso-2022-7bit encoding with coding cookie - for XEmacs compatibility. - -2003-06-17 Kenichi Handa - - * term/x-win.el (x-select-request-type): New variable. - (x-select-utf8-or-ctext): New function. - (x-selection-value): New function. - (x-cut-buffer-or-selection-value): Call x-selection-value to get - a selection data. Set next-selection-coding-system to nil. - - * select.el (x-get-selection): If the string returned by - x-get-selection-internal has text property `foreign-selection', - decode it while preserving that property. - -2003-06-16 Stefan Monnier - - * menu-bar.el (ispell-menu-bar): Don't autoload. - (cvs-global-menu): Use the function rather than the variable. - - * pcvs-defs.el (cvs-global-menu): Define as a function as well. - - * emacs-lisp/debug.el (debug): Fix call to message. - -2003-06-16 Michael Mauger (tiny change) - - * emulation/cua-base.el (cua-mode): Use explicit arg to turn off - minor modes. - -2003-06-16 Stefan Monnier - - * emacs-lisp/cl-extra.el (cl-macroexpand-all): - Don't burp if (cadr (caddr found)) encounters a non-list element. - - * emacs-lisp/cl-macs.el (cl-parse-loop-clause): Use map-keymap. - (defsubst*): Don't put a `cl-whole argument if it's not used. - - * emacs-lisp/cl-specs.el (pushnew): Use keywordp. - - * emacs-lisp/disass.el (disassemble): Accept plain expressions. - - * add-log.el (add-log-edit-prev-comment, add-log-edit-next-comment): - New commands. - (change-log-mode-map): Bind them. - (smerge-resolve-function): Declare to quieten the byte-compiler. - (change-log-mode): Add the keymap to the docstring. - -2003-06-16 Luc Teirlinck - - * simple.el (vis-mode): New function. - (saved-buffer-invisibility-spec): New variable. - -2003-06-16 Juanma Barranquero - - * progmodes/sh-script.el (sh-while-getopts, sh-if, sh-case): - Revert part of previous change. - -2003-06-16 Pieter E.J. Pareit - - * progmodes/mixal-mode.el: New file. - -2003-06-16 Markus Rost - - * files.el (recover-session-finish): Don't give up when there are - two consecutive empty lines in the auto-save-list file. - -2003-06-14 Stefan Monnier - - * emacs-lisp/copyright.el (copyright-update-year): New function - extracted from copyright-update. - When `arg' is set, replace the year, not the `copyright' text. - Ignore `copyright-update = nil' if called interactively. - Use "," rather than ", " if that's what was used before. - Recognize mixes of 2 and 4 digit years. - Use replace-match. - (copyright-update): Add interactivep arg. - Use it instead of use last-command. - Use replace-match. Don't assume (point-min) == 1. - - * textmodes/tex-mode.el (tex-compile-commands): - Handle tex-start-commands like tex-start-tex does. - - * cus-edit.el (custom-get-fresh-buffer): Kill overlays before erasing - the buffer. - -2003-06-13 Ilya N. Golubev (tiny change) - - * shell.el (shell-command-separator-regexp): New variable. - (shell-directory-tracker): Make regexp used for skipping to next - command correspond to one used for command itself. - -2003-06-13 Katsumi Yamaoka (tiny change) - - * textmodes/texinfmt.el (texinfo-format-scan): - Silence `whitespace-cleanup'. - -2003-06-12 Glenn Morris - - * calendar/timeclock.el (display-time-hook) - (timeclock-modeline-display): Define for byte-compiler. - (timeclock-time-to-date, timeclock-workday-remaining) - (timeclock-time-to-seconds, timeclock-seconds-to-time): - Move earlier in the file so defined before used. - (timeclock-status-string): No need for `let*' so use `let'. - (timeclock-query-out): Always return a non-nil value. - -2003-06-10 Rajesh Vaidheeswarran - - * whitespace.el (whitespace-version): Bump to 3.3 - (whitespace-cleanup): Respect user preference for silence - - * whitespace.el: Remove :tag in commentary :link. Remove empty - lines in comment, since commentary seems to have a problem with that. - -2003-06-09 Stefan Monnier - - * textmodes/tex-mode.el (tex-search-noncomment): New macro. - (tex-last-unended-begin, tex-next-unmatched-end): Use it - so we don't get confused by \begin and \end in comments. - (tex-compile): Change dir before calling tex-compile-default. - -2003-06-09 Luc Teirlinck - - * bindings.el (global-map): Bind `kill-whole-line' to - C-S-. Remove M-S- binding: too close to - C-M-. - - * dired.el (dired-re-dot): Make it handle trailing /. - (dired-get-filename): Update documentation string. - Revert previous change and fix typo in earlier version. - -2003-06-10 Kim F. Storm - - * info.el (Info-fontify-node): Make `invisible' property - non-sticky so that whitespace added by filling stays visible. - Make refilling less agressive by starting at beginning of current - line rather than beginning of current paragraph. - -2003-06-09 Andreas Schwab - - * dired.el (dired-get-filename): Complain only about "." and "..", - not all directories. - -2003-06-08 Nick Roberts - - * gdb-ui.el (gdb-get-current-frame, gdb-frame-handler): Use Gdb - command `info frame' instead of `frame' to preserve point. - (gdb-invalidate-assembler): Only run disassemble again if frame - has changed. - (gdb-append-to-inferior-io): Revert change from 2003-05-17. - -2003-06-07 Stefan Monnier - - * textmodes/texinfo.el (texinfo-enable-quote-macros): Fix thinko. - (texinfo-insert-@table): Remove unused arg. - (texinfo-show-structure): Remove unused var `source-buffer'. - - * info.el (Info-goto-node, Info-follow-reference, Info-menu-update) - (Info-fontify-node): Don't search past header-end. - Use match-string and line-end-position. - - * skeleton.el (skeleton-proxy-new): Consume the mark-active state. - - * textmodes/tex-mode.el (tex-mode-syntax-table) - (tex-latex-indent-syntax-table): Don't use easy-mmode-defsyntax. - -2003-06-07 Jason Rumney - - * mwheel.el (mouse-wheel-up-event, mouse-wheel-down-event): - Use wheel-* events on darwin. - -2003-06-06 Era Eriksson (tiny change) - - * shell.el (shell-resync-dirs): Tolerate an extra line of output - before the list of directories from `shell-dirstack-query' (it - looks for, and ignores, a literal copy of the value of - shell-dirstack-query). - -2003-06-06 Lute Kamstra - - * info.el (Info-complete-menu-item): Revert change of 2003-06-03. - -2003-06-06 Klaus Zeitler - - * progmodes/sh-script.el: Fix bug in "Options Loop" skeleton for - ksh. Add newlines to a few skeletons, add "select" keyword for bash. - -2003-06-06 Andreas Schwab - - * info.el (Info-select-node): Doc fix. - -2003-06-06 Miles Bader - - * frame.el (set-frame-font): Default to frame's current default font. - -2003-06-06 Kim F. Storm - - * info.el (Info-fontify-node): Don't refill over lines ending in a - period; this should fix problems with lists like one in the - (emacs)Library Keywords section. - -2003-06-05 Markus Rost - - * dired.el (dired-get-filename): Don't err for . and .. for calls - from dired-add-entry. - -2003-06-05 Takaaki Ota - - * textmodes/table.el (table-cell-horizontal-chars): Rename from - table-cell-horizontal-char. Now a string value instead of a - character. ?= is allowed for horizontal boundary as well as ?-. - (table-command-remap-alist, table-command-list): Change defconst to - defvar because the value is modified. - (table-insert, table-insert-row, table-insert-column) - (table-recognize, table-recognize-region, table-widen-cell) - (table-span-cell, table-split-cell-vertically): Change due to - table-cell-horizontal-chars. - (table--cell-horizontal-char-p): New function. - (table--generate-source-scan-lines, table-delete-row) - (table-delete-column, table--spacify-frame) - (table--find-row-column, table--probe-cell-left-up) - (table--probe-cell-right-bottom, table--probe-cell): Change due to - table-cell-horizontal-chars. From David Abrahams - - -2003-06-05 Juanma Barranquero - - * gud.el: Moved to progmodes. - -2003-06-05 Benjamin Riefenstahl (tiny change) - - * progmodes/tcl.el (tcl-mode): Set imenu-generic-expression to the - value of tcl-imenu-generic-expression instead of the symbol. - -2003-06-05 Luc Teirlinck - - * info.el (Info-mode): Mention `c' and remove duplicate mention - of `q' in documentation string. - -2003-06-05 Lute Kamstra - - * shell.el (shell-mode): Put `shell-filter-ctrl-a-ctrl-b' on - `comint-output-filter-functions' when bash is used as the inferior - shell. - (shell-filter-ctrl-a-ctrl-b): New function. - -2003-06-05 Dave Love - - * vc-hooks.el (vc-make-backup-files): Add :group backup. - -2003-06-05 Kim F. Storm - - * info.el (Info-fontify-node): Individually refill menus and - paragraphs to preserve menu items and varying indentation. - Only color first 9 menu items differently. - -2003-06-05 Juanma Barranquero - - * desktop.el: Add new maintainer. - -2003-06-04 Stefan Monnier - - * textmodes/sgml-mode.el (sgml-parse-tag-backward): Try and detect - when we're starting from within a tag. - (sgml-get-context): When called from inside a tag, do something useful. - Rename the arg now that it's never used for `full' context anymore. - (sgml-calculate-indent): Make `lcon' an argument. - Return nil when we DON'T know what to do. - If the initial lcon turns out to be wrong, try again. - (sgml-indent-line): If sgml-calculate-indent returns nil, don't indent. - -2003-06-04 Jason Rumney - - * mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event): - Default to new wheel-up and wheel-down events on MacOS. - - * term/mac-win.el: No need to bind wheel events specially. - -2003-06-04 Luc Teirlinck - - * simple.el (yank-excluded-properties): Expand documentation string. - -2003-06-04 Richard M. Stallman - - * emacs-lisp/lisp-mnt.el (lm-keywords-finder-p): - Use with-no-warnings. - - * gud.el (gud-minor-mode-type): Move defvar up. - - * progmodes/compile.el (compilation-next-error): When moving fwd, - compare position of point with the errors. - - * dired.el (dired-get-filename): Err for . and .. in usual case. - (dired-get-file-for-visit): Specify no-error to dired-get-filename, - and check for real errors here. - (dired-unmark-all-files): Specify no-error to dired-get-filename. - - * buff-menu.el (list-buffers-noselect): Use window-inside-edges - to compute the number of offset spaces. - (list-buffers-noselect): Use Buffer-menu-buffer+size to - indent the dashes properly. Put some in fixed-pitch. - -2003-06-04 Lars Hansen - - * desktop.el (desktop-create-buffer): Undo last change. - (desktop-kill, desktop-save, desktop-remove): Use expand-directory - rather than concat to construct desktop filename. - (desktop-kill, desktop-read, desktop-change-dir): - Ensure desktop-dirname is a directory name. - (desktop-change-dir): Fix bug when DIR was relative. - -2003-06-04 Alex Coventry (tiny change) - - * files.el (after-find-file): Fix arguments of call to `sit-for'. - -2003-06-03 Stefan Monnier - - * info.el (Info-extract-menu-node-name): Remove unused arg errmessage. - (Info-follow-reference): Update corresponding call. - (Info-node-spec-re): New const. - (Info-complete-menu-item): Use it to only allow : when necessary. - (Info-fontify-node): Use it as well. Fixup typo. - - * info.el (info-fontify-node): Use better help-echo text. - Use :align-to display prop. - Use `invisible' rather than `display' prop to hide text. - - * info.el (Info-mode-hook): Obey obsolete `Info-fontify'. - (Info-find-in-tag-table-1): Remove unused vars. - (Info-display-images-node): Remove unused var paragraph-markers. - (Info-header-line): Remove. - (Info-select-node): Don't set it. - (Info-search): Remove unused var `current'. - (Info-follow-reference): Remove unused var `beg'. - (Info-extract-menu-node-name): Remove unused var `i'. - (Info-complete-menu-item): Use `with-current-buffer'. - (Info-index): Remove unused var `rnode'. - (Info-mode): Set header-line-format to check text-properties directly. - (Info-find-emacs-command-nodes): Remove unused var `found' and `exact'. - (Info-fontify-node): Use `push'. - (Info-speedbar-hierarchy-buttons): Use `dolist'. - (Info-speedbar-goto-node, Info-speedbar-fetch-file-nodes): - Check the return value of `string-match'. - (Info-speedbar-fetch-file-nodes): Factor out common code. - -2003-06-03 Lute Kamstra - - * cus-edit.el (custom-get-fresh-buffer): Test for nonexistence buffer. - -2003-06-03 Richard M. Stallman - - * emacs-lisp/lisp-mode.el (eval-last-sexp-1): - Add save-excursion. - - * windmove.el (windmove-reference-loc, windmove-frame-edges): - Use window-inside-edges. - (windmove-do-window-select): Fix error messages. - - * files.el (after-find-file): Simplify msg if nonexistent directory. - (make-directory): Doc fix. - - * dabbrev.el (dabbrev--goto-start-of-abbrev): - Use minibuffer-prompt-end. - - * comint.el (comint-move-point-for-output): Renamed from - comint-scroll-to-bottom-on-output. Old name is alias. - All uses changed. Doc fix. - (comint-scroll-show-maximum-output): Doc fix. - - * comint.el (comint-exec-1): Don't use directory-sep-char. - (comint-dynamic-complete-as-filename): Likewise. - - * bindings.el (global-map): Delete C-M-delete and C-M-backspace. - -2003-06-03 Markus Rost - - * progmodes/ps-mode.el (ps-mode): Use autoload cookie in the - standard way. - -2003-06-02 Stefan Monnier - - * textmodes/bibtex.el (bibtex-member-of-regexp) - (bibtex-assoc-of-regexp, bibtex-format-entry, bibtex-find-entry) - (bibtex-autokey-demangle-name, bibtex-string-files-init, bibtex-mode): - Fix up regexp usage and use match-string. - -2003-06-02 Roland Winkler - - * textmodes/bibtex.el: Long overdue merge. - Don't require `compile' since it seems unnecessary. - For all internal variables and functions the docstring comments have - been converted into proper docstrings - (bibtex-maintainer-address, bibtex-maintainer-salutation) - (bibtex-version): Remove support for bug reporting. - (bibtex-field-delimiters, bibtex-entry-delimiters) - (bibtex-sort-ignore-string-entries, bibtex-maintain-sorted-entries) - Replace make-variable-buffer-local by make-local-variable for - (bibtex-entry-format): New tag `required-fields'. - (bibtex-maintain-sorted-entries): New var. - (bibtex-sort-entry-class, bibtex-sort-entry-class-alist): New vars. - (bibtex-predefined-month-strings, bibtex-predefined-strings): - Make into alists with pairs (abbreviation expansion). - (bibtex-autokey-titleword-change-strings) - (bibtex-autokey-transcriptions): Make into alists. - Add new replacement pairs. - (bibtex-autokey-use-crossref): New var. - Replace bibtex-autokey-year-use-crossref-entry because updated code - for autokey generation handles crossrefs independently of - particular fields. - (bibtex-reference-key, bibtex-mode-syntax-table): - Remove = because it can't be part of a string's key. - (bibtex-complete-key-cleanup): New var. - (bibtex-complete): Merge bibtex-complete-string and bibtex-complete-key - into it (and bind to M-tab). - (bibtex-valid-entry-re, bibtex-any-valid-entry-re) - (bibtex-valid-entry-whitespace-re, bibtex-empty-field-re) - (bibtex-quoted-string-re): New vars. - (bibtex-field-name-for-parsing): Don't make-variable-buffer-local. - (zmacs-regions): Declare to quieten the byte-compiler. - (bibtex-comment-start): Don't include the space. - (bibtex-font-lock-syntactic-keywords): New var. - (bibtex-font-lock-keywords): Remove the entry for @Comment. - (bibtex-parse-field-string): Merge the functionality of - bibtex-parse-field-string-braced, bibtex-parse-quoted-string and - bibtex-parse-field-string-quoted. - (bibtex-search-forward-field-string): Remove. - (bibtex-parse-association): Use when. - (bibtex-parse-field-name): Use when. - (bibtex-parse-field-text): Use when and cond. - (bibtex-parse-field): Use let. - (bibtex-search-forward-field, bibtex-search-backward-field): - Make bound optional, use let, setq, and cddr. - (bibtex-start-of-field, bibtex-start-of-name-in-field) - (bibtex-end-of-name-in-field): Use nth. - (bibtex-name-in-field, bibtex-text-in-field-bounds) - (bibtex-text-in-field, bibtex-type-in-head, bibtex-key-in-head) - (bibtex-text-in-string): New functions. - (bibtex-reference-key-in-string): New fun. Merge of - bibtex-start-of-reference-key-in-string and - bibtex-end-of-reference-key-in-string. - (bibtex-parse-string-prefix): Use let and when. - (bibtex-parse-string-postfix): Use when. - (bibtex-search-forward-string, bibtex-search-backward-string): - Use save-excursion and setq. - (bibtex-member-of-regexp): Use let. - (bibtex-assoc-of-regexp): Use caar und let. - (bibtex-skip-to-valid-entry): Return buffer position. - (bibtex-map-entries): Use save-excursion. - (bibtex-progress-message): Simplify. - (bibtex-search-entry): Use skip-chars-forward, when, save-match-data. - (bibtex-move-outside-of-entry): Handle the case that point is before - first entry. - (bibtex-enclosing-field): Use save-excursion, when. - (bibtex-format-field-delimiters): Merge into bibtex-format-entry. - (bibtex-enclosing-entry-maybe-empty-head): Simplify. - (bibtex-format-entry): Simplify. Handle new tag required-fields of - bibtex-entry-format. - (bibtex-autokey-abbrev): Accept negative values of len. - (bibtex-autokey-get-field, bibtex-autokey-demangle-title): New funs. - (bibtex-autokey-get-namefield, bibtex-autokey-get-namelist) - (bibtex-autokey-get-yearfield-digits, bibtex-autokey-get-yearfield) - (bibtex-autokey-get-titlestring): Remove. - (bibtex-autokey-get-names): Simplify. - (bibtex-autokey-get-titles): Rename to bibtex-autokey-get-title. - (bibtex-autokey-demangle-name): Simplify, avoid error messages. - (bibtex-generate-autokey): Simplify. - (bibtex-parse-keys): Simplify, use push. - (bibtex-parse-strings): New fun similar to bibtex-parse-keys. - (bibtex-string-files-init): New fun. - (bibtex-parse-buffers-stealthily): Use bibtex-parse-keys, - bibtex-string-files-init and bibtex-parse-strings. - (bibtex-complete): Rename to bibtex-complete-internal, use push, - bibtex-reference-key-in-string, no sorting. - (bibtex-complete-string-cleanup): New fun, displays expansion of - completed strings. - (bibtex-choose-completion-string): New fun. Required for - choose-completion-string-functions. - (bibtex-do-auto-fill): Remove. Set fill-prefix in bibtex-mode. - (bibtex-pop): Simplify. - (bibtex-mode): Move setting of bibtex-string to bibtex-parse-strings. - Set choose-completion-string-functions. - (bibtex-print-help-message,bibtex-make-field, bibtex-end-of-entry) - (bibtex-count-entries): Simplify. - (bibtex-entry-index, bibtex-lessp): New funs for generalized sorting - scheme of indices, see bibtex-maintain-sorted-entries. - (bibtex-sort-buffer): Use bibtex-lessp for sorting. - (bibtex-find-crossref, bibtex-find-entry): New funs. - (bibtex-find-entry-location): Rename to bibtex-prepare-new-entry, use - bibtex-lessp, Simplify. - (bibtex-validate): Simplify. Fixe bug of internal variable - questionable-month. - (bibtex-remove-OPT-or-ALT): Use when. - (bibtex-remove-delimiters, bibtex-kill-field, bibtex-kill-entry) - (bibtex-clean-entry, bibtex-fill-entry, bibtex-reformat): Simplify. - (bibtex-convert-alien): Use deactivate-mark rather than the - non-existent bibtex-mark-active variable. - (bibtex-complete-string, bibtex-complete-key): Merge into new - `smart' defun bibtex-complete. - (bibtex-String): Update for new sorting scheme, distinguish empty and - non-empty key strings. - -2003-06-02 Stefan Monnier - - * sort.el (sort-subr): Add `predicate' arg. Remove `sortcar' code. - -2003-06-02 Lute Kamstra - - * emacs-lisp/lisp-mnt.el (lm-synopsis): Use relative filenames - correctly. Show the synopsis to the user when appropriate. - Do not kill buffers that were created outside `lm-synopsis'. - -2003-06-01 Stefan Monnier - - * cus-edit.el (custom-get-fresh-buffer): Be extra paranoid, - just in case some used a file of the wrong name. - - * progmodes/sh-script.el (sh-is-quoted-p): New fun. - (sh-font-lock-paren): Use it to allow \C in case patterns. - (sh-get-indent-info): Check the \n before the line for string-status. - (sh-feature): Remove unused var `function'. - (sh-get-indent-info): Remove unused variables. - (sh-prev-thing): Remove unused vars `going', `n', and `found'. - (sh-set-indent): Remove unused var `new-val' and `val0'. - (sh-learn-buffer-indent): Remove unused vars `last-pos' and `lines'. - (sh-guess-basic-offset): Remove unused var `return' and `j'. - -2003-05-27 David Ponce - - * ruler-mode.el - - Version 1.6 - - Take into account changes made to the display margins, fringes and - scroll-bar handling. - - (ruler-mode-margins-char): Remove. Not used anymore. - (ruler-mode-pad-face, ruler-mode-fringes-face): New faces. - (ruler-mode-margins-face): New definition. Move. - (ruler-mode-left-fringe-cols) - (ruler-mode-right-fringe-cols) - (ruler-mode-left-scroll-bar-cols) - (ruler-mode-right-scroll-bar-cols): Reimplement. Move. - (ruler-mode-full-window-width) - (ruler-mode-window-col): New functions. - (ruler-mode-mouse-set-left-margin) - (ruler-mode-mouse-set-right-margin) - (ruler-mode-mouse-add-tab-stop) - (ruler-mode-mouse-del-tab-stop): Reimplement. - (ruler-mode-mouse-current-grab-object): Rename to... - (ruler-mode-dragged-symbol): New. - (ruler-mode-mouse-grab-any-column): Use it. Clean up. - (ruler-mode-mouse-drag-any-column): Likewise. - (ruler-mode-mouse-drag-any-column-iteration): Simplify. - (ruler-mode): Restore previous `header-line-format' if - `ruler-mode-header-line-format-old' has a local binding in current - buffer. - (ruler-mode-left-margin-help-echo) - (ruler-mode-right-margin-help-echo): Remove. - (ruler-mode-margin-help-echo) - (ruler-mode-fringe-help-echo): New constants. - (ruler-mode-ruler): Use them. Reimplement. - -2003-06-01 Jason Rumney - - * mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event): - Default to new wheel-up and wheel-down events on Windows. - - * term/w32-win.el: No need to bind wheel events specially. - -2003-06-01 Michael Kifer - - * desktop.el (desktop-create-buffer): Add (desktop-first-buffer) to - the let-statement to avoid the startup error that desktop-first-buffer - is undefined. - -2003-06-01 Andreas Schwab - - * man.el (Man-name-regexp): Also match Latin-1 soft hyphen. - (Man-build-references-alist): Handle Latin-1 soft hyphen. - -2003-05-31 Stephen Eglen - - * iswitchb.el (iswitchb-buffer-ignore): Update custom type to - allow functions. - -2003-05-31 Stefan Monnier - - * view.el (view-file, view-file-other-window, view-file-other-frame): - Signal an error when trying to visit an inexistent file. - - * vc-hooks.el (vc-call-backend): Give better error message - when a backend function is missing. - (vc-find-file-hook): USe unless. Merge if and cond. - - * vc.el (vc-directory-exclusion-list): Add MCVS and .svn. - (vc-checkin-hook): Adjust option to new name. - - * log-edit.el (log-edit-maximum-comment-ring-size) - (log-edit-comment-ring, log-edit-comment-ring-index) - (log-edit-last-comment-match): Rename vars from - vc-maximum-comment-ring-size, vc-comment-ring, vc-comment-ring-index, - and vc-last-comment-match. - (log-edit-new-comment-index, log-edit-previous-comment) - (log-edit-next-comment, log-edit-comment-search-backward) - (log-edit-comment-search-forward, log-edit-comment-to-change-log): - Rename funs from vc-new-comment-index, vc-previous-comment, - vc-next-comment, vc-comment-search-reverse, vc-comment-search-forward, - and vc-comment-to-change-log. - - * wid-edit.el (widget-specify-insert): Simplify. - (widget-editable-list-entry-create): Don't assume that %d and %i are - in the format string. - (widget-map-buttons): Remove unused var `parent'. - (widget-move): Remove unused shadowed var `new'. - (widget-color-action): Remove unused var `pos'. - - * cus-edit.el (custom-get-fresh-buffer): New fun. - (custom-buffer-create, custom-buffer-create-other-window) - (customize-browse): Use it instead of killing buffers. - (custom-bury-buffer): Obey the argument. - (custom-variable-reset-saved, custom-variable-reset-standard): - Remove unused var `comment-widget'. - (custom-face-edit-deactivate): Remove unused var `to'. - (custom-save-variables): Remove unused var `sep'. - -2003-05-31 John Paul Wallington - - * files.el (large-file-warning-threshold): Add type, groups. - - * progmodes/delphi.el (delphi-ignore-changes): Defvar; non-constant. - -2003-05-31 Kenichi Handa - - * files.el (recover-file): Bind coding-system-for-read to - auto-save-coding. - -2003-05-31 Juanma Barranquero - - * misc.el (mark-beginning-of-buffer, mark-end-of-buffer) - (upcase-char, forward-to-word, backward-to-word): Move from unused.el. - - * unused.el: Deleted (contents moved to misc.el). - - * options.el: - * emacs-lisp/float.el: - * textmodes/scribe.el: Moved to obsolete. - - * byte-run.el: - * derived.el: - * float-sup.el: - * map-ynp.el: - * regi.el: - * timer.el: - * warnings.el: Moved to emacs-lisp. - - * enriched.el: Moved to textmodes. - - * textmodes/outline.el: Moved to lisp. - - * which-func.el: Moved to progmodes. - - * loadup.el: Load byte-run.el, map-ynp.el, timer.el and float-sup.el - from emacs-lisp. - -2003-05-31 Tom Wurgler (tiny change) - - * subr.el (looking-back): New function to check for regular - expression before point. - -2003-05-30 Stefan Monnier - - * newcomment.el (comment-empty-lines): New var. - (comment-region-internal): Use it. - - * textmodes/tex-mode.el (latex-block-args-alist) - (latex-block-body-alist): New vars. - (latex-insert-block): Use them. - (tex-string-prefix-p): New fun. - (tex-guess-main-file): Use it to detect when the main file - is in a parent directory. - (tex-main-file): Try to find a main-file in parent directories. - (tex-compile-default): Don't use `gv' on pdf files just because - `gv' was used recently on a ps file. Remove unused arg `dir'. - Reuse a previous command as-is if it applied to the same file. - (tex-compile): Use the right file name when file is not in dir. - - * textmodes/refill.el (refill-adjust-ignorable-overlay): - Don't hardcode pint-min == 1. - (refill-fill-paragraph-at): Use a more robust method to detect - when the paragraph is after point. Remove unused var `fill-pfx'. - - * xml.el (xml-parse-tag): Return (foo nil) rather than (foo nil "") - for , to make it behave like . - - * emacs-lisp/edebug.el (edebug-storing-offsets): Move indent - and debug to inside the macro. - (edebug-read-storing-offsets): Simplify. - (edebug-read-quote, edebug-read-function): Place the - start-position correctly. - (edebug-read-backquote-new): Remove. - (edebug-read-backquote-level): New var to replace it. - (edebug-read-backquote): Increment it. - Don't store offsets one extra time. - (edebug-read-comma): Decrement it. Read the comma as a plain - symbol if outside of any new-style backquote. - (edebug-read-list): Use edebug-read-backquote-level. - Don't call edebug-read-backquote directly. This way the extra - offsets store is done exactly when it's needed. - (edebug-read-vector): Use push. - (defmacro): Add support for the `declare' thingy. - -2003-05-29 Stefan Monnier - - * forms.el (forms-mode-hook): Rename from forms-mode-hooks. - (forms-mode): Use add-hook rather than make-local-variable+setq. - Use with-current-buffer. Run the new and the old hooks. - (forms--update): Use with-current-buffer and line-end-position. - (forms--goto-record): New fun. - (forms-jump-record, forms-insert-record, forms-delete-record): Use it. - (forms--process-format-list): Remove unused var `this-item'. - (forms--intuit-from-file): Remove unused var `the-result'. - (forms--trans): Remove unused var `x'. - (forms--exit, forms-exit, forms-exit-no-save): Remove unused arg. - - * emacs-lisp/edebug.el (edebug-window-list): Use push. - (edebug-macrop): Use functionp. - (edebug-functionp): Remove. - (edebug-get-displayed-buffer-points): Use push. - (edebug-set-buffer-points): Use save-current-buffer and buffer-live-p. - (edebug-list-form): Remove dead code. - (backquote-form): Correctly handle `(a . ,b). - (edebug-mode-map, global-edebug-map): Move init to inside the defvar. - (define-derived-mode, define-minor-mode): Remove outdated spec. - (save-match-data, with-output-to-string, with-current-buffer) - (combine-after-change-calls, with-temp-buffer, dolist, dotimes) - (unless, when): Remove specs that are now in the corresponding macro. - - * emacs-lisp/easy-mmode.el (define-minor-mode): Add edebug spec. - Accept a :keymap argument, as you'd expect. - - * derived.el (define-derived-mode): Add a proper edebug declaration. - -2003-05-29 Luc Teirlinck - - * simple.el (kill-whole-line): Make it interact correctly with - the kill ring. - -2003-05-29 Kenichi Handa - - * international/mule.el (ctext-non-standard-encodings-alist): - Rename from non-standard-icccm-encodings-alist. - (ctext-non-standard-encodings-regexp): New variable - (ctext-post-read-conversion): Full rewrite. - (ctext-non-standard-designations-alist): Rename from - non-standard-designations-alist. - (ctext-pre-write-conversion): Full rewrite. - -2003-05-28 Stefan Monnier - - * info.el (Info-fontify-node): Hide \n------- rather than -------\n. - - * skeleton.el (skeleton-edebug-spec): First cut of an edebug spec. - (define-skeleton): Use it. - -2003-05-28 Andreas Schwab - - * descr-text.el (describe-char): Use `char' instead of - `(char-after)'. Fix display of unicode. - -2003-05-28 Nick Roberts - - * gud.el (gud-gdb-goto-stackframe, gud-gdb-get-stackframe): - Add server prefix to the gdb commands used by the speedbar. - -2003-05-28 Kai Gro,A_(Bjohann - - * simple.el (kill-region): If nothing was killed, and the - previous command was not a kill, break kill sequence. - -2003-05-28 Richard M. Stallman - - * textmodes/refill.el (refill-fill-paragraph-at): - Avoid refilling the following paragraph. - (refill-doit): Doc fix. - - * emulation/vip.el (ctl-x-map): Don't bind C-x C-i or C-x 3. - (global-map): Don't bind C-z. - (vip-setup): New function to rebind C-x 7 and C-z. - - * emacs-lisp/lisp-mode.el (last-sexp-toggle-display): - Undo previous change (don't check for eob). Widen at the beginning. - - * map-ynp.el (map-y-or-n-p): No special handling for exit-prefix. - In help string, mention C-g but not ESC. - - * jka-compr.el (jka-compr-insert-file-contents): - When REPLACE, delete the proper range of text. - - * info.el (Info-index): Add autoload cookie. - - * forms.el (forms-mode): Use write-file-functions instead - of local-write-file-hooks. Use make-local-variable to make it local. - - * descr-text.el (describe-char-unicode-data): New dummy definition. - (unicode-data): Comment out since we can't use UnicodeData.txt as is. - (describe-char-unicodedata-file): Variable renamed and commented out. - - * faces.el (set-face-attribute): Set face-modified prop to t - when we change the new-frame defaults. - (face-spec-set): Set face-modified prop to nil - when we change the new-frame defaults. - - * cus-edit.el (custom-face-state-set): non-nil `face-modified' - means face was set outside of Custom. - -2003-05-28 Richard M. Stallman - - * byte-run.el (with-no-warnings): New function. - - * emacs-lisp/bytecomp.el (byte-compile-no-warnings): New function. - (with-no-warnings): Set up compile handler. - - * startup.el (command-line-1): Use with-no-warnings. - - * type-break.el (type-break-cancel-function-timers): - Use with-no-warnings. - -2003-05-28 Luc Teirlinck - - * env.el (substitute-env-vars): Fix typo. - -2003-05-28 Walter C. Pelissero (tiny change) - - * net/browse-url.el (browse-url-mozilla): Correct the conditionals - for using ,new-window. - -2003-05-27 Glenn Morris - - * progmodes/sh-script.el (sh-here-document-word): - Document new treatment of leading "-". - (sh-maybe-here-document): Strip a leading "-" from closing - heredoc delimiter, if present. - - * align.el (align-rules-list): Doc fix. - - * calendar/timeclock.el: Update copyright. - (timeclock-ask-before-exiting): Put `timeclock-query-out' on - `kill-emacs-query-functions' rather than `kill-emacs-hook'. - (timeclock-mode-string): Doc fix. - (timeclock-modeline-display): Doc fix. Use `global-mode-string' - rather than `mode-line-format'. - (timeclock-query-out): Doc fix. - (timeclock-update-modeline): No need for `let*', so use `let'. - Add some help-echo text to `timeclock-mode-string'. - (timeclock-mode-string): Give it the risky-local-variable - property, so that help-echo text will display. - (timeclock-find-discrep): Set `accum' to 0 if - `timeclock-discrepancy' is nil. - -2003-05-27 Stefan Monnier - - * emacs-lisp/lisp-mode.el (lisp-font-lock-syntactic-face-function): - Don't infinite loop at bob. - (emacs-lisp-mode): Mark its main custom group to be `lisp'. - (prin1-char): New fun. - (eval-last-sexp-1): Use it. Use with-syntax-table as well. - (eval-defun-1): Don't replace `defvar' with `defconst'. - -2003-05-27 Kai Gro,A_(Bjohann - - * bindings.el (global-map): Bind M-S- - - * gud.el (gud-find-class): Remove unused var `pos'. - (gdb-script-mode-syntax-table, gdb-script-font-lock-keywords) - (gdb-script-font-lock-syntactic-keywords) - (gdb-script-font-lock-syntactic-face, gdb-script-basic-indent) - (gdb-script-skip-to-head, gdb-script-calculate-indentation) - (gdb-script-indent-line, gdb-script-mode): New mode to edit - .gdbinit-like scripts. - -2003-05-26 John Paul Wallington - - * faces.el (display-supports-face-attributes-p): Doc fix. - (x-create-frame-with-faces): Call `face-set-after-frame-default'. - -2003-05-26 Kai Gro,A_(Bjohann - - * bindings.el (global-map): Don't bind S-. Too many - people hit it by mistake. - -2003-05-26 Andre Spiegel - - * vc.el (vc-delete-file): Fix free variable reference. - (vc-annotate-display): Remove obsolesence declaration; it isn't - obsolete. - -2003-05-25 Kevin Ryde - - * info-look.el (autoconf-mode setups): Recognise AH_ and AU_ entries - in "(autoconf)Autoconf Macro Index". Add "(autoconf)M4 Macro Index" - and "(autoconf)Autotest Macro Index". Remove duplicate copy of - "(automake)Macro and Variable Index". Keep automake after all - autoconf possibilities, so as to prefer those. - -2003-05-25 Stefan Monnier - - * skeleton.el (skeleton-internal-1): Don't loop if interactor of - subskeleton is nil. - (skeleton-pair-default-alist): New var. - (skeleton-pair-insert-maybe): Use it. Don't munge multibyte chars. - -2003-05-25 Nick Roberts - - * gdb-ui.el (gdb-info-breakpoints-custom, gdb-assembler-custom): - Put string associated with breakpoint at start of line so that it - is always visible. - (gdb-display-source-buffer): Display assembler during execution, - when requested. - (gud-menu-map): Add a toggle button to menubar for gdb-many-windows. - (gdb-many-windows): Define explicitly as a function and a variable - (formerly as a minor mode). These need to be global so layout can - be reset from any buffer. - (gdb-assembler-mode): Keep fringe outside margin as the overlay - arrow is not used for assembler. - -2003-05-25 Tim Van Holder - - * which-func.el (which-func-update-timer): New variable. - (which-function-mode): Use it. - -2003-05-25 Richard M. Stallman - - * simple.el (idle-update-delay): New variable. - -2003-05-25 Luc Teirlinck - - * simple.el (forward-visible-line): Fix negative arguments. - -2003-05-25 Juanma Barranquero - - * skeleton.el (skeleton-pair-insert-maybe): Remove leftover - reference to skeleton-abbrev-cleanup. - -2003-05-24 Andreas Schwab - - * files.el (insert-directory): Preserve CR in a file name. - -2003-05-24 Stefan Monnier - - * skeleton.el (skeleton-abbrev-cleanup, skeleton-proxy): - Remove obsolete code. - - * term/w32-win.el (iconify-or-deiconify-frame): - * term/mac-win.el (iconify-or-deiconify-frame): Move to frame.el. - - * term/x-win.el (iconify-or-deiconify-frame): Move to frame.el. - Turn on mouse-wheel support by default. - - * frame.el (iconify-or-deiconify-frame): Move from term/x-win.el. - -2003-05-24 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.34 released. - (tramp-handle-file-symlink-p): If target of symlink is absolute, - return a Tramp filename. (Ie, return "/user@host:/target" instead - of "/target".) - (tramp-handle-file-truename): Deal with new return value from - `file-symlink-p'. - (tramp-handle-expand-file-name): Make default method explicit in - file name. - (tramp-unified-filenames): Move to an earlier spot in the file. - (top-level): If tramp-unified-filenames is set and we're running - on XEmacs, load tramp-efs. - (tramp-wait-for-shell-prompt, tramp-barf-if-no-shell-prompt): - New functions, used by tramp-send-command-internal. - (tramp-open-connection-setup-interactive-shell): Simplify using - `tramp-send-command-internal'. - (tramp-send-command-internal): New function. - (tramp-methods): New entries "remsh" and "remcp" are like "rsh" - and "rcp" but invoke "remsh" instead of "rsh". This is useful on - Cray systems, for instance. Unify tramp-rsh-program, - tramp-telnet-program, tramp-su-program into tramp-login-program. - Likewise with tramp-login-args, tramp-copy-program, - tramp-copy-args, tramp-copy-keep-date-arg. Users changed. New - method plink1; like plink but pass "-1" to force protocol version 1. - (tramp-default-method): Use plink as the default on machines where - the plink program is present. - (tramp-completion-file-name-handler): Add safe-magic property. - (tramp-shell-prompt-pattern): Allow ANSI escapes at - end of prompt. (ANSI escapes elsewhere in the prompt are - recognized properly already.) - - * net/tramp-efs.el: New file. - -2003-05-24 Michael Albinus - - * net/tramp.el (tramp-handle-file-truename): `sym' shouldn't be - quoted. - (tramp-methods, tramp-multi-connection-function-alist): - Use argument "-p Password:" for "sudo" method, because password prompt - might be changed by either passprompt option in /etc/sudoers, or - SUDO_PROMPT environment variable. Suggested by Peter Oliver - . - -2003-05-23 Stefan Monnier - - * mail/supercite.el: Use `push' and replace `regi-pos' by equivalents. - (sc-emacs-features): Remove. Use better tests instead. - (sc-minor-mode): Use define-minor-mode. - (sc-mode-string, sc-set-mode-string): Remove. - Use a better modeline expression instead. - (sc-completing-read, sc-read-string, sc-submatch, sc-member) - (sc-string-text): Remove those compatibility functions. - - * pcvs.el (cvs-temp-buffer): Kill running process in displayed buffers. - (cvs-make-cvs-buffer): Fix up format of the header. - - * progmodes/perl-mode.el (perl-font-lock-syntactic-keywords): - Match more cases of /.../ patterns. - -2003-05-23 Nick Roberts - - * gdb-ui.el (gdba): Accommodate Fortran programs. - (gud-gdba-command-name): Use -noasync in all cases (as Fortran - seems to require it also). - (gdb-source-info): Parse correctly when compilation directory - specifies host also (IRIX). - -2003-05-23 Andre Spiegel - - * vc-cvs.el (vc-cvs-checkout): Don't leave the branch when - REV is t. From Don Provan - -2003-05-23 Richard M. Stallman - - * forms.el (forms--mode-commands1): Bind \t, not `tab'. - (forms--mode-commands): Don't bind \t in the maps where - we call forms--mode-commands1. - -2003-05-23 Taro Kawagishi - - * arc-mode.el (archive-lzh-summarize): Calculate correct total - header size for LZH level 1 header. - -2003-05-23 Richard M. Stallman - - * textmodes/paragraphs.el (repunctuate-sentences): Add doc string. - -2003-05-23 Daniel Ortmann (tiny change) - - * textmodes/paragraphs.el (repunctuate-sentences): New function. - -2003-05-23 Lute Kamstra - - * emacs-lisp/lisp-mnt.el: Make the description of the library more - accurate. - (lm-any-header): New user option. - (lm-section-start): New function; rewrite of `lm-section-mark'. - (lm-section-mark): Make alias of `lm-section-start'. - (lm-section-end): New function. - (lm-code-start): New function; rewrite of `lm-code-mark'. - (lm-code-mark): Make alias of `lm-code-start'. - (lm-commentary-start): New function; rewrite of `lm-commentary-mark'. - (lm-commentary-mark): Make alias of `lm-commentary-start'. - (lm-commentary-end): New function. - (lm-history-start): New function; rewrite of `lm-history-mark'. - (lm-history-mark): Make alias of `lm-history-start'. - (lm-commentary): Use `lm-commentary-end' to find the end of the - commentary section. - - * emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): - Use `lm-commentary-end' to find the end of the commentary section. - -2003-05-22 Stefan Monnier - - * skeleton.el (define-skeleton): Use the `no-self-insert' property. - (skeleton-proxy-new): Fix docstring. Remove broken interactive spec. - Rely on use `no-self-insert' rather than `skeleton-abbrev-cleanup'. - (skeleton-internal-1): Add a `recursive' argument. - (skeleton-internal-list): Use it to propagate `recursive'. - -2003-05-22 Ken Stevens - - * ispell.el: Sync to version 3.6. - Summary: MIME support added for e-mail processing that - skips encoded regions. Allow user to skip saving Fcc messages with - large attachments. Fixed region skipping bug with multi-line - comments - e.g. tex $ regions spanning multiple lines. - Added support for postscript and uuencoded regions. - Redundant dictionary file names purged. - Dictionary definition field name changed from "Character Set" - to "Coding System". Fixed bug in reloading dictionaries. - Modified headers to reflect new version. XEmacs menu now adds - customize item. - (ispell-check-version): No longer an aliased function. - Returns library path if not called interactively. - Variable `temporary-file-directory' protected if not loaded. - (check-ispell-version): Now the alias for `ispell-check-version'. - (ispell-message-fcc-skip): New variable that determines if and when - to query about saving Fcc copy of message if an attachment is large. - (ispell-skip-html): Declare buffer-local. - (ispell-local-dictionary-alist): Docstring expanded. - Tag name changed from "Character Set" to "Coding System". - (ispell-dictionary-alist-1): Remove redundant command-line option to - load brasileiro, british, and castellano dictionary files. - (ispell-dictionary-alist-2): Remove redundant command-line option to - load czech dictionary file. - (ispell-dictionary-alist-3): Move francais-tex here. - (ispell-dictionary-alist-4): Remove german and german8 dictionaries. - The deutsch ones are the correct definitions. `nederlands' - and `nederlands8' dictionaries moved here. - (ispell-dictionary-alist-5): `polish' and `portugues' dictionaries - moved here. Removed redundant command-line option to `norsk' - and `portugues'. - (ispell-dictionary-alist-6): Remove redundant command-line option to - load `russian' and `slovak' dictionary files. - (ispell-dictionary-alist): Tag name changed from "Character Set" to - "Coding System". - (ispell-version): Update to 3.6. - (ispell-library-directory): Calls non-deprecated function. - (ispell-valid-dictionary-list): New function returning all valid - dictionaries on machine. - (ispell-checking-message): Documentation string improved. - (ispell-skip-region-alist): Add uuencoded and postscript region - skipping. Improve http/e-mail/file regexp to not match `/.\w'. - (ispell-html-skip-alists): New variable for html region support. - (ispell-send-string): Remove redundant xemacs check. - (ispell-word): Fix spelling error in documentation string, add - extent information to support highlighting in ispell-minor-mode. - (ispell-command-loop): Disable horizontal scrollbar in XEmacs - choices buffer. - (ispell-show-choices): Directly select `choices-window'. - (ispell-help): Use default buffer size for electric help. - (ispell-adjusted-window-height): Correct for xemacs detection. - (ispell-start-process): Don't double specify dictionary file name. - (ispell-init-process): Set `ispell-library-path' each call. - (ispell-change-dictionary): Now only completes valid dictionaries. - (ispell-region): Add support for MIME region skipping and Fcc - message query for large attachments. - (ispell-begin-skip-region-regexp): Add documentation string. - Add message support and clean up code for generic and html regions. - (ispell-begin-skip-region): Function is now requires alist argument. - (ispell-begin-tex-skip-regexp): Add comments and support - improved html and message regions. - (ispell-skip-region-list): New function for MIME and region skipping. - (ispell-tex-arg-end): Add documentation string. - (ispell-ignore-fcc): New function to query saving Fcc message. - (ispell-skip-region): Calculate alist for key match dynamically, - html skipping pushed to alists. - (ispell-get-line): Add support for multi-line comment regions. - (ispell): Check that variables to continue spelling are bound. - (ispell-message-text-end): Postscript and uuencoded regions now - supported as MIME regions, rather than as end-of-message region. - (ispell-mime-multipartp): New function supporting MIME. - (ispell-mime-skip-part): New function supporting MIME. - (ispell-message): Add MIME support. - (ispell-buffer-local-parsing): Variable `ispell-skip-html' now local. - (ispell-buffer-local-dict): Fix bug for detecting and reloading - new dictionary. - -2003-05-22 Stephen J. Turnbull - - * subr.el (split-string): Implement specification that splitting on - explicit separators retains null fields. Add new argument - OMIT-NULLS. Special-case (split-string "a string"). - -2003-05-22 Stefan Monnier - - * international/mule-cmds.el (select-safe-coding-system): - Try default-buffer-file-coding-system too for automatic selection. - -2003-05-21 Stefan Monnier - - * simple.el (ctl-x-map): Remove the C-x U binding added recently. - -2003-05-21 Dave Love - - * descr-text.el (unicodedata-file): New. - (unicode-data): New (adapted from unicode branch). - (describe-char): Use it. Print char's unicode differently. - Avoid elements with null cadr when formatting list. Clarify error - message when used in Help buffer. - (button): Require when compiling. - (describe-char-after): Alias for obsolete command. - -2003-05-21 Nick Roberts - - * gdb-ui.el (gud-gdba-command-name): Use -noasync option for Gdb - with MS windows. - (gdb-display-end): Only make buffer writeable temporarily. - Move "View" submenu up one level. - -2003-05-21 Nick Roberts - - * gdb-ui.el (gdb-view-source, gdb-selected-view): New variables. - (gdba): Inhibit DOS window in MS Windows. - (gdb-inferior-io-mode): Use hexl instead of cat. - (gdb-info-breakpoints-custom, gdb-assembler-custom, gdb-reset): - Use text in margin for MS Windows as there is no image support. - (gdb-restore-windows, gdb-setup-windows): Restore/start with - assembler view if appropriate. - (gdb-assembler-custom): Assembler code should display at point. - Parse address correctly. - (gdb-frame-handler): Accommodate selection of display of source - or assembler. - Add radio buttons to select display of source or assembler. - -2003-05-20 Lars Hansen - - * desktop.el (desktop-save): Ensure parameter is expanded and ends - with a slash before assigning it to desktop-dirname and - default-directory. - (desktop-read): Put buffers existing prior to evaluating the - desktop (and not reused) at the end of the buffer list. - (desktop-create-buffer): Don't update desktop-first-buffer for old - desktop files. - -2003-05-19 John Paul Wallington - - * xml.el (xml-name-regexp): Wrap in `eval-and-compile'. - -2003-05-19 Dave Love - - * xml.el: Doc fixes. - (xml-parse-file, xml-parse-region): Autoload. - (xml-syntax-table, xml-name-regexp): New. - (xml-parse-region): Narrow to region, set syntax-table and - case-fold-search. Reject fewer valid documents. - (xml-parse-tag): Remove arg END. Callers changed. - (xml-parse-tag): Use skip-syntax-forward. Use PARSE-DTD arg - properly. Don't use buffer-substring-no-properties. Don't bind - case-fold-search. Fix syntax for empty elements. Hoist consing - of end-of-tag regexp out of loop. - (xml-parse-attlist): Remove arg. Callers changed. - Use skip-syntax-forward, replace-regexp-in-string, forward-sexp. - Allow non-ASCII names. - (xml-skip-dtd): Remove arg. Callers changed. Change matching code. - (xml-parse-dtd): Grok external DTDs. Allow non-ASCII. - Don't use match-string-no-properties. - (xml-ucs-to-string): Delete. - (xml-substitute-entity): New. - (xml-substitute-special): Use it. - (xml-debug-print-internal): Simplify insertions. - (xml-parse-file): Avoid finding file in xml-mode. - -2003-05-19 Kai Gro,A_(Bjohann - - * simple.el (kill-whole-line): New function. - * bindings.el (global-map): Bind it. - -2003-05-19 Richard M. Stallman - - * net/goto-addr.el (goto-address-fontify-maximum-size): - Value t means no limit. - (goto-address-fontify): Implement that feature. - - * emacs-lisp/find-func.el (find-function-on-key): - Move the call to find-function-other-window outside - the save-excursion. - - * find-file.el (ff-special-constructs): Delete the Ada entry. - - * faces.el (x-create-frame-with-faces): - Don't call face-set-after-frame-default. - (face-set-after-frame-default): Copy attrs of global `default' - face to FRAME's `default' face. - -2003-05-19 Joe Kelsey - - * skeleton.el (skeleton-internal-1): Allow - as alternate - interesting point marker and revert @ to just setting - skeleton-positions. - -2003-05-18 Stefan Monnier - - * emacs-lisp/lisp.el (beginning-of-defun-raw): Use shy-group. - - * progmodes/executable.el (executable-set-magic): Remove unused - vars `point' and `buffer-modified-p'. - - * mail/sendmail.el (mail-mode): Don't bother setting paragraph-start. - - * mail/mail-extr.el: Use explicit coding tag. - - * international/mule.el (sgml-xml-auto-coding-function) - (sgml-html-meta-auto-coding-function): Don't assume point-min == 1. - - * language/china-util.el (hz-set-msb-table): Build when compiling. - (big5-to-cns): Pre-build the alist when compiling. - - * language/ind-util.el (indian-regexp-of-hashtbl-keys): Don't bother - sorting the argument to regexp-opt. - (indian--puthash-char): Use dolist rather than mapc. - -2003-05-18 Nick Roberts - - * gdb-ui.el (put-arrow): Rename gdb-put-arrow and simplify. - (put-string): Rename gdb-put-string and simplify. - (remove-strings): Rename gdb-remove-strings. - (remove-arrow): Rename gdb-remove-arrow. - (gdb-assembler-custom): Try to get line marker (arrow) to display - in window (revisited). - Use with-current-buffer where possible. - -2003-05-18 John Paul Wallington - - * ibuffer.el (ibuffer-display-summary): New customizable variable. - (ibuffer-update-title-and-summary): Respect it. - -2003-05-18 Michael Kifer - - * ediff-mult.el (ediff-default-filtering-regexp): New variable. - - * ediff-util.el (ediff-maybe-save-and-delete-merge): Change in a - message. - - * ediff.el (ediff-directories,ediff-directory-revisions) - (ediff-directories3,ediff-merge-directories) - (ediff-merge-directories-with-ancestor,ediff-merge-directory-revisions) - (ediff-merge-directory-revisions-with-ancestor): Make use of the new - ediff-default-filtering-regexp variable. - -2003-05-18 Richard M. Stallman - - * which-func.el (which-func-current, which-func-format): - Preload the risky-local-variable properties for them. - - * subr.el (prepare-change-group): Reinstate BUFFER arg; make it work. - -2003-05-18 Nick Roberts - - * gud.el (gdb): Define gud-nexti. - (gud-menu-map): Add gud-nexti to map. - (gud-tool-bar-map): Add gud-nexti and gud-stepi to toolbar. - - * toolbar/gud-stepi.xpm, toolbar/gud-stepi.pbm, - toolbar/gud-nexti.xpm, toolbar/gud-nexti.pbm: New icons for debugger. - -2003-05-17 John Paul Wallington - - * international/ja-dic-cnv.el (skkdic-okuri-nasi-entries) - (skkdic-okuri-nasi-entries-count): Use defvar for non-constants. - - * register.el (number-to-register): Use `string-to-number' instead - of `string-to-int'. - -2003-05-17 Stefan Monnier - - * log-edit.el: Don't require vc.el anymore. - (log-edit-mode-map): Fold vc-log-mode-map into it. - (vc-log-mode-map): Redefine as an alias. - (vc-previous-comment): Don't widen. - (vc-comment-to-change-log): Don't redundantly set paragraph-separate. - Don't require `add-log' since it's already required at toplevel. - - * vc.el (vc-log-mode-map, vc-maximum-comment-ring-size) - (vc-comment-ring, vc-comment-ring-index, vc-last-comment-match): - Move vars to log-edit.el. - (vc-new-comment-index, vc-previous-comment, vc-next-comment) - (vc-comment-search-reverse, vc-comment-search-forward) - (vc-comment-to-change-log): Move funs to log-edit.el. - (vc-clear-context): Don't empty the comment-ring. - (vc-finish-logentry): Don't add the comment onto the comment-ring. - - * log-edit.el (vc-log-mode-map, vc-maximum-comment-ring-size) - (vc-comment-ring, vc-comment-ring-index, vc-last-comment-match): - Move vars from vc.el. - (vc-new-comment-index, vc-previous-comment, vc-next-comment) - (vc-comment-search-reverse, vc-comment-search-forward) - (vc-comment-to-change-log): Move funs from vc.el. - (log-edit-show-files): Remove unused var `editbuf'. - - * progmodes/tcl.el (tcl-indent-exp): Remove dead code. - (tcl-tab-always-indent): Default to tab-always-indent. - - * progmodes/perl-mode.el (perl-end-of-function): Remove unused var. - (perl-tab-always-indent): Default to tab-always-indent. - - * which-func.el (which-func-format): Make it risky-local-variable. - (which-func-table): New var. - (which-func-current): Make it into a constant modeline spec. - (which-func-previous): Remove. - (which-func-update): Only update the selected window. - (which-func-update-1): Use the new var to allow the current - function to be different for a buffer shown in two windows. - - * subr.el (with-selected-window): New macro. - (dolist, dotimes, with-current-buffer): Use backquotes. - (when, unless, save-match-data, combine-after-change-calls) - (with-output-to-string, with-temp-buffer): Add `declare' info. - (listify-key-sequence): Don't allocate unnecessarily. - (read-quoted-char): Allow up to base 36. - (prepare-change-group): Remove unimplemented argument. - (macro-declaration-function): Avoid `dolist' and `cadr'. - - * wid-edit.el (pp-to-string, Info-goto-node): Don't autoload. - (widget-choose, widget-map-buttons): Use with-current-buffer. - (widget-field-add-space): Change to nil (and to defconst). - (widget-info-link-action): Use `info'. - -2003-05-17 Nick Roberts - - * gdb-ui.el (gdb-info-frames-custom): Reverse contrast of face for - selected frame. - (gdb-annotation-rules): Stop using frames-invalid and - breakpoints-invalid annotations. Update after post-prompt instead. - (gdb-post-prompt): Update frames and breakpoints here. - (gdb-invalidate-frame-and-assembler) - (gdb-invalidate-breakpoints-and-assembler): Remove. - (gdb-current-address): Remove. - (gdb-previous-address): New variable. - (gud-until): Extend to work in Assembler buffer - (gdb-append-to-inferior-io): Select IO buffer when there is output. - (gdb-assembler-custom): Try to get line marker (arrow) to display - in window. Correct parsing for OS dependent output syntax of Gdb - command, where. - (gdb-frame-handler): Correct parsing for OS dependent output - syntax of Gdb command, frame. - (gdb-invalidate-assembler): Update assembler buffer correctly when - frame changes (revisited). - -2003-05-16 Stefan Monnier - - * imenu.el (imenu--split-menu): Remove unused var `count'. - Don't copy the sequence since we're already modifying it elsewhere. - (imenu--create-keymap): Rename from imenu--create-keymap-1. - Add optional `cmd' argument. Remove unused var `counter'. - (imenu-update-menubar): Use the new arg to keep the old behavior. - (imenu--mouse-menu): Don't use the arg, to recover the lost behavior. - -2003-05-16 Lute Kamstra - - * hl-line.el (hl-line-highlight, global-hl-line-highlight): - Use `line-beginning-position' to determine the beginning of the next - line. - -2003-05-16 Kenichi Handa - - * international/mule-cmds.el (mule-menu-keymap): Enable the menu - set-various-coding-system when - default-enable-multibyte-characters is non-nil. - -2003-05-15 Stefan Monnier - - * emacs-lisp/autoload.el (make-autoload): Add arglist for - define-derived-mode. - -2003-05-15 Lute Kamstra - - * hl-line.el: Rewrite the local minor mode so that it can be - sticky as well and made sticky the default. Reimplement the - global minor mode. Update the commentary section to document - these changes. - (hl-line-sticky-flag): New user option. - (hl-line-overlay): Make it buffer-local and give it a docstring. - (global-hl-line-overlay): New variable. - (hl-line-mode): Rewrite to use `hl-line-sticky-flag'. - (hl-line-highlight): Rewrite to use `hl-line-sticky-flag'. - (hl-line-unhighlight): Update docstring. - (global-hl-line-mode): Implement directly so that is does not - depend on `hl-line-mode' any more. - (global-hl-line-highlight, global-hl-line-unhighlight): New functions. - -2003-05-15 Kenichi Handa - - * international/code-pages.el (cyrillic-koi8-t): Alias of koi8-t. - -2003-05-15 Vinicius Jose Latorre - - * ps-print.el: Avoid unnecessary calls to funs in header and footer - variables. Reported by Greg Hill . - (ps-print-version): New version number (6.6.1). - (ps-begin-page): Code fix. - (ps-generate-string-list, ps-header-footer-string): New funs. - (ps-lh-cache, ps-rh-cache, ps-lf-cache, ps-rf-cache): New vars. - - * ps-mule.el (ps-mule-header-string-charsets): - Call ps-header-footer-string to avoid unnecessary calls to functions - in header and footer variables. - -2003-05-15 John Paul Wallington - - * mail/rmail.el (rmail-ignored-headers): Ignore Face: header. - -2003-05-14 Stefan Monnier - - * textmodes/tex-mode.el (tex-compile-history, tex-input-files-re) - (tex-use-reftex, tex-compile-commands): New vars. - (tex-summarize-command, tex-uptodate-p, tex-executable-exists-p) - (tex-command-executable, tex-command-active-p, tex-compile-default) - New functions. - (tex-compile): New command. - (tex-mode-map): Bind it to C-c C-c. - - * vc-svn.el (completion-ignored-extensions): Add .svn. - (vc-svn-delete-file): New function. - - * pcvs.el (cvs-append-to-ignore): New arg `old-dir'. - (cvs-mode-ignore): Use it. - - * pcvs-parse.el (cvs-parse-table): Remove unused var `type'. - Look up `.cvsignore' to see what to do with `new-dir' messages. - (cvs-parse-merge): Remove unused var `handled'. - -2003-05-14 Christoph Wedler - - * format.el (format-annotate-function): Copy coding system into the - new temp buffer. - -2003-05-14 John Paul Wallington - - * ls-lisp.el (insert-directory): Discard --dired switch when - `ls-lisp-use-insert-directory-program' is nil. - -2003-05-13 Stefan Monnier - - * textmodes/ispell.el (xemacsp): Remove. Use (featurep 'xemacs). - (ispell-graphic-p): Inline and then remove. - (toplevel): Get rid of unnecessary loop. - (ispell-parse-output, ispell-complete-word): Replace (substring s 0 1) - with a call to aref. - (ispell-get-line): Remove unused arg `reg-end'. - (ispell-region): Update corresponding call. - - * progmodes/cpp.el (cpp-make-overlay-hidden): Don't make intangible. - - * progmodes/compile.el (compile-internal): Use with-current-buffer. - (compilation-set-window-height): Use save-selected-window. - - * progmodes/ada-xref.el (ada-xref-update-project-menu): Use easymenu. - (ada-goto-declaration-other-frame): Remove unused arg other-frame. - (ada-gdb-application): Remove unused vars comint-exec, in-post-mode, - and gud-gdb-massage-args. - - * progmodes/cc-langs.el (c-lang-defvar-init-form-tail): - This is actually not a constant. - - * progmodes/autoconf.el (autoconf-current-defun-function): - Copy the syntax table before modifying it. - - * progmodes/ada-mode.el (ada-in-comment-p, ada-in-string-p) - (ada-in-string-or-comment-p): Use line-beginning-position. - - * textmodes/reftex.el (reftex-select-with-char): Don't assume - that point-min == 1. - - * textmodes/reftex-toc.el (reftex-toc-visit-location): - Don't switch the current window if the new buffer is in another. - (reftex-toc): Don't assume that point-min == 1. - - * textmodes/reftex-parse.el (reftex-what-macro): Don't assume - that point-min == 1. - - * textmodes/reftex-cite.el (reftex-extract-bib-entries) - (reftex-extract-bib-entries-from-thebibliography): New arg re-list. - (reftex-extract-bib-entries): Use ^ rather than \(\`\|[\n\r]\). - Use member-ignore-case. Don't add unnecessary trailing \n. - (reftex-offer-bib-menu): Consolidate duplicated code from - reftex-extract-bib-entries and - reftex-extract-bib-entries-from-thebibliography. - - * simple.el (back-to-indentation): Simplify. - (undo-equiv-table, undo-in-region, undo-no-redo): New vars. - (undo): Use them to implement the no-redo form of undo. - (undo-only): New fun. - (shell-command): Don't require `shell' since shell-mode is autoloaded. - (insert-buffer): Simplify. - (completion-setup-function): Use minibufferp. - (event-apply-alt-modifier, event-apply-super-modifier) - (event-apply-hyper-modifier, event-apply-shift-modifier) - (event-apply-control-modifier, event-apply-meta-modifier): - Fix docstring to show the proper key sequence. - - * uniquify.el (uniquify-after-kill-buffer-p): Set default to t. - (uniquify-ignore-buffers-re): Revert to nil now that uniquify - is more careful about preserving buffer names. - - * menu-bar.el (menu-bar-options-menu) : - Use menu-bar-make-mm-toggle. - - * files.el (file-relative-name): Remove dead code. - Make sure \n in a filename does not confuse us. - - * help-fns.el (describe-variable): Mention permanent local status. - - * comint.el (comint-carriage-motion, comint-output-filter): - Bind inhibit-read-only rather than buffer-read-only. - (comint-truncate-buffer): Bind inhibit-read-only. - - * pcvs.el (cvs-make-cvs-buffer): Add the tag info. - (cvs-mode): Prevent pilot-error. - - * vc-mcvs.el (vc-mcvs-registered, vc-mcvs-root): Check the output - of file-name-directory for nil. - -2003-05-13 Simon Josefsson - - * mail/smtpmail.el (smtpmail-open-stream): Don't hard code - starttls-program. - -2003-05-13 Rajesh Vaidheeswarran - - * whitespace.el (whitespace-global-mode): Add :link entry - to the commentary section in whitespace.el - -2003-05-13 Nick Roberts - - * gdb-ui.el (gdb-invalidate-assembler): Update assembler buffer - correctly when frame changes. - (gdb-info-threads-custom, gdb-threads-buffer-name) - (gdb-display-threads-buffer, gdb-frame-threads-buffer) - (gdb-threads-mode-map, gdb-threads-mode, gdb-get-thread-number) - (gdb-threads-select, gdb-threads-mouse-select): New functions and - variable for a buffer that provides a selectable threads list. - -2003-05-12 Stefan Monnier - - * pcvs-parse.el (cvs-parse-table): `New directory' messages include - the full path. - - * pcvs.el (cvs-minor-current-files): Move before first use. - (defun-cvs-mode): Remove unused var `restdoc'. - (cvs-edit-log-revision, ediff-after-quit-hook-internal): Declare. - (cvs-mode-diff-backup): Remove unused var `filter'. - (cvs-mode-run): Remove unused var `cvs-buf'. - (cvs-mode-do): Remove unused arg `parse'. - (cvs-retrieve-revision): Make sure HEAD gets the head of the branch. - - * textmodes/sgml-mode.el (sgml-namespace-re): New const. - (sgml-namespace-face): New face. - (sgml-font-lock-keywords-1): Use them. - -2003-05-11 Kevin Ryde - - * info-look.el (info-lookup-make-completions): Allow colons in index - entries by looking for ": " to terminate, as per latest info.el. - -2003-05-11 Stefan Monnier - - * vc-mcvs.el (vc-mcvs-command): Filter output of `status'. - (vc-mcvs-state, vc-mcvs-dir-state, vc-mcvs-print-log, vc-mcvs-diff): - Change dir so that the filtered output of `mcvs makes sense. - (vc-mcvs-mode-line-string): Handle the case where CVS is desync'd. - (vc-mcvs-diff-tree): Don't bother with the local-diff code. - (vc-mcvs-create-snapshot): Use `branch' and `switch'. - -2003-05-10 Stefan Monnier - - * newcomment.el (comment-indent): Try to align to adjacent comments. - (comment-with-narrowing): Actually use the arguments. - (comment-valid-prefix-p): Rename from comment-valid-prefix - and fix to actually use its argument. - - * tex-mode (tex-mode-syntax-table): ~ is not whitespace. - (tex-guess-mode): Add `renewcommand'. - (tex-mode): Move the autoload to get the correct docstring and usage. - - * uniquify.el (uniquify-rationalize-file-buffer-names): - Refresh the dirname in the case that rename-buffer was skipped. - (uniquify-buffer-file-name): Return a dirname with no trailing slash. - - * mail/smtpmail.el (smtpmail-send-queued-mail): Use point-at-bol - instead of forward-line. - -2003-05-10 Oliver Scholz - - * startup.el (fancy-splash-default-action): Fix docstring. - -2003-05-09 Sam Steingold - - * pcvs.el (cvs-mode-find-file): Fixed the last patch's logic. - -2003-05-09 Stefan Monnier - - * newcomment.el (comment-indent): Be more careful when inserting - the space, and insert it before setting `begpos'. - - * vc.el: New backend functions `delete-file' and `repository-hostname'. - (vc-stay-local): New var. Mostly taken from vc-cvs-stay-local. - (vc-stay-local-p): New fun. Adapted from vc-cvs-stay-local-p. - (vc-diff-switches-list): Revert to the Emacs-21.[123] semantics. - Mark as obsolete. - (vc-delete-file): New command. - (vc-default-rename-file): New function. - (vc-rename-file): Use it. - Be careful to disallow renaming if the file is locked or out-of-date. - (vc-ensure-vc-buffer, vc-next-action-on-file, vc-insert-headers) - (vc-cancel-version, vc-annotate): Use buffer-file-name variable. - - * vc-mcvs.el (vc-mcvs-stay-local): Remove unused var. - (vc-mcvs-state, vc-mcvs-dir-state, vc-mcvs-print-log, vc-mcvs-diff) - (vc-mcvs-diff-tree, vc-mcvs-annotate-command) - (vc-mcvs-make-version-backups-p): Use vc-stay-local-p. - (vc-mcvs-checkin): Disallow commits to a numbered rev. - (vc-mcvs-repository-hostname): New function. - (vc-mcvs-stay-local-p): Remove. - - * vc-cvs.el (vc-cvs-mode-line-string): Use vc-default-mode-line-string. - (vc-cvs-delete-file, vc-cvs-rename-file): New functions. - - * vc-svn.el (vc-svn-rename-file): New fun. - (vc-svn-diff): Correctly check svn's return status. - (vc-svn-state, vc-svn-dir-state, vc-svn-print-log, vc-svn-diff) - (vc-svn-diff-tree): Use vc-stay-local-p. - (vc-svn-register-switches, vc-svn-diff-switches, vc-svn-header) - (vc-svn-use-edit): Fix the :version property. - (vc-svn-stay-local): Remove unused var. - (vc-svn-mode-line-string): Remove, use the default instead. - (vc-svn-repository-hostname): New fun taken from vc-svn-stay-local-p. - (vc-svn-stay-local-p): Remove. - - * uniquify.el: Use the original buffer-name as `base' in place of the - nondirectory part of the file name. - (uniquify-rationalize-file-buffer-names): - Split the `newbuffile' arg into `base' and `dirname'. - Reuse old uniquify-items to avoid recomputing their base&dirname. - (uniquify-buffer-file-name): Only return the directory part. - (uniquify-rerationalize-w/o-cb): Don't bother reseting proposed names. - (rename-buffer): Use the `newname' arg as base. - (create-file-buffer): Split the file name into base and dirname. - -2003-05-09 Jesper Harder (tiny change) - - * mail/smtpmail.el (smtpmail-send-queued-mail): Don't use kill-line. - -2003-05-08 Stefan Monnier - - * uniquify.el (uniquify-after-kill-buffer-p): Fix misleading docstring. - (uniquify-make-item): Make `proposed' optional. - (uniquify-rationalize-file-buffer-names): Don't compute the - initial proposed name. - (uniquify-buffer-file-name): Remove dead code. - (uniquify-strip-common-suffix): New var. - (uniquify-rationalize): Always recompute initial proposed name. - Strip common suffix if requested. - - * vc-rcs.el (vc-rcs-register, vc-rcs-checkin, vc-rcs-checkout) - (vc-rcs-find-version, vc-rcs-diff): Use vc-switches. - - * vc-sccs.el (vc-sccs-register, vc-sccs-find-version) - (vc-sccs-checkin, vc-sccs-checkout, vc-sccs-diff): Use vc-switches. - (vc-sccs-register): Remove unused var `|'. - - * vc-mcvs.el (vc-mcvs-read): Don't require `file' to exist. - (vc-mcvs-diff): Don't return 0 for newly added empty files. - (vc-mcvs-register, vc-mcvs-checkin, vc-mcvs-find-version) - (vc-mcvs-checkout, vc-mcvs-diff, vc-mcvs-diff-tree): Use vc-switches. - - * vc-cvs.el (vc-cvs-dired-state-info): Use `added' for added files and - don't use `concat' unnecessarily. Remove impossible cases. - (vc-cvs-diff): Don't return 0 for newly added empty files. - (vc-cvs-stay-local-p): Simplify. - (vc-cvs-register, vc-cvs-checkin, vc-cvs-find-version, vc-cvs-diff) - (vc-cvs-diff-tree, vc-cvs-checkout): Use vc-switches. - - * vc-svn.el (vc-svn-dired-state-info): Use `added' for added files and - don't use `concat' unnecessarily. Remove impossible cases. - (vc-svn-register, vc-svn-find-version, vc-svn-diff-tree): - Use vc-switches. - (vc-svn-checkin): Use vc-switches. Fix up regexp. - (vc-svn-diff): Use vc-switches. - Don't return 0 for newly added empty files. - Don't use svn's return status. - (vc-svn-parse-status): Recognize copied files as well. - Use the last-modified revision for workfile-version. - - * vc-hooks.el (vc-default-workfile-unchanged-p): Pass nil - rather than (vc-workfile-version file) to diff. - - * vc.el (with-vc-properties, with-vc-file, edit-vc-file): - Add `declare's for debugging and indentation. - (vc-do-command): Use `remq'. - (vc-buffer-context): Remove unused var `curbuf'. - (vc-next-action-dired): Remove unused var `dired-dir'. - (vc-switches): New fun. - (vc-diff-switches-list): Use it. - (vc-dired-hook): Remove unused var `cvs-dir'. - (vc-dired-purge): Remove unused var `subdir'. - (vc-cancel-version): Remove unused var `config'. - (vc-rename-master): Use dolist iso mapcar. - (vc-rename-file): Remove redundant tests. - Clear the properties of the old file name. - (vc-annotate): Pass the complete filename to `annotate-command'. - (vc-annotate-lines): Remove unused var `overlay'. - -2003-05-08 Glenn Morris - - * calendar/diary-lib.el (diary-pull-attrs): Make `ret-attr', - `attr' local. - (list-diary-entries): Make `temp' local. - (fancy-diary-display): Make `marks', `temp-face', `faceinfo' local. - (diary-mail-entries): There is no fancy-diary-buffer if there are - no diary entries. Use call-interactively. - (mark-diary-entries): Make `temp' local. - (mark-sexp-diary-entries): Make `marks' local, remove `temp'. - (list-sexp-diary-entries): Make `temp' local. - (add-to-diary-list): Make `prefix' local. - -2003-05-08 Dave Love - - * international/utf-7.el: New file. - -2003-05-07 Francis J. Wright - - * files.el (insert-file-contents-literally): Allow it to be called - within a magic file name handler. - -2003-05-07 Stefan Monnier - - * uniquify.el (uniquify-rationalize-file-buffer-names): - Don't uniquify if there is no filename. - - * vc-hooks.el: Use buffer-file-name variable rather than function. - (vc-handled-backends): Add SVN and MCVS. - (vc-mode-line): Call vc-backend only once. - (find-file-hook, find-file-not-found-hook): Use the new - names rather than ...-hooks. - - * uniquify.el (uniquify-item, uniquify-get-proposed-name) - (uniquify-rationalize-conflicting-sublist): Rename filename -> dirname. - (uniquify-rationalize): New fun. Set uniquify-managed to the fix-list. - (uniquify-rationalize-file-buffer-names): Use it and make the args - non-optional (i.e. don't support "re-rationalize all" any more). - (uniquify-rerationalize-w/o-cb): New fun. - (uniquify-maybe-rerationalize-w/o-cb): Use it to rerationalize - immediately and only the relevant buffers. - Merged from uniquify-delay-rationalize-file-buffer-names and - uniquify-delayed-rationalize-file-buffer-names. - (kill-buffer-hook, rename-buffer): Use it. - -2003-05-06 Jesper Harder - - * progmodes/compile.el (compile-internal): Don't quote nil and t in - docstrings. - - * emacs-lisp/eldoc.el (eldoc-echo-area-use-multiline-p): Likewise. - - * emacs-lisp/cl-macs.el (case, typecase): Likewise. - - * allout.el (allout-auto-activation) - (allout-use-mode-specific-leader, allout-reindent-bodies) - (allout-unprotected): Likewise. - - * progmodes/tcl.el (tcl-explain-indentation): Likewise. - - * progmodes/idlwave.el (idlwave-complete-special): Likewise. - - * progmodes/cpp.el (cpp-edit-list): Likewise. - - * progmodes/cperl-mode.el (cperl-lineup): Likewise. - - * progmodes/cc-align.el (c-lineup-argcont, c-lineup-gcc-asm-reg): - Likewise. - - * play/mpuz.el (mpuz-silent): Likewise. - - * play/decipher.el (decipher-ignore-spaces): Likewise. - - * net/rlogin.el (rlogin-process-connection-type): Likewise. - - * mail/rmail.el (rmail-primary-inbox-list): Likewise. - - * mail/mailalias.el (mail-directory-function) - (mail-directory-requery, mail-directory): Likewise. - - * emacs-lisp/lucid.el (buffer-syntactic-context): Likewise. - - * emacs-lisp/lmenu.el (popup-dialog-box): Likewise. - - * type-break.el (type-break-good-rest-interval) - (type-break-query-mode, type-break-query-function) - (type-break-mode-line-message-mode): Likewise. - - * skeleton.el (skeleton-autowrap, skeleton-untabify) - (skeleton-newline-indent-rigidly, skeleton-insert) - (skeleton-read): Likewise. - - * simple.el (newline): Likewise. - - * ps-print.el (ps-zebra-stripe-follow): Likewise. - - * mwheel.el (mouse-wheel-scroll-amount): Likewise. - - * env.el (setenv): Likewise. - -2003-05-06 Stefan Monnier - - * imenu.el (imenu--generic-function): Use font-lock-defaults - case setting if imenu-case-fold-search is not locally set. - - * uniquify.el (uniquify-managed): New var. - (uniquify-rationalize-file-buffer-names, rename-buffer): Use it and set - it to prevent accidental renaming of unrelated buffers. - (uniquify-delay-rationalize-file-buffer-names): Use it to avoid - the cost of uniquify when killing unrelated buffers. - - * newcomment.el (comment-set-column, comment-kill) - (comment-or-uncomment-region): Call comment-normalize-vars - since these functions are autoloaded. - - * help-fns.el (help-add-fundoc-usage): Use t for "no arglist". - * emacs-lisp/advice.el (ad-make-advised-docstring): Adjust usage. - -2003-05-06 Lute Kamstra - - * hl-line.el: Removed an erroneous comment. - (hl-line-mode): Use buffer local hooks. - (global-hl-line-mode): Turn local modes on unconditionally. - (hl-line-highlight): Comment fix. - -2003-05-06 Richard M. Stallman - - * newcomment.el (comment-search-forward): Delete autoload cookie. - -2003-05-06 Kenichi Handa - - * arc-mode.el (archive-set-buffer-as-visiting-file): - Use after-insert-file-set-coding, not - after-insert-file-set-buffer-file-coding-system. - -2003-05-05 Stefan Monnier - - * uniquify.el (uniquify-buffer-name-style) - (uniquify-after-kill-buffer-p, uniquify-ask-about-buffer-names-p) - (uniquify-ignore-buffers-re, uniquify-min-dir-content) - (uniquify-separator, uniquify-trailing-separator-p): Remove redundant - group specification. - (uniquify-file-name-nondirectory): Delete. - (uniquify-rationalize-file-buffer-names): Simplify. - Use directory names as `filename' component of uniquify-item. - (uniquify-get-proposed-name): Adjust now that `filename' does not - include `base'. - - * vc-svn.el: New file. - -2003-05-05 John Paul Wallington - - * emacs-lisp/autoload.el (batch-update-autoloads): - Call `update-directory-autoloads'. - -2003-05-04 Dan Nicolaescu - - * dired.el (dired-find-file): Bind find-file-run-dired around - the call to find-file. - -2003-05-04 Stefan Monnier - - * uniquify.el: Move provide to end of file. - (uniquify-ref-base, uniquify-ref-filename, uniquify-ref-buffer) - (uniquify-ref-proposed, uniquify-set-proposed): Remove. - (uniquify-item): New struct. Update users of uniquify-ref-*. - (uniquify-get-proposed-name, uniquify-rationalize-a-list): - Make `depth' optional. - (uniquify-non-file-buffer-names): Remove. - (uniquify-rationalize-file-buffer-names): Don't set it up. - Use uniquify-make-item and don't pass the now-optional depth. - (uniquify-rationalize-conflicting-sublist): Check the new buffer - name directly instead of relying on uniquify-non-file-buffer-names. - (uniquify-rename-buffer): Use with-current-buffer and pass - the `unique' arg to rename-buffer. - - * vc-mcvs.el (vc-mcvs-mode-line-string): Fix thinko. - (vc-mcvs-rename-file): New function. - -2003-05-04 Emmanuel Briot - - * progmodes/ada-mode.el - * progmodes/ada-prj.el - * progmodes/ada-stmt.el - * progmodes/ada-xref.el (ada-xemacs): Variable removed, since it's - better to use (featurep 'xemacs). - Removed warnings generated with Emacs 21.3.x (mostly by adding - needed `require' statements). - -2003-05-04 Nick Roberts - - * toolbar/gud-break.pbm, toolbar/gud-cont.pbm, toolbar/gud-display.pbm, - toolbar/gud-down.pbm, toolbar/gud-finish.pbm, toolbar/gud-until.pbm, - toolbar/gud-next.pbm, toolbar/gud-print.pbm, toolbar/gud-remove.pbm, - toolbar/gud-run.pbm, toolbar/gud-step.pbm, toolbar/gud-up.pbm: - Correct size for cleaner bitmaps. - -2003-05-03 Stefan Monnier - - * emacs-lisp/cl-extra.el (cl-map-keymap): Redefine as alias. - (cl-map-keymap-recursively): Use map-keymap. - (cl-macroexpand-all): Don't quote functions. - - * emacs-lisp/lucid.el (cl-map-keymap): Be careful with aliases. - - * emacs-lisp/advice.el (ad-get-enabled-advices, ad-special-forms) - (ad-arglist, ad-subr-arglist): Use push and match-string. - (ad-make-advised-docstring): Extract & reinsert the usage info. - - * help-fns.el (help-add-fundoc-usage): Allow arglist to be a string. - -2003-05-03 Nick Roberts - - * gdb-ui.el (breakpoint-enabled-icon, breakpoint-disabled-icon): - Include bitmap data for monochrome display. - (breakpoint-enabled-pbm-data, breakpoint-disabled-pbm-data): - New constants. - -2003-05-03 Richard M. Stallman - - * emacs-lisp/autoload.el (update-directory-autoloads): Renamed from - update-autoloads-from-directories. - - * progmodes/cperl-mode.el (cperl-nonoverridable-face): Doc fix. - - * mail/sendmail.el (mail-dont-send, mail-bury): Make ARG optional. - - * view.el (Helper-return-blurb): Add defvar. (Also rearrange defuns.) - - * uniquify.el (uniquify-ignore-buffers-re): Change default - to match some Gnus buffers. - - * newcomment.el (comment-search-forward): Add autoload cookie. - - * isearch.el (isearch-complete): Update isearch-message. - - * filesets.el (filesets-data): Add another defvar. - (filesets-verbosity): Doc fix. - -2003-05-02 Tak Ota (tiny change) - - * recentf.el (recentf-cleanup): Swap tests for exclusion and - accessibility. - -2003-05-01 Eduardo Mu,Aq(Boz (tiny change) - - * ls-lisp.el (ls-lisp-format-file-size): New function to implement - "-h" switch. - (ls-lisp-format): Use it. - -2003-05-01 Kenichi Handa - - * international/utf-8.el (utf-translate-cjk-mode): Update the - second extra slot of the translation table - utf-translation-table-for-encode. - (mule-utf-8): Set the property translation-table-for-encode. - -2003-04-30 Stefan Monnier - - * pcvs.el (cvs-vc-command-advice): Don't parse "cvs update -p" output. - (cvs-mode-find-file): Don't complain if bound to a non-mouse event. - - * textmodes/fill.el (text-property-default-nonsticky): Add fill-space. - (fill-delete-newlines): Respect the new property. - (fill-newline): Use the property instead of leaving "spurious" spaces. - - * emacs-lisp/easymenu.el (easy-menu-get-map): Correctly handle - non-submap bindings. - -2003-04-30 Emmanuel Briot - - * progmodes/ada-mode.el (ada-search-directories): Take into account - ADA_INCLUDE_PATH for better compatibility with GNAT. - (ada-contextual-menu): Menu defined through `easy-menu-define' - instead. Various adjustments to the indentation engine (handling of - subtypes, begin blocks, etc.). - (ada-create-menu): Major rewrite of the handling of menus to use - `easy-menu-define' for cleaner code and better compatibility with - XEmacs. All menus that were previously in ada-xref.el and - ada-prj.el are now defined in this package, which makes it easier to - edit menus. - (ada-narrow-to-defun): Add support for `narrow-to-region'. - No longer explicitely load ada-xref.el and ada-prj.el. Use autoload - statements instead. - - * progmodes/ada-xref.el (ada-gnatls-args): New variable. - Add support for specifying arguments to gnatls. - (ada-initialize-runtime-library): Properly parse "." in the output - of gnatls. - (ada-add-keymap): Remove since this is now done in ada-mode.el itself. - (ada-add-ada-menu): Likewise. - (ada-set-default-project-file): New parameter KEEP-EXISTING. - (ada-prj-find-prj-file): New parameter FILE. - (ada-parse-prj-file): Take into account the ADA_INCLUDE_PATH and - ADA_OBJECTS_PATH environment variables. Minor reorganization of the - code - (ada-get-all-references): Add support for GNAT 3.16 cross-references. - - * progmodes/ada-prj.el (ada-prj-add-keymap): Move to ada-mode.el - directly. Add dependency on ada-xref.el to avoid compilation - warnings. - (ada-prj-get-prj-dir): Remove, no longer needed. - - * progmodes/ada-stmt.el (ada-stmt-add-to-ada-menu): - Move to ada-mode.el. - (ada-template-map): Merge with the keymap handling in ada-mode.el. - -2003-04-29 Stefan Monnier - - * isearch.el (isearch-complete1): Don't allocate unnecessarily. - (isearch-complete-edit): Adjust to Emacs-21's new minibuffer handling. - (isearch-update-ring): Use push. - -2003-04-29 Oliver Scholz - - * play/gamegrid.el: Added a comment explaining the various ways to - save a game score on POSIX systems. - (gamegrid-add-score-with-update-game-score): Use `cond' instead of - `if'. Provide for the case that FILE is an absolute filename. - Create the directory "$HOME/.emacs.d/games", if necessary. - -2003-04-29 John Paul Wallington - - * emacs-lisp/bytecomp.el (byte-compile-cl-warn): Use `string-match'. - -2003-04-28 Dave Love - - * emacs-lisp/bytecomp.el (byte-compile-cl-warn): Avoid cl warnings - from caaar & al. - -2003-04-28 Kenichi Handa - - * international/mule-cmds.el (reset-language-environment): - Raise the priority of mule-utf-8, mule-utf-16-be-with-signature and - mule-utf-16-le-with-signature. - - * international/mule-conf.el: Set coding-category-utf-16-be to - mule-utf-16-be-with-signature, coding-category-utf-16-le to - mule-utf-16-le-with-signature. Raise the priority of - coding-category-utf-8, coding-category-utf-16-be, and - coding-category-utf-16-le - -2003-04-27 Luc Teirlinck - - * scroll-bar.el (scroll-bar-drag-1): Replace beginning-of-line with - vertical-motion. - -2003-04-27 David Ponce - - * recentf.el - - Major rewrite. The code is reordered, cleaner and faster. - Introduce new options to automatically cleanup the recent list, - and to handle filename transformation (for example to use true - filenames). - - (recentf-version): New constant. - (recentf-save-file-header): Move. - (recentf-data-cache): New variable. - (recentf-update-menu-p, recentf-initialized-p): Remove. - (recentf-menu-customization-changed): Move. Doc fix. - (recentf-max-saved-items): Doc fix. - (recentf-save-file): Doc fix. No more expand filename here. - (recentf-exclude, recentf-menu-action) - (recentf-menu-filter): Doc fix. - (recentf-menu-append-commands-flag): Rename from... - (recentf-menu-append-commands-p): Make obsolete. - (recentf-keep-non-readable-files-flag): Rename from... - (recentf-keep-non-readable-files-p): Make obsolete. - (recentf-auto-cleanup, recentf-filename-handler): New options. - (recentf-string-equal, recentf-string-lessp) - (recentf-string-member): New functions. - (recentf-trunc-list): Move. - (recentf-dump-variable): Move. Better code and output format. - (recentf-auto-cleanup-timer): New variable. - (recentf-auto-cleanup): New function. - (recentf-push, recentf-expand-file-name): New functions. - (recentf-add-file): In-line. Use above functions. - (recentf-remove-if-non-readable): In-line. Expand file name. - (recentf-find-file): Use `recentf-remove-if-non-readable'. - (recentf-directory-compare): Move. Use `recentf-string-equal' - and `recentf-string-lessp' to do comparisons. - (recentf-menu-items-for-commands) - (recentf-menu-filter-commands): Move. - (recentf-elements, recentf-make-menu-element) - (recentf-menu-element-item, recentf-menu-element-value) - (recentf-set-menu-element-item, recentf-set-menu-element-value) - (recentf-sub-menu-element-p, recentf-make-default-menu-element) - (recentf-menu-elements): In-line. Some doc fix. - (recentf-apply-menu-filter): Better code. - (recentf-make-menu-items): Doc fix. - Use `recentf-menu-append-commands-flag'. - (recentf-make-menu-item): In-lined. Better code. - (recentf-clear-data): New function. - (recentf-sort-ascending, recentf-sort-descending) - (recentf-sort-basenames-ascending) - (recentf-sort-basenames-descending) - (recentf-sort-directories-ascending) - (recentf-sort-directories-descending) - (recentf-show-basenames-ascending) - (recentf-show-basenames-descending: In-line. Better code. Doc fix. - (recentf-show-basenames) - (recentf-relative-filter): Better code. Doc fix. - (recentf-arrange-by-rule-subfilter): Doc fix. Improve :set code. - (recentf-match-rule-p): Use filename instead of file-path. - (recentf-arrange-by-rule, recentf-build-mode-rules) - (recentf-arrange-by-mode, recentf-build-dir-rules) - (recentf-file-name-nondir) - (recentf-filter-changer-alist): Some doc fix and code cleanup. - (recentf-filter-changer-goto-next): Doc fix. - Call `recentf-clear-data'. - (recentf-filter-changer-get-current) - (recentf-filter-changer-get-next): In-line. Doc fix and better code. - (recentf-filter-changer): Doc fix and better code. - (recentf-cancel-dialog): Doc fix. - (recentf-dialog-mode-map): Initialize in defvar. - (recentf-dialog-mode): Doc fix. - (recentf-track-opened-file): Rename from... - (recentf-add-file-hook): Remove. - (recentf-track-closed-file): Rename from... - (recentf-remove-file-hook): Remove. - (recentf-update-menu-hook): Remove. Replace by... - (recentf-update-menu): New. Better catch unnecessary updates. - Display a message on error. - (recentf-used-hooks): New constant. - (recentf-enabled-p): New function. - (recentf-edit-selected-items) - (recentf-open-files-action) - (recentf-open-files-item-shift): Doc fix. - (recentf-edit-list-action) - (recentf-open-files-item): Doc fix. Code cleanup. - (recentf-edit-list, recentf-open-files) - (recentf-open-more-files): Likewise. Remove autoload cookie. - (recentf-save-list, recentf-cleanup): Likewise. Move. - (recentf-load-list): New command. - (recentf-mode): Better code. Does nothing if enabling the already - enabled mode. - -2003-04-27 Alan Mackenzie - - * emacs-lisp/regexp-opt.el (regexp-opt-depth): Don't count a "//(" - which appears inside a character set. - (regexp-opt-not-groupie*-re): New constant. - -2003-04-26 John Paul Wallington - - * ibuffer.el (ibuffer-name-map, ibuffer-mode-name-map) - (ibuffer-mode-filter-group-map): Initialize in `defvar'. - (ibuffer-do-view-1): Use `make-frame' instead of `new-frame'. - -2003-04-25 Jan Nieuwenhuizen - - * info.el (Info-unescape-quotes, Info-split-parameter-string) - (Info-display-images-node): New functions for displaying images. - (Info-select-node): Call Info-display-images-node. - -2003-04-25 Kai Gro,A_(Bjohann - - * files.el (file-relative-name): Recognize "c:/foo" as absolute - file name. Tiny change from David PONCE . - -2003-04-24 Sam Steingold - - * calendar/diary-lib.el (fancy-diary-display-mode): Bind "q" to - `quit-window' in the fancy diary buffer. - - * emacs-lisp/cl-indent.el: `symbol-macrolet' is similar to `let', - not `multiple-value-bind'. - -2003-04-24 Lars Hansen - - * subr.el (assq-delete-all): Ignore non-cons elements. - -2003-04-24 John Paul Wallington - - * help-mode.el (help-make-xrefs): Remove extra paren. - -2003-04-23 Stefan Monnier - - * newcomment.el (comment-normalize-vars): Prompt the user for - the comment-start to use rather than signalling an error. Fix regexp. - (uncomment-region): Don't leave half-removed comment markers. - -2003-04-23 Richard M. Stallman - - * mail/sendmail.el (mail-send-and-exit): Make arg optional. - - * files.el (view-read-only): Doc fix. - - * simple.el (back-to-indentation): Call backward-prefix-chars. - - * help-mode.el (help-make-xrefs): Clean up the loop that scans - over a keymap inserted by \\{...}; it now stops at end of buffer. - - * filesets.el: Don't call filesets-init. - - * emacs-lisp/bytecomp.el (byte-compile-defun): Generate and - compile a defalias form, unless byte-compile-compatibility. - - * progmodes/scheme.el (scheme-mode-syntax-table): - Use prefix syntax for ', `, comma, @ and #. - - * emacs-lisp/lisp-mode.el (emacs-lisp-mode-syntax-table): - Give @ prefix syntax. - -2003-04-23 Andre Spiegel - - * vc-cvs.el (vc-cvs-stay-local): Keep the old default. - Simplify doc string. - -2003-04-23 Wolfgang Scherer - - * vc-cvs.el (vc-cvs-stay-local): Allow lists of host regexps. - (vc-cvs-stay-local-p): Handle them. - (vc-cvs-parse-root): New function, used by the above. - -2003-04-22 Stefan Monnier - - * vc-mcvs.el (vc-mcvs-root): Cache the result. - (vc-mcvs-registered): Simplify. Use file-relative-name. - (vc-mcvs-register): Simplify. Don't burp if MCVS/TYPES doesn't exist. - (vc-mcvs-command): Filter F-NN names in the output for diff and log. - -2003-04-21 Stefan Monnier - - * info.el (Info-default-dirs): New fun extracted from Info-initialize. - (info-initialize): Use it. Obey the "final :" convention for INFOPATH. - - * textmodes/fill.el (fill-region-as-paragraph): - Fix "last line goes to fill-column+1" problem. - - * emacs-lisp/bytecomp.el (byte-compile-defvar): Improve message. - -2003-04-20 Richard M. Stallman - - * simple.el (kill-line): Doc fix. - -2003-04-20 Sam Steingold - - * pcvs.el (cvs-examine): Respect `find-file-visit-truename'. - -2003-04-20 Glenn Morris - - * which-func.el (which-func-modes): Add f90-mode. - (which-function): Handle imenu submenus. - - * progmodes/fortran.el (fortran-abbrev-start): Make XEmacs compatible. - - * progmodes/f90.el (f90-font-lock-keywords-2): Use override for - font-lock-variable-name-face in declarations. - Highlight continuation characters. - (f90-indent-new-line): Remove direct call to f90-indent-line-no, - f90-update-line. - (f90-abbrev-start): Fix XEmacs compatibility. - -2003-04-19 Stefan Monnier - - * vc-mcvs.el: New file. - - * vc-cvs.el (vc-cvs-dir-state): Use vc-cvs-command. - (vc-cvs-could-register, vc-cvs-make-version-backups-p): Use defalias. - (vc-cvs-merge-news): Simplify. - (vc-cvs-diff): Remove unused var `options'. - (vc-cvs-parse-entry): Use the same algorithm as cvs does. - -2003-04-19 Richard M. Stallman - - * desktop.el (desktop-buffer-mh): Don't require mh-e; - it causes trouble in compilation. - - * add-log.el (add-log-current-defun-function): Add autoload cookie. - - * newcomment.el (comment-use-syntax): Add autoload cookie. - - * emacs-lisp/bytecomp.el (byte-compile-log-file) - (byte-recompile-directory): Don't use byte-goto-log-buffer. - Instead, set default-directory and then call compilation-mode. - (byte-compile-from-buffer): Force byte-compile-last-position - to end of buffer before issuing final warnings. - -2003-04-18 Stefan Monnier - - * emulation/cua-base.el (cua-mode): Use define-minor-mode. - (cua-global-mark-face): Fix face format. - - * emacs-lisp/easy-mmode.el (define-minor-mode): Only echo a message - if the body didn't do so already. - (easy-mmode-define-keymap): Remove unused var `suppress'. - - * view.el (view-read-only): Move to files.el. - * files.el (view-read-only): Move from view.el. - -2003-04-17 Stefan Monnier - - * files.el (view-read-only): Don't declare a second time. - (find-file-read-only, find-file-read-only-other-window) - (find-file-read-only-other-frame): Check that file does exist. - (large-file-warning-threshold): New custom. - (find-file-noselect): Use it. - (report-errors): New macro. - (normal-mode): Use it. - (toggle-read-only): Really toggle, even if view-mode is on. - (parse-colon-path): Remove unused `cd-prefix' var. - (make-backup-file-name-1): Remove unused `failed' var. - (basic-save-buffer): Remove unused `tempsetmodes' var. - (basic-save-buffer-2): Remove unused `temp' var. - (insert-directory): Remove unused `available' var. - -2003-04-17 John Paul Wallington - - * hexl.el (hexl-find-file): Bind `default-major-mode' to - `fundamental-mode'. - -2003-04-16 Stefan Monnier - - * reveal.el (reveal-post-command): Use overlay-get for overlays. - -2003-04-16 Kenichi Handa - - * international/mule-cmds.el (describe-language-environment): - At first, require all necessary features. - -2003-04-16 Dave Love - - * progmodes/xscheme.el: Moved from lisp directory. - -2003-04-16 Glenn Morris - - * progmodes/f90.el (f90-indent-to, f90-indent-line-no) - (f90-no-block-limit, f90-end-of-block, f90-beginning-of-block) - (f90-comment-region, f90-indent-line, f90-indent-region) - (f90-find-breakpoint, f90-block-match): Trivial simplifications. - (f90-looking-at-do, f90-looking-at-select-case) - (f90-looking-at-if-then, f90-looking-at-where-or-forall): - Drop XEmacs 19 support and simplify. - (f90-indent-new-line): No need for case-fold-search. Simplify. - (f90-fill-region): Make marker nil when done. Simplify. - - * progmodes/fortran.el (fortran-column-ruler): Minor doc change. - -2003-04-16 Richard M. Stallman - - * man.el (Man-follow-manual-reference): Don't require match - when calling completing-read. - -2003-04-15 Glenn Morris - - * progmodes/fortran.el: Whitespace changes, some re-ordering of - code, trivial commentary change. - (fortran, fortran-indent, fortran-comment) - (fortran-tab-mode-default, fortran-continuation-indent) - (fortran-comment-indent-style, fortran-blink-matching-if) - (fortran-continuation-string, fortran-electric-line-number) - (fortran-break-before-delimiters, fortran-mode-hook) - (fortran-end-prog-re, fortran-imenu-generic-expression): - Minor doc changes. - (fortran-tab-mode-minor-mode-string): New variable. - (fortran-tab-mode-string): Now customization is meaningful. - (fortran-column-ruler-fixed, fortran-column-ruler-tab) - (fortran-analyze-depth): Use defcustom. - (fortran-if-start-re, fortran-end-prog-re1, fortran-fill) - (fortran-break-line, fortran-prepare-abbrev-list-buffer) - (fortran-auto-fill): Add doc string. - (fortran-type-types): New constant (was local to let binding). - (fortran-font-lock-keywords-1, fortran-font-lock-keywords-2) - (fortran-font-lock-syntactic-keywords): Initialize in defvar. - (fortran-font-lock-keywords-3): Initialize in defvar. Use 1+ now - depth of fortran-type-types has changed. Remove extra and. - (fortran-mode-menu): Minor re-organization. Use lookup-key. - (fortran-mode): Doc changes. Some re-organization. - Use fortran-tab-mode-minor-mode-string. - (fortran-comment-indent): Add doc string. Move save-excursion. - Use 1+. - (fortran-indent-comment, fortran-fill-statement): - Change interactive spec. Use unless. - (fortran-comment-region): Doc change. Reverse logic of arg - test. Use zerop. - (fortran-abbrev-start, fortran-split-line) - (fortran-electric-line-number, fortran-indent-subprogram) - (fortran-strip-sequence-nos): Change interactive spec. - (fortran-remove-continuation): Add doc string. Use when. - (fortran-numerical-continuation-char): Doc change. Use 1+. - (fortran-previous-statement, fortran-next-statement) - (fortran-beginning-do, fortran-calculate-indent) - (fortran-end-do, fortran-end-if, fortran-beginning-if): - Use zerop, 1+, 1-. - (fortran-blink-match, fortran-check-for-matching-do): Use when. - (fortran-indent-line): Change interactive spec. Remove un-needed - if. Use when. - (fortran-indent-to-column): Doc change. Use when, unless. - (fortran-find-comment-start-skip): No longer interactive. - (fortran-analyze-file-format): Minor doc change. - Remove un-needed setq. - (minor-mode-alist): Use add-to-list. - (fortran-fill-paragraph): Change interactive spec, doc string. - - * progmodes/f90.el: Whitespace changes, trivial commentary changes. - (f90, f90-indent, f90-program-indent, f90-continuation-indent) - (f90-indented-comment-re, f90-imenu-generic-expression) - (f90-mark-subprogram, f90-join-lines): Minor doc changes. - (f90-menu): Shift definition to initialization of f90-mode-map. - Add customization section. - (f90-mode): Minor doc change. Do not call easy-menu-add. - Set `beginning-of-defun-function' and `end-of-defun-function' to - appropriate F90 functions. - (f90-indent-line, f90-indent-line, f90-indent-subprogram) - (f90-break-line, f90-do-auto-fill, f90-insert-end) - (f90-upcase-keywords, f90-capitalize-keywords) - (f90-downcase-keywords): Change interactive spec. - -2003-04-14 Stefan Monnier - - * font-lock.el (font-lock-multiline, font-lock-fontified) - (font-lock-set-defaults): Move back from font-core.el and merge - it back with font-lock-set-defaults-1. - (font-lock-mode-internal): New function (basically the body of - the old font-lock-mode minor mode). - - * font-core.el (font-lock-maximum-size, font-lock-verbose): Remove. - (font-lock-multiline, font-lock-fontified, font-lock-set-defaults): - Move back to font-lock.el - (font-lock-default-function): Use font-lock-mode-internal. - - * files.el (auto-mode-alist): Add entries for *.ins and *.dtx. - (recover-file): Abbreviate file name in messages. - - * textmodes/tex-mode.el (latex-mode-map): Bind latex-split-block. - (tex-font-lock-keywords-2): Comment out unused var `type'. - (tex-guess-mode): New name for old `tex-mode'. - (tex-mode): Make it a derived mode of text-mode. - (plain-tex-mode, latex-mode): Change parent from text-mode to tex-mode. - (tex-common-initialization): Don't setup syntax-table any more. - (tex-validate-buffer): Remove unused var `oend'. - Use with-current-buffer and line-beginning-position. - (tex-recenter-output-buffer): Remove unused var `old-buffer'. - (latex-indent): Return `noindent' if no indentation can happen. - (doctex-font-lock-^^A, doctex-font-lock-syntactic-face-function) - (doctex-font-lock-syntactic-keywords, doctex-font-lock-keywords) - (doctex-mode): New funs for DocTeX mode, derived from LaTeX mode. - - * font-lock.el (font-lock-preprocessor-face): New var and face. - -2003-04-14 Andrew Choi - - * term/mac-win.el: Unconditionally set process-connection-type to nil. - -2003-04-14 Richard M. Stallman - - * derived.el (define-derived-mode): Make generated code work in - Emacs versions that do not have run-mode-hooks. - - * emacs-lisp/lisp-mode.el (last-sexp-toggle-display): - At end of buffer, run the global binding of the same key. - - * international/mule.el (after-insert-file-set-coding): - Properly treat INSERTED as number of characters, for both - for both the argument and the value. - - * desktop.el (desktop-base-file-name): - Renamed from desktop-basefilename. Add defvaralias. - -2003-04-14 John Paul Wallington - - * international/fontset.el (create-fontset-from-ascii-font): Doc fix. - (x-must-resolve-font-name): Fix error message typo. - -2003-04-13 Glenn Morris - - * progmodes/fortran.el (fortran-previous-statement): Check for - fortran-continuation-string. - (fortran-calculate-indent): Do not add extra whitespace to - strings broken over lines. - (fortran-fill): Handle long strings that must be broken. - -2003-04-13 Michael Albinus (tiny change) - - * net/ange-ftp.el (ange-ftp-expand-symlink): If result of - expansion is a symlink, expand again. - (ange-ftp-file-symlink-p): Return target of symlink literally. - -2003-04-13 Masatake YAMATO - - * bindings.el (toplevel): Don't change the face - of major-mode on the mode line. Setting the face on - the mode line code is installed by my mistake in - my last change. - -2003-04-12 Stefan Monnier - - * add-log.el (change-log-version-number-search): Fix old bug. - (add-change-log-entry): Avoid inserting the same funname again. - (add-log-indent-text): New var. - (add-log-indent): New fun. - (change-log-mode): Use it. - - * net/browse-url.el: Don't autoload all these defcustoms. - (browse-url-default-macosx-browser): New fun. - (browse-url-browser-function): Use it for system-type = darwin. - (browse-url-usr1-signal): Remove. - (browse-url-mosaic): Use SIGUSR1 directly instead. - (browse-url-gnome-moz-program): New var. - (browse-url-gnome-moz, browse-url-default-browser): Use it. - - * emacs-lisp/bytecomp.el: Use push, with-current-buffer, dolist, ... - (byte-compile-const-variables): New var. - (byte-compile-close-variables): Reset it. - (byte-compile-file-form-defvar, byte-compile-defvar): Update it. - (byte-compile-const-symbol-p): Now arg `value' to check defconsts. - (byte-compile-variable-ref): Use it and improve warning message. - (byte-compile-check-lambda-list): Use byte-compile-const-symbol-p. - (byte-compile-lapcode): Remove unused vars. - (byte-compile-eval): Fix thinko in handling of old-autoloads. - (byte-recompile-directory): Use the expanded form for directory. - (byte-compile-track-mouse): Use modern backquote syntax. - (byte-compile-defvar): Detect and properly handle (defconst a). - (byte-compile-defalias-warn): Remove unused arg `alias'. - (byte-compile-defalias): Update call. - -2003-04-13 Masatake YAMATO - - * help.el (describe-minor-mode): New function implementation. - Accept both minor mode string and minor mode indicator. - (describe-minor-mode-completion-table-for-indicator) - (describe-minor-mode-completion-table-for-symbol): New functions. - minor-mode-list is used here. - (describe-minor-mode-from-symbol): - Renamed from (old) describe-minor-mode. - Use describe-minor-mode-completion-table-for-symbol. - Don't use eval. Just use symbol-name. - (describe-minor-mode-from-indicator): Document is updated. - Use `format-mode-line'. - Use describe-minor-mode-from-symbol instead of describe-minor-mode. - Use describe-minor-mode-completion-table-for-indicator. - (expand-minor-mode-indicator-object): Remove. - (lookup-minor-mode-from-indicator): Remove the fist white - space from both indicator and anindicator before comparing them. - - * bindings.el (mode-line-major-mode-keymap) - (mode-line-minor-mode-keymap): Define keys for the maps - here in `defvar'. - -2003-04-12 Stefan Monnier - - * server.el (server-socket-name): Use new safe location for socket. - (server-ensure-safe-dir): New fun. - (server-start): Use it and letf. - (server-process-filter): Re-enable the -eval feature. - -2003-04-12 Glenn Morris - - * play/gomoku.el (gomoku-buffer-name): New constant. - (gomoku-mode): Doc fix. Add call to kill-all-local-variables. - (gomoku): Do not call gomoku-switch-to-window directly. - (gomoku-prompt-for-other-game): Throw an error if no new game. - (gomoku-switch-to-window): Use gomoku-buffer-name. - - * progmodes/f90.el (f90-abbrev-start): Only offer help if - abbrev-mode is active. - (f90-join-lines): Make it behave more like standard join-line. - (f90-fill-region, f90-menu): Adapt for new f90-join-lines. - - * progmodes/fortran.el (fortran-abbrev-start): Only offer help if - abbrev-mode is active. - -2003-04-12 John Paul Wallington - - * help-fns.el (help-add-fundoc-usage): Pass an empty string to - `format' if no newlines are necessary. - -2003-04-11 Stefan Monnier - - * bindings.el (global-map): Bind [select-window]. - -2003-04-11 John Paul Wallington - - * type-break.el (type-break-warning-countdown-string): Doc fix. - -2003-04-11 ARISAWA Akihiro (tiny change) - - * international/utf-8.el (utf-translate-cjk-mode): Fix incorrect - place of parenthesis. - -2003-04-11 Masatake YAMATO - - * progmodes/etags.el (select-tags-table-mode-map): - Don't create new keymap. Instead copy from button-buffer-map. - Bind push-button to `t' instead of binding - select-tags-table-select directly - (tags-select-tags-table): New button. - (select-tags-table): Put a button for each selections. - -2003-04-11 Kenichi Handa - - * international/mule.el: - Don't set after-insert-file-adjust-coding-function. - (after-insert-file-set-coding): - Renamed from after-insert-file-set-buffer-file-coding-system. - -2003-04-11 Kenichi Handa - - * international/quail.el (quail-guidance-str) - (quail-guidance-frame): New variables. - (quail-guidance-win): Delete this variable. - (quail-setup-overlays): Make overlay not rear-advancing. - (quail-kill-guidance-buf): Delete this function. - (quail-activate): Add/remove quail-show-guidance to/from - post-command-hook. - (quail-input-method): Don't setup quail-guidance-buf. - Initialize quail-guidance-str to "". - (quail-start-translation): Call quail-show-guidance at first. - (quail-start-conversion): Likewise. - (quail-terminate-translation): Don't erase quail-guidance-buf. - (quail-update-translation): Stretch overlays if their starting and - ending positions are same. - (quail-update-current-translations): Check the width of the - current window, not the width of quail-guidance-win. - (quail-make-guidance-frame): Delete the arg BUF. Fix position - calculation. Don't set the window buffer, just return the new frame. - (quail-minibuffer-message): New function. - (quail-show-guidance): Renamed from quail-show-guidance-buf. - Use message and quail-minibuffer-message to display the guidance. - (quail-hide-guidance): Renamed from quail-hide-guidance-buf. - Only delete quail-guidance-frame. - (quail-update-guidance): Just update quail-guidance-str, not - display it. - (quail-get-translations): Renamed from quail-show-translations. - Return a string instead of inserting it in quail-guaidance-buf. - -2003-04-11 Kenichi Handa - - * international/mule-cmds.el (sort-coding-systems): Set lower - priority to a utf-16 base coding system. Set higher priority to a - coding system listed in coding-category-list. - -2003-04-10 Juanma Barranquero - - * frame.el (modify-all-frames-parameters): Deleted. - -2003-04-10 Sebastian Tennant (tiny change) - - * desktop.el (desktop-buffer-file): Restore major-mode if it is - different from the normal mode. - -2003-04-10 Kenichi Handa - - * international/mule.el: - Set after-insert-file-adjust-coding-function to - after-insert-file-set-buffer-file-coding-system instead of adding - it to after-insert-file-functions. - - * language/ind-util.el (indian-2-column-to-ucs-region): Fix for - the case of replacing multibyte characters. - -2003-04-09 Richard M. Stallman - - * files.el (file-chase-links): Fix previous change. - -2003-04-09 Juanma Barranquero - - * frame.el (new-frame): Add obsolescence declaration. - -2003-04-09 Ehud Karni - - * frame.el (set-frame-font): Allow keeping frame size after - changing font. - (modify-all-frames-parameters): New function to change parameters - in all existing and future frames. - -2003-04-09 Thien-Thi Nguyen - - * man.el (Man-heading-regexp): Accept hyphen. - -2003-04-09 Kenichi Handa - - * international/fontset.el: Specify rescale ratio 1.3 for CDAC fonts. - - * international/mule-conf.el: Register ?\221 and ?\226 in - latin-extra-code-table. - -2003-04-08 Richard M. Stallman - - * subr.el (minor-mode-list): New variable. - (add-minor-mode): Add to it. - - * files.el (file-chase-links): New arg LIMIT. - After that many iterations, just return what we've got. - - * map-ynp.el (map-y-or-n-p): When formatting chars in ACTION-ALIST, - use single-key-description. - - * emacs-lisp/lisp-mode.el (last-sexp-toggle-display): - At end of buffer, just call `newline'. - - * mail/rmailsum.el (rmail-make-basic-summary-line): If there's - no From field, still try to use the To field. - -2003-04-09 Kenichi Handa - - * international/mule-diag.el (print-coding-system-briefly): - If DOC-STRING is `tightly', print the doc-string tightly. - (list-coding-systems-1): Sort coding systems. - Call print-coding-system-briefly with the arg DOC-STRING `tightly'. - -2003-04-08 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.33 released. - Change coding cookie to `iso-2022-7bit' for XEmacs - compatibility. (From Steve Youngs .) - -2003-04-08 Michael Albinus - - * net/tramp-ftp.el (tramp-ftp-file-name-handler): - Do not disable file name handlers for `file-exists-p' and - `file-directory-p'. - -2003-04-08 Kenichi Handa - - * international/mule-conf.el: Register ?\225 in latin-extra-code-table. - - * international/utf-16.el (utf-16-le-decode-loop) - (utf-16-be-decode-loop): New temporary variables. - (ccl-decode-mule-utf-16-le): Use utf-16-le-decode-loop. - (ccl-decode-mule-utf-16-be): Use utf-16-be-decode-loop - (ccl-decode-mule-utf-16-le-with-signature) - (ccl-decode-mule-utf-16-be-with-signature) - (ccl-decode-mule-utf-16): New CCL programs. - (utf-16-le-encode-loop, utf-16-be-encode-loop): New temporary - variables. - (ccl-encode-mule-utf-16-le): Use utf-16-le-encode-loop. - (ccl-encode-mule-utf-16-be): Use utf-16-be-encode-loop - (ccl-encode-mule-utf-16-le-with-signature) - (ccl-encode-mule-utf-16-be-with-signature): New CCL programs. - (mule-utf-16-post-read-conversion): New function. - (mule-utf-16-le-with-signature, mule-utf-16-be-with-signature), - (mule-utf-16): New coding systems. - (utf-16-le-with-signature, utf-16-be-with-signature), - (utf-16): Aliases of the above coding systems. - -2003-04-08 Martin Stjernholm - - * progmodes/cc-langs.el (c-symbol-key): Use POSIX char classes - to match symbols. This makes CC Mode cope with the full range - of identifier characters in e.g. Java. - -2003-04-07 Francesco Potort,Al(B - - * xt-mouse.el (xterm-mouse-event-read): New function. - (xterm-mouse-event): Use it to get xterm sequences above #x7f. - Suggested by Aman Bhargava . - -2003-04-07 Kai Gro,A_(Bjohann - - * man.el (Man-getpage-in-background): Set GROFF_NO_SGR env var in - all cases, whether or not start-process is fboundp. - -2003-04-06 Richard M. Stallman - - * calendar/cal-menu.el (cal-menu-update): Use easy-menu-create-menu - rather than easy-menu-change. - - * dired.el (dired-view-file): Let viewer program run asynchronously. - -2003-04-06 Ben North (tiny change) - - * emacs-lisp/lisp-mode.el (last-sexp-toggle-display): - Correct the starting point for previous-single-property-change. - -2003-04-06 Lars Hansen - - * desktop.el: Handle multiple desktop files in different dirs. - Other cleanups. - Command line option --no-desktop introduced. - (desktop-read): Record buffers in the desktop file in - the same order as that in the buffer list, - (desktop-save): Put buffers in the order given in desktop file, - regardless of what handlers do. - (desktop-file-version): New variable. Version number of desktop - file format. - (desktop-create-buffer-form): Variable deleted. - (desktop-save): New customizable variable. - (desktop-kill): Use `desktop-save'. - (desktop-file-name-format): New option: format in - which desktop file names should be saved. - (desktop-file-name): New function to convert a filename to the - format specified in `desktop-file-name-format'. - (desktop-create-buffer): Parameters renamed to descriptive - systematic names. These parameters are visible to handlers. - Renames: - ver -> desktop-file-version - mim -> desktop-buffer-minor-modes - pt -> desktop-buffer-point - mk -> desktop-buffer-mark - ro -> desktop-buffer-read-only - locals -> desktop-buffer-locals - (desktop-buffer-major-mode, desktop-buffer-file-name) - (desktop-buffer-name): Delete unused customizable variables. - (desktop-buffer-misc): Delete unused variable. - (desktop-save, desktop-buffer-dired-misc-data): - Use `desktop-file-name'. - (desktop-path): New customizable variable. List of directories in - which to lookup the desktop file. Replaces hardcoded list. - (desktop-globals-to-clear): New variable replaces hardcoded list. - (desktop-clear-preserve-buffers-regexp): New customizable variable. - (desktop-after-read-hook): New hook run after a desktop is read. - (desktop-no-desktop-file-hook): New hook when no desktop file found. - (desktop-change-dir): New function. - (desktop-save-in-load-dir): New function. Save desktop in - directory from which it was loaded. - (desktop-revert): New function. Revert to the last loaded desktop. - -2003-04-06 Masatake YAMATO - - * progmodes/etags.el (tag-find-file-of-tag): Renamed from - find-file-of-tag to avoid name space pollution. - (tag-find-file-of-tag-noselect): Likewise. - (etags-list-tags, etags-tags-apropos): - Use tag-find-file-of-tag instead of find-file-of-tag. - -2003-04-06 Masatake YAMATO - - * info.el (Info-goto-emacs-command-node): If command - is given as a string, convert it to a symbol. - -2003-04-05 Kevin Ryde - - * info-look.el (emacs-lisp-mode): Add prefix/suffix matching regexps. - -2003-04-05 Andre Spiegel - - * vc-cvs.el (vc-cvs-get-entries): New function that uses the - right coding system for accessing CVS/Entries. - (vc-cvs-registered, vc-cvs-dir-state-heuristic): Use it. - -2003-04-04 Vinicius Jose Latorre - - * subr.el (number-sequence): Adjust code. - -2003-04-04 Stefan Monnier - - * textmodes/refill.el (refill-fill-paragraph-at): Undo last fix. - (refill-fill-paragraph-at): Don't skip prefix since markers work right. - - * textmodes/fill.el (fill-delete-newlines): Remove trailing whitespace. - (fill-paragraph): Don't skip prefix now that markers work right. - -2003-04-04 John Paul Wallington - - * ibuffer.el (ibuffer-insert-filter-group): `help-echo' text - property dynamically respects `tooltip-mode'. - (define-ibuffer-column name): Likewise. - - * ibuf-ext.el (ibuffer-format-filter-group-data): Don't append "\n". - -2003-04-04 Masatake YAMATO - - * progmodes/etags.el (find-file-of-tag-noselect, find-file-of-tag): - New helper functions. - (snarf-tag-function): Doc string is changed. Explained about new - optional argument, `use-explicit'. - (etags-snarf-tag): Add one optional argument `use-explicit'. - (file-of-tag-function): Doc string is changed. Explained about new - optional argument, `relative'. - (file-of-tag): Doc string is changed. Explained about new optional - argument, `relative'. Pass `relative' to `file-of-tag-function'. - (etags-file-of-tag): Add new argument `relative`. - (list-tags): Set `buffer-read-only' to t after making the major mode - apropos-mode. - (etags-list-tags): Use `make-text-button' instead of - `add-text-properties'. Used `snarf-tag-function', - `goto-tag-location-function' and `find-file-of-tag' instead of - `find-tag-other-window' (it's too simple). - (find-tag-in-order): Use `find-file-of-tag-noselect' instead of - `find-file'. - (etags-tags-apropos): Use `find-file-of-tag-noselect' instead of - `find-file'. Do not use `etags-goto-tag-location` directly; use - `goto-tag-location-function' instead. Print relative file paths - instead of complete ones in *Tags List* buffer, so lines in the - buffer become shorter. - (etags-tags-apropos-additional): Use `make-text-button' instead of - `add-text-properties'. - -2003-04-04 Andreas Schwab - - * net/tramp.el (tramp-send-string): Handle empty string. - -2003-04-03 Richard M. Stallman - - * emacs-lisp/easymenu.el (easy-menu-define): - Don't make a defvar for nil. - (easy-menu-convert-item-1): Doc fix. - (easy-menu-change): Call easy-menu-create-menu. - - * subr.el (read-quoted-char): Remember the input char - before translation thru function-key-map, and use that for unreading. - - * shadowfile.el (shadow-parse-fullname): - Renamed from shadow-parse-fullpath. - (shadow-parse-name): Renamed from shadow-parse-path. - (shadow-make-fullname): Renamed from shadow-make-fullpath. - (shadow-replace-name-component): Was shadow-replace-path-component. - Callers of the above functions changed. - (shadow-expand-cluster-in-file-name): Doc fix. - (shadow-same-site, shadow-file-match): Doc fix. - (shadow-define-literal-group): Doc fix. - - * kmacro.el (kmacro-end-and-call-macro): Doc fix. - - * hexl.el (hexl-find-file): Ignore user's value of default-major-mode. - - * files.el (hack-local-variables-prop-line): New arg MODE-ONLY. - (hack-local-variables): When MODE-ONLY is set, pass it along to - hack-local-variables-prop-line. - - * delsel.el (delete-active-region): Don't explicitly deactivate mark. - -2003-04-03 Masatake YAMATO - - * progmodes/etags.el: Require button.el. - (etags-tags-apropos): Use `make-text-button' instead of - `add-text-properties'. Use `snarf-tag-function' and - `etags-goto-tag-location' instead of `find-tag-other-window' (it's - too simple). - - * man.el (Man-xref-header-file): Fix previous change. - -2003-04-03 Kenichi Handa - - * subr.el (number-sequence): New function. - -2003-04-02 Ehud Karni (tiny change) - - * sort.el (sort-reorder-buffer): Fix saving of markers at the end - of the sorted region. - -2003-04-02 Masatake YAMATO - - * woman.el (woman-xref): Removed. - (woman-mode): Use `Man-highlight-references' instead of - `WoMan-highlight-references'. - (WoMan-highlight-references): Removed. - - * man.el (toplevel): Require button. - (Man-header-file-path): New option. - (Man-synopsis-regexp, Man-files-regexp, Man-include-regexp) - (Man-file-name-regexp, Man-normal-file-prefix-regexp) - (Man-header-regexp, Man-normal-file-regexp): New variables. - (Man-mode-map): Inherit from `button-buffer-map'. Don't define - "\r" and mouse-2 directly. These key are defined in - `button-buffer-map'. - (Man-xref-man-page, Man-xref-header-file, Man-xref-normal-file): - New buttons. `Man-xref-man-page' comes from woman.el. - (man-follow-mouse): Removed. - (Man-fontify-manpage): Use `Man-highlight-references' instead of - calling `add-text-properties' directly. - (Man-highlight-references, Man-highlight-references0): New functions. - (Man-view-header-file): New function. - -2003-04-02 Stefan Monnier - - * textmodes/refill.el (refill-fill-paragraph-at): Don't preserve - the trailing space since fill.el doesn't remove it anymore. - (refill-mode): Reset fill-paragraph-function even if it was nil. - - * textmodes/fill.el (fill-region-as-paragraph): - Don't remove space at end of paragraph: it makes refill.el unusable. - Remove obsolete `save-restriction'. - (fill-paragraph, fill-comment-paragraph): Don't add newline at EOP. - (fill-delete-newlines): Don't add a trailing space. - (fill-newline): Don't leave markers before the prefix. - - * progmodes/asm-mode.el (asm-calculate-indentation, asm-indent-line): - New functions. - (asm-mode): Use them in indent-line-function. - Set tab-always-indent to nil to stay closer to previous tab behavior. - Set comment-add. Remove space at end of comment-add. - (asm-newline): Obsolete. Use newline-and-indent instead. - (asm-mode-map): Remove TAB binding. - (asm-code-level-empty-comment-pattern) - (asm-flush-left-empty-comment-pattern) - (asm-inline-empty-comment-pattern): Remove. - (asm-comment): Use newcomment functions instead. - (asm-colon): Don't tab if colon is not after a label. - (asm-line-matches, asm-pop-comment-level): Remove. - -2003-04-02 Kai Gro,A_(Bjohann - - * emulation/crisp.el (top-level): Quote second arg to - `eval-after-load'. - -2003-04-02 Miles Bader - - * scroll-bar.el (scroll-bar-mode): Correctly specify `nil' choice. - -2003-04-01 Stefan Monnier - - * progmodes/asm-mode.el (asm-mode-syntax-table): Setup entries - that do not depend on asm-comment-char. - (asm-mode-map): Declare and init at the same time. - (asm-code-level-empty-comment-pattern) - (asm-flush-left-empty-comment-pattern) - (asm-inline-empty-comment-pattern): Use \s< so they do not depend - on asm-comment-char. Turn them into constants. - (asm-mode): Simplify. - (asm-line-matches): Remove unused arg. - -2003-04-01 Dave Love - - * time.el: Doc fixes. - (display-time-mail-face): Change :type and default to nil. - (display-time-mail-icon): Use pbm, not xbm. - (display-time-mail-string): New. - (display-time-string-forms): Use display-time-mail-string. - Add checks in display property. - -2003-04-01 Kenichi Handa - - * language/indian.el (indian-font-char-index-table): Fix the - order of CDAC fonts. - -2003-04-01 Kim F. Storm - - * simple.el (pop-global-mark-quick-repeat): Remove defcustom. - (set-mark-command): Unconditionally repeat pop-global-mark without - C-x prefix. Fix doc. - - * emulation/cua-base.el (cua-set-mark): Unconditionally repeat - pop-global-mark without C-x prefix. Fix doc. - -2003-03-31 Stefan Monnier - - * reveal.el (reveal-post-command): Better error handling. - -2003-03-31 Nick Roberts - - * gdb-ui.el (gdb-inferior-io-mode): Remove Unix pathname for cat - so that it can run on NT also. - -2003-03-31 Masatake YAMATO - - * progmodes/asm-mode.el (asm-mode): Support skipping C lang style - comments. - - * bindings.el (mode-line-major-mode-keymap): New variable. - (mode-line-minor-mode-help): New function, bound to - mode-line-minor-mode-keymap. - (mode-line-modes): Split mode-line-mode definitions to - mode-name, mode-line-process and minor-mode-alist. - For mode-name, mode-line-major-mode-keymap is used. - - * help.el (describe-minor-mode, describe-minor-mode-from-indicator) - (lookup-minor-mode-from-indicator): New functions. - -2003-03-31 Kai Gro,A_(Bjohann - - * files.el (file-relative-name): Remove superfluous `and'. - Clarify docstring. From Lars Hansen. - -2003-03-31 Kenichi Handa - - * international/utf-16.el (ccl-decode-mule-utf-16-le): - Don't assume the signature bytes. - (ccl-decode-mule-utf-16-be): Likewise. - (ccl-encode-mule-utf-16-le): Don't produce the signature bytes. - (ccl-encode-mule-utf-16-be): Likewise. - -2003-03-30 Kevin Ryde - - * info-look.el (sh-mode): Add doc-specs for commands and variables. - -2003-03-29 Kai Gro,A_(Bjohann - - * international/utf-8.el (utf-translate-cjk-mode): Minor mode, - replaces variable utf-translate-cjk which must be set via Custom. - - * files.el (file-relative-name): If FILENAME and DIRECTORY are on - different drives (on DOS/Windows) or use different handlers, do - like `expand-file-name' on FILENAME and return an absolute name. - From Lars Hansen . - - * tramp.el: Version 2.0.31 released. - (tramp-handle-expand-file-name): Do not allow ".." to - cross file handler boundaries, so that "/user@host:/../foo" - expands to itself, rather than "/foo". This is intended to work - in conjunction with a change in `file-relative-name' which makes - sure to use absolute file names if FILE and DIRECTORY have - different handlers. - (tramp-handle-insert-directory): Comment out XEmacs - kludge. Suggested by Katsumi Yamaoka . - -2003-03-29 Michael Albinus - - * trampver.el: New file, to support Autoconf in Tramp CVS repository. - * tramp.el (tramp-version, tramp-bug-report-address): Move to - trampver.el, which is required now. - (tramp-chunksize): Type can be nil as well. - Reported by Markus Rost . - * tramp-smb.el (tramp-smb-read-file-entry): Make reading size of a - listing entry more robust. Ranges from 10 chars (Samba 1) to 7-9 - chars (Samba 2). - -2003-03-29 John Paul Wallington - - * international/mule.el (with-category-table): Use `make-symbol' - to avoid variable capture. Set table within `unwind-protect'. - Ensure table is restored in correct buffer. Add docstring. - -2003-03-29 Kenichi Handa - - * language/japan-util.el: If system-type is not for Windows, - prefer japanese-iso-8bit. - -2003-03-28 Sudish Joseph (tiny change) - - * term/mac-win.el (iconify-or-deiconify-frame): Define for - compatibility with packages that use it. - -2003-03-28 Lute Kamstra - - * emacs-lisp/checkdoc.el (checkdoc-display-status-buffer): - Fix docstring. - (checkdoc-interactive, checkdoc-message-interactive): Make them - perform spell checking when appropriate. - (checkdoc-interactive-loop): Fix docstring and a few typos. - (checkdoc-interactive-ispell-loop) - (checkdoc-message-interactive-ispell-loop): New functions. - (checkdoc-next-error): Fix docstring. - (checkdoc-this-string-valid-engine): Fix typo. - (checkdoc-ispell-docstring-engine): Do test for - checkdoc-autofix-flag = nil. - -2003-03-28 Jonathan Yavner - - * emacs-lisp/testcover.el (testcover-mark-all): Handle screwy - top-level macros that put functions as properties. - (testcover-mark): No error for functions that just return a constant. - -2003-03-27 Andreas Schwab - - * vc-cvs.el (vc-cvs-parse-entry): Make sure a file with conflicts - is marked as edited. - -2003-03-26 Kenichi Handa - - * files.el (recode-file-name): New function. - - * international/characters.el: Setup categories for Indian characters. - -2003-03-26 Steve Youngs - - * em-unix.el (eshell-plain-locate-behavior): Make the default - nil on Emacs, t on XEmacs. - -2003-03-25 Stefan Monnier - - * emacs-lisp/byte-opt.el (byte-optimize-set): New. - Turn `set' into `setq' when applicable. - -2003-03-24 Stefan Monnier - - * emacs-lisp/easy-mmode.el (define-minor-mode): Pass unknown keyword - args blindly to defcustom. Use custom-set-minor-mode. - -2003-03-24 Kim F. Storm - - * simple.el: Rework last change so C-x C-SPC C-SPC does not - repeat pop-global-mark by default. - (pop-global-mark-quick-repeat): New user option. - (set-mark-command): Use it. - - * emulation/cua-base.el (cua-set-mark): - Check pop-global-mark-quick-repeat. - -2003-03-24 John Paul Wallington - - * emacs-lisp/easymenu.el (easy-menu-add-item): Don't default to - the global map. - - * emerge.el (emerge-show-file-name): Read event irrespective of - whether minibuffer window is resized. Clear minibuffer when done. - - * cus-theme.el (customize-create-theme): Rename from - `custom-theme-create'. - -2003-03-24 Luc Teirlinck - - * cus-edit.el (custom-mode): Make `custom-local-buffer' local. - -2003-03-23 Peter Breton - - * net/net-utils.el (dns-lookup-host): New function. - -2003-03-23 Martin Stjernholm - - * progmodes/cc-mode.el (c-parse-state): Add kludge to avoid - an infinite loop when Emacs' open-paren-in-column-zero rule - kicks in and causes the sexp functions to misbehave. - -2003-03-22 Peter Breton - - * filecache.el (file-cache-add-directory-recursively) - (file-cache-complete, file-cache-display): New functions. - - * generic-x.el (etc-modules-conf-generic-mode): New generic mode. - (rul-generic-mode): Bugfixes by Rolf.Sandau@marconi.com. - - * dirtrack.el (dirtrack-cygwin-directory-function): New function. - Remove timestamp. - -2003-03-22 Kim F. Storm - - * ido.el (ido-mode): Remove unused NOBIND arg. Fix doc string - accordingly. - (ido-define-mode-map): Bind C-l for both file and dir modes. - (ido-wide-find-file, ido-wide-find-dir, ido-make-directory): - Let-bind enable-recursive-minibuffers to t around read-string. - -2003-03-22 Kenichi Handa - - * international/fontset.el (setup-default-fontset): - Use indian-font-char-range for specifying ranges of indian-glyph - chars. Setup for AKRUTI fonts. - - * language/indian.el (indian-font-foundry): New variable. - (indian-script-language-alist): New variable. - (indian-font-char-index-table): New variable. - (indian-font-char): New function. - (indian-font-char-range): New function. - (font-ccl-encoder-alist): Add entry for AKRUTI font. - -2003-03-22 Kim F. Storm - - * progmodes/cperl-mode.el (cperl-electric-backspace): - Add delete-selection property. - - * simple.el (set-mark-command): Doc fixes. - Allow pop-global-mark to be repeated with C-x C-SPC C-SPC... - C-u C-u C-SPC now unconditionally sets the mark. - - * emulation/cua-base.el (cua-set-mark): Doc fixes. - Allow pop-global-mark to be repeated with C-x C-SPC C-SPC... - C-u C-u C-SPC now unconditionally sets the mark. - -2003-03-20 Mark A. Hershberger - - * xml.el (xml-parse-attlist): Fix typo in attribute parsing. - -2003-03-20 Kenichi Handa - - * international/utf-8.el (ccl-decode-mule-utf-8): Fix a bug in - handling invalid 5 to 6 bytes sequence. - -2003-03-19 Simon Marshall - - * progmodes/make-mode.el (makefile-font-lock-syntactic-keywords): - New variable. - (makefile-mode): Use it for value of font-lock-syntactic-keywords. - -2003-03-19 John Paul Wallington - - * cus-theme.el (custom-theme-create): Add autoload cookie. - -2003-03-19 Kenichi Handa - - * dired.el (dired-get-filename): Pay attention to the case that - `read' returns a unibyte string. Don't encode the file name by - buffer-file-coding-system. - -2003-03-18 Kenichi Handa - - * language/european.el ("Latin-6"): Fix input-method. - ("Latin-7"): Fix input-method. - - * international/utf-8.el (utf-fragment-on-decoding): - Don't call register-char-codings. - (utf-fragment-on-decoding): Don't update char-coding-system-table. - (utf-translate-cjk): Don't call register-char-codings nor - optimize-char-coding-system-table. Don't update - char-coding-system-table. - - * international/ucs-tables.el (ucs-unify-8859): Don't call - register-char-codings. - (ucs-unify-8859): Don't call optimize-char-coding-system-table. - (ucs-fragment-8859): Don't update char-coding-system-table. - Don't call register-char-codings nor optimize-char-coding-system-table. - - * international/mule.el (optimize-char-coding-system-table): - Remove this function. - (register-char-codings): Make it obsolete. - (char-coding-system-table): Defconst it here. - (make-coding-system): Don't call register-char-codings, call - define-coding-system-internal. - - * international/mule-conf.el (no-conversion): - Call define-coding-system-internal on this coding system instead of - calling register-char-codings. - - * international/mule-cmds.el (find-coding-systems-for-charsets): - Use find-coding-systems-string instead of looking up - char-coding-system-table. - - * international/code-pages.el (cp-fix-safe-chars): Make it obsolete. - (cp-make-coding-system): Don't call cp-fix-safe-chars. - -2003-03-18 Stefan Monnier - - * startup.el (command-line-1): Use command-execute for any command. - -2003-03-17 Stefan Monnier - - * buff-menu.el (list-buffers-noselect): Use the display property - to properly align header-line text with the buffer's contents. - -2003-03-17 Kenichi Handa - - * international/mule.el (ctext-post-read-conversion): Convert the - search pattern to multibyte by string-to-multibyte. - -2003-03-16 Deepak Goel - - * calc/calc-forms.el (math-tzone-names): Introduce UTC as an alias - for GMT. Suggested by bob@rattlesnake.com. - -2003-03-15 Stefan Monnier - - * pcvs.el (cvs-mode!): Remove unused argument. - - * emacs-lisp/easymenu.el (easy-menu-name-match): Catch any error - that member-ignore-case might signal. - (easy-menu-add-item): Default to the global map, as documented. - (easy-menu-convert-item-1): Use match-string. - -2003-03-15 Mark A. Hershberger - - * xml.el (xml-ucs-to-string): New function to convert Unicode - codepoints to strings. Uses decode-char (mule.el) if available. - (xml-parse-tag, xml-parse-attlist, xml-skip-dtd, xml-parse-dtd) - (xml-parse-elem-type): Use ' \t\n\r' instead of '[:space:]'. - (xml-parse-attlist): Add attribute normalization. - (xml-parse-tag): Replace "\r\n" and "\r" with "\n". - -2003-03-14 John Paul Wallington - - * files.el (recover-session): Error if there are no previous - sessions to recover. - - * subr.el (posn-col-row): Simplify. - - * arc-mode.el (archive-subtype, archive-file-list-start) - (archive-file-list-end, archive-proper-file-start) - (archive-read-only, archive-local-name, archive-mode-map) - (archive-file-name-indent, archive-remote) - (archive-alternate-display, archive-superior-buffer) - (archive-subfile-mode): Doc fixes. - -2003-03-14 Stefan Monnier - - * indent.el (indent-for-tab-command): If tab-always-indent is non-nil - and the user hits TAB a second time, just insert a tab. - - * textmodes/texinfo.el (texinfo-outline-level): Remove. - (texinfo-mode): Set outline-heading-alist instead. - (texinfo-section-list): Reorder for the needs of outline-heading-alist. - (texinfo-insert-block): Don't cons needlessly. - (texinfo-enable-quote-macros, texinfo-enable-quote-envs): New vars. - (texinfo-insert-quote): Use them. - - * textmodes/outline.el (outline-level): Demote it to defvar. - (outline-heading-alist): Document extended semantics. - (outline-head-from-level): New fun. - (outline-promote, outline-demote): Use it. - (outline-show-heading): New fun. - (hide-sublevels, show-children): - Use it together with outline-map-region. - (outline-get-next-sibling): Don't call outline-level at eob. - -2003-03-14 Simon Josefsson - - * fringe.el (fringe-mode): Autoload so that - Options->Show/Hide->Fringe->Customize works. - -2003-03-13 Stefan Monnier - - * textmodes/outline.el (outline-mode-menu-bar-map): Add entries. - (outline-mode-prefix-map): Match new bindings to those of allout. - (outline-map-region): New fun. - (outline-map-tree): Remove. - (outline-promote, outline-demote): Apply to region if active. - Change the default to apply to the subtree. - (outline-move-subtree-up, outline-move-subtree-down): New funs. - (outline-invisible-p): Add optional `pos' argument. - (outline-next-visible-heading, outline-toggle-children): Use it. - (outline-get-next-sibling): Don't call outline-level at eob. - - * custom.el (custom-set-minor-mode): New fun. - -2003-03-13 Dave Love - - * international/latin1-disp.el (ucs-tables): Don't require. - (latin1-display-face): New. - (latin1-display-char): Use it. - -2003-03-13 Kenichi Handa - - * international/mule-cmds.el (reset-language-environment): - Set default-file-name-coding-system to iso-latin-1. - - * language/european.el (iso-latin-1): Definition of this coding - system moved to mule-conf.el. - - * international/mule-conf.el (iso-latin-1): Move from - european.el. - - * term/x-win.el (x-select-text): Don't set a text containing - eight-bit-control/graphic into the cut buffer. - -2003-03-12 Kenichi Handa - - * files.el (insert-directory): Decode by what specified. - - * language/japan-util.el (setup-japanese-environment-internal): - By defalt, use japanese-iso-8bit for file names, and prefer - japanese-shift-jis on DOS and Windows. - - * international/quail.el (quail-show-guidance-buf): Make the quail - guidance buffer inherit the current value of quail-current-package. - - * international/utf-8.el (ccl-decode-mule-utf-8): Don't lose bytes - on handling an invalid byte sequence. - -2003-03-11 Jason Rumney - - * files.el (auto-mode-alist): Add .xsl for sgml-mode. - -2003-03-11 Mark A. Hershberger - - * xml.el (xml-skip-dtd): Fix parsing of DOCTYPE. - -2003-03-11 John Paul Wallington - - * subr.el (posn-col-row): Heed frame parameter `line-spacing' and - `default-line-spacing', rather than buffer-local `line-spacing'. - -2003-03-10 Per Abrahamsen - - * cus-edit.el (customize-rogue): New command. - -2003-03-10 Andreas Schwab - - * info.el (Info-extract-menu-node-name) - (Info-following-node-name): Revert last change. - -2003-03-10 Thien-Thi Nguyen - - * progmodes/scheme.el (scheme-mode-syntax-table): - Construct w/o using `with-syntax-table'. - -2003-03-10 John Paul Wallington - - * subr.el (posn-col-row): Take into account `line-spacing'. - - * ebuff-menu.el (electric-buffer-update-highlight): Do nothing - if major mode isn't `Electric-buffer-menu-mode'. - - * term/x-win.el (vendor-specific-keysyms) - (x-last-selected-text-primary): Doc fixes. - (x-win-suspend-error): Use proper noun in error message. - -2003-03-09 Kai Gro,A_(Bjohann - - * man.el (Man-getpage-in-background): Always use `setenv' for - environment variables, instead of modifying process-environment - directly. The previous version let-bound process-environment -- - the let-binding is skipped for GROFF_NO_SGR because there is - already a let-binding in effect in some outer scope. - - * emulation/crisp.el (top-level): Interoperate with cua. - -2003-03-08 Kim F. Storm - - * emulation/cua-base.el: Provide `cua' feature. - -2003-03-08 Juanma Barranquero - - * emulation/cua-base.el (cua--standard-movement-commands): - Fix docstring. - -2003-03-07 Kai Gro,A_(Bjohann - - * man.el (Man-getpage-in-background): Only change - default-directory if necessary. - -2003-03-07 Andreas Schwab - - * info.el (Info-following-node-name): Skip trailing period. - (Info-extract-menu-node-name): Allow period in node name. - -2003-03-07 Kevin Rodgers - - * dired-x.el (dired-guess-shell-case-fold-search): New user option. - (dired-guess-default): Use it. - -2003-03-07 Thien-Thi Nguyen - - * progmodes/dcl-mode.el (dcl-font-lock-keywords): New var. - (dcl-font-lock-defaults): New var. - (dcl-mode): Make and init local var `font-lock-defaults'. - -2003-03-06 Kevin Rodgers - - * ffap.el (dired-at-point): Check whether the user can create a - directory before asking about creating it. - -2003-03-06 John Paul Wallington - - * ebuff-menu.el (electric-buffer-list): - Respect `Buffer-menu-use-header-line'. - (electric-buffer-menu-looper): Likewise. - - * buff-menu.el (Buffer-menu-mode-map): Add docstring. - (Buffer-menu-buffer): Fix indentation. - (list-buffers-noselect): Calculate header-line spacing to take - into account width of left fringe and left scrollbar. - -2003-03-05 Vinicius Jose Latorre - - * ps-print.el (ps-print-version): New version number (6.6). - (ps-begin-job): If background and foreground color are the same, give - an error. - (ps-default-fg, ps-default-bg): Better doc. - (ps-rgb-color): Became a defun, check RGB value list. - (ps-default-background): New internal var. - (ps-begin-file): Code fix. - -2003-03-05 Richard M. Stallman - - * replace.el (query-replace-read-args): Use save-excursion. - (map-query-replace-regexp): Use prefix-numeric-value. - -2003-03-05 Juanma Barranquero - - * term/w32-win.el (x-handle-geometry): Put sizes on - `initial-frame-alist' too. - - * startup.el (command-line-x-option-alist): Make --border-color set - the border-color frame parameter, not border-width. - - * faces.el (frame-set-background-mode): Fix reference to attribute - "backgroundMode". - -2003-03-05 Reto Zimmermann - - * progmodes/vhdl-mode.el: Version 3.32.12 released. - Modifications for displaying all projects in hierarchy browser and case - insensitive hierarchy browsing. Change Rod's email address. - Include `itimer.el' patch for XEmacs. Backquote fix. Change some - documentation strings. Add "ERROR: " prefix to all error - messages. Enhanced usage of hideshow. - (vhdl-in-literal): Remove unused argument LIM. - (vhdl-compiler-alist): Enhance customization for compilers; add - "Speedwave", "Simili", "Synopsys Design Compiler", "Cadence NC", - "Savant", "ProVHDL" and "VeriBest" compilers. - Add new error message syntax for Modelsim. - Add Synplify, column no in error regexp. - Include library name in library command. - Add unit-to-file name mapping for Savant. - Add library option in Makefile generation command. - Add command to create library directory. - Built-in Makefile generation is always default. - (vhdl-create-mode-menu): Split menues for compilers, projects, models. - Add customization for `global-font-lock-mode'. - Fix `customize-group' entries for XEmacs and - change "Gen." to "Generate". Get *Messages* buffer. - Fix "Auto Load Setup File" menu entry. - Add faces customization to "Options". Add "Options" entry. - Include `speedbar-indentation-width'. - (vhdl-replace-string): Allow casing (use `vhdl-file-name-case'). - (vhdl-template-exit, vhdl-template-next, vhdl-template-return): - Fix template abortion. - (vhdl-speedbar-port-copy): Add subprogram copy; copy port of component - in package. - (vhdl-fixup-whitespace-region): No whitespace after '(' and before ')'. - Better treat comments and strings. Fix "=> ," alignment. - (vhdl-port-paste-testbench): Print file names created. - Better handling when file exist/open. Additional comments in code. - Replace keywords in testbench entity and architecture file headers. - Adjust case in testbench configuration. - (vhdl-port-paste-instance): Special case: no number in instance name. - (vhdl-speedbar-expand-units): Fix speedbar frame switching oddity. - (vhdl-font-lock-keywords-2): Enhance highlighting of instantiation; - highlight instantiations without map. - Highlight quantity declaration names. Highlight formal parameters. - Fix label highlighting for signal asst. - (vhdl-mode): `comment-padding' for Emacs 21 only. - Remove forced `turn-on-font-lock'. - Remove `hippie-expand-only-buffers' setting. - Update online documentation and web address. - (vhdl-comment-uncomment-region): Remove usage of `commend-dwim' again. - Change ARG for uncommenting. - (vhdl-speedbar-make-*-line): Fix for displaying XEmacs speedbar images. - (vhdl-fontify-buffer): Toggle font-lock-mode for better recovery. - (vhdl-port-list): Add context clause. - (vhdl-port-paste-signals): Include direction comments. - (vhdl-testbench-declarations, vhdl-testbench-statements): New default. - (vhdl-port-*): Include name in status messages. - (vhdl-package-alist): Scan for and display subprogram body. - Change key to lower case, add original case identifier. - Scan for packages used by package body. - (vhdl-speedbar-find-file): Always jump to design unit if buffer open. - (vhdl-speedbar-insert-hierarchy): Mark non-existing entities/packages. - Message "No VHDL design units!". - (vhdl-compile-init): Allow fourth element (column no) in error regexp. - Fix `nconc' bug. Eliminate redundant regexps. - (vhdl-minibuffer-tab): No indentation. - Use `hippie-expand-only-buffers' to take - expansions from VHDL buffers only; don't overwrite non-nil default of - `hippie-expand-only-buffers'; check whether - `hippie-expand-only-buffers' is bound. - (vhdl-ams-types, vhdl-ams-enum-values): Add identifiers from - `nature_pkg' package. - (vhdl-align-alist): Fix "when/else ... =>" case. - Align declaration keywords only at beg. of line. - Align <=, := and == among each other. - (vhdl-port-copy): Extended identifiers for signal names. - Fix on empty generic/port clause. - Fix parsing of comment on first line. - Allow generic clause begin on first line. - Add "inout" and "linkage" to direction modes. - (vhdl-font-lock-function-face): Change DarkCyan to Cyan4. - (vhdl-file-header): Insert VHDL language standard string. - (vhdl-instance-name): Unique numbers in instance names. - (vhdl-compile): Check for existing compile directory. - Print out file name if compiler does not; put it in - quotes if contains spaces. Check compiler name. - (vhdl-compiler): Change empty value from "" to nil. - (vhdl-make): Check for existing compile directory. - Fix missing options if there is a target. Check compiler name. - (vhdl-template-field): Fix case on all VHDL words. - (vhdl-template-others): Re-electrified "others". - (vhdl-speedbar-expand-architecture): Give user control over displayed - hierarchy depth. - (vhdl-project-alist): Insert library name in Makefile name. - Sources exclude regexp. Add file-specific compile exceptions. - Enhance customization of projects. - (vhdl-get-hierarchy): Include configurations in hierarchy list. - Fix bug with configurations. - Consider configurations; also at lower levels. - (vhdl-speedbar-item-info): Enhance displaying. - (vhdl-scan-file-contents): Fix skipping of comments in scanning. - Sources exclude regexp. - Allow comment lines in instantiations. - Fix used packages in package body scanning. - Allow code before first block configuration. - Scan also for "is" keyword of design units. - Scan configuration specification. - Clear directory alists first. - Consistency check. - Check for multiply scanned design units. - Scan components/subprograms in package. - Scan library clauses and subconfigurations. - Limit file size for scanning. - (vhdl-entity-alist): Change key to lower case, add original case - identifier. - (vhdl-electric-tab): Not overwrite non-nil default of - `hippie-expand-only-buffers'. - (vhdl-electric-tab): Check whether `hippie-expand-only-buffers' is - bound; use it to take expansions from VHDL buffers only. - (vhdl-electric-tab): Toggle comment indent. - (vhdl-generate-makefile): Check compiler name. - Add library option in Makefile generation command. - (vhdl-generate-makefile): Add dependencies for components in package. - (vhdl-template-elsif): No expansion in concurrent part (except AMS). - (vhdl-insert-string-or-file): Resolve environment variables. - (vhdl-insert-string-or-file): Fix NTEmacs `file-exists-p' problem. - (vhdl-submit-bug-report): Prompt for summary. - (vhdl-resolve-paths): Rearrange environment variable resolution. - (vhdl-scan-project-contents): Rearrange environment variable - resolution. - (vhdl-scan-project-contents): Allow absolute paths. - (vhdl-doc-coding-style): Update RMM URL. - (vhdl-end-of-leader): Consider "is" keyword in VHDL'93. - (vhdl-model-insert): Replace header prompts too. - (vhdl-template-header): New argument `is-model'. - (vhdl-template-generate-body): Remove "begin" for VHDL'93. - (vhdl-actual-port-name): Change default value (no "_i" extension). - (vhdl-template-modify): Delete date instead of kill. - (vhdl-get-source-files): Don't match source files beginning with ".". - (vhdl-project-*-alist): Merge with variables `vhdl-*-alist'. - (vhdl-speedbar-*): Many enhancements and fixes in hierarchy browser. - (vhdl-speedbar-expand-*): Display used packages. - (vhdl-sequential-statement-p): Better algorithm. - (vhdl-electric-mode, vhdl-stutter-mode): Change key bindings. - (vhdl-electric-...): No stuttering within literals. - (vhdl-template-footer): Replace keywords in footer as in header. - (vhdl-align-...): Enhance alignment, add progress reporting. - (vhdl-beautify-region): Bug fix. - (vhdl-comment-insert-inline): Remove wrapping to next line if too long. - (vhdl-testbench-configuration-name) - (vhdl-update-sensitivity-list-buffer): Fix starting cursor position. - (vhdl-prepare-search-[12]): Fix search within hidden code. - (vhdl-speedbar-jump-to-unit): Disable cursor re-positioning. - (vhdl-template-for): Fix sequential statement part detection. - (vhdl-electric-space): Fix wrapping for non-word characters. - (vhdl-template-standard-package): Don't insert "std" library. - (vhdl-template-architecture): Code optimization. - (vhdl-template-package): Search for existing package name. - (vhdl-template-component-decl, vhdl-port-paste-declaration): - Insert "is" in VHDL'93. - (match-string-no-properties, vhdl-forward-comment): New aliases. - (vhdl-speedbar-library-face, vhdl-speedbar-subprogram-face): New faces. - (file-expand-wildcards, regexp-opt, subst-char-in-string) - (vhdl-add-modified-file, vhdl-align-buffer, vhdl-align-declarations) - (vhdl-align-list, vhdl-align-region-2, vhdl-align-region-groups) - (vhdl-align-same-indent, vhdl-aput, vhdl-auto-load-project) - (vhdl-backward-same-indent, vhdl-beginning-of-block) - (vhdl-character-to-event, vhdl-compile-directory) - (vhdl-compile-print-file-name, vhdl-compose-components-package) - (vhdl-compose-insert-generic, vhdl-compose-insert-port) - (vhdl-compose-insert-signal, vhdl-compose-new-component) - (vhdl-compose-place-component, vhdl-compose-wire-components) - (vhdl-default-directory, vhdl-delete, vhdl-delete-indentation) - (vhdl-do-group, vhdl-do-list, vhdl-do-same-indent) - (vhdl-duplicate-project, vhdl-end-of-block, vhdl-expand-abbrev) - (vhdl-expand-paren, vhdl-export-project, vhdl-fill-group) - (vhdl-fill-list, vhdl-fill-region, vhdl-fill-same-indent) - (vhdl-fix-case-word, vhdl-fix-clause, vhdl-forward-comment) - (vhdl-forward-same-indent, vhdl-generate-makefile-1) - (vhdl-get-compile-options, vhdl-get-components-package-name) - (vhdl-get-end-of-unit, vhdl-get-make-options, vhdl-get-packages) - (vhdl-get-visible-signals, vhdl-goto-marker) - (vhdl-hs-forward-sexp-func, vhdl-hs-minor-mode, vhdl-import-project) - (vhdl-indent-group, vhdl-insert-file-contents, vhdl-load-cache) - (vhdl-makefile-name, vhdl-match-string-downcase, vhdl-max-marker) - (vhdl-parse-group-comment, vhdl-paste-group-comment) - (vhdl-port-paste-context-clause, vhdl-port-paste-initializations) - (vhdl-port-reverse-direction, vhdl-process-command-line-option) - (vhdl-project-p, vhdl-re-search-backward, vhdl-re-search-forward) - (vhdl-remove-trailing-spaces, vhdl-require-hierarchy-info) - (vhdl-resolve-env-variable, vhdl-run-when-idle, vhdl-save-cache) - (vhdl-save-caches, vhdl-scan-context-clause) - (vhdl-scan-directory-contents, vhdl-set-compiler, vhdl-set-project) - (vhdl-show-messages, vhdl-sort-alist, vhdl-speedbar-check-unit) - (vhdl-speedbar-contract-all, vhdl-speedbar-contract-level) - (vhdl-speedbar-display-directory, vhdl-speedbar-display-projects) - (vhdl-speedbar-expand-all, vhdl-speedbar-expand-config) - (vhdl-speedbar-expand-package, vhdl-speedbar-expand-project) - (vhdl-speedbar-generate-makefile, vhdl-speedbar-insert-projects) - (vhdl-speedbar-insert-subpackages, vhdl-speedbar-line-key) - (vhdl-speedbar-line-project, vhdl-speedbar-line-text) - (vhdl-speedbar-make-design, vhdl-speedbar-make-subpack-line) - (vhdl-speedbar-make-subprogram-line, vhdl-speedbar-place-component) - (vhdl-speedbar-refresh, vhdl-speedbar-set-depth) - (vhdl-speedbar-update-current-project, vhdl-statistics-buffer) - (vhdl-subprog-copy, vhdl-subprog-flatten, vhdl-subprog-paste-body) - (vhdl-subprog-paste-call, vhdl-subprog-paste-declaration) - (vhdl-subprog-paste-specification, vhdl-template-others-hook) - (vhdl-template-replace-header-keywords, vhdl-toggle-project) - (vhdl-uniquify, vhdl-update-file-contents, vhdl-update-hierarchy) - (vhdl-update-progress-info, vhdl-update-sensitivity-list) - (vhdl-update-sensitivity-list-buffer) - (vhdl-update-sensitivity-list-process, vhdl-use-direct-instantiation) - (vhdl-warning, vhdl-warning-when-idle) - (vhdl-widget-directory-validate, vhdl-work-library) - (vhdl-write-file-hooks-init): New functions. - (vhdl-aappend, vhdl-add-warning, vhdl-align-noindent-buffer) - (vhdl-align-noindent-region, vhdl-create-customize-menu) - (vhdl-forward-unit, vhdl-modify-date-init, vhdl-project-switch) - (vhdl-scan-file-contents, vhdl-speedbar-display-hierarchy) - (vhdl-speedbar-toggle-hierarchy): Functions deleted. - (vhdl-in-comment-p, vhdl-in-string-p, vhdl-standard-p): Define as - functions, not defsubsts. - (vhdl-in-comment-or-string-p, vhdl-speedbar-project-p): - Delete defsubsts. - (vhdl-compose, vhdl-naming, vhdl-speedbar, vhdl-template) - (vhdl-testbench): New customization groups. - (vhdl-electric): Customization group deleted. - (vhdl-align-alist, vhdl-doc-coding-style, vhdl-doc-keywords) - (vhdl-imenu-generic-expression): Define as constants instead of - variables. - (vhdl-ams-packages, vhdl-doc-release-notes, vhdl-emacs-21) - (vhdl-hs-start-regexp, vhdl-time-stamp, vhdl-xemacs): New constants. - (vhdl-font-lock-keywords-0): Constants deleted. - (vhdl-prepare-search-1, vhdl-prepare-search-2, vhdl-visit-file): - New macros. - (vhdl-ext-syntax-table): Macro deleted. - (vhdl-align-group-separate, vhdl-align-same-indent) - (vhdl-architecture-file-name, vhdl-compile-use-local-error-regexp) - (vhdl-components-package-name, vhdl-compose-architecture-name) - (vhdl-compose-create-files, vhdl-compose-include-header) - (vhdl-copyright-string, vhdl-default-library, vhdl-directive-keywords) - (vhdl-entity-file-name, vhdl-file-name-case) - (vhdl-include-group-comments, vhdl-include-type-comments) - (vhdl-indent-syntax-based, vhdl-makefile-generation-hook) - (vhdl-package-file-name, vhdl-project-auto-load) - (vhdl-project-file-name, vhdl-project-sort, vhdl-speedbar-auto-open) - (vhdl-speedbar-cache-file-name, vhdl-speedbar-display-mode) - (vhdl-speedbar-jump-to-unit, vhdl-speedbar-save-cache) - (vhdl-speedbar-scan-limit, vhdl-speedbar-update-on-saving) - (vhdl-testbench-configuration-name) - (vhdl-testbench-include-configuration, vhdl-testbench-include-header) - (vhdl-testbench-include-library, vhdl-use-components-package) - (vhdl-use-direct-instantiation): New options. - (vhdl-compiler-options, vhdl-speedbar, vhdl-speedbar-hierarchy-indent) - (vhdl-speedbar-show-hierarchy, vhdl-testbench-architecture-header) - (vhdl-testbench-entity-header): Options deleted. - (speedbar-indentation-width, vhdl-compile-file-name) - (vhdl-config-alist, vhdl-directive-keywords-regexp) - (vhdl-directory-alist, vhdl-font-lock-keywords-0, vhdl-menu-max-size) - (vhdl-mode-ext-syntax-table, vhdl-modified-file-list) - (vhdl-port-flattened, vhdl-port-reversed-direction) - (vhdl-speedbar-hierarchy-depth, vhdl-speedbar-last-selected-project) - (vhdl-speedbar-show-projects, vhdl-speedbar-shown-project-list) - (vhdl-speedbar-shown-unit-alist, vhdl-speedbar-update-current-unit) - (vhdl-subprog-flattened, vhdl-subprog-list, vhdl-updated-project-list) - (vhdl-warnings): New variables. - (vhdl-project-ent-inst-list, vhdl-project-entity-alist) - (vhdl-project-package-alist, vhdl-speedbar-last-file-name) - (vhdl-speedbar-shown-units-alist, vhdl-startup-warnings): Delete vars. - -2003-03-04 Rob Kaut (tiny change) - - * progmodes/vhdl-mode.el (vhdl-comment-uncomment-region): - Remove two comment characters at start of line instead of one. - -2003-03-03 Vinicius Jose Latorre - - * printing.el (pr-get-symbol): Move it to next eval-and-compile. - -2003-03-03 John Paul Wallington - - * ibuf-macs.el (ibuffer-aif): Use `make-symbol' instead of - `gensym' in case user calls macro at runtime. - (ibuffer-save-marks): Likewise. - -2003-03-03 Kenichi Handa - - * language/japan-util.el (japanese-symbol-table): Add two entries - to make it complete. - -2003-03-03 Andreas Schwab - - * info.el (Info-fontify-node): Don't hide indentation before the - reference name. Don't process a reference twice when a new tag is - inserted. - (Info-hide-note-references): Fix doc and customize type. - -2003-03-02 Matt Swift - - * emacs-lisp/lisp-mode.el (emacs-lisp-docstring-fill-column): - New custom variable. - (lisp-fill-paragraph): Use it. Add ?, to `paragraph-separate' so - that first docstring lines ending with a comma are respected. - Add "`(" to same so that function and macro bodies beginning with a - backquote do not get disturbed. Revise the comments. - -2003-03-01 Jan Dj,Ad(Brv - - * startup.el (command-line): Call menu-bar-mode with 1 instead of t. - - * menu-bar.el (menu-bar-mode): Change to define-minor-mode - and initialize as for tool-bar-mode. - -2003-02-28 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.30 released. - Replace term "path" with "localname" unless it is used for a - search path. - (tramp-handle-expand-file-name): Allow ".." to cross host boundaries. - (tramp-open-connection-setup-interactive-shell): Unset $ENV in - addition to setting $PS1 when starting the Bourne-ish shell. - Some sh implementations (eg, bash when called as sh) read the file - named there on startup, which could clobber $PS1. - (tramp-do-copy-or-rename-file-one-local): New function. - Not implemented. Not used. Should invoke rcp or scp directly to keep - the time. - -2003-02-28 Michael Albinus - - * net/tramp-smb.el: Replace term `path' with `localname' - unless it is used for a search path. In GNU, the word `path' is - reserved for search paths. - - * net/tramp.el (tramp-send-string, tramp-send-region): Remove. - (tramp-send-string): New function. Takes over the role of the - functions above, in order to have a unique place handling - `tramp-chunksize'. Same implementation as `tramp-send-region'. - (tramp-chunksize): It's now a defcustom. Set to 500 on systems - only known to have a buggy `process-send-string' implementation. - First black-listed constellation is GNU Emacs/ hpux. - (tramp-send-region): Correct debug message. - (tramp-bug): Add `tramp-chunksize'. - -2003-02-26 Matt Swift - - * startup.el: Streamline code in several functions for efficiency - and readability. Rephrase booleans to avoid `(not noninteractive)'. - Clarify several booleans expressions using De Morgan's laws. - - (command-line): Fix barf when first command-line option handled by - `command-line-1' is in the form --OPT=VAL. - (command-line-1): Restore intended behavior of the --directory/-L - command-line option: "-L a -L b -L c" on the command-line now puts - '(a b c) at the front of `load-path'. - -2003-02-26 Oliver Scholz - - * play/gamegrid.el (gamegrid-add-score): Add info to docstring. - (gamegrid-add-score-with-update-game-score-1): New function, - factored out of `gamegrid-add-score-with-update-game-score'. - (gamegrid-add-score-with-update-game-score): Use it. Fall back on - `gamegrid-add-score-insecure' if the requested file does not exist - in $(gamedir), in case the user has installed a game on his own. - (gamegrid-add-score-insecure): Accept optional directory argument. - -2003-02-25 Andreas Schwab - - * progmodes/make-mode.el (makefile-font-lock-keywords): Protect shell - variable references by requireing that $ is not preceded by another $. - -2003-02-25 Kenichi Handa - - * env.el (setenv): Fix previous change. - -2003-02-25 Ramakrishnan M (tiny change) - - * language/mlm-util.el (mlm-char-glyph): Fix more rules. - -2003-02-24 Stefan Monnier - - * progmodes/simula.el: Move abbrev loading to after the fun it uses. - (simula-install-standard-abbrevs): Use dolist. - Use system-flag when calling define-abbrev. - -2003-02-24 Dave Love - - * obsolete/cplus-md.el: Delete. (Requires removed c-mode.el.) - - * env.el (read-envvar-name): Decode names. - (substitute-env-vars): Use eval-when-compile and char class. - (setenv): Doc fix. Encode the data (after checking that's possible). - (getenv): Encode the name and decode the result. - -2003-02-24 Ken Manheimer - - * allout.el (allout-pre-command-business): Fix docstring. - -2003-02-24 Ramakrishnan M (tiny change) - - * language/mlm-util.el (mlm-char-glyph): Fix several composing rules. - -2003-02-24 Kenichi Handa - - * international/characters.el: Fix syntaxes of gb2312 and big5. - - * language/japan-util.el (sentence-end-save): Variable deleted. - (setup-japanese-environment-internal): Don't setup sentence-end. - (exit-japanese-environment): Function deleted. - - * language/japanese.el ("Japanese"): Delete `exit-function'. - - * textmodes/paragraphs.el (sentence-end): Add Chinese and Japanese - characters. - -2003-02-24 Ramakrishnan M (tiny change) - - * language/mlm-util.el (mlm-char-glyph): Add entries for "halant + - rakar + halant" and "halant + rrakar + halant". - -2003-02-23 Richard M. Stallman - - * replace.el (query-replace-read-args): Return just 3 values. - (query-replace, query-replace-regexp) - (query-replace-regexp-eval, map-query-replace-regexp) - (replace-string, replace-regexp): Read the start and end args - separately so that the expressions are recorded in command-history. - - * menu-bar.el (Revert Buffer): Condition on buffer-file-number. - - * startup.el (inhibit-startup-hooks): New variable. - (normal-top-level): Obey that variable. - (command-line-1): Run emacs-startup-hook before term-setup-hook. - Set inhibit-startup-hooks too. - - * files.el (revert-buffer): Different error message - for reverting a nonexistent file. - -2003-02-22 Stefan Monnier - - * progmodes/cperl-mode.el: Merge changes from CPerl-5.0. - (toplevel): Require man. - Don't autoload tmm-prompt (it's in loaddefs.el). - (cperl-electric-backspace-untabify): New var. - (cperl-electric-backspace): Use it. - (cperl-vc-header-alist): Extract numeric version from the Id. - (cperl-build-manpage): New fun. - (cperl-menu): Use it. Add toggle-autohelp. - (cperl-mode) : Understand prototypes. - (cperl-electric-brace): Use `cperl-after-block-p' for detection. - (cperl-electric-keyword): Make $if (etc: "$@%&*") non-electric. - '(' after keyword would insert a doubled paren. - (cperl-calculate-indent): Update syntaxification before checks. - Fix wrong indent of blocks starting with POD. - (cperl-find-pods-heres): If no end of HERE-doc found, mark to the end - of buffer. This enables recognition of end of HERE-doc "as one types". - Require "\n" after trailing tag of HERE-doc. - \( made non-quoting outside of string/comment (gdj-contributed). - Likewise for \$. Remove `here-doc-group' text property at start - (makes this property reliable). - Text property `first-format-line' ==> t. - Do not recognize $opt_s and $opt::s as s///. - (cperl-after-block-p): Optional arg pre-block to check for a pre-block - Recognize `continue' blocks too. - (cperl-after-expr-p): Update syntaxification before checks. Work after - here-docs, formats, and PODs too (affects many electric constructs). - (cperl-fix-line-spacing): Allow "_" in $vars of foreach etc. - (cperl-perldoc): Use case-sensitive search. - - * progmodes/cperl-mode.el: Merge changes from CPerl-4.35. - (cperl-xemacs-p): Move. - (cperl-can-font-lock): New var to replace window-system. - (cperl-enable-font-lock): Use it. - (cperl-use-major-mode): New var. - (cperl-mode): Use it. - (cperl-calculate-indent): Remove code whose removal was missed - in some earlier merge. - (cperl-tags-hier-init): Use display-popup-menus-p. - -2003-02-22 Kai Gro,A_(Bjohann - - * files.el (abbreviate-file-name): Shorten docstring: variables - are now hyperlinks and `C-h v' need not be mentioned explicitly. - -2003-02-21 Kai Gro,A_(Bjohann - - * files.el (abbreviate-file-name): Document removal of - automounter prefixes. Reported by Lars Hansen. - -2003-02-21 Kim F. Storm - - * emulation/cua-base.el: Add run-time check to catch users trying - to use older versions of CUA-mode, rather than the version - distributed with Emacs. Use autoload cookies and eval-after-load. - - * startup.el (command-line): Clarify and tidy up the message - printed when there are errors in the user-init-file. - Do not encapsulate the error data; it's read by humans here. - Do not split windows when displaying the *Message* buffer. - -2003-02-20 Stefan Monnier - - * subr.el (with-syntax-table): Don't copy the table any more. - -2003-02-20 Ehud Karni (tiny change) - - * mail/rmail.el (rmail-insert-inbox-text): Make the pop3 mechanism - work on cygwin systems too. - -2003-02-20 Juanma Barranquero - - * progmodes/ebrowse.el (ebrowse-show-file-name-at-point): - Remove useless check. - -2003-02-20 Andreas Schwab - - * info.el (Info-extract-menu-node-name): Stop if colon is - followed by open paren. - -2003-02-20 Francesco Potort,Al(B - - * mail/undigest.el (unforward-rmail-message): Allow nested - unforwarding, that is, preserve old Forwarded-From/Date headers. - -2003-02-20 Kenichi Handa - - * term/w32-win.el: Call set-fontset-font with NAME nil. - - * international/mule-diag.el (print-fontset): If FONTSET is nil, - use the default fontset. - (describe-fontset): If the current frame is not using a fontset, - call print-fontset with nil. - -2003-02-19 Andre Spiegel - - * vc.el (vc-binary-assoc, vc-binary-suffixes): Remove; these - were accidentally left over during the VC redesign in 2000. - -2003-02-18 Juanma Barranquero - - * help-macro.el (make-help-screen): Fix character constant. - - * mouse-sel.el (mouse-sel-determine-selection-thing): Likewise. - - * calc/calc-graph.el (calc-graph-plot): Likewise. - - * calc/calc-prog.el (calc-macro-edit-variable): Likewise. - - * emacs-lisp/edebug.el: Likewise. - - * emacs-lisp/helper.el (Helper-help-scroller): Likewise. - - * language/cyril-util.el (standard-display-cyrillic-translit): - Likewise. - - * mail/rfc822.el (rfc822-nuke-whitespace): Likewise. - - * progmodes/cperl-mode.el (cperl-electric-keyword) - (cperl-electric-pod, cperl-do-auto-fill): Likewise. - - * textmodes/reftex-ref.el (reftex-reference): Likewise. - - * textmodes/table.el (table-generate-source): Use ?\\ instead of - space in "work in progress" message. - - * emacs-lisp/tq.el (tq-create): Fix quoted lambda expression. - -2003-02-17 Dave Love - - * progmodes/ebrowse.el (ebrowse-output): Don't use gensym. - -2003-02-17 Markus Rost - - * calendar/calendar.el (diary-file-name-prefix-function): - Fix custom type. - -2003-02-17 Andre Spiegel - - * vc-cvs.el (vc-cvs-dir-state): Protect against DIR not being - under CVS control. Suggested by Masanobu UMEDA. - -2003-02-17 Kenichi Handa - - * files.el (insert-directory): Add workaround for the case that we - can't trust ls's output as to byte positions of filenames. - -2003-02-15 Richard M. Stallman - - * ffap.el: Many doc fixes. - (ffap-replace-file-component): - Renamed from ffap-replace-path-component. Callers changed. - (ffap-host-to-filename): Renamed from ffap-host-to-path. Callers chgd. - - * international/iso-ascii.el (iso-ascii-display-table): New variable. - (iso-ascii-standard-display-table): New variable. - (iso-ascii-display): Define in iso-ascii-display-table. - (iso-ascii-mode): New command. - - * tar-mode.el (tar-header-block-summarize): - Use l for symlink, h for hard link. - -2003-02-15 David Kastrup - - * net/ange-ftp.el (ange-ftp-get-file-entry): Allow for graceful - failure returning nil, as documented. - -2003-02-14 Dave Love - - * international/code-pages.el: Undo `Trailing whitepace deleted.' - damage. - (cp1125, mik): Nullify mime-charset. - - * language/cyrillic.el ("Cyrillic-KOI8"): Fix input-method. - ("Russian"): New. - ("Bulgarian"): Add tutorial. - - * international/mule-cmds.el (locale-language-names): Use Italian, - Russian, Turkish, Chinese-EUC-TW. - (set-locale-environment): Set ps-paper-type. - -2003-02-14 ARISAWA Akihiro (tiny change) - - * time.el (display-time-string-forms): Add face property to mail - string. - -2003-02-14 Juanma Barranquero - - * international/mule-cmds.el (view-hello-file): Use `view-file' - instead of `find-file-read-only'. - - * dired-aux.el (dired-query-alist): Fix use of character constant. - - * simple.el (backward-delete-char-untabify): Likewise. - - * strokes.el (strokes-read-complex-stroke): Likewise. - - * wid-edit.el (widget-choose): Likewise. - - * xml.el (xml-parse-elem-type): Likewise. - - * emacs-lisp/testcover-ses.el (ses-exercise-signals): Likewise. - - * progmodes/cperl-mode.el (cperl-next-bad-style): Likewise. - - * progmodes/idlwave.el (idlwave-show-begin): Likewise. - -2003-02-13 Stefan Monnier - - * international/mule-cmds.el (sort-coding-systems): Use \'. - (select-safe-coding-system): Remove redundant assq check. - Remove raw-text, emacs-mule and no-conversion from the list of - proposed encodings unless there's nothing else. - -2003-02-13 Markus Rost - - * files.el (find-alternate-file): Undo last change. - - * dired.el (dired-directory): Add autoload cookie. - -2003-02-13 Juanma Barranquero - - * international/characters.el: Use new ?\s syntax instead of "? " - followed by a comment. - - * ruler-mode.el (ruler-mode-margins-char): Likewise. - -2003-02-13 Dave Love - - * newcomment.el (comment-indent): Ensure space before added comment. - -2003-02-13 Vinicius Jose Latorre - - * ps-print.el: Change the policy of background/foreground default - color. - (ps-print-version): New version number (6.5.9). - (ps-default-fg, ps-default-bg): Adjust default value. - (ps-begin-file, ps-begin-job): ps-default-fg and ps-default-bg - variables now use `t' to indicate the use of Emacs session - background/foreground color. - (ps-output-string-prim): If index out of range, insert hexadecimal - representation of character. - -2003-02-13 Kim F. Storm - - * help.el (where-is): Rename remap-command to command-remapping. - * help-fns.el (describe-function-1): Likewise. - -2003-02-12 Glenn Morris - - * progmodes/fortran.el (fortran-fill): Fill lines that do not have - comments. - -2003-02-12 Stefan Monnier - - * progmodes/fortran.el (fortran-mode): Set comment-use-syntax. - (fortran-fill-paragraph): Use fill-comment-paragraph. - -2003-02-12 Juanma Barranquero - - * files.el (file-truename): Revert change from 2002-11-27. - -2003-02-12 Luc Teirlinck - - * help-fns.el (describe-function-1): Change output for keyboard macros. - -2003-02-12 Andreas Schwab - - * progmodes/sh-script.el (sh-mode-map): Don't remap - beginning-of-defun to the non-existing command - sh-beginning-of-compound-command. - -2003-02-12 Karl Chen (tiny change) - - * files.el (find-alternate-file): Check whether `dired-directory' - is bound. - -2003-02-12 Simon Marshall - - * progmodes/make-mode.el (makefile-font-lock-keywords): - Fontify single character variable references, but protect shell - variables references. - (makefile-mode): Make `$' be punctuation in font-lock-defaults. - -2003-02-12 Ami Fischman - - Face markup of calendar and diary displays: Any entry line that - ends with [foo:value] where foo is a face attribute (except :box - :stipple) or with [face:blah] tags, will have these values applied - to the calendar and fancy diary displays. These attributes "stack" - on calendar displays. File-wide attributes can be defined as - follows: the first line matching "^# [tag:value]" defines the - value for that particular tag. All of the tags' regexps can be - customized. - - * calendar/calendar.el (diary-face-attrs): New custom. - (diary-file-name-prefix-function): New custom. - (diary-glob-file-regexp-prefix): New custom. - (diary-file-name-prefix): New custom. - (generate-calendar-window): Check that font-lock-mode is bound - before checking value. - (mark-visible-calendar-date): Add the ability to pass face - attribute/value pairs in the mark argument. Handle the mark. - - * calendar/diary-lib.el (diary-attrtype-convert): Convert an - attribute value string to the desired type. - (diary-pull-attrs): New function that pulls the attributes off a - diary entry, merges with file-global attributes, and returns - the (possibly modified) entry and a list of attribute/values using - diary-attrtype-convert. - (list-diary-entries, fancy-diary-display, show-all-diary-entries) - (mark-diary-entries, mark-sexp-diary-entries) - (list-sexp-diary-entries): Add handling of file-global attributes; - add handling of entry attributes using diary-pull-attrs. - (mark-calendar-days-named, mark-calendar-days-named) - (mark-calendar-date-pattern, mark-calendar-month) - (add-to-diary-list): Add optional paramater `color' for passing - face attribute info through the callchain. Pass this parameter around. - -2003-02-11 Stefan Monnier - - * progmodes/etags.el (find-tag-tag): Move (default foo) to before - `:' in the prompt. - (find-tag): Make sure we move point in the proper window. - - * progmodes/meta-mode.el (meta-fill-paragraph): Remove. - (meta-common-initialization): Don't set fill-paragraph-function - now that fill-paragraph takes care of comments. - - * progmodes/scheme.el (scheme-mode-syntax-table): Don't switch - the current buffer's syntax-table. - - * progmodes/simula.el (simula-font-lock-syntactic-keywords): New var. - (simula-font-lock-keywords-1): Simplify. - (simula-font-lock-keywords-2): Use regexp-opt. - (simula-emacs-features): Remove. - (simula-mode-syntax-table): Setup %...\n as comment style b. - (simula-mode-map): Remove compatibility cruft. - (simula-keep-region-active): Remove. - (simula-popup-menu): Simplify. - (simula-mode): Move abbrev-table setup to top-level. - (simula-match-string-or-comment): Remove. - - * progmodes/tcl.el (tcl-omit-ws-regexp): Correctly handle cases - like `proc foo {a {b c} d} {'. - (tcl-mode): Make comment-start-skip more selective. - - * info-xref.el (info-xref-check): Use line-beginning-position. - (info-xref-all-info-files): Cons a bit less. - (info-xref-check-buffer): Use push and replace-regexp-in-string. - (info-xref-output): Call insert only once. - (info-xref-whitespace): Remove. - -2003-02-11 John Paul Wallington - - * ibuffer.el (toplevel): Don't require `font-lock'; - require `font-core' instead, even though it is dumped. - - * ibuf-ext.el (ibuffer-save-with-custom, ibuffer-add-to-tmp-hide) - (ibuffer-add-to-tmp-show): Doc fixes. - - * language/tamil.el ("Tamil"): Doc fix. - -2003-02-11 Juanma Barranquero - - * language/vietnamese.el ("Vietnamese"): Fix typos. - - * info-xref.el (info-xref-check-buffer): Fix typo. - - * makefile.w32-in (DONTCOMPILE): Add malayalam.el and tamil.el. - -2003-02-11 Kenichi Handa - - * loadup.el: Load "language/malayalam" and "language/tamil". - -2003-02-11 KAWABATA, Taichi - - * Makefile.in (DONTCOMPILE): Add malayalam.el and tamil.el. - - * language/devan-util.el: Maintainer's mail address changed. - (devanagari-composable-pattern): Add DANDA character. - (dev-char-glyph): Add an entry for DANDA. - - * language/devanagari.el: Maintainer's mail address changed. - - * language/indian.el: Maintainer's mail address changed. - - * language/ind-util.el (indian-dev-base-table): Table fixed. - (indian-pnj-base-table): Table contents defined. - (indian-gjr-base-table): Likewise. - (indian-ori-base-table): Likewise. - (indian-bng-base-table): Likewise. - (indian-asm-base-table): Likewise. - (indian-tlg-base-table): Likewise. - (indian-knd-base-table): Likewise. - (indian-mlm-base-table): Likewise. - (indian-tml-base-table): Likewise. - (indian-pnj-itrans-v5-hash, indian-gjr-itrans-v5-hash) - (indian-ori-itrans-v5-hash, indian-bng-itrans-v5-hash) - (indian-asm-itrans-v5-hash, indian-tlg-itrans-v5-hash) - (indian-knd-itrans-v5-hash, indian-mlm-itrans-v5-hash) - (indian-tml-itrans-v5-hash): New variables. - - * language/malayalam.el: New file. - * language/mlm-util.el: New file. - * language/tamil.el: New file. - * language/tml-util.el: New file. - -2003-02-11 Kevin Ryde - - * info-xref.el: New file. - -2003-02-10 Stefan Monnier - - * textmodes/page-ext.el (pages-directory-mode-map): New. - (pages-directory-map): Redefine as an varalias. - (pages-directory-mode): Use new map var and run mode hook. - (pages-directory-address-mode): Use define-derived-mode. - - * textmodes/texinfmt.el (texinfo-format-iftex, texinfo-format-ifhtml) - (texinfo-format-ifplaintext, texinfo-format-tex, texinfo-format-html) - (texinfo-format-ifnotinfo, texinfo-format-titlepage) - (texinfo-format-titlespec, texinfo-format-ignore, texinfo-if-set) - (texinfo-if-clear): Use re-search-forward's return value. - (texinfo-sort-startkeyfun, texinfo-format-buffer-1) - (texinfo-format-region): Use line-{end,beginning}-position. - (texinfo-append-refill, texinfo-alias): Use match-string-no-properties. - - * emacs-lisp/eldoc.el (eldoc-echo-area-multiline-supported-p) - (eldoc-use-idle-timer-p): Remove. - (timer): Never require. It only works in current Emacs anyway. - (eldoc-mode, eldoc-message, eldoc-display-message-p) - (eldoc-docstring-format-sym-doc, eldoc-remove-command): Simplify. - - * ffap.el (ffap-complete-as-file-p): - Use minibuffer-completing-file-name. - - * international/mule.el (load-with-code-conversion): Use push. - - * font-core.el (font-lock-defontify): Use restore-buffer-modified-p. - - * gud.el (gud-gdb-run-command-fetch-lines, gud-display-line): - Use with-current-buffer and simplify. - - * help-mode.el (help-xref-on-pp): Only add xref if the text - is less than 5K. - - * pcvs-parse.el (cvs-parse-table): "no longer in repo" does not - make the file dead if we used the -n arg. - - * emacs-lisp/cl-macs.el (process-get): Add setf method. - - * server.el (server-previous-strings): Remove. - (server-process-filter): Use (process-get 'previous-string) instead. - (server-sentinel): Remove code made superfluous. - -2003-02-10 Luc Teirlinck - - * info.el (Info-follow-nearest-node): Implement new behavior. - -2003-02-10 Juanma Barranquero - - * progmodes/ebnf-otz.el (ebnf-optimize, ebnf-optimize1): Fix typo. - - * progmodes/ebnf2ps.el (ebnf2ps): Fix typo. - (ebnf-syntactic): Change group name and tag from "ebnf-syntatic". - (ebnf-syntax, ebnf-lex-comment-char, ebnf-lex-eop-char) - (ebnf-terminal-regexp, ebnf-case-fold-search) - (ebnf-iso-alternative-p, ebnf-iso-normalize-p) - (ebnf-yac-ignore-error-recovery): Add to group "ebnf-syntactic", not - "ebnf-syntatic". - (ebnf-optimize, ebnf-print-buffer, ebnf-print-region) - (ebnf-spool-buffer, ebnf-spool-region, ebnf-eps-buffer) - (ebnf-eps-region, ebnf-syntax-buffer, ebnf-syntax-region) - (ebnf-generate-region): Fix typo. - -2003-02-10 KAWABATA, Taichi - - * language/ind-util.el (indian-itrans-v5-table): Add entries for - "E" and "O". - -2003-02-10 Martin Stjernholm - - * progmodes/cc-styles.el (c-set-offset): Don't find a default - syntactic element through syntactic analysis if called outside - a CC Mode buffer. - -2003-02-09 Martin Stjernholm - - * progmodes/cc-mode.el (c-basic-common-init): - Install `c-fill-paragraph' on `fill-paragraph-function'. - Although it's not the normal way to call it in a CC Mode buffer it - makes a direct call to `fill-paragraph' work better. - -2003-02-08 Kim F. Storm - - * printing.el (pr-get-symbol): Define during compile. - -2003-02-07 Vinicius Jose Latorre - - * printing.el: New file. - -2003-02-07 Francesco Potort,Al(B - - * language/european.el ("French", "Slovenian"): Fix doc strings. - -2003-02-06 John Paul Wallington - - * mail/rmailsum.el (rmail-summary-previous-msg): Add docstring. - (rmail-summary-line-count-flag, rmail-summary-previous-labeled-message) - (rmail-summary-next-labeled-message, rmail-summary-resend) - (rmail-summary-override-mail-send-and-exit): Doc fixes. - -2003-02-06 Francesco Potort,Al(B - - * language/european.el ("Italian"): New. - -2003-02-06 Matthew Swift - - * dired.el (dired-move-to-filename-regexp): Support "K" suffix on - "ls -alh" output. - -2003-02-05 Juanma Barranquero - - * font-lock.el (font-lock-reference-face): Add obsolescence - declaration and remove redundant info from docstring. - - * log-edit.el (cvs-commit-buffer-require-final-newline) - (cvs-changelog-full-paragraphs): Likewise. - - * mwheel.el (mouse-wheel-down-button, mouse-wheel-up-button) - (mouse-wheel-click-button): Likewise. - - * pcvs-defs.el (cvs-diff-ignore-marks, cvs-diff-buffer-name): Likewise. - - * vc.el (vc-annotate-display, vc-checkout-carefully): Likewise. - - * vc-hooks.el (vc-ignore-vc-files, vc-master-templates) - (vc-header-alist): Likewise. - - * emacs-lisp/checkdoc.el (checkdoc-minor-keymap): Likewise. - - * textmodes/outline.el (outline-visible): Likewise. - -2003-02-05 Kim F. Storm - - * ido.el (ido-define-mode-map): - Undo last change (duplicates part of 2003-02-04 change). - Remap `viper' delete commands only in file or dir mode. - -2003-02-05 Kai Gro,A_(Bjohann - - * ido.el (ido-define-mode-map): Interact with Viper. - -2003-02-05 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.29 released. - (tramp-send-region): Protect against tramp-chunksize being nil. - (tramp-chunksize): Set default to 500 as workaround for some ssh - connections. - (tramp-handle-directory-file-name): New implementation. Not sure - if it works. - (tramp-md5-function): Require md5 before checking function md5. - If using md5-encode, put wrapper around it that converts vector of - bytes to ascii text. - (top-level): Avoid byte-compiler warnings of unused variables if - the byte-compiler supports this. This is for the - with-parsed-tramp-file-name macro which is wont to produce such stuff. - -2003-02-05 Michael Albinus - - * net/tramp.el (tramp-handle-directory-file-name): Handle the case - PATH is "". - (tramp-completion-handle-file-name-all-completions): - Define `tramp-current-user' locally. See `tramp-parse-passwd'. - (tramp-parse-passwd): For su-alike methods it would be desirable - to return "root@localhost" as default. Unfortunately, we have no - information whether any user name has been typed already. So we - (mis-)use tramp-current-user as indication, assuming it is set in - `tramp-completion-handle-file-name-all-completions'. - (tramp-send-region): Handle the case `tramp-chunksize' is equal 0. - I did it accidently. Infinite loop ... - (tramp-get-device): `tramp-make-tramp-file-name' must not be - called with NIL path. It fails in case of multi-method. - (tramp-file-name-for-operation): Apply `expand-file-name' for - relative file names only. Otherwise there might be problems if - the default directory is another Tramp directory as the directory - the file is based on. - (tramp-find-foreign-file-name-handler): Check whether FILENAME is - a Tramp file name. It isn't if it comes from an expanded file - name (like "/xx:yy//zz"). - (tramp-devices): New variable. Keeps virtual device numbers. - Devices must distinguish physical file systems. The device - numbers provided by "lstat" aren't unique, because we operate on - different hosts. So we use virtual device numbers, generated by - `tramp-get-device'. Both Ange-FTP and EFS use device number -1. - In order to be different, we use device number (-1 x), whereby "x" - is unique for a given (multi-method method user host). - Suggested by Kai. - (tramp-perl-file-attributes): Always return device number -1. - There will be a virtual device number set in - `tramp-handle-file-attributes', which replaces this one. - (tramp-handle-file-attributes): Set virtual device number. - (tramp-get-device): New function. Returns the virtual device - number. If it doesn't exist, generate a new one. - (tramp-handle-file-regular-p): Use Emacs file name primitives - instead of calling tramp-handle-* equivalents directly. - Needed for tramp-smb. - (tramp-completion-function-alist-ssh): Add parsing of - "/etc/ssh_config" and "~/.ssh/config". Suggested by Kai. - (tramp-completion-function-alist, tramp-set-completion-function): - Doc string update. - (tramp-parse-sconfig, tramp-parse-sconfig-group): New functions. - Provide parsing of "~/.ssh/config" style files. - (tramp-completion-handle-expand-file-name): - Apply `tramp-drop-volume-letter'. Otherwise, there are problems - on W32 systems. - (tramp-completion-mode): Perform check (integerp last-input-event) - before (event-modifiers last-input-event) -- there might be - problems if `last-input-event' is a mouse event. - (tramp-parse-rhosts, tramp-parse-shosts) - (tramp-parse-hosts, tramp-parse-passwd, tramp-parse-netrc): - Use `file-readable-p' instead of `file-exists-p'. Otherwise these - functions might block. Reported by . - - * net/tramp-ftp.el (top-level): eval-after-load "ange-ftp" - '(tramp-disable-ange-ftp). Suggested by Kai. - (tramp-ftp-file-name-handler): `tramp-disable-ange-ftp' not needed - any longer. - (top-level): Defaults for `tramp-default-method-alist' must be a list. - - * net/tramp-smb.el (tramp-smb-file-name-handler-alist): - Apply `tramp-handle-directory-file-name'. - (tramp-smb-handle-file-attributes): Apply `tramp-get-device'. - ATIME and CTIME are (0 0) now (= "don't know"), which is more honest. - (tramp-smb-handle-make-directory): Use Emacs file name primitives - instead of calling tramp-smb-handle-* equivalents directly. - (tramp-smb-read-file-entry): Return size as a number, not a string. - (top-level): Defaults for `tramp-default-method-alist' must be a list. - -2003-02-05 Stefan Monnier - - * completion.el (eval-when-compile-load-eval, completion-eval-when) - (cmpl-read-time-eval, minibuffer-window-selected-p): Remove. - (completion-min-length, completion-max-length) - (completion-prefix-min-length): Don't hard-code the default value - when byte-compiling. - (complete): Inline minibuffer-window-selected-p. - -2003-02-04 Richard M. Stallman - - * term.el (term-raw-map): Set it up at load time. - (term-char-mode): Don't set up term-raw-map here. - (term-set-escape-char): Don't set up C-x subcommand. - (term-ansi-face-already-done): Renamed from - term-ansi-face-alredy-done. - (term-command-hook): Avoid error if STRING is empty. - (term, term-mode): Doc fixes. - - * term.el: Redesign handling of colors and faces. - Delete all the faces that this mode used to make. - (ansi-term-color-vector): New variable. - (ansi-term-fg-faces-vector, ansi-term-bg-faces-vector) - (ansi-term-inv-bg-faces-vector, ansi-term-inv-fg-faces-vector): - Variables deleted. - (term-default-fg-color, term-default-bg-color): Use defcustom. - (term-handle-colors-array): Use ansi-term-color-vector, - and specify face attributes rather than faces in `face' property. - - * term.el (term-ansi-fg-faces-vector, term-ansi-bg-faces-vector) - (term-ansi-inv-fg-faces-vector, term-ansi-inv-bg-faces-vector) - (term-ansi-reverse-faces-vector): Delete unused variables. - (term-ignore-error): Delete macro. - - * simple.el (back-to-indentation): Skip all whitespace - except for newlines. - - * files.el (find-alternate-file): Handle dired-directory - like buffer-file-name. - - * dired.el (dired-find-buffer-nocreate): Avoid error if - dired-directory is nil. - -2003-02-04 Juanma Barranquero - - * image.el (image-type-regexps): Fix typo. - - * international/characters.el: Restore missing space and put a - comment to protect it from being deleted as trailing whitespace. - - * ruler-mode.el (ruler-mode-margins-char): Likewise. - -2003-02-04 Francesco Potort,Al(B - - * mail/rmailout.el (rmail-output): If preserving MIME-version, - preserve Content-type too. - -2003-02-04 Kim F. Storm - - * ido.el (ido-define-mode-map): Remap viper delete char/word - commands to their ido specific equivalents. Disable ESC in - viper mode (to avoid exiting insert mode), since ido doesn't - work in viper command mode. - (ido-delete-backward-updir, ido-delete-backward-word-updir): - Handle remapped viper commands. - -2003-02-03 Juanma Barranquero - - * calculator.el (calculator): Don't use the minibuffer even in - electric mode; use a private buffer and display it in the minibuffer - window using `set-window-buffer'. - -2003-02-03 Dave Love - - * emacs-lisp/benchmark.el: New. - -2003-02-02 Andreas Schwab - - * progmodes/asm-mode.el (asm-font-lock-keywords): Allow arbitrary - words separated by dots. Match optional parenthesized word at - start of line. - - * font-lock.el - (font-lock-match-c-style-declaration-item-and-skip-to-next): - Don't require underscore in word before double open-paren. - -2003-02-02 John Paul Wallington - - * hexl.el (hexl-mode-map): Bind C-m to `hexl-self-insert-command'. - -2003-02-01 Stephen Gildea - - * time-stamp.el: Tweak doc strings and preamble commentary. - (time-stamp): Fix parsing of "%%a" in time-stamp-pattern (change - regexp subpattern 5) - (time-stamp-pattern): Initialize to nil to avoid regexp work in - default case. - (time-stamp-string): Call set-time-zone-rule instead of setenv - (time-stamp-hhmmss): Remove (not needed after all). - (time-stamp-month-dd-yyyy, time-stamp-dd/mm/yyyy) - (time-stamp-mon-dd-yyyy, time-stamp-dd-mon-yy, time-stamp-yy/mm/dd) - (time-stamp-yyyy/mm/dd, time-stamp-yyyy-mm-dd, time-stamp-yymmdd) - (time-stamp-hh:mm:ss, time-stamp-hhmm): Make obsolete. - -2003-01-31 Stefan Monnier - - * cus-edit.el (custom-unlispify-menu-entry): Use with-current-buffer. - (custom-save-variables): Use dolist, simplify. - Output a message if a `requests' entry looks suspicious. - (custom-save-faces): Use dolist, simplify. - -2003-01-31 Christoph Wedler - - * antlr-mode.el: Bug fixes, miscellaneous. - (antlr-mode): Make major mode work with cc-mode-5.29 or higher, - make it more rubust against changes in cc-mode's style variables - by using `boundp' and function `c-init-language-vars' if defined. - (antlr-c++-mode-extra): Only ask if language is not "Cpp". - (antlr-read-value): With completion, ignore case. - (antlr-run-tool-interactive): New function. - (antlr-run-tool): Use it for `interactive' specification. - - * antlr-mode.el: Simplify Emacs/XEmacs compatibility. - (cond-emacs-xemacs): New compile-time macro. - (defunx): New compile-time macro. - (ignore-errors-x): New compile-time macro. - (save-buffer-state-x): New compile-time macro. - - (antlr-scan-sexps, antlr-simple-scan-sexps): Deletia. - (antlr-scan-lists, antlr-simple-scan-sexps): Deletia. - (antlr-simple-default-directory): Deletia. - (antlr-default-directory): Define directly. - (antlr-simple-read-shell-command): Deletia. - (antlr-read-shell-command): Define directly. - (antlr-simple-with-displaying-help-buffer): Deletia. - (antlr-with-displaying-help-buffer): Define directly. - (antlr-fast-invalidate-context-cache): Deletia. - (antlr-slow-invalidate-context-cache): Deletia. - (antlr-invalidate-context-cache): Define directly. - (antlr-fast-syntactic-context): Deletia. - (antlr-slow-syntactic-context): Deletia. - (antlr-syntactic-context): Define directly. - - (antlr-mode-menu): Use new macros. - (antlr-font-lock-additional-keywords): Ditto. - (antlr-skip-sexps): Ditto. - (antlr-end-of-rule): Ditto. - (antlr-beginning-of-rule): Ditto. - (antlr-end-of-body): Ditto. - (antlr-beginning-of-body): Ditto. - (antlr-hide-actions): Ditto. - (antlr-option-kind): Ditto. - - * antlr-mode.el: In Emacs, use face attribute :weight, not :bold. - (antlr-font-lock-keyword-face): Use new macros. - (antlr-font-lock-syntax-face): Ditto. - (antlr-font-lock-ruledef-face): Ditto. - (antlr-font-lock-tokendef-face): Ditto. - (antlr-font-lock-literal-face): Ditto. - - Changes from 2002-05-24: - - * antlr-mode.el: Version 2.2a. - - Changes from 2002-05-03: - - * antlr-mode.el: Make context parsing faster on Emacs, for faster - syntax highlighting, indentation and imenu support. - Suggested by Aaron Davies . - (antlr-slow-context-cache): New variable. - (antlr-slow-syntactic-context): Use cache. - (antlr-slow-cache-enabling-symbol): New internal variable. - (antlr-slow-cache-diff-threshold): New variable. - (antlr-fast-invalidate-context-cache): Renamed from - antlr-xemacs-bug-workaround. - (antlr-imenu-create-index-function): Search from beginning. - - * antlr-mode.el: More sophisticated indentation, i.e., use the - indentation engine of cc-mode for most actions. - (antlr-c-common-init): Allow nil for `antlr-indent-style'. - (antlr-indent-line): Use indentation engine of cc-mode more often. - (antlr-indent-at-bol-alist): Only used for header actions. - (antlr-disabling-cc-syntactic-symbols): New variable. - (antlr-indent-item-regexp): Delete stuff for actions. - (antlr-indent-at-bol-alist): With language "Java", indent - "package" and "import" at column 0 in header part. - - * antlr-mode.el (antlr-simple-default-directory): Define. - (antlr-simple-read-shell-command): Define. - (antlr-simple-with-displaying-help-buffer): Define. - (antlr-simple-scan-sexps, antlr-simple-scan-lists): - Renamed from antlr-scan-{sexps,lists}-internal. - - Changes from 2002-02-28: - - * antlr-mode: Version 2.2 is released. - - * antlr-mode.el (antlr): Moved to SourceForge.net - - * antlr-mode.el: Minor bug fixes: insert options and indentation. - (antlr-option-location): Don't use point as position where to - insert options if point is in comment. - (antlr-mode): Don't set style here. - (antlr-c-common-init): Set style here. If boundp, set - `c-current-comment-prefix' to not break indentation in comments. - Hm, I should probably split `c-common-init' from cc-mode into two - parts, one of which I could use for antlr-mode.el. - - Changes from 2002-01-31: - - * antlr-mode.el (antlr-font-lock-additional-keywords): - Also hightlight `~' with `antlr-font-lock-syntax-face'. - Suggested by Helmut Neukirchen . - -2003-01-31 Joe Buehler - - * comint.el: - * dired-aux.el: - * dired.el: - * dirtrack.el: - * dos-w32.el: - * fast-lock.el: - * filecache.el: - * files.el: - * hippie-exp.el: - * international/mule.el: - * net/browse-url.el: - * pcomplete.el: - * recentf.el: - * shell.el: - * woman.el: Added cygwin to system-type comparisons. - -2003-01-31 Francesco Potort,Al(B - - * mail/undigest.el (rmail-forward-separator-regex): New custom - variable. - (unforward-rmail-message): Use it. - -2003-01-30 Dave Love - - * textmodes/ispell.el (lookup-words): Fix last change. - -2003-01-29 John Paul Wallington - - * font-lock.el (lisp-font-lock-keywords-1): Match `deftheme'. - - * emacs-lisp/lisp-mode.el (toplevel): Define docstring offset for - `deftheme'. Fix docstring offsets for `define-ibuffer-filter' and - `define-ibuffer-sorter'. - (lisp-imenu-generic-expression): Add `deftheme' to types. - - * custom.el (customize-mark-to-save, customize-mark-as-set) - (custom-remove-theme): Doc fixes. - -2003-01-29 Didier Verna - - * cus-edit.el (custom-save-variables): Also save non theme'd ones. - * cus-edit.el (custom-save-faces): Ditto. - -2003-01-29 Juanma Barranquero - - * composite.el (decompose-composite-char): Fix docstring. - - * select.el (x-set-cut-buffer): Fix docstring. Check type with - `stringp' instead of `substring'. - - * textmodes/reftex.el (reftex-TeX-master-file): Use really the buffer - file name if no other master file is located. - - * progmodes/cperl-mode.el (cperl-beautify-level) - (cperl-beautify-regexp): Fix use of `prefix-numeric-value'. - (cperl-calculate-indent): Fix typo. - -2003-01-29 Taro Kawagishi - - * arc-mode.el (archive-lzh-summarize): Fix previous change. - -2003-01-29 Kim F. Storm - - * emacs-lisp/authors.el: New format of AUTHORS file; list each - author name once followed by contributed and changed files. - Improve selection of entries to include in list, and generate list - of unrecognized entries indicating syntax errors in ChangeLog files. - (authors-coding-system): New variable. - (authors-many-files): Update doc string. - (authors-aliases): Change format. Now one entry with multiple - aliases per author. - (authors-valid-file-names, authors-renamed-files-alist) - (authors-renamed-files-regexps): New variables. - (authors-canonical-file-name): New function. Validates that file - exists or occurs in one of the above lists. Record unrecognized - file names in global authors-invalid-file-names list. - (authors-add): Change to record per-change counts. - (authors-canonical-author-name): Handle new format of - authors-aliases list. - (authors-scan-change-log): Rename FILE arg to LOG-FILE. - Change doc string to describe new entry format. - Only add author entries for valid file names. - (authors-print): Replace by authors-add-to-author-list. - (authors-add-to-author-list): New function which reorders - per-file entries and adds them to global authors-author-list. - (authors): Instead of authors-print to insert in *Authors* buffer, - use authors-add-to-author-list to reorder the list and then - insert result in *Authors* buffer with new format. - Generate *Authors Errors* compilation-mode buffer listing - unrecognized ChangeLog entries. - -2003-01-28 Benjamin Riefenstahl - - * term/mac-win.el: Add entries in function-key-map for - [tab], [backspace], [escape]. - -2003-01-28 Kim F. Storm - - * info.el (Info-extract-menu-node-name): Another fix for - 2003-01-24 change. Also stop search if : is followed by TAB. - -2003-01-28 John Paul Wallington - - * ibuf-ext.el (ibuffer-yank-filter-group): Move check for empty - `ibuffer-filter-group-kill-ring' out of `interactive' declaration. - -2003-01-28 Martin Stjernholm - - * progmodes/cc-vars.el, progmodes/cc-mode.el - (c-require-final-newline): Made this variable an alist to - specify a value for each language. The default value causes - `require-final-newline' to be set to t only in languages where - the standard requires a final newline. - -2003-01-27 Kim F. Storm - - * simple.el (kill-new): Improve doc string for yank-handler. - Signal args-out-of-range error if yank-handler is specified for - an empty string. - - * subr.el (insert-for-yank): Remove COMMAND element from yank handler. - -2003-01-27 Dave Love - - * dired-x.el (dired-filename-at-point): Fix last change and tidy up. - - * thingatpt.el (thing-at-point-file-name-chars): - Include non-ASCII again and re-write the filename ops. - -2003-01-27 David Ponce - - * makefile.w32-in (update-subdirs-SH): Create lisp/subdirs.el. - -2003-01-27 Juanma Barranquero - - * filesets.el (filesets-file-open): Fix typo. - - * vcursor.el (vcursor-disable): Likewise. - - * eshell/esh-cmd.el (eshell-separate-commands): Likewise. - - * progmodes/cc-styles.el (c-make-styles-buffer-local): Likewise. - - * progmodes/cc-vars.el (c-offsets-alist): Likewise. - - * progmodes/ebrowse.el (ebrowse-draw-tree-fn): Likewise. - -2003-01-26 Martin Stjernholm - - * progmodes/cc-vars.el, progmodes/cc-mode.el - (c-require-final-newline): Add a variable to make the - initialization of `require-final-newline' more configurable. - -2003-01-26 Jan Dj,Ad(Brv - - * emacs-lisp/authors.el (authors-aliases): Add Jan D. - Set iso-2022-7bit coding: cookie. - -2003-01-26 Kim F. Storm - - * info.el (Info-extract-menu-node-name): Fix 2003-01-24 change. - Don't search for next colon if current colon is followed by - one of ".", ",", ";", or ")". - (info-insert-file-contents) [!MSDOS]: Avoid byte-compiler warning. - (Info-find-node) [!MSDOS]: Avoid byte-compiler warning. - -2003-01-26 Richard M. Stallman - - * thingatpt.el (thing-at-point-file-name-chars): Undo previous change. - -2003-01-25 Bill Wohler - - * mh-e: Created directory. ChangeLog will appear in a week when we - release version 7.2. - - * mail/mh-alias.el, mail/mh-comp.el, mail/mh-customize.el, mail/mh-e.el, - mail/mh-funcs.el, mail/mh-identity.el, mail/mh-index.el, - mail/mh-loaddefs.el, mail/mh-mime.el, mail/mh-pick.el, - mail/mh-seq.el, mail/mh-speed.el, mail/mh-utils.el, - mail/mh-xemacs-compat.el: Moved to mh-e directory. - Note that reply2.pbm and reply2.xpm, which were created by the - MH-E package, were left in mail since they can probably be used by - other mail packages. - - * makefile.w32-in (WINS): Add mh-e. - - * makefile.nt (WINS): Add mh-e. - -2003-01-25 Richard M. Stallman - - * emacs-lisp/bytecomp.el (byte-compile-file-form-custom-declare-variable): - Compile any lambda-expressions among the args. - - * view.el (view-mode): Doc fix. - - * ido.el: Many doc fixes. - (ido-complete): Fix message. - -2003-01-25 Taro Kawagishi - - * arc-mode.el (archive-unixdate): Correct the date field string. - (archive-lzh-summarize): Extend it to allow the LZH level 2 header - type (which is most prevalent now), in addition to the already - supported level 0 and 1 header types. - -2003-01-25 Markus Rost - - * international/mule-cmds.el (set-language-info) - (current-language-environment): Simplify setting the type of - current-language-environment. - -2003-01-25 Kim F. Storm - - * emulation/cua-base.el (cua--init-keymaps): Move C-S-x and C-S-c - bindings from cua--cua-keys-keymap to cua--region-keymap, as they are - only needed when the region is active. This also makes the output - from C-h b look normal when cua-mode is enabled (no C-S-x/c bindings). - -2003-01-25 Michael Kifer - - * ediff.el (ediff-revision): Better defaults. - - * ediff-vers.el (ediff-vc-latest-version): New function. - (ediff-vc-internal): Use latest version instead of working version. - -2003-01-24 Thien-Thi Nguyen - - * info.el (Info-extract-menu-node-name): When looking for end of menu - item, don't stop at first ":"; instead, continue until trailing - context is either a space or newline. - (Info-complete-menu-item): Var `pattern': allow ":" in menu item. - (Info-menu): Likewise, for regexp used in backwards search. - (Info-try-follow-nearest-node): Remove case added in previous edit. - Change regexp in the following case to allow ":" in menu item. - (Info-fontify-node): Fix bug: Handle `next-property-change' returning - point-max as "hasn't already been done". - -2003-01-24 Thien-Thi Nguyen - - * info.el (Info-try-follow-nearest-node): Add case: Handle menu item - terminated by ": " as an index entry. - -2003-01-24 Juanma Barranquero - - * isearch.el (isearch-forward): Fix typo. - -2003-01-24 Kenichi Handa - - * international/mule.el (decode-coding-inserted-region): - Rename from decode-coding-region-as-inserted-from-file to make it fit - well in the Lisp manual. - - * jka-compr.el (jka-compr-insert-file-contents): - Call docode-coding-inserted-region. - -2003-01-24 John Paul Wallington - - * ibuffer.el (ibuffer-window-list): Remove. - (ibuffer-confirm-operation-on): Use `window-list' instead. - (ibuffer-load-hook): New customizable variable. - (toplevel): Run it. - (ibuffer-customize): New command. - (ibuffer-mode-map): Bind it. - (ibuffer-mode-map): Add menu seperator in View>Sort menu. - (ibuffer-mode): Tidy. - (ibuffer-fontification-alist, ibuffer-always-show-last-buffer) - (ibuffer-default-directory, ibuffer-default-sorting-mode) - (ibuffer-maybe-show-predicates, ibuffer-hook, ibuffer-mode-hook) - (ibuffer-map-lines): Doc fixes. - - * ibuf-ext.el (ibuffer-copy-filename-as-kill): C-u means relative - filenames. Use `kill-new'. - -2003-01-23 Dave Love - - * abbrev.el (write-abbrev-file): Simplify, and put a coding cookie - in the file. - -2003-01-23 Masatake YAMATO - - * progmodes/asm-mode.el (asm-mode): Add syntax table entries for - /* */ comments. - -2003-01-23 Kenichi Handa - - * files.el (insert-directory): Read the output of "ls" by - no-conversion, and decode it later while preserving - `dired-filename' property. - -2003-01-23 Markus Rost - - * descr-text.el (describe-text-mode-hook): Add a group. - -2003-01-23 John Paul Wallington - - * term/mac-win.el (interprogram-paste-function): Handle empty - clipboard. - -2003-01-22 Aubrey Jaffer (tiny change) - - * info.el (Info-index): Change pattern so that index entries with - colons can be read properly; also, require at least one space - after the colons, which makeinfo puts in. - -2003-01-22 Andreas Schwab - - * jka-compr.el (jka-compr-insert-file-contents): Fix typo in last - change. - -2003-01-22 Markus Rost - - * Makefile.in (bootstrap-after): New target. - (bootstrap): Move finder-data, custom-deps to bootstrap-after. - -2003-01-22 Kai Gro,A_(Bjohann - - * info.el (Info-index-next): Use "(`,' tries to find next)" for - more matches for consistency with standalone info browser. - -2003-01-22 Kenichi Handa - - * international/mule.el - (decode-coding-region-as-inserted-from-file): New function. - - * jka-compr.el (jka-compr-insert-file-contents): Read a process - output without decoding. Decode the result by - decode-coding-region-as-inserted-from-file. - -2003-01-22 Kim F. Storm - - * ido.el (ido-make-file-list, ido-make-dir-list): Don't move - visited directories to end of list; it's the wrong thing to do if - we want to find a file or directory in such directories. - - * simple.el: Doc fixes. - * subr.el: Doc fixes. - -2003-01-20 Nick Roberts - - * gud.el (gud-display-line): If the current file is newer than its - buffer, offer to reread the file. - (gud-keep-buffer): New buffer local variable. Ensures offer to - reread file is made just once. - -2003-01-20 Stefan Monnier - - * emacs-lisp/regexp-opt.el (regexp-opt-group): Undo last change. - Fix the docstring instead. - -2003-01-20 Glenn Morris - - * calendar/calendar.el (calendar-only-one-frame-setup): Autoload it. - -2003-01-20 Richard M. Stallman - - * simple.el (completion-setup-function): Set default-directory - in the minibuffer, so it'll be copied into the completion list buffer. - - * emacs-lisp/regexp-opt.el (regexp-opt-group): Compute HALF2 properly. - - * loadup.el (load-path): Rename `path' local var. - - * progmodes/octave-mod.el (octave-mode-map): Change C-c i bindings - to C-c C-i. Duplicate its bindings with last char a ctl char. - Also change C-c f to C-c C-f. - -2003-01-20 Markus Rost - - * ls-lisp.el (ls-lisp-use-insert-directory-program): Make default - value system dependent. - (ls-lisp-support-shell-wildcards): Add autoload cookie. - -2003-01-19 Kim F. Storm - - * msb.el: Use `dir' instead of `path' everywhere. - -2003-01-18 Kim F. Storm - - * simple.el (kill-new, kill-append, kill-region): - New optional parameter yank-handler. - (yank-excluded-properties): Add yank-handler to list. - (yank-undo-function): New variable. - (yank): Use it to undo previous yank or yank-pop command. - Allow insert-for-yank to override this-command. - - * subr.el (insert-for-yank): Arg list changed; now only accepts one - string rather than any number of strings; no callers needed change. - Use yank-handler text property on the arg string. - Set yank-undo-function variable appropriately for yank-pop. - -2003-01-18 Stefan Monnier - - * textmodes/fill.el (fill-comment-paragraph): Fix simplistic - regexp-concatenation. - - * add-log.el (add-change-log-entry): Don't leave space at eol. - (add-log-current-defun): Perl functions names can't have (or {. - - * progmodes/sh-script.el (sh-indent-line): Use indent-line-to. - (sh-non-closing-paren): New const. - (sh-case, sh-while-getopts): Use it to make props non-sticky. - (sh-add-completer): Use test-completion. - -2003-01-18 Vasily Korytov (tiny change) - - * progmodes/cperl-mode.el: Don't make faces depend on window-system. - -2003-01-18 Markus Rost - - * cus-edit.el (customize-changed-options): Undo last doc change. - -2003-01-17 Stefan Monnier - - * skeleton.el (skeleton-internal-list, skeleton-internal-1): - Don't treat \n specially in sub-skeletons. - -2003-01-17 Dave Love - - * international/ucs-tables.el: Redo 8859-6 change in the right place. - -2003-01-17 Kenichi Handa - - * international/fontset.el: Don't setup the default fontset and - font-encoding-alist at the top level. - (setup-default-fontset): New function. - (create-fontset-from-fontset-spec): Delete autoload cookie. - - * term/x-win.el: Require fontset unconditionally again. - Call setup-default-fontset at the top level. - - * term/w32-win.el: Call setup-default-fontset. - - * term/mac-win.el: Require fontset and call setup-default-fontset. - -2003-01-16 Stefan Monnier - - * textmodes/fill.el (fill-region-as-paragraph): Only erase `hard' - property until end-of-paragraph. - -2003-01-16 Kenichi Handa - - * international/ucs-tables.el: Undo the last change. - -2003-01-15 Dave Love - - * thingatpt.el (thing-at-point-file-name-chars): Include non-ASCII - and use documented treatment of -. - - * dired-x.el (dired-filename-at-point): Fix filename-chars. - - * international/ucs-tables.el: Set up tables for 8859-6. - - * server.el (server-window): Customize. - (server-mode): New. - (server-unload-hook): Call server-start. - -2003-01-15 John Wiegley - - * eshell/em-hist.el (eshell-save-history-on-exit): - Rename `eshell-ask-to-save-history' to `eshell-save-history-on-exit', - because the former name is somewhat unrelated to the variables' - possible values. - -2003-01-15 Deepak Goel - - * calc/README: Add new maintainer. - - * calc/*: Ditto. - - * calc/calc.el (calc-bug-address): Change address to deego@gnufans.org. - -2003-01-15 Andrew Innes - - * makefile.w32-in (loaddefs.el): Invoke make to build stub file - using appropriate rule for build environment. - (loaddefs.el-SH, loaddefs.el-CMD): New targets. Include small set - of autoloads and defvars, sufficient to dump bootstrap emacs. - (update-subdirs-SH): Use hard-coded list of top-level lisp - subdirs, because find program on Windows is not compatible with - Unix find. - (compile-CMD, compile-SH): Use `batch-byte-compile-if-not-done'. - Explicitly load loaddefs.el so that bootstrap emacs can compile - properly. - (bootstrap-clean): Add dependency on loaddefs.el, to ensure - minimal stub sufficient for dumping bootstrap emacs is available. - - * loadup.el: Include lisp/textmodes in load-path for bootstrap - emacs, to resolve ispell menu reference. - -2003-01-15 YAMAMOTO Mitsuharu (tiny change) - - * international/mule.el (optimize-char-coding-system-table): - Optimize it. - - * term/mac-win.el: Setup the fontset "fontset-mac" correctly. - -2003-01-14 Stefan Monnier - - * pcvs-info.el (cvs-fileinfo-from-entries): Deal with Solaris' - occasional use of "05" rather than " 5" for day-of-month. - - * log-view.el (log-view-message-re): The rev might be locked. - -2003-01-14 Nick Roberts - - * gdb-ui.el: Improve commentary. - (gdb-window-height, gdb-window-width, gdb-display-number-end): - Customize the dimensions of frames for displayed expressions. - (gdb-error-begin): Comment out because it is not used because of - bug/quirk in annotations. - (gdb-reset): Use with-current-buffer. - -2003-01-14 Kim F. Storm - - * ido.el (ido-read-internal, ido-file-internal) - (ido-copy-current-file-name, ido-wide-find-dirs-or-files): - Don't use `path' as name of local variables holding a file name. - - * arc-mode.el (archive-arc-rename-entry): Fix error message. - (archive-lzh-summarize): Rename local var `path' to `dir'. - (archive-unique-fname) [!MSDOS]: Avoid byte-compiler warning. - - * dired.el: Doc fixes. - * dired-aux.el: Rename `whole-path' to `whole-name' throughout. - (dired-mark-read-regexp): Use "Abs." prefix instead of "Path". - * dired-x.el: Doc fixes. - - * fast-lock.el (fast-lock-cache-name): Doc fix. - - * net/browse-url.el (browse-url-filename-alist): Doc fix. - -2003-01-14 John Paul Wallington - - * apropos.el (apropos): Restore autoload cookie. Fix typo in - "error retrieving function documentation" output. - -2003-01-14 Kim F. Storm - - * subr.el (process-put, process-get): New functions. - - * simple.el (clone-process): Copy process' plist to new process. - -2003-01-13 Markus Rost - - * cus-dep.el (custom-make-dependencies): Don't set standard-value - and version numbers for variables. Handle faces. - - * cus-edit.el (customize-changed-options): Doc addition. Load the - version deps earlier. Use other tests for groups and variables. - Handle faces. - -2003-01-14 Kim F. Storm - - * ido.el: Doc fixes. - (ido-max-file-prompt-width): Rename from ido-max-prompt-path. - (ido-rewrite-file-prompt-functions): Rename from - ido-make-file-prompt-hook. Directory name is now in dynamic - variable `dirname' (instead of `path'). - (ido-rewrite-file-prompt-rules): Rename from - ido-rewrite-prompt-path-rules. - (ido-make-prompt): Directory name now in `dirname' var. - (ido-complete): Fix error message. - -2003-01-13 John Paul Wallington - - * server.el (server-process-filter): Use `minibufferp' to test - whether we are inside a minibuffer. - (server-process, server-kill-new-buffers): Doc fixes. - -2003-01-13 Dave Love - - * international/utf-16.el (mule-utf-16-be, mule-utf-16-le): - Remove pre-write-conversion. - -2003-01-13 Kim F. Storm - - * hexl.el (hexl-mode-map): Don't quote remapped command names. - -2003-01-13 David Ponce - - * ruler-mode.el (ruler-mode): Cleanup buffer local variable - `header-line-format' if it didn't exist when `ruler-mode' was enabled. - -2003-01-13 Masatake YAMATO - - * ruler-mode.el (ruler-mode-comment-column-char) - (ruler-mode-goal-column-char, ruler-mode-set-goal-column-ding-flag) - (ruler-mode-mouse-current-grab-object): New variables. - (ruler-mode-comment-column-face, ruler-mode-goal-column-face): - New faces. - (ruler-mode-mouse-set-fill-column): Removed. - (ruler-mode-mouse-grab-any-column) - (ruler-mode-mouse-drag-any-column-iteration) - (ruler-mode-mouse-drag-any-column): New functions. - (ruler-mode-map): [header-line down-mouse-2] Bound to - `ruler-mode-mouse-grab-any-column' instead of - `ruler-mode-mouse-set-fill-column'. - (ruler-mode-ruler-help-echo): Update its value. - (ruler-mode-ruler-help-echo-when-goal-column): New help string used - when goal-column is already set. - (ruler-mode-ruler-help-echo-tab): Rename to... - (ruler-mode-ruler-help-echo-when-tab-stops): New. - (ruler-mode-fill-column-help-echo, ruler-mode-comment-column-help-echo) - (ruler-mode-goal-column-help-echo): New help strings. - (ruler-mode-ruler): Use `ruler-mode-ruler-help-echo-when-goal-column' - instead of `ruler-mode-ruler-help-echo' if `goal-column' is set. - Show `comment-column' and `goal-column'. Echo the different help - string for each *-column characters on the ruler. - -2003-01-13 Richard M. Stallman - - * apropos.el (apropos-documentation-property): New function. - (apropos): Use apropos-documentation-property. - - * files.el (mode-line-process): Mark as risky. - - * help.el (where-is): Catch errors in indirect-function. - - * server.el (server-process-filter): Comment out -eval. - Don't switch buffers if inside isearch or minibuffer. - - * progmodes/compile.el (compilation-revert-buffer): - If buffer has a file, revert it in the normal way. - - * term/x-win.el: Require fontset conditionally again. - -2003-01-13 Kim F. Storm - - * ido.el (ido-enable-tramp-completion): New defcustom. - (ido-enter-single-matching-directory): Change default to 'slash. - (ido-is-tramp-root): New defun. - (ido-is-root-directory, ido-is-ftp-directory, ido-is-slow-ftp-host) - (ido-may-cache-directory, ido-final-slash, ido-read-internal) - (ido-complete, ido-make-file-list1, ido-make-dir-list1): - Handle tramp completion. - (ido-file-name-all-completions1): New defun for tramp completion. - (ido-file-name-all-completions): Use it. - (ido-set-matches1): Relax matching of text with trailing slash. - (ido-exhibit): Handle tramp completion. - Simplified code using nested cond forms using new `refresh' var. - Fixed handling of /~user/ paths. - -2003-01-12 Andreas Schwab - - * arc-mode.el (archive-mode-map): Use command remapping instead of - substitute-key-definition. - * emerge.el (emerge-setup-fixed-keymaps): Likewise. - * msb.el (msb-mode-map): Likewise. - * forms.el (forms--change-commands): Likewise. - * hexl.el (hexl-mode-map): Likewise. - * mail/mailabbrev.el (Commentary): Likewise. - * play/decipher.el (decipher-mode-map): Likewise. - * play/gomoku.el (gomoku-mode-map): Likewise. - * play/landmark.el (lm-mode-map): Likewise. - * play/solitaire.el (solitaire-mode-map): Likewise. - * progmodes/sh-script.el (sh-mode-map): Likewise. - * textmodes/picture.el (picture-substitute): Likewise. - - * ielm.el (inferior-emacs-lisp-mode): - Bind comint-dynamic-complete-functions locally. - - * buff-menu.el (Buffer-menu-select): Fix for effect of header line. - -2003-01-11 Andreas Schwab - - * textmodes/sgml-mode.el (sgml-font-lock-keywords-2): Add flag to - merge with existing fontification. - -2003-01-11 Nick Roberts - - * gud.el (gud-kill-buffer-hook): Save gud-minor-mode type. - (gud-reset): New function. Reset environment at end of debugging. - (gud-sentinel): Call gud-reset or gdb-reset. - (gud-menu-map, gud-tool-bar-map, gdb): Change gud-goto to gud-until. - - * gdb-ui.el (gud-display): Use GDB command ptype instead of whatis - to find out if variable shuld be dereferenced. - (gud-display1): Exit if there is `No symbol'. - (gdb-expressions-mode-map): Correction to key-binding. - (gdb-reset): New function. Reset environment at end of debugging. - (gdb-quit): Remove. - -2003-01-10 Dave Love - - * international/code-pages.el (cp-make-coding-system): Fix last change. - -2003-01-10 Kai Gro,A_(Bjohann - - * dired.el (dired-garbage-files-regexp): Use \\' instead of $ and - use regexp-opt for readability. - -2003-01-10 Mark A. Hershberger - - * xml.el (xml-parse-tag, xml-parse-attlist, xml-skip-dtd) - (xml-parse-dtd, xml-parse-elem-type): Be more flexible in recognizing - empty elements. - -2003-01-10 Luc Teirlinck - - * progmodes/sh-script.el (sh-set-shell): Make sh-shell-file the default - shell. - -2003-01-09 John Wiegley - - * pcomplete.el (pcomplete-termination-string): Add a variable - for modifying the string which is inserted after a completion or - expansion using pcomplete. - -2003-01-09 Karl Berry - - * sort.el (sort-regexp-fields): Pass noerror to re-search-forward, - so that we don't fail if no records match record-regexp. - -2003-01-09 Markus Rost - - * cus-edit.el (customize-group, customize-group-other-window): - Remove unnecessary calls to custom-load-symbol. - (custom-group-value-create): - Load widget deps if state is not hidden. If widget deps are - loaded, load them in advance. - (custom-menu-create): If widget deps are loaded, load them earlier. - -2003-01-09 John Paul Wallington - - * language/ethio-util.el (ethio-gemination) - (exit-ethiopic-environment): Doc fixes. - - * language/viet-util.el (viet-encode-viqr-region) - (viet-decode-viqr-region, viet-encode-viqr-buffer) - (viet-decode-viqr-buffer): Doc fixes. - -2003-01-09 ShengHuo ZHU - - * paths.el: Remove gnus-startup-file. - -2003-01-08 Bill Wohler - - * mail/mh-alias.el, mail/mh-customize.el, mail/mh-identity.el, - mail/mh-loaddefs.el, toolbar/alias.pbm, toolbar/alias.xpm: Added. - - * mail/mh-comp.el, mail/mh-e.el, mail/mh-funcs.el, - mail/mh-index.el, mail/mh-mime.el, mail/mh-pick.el, - mail/mh-seq.el, mail/mh-speed.el, mail/mh-utils.el, - mail/mh-xemacs-compat.el: Upgraded to MH-E version 7.1. - -2003-01-08 Kim F. Storm - - * mail/undigest.el (unforward-rmail-message): Don't use global - variable `n'. - -2003-01-08 Francesco Potort,Al(B - - * mail/undigest.el (unforward-rmail-message): Simplified. - No functional change. - -2003-01-07 Markus Rost - - * custom.el (custom-autoload, custom-variable-p): New functions. - - * emacs-lisp/autoload.el (make-autoload): - Generate custom-autoload for autoloaded defcustoms. - - * help-fns.el (describe-variable): Use custom-variable-p. - - * simple.el (set-variable): Load deps of custom variables without type. - - * cus-edit.el (custom-variable-prompt): Doc change. - Use custom-variable-p. - (customize-option): Remove search in loaddefs.el. - (customize-apropos): Use custom-variable-p. - (custom-save-variables): Use custom-variable-p to detect - non-rogue variables. - -2003-01-07 Francesco Potort,Al(B - - * mail/undigest.el (unforward-rmail-message): Skip all newlines - after the initial separator. - (unforward-rmail-message): Forwarded-From: and Forwarded-Date: - instead of Forwarded-from: and Forwarded-date:. - -2003-01-07 Kai Gro,A_(Bjohann - - * dired.el (dired-garbage-files-regexp): Add `.aux$'. These are - produced by TeX. - -2003-01-07 Andre Spiegel - - * vc-rcs.el (vc-rcs-checkout): Fix the check whether we are on a - branch. - -2003-01-06 Dave Love - - * textmodes/ispell.el (lookup-words): Cope with null lookup-dict. - - * language/chinese.el ("Chinese-EUC-TW"): New. - -2003-01-06 John Paul Wallington - - * mail/rmail.el (rmail-mmdf-delim1, rmail-mmdf-delim2): Doc fixes. - -2003-01-05 Richard M. Stallman - - * obsolete/uncompress.el: Display message that this pkg is obsolete. - - * isearch.el (isearch-repeat): Error if try to repeat search and - there was no previous search. - - * dired.el (dired-recursive-deletes): Fix custom type. - - * dabbrev.el (dabbrev--substitute-expansion): - Convert all whitespace to single spaces, - except when it's carried over from the existing text. - - * simple.el (split-line): Clean up implementation. - - * mail/rmail.el (rmail-font-lock-keywords): Discard code to match - both cases. - (rmail-variables): Specify case-insensitive matching for font-lock. - -2003-01-05 Alexander Pohoyda (tiny change) - - * mail/sendmail.el (mail-font-lock-keywords): - * mail/rmail.el (rmail-font-lock-keywords): Match multiline - In-Reply-To and X-*. - -2003-01-05 Mark A. Hershberger - - * xml.el (xml-substitute-special): Check for & last. - -2003-01-05 Dave Love - - * buff-menu.el (Buffer-menu-execute): Fix for effect of header line. - -2003-01-05 Dave Love - - * international/mule-diag.el (non-iso-charset-alist): - Add vietnamese-tcvn. - - * international/mule-cmds.el (locale-language-names): - Use Croatian, Swedish. - -2003-01-05 Andreas Schwab - - * buff-menu.el (Buffer-menu-buffer+size): Don't clobber buffer name. - -2003-01-05 Dave Love - - * language/european.el ("Latin-6", "Croatian"): New. - ("Latin-7"): Fix nonascii-translation. Add input method. - ("Lithuanian", "Latvian"): Add nonascii-translation. - ("German", "Spanish", "Dutch", "Welsh", "Swedish"): - Fix nonascii-translation. - - * language/georgian.el ("Georgian"): Fix nonascii-translation. - - * international/mule-cmds.el (set-locale-environment): - Ignore empty values of environment variables. - - * emacs-lisp/byte-opt.el (byte-optimize-nth) - (byte-optimize-nthcdr): Fix for case of wrong-length forms. - -2003-01-04 Nick Roberts - - * gdb-ui.el: Acknowledge Tom Lord as author of gdba.el. - Use let construction to bind buffer-read-only to nil. - (gdba): 'set height 0' in GDB. - (gdb-display-end, gdb-frame-handler): Corrections to forming - full expression name for header-line in display frame. - (gdb-info-breakpoints-custom): Highlight breakpoints since - they may be clicked on with mouse-2. - (gdb-quit): Delete frames of displayed expressions when quitting. - (gdb-delete-frames): New function. - (gdb-source-info): Don't create stack buffer automatically. - -2003-01-04 Thien-Thi Nguyen - - * xml.el (xml-substitute-special): Move "&" -> "&" last. - -2003-01-04 Kim F. Storm - - * simple.el (split-line): If present, copy fill-prefix from - current line to new line. Don't copy if prefix arg. - From Lisp, arg may be an alternative prefix string to copy. - Inspired by Ehud Karni . - - * mail/sendmail.el (mail-split-line): New function. - (mail-mode-map): Remap split-line to mail-split-line. - -2003-01-03 Dave Love - - * emacs-lisp/find-func.el (find-variable-noselect): Make it work - with new load-history format. - - * international/mule-cmds.el (sort-coding-systems): - Adjust priority of utf-16 and x-ctext. - - * international/utf-8.el (utf-translate-cjk): - Call optimize-char-coding-system-table. - - * international/ucs-tables.el (ucs-unify-8859, ucs-fragment-8859): - Call optimize-char-coding-system-table. - - * international/mule.el (register-char-codings): Don't call - optimize-char-coding-system-table here. - (keyboard-coding-system): Doc fix. Update :version. - - * textmodes/nroff-mode.el (nroff-mode-hook): Customize. - (nroff-imenu-expression): New. - (nroff-mode): Use it. - - * autoinsert.el (auto-insert-alist): Add man page skeleton. - -2003-01-03 Andre Spiegel - - * vc-rcs.el (vc-rcs-revert): Unlock only if the user does have - the lock. - -2003-01-03 Kim F. Storm - - * emulation/cua-base.el (cua--pre-command-handler): - Corrected handling of delete-selection properties. - -2003-01-03 John Paul Wallington - - * emacs-lisp/eldoc.el (eldoc-get-var-docstring): Only return a - documentation string when `sym' is non-nil. - -2003-01-02 Steven Tamm - - * scroll-bar.el (toggle-scroll-bar, scroll-bar-mode): - Have scroll bars correctly default to being on the right for Mac - Carbon port by testing "mac-carbon" feature, not window-system. - -2003-01-02 Markus Rost - - * cus-edit.el (customize-group, customize-group-other-window): - Call custom-load-symbol unconditionally. - (customize-face, customize-face-other-window): Fix format arg. - -2003-01-02 John Paul Wallington - - * menu-bar.el (menu-bar-left-scroll-bar): Set `scroll-bar-mode' - to `left'. - -2003-01-01 Richard M. Stallman - - * mail/rmail.el (rmail-reply): Don't call mail-strip-quoted-names. - - * files.el (backup-buffer): Cope if file-modes returns nil. - -2002-12-30 Steven Tamm - - * scroll-bar.el (toggle-scroll-bar, scroll-bar-mode): - Have scroll bars correctly default to being on the right for Mac - Carbon port - -2002-12-29 Nick Roberts - - * gdb-ui.el (gdb-delete-display): Rename (gdb-delete-expression). - (gdb-goto-bp-this-line): Rename (gdb-goto-breakpoint). - (gdb-toggle-bp-this-line): Rename (gdb-toggle-breakpoint). - (gdb-delete-bp-this-line): Rename (gdb-delete-breakpoint). - (gdb-toggle-disp-this-line): Rename (gdb-toggle-display). - (gdb-delete-disp-this-line): Rename (gdb-delete-display). - (gud-gdba-marker-filter): Remove unnecessary save-match-data. - (gdb-mouse-goto-breakpoint, gdb-frames-select): New functions. - (gdb-frames-mouse-select): Simplify. - Make keybindings (gdb-goto-breakpoint, gdb-frames-select, etc) - consistent with other modes in emacs. - (gdb-display-source-buffer): Return window of source buffer - for (gud-display-line). - -2002-12-29 Markus Rost - - * button.el (defface button): Add group. - - * cus-edit.el (customize-browse): Call `widget-setup'. - -2002-12-29 Andreas Schwab - - * Makefile.in: Generate cus-load.el and finder-inf.el in the - source directory. Change dependencies on lisp files to explicitly - use $(lisp). - (compile-calc): Fix command substitution. - * cus-dep.el (generated-custom-dependencies-file): New variable. - (custom-make-dependencies): Use it instead of hardcoding cus-load.el. - * finder.el (generated-finder-keywords-file): New variable. - (finder-compile-keywords): Use it instead of hardcoding finder-inf.el. - -2002-12-28 Richard M. Stallman - - * info-look.el (info-lookup): Fix error message typo. - - * comint.el (comint-mode): Locally set scroll-conservatively. - (comint-postoutput-scroll-to-bottom): comint-scroll-show-maximum-output - is active only when point is at end. - - * dired.el (dired-goto-file): Handle \ and ^M quoted by backslash. - Fix error message. - - * files.el (find-file-noselect-1): Kill local value of `cursor-type'. - - * simple.el (repeat-complex-command): Signal real error on failure. - -2002-12-28 Andreas Schwab - - * progmodes/make-mode.el (makefile-font-lock-keywords): - Highlight automatic variable references enclosed in parens and - optionally suffixed by F or D. - -2002-12-27 Miles Bader - - * info.el (Info-complete-menu-item): Make `Info-complete-cache' a - buffer-local variable. - -2002-12-26 Markus Rost - - * cus-edit.el (customize-group-other-window): Use pop-to-buffer in - the same way as `custom-buffer-create-other-window'. - (customize-variable-other-window, customize-option-other-window): - Definitions moved up. - -2002-12-26 Kai Gro,A_(Bjohann - - * net/tramp*.el: Sync with upstream version 2.0.28. Bugfixes. - * net/tramp-ftp.el: Glue code with Ange-FTP, broken out of - tramp.el. From Michael Albinus. - * net/tramp-smb.el: New file for using smbclient to access - Windows shares with Tramp. From Michael Albinus. - -2002-12-26 Andreas Schwab - - * international/mule-cmds.el (select-safe-coding-system): Fix typo. - -2002-12-26 Andre Spiegel - - * vc.el (vc-next-action-on-file): Use t argument to vc-checkout in - order to get the latest version on the current branch. - Update documentation of vc-BACKEND-checkout to explain this. - - * vc-rcs.el (vc-rcs-checkout): Handle t argument for REV. - (vc-rcs-checkin): By default, specify the current workfile - branch as the check-in revision. - - * vc-cvs.el (vc-cvs-checkout): Handle t argument for REV. - - * vc-sccs.el (vc-sccs-checkout): Likewise. - -2002-12-26 Nick Roberts - - * gdb-ui.el (gdb-info-display-custom): Ensure that frames/buffers - of displayed expressions are deleted when the displayed expressions - are deleted. - (gdb-delete-disp-this-line, gdb-delete-display): Frame/buffer - deletion is handled by gdb-info-display-custom now. - (gdb-source-info): Undo earlier change (do create display buffer - automatically). - -2002-12-25 Markus Rost - - * cus-edit.el (custom-save-faces): Fix typo. - -2002-12-23 Francesco Potort,Al(B - - * mail/undigest.el (unforward-rmail-message): Do not assume that - the forwarded message's Date: header comes after From:. Use a - Forwarded-from: rather than a Forwarded-by: header. Add a - Forwarded-date: header. - -2002-12-23 Nick Roberts - - * gdb-ui.el (gdb-display-number-end): Make auto-display of - expressions in GDB work on text-only terminals. - (gdb-post-prompt): Compute current frame properly. - (gdb-get-current-frame, gdb-frame-handler): New functions. - (gdb-source-info): Move last statement into if clause. - Tidy, improve documentation. - -2002-12-23 Richard M. Stallman - - * emacs-lisp/checkdoc.el: Don't define a name for the minor mode menu. - - * emacs-lisp/easymenu.el (easy-menu-do-define): Handle nil for SYMBOL. - (easy-menu-define): Doc fix, say SYMBOL can be nil. - - * window.el (save-selected-window): Save and restore - selected windows of all frames. - - * cus-start.el (scroll-up-aggressively, scroll-down-aggressively): - Update custom types. - -2002-12-23 Alex Schroeder - - Merging Dave Love 's custom_themes branch containing - Alex Schroeder's adaptation of Jan Vroonhof - 's code. Doc strings corrected by RMS. - - * cus-edit.el (customize-save-variable): Take themes into account. - (custom-variable-save): Take themes into account. - (custom-variable-reset-saved): Add comment-widget. - (custom-variable-reset-standard): Add comment-widget. - (custom-variable-reset-standard): Take themes into account. - (custom-face-save): Take themes into account. - (custom-face-reset-standard): Take themes into account. - (custom-save-variables): Take themes into account. - (custom-save-faces): Take themes into account. - (custom-save-resets): New function. - (custom-save-loaded-themes): New function. - (customize-save-customized): Take themes into account. - - * cus-face.el (custom-set-faces): Call custom-theme-set-faces. - (custom-theme-set-faces): New function. - (custom-theme-face-value): New function. - (custom-theme-reset-internal-face): New function. - (custom-theme-reset-faces): New function. - (custom-reset-faces): New function. - - * custom.el (custom-known-themes): New variable. - (custom-declare-theme): New function. - (deftheme): New macro. - (custom-make-theme-feature): New function. - (custom-theme-p): New function. - (custom-check-theme): New function. - (custom-push-theme): New function. - (custom-theme-set-variables): Take themes into account. - (custom-loaded-themes): New variable. - (custom-theme-loaded-p): New function. - (provide-theme): New function. - (require-theme): New function. - (custom-remove-theme): New function. - (custom-do-theme-reset): New function. - (custom-theme-load-themes): New function. - (custom-load-themes): New function. - (custom-theme-value): New function. - (custom-theme-variable-value): New function. - (custom-theme-reset-internal): New function. - (custom-theme-reset-variables): New function. - (custom-reset-variables): New function. - - * cus-theme.el: New file. - -2002-12-23 Matthew Swift - - * emacs-lisp/rx.el (rx-and): Generate a shy group. - Specify `no-group' when calling rx-to-string. - (rx-submatch): Specify `no-group' when calling rx-to-string. - (rx-kleene): Use rx-atomic-p to decide whether to make a group. - (rx-atomic-p): New function. - -2002-12-23 Kevin Ryde - - * info-look.el (info-lookup): For ease of use try item - case-insensitive if not found case-sensitive. - Do case sensitive search in index nodes, so items differing only in - case go correctly to their respective nodes. - -2002-12-22 Richard M. Stallman - - * subr.el (add-to-invisibility-spec): If it was t, start it out at (t). - - * textmodes/texinfmt.el (tex-start-of-header, tex-end-of-header): - Add defvars. - - * textmodes/tex-mode.el (tex-print): Call shell-quote-argument - on the file name. - - * textmodes/outline.el (outline-next-visible-heading): - When going forward, test outline-invisible-p at start of header. - -2002-12-22 Kevin Ryde - - * textmodes/makeinfo.el (makeinfo-buffer): Display result using - Info-mode. - (makeinfo-compilation-sentinel-buffer, makeinfo-current-node): - New functions. - (makeinfo-compile): Add a sentinel parameter. - (makeinfo-compilation-sentinel-region): Renamed from - makeinfo-compilation-sentinel, and makeinfo-temp-file now never nil. - (makeinfo-region): Use this. - * info.el (Info-revert-find-node): New function. - -2002-12-22 Nick Roberts - - * tooltip.el (tooltip-gud-tips): Output tooltip without switching - process filter (gdba in gdb-ui.el only). - (gdb-tooltip-print): New function. - (tooltip-gud-process-output): Undo previous change. - (tooltip-strip-annotations): Remove. - -2002-12-22 Zoltan Kemenczy - - * gud.el (gud-menu-map): Add jdb support for "run". - (gud-jdb-find-source-using-classpath): Use 'identity. - (gud-jdb-marker-filter): Marker regexp and filename filtering - change to support a backwards-incompatible change in Sun's jdb - line number display in SDK versions 1.4. - (gud-format-command): gud-find-class now requires two - parameters (file and linenumber). - (gud-find-class): Bulk of the change related to using c-syntactic - symbols to locate nested class declarations in java sources - visited by java-mode (cc-mode). - -2002-12-21 Nick Roberts - - * gdb-ui.el: Remove the concept of an instance. This means that - a lot of functions have been renamed. Accessors are prefixed with - gdb-get, setters with gdb-set and the word instance has been - removed from many function and variable names. - (gdb-display-buffer): Protect source buffer as well - as GUD buffer when requesting new buffers. - (gdb-source-info): Two changes : Don't create display buffer - automatically, compute source window correctly. - -2002-12-21 Richard M. Stallman - - * man.el (Man-getpage-in-background): Put GROFF_NO_SGR in env. - - * ls-lisp.el (original-insert-directory): Make this a variable, - don't set its function definition. - (insert-directory): Use funcall to call that function. - - * bindings.el (help-echo): Change tooltip string. - - * chistory.el (command-history-map): Move definition up. - - * faces.el (help-xref-stack): Add defvar to avoid warning. - -2002-12-21 Andreas Schwab - - * dired.el (dired-insert-directory): Preserve text properties - when quoting. - -2002-12-20 Francesco Potort,Al(B - - * mail/undigest.el (rmail-mail-separator): Renamed from - rmail-digest-mail-separator. All users changed. - (unforward-rmail-message): Rewritten to be more robust and to - additionally account for the common style of forwarding messages - by citing them entirely with headers. - -2002-12-18 Dave Love - - * international/utf-8-subst.el: Deleted. - - * international/ucs-tables.el (ucs-fragment-8859): Don't modify - char-coding-system-table elements destructively. - Use optimize-char-coding-system-table. - - * international/mule.el (optimize-char-coding-system-table): New. - (register-char-codings): Use it. - - * international/utf-8.el (ucs-mule-cjk-to-unicode) - (ucs-unicode-to-mule-cjk): Revert last change. - (utf-subst-table-for-encode): Initially use ucs-mule-cjk-to-unicode. - (utf-subst-table-for-decode): Initially use ucs-unicode-to-mule-cjk. - (utf-fragment-on-decoding, utf-translate-cjk): Don't modify - char-coding-system-table elements destructively. - (utf-translate-cjk): Set ucs-mule-cjk-to-unicode, - ucs-unicode-to-mule-cjk to new hash tables with realistic parameters. - -2002-12-18 John Paul Wallington - - * info.el (Info-dir-remove-duplicates): Avoid infloop when - deleting last entry. - -2002-12-17 Nick Roberts - - * gdb-ui.el (gdba-marker-filter, gdb-output-burst): Merge and - rename gud-gdba-marker-filter. - (gdb-append-to-inferior-io): Only pop up IO buffer if there is output. - (gdb-make-instance): Remove (put into gdba). - Use gdb-instance-enqueue-input instead of - gdb-instance-enqueue-idle-input for user functions. - (gdb-instance-target-string): Simplify. - (in-gdb-instance-context): Remove. - Expand Commentary. - -2002-12-17 Kenichi Handa - - * international/mule.el (set-file-name-coding-system): New function. - - * international/mule-cmds.el (mule-keymap, set-coding-system-map): - Add bindings for set-file-name-coding-system. - -2002-12-17 Kenichi Handa - - * international/mule-cmds.el (universal-coding-system-argument): - Bind coding-system-require-warning to t. - (select-safe-coding-system): Handle t in the arg - DEFAULT-CODING-SYSTEM specially. Use read-coding-system to read a - coding-system to allow users to specify unsafe coding system on - their risk. - -2002-12-16 Francesco Potort,Al(B - - * mail/undigest.el (rmail-digest-methods) - (rmail-digest-mail-separator): New variables. - (rmail-digest-parse-mime, rmail-digest-parse-rfc1153strict) - (rmail-digest-parse-rfc1153sloppy, rmail-digest-rfc1153) - (rmail-digest-parse-rfc934): New functions. - (undigestify-rmail-message): Completely rewritten. - -2002-12-16 Kim F. Storm - - * ido.el (ido-read-file-name): Remove debug message. - -2002-12-16 Daniel Pfeiffer - - * buff-menu.el (Buffer-menu, Buffer-menu-use-header-line) - (Buffer-menu-buffer-face, Buffer-menu-buffer+size-width) - (Buffer-menu-mode-width): New customization. - (Buffer-menu-sort-column): New var. - (Buffer-menu-no-header): New function for not changing header line and - recognizing swapped M&R columns, used by modifying commands in Buffer - Menu. - (Buffer-menu-buffer+size): New function for variable width buffer name. - (list-buffers-noselect): Rewritten for nicer menu. - -2002-12-16 Markus Rost - - * filesets.el (filesets-build-menu-now): Don't clear messages. - - * allout.el: Avoid name conflicts with outline.el. - Replace globally string "outline-" with string "allout-". - Replaced 1446 occurrences; there was no string "allout-" before the - change and there seems to be no dependency on outline.el. - Put `quotes' around many function and variable names. - Doc changes to adjust to the change to prefix "allout-". - Don't provide `outline'. Use " Allout" as mode line string, - not " Outl". Put group `allout' in group `editing'. - Update Copyright notice. Autoload `allout-init'. - (allout-init): Give report also in case auto-activation was inhibited. - (my-mark-marker): Test for feature `xemacs' instead of a string parse. - -2002-12-16 Stefan Monnier - - * xml.el (xml-parse-tag): Allow spaces between / and >. - -2002-12-15 David Kastrup - - * emacs-lisp/autoload.el (autoload-ensure-default-file): - Insert missing space in file end comment. - -2002-12-15 Simon Josefsson - - * mail/smtpmail.el (smtpmail-via-smtp): Fall back to - user-mail-address as sender. - -2002-12-15 Dave Love - - * international/mule-cmds.el (standard-keyboard-coding-systems): - Delete. - (set-locale-environment): Don't use it. - - * international/utf-8.el (ucs-mule-cjk-to-unicode) - (utf-subst-table-for-encode, ucs-unicode-to-mule-cjk) - (utf-subst-table-for-decode): Specify :size, :rehash-size. - (utf-translate-cjk): :set rewritten to load subst-... files. - Add :set-after. - (ccl-decode-mule-utf-8): Consider CJK translation for r3<#x3400. - -2002-12-15 Gustav H,Ae(Bllberg (tiny change) - - * progmodes/compile.el (compile-reinitialize-errors): Don't mark the - buffer as modified unless it really is. - -2002-12-14 Andreas Schwab - - * wid-edit.el (widget-move): Don't loop infinitely when there is - no field or button. - -2002-12-13 Stefan Monnier - - * uniquify.el (uniquify-rationalize-file-buffer-names, rename-buffer) - (uniquify-delay-rationalize-file-buffer-names, kill-buffer-hook): - Undo 2002/09/27 change because kill-buffer-hook is not - permanent-local. - - * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): - Optimize the remaining part of for-effect and/or expressions. - -2002-12-13 Markus Rost - - * emacs-lisp/easy-mmode.el (define-minor-mode): - Use `custom-current-group'. Pass all groups to the hook. - (easy-mmode-define-global-mode): Use `custom-current-group'. - - * international/mule-cmds.el (current-language-environment): - Set type according to `language-info-alist' also here. - - * progmodes/compile.el (compilation-menu-map): - Use `kill-compilation' to stop compilation. - -2002-12-13 Kenichi Handa - - * language/european.el (encode-mac-roman): Fix last change. - - * language/cyrillic.el (ccl-encode-koi8, ccl-encode-koi8-u) - (ccl-encode-alternativnyj): Fix last change. - -2002-12-13 Nick Roberts - - * gdb-ui.el: Improve documentation strings. - (gdb-many-windows): Set default value to nil. - -2002-12-12 Dave Love - - * international/subst-big5.el, international/subst-gb2312.el: - * international/subst-jis.el, international/subst-ksc.el: New. - - * custom.el (defcustom, custom-set-variables): Doc fix. - - * emacs-lisp/bytecomp.el (byte-compile-if): Suppress warnings from - things protected by `(if (fboundp ...' or `(if (boundp ...'. - - * emacs-lisp/byte-opt.el (byte-optimize-featurep): New. - -2002-12-12 Glenn Morris - - * progmodes/fortran.el (fortran-mode-abbrev-table): - Handle `define-abbrev' with either 5 or 6 arguments. - -2002-12-12 Markus Rost - - * international/mule-cmds.el (set-language-info): - Update custom-type of `current-language-environment'. - (current-language-environment): Fix custom type. - -2002-12-11 Pavel Jan,Am(Bk - - * progmodes/antlr-mode.el (antlr): New URL. - -2002-12-10 R. Bernstein - - * gud.el (bashdb): Prompt now included parenthesis for subshell levels. - Fix erroneous print expression command, and fix typos. - (perldb): Undo previous change in prompt regexp. - -2002-12-10 Steven Tamm - - * generic-x.el (javascript-generic-mode): Added C style block - comments as used in ECMA-262 standard. - -2002-12-10 Kenichi Handa - - * language/european.el ("Swedish"): Change tutorial file name to - TUTORIAL.sv in this langauge environment.. - -2002-12-09 John Paul Wallington - - * ibuffer.el (ibuffer-mode): If `show-paren-mode' is enabled, - disable it buffer-locally. - (ibuffer-mouse-popup-menu): Use `=' instead of `eq' to compare - `eventpt' and point. - - * ibuf-ext.el (ibuffer-remove-duplicates): New function. - (ibuffer-set-filter-groups-by-mode): Use it instead of - `delete-duplicates' so we don't require cl library at runtime. - (ibuffer-insert-filter-group-before): Don't use `position' so we - don't require cl library at runtime. - - * chistory.el (command-history-mode): Add interactive spec. - Improve doc string. - -2002-12-09 Richard M. Stallman - - * isearch.el (isearch-no-upper-case-p): \\ only quotes one character. - -2002-12-09 Markus Rost - - * mwheel.el (mouse-wheel-scroll-amount): Revert previous change - - customize type 'float is now defined. - -2002-12-09 Dave Love - - * international/code-pages.el (mik, pt154): New coding systems. - - * international/ucs-tables.el: Fix properly. - -2002-12-09 Andreas Schwab - - * international/ucs-tables.el: Fix last change. - -2002-12-09 Kenichi Handa - - * international/titdic-cnv.el (titdic-convert): Process the - header part in multibyte mode. - -2002-12-08 Dave Love - - * international/code-pages.el (mule-diag): Move where it's required. - - * international/ucs-tables.el: Add latin-jisx0201 characters. - Fix translation-table-for-input for lao, thai, tibetan. - -2002-12-08 Andreas Schwab - - * files.el (insert-directory): Insert free space only when - listing a full directory. - -2002-12-08 Nick Roberts - - * gdb-ui.el : Remove inappropriate key-bindings. - (gdb-info-breakpoints-custom, gdb-goto-bp-this-line): - Parse correctly when breakpoint has no line number. - (def-gdb-auto-update-handler, gdb-info-locals-handler), - (gdb-display-end): Avoid using insert-buffer. - (gdb-frames-select-by-mouse): Rename gdb-frames-mouse-select. - -2002-12-07 Richard M. Stallman - - * progmodes/compile.el (compilation-enter-directory-regexp-alist) - (compilation-leave-directory-regexp-alist): Match byte compiler output. - - * emacs-lisp/cl-macs.el: Add local variable list - to turn off cl-function warnings. - - * emacs-lisp/bytecomp.el (byte-compile-eval): Handle (t . SYMBOL) - elements in load-history. - (byte-compile-cl-warn): No cl warnings for cl-defsubst-expand - and cl-struct-setf-expander. - - * emacs-lisp/autoload.el (autoload-print-form-outbuf): - New variable. - (autoload-print-form): Use autoload-print-form-outbuf. - (generate-file-autoloads): Bind autoload-print-form-outbuf. - - * calendar/calendar.el (calendar-day-name): Move defn down. - - * speedbar.el (speedbar-directory-buttons-follow): - Don't use directory-sep-char. - -2002-12-06 Masatake YAMATO (tiny change) - - * register.el (describe-register-1): Use window-width - to truncate string in a register. Check whether the string - in a register is an empty string or a sequence of white spaces. - -2002-12-07 Andreas Schwab - - * faces.el (face-font-selection-order) - (face-font-family-alternatives, face-font-registry-alternatives): - Remove period from :tag value. - - * cus-edit.el (custom-face-edit-fix-value): Change :reverse-video - to :inverse-video. - -2002-12-07 Markus Rost - - * wid-edit.el (define-widget number): Clarify doc and error message. - (define-widget float): New widget. - -2002-12-07 Andreas Schwab - - * eshell/em-ls.el (eshell-ls-product-regexp): Fix typo. - - * files.el (find-file-read-args): Reenable wildcard processing - unconditionally. - -2002-12-06 Robert J. Chassell - - * textmodes/texinfmt.el (texinfo-format-scan): Handle new - functions for copyright notice and copying permissions. - (texinfo-copying, texinfo-insertcopying): New functions. - -2002-12-03 TAKAHASHI Kaoru - - * textmodes/texinfmt.el (texinfo-format-ifxml) - (texinfo-format-xml): New function. - (ifxml, ifnotxml): New aliases. - -2002-12-06 Dave Love - - * international/utf-8-subst.el: Revert last change. - -2002-12-06 Miles Bader - - * info.el (Info-insert-dir): Make dir-node-cache variables - buffer-local, so that killing the *info* buffer forces the - dir-node to be rebuilt. - -2002-12-06 Markus Rost - - * finder.el (finder-compile-keywords): Don't insert a keyword to - the generated file. - -2002-12-05 Andreas Schwab - - * speedbar.el (speedbar-highlight-face): Fix face spec. - -2002-12-05 Stefan Monnier - - * gdb-ui.el: Replace uses of (gdb-get-instance-buffer 'gdba) and - gdb-proc with gud-comint-buffer instead. - (gdb-proc): Remove. - (def-gdb-var): Simplify. - (gdb-get-create-instance-buffer): Avoid make-variable-buffer-local. - Set gud-comint-buffer as well as gud-minor-mode and tool-bar-map. - (gdb-goto-bp-this-line): Select the window while doing the goto-line. - (gdb-info-locals-handler): Avoid replace-regexp. - - * calendar/calendar.el (facemenu-unlisted-faces): Only update - after facemenu is loaded. - (calendar-font-lock-keywords): Accept non-ASCII month names. - Use regexp-opt. - - * gdb-ui.el (gud-gdb-complete-string, gud-gdb-complete-break) - (gud-gdb-complete-list, gud-gdb-complete-in-progress): Remove. - (gdba): Call `gdb' and then make modifications. - Always call gdb-clear-inferior-io rather than just "the first time". - (gud-break, gud-remove): Definitions moved to inside gdba. - (gdb-target-name): Remove. Use gud-target-name instead. - (gdba-complete-filter, gdba-common-init): Remove. - The changes were integrated into the generic code. - - * gud.el: Use match-string. - (gud-menu-map): Re-fix gdb-running to gud-running. - Activate up/down and finish for pdb. - (gud-def): Use backquotes. - (gdb, sdb, dbx, xdb, pdb, jdb, bashdb): Remove redundant menu bindings. - (gud-gdb-complete-in-progress, gud-gdb-complete-string) - (gud-gdb-complete-break, gud-gdb-complete-list): - Rename to gud-gdb-fetch-lines-in-progress, gud-gdb-fetch-lines-string, - gud-gdb-fetch-lines-break and gud-gdb-fetched-lines. - (gud-gdb-fetch-lines-filter): Rename from gud-gdb-complete-filter. - Add a `filter' argument and run it on `string'. - (gud-gdb-run-command-fetch-lines): Use it instead of - gud-gdb-speedbar-stack-filter. Add a `skip' arg. - Return the fetched lines. - (gud-gdb-complete-command): Use it instead of cooking up - something by hand using gud-gdb-complete-filter. - (gud-gdb-get-stackframe): Use the new calling convention of - gud-gdb-run-command-fetch-lines. - (gud-gdb-fetched-stack-frame-list): Remove. - (gud-gdb-speedbar-stack-filter): Remove. - (gud-jdb-marker-filter): Change RE for easier extraction of submatches. - (gud-bashdb-command-name): Add "--debugger" argument here. - (bashdb): Use default gud-find-file and don't bother with - a massage-args function now that --debugger is make explicit. - (gud-bashdb-massage-args, gud-bashdb-find-file): Remove. - (bashdb): Don't provide. - (gud-target-name): New var. - (gud-common-init): Set it. - Also reset gud-running and gud-last-last-frame. - -2002-12-05 Dave Love - - * international/utf-8-subst.el: Update safe-chars of mule-utf-8, - mule-utf-16-le, mule-utf-16-be. - -2002-12-05 Richard M. Stallman - - * textmodes/outline.el (outline-mode): Doc fix. - -2002-12-05 Edward M. Reingold - - * calendar/solar.el (solar-atn2): Give correct quadrant for arctan. - -2002-12-05 Kenichi Handa - - * international/titdic-cnv.el (quail-misc-package-ext-info): - Remove duplicate entry for chinese-b5-quick. - (batch-miscdic-convert): Don't try to call miscdic-convert on - files in the directory just following the arg "-dir". - -2002-12-04 Stefan Monnier - - * gdb-ui.el: Fold top-level `setq's and `define-key's into their - corresponding defvar. - (gdb-inferior-io-mode-map): New var. - Add bindings to it rather than to comint-mode-map. - (gdb-display-number-end): Use dolist. Remove always-true test. - (gdb-delete-line): Move and simplify. - (gdb-display-end): Don't bother going to beg-of-line since we're there. - (gdb-array-format1): Use dolist. - (gdb-make-windows-menu, gdb-make-frames-menu): - Move to top-level code. Move the menus to within the GUD menu. - Make the menus only appear in gdba mode. - - * gdb-ui.el (gdb-inferior-io-mode-map): Remove (unused). - (gdb-inferior-io-mode): Use define-minor-mode. - (gdb-source-info): Don't burp if there's no source file. - (gdb-inferior-io-interrupt, gdb-inferior-io-quit) - (gdb-inferior-io-stop, gdb-inferior-io-eof) - (gdb-display-breakpoints-buffer, gdb-frame-breakpoints-buffer) - (gdb-display-stack-buffer, gdb-frame-stack-buffer) - (gdb-display-registers-buffer, gdb-frame-registers-buffer) - (gdb-display-locals-buffer, gdb-frame-locals-buffer) - (gdb-display-display-buffer, gdb-frame-display-buffer) - (gdb-display-gdb-buffer, gdb-frame-gdb-buffer) - (gdb-display-assembler-buffer, gdb-frame-assembler-buffer): - Remove the spurious left over arg from the "big reorg". - -2002-12-04 Richard M. Stallman - - * gud.el (gud-menu-map): Update for bashdb. - (perldb): Change prompt regexp. - (gud-bashdb-history, gud-bashdb-massage-args, gud-bashdb-marker-filter) - (gud-bashdb-find-file, gud-bashdb-command-name, bashdb): New. - - * progmodes/cc-vars.el: Simply require wid-edit and custom - in eval-when-compile. - - * progmodes/cc-menus.el: Don't require imenu. - - * progmodes/cc-langs.el: Don't require cl. - (c-delete-duplicates): New function. Use instead of delete-duplicates. - - * progmodes/cc-bytecomp.el (cc-bytecomp-obsolete-var): - Add an else-clause to the if to avoid confused compiler warning. - - * tooltip.el (tooltip-gud-tips-p): Undo previous change. - -2002-12-03 Stefan Monnier - - * gdb-ui.el: Get rid of (quote ..); use match-string and ignore. - - * gdb-ui.el (gdba, gdb-starting, gdb-stopped, gdb-quit): - Update gdb-running -> gud-running. - (gdba): Use the default for gud-find-file. - (def-gdb-variable): Remove: fold into def-gdb-var. - (def-gdb-var): Use buffer-local-value and with-current-buffer. - - * gud.el (gud-running): Rename from gdb-running. Update uses. - (gud-tool-bar-map): Use tool-bar-local-item-from-menu rather than - tool-bar-add-item-from-menu to avoid let binding tool-bar-map - which fails if tool-bar.el is loaded in the mean time. - (gud-file-name): New fun. - (gud-find-file): Use it as default value for gud-find-file. - (gud-speedbar-buttons): Discriminate on gud-minor-mode rather than - on gud-find-file. - (gud-gdb-find-file, gud-dbx-file-name, gud-dbx-find-file) - (gud-xdb-file-name, gud-xdb-find-file, gud-perldb-find-file) - (gud-pdb-find-file, gud-jdb-find-file): Remove. - (gud-query-cmdline): Don't stuff the whole cwd in the command. - (gdb, dbx, xdb, perldb, pdb, jdb): Use the default for gud-find-file. - (gud-mipsdbx-massage-args): Remove. - (gud-dbx-command-name): New var. Do what gud-mipsdbx-massage-args did. - (gud-irixdbx-marker-filter): Use match-string and gud-file-name. - (gud-jdb-command-name): New var. - (gud-common-init): Re-instate RMS code of 11/13. - -2002-12-03 Dave Love - - * international/ucs-tables.el (ucs-unify-8859, ucs-unify-8859) - (ucs-fragment-8859): Don't use set-buffer-major-mode-hook. - (ucs-set-table-for-input): Use optional arg. Check for null `cs'. - -2002-12-03 Andreas Schwab - - * cus-edit.el (custom-display): Add checkbox for type mac. - - * whitespace.el (whitespace-highlight-face): Fix face spec. - -2002-12-02 Stefan Monnier - - * simple.el (completion-setup-function): Fix last change to use - minibuffer-completing-file-name instead. - - * add-log.el (change-log-mode): Set indent-line-function explicitly - to what it was before indent-line-function's default was changed. - -2002-12-02 Richard M. Stallman - - * textmodes/ispell.el (ispell-dict-map): Move specific - dictionary selection into a submenu. - - * textmodes/fill.el (fill-indent-to-left-margin): New function. - (fill-newline, fill-region-as-paragraph): Use that. - - * simple.el (completion-setup-function): - Handle ffap-read-file-or-url-internal specially like - read-file-name-internal. - -2002-12-02 Simon Marshall - - * font-lock.el (c++-font-lock-extra-types): Fix previous change. - -2002-12-02 Fran,Ag(Bois Pinard - - * progmodes/make-mode.el (makefile-font-lock-keywords): Highlight - more make keywords: defined, endef, override, export, unexport - and vpath. - -2002-12-02 Dave Love - - * autoarg.el (autoarg-kp-mode): Give it a :group. - -2002-12-02 Noah Friedman - - * complete.el (PC-do-completion): Do not add wildcards to pattern - unless filename is non-nil. - -2002-12-02 Andreas Schwab - - * mwheel.el (mouse-wheel-scroll-amount): Fix customize type. - - * paren.el (show-paren-mismatch-face): Fix face spec. - -2002-11-30 Nick Roberts - - * gdb-ui.el (gdb-many-windows): Define as a minor mode. - (toggle-gdb-windows): Remove. (Patch from Stefan Monnier) - - * tooltip.el (tooltip-gud-process-output): Handle annotations that - are output with gdba in gdb-ui.el. - (tooltip-strip-annotations): New function. - -2002-11-29 Dave Love - - * autoarg.el (autoarg-mode): Give it a :group. - -2002-11-29 Bill Wohler - - * mail/mh-comp.el, mail/mh-e.el, mail/mh-funcs.el, - mail/mh-mime.el, mail/mh-pick.el, mail/mh-seq.el, - mail/mh-utils.el, mail/mh-xemacs-compat.el: Upgraded to MH-E - version 7.0. - - * mail/mh-index.el, mail/mh-speed.el: New files for indexed - searches and speedbar support in MH-E version 7.0. - - * toolbar/reply-all.pbm, toolbar/reply-all.xpm, - toolbar/reply-from.pbm, toolbar/reply-from.xpm, - toolbar/reply-to.pbm, toolbar/reply-to.xpm: New toolbar images for - MH-E version 7.0. - -2002-11-29 Markus Rost - - * mwheel.el (mouse-wheel-inhibit-click-time): Fix custom type. - -2002-11-29 Richard M. Stallman - - * mail/rmail.el (rmail-convert-to-babyl-format): - Make search for message delimiter case-sensitive. - - * simple.el (yank-window-start): New variable. - (yank): Record yank-window-start - (yank-pop): Use yank-window-start. - - * info.el (Info-additional-directory-list): Doc fix. - - * indent.el (indent-according-to-mode, indent-region): Doc fix. - - * tooltip.el (tooltip-gud-tips-p): Doc fix. - - * eshell/em-script.el: Require eshell. - - * eshell/esh-ext.el, eshell/em-cmpl.el: Require esh-util. - -2002-11-29 Kim F. Storm - - * mwheel.el: Avoid accidental yanking of text while scrolling with - the mouse wheel. This adds a short period after each mouse wheel - scroll event where a click on the mouse wheel button is ignored. - (mouse-wheel-click-event, mouse-wheel-inhibit-click-time): New customs. - (mouse-wheel-click-button, mwheel-inhibit-click-event-timer): New vars. - (mwheel-inhibit-click-timeout,mwheel-filter-click-events): New defuns. - (mwheel-scroll): Add mwheel-filter-click-events as pre-command-hook. - Start mwheel-inhibit-click-event-timer with timeout handler - mwheel-inhibit-click-timeout. - -2002-11-28 Nick Roberts - - * tooltip.el (tooltip-gud-tips-setup): Remove. - (tooltip-gud-debugger): Remove. - (tooltip-gud-print-command): Use gud-minor mode instead of - tooltip-gud-tips-setup and tooltip-gud-debugger. - - * gdb-ui.el (gdb-starting): Set gdb-running to t. - (gdb-stopped): Set gdb-running to nil. - (gdb-quit): Reset some variables including tool-bar-map. - - * gud.el (gdb-running): New variable. - (gud-menu-map): Use gdb-running to grey out toolbar buttons - with gdba in gdb-ui.el. - (gud-tool-bar-map): Move to avoid byte compiler warning. - -2002-11-27 Jason Rumney - - * files.el (file-truename): Canonicalize non-existent names on w32. - -2002-11-28 Kim F. Storm - - * ido.el (ido-xemacs): Remove defvar. All uses changed to - check (featurep 'xemacs) instead. - (ido-visit-buffer): Use select-frame-set-input-focus unconditionally. - -2002-11-27 Dave Love - - * emacs-lisp/cl-macs.el: Move `predicates for analyzing Lisp - forms' block to top (before uses). - (help-fns): Don't require at top level. (Recursively.) - (cl-transform-lambda): Require help-fns. - -2002-11-26 Dave Love - - * language/european.el (encode-mac-roman): Deal with unencodable - characters. - - * language/cyrillic.el (ccl-encode-koi8, ccl-encode-koi8-u) - (ccl-encode-alternativnyj): Deal with unencodable characters. - - * international/code-pages.el (cp-make-coding-system): Deal with - unencodable characters. - -2002-11-24 Richard M. Stallman - - * mail/sendmail.el (mail-signature): Handle case where - value of mail-signature is a string. - - * menu-bar.el (menu-bar-describe-menu): Add "What's This?" item. - - * faces.el (face-set-after-frame-default): Ignore errors - in face-spec-face-set. - - * cus-face.el (custom-declare-face): Add face-defface-spec - prop after applying the face spec. - -2002-11-23 Nick Roberts - - * tooltip.el (tooltip-gud-print-command): Add server prefix to the - print command for gdb to keep it out of the command history. - - * gdb-ui.el: Major re-organisation. Simplify legacy gdba - code to allow only one gdb process. - -2002-11-23 Markus Rost - - * scroll-all.el (scroll-all-mode): Move arg LIGHTER to the right - place. Add groups. - -2002-11-22 Simon Marshall - - * font-lock.el (c++-font-lock-extra-types): Add various STL classes. - -2002-11-21 Nick Roberts - - * gdb-ui.el : General tidying. Patches from Stefan Monnier. - -2002-11-20 Simon Josefsson - - * play/morse.el (morse-code): Add non-ASCII characters, according - to table at http://www.soton.ac.uk/~scp93ch/morse/. - -2002-11-21 Richard M. Stallman - - * dired.el (dired-sort-inhibit): New variable. - (dired-sort-toggle-or-edit): Err if dired-sort-inhibit non-nil. - - * find-dired.el (find-dired): Set dired-sort-inhibit to t - buffer-locally. - -2002-11-21 Eugene Exarevsky - - * progmodes/sql.el: Added LINTER support. - (sql-linter-program): New variable. - (sql-linter-options): New variable. - (sql-mode-menu): Added Linter keywords. - (sql-mode-linter-font-lock-keywords): New variable. - (sql-highlight-linter-keywords): New function. - (sql-linter): New function. - (sql-ms-options): New variable. - (sql-ms): Use it. - -2002-11-21 John Paul Wallington - - * ibuffer.el (ibuffer-formats): Change default value; bump width - of size column in first format to 7. - -2002-11-20 Stefan Monnier - - * help-fns.el (describe-variable): Look for (defvar . ) in the - load-history since `defvar' now uses this format. - - * custom.el (custom-declare-variable): Use push. - Use the (defvar . ) format in load-history like `defvar' does. - - * subr.el (symbol-file): Accept a non-atomic `function' arg. - (with-local-quit): Add debug and indentation info. - -2002-11-20 John Paul Wallington - - * subr.el (symbol-file): Remove unused variable `functions'. - -2002-11-20 Markus Rost - - * Makefile.in (setwins_almost): Renamed from finder_setwins. - (custom-deps): Use it. - (finder-data): Adjust to that name change. - -2002-11-19 Stefan Monnier - - * emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): - Turn errors into messages so they don't get ignored. - (eldoc-get-fnsym-args-string): Use help-split-fundoc. - (eldoc-beginning-of-sexp): Simplify. - (eldoc-function-arglist): Remove. - (eldoc-function-argstring): Use help-function-arglist instead. - (eldoc-function-argstring-from-docstring-method-table) - (eldoc-function-argstring-from-docstring): Remove. - - * emacs-lisp/cl.el (multiple-value-call): Add docstring. - -2002-11-19 Dave Love - - * emacs-lisp/bytecomp.el (maphash, map-char-table): - Use byte-compile-funarg. - - * emacs-lisp/byte-opt.el (side-effect-free-fns): Several additions. - -2002-11-19 Markus Rost - - * progmodes/vhdl-mode.el (defgroup vhdl-related): Declare the - members here rather than with custom-add-to-group. This is the - intended way of using defgroup and also lets - custom-make-dependencies do its job. - (defgroup vhdl-highlight-faces): Ditto. - - * emacs-lisp/shadow.el (defgroup lisp-shadow): New group name. - Previous group name shadow is used in shadowfile.el. - (shadows-compare-text-p): Use group lisp-shadow. - -2002-11-19 Stefan Monnier - - * emacs-lisp/cl.el (multiple-value-call): Add docstring. - -2002-11-19 Masatake Yamato (tiny change) - - * register.el (describe-register-1): Don't assign to val the value - returned by `remove-list-of-text-properties'. - -2002-11-18 Kai Gro,A_(Bjohann - - * calendar/diary-lib.el (fancy-diary-font-lock-keywords): - Grok month numbers, too. - -2002-11-18 Juanma Barranquero - - * mail/smtpmail.el (smtpmail-send-queued-mail): Add autoload cookie. - -2002-11-18 Markus Rost - - * pcvs.el (cvs-minor-mode, cvs-mode-commit-hook): Add group. - - * textmodes/refill.el (defgroup refill): New group. - - * emacs-lisp/checkdoc.el (checkdoc-minor-mode): Add group. - - * textmodes/sgml-mode.el (html-autoview-mode): Add group. - - * textmodes/paragraphs.el (use-hard-newlines): Add group. - - * progmodes/compile.el (compilation-shell-minor-mode): Add group. - (compilation-minor-mode): Add group. - - * reveal.el (global-reveal-mode): Add group. - - * bookmark.el (bookmark-menu-length): Fix group name. - -2002-11-17 Richard M. Stallman - - * mail/rmail.el (rmail-ignored-headers): Add more headers. - - * calendar/parse-time.el (parse-time-elt): Var renamed from `elt'. - (parse-time-val): Var renamed from `val'. All uses changed. - - * files.el (parse-time-rules): Mark it as risky. - - * finder.el (finder-commentary): Use buffer *Finder-package*. - - * menu-bar.el (menu-bar-options-menu): Improve tooltip string. - - * simple.el (indicate-unused-lines) - (default-indicate-unused-lines): New variable aliases. - -2002-11-18 Kenichi Handa - - * progmodes/cc-vars.el: Undo previous change. - -2002-11-18 Kenichi Handa - - * language/cyrillic.el (cyrillic-iso-8bit): Make it safe. - - * language/european.el (iso-latin-1): Make it safe. - (iso-latin-2, iso-latin-3, iso-latin-4, iso-latin-5, iso-latin-8) - (iso-latin-9): Likewise. - - * language/greek.el (greek-iso-8bit): Make it safe. - - * language/hebrew.el (hebrew-iso-8bit): Make it safe. - - * language/lao.el (lao): Make it safe. - - * language/thai.el (thai-tis620): Make it safe. - -2002-11-17 Markus Rost - - * speedbar.el (defgroup speedbar): Use group 'etags instead of - nonexisting group 'tags. - - * emacs-lisp/re-builder.el: Add provide call. - - * mail/feedmail.el (feedmail-fiddle-headers-upwardly) - (feedmail-fiddle-plex-user-list): Fix typo in group name. - - * progmodes/make-mode.el (makefile-space-face): Fix group name. - - * textmodes/ispell.el (defgroup ispell): Arrange that definition - starts at beginning of line. - - * textmodes/table.el (defgroup table-hooks): New group. - (table-cell-map-hook): Fix typo in group name. - - * calendar/diary-lib.el (diary-button-face): Add group and version - number. - - * warnings.el (defgroup warnings): New group. - -2002-11-16 Markus Rost - - * emacs-lisp/autoload.el (update-autoloads-from-directories): - Sort the list of files with no autoloads. - -2002-11-16 Alan Shutko - - * calendar/diary-lib.el (list-diary-entries): Pass a marker - indicating source of entry to add-to-diary-list. - (diary-button-face, diary-entry, diary-goto-entry): New, to - support click to diary file. - (fancy-diary-display): Buttonize diary entries. - (list-sexp-diary-entries): Pass a marker indicating source of - entry to add-to-diary-list. - (diary-date): Return mark as well as entry. - - * calendar/calendar.el (diary-face): New. - (european-calendar-display-form, describe-calendar-mode) - (mark-visible-calendar-date, calendar-mark-today): Tidy doc string. - (calendar-make-alist): New. - (calendar-mode): Set up font-lock mode. - (generate-calendar-window): Fontify if font-lock-mode is on. - -2002-11-16 Ivan Zakharyaschev (tiny change) - - * international/codepage.el (cp866-decode-table): Fix the - translation table. - -2002-11-16 Martin Stjernholm - - * progmodes/cc-bytecomp.el (cc-bytecomp-defun): Fixed bug that - caused existing function definitions to be overridden by - phonies when the bytecomp environment is restored. - -2002-11-15 Nick Roberts - - * toolbar/gud-break.pbm, toolbar/gud-cont.pbm, toolbar/gud-display.pbm, - toolbar/gud-down.pbm, toolbar/gud-finish.pbm, toolbar/gud-goto.pbm, - toolbar/gud-next.pbm, toolbar/gud-print.pbm, toolbar/gud-remove.pbm, - toolbar/gud-run.pbm, toolbar/gud-step.pbm, toolbar/gud-up.pbm: - Icons for debugger (pbm files). - -2002-11-15 Richard M. Stallman - - * international/mule.el (set-buffer-file-coding-system): Redo prev chg. - -2002-11-15 John Paul Wallington - - * ibuffer.el (ibuffer-use-other-window, ibuffer-use-header-line) - (ibuffer-visit-buffer, ibuffer-redisplay, ibuffer-update): Doc fix. - (ibuffer-mode-hooks): Remove spurious defvar. - (ibuffer): Run `ibuffer-hook' instead of `ibuffer-hooks'. - (ibuffer-mode): Run `ibuffer-mode-hook' instead of - `ibuffer-mode-hooks'. - -2002-11-15 Markus Rost - - * mail/rmailedit.el: Add provide call. - - * play/bruce.el: Add provide call. - - * emacs-lisp/gulp.el: Add provide call. - -2002-11-14 Richard M. Stallman - - * international/mule.el (set-buffer-file-coding-system): Undo prv chg. - -2002-11-14 Markus Rost - - * custom.el (custom-declare-group): Remove unnecessary line of code. - - * cus-dep.el (custom-make-dependencies): Bind load-file-name. - -2002-11-14 Edward M. Reingold - - * calendar/diary-lib.el (make-diary-entry): Allow for local variables - at end of diary file. - -2002-11-14 Kim F. Storm - - * files.el (mode-name): Mark it as risky-local-variable like the - other mode-line elements (moved from bindings.el). - - * bindings.el (mode-name): Moved mark as risky-local-variable to - files.el. - -2002-11-14 Juanma Barranquero - - * gud.el: Fix feature name in `provide'. - - * gdb-ui.el: Fix feature name in `require'. - -2002-11-14 Per Cederqvist (tiny change) - - * progmodes/etags.el (find-tag-default): Copy text at point without - properties. - -2002-11-14 Kenichi Handa - - * progmodes/cc-vars.el: Don't cc-bytecomp-defun char-table-p. - -2002-11-14 Kim F. Storm - - * textmodes/fill.el (fill-nobreak-invisible): New var. - (fill-nobreak-p): Test it; return t if set and point invisible. - (fill-newline): Test it; remove invisible prop on newline if set. - - * info.el (Info-fontify-node): New local list paragraph-markers. - Record markers for mangled *note references on that list. - When done, go back through those markers and fill each mangled - paragraph with `fill-nobreak-invisible' let-bound to t. - Don't use `display' property; insert "see" directly in buffer. - -2002-11-14 Nick Roberts - - * gdb-ui.el: New file, User Interface for running GDB - - * gud.el:(gud-find-file): Set up GDB tool bar. - (gud-menu-map): New commands: run, goto. - Enable some commands for gdba. - (gud-query-cmdline): Pass default directory to gdba. - (gdb): Defune gud-goto and gud-run. - (gud-gdb-complete-command): Maybe use gdba-complete-filter. - (gud-mode): Set up local tool bar. - (gud-display-line): For gdba, call gdb-display-source-buffer. - (gud-basic-call): For gdba, maybe delete the current prompt. - (gud-tool-bar-map): New variable. - (gud-read-address): Correction. - - * toolbar/gud-break.xpm, toolbar/gud-cont.xpm, toolbar/gud-display.xpm, - toolbar/gud-down.xpm, toolbar/gud-finish.xpm, toolbar/gud-goto.xpm, - toolbar/gud-next.xpm, toolbar/gud-print.xpm, toolbar/gud-remove.xpm, - toolbar/gud-run.xpm, toolbar/gud-step.xpm, toolbar/gud-up.xpm: - Icons for debugger. - -2002-11-13 Stefan Monnier - - * pcvs.el (cvs-mode-run): Don't pass "." if not needed. - -2002-11-13 Andre Spiegel - - * vc-rcs.el (vc-rcs-registered): Improve comment. - - * vc-sccs.el (vc-sccs-registered): Improve comment. - -2002-11-13 Tim Van Holder (tiny change) - - * progmodes/compile.el (compilation-error-regexp-alist): - Don't include colon and space after a file name as part of the name. - -2002-11-13 Richard M. Stallman - - * gud.el (gdb): Undo 10-26 change. - -2002-11-13 Kenichi Handa - - * replace.el (occur-engine): Set buffer-file-coding-system of - OUT-BUF to that of one of BUFFERS if they locally bind that variable. - -2002-11-13 Markus Rost - - * custom.el (custom-handle-all-keywords): Fix arg passed to - custom-add-to-group. - -2002-11-12 Stefan Monnier - - * pcvs-defs.el (cvs-mode-map): Remove M-f binding. - (cvs-minor-mode-map): Add e binding in log-view-mode. - - * progmodes/perl-mode.el (perl-hanging-paren-p): New fun. - (perl-indent-line): Look at the open-paren to indent a close-paren. - (perl-calculate-indent): Try to better indent args after hanging paren. - Remove special code for open-paren-in-column-0. - - * textmodes/sgml-mode.el (sgml-namify-char): New cmd. - (sgml-name-char): Use it. - (sgml-tag-last, sgml-tag-history): New vars. - (sgml-tag): Use them. - (sgml-skip-tag-forward): Use sgml-tag-syntax-table. - (sgml-delete-tag): Remove resulting empty lines. - (sgml-tag) : Don't make intangible. - (sgml-parse-tag-backward): Add limit argument. - (html-autoview-mode): Use define-minor-mode. - -2002-11-12 Markus Rost - - * vc-rcs.el (vc-rcs-registered): Handle the autoload cookie so - that the definition is found by `find-function-search-for-symbol' - and etags. - - * vc-sccs.el (vc-sccs-registered): Ditto. - - * emulation/edt.el (defgroup edt): Arrange that definition starts - at beginning of line. - - * ls-lisp.el (defgroup ls-lisp): Remove autoload cookie. - - * hi-lock.el (defgroup hi-lock-interactive-text-highlighting): - Remove autoload cookie. - - * newcomment.el (defgroup comment): Remove autoload cookie. - -2002-11-11 Markus Rost - - * mwheel.el (mouse-wheel-down-button, mouse-wheel-up-button): - Declare with defvar, not with defcustom. - - * cus-dep.el: Don't require 'autoload. - (custom-make-dependencies): Handle :version also for autoloaded - options. - - * winner.el (defgroup winner): Arrange that definition starts at - beginning of line. - - * emulation/edt.el: Simplify Emacs 19 compatibility. - -2002-11-11 Fabrice Bauzac (tiny change) - - * dired-aux.el (dired-show-file-type): Format filename with "%s" to - escape any format-like sequences it could contain. - -2002-11-11 Per Abrahamsen - - * cus-edit.el (custom-save-delete): Force emacs-lisp-mode. - -2002-11-11 Juanma Barranquero - - * bindings.el (mode-name): Mark it as risky-local-variable. - -2002-11-09 Dave Love - - * international/mule-cmds.el (current-language-environment): - Fix :type. - - * international/ucs-tables.el: Revert to using - translation-table-for-input instead of keyboard-translate-table. - - * international/quail.el (quail-input-string-to-events): - Revert last change. - - * simple.el (quoted-insert): Bind translation-table-for-input, - not keyboard-translate-table. - -2002-11-08 Stefan Monnier - - * arc-mode.el (archive-zip-summarize): Don't hardcode (point-min) = 1. - - * complete.el (PC-do-completion): Make partial-completion work - with incomplete directory names. - - * textmodes/tex-mode.el (latex-standard-block-names): Rename from - standard-latex-block-names. - (tex-font-lock-keywords-1): Add providecommand, renewenvironment, - and renewtheorem. Highlight \it and \bf separately since they - may overlap. - (tex-font-lock-suscript, tex-font-lock-unfontify-region): New funs. - (tex-font-lock-keywords-3, tex-verbatim-environments) - (tex-font-lock-syntactic-keywords): New vars. - (superscript, subscript, tex-verbatim-face): New faces. - (tex-font-lock-syntactic-face-function): Handle \verb construct. - (tex-common-initialization): Update font-lock-defaults setting. - (tex-insert-braces): Make it into a skeleton. - (latex-fill-nobreak-predicate): Don't break after \. - (latex-insert-block): Rename from tex-latex-block. - (latex-down-list): Use tex-mode-syntax-table when skipping parens - rather than the indentation syntax-table. - (latex-close-block): Rename from tex-close-latex-block. - (latex-split-block): New fun. - (latex-indent): Don't indent inside a verbatim block. - (latex-find-indent): Stick \begin{verbatim} to the margin. - -2002-11-08 John Wiegley - - * calendar/timeclock.el (timeclock-modeline-display): Use assq as - well as memq to find `global-mode-string' within - `mode-line-format'. The structure of that variable has changed in - 21.3. - -2002-11-07 Stefan Monnier - - * format.el (format-decode): Be careful with the order in `format'. - - * eshell/esh-cmd.el (function-p-func): Avoid `xemacs-p'. - - * eshell/em-glob.el: Require esh-util. - (eshell-glob-initialize): Don't assume - eshell-special-chars-outside-quoting is available. - - * textmodes/fill.el (fill-paragraph): Consider a comment-start as - a paragraph starter when filling non-comments. - (fill-comment-paragraph): Don't narrow while doing the fill. - Recognize paragraph starters and separators within comments. - Use adaptive-fill-prefix when it works. Use comment-search-forward. - - * progmodes/compile.el (grep-default-command): New fun. - (grep): Use it. - (compilation-menu-map): New var. - (compilation-minor-mode-map, compilation-shell-minor-mode-map): Use it. - (compilation-mode-map): Simplify. - (compilation-shell-minor-mode, compilation-minor-mode): - Use define-minor-mode. - - * elide-head.el (elide-head): Don't make intangible. - - * help.el (where-is): Rename map to defs (a list of syms is not a map). - Test fboundp first, to speed things up. Use push. - - * isearch.el (isearch-hidden): New var. - (isearch-search-and-update): Test it. - (isearch-range-invisible): Set it. - - * progmodes/tcl.el (tcl-mode): Don't set paragraph-start, - paragraph-separate, comment-column, and fill-paragraph-function. - Simplify outline-regexp. - (tcl-do-fill-paragraph): Remove. - -2002-11-07 Markus Rost - - * mail/sendmail.el (mail-default-directory): Set the version to 21.4. - - * progmodes/compile.el (grep-compute-defaults): Undo previous change. - Definition moved down. - (grep-command, grep-find-command, grep-tree-command): Allow value nil. - Do not declare :get property. - (grep-use-null-device): Fix type. Do not declare :get property. - - * emacs-lisp/checkdoc.el (checkdoc-find-error): - Use get-file-buffer instead of get-buffer. - - * cus-dep.el (custom-make-dependencies): Fix comment inserted in - cus-load.el. - -2002-11-07 Juanma Barranquero - - * help.el (where-is): Report also aliases of the passed command. - -2002-11-06 Dave Love - - * simple.el (quoted-insert): Bind keyboard-translate-table around - read-char. - - * international/ucs-tables.el: Use keyboard-translate-table coding - system property, not translation-table-for-input, for - vietnamese-viscii & al. - (translation-table-for-input): Set, - don't defvar, and make permanent-local. - (ucs-unify-8859, ucs-unify-8859, ucs-fragment-8859): Add/remove - set-buffer-major-mode-hook, not quail-activate-hook. - (ucs-set-table-for-input): Renamed from ucs-quail-activate. - (ucs-unify-8859, ucs-unify-8859, ucs-fragment-8859): - Setup keyboard-translate-table, not translation-table-for-input. - Modify set-buffer-major-mode-hook, not quail-activate-hook. - (ucs-fragment-8859): Don't use translation-table-for-input coding - system property. - (ucs-quail-activate): Deleted. - (ucs-set-table-for-input): New. - (ucs-minibuffer-setup): Use it. - - * international/quail.el (quail-input-string-to-events): - Use keyboard-translate-table, not translation-table-for-input. - - * files.el (normal-mode): Call ucs-set-table-for-input. - - * international/mule.el (set-buffer-file-coding-system): - Call ucs-set-table-for-input. - -2002-11-06 Richard M. Stallman - - * replace.el (query-replace, query-replace-regexp): Doc fixes. - - * emacs-lisp/bytecomp.el (byte-compile-lambda): - Handle progn like let, inside interactive spec. - - * textmodes/tex-mode.el (tex-dvi-view-command): Value can be sexp. - Initialize to a suitable sexp. - (tex-view): Evaluate tex-dvi-view-command and use the value. - -2002-11-06 Kenichi Handa - - * international/mule.el (coding-system-eol-type-mnemonic): - Use eol-mnemonic-undecided if CODING-SYSTEM is nil. - -2002-11-06 Kim F. Storm - - * info.el (Info-fontify-node): Fixed hiding of *note references - with embedded file names like (xxx.yyy). - Avoid making any lines visibly longer if hiding newlines inside - note references by wrapping line after references if it contained - a newline (unfortunaly this makes more lines appear "shorter"). - Properly reindent multi-line menu entry descriptions. - -2002-11-05 Juanma Barranquero - - * language/cyrillic.el ("Bulgarian"): Fix typo. - - * international/mule.el (coding-system-eol-type-mnemonic): - Move from mule-util.el. - - * international/mule-util.el (coding-system-eol-type-mnemonic): - Move to mule.el. - -2002-11-04 Juanma Barranquero - - * files.el (find-buffer-visiting): Accept new optional PREDICATE - argument to return only a buffer that satisfies the predicate. - (insert-file-1): New function. - (insert-file-literally): Use it. - (insert-file): Use it. - -2002-11-04 Robert Fenk (tiny change) - - * desktop.el (desktop-relative-file-names): New variable. - (desktop-save): Use it. - -2002-11-03 Andre Spiegel - - * vc.el (vc-dired-mode): Adapt dired-move-to-filename-regexp to - its current version in dired.el. - -2002-11-03 Stefan Monnier - - * emacs-lisp/autoload.el (generate-file-autoloads) - (update-file-autoloads): Strip .gz and other such extensions. - (update-autoloads-from-directories): Also consider compressed files. - - * info.el (Info-streamline-headings): New var. - (Info-dir-remove-duplicates): New fun. - (Info-insert-dir): Use it. Simplify the code with push,mapc,dolist. - (Info-select-node): Simplify handling of Info-header-line. - (Info-forward-node): Undo 2000/12/15 since we don't narrow any more. - (Info-mode): Set header-line-format once and for all. - (Info-fontify-node): Accept bogus first line with `File:' missing. - Only make first line invisible if Info-use-header-line. - Don't use `intangible': it's evil. Use inhibit-read-only. - (Info-follow-reference, Info-next-reference, Info-prev-reference) - (Info-try-follow-nearest-node): Don't bind inhibit-point-motion-hooks - since we don't use intangible any more. - - * image.el (insert-image): Don't make intangible since - adjust_point_for_property should be sufficient by default. - -2002-11-02 Stefan Monnier - - * textmodes/fill.el (fill-paragraph-handle-comment): New var. - (fill-comment-paragraph): New fun (generalizes of lisp-fill-paragraph). - (fill-paragraph): Use them. - - * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): - Use fill-comment-paragraph. - -2002-11-02 Stefan Monnier - - * bindings.el (mode-line-change-eol) - (mode-line-eol-desc-cache, mode-line-eol-desc): New. - (mode-line-mule-info): Use them for the EOL part of the modeline. - - * server.el (server-sentinel): Kill buffers if applicable. - (server-temp-file-p): Make arg optional. - (server-done): Use it to simplify. - (server-switch-buffer): If server-window is a function, use it. - - * mail/undigest.el (rmail-digest-end-regexps): Simplify. - (undigestify-rmail-message): Fix paren-bug and simplify. - -2002-11-02 Kim F. Storm - - * info.el (Info-hide-note-references): nil value now does no - reformatting at all. New choice 'tag reformats tag but shows - the section reference. - (Info-fontify-node): Use it. - -2002-11-01 Stefan Monnier - - * textmodes/tex-mode.el (tex-common-initialization): - comment-start-skip shouldn't match on the next line. - - * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Use match-string. - Don't bother making paragraph-start a superset of paragraph-separate. - Use line-beginning-position. - - * textmodes/sgml-mode.el (sgml-skip-tag-backward) - (sgml-skip-tag-forward): Deal with xml-style empty tags. - -2002-11-01 Kim F. Storm - - * info.el (Info-hide-note-references): New defcustom. - (Info-fontify-node): Use it. - -2002-10-31 Kim F. Storm - - * shell.el (explicit-bash-args): Bash 1.x doesn't grok - --noediting option; added run-time check to exclude it. - - * info.el (Info-follow-reference, Info-next-reference) - (Info-prev-reference, Info-try-follow-nearest-node): - Bind inhibit-point-motion-hooks to t while parsing reference. - (Info-fontify-node): When font-lock-mode is enabled, display - "*note" and "* menu" references in a more user friendly format. - -2002-10-30 Stefan Monnier - - * textmodes/fill.el (fill-move-to-break-point): Skip white space - _before_ checking to see if we're hitting the margin. - (fill-region-as-paragraph): Don't fiddle with the undo-list any more: - it's now done by the C primitives. Don't use narrowing. - Reorganize the line-breaking part of the code to simplify the control - flow and make it work in the absence of narrowing. - (fill-region): Don't use narrowing. - -2002-10-30 Dave Love - - * textmodes/po.el (po-content-type-charset-alist): Delete most entries. - (po-find-charset): Doc fix. Remove interactive spec. - (po): Provide. - (po-find-file-coding-system-guts): Re-written to use - coding-system-alist, and code-pages, not codepage stuff. - - * term/x-win.el: Remove some ancient compatibility code. - Populate x-keysym-table. - -2002-10-30 Andreas Schwab - - * subr.el (replace-regexp-in-string): Doc fix. - -2002-10-29 Dave Love - - * cus-start.el (selection-coding-system, scalable-fonts-allowed): Add. - - * progmodes/scheme.el (syntax-case): Define scheme-indent-function. - - * international/mule-conf.el: Doc fixes. - -2002-10-29 Richard M. Stallman - - * server.el (server-switch-buffer): Say when no server buffers remain. - - * net/goto-addr.el (goto-address-url-regexp): Don't match `mailto'. - -2002-10-28 Masayuki Ataka (tiny change) - - * progmodes/make-mode.el (makefile-warn-continuations): - Call re-search-forward with NOERROR t. - -2002-10-29 Kim F. Storm - - * ido.el (ido-wide-find-dirs-or-files): Fixed problem that caused - incomplete list of matches to be returned. - -2002-10-29 Masayuki Ataka (tiny change) - - * textmodes/texinfo.el (texinfo-environments): Add environment; - copying, documentdescription, ifplaintext, ifnotplaintext, and - verbatim. - - * textmodes/texinfmt.el (texinfo-format-ifplaintext): New function. - (ifplaintext, ifnotplaintext) - (afourpaper, afivepaper, afourlatex, afourwide) - (documentlanguage, documentencoding): New aliases. - -2002-10-29 John Paul Wallington - - * ibuffer.el (ibuffer-mouse-popup-menu): Set point before popping - up filter groups menu. Preserve point unless a menu command has - moved it from point clicked. - -2002-10-29 David Kastrup - - * calc/calc.el (calc-any-evaltos): Initialize to nil, since - calc-refresh-evaltos appears to need this. - -2002-10-28 Dave Love - - * international/mule-diag.el (non-iso-charset-alist): Move to - avoid compilation warning. - (mule-diag): Provide. - - * international/code-pages.el (cp-make-coding-system): - Use utf-translation-table-for-decode, not - utf-8-translation-table-for-decode. - (mule-diag): Require. - - * language/thai-util.el (thai-composition-function): Don't use prog1. - - * language/lao-util.el (lao-composition-function): Don't use prog1. - - * language/european.el (diacritic-composition-function): - Modify confused prog1 form. - - * international/quail.el (quail-keyboard-layout-alist): Fix pc105-uk. - (quail-keyboard-layout): Customize. - Move after quail-keyboard-layout-alist. - -2002-10-28 Miles Bader - - * progmodes/make-mode.el (makefile-warn-continuations): - Don't barf when there _aren't_ any suspicious continuations. - -2002-10-28 Matthew Swift - - * progmodes/compile.el (grep-find-use-xargs): Fix docstring. - -2002-10-27 Michael Kifer - - * ediff-wind.el (ediff-control-frame-parameters): Add scrollbar-height. - -2002-10-27 Andreas Schwab - - * progmodes/sh-script.el (sh-mode-syntax-table): Don't make ^L - end-of-comment syntax. - -2002-10-27 Kim F. Storm - - * ido.el (ido-cannot-complete-command): New defcustom, default to - ido-completion-help (similar to iswitchb-cannot-complete-hook). - (ido-complete): Call value of ido-cannot-complete-command rather - than ido-completion-help when no common completion. - -2002-10-27 Dave Love - - * international/code-pages.el (iso-8859-11): New. - -2002-10-27 Kim F. Storm - - * pcvs.el (cvs-checkout): Use read-directory-name. - (cvs-query-directory): Likewise. - -2002-10-26 Richard M. Stallman - - * progmodes/make-mode.el (makefile-cleanup-continuations): - Default for variable is nil. - (makefile-warn-continuations): New function. - (makefile-mode): Put it on write-file-functions. - - * international/mule-cmds.el (select-safe-coding-system): - Delete debugging setq. - - * shell.el (shell): Look for .emacs_SHELL under ~/.emacs.d - after looking in ~. - - * startup.el (command-line): Look for .emacs under ~/.emacs.d - after looking in ~. - - * simple.el (toggle-truncate-lines): When turning off truncation, - clear out the hscroll value in this buffer's windows. - - * simple.el (display-message-or-buffer): Don't display empty - output in the echo area. - - * man.el (Man-default-man-entry): Don't look for all word chars, - look only for characters that are normally part of a shell command. - - * gud.el (gdb): Pass default-directory to GDB via -cd option. - - * font-lock.el (c++-font-lock-keywords...): Add `restrict' keyword. - - * find-file.el (ff-find-related-file): Fix autoload cookie. - - * emacs-lisp/unsafep.el (unsafep-variable): Pass second arg to - risky-local-variable-p. - - * files.el (risky-local-variable-p): VAL=nil has special meaning. - - * Makefile.in (compile-always): Avoid error in old Bash versions. - -2002-10-26 John Paul Wallington - - * textmodes/picture.el (picture-mouse-set-point): New command. - (picture-mode-map): Bind it. - (picture-motion-reverse): Doc fix. - -2002-10-25 Stefan Monnier - - * textmodes/outline.el (outline-next-heading): Make sure the match-data - is really correct where returning. - -2002-10-24 Matthew Swift - - * textmodes/outline.el (outline-minor-mode): Add customization group. - -2002-10-23 Richard M. Stallman - - * files.el (risky-local-variable-p): New arg VAL. - (compile-command): Use `stringp' for `safe-local-variable' prop. - (hack-one-local-variable): Pass VAL to `risky-local-variable-p'. - -2002-10-23 Francis J. Wright - - * woman.el (woman-version): Update to 0.551 (beta). - (woman-parse-colon-path): Add support for current Cygwin mount - conventions. - (woman-Cyg-to-Win): New function to convert absolute filename from - Cygwin to Windows form by executing external program cygpath if - possible. - (woman-man.conf-path): Update default to current common locations - and to support Cygwin; update documentation. - (woman-parse-man.conf): Generalize regexp to "man.*\\.conf" to - match possible names of man.conf file; tidy code and documentation. - (woman-manpath): Simplify default and documentation; essentially - move code that was here into `woman-parse-colon-path'. - (woman-default-indent): Change Linux to GNU in documentation. - (woman-addition-face): Make documentation consistent with other - WoMan faces. - (woman-emulate-tbl): New variable, determines whether tbl - emulation is required. - (woman-decode-region): Add check for preprocessor requests. - (woman0-process-escapes, woman-special-characters) - (woman-get-next-char, woman-parse-numeric-value): Add support for - long groff names of the form [xxx]. - (woman-strings, woman-change-fonts): Now call `woman-match-name'. - (woman2-PD, woman2-na): Doc fix. - (woman-match-name): New function. - (woman2-TS): New function. - (woman2-TE): New alias for `woman2-fi'. - -2002-10-23 Kim F. Storm - - * ido.el (ido-restrict-to-matches): New command. - (ido-define-mode-map): Bind it to C-SPC and C-@ in ido-mode-map. - -2002-10-22 Bob Halley (tiny change) - - * eshell/esh-io.el (eshell-set-output-handle): Fix so that - multiple redirection can work. - -2002-10-21 Stefan Monnier - - * ielm.el (inferior-emacs-lisp-mode): If hexl not found, use cat. - Don't hardcode point-min == 1. - - * hexl.el (hexl-mode-old-write-contents-hooks): Remove. - (hexl-mode, hexl-current-address, hexl-address-to-marker) - (hexl-insert-char): Don't hardcode point-min == 1. - (hexl-isearch-search-function): New fun. - (hexl-mode-old-isearch-search-fun-function): New var. - (hexl-mode): Use them. - (hexl-mode, hexl-mode-exit, hexl-maybe-dehexlify-buffer): - Use write-contents-functions rather then write-contents-hooks. - - * textmodes/text-mode.el (text-mode-syntax-table): Make ' a prefix. - (paragraph-indent-text-mode-abbrev-table) - (paragraph-indent-text-mode-syntax-table): Remove. - (paragraph-indent-text-mode): Use the :abbrev and :syntax-table args. - -2002-10-21 Juanma Barranquero - - * eshell/esh-util.el (directory-files-and-attributes): Copy docstring - from Emacs 21. Arg DIR renamed to DIRECTORY for consistency. - -2002-10-20 Andreas Schwab - - * apropos.el (apropos-group): Use customize-group-other-window. - -2002-10-18 Stefan Monnier - - * progmodes/perl-mode.el (perl-mode-syntax-table): Change $ back - to just "/" instead of "/ p". - (perl-font-lock-syntactic-keywords): Use ". p" for the `$'. - -2002-10-18 Juanma Barranquero - - * textmodes/artist.el (artist-ff-is-bottommost-line): Fix misplaced - ELSE expression on IF. - -2002-10-17 Juanma Barranquero - - * align.el (align-rules-list, align-exclude-rules-list): Fix typos. - - * subr.el (remq): Likewise. - - * vc-cvs.el (vc-cvs-sticky-tag-display): Likewise. - - * vc-hooks.el (vc-insert-file): Likewise. - - * vcursor.el (vcursor-other-window): Likewise. - - * wid-edit.el (widget-choose): Likewise. - - * calendar/diary-lib.el (diary-name-pattern): Likewise. - - * emacs-lisp/elint.el (elint-error, elint-warning): Likewise. - - * emacs-lisp/lisp.el (beginning-of-defun): Likewise. - - * emulation/edt-mapper.el (top-level): Likewise. - - * eshell/esh-var.el (eshell/define): Likewise. - - * mail/feedmail.el (feedmail-nuke-body-in-fcc) - (feedmail-queue-draft-directory): Likewise. - - * net/netrc.el (netrc-parse): Likewise. - - * obsolete/cplus-md.el (c++-empty-arglist-indent): Likewise. - - * progmodes/ebrowse.el (ebrowse-ts) - (ebrowse-view/find-file-and-search-pattern) - (ebrowse-draw-file-member-info): Likewise. - - * progmodes/idlwave.el (idlwave-region-active-p): Likewise. - - * progmodes/idlw-shell.el (idlwave-shell-set-bp): Likewise. - - * progmodes/sh-script.el (sh-indent-for-then): Likewise. - - * textmodes/bibtex.el (bibtex-find-entry-location): Likewise. - - * textmodes/sgml-mode.el (sgml-close-tag, html-imenu-index): Likewise. - -2002-10-17 Dave Love - - * international/mule-diag.el (non-iso-charset-alist): Add koi8-u. - - * international/code-pages.el (cp-make-translation-table): Use - ucs-mule-to-mule-unicode. - (cp-fix-safe-chars): Fix typo. - (non-iso-charset-alist): Don't define. - (cp-make-coding-system): Use utf-8-translation-table-for-decode. - Define translation-table-for-input. - (cp866): Reinstate. - (alternativnj): Don't define alias. - (koi8-u): Deleted. - - * language/european.el ("Slovenian"): Use slovenian input-method. - (encode-mac-roman): Use ucs-mule-to-mule-unicode. - - * language/cyrillic.el (cyrillic-alternativnyj-decode-table): Fix - the table. - (cyrillic-alternativnyj): Don't give it `mime-charset' property. - (cp866): Delete this alias. - ("Bulgarian"): Fix the value of `input-method'. - -2002-10-16 Luc Teirlinck - - * dired-aux.el (dired-add-entry): Put point in correct position - before inserting marker char. - -2002-10-16 Andreas Schwab - - * dired.el (dired-readin-insert): Expand dired-directory. - - * dired-aux.el (dired-insert-subdir-doinsert): Preserve point. - -2002-10-16 Markus Rost - - * textmodes/reftex-vars.el: Move reftex-set-dirty here from - reftex.el. Move the provide call to end of file. - - * textmodes/reftex.el: Move reftex-set-dirty to reftex-vars.el. - -2002-10-15 Dave Love - - * man.el (Man-getpage-in-background): Set width in environment. - -2002-10-15 Kenichi Handa - - * mail/sendmail.el (sendmail-send-it): Call - select-message-coding-system before changing the current bufer to - " sendmail temp". - -2002-10-14 Andre Spiegel - - * files.el (insert-directory): Handle //SUBDIRED// lines in - recursive listings from ls --dired. - - * vc.el (vc-dired-reformat-line): Simplified. Handles text - properties correctly now. - -2002-10-14 Juanma Barranquero - - * international/mule.el (set-selection-coding-system): Fix spacing. - -2002-10-13 Richard M. Stallman - - * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): - Treat `ignore' specially--prevent warnings about functions - called for effect, in its args. - Don't warn when `pop' is used for effect. - - * emacs-lisp/autoload.el (autoload-print-form): Cleanup. - - * uniquify.el (uniquify-get-proposed-name): - Don't use directory-sep-char. - - * thingatpt.el (read-from-whole-string): Add call to `ignore'. - - * find-file.el (ff-related-file-alist): New alias. - (ff-find-related-file): New alias. - -2002-10-13 Andreas Schwab - - * dired.el (dired-insert-directory): When looking for existing - indentation, goto OPOINT instead of beginning of buffer. - -2002-10-12 Stefan Monnier - - * cus-dep.el (custom-make-dependencies): Ignore preloaded files. - -2002-10-12 Michael Kifer - - * ediff-init.el (ediff-frame-char-height): Use frame-selected-window. - - * ediff-util.el (ediff-file-checked-in-p): Changed progn with and. - - * ediff-wind.el (ediff-skip-unsuitable-frames): Distinguish selected - frame from frame of selected window. - (ediff-frame-has-dedicated-windows): Don't select any frames to avoid - changing selected windows. - (ediff-setup-control-frame): Make sure auto-rase is properly set for - the control frame. - -2002-10-10 Simon Josefsson - - * browse-url.el (browse-url-mozilla): Doc fix. - -2002-10-10 Steve Youngs - - * browse-url.el (browse-url-mozilla-new-window-is-tab): New. - (browse-url-mozilla): Use it. - -2002-10-11 Miles Bader - - * vc-cvs.el (vc-cvs-parse-entry): Don't barf when an `Entries' - files contains an invalid timestamp. - -2002-10-11 Simon Josefsson - - * mail/sendmail.el (mail-envelope-from): New option `header' to - use RFC 2822 From: header as the envelope address. - (mail-envelope-from): New function, this should be used instead of - looking at the `mail-envelope-from' variable. - (sendmail-send-it): Use it. - - * mail/smtpmail.el (smtpmail-via-smtp): Use it. - -2002-10-11 Andre Spiegel - - * dired.el (dired-insert-directory): Fix check for indentation - from ls --dired. - - * vc.el (vc-dired-reformat-line): As a temporary fix, remove all text - properties from the reformatted line. - -2002-10-10 Stefan Monnier - - * textmodes/paragraphs.el (forward-paragraph): Keep track of - remaining paragraphs to skip more carefully. - - * add-log.el (add-change-log-entry): Don't call find-file at all - if we're already in the proper buffer. - (change-log-resolve-conflict): New fun. - (change-log-mode): Use it and use define-derived-mode. - (change-log-merge): Allow other-log to be a buffer. - Don't add a \n if there are already enough \n's. - - * finder-inf.el, subdirs.el, cus-load.el: Remove. - - * finder.el ("finder-inf"): Don't fail if the file is absent. - - * cus-dep.el (custom-make-dependencies): Don't use find-file. - Use feature names rather than file names if applicable. - - * cus-edit.el (customize-mode): New command. - - * custom.el (custom-group-of-mode): New fun. - (custom-load-symbol): Don't use preloaded-file-list now that - load-history is always complete. Don't look up the expanded file - name in load-history (looked like an XEmacsism). - - * smerge-mode.el (smerge-ediff): Autoload. - (smerge-match-conflict): Don't assume as much about smerge-begin-re. - (smerge-resolve-function): New var. - (smerge-resolve): New command. - (smerge-basic-map): Bind it. - -2002-10-10 Andre Spiegel - - * vc-cvs.el (vc-cvs-parse-entry): Parse the time stamp found in - CVS/Entries, rather than comparing it textually. - -2002-10-10 Markus Rost - - * international/encoded-kb.el: Add `provide' call. - -2002-10-09 David Kastrup - - * calc/calc-alg.el (calcFunc-ln): In symbolic manipulations, - ln(-1) should be i*pi, not pi. - -2002-10-09 Markus Rost - - * vc-cvs.el (vc-cvs-registered): In the autoload version use load - instead of require to avoid loops when loaddefs.el is loaded after - vc-cvs.el. - - * cus-edit.el (Custom-reset-current): Don't test for default-boundp. - (Custom-reset-saved): Don't test for saved-value. - -2002-10-08 Stefan Monnier - - * vc.el (vc-find-version): Use the new backend op `find-version'. - (vc-default-find-version): Provide the new backend op `find-version' - in terms of the old `checkout' op. - - * vc-rcs.el (vc-rcs-find-version): New fun. - (vc-rcs-checkout): Remove `workfile' arg and simplify. - - * vc-sccs.el (vc-sccs-find-version): New fun. - (vc-sccs-checkout): Remove `workfile' arg and simplify. - - * vc-cvs.el (vc-cvs-find-version): New fun. - -2002-10-08 John Paul Wallington - - * info.el (Info-next-menu-item, Info-last-menu-item) - (info-emacs-manual): Add docstrings. - (Info-index): Use `string-to-number' instead of `string-to-int'. - -2002-10-08 Kenichi Handa - - * international/ucs-tables.el (ucs-translation-table-for-decode): - Define it as a translation-table. - -2002-10-07 Richard M. Stallman - - * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix. - - * progmodes/compile.el (grep-compute-defaults): Set the standard-value - properties of the variables being initialized. - - * thingatpt.el (thing-at-point-url-path-regexp): Doc fix. - -2002-10-07 Kim F. Storm - - * emulation/cua-base.el (cua-normal-cursor-color): - Fixed initialization to make "Erase Customization" work. - -2002-10-07 Stefan Monnier - - * vc.el (vc-maybe-resolve-conflicts): Always call vc-resolve-conflicts - in case some other package redefined it. - (vc-resolve-conflicts): Make it into an alias for smerge-ediff. - - * textmodes/fill.el (fill-paragraph): Go to BOL before calling - forward-paragraph to make sure its return value is meaningful. - -2002-10-06 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.25 released. - (tramp-handle-file-truename): If it's a directory, - append slash only if result doesn't end in a slash already. - (tramp-handle-file-truename): Restructure logic. If list of steps - is nil, return "/" as the real name. - (tramp-completion-mode): Add "\\(" and "\\)". Otherwise, - `match-string' doesn't make sense. From Michael Albinus. - (tramp-host-with-port-regexp): New defcustom. Equal to previous - `tramp-host-regexp'. From Michael Albinus. - (tramp-host-regexp): Taken off hashes in host names. Otherwise, - scanning files like .rhosts would take comments as host names. - From Michael Albinus. - (tramp-file-name-structure, tramp-multi-file-name-hop-structure): - Replace `tramp-host-regexp' by `tramp-host-with-port-regexp'. - From Michael Albinus. - (tramp-action-terminal): New function. - (tramp-terminal-prompt-regexp): New variable, matches "tset" prompts. - (tramp-actions-before-shell): Use them. - (tramp-handle-shell-command): Logic error. From Ivan - Zakharyaschev . - -2002-10-06 Markus Holmberg (tiny change) - - * thingatpt.el (thing-at-point-uri-schemes): New variable. - (thing-at-point-url-regexp): Use it. - -2002-10-06 Glenn Morris - - * progmodes/fortran.el (fortran-beginning-do): Ignore labelled DO - loops. - -2002-10-05 Stefan Monnier - - * vc.el (vc-log-mode-map): Explicitly inherit from text-mode. - (vc-maybe-resolve-conflicts): Don't check smerge-mode and smerge-ediff. - (vc-print-log): Don't check log-view-mode. - (vc-default-show-log-entry): Don't check log-view-goto-rev. - (vc-log-mode): Remove. - (vc-log-edit): Don't check log-edit. - -2002-10-04 Stefan Monnier - - * vc-cvs.el (vc-cvs-show-log-entry): - * vc-rcs.el (vc-rcs-show-log-entry): Delete. - - * smerge-mode.el (smerge-ediff): Add name-{mine,other,base} args. - -2002-10-04 Markus Rost - - * vc.el (vc-default-show-log-entry): Fix typo. - -2002-10-04 Steven Tamm - - * term/mac-win.el: Add lines to handle the new [return] event. - -2002-10-03 Stefan Monnier - - * textmodes/fill.el (fill-paragraph): Give up if there's no - paragraph at or after point. - - * textmodes/paragraphs.el (forward-paragraph): Return the steps left. - - * vc.el (vc-print-log): Unconditionally use `show-log-entry'. - (vc-default-show-log-entry): New fun. - - * subr.el (read-key-auxiliary-map, read-key): Remove. - (read-quoted-char): Undo the `read-key' change of 2002-06-23. - -2002-10-03 Markus Rost - - * progmodes/ada-stmt.el (ada-stmt-add-to-ada-menu): Handle the - menu pseudo-keys generated by easymenu which are lowercase in - Emacs 21.4. - - * progmodes/ada-xref.el - (ada-xref-update-project-menu,ada-add-ada-menu): Ditto. - -2002-10-03 John Paul Wallington - - * frame.el (delete-frame-hook): Variable alias for - `delete-frame-functions'. Mark obsolete. - -2002-10-02 Stefan Monnier - - * textmodes/outline.el (outline-1, outline-2, outline-3, outline-4) - (outline-5, outline-6, outline-7, outline-8): New faces. - (outline-font-lock-faces, outline-font-lock-levels): New vars. - (outline-font-lock-face): New fun. - (outline-font-lock-keywords): Use it. - (outline-font-lock-level): Remove. - (outline-mode, outline-next-preface, outline-next-heading) - (outline-previous-heading, outline-next-visible-heading): - Use shy group. - (outline-level) : Update calling convention. - (outline-level) : Take advantage of it. - (outline-demote): Don't assume the match-data is still uptodate. - (outline-up-heading): Simplify and make sure the match data is - properly set at the end. - -2002-10-02 Markus Rost - - * progmodes/sh-script.el (sh-alias-alist): Use append instead of - nconc. - - * startup.el (normal-top-level): Reset standard-value property of - `user-full-name' here. - -2002-10-02 Per Abrahamsen - - * wid-edit.el (widget-default-get): Change to return external - value. - (widget-choice-action): Update caller. - (widget-editable-list-entry-create): Update caller. - - * wid-edit.el (widget-types-copy): New function. - (default): Added :copy keyword. - (menu-choice): Ditto. - (checklist): Ditto. - (radio-button-choice): Ditto. - (editable-list): Ditto. - (group): Ditto. - (widget-copy): New function. - (widget-create-child): Use it. - (widget-create-child-value): Use it. - -2002-10-01 Bill Wohler - - * mail/mh-comp.el, mail/mh-e.el, mail/mh-funcs.el, - mail/mh-mime.el, mail/mh-pick.el, mail/mh-seq.el, - mail/mh-utils.el, mail/mh-xemacs-compat.el, mail/reply2.pbm, - mail/reply2.xpm, toolbar/execute.pbm, toolbar/execute.xpm, - toolbar/page-down.pbm, toolbar/page-down.xpm, toolbar/refile.pbm, - toolbar/refile.xpm, toolbar/repack.pbm, toolbar/repack.xpm, - toolbar/rescan.pbm, toolbar/rescan.xpm, toolbar/show.pbm, - toolbar/show.xpm, toolbar/widen.pbm, toolbar/widen.xpm: - Upgraded to mh-e version 6.1.1. Full ChangeLog available in - http://prdownloads.sourceforge.net/mh-e/mh-e-6.1.tgz?download . - There were no user-visible changes in 6.1.1 from 6.1--only the - section of the Makefile that installs the files into Emacs was changed. - -2002-10-01 Stefan Monnier - - * pcvs.el (cvs-mode-find-file): Look up font-lock-face so it also - works when font-lock is turned off. - - * jit-lock.el (jit-lock-fontify-now): Don't widen. - Let the jit-lock-functions do it if they want to. - -2002-10-01 Juanma Barranquero - - * eshell/esh-module.el (eshell-load-defgroups): - Add "no-byte-compile: t" to subdirs.el. - - * makefile.w32-in (update-subdirs-CMD): Likewise. - - * forms-d2.el: - * forms-pass.el: - * generic-x.el: - * patcomp.el: - * paths.el: - * version.el: - * international/mule-conf.el: - * language/czech.el: - * language/devanagari.el: - * language/english.el: - * language/georgian.el: - * language/greek.el: - * language/hebrew.el: - * language/japanese.el: - * language/korean.el: - * language/lao.el: - * language/misc-lang.el: - * language/romanian.el: - * language/slovak.el: - * language/thai.el: - * language/utf-8-lang.el: - * emacs-lisp/cl-specs.el: - * eshell/esh-maint.el: - * mail/blessmail.el: - * play/bruce.el: - * term/apollo.el: - * term/AT386.el: - * term/bobcat.el: - * term/internal.el: - * term/iris-ansi.el: - * term/keyswap.el: - * term/linux.el: - * term/lk201.el: - * term/news.el: - * term/vt102.el: - * term/vt125.el: - * term/vt200.el: - * term/vt201.el: - * term/vt220.el: - * term/vt240.el: - * term/vt300.el: - * term/vt320.el: - * term/vt400.el: - * term/vt420.el: - * term/wyse50.el: Add "no-byte-compile: t" in first line. - -2002-10-01 Kenichi Handa - - * international/utf-16.el: Don't provide utf-16. - - * international/utf-8.el (ccl-decode-mule-utf-8): - Remove unnecessary line. - -2002-09-30 Kenichi Handa - - * language/thai.el (thai-tis620): Add `mime-charset' property. - - * language/indian.el: Don't register "ISO10646.*-1" in - font-ccl-encoder-alist. - - * language/cyrillic.el (ccl-decode-koi8): Refer to - ucs-translation-table-for-decode. - (ccl-decode-koi8-u): Likewise. - (ccl-decode-alternativnyj): Likewise. - (cyrillic-koi8): Put `dependency' property. - (koi8-u): Likewise. - (cyrillic-alternativnyj): Likewise. - - * international/utf-8.el (ucs-mule-to-mule-unicode): Don't define - this translation-table name here. - (utf-translation-table-for-encode): New translation-table name. - (utf-fragmentation-table): Renamed from utf-8-fragmentation-table. - (utf-defragmentation-table): New variable. - (ucs-mule-cjk-to-unicode): Renamed from utf-8-subst-rev-table. - (utf-subst-table-for-encode): New translation-table name. - (ucs-unicode-to-mule-cjk): Renamed from utf-8-subst-table. - (utf-subst-table-for-decode): New translation-table name. - (utf-fragment-on-decoding): Renamed from - utf-8-fragment-on-decoding. Correctly handle the case that - unify-8859-on-encoding-mode is off. Handle mule-utf-16-le and - mule-utf-16-be too. - (utf-translate-cjk): Renamed from utf-8-translate-cjk. - Handle mule-utf-16-le and mule-utf-16-be too. - (ccl-decode-mule-utf-8): Refer to utf-translation-table-for-decode - and utf-subst-table-for-decode. - (ccl-encode-mule-utf-8): Refer to utf-translation-table-for-encode - and utf-subst-table-for-encode. - (mule-utf-8): Fix `safe-charsets' property, put `dependency' property. - - * international/utf-8-subst.el: Setup ucs-unicode-to-mule-cjk and - ucs-mule-cjk-to-unicode, not utf-8-subst-table and - utf-8-subst-rev-table. - - * international/utf-16.el (utf-16-decode-ucs): Look up - utf-subst-table-for-decode. Fix for the case that the looking up - succeeds. - (ccl-decode-mule-utf-16-le): Translate characters by - utf-translation-table-for-decode. - (ccl-decode-mule-utf-16-be): Likewise. - (ccl-encode-mule-utf-16-le): Look up utf-subst-table-for-encode - at first. Translate characters by utf-translation-table-for-encode. - (ccl-encode-mule-utf-16-be): Likewise. - (mule-utf-16-le, mule-utf-16-be): Add `dependency' property. - - * loadup.el: Preload international/utf-16. Don't call ucs-unify-8859. - - * international/ucs-tables.el: Don't bind - utf-8-translation-table-for-decode while setting up - ucs-mule-8859-to-ucs-table, etc. Add `depenency' property to - iso-8859-* coding systems. - (ucs-unify-8859): Arguments changed to FOR-ENCODE and FOR-DECODE. - If FOR-DECODE is non-nil, make ucs-mule-8859-to-mule-unicode - populate the translation table named - ucs-translation-table-for-decode. If FOR-ENCODE is non-nil, make - ucs-mule-to-mule-unicode populates the translation table named - utf-translation-table-for-encode. Call register-char-codings for - mule-utf-16-be and mule-utf-16-le too. - (ucs-fragment-8859): Arguments changed to FOR-ENCODE and - FOR-DECODE. If FOR-DECODE is non-nil, make the translation table - named ucs-translation-table-for-decode vacant. If FOR-ENCODE is - non-nil, make a proper char-table populates the translation table - name utf-translation-table-for-encode. Call register-char-codings - for all mule-utf-* to to reset their status to the origianl. - (unify-8859-on-encoding-mode): Call ucs-unify-8859 and - ucs-fragment-8859 with fixed arguments. Set the version to 21.3. - (unify-8859-on-decoding-mode): Likewise. Remove dependency. - (ccl-encode-unicode-font): Delete. - (ucs-tables-unload-hook): Delete. - - * international/mule.el (decode-char): Refer to the translation - hash table named utf-subst-table-for-decode. Refer to the - translation table named utf-translation-table-for-decode instead - of utf-8-translation-table-for-decode. - (encode-char): Refer to the translation hash table named - utf-subst-table-for-encode. Refer to the translation table named - utf-translation-table-for-encode instead of - utf-8-translation-table-for-encode. - - * international/mule-diag.el (describe-coding-system): - Describe `dependency' property. - - * international/mule-conf.el (emacs-mule): Add property `composition'. - - * international/fontset.el (ucs-mule-to-mule-unicode): Define this - translation table name here. - (ucs-mule-cjk-to-unicode): New translation table name. - (ccl-encode-unicode-font): Merge the code in ucs-tables.el. - (font-ccl-encoder-alist): Change the font registry pattern to - "ISO10646.*-*". - -2002-09-30 Colin Walters - - * calc/calc-stuff.el (calc-flush-caches): Add optional arg - `inhibit-msg'. - - * calc/calc-prog.el (calc-kbd-report, calc-kbd-query): Don't bind - `executing-kbd-macro' and `defining-kbd-macro'. - - * calc/calc-ext.el (calc-reset): Don't bind `executing-kbd-macro'. - Call `calc-flush-caches' with inhibit-msg arg. - (calc-change-mode): Remove extra arg for `calc-save-modes'. - - * calc/calc-mode.el (calc-save-modes): Remove `quiet' arg. - Don't bind `executing-kbd-macro'. - -2002-09-29 Noah Friedman - - * subr.el (read-key): Use read-key-auxiliary-map, not read-key-aux-map. - -2002-09-29 Richard M. Stallman - - * startup.el (user-mail-address): Initialize to a useful value - once Emacs is started up; initialize to "" at loadup time. - (command-line): "", not nil, means user-mail-address not set yet. - -2002-09-29 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.24 released. - (tramp-methods, tramp-completion-function-alist): - Rename "*-old" methods to "*_old". From Michael Albinus. - (tramp-completion-function-alist): - Use `tramp-completion-function-alist-ssh' for the "fcp" method. - From Michael Albinus. - (tramp-default-method-alist): Use "su" for "root@localhost". - (tramp-host-regexp): Allow "#" for "host#port" kludge. - (tramp-ange-ftp-file-name-p): If METHOD is nil, find the right - default method. Require additional args USER and HOST for this. - Callers changed. - (tramp-handle-file-local-copy): More local bindings. Bind results - of tramp-get-{remote,local}-{de,en}coding earlier to avoid nasty - "are you awake" problem. - (tramp-action-password): Protect against clobbered match data. - (tramp-open-connection-setup-interactive-shell): Explicitly set - tramp-last-cmd-time before invoking tramp-send-command the first - time. Otherwise, tramp-send-command would issue "echo are you - awake" right at the first time, which is not what we want. - Reported by Douglas Gray Stephens. - (tramp-find-inline-encoding): Don't redirect stdout to - /dev/null to avoid "chmode go-rwx" operation from "mimencode - >/dev/null" as root(!), and to check the output of the decoding - command. - (tramp-maybe-open-connection): Don't send "are you awake" if - process has died. - -2002-09-29 Colin Walters - - * calc/calc.el (calc-dispatch-map): Actually set to keymap. - -2002-09-29 Mike Williams - - * textmodes/sgml-mode.el (sgml-guess-indent): Handle tabs correctly. - -2002-09-29 Richard M. Stallman - - * custom.el (defcustom): Doc fix. - -2002-09-28 Richard M. Stallman - - * loadhist.el (unload-feature): When undefining a variable, - delete its buffer-local bindings. - -2002-09-28 Luc Teirlinck - - * subr.el (remove-yank-excluded-properties): Fix bugs in - handling of category properties. - -2002-09-28 Vinicius Jose Latorre - - * ps-print.el (ps-print-emacs-type): Error if ps-print is - activated in Epoch, inLucid or in Emacs v19 or lesser. - Value can no longer be `lucid'. - (ps-print-version): New version number (6.5.8). - (faces): Never do (require 'faces). - -2002-09-28 Simon Josefsson - - * mail/smtpmail.el (smtpmail-via-smtp): Only negotiate starttls on - streams that were opened using starttls. - -2002-09-28 Paul Reilly - - * files.el (auto-mode-alist): Add support for Java Enterprise - ARchive (ear/EAR) and Web ARchive (war/WAR) files. - -2002-09-28 John Paul Wallington - - * progmodes/m4-mode.el (m4-font-lock-keywords) - (m4-mode-syntax-table, m4-mode-abbrev-table, m4-m4-buffer) - (m4-m4-region): Doc fixes. - -2002-09-27 Stefan Monnier - - * emacs-lisp/cl-macs.el: Use the new usage-in-docstring syntax. - (cl-push, cl-pop): Remove. - Use pop and push throughout the file instead. - (cl-transform-lambda): Add usage info to docstring if the arglist - is complex. - - * emacs-lisp/autoload.el (make-autoload): Add usage info to docstring. - (autoload-print-form): Also quote open-[-in-column 0. - - * help-fns.el (help-with-tutorial): Use minibuffer-completion-help. - (help-split-fundoc): Don't support old syntax any more. - (help-add-fundoc-usage): New fun. - - * emacs-lisp/cl-extra.el (cl-push, cl-pop): Remove. - Use pop and push throughout the file instead. - (cl-hash-lookup): Remove. - (cl-make-hash-table, cl-hash-table-p, cl-gethash, cl-puthash) - (cl-remhash, cl-clrhash, cl-maphash, cl-hash-table-count): Simplify. - - * emacs-lisp/cl-seq.el (cl-push, cl-pop): Remove. - Use pop and push throughout the file instead. - - * emacs-lisp/edebug.el: Don't precompute menu shortcuts during - loading since the current keymaps might be all weird. - - * emacs-lisp/easy-mmode.el (define-minor-mode): Don't add properties - to the name since they're added by mode-line-format already. - (define-minor-mode): Run (,mode -1) when needed. - - * tar-mode.el (tar-untar-buffer): Handle dir-entries. - (tar-summarize-buffer, tar-mode, tar-extract, tar-copy, tar-expunge) - (tar-alter-one-field, tar-subfile-save-buffer, tar-mode-write-file): - Don't hardcode 1 == point-min. - - * abbrev.el (write-abbrev-file): Don't hardcode point-min == 1. - - * subr.el (read-key-auxiliary-map): New var. - (read-key): Use it. - (make-temp-file): Make the file have mode 600. - (add-minor-mode): Don't add properties to the name since it's - added by mode-line-format already. - Be more careful with the mode-line-menu entry name. - - * userlock.el (ask-user-about-supersession-threat): Don't abort - when the user hits mouse-2. - - * register.el (set-register): Use push. - (point-to-register): Set kill-buffer-hook in this buffer. - (register-swap-out): Use dolist. - (kill-buffer-hook): Don't change globally. - - * server.el (server-select-display): New function. - (server-process-filter): Add support for `-display' and `-eval' args. - (server-visit-files): Use save-current-buffer, push, and dolist. - Add server-kill-buffer to kill-buffer-hook. - (kill-buffer-hook): Don't modify globally. - (server-switch-buffer): Be a bit more careful with multiple displays. - (server-socket-name): Always use /tmp and non-qualified hostname. - - * uniquify.el (uniquify-rationalize-file-buffer-names): - Add to kill-buffer-hook for buffers with conflict. - (rename-buffer): Check kill-buffer-hook to see if there was a conflict. - (uniquify-delay-rationalize-file-buffer-names): Remove useless check. - (kill-buffer-hook): Don't change globally. - -2002-09-27 Stefan Monnier . - - * calc/calc.el (calc-bug-address, calc-scan-for-dels, calc-stack) - (calc-stack-top, calc-always-load-extensions) - (calc-line-numbering, calc-line-breaking, calc-display-just) - (calc-display-origin, calc-number-radix, calc-leading-zeros) - (calc-group-digits, calc-group-char, calc-point-char) - (calc-frac-format, calc-prefer-frac, calc-hms-format) - (calc-date-format, calc-float-format, calc-complex-format) - (calc-full-float-format, calc-complex-mode, calc-infinite-mode) - (calc-display-strings, calc-matrix-just, calc-break-vectors) - (calc-full-vectors, calc-full-trail-vectors, calc-vector-commas) - (calc-vector-brackets, calc-matrix-brackets, calc-language) - (calc-language-option, calc-function-open, calc-function-open) - (calc-function-close, calc-language-output-filter) - (calc-language-input-filter, calc-radix-formatter) - (calc-left-label, calc-right-label, calc-word-size) - (calc-previous-modulo, calc-simplify-mode, calc-auto-recompute) - (calc-display-raw, calc-internal-prec, calc-inverse-flag) - (calc-hyperbolic-flag, calc-keep-args-flag, calc-angle-mode) - (calc-algebraic-mode, calc-incomplete-algebraic-mode) - (calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix) - (calc-window-height, calc-display-trail, calc-show-selections) - (calc-use-selections, calc-assoc-selections) - (calc-display-working-message, calc-auto-why, calc-timing) - (calc-display-sci-high, calc-display-sci-low, calc-other-modes) - (calc-other-modes, calc-Y-help-msgs, calc-loaded-settings-file): - Make into real defvars. - (calc-mode-var-list): Delete. - (calc-mode-save-mode, calc-standard-date-formats) - (calc-autorange-units, calc-was-keypad-mode, calc-full-mode) - (calc-user-parse-tables, calc-gnuplot-default-device) - (calc-gnuplot-default-output, calc-gnuplot-print-device) - (calc-gnuplot-print-output, calc-gnuplot-geometry) - (calc-graph-default-resolution, calc-graph-default-resolution-3d) - (calc-invocation-macro, calc-show-banner): Make into defvars, - taken from `calc-mode-var-list'. - (calc-emacs-type-epoch, calc-emacs-type-19) - (calc-emacs-type-lucid, calc-emacs-type-gnu19): Make into defvars. - (calc-version, calc-version-date, calc-trail-pointer) - (calc-trail-overlay, calc-undo-list, calc-redo-list) - (calc-main-buffer, calc-trail-buffer, calc-why, calc-next-why) - (calc-inverse-flag, calc-hyperbolic-flag, calc-keep-args-flag) - (calc-last-kill, calc-previous-alg-entry, calc-dollar-values) - (calc-dollar-used, calc-hashes-used, calc-quick-prev-results) - (calc-said-hello, calc-executing-macro, calc-any-selections) - (calc-help-phase, calc-full-help-flag, calc-refresh-count) - (calc-display-dirty, calc-prepared-composition) - (calc-selection-cache-default-entry, calc-embedded-info) - (calc-embedded-active, calc-standalone-flag, var-EvalRules) - (math-eval-rules-cache-tag, math-radix-explicit-format) - (math-expr-function-mapping, math-expr-variable-mapping) - (math-read-expr-quotes, math-working-step, math-working-step-2) - (var-i, var-pi, var-e, var-phi, var-gamma, var-Modes): Make into - defvars, from toplevel setq. - (calc-mode-map): Set up keymap in more modern fashion. - (calc-dispatch-map): Ditto. - (calc-command-flags, calc-final-point-line) - (calc-final-point-column): Defvar. - (calc-do): Use `save-current-buffer' instead of `save-excursion'. - (sel-mode): Defvar. - (calc-any-evaltos): Ditto. - (calc-buffer, calc-prev-char, calc-prev-prev-char) - (calc-digit-value): Ditto. - (math-eval-rules-cache, math-eval-rules-cache-other): Ditto. - (math-sub-bignum): Bind `diff'. - (calc-selection-cache-entry): Defvar. - (calc-count-lines): Reference `pos' instead of `newpos'. - -2002-09-27 Simon Josefsson - - * mail/mail-hist.el (mail-hist-next-input): Fix docstring. - -2002-09-26 Richard M. Stallman - - * mail/unrmail.el (unrmail): Do the work directly, - without actually selecting the messages in the from file. - (unrmail-unprune): New subroutine. - - * files.el (backup-buffer): Bind local var MODES. - Don't use renaming for a suid or sgid file. - Use backup-buffer-copy to do copying. - (backup-buffer-copy): New subroutine. - Clear suid and sgid bits for the copy. - -2002-09-26 Edward M. Reingold - - * calendar/solar.el (solar-equinoxes-solstices): - Use time properly adjusted for DST in the result. - -2002-09-26 Richard M. Stallman - - * follow.el (follow-generic-filter): Simply bind deactivate-mark. - Bind inhibit-read-only; don't mess with buffer-read-only. - - * speedbar.el (speedbar-refresh): Simply bind deactivate-mark. - -2002-09-26 Luc Teirlinck - - * ielm.el (inferior-emacs-lisp-mode): Treat the header as - output, if comint-use-prompt-regexp-instead-of-fields is nil. - -2002-09-26 John Paul Wallington - - * ibuffer.el (ibuffer-update): Call `minibufferp' with argument - instead of within `with-current-buffer'. - -2002-09-26 Stephen Eglen - - * iswitchb.el (iswitchb-completions): Test that - iswitchb-common-match-string is a string, before printing common - completions. - -2002-09-25 Stefan Monnier - - * server.el: Use built-in network primitives. - (server-program, server-previous-string): Remove. - (server-previous-strings): New var. - (server-socket-name): New var. - (server-log): Minor change to the output format. - (server-sentinel): Clean up global state when a client disconnects. - (server-unquote-arg): New fun. - (server-start): Use server-socket-name and make-network-process. - (server-process-filter): Now talks to the clients directly. - Normalize file name after unquoting and decoding. - (server-buffer-done): Just close the connection. - (server-switch-buffer): Handle the case where all windows are - dedicated or minibuffers. - - * font-lock.el (fast-lock-mode, lazy-lock-mode, jit-lock-mode): - Don't bind them variables. - (font-lock-turn-off-thing-lock, font-lock-after-fontify-buffer) - (font-lock-after-unfontify-buffer): Check that the vars are bound. - (font-lock-dont-widen): New var. - (font-lock-default-fontify-region): Use it. - - * emacs-lisp/find-func.el (find-library-name): - Correctly find "file.el.gz" from "file.elc" or "file.elc.gz". - -2002-09-25 Kenichi Handa - - * international/mule-cmds.el (select-safe-coding-system): - Handle safe but rejected default coding systems and unsafe default - coding systems differently. - - * international/mule-diag.el (list-character-sets): Use the buffer - name "*Character Set List*", not "*Help*". List also indirectly - supported character sets. - (list-charset-chars): Use the buffer name "*Character List*", not - "*Help*". Display the current charset name in the modeline. - (non-iso-charset-alist): Add mapped charset list for `mac-roman'. - (sort-listed-character-sets): Don't alter the region showing - indirectly supported charsets. - -2002-09-24 Simon Josefsson - - * mail/mail-extr.el (mail-extr-ignore-single-names): Change default. - (mail-extract-address-components): Doc fix. - -2002-09-24 Markus Rost - - * simple.el (edit-and-eval-command): Protect command-history. - (repeat-complex-command): Protect command-history. - -2002-09-24 Juanma Barranquero - - * replace.el (occur-find-match): New function. - (occur-next, occur-prev): Use it. - - * progmodes/sh-script.el (sh-mark-init): Don't set `occur-buffer'. - (sh-mark-line): Likewise. Use 'occur-target and 'occur-match - instead of 'occur and 'occur-point. - - * eshell/em-unix.el (eshell-occur-mode-mouse-goto) - (eshell-poor-mans-grep): Remove references to `occur-buffer'. - -2002-09-24 Stefan Monnier - - * descr-text.el (describe-text-category): Use *Help*. - Don't kill-buffer. - (describe-text-properties, describe-char): - Delay self-inspection test. Use *Help*. - Use syntax-after. Use `pos' rather than (point). - Distinguish the before/after part of a composition. - -2002-09-23 Kenichi Handa - - * international/quail.el (quail-completion): Be sure to scroll - quail-completion-buf. - -2002-09-23 Richard M. Stallman - - * ielm.el (*1): Fix previous change. - -2002-09-23 Juanma Barranquero - - * net/tramp.el (tramp-unified-filenames): Autoload it. - -2002-09-23 Michael Kifer - - * ediff-init.el (ediff-get-next-window): Bug fix. - -2002-09-22 Oliver Scholz - - * play/gamegrid.el (gamegrid-face): New variable to emulate a - buffer-local default face. - (gamegrid-xbm): New variable; XBM image as a replacement for - `gamegrid-xpm' on Emacsen compiled without XPM-support. - (gamegrid-colorize-glyph): Ported XEmacs-code for the generation - of images to Emacs. - (gamegrid-match-spec): Call `gamegrid-make-image-from-vector' to - convert XEmacs-type image descriptors. - (gamegrid-color-display-p): Remove (use `display-colors-p' instead.) - (gamegrid-make-image-from-vector): New function. Convert XEmacs' - image descriptors. - (gamegrid-display-type): Use Emacs' standard `display-.*-p' - functions to check for display capabilities. Fix the recognition - of image-support in Emacs 21 by this way. - (gamegrid-hide-cursor): Removed. - (gamegrid-setup-default-font): Ported the code from XEmacs to - Emacs: create a new face and assign the variable `gamegrid-face' - to it. Make sure that the face is not higher than the smallest - image used by the game. - (gamegrid-initialize-display): Use `(setq cursor-type nil)' - instead of `gamegrid-hide-cursor'. - (gamegrid-set-face): If `gamegrid-display-mode' is 'glyph, put an - image in the buffer, instead of applying a face. [This is because - Emacs display-tables are not as capable as the display-tables in - XEmacs. Maybe this function should be renamed to reflect the change?] - (gamegrid-init-buffer): If `gamegrid-display-mode' is 'glyph, put - the face held by `gamegrid-face' in an overlay over the whole - buffer to emulate a buffer-local default-face. - -2002-09-22 Markus Triska (iny change) - - * play/doctor.el (doctor-doc): Add 2 question words. - (doctor-getnoun): Parse and save the complete object phrase. - -2002-09-22 Richard M. Stallman - - * international/mule-cmds.el (select-safe-coding-system): Cope if - default-coding-system gives nil which was then used in `min'. - - * mail/sendmail.el (sendmail-send-it): If user's buffer - is unibyte, make tembuf unibyte. - -2002-09-22 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.22 released. - (tramp-parse-rhosts, tramp-parse-shosts) - (tramp-parse-hosts, tramp-parse-passwd): Apply `push' but - `add-to-list' for performance reasons. - (tramp-get-completion-user-host): Return `nil' in case both `user' - and 'host' are empty (not necessarily `nil'. - (tramp-parse-netrc, tramp-parse-netrc-group): New functions. - (tramp-user-regexp): " \t" are not user regexp characters. - (tramp-completion-handle-file-name-all-completions): - Remove Ange-FTP cmpletion. It has a bug not handling the "/ftp:" prefix - completely, and it returns local completions as well. - (tramp-completion-function-alist-ftp): New constant. - (tramp-completion-function-alist): Add completion function for "ftp". - From Michael Albinus . - -2002-09-22 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.21 released. - (tramp-handle-file-newer-than-file-p): If mtime of both files is - known, return a useful result. Better error message in case one - is a Tramp file and one isn't. - (tramp-handle-file-local-copy, tramp-handle-write-region) - (tramp-find-shell, tramp-open-connection-telnet) - (tramp-open-connection-rsh, tramp-open-connection-su) - (tramp-open-connection-setup-interactive-shell) - (tramp-post-connection, tramp-maybe-open-connection) - (tramp-method-out-of-band-p): Correct number of args for - `tramp-get-rsh-program' and similar functions. - -2002-09-22 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.20 released. - -2002-09-20 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-completion-function-alist): Escape open - paren in docstring. - (tramp-user-regexp, tramp-host-regexp): Allow empty strings. - (tramp-handle-insert-file-contents): Call tramp-message-for-buffer - instead of tramp-message. - (tramp-open-connection-rsh): Handle empty string as user name. - (tramp-open-connection-su): Handle empty string as host name. - Handle nil user name. - (tramp-handle-file-local-copy, tramp-handle-write-region) - (tramp-completion-handle-file-name-all-completions) - (tramp-open-connection-telnet, tramp-open-connection-rsh) - (tramp-open-connection-su, tramp-post-connection) - (tramp-maybe-open-connection, tramp-method-out-of-band-p) - (tramp-get-connection-function, tramp-get-remote-sh) - (tramp-get-rsh-program, tramp-get-rsh-args) - (tramp-get-rcp-program, tramp-get-rcp-args) - (tramp-get-rcp-keep-date-arg, tramp-get-su-program) - (tramp-get-su-args, tramp-get-telnet-program) - (tramp-get-telnet-args): Use `tramp-find-method', perhaps require - additional args USER, HOST. - (tramp-action-password, tramp-open-connection-telnet) - (tramp-open-connection-su, tramp-open-connection-multi) - (tramp-method-out-of-band-p): `tramp-method-out-of-band-p' now - takes USER and HOST arguments, to be able to use - `tramp-find-method'. Update callers. - (tramp-find-method): New function. - -2002-09-20 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-handle-insert-directory): Handle "--dired" - in SWITCHES (by removing it). - -2002-09-18 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-file-name-handler): Add `file-remote-p' property. - -2002-09-17 Kai Gro,A_(Bjohann - - * net/tramp.el (top-level): Maybe autoload uudecode-decode-region. - -2002-09-16 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-bug): Add tramp-methods. - -2002-09-16 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-methods): Update docstring: - tramp-encoding-command, tramp-decoding-command, - tramp-encoding-function and tramp-decoding-function are not - parameters anymore. - (tramp-uuencode-region): Autoload it. - -2002-09-13 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.19 released. - - * net/tramp-uu.el: New file, implements uuencode in Lisp. - - * net/tramp.el (tramp-coding-commands): - Use `tramp-uuencode-region' as local encoder for the uuencode based - entries. - -2002-09-13 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-handle-write-region): Wrong parens. - -2002-09-13 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.18 released. - - * net/tramp.el (tramp-perl-decode): Perl changes to accomodate - older versions of Perl. Now tested with 5.004. Suggestion from - Michael Albinus. - -2002-09-12 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-find-inline-encoding): - Call tramp-call-local-coding-command with nil for INPUT and OUTPUT. - (tramp-call-local-coding-command): OUTPUT equals nil means to - discard the output. INPUT equals nil means /dev/null. - -2002-09-12 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-encoding-shell): Default to environment - variable COMSPEC on Windows. - (tramp-handle-write-region): More debugging output. - (tramp-find-inline-encoding): Ditto. - -2002-09-11 Michael Albinus - - * net/tramp.el (tramp-completion-handle-file-name-all-completions): - Define `result1'. - (tramp-parse-hosts-group): Discard IPv6 entries. - -2002-09-11 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-post-connection): Only send Perl - mime-encode/decode implementations when using inline method. - (tramp-handle-file-local-copy) - (tramp-handle-write-region, tramp-post-connection) - (tramp-coding-commands, tramp-find-inline-encoding): For the - inline encodings, distinguish between local and remote commands, - instead of between commands and functions. (The local commands - can be functions, too.) If the local host is a Windows machine, - we can't expect the same commands to work there as on the remote host. - (tramp-call-local-coding-command): New function for calling local - encoding and decoding commands. - (tramp-set-remote-encoding, tramp-get-remote-encoding) - (tramp-set-remote-decoding, tramp-get-remote-decoding) - (tramp-set-local-encoding, tramp-get-local-encoding) - (tramp-set-local-decoding, tramp-get-local-decoding): New functions. - (tramp-get-encoding-command, tramp-set-encoding-command) - (tramp-get-decoding-command, tramp-set-decoding-command) - (tramp-get-encoding-function, tramp-set-encoding-function) - (tramp-get-decoding-function, tramp-set-decoding-function): - Old functions, removed. - -2002-09-10 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-open-connection-setup-interactive-shell): - Change command to invoke /bin/sh slightly to make it compatible - with the `rc' shell. Suggested by Daniel Pittman. - -2002-09-10 Michael Albinus - - * net/tramp.el (tramp-handle-write-region): Added missing - `)'. Hope it's the right place. - -2002-09-09 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-open-connection-setup-interactive-shell): - Do "exec env PS1='$ ' /bin/sh" instead of just "exec /bin/sh" in - order to get a sane shell prompt. If people have ${CWD}, say, in - their shell prompt, then the default login shell might display - something harmless, but the /bin/sh will display a dollar sign - which confused the subsequent prompt recognition. - (tramp-multi-action-password): More debugging output. - (tramp-encoding-shell): Renamed from tramp-sh-program. - More documentation. Default to cmd.exe on Windows NT. - (tramp-encoding-command-switch): New variable. Use instead of - hard-wired "-c" which is only good for /bin/sh. - (tramp-encoding-reads-stdin): New variable. If t, commands are - called like "/bin/sh -c COMMAND - - * net/tramp.el (tramp-methods): Remove `tramp-completion-function' - entries. They are handled now by `tramp-completion-function-alist'. - (tramp-completion-function): Defvar removed. I've never used - it. Hmm. - (tramp-get-completion-function) - (tramp-get-completion-rsh, tramp-get-completion-ssh) - (tramp-get-completion-telnet, tramp-get-completion-su): - Functions removed as well. Not necessary any longer due to extended - customization means. - (tramp-completion-function-alist): New defcustom. Holds all - FUNCTION FILE pairs used for user and host name completion - relevant for METHOD. - (tramp-completion-function-alist-rsh) - (tramp-completion-function-alist-ssh) - (tramp-completion-function-alist-telnet) - (tramp-completion-function-alist-su): Defconst for initializing - `tramp-completion-function-alist'. Unfortunately, mainly UNIX-like - values are known for me until now. Needs to be completed for at - least VMS++ like operating systems. - (tramp-set-completion-function) - (tramp-get-completion-function): New functions for configuration - of `tramp-completion-function-alist'. The old definition of - `tramp-get-completion-function' has been discarded. - (tramp-completion-handle-file-name-all-completions): - Change function call for user/host completion according to definition - in `tramp-completion-function-alist'. - (tramp-parse-passwd): Added exception handling for "root", because - `tramp-get-completion-su' (the previous place for this stuff) - doesn't exist any longer. - -2002-09-07 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-enter-password): - Use `tramp-password-end-of-line' to terminate the line. - (tramp-bug): Include new variable `tramp-password-end-of-line'. - (tramp-password-end-of-line): New variable. People who use plink - under Windows might have to issue "\r\n" after the password, but - they need to send just "\n" after the other commands. So this - variable was introduced to complement `tramp-rsh-end-of-line'. - (tramp-wait-for-output, tramp-post-connection): Allow "\r" at end - of line of the output delimiter. - -2002-09-06 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-handle-file-local-copy, tramp-find-shell) - (tramp-open-connection-setup-interactive-shell): Add some comments - about Douglas Grey Stephen's suggestions to make Tramp work better - with plink under Windows. I'm not sure what to think of them, but - now I have a guinea pig to try it out on. Said guinea pig is - having other problems, though... Also remove some commented-out code. - -2002-09-06 Michael Albinus - - * net/tramp.el (tramp-get-completion-methods): Algorithm slightly - tuned. - (tramp-get-completion-user-host): Accept user names as they are if - typed until "@". - (tramp-completion-mode): Replace `last-input-char' by modern - `last-input-event'. Check for `event-modifiers'. - -2002-09-06 Kai Gro,A_(Bjohann - - * net/tramp.el (file-expand-wildcards): Corrected check to see if - advising is necessary. - -2002-09-05 Michael Albinus - - * net/tramp.el (tramp-postfix-single-method-format) - (tramp-postfix-multi-method-format) - (tramp-postfix-multi-hop-format) - (tramp-postfix-user-format): New format strings. - (tramp-postfix-single-method-regexp) - (tramp-postfix-multi-method-regexp) - (tramp-postfix-multi-hop-regexp) - (tramp-postfix-user-regexp) - (tramp-make-multi-tramp-file-format) - (tramp-make-tramp-file-name): Apply them. - (tramp-completion-handle-file-name-all-completions): Fix for - invoking ange-ftp in case of "/ftp:xxx" file names. - -2002-09-04 Michael Albinus - - * net/tramp.el (tramp-prefix-format) - (tramp-postfix-host-format): New format strings. - (tramp-prefix-regexp, tramp-method-regexp) - (tramp-postfix-single-method-regexp) - (tramp-postfix-multi-method-regexp) - (tramp-postfix-multi-hop-regexp) - (tramp-user-regexp, tramp-postfix-user-regexp) - (tramp-host-regexp, tramp-postfix-host-regexp) - (tramp-path-regexp): New atomar regular expressions. - If corresponding format strings exist, derived from them. - (tramp-file-name-structure) - (tramp-multi-file-name-structure) - (tramp-multi-file-name-hop-structure) - (tramp-make-multi-tramp-file-format) - (tramp-completion-mode) - (tramp-completion-dissect-file-name) - (tramp-parse-rhosts-group) - (tramp-parse-shosts-group) - (tramp-parse-hosts-group) - (tramp-parse-passwd-group): Apply these expressions. - (tramp-file-name-structure-unified) - (tramp-file-name-structure-separate) - (tramp-make-tramp-file-format-unified) - (tramp-make-tramp-file-format-separate) - (tramp-make-tramp-file-format) - (tramp-make-tramp-file-user-nil-format-unified) - (tramp-make-tramp-file-user-nil-format-separate) - (tramp-make-tramp-file-user-nil-format) - (tramp-multi-file-name-structure-unified) - (tramp-multi-file-name-structure-separate) - (tramp-multi-file-name-hop-structure-unified) - (tramp-multi-file-name-hop-structure-separate) - (tramp-make-multi-tramp-file-format-unified) - (tramp-make-multi-tramp-file-format-separate): Removed. - (tramp-make-tramp-file-name): Allow partial tramp file - names. Generate tramp file format on-the-fly depending on - parameters. Apply atomar format strings resp expressions. - (tramp-get-completion-methods) - (tramp-get-completion-user-host): Apply `tramp-make-tramp-file-name'. - (tramp-parse-hosts-group): Take all host names and IP addresses - into account. - (tramp-bug): Remove `tramp-make-tramp-file-format'. - -2002-09-01 Michael Albinus - - * net/tramp.el (tramp-methods): Add `tramp-completion-function' - for "su" and "sudo". - (tramp-get-completion-telnet): Implement it. - (tramp-parse-hosts) - (tramp-parse-hosts-group) - (tramp-get-completion-su) - (tramp-parse-passwd) - (tramp-parse-passwd-group): New functions. - -2002-08-31 Michael Albinus - - * net/tramp.el (tramp-completion-mode): Check for `last-input-char'. - (tramp-completion-file-name-handler-alist): Add handler for - `file-exists-p. - (tramp-completion-handle-file-exists-p): New function. - (tramp-completion-handle-file-name-completion): Simplified. - (tramp-completion-dissect-file-name): Regexp's reorganised. - (tramp-completion-handle-file-name-all-completions): - Call completion-function only if `user' or `host' is given. - (tramp-get-completion-user-host): New function. - (tramp-get-completion-rsh) - (tramp-get-completion-ssh): Apply it. - -2002-08-29 Michael Albinus - - * net/tramp.el (tramp-completion-file-name-handler-alist): - Add handler for `expand-file-name'. - (tramp-completion-handle-expand-file-name): New function. - -2002-08-26 Michael Albinus - - * net/tramp.el (tramp-completion-mode): New function. - (tramp-completion-handle-file-name-directory) - (tramp-completion-handle-file-name-all-completions): Apply it. - (tramp-methods): Remove double definition of `ssh1-old' and `ssh2-old'. - (tramp-point-at-eol): New defalias. - (tramp-parse-rhosts-group) - (tramp-parse-shosts-group):: Apply it. - -2002-08-25 Michael Albinus - - * net/tramp.el (tramp-get-completion-methods) - (tramp-get-completion-rsh) - (tramp-get-completion-ssh): Add "[" for Xemacs. - (tramp-completion-file-name-regexp-separate): Expression adapted. - (tramp-completion-file-name-handler-alist): Add handler for - `file-name-directory' and `file-name-nondirectory'. - (tramp-completion-handle-file-name-directory) - (tramp-completion-handle-file-name-nondirectory) - (tramp-completion-run-real-handler): New functions. - (tramp-completion-file-name-handler) - (tramp-completion-handle-file-name-all-completions): - Apply `tramp-completion-run-real-handler'. - (tramp-parse-rhosts) - (tramp-parse-shosts): Use `with-temp-buffer'. `result$,1!=(B renamed to - `res' (otherwise side effects in XEmacs). - -2002-08-24 Michael Albinus - - * net/tramp.el (tramp-completion-file-name-regexp) - (tramp-completion-file-name-handler-alist) - (tramp-flatten-list) - (tramp-completion-dissect-file-name) - (tramp-get-completion-rsh) - (tramp-parse-rhosts) - (tramp-parse-rhosts-group) - (tramp-get-completion-ssh): Doc string tuned. - (tramp-methods): Doc string and custom type extended for - `tramp-completion-function'. - (tramp-completion-function): Variable added. Is it really used? - Other variables like `tramp-completion-function' aren't used. - (tramp-completion-file-name-handler-alist): Add handler for - `file-name-completion'. - (tramp-completion-handle-file-name-completion): New function. - -2002-08-18 Michael Albinus - - * net/tramp.el (tramp-parse-rhosts) - (tramp-parse-rhosts-group) - (tramp-parse-shosts) - (tramp-parse-shosts-group): New functions. - -2002-08-17 Michael Albinus - - * net/tramp.el (tramp-completion-dissect-file-name) - (tramp-completion-dissect-file-name1): New functions. - -2002-08-16 Michael Albinus - - * net/tramp.el (tramp-get-completion-function) - (tramp-get-completion-rsh) - (tramp-get-completion-ssh) - (tramp-get-completion-telnet): New functions. - (tramp-methods): Add `tramp-completion-function' for all methods. - -2002-08-15 Michael Albinus - - * net/tramp.el (tramp-get-completion-methods): New function. - (tramp-find-default-method): Allow host to be nil (like user). - -2002-08-14 Michael Albinus - - * net/tramp.el (tramp-completion-file-name-regexp-unified) - (tramp-completion-file-name-regexp-separate) - (tramp-completion-file-name-regexp) - (tramp-completion-file-name-handler-alist): New defcustoms. - (tramp-completion-file-name-handler): New function. - Add `tramp-completion-file-name-handler' to `file-name-handler-alist'. - (tramp-run-real-handler): Add `tramp-completion-file-name-handler' - to `inhibit-file-name-handlers'. - (tramp-completion-handle-file-name-all-completions) - (tramp-completion-handle-file-name-completion): New functions. - -2002-08-12 Michael Albinus - - * net/tramp.el (tramp-invoke-ange-ftp): `tramp-disable-ange-ftp' - must be called again after activating `ange-ftp'. - (tramp-ange-ftp-file-name-p): Check for Xemacs. - -2002-08-08 Michael Albinus - - * net/tramp.el (tramp-do-copy-or-rename-file): Don't pass - KEEP-DATE to tramp-invoke-ange-ftp 'rename. - (tramp-handle-write-region): Don't pass LOCKNAME and CONFIRM to - tramp-invoke-ange-ftp 'write-region. - (tramp-handle-set-file-modes): Change order of FILENAME and MODE - passing to tramp-invoke-ange-ftp 'set-file-modes. - (tramp-flatten-list): New function. Maybe this functionality does - exist already elsewhere in the libraries. - (tramp-invoke-ange-ftp): Apply `tramp-flatten-list' to parameter - list in order to avoid nested lists, f.e. when invoked from - `tramp-handle-dired-call-process'. - -2002-09-05 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-chunksize): New kluge variable. - (tramp-send-region): If tramp-chunksize is non-nil, send region in - parts and sleep 0.1 seconds between chunks. - -2002-09-03 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-handle-insert-directory): - Use `insert-buffer-substring' instead of `insert-buffer', which is not - supposed to be used from Lisp. Remember old point in a variable - instead of using `mark'. Suggestion from Stefan Monnier. - (tramp-unified-filenames): New variable. Use it in default value - of other filename variables. - (file-expand-wildcards): Don't advise unless "[" and "]" are used - in the filename format. - -2002-09-01 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-methods): Remove duplicate definition of - ssh1-old and ssh2-old. - -2002-09-22 Kai Gro,A_(Bjohann - - * dired.el (dired-insert-directory): Always add "--dired" to to - SWITCHES for remote files. - * files.el (insert-directory): Comment saying that "--dired" - might be in the SWITCHES. - * net/ange-ftp.el (ange-ftp-ls): Handle "--dired" in LSARGS. - (ange-ftp-insert-directory): Comment explaining "--dired" handling. - -2002-09-21 Markus Rost - - * mail/mailabbrev.el (mail-abbrev-make-syntax-table): Give %!._- - word constituent syntax. - -2002-09-21 Richard M. Stallman - - * cus-dep.el (custom-make-dependencies): Bind to t - around evaluating the def-form. - - * custom.el (custom-dont-initialize): New variable. - (custom-declare-variable): Don't init the variable - if custom-dont-initialize is non-nil. - -2002-09-21 John Paul Wallington - - * net/eudc.el (eudc-install-menu): Use `define-key' and - `easy-menu-create-menu' to avoid duplication of menu. - -2002-09-20 Kim F. Storm - - * kmacro.el (kmacro-step-edit-query): Use RET to execute rest of - macro and terminate editing. - (kmacro-step-edit-macro): Push previous macro onto ring if changed - by step editing. - -2002-09-19 Tom Tromey - - * play/blackbox.el (bb-right): Respect prefix argument. - (bb-left, bb-up, bb-down): Likewise. - -2002-09-19 Richard M. Stallman - - * cus-dep.el (custom-make-dependencies): Fix previous change. - -2002-09-19 Juanma Barranquero - - * ielm.el (ielm-eval-input): Call `error-message-string' instead - of the non-existent `ielm-format-error'. - -2002-09-19 Stefan Monnier - - * emacs-lisp/easymenu.el (easy-menu-remove): - * emacs-lisp/ewoc.el (ewoc--node-branch): Add docstring. - - * international/mule-diag.el (describe-coding-system): - Remove unused `coding-spec' variable. - (list-input-methods): Be more careful when setting up the help buffer. - - * international/ucs-tables.el (unify-8859-on-encoding-mode): - Set init value to t to reflect reality. - (ucs-minibuffer-setup): Use minibuffer-selected-window. - -2002-09-18 Stefan Monnier - - * progmodes/make-mode.el (makefile-cleanup-continuations-p): - Rename to makefile-cleanup-continuations. - (makefile-mode): Use write-file-functions. - (makefile-fill-paragraph): Use match-string-no-properties. - (makefile-fill-paragraph): Use line-end-position. - (makefile-add-log-defun): Simplify. - -2002-09-18 Richard M. Stallman - - * dired.el (dired-mark-pop-up): Doc fix. - - * ediff-hook.el (ediff-cond-compile-for-xemacs-or-emacs): Put the - definition straight into loaddefs.el as well as executing it here. - -2002-09-18 Colin Walters - - * calc/calc.el (calc-mode): Add font-lock-defontify to - change-major-mode-hook. - -2002-09-18 Richard M. Stallman - - * Makefile.in (bootstrap-clean): Use cd to shorten arg strings. - Don't ignore errors in rm line. - - * menu-bar.el (menu-bar-search-menu): Nicer help string. - - * replace.el (occur-engine-add-prefix): Use 7 spaces. - (occur-engine): Use 7 digits to align tabs in the data. - - * emacs-lisp/bytecomp.el (byte-compile-output-docform): - Don't make the definition dynamic if it shares structure - with the arg list. - - * gud.el (gud-pdb-marker-regexp): Allow : and \ in file name. - (pdb): In gud-remove, pass down the file name. - - * cus-dep.el (custom-make-dependencies): Sort MEMBERS before use. - -2002-09-18 Luc Teirlinck - - * ielm.el: (*1, *2, *3): New variables. - (ielm-eval-input): Make temporary buffers current on entry and - exit to the let bindings for *, ** and ***. - (inferior-emacs-lisp-mode): Mention *1, *2 and *3 in the docstring. - Do not overrule global bindings for *, ** and ***. - -2002-09-18 Tom Tromey - - * progmodes/make-mode.el (makefile-fill-paragraph): Find comment - boundaries before filling. - -2002-09-18 Stefan Monnier - - * server.el (server-done): Fix harmlessly wrong arg to save-buffer. - (server-switch-buffer): Only select a different window if - next-buffer is non-nil. Don't switch in a dedicated window. - If next-buffer is already displayed, reuse that window. - - * diff-mode.el (diff-mode): Use compilation-minor-mode. - Don't unbind compilation-last-buffer after autoloading compile.el. - Hide the compilation-minor-mode bindings altogether. - -2002-09-18 Kai Gro,A_(Bjohann - - * dired.el (dired-insert-directory): Never add "--dired" when - listing remote directories. - -2002-09-18 Michael Kifer - - * ediff-hooks.el: Put back the autoloads (for XEmacs compatibility). - - * ediff-init.el: Use defalias instead of fset. - - * ediff-util.el: Use defalias instead of fset. - - * viper-util.el (viper-chars-in-region): Simplification. - - * viper.el (viper-emacs-state-mode-list): Added modes. - -2002-09-18 Jonathan Yavner - - * emacs-lisp/testcover.el: New file. Uses edebug to instrument a - module of code, with graphical display of poor-coverage spots. - - * emacs-lisp/testcover-ses.el: New file. Demonstrates use of - testcover on a interactive module like ses. - - * emacs-lisp/testcover-unsafep.el: New file. Demonstrates use of - testcover on a noninteractive module like unsafep. - -2002-09-18 Miles Bader - - * diff-mode.el (diff-mode): Don't evaluate `compilation-last-buffer' - unless it's bound. - -2002-09-17 Stefan Monnier - - * server.el (server-log): Add `client' arg. - (server-start): Don't bother canceling the sentinel. - (server-process-filter): Use replace-regexp-in-string and - handle the new &n quoting. Use push. Use server-log's new arg. - Don't output the C-x # message if `nowait'. - (server-buffer-done): Use server-log's new arg. - -2002-09-16 Jonathan Yavner - - * ses.el: New file. - - * emacs-lisp/unsafep.el: New file. - - * files.el (auto-mode-alist): Add ".ses" for ses-mode. - (inhibit-quit): This is risky for unsafep, doesn't matter much for - anybody else. - (risky-local-variable-p): New function. Split off from - hack-one-local-variable so unsafep can use it. Add \|-history$ to - the list of disallowed local variable names (malicious user could - stuff a `display' property in there that would be activated when - na,Ao(Bve user called up the history). - -2002-09-16 Markus Rost - - * ls-lisp.el (ls-lisp-format-time-list): Fix type and provide :tag's. - -2002-09-16 Richard M. Stallman - - * play/gomoku.el (gomoku-move-up, gomoku-move-down): - Use forward-line and move-to-column. - - * cus-edit.el (custom-variable-backup-value): New function. - (custom-variable-reset-backup): New function. - (custom-variable-menu): Add item for custom-variable-reset-backup. - (custom-variable-set, custom-variable-reset-saved) - (custom-variable-reset-standard): Call custom-variable-backup-value. - -2002-09-16 Stefan Monnier - - * dired.el (dired-font-lock-keywords): Use regexp-opt. - (dired-move-to-filename): Better message when we fail to find the file. - (dired-sort-toggle): Minor optimization. - -2002-09-16 Juanma Barranquero - - * dired-aux.el (dired-add-entry): Add missing argument to - `dired-mark'. - -2002-09-16 John Paul Wallington - - * xscheme.el (scheme-interaction-mode): Doc fix. - - * net/eudc.el (eudc-plist-get): Doc fix. - -2002-09-16 Kim F. Storm - - * menu-bar.el (menu-bar-last-search-type): New var. - (nonincremental-repeat-search-forward) - (nonincremental-repeat-search-backward): Repeat string or - regexp search depending on menu-bar-last-search-type. - (nonincremental-search-forward, nonincremental-re-search-forward) - (nonincremental-search-backward, nonincremental-re-search-backward): - Set menu-bar-last-search-type to string or regexp. - (nonincremental-repeat-re-search-forward): Removed. - (nonincremental-repeat-re-search-backward): Removed. - (menu-bar-replace-menu): New keymap for "Edit->Replace" submenu. - (menu-bar-i-search-menu): New keymap for "Incremental Search" submenu. - (menu-bar-adv-search-menu): Removed. - (menu-bar-search-menu): Reorganized. - (menu-bar-edit-menu): Added "Replace" submenu. - -2002-09-15 Richard M. Stallman - - * scroll-bar.el (scroll-bar-mode): Specify :initialize. - - * menu-bar.el (menu-bar-make-mm-toggle): Don't put a quote befor FNAME - when it's not being evaluated. - -2002-09-15 Markus Rost - - * dired.el (dired-move-to-filename): Fix previous change. - -2002-09-14 Kim F. Storm - - * emulation/keypad.el (keypad-setup, keypad-shifted-setup) - (keypad-numlock-setup, keypad-numlock-shifted-setup): - Change `Remove Binding' option to `Unspecified/User-defined'. - (keypad-setup): Enhance explanation of setup type `none'. - -2002-09-14 Richard M. Stallman - - * time.el (display-time-mode): Set display-time-load-average here. - (display-time-load-average): Initialize to nil. - (display-time-default-load-average): Add "None" alternative. - (display-time-update): Handle "None" alternative for load-average. - - * dired-aux.el (dired-bunch-files): Put the arg FILES - back as it was after temporary destrucive mods. - (dired-add-entry): Use dired-insert-directory to handle indentation. - Explicitly restore the line's marker character. - Preserve the old file name's text properties. - (dired-add-entry-do-indentation): Function deleted. - (dired-relist-file): Doc fix. - (dired-rename-file): Change argument names. - (foo-rename-file): New function. - (dired-do-hardlink): Use dired-hardlink. - (dired-hardlink): New function. - (dired-insert-subdir-doinsert): Use dired-insert-directory; - that handles indentation, text props and header line. - dired-readin-insert gets no args. - Use `last' instead of `reverse'. - - * dired.el (dired-use-ls-dired): New variable. - (dired-directory): Document the rules better. - - * dired.el (dired-insert-headerline): Function deleted. - (dired-revert): Pass no args to dired-readin. - (dired-move-to-filename): First try using dired-filename property. - (dired-move-to-end-of-filename): Likewise. - (dired-why): Try to show the start of this page of warnings. - (dired-log): Insert the buffer name at start of page, not end. - (dired-log-summary): If just one failure, explain it in echo area. - - * dired.el (dired-internal-noselect): - Always set dired-directory, when buffer is not new. - Pass dir-or-list, not dirname, to dired-mode. - Call dired-readin with no args. - Don't call dired-after-readin-hook here. - (dired-find-buffer-nocreate): Expand dirname. - Expand the dir from dired-directory to compare with dirname. - - (dired-readin): Take no args. Get the directory from dired-directory. - Run dired-before-reading hook inside save-excursion. - Run dired-after-readin-hook here. - Don't make undo entries at all. - Call dired-readin-insert with no args. - Don't change indentation here. - Don't insert headerline here. - - (dired-readin-insert): Take no args. - Get dir and file-list from dired-directory. - Call dired-insert-directory the new way. - Don't insert "wildcard" info here. - - (dired-insert-directory): New arg FILE-LIST. - First arg now DIR, always just the directory. - This function fully handles setting up the buffer text: - update indentation, insert headerline and "wildcard" info. - Pass --dired arg if appropriate; put info in dired-filename props. - Don't expand file names here. - - * warnings.el (display-warning): In batch mode, - exclude the final newline from the arg to `message'. - -2002-09-13 Markus Rost - - * files.el (diff-buffer-with-file): Check whether associated file - exists. Display message for 1 second. Always return nil. - -2002-09-13 Stefan Monnier - - * diff-mode.el (diff-mode): Turn on compilation-minor-mode - support again, but more carefully this time. - - * progmodes/perl-mode.el (perl-mode-syntax-table): Mark $, % and @ - such that backward-sexp correctly skips them. - (perl-font-lock-keywords-2): Use regexp-opt. - (perl-font-lock-syntactic-keywords) - (perl-font-lock-syntactic-face-function): Better handle PODs. - Handle package names with ' in them and ($$) in `sub' declarations. - Handle format staements. Handle regexp and quote-like ops. - (perl-empty-syntax-table): New var. - (perl-quote-syntax-table): New fun. - - * pcvs.el (cvs-mode-find-file): Work even if point is at beg-of-line. - (cvs-do-removal): Bind inhibit-read-only while modifying the buffer. - - * newcomment.el (comment-with-narrowing): Use the `declare' thingy. - - * derived.el (define-derived-mode): Properly ignore unknown args. - - * emacs-lisp/easy-mmode.el (define-minor-mode): Add a :require arg. - Don't call the function during init if mode is on by default. - - * simple.el: Provide `simple'. - (transient-mark-mode, line-number-mode, column-number-mode): - Pass an explicit `:require nil' argument. - -2002-09-13 Francesco Potort,Al(B - - * play/tetris.el (tetris-blank-options, tetris-cell-options): - Remove various redundant `(t nil)'. - - * play/snake.el (snake-border-options): Use color on tty if available. - - * play/tetris.el (tetris-border-options): Likewise. - - * play/pong.el (pong-border-options): Likewise, plus reset - color on tty to be [0.5 0.5 0.5]. - -2002-09-13 Kim F. Storm - - * kmacro.el (kmacro-start-macro): Doc fix. - -2002-09-13 Juanma Barranquero - - * progmodes/idlw-shell.el (idlwave-shell-cleanup): Fix reference - to `idlwave-idlwave_routine_info-compiled'. - - * whitespace.el (whitespace-unload-hook): Call `remove-hook' with - three arguments, not four. - -2002-09-13 Kim F. Storm - - * kmacro.el (kmacro-keymap): Changed bindings: - C-x C-k s to kmacro-start-macro, C-x C-k b to kmacro-bind-to-key. - -2002-09-12 Richard M. Stallman - - * international/mule-cmds.el (universal-coding-system-argument): - Read the coding system inside `interactive' spec, for command-history. - -2002-09-12 Stefan Monnier - - * emacs-lisp/find-func.el (find-library-name): Don't forget - the empty suffix. Fix stale variable name. - - * gud.el (gud-gdb-massage-args, gud-sdb-massage-args) - (gud-pdb-massage-args): Delete. - (gdb, sdb, pdb): Don't pass gud-*-massage-args any more. - (gud-gdb-command-name): New var. Put "--fullname" in there. - (gud-query-cmdline): Use the most recent executable as the default. - Don't add "--fullname" (it's only valid/meaningful for GDB). - (gud-xdb-marker-filter): Use match-string. - (gud-perldb-massage-args): Don't add "-d". - (gud-perldb-command-name): Add "-d". - (gud-common-init): If `massage-args' is nil, don't call it. - (gud-format-command): Don't hardcode point-min==1. - - * derived.el: Require CL when compiling. - -2002-09-12 Simon Josefsson - - * mail/smtpmail.el (smtpmail-send-it): Don't use : in filenames - (for cygwin). Suggested by Andrew Senior . - Use expand-file-name. Also don't require time-stamp. - -2002-09-11 Richard M. Stallman - - * derived.el (define-derived-mode): When making new abbrev table, - don't try to copy the parent's abbrev table. - - * ruler-mode.el (ruler-mode-left-scroll-bar-cols): - Always round scroll-bar-width parameter up. - If it is nil, use 14. - - * abbrev.el (copy-abbrev-table): New function. - -2002-09-11 Vinicius Jose Latorre - - * ps-print.el: Adjust ps-print-color-p, ps-default-fg and - ps-default-bg setting. - (ps-print-version): New version number (6.5.7). - (ps-mark-active-p): New fun. - (ps-print-preprint-region): Adjust code. - -2002-09-11 Dave Love - - * international/mule.el (non-standard-designations-alist) - (ctext-pre-write-conversion): Don't generate invalid extended - segments for iso8859. - - * language/cyrillic.el ("Ukrainian"): Fix nonascii-translation. - (cyrillic-alternativnyj-decode-table): Fix some entries. - - * international/ucs-tables.el: Fix last change. - - * international/utf-8.el (utf-8-fragment-on-decoding): Fix last - change. - -2002-09-11 Kim F. Storm - - * edmacro.el (edit-kbd-macro): Recognize new C-x e binding, - kmacro-end-and-call-macro. - -2002-09-11 Juanma Barranquero - - * newcomment.el (uncomment-region): Fix let/let* use. - -2002-09-11 Simon Josefsson - - * time-stamp.el (time-stamp-hhmmss): New function. - - * gud.el (gud-gdb-massage-args): Don't secretly add -fullname. - (gud-query-cmdline): Add --fullname to the user cmdline. - - * mail/smtpmail.el (smtpmail-default-smtp-server): Doc fix. - -2002-09-11 Kim F. Storm - - * kmacro.el (kmacro-call-macro): Rephrase repeat prompt. - (kmacro-step-edit-map): Bind "A" to `append-end'. - (kmacro-step-edit-prompt): Fix prompt. - (kmacro-step-edit-query): Handle `append-end' response. - (kmacro-step-edit-pre-command): Activate `append-end' at end of - macro when required. - -2002-09-11 Stefan Monnier - - * derived.el (define-derived-mode): Fix typo. - - * menu-bar.el (line-number-mode, column-number-mode) - (transient-mark-mode): Use minor mode directly. - (menu-bar-make-toggle): Remove `props' arg. - Move customize-mark-as-set directly into the toggle function. - - * whitespace.el (whitespace-global-mode): Use define-minor-mode. - Use the new file hook names. - (whitespace-describe): Remove. Move the text to `Commentary:'. - (whitespace-unload-hook): Use the new file hook names. - - * finder.el (finder-find-library): Remove. - (finder-commentary): Use find-library-name and add completion. - - * simple.el (transient-mark-mode, line-number-mode) - (column-number-mode): Use define-minor-mode. - (define-mail-user-agent): Delete. Moved to subr.el. - - * loadup.el ("simple.el"): Move to after loaddefs.el. - - * subr.el (define-mail-user-agent): Moved from simple.el. - -2002-09-10 Richard M. Stallman - - * pcvs-info.el (cvs-check-fileinfo): Don't use boolp. - (boolp): Function deleted. - -2002-09-10 Dave Love - - * international/utf-8.el (ucs-mule-to-mule-unicode): - Define unconditionally. - (utf-8-fragmentation-table): New. Use it in top-level mapc. - (utf-8-fragment-on-decoding): Use it to keep - utf-8-translation-table-for-decode variable and translation table - in sync. - - * international/ucs-tables.el: Bind utf-8-translation-table-for-decode - when setting up tables and remove useless optimize-char-table. - (ucs-mule-to-mule-unicode): Deleted. - (ucs-unify-8859): Maybe optimize ucs-mule-to-mule-unicode. - - * international/utf-16.el (utf-16-le-pre-write-conversion) - (utf-16-be-pre-write-conversion): Deleted. - (mule-utf-16-le, mule-utf-16-be): Register encoding translation table. - -2002-09-10 Richard M. Stallman - - * files.el (diff-buffer-with-file): Simplify. - Don't signal an error if buffer has no file. - Call sit-for after `diff' returns. - - * play/gamegrid.el (gamegrid-make-color-tty-face): - Handle string as COLOR arg. - (gamegrid-display-type): Don't assume display-color-p - implies a color-x terminal. - (gamegrid-hide-cursor): Set `cursor-type' local variable. - - * descr-text.el (describe-text-mode): Add font-lock-defontify to - change-major-mode-hook. - - * ibuffer.el (ibuffer-mode): Add font-lock-defontify to - change-major-mode-hook. - - * comint.el (comint-mode): Add font-lock-defontify to - change-major-mode-hook. - - * info.el (Info-mode): Add font-lock-defontify to - change-major-mode-hook. - - * replace.el (occur-mode): Add font-lock-defontify to - change-major-mode-hook. - - * font-core.el (font-lock-defontify): New function. - -2002-09-10 Richard M. Stallman - - * ps-print.el (ps-printer-name-option): Doc fix. - -2002-09-10 Vinicius Jose Latorre - - * ps-print.el: Adjust ps-postscript-code-directory setting. - XEmacs version check was adjusted. - (ps-print-version): New version number (6.5.6). - (ps-print-color-p, ps-page-dimensions-database): Autoload var. - (ps-print-code, ps-print-preprint-region): Adjust code. - -2002-09-10 Kai Gro,A_(Bjohann - - * files.el (auto-mode-alist): ~/.gnus, ~/.viper are in - emacs-lisp-mode, like ~/.emacs. - -2002-09-10 Stefan Monnier - - * newcomment.el (uncomment-region): Be more careful with `='. - -2002-09-10 Deepak Goel - - * play/doctor.el (doc//): Rename from `//'. Update callers. - (doc$): Rename from `$'. Update callers. - -2002-09-10 Miles Bader - - * simple.el (do-auto-fill): `fill-indent-according-to-mode' is a - variable, not a function. - - * kmacro.el (kmacro-call-macro): Deal with a non-numeric prefix arg. - -2002-09-10 Kim F. Storm - - * macros.el (apply-macro-to-region-lines): Let-bind mark-active to - nil while executing macro to avoid triggering delete-selection-mode. - - * simple.el (keyboard-quit): Set defining-kbd-macro to nil to - cancel defining keyboard macro when applicable. - -2002-09-09 Markus Rost - - * simple.el (transient-mark-mode, line-number-mode) - (column-number-mode): Undo previous change because of bootstrapping. - -2002-09-09 Stefan Monnier - - * derived.el (define-derived-mode): Add keyword arguments. - (derived-mode-make-docstring): Take abbrev and syntax table names. - - * font-core.el (font-lock-change-mode): Just turn off font-lock-mode. - (font-lock-default-function): Change arg name. - - * cus-start.el (transient-mark-mode): Delete. Done in simple.el. - - * paren.el (show-paren-function): Use syntax-after. - - * emacs-lisp/syntax.el (syntax-after): Delete. Moved to subr.el. - - * subr.el (symbol-file): Also work for autoloaded funcs. - (syntax-after): New fun moved from syntax.el. - - * find-file.el (ff-pre-find-hook, ff-pre-load-hook, ff-post-load-hook) - (ff-not-found-hook, ff-file-created-hook): Rename from *-hooks. - Update callers (but still run the old hooks as well). - - * emacs-lisp/find-func.el (find-library-suffixes, find-library-name) - (find-library): New funs. - (find-function-search-for-symbol): Use it. - - * emacs-lisp/bytecomp.el (byte-compile-file): Don't switch buffer. - - * isearch.el (isearch-cmds): Add docstring. - (isearch-mouse-2): Lookup binding in the proper buffer. - Use call-interactively and remove the now useless `arg'. - (isearch-search-fun-function): New var. - (isearch-search-fun): New fun. - (isearch-search, isearch-lazy-highlight-search): Use it. - -2002-09-09 Stefan Monnier - - * simple.el (what-line): Don't hard-code 1. - (transient-mark-mode, line-number-mode, column-number-mode): - Use define-minor-mode. - (do-auto-fill): Only ignore prefix if it's really empty. - -2002-09-09 Markus Rost - - * files.el (save-some-buffers-action-alist): Use lower case for - help string of diff-buffer-with-file. - -2002-09-09 Richard M. Stallman - - * calendar/calendar.el (mouse-scroll-calendar-left) - (mouse-scroll-calendar-right, mouse-calendar-other-month): - New commands. - (calendar-mode-line-format): Use them. - - * emacs-lisp/bytecomp.el (byte-recompile-directory): - Set and then bind default-directory. - - * startup.el (fancy-splash-head, normal-splash-screen): - Change the messages that explain about GNU or GNU/Linux. - - * info.el (Info-search): Add (point-min) to subfile positions - to get them right. Skip the current subfile using forward-line. - - * files.el (make-backup-file-name-1): When make-directory fails, - ignore backup-directory-alist. - (make-directory): Expand DIR before looking for handler. - -2002-09-09 Jari Aalto - - * progmodes/cperl-mode.el (cperl-noscan-files-regexp): - In addition to RCS, exclude CVS directories. - - * ls-lisp.el (ls-lisp-format-time-list): New variable. - (ls-lisp-format-time): Use it. - - * files.el (auto-mode-alist): Use sh-mode for .bash files. - -2002-09-09 Dave Love - - * ps-print.el: Many doc fixes. - -2002-09-09 John Paul Wallington - - * play/doctor.el (doctor-cadr, doctor-caddr, doctor-cddr): Remove. - Update callers. - -2002-09-08 Markus Rost - - * diff.el (diff): Doc fix. - -2002-09-08 Richard M. Stallman - - * emacs-lisp/bytecomp.el (byte-compile-delete-errors): Default to nil. - - * simple.el (undo-elt-in-region): Fix one-off error at END. - (forward-visible-line): Handle invisibility by ignoring - invisible newlines. Also include entire invisible lines beyond - the stopping point. - - * cus-edit.el (custom-save-variables, custom-save-faces): - Clarify the comments written into .emacs. - -2002-09-08 Markus Triska - - * play/doctor.el (doctor-doc): Recognize question words - and use qlist. Use doctor-shorten's return value. - (doctor-shorten): Compute a return value, don't alter `sent'. - (doctor-hates1): Add a question mark. - (doctor-strangelove): Unused function deleted. - -2002-09-08 Kim F. Storm - - * kmacro.el (kmacro-end-and-call-macro): New command to end and - call keyboard macro in one step. Bind it to C-x e by default. - (kmacro-call-macro): Use format-kbd-macro. - (kmacro-step-edit-macro): New command to interactively step edit - and execute last keyboard macro. - (kmacro-keymap): Bind SPC [C-x C-k SPC] to kmacro-step-edit-macro. - (kmacro-step-edit-mini-window-height): New custom var. - (kmacro-step-edit-map): New keymap (parent is query-replace-map). - (kmacro-step-edit-prefix-commands): New var. - (kmacro-step-edit-prompt, kmacro-step-edit-query) - (kmacro-step-edit-insert, kmacro-step-edit-pre-command) - (kmacro-step-edit-minibuf-setup, kmacro-step-edit-post-command): - New aux functions for step editing keyboard macros. - - * subr.el (read-quoted-char): Apply listify-key-sequence to vector - returned by this-single-command-raw-keys before appending it to - unread-command-event. - -2002-09-07 Colin Walters - - * progmodes/compile.el (compile-internal): Add optional argument - no-async. - - * diff.el (diff): Add optional argument no-async, and use the - above argument. - - * files.el (diff-buffer-with-file): Call diff synchronously, so we - don't delete the temporary file before diff has a chance to read - it. - - * ibuf-ext.el (ibuffer-diff-with-file): Just call - `diff-buffer-with-file'. - -2002-09-07 John Paul Wallington - - * emacs-lisp/cl-indent.el (extended-loop-p): Doc fix. - - * emacs-lisp/find-func.el (find-function-recenter-line): - Add custom type. Doc fix. - -2002-09-06 Stefan Monnier - - * menu-bar.el (menu-bar-make-mm-toggle): New macro. - (showhide-menu-bar, showhide-toolbar, menu-bar-toggle-auto-compression) - (toggle-highlight-paren-mode, toggle-global-lazy-font-lock-mode): - Remove. Use the minor mode function directly instead. - (menu-bar-mode): Add message and customize-mark-as-set and return - the new value as do other minor modes. - - * edmacro.el (edmacro-subseq): Don't use cl-push/cl-pop. - -2002-09-06 Simon Marshall - - * progmodes/etags.el (find-tag-tag, complete-tag): - Bind completion-ignore-case based on tags-case-fold-search, so that - case-sensitivity of tag completion matches that of tag search. - -2002-09-06 Juanma Barranquero - - * calendar/solar.el (calendar-time-display-form): Fix spacing. - - * double.el (double-prefix-only): Likewise. - - * emacs-lisp/easymenu.el (easy-menu-define): Likewise. - - * emacs-lisp/find-func.el (find-function-search-for-symbol): Likewise. - - * emacs-lisp/float.el (string-to-float): Likewise. - - * emacs-lisp/rx.el (rx): Likewise. - - * faces.el (copy-face): Likewise. - - * hilit-chg.el (highlight-changes-colours) - (highlight-changes-active-string) - (highlight-changes-passive-string) - (highlight-changes-rotate-faces, global-highlight-changes): Likewise. - - * international/mule.el (decode-char): Likewise. - - * progmodes/idlwave.el (idlwave-support-inheritance) - (idlwave-routine-entry-compare): Likewise. - - * progmodes/idlw-shell.el (idlwave-shell-use-breakpoint-glyph): - Likewise. - - * progmodes/pascal.el (pascal-start-keywords): Likewise. - - * progmodes/sh-script.el (sh-indent-for-fi, sh-indent-for-done): - Likewise. - - * progmodes/vhdl-mode.el (vhdl-progress-interval) - (vhdl-corresponding-begin): Likewise. - - * simple.el (choose-completion-string-functions): Likewise. - - * textmodes/reftex.el (reftex-TeX-master-file): Likewise. - - * textmodes/fill.el (fill-nonuniform-paragraphs) - (fill-individual-paragraphs): Likewise. - - * vcursor.el (vcursor-toggle-vcursor-map): Likewise. - - * warnings.el (warning-level-aliases): Likewise. - - * speedbar.el (speedbar-mode): Fix spacing and typos. - - * textmodes/reftex-vars.el (reftex-label-menu-flags): Fix typo. - -2002-09-05 Markus Rost - - * textmodes/table.el (table-command-prefix): Fix type. - -2002-09-05 Andre Spiegel - - * vc-hooks.el: Don't require vc.el at compile-time; it causes - recursive requirements during bootstrap. - -2002-09-05 Kenichi Handa - - * international/mule.el (decode-char): Cancel the previous change. - -2002-09-04 Mats Lidell (tiny change) - - * language/european.el ("Swedish"): New set-language-info-alist call. - -2002-09-04 Richard M. Stallman - - * help-fns.el (help-with-tutorial): Properly set up - completion-reference-buffer in the *Completion* buffer. - -2002-09-04 John Paul Wallington - - * startup.el (use-fancy-splash-screens-p): If `fancy-splash-frame' - returns nil, return nil. - -2002-09-04 Andre Spiegel - - * vc-hooks.el: Require vc.el at compile-time. - (vc-workfile-unchanged-p, vc-default-workfile-unchanged-p): - Moved here from vc.el. - - * vc.el (vc-workfile-unchanged-p, vc-default-workfile-unchanged-p): - Moved to vc-hooks.el. - - * vc-rcs.el (vc-rcs-state): Don't require vc.el. - -2002-09-04 Kenichi Handa - - * international/mule.el (decode-char): Translate a character by - utf-8-translation-table-for-decode only when - utf-8-fragment-on-decoding is non-nil. - -2002-09-02 Stefan Monnier - - * textmodes/text-mode.el (paragraph-indent-text-mode-abbrev-table) - (paragraph-indent-text-mode-syntax-table, paragraph-indent-text-mode): - Use text-mode's syntax-table and abbrev-table. - (text-mode): Set require-final-newline to t. - - * newcomment.el (comment-make-extra-lines): Only use the - dummy `=' char when there's really nothing else. - Don't remove spaces if it leads to an incorrect comment. - - * pcvs.el (cvs-run-process): Use a pty rather than a pipe to work - around the cvs/ssh/libc bug. - (cvs-update-header): Understand `cvs admin -m:' syntax. - (defun-cvs-mode): Use the new `declare' thingy. - (cvs-edit-log-text-at-point, cvs-mode-edit-log, cvs-do-edit-log) - (cvs-edit-log-minor-wrap, cvs-edit-log-filelist): New funs. - (cvs-mode-undo): Use `cvs add' for (CONFLICT. REMOVED). - - * pcvs-parse.el (cvs-parse-table): Create a `need-update' - node rather than a message for new directories. - (cvs-parse-status): Add support for `Entry Invalid'. - - * smerge-mode.el (smerge-diff-buffer-name): Default to *vc-diff*. - (smerge-combine-with-next): New function. - (smerge-diff): Don't output `wrote /tmp/foo' messages. - Insert message if no diffs were found. - - * mail/sendmail.el (mail-mode): Don't set local-abbrev-table. - (mail-mode-abbrev-table): Set to text-mode-abbrev-table. - -2002-09-02 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.15 released. - (require 'base64): Most modern Emacsen have the base64 - encode/decode functions built in, so test to see if they are bound - before we go blindly requiring base64.el. - From Steve Youngs . - (tramp-feature-write-region-fix): XEmacs doesn't have a - 'find-operation-coding-system' and this variable doesn't seem to - be used anywhere so wrap it in (unless (featurep 'xemacs)). - From Steve Youngs . - (tramp-methods): Remove duplicate definition of ssh1-old and ssh2-old. - (tramp-open-connection-su): Use user name "root" if no user name - is given. - - From Michael Albinus : - * net/tramp.el (tramp-invoke-ange-ftp): - (tramp-ange-ftp-file-name-p): Check for Xemacs. - (tramp-do-copy-or-rename-file): Don't pass KEEP-DATE to - tramp-invoke-ange-ftp 'rename. - (tramp-handle-write-region): Don't pass LOCKNAME and CONFIRM to - tramp-invoke-ange-ftp 'write-region. - (tramp-handle-set-file-modes): Change order of FILENAME and MODE - passing to tramp-invoke-ange-ftp 'set-file-modes. - (tramp-invoke-ange-ftp): `tramp-disable-ange-ftp' must be called - again after activating `ange-ftp'. - -2002-09-02 Kim F. Storm - - * ido.el (ido-ignore-item-temp-list): New variable. - (ido-read-internal): Don't set ido-default-item if the default is - member of ido-ignore-item-temp-list. - Don't return first match for C-j if no text is entered. - (ido-buffer-internal): Check for empty string return. - (ido-make-buffer-list1): Use member instead of memq. - (ido-window-buffer-p): Likewise. - (ido-get-bufname): Ignore buffers on ido-ignore-item-temp-list. - (ido-ignore-item-p): Ignore items on ido-ignore-item-temp-list. - - * replace.el (multi-occur): Made "ido-aware": - Changed prompt to use C-j instead of RET to end. - Set ido-ignore-item-temp-list to the selected buffers so far, so - they are automatically excluded from the list of choices. - Use add-to-list instead of push. - -2002-09-01 Richard M. Stallman - - * term/x-win.el (function-key-map): Define S-iso-lefttab. - -2002-09-01 Kim F. Storm - - * edmacro.el (edit-kbd-macro): Recognize new default binding for - C-x e in addition to old binding. - -2002-09-01 Mario Lang - - * files.el (save-some-buffers-action-alist): New variable. - (save-some-buffers): Use that. - (diff-buffer-with-file): New function. - -2002-09-01 Richard M. Stallman - - * ruler-mode.el (defgroup ruler-mode): Use `convenience' as parent. - - * dired.el (defgroup dired): Use `files' as parent. - (dired-get-filename): Ignore handler if it has safe-magic prop. - - * jka-compr.el (jka-compr-handler): Add safe-magic property. - -2002-08-31 Richard M. Stallman - - * simple.el (kill-line): Use end-of-visible-line to determine - if rest of line is blank. - (end-of-visible-line): Cope if end-of-line moved back over - invisible intangible chars at end of line. - - * simple.el (completion-setup-function): Don't use directory-sep-char. - -2002-09-01 Glenn Morris - - * progmodes/f90.el (f90-menu): Remove ":active" keyword where not - needed. - (f90-menu, f90-add-imenu-menu): Use lookup-key. - Remove (eval-when-compile) for free variables. - -2002-08-31 Andreas Schwab - - * font-core.el (font-lock-change-mode): Avoid changing buffer - state in any way. - -2002-08-30 Stefan Monnier - - * emacs-lisp/easymenu.el (easy-menu-filter-return): - Handle the case where the filter returns a single menu entry. - (easy-menu-add): Improve docstring. - (easy-menu-current-active-maps): Remove. - (easy-menu-get-map): Use current-active-maps. - - * cus-edit.el (custom-unlispify-menu-entry): Don't remove - the -p prefix from variables since they shouldn't have it anyway. - (custom-group-menu-create, customize-menu-create): - Only cdr if applicable, since custom-menu-create might return - a vector (i.e. a single menu entry). - -2002-08-30 Edward M. Reingold - - * calendar/diary-lib.el (diary-mail-entries): Don't overwrite - user's value of diary-list-include-blanks, but generate message - instead if there are no entries. - -2002-08-30 ARISAWA Akihiro (tiny change) - - * ps-print.el (ps-lp-system): Fixed typo in `usg-unix-v'. - -2002-08-30 Markus Rost - - * menu-bar.el (menu-bar-read-mail): Doc fix. - -2002-08-30 John Paul Wallington - - * ibuffer.el (ibuffer-update): Revert expansion of `caddr'. - (ibuffer-fontification-alist): Check hidden buffer case isn't - visiting a file and change its face to italic. - -2002-08-30 Juanma Barranquero - - * replace.el (occur-mode): Add interactive declaration. - - * bs.el (bs-message-without-log): Fix typo. - - * font-core.el (font-lock-defaults): Likewise. - - * font-lock.el (font-lock-add-keywords): Likewise. - - * mouse-copy.el (mouse-copy-work-around-drag-bug): Likewise. - - * textmodes/bibtex.el (bibtex-mode): Likewise. - - * emulation/viper-ex.el (ex-compile-command): Likewise. - - * progmodes/idlwave.el (idlwave-max-extra-continuation-indent): - Likewise. - - * progmodes/dcl-mode.el (dcl-calc-cont-indent-relative): Likewise. - - * allout.el (my-mark-marker): Likewise. - -2002-08-30 Simon Josefsson - - * mail/smtpmail.el (smtpmail-via-smtp): Delete process buffer - unless s-debug-info is enabled. - -2002-08-29 John Paul Wallington - - * ibuffer.el (ibuffer-update): Use `minibufferp'. Expand `caddr'. - - * mwheel.el (mouse-wheel-up-button): Doc fix. - -2002-08-29 Juanma Barranquero - - * replace.el (occur-mode-hook): New hook. - (occur-mode): Use it. - (occur-hook): Set default to nil. - -2002-08-29 Stefan Monnier - - * net/ange-ftp.el: Use match-string and drop useless `function's. - (ange-ftp-get-process): Bind `ange-ftp-this-user' and - `ange-ftp-this-host' before running ange-ftp-process-startup-hook. - (ange-ftp-ls-parser): Use `switches' arg instead of dynamic binding. - (ange-ftp-parse-dired-listing): Update the calls. - (dired-local-variables-file): Declare to shut quieten the compiler. - (ange-ftp-file-entry-active-p): Remove. - (ange-ftp-file-name-all-completions, ange-ftp-file-name-completion): - Don't exclude dangling symlinks. - (ange-ftp-file-name-completion-1): Make predicate optional. - (ange-ftp-parse-list-func-alist): Use add-to-list to update. - (ange-ftp-fix-name-for-bs2000): Use subst-char-in-string. - (ange-ftp-bs2000-posix-hook-installed): Remove. - (ange-ftp-add-bs2000-posix-host): Don't use it anymore. - (ange-ftp-bs2000-cd-to-posix): Use `ange-ftp-this-user' and - `ange-ftp-this-host' instead of `user' and `host'. - -2002-08-29 Richard M. Stallman - - * emacs-lisp/bytecomp.el (byte-compile-warning-prefix): - Decide here whether to print which form we're compiling. - If we do that, still print file and line. Make file name - relative to default-directory. Print fewer newlines. - (byte-compile-log-file): Print something even if no file. - Print messages for entering and leaving directories, - and set default-directory. - (displaying-byte-compile-warnings): Only sometimes bind warning-series. - (byte-compile-warning-series): New function. - (byte-compile-file): Set byte-compile-last-logged-file, don't bind it. - (byte-compile-display-log-head-p): Function deleted. - - * warnings.el (warning-series): Now can be a marker, not an integer. - (display-warning): Handle new value for warning-series. - - * emacs-lisp/bytecomp.el (byte-compile-log-file): Use \f. - (byte-compile-cl-warn): Add cl-macroexpand-all, cl-compiling-file - to don't-warn list. - -2002-08-29 Kim F. Storm - - * kmacro.el: Change default bindings from F7/F8 to F3/F4. - Change default binding of C-x e to kmacro-end-or-call-macro. - (kmacro-call-repeat-key, kmacro-call-repeat-with-arg): New custom - variables. - (kmacro-get-prefix-arg): New function. - (kmacro-repeat-on-last-key): Rename from kmacro-repeat-loop and - improve. Callers changed. - (kmacro-call-macro): Repeat macro by repeating last key or - key defined in kmacro-call-repeat-key. New third arg non-nil - means to end current macro. - (kmacro-end-or-call-macro): Call kmacro-call-macro appropriately - to get repeat last key functionality. - (kmacro-start-macro-or-insert-counter): Improve doc string. - -2002-08-28 Luc Teirlinck - - * files.el (find-buffer-visiting): Compare file attributes - using buffer-file-truename. - -2002-08-28 Richard M. Stallman - - * files.el (make-auto-save-file-name, make-backup-file-name-1): - Don't use directory-sep-char. - -2002-08-28 Juanma Barranquero - - * replace.el (occur-hook): Renamed from `occur-mode-hook'. - (occur-mode): Remove call to `occur-mode-hook'. - (occur-rename-buffer): Fix reference to `occur-mode-hook' in docstring. - (occur-1): Add call to `occur-hook'. - - * subr.el (make-variable-frame-localizable): Alias for - `make-variable-frame-local'. - -2002-08-28 Miles Bader - - * rfn-eshadow.el (read-file-name-electric-shadow-properties) - (read-file-name-electric-shadow-tty-properties) - (read-file-name-electric-shadow-mode): Remove compatibility defs. - - * comint.el (comint-carriage-motion): Start at START. - -2002-08-27 Francesco Potort,Al(B - - * net/ange-ftp.el (ange-ftp-skip-msgs): Skip the 530 response - given by vsFTPd when accessed with a kerberised FTP client. - -2002-08-27 Richard M. Stallman - - * files.el (find-alternate-file): - Bind kill-buffer-query-functions locally, don't set it. - -2002-08-27 Andreas Schwab - - * kmacro.el (kmacro-start-macro): Doc fix. - -2002-08-27 Carsten Dominik - - * textfile/reftex-ref.el (reftex-goto-label): New command. - - * textfile/reftex-vars.el (reftex-part-resets-chapter): New option. - - * textfile/reftex-parse.el (reftex-roman-number): New function. - (reftex-section-number): Better handling of parts: No chapter - counter resets. - - * textfile/reftex.el (reftex-highlight-overlays): Added a third - overlay. - (reftex-mode-menu): Added entry for `reftex-toc-recenter. - Also moved `reftex-reset-mode' to top level. - - * textfile/reftex-toc.el (reftex-toc-recenter): New command. - (reftex-toc-pre-command-hook): Don't remove highlight overlay. - (reftex-toc-post-command-hook): Use overlay no 2 for highlighting. - - * textfile/reftex-sel.el (reftex-get-offset): Get offset of - document pointer *before* position, not after. - (reftex-insert-docstruct): Get offset of document pointer *before* - position, not after. - - * textfiles/reftex-parse.el (reftex-where-am-I): Prefer marker - match over section title match. - - * textfiles/reftex-cite.el (reftex-bib-or-thebib): New function - which determines on a per-file-basis if BibTeX is being used - locally for citations. - (reftex-offer-bib-menu): Use `reftex-bib-or-thebib' for better - cooperation with chapterbib. - (reftex-bibtex-selection-callback): Use `reftex-bib-or-thebib' for - better cooperation with chapterbib. - - * textfiles/reftex-dcr.el (reftex-view-cr-cite): - Use `reftex-bib-or-thebib' for better cooperation with chapterbib. - -2002-08-26 Kim F. Storm - - * subr.el (suppress-keymap): Use command remapping instead of - substitute-key-definition to undefine self-inserting keys. - -2002-08-26 Juanma Barranquero - - * makefile.w32-in (WINS): Add calc and obsolete. - -2002-08-26 Stefan Monnier - - * emacs-lisp/easy-mmode.el (define-minor-mode): - Use customize-mark-as-set for global minor modes. - -2002-08-25 Miles Bader - - * rfn-eshadow.el (file-name-shadow-properties-custom-type): - Renamed from `read-file-name-electric-shadow-properties-custom-type'. - Change name of face. - (file-name-shadow-properties): Renamed from - `read-file-name-electric-shadow-properties'. - (file-name-shadow-tty-properties): Renamed from - `read-file-name-electric-shadow-tty-properties'. - (file-name-shadow): Renamed from `read-file-name-electric-shadow'. - (rfn-eshadow-setup-minibuffer): Update references to renamed variables. - (file-name-shadow-mode): Renamed from - `read-file-name-electric-shadow-mode'. Update references to - renamed variables. - -2002-08-24 Sam Steingold - - * subr.el (eval-after-load): Do not call - load-symbol-file-load-history (deleted yesterday). - -2002-08-24 John Paul Wallington - - * startup.el (normal-splash-screen): Ensure splash buffer is - killed. Use tabs in output. Fix test whether previous buffer was - *scratch* buffer. - - * progmodes/simula.el (simula-abbrev-keyword-default) - (simula-abbrev-keyword, simula-abbrev-stdproc-default) - (simula-abbrev-stdproc): Doc fix - escape open parens in column 0. - - * apropos.el (command-apropos): Use `defalias' instead of `fset'. - - * mail/rmail.el (rmail-speedbar-match-folder-regexp): Doc fix. - -2002-08-24 Glenn Morris - - * progmodes/f90.el (f90-xemacs-flag, f90-xemacs-menu) - (f90-menu-bar-menu, f90-change-case-menu, f90-font-lock-on) - (f90-font-lock-off, f90-font-lock-menu): Delete. - Use easy-menu-define instead. - (f90-mode): Use easy-menu-add. - No longer (require 'imenu) when compiling. - (f90-mark-subprogram, f90-indent-region, f90-fill-region) - (f90-abbrev-start): Use fboundp. - (f90-imenu-flag): Delete - use imenu--index-alist instead. - -2002-08-23 Richard M. Stallman - - * loadhist.el (unload-feature): Distinguish functions from - variables in load-history. - (feature-symbols): Doc fix. - - * files.el (ange-ftp-completion-hook-function): Add safe-magic prop. - - * subr.el (symbol-file-load-history-loaded) - (load-symbol-file-load-history): Deleted. - (symbol-file): Don't call load-symbol-file-load-history. - -2002-08-23 Andre Spiegel - - * vc-hooks.el (vc-kill-buffer-hook): Add it to kill-buffer-hook again. - -2002-08-22 Katsumi Yamaoka (tiny change) - - * frame.el (select-frame-by-name, select-frame-set-input-focus): - Always call x-focus-frame, if using x. - Use set-mouse-position on all systems, if focus-follows-mouse. - -2002-08-22 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.14 released. - (tramp-shell-prompt-pattern): New variable. - (tramp-actions-before-shell, tramp-multi-actions) - (tramp-find-shell, tramp-open-connection-multi) - (tramp-open-connection-setup-interactive-shell): Use it. - (tramp-open-connection-telnet, tramp-open-connection-rsh) - (tramp-open-connection-su): Mention `tramp-shell-prompt-pattern' - in the docstring. - (tramp-bug): Report `tramp-shell-prompt-pattern'. - (tramp-process-one-multi-action, tramp-process-one-action): - Make message clearer so people don't confuse it with Emacs asking - them a question if the regexp happens to end with "?". - (tramp-verbose): Change default value from 10 to 9. Also change - some logging levels so that 10 is reserved for stuff which is - needed for debugging only, but 9 catches everything that people - might like to see in order to see that Tramp is actually working. - -2002-08-22 Kim F. Storm - - * emacs-lisp/authors.el (authors-aliases, authors-fixed-entries): - Corrected spelling mistakes (for Joseph Arceneaux). - -2002-08-21 Glenn Morris - - * progmodes/f90.el: eval-when-compile a few defvars. - (f90-xemacs-flag): Wrap in eval-and-compile. - (f90-font-lock-keywords): Doc fix. - (f90-mode-abbrev-table): Work with or without 6th arg of define-abbrev. - (f90-mark-subprogram-overlay): Variable deleted. - (f90-mark-subprogram): Remove overlay bit. Don't be silent about - pushing mark. - (f90-abbrev-start): unread-command-event is obsolete in XEmacs. - -2002-08-21 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.13 released. - (tramp-handle-write-region): Don't check to see if remote end is - awake after sending data to remote host: we want to send "EOF" not - "echo are you awake"... - (tramp-maybe-open-connection): Swap args for tramp-time-diff. - (tramp-yn-prompt-regexp): New variable. - (tramp-action-yn): New function, using it. - (tramp-feature-write-region-fix): New internal variable. Not yet - used. Should be used in `tramp-handle-write-region'. - -2002-08-21 Kim F. Storm - - * bindings.el (mode-line-format): Moved global-mode-string last. - (mode-line-position): Moved %p first. Added padding to %l/%c to - eliminate jumpyness in modeline. Use (%l,%c) format if both - line-number-mode and column-number-mode are enabled. - -2002-08-20 Martin Stjernholm - - * progmodes/cc-engine.el (c-forward-syntactic-ws): Fixed a bug - that could cause an infinite loop if something that looks like - a macro begins in the middle of a line. - - * progmodes/cc-engine.el (c-parse-state): Fixed a bug that - could cause `c-state-cache' to contain two conses in sequence - when there's an unbalanced open paren in a macro. - -2002-08-20 Glenn Morris - - * progmodes/fortran.el (fortran-current-defun): Use save-excursion. - - * imenu.el (imenu--generic-function): Use mapc. - (imenu-syntax-alist): Doc fix. - -2002-08-20 Richard M. Stallman - - * font-core.el (font-lock-change-mode): New function. - (font-lock-mode): Use font-lock-change-mode instead of - font-lock-unfontify-buffer. - (font-lock-maximum-size, font-lock-verbose): Add defvars. - -2002-08-20 Carsten Dominik - - * textfiles/reftex-cite.el (reftex-bib-or-thebib): New function - which determines on a per-file-basis if BibTeX is being used - locally for citations. - (reftex-offer-bib-menu): Use `reftex-bib-or-thebib' for better - cooperation with chapterbib. - (reftex-bibtex-selection-callback): Use `reftex-bib-or-thebib' for - better cooperation with chapterbib. - - * textfiles/reftex-dcr.el (reftex-view-cr-cite): - Use `reftex-bib-or-thebib' for better cooperation with chapterbib. - -2002-08-20 Kim F. Storm - - * kmacro.el: Major rework based on discussions with RMS. - Most important change is that C-x C-k is now bound to a keymap - with keyboard macro related commands. The original binding on - C-x C-k is moved to C-x C-k e. - - * binding.el: Remove macro related bindings (now in kmacro.el). - - * edmacro.el: Remove C-x C-k binding (now in kmacro.el). - -2002-08-19 Stefan Monnier - - * help-fns.el (help-split-fundoc): Replace the function name - from the docstring with the one that should be displayed. - (help-make-usage): Understand CL style arglists. - (describe-function-1): Adapt to the new behavior of help-split-fundoc. - (describe-variable): Use delete-region. - -2002-08-19 Kenichi Handa - - * international/mule.el (sgml-xml-auto-coding-function): - Call re-search-forward with NOERROR t. - -2002-08-19 Miles Bader - - [original idea from Luc Teirlinck ] - * comint.el (comint-inhibit-carriage-motion): New variable. - (comint-carriage-motion): Argument STRING removed. New arguments - START and END; interpret characters between START and END rather - than using special comint state. - (comint-output-filter): Call `comint-carriage-motion'. - (comint-output-filter-functions): Don't add `comint-carriage-motion'. - * ielm.el (inferior-emacs-lisp-mode): - Give `comint-inhibit-carriage-motion' a local value of t. - -2002-08-18 Richard M. Stallman - - * textmodes/table.el: New file. - - * font-core.el (font-lock-mode): Set change-major-mode-hook locally. - -2002-08-18 Andreas Schwab - - * ibuf-ext.el (ibuffer-list-buffer-modes): Doc fix. - -2002-08-17 Carsten Dominik - - * textmodes/reftex.el (reftex-mode): Create special syntax tables. - (reftex-syntax-table): Set a default in case this is being used - outside a LaTeX file. - (reftex-syntax-table-for-bib): Set a default in case this is being - used outside a LaTeX file. - -2002-08-17 Richard M. Stallman - - * tar-mode.el (tar-subfile-mode): Use add-hook and remove-hook, - and use write-file-functions instead of local-write-file-hooks. - (tar-untar-buffer): Don't try to extract directories. - - * menu-bar.el (fringe-mode): Set to nil. - - * mail/rmail.el (rmail-search-mime-header-function): Doc fix. - -2002-08-15 Richard M. Stallman - - * calendar/appt.el (appt-delete): Use substring-no-properties. - (appt-make-list): Don't use prin1-to-string; use the string unchanged. - -2002-08-15 Jan Nieuwenhuizen (tiny change) - - * server.el (server-process-filter): Simplify code. - (server-goto-line-column): New function. - (server-visit-files): Use server-goto-line-column. - Offer to revert only if file has changed. - -2002-08-15 Richard M. Stallman - - * files.el (recover-this-file): New function. - (after-find-file): Recommend recover-this-file. - - * font-core.el (font-lock-mode): Add font-lock-unfontify-buffer - to change-major-mode-hook when font lock is enabled. - - * simple.el (toggle-truncate-lines): Force redisplay. - Display status message. - -2002-08-15 Carsten Dominik - - * textmodes/reftex.el (reftex-mode): Moved the creation of special - syntax tables to top-level. - -2002-08-15 David Kastrup - - * net/ange-ftp.el (ange-ftp-wipe-file-entries): Fix type mismatch; - use `hash-table-size' instead of `length'. - -2002-08-14 Stefan Monnier - - * help-fns.el (locate-library): Use locate-file(-completion). - (help-split-fundoc): Tighten the regexp and recognize a usage-info - where the function name is `fn'. - (help-function-arglist): Follow aliases and macros. - (describe-function-1): Use keymapp. - If the docstring contains a usage info, use it even if the function is - not a subroutine. Find usage info in aliases' docstring if necessary. - (describe-variable): Get the value before setting up the *Help* buffer. - - * emacs-lisp/easy-mmode.el (easy-mmode-define-global-mode): - Use find-file-hook instead of find-file-hooks. - (define-minor-mode): Get rid of this silly `togglep'. - Add an explicit `toggle' argument (used for interactive calls). - Emit a warning when a nil argument turns the mode off. - - * language/ethio-util.el (setup-ethiopic-environment-internal) - (exit-ethiopic-environment): Use find-file-hook and - write-file-functions instead of find-file-hooks and write-file-hooks. - - * window.el (handle-select-window): Don't do anything if the window - has disappeared since the event was generated. - (split-window-save-restore-data): Use push and with-current-buffer. - - * saveplace.el: - * play/meese.el: - * obsolete/hilit19.el: - * completion.el (dynamic-completion-mode): - * emacs-lisp/find-func.el (find-function-search-for-symbol): - Use find-file-hook instead of find-file-hooks. - - * imenu.el (imenu-always-use-completion-buffer-p): Make obsolete. - (imenu-use-popup-menu, imenu-eager-completion-buffer): New vars. - (imenu-space-replacement): Allow nil value. - (imenu--completion-buffer): Use new vars and simplify. - Fix handling of minibuffer-setup-hook. - Use minibuffer-completion-help instead of rolling our own. - (imenu-choose-buffer-index): Use the new var. - - * startup.el (command-line): Load custom-file if not done yet. - -2002-08-14 Kenichi Handa - - * select.el (xselect-convert-to-string): If TYPE is non-nil, encode - the selection data string. Always return cons of type and string. - (selection-converter-alist): Add (UTF8_STRING . - xselect-convert-to-string). - -2002-08-12 Stefan Monnier - - * newcomment.el (comment-region): Force `lines' when `block' is set. - -2002-08-12 Richard M. Stallman - - * menu-bar.el (menu-bar-next-tag-other-window, menu-bar-next-tag) - (menu-bar-right-scroll-bar, menu-bar-left-scroll-bar) - (menu-bar-no-scroll-bar, menu-bar-toggle-auto-compression) - (menu-bar-toggle-cua-mode, menu-bar-read-mail) - (menu-bar-help-extra-packages, help-with-tutorial-spec-language) - (menu-bar-text-mode-auto-fill): New commands, used - in menu bar menus instead of lambda expressions. - - (menu-bar-showhide-fringe-menu-customize-left) - (menu-bar-showhide-fringe-menu-customize-right) - (menu-bar-showhide-fringe-menu-customize-disable) - (menu-bar-showhide-fringe-menu-customize-reset): Doc fixes. - - (menu-bar-options-menu): Use toggle-truncate-lines. - (showhide-date-time): Call customize-mark-as-set. - - * emacs-lisp/find-func.el (find-function-search-for-symbol): - Obey `definition-name' properties. - - * emacs-lisp/easy-mmode.el (easy-mmode-define-global-mode): - Put `definition-name' properties on the functions whose - names are constructed. - - * textmodes/page-ext.el (pages-target-buffer): Add defvar. - Renamed from target-buffer. - (pages-directory, pages-copy-header-and-position): Uses changed. - - * calendar/appt.el (appt-make-list): Correct the parsing of - each appointment from time-string. - -2002-08-12 Stefan Monnier - - * scroll-all.el (scroll-all-mode): Use define-minor-mode. - (scroll-all-mode) : Delete. - (running-xemacs): Delete. - (minor-mode-alist): Don't manipulate it directly. - -2002-08-10 Kenichi Handa - - * international/mule-cmds.el (search-unencodable-char): New function. - (select-safe-coding-system): Show unencodable characters. - (unencodable-char-position): Deleted, and implemented in C in coding.c. - -2002-04-09 John Wiegley - - * esh-util.el: Removed eshell-under-cygwin-p, and all uses of it. - * em-cmpl.el (eshell-cmpl-ignore-case): Ditto. - * em-dirs.el (eshell/cd): Ditto. - * em-glob.el (eshell-glob-case-insensitive): Ditto. - * em-hist.el (eshell-previous-matching-input-string-position): Ditto. - * esh-ext.el (eshell-binary-suffixes): Ditto. - -2002-08-09 Richard M. Stallman - - * textmodes/page-ext.el (pages-directory-mode): Undo previous change. - - * simple.el (set-variable): Give locality status in prompt. - -2002-08-09 Benjamin Rutt - - * simple.el (set-variable): If given a prefix argument, set - variable buffer-locally. - -2002-08-09 John Paul Wallington - - * font-core.el (font-lock-function): Make it buffer-local. - -2002-08-08 Richard M. Stallman - - * emacs-lisp/checkdoc.el (checkdoc, checkdoc-interactive) - (checkdoc-message-interactive, checkdoc-interactive-loop) - (checkdoc-current-buffer, checkdoc-continue, checkdoc-comments) - (checkdoc-defun): - Update checkdoc-spellcheck-documentation-flag correctly. - (checkdoc-ispell-docstring-engine): Don't test for - checkdoc-autofix-flag = nil. - -2002-08-07 John Paul Wallington - - * xt-mouse.el (xterm-mouse-mode): Make it a global mode. - - * wid-browse.el (widget-minor-mode): Fix doc typo. - -2002-08-07 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.12 released. - (tramp-find-shell, tramp-open-connection-setup-interactive-shell): - Comment out possibly obsolete "echo hello" commands. - (tramp-run-real-handler): If operation is - `ange-ftp-hook-function', use first arg as the real operation. - (tramp-check-ls-commands): Use / instead of \ as directory - separator. (Relevant for XEmacs on Windows.) - (tramp-maybe-open-connection): Use tramp-wait-for-output when - waiting for the "are you awake" command. Use a different string - for the "are you awake" command. - (tramp-send-command): New optional arg NEVEROPEN means to never - invoke tramp-maybe-open-connection. - (tramp-maybe-open-connection): Use it - -2002-08-07 Richard M. Stallman - - * warnings.el (warning-prefix-function, warning-series) - (warning-fill-prefix, warning-group-format): Add autoload cookies. - -2002-08-07 Kenichi Handa - - * international/mule-cmds.el (select-safe-coding-system): - Call pop-to-buffer inside save-window-excursion and save-excursion. - -2002-08-06 John Paul Wallington - - * help-fns.el (describe-function-1): Skip arglist note if - function's definition is a keymap. - -2002-08-06 Sam Steingold - - * calendar/diary-lib.el (diary-mail-entries): Use `compose-mail' - and `mail-user-agent' instead of straight sendmail. - (diary-modified, diary-entries-list, displayed-year) - (displayed-month, entry, date, number, date-string, d-file) - (original-date): Defvar without binding to avoid compiler warnings. - -2002-08-05 Alan Shutko - - * ibuffer.el (ibuffer-mode-map): Added ibuffer-filter-by-used-mode. - (ibuffer-mode-map): Added ibuffer-filter-by-used-mode. - (ibuffer-mode): Added ibuffer-filter-by-used-mode to doc string. - - * ibuf-ext.el (ibuffer-list-buffer-modes): New. - (ibuffer-filter-by-used-mode): New. - -2002-08-05 John Paul Wallington - - * ediff-util.el (ediff-copy-list): Use `defalias' instead of - `fset' and `symbol-function'. - -2002-08-05 John Wiegley - - * pcomplete.el (pcomplete-entries): Don't set `above-cutoff' to a - value unless pcomplete-cycle-cutoff-length is non-nil. - -2002-04-09 John Paul Wallington - - * esh-util.el (eshell-under-cygwin-p): New function. - * em-cmpl.el (eshell-cmpl-ignore-case): Use it. - * em-dirs.el (eshell/cd): Ditto. - * em-glob.el (eshell-glob-case-insensitive): Ditto. - * em-hist.el (eshell-previous-matching-input-string-position): Ditto. - * esh-ext.el (eshell-binary-suffixes): Ditto. - -2002-08-05 Richard M. Stallman - - * international/mule-cmds.el (select-safe-coding-system): Check for - non-nil CODING-SYSTEM before warning it disagrees with AUTO-CS. - - * net/ange-ftp.el (ange-ftp-smart-gateway): Doc fix. - -2002-08-05 Gerd Moellmann - - * image.el (image-jpeg-p): Accept "Exif" marker. - -2002-08-05 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.11 released. - (tramp-perl-file-attributes): Print uid and gid as signed integers. - (tramp-invoke-ange-ftp): Correct check for Ange-FTP being loaded. - Invoke Ange-FTP with tramp-run-real-handler to avoid Ange-FTP - calling Tramp again. - (tramp-find-file-exists-command): Check for `ls -d' last, after - all the variants on `test -e'. - (tramp-post-connection): Erase buffer before finding a command to - check if file exists. - -2002-08-05 David Kastrup - - * calc/calc.el (math-format-stack-value): Revert a broken - if->when replacement and reformat so that this does not happen - again. Fixes a pretty lethal line formatting/yanking bug. - -2002-08-04 John Paul Wallington - - * startup.el (fancy-splash-frame): Check selected frame last. - -2002-08-04 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.10 released. - (tramp-uudecode): New shell function `tramp_uudecode' to decode to - standard output even if `uudecode -p' and `uudecode -o -' don't work. - (tramp-post-connection): After finding the right shell, wait a - bit. This is a kludge to avoid a race condition, even though I - don't understand why there is a race condition in the first place. - (tramp-post-connection): Install the `tramp_uudecode' shell - function on the remote host. - (tramp-coding-commands): Add an alternative for `tramp_uudecode'. - (tramp-bug): Include more variables in the report. - -2002-08-04 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.9 released. - (tramp-bug): Add wording about additional info to include in bug - report. - (tramp-find-shell): Set $PS1 for invocation of second shell (for - tilde expansion). - (tramp-find-shell): Shell prompt must match at end of buffer. - Do this also for fallback shell prompt. - (tramp-find-shell): More debugging output. - (tramp-find-inline-encoding): When checking the decoding command, - some commands fail when reading from /dev/null. So we pass a - known string through the encoding command and pass that through - the decoding command. So we know whether the decoding command can - deal with some real input. - -2002-08-04 Andreas Schwab - - * net/tramp.el (tramp-perl-encode, tramp-perl-decode): Doc fix. - -2002-08-03 Andrew Choi - - * term/mac-win.el: Set keys to enable mouse wheel support. - -2002-08-03 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.8. - (tramp-perl-encode, tramp-perl-encode): Double the backslashes. - -2002-08-03 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.7. - (tramp-perl-encode-with-module, tramp-perl-decode-with-module) - (tramp-perl-encode, tramp-perl-decode): Escape `%' characters - because of `format' and say so in the docstring. - -2002-08-03 Glenn Morris - - * progmodes/f90.el (f90-font-lock-keywords-1): Fix highlighting of - `type' forms. - (f90-font-lock-keywords-2): Fix `implicit type(foo)' case. - (f90-type-def-re): Fix value. - -2002-08-03 Kai Gro,A_(Bjohann - - * net/tramp.el: Version 2.0.6. - (tramp-default-method): Change to "ssh" from "sm". - (tramp-wrong-passwd-regexp): Restructure. Add additional alternative. - (tramp-su-program): New internal variable for method parameter. - (tramp-perl-encode-with-module, tramp-perl-decode-with-module): - New variables. Very short Perl one-liner, but requires Perl - module MIME::Base64 to be installed on the remote site. - (tramp-perl-encode, tramp-perl-decode): New base64 - encoder/decoder. From Juanma Barranquero . - (tramp-handle-file-truename): Invoke Ange-FTP properly (even - though Ange-FTP doesn't do anything for this operation). - (tramp-handle-set-visited-file-modtime): Comment change. - (tramp-handle-make-directory): Save-excursion. - (tramp-handle-expand-many-files): Don't try to invoke Ange-FTP - twice, once is enough. - (tramp-action-permission-denied): Show *tramp/foo* buffer so the - user knows what's wrong. - (tramp-post-connection): Support the two Perl encoders and decoders. - (tramp-coding-commands): Ditto. Add some todo items. - -2002-08-02 Richard M. Stallman - - * international/mule.el (merge-coding-systems): New function. - (set-buffer-file-coding-system): Use merge-coding-systems. - Change prompt for args. - (revert-buffer-with-coding-system): New command. - - * international/mule-cmds.el (mule-keymap, set-coding-system-map): - Add bindings for revert-buffer-with-coding-system. - (set-coding-system-map): Clarify menu item info for - set-buffer-file-coding-system. - (set-coding-system-map): Reorder and add separators. - - * emacs-lisp/edebug.el (edebug-eval-top-level-form): - Use eval-expression. - - * subr.el (atomic-change-group): Doc fix. - -2002-07-31 Colin Walters - - * ibuffer.el (ibuffer-hooks): Rename to `ibuffer-hook'; Add - defvaralias for compatibility. - (ibuffer-mode-hooks): Rename to `ibuffer-mode-hook'; Add - defvaralias for compatibility. - -2002-07-31 John Paul Wallington - - * ibuffer.el (ibuffer-fontification-alist): - Use `font-lock-constant-face' instead of `font-lock-reference-face'. - -2002-07-31 John Wiegley - - * pcomplete.el (pcomplete-comint-setup): Use `add-to-list', to - prevent adding the symbol `pcomplete' to - shell-dynamic-complete-functions to many times. - -2002-07-31 Markus Rost - - * help-fns.el (describe-function-1): Test function for - obsolescence only if it is a symbol. - - * ediff.el (ediff-backup): New autoloaded command. - -2002-07-31 Richard M. Stallman - - * makefile.w32-in (compile-after-backup): Renamed from `compile'. - Use `compile-always'. - (bootstrap): Use `compile', not `compile-files'. Use `update-subdirs'. - (compile): Renamed from `compile-files'. - (compile-CMD, compile-SH): Renamed from `compile-files-*'. - - * emacs-lisp/bytecomp.el (byte-compile-find-cl-functions): - Check that (car elt) is a string. - - * pcomplete.el (pcomplete-entries): Doc fix. - - * international/mule.el (non-standard-icccm-encodings-alist): Doc fix. - -2002-07-31 Andreas Schwab - - * dired.el: Hide disabling of dired-find-alternate-file behind - autoload-cookie. - -2002-07-31 Tak Ota (tiny change) - - * makefile.w32-in: Revert some changes from 2002-07-23 because they - don't work on MSVC/nmake builds. - (update-subdirs-CMD): Generate the right list of subdirectories. - -2002-07-30 Kai Gro,A_(Bjohann - - * net/tramp.el: New version 2.0.5. - (tramp-methods): Remove inline encoding method parameters. - The encoding is now autodetected. Also shorten the list of - methods (u/m distinction gone) and rename the remaining methods to - have longer, but more mnemonic, names. - (tramp-login-prompt-regexp, tramp-password-prompt-regexp) - (tramp-wrong-passwd-regexp): Trailing `$' not needed, regexp is - matched at end of buffer anyway. - (tramp-yesno-prompt-regexp): New variable, for questions where the - user should say "yes" or "no". - (tramp-file-name-structure-unified) - (tramp-file-name-structure-separate): Allow dash in method names. - (tramp-actions-before-shell): New variable, contains list of - pattern/action pairs. Output sent by remote end is scanned for - the patterns, then the actions are executed. - (tramp-multi-actions): Like `tramp-actions-before-shell', but - executed for each hop in a multi-hop connection. - (tramp-last-cmd-time): New variable. If nothing has been sent to - remote end for 60 seconds, look to see if the remote end is still - alive. - (tramp-perl-mime-encode, tramp-perl-mime-decode): Remove. - It didn't work. - (tramp-perl-encode, tramp-perl-decode): New variables, these - require the MIME::Base64 module on the remote end. - (tramp-handle-file-attributes): Restructure logic. - (tramp-handle-file-attributes-with-ls) - (tramp-handle-file-attributes-with-perl): More debugging. - (tramp-handle-directory-files): Grok fifth arg `files-only' for XEmacs. - (tramp-handle-make-directory, tramp-handle-delete-directory) - (tramp-handle-delete-file, tramp-handle-insert-directory): - Expand file name. - (tramp-handle-shell-command): Use `when', not `if'. - (tramp-handle-file-local-copy, tramp-handle-write-region): - Adapt to autodetection of inline encoding. - (tramp-invoke-ange-ftp): Require ange-ftp to make sure that - variable ange-ftp-name-format is defined before binding it. - (tramp-action-login, tramp-action-password, tramp-action-succeed) - (tramp-action-permission-denied, tramp-action-yesno): - Functions called from `tramp-actions-before-shell'. - (tramp-multi-action-login, tramp-multi-action-password) - (tramp-multi-action-succeed, tramp-multi-action-permission-denied): - Functions called from `tramp-multi-actions'. - (tramp-process-one-action, tramp-process-actions): - Pattern matching and action invocation code for - `tramp-actions-before-shell'. - (tramp-process-one-multi-action, tramp-process-multi-actions): - Same for `tramp-multi-actions'. - (tramp-open-connection-telnet, tramp-open-connection-rsh) - (tramp-open-connection-su): Process actions instead of hardwired logic. - (tramp-multi-connect-telnet, tramp-multi-connect-rlogin) - (tramp-multi-connect-su): Ditto. - (tramp-post-connection): New method for tramp_encode and - tramp_decode scripts. - (tramp-post-connection): Invoke inline autodetection code. - (tramp-coding-commands): List of inline codings. - (tramp-find-inline-encoding): This is the inline autodetection code. - (tramp-maybe-open-connection): If nothing was sent to connection - for 60 seconds, look if it connection is still alive. - (tramp-send-command): Remember that something was sent to the - connection. - (tramp-make-tramp-file-name, tramp-make-tramp-multi-file-name): - Use backticks for constructing alist. - (tramp-get-encoding-command, tramp-set-encoding-command) - (tramp-get-decoding-command, tramp-set-decoding-command) - (tramp-get-encoding-function, tramp-set-encoding-function) - (tramp-get-decoding-function, tramp-set-decoding-function): - Use for results of inline autodetection. - (tramp-get-encoding-command, tramp-get-decoding-command) - (tramp-get-encoding-function, tramp-get-decoding-function): - Remove these old functions. - -2002-07-30 Kenichi Handa - - * language/indian.el (in-is13194): Give correct `safe-chars' property. - (devanagari): Define it as an alias of in-is13194. - - * international/mule.el (safe-chars): - Put `char-table-extra-slots' property with value 0. - - * files.el (revert-buffer): Fix previous change. - -2002-07-29 Richard M. Stallman - - * bindings.el (help-echo): If global-mode-string is non-nil, - display some spaces after it. - - * emacs-lisp/bytecomp.el (byte-compile-find-cl-functions): - Don't call string-match on non-string. - - * textmodes/ispell.el (check-ispell-version): Bind default-directory - to avoid errors. Kill the old temp buffer at the beginning. - -2002-07-29 Glenn Morris - - * scroll-all.el (scroll-all-mode): Make argument optional. Doc fix. - -2002-07-29 John Paul Wallington - - * scroll-all.el (scroll-all-mode): Handle numeric arg. Use `if' - instead of `cond'. - -2002-07-29 Kenichi Handa - - * international/mule.el (ctext-post-read-conversion): Add support - for embedded utf-8 encoding (ESC % G ... ESC % @). - -2002-07-28 Kenichi Handa - - * files.el (revert-buffer): Before calling insert-file-contents, - kill the local variable buffer-file-coding-system. - -2002-07-28 Richard M. Stallman - - * bindings.el (mode-line-format): Handle vc-mode specially. - Move mode-line-position to after global-mode-string. - (mode-line-modes): Move the starting 3 spaces out of here. - (mode-line-position): Separate with a space, not dashes. - - * vc-hooks.el: Don't add to minor-mode-alist. - - * emacs-lisp/edebug.el (edebug-debugger): - If inside redisplay, just return. - - * emacs-lisp/debug.el (debug): If inside redisplay, just return. - - * info.el (Info-find-index-name): Improve last change. - -2002-07-27 Richard M. Stallman - - * files.el (file-name-sans-extension): Avoid expanding DIRECTORY. - - * calendar/cal-hebrew.el (diary-rosh-hodesh): Cons mark on - in the third case. - -2002-07-27 Markus Rost - - * ps-print.el: Update copyright year. - (ps-begin-cut-regexp, ps-end-cut-regexp): Fix type. - -2002-07-26 Kai Gro,A_(Bjohann - - * eshell/eshell.el (eshell): Numeric prefix arg means to switch - to the session with that number. Old behavior still available - with nonumeric prefix args. - -2002-07-08 Simon Josefsson - - * mail/mail-extr.el (mail-extr-all-top-level-domains): Update names. - -2002-07-26 Juanma Barranquero - - * warnings.el (lwarn, warn, warning-levels): Doc fix. - (warning-suppress-log-types): Fix typo. - (display-warning): Fix typo. Remove useless assignment to free variable - `group-string'. - -2002-07-25 Markus Rost - - * ediff-wind.el (ediff-window-setup-function): Extend type declaration. - -2002-07-25 Sam Steingold - - * replace.el (occur-rename-buffer): New command. - (occur-mode-map): Bind "r" to it. Added keybindings for - `kill-this-buffer', `clone-buffer' and `quit-window'. - -2002-07-25 Kevin Ryde - - * info.el (Info-find-index-name): Search for a function definition - with a return type. - -2002-07-25 David Ponce - - * emacs-lisp/bytecomp.el (byte-compile-set-symbol-position): - Don't recompute `entry' on each iteration. - (byte-compile-delete-first): Make it defsubst. - -2002-07-25 Sam Steingold - - * progmodes/cc-engine.el (c-search-uplist-for-classkey): - When `search-end' is a cons, use its car. - -2002-07-25 Dave Love - - * obsolete/c-mode.el: Deleted. - -2002-07-25 Carsten Dominik - - * textmodes/reftex.el (reftex-compile-variables): - Simplified regular expression. - - * textmodes/reftex-parse.el (reftex-locate-bibliography-files): - Simplified the regexp. - - * textmodes/reftex-cite.el (reftex-get-bibkey-default): New function. - (reftex-extract-bib-entries-from-thebibliography): - Use `reftex-get-bibkey-default' to get a default regex. - (reftex-extract-bib-entries): Use `reftex-get-bibkey-default' to - get a default regex. - - * textmodes/reftex-toc.el (reftex-toc-mode): Use `make-local-hook' for - XEmacs compatibility (got OK from RMS). - - * textmodes/reftex-index.el (reftex-index-mode): Likewise. - - * textmodes/reftex-sel.el (reftex-select-label-mode): Likewise. - (reftex-select-bib-mode): Likewise. - -2002-07-25 Colin Walters - - * ibuffer.el (ibuffer-mouse-popup-menu): Allow point to be moved - by menu functions. - -2002-07-24 Dave Love - - * international/mule.el (set-auto-coding): Doc fix. - - * international/utf-16.el: New file. - - * language/european.el ("German", "French", "Spanish", "Turkish"): - Add alternative coding systems. - ("Dutch"): Likewise. Add input method. - ("Welsh", "Latin-7"): Add nonascii-translation. - - * language/georgian.el ("Georgian"): Add nonascii-translation. - - * international/titdic-cnv.el: Doc fixes. - (tit-process-header): Add coding cookie. - (titdic-convert): Force writing as iso-2022-7bit. - - * international/ja-dic-cnv.el (skkdic-convert): Add coding cookie. - - * international/mule-cmds.el: Doc fixes. - (unencodable-char-position): New. - (select-safe-coding-system): Use it to indicate problematic - characters and add extra explanation. Avoid checking auto-coding - for compressed files. - (leim-list-header): Add coding cookie. - (input-method-verbose-flag): Modify :type. - (locale-language-names): Add bs, wa. Modify cy. - -2002-07-24 Richard M. Stallman - - * emacs-lisp/bytecomp.el (byte-compile-log-warning): - Bind warning-group-format. - - * emacs-lisp/bytecomp.el (byte-compile-cl-functions): New variable. - (byte-compile-cl-warn): Use that variable. - (byte-compile-find-cl-functions): New function. - (displaying-byte-compile-warnings): - Call byte-compile-find-cl-functions. - - * warnings.el (warning-levels): Add %s to the strings. - (warning-group-format): New variable. - (warning-suppress-log-types): Renamed from warning-suppress-log. - (warning-suppress-types): Renamed from warning-suppress. - (display-warning): Implement those changes. - -2002-07-23 Richard M. Stallman - - * warnings.el: Add `provide' call. - - * files.el (basic-save-buffer-2): If there's an error writing the file, - unrename the backup file if it was just made. - (backup-buffer, basic-save-buffer-2, basic-save-buffer-1) - (basic-save-buffer): Value now has form (MODES . BACKUPNAME) - when a backup was just made by renaming. Otherwise it's nil. - - * wid-edit.el (widget-convert): Handle an argument that's a keyword. - Recognize explicit :args specification. - - * international/mule-cmds.el (select-safe-coding-system): - Don't ask for confirmation of mismatch if find-file-literally was used. - -2002-07-23 Markus Rost - - * add-log.el (add-log-current-defun): Fix typo in documentation. - -2002-07-22 Markus Rost - - * add-log.el (add-log-mailing-address): Fix type. Can be a string. - - * ido.el (ido-separator): Fix type. - -2002-07-23 Andrew Innes - - * makefile.w32-in (DONTCOMPILE): Remove cus-start.el. - (DONTCOMPILE): Add various language files. - (DONTCOMPILE): Remove term/xterm.el. - (finder-inf.el): Remove. - (update-authors): New target. - (TAGS-LISP): Remove $(lispsource). - (compile-always): Renamed from `compile-files'. - (compile): New target, adapted from `compile-files'. - (compile-calc): New target. - (recompile): Change `.' to $(lisp). - (bootstrap): Add update-subdirs and finder-data - to dependencies; change compile-files to compile. - -2002-07-22 Andre Spiegel - - * vc.el (vc-next-action-on-file): Preserve find-file-literally. - -2002-07-22 Dan Nicolaescu - - * simple.el (undo, undo-more): Adjust messages when undoing in a - region. - -2002-07-22 John Paul Wallington - - * net/browse-url.el (browse-url-lynx-input-attempts): Use defcustom. - (browse-url-lynx-input-delay): Add custom type and group. - - * cus-start.el (double-click-fuzz): Added. - -2002-07-22 Alan Shutko - - * calendar/solar.el (diary-sabbath-candles): Add optional MARK - parameter, specifying what face or character to use in the - calendar display. These will now return (MARK . ENTRY). - - * calendar/lunar.el (diary-phases-of-moon): Add optional MARK - parameter, specifying what face or character to use in the - calendar display. These will now return (MARK . ENTRY). - - * calendar/cal-hebrew.el (diary-omer, diary-yahrzeit) - (diary-rosh-hodesh, diary-parasha, diary-parasha): Add optional - MARK parameter, specifying what face or character to use in the - calendar display. These will now return (MARK . ENTRY). - - * calendar/diary-lib.el (mark-sexp-diary-entries): Retrieve mark - from diary-sexp-entry and pass it to mark-visible-calendar-date. - (list-sexp-diary-entries): Update doc string for new docs for .... - If diary-sexp-entry returns a cons, only add the text to the diary - list. - (diary-sexp-entry): Allow sexps to return a cons of the form (MARK - . STRING) to specify what face or character mark should be used in - the calendar display. - (diary-date, diary-block, diary-float, diary-anniversary) - (diary-cyclic): Add optional MARK parameter, specifying what face - or character to use in the calendar display. These will now - return (MARK . ENTRY). - - * calendar/diary-lib.el (check-calendar-holidays, diary-iso-date) - (calendar-holiday-list, diary-french-date, diary-mayan-date) - (diary-julian-date, diary-astro-day-number, diary-chinese-date) - (diary-islamic-date, list-islamic-diary-entries) - (mark-islamic-diary-entries, mark-islamic-calendar-date-pattern) - (diary-hebrew-date, diary-omer, diary-yahrzeit, diary-parasha) - (diary-rosh-hodesh, list-hebrew-diary-entries) - (mark-hebrew-diary-entries, mark-hebrew-calendar-date-pattern) - (diary-coptic-date, diary-persian-date, diary-phases-of-moon) - (diary-sunrise-sunset, diary-sabbath-candles): - Remove interactive flag from autoloads. - -2002-07-22 Carsten Dominik - - * textmodes/reftex-vars.el (reftex-index-verify-function): New option. - (reftex-bibliography-commands): New option. - (reftex-toc-split-windows-horizontally): New option - (reftex-toc-split-windows-horizontally-fraction): New option - (reftex-include-file-commands): New option. - (reftex-cite-format-builtin): Added ?n for nocite. - - * textmodes/reftex-index.el (reftex-query-index-phrase): - Use `reftex-index-verify-function'. - - * textmodes/reftex-toc.el (reftex-re-enlarge): - Handle horizontal splitting. - (reftex-toc): Handle horizontal splitting - (reftex-last-window-width): New variable. - - * textmodes/reftex-parse.el (reftex-locate-bibliography-files): - Use `reftex-bibliography-commands'. - (reftex-locate-bibliography-files): Regexp relaxed to allow for - cases where \bibliography is not the first thing on the line. - - * textmodes/reftex.el (reftex-compile-variables): - Use `reftex-include-file-commands'. - (reftex-type-query-prompt): Changed defconst to defvar. - (reftex-type-query-help, reftex-typekey-to-format-alist) - (reftex-typekey-to-prefix-alist, reftex-env-or-mac-alist) - (reftex-special-env-parsers, reftex-label-mac-list) - (reftex-label-env-list, reftex-typekey-list) - (reftex-words-to-typekey-alist, reftex-key-to-index-macro-alist) - (reftex-query-index-macro-prompt, reftex-query-index-macro-help) - (reftex-no-follow-message, reftex-no-info-message): Likewise. - (reftex-mode): Define systax table for bibtex parsing. - (reftex-syntax-table-for-bib): Syntax table for bibtex parsing. - - * textmodes/reftex-cite.el (reftex-format-names): %a as name - format lists all names. - (reftex-parse-bibtex-entry): Use `reftex-syntax-table-for-bib'. - (reftex-with-special-syntax-for-bib): New macro. - -2002-07-21 Richard M. Stallman - - * international/ucs-tables.el (ucs-quail-activate): - Cope if buffer-file-coding-system is nil. - - * bindings.el (last-buffer): Use buffer-list with frame arg. - Create *scratch* if no other choice exists. Fix bugs. - -2002-07-21 Kai Gro,A_(Bjohann - - * net/tramp.el: Bump version to 2.0.2. - (tramp-methods): Rename methods invoking "ssh1" or "ssh2" to - longer names. Use old names "sm1", "sm2" and so on for methods - invoking "ssh -1" or "ssh -2". - (tramp-multi-file-name-structure-separate): Typo, its name was set - to "tramp-file-name-structure-separate". Trivial patch. - From Steve Youngs . - (tramp-multi-sh-program): New variable. - (tramp-open-connection-multi): Use it. Now you can use multi - methods from Windows (at least in principle). - (tramp-do-copy-or-rename-via-buffer): New function. - (tramp-do-copy-or-rename-file): Use it. Change and simplify - logic. Omit special case of invoking rcp directly to copy the files. - (tramp-open-connection-su, tramp-multi-connect-telnet) - (tramp-multi-connect-rlogin, tramp-multi-connect-su) - (tramp-make-tramp-file-name, tramp-make-tramp-multi-file-name): - Use backticks in format-spec for brevity and to avoid - character/number confusion in XEmacs. - -2002-07-20 Richard M. Stallman - - * wid-edit.el (widget-documentation-string-value-create): - Say "Hide Rest", not just "Hide". - - * cus-edit.el (custom-variable-value-create): - Say "Show Value", not just "Show". Also "Hide Value". - Output a newline before the doc string. - (custom-face-value-create): Say "Show Face" and "Hide Face". - - * files.el (toggle-read-only): Clean up the hint message. - - * emacs-lisp/bytecomp.el: Use warnings.el. - (byte-compile-warning-prefix): New function. - (byte-compile-log-file): Return page start position. - (byte-compile-log-warning): New function. - (byte-compile-warn): Use byte-compile-log-warning. - (byte-compile-report-error): Likewise. Also use error-message-string. - (displaying-byte-compile-warnings): Bind warning-series. - Don't bind or use byte-compile-warnings-point-max. - Don't display the log buffer at the end. - (byte-compile-warnings-point-max): Variable deleted. - (byte-compile-log-1): Rewrite for trace info, not used for warnings. - (byte-compile-last-warned-form, byte-compile-last-logged-file): - Defvars moved. - - * warnings.el: New file. - -2002-07-19 Richard M. Stallman - - * emacs-lisp/bytecomp.el (byte-compile-cl-warn): Delete `values' - and `values-list' from list of CL functions. - -2002-07-19 John Paul Wallington - - * emacs-lisp/bytecomp.el (compile-defun): - Bind `read-with-symbol-positions' to current buffer. - -2002-07-19 Andre Spiegel - - * vc-hooks.el (vc-insert-file): When called with a LIMIT regexp, - delete anything that comes after LIMIT from the buffer. - - * vc-rcs.el (vc-rcs-fetch-master-state): Be more careful to check - if this is really an RCS master file. - - * vc.el: Improve comment of vc-BACKEND-workfile-unchanged-p. - -2002-07-19 Juanma Barranquero - - * emacs-lisp/bytecomp.el (dot, dot-max, dot-min, dot-marker) - (buffer-flush-undo, baud-rate, compiled-function-p, define-function) - (unread-command-char, executing-macro, post-command-idle-hook) - (post-command-idle-delay): Move obsolescence declarations to subr.el. - - * subr.el (dot, dot-max, dot-min, dot-marker, buffer-flush-undo) - (baud-rate, compiled-function-p, define-function, unread-command-char) - (executing-macro, post-command-idle-hook, post-command-idle-delay): - Move obsolescence declarations from emacs-lisp/bytecomp.el. - (directory-sep-char, mode-line-inverse-video): - Add obsolescence declaration. - -2002-07-18 J.D. Smith - - * progmodes/idlwave.el: Updated to IDLWAVE version 4.14. Too many - changes to list them here. - - * progmodes/idlw-shell.el: Updated to IDLWAVE version 4.14. - Too many changes to list them here. - - * progmodes/idlw-rinfo.el: Updated to IDLWAVE version 4.14. - Too many changes to list them here. - - * progmodes/idlw-toolbar.el: Updated to IDLWAVE version 4.14 with - only minor documentation changes. - -2002-07-18 Dave Love - - * info-look.el: Support current auto{conf,make} manuals. - -2002-07-18 Juanma Barranquero - - * bindings.el (last-buffer): Add missing frame argument. - -2002-07-18 Richard M. Stallman - - * timer.el (timer-inc-time): Doc fix. - - * replace.el (keep-lines, flush-lines): Interactively report - read-only error before reading regexp argument. - - * dabbrev.el (dabbrev--search): Use inhibit-point-motion-hooks. - - * bindings.el (last-buffer): Handle buffer-list and buffer-predicate - frame parameters like bury-buffer. - - * simple.el (choose-completion-delete-max-match): - Handle minibuffer prompts explicitly. - -2002-07-18 Juanma Barranquero - - * international/mule-util.el (string-to-sequence, truncate-string): - Add autoload cookie to obsolescence declaration. - - * rect.el (move-to-column-force): Likewise. - - * composite.el (decompose-composite-char): Likewise; also remove - redundant info. - -2002-07-18 Kim F. Storm - - * loadup.el: Load international/utf-8 before international/characters. - -2002-07-17 Dave Love - - * international/ucs-tables.el: Optimize tables. Deal with some - non-8859 charsets. - (ucs-mule-to-mule-unicode): New. - (ucs-unify-8859): Use utf-8-fragment-on-decoding, set up Quail - translation. - (ucs-fragment-8859): Modified consistent with ucs-unify-8859. - (unify-8859-on-encoding-mode): Doc mod. Fix custom version. - (unify-8859-on-decoding-mode): Doc mod. Change code. Fix custom - version. Add custom dependencies. - (ucs-insert): Check for null from decode-char. - (translation-table-for-input, ucs-quail-activate) - (ucs-minibuffer-setup, ccl-encode-unicode-font) - (ucs-tables-unload-hook): New. - - * international/mule.el (define-translation-hash-table): New. - (decode-char): Use utf-8-translation-table-for-decode. - (encode-char): Use ucs-mule-to-mule-unicode. - - * international/characters.el: Fix settings of U+2000-U+2027. - Remove $(C'Y(B. - - * international/mule-cmds.el (locale-language-names): Fix be, add - sr_YU@cyrillic, modify tg. - (locale-charset-language-names): Put @euro last. - - * language/cyrillic.el (cyrillic-koi8-r-decode-table) - (cyrillic-alternativnyj-decode-table): Fill out with mule-unicode. - (cyrillic-koi8-r-decode-table): Make unbound after use. - (ccl-decode-koi8, ccl-decode-alternativnyj): Change expansion - factor. Use utf-8-translation-table-for-decode. - (ccl-encode-koi8, ccl-encode-koi8): Don't check r0. - (cyrillic-unify-encoding): New function. - (cyrillic-koi8): Modify safe-chars, valid-codes. - Remove charset-origin-alist. - (Cp878, cp866): New alias. - (ccl-encode-8859-5-font): New. - (font-ccl-encoder-alist): Add ccl-encode-8859-5-font. - (ccl-encode-koi8-font, ccl-encode-alternativnyj-font): - Remove redundant parens. - ("Cyrillic-KOI8"): Add cyrillic-iso-8bit to coding-priority. - (cyrillic-koi8-u-decode-table, ccl-decode-koi8-u) - (ccl-encode-koi8-u, koi8-u, ccl-encode-koi8-u-font, "Ukrainian"): New. - (cyrillic-alternativnyj): Modify safe-chars, add mime-charset. - ("Cyrillic-ALT"): Change input method. - ("Windows-1251", "Tajik", "Bulgarian", "Belarusian"): New. - - * international/utf-8.el (utf-8-subst-table) - (utf-8-subst-rev-table, utf-8-translation-table-for-decode) - (utf-8-fragment-on-decoding, ccl-untranslated-to-ucs) - (utf-8-ccl-regs, utf-8-translate-cjk): New. - (ccl-encode-mule-utf-8): Use utf-8-subst-rev-table. - (ccl-decode-mule-utf-8, ccl-untranslated-to-ucs) - (utf-8-untranslated-to-ucs, utf-8-compose): Rewritten. - (mule-utf-8): Remove pre-write-conversion. - (utf-8-post-read-conversion): Comment out. - - * international/ccl.el (ccl-command-table): Add lookup-integer, - lookup-character. - (ccl-extended-code-table): Add lookup-int-const-tbl, - lookup-char-const-tbl. - (ccl-compile-lookup-integer, ccl-compile-lookup-character) - (ccl-dump-lookup-int-const-tbl, ccl-dump-lookup-char-const-tbl): - New functions. - (define-ccl-program): Doc update. - - * international/utf-8-subst.el: Populate utf-8-subst-rev-table. - (utf-8-subst-table): Don't set. - -2002-07-17 Kenichi Handa - - * international/mule.el (define-coding-system-alias): - Don't append ALIAS in the property `alias-coding-systems' if ALIAS's - eol-type is not auto-detection. - - * international/mule-diag.el (print-coding-system-briefly): - Fix the handling of an alias of which eol-type is not auto-detection. - - * international/mule-conf.el (us-ascii): Define it as an alias of - iso-safe. - -2002-07-17 Juanma Barranquero - - * help-fns.el (describe-function-1): Put empty line before "Not - documented" text. - - * timer.el (timer-set-time-with-usecs): Mark obsolete. - -2002-07-16 Stefan Monnier - - * toolbar/tool-bar.el (tool-bar-add-item-from-menu): - Make sure to change the global tool-bar-map. - - * vc.el (vc-default-comment-history): Hard code *vc*. - This is because print-log always prints there now. - (vc-annotate-font-lock-keywords): New var. - (vc-annotate-mode): Use it. Set truncate-lines as well. - (vc-annotate-display-select): Unify the two error reports. - (vc-annotate-offset): New var. - (vc-annotate-lines): New fun extracted from vc-annotate-display. - (vc-annotate-display): Use it, via font-lock. - - * help-fns.el (help-split-fundoc, help-function-arglist) - (help-make-usage): New funs, extracted from describe-function-1. - (describe-function-1): Use them. - - * help.el (help-key-description): Show the untranslated keys - when they start with ESC and the ESC was not translated. - - * help-mode.el (view): Always require. - (help-xref-mule-regexp): Don't use defconst for variables. - (help-setup-xref): Keep the last 10 elements of the stack. - (help-xref-override-view-map): New var. - (help-make-xrefs): Use it instead of building a new map each time. - (help-function-def): Allow help-fun to take a buffer as arg. - - * diff-mode.el (diff-reverse-direction): Simplify. - (diff-after-change-function): Fix typo. - (diff-post-command-hook): Take care of edge cases. - (diff-current-defun): Do `goto-char' after setting the mode. - - * mouse-sel.el (mouse-sel-mode): Use define-minor-mode. - Fold mouse-sel-bindings into it. - (mouse-sel-bound-events): Turn it into an alist. - (mouse-insert-selection): Delegate to mouse-yank-at-click if - mouse-sel-default-bindings asks for it. - -2002-07-16 Andre Spiegel - - * files.el: Bind toggle-read-only to C-x C-q. - (toggle-read-only): Display a warning message if the file is under - version control. - - * vc-hooks.el: Don't bind vc-toggle-read-only to C-x C-q. - (vc-toggle-read-only): Explain in the doc string that users can bind - this to C-x C-q. - (vc-checkout-model): Change doc string to refer to vc-next-action, - not vc-toggle-read-only. - - * vc.el (vc-next-action-on-file): Ignore buffer-read-only while - comparing to file on disk. Fix the case when claiming the lock - on a file that has unlocked changes. - (vc-log-mode): Don't mention vc-toggle-read-only in the doc string. - -2002-07-16 Richard M. Stallman - - * simple.el (choose-completion-string): Doc fix. - - * cus-edit.el: New operation :custom-standard-value. - (Custom-reset-standard): Use it. - (custom-variable, custom-face): Define it. - (custom-variable-standard-value, custom-face-standard-value): New fns. - (custom-face-save): Don't save a face whose value is standard. - (custom-save-faces): Use SYMBOL, not 'default, to set NOW and COMMENT. - - * cus-edit.el (custom-face-edit-fix-value): - If VALUE is not a list, pass it thru. - - * compare-w.el (compare-windows-whitespace): Always allow newline - even if it does not have whitespace syntax. - -2002-07-16 Juanma Barranquero - - * timer.el (timer-set-time, timer-set-time-with-usecs): Fix docstring. - -2002-07-15 Juanma Barranquero - - * help-fns.el (describe-variable): Show documentation for aliased - variable if alias does not have its own. - -2002-07-15 Mike Williams - - * mouse-sel.el (mouse-sel-bindings): Save/restore interprogram - cut/paste functions. - -2002-07-14 Richard M. Stallman - - * files.el (find-alternate-file): Offer to save a modified buffer. - Handle kill-buffer-query-functions better. - - * startup.el (normal-splash-screen, fancy-splash-text): - Update name of help menu item for ordering printed manuals. - - * emacs-lisp/checkdoc.el: Fix doc typos. - -2002-07-14 Stefan Monnier - - * textmodes/tex-mode.el: Set encoding to utf-8. - (tex-start-options): Make it into always-a-string. - Remove silly custom options that are covered by the other var. - (tex-start-commands): Fix docstring. - (tex-open-quote, tex-close-quote): Add options. - (tex-command): Provide default. - (tex-font-lock-keywords-1): Highlight $$...$$. - (tex-font-lock-keywords-2): Fix latin-1 chars. - (tex-mode-map): Remove redundant \t binding. - (tex-mode): Add `subsection' and `newcommand' to known latex cmds. - (latex-mode): Use add-hook for fill-nobreak-predicate. - (tex-common-initialization): Set indent-tabs-mode to nil. - (tex-insert-quote): Undo magic if invoked twice in a row. - (latex-fill-nobreak-predicate): Don't use narrowing. - (tex-latex-block): Don't cons uselessly. - (tex-last-unended-begin): Signal user-friendlier error. - (tex-goto-last-unclosed-latex-block): Don't catch signal. - (tex-start-tex): Switch order of tex-start-options and - tex-start-commands to make it obey docstrings. - -2002-07-14 Mike Williams - - * mouse-sel.el (mouse-sel-bound-events): New constant. - (mouse-sel-bindings): Save/restore original mouse-bindings. - -2002-07-13 Stefan Monnier - - * emacs-lisp/cl.el (cl-set-substring): Fix thinko. - (cl-hack-byte-compiler): Avoid infinite require loop. - - * net/ange-ftp.el: Use hash-tables. - (ange-ftp-make-hashtable, ange-ftp-map-hashtable) - (ange-ftp-make-hash-key, ange-ftp-get-hash-entry) - (ange-ftp-put-hash-entry, ange-ftp-del-hash-entry): Remove. - Replace with make-hash-table, maphash, gethash, puthash and remhash. - (ange-ftp-hash-entry-exists-p): Rewrite. - (ange-ftp-vms-delete-file-entry, ange-ftp-vms-add-file-entry): - Change mapatom -> maphash. - (ange-ftp-file-entry-active-p, ange-ftp-file-entry-not-ignored-p): - Update to new calling mode. - - * progmodes/ebrowse.el (ebrowse-symbol-regexp): Avoid cl-set-substring. - (ebrowse-hash-table-to-alist): Delete. - (ebrowse-tags-read-name, ebrowse-tags-list-members-in-file) - (ebrowse-tags-complete-symbol): Use the hashtable for completion. - - * textmodes/sgml-mode.el (sgml-quote): Use narrowing. - Improve the regexp used when unquoting. - (sgml-pretty-print): New function. - (sgml-get-context): Better handling of improperly nested tags. - (sgml-show-context): Don't use the FULL arg of sgml-get-context. - -2002-07-13 Andreas Schwab - - * mail/mailabbrev.el (mail-abbrev-make-syntax-table): Check the - inherited table entry. - -2002-07-13 Glenn Morris - - * calendar/timeclock.el (timeclock-in): Handle the case where no - log file exists (ie the very first call). - -2002-07-13 Kai Gro,A_(Bjohann - - * net/ange-ftp.el: Do not hook into file-name-handler-alist, this - is done by Tramp. - - * net/tramp.el (tramp-multi-file-name-structure-unified): - Add missing slash and move colon from start to end of each hop. - (tramp-multi-file-name-hop-structure-unified): Move colon from - start to end of each hop. - -2002-07-13 Kim F. Storm - - * progmodes/compile.el (grep-tree): Fixed autoload. - Corrected use of undefined variable `match-files-aliases'. - -2002-07-12 Glenn Morris - - * calendar/timeclock.el (timeclock-get-workday-function): - `timeclock-workday' is not a valid option, rather a possible - return value. - -2002-07-12 Richard M. Stallman - - * net/ange-ftp.el (ange-ftp-write-region): - Don't bind executing-kbd-macro; instead, pass non-nil VISIT arg - to ange-ftp-real-write-region. - - * replace.el (flush-lines, keep-lines): Convert REND to a marker. - - * help-fns.el (help-with-tutorial): Display completion list right away. - - * ediff-ptch.el (ediff-test-patch-utility): Catch error and return nil. - - * startup.el (command-line): Set memory-signal-data. - (fancy-splash-text, normal-splash-screen): - Mention "Read the Emacs Manual" or C-h r. - Rearrange the initial help to put the help cmds on left - and the actions (exit, undo) on the right. Other small - text clarifications. - (fancy-splash-text, actions page): Add blank line to balance help page. - - * help.el (help-map): Add binding for info-emacs-manual. - (print-help-return-message): Doc fix. - - * strokes.el (strokes-help): Call print-help-return-message - while inside with-output-to-temp-buffer. - - * info.el (info-emacs-manual): New function. - (Info-use-header-line): Doc fix. - - * emacs-lisp/cl.el (multiple-value-call): Add alias. - - * progmodes/compile.el (compilation-normalize-filename): - New subroutine, taken out of compilation-parse-errors. - (compilation-parse-errors): Use that, and for directories too. - Don't check whether a directory really exists. - -2002-07-12 Juanma Barranquero - - * help-fns.el (describe-variable): Remove useless "Documentation:" - string. - - * timer.el (timer-set-time-with-usecs): Fix documentation. - Simplify extraction of time data. - -2002-07-12 John Paul Wallington - - * help-fns.el (describe-variable): Mention if the variable is an - alias. Put `defvaralias' info before the documentation. - -2002-07-12 Kenichi Handa - - * international/mule-cmds.el (locale-language-names): Change "mk" - (Macedoninan), "ru" (Russian), and "sp" (Serbian with Cyrillic - alphabet) to "Cyrillic-ISO". - -2002-07-11 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-default-method): New default method "sm" - which I guess to be good for most people. - (tramp-default-method-alist): Use "ftp" method (ie, forwarding to - Ange-FTP) for some user/host combinations. - (tramp-file-name-structure, tramp-file-name-regexp) - (tramp-make-tramp-file-format, tramp-make-tramp-file-user-nil-format) - (tramp-multi-file-name-structure, tramp-multi-file-name-hop-structure) - (tramp-make-multi-tramp-file-format): New default value which - unifies the filename syntax between Tramp and Ange-FTP. The new - syntax is "/method:user@host:path". Note the colon after the method. - (tramp-handle-file-name-directory): Don't return "/" when - completing a remote root directory (where the filename looks like - "/method:user@host:/"). - (tramp-handle-ange-ftp): Deleted. - (tramp-disable-ange-ftp): New function, called at toplevel, - deletes Ange-FTP from file-name-handler-alist. - (tramp-handle-make-symbolic-link): Implement. - -2002-07-10 Juanma Barranquero - - * ido.el (ido-enter-single-matching-directory): Delete leftover comment. - - * speedbar.el (speedbar-tag-hierarchy-method): Fix typos. - (speedbar-vc-do-check): Likewise. - (speedbar-obj-do-check): Likewise. - (speedbar-mouse-hscroll): Likewise. - (speedbar-file-lists): Likewise. - - * emacs-lisp/authors.el (authors-obsolete-file-p): Fix typo. - -2002-07-09 Ole Aamot - - * compile.el (compilation-error-regexp-alist): - Recognize Valgrind messages. - -2002-07-09 Juanma Barranquero - - * faces.el (face-id): Fix typo. - - * hexl.el (hexl-mode): Likewise. - - * progmodes/idlw-shell.el (idlwave-shell-set-bp): Likewise. - - * progmodes/ebnf-yac.el (ebnf-yac-error): Likewise. - - * speedbar.el (speedbar-make-specialized-keymap): Fix docstring. - (speedbar-desired-buffer): Likewise. - (speedbar-line-file): Likewise. - (speedbar-special-mode-key-map): Fix typo. - (speedbar-dynamic-tags-function-list): Likewise. - (speedbar-use-images): Likewise. - (speedbar-up-directory): Likewise. - (speedbar-item-info): Likewise. - (speedbar-set-timer): Likewise. - (speedbar-insert-button): Likewise. - (speedbar-make-button): Likewise. - (speedbar-make-tag-line): Likewise. - (speedbar-insert-files-at-point): Likewise. - (speedbar-update-special-contents): Likewise. - (speedbar-find-selected-file): Likewise. - (speedbar-add-indicator): Likewise. - (speedbar-do-function-pointer): Likewise. - (speedbar-goto-this-file): Likewise. - (speedbar-line-path): Likewise. - (speedbar-mouse-event-p): Likewise. - (speedbar-dir-follow): Likewise. - (speedbar-tag-find): Likewise. - (speedbar-fetch-etags-command): Likewise. - (speedbar-fetch-etags-arguments): Likewise. - (speedbar-toggle-etags): Likewise. - (speedbar-extract-one-symbol): Likewise. - (speedbar-parse-c-or-c++tag): Likewise. - (speedbar-unhighlight-one-tag-line): Likewise. - (speedbar-directory-face): Likewise. - (defimage-speedbar): Likewise. - (speedbar-convert-emacs21-imagespec-to-xemacs): Likewise. - -2002-07-09 Miles Bader - - * hexl.el (hexl-find-file): Bind `completion-ignored-extensions' - to nil when prompting for a filename. - -2002-07-09 Kenichi Handa - - * files.el (insert-directory): Be sure to bind - coding-system-for-write to the just decided coding-system-for-read. - -2002-07-09 Kim F. Storm - - * ido.el (ido-make-merged-file-list): Move fully matching item to - head of list. - (ido-find-common-substring): Return substring instead of t. - -2002-07-08 Juanma Barranquero - - * info.el (Info-directory-list): Fix docstring. - -2002-07-08 Miles Bader - - * comint.el (comint-dynamic-list-completions): Sort COMPLETIONS - before first use. - -2002-07-08 Kim F. Storm - - * files.el (after-find-file): Don't check for read-only status - of files just created (and not yet saved on disk). - - * ido.el (ido-completion-help): Changed xemacs specific code to - avoid byte compiler warning in GNU emacs. - (ido-set-matches1): Use regexp-quote instead of identity. - (ido-complete-space): New function. - (ido-define-mode-map): Bind it to SPACE. - -2002-07-07 Stefan Monnier - - * font-lock.el (font-lock-default-unfontify-region): - Use remove-list-of-text-properties. - (font-lock-extra-managed-props): Doc fix. - - * facemenu.el: Move `provide' to the end. - (facemenu-read-color): Don't cons unnecessarily. - - * language/ind-util.el (indian-make-hash): - * language/devan-util.el (dev-char-glyph-hash, dev-glyph-glyph-hash) - (dev-glyph-glyph-2-hash): Switch makehash -> make-hash-table. - - * subr.el (insert-string): Update the obsolete info. - (makehash): Move from C and mark obsolete. - - * emacs-lisp/debug.el (debug-on-entry): Fix the wrapper used for - aliases to also work for interactive functions. - Use the same wrapper for subroutines. - (cancel-debug-on-entry): Get rid of the now-useless wrapper. - (debug-on-entry-1): Correctly skip docstrings and interactive forms. - - * textmodes/texinfo.el (texinfo-font-lock-keywords): Disable the - automatic environment name update. - (texinfo-clone-environment): Fix it not to incorrectly match prefixes. - -2002-07-07 Richard M. Stallman - - * emacs-lisp/easymenu.el (easy-menu-popup-menu): Function deleted. - - * emacs-lisp/advice.el (ad-compile-function): - Disable cl-function warnings if cl is loaded. - - * files.el (safe-local-eval-forms): New user option. - (hack-one-local-variable-eval-safep): Support it. - Also allow `safe-local-eval-function' property to be a function - or a list of functions. - (c-add-style): Delete `safe-local-eval-function' property. - - * files.el (after-find-file): Make buffer read-only if file is - marked that way, even for root. - - * files.el (save-some-buffers): Doc fix. - - * bindings.el (completion-ignored-extensions): Add .gmo and .mo. - -2002-07-06 Francesco Potort,Al(B - - * dos-w32.el (file-name-buffer-file-type-alist): Add knowledge of - .sx[dmicw] file suffixes for Open office data files. - - * files.el (auto-mode-alist): Likewise. - - * international/mule.el (auto-coding-alist): Likewise. - -2002-07-05 Kim F. Storm - - * emulation/cua-rect.el (cua--rectangle-operation): Don't call - FCT if current column is outside rectangle. - (cua--delete-rectangle): Do nothing if zero width or out of bounds. - -2002-07-04 Stefan Monnier - - * net/ange-ftp.el: Use add-hook and find-file-hook. - (ange-ftp-parse-netrc): Use run-hooks and find-file-hook. - (ange-ftp-ls-parser): Make it into a function. - Ignore trailing @ in symlink targets. - (ange-ftp-file-entry-p): Ignore FTP errors. - (ange-ftp-insert-directory): Use ange-ftp-expand-symlink - to correctly expand "/flint:/bla -> ./etc" to /flint:/etc. - -2002-07-04 Per Abrahamsen - - * simple.el (toggle-truncate-lines): New command. - -2002-07-04 Miles Bader - - * comint.el (comint-displayed-dynamic-completions): New variable. - (comint-dynamic-list-completions): Be more careful about choosing - when to scroll an existing completions window. - -2002-07-03 Andreas Schwab - - * net/tramp.el (tramp-handle-ange-ftp): Move interactive spec - after doc string. - -2002-07-03 Juanma Barranquero - - * net/tramp.el (tramp-send-eof): Fix typo. - (tramp-kill-process): Likewise. - - * play/dunnet.el (dun-physobj-desc): Likewise. - - * textmodes/reftex-vars.el (reftex-label-alist): Likewise. - - * calendar/timeclock.el (timeclock-workday-remaining): Likewise. - (timeclock-workday-elapsed): Likewise. - - * allout.el (outline-goto-prefix): Likewise. - - * emulation/tpu-edt.el (tpu-delete-to-eol): Likewise. - (tpu-delete-to-bol): Likewise. - - * subr.el (chars-in-region): Add obsolescence declaration for - `chars-in-region'. - -2002-07-03 Miles Bader - - * faces.el (header-line): Don't use a `common' clause for - inheriting from the mode-line face, since we can't override it, - and we don't want it for ttys. - -2002-07-02 Richard M. Stallman - - * net/ange-ftp.el (ange-ftp-hook-function): Add file-remote-p prop. - - * files.el (hack-one-local-variable-constantp): New function. - (hack-one-local-variable-eval-safep): New function. - Check for `eval:' calling fn with `safe-local-eval-function' property. - (hack-one-local-variable): Use hack-one-local-variable-eval-safep. - (c-add-style, c-set-style): Add safe-local-eval-function property. - - * files.el (insert-directory): Handle --dired option to ls. - - * files.el (file-remote-p): New function. - - * emacs-lisp/easymenu.el (easy-menu-popup-menu): New function. - - * startup.el (fancy-splash-screens): Switch to a chosen frame. - (fancy-splash-frame): Choose the right frame to use. - (use-fancy-splash-screens-p): Check dimensions of the right frame - in order to decide. - - * emacs-lisp/bytecomp.el (byte-compile-warning-types): - Rename cl-func to cl-functions. Enable it by default. - (byte-compile-file-form-eval-boundary): Turn off cl-functions warnings - if the file loads cl. - (byte-compile-initial-macro-environment): For eval-and-compile, - use byte-compile-eval-before-compile to eval. - (byte-compile-eval-before-compile): New function to turn off - cl-functions when appropriate, for eval-and-compile. - (byte-compile-warnings): Doc fix. - -2002-07-02 Dave Love - - * emacs-lisp/bytecomp.el (byte-compile-warnings): Add cl-func option. - (byte-compile-cl-warn): New function. - (byte-compile-form): Use it, to warn about calling cl functions. - (byte-compile-warning-types): Doc fix. - -2002-07-02 Juanma Barranquero - - * mail/rmailsum.el (rmail-user-mail-address-regexp): Fix typo. - - * textmodes/reftex-cite.el (reftex-citation): Fix typo. - - * progmodes/cperl-mode.el (cperl-break-one-line-blocks-when-indent): - Fix typo. - -2002-07-02 Kim F. Storm - - * emacs-lisp/bindat.el: New file. - -2002-07-01 Sam Steingold - - * textmodes/tex-mode.el (tex-file): Call `save-some-buffers' - before `tex-main-file' because if the current buffer is new, its - file might not exist yet, and then `tex-main-file' will - incorrectly return "foo.tex.tex". - -2002-07-01 Juanma Barranquero - - * ido.el (ido-minibuffer-setup-hook): Doc fix. - -2002-07-01 Dave Love - - Make strokes a proper minor mode, and don't try to overload - mouse-2, which doesn't work satisfactorily. - - * strokes.el: Doc fixes. - (strokes-mode): Defcustom deleted; replaced by minor mode def with - re-written function. - (strokes-while-inhibiting-garbage-collector): Comment out. - (define-stroke, strokes-fix-button2-command, strokes-insinuated) - (strokes-insinuate, global-set-stroke, describe-stroke) - (load-user-strokes, save-strokes, strokes-bug-address) - (strokes-click-command): Deleted. - (strokes-execute-stroke): Remove strokes-click-p case. - (strokes-describe-stroke): Remove strokes-click-p stuff. - (strokes-help): Fix. - (strokes-report-bug): Alias to report-emacs-bug. - (strokes-prompt-user-save-strokes): Modify format of the file. - (strokes-mode-map, strokes-unload-hook): New. - (strokes-buffer-name): Don't customize. - -2002-07-01 Richard M. Stallman - - * info.el (Info-index): Get immediate error if used in `dir'. - - * textmodes/picture.el (picture-forward-column) - (picture-move-down): Never deactivate the mark. - -2002-06-30 Simon Josefsson - - * menu-bar.el (menu-bar-options-menu): Move elisp mode names from - menu entry into balloon help. - -2002-06-30 Andreas Schwab - - * files.el (directory-free-space-args): Don't use `-P' on Darwin. - * term/mac-win.el: Don't set it here. - -2002-06-29 Stefan Monnier - - * pcvs-defs.el (cvs-mode-map): Bind ! to `force'. - -2002-06-29 Andreas Schwab - - * term/mac-win.el: Use directory-free-space-program instead of - obsolete variable dired-free-space-program. On Darwin, don't set - directory-free-space-program, shell-file-name and - process-connection-type; set directory-free-space-args to not - include `-P' and use utf-8 for file name coding system. - - * simple.el (shell-command-on-region): Handle errors and signals - from shell command execution. - (display-message-or-buffer): Fix last change. - (shell-command-default-error-buffer): Doc fix. - - * dired.el (dired-view-file): Quote file name for - dired-run-shell-command. - -2002-06-29 Kim F. Storm - - * kmacro.el: New file. - -2002-06-28 John Wiegley - - * pcmpl-cvs.el: Added my name as the maintainer of this file. - -2002-06-28 Andreas Schwab - - * shell.el (explicit-bash-args): New user option. - -2002-06-28 Kim F. Storm - - * ido.el: New file. - -2002-06-28 Stefan Monnier - - * derived.el (define-derived-mode): Preserve the `mode-class' rather - than the `special' symbol property. - (derived-mode-class): Make it obsolete. - -2002-06-27 Andreas Schwab - - * net/tramp.el (tramp-handle-ange-ftp): Fix typo. - -2002-06-27 Juanma Barranquero - - * emacs-lisp/bytecomp.el (baud-rate): Fix obsolescence declaration. - (meta-flag): Likewise. - - * international/mule-util.el (string-to-sequence): Likewise. - - * subr.el (char-bytes): Likewise. - (make-local-hook): Likewise. - (baud-rate): Remove redundant info from docstring. - - * faces.el (frame-update-faces): Fix obsolescence declaration. - (internal-get-face): Remove redundant info from docstring and - fix obsolescence declaration. - - * rect.el (move-to-column-force): Likewise. - - * help-fns.el (describe-function-1): Use semicolon instead of dot. - (describe-variable): Likewise. - -2002-06-27 Stefan Monnier - - * mwheel.el (mouse-wheel-change-button): Deactivate before changing. - (mouse-wheel-up-button, mouse-wheel-down-button): Obsolete. - (mouse-wheel-up-event, mouse-wheel-down-event): New vars. - (mouse-wheel-follow-mouse): Change default to t. - (mwheel-event-button): Return the basic event symbol. - (mwheel-scroll): Work with non-mouse events. - (mouse-wheel-mode): Use the new vars. - (mwheel-install): Obey `uninstall'. - - * term/xterm.el (function-key-map): Add some bindings. - - * uniquify.el (uniquify-delay-rationalize-file-buffer-names): - Rename from delay-uniquify-rationalize-file-buffer-names. - Only rationalize if the buffer is under uniquify control. - (uniquify-delayed-rationalize-file-buffer-names): - Rename from delayed-uniquify-rationalize-file-buffer-names. - -2002-06-27 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-file-name-structure) - (tramp-multi-file-name-hop-structure): Split for easier readability. - (tramp-handle-make-symbolic-link): Use user/host/method/... from - LINKNAME, not FILENAME. - (tramp-handle-verify-visited-file-modtime): - Call tramp-ange-ftp-file-name-p with right parameters. - (tramp-handle-verify-visited-file-modtime): `insert' does not - work for integers, convert them to strings first. - (tramp-handle-ange-ftp): New function to perform setup for - replacing Ange-FTP with Tramp. - (tramp-repair-jka-compr): New function to factor out some - previously top-level code. Call the function at top-level. - -2002-06-27 Juanma Barranquero - - * composite.el (decompose-composite-char): Fix docstring. - - * faces.el (describe-face): Capitalize "not documented" message. - - * help-fns.el (describe-variable): Likewise. - (describe-function-1): Likewise. Also, document the obsolescence - of the function, if applicable. - -2002-06-26 Juanma Barranquero - - * info.el (info-menu-5): Fix documentation. - (Info-fontify-maximum-menu-size): Remove reference to `Info-fontify'. - -2002-06-26 Richard M. Stallman - - * emacs-lisp/cl.el (values): Simplify definition. - - * simple.el (shell-command): Match & only at end of whole command. - (display-message-or-buffer): Don't use the echo area - if output buffer is visible. - - * tooltip.el (tooltip-x-offset, tooltip-y-offset): Doc fixes. - - * progmodes/cperl-mode.el: Many trivial doc fixes. - (cperl-non-problems): Definition deleted. - (cperl-menu): Don't refer to cperl-non-problems. - (cperl-word-at-point): Add doc string. - (cperl-beautify-regexp-piece): Fix error message. - (cperl-invert-if-unless): Fix error message. - - * dired.el (dired-find-alternate-file): Mark as disabled. - -2002-06-25 Kai Gro,A_(Bjohann - - * net/tramp.el (tramp-ftp-method): New user option. - (tramp-invoke-ange-ftp): New function to forward calls to Ange-FTP. - (with-parsed-tramp-file-name): New macro for the usual big `let' - statement to dissect a file-name. - (tramp-handle-make-symbolic-link, tramp-handle-load) - (tramp-handle-file-name-directory) - (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) - (tramp-handle-file-truename, tramp-handle-file-directory-p) - (tramp-handle-file-regular-p, tramp-handle-file-symlink-p) - (tramp-handle-file-writable-p, tramp-handle-file-writable-p): - Use the new macro and forward call to Ange-FTP if applicable. - (tramp-make-ange-ftp-file-name): New helper function to convert a - file name into an Ange-FTP file name, used by `tramp-invoke-ange-ftp'. - (tramp-default-method-alist): New user option. - (tramp-find-default-method): Use it. - (tramp-sh-extra-args): New variable. - (tramp-find-shell): Use it. - (tramp-open-connection-rsh): Support a kludgy feature for the - "-p" option to ssh. If host name is given as "host#42", uses the - "-p 42" option. - -2002-06-25 Andreas Schwab - - * replace.el (occur-1): Avoid invalid message format string. - -2002-06-24 Stefan Monnier - - * emacs-lisp/bytecomp.el (byte-compile-callargs-warn): - Check for `noruntime' even if the function has a known sig. - (byte-compile-file, byte-compile-output-docform): - Don't hard code point-min = 1. - - * pcvs.el (cvs-parse-process): Don't save/restore point. - Fix last change not to introduce spurious dir FIs. - (cvs-move-to-goal-column): New function extracted from - cvs-mode-previous-line. - (cvs-mode-previous-line, cvs-mode-next-line): Use it. - (cvs-addto-collection): Use it to preserve point. - (cvs-vc-command-advice): Ad-hoc workaround for `cvs -q add'. - - * mwheel.el (mouse-wheel-scroll-amount,mwheel-scroll,mouse-wheel-mode): - Don't require the first element to be modifier-free. - - * pcvs-parse.el (cvs-parse-table): - Handle `nothing known about' with more care. - - * pcvs.el (cvs-fileinfo-kill): Remove. - (cvs-parse-process): Add `old-fis' argument. - (cvs-mode-run): Use it instead of cvs-fileinfo-kill. - - * descr-text.el (describe-property-list): Make sure there's - a space between the property name and its value. - (describe-text-properties): Don't kill a pre-existing buffer. - - * mwheel.el: Undo last patch from Stephen Gildea for now. - -2002-06-24 Kim F. Storm - - * emulation/keypad.el: Added :require 'keypad to defcustoms. - -2002-06-23 Stefan Monnier - - * subr.el (event-start, event-end, event-click-count): - Accept non-mouse events as well. - (read-key): New function. - (read-quoted-char): Use it. Use this-single-command-raw-keys as well. - - * files.el: Rename (and mark as obsolete) - find-file-hooks to find-file-hook, - find-file-not-found-hooks to find-file-not-found-functions, - write-file-hooks to write-file-functions, - write-contents-hooks to write-contents-functions. - Mark local-write-file-hooks as obsolete. - (locate-file-completion): Don't cons uselessly. Use test-completion. - (basic-save-buffer): Use (point-min) rather than 1. - (basic-save-buffer-2): Obey the `setmodes' returned by backup-buffer. - - * help-fns.el (describe-variable): Only use `buffer' is still live. - Use `delete-region' instead of save-excursion + delete-char. - Document the obsolescence of the variable, if applicable. - -2002-06-23 Glenn Morris - - * progmodes/f90.el (f90-do-auto-fill): Respect the value of - comment-auto-fill-only-comments. - -2002-06-21 Kai Gro,A_(Bjohann - - * net/ange-ftp.el (backup-buffer): Delete `ange-ftp' property. - This is not a handled operation. - -2002-06-21 Kim F. Storm - - * emulation/cua-base.el (cua--prefix-arg): Make register prefixes - work again. Corrected error in check for C-u initiated prefix. - - * emulation/keypad.el (keypad-setup): Handle kp-begin like kp-space. - -2002-06-21 Richard M. Stallman - - * net/browse-url.el (browse-url-at-mouse): Don't pass an arg - to browse-url-at-point. - - * play/zone.el (zone-idle): Var deleted. - - * international/iso-acc.el (iso-languages) : - `~ ' now generates `~', `~,' definition deleted. - - * format.el (format-annotate-function): Copy multibyte flag - and selective-display into the new temp buffer. - - * edmacro.el (edmacro-fix-menu-commands): - Discard `help-echo' events. Handle (menu-bar) events. - Simplify by converting key sequence to a list and then back to vector. - -2002-06-21 Stephen Gildea - - * mwheel.el: Allow arbitrary keys for scrolling, add a third - scrolling speed, fix an unwind-protect. - (mouse-wheel-scroll-amount): Now a three-element list. - (mouse-wheel-scroll-down-slow, mouse-wheel-scroll-up-slow) - (mouse-wheel-scroll-down-normal, mouse-wheel-scroll-up-normal) - (mouse-wheel-scroll-down-fast, mouse-wheel-scroll-up-fast): - New functions. - -2002-06-21 Andreas Schwab - - * files.el (find-file-read-args): Add new argument `mustmatch' and - pass it down to read-file-name. - (find-file, find-file-other-window, find-file-other-frame) - (find-file-read-only, find-file-read-only-other-window) - (find-file-read-only-other-frame): Use it and fix prompts. - -2002-06-21 Stefan Monnier - - * pcvs-defs.el (cvs-version): Use cvs-program rather than "cvs". - -2002-06-20 Emmanuel Briot - - * progmodes/ada-mode.el: Update copyright notice. - Synchronize with GNAT release 3.15a1. - Do not attempt to load ada-support, which is only for compatibility - with older Emacs versions, and is not needed for Emacs 21. - Fix various calls to count-lines, that didn't work correctly when the - buffer was narrowed. - (ada-continuation-indent): New variable. - (ada-contextual-menu): New entry "List local references", faster than - "List References". - (ada-mode): New alignment rules provided by S. Leake. - Add support for which-function-mode. - (ada-get-current-indent): Fix indentation of named parameter lists and - nested boolean expressions. - (ada-indent-on-previous-lines): Fix indentation of labels. - (ada-search-prev-end-stmt): Fix searching of the previous - end-statement, specially with regards to nested subprograms. - (comment-region advice): Initially disabled, for better compatibility - with other modes. - (ada-fill-comment-paragraph): Fixed (no longer worked with Emacs 21). - - * progmodes/ada-xref.el: Update copyright notice. - (ada-xref-create-ali): The default is now not to create automatically - the ALI files by compiling the unit, since this isn't always reliable - and requires an up-to-date project file. - (ada-prj-default-comp-cmd): No longer use gcc directly to compile - a file, but use gnatmake instead, since this gives access to the GNAT - project files. - (ada-xref-search-with-egrep): New variable, suggested by P. Waroquiers. - (ada-load-project-hook): New variable, for support of GNAT - project files. - (ada-update-project-menu): Fix the detection of the project file name. - (ada-add-keymap): Change key binding for ada-find-file, that conflicted - with another binding in ada-mode.el. - (ada-add-menu): New menu "List Local References", to list the reference - to the entity only in the current file, instead of looking in the whole - project. Much faster. - (ada-find-references): New parameters arg and local-only. - (ada-find-any-references): New parameters local-only and append. - (ada-goto-declaration): Fix handling of predefined entities in xref. - (ada-get-all-references): Updated to the new xref format in GNAT 3.15, - still compatible with GNAT 3.14 of course. Fix various calls to - count-lines, that didn't work correctly when the buffer was narrowed. - - * progmodes/ada-prj.el: Update copyright. - (ada-prj-load-directory): Make sure we do not use one of the new Emacs - 21 dialogs to select the file, since we want a directory name only. - (ada-customize): Add support for the new GNAT project files. - -2002-06-20 Francesco Potort,Al(B - - * progmodes/etags.el (tag-implicit-name-match-p): New function. - (etags-recognize-tags-table): Use it for implicit tag names. - -2002-06-20 Miles Bader - - * comint.el (comint-get-old-input-default): Strip text properties - for fields too. - - * comint.el (comint-output-filter): Run output-filter functions - before setting up the prompt. - - * international/characters.el: Re-enable code giving word syntax - to certain japanese-jisx0208 characters. - -2002-06-19 Glenn Morris - - * progmodes/f90.el (f90-type-def-re): Fix value. - (f90-looking-at-type-like): Adapt for new `f90-type-def-re' value. - -2002-06-18 Stefan Monnier - - * international/quail.el (quail-help): Don't assume the buffer - is displayed in the same frame. - - * emacs-lisp/debug.el (cancel-debug-on-entry): - * emacs-lisp/regexp-opt.el (regexp-opt-group): Don't cons uselessly. - - * pcvs.el (cvs-vc-command-advice): Handle the case where args - are passed to `cvs' before the command name. - (cvs-fileinfo-kill): Mark old FIs as up-to-date rather than dead. - - * pcvs-info.el (cvs-add-face): Minor rewrite. - (cvs-fileinfo-pp): Use `cvs-goal-column' with directory entries. - - * newcomment.el (comment-normalize-vars): Refresh the comment-foo-skip - regexp when they don't match comment-foo any more. - -2002-06-18 Juanma Barranquero - - * filesets.el (filesets-update-pre010505): Fix typo. - - * eshell/em-pred.el (eshell-modifier-help-string): Fix typos. - - * emulation/edt.el (edt-substitute): Fix typo. - - * emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): Fix typo. - - * comint.el (comint-next-prompt, comint-previous-prompt): Fix typos. - - * progmodes/sh-script.el (sh-electric-rparen-needed): Remove. - -2002-06-17 Richard M. Stallman - - * facemenu.el (facemenu-map): Rename to Describe Text - to Describe Properties and use describe-text-properties. - - * simple.el (what-cursor-position): Use describe-char. - - * descr-text.el (describe-char): Moved from mule-diag.el, renamed - from describe-char-after. Now calls describe-text-properties. - (describe-property-list): Renamed from describe-text-properties. - (describe-text-properties): Renamed from describe-text-at. - New arg OUTPUT-BUFFER. - (describe-text-properties-1): - New subroutine, broken out from describe-text-properties. - Output a newline before each section of the output. - - * international/mule-diag.el (describe-char-after): - Moved to descr-text.el. - -2002-06-17 Eli Zaretskii - - * international/mule.el (ctext-pre-write-conversion): Fix the values - of FROM and TO if we create a new buffer. - -2002-06-17 John Paul Wallington - - * comint.el (comint-insert-clicked-input): Insert clicked-on - previous input without properties. - -2002-06-16 Andrew Choi - - * term/mac-win.el (scalable-fonts-allowed): Set to t. - -2002-06-15 Colin Walters - - * pcvs-info.el (global-font-lock-mode, font-lock-auto-fontify): - Delete defvars. - (cvs-highlight): Delete. - (cvs-add-face): Use `font-lock-face'. Always add properties. - - * ibuffer.el (ibuffer-movement-cycle): New variable. - (ibuffer-backward-line, ibuffer-forward-line): Use it. - -2002-06-15 Richard M. Stallman - - * emacs-lisp/bytecomp.el (byte-recompile-directory): Doc fix. - (batch-byte-recompile-directory): Undo previous change. - - * comint.el (comint-skip-input): New function. - (comint-interrupt-subjob, comint-kill-subjob, comint-quit-subjob) - (comint-stop-subjob): Use comint-skip-input. - - * ielm.el (ielm-eval-input): Use error-message-string. - (ielm-format-error, ielm-format-errors): Functions deleted. - -2002-06-14 Kim F. Storm - - * progmodes/compile.el (grep-tree): Doc fixes. - Added SUBDIRS arg for non-interactive use. - -2002-06-14 Juanma Barranquero - - * comint.el (comint-snapshot-last-prompt): - Bind `inhibit-read-only' to t to support read-only prompts. - (comint-output-filter): Likewise. - -2002-06-14 Miles Bader - - * subr.el (copy-tree): Use `nconc' and `nreverse' instead of `nreconc'. - (pop): Move the call to `car' outside the prog1, as the compiler - then generates better code. - -2002-06-13 Richard M. Stallman - - * play/zone.el (zone-timer): New variable holds the idle timer. - (zone): Don't fiddle with the idle timer at all. - (zone-when-idle): Put the idle timer in zone-timer. - If one is already set up, cancel it and make a new one. - (zone-leave-me-alone): Likewise. - -2002-06-13 Jason Rumney - - * w32-fns.el (w32-charset-info-alist): Reorder. - -2002-06-13 Andreas Schwab - - * files.el (auto-mode-alist): Move entry for ".in" to the end. - -2002-06-13 Miles Bader - - * comint.el (comint-mode): Don't set `font-lock-defaults'. - (comint-mode-hook): Turn on font-lock by default. - -2002-06-12 Karl Fogel - - * bookmark.el (bookmark-file-or-variation-thereof): - Restore vc-backend check, thanks to Robert Thorpe for noticing. - -2002-06-12 Eli Zaretskii - - * textmodes/bibtex.el: Change the maintainer to "none". - -2002-06-12 Juanma Barranquero - - * term/w32-win.el (x-handle-switch): Fix handling of - x-invocation-args for switches with arguments. - -2002-06-12 Stefan Monnier - - * menu-bar.el (menu-bar-showhide-fringe-menu): Don't use `fringe-mode' - without first making sure it's bound. - -2002-06-12 Richard M. Stallman - - * info.el (Info-fontify-node): Compute header line specially - if node has no next, previous or up links. - Hide the part of the first line that is used in the header. - Use Info-next-link-keymap, etc. - (Info-next-link-keymap, Info-prev-link-keymap) - (Info-up-link-keymap): New variables. - - * international/mule-diag.el (describe-char-after): Doc fix. - - * view.el (view-mode-enter): Clarify echo area message. - - * info.el (Info-select-node): Turn header line on or off here. - (Info-setup-header-line): Function deleted. - (Info-mode): Make Info-header-line local. - (Info-fontify-node): Ignore Info-use-header-line. - Unconditionally compute what the header line should be, and - store it on the `header-line' property of the node's first char. - Bind [header-line down-mouse-1]. - Use `keymap' property, not `local-map'. - Bind [mouse-2] for mouse clicks on the node line in the text. - - * font-lock.el (font-lock-beginning-of-syntax-function): Doc fix. - -2002-06-12 Miles Bader - - * comint.el (comint-send-input): Properly handle empty and - no-newline input regions. - -2002-06-12 Colin Walters - - * calc/calc.el: Use `when', `unless'. - (calc-trail-mode): Use an italic `font-lock-face'. - (calc-refresh): Ditto. - -2002-06-12 Colin Walters - - * font-core.el (font-lock-core-only): Variable deleted. - All uses removed. - (font-lock-set-defaults): Variable alist settings moved back into - font-lock-set-defaults-1. - (turn-on-font-lock-if-enabled): Always turn on font-lock unless it - is specifically excluded by the user. - - * font-lock.el (font-lock-set-defaults-1): Set variable alist here. - - * help-mode.el (help-mode): Don't set `font-lock-defaults'. - - * ibuffer.el (ibuffer-mode): Don't set `font-lock-defaults'. - - * info.el (Info-mode): Don't set `font-lock-defaults'. - - * replace.el (occur-mode): Don't set `font-lock-defaults'. - - * help-mode.el (help-highlight-p, help-highlight-face): - Variable was unused; delete. - (help-make-xrefs): Doc fix. - -2002-06-11 Richard M. Stallman - - * format.el (format-alist): Document new element PRESERVE. - (format-write-file): Implement PRESERVE elt for a format. - - * files.el (make-auto-save-file-name): Rename local `filename' to - `file-name'. - -2002-06-10 Richard M. Stallman - - * progmodes/ebrowse.el (ebrowse-draw-tree-fn): Use copy-sequence. - (ebrowse-copy-list): Function deleted. - - * eshell/em-unix.el (eshell/diff): Use copy-sequence. - - * eshell/esh-mode.el (eshell-mode, eshell-mode): Use copy-sequence. - - * eshell/esh-util.el (eshell-copy-list): Function deleted. - (eshell-sublist): Use copy-sequence. - (eshell-copy-tree): Make it an alias for copy-tree. - - * emacs-lisp/cl.el (copy-list): Moved back from subr.el. - - * subr.el (copy-list): Moved to cl.el. - (copy-tree): Don't use copy-list or cl-pop. - -2002-06-10 Miles Bader - - Make comint use text properties for highlighting instead of overlays: - * comint.el (comint-last-output-overlay): Variable removed. - (comint-send-input, comint-output-filter): Use text properties - instead of overlays. - (comint-insert-clicked-input): Rewrite to work with text - properties as well as overlays - (comint-snapshot-last-prompt): Snapshot using text properties. - (comint-get-old-input-default, comint-extract-string): Don't copy - text properties. - - * simple.el (line-move-finish): Inhibit field motion when - computing `line-end'. - - * files.el (revert-buffer): Correct typo: variable name is - `buffer-file-format', not `buffer-file-formats'. - - * comint.el (comint-send-input, comint-output-filter): Use the - `font-lock-face' property instead of `face'. Don't check the - highlight-enabling variables anymore. - (comint-highlight-input, comint-highlight-prompt): Variables removed. - - * faces.el (display-supports-face-attributes-p): New function. - (face-spec-set-match-display): Support `supports' predicate. - (italic): Try underlining for displays that don't support real italics. - * cus-edit.el (custom-display): Add support for `supports' predicate. - * term/tty-colors.el (color-name-rgb-alist): Use 16-bit RGB values - instead of 8-bit, for consistency with the rest of emacs. - (tty-color-canonicalize): Only copy COLOR if we need to change it. - (tty-color-approximate): Scale values from `color-name-rgb-alist' - appropriately. Return the whole color description, rather than - just the RGB values. - (tty-color-standard-values): New function. Code mostly taken from - `tty-color-translate'. - (tty-color-translate, tty-color-values): Use `tty-color-desc' to - do all the work. - (tty-color-desc): Do color lookup here instead of calling - `tty-color-translate' and `tty-color-by-index'; this is now the - main place to do it. - -2002-06-09 Martin Stjernholm - - * progmodes/cc-style.el (c-set-style, c-set-style-1): - Add another state for the `dont-override' flag where it only keeps - globally set variables. - -2002-06-08 Colin Walters - - * descr-text.el (describe-text-properties): Sort the output by the - size of the values. Put `font-lock-face' property on property names. - (toplevel): Provide `descr-text'. - - * international/mule-diag.el (describe-char-after): When there are - text properties, require `descr-text', and just call - `describe-text-properties'. - - * international/mule.el (sgml-html-meta-auto-coding-function): - New function. - (auto-coding-from-file-contents): Delete; merge functionality into - `set-auto-coding'. - (set-auto-coding): Move tests from `auto-coding-functions' so that - they have a lower priority than coding: tags. - Put `auto-coding-regexp-alist' tests before coding: tag tests. - (sgml-xml-auto-coding-function): Simply `intern' the match, and - test if it's a valid coding system. - (auto-coding-functions): Add `sgml-html-meta-auto-coding-function'. - -2002-06-08 Colin Walters - - * subr.el (copy-list): Moved here from cl.el. - (copy-tree): Renamed here from `cl-copy-tree' in cl-extra.el. - - * emacs-lisp/cl-extra.el (cl-copy-tree): Moved to `copy-tree' in - subr.el. Add a defalias with the old name. - - * emacs-lisp/cl.el (copy-list): Moved to subr.el. - - * replace.el (occur-mode): Don't set up categories. Do set - `font-lock-defaults', and be sure to set `font-lock-core-only'. - (occur-1): Pass `list-matching-lines-face' and - `list-matching-lines-buffer-name-face'. - (occur-engine): Use `font-lock-face' instead of categories. - - * info.el (Info-mode): Don't set up categories. Do set - `font-lock-defaults', and be sure to set `font-lock-core-only'. - (Info-fontify-menu-headers): Use `font-lock-face' instead of - categories. - (Info-fontify-node): Ditto. - - * ibuffer.el (ibuffer-category-alist): Delete. - (ibuffer-get-category): Delete. - (ibuffer-compile-make-eliding-form): Use `font-lock-face' instead - of categories. - (ibuffer-compile-format): Don't treat `name' category specially. - (ibuffer-column name): Use `font-lock-face'. - (filename-and-process): Ditto. - (ibuffer-buffer-name-category): Renamed to - `ibuffer-buffer-name-face'. Don't use categories. - (ibuffer-update-title-and-summary): Use `font-lock-face'. - (ibuffer-insert-filter-group): Ditto. - (ibuffer-mode): Don't set up categories. Do set - `font-lock-defaults', and be sure to set `font-lock-core-only'. - (ibuffer-compile-format): Don't pass third argument - to column functions. - (filename-and-process): Ditto. - - * ibuf-macs.el (define-ibuffer-column): Don't create a third - argument for the generated function. - - * font-core.el (font-lock-category-alist): Delete. - (turn-on-font-lock-if-enabled): Don't use it. - (font-lock-symbol-category-alist): Delete. - (font-lock-default-function): Use new `char-property-alias-alist' - to make `font-lock-face' an alias for `face' when font-lock mode - is enabled. - (font-lock-core-only): New variable. - (font-lock-set-defaults): Use it. - -2002-06-08 Richard M. Stallman - - * files.el (find-file-noselect-1): Undo previous change. - - * bookmark.el (bookmark-file-or-variation-thereof): Doc fix. - -2002-06-07 Karl Fogel - - * bookmark.el (bookmark-file-or-variation-thereof): Just use - Info-suffix-list, as suggested by Stefan Monnier. - -2002-06-05 Eli Zaretskii - - * select.el (xselect-convert-to-string): If VALUE is a string, - return a cons of TYPE and the string. - -2002-06-05 Pavel Jan,Am(Bk - - * language/cyrillic.el (cyrillic-alternativnyj-decode-table): - Fix the table to contain correct characters. - -2002-06-04 Richard M. Stallman - - * simple.el: Don't require cl. - -2002-06-03 Richard M. Stallman - - * dired.el (dired-do-shell-command): Doc fix in autoload. - - * info.el (Info-extract-pointer): Ignore Info-header-line. - - * progmodes/cc-mode.el (c-postprocess-file-styles): - Do nothing except in CC modes. - - * international/mule-cmds.el (select-safe-coding-system): - When computing auto-cs, narrow to FROM...TO. - Put save-excursion outside save-restriction. - New arg FILE; use that for set-auto-coding. - -2002-06-01 Richard M. Stallman - - * simple.el (choose-completion-string-functions): Doc fix. - (choose-completion-string): Add doc string. - -2002-06-01 Kim F. Storm - - * simple.el: Reworked previous change. - (choose-completion-string1): Merged back into choose-completion-string. - (choose-completion-string): Run choose-completion-string-functions - after checking for proper minibuffer window. Added mini-p arg to - the hook functions. Insert choice if all hook functions return nil. - (choose-completion-string-functions): Doc update. - -2002-06-01 Sam Steingold - - * files.el (auto-mode-alist): Strip trailing ".in" from the file - name when deciding the mode (for config.h.in, Makefile.in etc). - -2002-06-01 Thien-Thi Nguyen - - * progmodes/prolog.el (prolog-mode-syntax-table): Add flags to - ?/ and ?* entries to support /* */ style comments. - (prolog-font-lock-keywords): New var. - (prolog-mode): Enable font-locking; set `font-lock-defaults'. - -2002-06-01 Kim F. Storm - - * simple.el (choose-completion-string-functions): New special hook. - (choose-completion-string1): Renamed from choose-completion-string. - (choose-completion-string): Run choose-completion-string-functions - until success, and only call choose-completion-string1 if it fails. - -2002-05-31 Stefan Monnier - - * textmodes/ispell.el (autoloaded toplevel): Don't use - ispell-library-directory without checking that it's bound. - -2002-05-31 Kim F. Storm - - * emulation/cua-base.el (cua--last-deleted-region-pos) - (cua--last-deleted-region-text): New aux variables. - (cua-delete-region): Set them. - (cua-repeat-replace-region): Use them to find the replacement text. - -2002-05-31 Juanma Barranquero - - * emulation/viper-cmd.el (viper-smart-suffix-list, viper-ask-level): - Fix typos. - -2002-05-31 Kim F. Storm - - * progmodes/compile.el (grep-tree-command, grep-tree-files-aliases) - (grep-tree-ignore-CVS-directories, grep-tree-ignore-case): - New custom variables. - (grep-compute-defaults): Compute grep-tree-command's default value. - (grep-expand-command-macros): New aux function. - (grep-tree-last-regexp, grep-tree-last-files): New aux variables. - (grep-tree): New command like grep-find but extended prompting. - -2002-05-30 Richard M. Stallman - - * files.el (find-file-default): Add defvar for var already used. - - * menu-bar.el (menu-bar-showhide-fringe-menu): Use defvar. - - * subr.el (open-network-stream, open-network-stream-nowait) - (open-network-stream-server, process-kill-without-query): - Moved from simple.el. - - * simple.el (open-network-stream, open-network-stream-nowait) - (open-network-stream-server, process-kill-without-query): - Moved to subr.el. - - * simple.el (byte-compiling-files-p): Function deleted. - - * textmodes/ispell.el (ispell-library-directory): Renamed from - ispell-library-path. If Ispell is not installed, init to nil. - (check-ispell-version): Doc fix. - (ispell-menu-map): Get rid of byte-compiling-files-p hackery; - initialize this unconditionally when ispell-menu-map-needed is t. - Local `path' renamed to `dir'. - -2002-05-30 Miles Bader - - * calc/calc.el (calc-show-banner): New variable. - (calc-refresh): Only show banner if `calc-show-banner' is non-nil. - (calc-mode-var-list): Add `calc-show-banner'. - * calc/calc-ext.el (calc-init-extensions): Add binding for `d@'. - (calc-toggle-banner): New function. - * calc/calc-help.el (calc-d-prefix-help): Add `@'. - -2002-05-29 Richard M. Stallman - - * emacs-lisp/cl-indent.el (common-lisp-indent-function-1): - When recognizing a def... construct, make that indentation - tentative, so that it can be overridden if the list in question - is not actually an expression. - (common-lisp-indent-call-method): New subroutine. - - * emacs-lisp/bytecomp.el (batch-byte-compile-file): - Delete the output file if we get a file-error. - - * tooltip.el (tooltip-mouse-motions-active): New variable. - (tooltip-activate-mouse-motions): Don't kill track-mouse local - if it was not made by us. - - * mouse.el (mouse-set-font): Avoid misleading error message - if user makes no selection. - - * info.el (Info-setup-header-line): Don't hide the links line. - - * files.el (find-file-noselect-1): Return the buffer we created - even if it has been killed within `after-find-file'. - - * files.el (auto-mode-alist): Use ada-mode for .ad[bs].dg files. - -2002-05-29 Kim F. Storm - - * simple.el (open-network-stream-server): Pass on optional args - sentinel and filter to make-network-process (from Luke Gorrie). - -2002-05-28 Colin Walters - - * textmodes/sgml-mode.el (xml-mode): New alias for `sgml-mode'. - - * emacs-lisp/bytecomp.el (byte-compile-last-line): Deleted. - (byte-compile-delete-first): New function. - (byte-compile-read-position): New variable. - (byte-compile-last-position): New variable. - (byte-compile-current-buffer): New variable. - (byte-compile-log-1): Use it. - (byte-compile-set-symbol-position): New function. - (byte-compile-obsolete, byte-compile-callargs-warn) - (byte-compile-arglist-warn, byte-compile-arglist-warn) - (byte-compile-print-syms, byte-compile-file-form-defmumble) - (byte-compile-check-lambda-list, byte-compile-lambda) - (byte-compile-form, byte-compile-variable-ref) - (byte-compile-subr-wrong-args, byte-compile-negation-optimizer) - (byte-compile-condition-case, byte-compile-defun) - (byte-compile-defvar, byte-compile-autoload) - (byte-compile-lambda-form): Use it. - (byte-compile-from-buffer): Set it, and bind - `read-with-symbol-positions' and `read-symbol-positions-list'. - - * emacs-lisp/bytecomp.el (byte-compile-debug): New variable. - -2002-05-28 Kim F. Storm - - * files.el (read-directory-name): New function. - (cd): Use it instead of read-file-name. - -2002-05-27 Kim F. Storm - - * simple.el (push-mark-command): Added optional NOMSG arg. - - * emulation/cua-base.el (cua-set-mark): Align pop to mark - behaviour with standard set-mark-command. - (cua--pre-command-handler): Use push-mark-command. - (cua-repeat-replace-region): Improve functionality when - repeated after moving point or changing buffer. - -2002-05-26 Colin Walters - - * startup.el (command-line): Use `when', `unless'. - (command-line-1): New argument "--nosplash". Handle it. - - * startup.el (inhibit-splash-screen): New variable alias for - `inhibit-startup-message'. - - * replace.el (perform-replace): Document return value. Use `pop'. - -2002-05-26 Glenn Morris - - * progmodes/f90.el (f90-previous-block, f90-next-block): New names, - and slightly changed behaviour, for `f90-previous-block-start' and - `f90-next-block-end'. - (f90-beginning-of-subprogram, f90-end-of-subprogram): Simplify. - -2002-05-26 Simon Josefsson - - * fringe.el (set-fringe-mode): Work when updating - `default-frame-alist'. - -2002-05-26 Kim F. Storm - - * emulation/cua-base.el (cua--repeat-replace-text): New variable. - (cua-repeat-replace-region): New command. - (cua--init-keymaps): Bind it to M-v in cua--cua-keys-keymap. - Misc improvements to the commentary. - -2002-05-26 Simon Josefsson - - * fringe.el (fringe-query-style): New fringe style "minimal". - -2002-05-24 Simon Josefsson - - * rot13.el (rot13-translate-table): New variable. - (rot13, rot13-string, rot13-region): New functions. - -2002-05-25 Martin Stjernholm - - * progmodes/cc-engine.el (c-add-stmt-syntax): Fixed some cases - of wrong anchoring, e.g. for else-if compounds. - -2002-05-25 Miles Bader - - * menu-bar.el (menu-bar-showhide-fringe-menu-customize-left) - (menu-bar-showhide-fringe-menu-customize-right) - (menu-bar-showhide-fringe-menu-customize-disable): - Use proper calling convention for `customize-set-value'. - Require `fringe' before setting variable. - -2002-05-25 Kim F. Storm - - * emulation/cua-base.el (cua--self-insert-char-p): New function. - - * emulation/cua-gmrk.el (cua--init-global-mark): Install default - binding in cua--global-mark-keymap using cua--self-insert-char-p - to handle all global self inserting characters in gmark mode. - - * emulation/cua-rect.el (cua--init-rectangles): Install default - binding in cua--rectangle-keymap using cua--self-insert-char-p - to handle all global self inserting characters in rectangle mode. - -2002-05-24 Stefan Monnier - - * net/ange-ftp.el (read-file-name-internal): Remove the - `ange-ftp' property. - (ange-ftp-real-read-file-name-internal): Remove. - -2002-05-24 Glenn Morris - - * progmodes/f90.el: (f90-end-of-subprogram): Remove the final - `forward-line'. - (f90-end-of-block, f90-beginning-of-block, f90-next-block-end) - (f90-previous-block-start): New navigation commands. - -2002-05-20 Simon Josefsson - - * fringe.el: New file. - - * menu-bar.el (menu-bar-options-save): Add fringe-mode. - (menu-bar-showhide-fringe-menu): New menu. - (menu-bar-showhide-menu): Add Fringe sub-menu. - -2002-05-23 Colin Walters - - * replace.el (occur-engine): Include all text properties except - mouse-face on the newline at the end of occurences. - -2002-05-23 Kim F. Storm - - * apropos.el (apropos-true-hit, apropos-false-hit-symbol) - (apropos-false-hit-str, apropos-true-hit-doc): New functions. - (apropos-command, apropos-value, apropos-documentation-internal) - (apropos-documentation-check-doc-file) - (apropos-documentation-check-elc-file): Use them to filter out - false matches where only one keyword matches, but more than once. - - * apropos.el (apropos-show-scores, apropos-orig-regexp) - (apropos-all-regexp, apropos-synonyms, apropos-words) - (apropos-all-words): New variables. - (aprpos-words-to-regexp, apropos-rewrite-regexp) - (apropos-calc-scores, apropos-score-str, apropos-score-doc) - (apropos-score-symbol): New functions. - (apropos-command, apropos, apropos-value, apropos-documentation): - Allow keywords in addition to regexp. Added scoring. - (apropos-documentation-check-doc-file) - (apropos-documentation-check-elc-file): Added scoring. - (apropos-print): Sort according to score. - -2002-05-22 Colin Walters - - * info.el (Info-mode-hook): Change `font-lock-mode' to - `turn-on-font-lock'. - - * font-core.el (font-lock-function): New variable. - (font-lock-default-function): New function, created from - `font-lock-mode'. - (font-lock-mode): Just funcall `font-lock-function'. - (font-lock-symbol-category-alist): New variable. - -2002-05-22 Markus Rost - - * files.el (file-newest-backup): Use file-name-sans-versions. - - * diff.el (diff-latest-backup-file): Replace the main code by - a call of file-newest-backup. - -2002-05-22 Mike Williams - - * textmodes/sgml-mode.el (sgml-guess-indent): Look further into - the buffer. - -2002-05-21 Stefan Monnier - - * net/ange-ftp.el (ange-ftp-allow-child-lookup): Re-enable since - the last patch works around the wu-ftpd misfeature that prompted - the disabling of this optimization. - -2002-05-21 Colin Walters - - * international/mule.el (make-coding-system): Doc fixes. - - * international/mule.el (auto-coding-functions): New variable. - (auto-coding-from-file-contents): Use it. - (set-auto-coding): Update docs. - (sgml-xml-auto-coding-function): New function. - - * international/mule-util.el (truncate-string-to-width): - New optional argument `ellipsis'. Add commented-out test suite, and - change coding to iso-2022-7bit. - -2002-05-21 Colin Walters - - * font-lock.el (font-lock-defaults, font-lock-defaults-alist) - (font-lock-multiline, font-lock-fontified, font-lock-mode) - (turn-on-font-lock, font-lock-add-keywords, global-font-lock-mode) - (font-lock-global-modes): Moved to font-core.el. - (font-lock-set-defaults-1): Partially moved to font-core.el. - - * font-core.el: New file, with functions taken from font-lock.el. - (font-lock-category-alist): New variable. - (font-lock-mode): Use it. - (font-lock-set-defaults): Partially taken from font-lock.el. - Only load font-lock.el when necessary. - - * loadup.el: Add font-core.el. - - * replace.el (occur-mode-hook): New variable. - (occur-fontify-region-function): Deleted. - (occur-mode): Don't use it. Set up `font-lock-category-alist' - instead. - (occur-fontify-on-property): Deleted. - (occur-engine): Use categories from `font-lock-category-alist'. - - * info.el (Info-fontify): Deleted. - (Info-select-node): Don't use it. - (Info-mode-hook): New variable. - (Info-mode): Set up categories. - (Info-fontify-menu-headers, Info-fontify-node): Use categories. - - * ibuffer.el (ibuffer-formats): Update docs. - (ibuffer-category-alist): New variable. - (ibuffer-get-category): New function. - (ibuffer-compile-make-eliding-form): Use category property instead - of face. - (ibuffer-compile-format): Pass current ibuffer buffer to column - functions too. - (ibuffer-buffer-name-category): New function. - (ibuffer-compile-format): If the current column is a `name' - column, figure out the appropriate category to put on it. - (filename-and-process): Use category property. - (ibuffer-fontify-region-function): Deleted. - (ibuffer-unfontify-region-function): Deleted. - (ibuffer-update-title-and-summary): Use category properties. - (ibuffer-insert-filter-group): Ditto. - (ibuffer-mode): Set up category properties. - -2002-05-21 Colin Walters - - * replace.el (occur-engine): Increment globalcount all at once - after searching a buffer. - (occur-mode-map): Don't escape plain "o". - - * ibuf-macs.el (define-ibuffer-column): Add third argument - `ibuffer-buf'. - - * ibuffer.el (toplevel): Require font-lock, to get the face - definitions. - (ibuffer-use-fontification): Deleted. - (column filename-and-process): New column. - (ibuffer-formats): Use it by default. - (ibuffer-name-map, ibuffer-mode-name-map) - (ibuffer-filter-group-map): Don't set parent to `ibuffer-mode-map'. - (ibuffer-do-save, ibuffer-do-toggle-modified) - (ibuffer-do-toggle-read-only, ibuffer-do-delete) - (ibuffer-do-kill-on-deletion-marks): Include name in definition. - (ibuffer): New optional argument `formats'. - -2002-05-21 Eli Zaretskii - - * indent.el (indent-rigidly): Mention how to remove all indentation. - -2002-05-21 Colin Walters - - * international/mule-diag.el (describe-char-after): Order display - of text properties by the size of their value, for clarity. - -2002-05-20 Stefan Monnier - - * net/ange-ftp.el (ange-ftp-generate-root-prefixes) - (ange-ftp-file-name-completion): Don't cons unnecessarily. - (ange-ftp-send-cmd): Always `cd' before doing `ls'. - - * wid-edit.el (widget-color-complete): - * progmodes/etags.el (tags-complete-tags-table-file): - * progmodes/cpp.el (cpp-choose-symbol): Don't cons unnecessarily. - - * textmodes/outline.el (outline-reveal-toggle-invisible): - Reverse the meaning of the second arg. - - * reveal.el (reveal-post-command): Reverse the semantics of - reveal-toggle-invisible and support isearch-open-invisible-temporary. - -2002-05-20 Markus Rost - - * mail/sendmail.el (mail-recover-1): Remove (debug). - (mail-signature): Fix :type. - (mail-default-directory): New user option. - (mail, mail-recover): Use that option. - -2002-05-20 Kai Gro,A_(Bjohann - - * international/mule.el (auto-coding-alist): Use emacs-mule - for auto-save files. - -2002-05-20 Miles Bader - - * files.el (find-file-read-args): Don't trash existing value of - `minibuffer-setup-hook', just add our hook to it. - -2002-05-19 Markus Rost - - * international/ucs-tables.el (unify-8859-on-encoding-mode) - (unify-8859-on-decoding-mode): Change :version attributes to strings. - - * simple.el (yank-excluded-properties): Change :version attribute - to a string. - - * dired.el (dired-view-command-alist): Change :version attribute - to a string. - - * xscheme.el (xscheme-start-hook): Change :version attribute to a - string. - - * find-dired.el (find-dired): Implement revert-buffer-function. - - * mail/emacsbug.el (report-emacs-bug-hook): Do another save-excursion. - -2002-05-19 Glenn Morris - - * progmodes/f90.el (f90-match-end, f90-break-line): Simplify a bit. - (f90-get-present-comment-type): Fix earlier change. - (f90-comment-indent): Doc fix. - (f90-equal-symbols, f90-looking-at-do, f90-looking-at-select-case) - (f90-looking-at-if-then): Remove lets. - (f90-looking-at-where-or-forall): Handle if split over lines. - (f90-change-keywords): Doc fix. - -2002-05-19 Richard M. Stallman - - * indent.el (indent-region): Make COLUMN arg optional. - - * files.el (find-file-read-args): New function. - (find-file, find-file-other-window, find-file-other-frame) - (find-file-read-only, find-file-read-only-other-window) - (find-file-read-only-other-frame): Use it. - - * custom.el (custom-load-symbol): Verify that LOADED is a string. - - * arc-mode.el (archive-zip-use-pkzip): Variable deleted. - (archive-zip-extract, archive-zip-expunge, archive-zip-update) - (archive-zip-update-case): Use locate-file to decide whether - to use pkzip. - (archive-zip-extract): Test for pkzip in value of archive-zip-extract. - - * files.el (locate-file): Doc fix. - -2002-05-19 John Paul Wallington - - * mail/rmail.el (rmail-show-message-hook): Offer `goto-address' - as an option. - -2002-05-18 Stefan Monnier - - * uniquify.el (uniquify-rationalize-file-buffer-names): - Always strip the trailing / even if the file is not a directory. - -2002-05-18 Glenn Morris - - * progmodes/f90.el (f90-mode-syntax-table, f90-mode-map): Do the - initialization in the defvar. - (f90-font-lock-on, f90-font-lock-off): Add 'menu-alias property. - (f90-font-lock-1, f90-font-lock-2, f90-font-lock-3) - (f90-font-lock-4): Move the doc strings. - (f90-menu-bar-menu): New internal variable to hold the top-level menu. - (f90-change-case-menu, f90-font-lock-menu): Minor code changes. - (f90-mode-abbrev-table): Initialize in the defvar, with - define-abbrev-table. - -2002-05-18 Eli Zaretskii - - * tar-mode.el (tar-octal-time): Fix last change. - -2002-05-18 Markus Rost - - * mail/emacsbug.el (report-emacs-bug-text-prompt): New variable. - (report-emacs-bug): Store the prompt in - `report-emacs-bug-text-prompt'. Move Configuration/Important - settings information after the user's report. - (report-emacs-bug-hook): Unclutter by deleting the content of - `report-emacs-bug-text-prompt'. - -2002-05-17 Thomas Morgan - - * forms.el (forms-jump-record, forms-insert-record) - (forms-delete-record): Calculate lines from the beginning of the - accessible portion rather than from the beginning of the buffer. - -2002-05-16 Eli Zaretskii - - * ps-mule.el (eval-and-compile): Add a trivial replacement for a - possibly missing encode-char. - (ps-mule-font-info-database-bdf): Add associations for Unicode - fonts. Doc fix. - (ps-mule-font-info-database-ps-bdf): Doc fix. - (ps-mule-encode-ucs2): New function for encoding Unicode characters. - - * tar-mode.el (tar-octal-time): Fix the last argument of logior. - -2002-05-16 Stefan Monnier - - * emacs-lisp/find-func.el (find-function-search-for-symbol): - Find funs defined with defun-cvs-mode. - (find-function-space-re): New const. Skips comments as well. - (find-function-regexp, find-variable-regexp): Use it. - - * pcvs.el (cvs-cmd-do): Accept non-CVS dirs with CVS-ctrl'd subdirs. - (cvs-mode-add-change-log-entry-other-window): Work on multiple files. - (cvs-mode-set-flags): Don't cons unnecessarily. - -2002-05-16 Colin Walters - - * menu-bar.el (menu-bar-tools-menu) : Renamed to - "Simple Calculator". - (menu-bar-tools-menu) : New. - -2002-05-16 Juanma Barranquero - - * progmodes/hideshow.el (hs-adjust-block-beginning): Fix typo. - - * filesets.el (filesets-ormap): Fix typo. - - * faces.el (describe-face): Fix typo. - -2002-05-15 Stefan Monnier - - * emacs-lisp/easymenu.el (easy-menu-make-symbol): - Don't treat (lambda () ...) as an expression. - -2002-05-15 John Paul Wallington - - * replace.el (occur-read-primary-args): Handle a bare 'C-u' correctly. - -2002-05-15 Eli Zaretskii - - * emacs-lisp/easymenu.el (easy-menu-add): Doc fix. - -2002-05-14 Glenn Morris - - * progmodes/fortran.el (fortran-directive-re): New name for - fortran-preprocessor-re. All usage updated. - (fortran-calculate-indent): Give directives zero indentation. - -2002-05-14 Jason Rumney - - * emacs-lisp/easymenu.el (easy-menu-name-match): Match both - displayed text and internal name as string. - -2002-05-14 Kim F. Storm - - * emulation/cua-rect.el (cua--rectangle-operation): - Don't highlight empty lines in rectangles. - - * emulation/keypad.el: Improved commentary. - (keypad-setup, keypad-shifted-setup): Added choice to setup - Numeric keypad with decimal key; value is selected character. - (keypad-decimal-key, keypad-shifted-decimal-key): Removed options. - (keypad-numlock-setup, keypad-numlock-shifted-setup): New options. - (keypad-setup): Arg list changed to support the new options. - -2002-05-14 Richard M. Stallman - - * dabbrev.el (dabbrev-case-distinction): New option. - (dabbrev--try-find): Handle dabbrev-case-distinction. - (dabbrev--search): Clean up the code. - (dabbrev-upcase-means-case-search): Doc fix. - (dabbrev-case-replace): Fix custom tags and docs. - -2002-05-14 Jochen K,A|(Bpper - - * calc/calc-units.el (math-standard-units): Update from CODATA. - -2002-05-14 Stefan Monnier - - * skeleton.el (skeleton-transformation): Default to `identity'. - (skeleton-insert): Use `move-after' markers and `insert' rather - than rely on insert-before-markers. - (skeleton-internal-1): Handle `> \n' specially so that the newline - is inserted before the first line is indented. - -2002-05-14 Mike Williams - - * textmodes/sgml-mode.el (sgml-tag): - Default skeleton-transformation to `identity'. - -2002-05-14 Francesco Potort,Al(B - - * shell.el (shell-mode): Make second part of initialisation - depend on whether comint-input-ring is empty, rather than depend - on it being nil. - -2002-05-14 Richard M. Stallman - - * files.el (make-auto-save-file-name): - Delete the auto-save file after make-temp-file creates it. - -2002-05-13 Kim F. Storm - - * emulation/cua-base.el (cua-enable-cursor-indications): Default off. - (cua-mode): Print Enabled/Disabled messages if interactive. - Disable delete-selection-mode and pc-selection-mode when cua-mode - is enabled; reenable if cua-mode is turned off. - Remember setting of transient-mark-mode when cua-mode is enabled; - restore if cua-mode is disabled. - -2002-05-13 Richard M. Stallman - - * mail/emacsbug.el (report-emacs-bug): Change the "English please" msg. - -2002-05-13 Colin Walters - - * ibuf-ext.el (ibuffer-format-filter-group-data): New function. - - * ibuffer.el (ibuffer-insert-filter-group): New argument filter-string. - (ibuffer-redisplay-engine): Handle it. - - * add-log.el (add-log-mailing-address): Can be a list, too. - (add-change-log-entry): If `add-log-mailing-address' is a list, - then handle it. - -2002-05-12 Colin Walters - - * replace.el (occur-1): New optional argument `buf-name'. - (occur-revert-function): Use it. - - (occur-1): Handle plurals. - - (occur-engine): If there are no more matches, then finish - searching the current buffer. - -2002-05-12 Pavel Jan,Am(Bk - - * net/ange-ftp.el (ange-ftp-try-passive-mode) - (ange-ftp-passive-host-alist): Change :version attributes to be - strings. - -2002-05-12 Markus Rost - - * emacs-lisp/checkdoc.el (checkdoc-minor-mode): Define it with - define-minor-mode. - - * emacs-lisp/find-func.el (find-function-search-for-symbol): - Handle more whitespace/newline combinations in symbol definitions. - -2002-05-12 Eli Zaretskii - - * w32-vars.el (w32) - * vc-cvs.el (vc-cvs-global-switches) - (vc-cvs-sticky-date-format-string, vc-cvs-sticky-tag-display) - * textmodes/sgml-mode.el (sgml-xml-mode) - * ruler-mode.el (ruler-mode) - * replace.el (query-replace-skip-read-only) - * progmodes/fortran.el (fortran-preprocessor-re) - * net/ange-ftp.el (ange-ftp-passive-host-alist) - * mail/sendmail.el (mail-use-dsn) - * faces.el (mode-line-inactive, minibuffer-prompt) - * add-log.el (add-log-always-start-new-record): Change all - post-21.1 :version attributes to 21.4. - -2002-05-12 Richard M. Stallman - - * mail/smtpmail.el (smtpmail-mail-address): New variable. - (smtpmail-send-it): Bind and use that instead of `mail-address'. - (smtpmail-via-smtp): Likewise. - - * ansi-color.el (ansi-color-get-face): Avoid add-to-list on local var. - (ansi-color-apply-sequence): Avoid duplicates in combined face list. - - * dired-aux.el (dired-show-file-type): Use -- to say FILE's not option. - - * subr.el (functionp): Catch errors in indirect-function. - -2002-05-12 Pavel Jan,Am(Bk - - * net/ldap.el (ldap-search-internal): Unfold folded lines before - parsing. - - * cus-edit.el (customize-set-value): Rename `var' to `variable' - and `val' to `value'. - (customize-save-variable): Rename `var' to `'variable. - -2002-05-12 Glenn Morris - - * progmodes/fortran.el (fortran-preprocessor-re): New variable. - Use it for font-locking and indentation. - (fortran-previous-statement, fortran-next-statement): Make them - skip over preprocessor lines. - (fortran-calculate-indent): Use fortran-preprocessor-re. - -2002-05-10 Kim F. Storm - - * emulation/cua-base.el (cua-enable-cua-keys) - (cua-enable-register-prefix): Added value for `other' choice. - -2002-05-10 Eli Zaretskii - - * menu-bar.el (menu-bar-showhide-scroll-bar-menu) - (menu-bar-showhide-menu): Use display-graphic-p, not window-system. - (menu-bar-showhide-menu) : - Run a named function. - (showhide-menu-bar, showhide-toolbar): Invoke customize-mark-as-set. - (menu-bar-showhide-menu) : - Fix help text. - -2002-05-10 Kim F. Storm - - * emulation/cua-base.el (cua-mode): Misc. changes to use - emulation-mode-map-alists instead of minor-mode-map-alist. - -2002-05-09 Richard M. Stallman - - * mail/rmail.el (rmail-show-message): - Catch error in check-coding-system. - - * progmodes/compile.el (compilation-error-regexp-alist): - New element to recognize Python error messages. - - * shell.el (shell-replace-by-expanded-directory): - If there's already a / at the end, don't add one. - -2002-05-09 Colin Walters - - * ibuffer.el (ibuffer-mode-map): Add :enable guards for - `ibuffer-filter-disable', `ibuffer-pop-filter', - `ibuffer-or-filter', `ibuffer-negate-filter', - `ibuffer-decompose-filter', `ibuffer-save-filters', - `ibuffer-switch-to-saved-filters', `ibuffer-delete-saved-filters', - `ibuffer-save-filter-groups', - `ibuffer-switch-to-saved-filter-groups', - `ibuffer-delete-saved-filter-groups'. - - * ibuf-ext.el (ibuffer-do-occur): Default to 0 context lines. - -2002-05-09 Markus Rost - - * woman.el (woman-menu): Move symbol before the comment so that - find-function-search-for-symbol finds it. - -2002-05-10 Miles Bader - - * facemenu.el (list-colors-display): Don't use - `display-color-cells' unless the display class is one for which - that info is relevant. - -2002-05-09 Simon Josefsson - - * mail/smtpmail.el (smtpmail-send-it): Use user-mail-address from - calling buffer. - (smtpmail-auth-credentials): Bump :version to 21.4 (21.3 will not - have the patch). - -2002-05-09 Kim F. Storm - - * wid-edit.el (checkbox): New check-mark image. - -2002-05-08 Pavel Jan,Am(Bk - - * filesets.el (filesets-running-xemacs): Fix last change. - -2002-05-08 Markus Rost - - * help-fns.el (describe-function-1): If the source is - `loaddefs.el', look for the real source. This is necessary only - for defaliases. - - * emacs-lisp/find-func.el (find-function-search-for-symbol): - Add autoload cookie. - (find-function-regexp): Include - "\(quote " to match the defaliases in loaddefs.el. - - * filesets.el (filesets-conditional-sort): Use copy-sequence, - not copy-list. - (filesets-menu-path, filesets-menu-before, filesets-menu-in-menu): - Defvar them to nil if running in Emacs. - -2002-05-08 Pavel Jan,Am(Bk - - * textmodes/flyspell.el (make-flyspell-overlay): Add help text - to flyspell overlays. - - * info.el (Info-mode-map): Bind `c' to Info-copy-current-node-name. - -2002-05-08 Richard M. Stallman - - * diff.el (diff-regexp-alist): Doc fix. - - * mail/smtpmail.el (netrc-machine, netrc-get): Add autoloads. - -2002-05-08 Simon Marshall - - * msb.el (msb-menu-bar-update-buffers): Fixed frame menu to use - the frame name as the car of a menu entry, rather than the frame. - -2002-05-08 Juanma Barranquero - - * rfn-eshadow.el (read-file-name-electric-shadow-mode): Fix typos - in docstring. - -2002-05-07 Colin Walters - - * replace.el (occur-unfontify-region-function): Delete. - (occur-mode): Don't use it. - (occur-engine): Respect `keep-props'. - (occur-accumulate-lines): If we're moving forward, decrement; - don't increment, and vice versa. - -2002-05-08 Toru Tomabechi - - * language/tibet-util.el (tibetan-canonicalize-for-unicode-alist) - (tibetan-canonicalize-for-unicode-regexp): New variables. - (tibetan-canonicalize-for-unicode-region): New function. - (tibetan-strict-unicode): New variable. - (tibetan-pre-write-canonicalize-for-unicode): New function. - -2002-05-07 Markus Rost - - * net/ange-ftp.el (ange-ftp-re-read-dir): Don't hide it behind - the autoload-cookie. Remove comment. - - * ffap.el (ffap): Don't hide it behind the autoload-cookie. - - * rect.el (close-rectangle): Don't hide it behind the - autoload-cookie. - -2002-05-07 Juanma Barranquero - - * windmove.el (windmove-default-keybindings): Add optional - parameter to allow using a modifier other than 'shift. - -2002-05-07 Thomas Link - - * filesets.el: - (filesets-external-viewers): Fix customization problem. - (filesets-some): Replaces cl's `some'. Calls changed. - (filesets-member): Replaces cl's `member*'. Calls changed. - (filesets-ormap): New function. - -2002-05-07 John Paul Wallington - - * ibuffer.el (toplevel): Specialize `ibuffer-mode-groups-popup' - menu items. - -2002-05-07 Colin Walters - - * ibuf-ext.el (ibuffer-pop-filter-group): Doc fix. - (ibuffer-clear-filter-groups): Likewise. - (ibuffer-kill-filter-group): Likewise. - (ibuffer-kill-line): Likewise. - (ibuffer-read-filter-group-name): New function. - (ibuffer-jump-to-filter-group): Use it. - (ibuffer-kill-filter-group): Likewise. - (ibuffer-yank-filter-group): Likewise. - (ibuffer-decompose-filter-group): New function. - - * ibuffer.el (ibuffer-mode-map): Bind it. Add :enable guard - around `ibuffer-filters-to-filter-group' menu item. Fix :enable - guards for `ibuffer-pop-filter-group' and - `ibuffer-clear-filter-groups'. - -2002-05-06 Markus Rost - - * emacs-lisp/find-func.el (find-function-search-for-symbol): - Use with-syntax-table. - -2002-05-06 Francesco Potort,Al(B - - * mail/rmail.el (rmail-font-lock-keywords): Highlight Resent-[Ff]rom:. - -2002-05-05 Markus Rost - - * time-stamp.el (time-stamp-format): Doc fix: escape open - parenthesis in column 0. - -2002-05-04 Richard M. Stallman - - * toolbar/tool-bar.el (tool-bar-local-item-from-menu): - Handle both cases: when the menu item has cached info - and when it doesn't. - - * filesets.el (filesets-browse-dir-function): Renamed from ...-fn. - (filesets-open-file-function, filesets-save-buffer-function): Likewise. - (filesets-tree-max-level): Doc fix. - (filesets-commands, filesets-external-viewers) - (filesets-ingroup-patterns): Mark as risky. - (filesets-cache-hostname-flag): Doc fix. - (filesets-menu-cache-file): Doc fix. Mark as risky. - (filesets-menu-before, filesets-menu-path, filesets-menu-in-menu): - Don't defcustom them if running in Emacs. - -2002-05-04 Thomas Link - - * filesets.el (filesets-ingroup-collect-files): - Fix problem with inclusion groups' :scan-depth property. - -2002-05-04 Colin Walters - - * ibuf-ext.el (ibuffer-kill-filter-group): Test for killing - "Default" group earlier. Push killed group on - `ibuffer-filter-group-kill-ring'. - (ibuffer-kill-line): Document. Don't push killed group ourselves. - (ibuffer-yank-filter-group): Renamed from `ibuffer-yank'. - (ibuffer-insert-filter-group-before): New function, broken out - from `ibuffer-yank'. - (ibuffer-yank): Now just call `ibuffer-yank-filter-group'. - - * ibuffer.el (ibuffer-mode-operate-menu, ibuffer-mode-mark-menu) - (ibuffer-mode-view-menu): Unused variables; deleted. - (ibuffer-find-file): Pass wildcard flag to `find-file' correctly. - -2002-05-04 John Paul Wallington - - * ibuffer.el (ibuffer-mode-groups-popup): New variable. - (toplevel): Bind filter group menu entries in it. Add :enable - forms for some menu items. - (toplevel): Bind [down-mouse-3] in `ibuffer-mode-filter-group-map' - to `ibuffer-mouse-popup-menu'. - (ibuffer-mouse-popup-menu): Test whether or not we're on a filter - group name, and if so, pop up a filter group menu. - -2002-05-04 Jason Rumney - - * mwheel.el (mwheel-event-button): Translate mouse-wheel events. - (mwheel-scroll): Recognize nil scroll amount as documented. - - * term/w32-win.el (mouse-wheel-scroll-line) - (mouse-wheel-scroll-screen): Remove. - ([mouse-wheel], [C-mouse-wheel], [S-mouse-wheel]): Use mwheel-scroll. - - * w32-vars.el: (mouse-wheel-scroll-amount): Removed. - -2002-05-04 Markus Rost - - * emacs-lisp/find-func.el (find-function-search-for-symbol): - Bind case-fold-search when searching. - -2002-05-04 Eli Zaretskii - - * apropos.el (apropos-print): Fix the reference to mouse-2. - -2002-05-04 Daniel Pfeiffer - - * play/mpuz.el (mpuz-switch-to-window): Set buffer-read-only directly. - -2002-05-04 Kim F. Storm - - * cus-edit.el (custom-buffer-verbose-help): New variable. - (custom-buffer-create-internal): Remove verbose introduction - in customization buffer when it is nil. - -2002-05-03 Dave Love - - * international/mule-cmds.el (select-safe-coding-system): - Don't offer coding systems that use locking shift. - Ask for confirmation if chosen coding system disagrees with - a `coding:' spec in the file. - -2002-05-03 John Wiegley - - * eshell/esh-var.el (eshell-modify-global-environment): Added this - customization variable, which will cause any "export" commands - within any eshell buffer to modify the global Emacs environment. - It defaults to nil, which means that such commands will only - modify that Eshell buffer's environment. - (eshell-var-initialize): Initialize `eshell-modify-global-environment'. - - * eshell/em-cmpl.el (eshell-command-completions-alist): - Improve default completion targets for objdump, nm and readelf. - -2002-05-03 Colin Walters - - * play/gamegrid.el (gamegrid-user-score-file-directory): New variable. - (gamegrid-add-score-with-update-game-score): - Use `shared-game-score-directory'. Correctly handle non-setuid case. - -2002-05-02 Colin Walters - - * replace.el (occur-mode-map): Bind "q" to `delete-window'. - (occur-1): If one of the buffers we're searching is the *Occur* - buffer itself, handle it by creating a temporary buffer. If any - of the buffers being searched are killed, note that in the search - result message. Also, set local variables before we possibly kill - the buffer. - -2002-05-02 Kim F. Storm - - * menu-bar.el (menu-bar-make-toggle): Added optional PROPS arg. - (menu-bar-options-save): Added cua-mode. - (menu-bar-options-menu): Added toggle for cua-mode. - Disable toggle for transient-mark-mode if cua-mode is enabled. - - * emulation/cua-base.el (cua-inhibit-cua-keys): New buffer-local - variable. - -2002-05-01 Richard M. Stallman - - * help.el (view-todo): New function. - (help-map): Bind C-h C-t to view-todo. - (help-for-help): Change the text. - -2002-05-01 Glenn Morris - - * progmodes/f90.el: Yet more doc string, commment and whitespace - changes. - (f90-imenu-flag): New name for internal variable f90-imenu. - (f90-blocks-re, f90-program-block-re, f90-end-if-re) - (f90-no-break-re): Use regexp-opt. - (f90-end-type-re): Add closing "\\>". - (f90-indent-region): Correctly indent comments embedded in - continued lines. - (f90-indent-new-line): Make it indent the current line, as it should. - (f90-line-continued, f90-get-present-comment-type) - (f90-looking-at-if-then, f90-indent-line, f90-indent-new-line) - (f90-indent-region, f90-indent-subprogram, f90-do-auto-fill) - (f90-join-lines, f90-fill-region, f90-match-end, f90-insert-end) - (f90-change-keywords): Minor code tidying. - - * progmodes/fortran.el (fortran-strip-sequence-nos): Rename from - typo `fortran-strip-sqeuence-nos'. - -2002-05-01 Eli Zaretskii - - * simple.el (clone-indirect-buffer-other-window): Fix a typo in - pop-up-window. - -2002-05-01 Kim F. Storm - - * emulation/cua-base.el (cua--pre-command-handler): - Only interpret delete-selection property if mark-active. - (cua-mode): Fixed require in defcustom. - -2002-05-01 Pavel Jan,Am(Bk - - * calendar/cal-menu.el (cal-menu-x-popup-menu): Fix argument of - error call. - -2002-05-01 Colin Walters - - * textmodes/tex-mode.el (tex-validate-buffer): - Use `occur-revert-arguments' instead of setting `occur-nlines' and - `occur-buffer'. Don't test for `input-pending-p' in loop. - Set text property `occur-target' instead of `occur'. - -2002-04-30 John Wiegley - - * align.el (align-region): Fixed the fix to align-region, because - the "name" argument was appearing twice. - -2002-05-01 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-decl-1): Better way - to handle protection labels, one which doesn't get confused by - inherit colons. - - * progmodes/cc-engine.el (c-end-of-decl-1): Don't treat - functions that have "class" or "struct" in the return type as - classes or structs. - -2002-04-30 Kim F. Storm - - * menu-bar.el (menu-bar-custom-menu): Change "Recently Changed - Options" to "New Options..."; rephrase tooltip. - Rephrase tooltip for "Specific Option...". - Added "Saved Options" item. [from Simon Marshall] - -2002-04-30 Richard M. Stallman - - * time.el (display-time-mail-directory) - (display-time-mail-function): Doc fixes. - - * ediff-hook.el: Remove autoload cookies. - - * language/tibetan.el (tibetan-obsolete-glyphs): Now in tibet-util.el. - - * language/tibet-util.el (tibetan-obsolete-glyphs): From tibetan.el. - - * align.el (align-region): Fix call to `message'. - Check that (car rule) is a symbol. - - * autoinsert.el (auto-insert-directory): Doc fix. - - * facemenu.el (describe-text-at and stuff): Moved to descr-text.el. - - * descr-text.el: New file, broken out of facemenu.el. - - * emacs-lisp/advice.el (documentation): Add ad-define-subr-args call. - -2002-04-29 Markus Rost - - * mail/emacsbug.el (report-emacs-bug-hook): - Use replace-match only if search was successful. - -2002-04-29 Richard M. Stallman - - * net/zone-mode.el (zone-mode): Add write-file-hooks hook locally. - - * mail/emacsbug.el (report-emacs-bug-hook): Don't fail completely - if the user edits the Emacs version number in the text. - - * filesets.el (filesets-running-xemacs): Make defvar unconditional. - (filesets-ingroup-files): Renamed from filesets-ingroup-paths. - (filesets-error): Simplify definition and make conditional - on filesets-running-xemacs. - (filesets-find-file-using): Renamed from fsfind-file-using. - -2002-04-29 Stefan Monnier - - * info.el (Info-find-in-tag-table-1, Info-read-subfile): Use point-min. - (Info-read-node-name-1): Complete file names. - (Info-complete-menu-item): Don't cons unnecessarily. - - * files.el (locate-file): New fun. - (locate-file-completion): Rename from load-completion and generalize. - (load-library): Use it. - (make-auto-save-file-name): Expand caddr. - - * newcomment.el (comment-fill-column): New var. - (comment-indent): Use it. - (comment-or-uncomment-region): New fun. - (comment-dwim): Use it. - -2002-04-29 Colin Walters - - * ibuf-ext.el (ibuffer-kill-filter-group): Call `delete' function. - (ibuffer-kill-line): Copy the filter group data structure when killing. - (ibuffer-yank): Handle case where we're yanking on the default - group correctly. - (ibuffer-delete-saved-filter-groups): Doc fix. - - * play/gamegrid.el (gamegrid-add-score-with-update-game-score): - Test whether or not update-game-score is setuid, and do the right - thing. - -2002-04-29 Kim F. Storm - - * subr.el (remove-yank-excluded-properties): New helper function. - (insert-for-yank, insert-buffer-substring-as-yank): Use it. - - * simple.el (yank-excluded-properties): Added help-echo to list. - -2002-04-29 Glenn Morris - - * autoinsert.el (auto-insert-directory): Doc fix. - - * progmodes/f90.el: Add/change doc strings for many inline - functions. Whitespace changes. - (f90-indent-line-no, f90-update-line): Minor code changes. - -2002-04-29 Kim F. Storm - - * emulation/cua-base.el: New file. - - * emulation/cua-rect.el: New file. - - * emulation/cua-gmrk.el: New file. - - * emulation/keypad.el: New file. - -2002-04-29 Triet Hoai Lai - - * language/vietnamese.el (viet-tcvn-decode-table, ccl-decode-tcvn) - (ccl-encode-tcvn, ccl-encode-tcvn-font, vietnamese-tcvn): - New Vietnamese coding system. - - * language/viet-util.el: Update Commentary section. - -2002-04-29 Pavel Jan,Am(Bk - - * filesets.el (filesets-data): Doc fix. - (filesets-running-xemacs): Define even when compiling. - - * recentf.el (recentf-cancel-dialog): Remove dot at the end of - sentence. - -2002-04-29 Stefan Monnier - - * textmodes/fill.el (fill-context-prefix): Fix last change with - yet-another-approach. - -2002-04-28 Markus Rost - - * net/ange-ftp.el (ange-ftp-passive-host-alist) - (ange-ftp-bs2000-additional-pubsets): Fix custom type. - - * files.el (small-temporary-file-directory): Fix custom type. - -2002-04-28 Glenn Morris - - * progmodes/f90.el (f90-xemacs-flag): New variable. - (f90-mark-subprogram-overlay): New variable. - (f90-mark-subprogram): Now it highlights the subprogram. - (f90-font-lock-keywords-1, f90-font-lock-keywords-2): - Fix highlighting of various "type" forms. - -2002-04-28 Colin Walters - - * ibuffer.el (ibuffer-mode): Additional documentation on filter - groups. - -2002-04-28 John Paul Wallington - - * ibuf-ext.el (ibuffer-set-filter-groups-by-mode): Don't make an - ibuffer-mode filter group if `ibuffer-view-ibuffer' is nil. - -2002-04-28 Richard M. Stallman - - * mail/sendmail.el (mail-recover-1): Decrease non-random-len - by 1 for the newly-readded #. - - * files.el (make-auto-save-file-name): Specify # as suffix - in the non-file-visiting case. - - * subr.el (make-temp-file): New arg SUFFIX. - - * filesets.el: New file. - - * replace.el (occur-accumulate-lines): Avoid incf and decf. - (occur-engine-add-prefix): New function. - (occur-engine): Avoid using macrolet, incf and decf. - Use occur-engine-add-prefix instead. - Rename `l' to `lines' and `c' to `matches'. - - * replace.el (occur-engine, occur-mode-mouse-goto) - (occur-mode-find-occurrence, occur-mode-goto-occurrence) - (occur-mode-goto-occurrence-other-window) - (occur-mode-display-occurrence): A position is just a marker, - not a list. - - * replace.el (occur-revert-arguments): - Renamed from occur-revert-properties. All uses changed. - -2002-04-28 Pavel Jan,Am(Bk - - * recentf.el (recentf-menu-before): Use string to specify path in - the menu. - - * international/mule-cmds.el (read-language-name): Take care of - non-list values. - -2002-04-27 Richard M. Stallman - - * custom.el (custom-load-symbol): Moved from cus-edit.el. - (custom-load-recursion): Likewise. - - * cus-edit.el (custom-load-symbol): Moved to custom.el. - (custom-load-recursion): Likewise. - - * progmodes/ada-xref.el (ada-add-ada-menu): Menu pseudo-keys - generated by easymenu are now lowercase. - -2002-04-27 Richard M. Stallman - - * menu-bar.el (menu-bar-update-buffers): Add menu items - Next Buffer and Previous Buffer. - - * simple.el (next-buffer, prev-buffer): New commands. - Bind C-x left and C-x right to them. - - * info.el (Info-header-line): Mark it as risky-local-variable. - - * subr.el (insert-for-yank): Replace `category' property - with whatever properties it stands for. - - * subr.el (member-ignore-case): Ignore non-strings in LIST. - -2002-04-27 Miles Bader - - * faces.el (read-face-name): Format the prompt correctly when - there's no default. - -2002-04-26 Andrew Choi - - * term/mac-win.el: Don't call ediff-toggle-multiframe. - Set default directory. Set process-connection-type to nil. - -2002-04-26 Richard M. Stallman - - * loadup.el: Explicitly load cus-face and timer. - - * isearch.el: Don't require timer. - - * faces.el: Don't require cus-face. - - * cus-edit.el (customize-face): Use read-face-name - and handle multiple faces. - (customize-face-other-window): Make it work similarly. - - * faces.el (read-face-name): New defaulting features. - New args STRING-DESCRIBING-DEFAULT and MULTIPLE. - (list-faces-display): Use the face, not its name string, - as arg when running customize-face. - Put a `read-face-name' prop on the entire line. - (describe-face): Handle multiple faces via read-face-name. - - * textmodes/tex-mode.el (tex-start-options): New variable. - (tex-start-commands): New variable. - (tex-start-options-string): Variable deleted. - (tex-start-tex): Use tex-start-options and tex-start-commands, - not tex-start-options-string. - (tex-command): Doc fix. - -2002-04-26 Sam Steingold - - * mail/smtpmail.el (smtpmail-try-auth-methods): When `host' is - not in the authinfo/netrc, keep `cred' at nil. - -2002-04-26 Gerd Moellmann - - * find-file.el: Remove Ada-specific example code. - -2002-04-25 Michael Kifer - - * ediff-hooks.el: Put back the autoloads. - -2002-04-25 Colin Walters - - * ibuffer.el (define column process): Use `ibuffer-aif'. - - * ibuf-ext.el (ibuffer-saved-filter-groups): Don't include broken - defaults. - (ibuffer-yank): Be sure to `setq' after we use `nconc'. - (ibuffer-save-filter-groups): Correctly structure filter groups. - (ibuffer-switch-to-saved-filter-groups): Correctly extract filter - groups. - -2002-04-25 Simon Josefsson - - * mail/sendmail.el (mail-use-dsn): New variable to request - delivery status notification from MTA. - (sendmail-send-it): Use it. - - * mail/smtpmail.el (smtpmail-queue-counter): New variable. - (smtpmail-send-it): Use it to construct new queue filenames - (needed if you send more than one message per second, which is - possible if you use Gnus Agent). - - * mail/smtpmail.el (smtpmail-auth-credentials): Support netrc - files as well. - (smtpmail-try-auth-methods): Support netrc data. - (netrc-parse): Autoload netrc. - -2002-04-25 Colin Walters - - * replace.el (multi-occur-by-filename-regexp): Doc fix. - (occur-engine): Go to `point-min'. Make nlines argument actually - mean number of context lines. Handle it. Pad digits to the right. - - * ibuf-ext.el (ibuffer-filtering-groups): Renamed to - `ibuffer-filter-groups'. All users updated. - (ibuffer-show-empty-filter-groups): New variable. - (ibuffer-saved-filter-groups): New variable. - (ibuffer-maybe-save-stuff): Renamed from - `ibuffer-maybe-save-saved-filters'. Callers updated. - Handle `ibuffer-saved-filter-groups'. - (ibuffer-hidden-filtering-groups): Renamed to - `ibuffer-hidden-filter-groups'. - (ibuffer-filter-group-kill-ring): New variable. - (ibuffer-save-with-custom): Doc fix. - (ibuffer-set-filter-groups-by-mode): New function. - (ibuffer-clear-filter-groups): New function. - (ibuffer-current-filter-groups-with-position): Renamed from - `ibuffer-current-filter-groups'. Callers updated. - (ibuffer-kill-filter-group): New function. - (ibuffer-kill-line): New function. - (ibuffer-yank): New function. - (ibuffer-save-filter-groups): New function. - (ibuffer-delete-saved-filter-groups): New function. - (ibuffer-switch-to-saved-filter-groups): New function. - (ibuffer-mark-on-buffer): Add optional arguments for adding a - specific mark, and marking on a specific group. - - * ibuffer.el (ibuffer-formats): Doc fix. - (ibuffer-mode-map): Bind to `ibuffer-backward-line'. - Bind new functions from ibuf-ext.el. Add menu entries for them. - Remove superfluous tooltips. - (ibuffer-toggle-marks): If on a group name, then toggle marks just - in that group. - (ibuffer-mark-interactive): Handle filter groups. - (ibuffer-mark-forward, ibuffer-unmark-forward) - (ibuffer-mark-for-delete, ibuffer-unmark-backward) - (ibuffer-mark-for-delete-backwards): Update docs. - (ibuffer-current-filter-groups): Moved to ibuf-ext.el, and renamed - to `ibuffer-current-filter-groups-with-position'. - (ibuffer-redisplay-engine): Handle `ibuffer-show-empty-filter-groups'. - (ibuffer-mode): Add some documentation about filter groups. - -2002-04-25 Andreas Schwab - - * find-dired.el (find-name-dired): Don't quote pattern twice. - -2002-04-26 Miles Bader - - * cus-edit.el (customize-face, customize-face-other-window): - Use default instead of initial-input for suggested face. - -2002-04-25 Gerd Moellmann - - * cus-edit.el (customize-face-other-window, customize-face): - Interactively, when point is on text with a face, suggest to - customize that face. - -2002-04-25 Glenn Morris - - * progmodes/f90.el: General tidy-up of commentary and some doc - strings. - -2002-04-24 Glenn Morris - - * scroll-all.el (scroll-all-function-all) New function to do the - actual work. - (scroll-all-scroll-down-all, scroll-all-scroll-up-all, - scroll-all-page-down-all, scroll-all-page-up-all, - scroll-all-beginning-of-buffer-all, scroll-all-end-of-buffer-all): - Make them use scroll-all-function-all. - - * progmodes/f90.el (f90-get-beg-of-line): Removed and replaced - with line-beginning-position. - (f90-get-end-of-line): Removed and replaced with line-end-position. - (f90-match-piece): Removed and replaced with match-string. - (f90-current-indentation): Remove `current-column'. - (f90-get-present-comment-type): Use match-string rather than - buffer-substring. - (f90-match-end): Use line-beginning-position, line-end-position - rather than beginning-of-line, end-of-line. - (f90-startup-message): Variable removed. - -2002-04-24 Colin Walters - - * replace.el (occur-accumulate-lines): Add optional argument - `no-props'. Handle it. - (occur-engine): Use it. - - * ibuf-ext.el (toplevel): Remove byte-compile-dynamic. Try to set - up autoloads manually. - (ibuffer-split-list): New function. - (ibuffer-filtering-groups): New variable. - (ibuffer-hidden-filtering-groups): New variable. - (ibuffer-mouse-toggle-filter-group): New function. - (ibuffer-toggle-filter-group): New function. - (ibuffer-toggle-filter-group-1): New function. - (ibuffer-forward-filter-group): New function. - (ibuffer-backward-filter-group): New funtion. - (ibuffer-generate-filter-groups): New function. - (ibuffer-filters-to-filter-group): New function. - (ibuffer-pop-filter-group): New function. - (ibuffer-jump-to-filter-group): New function. - (ibuffer-do-occur): Just use `occur-read-primary-args' - - * ibuffer.el (ibuffer-filter-group-name-face): New. - (ibuffer-mode-map): Bind and add menu entries for most new - functions; also, bind the arrow keys to the movement functions. - (ibuffer-mode-filter-group-map): New. - (ibuffer-mouse-toggle-mark): Handle group names. - (ibuffer-mouse-visit-buffer): Error if the current buffer is killed. - (ibuffer-skip-properties): New function. - (ibuffer-backward-line, ibuffer-forward-line): Optionally skip - group names. Also, handle new properties. - (ibuffer-visit-buffer, ibuffer-visit-buffer-other-window): - Move error handling to `ibuffer-current-buffer'. - (ibuffer-visit-buffer-other-frame, ibuffer-bury-buffer): Ditto. - (ibuffer-visit-tags-table, ibuffer-do-view-1): Ditto. - (ibuffer-toggle-marks): Add optional group argument. - (ibuffer-mark-interactive): Skip group names. - (ibuffer-current-buffer): Clean up error handling. - (ibuffer-fontify-region-function): Fontify group names. - (ibuffer-map-lines): Add extra group argument. Handle it. - (ibuffer-current-filter-groups): New function. - (ibuffer-redisplay): Handle hidden filtering groups. - (ibuffer-sort-bufferlist): New function, taken from - `ibuffer-insert-buffers-and-marks'. - (ibuffer-insert-filter-group): New function. - (ibuffer-redisplay-engine): Renamed from - `ibuffer-insert-buffers-and-marks'. Handle new filtering groups. - (ibuffer): Add filter-groups argument. Handle it. - Use `save-selected-window'. - (ibuffer-mode): Make `ibuffer-filtering-groups' and - `ibuffer-hidden-filtering-groups' buffer-local. - - * ibuf-macs.el (ibuffer-save-marks): Call `ibuffer-redisplay-engine'. - -2002-04-24 Richard M. Stallman - - * emacs-lisp/easymenu.el (easy-menu-intern): Downcase before interning. - (easy-menu-define-key-intern): Function deleted; callers intern - and then call easy-menu-define-key. - (easy-menu-do-add-item): Explicitly intern the key, but not BEFORE. - (easy-menu-define-key): Use easy-menu-name-match to match BEFORE. - (easy-menu-name-match): New function. - (add-submenu): New function. - (easy-menu-get-map-look-for-name): Use easy-menu-name-match. - -2002-04-24 Eli Zaretskii - - * menu-bar.el (menu-bar-adv-search-menu) - (menu-bar-adv-search-menu): Improve the help text. - -2002-04-24 Simon Josefsson - - * net/netrc.el: New file. - -2002-04-24 Thomas DeWeese - - * term/x-win.el (x-select-text, x-cut-buffer-or-selection-value): - Check if any of the available selection sources has new content - and if so it will return that content. - -2002-04-24 Miles Bader - - * menu-bar.el (buffers-menu-show-directories) - (buffers-menu-show-status): New variables. - (menu-bar-update-buffers-1): Use them. - -2002-04-24 Martin Stjernholm - - * progmodes/cc-cmds.el (c-mask-comment): More fixes when used - from `c-do-auto-fill' and point is at or near the limit of the - comment. Fixed bug when the prefix from `c-guess-fill-prefix' - is longer than the text on the first line of the comment when - it's masked. - -2002-04-24 Miles Bader - - * menu-bar.el (menu-bar-update-buffers-1): Make sure - `uniquify-buffer-name-style' is bound. - -2002-04-23 Colin Walters - - * replace.el (toplevel): Require `cl' while compiling. - (occur-buffer, occur-nlines): Delete. - (occur-revert-properties): Rename to `occur-revert-properties'. - (occur-mode): Handle it. Set up font lock. - (occur-revert-function): Simply apply `occur-1'. - (occur-mode-find-occurence, occur-mode-mouse-goto) - (occur-mode-goto-occurrence-other-window) - (occur-mode-display-occurrence): Handle buffer property. - (list-matching-lines-face): Use defcustom. - (list-matching-lines-buffer-name-face): New variable. - (occur-accumulate-lines): Renamed from `ibuffer-accumulate-lines', - in ibuffer.el. - (occur-read-primary-args): Move out of `occur'. - (occur): Delete. Now simply call `occur-1'. - (multi-occur, multi-occur-by-filename-regexp): New functions. - (occur-1): New function. - (occur-engine): Renamed from `ibuffer-occur-engine' to replace the - previous implementation of `occur'; taken from ibuf-ext.el. - (occur-fontify-on-property): New function. - (occur-fontify-region-function, occur-unfontify-region-function): - New functions. - - * ibuffer.el (ibuffer-accumulate-lines): Moved to replace.el. - - * ibuf-ext.el (ibuffer-depropertize-string): Delete. - (ibuffer-occur-match-face): Delete. - (ibuffer-occur-props, ibuffer-occur-mode): Delete. - (ibuffer-occur-mouse-display-occurence): Delete. - (ibuffer-occur-goto-occurence, ibuffer-occur-display-occurence) - (ibuffer-do-occur-1, ibuffer-occur-revert-buffer-function): Delete. - (ibuffer-occur-engine): Moved to replace.el. - (ibuffer-do-occur): Simply call `occur-1'. - - * play/gamegrid.el (gamegrid-add-score-with-update-game-score): - Handle the case where we're already viewing the score file. - -2002-04-23 Andreas Schwab - - * menu-bar.el (menu-bar-goto-menu): Fix bindings for next-tag and - next-tag-otherw. - -2002-04-23 Miles Bader - - * menu-bar.el (menu-bar-update-buffers-1): Don't display a - directory separator if there's no directory. Don't display - directories at all if uniquify is active. Some code cleanup. - (uniquify-buffer-name-style): Declare (but don't initialize). - - * menu-bar.el (menu-bar-update-buffers): Don't use constant lists - for command menu entries, since the low-level menu code modifies - them. Cache the resulting list. - (menu-bar-buffers-menu-command-entries): New variable. - - * menu-bar.el (menu-bar-update-buffers): Add `Select Named Buffer'. - Add separator line before commands - Remove old crufty code that tried to line things up by adding - spaces to entries (it doesn't work). - Move `Frames' submenu after the normal buffers, and add a - separator line before it. - (menu-bar-buffers-menu-list-buffers-entry): Variable removed. - -2002-04-22 Richard M. Stallman - - * files.el (after-find-file): Use %s to output MSG. - - * dired.el (dired-mouse-find-file-other-window): - Handle events that move out of the window. - -2002-04-23 Martin Stjernholm - - * progmodes/cc-cmds.el (c-mask-comment): Fixed bug where point - was moved to the following line when it was at the first line - of a block comment where comment-start-skip matched to eol. - -2002-04-22 Richard M. Stallman - - * simple.el (line-move-finish): Find beg and end of line - before calling line-move-to-column. Do consider intangible - when finding the end. Take more care in analyzing the results - of intangibility after line-move-to-column. - -2002-04-22 Pavel Jan,Am(Bk - - * international/mule-diag.el (list-input-methods-1): Doc fix - (LEIM is now part of the standard distribution). - - * tmm.el (tmm-completion-prompt): Doc fix. - - * hilit-chg.el (global-highlight-changes): Capitalize status texts. - -2002-04-22 Edward M. Reingold - - * diary-lib.el (include-other-diary-files): Allow modifying - included buffer, to turn off selective display. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-mode.el: (c-define-abbrev-table): New function to - pass the SYSTEM-FLAG to `define-abbrev' in a way that works in - emacsen that doesn't support it. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-align.el, progmodes/cc-engine.el, - progmodes/cc-styles.el, progmodes/cc-vars.el - (c-guess-basic-syntax, c-lineup-topmost-intro-cont): - Find correct anchor for statement-cont in top level constructs. - Analyze variable initializations in top level constructs as - topmost-intro-cont instead of statement-cont. That is an - incompatible change but it gives better consistency. The new - lineup function c-lineup-topmost-intro-cont' compensates for - it and is now put on topmost-intro-cont by default. - - * progmodes/cc-align.el, progmodes/cc-engine.el, - progmodes/cc-langs.el (c-lineup-argcont): Lineup function - contributed by Kevin Ryde. - - (c-in-gcc-asm-p): Function to recognize asm statements. - Contributed by Kevin Ryde. - - (c-opt-asm-stmt-key): New language variable to recognize the - beginning of asm statements. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-guess-basic-syntax): - Detect variable declarations after class and struct declarations - correctly. Fixed limit error when finding the anchor for - template-args-cont and topmost-intro-cont. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-beginning-of-defun) - (c-declaration-limits): Find the "line oriented" declaration - start too, just like the "line oriented" end is found. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-vars.el (c-offsets-alist): A more sane default - for `inexpr-statement'. This is not compatible, though. - I think the benefit of a good default style outweights that in - this case. Besides, `inexpr-statement' is not very common. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-electric-delete-forward): - Fix silly bug that caused it to delete backwards in hungry delete - mode. (It's amazing that this bug hasn't been reported.) - - * progmodes/cc-cmds.el (c-declaration-limits, c-mark-function): - Extracted the code to get the declaration limits from - `c-mark-function' to a new `c-declaration-limits'. - - (c-indent-defun): Use the same method to get the limits of the - declaration or macro as `c-mark-function'. - - * progmodes/cc-engine.el (c-beginning-of-decl-1): Handle brace - list initializers correctly (but costly; it ought to be - integrated into `c-beginning-of-statement-1'). - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el, progmodes/cc-engine.el - (c-beginning-of-defun, c-end-of-defun, c-mark-function): - Rewritten to detect the declaration limits better. - Now handles K&R argdecls, class definitions followed by variables etc. - - (c-in-knr-argdecl): Broke out the K&R argdecl test in - `c-beginning-of-decl-1' to this new function. - - (c-end-of-statement-1, c-end-of-decl-1): - Replace `c-end-of-statement-1' with `c-end-of-decl-1', which correctly - handles declarations that continue after the block. - - * progmodes/cc-engine.el (c-syntactic-re-search-forward): - Added an option to restrict matching to the top level of the - current paren sexp. - - * progmodes/cc-langs.el (c-opt-block-decls-with-vars-key): - New regexp to recognize declarations that continue after the block. - - (c-syntactic-eol): New regexp to match a "syntactic" eol. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed a bug - that often caused the backward limit to be lost at the top - level. This improves performance a bit. - - * progmodes/cc-engine.el (c-syntactic-re-search-forward): - New function that works like `re-search-forward' but only returns - matches in syntactically significant text. - - * progmodes/cc-engine.el: Fixed a faster and more accurate way - to recognize K&R argdecls. - - (c-beginning-of-decl-1): New function that put point at the - beginning of the declaration. It handles K&R argdecl blocks. - - (c-guess-basic-syntax): Replaced the `knr-argdecl' recognition - code with one that doesn't depend on the current indentation. - The anchor position for `knr-argdecl' has also changed, but in - a way that is unlikely to cause compatibility problems. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-defs.el, progmodes/cc-engine.el - (c-forward-comment): `forward-comment' in XEmacs skips over - line continuations in the backward direction. Correct for - that. Also made this a defun since it has grown too large now - to be a defsubst. - - * progmodes/cc-langs.el: More convenient and decentralized - setup of the language specific variables. The regexp-opt - mangling is also done at compile time now. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-indent-line-or-region): - Call `c-indent-line' directly instead of through - `indent-according-to-mode' so that this function always - indents syntactically. - - * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed a bug - where a class beginning with a nested class could cause an - infinite loop (the state outside the narrowed out class is - never used now). - -2002-04-22 Martin Stjernholm - - * progmodes/cc-align.el, progmodes/cc-cmds.el, - progmodes/cc-engine.el, progmodes/cc-vars.el: Fixes so that - the context sensitive analysis inside macros is restricted to - the bodies of #define's; other things, like #if expressions, - never have anything in common with their surroundings. - The old `cpp-macro-cont' syntax is now used in situations where - the syntactic analysis isn't applicable, and a new syntactic - element `cpp-define-intro' is used to add indentation in - #define bodies. - - (c-lineup-cpp-define): New name for `c-lineup-macro-cont' to - better reflect its use. - - * progmodes/cc-engine.el (c-guess-basic-syntax): Ignore line - continuation backslashes in the detection of `arglist-cont-nonempty'. - - * progmodes/cc-align.el: Use the vector form in the return - value in all cases where lineup functions return absolute columns. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-add-stmt-syntax) - (c-guess-basic-syntax): Anchor `brace-list-intro' and - `bracec-list-close' better for brace lists nested inside expressions. - - * progmodes/cc-engine.el, progmodes/cc-langs.el, - progmodes/cc-mode.el, progmodes/cc-styles.el: Cleaned up the - various language specific variables and their initialization. - The keyword regexps are now lists that are combined with - regexp-opt. Some variables have changed names to fit better - with the naming convention. - - * progmodes/cc-defs.el, progmodes/cc-vars.el - (c-buffer-is-cc-mode): The value is the mode symbol of the - original CC Mode mode. - - (c-major-mode-is): Compare against the buffer local variable - `c-buffer-is-cc-mode', which is faster than using `derived-mode-class'. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-forward-syntactic-ws) - (c-backward-syntactic-ws, c-forward-token-1) - (c-backward-token-1, c-in-literal, c-literal-limits) - (c-collect-line-comments, c-literal-type, c-on-identifier) - (c-guess-basic-syntax): These functions are now considered part - of the "CC Mode API" and may be used by other code. - That's signified by making their documentation into docstrings. - - (c-whack-state, c-hack-state, c-skip-case-statement-forward): - Removed these internal functions since they aren't used. - - (c-forward-to-cpp-expression): Classified this function as internal. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-langs.el (c-ObjC-class-key, c-Java-class-key): - Simplified these regexps; the class keywords they contain - ought to be enough to avoid false matches, so checking for - following identifiers etc is just unnecessary (and might also - fail for oddly formatted code). - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el, progmodes/cc-cmds.el - (c-forward-comment-lc): New function that behaves like - `c-forward-comment', with the exception that line - continuations are treated as whitespace. - - (c-beginning-of-statement): Use `c-forward-comment-lc', to - work correctly in macros and other places where line - continuations should be treated as whitespace. - - * progmodes/cc-engine.el (c-guess-basic-syntax): Analyze a - normal label in a switch block as a case label, to get - consistent lineup with the case labels. - - * progmodes/cc-engine.el (c-backward-syntactic-ws): Fixed bug - in skipping over a macro that ends with an empty line. - - * progmodes/cc-styles.el: Require cc-align since styles added - with `c-add-style' often contains references to functions - defined there, and so the `c-valid-offset' check might - otherwise complain on them. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-align.el, progmodes/cc-mode.texi, - progmodes/cc-vars.el: Added two new lineup functions: - - (c-lineup-knr-region-comment): A new lineup function to get - (what most people think is) better indentation of comments in - the "K&R region" between the function header and its body. - - (c-lineup-gcc-asm-reg): New lineup function for better - indentation inside gcc asm blocks. Contributed by Kevin Ryde. - - (c-offsets-alist): Use `c-lineup-gcc-asm-reg' and - `c-lineup-knr-region-comment' in the default offset - configuration, since these two functions have little impact - outside their intended use, and they generally do the right - thing when they kick in. - - * progmodes/cc-engine.el (c-guess-continued-construct) - (c-guess-basic-syntax): Handle nested functions in all - languages, not just Pike. In C and C++ there's a gcc - extension for this, and it also gives better treatment of - macros that are followed by blocks. - - * progmodes/cc-langs.el (c-symbol-key): Made this variable - mode specific, to handle Pike special symbols like `== better. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el, progmodes/cc-engine.el, - progmodes/cc-vars.el (c-report-syntactic-errors): A new - variable to control the syntactic error messages. It defaults - to off; since CC Mode ignores most syntactic errors it might - as well ignore them all for the sake of consistency. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-looking-at-inexpr-block): - Optimization. Can give a noticeable speedup if there's a - large preceding function or class body. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-align.el, progmodes/cc-cmds.el: Use more - efficient and correct insertion functions in many places. - Always inherit text properties correctly if the text is - permanent. Also do it for speed in temporary insertions, - since I figure it's less work to continue the surrounding text - properties than to break them. - - * progmodes/cc-styles.el (c-read-offset): Unbind SPC in the - completion to make it easier to enter lists. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-beginning-of-defun): Fixed bug where - c-state-cache was clobbered. - - * progmodes/cc-cmds.el, progmodes/cc-engine.el - (c-calculate-state): Moved from cc-cmds.el to cc-engine.el due - to dependency. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-parse-state): Ignore unbalanced - open parens in macros (if point isn't in the same one). - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-context-open-line): New function - that is the `open-line' equivalent to `c-context-line-break'. - - * progmodes/cc-mode.el (c-mode-base-map): Compatibility fix - for Emacs 21 since `indent-new-comment-line' has been changed - to `comment-indent-new-line' there. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el, progmodes/cc-langs.el - (c-stmt-delim-chars, c-stmt-delim-chars-with-comma): - New variables containing the character sets used to recognize - statement/declaration boundaries. These variables might help - to support languages like javascript and awk, where newlines - sometimes delimits statements. - - (c-crosses-statement-barrier-p): Use `c-stmt-delim-chars' as - the set of statement delimiting characters, to allow it to be - changed dynamically and per-mode. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-looking-at-bos) - (c-looking-at-inexpr-block, c-add-stmt-syntax) - (c-guess-basic-syntax): Treat blocks directly inside function - calls like "bare" statements inside function calls, and not - like in-expression statements. This to make indentation of - such blocks consistent with other statements inside macro calls. - - * progmodes/cc-engine.el (c-guess-basic-syntax): - Made arglist-cont anchor correctly in arglists that contain statements. - - * progmodes/cc-engine.el (c-guess-basic-syntax): - Fixed consistent anchoring of defun-block-intro in defuns in code - blocks (can only occur in Pike). - - * progmodes/cc-engine.el (c-looking-at-inexpr-block) - (c-looking-at-inexpr-block-backward): Changed the arguments to - require containing sexps and paren state, for better efficiency. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el, progmodes/cc-engine.el, - progmodes/cc-vars.el: Improved anchoring of statement and - handling of labels in front of substatements. - - (c-guess-continued-construct, c-guess-basic-syntax): - Improved and unified anchoring at statements. Statements beginning - with comments or labels are now avoided, by going out of - blocks and containing statements if necessary. This nesting - handling also fixes the case when there's a statement after a - block open brace. Added the syntactic symbol `substatement-label'. - - (c-electric-colon): Map the new `substatement-label' to - `label' when consulting `c-hanging-colons-alist'. - - (c-offsets-alist): Added substatement-label. Updated the - comments for the new anchoring positions at statements. - - * progmodes/cc-engine.el (c-guess-basic-syntax): Use more sane - anchor points for knr-argdecl-intro and access-label. - They used to refer to some point on the same line, a bug which was - neutralized by a kludge in `c-get-syntactic-indentation' which - ignored such anchor points. - - (c-get-syntactic-indentation): Removed the kludge that was - necessary due to buggy anchor points. - - * progmodes/cc-engine.el (c-guess-basic-syntax): Do not check - the absence of a comma before arglist-close (case 7A) in any - language, since there's nothing better to do that case anyway. - Added special case to make in-expression statements be - recognized as normal arglist-cont if we're directly in a macro - arglist, for consistency with other "bare" statements. - - * progmodes/cc-engine.el (c-looking-at-bos): Added optional - limit arg for backward searches. - - * progmodes/cc-engine.el (c-looking-at-inexpr-block): - Anchor gcc in-expression statements at the surrounding open - parenthesis. Treat a class body as an in-expression class if - it's used in an object clone expression in Pike. - - * progmodes/cc-engine.el (c-get-offset) - (c-get-syntactic-indentation): Allow several anchor positions - in the list of syntactic symbols. Only the first is used as - the base for the offset calculation. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-indent-defun): Indent the current - macro if inside one at the top level. Do not throw an error - if used at the top level outside a macro. - - * progmodes/cc-cmds.el (c-backslash-region): Do tab width - alignment only if the backslashes can't be aligned with - surrounding backslashes. - - * progmodes/cc-engine.el (c-end-of-macro): New function. - - * progmodes/cc-engine.el (c-least-enclosing-brace): - Rewritten to not be destructive. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-context-line-break): Only do a macro - line break when point is inside the content of it; if it's in - the cpp keyword a normal line break is done. - - * progmodes/cc-engine.el (c-guess-basic-syntax): Do not add - cpp-macro-cont inside the argument list to a #define. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-defs.el (c-forward-comment): Implemented a - kludge to avoid the problem most forward-comment incarnations - have with `\' together with comment parsing. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-check-state-cache): Fixed bug - which could cause the state returned by `c-parse-state' to - lack a closed paren element. That in turn could result in - very long searches, since it's common that they start from the - last preceding close brace. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-statement-1): Do not - treat else-if as a single continuation, since that'd make it - hard to get the right anchor point when there's a line break - between the two keywords. This change causes else-clause to - be anchored on the closest preceding else-if and not always on - the starting if, but that doesn't affect the indentation for - any reasonably sane style. Also introduced a noerror flag. - - (c-beginning-of-closest-statement): Removed; - c-beginning-of-statement-1 now avoids the problem this one solved. - - * progmodes/cc-engine.el (c-guess-continued-construct) - (c-guess-basic-syntax): Better and more uniform anchor points - for 'statement-cont and 'substatement. The effect is - noticeable mostly when there's a label on the same line as the - beginning of the statement, or when there are more stuff - before the start of the statement. - - * progmodes/cc-engine.el (c-looking-at-inexpr-block): - Added flag to disable looking at the type of the surrounding paren - since that confuses c-beginning-of-statement-1 and a couple of - other places. - - * progmodes/cc-engine.el (c-guess-basic-syntax): - Avoid stepping to the previous statement in case 18. - Improvements in recognition of statement blocks on the top level. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-statement-1) - (c-crosses-statement-barrier-p): Rewritten to get a well - defined and documented behavior. This fixes some tricky cases - in recognition of do-while constructs. - - (c-backward-to-start-of-do, c-backward-to-start-of-if): - Removed; use c-beginning-of-statement-1 instead. - - (c-guess-continued-construct, c-guess-basic-syntax): - Various fixes to not depend on the bugs previously in - c-beginning-of-statement-1. Cleanups in cases 18 and 17 to - use the new behavior of c-beginning-of-statement-1 better. - Fixed recognition of catch blocks inside macros. - - * progmodes/cc-engine.el (c-backward-syntactic-ws): Fixed bug - in skipping over a macro. - - * progmodes/cc-langs.el (c-label-kwds): New variable to - contain the appropriate c-*-label-kwds value. - - * progmodes/cc-vars.el (defcustom-c-stylevar): Fixed value - evaluation bug that caused the widget for - c-block-comment-prefix to bug out. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-guess-basic-syntax): - Improved recognition of statements: They are now recognized in - contexts where they normally can't occur, e.g. on the top level or - in function call arguments. This is mainly useful to recognize - statements in macros at the top level, and in arguments to - macros. The cases has been moved around quite a bit, and case - 10 has been copied to case 18. (The cases has not been - renumbered because of this.) - - (c-guess-continued-construct): New function which has the - rules which are common between cases 10 and 18. - - * progmodes/cc-engine.el (c-beginning-of-statement-1) - (c-backward-to-start-of-do, c-backward-to-start-of-if): - Fixes so that they really obey the passed limits. - - (c-safe-position): Return nil if the state doesn't contain a - suitable position. - - (c-guess-basic-syntax): Fixes some too short limits in calls - to c-beginning-of-statement-1. Some fixes for top level - analysis in ObjC mode. - - * progmodes/cc-engine.el (c-beginning-of-statement-1): - Fixed bug in do-while statements where the body is not a block. - - * progmodes/cc-styles.el (c-set-style): - Reset c-special-indent-hook to its global value if in override mode. - Fixes problem where functions on that hook remained after - style switch. - - * progmodes/cc-engine.el (c-evaluate-offset, c-get-offset): - Use c-benign-error to report the c-strict-syntax-p error. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-align.el, progmodes/cc-defs.el, - progmodes/cc-cmds.el, progmodes/cc-engine.el, cc-vars.el: - Several fixes to treat macros as code and not literals and to - handle line continuations transparently. - - (c-skip-ws-forward, c-skip-ws-backward): New macros to skip - through whitespace and line continuations, but not comments - and macros. - - (c-in-literal): No longer recognizes macros as literals by - default. An extra flag argument is required to do that. - - (c-macro-start, c-query-macro-start) - (c-query-and-set-macro-start): Added a cache for the macro - start position. - - (c-forward-syntactic-ws, c-backward-syntactic-ws): Fixes for - more speed when limits are given. Workaround for bad behavior - in forward-comment in some emacsen when it hits a buffer limit - with a large repeat count. - - (c-lineup-macro-cont): Improved behavior when - c-syntactic-indentation-in-macros is nil. - - (c-syntactic-indentation-in-macros, c-backslash-max-column) - (c-auto-align-backslashes): New customization variables to - control macro handling. - - * progmodes/cc-menus.el (cc-imenu-c++-generic-expression): - Fixes to handle line continuations. - - * progmodes/cc-defs.el, progmodes/cc-styles.el - (c-get-style-variables, c-set-offset): Report style errors - with message and ding instead of error signal. This to avoid - interrupted mode init if there's some style problem. - - (c-benign-error): New macro to report errors that doesn't need - to interrupt the operation. - - * progmodes/cc-defs.el (c-point): Added eonl and eopl positions. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-electric-brace, c-indent-region): - Removed most of the c-state-cache fiddling, since the global - state cache now handles this. - - * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug - when there's an open paren at the very first char of the - visible buffer region. - - * progmodes/cc-engine.el (c-parse-state, c-check-state-cache): - Cache the state globally and invalidate it below every buffer - change with the new after change function - `c-check-state-cache'. This gives a considerable performance - boost when editing large functions or classes. - - * progmodes/cc-engine.el (c-whack-state-after): Slight optimization. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el, progmodes/cc-langs.el, - progmodes/cc-align.el: Improvements to syntactic analysis - inside macros: - - (c-block-stmt-1-kwds, c-block-stmt-2-kwds): New variables used - by `c-guess-basic-syntax'. - - (c-parse-state): Fixed bug with braces inside macros when - using cached state info. - - (c-forward-to-cpp-expression): New function to aid in - syntactic analysis inside macros. - - (c-beginning-of-statement-1, c-backward-syntactic-ws): - Fixes to work better inside macros. - - (c-forward-syntactic-ws): Whitespace between the # and the - command should be allowed in preprocessor directives. - - (c-lineup-macro-cont): New lineup function to get context - sensitive indentation inside macros. - - (c-offsets-alist): Made `c-lineup-macro-cont' the default for - cpp-macro-cont. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-statement-1) - (c-forward-syntactic-ws): Fixes to handle continued lines. - - (c-backward-to-start-of-if, c-guess-basic-syntax): - Do syntactic analysis inside macros. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-indent-region): Did a speedup made - possible by the more flexible state cache. - - * progmodes/cc-engine.el (c-parse-state, c-whack-state-before) - (c-whack-state-after, c-hack-state) - (c-narrow-out-enclosing-class, c-guess-basic-syntax): - Improved the state cache system. It now can use partial info from - an old cached state to calculate a new one at a different - position. Removed some kludges to avoid the state cache. - The new functions `c-whack-state-before' and `c-whack-state-after' - replace the now obsolete `c-whack-state'. - - * progmodes/cc-engine.el (c-beginning-of-statement-1): - Optimized backing through a macro. This can speed things up - quite a bit when there are long macros before point. - - (c-beginning-of-macro): Do not ignore the limit. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-electric-continued-statement): - Fixed a bug where the keyword wasn't reindented correctly if - followed by another keyword or identifier. - - * progmodes/cc-engine.el (c-parse-state): Ignore closed brace - pairs that are in macros. Fixes some cases where e.g. the - second of two "do { } while (0)" macros after each other - indented differently. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-macro) - (c-forward-syntactic-ws): Recognize "#!" as a preprocessor - directive when it begins a line, to allow for script - interpreter lines like "#!/usr/bin/pike" at the beginning of - the file. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-looking-at-inexpr-block): - Recognize brace blocks inside a parenthesis expression as - inexpr-statement. Useful when writing statements as macro arguments. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-fill-paragraph, c-do-auto-fill) - (c-mask-comment): Broke out the comment masking code from - `c-fill-paragraph' to a new function `c-mask-comment', to be - able to do the same thing in `c-do-auto-fill'. This should - make auto-fill-mode behave better. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-electric-brace, c-electric-paren): - Check `executing-macro' to avoid blinking parens when macros - are executed. - - * progmodes/cc-mode.el, progmodes/cc-styles.el - (c-setup-filladapt): Moved from cc-mode.el to cc-styles.el for - consistency with `c-setup-paragraph-variables' (which was - placed there due to the dependency from `c-set-style'). - - * progmodes/cc-styles.el, progmodes/cc-vars.el: Fixed bug with - incomplete initialization from the style variable fallbacks if - there already is a style called "user" defined when CC Mode - starts up for the first time. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el, progmodes/cc-vars.el - (c-comment-indent, c-indent-comment-alist): Added new variable - `c-indent-comment-alist' to allow better control over - `c-comment-indent'. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-align.el (c-lineup-C-comments): Try to match - both `comment-start-skip' and the comment prefix on the - current line with the comment starter, so that we line up - comments which matches `c-comment-prefix-regexp' on the first - line (after the `/') without the need to make - `comment-start-skip' match whatever `c-comment-prefix-regexp' matches. - - * progmodes/cc-mode.el, progmodes/cc-styles.el (c-common-init) - (c-set-style-1, c-setup-paragraph-variables): Moved the - variable initialization based on `c-comment-prefix-regexp' to - a new function `c-setup-paragraph-variables', which is now - used both at mode init and when a style that sets - `c-comment-prefix-regexp' is activated. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-member-init-list): - Better handling of C++ template args to avoid confusion with - `<' and `>' used as operators in member init expressions. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-most-enclosing-brace) - (c-least-enclosing-brace): Added optional second arg to limit - the search to before a certain point. - - * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug - which could cause incorrect analysis if a cached state is used - (usually only happens when an electric key reindents a line). - -2002-04-22 Martin Stjernholm - - * progmodes/cc-defs.el (c-forward-comment): More idiosyncrasy - insulation. This time for XEmacs 21. - - * progmodes/cc-engine.el, progmodes/cc-langs.el: - Improved handling of inheritance lists: - - (c-beginning-of-inheritance-list): Rewritten to use a more - syntactically correct method that doesn't get confused by - badly placed linebreaks and comments. - - (c-guess-basic-syntax): Several fixes to the handling of - inheritance lists in combination with templates. 'inher-intro - is now anchored on the start of the class declaration and not - the indentation of the current line. Switched places on cases - 5D.3 and 5D.4 and made them use more syntactically correct methods. - - (c-inher-key): Removed since the code in - `c-guess-basic-syntax' now uses token-based search. - - * progmodes/cc-cmds.el, progmodes/cc-mode.el (c-mode-menu): - Added a submenu to access some toggles. - - (c-toggle-syntactic-indentation): New function to toggle the - variable `c-syntactic-indentation'. - - * progmodes/cc-styles.el (c-set-style): Improved the error - message for incorrect offsets a bit. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-indent-exp): Don't require that the - sexp follows point immediately, instead find the closest - following open paren that ends on another line. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-align.el (c-lineup-cascaded-calls): - New indentation function. - - * progmodes/cc-engine.el (c-beginning-of-macro): Bugfix for - directives with whitespace between the '#' and the name. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-forward-syntactic-ws) - (c-backward-syntactic-ws): Handle line continuations as - whitespace. Don't move past a macro if that'd take us past - the limit. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-macro) - (c-forward-syntactic-ws): Multiline strings begin with `#"' in - Pike, and that shouldn't be confused with a preprocessor directive. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el: Extended the kludge to interoperate - with the delsel and pending-del packages wrt to the new - function `c-electric-delete-forward'. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-indent-exp): Keep the indentation of - the block itself, i.e. only indent the contents in it. - - * progmodes/cc-styles.el (c-set-style): Use the default - argument to completing-read instead of initial-contents, if - the function is recent enough to support it. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-mode.el (c-mode-help-address): - Removed bug-gnu-emacs@gnu.org from the receiver list for bug reports. - I've almost never seen a bug reported this way that should go - to that list, but it's rather common that the reports concern - the combination CC Mode and XEmacs instead. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-electric-paren): Fixed bug when both - brace-elseif-brace and brace-catch-brace are active and - there's a "else if"-block before the catch block. - - * progmodes/cc-menus.el (cc-imenu-c++-generic-expression): - Detect function headers that span lines. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-electric-brace) - (c-electric-semi&comma, c-electric-colon, c-electric-paren): - Check for last on line only for doing the auto-newline-mode - stuff, not for the reindentation. - - * progmodes/cc-cmds.el (c-electric-brace): Fixed bugs in the - handling of c-syntactic-indentation: When it's nil, indent the - new lines but don't reindent the current one. Reindent the - line only when the inserted brace comes first on it, instead - of last. - - * progmodes/cc-cmds.el (c-electric-brace) - (c-electric-semi&comma): Fixed two places where - c-syntactic-indentation wasn't heeded. - - * progmodes/cc-cmds.el (c-electric-pound): Don't be electric - inside a macro. - - * progmodes/cc-engine.el (c-backward-to-start-of-if): Try a - little harder to find a fallback position when an orphan else - is found. Fixed case where an else following a do-while - statement could be associated with an if inside the do-while. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-guess-fill-prefix): Tuned the dwim - for the fallback to add a single space after the comment prefix. - - * progmodes/cc-cmds.el (c-indent-new-comment-line): Somewhat better - behavior in some special cases, especially for single-line comments. - Avoid breaking up a comment starter or ender. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-outline-level): Applied patch from - the Emacs sources to make this work in invisible text. - - * progmodes/cc-langs.el (c-switch-label-key): Fixed regexp to - not be confused by a later ':' on the same line as the label. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el, progmodes/cc-mode.el - (c-electric-delete, c-electric-delete-forward): - Split `c-electric-delete' into two functions where - `c-electric-delete-forward' always deletes forward and - `c-electric-delete' only contains the code necessary for - XEmacs to choose between backward and forward deletion. - `c-electric-delete-forward' is now bound to C-d to get the - electric behavior on that key too. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-cmds.el (c-fill-paragraph): Fixed bogus direct - use of c-comment-prefix-regexp, which caused an error when - it's a list. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-mode.el, progmodes/cc-vars.el (c-common-init) - (c-default-style): Removed the hardcoded switch to "java" style - in Java mode. It's instead taken care of by the default value - for c-default-style. - -2002-04-22 Martin Stjernholm - - * progmodes/cc-align.el (c-lineup-math): Fix bug where lineup - was triggered by equal signs in string literals. - -2002-04-21 Kim F. Storm - - * subr.el (insert-buffer-substring-no-properties): New function. - (insert-buffer-substring-as-yank): New function. - -2002-04-21 Glenn Morris - - * scroll-all.el (minor-mode-alist): Fix usage of `scroll-all-mode'. - (scroll-all-page-down-all, scroll-all-page-up-all) Remove `fkey-' - prefix from scroll commands. Ignore end-of-buffer errors from - other windows. - (scroll-all-check-to-scroll): Remove `fkey-' prefix from scroll - commands. - (scroll-all-beginning-of-buffer-all, scroll-all-end-of-buffer-all): - New functions. - - * files.el: (auto-mode-alist): .f95 files in f90-mode. - - * progmodes/fortran.el: (fortran-beginning-do): Make regexp match - a DO statement irrespective of numeric label. - -2002-04-20 Glenn Morris - - * files.el (auto-save-file-name-transforms): Doc fix. - Add third element to "uniquify" filenames. - (make-auto-save-file-name): Use new element of - auto-save-file-name-transforms. - * startup.el (command-line): Add third element to - auto-save-file-name-transforms. - -2002-04-19 Stefan Monnier - - * files.el (file-name-non-special): Don't mangle the 0'th arg and the - return value of file-name-completion and file-name-all-completions. - -2002-04-19 Glenn Morris - - * progmodes/f90.el: Update maintainer. - (f90-line-continued): Recognize blank/comment lines embedded in - continuation lines. - (f90-looking-at-program-block-start): No extra indentation after - function or subroutine keyword appears in single quotes. - -2002-04-19 Miles Bader - - * custom.el (customize-mark-to-save, customize-mark-as-set) - (custom-quote): Moved here from `cus-edit.el'. - * cus-edit.el (customize-mark-to-save, customize-mark-as-set) - (custom-quote): Moved to `custom.el'. - -2002-04-18 Richard M. Stallman - - * facemenu.el (list-text-properties-at): Command deleted. - - * rect.el (insert-rectangle): Use insert-for-yank. - - * register.el (insert-register): Use insert-for-yank. - (describe-register-1): Discard text props in yank-excluded-properties. - - * toolbar/tool-bar.el (tool-bar-local-item-from-menu): - Fix parts in construction of `menu-item' item at end. - - * mail/mailabbrev.el (mail-mode-abbrev-table): Delete defvar. - - * subr.el (insert-for-yank): New function. - - * simple.el (yank-excluded-properties): New user option. - (yank-pop, yank): Use insert-for-yank. - -2002-04-19 Kim F. Storm - - * simple.el (pop-to-mark-command): Do not set this-command. - (set-mark-command): Always jump to mark when called with arg. - -2002-04-18 Francesco Potort,Al(B - - * comint.el (comint-watch-for-password-prompt): Remove whitespace - at the beginning of password prompts. - -2002-04-18 Andrew Innes - - * facemenu.el: Remove require of wid-edit. - -2002-04-17 Colin Walters - - * ibuffer.el (ibuffer-visit-buffer): Optionally allow reducing to - one window. - (ibuffer-visit-buffer-1-window): Simply call `ibuffer-visit-buffer'. - (ibuffer-current-state-list): Reinstate optional argument; now - just call `point' inside the mapping function. - -2002-04-17 Francesco Potort,Al(B - - * dired-aux.el (dired-star-subst-regexp) - (dired-quark-subst-regexp): New constants. - (dired-do-shell-command, dired-shell-stuff-it): Use them. - (dired-do-shell-command): Raise an error if both `*' and `?' - substitution marks are used in the same command. - (dired-shell-stuff-it): Substitute all instances of `*' and `?' - in a command given via dired-do-shell-command. - - * comint.el (comint-password-prompt-regexp): Match "Repeat passphrase". - -2002-04-16 Jason Rumney - - * international/mule-cmds.el (locale-preferred-coding-systems): - Add "jpn". - -2002-04-16 Eli Zaretskii - - * term.el (term-emulate-terminal): Fix last change. - -2002-04-16 Pavel Jan,Am(Bk - - * bindings.el (mode-line-mode-menu): Update names to reflect - latest changes. - -2002-04-16 Mike Williams - - * textmodes/sgml-mode.el (sgml-at-indentation-p): Move to fix - compilation error. - -2002-04-16 Michael Kifer - - * viper-ex.el: Patch by Samuel Padgett. Copyright papers received. - (viper-ex-print-buf-name): New variable. - (viper-ex-print-buf): New variable. - (ex-token-alist): Invoke ex-print on ":print" Ex commands. - (ex-g-marks): New variable. - (ex-print): New function. - (ex-print-display-lines): New function. - - * viper.el (viper-set-hooks): Add window-setup-hook, which sets - the cursor color. - - * ediff-util.el (ediff-cleanup-mess): Delete ctl window on exit - when the window is not in its own frame. - (ediff-clone-buffer-for-region-comparison): More robust window - arrangement while prompting for regions to compare. - (ediff-make-cloned-buffer): Use generate-new-buffer-name. - (ediff-inferior-compare-regions): Deleted unused vars - ctl-buf and quit-now. - -2002-04-15 Richard M. Stallman - - * facemenu.el (facemenu-add-new-face): Use this only for faces. - Delete arg MENU. - (facemenu-add-new-color): New function. - (facemenu-set-foreground, facemenu-set-background): - Use facemenu-add-new-color. - -2002-04-15 Eli Zaretskii - - * ediff-init.el (ediff-current-diff-face-A) - (ediff-current-diff-face-B, ediff-current-diff-face-C) - (ediff-current-diff-face-Ancestor, ediff-fine-diff-face-A) - (ediff-fine-diff-face-B, ediff-fine-diff-face-C) - (ediff-fine-diff-face-Ancestor, ediff-even-diff-face-A) - (ediff-even-diff-face-B, ediff-even-diff-face-C) - (ediff-even-diff-face-Ancestor, ediff-odd-diff-face-A) - (ediff-odd-diff-face-B, ediff-odd-diff-face-C) - (ediff-odd-diff-face-Ancestor): Add special color definitions for - tty and MS-DOS displays. - -2002-04-15 Andrew Innes - - * facemenu.el: Require wid-edit. - -2002-04-15 Miles Bader - - * faces.el (highlight): Force foreground to be black on a tty, so - this face is readable on a dark-background tty. - * wid-edit.el (widget-field-face, widget-single-line-field-face): - Likewise. - -2002-04-14 Kim F. Storm - - * simple.el (pop-to-mark-command, push-mark-command): New commands. - (set-mark-command): Use them. - Enhanced functionality when command is repeated: - - If first command set the mark (no prefix arg), repeat temporarily - enables transient-mark-mode. - - If first command jumped to mark off ring (with argument), - repeat (with or without arg) jump to next mark off ring. - - Use C-u C-u prefix to set mark after jump. - (exchange-point-and-mark): Temporarily enable transient-mark-mode - if prefix arg. - -2002-04-14 Pavel Jan,Am(Bk - - * speedbar.el (speedbar-tag-hierarchy-method) - (speedbar-toggle-updates, speedbar-toggle-images): Doc fixes. - -2002-04-14 Mike Williams - - * textmodes/sgml-mode.el (sgml-parse-tag-backward): Fix to work at - beginning of buffer. - -2002-04-14 Pavel Jan,Am(Bk - - * speedbar.el (speedbar-generic-item-info) - (speedbar-sort-tags): Doc fix. - (speedbar-add-supported-extension): Fix typo in interactive spec. - -2002-04-13 Colin Walters - - * ibuffer.el (ibuffer-forward-line): Just skip header if we're - only moving one line forward. - (ibuffer-map-lines): Preserve point position even if we delete - lines. Only call mapping functions with buffer and mark - arguments; the other two were unused. - (ibuffer-redisplay, ibuffer-update): Always skip special areas. - - * ibuf-macs.el, ibuf-ext.el: Update callers of `ibuffer-map-lines'. - - * calc/calc-bin.el (math-format-radix-float): Use `when'. - - * calc/calc.el (math-format-number): Load `calc-ext' before we - call `math-group-float'. - - * play/gamegrid.el (gamegrid-add-score-with-update-game-score): - Renamed from `gamegrid-add-score'. - (gamegrid-add-score-insecure): Restored from the old - `gamegrid-add-score'. - (gamegrid-add-score): Just dispatch on `system-type' to one of the - previous two functions. - -2002-04-13 Pavel Jan,Am(Bk - - * iswitchb.el: Update commentary to include new function - iswitchb-exclude-nonmatching. - -2002-04-12 John Wiegley - - * eshell/esh-ext.el (eshell-script-interpreter): Fix for CRLF - operating systems to the regexp used to detect a script's interpreter. - -2002-04-12 Eli Zaretskii - - * frame.el (frames-on-display-list): Use `equal' to compare the - `display' frame parameter to the argument DISPLAY. - -2002-04-12 Dave Love - - * help.el (string-key-binding): Deal with margin events. - -2002-04-12 Francesco Potort,Al(B - - * comint.el (comint-password-prompt-regexp): Match " SMB password". - -2002-04-11 Stefan Monnier - - * sort.el (sort-reorder-buffer): Don't assume point-min == 1. - - * xt-mouse.el (xterm-mouse-mode): Use define-minor-mode. - - * emacs-lisp/lucid.el (device-class, buffer-syntactic-context) - (buffer-syntactic-context-depth): New funs. - - * emacs-lisp/edebug.el (edebug-eval-defun): Don't use defconst - on variables. - - * emacs-lisp/debug.el (debug-on-entry): Use push. - (debugger-make-xrefs): Don't assume point-min == 1. - - * progmodes/cc-engine.el (c-backward-to-start-of-if): - Don't assume point-min == 1. - - * progmodes/etags.el (etags-verify-tags-table, etags-snarf-tag) - (etags-list-tags, etags-tags-apropos, select-tags-table): - Don't assume point-min == 1. - -2002-04-12 Mike Williams - - * textmodes/sgml-mode.el (sgml-guess-indent): New function. - -2002-04-11 Stefan Monnier - - * textmodes/fill.el (fill-context-prefix): Fix up last change. - - * simple.el (line-move): Use memq rather than or. - (transpose-sexps): Don't presume as much of forward-sexp's behavior. - (do-auto-fill): Use fill-move-to-break-point. - (syntax-code-table): Remove. - - * textmodes/fill.el (canonically-space-region): Obey sentence-end. - Don't add spaces at end of sentences at end of line. - (fill-move-to-break-point): Make sure the result is always greater - than linebeg, so we ensure forward progress. - (fill-region-as-paragraph): Compare to `to' rather than eobp. - (fill-paragraph): Don't rebind fill-paragraph-function. - -2002-04-11 Pavel Jan,Am(Bk - - * menu-bar.el (menu-bar-adv-search-menu): Add incremental search. - -2002-04-11 Andreas Schwab - - * files.el (file-name-non-special): Handle return value of t from - `file-name-completion'. - -2002-04-10 Stefan Monnier - - * textmodes/fill.el (fill-context-prefix): Match the two prefixes - differently to avoid pathological exponential-time case. - (adaptive-fill-regexp): Add ! and %. - (fill-delete-prefix): Remove indentation while removing prefix. - (fill-delete-newlines): Obey sentence-end. - (fill-move-to-break-point, fill-newline): New functions extracted - from fill-region-as-paragraph. - (fill-region-as-paragraph): Use them. - Don't fiddle with fill-indent-according-to-mode. - -2002-04-10 Colin Walters - - * play/snake.el (snake-score-file): Default to just "snake-scores". - - * play/tetris.el (tetris-score-file): Likewise. - - * play/gamegrid.el (gamegrid-add-score): Rewrite from scratch to - use `update-game-score'. - - * ibuffer.el (ibuffer-canonicalize-state-list): Delete unused function. - (ibuffer-current-buffers-with-marks): Don't call `buffer-list' - ourselves; take it as an argument. Caller updated. - (ibuffer-mode): Make mode-class special. - -2002-04-10 Richard M. Stallman - - * dired.el (dired-view-command-alist): New variable. - (dired-view-file): Use external viewers for some files names. - - * mouse.el (mouse-drag-region-1): Display region highlight - only in the selected window. - - * subr.el (remove-hook): When there are no more local hooks, - kill the buffer-local value. - - * isearch.el (isearch-mode): Don't call make-frame-visible - if frame is already visible. - - * cus-face.el (custom-face-attributes): Fix typo in `ultra-bold'. - -2002-04-09 Emmanuel Briot - - * progmodes/ada-prj.el: Add support for the new project file - fields: gnatfind-opt, debug-pre-cmd and debug-post-cmd. - Fix widget handling for Emacs 21. ada-mode now only supports a single - active project file, instead of one per buffer. This is far less - confusing. - - * progmodes/ada-stmt.el: Menu changed from Statements to Templates. - (ada-func-or-proc-name): Get real subprogram name, after change in - ada-mode.el. - - * progmodes/ada-xref.el: Ada-mode no longer supports a different - project file per buffer. This was too complex. Instead, there is - now a single active project file at any given time, and the user - can switch the active one through the Ada menu. This revision - also provides better handling of the Windows command line, and the - various available shells on that platform. ada-mode is now fully - integrated with the GNU visual debugger gvd, see - http://libre.act-europe.fr. - (ada-prj-default-comp-opt): Use the new GNAT switch -gnatQ. - This is only available with GNAT 3.14. - (ada-prj-gnatfind-switches, ada-cd-command): New variable. - (ada-quote-cmd): New function. - (ada-initialize-runtime-library): Get the location of the actual - runtime the compiler will be using, including support for - cross-platform environments. - (ada-treat-cmd-string): Add support for the new variable - ${full_current} add support for debug-pre-cmd and debug-post-cmd, - two commands to run just prior to running the debugger, and just - after starting it. This provide better support for cross-platform - and remote debugging. - (ada-get-absolute-dir): Remove, replace with expand-file-name. - (ada-gdb-application): New parameter executable-name. - (ada-get-ali-file-name): Better handling of separate packages. - Checkin on behalf of the ada-mode maintainer. - - * progmodes/ada-mode.el (ada-case-exception-file) - (ada-indent-handle-comment-special): New variables. - (ada-case-exception-substring): New variable. Casing exceptions - can now also be defined for substrings, in addition to full - identifier names. This provides more flexibility. - (ada-align-list): New fun, provide support for align.el in ada-mode. - (ada-procedure-start-regexp): Add support for operators and - generic formal subprograms and packages. - (ada-imenu-comment-re): New variable. - (ada-imenu-generic-expression): Add support for protected types. - (ada-mode): Set comment-start only after running ada-mode-hook, so - that the user can change ada-comment-start in the hook. - Add support for ispell in comments. Add support for align.el. - (ada-save-exception-file, ada-create-case-exception-substring) - (ada-adjust-case-substring): New functions. - (ada-get-current-indent): Properly handles keywords with uppercases. - (ada-goto-matching-end): Rewritten, fixes problems in the handling - of nested blocks. - (ada-untab-hard): Do not touch the contents of comments and strings. - -2002-04-09 Mike Williams - - * textmodes/sgml-mode.el (sgml-lexical-context): - Use sgml-parse-tag-backward to find start point. - (sgml-looking-back-at): Doc fix. - -2002-04-09 Pavel Jan,Am(Bk - - * isearch.el (isearch-message-prefix): Use minibuffer-prompt face - for prompt. - -2002-04-08 Stefan Monnier - - * autorevert.el (auto-revert-mode, global-auto-revert-mode): - Use define-minor-mode. - (auto-revert-buffers): Use with-current-buffer. - Avoid changing the minor modes. - - * international/iso-acc.el (iso-accents-accent-key): Use `vector' - rather than char-to-string since last-input-char can be any event. - - * international/titdic-cnv.el (tit-dictionary): - Use defvar for non-constants. - - * progmodes/cwarn.el (global-cwarn-mode): Use define-minor-mode. - (global-cwarn-mode): Use easy-mmode-define-global-mode. - (cwarn-font-lock-keywords): New function. - Replaces cwarn-font-lock-remove-keywords cwarn-font-lock-add-keywords. - (cwarn-font-lock-match): New macro. - (cwarn-font-lock-match-assignment-in-expression) - (cwarn-font-lock-match-dangerous-semicolon) - (cwarn-font-lock-match-reference): Use it. - - * progmodes/cperl-mode.el (cperl-make-face, cperl-force-face): - Use defvar rather than defconst since it's meant to be settable. - (cperl-syntax-done-to): Don't hardcode 1 as (point-min). - (cperl-fix-line-spacing): Add missing \ in [ t]. - - * loadup.el: Call ucs-unify-8859 directly rather than - unify-8859-on-encoding-mode. - (fns-*.el): Don't use it anymore. Keep the load-history in purespace. - - * textmodes/sgml-mode.el (sgml-comment-indent-new-line): New fun. - (sgml-mode): Use it for comment-line-break-function. - -2002-04-08 Jason Rumney - - * international/mule-cmds.el (reset-language-environment): - Handle coding-systems not being defined yet. - -2002-04-08 Sam Steingold - - * vc-cvs.el (vc-cvs-valid-version-number-p): New function. - (vc-cvs-checkin): Use it. - -2002-04-08 Pavel Jan,Am(Bk - - * files.el (display-time-string): Fix last change. - -2002-04-07 Sam Steingold - - * vc-cvs.el (vc-cvs-checkin): Pass the required argument to `error'. - -2002-04-07 Jason Rumney - - * international/mule-cmds.el (set-default-coding-systems) - (reset-language-environment): Preserve eols on - default-process-coding-system. - (coding-system-change-text-conversion): Fix case where CODING is nil. - -2002-04-07 Pavel Jan,Am(Bk - - * subr.el (play-sound): Move here from simple.el. - - * simple.el (play-sound): Move to subr.el. - -2002-04-06 Richard M. Stallman - - * files.el (display-time-string-forms): Mark as risky. - - * enriched.el (enriched-decode-foreground, enriched-decode-background): - Use proper format for desired elts of `face' property. - Don't test display-color-p; make the properties unconditionally. - - * progmodes/compile.el (compilation-error-regexp-alist): - New alternatives for FILE:LINE.COL and for ranges of columns and lines. - -2002-04-06 Per Abrahamsen - - * progmodes/cc-vars.el (c-block-comment-prefix): Specify :value - for customization type. - Reported by Mattias Fredsberg . - -2002-04-06 Mike Williams - - * textmodes/xml-lite.el: Remove. - -2002-04-05 Pavel Jan,Am(Bk - - * simple.el (play-sound): New function (uses play-sound-internal). - -2002-04-04 Richard M. Stallman - - * files.el (mode-line-format, mode-line-modified) - (mode-line-mule-info, mode-line-buffer-identification) - (mode-line-modes, mode-line-position): Explicitly mark as risky. - (hack-one-local-variable): Don't recognize "mode-line-..." as risky. - - * calendar/solar.el (solar-northern-spring-or-summer-season): Doc fix. - - * mail/mailabbrev.el (mail-abbrev-make-syntax-table): - Use (syntax-table), not old-syntax-table. - - * enriched.el (enriched-decode-foreground) - (enriched-decode-background): Don't call facemenu-get-face. - -2002-04-04 Mike Williams - - * textmodes/sgml-mode.el: Add missing require. - (sgml-lexical-context): Fix up CDATA detection for boundary cases. - -2002-04-03 Kai Gro,A_(Bjohann - - * pcvs.el (cvs-mode-previous-line, cvs-mode-next-line): Move to - spot indicated by text property `cvs-goal-column', if present. - - * pcvs-info.el (cvs-fileinfo-pp): Use text property - `cvs-goal-column' to indicate position of file name (if present). - -2002-04-03 Richard M. Stallman - - * mail/mailabbrev.el (mail-abbrev-complete-alias): - Call mail-abbrev-make-syntax-table. - - * format.el (format-deannotate-region): Doc fix. - - * enriched.el (enriched-face-ans): Delete special treatment - for fg:... and bg:... faces. - (enriched-decode-foreground): Return a list that specifies - the foreground color, rather than creating a face. - (enriched-decode-background): Likewise. - - * shell.el (shell-mode): Don't reinit comint-input-ring - if that was already done. - -2002-04-03 Edward M. Reingold - - * solar.el (solar-spring-or-summer-season): Delete. - (solar-northern-spring-or-summer-season): New variable. - (solar-sunrise-and-sunset, solar-moment, solar-sunrise-sunset): - Rewrite. - - * solar.el (diary-sabbath-candles-minutes): New variable. - (diary-sabbath-candles): Use it instead of fixed 18 minutes. - - * calendar.el (update-calendar-mode-line): Force mode-line update. - Make date under the cursor available as `date' in - calendar-mode-line-format. - Eval items in calendar-mode-line-format list. - - * cal-tex.el (cal-tex-hook, cal-tex-year-hook, cal-tex-month-hook) - (cal-tex-week-hook, cal-tex-daily-hook): Add doc strings. - - * cal-tex.el (cal-tex-latexify-list): Fix doc string. - - * cal-tex.el (cal-tex-insert-day-names): LaTeXify day names. - (cal-tex-cursor-week-iso, cal-tex-week-hours, cal-tex-weekly4-box) - (cal-tex-cursor-filofax-2week, cal-tex-cursor-filofax-week) - (cal-tex-daily-page, cal-tex-mini-calendar): LaTeXify day names. - - * cal-tex.el: Change all instances (interactive "P") to - (interactive "p"). - (cal-tex-cursor-month): Add hfill and newline at end of month that - ended on Saturday. - (cal-tex-preamble): Change to LaTeX2e. - (cal-tex-cursor-filofax-year): Don't use default month names in - LaTeX macros in case user changes them. - (cal-tex-month-name): New function. Used throughout in case user - has done something funny with month names. - - * cal-hebrew.el (holiday-rosh-hashanah-etc): Spelling correction. - (diary-rosh-hodesh): Spelling correction. - -2002-04-03 Mike Williams - - * textmodes/sgml-mode.el (sgml-lexical-context) - (sgml-parse-tag-backward): Extend support for CDATA to include - conditional sections. - -2002-04-03 Pavel Jan,Am(Bk - - * cus-start.el: Rename `autoselect-window' to - `mouse-autoselect-window'. - -2002-04-02 Richard M. Stallman - - * files.el (hack-one-local-variable): - Clear text props from string value. - -2002-04-02 Stefan Monnier - - * progmodes/f90.el (f90-keywords-re, f90-keywords-level-3-re) - (f90-procedures-re, f90-operators-re, f90-hpf-keywords-re): - Use regexp-opt. - (f90-keywords-re, f90-keywords-level-3-re): Add `pure' and `elemental' - from F95. - (f90-procedures-re): Add `null' and `cpu_time' from F95. - (f90-font-lock-keywords-1): Minor reorganization so we don't need - `override' any more. - (f90-font-lock-keywords-3): Use `keep' rather than `override'. - (f90-indent-subprogram): Use indent-region. - (f90-break-line): Use indent-according-to-mode. - -2002-04-02 Mike Williams - - * textmodes/sgml-mode.el (sgml-close-tag): Rename from - sgml-insert-end-tag. Simplify by using sgml-lexical-context. - (sgml-get-context): Remove use of sgml-inside-tag-p. - (sgml-inside-tag-p): Remove. - (sgml-looking-back-at): Short-circuit at beg of buffer. - (sgml-lexical-context, sgml-calculate-indent): Add support for - CDATA sections. - -2002-04-01 Stefan Monnier - - * help.el (help-key-description): New fun. - (describe-key-briefly, describe-key): Use it and - this-single-command-raw-keys plus new arg `untranslated'. - - * textmodes/sgml-mode.el (sgml-at-indentation-p, sgml-tag) - (sgml-parse-tag-name, sgml-looking-back-at, sgml-parse-tag-backward) - (sgml-inside-tag-p, sgml-get-context, sgml-show-context) - (sgml-insert-end-tag): New funs taken from xml-lite.el. - (sgml-calculate-indent): Use them. - (sgml-slash-matching): Rename from sgml-slash. - (sgml-slash): Copied from xml-lite and changed to use - sgml-slash-matching and sgml-quick-keys. - - * international/mule-cmds.el (standard-keyboard-coding-systems): - Add koi8-u and koi8-r. - - * eshell/.cvsignore: New file. - - * eshell/esh-groups.el: Remove. - - * progmodes/tcl.el: Change maintainer. - (tcl-electric-hash-style): Change default to nil. - (tcl-imenu-generic-expression): Use tcl-proc-regexp. - (tcl-do-auto-fill): Remove. - (tcl-auto-fill-mode): Rewrite using comment-auto-fill-only-comments. - -2002-04-01 Mike Williams - - * textmodes/sgml-mode.el: Doc fixes. - (sgml-mode): Set indent-line-function to sgml-indent-line. - (sgml-calculate-indent): Add an explicit check for 'text syntax, - to protect against future enhancements to sgml-lexical-context. - (sgml-empty-tag-p, sgml-unclosed-tag-p): New funcs. - - * textmodes/xml-lite.el: Removed much redundant stuff. - (xml-lite-parse-tag-backward): Simplify parsing by assuming we - always start within text. Make use of sgml-unclosed-tag-p. - -2002-04-01 Ville Skytt,Ad(B - - * tcl.el (tcl-imenu-generic-expression): New value. - (tcl-imenu-create-index-function): Function deleted. - (tcl-mode): Check for filladapt-mode. - Use tcl-imenu-generic-expression instead of - tcl-imenu-create-index-function. - (inferior-tcl-mode): Doc fix. - Change not legally significant. - -2002-04-01 Pavel Jan,Am(Bk - - * cus-start.el: Rename `x-autoselect-window' to `autoselect-window'. - - * window.el (handle-select-window): New function. - Update copyright. - -2002-04-01 Richard M. Stallman - - * info.el (info-tool-bar-map): Use tool-bar-local-item-from-menu. - - * toolbar/tool-bar.el (tool-bar-local-item): Renamed from - tool-bar-add-item, and new arg MAP. - (tool-bar-add-item): Now calls tool-bar-local-item. - (tool-bar-local-item-from-menu): Renamed from - tool-bar-add-item-from-menu, and new arg IN-MAP. - (tool-bar-add-item-from-menu): Now calls tool-bar-local-item-from-menu. - - * help-fns.el (help-with-tutorial): Allow various ways - to specify the text in the [...] line, in handling the <...> line. - - * progmodes/idlw-rinfo.el (idlwave-system-routines): - WOLRDTITLE => WORLDTITLE. SUPRESS_VALUE => SUPPRESS_VALUE. - - * subr.el (redraw-modeline): Define alias. - -2002-03-31 Richard M. Stallman - - * files.el (file-expand-wildcards): Use save-match-data. - - * files.el (format-alist): Mark as risky. - - * simple.el (kill-new): Doc fix. - - * emacs-lisp/byte-opt.el (side-effect-free-fns) - (side-effect-and-error-free-fns): Add many functions, remove some. - -2002-03-30 Richard M. Stallman - - * menu-bar.el (menu-bar-tools-menu): Rename gdb item to say GDB. - -2002-03-30 Eli Zaretskii - - * font-lock.el (save-buffer-state): Fix last change. - - * files.el (auto-save-file-name-transforms): Fix last change. - - * startup.el (command-line): Fix last change. - -2002-03-29 Richard M. Stallman - - * subr.el (play-sound-file): Moved to simple.el. - - * simple.el (play-sound-file): Moved from subr.el, made unconditional. - -2002-03-29 Colin Walters - - * ibuffer.el (ibuffer-mark-interactive): Use `ibuffer-forward-line' - instead of `forward-line'. - (ibuffer-forward-line): Be sure to skip over special properties - before moving, too. - - * calc/calc.el (calc-was-split): Var deleted. - (calc): Remove reference to it. - (calc): Ditto. - (calc-quit): Ditto. - (calc-init-base): Ditto. - - * calc/calc-misc.el (calc-delete-windows-keep): Function deleted. - -2002-03-29 Stefan Monnier - - * textmodes/sgml-mode.el (sgml-lexical-context): Return (text . START) - instead of nil when point is outside of any tag. - (sgml-beginning-of-tag): Adjust to the change. - (sgml-calculate-indent): Use the new info returned by - sgml-lexical-context. Try to handle unclosed tags. - - * textmodes/xml-lite.el (xml-lite-get-context): Don't stop parsing - at unclosed tags unless it is at indentation. - Kill nested unclosed tags. - (xml-lite-calculate-indent, xml-lite-indent-line): Remove. - (xml-lite-mode): Use sgml-indent-line instead. - -2002-03-29 Eli Zaretskii - - * files.el (auto-save-file-name-transforms): Don't run "\\2" via - expand-file-name. - - * startup.el (command-line): Recompute auto-save-file-name-transforms - using the updated value of temporary-file-directory. - -2002-03-29 Stefan Monnier - - * textmodes/xml-lite.el (xml-lite-get-context): Allow stopping - even with an empty context. Don't save excursion any more. - Don't complain about unmatched start-tags in sgml-unclosed-tags. - Ignore end-tags in sgml-empty-tags. - (xml-lite-get-context, xml-lite-calculate-indent) - (xml-lite-insert-end-tag): Save excursion around xml-lite-get-context. - (xml-lite-indent-line): Use back-to-indentation. - - * textmodes/sgml-mode.el (sgml-basic-offset): New var. - (sgml-name-re, sgml-attrs-re): New consts. - (sgml-tag-name-re, sgml-start-tag-regex, sgml-font-lock-keywords-1) - (sgml-mode): Use them. - (sgml-lexical-context): Default to (point-min) if nothing else works. - (sgml-calculate-indent): Indent slightly differently. - (sgml-indent-line): Use back-to-indentation. - (sgml-parse-dtd): New function. - (sgml-unclosed-tags): New var. - (html-mode): Set it. - -2002-03-29 Simon Marshall - - * font-lock.el (save-buffer-state): Use make-symbol to bind `modified'. - -2002-03-29 Richard M. Stallman - - * dired-aux.el (dired-do-query-replace-regexp, dired-do-search): - Use FILTER arg in dired-get-marked-files to exclude directories. - (dired-nondirectory-p): New function. - - * dired.el (dired-get-marked-files): New arg FILTER - allows selection of some files. - - * progmodes/tcl.el (tcl-imenu-create-index-function): Doc fix. - -2002-03-29 Eric M. Ludlam - - * speedbar.el (speedbar-default-directory-list): Made robust - against deleted directories. - -2002-03-28 Richard M. Stallman - - * dired.el (dired-toggle-marks): Renamed from dired-do-toggle. - Bindings changed. - - * progmodes/compile.el (compilation-handle-exit): - If compilation-window-height is 0, display status in echo area. - - * simple.el (line-move-to-column): Don't call move-to-column if COL=0. - - * rect.el (replace-rectangle): Add autoload. - - * files.el: Mark many more variables as risky. - (hack-one-local-variable): Recognize several additional - patterns as risky. - - * bindings.el (mode-line-mule-info): Use :propertize, not :eval. - -2002-03-28 Stefan Monnier - - * textmodes/xml-lite.el (xml-lite-in-string-p): - Use sgml-lexical-context. - (xml-lite-parse-tag-backward): Use sgml-tag-syntax-table. - (xml-lite-get-context): Check that open/close tags match. - Don't stop scanning while we're ignoring matching tags. - - * textmodes/sgml-mode.el (sgml-make-syntax-table): New fun. - (sgml-mode-syntax-table): Use it. - (sgml-tag-syntax-table, sgml-tag-name-re): New const. - (sgml-tags-invisible): Use it. - (sgml-lexical-context): New fun. - (sgml-maybe-end-tag, sgml-beginning-of-tag): Use it. - (sgml-quote): Accept \n as entity reference terminator. - (sgml-calculate-indent, sgml-indent-line): New funs. - -2002-03-28 Andre Spiegel - - * vc-cvs.el (vc-cvs-global-switches): New user option. - (vc-cvs-command): New function. Update all callers of - `vc-do-command' in vc-cvs.el to use this instead. - -2002-03-27 Andrew Innes - - * makefile.w32-in (bootstrap-clean-SH): Use for loop, instead of - relying on shell globbing. - -2002-03-27 Colin Walters - - * ibuffer.el (ibuffer-help-buffer-modes): New variable. - (ibuffer-fontification-alist): Use it. - (ibuffer-backward-line): Handle `ibuffer-summary' area. - (ibuffer-forward-line): Ditto. - - * ibuf-ext.el (sorter mode-name): Doc fix. - (ibuffer-mark-help-buffers): Use `ibuffer-help-buffer-modes'. - (operation query-replace): Use new `noerror' arg for - `query-replace-read-args'. - (operation query-replace-regexp): Ditto. - -2002-03-27 Stefan Monnier - - * textmodes/xml-lite.el: Fix copyright notice. - (xml-lite-basic-offset): Rename from xml-lite-indent-offset. - (xml-lite-indent-comment-offset): Remove. - (xml-lite-calculate-indent): Use new name. Use natural alignment - for comments. - (xml-lite-in-string-p): Simplify. - -2002-03-27 Pavel Jan,Am(Bk - - * allout.el (outline-layout): Doc fix. - -2002-03-27 Stefan Monnier - - * textmodes/xml-lite.el: Don't require `custom'. - (xml-lite-parse-tag-name): Properly treat non-ASCII chars. - (xml-lite-parse-tag-backward): Obey sgml-empty-tags. - (xml-lite-get-context): Drop nested tags not just for comments. - (xml-lite-indent-line): Be more careful about moving point. - (xml-lite-insert-end-tag, xml-lite-slash): - Use indent-according-to-mode instead of xml-lite-indent-line. - (xml-lite-mode): Make xml-lite-orig-indent-line-function buffer-local. - Set sgml-xml-mode. Don't call force-mode-line-update. - (xml-lite-mode-map): Don't bind TAB. - -2002-03-27 Zoltan Kemenczy - - * gud.el (gud-jdb-sourcepath): New variable, saves jdb -sourcepath - parameter value. - (gud-jdb-build-source-files-list): Comment clarification. - (gud-jdb-massage-args): Reworked into loop-based argument list - processing in order to support -classpath and -sourcepath argument - processing. - (gud-jdb-find-source-using-classpath): Prepend gud-jdb-sourcepath - to gud-jdb-classpath to obtain search list. - (gud-jdb-parse-classpath-string): Remove any trailing slashes from - directory names in classpath/sourcepath lists, update comment. - (jdb): Add setting of gud-jdb-sourcepath, update comment. - (gud-find-class): Add gud-jdb-sourcepath use, and correct - behaviour for the case when classpath is not used--backward - compatibility fix. - -2002-03-27 Eli Zaretskii - - * Makefile.in (compile, compile-always): Don't try to compile - non-existent files or files in empty directories. - -2002-03-26 Michael Ernst - - * compare-w.el (compare-windows-whitespace): Match all whitespace. - - * emacs-lisp/shadow.el (list-load-path-shadows): Only ignore last - copy of standard Lisp directories. - - * tar-mode.el (tar-header-block-summarize, tar-get-descriptor): - Support "next has longname" link type. - -2002-03-26 Stefan Monnier - - * textmodes/xml-lite.el (xml-lite-at-indentation-p): Move. - (xml-lite-in-string-p, xml-lite-looking-back-at, xml-lite-looking-at): - New functions. - (forward-xml-tag, backward-xml-tag, beginning-of-xml-tag) - (end-of-xml-tag): Remove. - (xml-lite-get-context): Better handling of comments. - (xml-lite-calculate-indent): Use xml-lite-in-string-p. - (xml-lite-parse-tag-backward): Rewrite. - -2002-03-26 Juanma Barranquero - - * makefile.w32-in (WINS): Add the toolbar directory. - -2002-03-26 Richard M. Stallman - - * subr.el (substring-no-properties): Function deleted (now in C). - -2002-03-25 Pavel Jan,Am(Bk - - * mwheel.el (mouse-wheel-mode): Use global-set-key and - global-unset-key. - -2002-03-24 Richard M. Stallman - - * mail/rmail.el (rmail-resend): Call mail-abbrev-make-syntax-table. - - * progmodes/etags.el (tags-query-replace): Pass t for NOERROR - to query-replace-read-args. - - * progmodes/compile.el (compilation-forget-errors): - Don't adjust compilation-parsing-end if it's nil. - - * replace.el (query-replace-read-args): New optional arg NOERROR. - (perform-replace): Use save-window-excursion around recursive edit. - -2002-03-24 Colin Walters - - * ibuffer.el (ibuffer): If the user has `ibuffer-use-other-window' - non-nil, then always use another window. - -2002-03-24 Gerd Moellmann - - * subr.el (macro-declaration-function): New function. Set the - variable macro-declaration-function to it. - - * emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble): - Handle declarations in macro definitions. - -2002-03-24 Eli Zaretskii - - * facemenu.el (facemenu-get-face): Remove unused variable `foreground'. - - * enriched.el (enriched-face-ans): Support FACE of the form - (:foreground COLOR) and (:background COLOR). - (enriched-decode-foreground, enriched-decode-background): Set the - fore- and background colors of the faces we create, since facemenu - doesn't. - -2002-03-24 Pavel Jan,Am(Bk - - * mwheel.el (mouse-wheel-mode): Use the result of - current-global-map instead of the variable `global-map'. - -2002-03-23 Richard M. Stallman - - * mail/mailabbrev.el (mail-abbrev-make-syntax-table): New subroutine - broken out of sendmail-pre-abbrev-expand-hook. - (sendmail-pre-abbrev-expand-hook): Use it. - -2002-03-22 Stefan Monnier - - * Makefile.in (finder-inf.el): Remove. - (finder-data): Don't depend on finder-inf.el any more. - (compile, compile-always): Handle the case where some files - from DONTCOMPILE are missing (it tried to compile them). - (bootstrap-clean): Use src/emacs only if executable. - (bootstrap): Update subdirs.el and finder-inf.el. - - * finder.el: Don't load finder-inf.el during byte-compilation. - - * vc-cvs.el (vc-cvs-registered, vc-cvs-dir-state-heuristic): - Don't consider cvs-removed files as under VC control. - VC wouldn't handle them properly anyway and it confuses - vc-file-not-found-hook. - - * emacs-lisp/bytecomp.el (batch-byte-compile-if-not-done): - Add autoload cookie. - -2002-03-22 Eli Zaretskii - - * calendar/calendar.el (calendar): Doc fix. - -2002-03-22 Juanma Barranquero - - * play/gomoku.el (gomoku-font-lock-O-face): Convert to use `defface'. - (gomoku-font-lock-X-face): Likewise. - (gomoku-font-lock-keywords): Use faces instead of variables. - -2002-03-21 Stefan Monnier - - * Makefile.in (bootstrap): Make sure subdirs.el is ready. - -2002-03-21 Kim F. Storm - - * simple.el (open-network-stream, open-network-stream-nowait) - (open-network-stream-server): Use featurep to test for - supported networking features. - -2002-03-21 Thien-Thi Nguyen - - * mail/emacsbug.el (report-emacs-bug-hook): Remove submitter - directions as the last action. - -2002-03-21 Pavel Jan,Am(Bk - - * startup.el (fancy-splash-tail, normal-splash-screen): - Update copyright. - - * novice.el (disabled-command-hook): Clarify output text to match - prompt. - -2002-03-20 Jason Rumney - - * frame.el (display-images-p): Do not explicitly check display type. - -2002-03-20 pmr-sav - - * mail-utils.el: - Eliminate compilation warnings due to `rfc822-addresses'. - (rmail-dont-reply-to): Eliminate `pos' as a free variable for a - warning free compile. - -2002-03-20 Michael Kifer - - * ediff-diff.el (ediff-install-fine-diff-if-necessary): - Take the current highlighting style into account. - (ediff-forward-word-function,ediff-whitespace,ediff-word-1) - (ediff-word-2,ediff-word-3,ediff-word-4): Make them buffer local. - - * ediff-init.el (ediff-patch-job): New macro. - - * ediff-mult.el (ediff-make-new-meta-list-header): New API function. - (ediff-intersect-directories): Use ediff-make-new-meta-list-header. - - * ediff-ptch.el (ediff-map-patch-buffer): - Use ediff-make-new-meta-list-header. - (ediff-fixup-patch-map): Use the meta-list API from ediff-mult.el. - - * ediff-util.el (ediff-toggle-hilit): Fix toggling of highliting. - (ediff-select-difference): Take highlighting style into account. - (ediff-clone-buffer-for-region-comparison): New function. - (ediff-inferior-compare-regions): Added comparison of current diff - regions. - - * ediff.el (ediff-clone-buffer-for-region-comparison) - (ediff-clone-buffer-for-window-comparison): Moved to ediff-util.el. - -2002-03-19 pmr-sav - - * mail-utils.el (rmail-dont-reply-to): - Overhaul to correctly apply the regular - expressions in the variable `rmail-dont-reply-to-names' to the list of - destination addresses. Contributed by lorentey@elte.hu. - - * rmail.el (rmail-dont-reply-to-names): - Modify the documentation to make it email - address centric rather than login name centric. Contributed by - lorentey@elte.hu. - -2002-03-18 Colin Walters - - * ibuf-ext.el (ibuffer-toggle-sorting-mode): Remove `find-if' so - we don't require `cl' at runtime. - (sorting mode mode-name): Don't take the symbol-name of a string. - - * ibuffer.el (ibuffer-set-mark): Go back to the beginning of the - line after setting the mark. - (ibuffer-insert-buffers-and-marks): Invert the test for - `ibuffer-sorting-reversep'. - -2002-03-18 Stefan Monnier - - * international/ucs-tables.el (unify-8859-on-decoding-mode) - (unify-8859-on-encoding-mode): Remove autoload cookie. - -2002-03-18 Andre Spiegel - - * vc-rcs.el (vc-rcs-register): Fix handling of - vc-[rcs-]register-switches. - (vc-rcs-checkin-switches, vc-rcs-checkout-switches): - Variables removed, since they weren't used yet. - - * vc-cvs.el (vc-cvs-register): Fix handling of - vc-[cvs-]register-switches. - - * vc-sccs.el (vc-sccs-register): Fix handling of - vc-[sccs-]register-switches. - -2002-03-18 Stefan Monnier - - * loadup.el ("emacs-lisp/backquote"): Load earlier. - ("international/ucs-tables"): Load and turn on - unify-8859-on-encoding-mode unconditionally. - (emacs-version): Use `defconst' rather than `setq'. - - * eshell/esh-ext.el (eshell-binary-suffixes): Use exec-suffixes. - -2002-03-18 Richard M. Stallman - - * menu-bar.el (menu-bar-options-menu): Cope if - text-mode-hook is not a list. - -2002-03-17 Richard M. Stallman - - * emulation/pc-select.el (pc-selection-mode): - Alter the existing global map, don't replace it. - - * files.el (list-directory): Set default-directory at the end. - - * dabbrev.el (dabbrev--goto-start-of-abbrev): - Put a limit on field-beginning search. - -2002-03-17 Simon Josefsson - - * net/browse-url.el (browse-url-mosaic-pidfile): New variable. - (browse-url-mosaic): Use it. - - * net/browse-url.el (browse-url-filename-alist): Don't begin - docstring with *, you don't want to set this one with M-x set-variable. - - * net/browse-url.el: Put * in user option doc strings. - -2002-03-17 Stefan Monnier - - * textmodes/sgml-mode.el (sgml-xml-mode): Renamed from sgml-xml. - (sgml-xml-guess): Simplify. - (sgml-mode-common): Remove (move into sgml-mode). - (sgml-mode): Add code from sgml-mode-common. - Remove redundant setting of indent-line-function. - Don't set skeleton-transformation when in XML mode. - - * international/mule-diag.el (describe-char-after): - Use `internal-describe-syntax-value' again (got lost somewhere). - - * international/ucs-tables.el (ucs-unify-8859, ucs-fragment-8859): - Use unify-8859-on-decoding-mode. - (unify-8859-on-decoding-mode): Also set translation-table-for-input. - (ucs-insert): Give an error if the unicode char can't be created. - - * pcvs-parse.el (cvs-parse-table): Be a bit more lenient. - (cvs-parse-status): Handle the "used to have a conflict" marker. - -2002-03-17 Kim F. Storm - - The following changes are related to the enhanced network process - support. - - * simple.el: Update copyright. - (clone-process): Use make-network-process to clone network - processes. Get command list via (process-contact ... t). - Use set-process-query-on-exit-flag and process-query-on-exit-flag - instead of process-kill-without-query. - (open-network-stream): Replaces C-version from process.c. - (open-network-stream-nowait, open-network-stream-server): New funs. - (process-kill-without-query): Replaces C-version from process.c. - - * files.el: Update copyright. - (save-buffers-kill-emacs): Also check for active server - processes. Use process-query-on-exit-flag. Only list processes - which has the query-on-exit flag set in connection with user query. - - * shadowfile.el: Update copyright. - (shadow-save-buffers-kill-emacs): Also check for active server - processes. Use process-query-on-exit-flag. - -2002-03-16 Simon Marshall - - * imenu.el (imenu-menubar-modified-tick): Renamed from - imenu-update-menubar-modified-tick. - (imenu-update-menubar): Update imenu-menubar-modified-tick - whenever outer condition succeeds. - - * lazy-lock.el (save-buffer-state): - Bind inhibit-modification-hooks and buffer-file-truename - instead of before-change-functions and after-change-functions. - -2002-03-16 Eli Zaretskii - - * international/codepage.el (codepage-setup): Don't define a - codepage if it is already defined. - - * textmodes/po.el (po-content-type-charset-alist): Convert the - car of each association to a string. - (po-find-file-coding-system-guts): If the charset matches a name - of a codepage, set up that codepage and return it as a coding - system to decode the file. - (po-find-charset): Search for the Charset= header even if we've - read less than 4KB. - : Remove the setup for all known codepages: it seems - to cause crashes in the CCL driver. - -2002-03-16 Pavel Jan,Am(Bk - - * textmodes/bibtex.el (bibtex-sort-ignore-string-entries) - (bibtex-entry-field-alist): Doc fix. - -2002-03-16 Richard M. Stallman - - * progmodes/cperl-mode.el (cperl-imenu--function-name-regexp-perl): - Move definition above cperl-outline-regexp. - - * bindings.el (mode-line-mule-info): In computing help-echo prop, - avoid using save-window-excursion. And compile the function. - -2002-03-15 Stefan Monnier - - * files.el (load-completion): New function. - (load-library): Use it. - -2002-03-15 Pavel Jan,Am(Bk - - * calendar/cal-french.el (calendar-goto-french-date): Fix prompt - to match the actual code. - -2002-03-15 Eli Zaretskii - - * textmodes/po.el (po-find-file-coding-system-guts): - Use with-temp-buffer instead of po-with-temp-buffer. - - * international/mule-conf.el (file-coding-system-alist): Add an - association for PO files. - - * textmodes/po.el: New file. - -2002-03-15 Gerd Moellmann - - * emacs-lisp/cl-indent.el (common-lisp-loop-part-indentation): - Fix simple loop indentation. - -2002-03-14 Miles Bader - - * net/rlogin.el (rlogin-mode): Use `define-derived-mode'. - -2002-03-14 Richard M. Stallman - - * textmodes/picture.el (picture-insert) - (picture-clear-column, picture-draw-rectangle): - Use move-to-column, not move-to-column-force. - - * dired.el (dired-readin): Clear out undo list. - (dired-fun-in-all-buffers): Definition moved from dired-aux.el. - (dired-delete-entry): New function. - (dired-internal-do-deletions): Use dired-fun-in-all-buffers - and dired-delete-entry, to update this buffer (and others). - - * dired-aux.el (dired-fun-in-all-buffers): Moved to dired.el. - - * facemenu.el (facemenu-add-new-face): - Pass region args to facemenu-set-face, when there is a region. - (facemenu-set-foreground, facemenu-set-background) - (facemenu-add-face): Doc fixes. - - * progmodes/cperl-mode.el (cperl-outline-regexp): Move definition up. - -2002-03-14 Miles Bader - - * emacs-lisp/debug.el: Require `button'. - (debugger-mode-map): Set the parent keymap to `button-buffer-map', - to get TAB and bindings. - - * net/rlogin.el (rlogin-carriage-filter): Function removed. - (rlogin): Don't install the `rlogin-carriage-filter' filter, as - comint removes carriage returns itself now. - - * rfn-eshadow.el (rfn-eshadow-update-overlay): - Bind `inhibit-point-motion-hooks' to t while messing around, to avoid - getting hosed by our own intangible property. - -2002-03-13 Stefan Monnier - - * progmodes/fortran.el (fortran-mode): Set comment-padding to "$$$". - Add fortran-comment-line-start-skip to comment-start-skip. - (fortran-comment-indent): Keep whole-line comments in column 0. - (fortran-find-comment-start-skip): New arg `all'. - If ALL is nil, make sure we only match comment-start-skip if we - can't match fortran-comment-line-start-skip. - Fix bug that made it return t but without moving point when - matching '!'! (a false-comment followed by a real comment). - (fortran-indent-comment): Use new `all' argument above. - Be careful not to add an incorrect comment-starter like "C" - in comment-column. - (fortran-split-line): When splitting a comment, reuse the comment - starter from the current line rather than fortran-comment-line-start. - (fortran-indent-line, fortran-auto-fill): Simplify thanks to the - cleaner behavior of fortran-find-comment-start-skip. - (fortran-fill): Don't be confused by ! inside a comment. - (fortran-break-line): Minor cleanup and simplification. - -2002-03-13 Francesco Potort,Al(B - - * progmodes/etags.el (tag-exact-file-name-match-p) - (tag-file-name-match-p, tag-partial-file-name-match-p): Use a - simpler regexp. - -2002-03-12 Colin Walters - - * ibuffer.el (ibuffer-redisplay-current): Don't move point when - redisplaying a line. - -2002-03-12 Jan Dj,Ad(Brv - - * term/x-win.el (emacs-session-restore): Take previous id as - an argument. - (emacs-session-save): Add comment that return t means cancel shutdown - - * startup.el (command-line): Must check that x-session-previous-id - is bound also, for non-X platforms. - -2002-03-12 Gerd Moellmann - - * emacs-lisp/cl-indent.el (lisp-loop-keyword-indentation) - (lisp-loop-forms-indentation, lisp-simple-loop-indentation): - New user options. - (extended-loop-p, common-lisp-loop-part-indentation): New functions. - (common-lisp-indent-function-1): Renamed from - common-lisp-indent-function. - (common-lisp-indent-function): Handle loop forms specially. - (lisp-indent-defmethod): Use car/cdr instead of first/rest. - (lisp-backquote-indentation): New user option. - -2002-03-12 Francesco Potort,Al(B - - * progmodes/etags.el (tag-exact-file-name-match-p) - (tag-file-name-match-p, tag-partial-file-name-match-p): - Assume that the header of a tags section has either a number - or nothing after the last comma. - -2002-03-11 Richard M. Stallman - - * imenu.el (imenu-update-menubar-modified-tick): New variable. - (imenu-update-menubar): Don't call imenu--make-index-alist - if buffer has not changed since last time. - - * desktop.el (desktop-buffer-handlers): Doc fix. - (desktop-buffer-file): Explicitly return BUF. - - * paren.el (show-paren-function): Move back in other direction - to verify the match is correct. - - * mail/supercite.el (sc-select-attribution): Accept whatever value - we get in CHOICE; there is no value meaning "try again". - -2002-03-11 Colin Walters - - * shell.el (toplevel): Revert previous change to use pcomplete. - (shell-mode): Ditto. - (shell-pcomplete-setup-done): Remove. - (shell-pcomplete): Ditto. - (shell-pcomplete-reverse): Ditto. - - * comint.el: Remove documentation on setting up pcomplete. - -2002-03-11 Pavel Jan,Am(Bk - - * font-lock.el (java-font-lock-extra-types): Add "URL" as separate - item. Doc fix. - - * image.el (image-type-from-file-header): Make temporary buffer - unibyte. - - * subr.el (add-to-list): Doc fix. - -2002-03-11 Miles Bader - - * pcomplete.el (pcomplete-entries): Expand environment variables - in filename. - -2002-03-10 Daniel Pfeiffer - - * play/mpuz.el: Use defface instead of facemenu-get-face. - -2002-03-10 Jan Dj,Ad(Brv - - * startup.el (command-line): Add call to emacs-session-restore if - both x-session-id and x-session-previous-id are strings. - - * term/x-win.el (x-handle-smid): New function. - (emacs-session-filename): New function. - (emacs-session-save): New function. - (emacs-save-session-functions): New variable. - (emacs-session-restore): New function. - -2002-03-09 Eli Zaretskii - - * simple.el (shell-command-on-region): Call push-mark with - non-nil second arg, to suppress the "Mark set" message. - -2002-03-08 Richard M. Stallman - - * textmodes/picture.el (picture-forward-column): New arg `interactive' - is non-nil for an interactive call. Use instead of interactive-p. - (picture-backward-column): Likewise. - - * tar-mode.el (tar-untar-buffer): New function. - - * info.el (Info-fontify-node): Bind up-clicks, not down-clicks. - Put the mouse-face on the entire xref, like the local keymap. - - * find-dired.el (find-name-dired): Use shell-quote-argument. - -2002-03-08 Daniel Pfeiffer - - * play/mpuz.el (mpuz-unsolved-face, mpuz-solved-face) - (mpuz-trivial-face, mpuz-text-face, mpuz-solve-when-trivial) - (mpuz-allow-double-multiplicator): New options for nicer look and - new features. - (mpuz-put-number-on-board, mpuz-paint-number, mpuz-solve): New funs. - (mpuz-check-all-solved, mpuz-random-puzzle) - (mpuz-paint-statistics, mpuz-paint-digit, mpuz-close-game) - (mpuz-show-solution): Functions streamlined and removed french - style space before punctuation, added face support and optional - solving of trivial results. - -2002-03-07 Colin Walters - - * ibuf-macs.el (define-ibuffer-column): Add :summarizer property. - - * ibuffer.el (ibuffer-update-mode-name): Substitute "view time" - instead of "recency" for clarity. - (ibuffer-compile-format): Document more. Handle new "summarizer" - columns. - (ibuffer-fontify-region-function): Ditto. - (ibuffer-insert-buffer-line): Ditto. - (ibuffer-map-lines): Ditto. - (ibuffer-insert-buffers-and-marks): Ditto. - (ibuffer-update-title-and-summary): Renamed from - `ibuffer-update-title'. Handle "summarizer" columns. - (ibuffer-clear-summary-columns): New function. - - * ibuf-ext.el (ibuffer-filter-format-alist): Add type and group. - -2002-03-07 Gerd Moellmann - - * progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern): - Use the other-window instead of the other-frame functions when - the window is dedicated. - -2002-03-06 ShengHuo ZHU - - * textmodes/bibtex.el (bibtex-make-field): Call bibtex-find-text - with SILENT so that a new field can be added. - -2002-03-06 Eli Zaretskii - - * files.el (make-auto-save-file-name): Make sure the produced file - name does not contain characters that are invalid for DOS/Windows - filesystems. - - * dos-fns.el, w32-fns.el (make-auto-save-file-name): - Remove replacement functions. - -2002-03-06 Gerd Moellmann - - * font-lock.el (lisp-font-lock-keywords-2): Highlight keywords of - the form `:x'. - - * vc.el (vc-branch-part): Add autoload cookie. This function can - be called from vc-rcs-find-most-recent-rev when visiting a file - checked into RCS in a CVS sandbox. - -2002-03-06 Andreas Schwab - - * progmodes/hideif.el: Augment expression parser to handle - conditional expressions. - (hif-token-regexp): Also match `?' and `:'. - (hif-tokenize): Handle `?' and ':' as tokens. - (hif-expr): Parse conditional expressions. - (hif-or-expr): Parse `||' expressions. - (hif-and-expr): Renamed from hif-term. - (hif-conditional): New function to evaluate a conditional - expression. - -2002-03-06 Pavel Jan,Am(Bk - - * language/czech.el ("Czech"): Fix the documentation. - - * language/slovak.el ("Slovak"): Likewise. - -2002-03-05 ShengHuo ZHU - - * xml.el (xml-parse-attlist): Accept empty strings. - -2002-03-05 Eli Zaretskii - - * mouse.el (mouse-show-mark): Remove the no-highlight alternative: - all terminals now support highlighting of some kind. - - * language/european.el (mac-roman): Fix the safe-chars property. - -2002-03-05 Andre Spiegel - - * vc.el (vc-transfer-file): Use `make-temp-file'. - (vc-default-update-changelog): Remove conditional use of - `make-temp-name'. - - * vc-cvs.el (vc-cvs-diff-tree): Fix typo in parameter names. - -2002-03-05 Michael Kifer - - * ediff-init.el: Comments. - - * ediff-hook.el: Got rid of autoloads. Not needed, since the hook - is loaded. - - * ediff-mult.el (ediff-intersect-directories) - (ediff-prepare-meta-buffer,ediff-get-directory-files-under-revision): - Cleanup. - (ediff-draw-dir-diffs): Now supports the "C" command in directory - difference buffer. - (ediff-dir-diff-copy-file): New function that implements copying - of files from one Ediff dir to another - (ediff-bury-dir-diffs-buffer): Kills the buffer instead. - (ediff-append-custom-diff): Better error msgs. - - * ediff-util.el (ediff-compute-custom-diffs-maybe): Buglet fix. - (ediff-inferior-compare-regions): Use - ediff-clone-buffer-for-region-comparison. Better and simpler interface. - - * ediff.el (ediff-directories-internal): Cleanup. - (ediff-clone-buffer-for-region-comparison): Better interface. - -2002-03-04 Richard M. Stallman - - * emacs-lisp/easy-mmode.el (define-minor-mode): - Use "P" in interactive spec of minor mode commands. - -2002-03-04 Stefan Monnier - - * faces.el (face-spec-choose): Allow `t' to appear before the end. - (mode-line, tool-bar, minibuffer-prompt, region, fringe, bold, italic) - (bold-italic, underline, highlight, secondary-selection, fixed-pitch) - (variable-pitch, trailing-whitespace): Don't use the old-style entries. - (mode-line-inactive, header-line): Move the `t' section to the - beginning so the `:inherit' setting can be shared. - -2002-03-04 Pavel Jan,Am(Bk - - * net/snmp-mode.el: Require tempo when compiling to prevent - warnings. Update copyright notice. - - * help.el (describe-key-briefly, describe-key): Interpret `undefined' - like not defined at all. - -2002-03-03 Stefan Monnier - - * textmodes/sgml-mode.el: Change maintainer to FSF. - (sgml-start-tag-regex, sgml-font-lock-keywords-1, sgml-mode-common) - (sgml-tags-invisible, sgml-beginning-of-tag): - Allow _ : and non-ASCII in tag names, as required for XML. - (sgml-name-char): Don't assume anything about charsets handled by - encode-char. - - * textmodes/tex-mode.el (tex-guess-main-file): Handle the case - where one of the buffers is narrowed. - - * hexl.el (hexlify-command, dehexlify-command): Remove. - (hexlify-buffer, dehexlify-buffer): Use call-process-region - rather than shell-command-on-region. - - * newcomment.el (comment-forward): Use forward-comment to skip - over whitespace (or comments) even when comment-use-syntax is nil. - - * progmodes/cperl-mode.el (cperl-menu): Add "-emacs" to the version. - - * textmodes/xml-lite.el: New file. - -2002-03-03 Richard M. Stallman - - * textmodes/artist.el (artist-system): Use make-temp-file. - - * progmodes/ps-mode.el (ps-run-make-tmp-filename): Use make-temp-file. - - * mail/sendmail.el (mail-recover-1): Increase non-random-len - by 1 since we changed make-auto-save-file-name to add one - fewer character to the buffer name. - (mail-recover): Really show point at the right place - in the *Directory* buffer. - - * files.el (make-auto-save-file-name): Use make-temp-file. - - * terminal.el (te-create-terminfo): Use make-temp-file - to create the source file in a safe way. - -2002-03-03 Eli Zaretskii - - * cus-start.el: Rename automatic-hscroll-step and - automatic-hscroll-margin into hscroll-step and hscroll-margin. - - * frame.el (auto-hscroll-mode): Renamed from automatic-hscrolling. - (automatic-hscrolling): Now a defvaralias for auto-hscroll-mode. - - * mouse.el (mouse-region-delete-keys): Add deletechar. - -2002-03-03 Sam Steingold - - * play/snake.el (snake-score-file): Fixed parens (broken by the - last patch). - * play/tetris.el (tetris-score-file): Ditto. - -2002-03-03 Richard M. Stallman - - * play/tetris.el (tetris-score-file): Put in home dir, not in /tmp. - - * play/snake.el (snake-score-file): Put in home dir, not in /tmp. - - * play/gamegrid.el (gamegrid-set-font, gamegrid-setup-face) - (gamegrid-make-mono-tty-face): Fix usage of condition-case. - -2002-03-03 Thien-Thi Nguyen - - * calendar/diary-lib.el (list-diary-entries): Use `buffer-substring' - instead of `buffer-substring-no-properties' to support enriched mode. - -2002-03-02 Richard M. Stallman - - * find-dired.el (find-grep-dired): Call shell-quote-argument. - Specify the -e option. - Rename arg to `regexp'. - -2002-03-02 Milan Zamazal - - * textmodes/tildify.el (tildify-string-alist): Add entry for xml-mode. - -2002-03-02 Miles Bader - - * mwheel.el (mwheel-scroll): Remove `double' and `triple' from the - event-modifiers before looking up in `mouse-wheel-scroll-amount'. - If there's no applicable modifiers entry in the alist in - `mouse-wheel-scroll-amount', fall back to the default, not to - nil (which causes full screen scrolls). - -2002-03-01 Andreas Schwab - - * textmodes/texnfo-upd.el (texinfo-start-menu-description): - Remove extra paren in regexp. - -2002-03-01 Eli Zaretskii - - * mouse.el (mouse-show-mark): Use display-mouse-p, not - display-graphic-p, to decide whether to move point or use the - highlighting. - -2002-02-28 Colin Walters - - * eshell/esh-var.el (eshell-parse-variable-ref): Use `make-temp-file'. - - * calc/calc-graph.el (calc-gnuplot-tempfile): Don't expand against - `temporary-file-directory'; we now do that in `calc-graph-file-cache'. - (calc-temp-file-name): Use `make-temp-file'. - -2002-02-28 Richard M. Stallman - - * font-lock.el (java-font-lock-extra-types): - Match java.net.URL, etc. - -2002-02-28 Pavel Jan,Am(Bk - - * hexl.el (hexl-options): Doc fix. - Update Commentary section. - - * textmodes/sgml-mode.el (sgml-specials, sgml-quick-keys): - Doc fixes. - -2002-02-28 Andre Spiegel - - * vc.el (vc-revert-buffer): If the buffer is not saved, prompt - the user to do that first. - (vc-update): New function. - - * vc-hooks.el (vc-menu-map): New entry "Update to Latest Version", - which calls vc-update. Use the term "Base Version" instead of - "Last Version" for the entries "Revert" and "Compare". - -2002-02-28 Kim F. Storm - - * simple.el (shell-command-on-region): Report non-zero exit - status in mode line instead of buffer. - -2002-02-27 Richard M. Stallman - - * comint.el (comint-preoutput-filter-functions): Doc fix. - (comint-output-filter-functions, comint-input-filter-functions) - (comint-redirect-filter-functions): Likewise. - - (comint-redirect-preoutput-filter): Do the local-hook - handling of t when running comint-redirect-filter-functions. - (comint-output-filter): Likewise for comint-preoutput-filter-functions. - -2002-02-26 Richard M. Stallman - - * paths.el (remote-shell-program): Add doc string. - -2002-02-26 Colin Walters - - * ibuf-ext.el (sorter mode-name): New. - (ibuffer-do-occur): Don't quote ibuffer-marked-char. - - * calc/calc-ext.el (calc-scroll-left): Call scroll-left - interactively, so they do something. - (calc-scroll-right): Ditto. - -2002-02-26 Eli Zaretskii - - * international/mule.el (ctext-pre-write-conversion): Handle the - case when FROM is a string, and when we are called from - build_annotations_2. - -2002-02-26 Richard M. Stallman - - * rect.el (clear-rectangle-line): Reindent to the same column - that move-to-column reached when it tried to go to endcol. - - * icomplete.el (icomplete-exhibit): Use minibuffer-prompt-end. - -2002-02-26 Ivar Rummelhoff - - * winner.el (winner-boring-buffers, winner-set): A window which - displays a buffer whose name is in the list - `winner-boring-buffers', will no longer be restored by `winner-undo'. - (winner-sorted-window-list): Used to improve comparison between - window configurations. - (winner-win-data): Simplified and moved. - (winner-conf): Simplified (now uses `winner-win-data'). - (winner-change-fun, winner-save-old-configurations) - (winner-save-(un)conditionally, winner-redo): Changes made while in - the minibuffer will be ignored. (Such changes are undone upon - exit for the minibuffer, anyway.) - (winner-set-conf): Preserve selected window whenever possible. - (winner-make-point-alist): Simplified. - (winner-mode, winner-save-unconditionally): Save current window - configuration on entering minibuffer. - (minor-mode-alist): Don't add winner-mode to `minor-mode-alist', - since it does not change the overall behavior of Emacs. - -2002-02-26 Eli Zaretskii - - * international/mule-conf.el (compound-text): Renamed back from - compound-text-no-extensions. - (ctext-no-compositions): Remove the mime-charset property. - (compound-text-with-extensions): Renamed from compound-text. - (x-ctext-with-extensions, ctext-with-extensions): Renamed aliases. - -2002-02-26 Juanma Barranquero - - * faces.el (list-faces-display): Fix typo. - -2002-02-25 Richard M. Stallman - - * frame.el (focus-follows-mouse): Doc fix. - -2002-02-26 Miles Bader - - * mwheel.el (mouse-wheel-mode): Pass vectors instead of symbols - to `define-key', since it no longer accepts the latter. - -2002-02-25 Jason Rumney - - * term/w32-win.el (mouse-wheel-scroll-line): Use car of - mouse-wheel-scroll-amount. - - * w32-vars.el (mouse-wheel-scroll-amount): Use same definition as - mwheel.el. - - * language/japanese.el (iso-2022-jp-2): Add init-bol flag. - -2002-02-25 Andre Spiegel - - * vc.el (vc-diff-switches-list): Fix prev change, making the macro - consistent with the others that take a backend name as a symbol. - - * vc-cvs.el, vc-rcs.el, vc-sccs.el: Fix calls to vc-diff-switches-list. - -2002-02-25 Kim F. Storm - - * comint.el (comint-replace-by-expanded-filename): Do nothing if - comint-match-partial-filename returns nil. - - * shell.el (shell-pcomplete-setup-done): New variable. - (shell-pcomplete): Use it instead of shell-pcomplete-setup-p. - (shell-pcomplete-reverse): Ditto. - -2002-02-25 Per Abrahamsen - - * ps-print.el (ps-print-printer): Added `lpr' customize group member. - -2002-02-25 Juanma Barranquero - - * subr.el (save-match-data): Doc fix. - - * ielm.el (ielm-prompt): Allow customization; make it read-only. - -2002-02-25 Kim F. Storm - - * shell.el (shell-mode-map): Add "Complete" header so completion - menu is shown on the menu bar in shell mode. - -2002-02-25 Stefan Monnier - - * ielm.el (ielm-match-data): New var. - (inferior-emacs-lisp-mode): Make it buffer-local. - (ielm-eval-input): Use it to preserve match-data between inputs. - -2002-02-24 Juanma Barranquero - - * ielm.el (inferior-emacs-lisp-mode): Use hexl for the dummy process. - -2002-02-24 Per Abrahamsen - - * cus-edit.el (custom-unlispify-remove-prefixes): Add to - `custom-buffer' customize group. - -2002-02-23 Kim F. Storm - - * help.el (where-is): Use remap-command. - - * help-fns.el (describe-function-1): Use remap-command. - - * subr.el (global-set-key, local-set-key): Undo 2002-02-06 - change (no longer accept a symbol for the KEY argument). - -2002-02-23 Colin Walters - - * calc/calcalg3.el (calc-invent-variables): Convert integer to string. - * calc/calcalg2.el (math-solve-get-sign): Ditto. - - * ibuffer.el (ibuffer-compile-format): Don't uselessly bind `pt' - in generated function. - - * ibuf-ext.el (ibuffer-old-time): Change to hours. - (ibuffer-mark-old-buffers): Handle it. - - * shell.el (shell-pcomplete, shell-pcomplete-reverse): New functions. - (toplevel): Bind them. - (shell-mode): Don't set `comint-dynamic-complete-functions'; it is - not necessary now that we use pcomplete. - - * comint.el: Document how use new pcomplete completion facility. - -2002-02-23 Richard M. Stallman - - * mail/rmailsum.el (rmail-summary-output): Properly advance - to next message, by calling rmail-summary-goto-msg. - - * net/browse-url.el (browse-url-galeon): Specify --existing - for an existing window. Use --noraise rather than --no-raise. - Don't use -x. - -2002-02-22 Eli Zaretskii - - * progmodes/etags.el (find-tag-noselect, find-tag) - (find-tag-other-window, find-tag-other-frame, find-tag-regexp): - Fix a typo in doc strings. - -2002-02-20 Deepak Goel - - * play/snake.el (snake-velocity-queue, snake-update-velocity) - (snake-final-x-velocity, snake-final-y-velocity): - New variable and functions. Store user's keypresses - into a queue and pop from the queue each subsequent turn. - (snake-update-game, snake-move-left) - (snake-move-right, snake-move-up, snake-move-down, snake-active-p) - (snake-start-game): Use that queue. - (snake-use-glyphs-flag): Renamed from snake-use-glyphs. - (snake-use-color-flag): Likewise. - (snake-mode): Rename uses of those variables. - -2002-02-22 Eli Zaretskii - - Support for ICCCM Extended Segments in X selections: - - * international/mule-conf.el (ctext-no-compositions): New coding - system. - (compount-text-no-extensions): Renamed from compound-text. - (x-ctext-no-extensions, ctext-no-extensions): Aliases for - compound-text-no-extensions. - (compound-text): Redefined using post-read and pre-write conversions. - - * international/mule.el (non-standard-icccm-encodings-alist) - (non-standard-designations-alist): New variables. - (ctext-post-read-conversion, ctext-pre-write-conversion): - New functions. - -2002-02-21 Jonathan Kamens - - * vc.el (vc-default-init-version): Update documentation to - indicate that the backend can override the default init version. - (vc-register): Use the backend init-version function, if it - exists, to determine the initial version of a file. - (vc-diff-switches-list): Don't symbol-quote backend, since it's - already a symbol. Don't fail if vc-BACKEND-diff-switches isn't bound. - - * vc-hooks.el (vc-mode-line): Set vc-mode to nil if the file is - not version-controlled. This is necessary, e.g., if the file has - just been reverted, and thus was previously under version control - but isn't any longer. - (vc-find-file-hook): Likewise. - -2002-02-21 Martin Lorentzson - - * vc-cvs.el (vc-cvs-sticky-date-format-string): New variable. - (vc-cvs-sticky-tag-display): New variable. - (vc-cvs-mode-line-string): Add sticky-tag to the mode-line. - (vc-cvs-checkin): If the input revision is a valid symbolic tag - name, we create it as a branch, commit and switch to it. - (vc-cvs-retrieve-snapshot): Set file-property sticky-tag. - (vc-cvs-valid-symbolic-tag-name-p): New function. - (vc-cvs-parse-sticky-tag): New function. - (vc-cvs-parse-entry): Add parsing of sticky tags. - -2002-02-21 Per Abrahamsen - - * toolbar/tool-bar.el (tool-bar-mode): Revert the :init-value to - nil, and then explicitly set the standard-value to t. - -2002-02-20 Sam Steingold - - * textmodes/flyspell.el (flyspell-mode): Autoload the variable - since it is used in the menu bar. - -2002-02-20 Richard M. Stallman - - * simple.el (shell-command-on-region): Display the exit status - when a command fails. - - * subr.el (add-hook): Doc fix. - - * frame.el (other-frame): Doc fix. - - * simple.el (yank): Clear `field' property. - -2002-02-20 Tom Tromey - - * progmodes/tcl.el (tcl-do-fill-paragraph): Find and fill on more - natural paragraph boundaries. Don't fail at beginning of buffer. - -2002-02-20 Pavel Jan,Am(Bk - - * tar-mode.el (tar-next-line, tar-previous-line): Add doc string, - call the argument "arg" to match plain next-line and - previous-line. From Kevin Ryde . - -2002-02-19 Sam Steingold - - * mwheel.el (mouse-wheel-scroll-amount): Can specify different - scroll amounts for different modifiers now. - (mwheel-scroll): Handle the new `mouse-wheel-scroll-amount' - format properly. - (mouse-wheel-mode): Ditto. - -2002-02-19 Eli Zaretskii - - * textmodes/bibtex.el (bibtex-parse-keys): Put save-match-data - around function body. - - * net/browse-url.el (browse-url-maybe-new-window): Reverse the - sense of the comparison, to match the doc strings of functions - that use this macro. - -2002-02-19 Per Abrahamsen - - * facemenu.el (describe-text-mode-map): Removed bootstrap kludge. - - * toolbar/tool-bar.el (tool-bar-mode): Made the standard value t. - * menu-bar.el (menu-bar-mode): Ditto. - -2002-02-18 Andreas Schwab - - * replace.el (query-replace-regexp-eval): Doc fix. - -2002-02-18 Colin Walters - - * calc/calcalg2.el (math-solve-get-int): Convert return value from - `math-get-from-counter' to a string before calling `concat' on it. - - * calc/calc-maint.el (calc-split-manual): Look for calc.texi. - (calc-public-autoloads): Obsolete; remove. - (calc-private-autoloads): Ditto. - (calc-add-autoloads): Ditto. - - * calc/calc-macs.el (calc-with-default-simplification): Use &rest - for body. - -2002-02-17 Jason Rumney - - * w32-win.el (x-option-alist, x-long-option-alist) - (x-switch-definitions): Remove, use command-line-x-option-alist - instead to be consistent with X. - (x-handle-initial-switch): New function. - -2002-02-17 Eli Zaretskii - - * faces.el (mode-line-inactive, header-line): Add the :inherit - attribute for the tty case. - -2002-02-17 stanislav shalunov - - * mail/uce.el (uce-reply-to-uce): Fix incorrect behavior when - invoked from Rmail with full headers displayed. - -2002-02-17 Kai Gro,A_(Bjohann - - * emacs-lisp/lisp.el (mark-defun): Don't leave multiple marks - when repeated. - * textmodes/paragraphs.el (mark-paragraph): Ditto. - -2002-02-17 Per Abrahamsen - - * menu-bar.el (menu-bar-showhide-menu): Added speedbar. - (menu-bar-tools-menu): Removed speedbar. - - * textmodes/ispell.el (ispell-menu-map): Added `customize-ispell' - and `flyspell-mode' entries. - - * textmodes/flyspell.el (flyspell): Add to ispell group. - -2002-02-17 Kai Gro,A_(Bjohann - - * emacs-lisp/lisp.el (mark-sexp): Don't leave multiple marks when - repeated. - (mark-defun): Mark more if repeated. - -2002-02-17 Colin Walters - - * ibuf-ext.el (ibuffer-toggle-sorting-mode): Make it work. - - * ibuffer.el (ibuffer-truncate-lines): New option. - (ibuffer-mode): Use it. - -2002-02-17 Kim F. Storm - - * cus-start.el: Add mouse-highlight. - -2002-02-16 Eli Zaretskii - - * Makefile.in (DONTCOMPILE): Remove cus-start.el. - - * cus-start.el: Add automatic-hscroll-margin and - automatic-hscroll-step. - -2002-02-16 Pavel Jan,Am(Bk - - * cus-start.el (x-autoselect-window): Allow customization. - - * eshell/em-alias.el (eshell-alias-initialize): Do not use - make-local-hook. - - * eshell/em-cmpl.el (eshell-cmpl-initialize): Likewise. - - * eshell/em-dirs.el (eshell-dirs-initialize): Likewise. - - * eshell/em-glob.el (eshell-glob-initialize): Likewise. - - * eshell/em-hist.el (eshell-hist-initialize): Likewise. - - * eshell/em-pred.el (eshell-pred-initialize): Likewise. - - * eshell/em-prompt.el (eshell-prompt-initialize): Likewise. - - * eshell/em-rebind.el (eshell-rebind-initialize): Likewise. - - * eshell/em-smart.el (eshell-smart-initialize): Likewise. - - * eshell/em-unix.el (eshell-unix-initialize): Likewise. - - * eshell/esh-cmd.el (eshell-cmd-initialize): Likewise. - - * eshell/esh-ext.el (eshell-ext-initialize): Likewise. - - * eshell/esh-io.el (eshell-io-initialize): Likewise. - - * eshell/esh-mode.el (eshell-mode): Likewise. - - * eshell/esh-test.el (eshell-show-usage-metrics): Likewise. - - * eshell/esh-var.el (eshell-var-initialize): Likewise. - - * progmodes/idlw-shell.el (idlwave-shell-mode): Likewise. - - * progmodes/idlwave.el (idlwave-mode): Likewise. - - * textmodes/reftex-sel.el (reftex-select-label-mode) - (reftex-select-bib-mode): Likewise. - -2002-02-16 John Wiegley - - * eshell/em-hist.el (eshell-hist-initialize): When in the - minibuffer, use the global value of `eshell-history-ring', and - never save it to disk, or ask to save it to disk. This allows - users of session.el to control whether its global state should be - persisted or not. - (eshell-add-command-to-history): Don't write Eshell's history out - to disk, let the governing mode control that upon exit. - -2002-02-16 Eli Zaretskii - - * eshell/eshell.el (eshell-command): Before reading from the - minibuffer, add eshell-add-command-to-history to - minibuffer-exit-hook, and remove it after read-from-minibuffer - returns. - - * eshell/em-hist.el (eshell-add-input-to-history): New function, - with most of the code from eshell-add-to-history. - (eshell-add-command-to-history): New function, to record in - eshell-history the commands run via eshell-command. - (eshell-add-to-history): Call eshell-add-command-to-history to do - most of the work. - -2002-02-16 John Wiegley - - * eshell/esh-ext.el (eshell-external-command): Added a fix for - XEmacs' new dired.el, which adds a global entry in the - `file-name-handler-alist'. - -2002-02-16 John Wiegley - - * align.el (align-region): Added a missing name argument. - -2002-02-16 John Wiegley - - * eshell/esh-ext.el (eshell-script-interpreter): Allow whitespace - after the #! of a shell interpretor specification. - -2002-02-15 Richard M. Stallman - - * help.el (describe-key-briefly): Make output in INSERT case - look just like what is displayed in the normal case. - -2002-02-15 Andreas Schwab - - * textmodes/tex-mode.el (tex-font-lock-keywords-2): - Require non-letter after specials. - -2002-02-15 Eli Zaretskii - - * menu-bar.el (menu-bar-tools-menu): Add an item for Calculator. - -2002-02-15 Kai Gro,A_(Bjohann - - * simple.el (mark-word): Mark more if repeated. - * textmodes/paragraphs.el (mark-paragraph): Ditto. - (mark-end-of-sentence): Ditto. - -2002-02-15 Per Abrahamsen - - * wid-edit.el (widgetp): Made it more robust. - -2002-02-14 Per Abrahamsen - - * facemenu.el (describe-text-done): New function. - (describe-text-mode-map): New variable. - (describe-text-mode-hook): New option. - (describe-text-mode): New function. - (describe-text-widget): New function. - (describe-text-sexp): New function. - (describe-text-properties): New function. - (describe-text-category): New command. - (describe-text-at): New command. - (facemenu-menu): Replace `list-text-properties-at' with - `describe-text-at' in the menu. - - * wid-edit.el (widgetp): New function. - * wid-edit.el (widget-keymap, widget-insert, widget-setup): Autoload. - - * emacs-lisp/pp.el (pp-to-string): Autoloaded. - - * wid-browse.el: Removed version and x-url keywords. - -2002-02-13 Kim F. Storm - - * cus-start.el (mode-line-in-non-selected-windows): - Allow customization. - -2002-02-13 Richard M. Stallman - - * textmodes/bibtex.el (bibtex-parse-buffers-stealthily): - Tell bibtex-parse-keys to output no progress messages. - -2002-02-12 Eli Zaretskii - - * progmodes/pascal.el (pascal-imenu-generic-expression): - Add menu-title and fix parentheses. - -2002-02-12 Per Abrahamsen - - * menu-bar.el (menu-bar-options-save): Removed `truncate-lines'. - (menu-bar-options-menu): Don't set default value for `truncate-lines'. - -2002-02-12 Per Abrahamsen - - * menu-bar.el (menu-bar-options-save): Only save - `current-language-environment' and `default-input-method' when - marked as customized. - - * international/mule-cmds.el - (setup-specified-language-environment): - Mark `current-language-environment' as customized. - (set-input-method): Mark `default-input-method' as customized when - called interactively. - (toggle-input-method): Ditto. - -2002-02-11 Colin Walters - - * ibuffer.el (ibuffer-switch-format): Supply required argument for - `ibuffer-current-formats'. - -2002-02-11 Miles Bader - - * faces.el (mode-line-inactive): Add dark-background variant. - -2002-02-11 Per Abrahamsen - - * toolbar/tool-bar.el (tool-bar-mode): Removed standard value. - * menu-bar.el (menu-bar-mode): Ditto. - * cus-edit.el (customize-mark-to-save): Always save variables - without a standard value. - - * menu-bar.el (menu-bar-make-toggle): Made it aware of customize. - (menu-bar-options-save): Ditto. - (menu-bar-showhide-menu): Ditto. - (menu-bar-options-menu): Ditto. - (menu-bar-scroll-bar-right, menu-bar-scroll-bar-left) - (menu-bar-scroll-bar-none): Remove. - (menu-bar-showhide-scroll-bar-menu): Use customize aware lambda - expressions instead. - - * cus-edit.el (customize-set-value): Return value. - (customize-set-variable): Ditto. - (customize-save-variable): Ditto. - (customize-set-variable): Load dependencies before setting value. - (custom-load-symbol): Autoload it. - (customize-mark-as-set): New function. - -2002-02-11 Eli Zaretskii - - * cus-start.el: Don't warn about "x-*" symbols when building a - non-GUI version. - -2002-02-11 Pavel Jan,Am(Bk - - * strokes.el (strokes-do-stroke, strokes-do-complex-stroke): - Doc fix. - (strokes-help): Do not use doubled with-output-to-temp-buffer. - Fix the help string. - (strokes-prompt-user-save-strokes): Fix typo. - (strokes-list-strokes): Use proper exit-action argument for - view-buffer. Update copyright notice. - - * international/mule-diag.el: Various doc and message fixes. - (non-iso-charset-alist): Add mac-roman. Don't add entries for - codepages already present. - (list-block-of-chars): Display space for null entries in - translation table. Display tab specially. - (list-non-iso-charset-chars): Check for null charsets. Use pop - for clarity. Don't break 8-bit sets into sections between ranges. - (list-charset-chars): Avoid indent-tabs-mode. - (describe-char-after): Maybe use the text property for syntax - table information. Maybe report char-code-property-table info. - Maybe report character's unicode. Tweak printing of list info. - (list-input-methods): Add xref buttons. - (dump-charsets, dump-codings): Deleted (obsolete). - From Dave Love . - -2002-02-10 Pavel Jan,Am(Bk - - * menu-bar.el (menu-bar-showhide-menu): Rename functions for toggling. - -2002-02-10 Michael Kifer - - * viper-util.el (viper-read-key-sequence): Fix so it'll read - fast key sequences in emacs native mode - (viper-events-to-keys): Delete. - - * viper.el (describe-key, describe-key-briefly): Get rid of - viper-events-to-keys. - - * ediff-init.el (ediff-has-gutter-support): Steven Turnbull's patch. - - * ediff-wind.el (ediff-setup-control-frame): - Use ediff-has-gutter-support. - - * ediff-util.el (ediff-dispose-of-variant-according-to-user): - check if buff is alive. - - * ediff.el: Typo in comment. - -2002-02-09 Pavel Jan,Am(Bk - - * menu-bar.el (menu-bar-options-save): Take care of - line-number-mode and column-number-mode variables. - (menu-bar-showhide-menu): New menu-items "Show Line Number" and - "Show Column Number" in "Show/Hide" menu. - -2002-02-09 Richard M. Stallman - - * mail/mailabbrev.el (mail-mode-map): Use eval-after-load to change it. - -2002-02-09 Kim F. Storm - - * faces.el (mode-line-inactive): New face for mode-line for - non-selected windows. - (mode-line): Doc fix: Only used for selected window. - -2002-02-08 Eli Zaretskii - - * calendar/cal-menu.el (calendar-mode-map): Change the menu item's - name to "Insert Diary Entry". - -2002-02-08 Stefan Monnier - - * font-lock.el (save-buffer-state): Use restore-buffer-modified-p. - (c-font-lock-syntactic-face-function): Accept doxygen-style comments. - -2002-02-08 Richard M. Stallman - - * textmodes/text-mode.el (text-mode-hook-identify): Define as no-op. - -2002-02-08 Andreas Schwab - - * calc/calc.el (calcDigit-key): Use minibuffer-prompt-end instead - of point-min. - -2002-02-08 Eli Zaretskii - - * net/ange-ftp.el (ange-ftp-process-handle-line) - (ange-ftp-set-xfer-size): If the file's size is a float, divide - by 1024 instead of using ash. - - * international/mule-cmds.el (select-safe-coding-system): - State the buffer's name in the message popped in the *Warning* buffer, - and make sure the offending buffer is displayed. - -2002-02-07 Markus Rost - - * ffap.el (ffap-newsgroup-p): Test for non-nil symbol-value of htb. - -2002-02-07 Richard M. Stallman - - * terminal.el (terminal-map): Define [menu-bar] so global def is seen. - - * register.el (list-registers): New command. - (describe-register-1): New subroutine, taken out of view-register. - - * emacs-lisp/copyright.el (copyright-regexp): - Delete the unibyte copyright symbol; it's redundant. - Fix a spazz in the multibyte encoding here. - -2002-02-07 Dave Love - - * language/cyril-util.el (cyrillic-encode-koi8-r-char) - (cyrillic-encode-alternativnyj-char): Get translation tables from - symbol properties, not as variables. - (standard-display-cyrillic-translit): Include unicodes. - -2002-02-06 Kim F. Storm - - * help.el (where-is): Report remapped commands. - - * help-fns.el (describe-function-1): Ditto. - - * subr.el (global-set-key, local-set-key): Accept a symbol for the - KEY argument (like define-key). - -2002-02-06 Pavel Jan,Am(Bk - - * textmodes/flyspell.el (flyspell-insert-function): Doc fix. - -2002-02-06 Richard M. Stallman - - * mail/mailabbrev.el: Require sendmail only at compile time. - (mail-mode-header-syntax-table): Var deleted. - (mail-abbrev-syntax-table): Init to nil, will compute when needed. - (sendmail-pre-abbrev-expand-hook): Only temporarily change - local-abbrev-table and the syntax table. - Compute mail-abbrev-syntax-table if that has not been done. - - * progmodes/compile.el (grep-compute-defaults): Definition moved up. - - * emacs-lisp/debug.el (debugger-frame-offset): Var deleted. - (debugger-frame-number): Figure out the offset directly. - (debugger-setup-buffer): Don't use debugger-frame-offset. - (debugger-frame, debugger-frame-clear): Likewise. - (debugger-jump): Don't alter debugger-frame-offset. - - * emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): - Replace foo-p as var name with foo-flag, not foo-p-flag. - - * hilit-chg.el (highlight-changes-active-string): Default to +Chg. - (highlight-changes-passive-string): Default to -Chg. - (highlight-changes-global-modes): Doc fix. - - * dired.el (dired-get-filename): Add /: when appropriate - to avoid taking a local name as remote. - - * files.el (file-name-non-special): Add special handling for - file-name-sans-versions, file-name-completion, and - file-name-all-completions. - - * isearch.el (isearch-update): Don't update display in kbd macro. - (isearch-lazy-highlight-new-loop): Do nothing in kbd macro. - - * subr.el (force-mode-line-update): Doc fix. - - * subr.el (atomic-change-group, prepare-change-group) - (activate-change-group, accept-change-group, cancel-change-group): - New functions. - - * simple.el (undo-get-state, undo-revert-to-state): Fns deleted. - (transpose-subr-1): Use atomic-change-group. - - * subr.el (add-minor-mode): Include the mode's lighter string - in the minor mode menu item name. - - * mail/rmail.el (rmail-toggle-header): Avoid possibly slow call to - rmail-count-screen-lines starting from (point-min). - - * startup.el (use-fancy-splash-screens-p): Need 19 lines, - beyond the image height, to use the fancy splash screen. - - * textmodes/text-mode.el (text-mode-hook-identify): Function deleted. - (text-mode): Set text-mode-variant here. - -2002-02-06 Eli Zaretskii - - * play/pong.el (pong-height): Don't use height that exceeds the - frame height. - (pong-border-options): Make the border colors slightly more bright. - - * play/gamegrid.el (gamegrid-display-type): Treat any - color-capable display as color-x, if display-color-p is fboundp. - (gamegrid-make-color-x-face): Don't call gamegrid-color twice. - (gamegrid-make-color-tty-face): Use the value of color, not the - symbol itself. Don't call gamegrid-color. - -2002-02-05 Eli Zaretskii - - * gud.el (gud-refresh): Call recenter only after we are sure we - are in the right window. - -2002-02-05 Per Abrahamsen - - * cus-edit.el (customize-mark-to-save): New function. - * menu-bar.el (menu-bar-options-save): Rewrote. - -2002-02-05 Pavel Jan,Am(Bk - - * cus-start.el (x-use-underline-position-properties): - Allow customization. - -2002-02-04 Simon Josefsson - - * dired.el (dired-load-hook, dired-mode-hook) - (dired-before-readin-hook, dired-after-readin-hook): Defcustom. - -2002-02-03 Colin Walters - - * ibuf-ext.el (ibuffer-filter-format-alist) - (ibuffer-cached-filter-formats, ibuffer-compiled-filter-formats): - New variables. - * ibuffer.el (ibuffer): Remove link; the "home page" for ibuffer - is now the Emacs CVS tree. - (ibuffer-formats): Doc fix. - (ibuffer-active-formats-name, ibuffer-current-formats): New functions. - (ibuffer-current-format): Use them. - (ibuffer-recompile-formats, ibuffer-check-formats) - (ibuffer-switch-format, ibuffer-update-title): - Add support for ibuffer-filter-format-alist. - (define-ibuffer-column process): Remove unncessary consing. - - * ibuf-macs.el (define-ibuffer-column): Add beginnings of support - for a summary column. - -2002-02-03 Andreas Schwab - - * window.el (save-selected-window): Move macro before first use. - (balance-windows): Fix misplaced parenthesis. - -2002-02-03 Pavel Jan,Am(Bk - - * calculator.el (calculator-displayers): Doc fixes. - -2002-02-03 Pavel Jan,Am(Bk - - * menu-bar.el (menu-bar-help-menu): Use different text for tool-tip. - (menu-bar-options-save): Save also the value of `display-time-mode'. - (showhide-date-time): New function. - (menu-bar-showhide-menu): New menu-item "Date and time". - -2002-02-03 Eli Zaretskii - - * mail/rmail.el (rmail): Use find-buffer-visiting instead of - get-file-buffer to check for rmail buffer existence. - - * term.el (term-emulate-terminal): Extract proper command string - which is supplied to term-command-hook. - -2002-02-03 Richard M. Stallman - - * international/quail.el (quail-help): Don't call help-setup-xref. - - * international/mule-cmds.el (describe-input-method): - Call help-setup-xref here. - (describe-current-input-method): Doc fix. - - * novice.el (disabled-command-hook): Clarify output text. - Indent the paragraph from the command's doc string. - - * dabbrev.el (dabbrev--goto-start-of-abbrev): - Exit loop on beginning of field rather than bobp. - -2002-02-02 Eli Zaretskii - - * mail/uce.el (uce-reply-to-uce): Prune the headers before copying - the message text into the *mail* buffer, and restore the pruned - state after that. - - * mail/rmail.el (rmail-redecode-body): Prune the headers before - looking for X-Coding-System header, and restore the pruned state - before returning. - -2002-02-02 Pavel Jan,Am(Bk - - * cus-edit.el (customize-save-variable): Fix typo in prompt. - - These changes integrate new version of flyspell.el from its - maintainer, Manuel Serrano: - - * textmodes/flyspell.el (flyspell-issue-message-flag): New user option. - (flyspell-mode-on, flyspell-notify-misspell) - (flyspell-small-region, flyspell-external-point-words) - (flyspell-large-region): Use it - (flyspell-before-incorrect-word-string) - (flyspell-after-incorrect-word-string): New user options. - (make-flyspell-overlay): Use them. - (flyspell-version): New function. - (flyspell-incorrect-face, flyspell-duplicate-face): Adapt face - definitions to use :weight. - (flyspell-insert-function): New user option. - (flyspell-auto-correct-word, flyspell-correct-word) - (flyspell-xemacs-correct): Use it. - (flyspell-define-abbrev): New function. - (flyspell-auto-correct-word, flyspell-correct-word) - (flyspell-xemacs-correct): Use it. - (make-flyspell-overlay): Use `evaporate' property. - (flyspell-auto-correct-word, flyspell-correct-word): Remove overlay. - (flyspell-emacs-popup): Use `session' instead of `accept'. - (flyspell-auto-correct-previous-pos): New variable. - (flyspell-auto-correct-previous-hook) - (flyspell-auto-correct-previous-word): New functions. - -2002-02-02 Eli Zaretskii - - * novice.el (enable-command): If Emacs was invoked as "emacs -q", - don't alter the user's ~/.emacs. - (disable-command): If user-init-file is nil or does not exist, - default to "~/.emacs" (~/_emacs on DOS and, maybe, Windows). - But don't alter the init file if Emacs was invoked as "emacs -q" - -2002-02-01 Stefan Monnier - - * mail/sendmail.el (mail-mode): Undo half of last change. - - * indent.el (indent-for-tab-command): Remove spurious code. - - * hi-lock.el (hi-lock-find-patterns): Save restriction. - -2002-02-01 Eli Zaretskii - - * calendar/time-date.el: Moved from lisp/gnus. - - * calendar/parse-time.el: Ditto. - -2002-01-31 Richard M. Stallman - - * international/iso-acc.el (iso-languages): Fix ", " in French. - - * cus-start.el (history-length): Specify customization for it. - - * emacs-lisp/debug.el (debugger-setup-buffer): - When an eval-buffer frame was reading from a buffer, - insert indication of the buffer position. - (debugger-frame-number): Ignore ;;;-comment lines in backtrace. - (debugger-frame-clear, debugger-frame): Error on non-frame line. - - * simple.el (shell-command-on-region): Err if no mark - before reading the command string. - - * hl-line.el (hl-line-highlight, hl-line-unhighlight): - Definitions moved down after hl-line-mode var's definition. - - * hilit-chg.el (hilit-chg-fixup): Don't alter overlay if not ours. - (hilit-chg-set-face-on-change): Rename arg. - (hilit-chg-make-ov): Detect error earlier. - - * ediff-hook.el: Delete autoload cookies. - - * comint.el (comint-scroll-show-maximum-output): Default is t. - - * emacs-lisp/bytecomp.el (batch-byte-compile): New arg noforce. - (batch-byte-compile-if-not-done): New function. - - * Makefile.in (compile): New target. - (compile-always): Renamed from compile-files. - (compile-after-backup): Renamed from compile. - (bootstrap): Depend on compile-always, not compile-files. - - * emulation/pc-select.el (pc-select-save-and-set-mode): - Properly use MODE-VAR. - -2002-01-29 Pavel Jan,Am(Bk - - * menu-bar.el (menu-bar-help-menu): Change menu-item "Show Emacs - Version" to "About Emacs". - (menu-bar-options-save): Add `default-frame-alist' - to saved variables. - (menu-bar-showhide-scroll-bar-menu): Use frame-parameters instead - of the variable `scroll-bar-mode'. - - * startup.el (normal-splash-screen, display-splash-screen): - New functions (separated from command-line-1). - (command-line-1): Use them. - -2002-01-28 Eli Zaretskii - - * calendar/calendar.el (generate-calendar-month): Doc fix. - -2002-01-27 Pavel Jan,Am(Bk - - * time.el (display-time-mail-directory): New option. - (display-time-mail-function): Update doc-string. - (display-time-mail-icon): Use XPM image when available. - (display-time-string-forms): Use more descriptive text as - help-echo property. - (display-time-mail-check-directory): New function. - (display-time-update): Use it. - - * menu-bar.el (menu-bar-showhide-scroll-bar-menu): - Quote `window-system'. - - * tmm.el (tmm-get-keymap): Honour :visible in `menu-item'. - Add Keywords header. Update Commentary section. - Update copyright notice. - - * menu-bar.el (menu-bar-scroll-bar-right) - (menu-bar-scroll-bar-left, menu-bar-scroll-bar-none) - (showhide-menu-bar): New functions. - (menu-bar-showhide-menu): New submenu "Show/Hide". - (menu-bar-showhide-scroll-bar-menu): "Scroll-bar" submenu of - "Show/Hide". - Update copyright notice. - -2002-01-27 Eli Zaretskii - - * lazy-lock.el (lazy-lock-mode): Add a reference to jit-lock. - -2002-01-26 Evgeny Roubinchtein - - * pc-select.el (pc-selection-mode-hook) - (pc-select-saved-settings-alist, pc-select-map) - (pc-select-saved-global-map, pc-select-key-bindings-alist) - (pc-select-default-key-bindings, pc-select-extra-key-bindings) - (pc-select-meta-moves-sexps-key-bindings) - (pc-select-tty-key-bindings, pc-select-old-M-delete-binding): - New variables. - (pc-select-define-keys, pc-select-restore-keys): New functions. - (pc-select-add-to-alist, pc-select-save-and-set-var) - (pc-select-save-and-set-mode, pc-select-restore-var) - (pc-select-restore-mode): New macros. - (pc-selection-mode): Completely rewrote the body of the function; - the main goal was to make pc-selection-mode "turn-off"-able, like - other minor modes. Use define-minore-mode instead of just a - defun. Store the key bindings into four alists: - pc-select-default-key-bindings, pc-select-extra-key-bindings, - pc-select-meta-moves-sexps-key-bindings, and - pc-select-tty-key-bindings; then have the pc-select-define-keys - function walk those alists instead of calling define-key - repeatedly. When the mode is turned on, set the - keybindings in global-map and remember the old keybindings; when - the mode is turned off, restore the previously-saved keybindings. - (pc-selection-mode defcustom): Reflect the fact that the mode is - now "turn-off"-able. - -2002-01-26 Eli Zaretskii - - * eshell/esh-cmd.el (eshell-eval-command): If eshell-resume-eval - returns t, don't treat that as an error. - -2002-01-25 Jason Rumney - - * faces.el (face-font-registry-alternatives) [windows-nt]: - Add ms-oemlatin as an alternative for iso8859-1. - -2002-01-25 Stefan Monnier - - * pcvs.el (cvs-reread-cvsrc): Distinguish between an empty list of - args and the absence of an entry. Don't add -f each time. - -2002-01-25 Eli Zaretskii - - * emacs-lisp/cl-seq.el (mismatch): Doc fix. - - Support for more than 8 colors on character terminals: - - * term/rxvt.el: New file. - - * Makefile.in (DONTCOMPILE): Remove term/xterm.el. - - * term/xterm.el (xterm-standard-colors): New variable. - (xterm-rgb-convert-to-16bit, xterm-register-default-colors) - (xterm-rxvt-set-background-mode): New functions. - (toplevel): Call xterm-register-default-colors, - xterm-rxvt-set-background-mode, and tty-set-up-initial-frame-faces. - Add support for more keys from xterm's terminfo entry. - - * facemenu.el (list-colors-display): If the argument is nil, don't - show more colors that the number returned by display-color-cells. - - * term/pc-win.el (msdos-color-values): Reverse the order of the - colors, since tty-color-define now preserves the registration order. - - * w32-fns.el (w32-tty-standard-colors): Reverse the order. - - * term/tty-colors.el (tty-standard-colors): Reverse the order. - (tty-register-default-colors): New function; code moved from - startup.el's command-line. - (tty-modify-color-alist): Use nconc instead of cons, to preserve - the order the colors where registered. - - * frame.el (display-color-cells): Use tty-display-color-cells. - - * startup.el (command-line): Call tty-register-default-colors. - -2002-01-25 Richard M. Stallman - - * subr.el (remove): Doc fix. - -2002-01-24 Richard M. Stallman - - * progmodes/compile.el (compilation-handle-exit): - Add a compilation-handle-exit property to the "finished" message. - (compilation-parse-errors): Stop parsing when that property is seen. - - * subr.el (substring-no-properties): New function. - (copy-without-properties): Function deleted. - - * term/x-win.el (x-handle-geometry): Put sizes on both - initial-frame-alist and default-frame-alist. - - * cus-edit.el (custom-save-all): Bind file-precious-flag to t - for saving .emacs. - - * files.el (basic-save-buffer-2): Ignore file-error in delete-file. - - * calendar/calendar.el (generate-calendar-month): Doc fix. - -2002-01-23 Richard M. Stallman - - * play/tetris.el (tetris): New defgroup. - (tetris-use-glyphs, tetris-use-color, tetris-draw-border-with-glyphs) - (tetris-default-tick-period): Convert to defcustom. - Added * in docstring to indicate user variable. - (tetris-update-speed-function, tetris-mode-hook, tetris-tty-colors) - (tetris-x-colors, tetris-buffer-name, tetris-buffer-width) - (tetris-buffer-height, tetris-width, tetris-height) - (tetris-top-left-x, tetris-top-left-y): Convert to defcustom. - -2002-01-22 Stefan Monnier - - * mail/sendmail.el (mail-mode): ">" is not a supercite-style prefix - and is already matched by adaptive-fill-regexp. - -2002-01-22 Richard M. Stallman - - * bindings.el (mode-line-copied-mode-name): New variable. - (mode-line-mode-name): Don't modify mode-name itself! - Instead, make a copy and reuse it. - - * subr.el (copy-without-properties): New function. - - * progmodes/sh-script.el (sh-set-shell): Doc fix. - - * net/ange-ftp.el (ange-ftp-canonize-filename): Avoid duplicate - slash if DIR is just slash. - - * progmodes/perl-mode.el (perl-mode-abbrev-table): Restore definition. - -2002-01-21 Richard M. Stallman - - * emacs-lisp/copyright.el (copyright-regexp): Fix previous change. - - * net/ange-ftp.el (ange-ftp-bs2000-posix-hook-installed): - Move defvar up. - - * textmodes/ispell.el (ispell-help): Clean up echo area if user quits. - - * ibuffer.el: Don't require ibuf-ext at load time. - (ibuffer): Require ibuf-ext here. - -2002-01-21 Francesco Potort,Al(B - - * generic-x.el (apache-conf-generic-mode): Highlight the first - word in a line even if preceded by blanks. - -2002-01-21 Richard M. Stallman - - * window.el (window-body-height): Handle minibuffer window specially. - Otherwise, don't return less than 1. - -2002-01-20 Thomas Dorner - - * ange-ftp.el: Added support for BS2000, and for raw ftp - login commands (needed in some circumstances). - (ange-ftp-raw-login): New custom var. - (ange-ftp-normal-login): Perform login with raw ftp commands, if - ange-ftp-raw-login is set and account password is needed. - (ange-ftp-host-type, ange-ftp-guess-host-type): Handle BS2000 hosts. - (ange-ftp-bs2000-filename-pubset-regexp) - (ange-ftp-bs2000-filename-username-regexp) - (ange-ftp-bs2000-filename-prefix-regexp) - (ange-ftp-bs2000-name-template): New consts. - (ange-ftp-bs2000-short-filename-regexp) - (ange-ftp-bs2000-fix-name-regexp-reverse) - (ange-ftp-bs2000-fix-name-regexp): New consts. - (ange-ftp-bs2000-special-prefix): New custom var. - (ange-ftp-fix-name-for-bs2000) - (ange-ftp-fix-dir-name-for-bs2000): New funs. - (ange-ftp-bs2000-host-regexp, ange-ftp-bs2000-posix-host-regexp) - (ange-ftp-bs2000-posix-hook-installed): New vars. - (ange-ftp-parse-bs2000-filename, ange-ftp-parse-bs2000-listing) - (ange-ftp-bs2000-host, ange-ftp-bs2000-posix-host) - (ange-ftp-add-bs2000-host, ange-ftp-add-bs2000-posix-host): New funs. - (ange-ftp-bs2000-filename-regexp): New const. - (ange-ftp-bs2000-additional-pubsets): New custom var. - (ange-ftp-bs2000-cd-to-posix): New fun. - -2002-01-20 Colin Walters - - * ibuffer.el: (toplevel) Require `ibuf-ext', which is now compiled - with `byte-compile-dynamic'. - (ibuffer-default-directory, toplevel): Doc files. - -2002-01-20 Pavel Jan,Am(Bk - - * tempo.el (tempo-define-template): Doc fix. - - * scroll-bar.el (scroll-bar-mode): Make argument optional. - -2002-01-20 Jason Rumney - - * w32-vars.el: New file. - - * loadup.el [windows-nt]: Load it. - - * w32-fns.el, term/w32-win.el: Move user variables to w32-vars.el - and make them defcustoms. - - * term/w32-win.el (mouse-set-font): Use w32-list-proportional-fonts. - -2002-01-19 Pavel Jan,Am(Bk - - * language/tibet-util.el (tibetan-decompose-region) - (tibetan-decompose-string): Fix typo in docstring. - - * ruler-mode.el (ruler-mode): New keyword. Fix :version. - -2002-01-18 Richard M. Stallman - - * comint.el (comint-redirect-send-command-to-process): - Restore previous current buffer. - - * window.el (window-body-height): New function. - -2002-01-18 Zoltan Kemenczy - - * gud.el (easy-mmode-defmap): Enable "Up Stack", "Down Stack", and - "Finish Function" menu map entries for jdb mode. - (gud-jdb-use-classpath): New customization variable. - (gud-jdb-command-name): Add customization. - (gud-jdb-classpath, gud-marker-acc-max-length): New variables. - (gud-jdb-classpath-string): New variable. - (gud-jdb-source-files, gud-jdb-class-source-alist): Add doc strings. - (gud-jdb-build-source-files-list): Likewise. - (gud-jdb-massage-args): Record any command argument classpath - string in `gud-jdb-classpath-string'. - (gud-jdb-lowest-stack-level): New function, finds bottom of current - java call stack in jdb output. - (gud-jdb-find-source-using-classpath, gud-jdb-find-source) - (gud-jdb-parse-classpath-string): New functions. - (gud-jdb-marker-filter): Search/detect classpath information in - jdb's output. marker regexp updated to match oldjdb and jdb output - formats. Expand search for source files to include new/old methods - using new functions above. Do not allow `gud-marker-acc' to grow - without bound. - (jdb): Set classpath information (if available) as jdb is started. - Change `gud-break' and `gud-remove' - to use new %c ("class") escape in format strings. - Add `gud-finish', `gud-up', `gud-down' command string functions, and - add them to the local menu map. Update `comint-prompt-regexp' for - jdb and oldjdb. If attaching to an already running java VM and - configured to use classpath, send command to query for classpath, - else use previous method for finding and parsing java - sources. Set `gud-jdb-find-source' function accordingly. - (gud-mode): Doc fix. - (gud-format-command): Add support for new %c ("class") escape. - (gud-find-class): New function in support of %c escape. - -2002-01-17 Richard M. Stallman - - * ibuf-ext.el: Enable byte-compile-dynamic. - -2002-01-17 Jason Rumney - - * term/w32-win.el: Restore conditional require of fontset. - -2002-01-16 Richard M. Stallman - - * mouse.el (mouse-drag-region-1): Renamed from mouse-drag-region, - more or less. - (mouse-drag-region): New function. For a click in the echo area, - show *Messages*. - - * ibuf-ext.el: Delete the autoloads for functions defined with - ibuffer-specific commands. - - * help.el (describe-distribution): Really call view-file. - - * net/ange-ftp.el (ange-ftp-passive-mode): New arg PROC. - (ange-ftp-get-process): Pass that arg. - - * comint.el (comint-simple-send): Fix previous change. - - * net/telnet.el (telnet-simple-send): Fix previous change. - - * progmodes/sql.el (sql-escape-newlines-and-send) - (sql-query-placeholders-and-send): Fix previous change. - -2002-01-16 Colin Walters - - * ibuf-ext.el, ibuf-macs.el, ibuffer.el (toplevel): Remove X-RCS, - URL, Compatibility headers. Update copyright notice. - * ibuf-macs.el (toplevel): Require `cl' when compiling. - -2002-01-16 Andrew Choi - - * startup.el (command-line): Set EOL mnemonics for the Mac. - -2002-01-16 Andreas Schwab - - * mail/feedmail.el (feedmail): Fix :link spec. - -2002-01-16 Pavel Jan,Am(Bk - - * net/ldap.el (ldap-ldapsearch-prog): Default to OpenLDAP version - 2 ldapsearch. - - * net/eudc.el: New maintainer. Change author's address. - (eudc-pre-select-window-configuration, eudc-insertion-marker): - Variables removed. - (eudc-insert-selected): Function removed. - (eudc-select): Reimplemented. - (eudc-expand-inline): Delete the strings only after its expansion - is chosen not before. - - * net/eudcb-ph.el (eudc-ph-open-session): Remove XEmacs case. - Minor coding style fixes. - - * net/eudcb-ldap.el: New maintainer. Change author's address. - (eudc-attribute-display-method-alist): Display mail with - eudc-display-mail. - - * net/eudcb-bbdb.el, net/eudc-export.el, net/eudc-hotlist.el, - * net/eudc-vars.el: New maintainer. Change author's address. - - * net/eudc-bob.el: New maintainer. Change author's address. - (eudc-bob-mail-keymap): New keymap for e-mail addresses. - (eudc-display-mail): New function. - (eudc-bob-play-sound-at-point): Remove XEmacs case. - -2002-01-15 Richard M. Stallman - - * emacs-lisp/autoload.el (make-autoload): - Don't handle define-ibuffer-column, define-ibuffer-filter, - define-ibuffer-sorter, and define-ibuffer-op. - -2002-01-14 Richard M. Stallman - - * calendar/calendar.el (diary-date-forms): Doc fix. - -2002-01-14 Eli Zaretskii - - * startup.el (command-line): Register the default tty colors even - if the terminal doesn't seem to support colors. - : New option --color. - (tty-handle-args): Parse the --color arg. - - * term/tty-colors.el (tty-color-mode-alist): New variable. - -2002-01-14 Stefan Monnier - - * net/ange-ftp.el (ange-ftp-root-dir-p): New function. - (ange-ftp-file-name-all-completions, ange-ftp-file-name-completion): - Use it. - (ange-ftp-hook-function): Preserve match-data. - (ange-ftp-insert-directory): Typo. - (ange-ftp-shell-command): Check if regexp matched. - -2002-01-13 Richard M. Stallman - - * international/mule-cmds.el: help-map bindings moved to help.el. - - * help.el (view-echo-area-messages): New function. - (help-map): Add `e' binding. Delete obsolete `d' binding. - Change old Info bindings C-f, C-k and C-i to F, K, S. - Move view-emacs-FAQ from F to C-f. - Move view-emacs-problems from P to C-e. - Bindings moved here from mule-cmds.el. - C-l binding for describe-language-environment deleted - (help-for-help): Update for all these changes. - - * emacs-lisp/copyright.el (copyright-regexp): Make (C) optional. - -2002-01-13 Dave Love - - * emacs-lisp/copyright.el: Doc fixes. - (copyright-regexp): Add Latin-9 copyright sign. - Match comment delimiters in year lists. - (copyright-current-year): Initialize to load-time year. - -2002-01-13 Andreas Schwab - - * dired-aux.el (dired-do-shell-command): Doc fix. - -2002-01-13 Jan Dj,Ad(Brv - - * startup.el (command-line-x-option-alist): New options "-fs", - "-fw", "-fh", "--fullscreen", "--fullwidth", and "--fullheight". - - * term/x-win.el (x-handle-initial-switch): New function. - -2002-01-13 Colin Walters - - * emacs-lisp/autoload.el (make-autoload): Handle define-ibuffer-column, - define-ibuffer-filter, define-ibuffer-sorter, and define-ibuffer-op. - - * emacs-lisp/lisp-mode.el (toplevel): Ditto. - - * ibuffer.el, ibuf-ext.el, ibuf-macs.el: New files. - -2002-01-12 Richard M. Stallman - - * net/browse-url.el (browse-url-grail): - Use browse-url-maybe-new-window. - - * net/telnet.el (telnet-simple-send): - Handle comint-input-sender-no-newline like comint-simple-send. - - * progmodes/sql.el (sql-query-placeholders-and-send): - Handle comint-input-sender-no-newline like comint-simple-send. - (sql-escape-newlines-and-send): Likewise. - - * comint.el (comint-input-sender): Doc fix. - (comint-input-sender-no-newline): New variable. - (comint-simple-send): If comint-input-sender-no-newline, - don't output newline, but maybe send eof. - (comint-send-input): New arg NO-NEWLINE. - (comint-send-eof): Call comint-send-eof with NO-NEWLINE. - -2002-01-12 Pavel Jan,Am(Bk - - * textmodes/flyspell.el (flyspell-check-pre-word-p): - Prevent delaying when executing keyboard macros. - -2002-01-12 Richard M. Stallman - - * simple.el (line-move): If we can't move enough lines, - go to beginning or end of line. - - * help-mode.el (help-xref-go-back): Restore POSITION in proper buffer - and proper window. - - * help.el (describe-mode): Call help-setup-xref in the help buffer. - Switch buffers only after calling `help-buffer'. - - * dired-aux.el (dired-shell-stuff-it): Substitute for * or ? - only when they are surrounded by whitespace. - Use dired-mark-separator when adding one file name to a command. - (dired-do-shell-command): Verify that * is surrounded by whitespace. - Ask for confirmation if * or ? is not surrounded by whitespace. - (dired-bunch-files): Re-reverse the partial file list when it is used. - -2002-01-12 Richard M. Stallman - - * comint.el (comint-dynamic-list-completions): Repeating the command - after displaying a completion list scrolls the list. - -2002-01-12 Eli Zaretskii - - * files.el (find-file-noselect): Don't consider a buffer as - visiting a file literally if it is in hexl-mode. - - * faces.el (minibuffer-prompt): A better face definition for MS-DOS. - -2002-01-11 Richard M. Stallman - - * startup.el (initial-scratch-message): Fix custom type, add group. - - * mail/rmail.el (rmail-decode-babyl-format): Disable undo - around the decode-coding-region call. - - * emacs-lisp/lisp.el (lisp-complete-symbol): Repeating the command - after displaying a completion list scrolls the list. - -2002-01-11 Eli Zaretskii - - * version.el (emacs-version): Bump to 21.2.50. - -2002-01-10 Thien-Thi Nguyen - - * play/zone.el (zone-timeout): New var. - (zone-hiding-modeline): New macro. - (zone-call): New func. - - (zone): Init `modeline-hidden-level' symbol property. - Use `zone-call' instead of `funcall'. - - (zone-pgm-whack-chars): Use `make-string' (fix bug introduced in 2001-10-26T20:11:25Z!monnier@iro.umontreal.ca). - - (zone-pgm-stress): Use `zone-hiding-modeline'. - - (zone-pgm-stress-destress): New zone program. - -2002-01-10 Eli Zaretskii - - * faces.el (minibuffer-prompt): Special face definition for MS-DOS. - -2002-01-09 Richard M. Stallman - - * startup.el (fancy-splash-screens): Set tab-width in correct buffer. - -2002-01-09 Michael Kifer - - * viper.el (viper-set-hooks): Zap viper-unfriendly bindings in - flyspell-mouse-map. - -2002-01-08 Richard M. Stallman - - * emacs-lisp/regexp-opt.el (regexp-opt): Bind max-specpdl-size. - - * emacs-lisp/eldoc.el (eldoc-minor-mode-string): Fix custom type. - - * textmodes/flyspell.el (flyspell-mode-line-string): Fix custom type. - -2002-01-08 Pavel Jan,Am(Bk - - * progmodes/ada-mode.el (ada-initialize-properties, ada-mode): - Do not use make-local-hook. - -2002-01-08 Eli Zaretskii - - * international/quail.el (quail-start-translation) - (quail-start-conversion): Bind last-command-event, last-command, - and this-command in the first let. This fixes the change from - 2000-08-30. - -2002-01-08 Michael Kifer - - * ediff-hook.el: Add an autoload cookie. - -2002-01-08 Pavel Jan,Am(Bk - - * net/eudcb-ph.el, net/ldap.el: New maintainer. New e-mail - address of the author. - -2002-01-08 Richard M. Stallman - - * replace.el (occur-mode-goto-occurrence-other-window): New command. - (occur-mode-map): Bind `o' to that. - -2002-01-07 Michael Kifer - - * viper-init.el (viper-cond-compile-for-xemacs-or-emacs): - new macro that replaces viper-emacs-p and viper-xemacs-p in many - cases. Used to reduce the number of warnings. - - * viper-cmd.el: Use viper-cond-compile-for-xemacs-or-emacs. - (viper-standard-value): Move here from viper.el. - (viper-set-unread-command-events): Move to viper-util.el - (viper-check-minibuffer-overlay): Make sure - viper-minibuffer-overlay is moved to cover the entire input field. - - * viper-util.el: Use viper-cond-compile-for-xemacs-or-emacs. - (viper-read-key-sequence, viper-set-unread-command-events) - (viper-char-symbol-sequence-p, viper-char-array-p): Moved here. - - * viper-ex.el: Use viper-cond-compile-for-xemacs-or-emacs. - - * viper-keym.el: Use viper-cond-compile-for-xemacs-or-emacs. - - * viper-mous.el: Use viper-cond-compile-for-xemacs-or-emacs. - - * viper-macs.el (viper-char-array-p, viper-char-symbol-sequence-p) - (viper-event-vector-p): Move to viper-util.el - - * viper.el (viper-standard-value): Move to viper-cmd.el. - Use viper-cond-compile-for-xemacs-or-emacs. - - * ediff-help.el: Use ediff-cond-compile-for-xemacs-or-emacs. - - * ediff-hook.el: Use ediff-cond-compile-for-xemacs-or-emacs. - - * ediff-init.el (ediff-cond-compile-for-xemacs-or-emacs): - New macro designed to be used in many places where ediff-emacs-p or - ediff-xemacs-p was previously used. Reduces the number of warnings. - Use ediff-cond-compile-for-xemacs-or-emacs in many places in lieu - of ediff-xemacs-p. - (ediff-make-current-diff-overlay, ediff-highlight-diff-in-one-buffer) - (ediff-convert-fine-diffs-to-overlays, ediff-empty-diff-region-p) - (ediff-whitespace-diff-region-p, ediff-get-region-contents): - Move to ediff-util.el. - (ediff-event-key): Moved here. - - * ediff-merge.el: Got rid of unreferenced variables. - - * ediff-mult.el: Use ediff-cond-compile-for-xemacs-or-emacs. - - * ediff-util.el: Use ediff-cond-compile-for-xemacs-or-emacs. - (ediff-cleanup-mess): Improve the way windows are set up after - quitting ediff. - (ediff-janitor): Use ediff-dispose-of-variant-according-to-user. - (ediff-dispose-of-variant-according-to-user): New function - designed to be smarter and also understands indirect buffers. - (ediff-highlight-diff-in-one-buffer) - (ediff-unhighlight-diff-in-one-buffer) - (ediff-unhighlight-diffs-totally-in-one-buffer) - (ediff-highlight-diff, ediff-highlight-diff) - (ediff-unhighlight-diff, ediff-unhighlight-diffs-totally) - (ediff-empty-diff-region-p, ediff-whitespace-diff-region-p) - (ediff-get-region-contents, ediff-make-current-diff-overlay): - Moved here. - (ediff-format-bindings-of): New function by Hannu Koivisto - . - (ediff-setup): Make sure the merge buffer is always widened and - modifiable. - (ediff-write-merge-buffer-and-maybe-kill): Refuse to write the - result of a merge into a file visited by another buffer. - (ediff-arrange-autosave-in-merge-jobs): Check if the merge file - is visited by another buffer and ask to save/delete that buffer. - (ediff-verify-file-merge-buffer): New function to do the above. - - * ediff-vers.el: Load ediff-init.el at compile time. - - * ediff-wind.el: Use ediff-cond-compile-for-xemacs-or-emacs. - - * ediff.el (ediff-windows, ediff-regions-wordwise) - (ediff-regions-linewise): Use indirect buffers to improve - robustness and make it possible to compare regions of the same - buffer (even overlapping regions). - (ediff-clone-buffer-for-region-comparison) - (ediff-clone-buffer-for-window-comparison): New functions. - (ediff-files-internal): Refuse to compare identical files. - (ediff-regions-internal): Get rid of the warning about comparing - regions of the same buffer. - - * ediff-diff.el (ediff-convert-fine-diffs-to-overlays): Moved here. - Plus the following fixes courtesy of Dave Love: Doc fixes. - (ediff-word-1): Use word class and move - to the - front per regexp documentation. - (ediff-wordify): Bind forward-word-function outside loop. - (ediff-copy-to-buffer): Use insert-buffer-substring rather than - consing buffer contents. - (ediff-goto-word): Move syntax table setting outside loop. - -2002-01-07 Richard M. Stallman - - * dired.el (dired-copy-filename-as-kill): Call kill-append - if following a kill command. - - * help-fns.el (describe-variable, describe-function): - Do save-excursion. - -2002-01-06 Pavel Jan,Am(Bk - - * net/ldap.el (ldap-search-internal): Skip error message from - ldapsearch. Allow listing attribute names only. Do not open - non-existent files. - - * net/eudcb-ldap.el (eudc-ldap-get-field-list): Do not try to - call non-existent function. - - * net/eudc.el (top-level): Revert previous change. - - * net/net-utils.el (nslookup-font-lock-keywords): Defvar font-lock - variables to prevent warning from byte-compiler. - - * net/eudc.el (top-level): Use eudc-xemacs-p instead of - string-match on emacs-version again. - - * enriched.el (enriched-make-annotation): Fix the change from - 2002-01-05. - (enriched-handle-display-prop): Return proper values. - - * net/eudcb-ldap.el (eudc-attribute-display-method-alist): - Use proper attribute name labeledUri instead of deprecated labeledUrl. - -2002-01-05 Pavel Jan,Am(Bk - - * net/eudc-hotlist.el (eudc-edit-hotlist): Avoid error when - editing an empty hotlist. - - * net/ldap.el (ldap-search-internal): Make the buffer unibyte. - Use buffer-string instead of buffer-substring for the whole buffer. - - * net/eudc-vars.el (eudc-external-viewers): Do not use xv, it is - not free. - - * net/eudc-bob.el (eudc-bob-can-display-inline-images) - (eudc-bob-display-jpeg): Use fboundp instead of boundp. - (eudc-bob-save-object): Make the buffer unibyte. - (eudc-bob-generic-keymap): Add new keybinding `!' to pipe the - object to external program. - -2002-01-05 Andre Spiegel - - * vc.el (vc-branch-part): Return nil if there's no `.' - (vc-default-previous-version): Renamed from vc-previous-version. - New args BACKEND and FILE. Return nil for revision numbers - without a `.' - (vc-version-diff): Call vc-BACKEND-previous-version. - (vc-steal-lock): Steal lock before composing mail, so that no mail - is sent when the stealing goes wrong. And we'll actually see the - error in that case now. - (vc-finish-steal): Removed. - - * vc-rcs.el (vc-rcs-steal-lock): Do a real checkout after stealing - the lock, so that we see expanded headers. - (vc-rcs-trunk-p, vc-rcs-branch-part, vc-rcs-branch-p) - (vc-rcs-minor-part, vc-rcs-previous-version): Removed. These are - available from vc.el. Updated all callers. - -2002-01-05 Richard M. Stallman - - * enriched.el (enriched-make-annotation): Doc fix. - - * format.el (format-replace-strings, format-subtract-regions) - (format-annotate-region, format-annotate-location) - (format-annotate-atomic-property-change) - (format-annotate-single-property-change): Doc fixes. - -2002-01-05 Jason Rumney - - * term/w32-win.el: Require fontset unconditionally. - (w32-handle-scroll-bar-event): Remove. - -2002-01-04 Lars Magne Ingebrigtsen - - * emacs-lisp/copyright.el (copyright-regexp): Allow multi-line - copyrights to be updated. - -2002-01-04 Eli Zaretskii - - * textmodes/texinfo.el (texinfo-insert-@end): Fix the change from - 2001-10-24. - - * mail/sendmail.el (mail-recover-1, mail-recover): Doc fix. - -2002-01-04 Pavel Jan,Am(Bk - - * net/ldap.el (ldap-host-parameters-alist): Remove duplicated entry. - (ldap-ignore-attribute-codings): Change the default value to allow - encoding/decoding of attributes. - (ldap-coding-system): Use UTF-8 as the coding-system. Doc fix. - -2002-01-03 Richard M. Stallman - - * files.el (basic-save-buffer): Undo previous change. - - * calendar/diary-lib.el (diary-block): Doc fix. - - * custom.el (defcustom): Fix syntax of previous change. - -2002-01-03 Per Abrahamsen - - * custom.el (defcustom): Documented :tag, :link and :load. - -2002-01-03 Eli Zaretskii - - * mail/sendmail.el (mail-recover-1): New function. - (mail-recover): Switch to the *mail* buffer right away. - Use buffer-auto-save-file-name instead of calling - make-auto-save-file-name. Call dired-noselect instead of invoking - `ls' directly. Bind coding-system-for-read to emacs-mule-unix - before reading the auto-save file. If the buffer's auto-save file - does not exist, call mail-recover-1 to allow recovery from past - auto-saved drafts. - -2002-01-03 Pavel Jan,Am(Bk - - * time.el (display-time-load-average-threshold): Fix defcustom - (add type and group). - - * net/ange-ftp.el (ange-ftp-shell-command): Remove port - specification from the hostname. - -2002-01-02 Richard M. Stallman - - * facemenu.el (facemenu-active-faces): - Use face-attributes-as-vector, not face-attributes-vector. - -2002-01-02 Chris Hanson - - * xscheme.el: Eleven years of updates on a private copy. - - Extensive changes to support multiple xscheme buffers: - (run-scheme): Break up into new functions to facilitate starting - processes in other buffers. - (xscheme-start, xscheme-read-command-line): New functions. - (start-scheme, select-scheme) - (default-xscheme-runlight) - (global-set-scheme-interaction-buffer) - (local-set-scheme-interaction-buffer) - (local-clear-scheme-interaction-buffer) - (exit-scheme-interaction-mode) - (verify-xscheme-buffer): New functions. - (xscheme-process-name, xscheme-buffer-name) - (xscheme-runlight): New internal vars. - (default-xscheme-runlight): New const. - (xscheme-start-process): Add args for the process/buffer names. - (reset-scheme): Pass process/buffer names. - (scheme-interaction-mode): Initialize new local vars. - (reset-scheme, xscheme-send-string-2, xscheme-process-running-p) - (xscheme-select-process-buffer, xscheme-process-buffer) - (xscheme-send-region, xscheme-send-char, xscheme-send-interrupt) - (xscheme-goto-output-point, xscheme-write-message-1): Use new - var xscheme-process-name. - (xscheme-start-process): Initialize xscheme-process-name and - xscheme-buffer-name in the process buffer. Pass buffer name to - xscheme-modeline-initialize. - (xscheme-modeline-initialize): Add argument to specify buffer name - for mode-line vars. - (xscheme-process-sentinel): Make sure sentinel is run in the - process buffer so it sees its local vars. - (xscheme-process-filter-initialize, xscheme-set-runlight): - More elaborate logic to handle multiple-buffer mode lines. - - (xscheme-enter-input-wait): Re-enable control-G handler upon - entering input wait. - - (scheme-interaction-mode): Add arg to preserve local vars. - (xscheme-enter-interaction-mode) - (xscheme-enter-debugger-mode): Preserve local vars. - (xscheme-start-process): Clobber local vars. - - (scheme-interaction-mode-commands): Allow end user to add commands - to scheme-interaction-mode keymap. - (scheme-interaction-mode-commands-alist): New variable. - - (xscheme-send-string): Don't use insert-before-markers. - - Implement a per-buffer kill ring: - (xscheme-insert-expression) - (xscheme-rotate-yank-pointer, xscheme-yank) - (xscheme-yank-pop, xscheme-yank-push): New functions. - (xscheme-expressions-ring) - (xscheme-expressions-ring-yank-pointer) - (xscheme-expressions-ring-max): New variables. - (xscheme-send-string-1): Call xscheme-insert-expression to save - expression in ring. - (xscheme-yank-previous-send): Now an alias for xscheme-yank. - (xscheme-previous-send): Deleted variable. - - (xscheme-send-string-2, xscheme-send-char, xscheme-send-proceed) - (xscheme-send-control-g-interrupt): Use process-send-string rather - than send-string. - - (xscheme-send-region): Insert a newline after an expression that - is submitted in the interaction buffer, for consistency with - recent changes to Edwin. - - (xscheme-delete-output): New function mimics comint-delete-output. - (xscheme-last-input-end): New internal variable. - (xscheme-process-filter-output): Update xscheme-last-input-end. - - (xscheme-send-control-g-interrupt): Make sure that - xscheme-control-g-disabled-p is looked up in the right buffer. - - (xscheme-enable-control-g): Clear C-g message if visible. - (xscheme-control-g-message-string): New internal var. - (xscheme-send-control-g-interrupt): Use new var. - - (xscheme-send-control-g-interrupt, xscheme-send-interrupt): - Delay after sending interrupt in order to work around race condition. - - (xscheme-send-control-g-interrupt, xscheme-send-interrupt) - (xscheme-send-char): Use xscheme-send-char rather than send-string - to send single char. - - (xscheme-process-filter, xscheme-process-filter-alist): - Add support for evaluating expressions outside of the call-excursion. - (xscheme-process-filter:string-action-noexcursion): New func. - - (xscheme-write-value): Change output string to match that used by - Edwin. - - (xscheme-coerce-prompt): Don't write a space after a command - prompt. The PROMPT-FOR-COMMAND- procedures will take care of this - for us. - - (reset-scheme): Delete process after killing it. - -2002-01-02 Eli Zaretskii - - * bindings.el (function-key-map): Don't bind shifted keypad - numeric keys. - -2002-01-02 Pavel Jan,Am(Bk - - * enriched.el (enriched-handle-display-prop): Remove unused variables. - (enriched-mode): Doc fix. - -2002-01-02 Eli Zaretskii - - * international/ucs-tables.el (ucs-8859-8-alist): Comment away - Hebrew points. - -2002-01-01 Richard M. Stallman - - * jka-compr.el (jka-compr-write-region): If START = nil, use whole buf. - -2001-12-31 Richard M. Stallman - - * comint.el, cus-edit.el, diff-mode.el, enriched.el, font-lock.el: - * generic-x.el, info.el, log-view.el, pcvs-info.el, speedbar.el: - * wid-edit.el, woman.el, calendar/calendar.el, textmodes/flyspell.el: - * emulation/viper-init.el, eshell/em-ls.el, progmodes/antlr-mode.el: - * progmodes/cperl-mode.el, progmodes/idlwave.el: - * progmodes/sh-script.el, progmodes/vhdl-mode.el: - Adapt face definitions to use :weight and :slant. - - * ps-print.el (ps-font-lock-face-attributes): Use :weight and :slant. - - * cus-edit.el (custom-face-edit-fix-value): Delete `assert' call. - - * font-lock.el (initializing from font-lock-face-attributes): - Use :weight and :slant, not :bold and :italic. - -2001-12-31 Per Abrahamsen - - * cus-edit.el (custom-face-edit-fix-value): New function. - (custom-face-edit): Use it, to convert :italic and :bold to new forms. - -2001-12-30 Pavel Jan,Am(Bk - - * progmodes/octave-mod.el (octave-abbrev-table): - * progmodes/idlwave.el (idlwave-mode-abbrev-table): - * progmodes/fortran.el (fortran-mode-abbrev-table): - * progmodes/f90.el (f90-mode-abbrev-table): - * progmodes/vhdl-mode.el (vhdl-mode-abbrev-table-init): - * progmodes/sql.el (sql-mode-abbrev-table): Mark all the - predefined abbrevs as "system" abbrevs. - -2001-12-30 Richard M. Stallman - - * info.el (Info-fontify-node): For a **** underline line, put the - invisible and intangible props on the following newline, but not - on the previous newline or the last char of the previous line. - - * faces.el (face-set-after-frame-default): Don't change `default' face. - - * faces.el (minibuffer-prompt): Adopt some default colors. - - * replace.el (query-replace-read-args): Immediate error if read-only. - - * textmodes/makeinfo.el (makeinfo-compilation-sentinel): - Display the output buffer in a more intelligent way. - -2001-12-30 Eli Zaretskii - - * ls-lisp.el (insert-directory): Modify the "total" line wording, - in accordance with files.el's insert-directory. - -2001-12-29 Richard M. Stallman - - * files.el (basic-save-buffer): If a before-write hook displays - an echo area message, pause before calling basic-save-buffer-1. - -2001-12-29 Markus Rost - - * textmodes/reftex-global.el (reftex-query-replace-document) - (reftex-change-label): Doc fix. - - * dired-aux.el (dired-do-query-replace-regexp): Doc fix. - - * progmodes/etags.el (tags-query-replace): Doc fix. - -2001-12-29 Richard M. Stallman - - * progmodes/compile.el (compile-internal): Fix previous change. - -2001-12-28 Richard M. Stallman - - * mouse.el (mouse-drag-mode-line-1): When dragging a mode line upward, - shrink the windows above as necessary to get space. - (mouse-drag-move-window-bottom, mouse-drag-window-above): New fns. - - * net/ange-ftp.el (ange-ftp-allow-child-lookup): Always return nil. - This fixes a bug that treated all files as directories. - (ange-ftp-insert-directory): Explicitly follow symlinks. - - * international/iso-transl.el (iso-transl-char-map) Eliminate the - alias symbols--put the translated sequences here directly. - - * progmodes/cc-mode.el (c-mode-abbrev-table) - (c++-mode-abbrev-table, objc-mode-abbrev-table) - (java-mode-abbrev-table, pike-mode-abbrev-table): - Mark all the predefined abbrevs as "system" abbrevs. - - * mail/sendmail.el (mail-envelope-from): Fix custom type. - (sendmail-send-it): Check mail-specify-envelope-from - and mail-envelope-from in the mail buffer at start. - -2001-12-28 Simon Josefsson - - * mail/sendmail.el (mail-envelope-from): Fix :type. - (sendmail-send-it): Copy `mail-envelope-from' from calling buffer. - -2001-12-28 Richard M. Stallman - - * net/ldap.el (ldap-search-internal): Handle in results. - - * simple.el (line-move-invisible): New subroutine. - (line-move-to-column): New subroutine--smarter about advancing over - invisible parts of a line, or lines, but only as long as hpos grows. - (line-move-finish): New subroutine: repeatedly processes desired - column, intangibility, and fields. - (line-move): Use those subroutines. - When moving lines downward, skip invisible text first rather than last. - -2001-12-27 Richard M. Stallman - - * international/mule-diag.el (describe-char-after): - Describe the text properties of the char after point. - - * help.el (describe-key): Doc fix. - -2001-12-26 Markus Rost - - * find-dired.el (find-dired-sentinel): Precede exit message by - two spaces, to match the regexp in dired-between-files. - -2001-12-28 Miles Bader - - * wid-edit.el (widget-toggle-value-create): Don't eval actual - images (which are lists too). - -2001-12-27 Eli Zaretskii - - * language/european.el: Fix the doc string of "Latin-5" language - environment. - -2001-12-26 Richard M. Stallman - - * textmodes/flyspell.el (flyspell-mode-map): New keymap, - defined as before 2001-11-09. - (add-minor-mode call): Specify the keymap. - - * progmodes/compile.el (compile-internal): - Set TERM variable in process-environment. - -2001-12-25 Richard M. Stallman - - * help-mode.el (help-xref-on-pp): Catch and ignore errors in scanning - the buffer. - - * startup.el (command-line): Convert command line args - to Emacs internal representation using locale-coding-system. - -2001-12-25 Eli Zaretskii - - * international/fontset.el: Don't require ind-util when compiling. - -2001-12-25 Pavel Jan,Am(Bk - - * emulation/tpu-edt.el (tpu-reset-screen-size): - Use set-frame-height and set-frame-width instead of set-screen-height - and set-screen-width. - - * vt-control.el (vt-wide, vt-narrow): Use set-frame-width instead - of obsolete set-screen-width. - - * locate.el (locate): Remove dot at the end of error argument. - - * emerge.el (emerge-show-file-name): Use frame-height instead of - obsolete screen-height. - - * mail/mh-utils.el (mh-show-msg): Likewise. - (mh-handle-process-error): Use frame-width instead of obsolete - screen-width. - -2001-12-25 Richard M. Stallman - - * window.el (balance-windows): Use new PRESERVE-BEFORE arg - to enlarge-window. Use save-selected-window. Don't try - to resize windows that end at the bottom "level". - Retry changing the sizes until the windows get the desired sizes. - Discount the minibuffer when computing total height available. - - * emacs-lisp/debug.el (debugger-mode-map): Bind C-m, not `RET'. - (debugger-make-xrefs): Only make a button for the first symbol - on any line. - -2001-12-24 Eli Zaretskii - - * term/internal.el (dos-cpNNN-setup, dos-codepage-setup): - Call IT-setup-unicode-display here instead of adding it to - dos-codepage-setup-hook, so that Unicode display tables are set - before dos-codepage-setup-hook runs. - -2001-12-24 Richard M. Stallman - - * net/net-utils.el (ftp-mode-abbrev-table): Don't define it. - (nslookup-mode-abbrev-table): Don't define it. - (smbclient-mode-abbrev-table): Don't define it. - (ftp-mode): Don't use ftp-mode-abbrev-table; don't enable Abbrev mode. - (nslookup-mode, smbclient-mode): Likewise. - (network-connection-service-abbrev-alist): Variable deleted. - (network-connection-mode-setup): Don't set up abbrev table. - - * faces.el (minibuffer-prompt): New face. - (minibuffer-prompt-properties): Add `face' property. - - * replace.el (occur-mode-display-occurrence): New function. - (occur-mode-map): Bind C-o to it. - -2001-12-24 Michael Kifer - - * viper-cmd.el (viper-change-state): Got rid of make-local-hook. - (viper-special-read-and-insert-char): Make C-m work right in the r - comand. - (viper-buffer-search-enable): Fixed format string. - - * viper-ex.el (ex-token-alist): Use ex-set-visited-file-name - instead of viper-info-on-file. - (ex-set-visited-file-name): New function. - - * viper.el (viper-emacs-state-mode-list): Added mail-mode. - - * ediff-mult.el (ediff-meta-mark-equal-files): Added optional - action argument. - - * ediff-init.el: Fixed some doc strings. - - * ediff-util.el (ediff-after-quit-hook-internal): New variable. - Got rid of make-local-hook. - - * ediff-wind.el (ediff-setup-control-frame): Got rid of - make-local-hook. - -2001-12-23 Richard M. Stallman - - * term/x-win.el (x-handle-geometry): Put height and width - on default-frame-alist, left and top on initial-frame-alist. - * term/w32-win.el (x-handle-geometry): Likewise. - - * sort.el (sort-reorder-buffer): Copy all to a temp buffer first. - - * play/yow.el (yow): Use an arg to distinguish interactive calls, - not interactive-p. - -2001-12-22 Pavel Jan,Am(Bk - - * emacs-lisp/elint.el (elint-unknown-builtin-args): - Remove mocklisp entries. - - * subr.el (insert-string): Moved from mocklisp.c, reimplemented in - Lisp. Obsoleted. - - * emulation/mlconvert.el: File removed. - - * emulation/mlsupport.el: Moved to obsolete. - - * obsolete/mlsupport.el: Moved there from lisp/emulation. - - * emacs-lisp/find-gc.el (source-files): Remove mocklisp.c. - - * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): - Remove mocklisp case. - - * help-fns.el (describe-function-1): Remove mocklisp function case. - -2001-12-22 Miles Bader - - * textmodes/refill.el (refill-mode): Don't barf when redundantly - turning refill-mode off. - -2001-12-22 Pavel Jan,Am(Bk - - * time.el (display-time-load-average-threshold): New variable. - (display-time-update): Use it. - - These changes allow cycling through past 1, 5 and 15 minutes - load-average displayed in the mode-line. - - * time.el (display-time-default-load-average): New customizable option. - (display-time-load-average): New variable. - (display-time-cycle-load-average): New function. - (display-time-update): Use them. - -2001-12-21 Richard M. Stallman - - * apropos.el (apropos-print): SPACING is now nil or a separator string. - (apropos-documentation, apropos-value): Pass a suitable string. - -2001-12-21 Eli Zaretskii - - * dired.el (dired-free-space-program, dired-free-space-args): - Aliases for back-compatibility. - - * info.el (Info-select-node): If Info-use-header-line is nil, set - header-line-format to nil. - (Info-fontify-node): Don't put a keymap text property on the - heading if we are not going to display the header line. Remove - any such text properties left over from past visits to this node. - - * ls-lisp.el (insert-directory): Insert the amount of free disk - space, like files.el's insert-directory does. - - * files.el (directory-free-space-program): - Mention file-system-info in the doc string. - (get-free-disk-space): New function; code moved from insert-directory. - (insert-directory): Call get-free-disk-space to get the amount of - free space. - -2001-12-21 Richard M. Stallman - - * help.el (view-order-manuals, view-emacs-news, describe-copying) - (describe-distribution, describe-project): Use view-file. - - * emacs-lisp/cl-indent.el (define-modify-macro): Better indent spec. - - * net/ange-ftp.el (ange-ftp-file-modtime): Use save-match-data. - - * emacs-lisp/easy-mmode.el (define-minor-mode): - Make no arg by default in an interactive call, - so that repeating the command toggles again. - - * emacs-lisp/lisp-mode.el (eval-defun-1): Cope with atoms as args. - -2001-12-21 Christoph Wedler - - * antlr-mode.el: More sophisticated indentation of cpp directive. - (antlr-indent-at-bol-alist): New user option. - (antlr-indent-line): Use it. - (antlr-indent-style): New user option. - (antlr-mode): Use it. - (antlr-indent-item-regexp): Customize. - - * antlr-mode.el: Syntax highlighting changes. - (antlr-font-lock-literal-regexp): New user option. - (antlr-font-lock-syntax-face): New face used for :, |, .... - (antlr-font-lock-default-face): New face. - (antlr-font-lock-additional-keywords): Use them. - - * antlr-mode.el: New command to insert options -- variables. - (antlr-mode-map): New binding [C-c C-o]. - (antlr-mode-menu): New submenus. - (antlr-options-use-submenus): New user option. - (antlr-tool-version): New user option. - (antlr-options-auto-colon): New user option. - (antlr-options-style): New user option. - (antlr-options-push-mark): New user option. - (antlr-options-assign-string): New user option. - (antlr-options-headings): New variable. - - * antlr-mode.el: New command to insert options -- specific. - (antlr-options-alists): New variable. - (antlr-read-value): New function. - (antlr-read-boolean): New function. - (antlr-language-option-extra): New function. - (antlr-language-limit-n-regexp): Change default to higher LIMIT. - (antlr-c++-mode-extra): New function. - (antlr-grammar-tokens): New function. - (antlr-imenu-create-index-function): New optional argument. - - * antlr-mode.el: New command to insert options -- functions. - (antlr-insert-option): New command. - (antlr-insert-option-interactive): New function. - (antlr-options-menu-filter): New function. - (antlr-option-kind): New function. - (antlr-scan-lists): New alias. - (antlr-scan-lists-internal): New function. - (antlr-skip-file-prelude): Hack for special SKIP-COMMENT. - (antlr-option-level): New function. - (antlr-syntactic-grammar-depth): New function. - (antlr-option-location): New function. - (antlr-insert-option-do): New function. - (antlr-option-spec): New function. - (antlr-version-string): New function. - (antlr-insert-option-existing): New function. - (antlr-insert-option-space): New function. - (antlr-insert-option-area): New function. - - * antlr-mode.el: New electric keys ":;|&(){}", TAB works better - with narrowing. Menu change. Miscellaneous. - (antlr-mode-menu): Include "Indent Region" and "Customize Antlr". - (antlr-mode-map): New bindings for characters in ":;|&(){}". - (antlr-electric-character): New command. - (antlr-class-header-regexp): New variable. - (antlr-font-lock-additional-keywords): Use it. - (antlr-imenu-create-index-function): Use it. - (antlr-file-dependencies): Use it. - (antlr-indent-line): Also works with restrictions. - (antlr-indent-command): Interactive spec - changes the buffer. - (antlr-language-for-option): Deletia. - (antlr-language-option): New function, defined instead. - (antlr-mode): Use it. - -2001-12-21 Eli Zaretskii - - * jka-compr.el (jka-compr-partial-uncompress): Use null-device - instead of a literal /dev/null. - - * Makefile.in (distclean): Remove Makefile in the build - directory, not in the source directory. - -2001-12-21 Simon Josefsson . - - * mail/smtpmail.el (smtpmail-send-queued-mail): - Use with-temp-buffer instead of find-file-noselect, and bind - coding-system-for-read to no-conversion when reading the queued - messages. (Simon's code modified slightly by Eli Zaretskii.) - -2001-12-20 Werner Lemberg - - * international/mule-diag.el (describe-coding-system) - (print-coding-system-briefly): Make printed output have a similar - format as describe-character-set. - -2001-12-20 Pavel Jan,Am(Bk - - * play/blackbox.el (bb-member): Remove, use member instead. - (bb-delete): Remove, use delete instead. - Update copyright notice. Defvar for bb-board, bb-x, bb-y, - bb-score, bb-detour-count and bb-balls-placed. - Propertize results of rays. - -2001-12-19 Karl Fogel - - * isearch.el (isearch-forward, isearch-edit-string): Make doc - strings mention keybinding for `isearch-yank-word-or-char', - rather than `isearch-yank-word', since the former is bound now - and the latter is not. - (isearch-yank-word-or-char): Fix formatting. - -2001-12-19 Werner Lemberg - - * language/czech.el, language/european.el, language/slovak.el: - More fixes for language info doc strings. - -2001-12-19 Eli Zaretskii - - * loadup.el: Add "language" to the load-path. - -2001-12-19 Richard M. Stallman - - * international/mule-cmds.el (describe-language-environment): - Fix calls to help-xref-button. - -2001-12-19 Miles Bader - - * international/fontset.el: Require `ind-util' when compiling. - -2001-12-18 Pavel Jan,Am(Bk - - * language/ethio-util.el (ethio-modify-vowel): Use char-to-string - instead of decompose-composite-char. - -2001-12-18 Richard M. Stallman - - * simple.el (eval-expression-print-level) - (eval-expression-print-length): Doc fixes. - - * international/mule-diag.el (describe-character-set): - Fix the arg to help-xref-button. - - * files.el (directory-free-space-program): New variable. - (directory-free-space-args): New variable. - (insert-directory): Use those two variables for getting free space. - Use file-system-info instead, if that is defined. - - * dired.el (dired-free-space-program): Variable deleted. - (dired-free-space-args): Variable deleted. - (dired-insert-directory): Don't try to determine free space. - - * files.el (font-lock-defaults): Add risky-local-variables prop. - (hack-one-local-variable): Treat various font-lock variables as risky. - -2001-12-18 Werner Lemberg - - * language/chinese.el, language/cyrillic.el: - * language/czech.el, language/european.el, language/greek.el: - * language/hebrew.el, language/indian.el, language/japanese.el: - * language/korean.el, language/lao.el, language/slovak.el: - * language/thai.el, language/tibetan.el, language/vietnamese.el: - Improve documentation strings of coding systems and language infos. - -2001-12-18 Werner LEMBERG - - Add support for EUC-TW decoding/encoding. - - * language/china-util.el (big5-to-flat-code, flat-code-to-big5) - (euc-to-flat-code, flat-code-to-euc, expand-euc-big5-alist): - New auxiliary functions to build `big5-to-cns'. - (big5-to-cns): New translation alist. - - * language/chinese.el: Added new coding system `euc-tw' and its - alias `euc-taiwan'. - Updated language `Chinese-CNS' to include euc-tw encoding also. - (ccl-decode-euc-tw, ccl-encode-euc-tw): New functions for handling - euc-tw. - -2001-12-18 Dave Love - - * loadup.el: Add language/utf-8-lang, language/georgian. - - * image-file.el (image-file-name-extensions): Add pnm. Doc fix. - (image-file-name-regexps): Doc fix. - - * server.el (server-unload-hook): New function. - - * emacs-lisp/lisp-mnt.el (lm-copyright-prefix): Group the leader. - (lm-crack-copyright): Cope with multi-line copyright `lines'. - - * simple.el (newline): Doc fix. - (eval-expression-print-level, eval-expression-print-length): Doc - fix. Amend :type. - (next-line, previous-line): Make arg optional. - (newline): Doc fix. - - * Makefile.in (DONTCOMPILE): Add various language files. - - * international/quail.el (quail-input-string-to-events): Don't use - string-to-list. - - * progmodes/f90.el (f90-break-line): Avoid infinite recursion - calling `newline'. - -2001-12-17 Richard M. Stallman - - * comint.el (comint-dynamic-list-input-ring-select): New function. - Switches back to the old window configuration. - (comint-dynamic-list-input-ring): Bind RET to that function. - (comint-dynamic-list-input-ring-window-conf): New variable. - -2001-12-17 Werner Lemberg - - * international/mule-conf.el: Improve documentation strings of - character sets. - -2001-12-16 Richard M. Stallman - - * dired.el (dired-copy-filename-as-kill): Moved from dired-x.el. - (dired-mode-map): Bind w to dired-copy-filename-as-kill. - - * dired-x.el (dired-copy-filename-as-kill): Moved to dired.el. - - * autoinsert.el (auto-insert-alist): Redo finding C and C++ headers. - Add a DESCRIPTION for the makefile item. - - * find-file.el (ff-other-file-name): New function. - -2001-12-16 Eli Zaretskii - - * international/quail.el (quail-input-string-to-events): Fix last - change. - -2001-12-16 Richard M. Stallman - - * isearch.el (isearch-edit-string): When we set isearch-string - to the default, also set isearch-message. - - * subr.el (temp-buffer-show-hook, temp-buffer-setup-hook): Add defvars. - - * startup.el (command-line-1): Display startup screen - even if there are command line args. - Add a note about how to go to editing your files. - (fancy-splash-head): Add a note about how to go to your files. - (fancy-splash-outer-buffer): New variable. - (fancy-splash-screens): Bind variable fancy-splash-outer-buffer. - - * subr.el (with-temp-message): At the end, always discard - the temp message, even by clearing the echo area. - - * progmodes/sh-script.el (sh-mode): Run sh-mode-hook. - -2001-12-16 Stefan Monnier - - * log-view.el (log-view-message-re, log-view-current-tag): - Recognize Subversion's log output format. - - * international/fontset.el: Build the list L at compile time. - - * language/ind-util.el (mapthread): Make a closure. - -2001-12-15 Richard M. Stallman - - * isearch.el (isearch-start-hscroll): New variable. - (isearch-mode): Set isearch-start-hscroll. - (isearch-update): Restore original hscrolling if possible. - - * isearch.el (isearch-edit-string): - Treat isearch-yank-word-or-char specially, like isearch-yank-word. - - * emacs-lisp/debug.el (debugger-previous-backtrace): New variable. - (debugger-make-xrefs): Optimize by (1) using skip-syntax-forward - rather than regexp search and (2) copying text properties - already set up on text unchanged from the previous backtrace. - - * case-table.el (set-case-syntax-pair): - Detect invalid calls and signal an error. - -2001-12-15 Richard M. Stallman - - * language/ind-util.el (range): Function deleted. - (indian-regexp-of-hashtbl-keys): Renamed from `regexp-of-hashtbl-keys'. - All calls changed. - - * language/devan-util.el (devanagari-range): Renamed from `range'. - All calls changed. - (devanagari-regexp-of-hashtbl-keys): - Renamed from `regexp-of-hashtbl-keys'. All calls changed. - -2001-12-15 Dave Love - - * language/ind-util.el: Don't require cl. - (indian-glyph-char, indian-glyph-max-char) - (indian-char-glyph): Moved from indian.el - (indian--puthash-char, mapthread): Don't quote lambda. - (indian--map): New function. - (indian--puthash-v, indian--puthash-c, indian--puthash-m) - (indian--puthash-cv): Use it. - - * language/indian.el (indian-glyph-char, indian-glyph-max-char) - (indian-char-glyph): Moved to ind-util.el - - * language/devan-util.el (devanagari-post-read-conversion): - New function. - - * language/georgian.el: New file. - - * international/mule-cmds.el (locale-language-names): Add various - entries. Remove utf-8 special case. - (locale-charset-language-names, locale-preferred-coding-systems): - Add utf-8 case. - (set-language-environment): Process required-features earlier. - - * international/quail.el (quail-keyboard-layout-alist): - Add pc105-uk. - (quail-keyboard-layout-type): Fix :type. - (quail-choose-completion-string): Simplify. - (quail-update-leim-list-file): Don't get fooled by commented-out code. - (quail-input-string-to-events): Run events through - translation-table-for-input. - - * international/mule-conf.el (translation-table-for-input): - New variable. - (latin-iso8859-14): Amend description. - (file-coding-system-alist): Add entry for utf-8. - - * language/utf-8-lang.el: New file. - - * international/code-pages.el: New file. - - * language/hebrew.el ("Windows-1255"): New language. - - * language/european.el ("Welsh", "Latin-7", "Lithuanian") - ("Latvian"): New languages. - -2001-12-14 Stefan Monnier - - * xml.el: Use setq rather than (set 'foo bar). - Use push+nreverse rather than append. - (xml-node-name, xml-node-attributes, xml-node-children): - Use defsubst rather than macros. - (xml-parse-region): Handle a nil return value from xml-parse-tag. - (xml-parse-tag): Don't skip white space. Return nil for a comment. - Concat the two strings surrounding a comment into a single string. - - * newcomment.el (comment-indent): Jump to the middle of empty comments. - -2001-12-14 Pavel Jan,Am(Bk - - * select.el (xselect-convert-to-class, xselect-convert-to-name): - Document. - -2001-12-14 Andre Spiegel - - * vc-hooks.el (vc-checkout-model, vc-state, vc-workfile-version): - Return nil if FILE is not registered. - (vc-check-master-templates, vc-default-make-version-backups-p): - Doc fix. - -2001-12-13 David Ponce - - * ruler-mode.el (ruler-mode-extra-left-cols): Remove. - (ruler-mode-left-fringe-cols): New macro. - (ruler-mode-right-fringe-cols): New macro. - (ruler-mode-left-scroll-bar-cols): New macro. - (ruler-mode-right-scroll-bar-cols): New macro. - (ruler-mode-ruler): Use above new macros. - -2001-12-13 Richard M. Stallman - - * files.el (set-auto-mode): Fix previous change. - -2001-12-13 Stefan Monnier - - * emacs-lisp/easymenu.el (easy-menu-intern): New fun. - (easy-menu-do-define, easy-menu-convert-item-1) - (easy-menu-define-key-intern, easy-menu-get-map): Use it. - (easy-menu-return-item): Only return nil if there is no binding. - -2001-12-13 Rajesh Vaidheeswarran - - * whitespace.el (whitespace-version): 3.2 - * whitespace.el (whitespace-force-mode-line-update): Replace with - `whitespace-mode-line-update', which is an alias to the correct - function in various emacsen. - * whitespace.el (whitespace-{un,}highlight-the-space): - Add colorized highlighting of the bogus whitespaces in a buffer/file, - using the `whitespace-highlight-face' if - `whitespace-display-spaces-in-color' is set. - -2001-12-13 Eli Zaretskii - - * international/mule.el (set-auto-coding): Don't search for - "unibyte:" or "coding:" if set-auto-mode-1 returns nil. - -2001-12-13 Pavel Jan,Am(Bk - - * mail/mailabbrev.el (mail-abbrevs-setup): Do not use make-local-hook. - - * mail/rmail.el (rmail-fontify-buffer-function): Likewise. - - * mail/rmailsum.el (rmail-summary-mode): Likewise. - -2001-12-13 Richard M. Stallman - - * simple.el (undo): Always set this-command to `undo', - so that the next undo after an error will not begin redoing. - - * simple.el (shell-command): Doc fix. - (shell-command-on-region): If there is output an an error, - add "...Shell command failed" to the output. - -2001-12-13 David Ponce - - * ruler-mode.el (ruler-mode-left-fringe-cols): Variable removed. - (ruler-mode-left-fringe-cols): Function replaced by more efficient - implementation `ruler-mode-extra-left-cols'. - (ruler-mode-ruler): Use above new function. Take into account - that the fringe areas can now be resized. - -2001-12-12 Richard M. Stallman - - * international/characters.el (Unicode): Comment out - the specifications for kelvin and angstrom signs. - - * international/mule.el (make-translation-table-from-vector): - Allow null elements in VEC. - - * international/ucs-tables.el (unify-8859-on-encoding-mode) - (unify-8859-on-decoding-mode): Swap the code in their bodies. - Add :version. - -2001-12-11 Richard M. Stallman - - * derived.el (derived-mode-p): Function moved to subr.el. - - * subr.el (derived-mode-p): Moved here from derived.el. - - * international/mule.el (set-auto-coding): Use set-auto-mode-1. - - * files.el (set-auto-mode-1): New subroutine, broken out of - set-auto-mode. - (set-auto-mode, hack-local-variables-prop-line): Use that. - -2001-12-11 Dave Love - - * language/thai-util.el, language/thai.el: Add Unicode equivalents. - - * language/european.el: Remove autoload cookies. Fix registration - of diacritic composition function. - -2001-12-11 Pavel Jan,Am(Bk - - * calendar/todo-mode.el: Require time-stamp. - - * net/zone-mode.el (zone-mode): Don't use make-local-hook. - -2001-12-11 Richard M. Stallman - - * emacs-lisp/authors.el (authors-aliases): Delete "Richard Stallmao". - - * textmodes/ispell.el (ispell-buffer-local-parsing): - Match xml like sgml. - - * emacs-lisp/advice.el (ad-compile-function): - Byte compile the function under another (uninterned) name. - - * gud.el (gdb): Define and bind gud-jump. - - * font-lock.el (font-lock-mode): - Put our function at the end of after-change-functions. - - * ediff-diff.el (ediff-cmp-options): Doc fix. - - * comint.el (comint-password-prompt-regexp): Match "UNIX Password". - -2001-12-10 Richard M. Stallman - - * isearch.el (isearch-yank-word-or-char): New function. - (isearch-mode-map): Bind C-w to that. - - * menu-bar.el (menu-bar-mode): Make arg optional. - - * simple.el (line-move): Cope if next-single-property-change - or previous-single-property-change returns nil. - - * emacs-lisp/lisp-mnt.el (lm-verify): New arg NON-FSF-OK. - Don't use interactive-p; instead, pass the proper args - in (interactive...). Clean up most of the trouble-report strings. - -2001-12-10 Eli Zaretskii - - * mail/smtpmail.el (smtpmail-send-queued-mail): Insert the - enqueued messages literally. - -2001-12-10 Noah Friedman - - * battery.el (battery-insert-file-contents): Obsolete function - removed. - (battery-read-function): Obsolete function removed. - (battery-linux-proc-apm): Use insert-file-contents. - -2001-12-07 Stephen Eglen - - * iswitchb.el (iswitchb-visit-buffer): - Use `select-frame-set-input-focus'--needed when window manager - uses "click to focus" policy. - -2001-12-09 Pavel Jan,Am(Bk - - * COPYING: Moved back. - -2001-12-07 Eli Zaretskii - - * term/internal.el (IT-character-translations): Add entries for - more points. - - * international/characters.el: Resurrect the Hebrew category - settings for all Hebrew characters removed by the last change. - Add code for setting the Hebrew category of the Unicode Hebrew - characters. Set syntax entries for Hebrew punctuation characters. - - * international/ucs-tables.el (ucs-8859-8-alist): Add Hebrew - points and directional formatting control characters. - -2001-12-07 Dave Love - - * language/lao-util.el: Add Unicode equivalents for rules. - (lao-post-read-conversion): New function. - - * language/lao.el: Add Unicode equivalents. - (lao): Add post-read conversion. - - * international/latin1-disp.el: Fix some 8-bit-graphic characters. - Use iso2022 encoding. - (latin1-char-displayable-p): Doc fix. - (latin1-display-ucs-per-lynx): New option. - (latin1-display-ucs-per-lynx): New command. - (latin1-display-reset): Special-case arabic. - (ucs-tables): Require. - (latin1-display-sets, latin1-display-setup): Add arabic. - (latin1-display) : Use function latin1-display. - (latin1-display) : Add mule-unicode stuff. - (latin1-display-check-font): Don't lose if `info' is nil. - - * international/iso-transl.el: Insert Latin-1 characters, not - unibyte codes. - - * language/european.el (diacritic-composition-pattern): New constant. - (diacritic-compose-region, diacritic-compose-string) - (diacritic-compose-buffer, diacritic-post-read-conversion) - (diacritic-composition-function): New functions. - - * international/utf-8.el (ucs-mule-to-mule-unicode): - New translation table. - (ccl-encode-mule-utf-8): Use it. - (utf-8-untranslated-to-ucs, utf-8-help-echo, utf-8-compose) - (utf-8-post-read-conversion, utf-8-pre-write-conversion): New function. - (utf-8-subst-table): New variable. - (utf-8-compose-scripts): New option. - (mule-utf-8): Update safe-charsets, pre-write and post-read conversion. - - * international/ucs-tables.el, international/utf-8-subst.el: - New files. - - * international/characters.el: Don't set word syntax (the default) - explicitly. Add a diacritic category. Add info for Unicode - equivalents of characters in various Mule charsets and for extra - Unicode characters. Don't define specific categories for - Indian/Devanagari, since they aren't used. - -2001-12-06 Richard M. Stallman - - * textmodes/fill.el (set-justification): Rename arg VALUE to STYLE. - (set-justification-left, set-justification-right): Doc fix. - - * progmodes/f90.el (f90-break-line): Use (newline 1) to insert newline. - (bug-f90-mode): Variable deleted. - -2001-12-06 Stefan Monnier - - * indent.el (indent-line-function): Default is indent-relative again. - -2001-12-07 Miles Bader - - * progmodes/compile.el (compilation-error-regexp-alist): - Added regexps for RXP. - -2001-12-05 Eli Zaretskii - - * progmodes/cwarn.el (cwarn-font-lock-match-assignment-in-expression): - Add shift-assignment operators to those highlighted, and highlight - the whole operator rather than just the "=". - -2001-12-04 Juanma Barranquero - - * files.el (save-abbrevs, save-some-buffers): Don't ask the user - before saving abbrevs if `save-abbrevs' has the value `silently'. - -2001-12-04 Andreas Schwab - - * xt-mouse.el (turn-off-xterm-mouse-tracking): Doc fix. - -2001-12-04 Colin Walters - - * emacs-lisp/autoload.el (make-autoload): Also generate autoloads - for `defmacro*' forms. - - * emacs-lisp/lisp-mode.el (toplevel): Define docstring offset for - `defmacro*'. - -2001-12-03 Stefan Monnier - - * progmodes/antlr-mode.el (antlr-c-common-init): Undo last change. - -2001-12-02 Richard M. Stallman - - * files.el (insert-directory): If the df output does not look right, - don't try to use it. Other cleanups in overall code structure. - -2001-12-02 Stefan Monnier - - * textmodes/outline.el (outline-mode-prefix-map): - Add bindings for outline-promote and outline-demote. - (outline-minor-mode-menu-bar-map): New var. - (outline-minor-mode): Use it. - (outline-heading-alist): New var (renamed from outline-level-heading). - (outline-level): Use it. - (outline-insert-heading, outline-promote, outline-demote): - Update to use outline-heading-alist. - - * disp-table.el (standard-display-european): - Simplify since the function is not interactive any more. - Don't set the existing buffers to unibyte. - - * pcvs-util.el (cvs-file-to-string): Move condition-case outside. - - * pcvs.el (cvs-reread-cvsrc): Don't use cvs-file-to-string. - - * reveal.el (reveal-mode): Fix reveal-mode's lighter. - - * shell.el (shell): Use shell-file-name. - Pop to buffer before calling comint to set COLUMNS properly. - - * emacs-lisp/cl.el (svref): New alias. - - * progmodes/antlr-mode.el (antlr-c-common-init): - Don't inhibit adaptive-fill-mode any more. - - * progmodes/delphi.el (delphi-mode): Don't use make-local-hook. - - * progmodes/etags.el (tags-with-face): Use make-symbol. - (tags-search, tags-query-replace): Use backquotes. - - * textmodes/picture.el (picture-mode-map): Don't use defconst - for a variable. - -2001-12-02 Pavel Jan,Am(Bk - - * textmodes/reftex-index.el (reftex-index-mode): - Remove make-local-hook. - - * textmodes/reftex-toc.el (reftex-toc-mode): Likewise. - -2001-12-02 Kim F. Storm - - * isearch.el (isearch-resume-enabled): New variable. - (isearch-done): Use that variable. - -2001-12-01 Richard M. Stallman - - * wid-edit.el (widget-button-click): Don't move point permanently: - Avoid mouse-set-point--instead select the window, - then do save-excursion, then move point. - Specify the buffer for get-char-property. - Don't use `@' in interactive. - - * indent.el (indent-line-function): - Default is indent-to-left-margin again. - - * replace.el (query-replace-read-args): Display message - if FROM contains `\n' or `\t'. - -2001-12-01 Stefan Monnier - - * indent.el (tab-to-tab-stop): Use delete-horizontal-space. - - * bindings.el (minibuffer-local-map): Bind TAB to insert-tab. - - * emacs-lisp/regexp-opt.el (regexp-opt): - Bind completion-regexp-list to nil. - - * progmodes/hideif.el (hif-nexttoken): Move to before first def. - -2001-12-01 Eli Zaretskii - - * progmodes/idlwave.el, progmodes/idlw-rinfo.el: - * progmodes/idlw-shell.el, progmodes/idlw-toolbar.el: - Update maintainer. - -2001-11-30 Stefan Monnier - - * mail/smtpmail.el: Use with-current-buffer. - (message-make-date, message-make-message-id): Autoload when needed. - (smtpmail-send-it): Use them to add `Date:' and `Message-Id:' - headers when missing. - - * international/encoded-kb.el (encoded-kbd-mode): - Use define-minor-mode. - - * enriched.el (enriched-mode): Use define-minor-mode. - Use dolist and pop and push. - - * info.el (Info-find-node-2): Don't call info-insert-file-contents - with the `visit' argument. - (Info-extract-menu-node-name): Use `replace-regexps-in-string'. - - * progmodes/hideif.el (hide-ifdef-mode): Only modify - `change-major-mode-hook' locally. Reset invisibility spec. - - * man.el (Man-build-section-alist): Remove last Man-match-substring. - -2001-11-30 Kai Gro,A_(Bjohann - - * textmodes/paragraphs.el (mark-paragraph): Clarify doc. - Clarify error message. - -2001-11-29 Kai Gro,A_(Bjohann - - * textmodes/paragraphs.el (mark-paragraph): Allow prefix arg. - -2001-11-30 Andre Spiegel - - * vc-cvs.el (vc-cvs-parse-status): Store file state in property, - don't just return it. - -2001-11-30 Eli Zaretskii - - * menu-bar.el (menu-bar-read-lispref, menu-bar-read-lispintro) - (menu-bar-read-emacs-man, search-emacs-glossary) - (emacs-index-search, elisp-index-search): New functions. - (apropso-documentation, apropos, apropos-value, apropos-variable) - (apropos-commands): Modify menu item names and help text. - (elisp-index-search, emacs-index-search, emacs-glossary): - New menu items. - (menu-bar-manuals-menu): Move the Ordering Manuals item to a - submenu. - (info-elisp, info-elintro): New menu items. - (apropos): Modify the menu item name. - -2001-11-30 Stefan Monnier - - * emacs-lisp/lisp-mode.el (read-if): Add lisp-indent-function prop. - - * textmodes/outline.el (outline-promote, outline-demote): Typo. - - * man.el (man-follow-mouse): New function. - (Man-mode-map): Bind mouse-2 to it. - (Man-match-substring): Remove. Replace with `match-string'. - (man): Use the `default-value' argument to `read-string'. - (Man-fontify-manpage): Add mouse-face to cross references. - - * emacs-lisp/cl-macs.el (shiftf): Fix more. Simplify. - -2001-11-29 Stefan Monnier - - * emacs-lisp/crm.el (completing-read-multiple): Better preserve - the value of require-match in minibuffer-completion-confirm. - Use crm-local-completion-map. - - * emacs-lisp/cl-macs.el (shiftf): Fix the fast case so - (let ((a 1) (b 2)) (shiftf a b (cons a b)) b) returns (1 . 2). - (cl-make-type-test): Use char-valid-p for `character'. - - * info.el (Info-complete-next-re, Info-complete-cache): New vars. - (Info-complete-menu-item): Rewrite. Add the ability to search - several sequential nodes. Add a simple caching mechanism. - (Info-goto-index): New function extracted from Info-index. - (Info-index): Use it. Add completion to the interactive spec. - (Info-menu-update): Simplify call to `Info-complete-menu-item'. - -2001-11-29 Pavel Jan,Am(Bk - - * COPYING: Removed. - -2001-11-29 Dave Love - - * progmodes/fortran.el: Fontify rewind, backspace. Doc fixes. - (fortran-window-create, fortran-window-create-momentarily): - Rewrite, moving error condition. - (fortran-beginning-do, fortran-beginning-if): Fix regexps. - (fortran-mode-syntax-table): Revert last change. - - * international/mule.el: Doc fixes. - (map-charset-chars): New function. - (register-char-codings): Use it to cope with generic chars in - safe-chars. - -2001-11-29 Pavel Jan,Am(Bk - - * play/blackbox.el (blackbox-mode, blackbox): Doc fix. - - * play/cookie1.el (cookie, cookie-insert, shuffle-vector): Doc fixes. - - * play/studly.el (studlify-word, studlify-region) - (studlify-buffer): Fix doc-string. - (studlify-buffer): Add autoload cookie. - -2001-11-28 Stefan Monnier - - * textmodes/outline.el (outline-up-heading): Add `invisible-ok' arg. - (outline-up-heading-all): Remove. - (hide-sublevels): Move to end-of-heading before calling flag-region. - (outline-copy-overlay, outline-discard-overlays): Remove. - (outline-flag-region): Use `remove-overlays'. - Don't move to end-of-heading. - (outline-next-visible-heading, outline-back-to-heading) - (outline-on-heading-p): Use outline-invisible-p. - (outline-font-lock-level): Use outline-up-heading's new arg. - (outline-minor-mode): Simplify. - (outline-map-tree, outline-reveal-toggle-invisible): New funs. - (outline): Put a `reveal-toggle-invisible' property. - (outline-level-heading): New var. - (outline-insert-heading, outline-promote, outline-demote) - (outline-toggle-children): New commands. - - * progmodes/hideif.el (hif-end-of-line): New function. - (hide-ifdef-mode): Set line-move-ignore-invisible. - (hide-ifdef-region-internal): New function. - (hide-ifdef-region): Use it. - (hif-defined): Return an integer. - (hif-infix-to-prefix): Remove. - (hif-tokenize): Parse from the buffer rather than from a string. - Correctly tokenize integers. Use forward-comment. - (hif-expr): Use hif-or. - (hif-term): Use hif-and. - (hif-factor): Use hif-not. Handle numbers properly. - Don't require parenthesis around `defined's argument. - (hif-and, hif-or, hif-not): New funs. - (hif-canonicalize): Pass a region to hif-tokenize. Use hif-not. - (hif-hide-line): Don't hide the \n before the line. - (hif-possibly-hide): Correctly handle numeric evaluation results. - - * progmodes/make-mode.el: Use line-(end|beginning)-position. - (makefile-mode): Set indent-line-function. - (makefile-browser-insert-continuation): Use with-current-buffer. - (makefile-beginning-of-line-point, makefile-end-of-line-point): Remove. - -2001-11-28 Karl Fogel - - * isearch.el (isearch-yank-internal): New helper function. - (isearch-yank-char): New function. - (isearch-yank-word, isearch-yank-line): Rewrite to use - isearch-yank-internal. - -2001-11-28 Eli Zaretskii - - * mouse.el (mouse-set-font): Make it a no-op if multiple fonts - aren't supported. Print a message to that effect if invoked. - -2001-11-27 Stephen Eglen - - * locate.el (locate): Put point at first matching file rather - than top of buffer. - -2001-11-27 Stefan Monnier - - * reveal.el: New file. - - * progmodes/hideif.el: Misc cleanup. - (hide-ifdef-mode-submap): Put the def in the defvar. - Use substitute-key-definition. - (hide-ifdef-mode): Use define-minor-mode. - (hif-outline-flag-region): Remove. - (hif-show-all): Define in terms of hif-show-ifdef-region. - (hif-after-revert-function): Rename from hif-before-revert-function. - (hide-ifdef-region, hif-show-ifdef-region): Use overlays. - (hif-tokenize): Use with-syntax-table. - (hif-make-range): Use `else' also for `else-p'. - (hif-range-else-p): Remove. - (hif-find-range): Simplify. - (hif-hide-line): Don't bother preserving buffer-modified-p. - (hide-ifdefs, show-ifdefs, hide-ifdef-block, show-ifdef-block): - Don't use selective-display and inhibit-read-only. - - * subr.el (copy-overlay, remove-overlays): New funs. - - * emacs-lisp/regexp-opt.el (regexp-opt-depth): Fix off-by-two error. - -2001-11-27 Sam Steingold - - * ansi-color.el, bookmark.el, dired.el, emerge.el, fast-lock.el - * lazy-lock.el, mouse-sel.el, mail/feedmail.el - * emacs-lisp/advice.el, emacs-lisp/checkdoc.el, emacs-lisp/ewoc.el - * obsolete/c-mode.el, obsolete/cplus-md.el - * progmodes/dcl-mode.el, progmodes/idlw-shell.el, progmodes/idlwave.el - * term/sun-mouse.el, textmodes/artist.el: - Converted backquote to the new style. - * mouse.el, reposition.el: Likewise (in comments). - * expand.el: Likewise (in a string). - -2001-11-27 Richard M. Stallman - - * cus-edit.el (custom-load-symbol): Don't always load locate-library. - -2001-11-26 Richard M. Stallman - - * wid-edit.el (widget-toggle-value-create): On graphic terminal, - if :on-glyph or :off-glyph is a list, eval it and store it back. - (checkbox): Quote the values for :on-glyph and :off-glyph. - - * cus-start.el (recursive-load-depth-limit): Delete item. - -2001-11-26 Stefan Monnier - - * help-fns.el (describe-categories, help-describe-category-set): New. - describe-categories moved here from src/category.c. - -2001-11-26 Sam Steingold - - * progmodes/cc-mode.el (c-submit-bug-report): Make sure that the - arguments to `insert' are strings. - -2001-11-26 Richard M. Stallman - - * startup.el (command-line-1): Call kill-buffer only in non-fancy case. - -2001-11-26 Eli Zaretskii - - * international/mule-diag.el: Require help-fns instead of - help-funs. - - * help-fns.el: Renamed from help-funs.el. - - * startup.el (command-line-1): Don't try to call process-list if - it is not fboundp. - -2001-11-26 Sam Steingold - - * frame.el (show-trailing-whitespace): Remove :set argument (the - value was essentially identical to the defalt). - -2001-11-26 Pavel Jan,Am(Bk - - * hexl.el (hexl-mode, hexl-follow-ascii): Remove make-local-hook. - - * icomplete.el (icomplete-minibuffer-setup): Likewise. - - * hilit-chg.el (hilit-chg-set): Likewise. - - * speedbar.el (speedbar-mode): Likewise. - - * calendar/calendar.el (calendar-mode): Likewise. - - * play/yow.el (psychoanalyze-pinhead): Use insert instead of - insert-string. - - * play/gamegrid.el (gamegrid-init-buffer): Likewise. - - * term/bg-mouse.el (bg-insert-moused-sexp): Likewise. - - * term/sun-mouse.el (sun-yank-selection): Likewise. - - * textmodes/bib-mode.el (return-key-bib): Likewise. - - * calendar/appt.el (appt-disp-window): Likewise. - - * calendar/diary-lib.el (list-diary-entries): Likewise. - - * array.el (array-reconfigure-rows): Likewise. - - * filecache.el (file-cache-minibuffer-complete): Likewise. - - * obsolete/cplus-md.el (fill-c++-comment): Likewise. - - * strokes.el (strokes-prompt-user-save-strokes): Likewise. - - * allout.el (outline-version, outline-open-topic) - (outline-rebullet-heading, outline-insert-listified) - (outline-latex-verbatim-quote-curr-line) - (outline-latexify-one-item, outlineify-sticky): Likewise. - - * vc.el (vc-next-action-on-file): Likewise. - (vc-dired-mode): Remove make-local-hook. - -2001-11-26 Andre Spiegel - - * vc.el (vc-find-version): New function. - (vc-version-other-window): Redefined in terms of the above. - - * log-view.el (log-view-find-version): New function. - (log-view-mode-map): Bind it to `f'. - -2001-11-26 Gerd Moellmann - - * language/devan-util.el (dev-char-glyph): Escape `"' in - string literals. - (dev-glyph-glyph, dev-glyph-glyph-2) - (devanagari-compose-syllable-region): Likewise. - -2001-11-26 Richard M. Stallman - - * window.el (save-selected-window): No error if saved window is dead. - - * help-funs.el (describe-syntax): Put (interactive) after doc string. - -2001-11-26 Pavel Jan,Am(Bk - - * international/quail.el (quail-help): Require help-mode in - top-level instead. - - * iswitchb.el (iswitchb-exhibit): Use insert instead of - insert-string. - - * icomplete.el (icomplete-exhibit): Likewise. - -2001-11-25 Stefan Monnier - - * diff-mode.el (diff-end-of-hunk): Watch out for ambiguities. - (diff-hunk-kill): Simplify. - (diff-post-command-hook): Only apply to a single hunk. - (diff-hunk-text): Make `char-offset' non-optional. - (diff-find-text): Return a cons cell. - (diff-find-approx-text): New fun. - (diff-find-source-location): Use it. - (diff-apply-hunk, diff-test-hunk, diff-goto-source): - Adapt to new retval of diff-find-text. - - * vc-cvs.el (vc-cvs-parse-entry): Rewrite, comparing the string- - rather than integer- representation of dates. - - * textmodes/fill.el (fill-indent-according-to-mode): Default to nil. - - * emacs-lisp/syntax.el: Don't profile syntax-ppss any more. - (syntax-after): New fun. - - * help-funs.el (describe-syntax): New fun. - - * font-lock.el (font-lock-cache-state, font-lock-cache-position) - (font-lock-ppss-stats, font-lock-ppss): Remove. - (font-lock-fontify-syntactically-region): Remove tuning code. - (font-lock-compile-keywords): Fix off-by-one bug. - (font-lock-set-defaults): Don't set removed vars. - (c-keywords): Add `inline'. - (c-type-names): Add `_Complex', `_Imaginary' and `_Bool'. - - * emacs-lisp/lisp-mode.el (lisp-mode-variables): - Set syntax-begin-function. - (lisp-interaction-mode-abbrev-table): Defvar to its correct value. - (lisp-interaction-mode): Don't set local-abbrev-table any more. - (lisp-mode-auto-fill): Use syntax-ppss and obey - comment-auto-fill-only-comments. - (lisp-fill-paragraph): Use syntax-ppss. - -2001-11-25 ShengHuo ZHU - - * mail/rmail.el (rmail-enable-mime-composing): New. A lightweight - version of rmail-enable-mime. - (rmail-forward): Use it. - -2001-11-25 Richard M. Stallman - - * emacs-lisp/lisp-mode.el (lisp-indent-function): Add doc string. - - * international/quail.el (quail-keyboard-layout-button): - Define button type. - (quail-keyboard-customize-button): Likewise. - (quail-help): Use those button types. Require `help-mode'. - Avoid altering the argument `package'. - - * help-mode.el (help-function, help-variable, help-face) - (help-coding-system, help-input-method, help-character-set): - Define each button type with its own explicit define-button-type. - - * language/devan-util.el: Comment out parts of the file - which apparently are garbled. - -2001-11-25 Pavel Jan,Am(Bk - - * mail/smtpmail.el (smtpmail-deduce-address-list): Don't use - insert-string. - -2001-11-25 Pavel Jan,Am(Bk - - * play/snake.el (snake-mode): Remove make-local-hook. - - * play/tetris.el (tetris-mode): Likewise. - - * play/decipher.el (decipher-mode): Likewise. - - * tmm.el (tmm-add-prompt): Likewise. - -2001-11-25 Sam Steingold - - * menu-bar.el (menu-bar-apropos-menu): New variable. - Moved all `apropos' bindings to this menu. - (menu-bar-help-menu): Added `menu-bar-apropos-menu'. - -2001-11-24 KAWABATA, Taichi - - The following changes are for new indian languages support based - on Unicode charset and CDAC fonts. - - * international/mule-conf.el: Change indian-1-column charset to - indian-glyph charset. - - * international/characters.el: Adjusted for the change of - indian-1-column -> indian-glyph. - - * international/fontset.el: Delete the setting for indian-1-column - and add the setting for indian-glyph in the default fontset. - - * language/indian.el: Completely re-written. - - * language/devanagari.el: Completely re-written. - - * language/devan-util.el: Completely re-written. - - * language/ind-util.el: New file. - -2001-11-24 Richard M. Stallman - - * startup.el (command-line-1): Don't do startup screen - if a subprocess is running. Call the startup screen buffer - "GNU Emacs". Make a special mode-line-format for it. - - * net/browse-url.el (browse-url-galeon-new-window-is-tab): New var. - (browse-url-galeon): Use that variable. - - * mail/supercite.el (sc-toggle-var): Don't use set-variable or - eval-expression. Eval and set the variable simply. - - * files.el (temporary-file-directory): Use defcustom. - (small-temporary-file-directory): Likewise. - (normal-backup-enable-predicate): Move down in file - after definition of temporary-file-directory. - - * bindings.el (last-buffer, unbury-buffer): Doc fixes. - -2001-11-24 Colin Walters - - * calc/calc-ext.el (calc-init-extensions): Update the rest of the - autoload names to match files renamed on initial calc import. - - * calc/calc.el (Commentary): Cleanup, and add logistic curve - fitting suggestion from Robert J. Chassell . - -2001-11-23 Colin Walters - - * Makefile.in (finder_setwins, setwins): Include Calc again. - - * calc/calc-rules.el: Add header comment. - -2001-11-23 Andre Spiegel - - * vc.el (with-vc-properties): Don't bind `filename' locally. - (with-vc-file, edit-vc-file): Use `make-symbol' for local bindings - to avoid name clashes. Fix `lisp-indent-function' property for - both. - -2001-11-23 Francesco Potort,Al(B - - * generic-x.el (mailrc-generic-mode): Highlight the `source' keyword. - -2001-11-22 Colin Walters - - * calc/calc-misc.el (report-calc-bug): - Use `reporter-prompt-for-summary-p'. - - * calc/INSTALL, calc/Makefile: Remove. - -2001-11-22 Miles Bader - - * emacs-lisp/re-builder.el (reb-match-0, reb-match-1) - (reb-match-2, reb-match-3): Add dark-background variants. - -2001-11-22 Colin Walters - - * calc/calc-misc.el (calc-info): Don't perform voodoo, just - (info "Calc"). - (report-calc-bug): Use reporter.el. - - * mail/reporter.el (reporter-submit-bug-report): Doc fixes. - -2001-11-21 Richard M. Stallman - - * which-func.el (which-function): Call imenu--make-index-alist - if necessary to get a list of functions. - (which-function-imenu-failed): New variable. - (which-func-update): Handle all visible windows. - (which-func-update-1): New subroutine broken out of which-func-update. - - * files.el (temporary-file-directory, null-device) - (small-temporary-file-directory): Definitions moved up. - - * progmodes/cperl-mode.el (cperl-problems, cperl-tips) - (cperl-non-problems, cperl-praise): Doc fixes. - - * progmodes/sh-script.el (sh-mode): Don't use define-derived-mode. - (sh-mode-syntax-table): Function restored. - Variable set up for use by function sh-mode-syntax-table. - (sh-set-shell): Set the syntax table. - - * play/gomoku.el (gomoku-mode): Don't use define-derived-mode. - - * progmodes/perl-mode.el (perl-mode): Don't use define-derived-mode. - - * international/encoded-kb.el: Don't alter minor-map-alist. - -2001-11-20 Kai Gro,A_(Bjohann - - * files.el (auto-save-file-name-transforms): Put remote files in - temporary-file-directory rather than /tmp. - -2001-11-21 Colin Walters - - * calc/calc-macs.el (calc-slow-wrapper): Move (point) call outside - of (function ...) wrapper. - -2001-11-20 Stefan Monnier - - * derived.el (define-derived-mode): Create the abbrev-table - from inside the `defvar'. - - * jit-lock.el (jit-lock-defer-time): New var. - (jit-lock-defer-timer, jit-lock-buffers): New vars. - (jit-lock-mode): Initialize them. Cancel the timers more carefully. - (jit-lock-function): Defer fontification if requested. - (jit-lock-stealth-chunk-start): Pay attention to the new non-nil value. - (jit-lock-stealth-fontify): Check the new `jit-lock-defer-multiline' - text property. - (jit-lock-deferred-fontify): New fun. - -2001-11-20 Richard M. Stallman - - * emacs-lisp/lisp-mode.el (lisp-interaction-mode): - Set local-abbrev-table to lisp-mode-abbrev-table. - - * emacs-lisp/re-builder.el (reb-mode): - Don't use define-derived-mode. Call kill-all-local-variables. - - * emacs-lisp/lisp-mode.el (lisp-mode, emacs-lisp-mode): - Don't use define-derived-mode. - - * help-mode.el (help-mode): Undo 2001-10-07 change. - - * replace.el (occur-mode): Undo 2001-5-20 change. - -2001-11-20 Jason Rumney - - * w32-fns.el (w32-system-coding-system): Change to an alias for - locale-coding-system. - (set-w32-system-coding-system): Document the above change. - Set locale-coding-system instead. - -2001-11-20 Richard M. Stallman - - * ruler-mode.el: Add pagination. - (ruler-mode-toggle-show-tab-stops): No need to - test `ruler-mode' variable. - -2001-11-20 Eli Zaretskii - - * play/landmark.el: Mark lm-mode as special. - - * play/gomoku.el: Mark gomoku-mode as special. - -2001-11-20 Juanma Barranquero - - * emacs-lisp/re-builder.el (reb-change-target-buffer): New function. - (top-level): Bind it to C-c C-b. - (re-builder): Don't re-enter RE Builder Mode. - - * bs.el (bs-delete): Signal an error if the buffer cannot be deleted. - -2001-11-20 Stefan Monnier - - * progmodes/cperl-mode.el (cperl-perldoc): Require man before binding - `manual-program'. - - * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Don't move back - to a line without a comment. - -2001-11-20 Eli Zaretskii - - * dired.el (dired-listing-switches): Mention in the doc string - that some switches are not supported by ls-lisp.el - -2001-11-19 Stefan Monnier - - * imenu.el (imenu--split-menu): Use dolist and copy-sequence. - (imenu--create-keymap-2): Remove. - (imenu--create-keymap-1): Simplify, remove third argument. - (imenu--generic-function): Use dolist. - (imenu-find-default): New function. - (imenu--completion-buffer): Use it. - (imenu--mouse-menu): Use popup-menu. - (imenu--menubar-select): Return t rather than calling imenu. - - * textmodes/fill.el (fill-delete-prefix, fill-delete-newlines): - New functions, extracted from fill-region-as-paragraph. - (fill-region-as-paragraph): Use them. - Use an end marker instead of eob. - Ignore whitespace-only fill-prefixes when indenting according to mode. - Simplify the loop that searches for spaces backwards. - - * textmodes/picture.el (picture-vertical-step) - (picture-horizontal-step): Don't use defconst for variables. - - * mail/mail-extr.el: Use backquote/dolist/mapc/when. Docstring fixes. - (mail-extract-address-components): Downcase domain names. - (mail-extr-delete-char): Remove. Use delete-char instead. - - * emulation/pc-select.el: Doc string fixes. - (pc-selection-mode): Don't treat macos as a tty. - - * emacs-lisp/lisp.el (mark-sexp): Mark more if repeated. - - * progmodes/cc-engine.el (c-parse-state): Typo. From Martin Stjernholm. - - * mwheel.el (mouse-wheel-scroll-amount): Allow float values. - (mouse-wheel-progessive-speed): New var. - (mwheel-scroll): Use it and handle float values. - - * lazy-lock.el (lazy-lock-install-hooks): Remove make-local-hook. - - * iswitchb.el (iswitchb-mode): Use define-minor-mode. - (iswitchb): Fix the case where the result was selected with the mouse. - (iswitchb-completion-help): Use the normal *Completions* now that - mouse selection works. - (iswitchb-minibuffer-setup): Simplify. - - * newcomment.el (comment-column, comment-style, comment-multi-line) - (comment-auto-fill-only-comments): Remove :group arg. - (comment-padding): Add :type. - (comment-indent-new-line): Ignore comment-auto-fill-only-comments - if called interactively. - -2001-11-19 Colin Walters - - * calc/calc.el (toplevel): Add comment and version header. - (calc-init-base): Bump version to 2.02f, update date. - -2001-11-19 Richard M. Stallman - - * net/browse-url.el: Support Mozilla and Galeon. - By default, find the installed browser whichever it is. - (browse-url-mozilla): New function. - (browse-url-mozilla-sentinel): New function. - (browse-url-galeon, browse-url-galeon-sentinel): New functions. - (browse-url-default-browser): New function. - (browse-url-process-environment): Use browse-url-browser-display. - (browse-url-browser-display): Renamed from browse-url-netscape-display. - (browse-url-mozilla-startup-arguments, browse-url-galeon-program) - (browse-url-galeon-arguments, browse-url-galeon-startup-arguments) - (browse-url-mozilla-program, browse-url-mozilla-arguments): New vars. - (browse-url-browser-function): New default, new options. - -2001-11-19 Sam Steingold - - * bindings.el (last-buffer, unbury-buffer): New function. - (mode-line-unbury-buffer): Use `unbury-buffer'. - -2001-11-18 Stephen Eglen - - * iswitchb.el (iswitchb-cannot-complete-hook): New variable to - control behaviour when no further completion is possible. - -2001-11-19 Colin Walters - - * calc/calc-macs.el (calc-wrapper, calc-slow-wrapper) - (math-showing-full-precision, math-with-extra-prec, math-working) - (calc-with-default-simplification) - (calc-with-trail-buffer): Use backtick. - (Math-zerop, Math-integer-negp, Math-integer-posp, Math-negp) - (Math-looks-negp, Math-posp, Math-integerp, Math-natnump) - (Math-ratp, Math-realp, Math-anglep, Math-numberp, Math-scalarp) - (Math-vectorp, Math-messy-integerp, Math-objectp, Math-objvecp) - (Math-integer-neg, Math-equal, Math-lessp, Math-primp) - (Math-num-integerp, Math-bignum-test, Math-equal-int) - (Math-natnum-lessp, math-format-radix-digit): Change to `defsubst'. - (calc-record-compilation-date-macro): Deleted. Callers updated. - (math-format-radix-digit): Move to calc-bin.el. - - * calc/calc.el (calc-record-compilation-date): Remove. - (calc-bug-address): Update. - (calc-settings-file): Use `user-init-file'. - - * calc/calc-mode.el (calc-settings-file-name, calc-save-modes): - Handle null `calc-settings-file'. - - * calc/calc-frac.el (calc-over-notation): Use `completing-read'. - * calc/calc-keypd.el (calc-keypad-mode): New. - (calc-do-keypad): Use it. - (calc-keypad-map): Move into `calc-keypad-mode'. - - * calc-math.el (calcFunc-sqrt, calcFunc-hypot): Add missing quote - to defalias argument. - - * calc-misc.el (math-fixnump, math-fixnatnump, calcFunc-trunc) - (calcFunc-floor): Ditto. - - * calc-units.el (calcFunc-usimplify): Ditto. - - * calc-aent.el, calc-ext.el, calc-incom.el, calc-misc.el - * calc-sel.el, calc-vec.el, calc-alg.el, calc-fin.el - * calc-keypd.el, calc-mode.el, calc-stat.el, calc-yank.el - * calc-arith.el, calc-forms.el, calc-lang.el, calc-mtx.el - * calc-store.el, calc.el, calc-bin.el, calc-frac.el, calc-macs.el - * calc-poly.el, calc-stuff.el, calcalg2.el, calc-comb.el - * calc-funcs.el, calc-maint.el, calc-prog.el, calc-trail.el - * calcalg3.el, calc-cplx.el, calc-graph.el, calc-map.el - * calc-rewr.el, calc-undo.el, calccomp.el, calc-embed.el - * calc-help.el, calc-math.el, calc-rules.el, calc-units.el - * calcsel2.el: Change all toplevel `setq' forms to `defvar' forms, - and move them before their first use. Use `when', `unless'. - Remove trailing periods from error forms. Add description and - headers suggested by Emacs Lisp coding conventions. - -2001-11-19 Stefan Monnier - - * newcomment.el (comment-indent): - Fix misindentation for comment-only lines. - (comment-indent-new-line): Only obey comment-multi-line if the - comment-ender is not the end-of-line. - -2001-11-19 Richard M. Stallman - - * net/net-utils.el (network-connection-service-abbrev-alist): - New variable. - - * emacs-lisp/cl-indent.el (lisp-indent-defmethod): - Advance to start of 3rd sexp by moving fwd and backing over it. - At first three elements, act like defun. - - * delsel.el (delete-selection-pre-hook): Handle and resignal - file-supersession errors to interact properly with userlock.el. - -2001-11-18 Richard M. Stallman - - * progmodes/fortran.el (fortran-mode-syntax-table): - Specify punctuation syntax for backslash. - - * progmodes/sh-script.el (sh-must-be-shell-mode): Function deleted. - All calls deleted. - - * international/mule-util.el (string-to-sequence): Make it obsolete. - (string-to-list, string-to-vector): Implement them directly - using append and vconcat, not with string-to-sequence. - - * startup.el (command-line): Set abbrevs-changed to nil after - reading the init file and the abbrevs file. - - * isearch.el (isearch): Use magenta2 as bg for (background light) - -2001-11-17 Richard M. Stallman - - * menu-bar.el (menu-bar-update-buffers-1): Don't pad the buffer name. - - * simple.el (minibuffer-history-sexp-flag): Doc fix. - -2001-11-17 Stefan Monnier - - * font-lock.el (font-lock-compile-keywords): New arg `regexp'. - If set and if applicable, add a regexp to highlight defun-like - text inside comments and strings. - (font-lock-fontify-keywords-region): Pass that new arg. - (font-lock-set-defaults): Move the code to set `font-lock-keywords' - to the end and pass that new arg. - (c-font-lock-keywords-2): Fix regex for labels. - (font-lock-match-c++-style-declaration-item-and-skip-to-next): - Make it work when LIMIT is several lines further. - (c-font-lock-keywords-3, c++-font-lock-keywords-3) - (objc-font-lock-keywords-3, java-font-lock-keywords-3): - Use backquote and make the regexes for `int a, b, c;' work on - multiple lines. - - * emacs-lisp/re-builder.el (reb-mode): Use define-derived-mode. - (font-lock-defaults-alist): Don't change it any more. - (reb-subexp-mode-map): Cleanup. - - * custom.el (custom-current-group-alist): New var. - (custom-declare-group): Set it. - (custom-current-group): New fun. - (custom-declare-variable, custom-handle-all-keywords): - Use it as a default if no :group argument is specified. - - * international/mule-cmds.el (locale-name-match): Use \` and \(?:. - (standard-keyboard-coding-systems): New var. - (set-locale-environment): Use it to decide whether or not to call - set-keyboard-coding-system. - (locale-language-names): Use \"French\" for "fr". - -2001-11-17 Richard M. Stallman - - * emacs-lisp/checkdoc.el (princ-list, checkdoc-read-event) - (add-to-list): Delete compatibility code. - (checkdoc-next-message-error): Doc fix. - -2001-11-17 Stephen Eglen - - * locate.el (locate): Show default locate pattern within the - prompt, but don't insert it into the minibuffer contents. - Catch the case when pattern is the empty string. - -2001-11-17 Eli Zaretskii - - * language/european.el ("French"): New language environment. - -2001-11-16 Richard M. Stallman - - * calendar/todo-mode.el (todo-save): Fix previous change. - - * subr.el (functionp): Do use cdr-safe on object. - -2001-11-16 Stefan Monnier - - * bindings.el (mode-line-mode-name): Only put the help-echo property - if the local-map property was put as well. - (global-map): Bind switch-frame, delete-frame, iconify-frame - and make-frame-visible events. - - * emacs-lisp/elp.el (elp-not-profilable): New var. - (elp-not-profilable-p): New function. - (elp-instrument-function): Use it. Use backquotes and push. - - * emacs-lisp/bytecomp.el (byte-compile-call-tree, byte-code-vector) - (byte-stack+-info, byte-compile-last-warned-form) - (byte-compile-last-logged-file): Don't defconst a variable. - (no-byte-compile): Declare. - (byte-compile-file): Don't boundp-check no-byte-compile any more. - (byte-compile-defvar): Leave defconst as is. - - * emacs-lisp/edebug.el (edebug-form-data, edebug-offsets) - (edebug-offsets-stack, edebug-read-dotted-list, edebug-def-name) - (edebug-current-offset, edebug-old-def-name, edebug-error-point) - (edebug-best-error): Don't defconst a variable. - (edebug-read-syntax-table): Use a char-table. - (edebug-lemacs-specific): Remove. - Toplevel: Eliminate check for Lucid Emacs. - - * pcvs-util.el (cvs-prefix-define): Don't defconst a variable. - - * rect.el (move-to-column-force): Mark obsolete. - (operate-on-rectangle, delete-extract-rectangle-line) - (insert-rectangle, delete-whitespace-rectangle-line) - (open-rectangle-line, clear-rectangle-line): Use move-to-column. - (string-rectangle-history): New var. - (string-rectangle, string-insert-rectangle): Use it. - (delete-rectangle-line): Fix pos/column mixup and simplify. - - * startup.el (normal-top-level-add-subdirs-to-load-path): Simplify. - (normal-top-level, command-line, command-line-1): Simplify. - - * tar-mode.el (tar-mode): Use define-derived-mode. - - * view.el (view-mode-enable): Don't use make-local-hook. - - * emacs-lisp/eldoc.el (eldoc-mode): Use define-minor-mode. - -2001-11-16 Richard M. Stallman - - * mail/mail-extr.el (mail-extr-voodoo): Treat a number as a word - if it doesn't make sense as anything else. - Don't recognize a "telephone number" at the beginning of the name. - (mail-extr-leading-garbage): Match non-word characters only. - -2001-11-16 Pavel Jan,Am(Bk - - * startup.el (command-line-processed): Doc fix. - - * apropos.el (apropos-next-label-button): Doc fix. - -2001-11-16 Stefan Monnier - - * comint.el (comint-mode): Simplify. - (make-comint-in-buffer): Run `comint-mode' only if necessary. - - * subr.el (eval-after-load): Make it work with features as well. - - * log-view.el (log-view-mode): Don't mark the buffer unmodified. - - * international/mule-cmds.el (describe-input-method): Setup xref. - (set-language-environment): Use functionp. - (locale-language-names, locale-charset-language-names) - (locale-preferred-coding-systems): Defconst and purecopy. - - * language/european.el (mac-roman): Add mime-charset property. - -2001-11-15 Richard M. Stallman - - * emacs-lisp/cl.el (values, values-list, multiple-value-list) - (multiple-value-apply, nth-value): Use defsubst rather than defalias - to get better doc strings. - -2001-11-15 Pavel Jan,Am(Bk - - * derived.el: Fix autoload cookie. - -2001-11-15 Richard M. Stallman - - * jka-compr.el (jka-compr-partial-uncompress): Fix previous change. - -2001-11-15 Stefan Monnier - - * menu-bar.el (menu-bar-edit-menu) : Put an explicit key binding. - -2001-11-15 Richard M. Stallman - - * dired.el (dired-undo): Display a message to explain - that this does not undo file system changes. - -2001-11-15 David Kastrup - - * mouse-drag.el (mouse-drag-throw): Push back non-drag events - into `unread-command-events' instead of trying keymap - lookups ourselves. This makes mouse-clicks do the right - thing even when keymaps of overlays are involved. - (mouse-drag-drag): Likewise. - -2001-11-15 Andreas Schwab - - * progmodes/ada-mode.el (ada-add-extensions): Quote regexp special - characters and append anchor to pattern added to auto-mode-alist. - -2001-11-15 Stefan Monnier - - * server.el (server-process-filter): Run pre/post-comment-hook - before/after visiting the file. - - * info-look.el (makefile-mode): Add info for automake. - (autoconf-mode): Fix the name of the index for automake. - - * international/latin-9.el: Give pilcrow punctuation syntax. - -2001-11-15 Andre Spiegel - - * vc.el: Documentation fixes. - -2001-11-14 Stefan Monnier - - * smerge-mode.el (smerge-match-conflict): Fix typo. - (smerge-diff): Be careful to read match-data early enough. - -2001-11-14 Colin Walters - - * calc/calc-alg.el (calcFunc-esimplify, calcFunc-simplify) - (calcFunc-subst): Use `defalias' instead of `fset' and - `symbol-function'. - - * calc/calc-arith.el (calcFunc-abs, calcFunc-float) - (calcFunc-ceil, calcFunc-round): Ditto. - - * calc/calc-bin.el (calcFunc-clip): Ditto. - - * calc/calc-ext.el (calcFunc-evalv): Ditto. - - * calc/calc-math.el (calcFunc-sqrt, calcFunc-hypot): Ditto. - - * calc/calc-misc.el (math-fixnump, math-fixnatnump) - (calcFunc-trunc, calcFunc-floor, calc-report-bug): Ditto. - - * calc/calc-units.el (calcFunc-unsimplify): Ditto. - - * calc-aent.el, calc-ext.el, calc-incom.el, calc-misc.el - * calc-sel.el, calc-vec.el, calc-alg.el, calc-fin.el - * calc-keypd.el, calc-mode.el, calc-stat.el, calc-yank.el - * calc-arith.el, calc-forms.el, calc-lang.el, calc-mtx.el - * calc-store.el, calc.el, calc-bin.el, calc-frac.el, calc-macs.el - * calc-poly.el, calc-stuff.el, calcalg2.el, calc-comb.el - * calc-funcs.el, calc-maint.el, calc-prog.el, calc-trail.el - * calcalg3.el, calc-cplx.el, calc-graph.el, calc-map.el - * calc-rewr.el, calc-undo.el, calccomp.el, calc-embed.el - * calc-help.el, calc-math.el, calc-rules.el, calc-units.el - * calcsel2.el: Style cleanup; don't put closing parens on their - own line, add "foo.el ends here" to each file, and update - copyright date. - - * README: Update maintainer. - -2001-11-13 Richard M. Stallman - - * progmodes/compile.el (recompile): Use compilation-arguments if - set, so as to be able to M-x recompile the exact command which - created a compilation-mode buffer. - - * progmodes/ada-mode.el (ada-fill-comment-prefix): Doc fix. - -2001-11-13 Gerd Moellmann - - * mouse.el (mouse-drag-region): Don't run the up-event - handler if window start changed due to the down-mouse event. - -2001-11-13 Richard M. Stallman - - * mouse.el (mouse-show-mark): Either move point to the mark - or use highlighting, never both. - (mouse-buffer-menu): If WINDOW is a frame, select its selected window. - -2001-11-13 Simon Josefsson - - * mail/smtpmail.el (top-level): Change maintainer to Simon - Josefsson, cleanup the smtpmail.el header. - - * mail/smtpmail.el (top-level): Don't require cl or base64. - (smtpmail-cred-server, smtpmail-cred-port, smtpmail-cred-key) - (smtpmail-cred-user, smtpmail-cred-cert, smtpmail-cred-passwd): - Defsubst instead of defmacro. - (smtpmail-intersection): Return value in reverse order. - (smtpmail-open-stream): Use stringp instead of string-to-list. - (smtpmail-open-stream, smtpmail-try-auth-methods): New functions, - separated from smtpmail-via-smtp. - - * mail/smtpmail.el (top-level): Autoload starttls, mail-utils and - rfc2104. Require base64 and cl. - (smtpmail-smtp-service): Doc fix. :type fix. - (smtpmail-debug-info): Doc fix. - (smtpmail-debug-verb, smtpmail-auth-credentials) - (smtpmail-starttls-credentials, smtpmail-auth-supported): - New variables. - (smtpmail-deduce-address-list, smtpmail-send-it): Don't require - mail-utils (it is autoloaded). - (smtpmail-cred-server, smtpmail-cred-port, smtpmail-cred-key) - (smtpmail-cred-user, smtpmail-cred-cert, smtpmail-cred-passwd) - (smtpmail-find-credentials, smtpmail-intersection): New utility funs. - (smtpmail-via-smtp): Support STARTTLS, if binary is installed. - (smtpmail-via-smtp): Support AUTH. - (smtpmail-via-smtp): Use `smtpmail-debug-verb' to control VERB. - -2001-11-13 Richard M. Stallman - - * ebuff-menu.el (electric-buffer-update-highlight): New function. - (electric-buffer-overlay): New variable. - (electric-buffer-menu-looper): Call electric-buffer-update-highlight. - (electric-buffer-list): Likewise. - - * isearch.el (isearch-whitespace-chars): Doc fix. - (isearch-mode): Handle negative search-slow-window-lines correctly. - -2001-11-13 Stefan Monnier - - * newcomment.el (comment-normalize-vars): Handle a nil comment-padding. - - * progmodes/ada-mode.el (ada-fill-comment-prefix): GNAT wants 2 spaces. - From Emmanuel Briot . - -2001-11-13 Colin Walters - - * calc/calc.el (calc-unread-command): Use `unread-command-events'. - - * calc/calc-mode.el (calc-settings-file-name): Don't hardcode - "~/.emacs"; use `read-file-name'. - - * calc/calc-graph.el, calc/calc-embed.el, calc/calc-graph.el - * calc/calc-misc.el, calc/calc-mode.el, calc/calc-prog.el - * calc/calc-sel.el, calc/calc-store.el, calc/calc-yank.el - * calc/calc.el: Use `frame-width' instead of `screen-width', - `frame-height' instead of `screen-height', and, - `executing-kbd-macro' instead of `executing-macro'. - - * calc/calc-embed.el (calc-do-embedded): Call `y-or-n-p' with - correct number of arguments. - - * calc/calc-aent.el (calc-do-alg-entry): - Use `blink-paren-function' instead of `blink-paren-hook'. - -2001-11-12 Richard M. Stallman - - * calendar/todo-mode.el (todo-save): Add save-excursion - and save-restriction. - - * server.el (server-edit, server-done): Doc fix. - - * simple.el (clone-indirect-buffer): Error if major mode symbol - has a no-clone-indirect property. - (clone-buffer): Check for obvious errors before reading clone name. - - * info.el (Info-mode): Add a no-clone-indirect property. - -2001-11-12 Sam Steingold - - * vc.el (vc-print-log): Bind `inhibit-read-only' to t before and - set-buffer-modified-p to nil after `vc-exec-after'. - * log-view.el (log-view-mode-map): Bind "q", "z", "m" and "d". - (log-view-mode): Make read-only. - (log-view-current-file): Do final `expand-file-name' in the - current `default-directory'. - (log-view-current-tag): Take an optional `where' arg. - (log-view-diff): New user command. - -2001-11-12 Pavel Jan,Am(Bk - - * progmodes/cpp.el (cpp-choose-face): Fix typo. - -2001-11-12 Sam Steingold - - * emacs-lisp/cl-indent.el (toplevel): Indent properly - `generic-flet', `generic-labels', `with-accessors', - `with-condition-restarts'. - -2001-11-12 Richard M. Stallman - - * dired.el: Many trivial doc fixes. - (dired-get-file-for-visit): New function. - (dired-find-alternate-file, dired-mouse-find-file-other-window) - (dired-view-file, dired-find-file-other-window, dired-display-file) - (dired-find-file): Use dired-get-file-for-visit. - -2001-11-12 Alex Schroeder - - * sql.el (sql-mode): Doc change. - - * sql.el (sql-mode-syntax-table): The backslash is no longer an - escape character. - -2001-11-12 Colin Walters - - * calc/calc-keypd.el (toplevel): Bind mouse buttons. - (calc-do-keypad): Don't attempt to use nonexistent global - mouse-map, use calc-keypad-map. - (calc-keypad-x-left-click): Renamed to calc-keypad-left-click. - (calc-keypad-left-click): Don't use mouse-map; update to new event - interface. - (calc-keypad-x-middle-click, calc-keypad-x-right-click): Ditto. - (calc-keypad-press): Use `unread-command-events' instead of - `unread-command-char'. - - * calc/calc-ext.el (calc-init-extensions): Update autoload names - to match files renamed on initial calc import. - -2001-11-12 Pavel Jan,Am(Bk - - * textmodes/flyspell.el (flyspell-default-dictionary): - Fix previous change. - -2001-11-12 Richard M. Stallman - - * textmodes/flyspell.el (flyspell-default-dictionary): - Fix custom type. - -2001-11-11 Richard M. Stallman - - * calendar/solar.el (solar-sunrise-and-sunset): - Exchange the two extreme values of day-length. - - * progmodes/sh-script.el (sh-must-be-shell-mode): - Allow modes derived from sh-mode. - - * emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): - Turn off error in some re-search-forward calls. - - * replace.el (query-replace-skip-read-only): New variable. - (perform-replace): If that variable is non-nil, ignore matches - that have a read-only property. - - * derived.el (define-derived-mode): Doc fix. - - * server.el (server-buffer-done): Test of server-existing-buffer - was backwards. - (server-existing-buffer): Doc fix. - - * textmodes/flyspell.el (flyspell-default-dictionary): - Allow nil as value, and make nil the default. - -2001-11-11 Eli Zaretskii - - * menu-bar.el (menu-bar-edit-menu): Don't use x-selection-exists-p if - it is not fboundp. - (clipboard-yank): Ditto. - -2001-11-11 Colin Walters - - The following changes are based on patches from - Eli Zaretskii , Kai Gro,A_(Bjohann - , and others. - - * calc/calc.el (toplevel): Require calc-macs. - (calc-minibuffer-size): New. - (calcDigit-nondigit): Use it instead of `buffer-size'. - (calcDigit-backspace): Likewise. - (calcDigit-nondigit): Use `minibuffer-contents' instead of - `buffer-string'. - (calc-minibuffer-contains): Use `minibuffer-prompt-end' instead of - `point-min'. - (calcDigit-key): Use `calc-minibuffer-contains' instead of a - `save-excursion'. - - * calc/calc-macs.el (calc-record-compilation-date-macro): Return a - simple `setq' form. - - * calc/calc-ext.el: (toplevel): Require calc. - (calc-fancy-prefix-map): New. - (calc-fancy-prefix): Use it. - (calc-fancy-prefix-other-key): New. - - * calc/calc-aent.el (toplevel): Require calc-macs during compilation. - (calc-do-quick-calc): Use `frame-width' instead of `screen-width'. - (calcAlg-edit): Use `minibuffer-contents' instead of `buffer-string'. - (calcAlg-enter): Likewise. - (calcAlg-enter): Use `minibuffer-prompt-end' instead of `point-min'. - -2001-11-10 Richard M. Stallman - - * abbrev.el (read-abbrev-file): Don't set save-abbrevs. - (quietly-read-abbrev-file): Doc fix. - - * startup.el (command-line): Read standard abbrev - file (abbrev-file-name), if it exists. - - * files.el (save-abbrevs): Default value is t. - - * progmodes/compile.el (compile-goto-error): Fix previous change - in the case where subsequent errors have not been parsed yet - because they are in a different source file. - -2001-11-10 Peter Kleiweg - - * progmodes/ps-mode.el (ps-mode-font-lock-keywords-1): - Merge two regular expressions into one. - (ps-mode): Make local bindings for `comment-start' and - `comment-start-skip'. - (ps-mode-looking-at-nested): Simplify an if-else construct; - use `set-match-data' to set the result. - -2001-11-10 Richard M. Stallman - - * textmodes/flyspell.el (flyspell-correct-word/local-keymap): - Function deleted. - (flyspell-correct-word): Old definition deleted. - (flyspell-correct-word/mouse-keymap): Renamed to flyspell-correct-word. - All references renamed too. - -2001-11-10 Gerd Moellmann - - * Makefile.in (finder_setwins, setwins): Exclude Calc. - -2001-11-09 Per Abrahamsen - - * wid-edit.el (checklist): Removed `:menu-tag'. - (radio-button-choice): Ditto. - (editable-list): Ditto. - -2001-11-09 Pavel Jan,Am(Bk - - * play/gomoku.el: Move definitions of constants to the beginning - of file, before their use. - -2001-11-09 Richard M. Stallman - - * textmodes/flyspell.el: Use the keymap property - instead of local-map, and don't use a minor-mode map. - (flyspell-mode-map): Variable deleted. - Don't mess with minor-mode-map-alist. - (calling add-minor-mode): Specify nil for keymap. - And always use add-minor-mode, now that it exists. - (flyspell-overlay-keymap-property-name): Set it to `keymap'. - (flyspell-mode-on): Don't locally bind flyspell-mouse-map - or flyspell-local-mouse-map. - (make-flyspell-overlay): Use flyspell-mouse-map directly. - (flyspell-mode): Doc fix. - (flyspell-mode-on): Don't call make-local-hook. - -2001-11-09 Sam Steingold - - * emacs-lisp/debug.el (debugger-make-xrefs): - Add buttons to all symbols. - -2001-11-09 Andre Spiegel - - * vc.el: Add John David Smith to credits. - - Suggested by Kalle Olavi Niemitalo : - - * vc-hooks.el (vc-error-occured): Backquotified. - (vc-file-prop-obarray): Use prime length for better efficiency. - - * vc.el (vc-clear-context): Fill obarray with 0, not nil. - -2001-11-09 Eli Zaretskii - - * info.el (Info-file-list-for-emacs): Add entries for Calc. - -2001-11-09 Miles Bader - - * subr.el (functionp): Don't consider macros as functions. - -2001-11-08 Miles Bader - - * subr.el (functionp): Make work correctly for macros and unbound - symbols. - - * comint.el (comint-send-input): Fix description of - `comint-process-echoes' in the doc-string. - -2001-11-08 Eli Zaretskii - - * international/mule.el (make-translation-table): Doc fix. - Suggested by Alex Schroeder . - -2001-11-07 Richard M. Stallman - - * info.el (Info-fontify-node): Highlight every third menu item. - -2001-11-07 Per Abrahamsen - - * cus-edit.el (custom-face-value-create): Don't ignore the - `customized-face' attribute when finding the current face spec. - -2001-11-07 Stefan Monnier - - * subr.el (with-local-quit): New macro. - (make-syntax-table): Always inherit. - (functionp): Be more careful when `object' is a symbol. - - * dabbrev.el (dabbrev-completion): Use "*Completions*". - -2001-11-07 Paul Eggert - - * dired.el (dired-move-to-filename-regexp): - Do not distinguish between ASCII letters and non-ASCII characters. - Don't allow comma except in the form "month day, year". - Don't allow space between month name and comma. - Clean up the code that checks for trailing period, comma, and space. - Remove now-obsolete comments, and add more commentary about - Japanese dates. - Always gobble up trailing spaces, instead of doing it only sometimes. - -2001-11-07 Miles Bader - - * paren.el (show-paren-match-face): Add dark-background variant. - -2001-11-06 Stefan Monnier - - * emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Paren typo. - (lisp-mode-variables): Don't set paragraph-{start,separate}. - Don't disable adaptive-fill-mode. - (lisp-fill-paragraph): Use tab-width rather than 8. - Prevent filling the first line of docstrings. - -2001-11-06 Richard M. Stallman - - * play/gomoku.el (gomoku): Doc fix. - - * jka-compr.el (jka-compr-partial-uncompress): - Support an alternative of not using dd. - (jka-compr-dd-program): Use defcustom to define this. - (jka-compr-load-suffixes): Use defcustom. - (jka-compr-mode-alist-additions): Use defcustom. - -2001-11-06 Stefan Monnier - - * font-lock.el (font-lock-match-c-style-declaration-item-and-skip-to-next): - Also work when LIMIT is further than the end of line. - -2001-11-06 Eli Zaretskii - - * international/quail.el (quail-update-leim-list-file): Print the - offending file name if some of its quail-define-package forms is broken. - -2001-11-05 Richard M. Stallman - - * emacs-lisp/lisp-mode.el (eval-last-sexp-1): Return the value - of the evaluated form. - -2001-11-05 Paul Eggert - - * ls-lisp.el (ls-lisp-time-to-seconds): New function. - (ls-lisp-format-time): Emulate GNU fileutils 4.1.1 ls, whose time - stamps always line up by default. Also, it uses a slightly - different window to determine whether files are "recent". - -2001-11-05 Andrew Innes - - * makefile.w32-in (bootstrap-clean-CMD, bootstrap-clean-SH): - Don't attempt to remake autoloads before nuking .elc files. - -2001-11-04 Richard M. Stallman - - * emacs-lisp/lisp-mode.el (last-sexp-toggle-display): Cope if - previous-single-property-change or next-single-char-property-change - returns nil. - - * international/mule-cmds.el (set-locale-environment): - Make it interactive; make arg optional. - - * international/mule-diag.el (help-funs): Require help-funs. - -2001-11-04 Eli Zaretskii - - * term/internal.el (term-setup-hook): Add IT-setup-unicode-display. - -2001-11-04 Miles Bader - - * startup.el (fancy-splash-head): Reapply Gerd's hack to make the - shadow of the splash image grey on a dark background instead of black. - -2001-11-03 Stefan Monnier - - * term.el (all faces): Don't (copy-face 'default ). - - * term/xterm.el (function-key-map): - Add entry for `ESC [ 3 ~' -> - Add entries `ESC O 5 [ABCD]' -> C-{up,down,right,left}. - Use inheritance so that .emacs and terminfo take precedence. - -2001-11-03 Eli Zaretskii - - * tooltip.el (tooltip-delay): Decrease to 0.7. - (tooltip-hide-delay): Enlarge to 10. - -2001-11-03 Richard M. Stallman - - * startup.el (fancy-splash-tail): Explain how to recover - from a crash, if there was a crash. - (command-line-1): Reorganize display of startup screen, - to simplify the logic. Use a temp buffer for it. - -2001-11-03 Eli Zaretskii - - * frame.el (set-background-color, set-foreground-color): - Call face-set-after-frame-default, to propagate the new colors to - the frame's parameters alist. - - * calendar/timeclock.el (timeclock-out): Signal an error if - timeclock-last-event is nil. - -2001-11-02 Stefan Monnier - - * textmodes/fill.el (fill-context-prefix): Fix braino. - - * international/quail.el (quail-help): - Use `help-buffer' and move `help-setup-xref' to beginning. - - * international/mule-cmds.el (describe-language-environment): - Use `help-buffer' and move `help-setup-xref' to beginning. - - * international/mule-diag.el (list-character-sets) - (sort-listed-character-sets, describe-character-set) - (describe-coding-system, describe-fontset, list-fontsets): - Use `help-buffer' and move `help-setup-xref' to beginning. - (describe-char-after): Use `internal-describe-syntax-value'. - -2001-11-02 Richard M. Stallman - - * mouse.el (popup-menu): If the user refuses to select - from a menu, don't try to invoke the menu. - -2001-11-02 Miles Bader - - * help-mode.el (help-xref): New button type. - (help-function, help-variable, help-face, help-coding-system) - (help-input-method, help-character-set, help-type, help-symbol) - (help-back, help-info, help-customize-variable, help-customize-face) - (help-function-def, help-variable-def): Use it as a supertype. - Remove `action' property. - - * international/mule-diag.el (describe-character-set) - (describe-coding-system): Pass correct args to `help-xref-button'. - (sort-listed-character-sets): New button type. - (list-character-sets): Use it. - (list-charset-chars): New button type. - (list-character-sets-1): Use it. - -2001-11-01 Stefan Monnier - - * indent.el (tab-always-indent, indent-for-tab-command): - Remove redundant `never' setting. - - * fill.el (fill-region-as-paragraph): Don't forget to skip - over current whitespace before looking for a preceding space. - -2001-11-01 Richard M. Stallman - - * files.el (file-newest-backup): Don't pass backup file name - thru file-name-sans-versions, because it never has version numbers. - - * textmodes/sgml-mode.el (sgml-xml-guess): Fix regexp - to avoid ambiguous nested loops. - - * files.el (find-file-noselect): Offer to change buffer-read-only - only when the file's read-only status has changed from before - as well as disagreeing with the buffer's current status. - (buffer-file-read-only): New var, local in all buffers. - - * buff-menu.el (buffer-menu): Doc fix. - (buffer-menu-other-window): Doc fix. - (list-buffers, list-buffers-noselect): Doc fix. - -2001-11-01 Gerd Moellmann - - * startup.el (command-line): If the terminal Emacs is running on - has erase char set to ^H, use the Backspace key for deleting - backward, and the Delete key for deleting forward. - -2001-11-01 Miles Bader - - * button.el (define-button-type): Make sure every user-defined - button type has a supertype. - -2001-10-31 Jason Rumney - - * international/mule-cmds.el (locale-language-names): Add chs and - cht as aliases for Chinese-GB and Chinese-BIG5. - -2001-10-31 Richard M. Stallman - - * bindings.el (mode-line-frame-identification): Add doc string. - (mode-line-position, mode-line-modes): New variables. - (mode-line-format): Use mode-line-position for the part - that displays the position-in-buffer info. - Use mode-line-modes for the part that displays major and minor modes. - -2001-10-31 Sam Steingold - - * emacs-lisp/debug.el (debugger-make-xrefs): New function. - (debugger-setup-buffer): Call it. - (debugger-mode-map): Bind RET and mouse-2. - -2001-10-31 Pavel Jan,Am(Bk - - * startup.el: Document command line option --no-window-system - instead of --no-windows. - -2001-10-30 Stefan Monnier - - * progmodes/autoconf.el (autoconf-mode): Fix comment-start-skip. - - * font-lock.el (java-font-lock-syntactic-face-function): New fun. - (font-lock-defaults-alist): Use it. - From David Ponce - - * progmodes/perl-mode.el (perl-indent-line): Use `eq' to compare - output of `char-after'. - - * bindings.el (ctl-x-map): Add binding for C-x (, C-x ) and C-x e. - - * simple.el (reindent-then-newline-and-indent): Insert the newline - before indenting the first line. - (undo-get-state, undo-revert-to-state): New funs. - (shell-command): Don't kill the buffer even if empty. - (transpose-subr-start1, transpose-subr-start2, transpose-subr-end1) - (transpose-subr-end2): Remove. - (transpose-subr): Add `special' arg and simplify. - (transpose-subr-1): Rewrite. - (do-auto-fill): Use fill-indent-according-to-mode and fill-nobreak-p. - (rfc822-goto-eoh): Simplify. - -2001-10-30 Richard M. Stallman - - * enriched.el (enriched-face-ans): Fix previous change. - -2001-10-30 Gerd Moellmann - - * international/iso-acc.el (iso-accents-compose): Remove a - superfluous setq. - -2001-10-30 Eli Zaretskii - - * buff-menu.el (list-buffers-noselect): If the buffer's name - starts with a blank, but it visits a file, do show it (for files - whose names start with a blank). - -2001-10-30 Stefan Monnier - - * textmodes/fill.el (sentence-end-double-space) - (sentence-end-without-period): Move to paragraphs.el. - (fill-indent-according-to-mode): Change default to t. - (fill-context-prefix): Simplify control-flow and use a more - sophisticated merge that unifies both previous checks. - (fill-single-word-nobreak-p, fill-french-nobreak-p): New funs. - (fill-nobreak-predicate): Make it into a defcustom'd hook. - (fill-nobreak-p): New fun. - (fill-region-as-paragraph): Use it. - Handle `fill-indent-according-to-mode' slightly differently. - (fill-individual-paragraphs-prefix): Simplify the control-flow. - (fill-individual-paragraphs-citation): Fix. - - * textmodes/paragraphs.el (use-hard-newlines): Use define-minor-mode. - (paragraph-start): Change default to the `text-mode' value. - (sentence-end-double-space, sentence-end-without-period): - Move from fill.el. - (forward-paragraph): Use `parstart' and `parsep' for temp variables - rather than rebinding `paragraph-start' and `paragraph-separate'. - - * indent.el (indent-line-function): Change default to indent-relative. - (tab-always-indent): Add an `never' setting. - (indent-according-to-mode): Handle `indent-relative' and - `indent-relative-maybe' specially. - (indent-for-tab-command): Rename `prefix-arg' to `arg'. - Handle the `never' case for `tab-always-indent'. - Don't call indent-according-to-mode for indent-relative' and - `indent-relative-maybe'. - (insert-tab): Rename `prefix-arg' to `arg'. - (indent-region): Indent the first line as well. - (indent-relative): Don't mark the buffer modified if the indentation - is unchanged. - - * textmodes/text-mode.el (paragraph-indent-minor-mode): - Don't set paragraph-separate. Set paragraph-start more carefully. - Set indent-line-function. - (paragraph-indent-text-mode): Use it and define-derived-mode. - (text-mode-map): Remove the \t binding. - (text-mode): Simplify now that the default is more favorable. - -2001-10-29 Stefan Monnier - - * emacs-lisp/find-func.el (find-function-search-for-symbol): - If the regexp doesn't match, use a looser one. - (find-variable-noselect): Add `file' argument. - - * pcvs.el (cvs-mode-commit-hook): New hook. - (cvs-mode-commit): Run it. - - * log-edit.el (log-edit): Run hook after `log-edit-files'. - - * emacs-lisp/edebug.el (delay-mode-hooks): Add edebug-spec. - (edebug-instrument-function): Use `find-function-noselect'. - -2001-10-29 Richard M. Stallman - - * term.el (term-if-emacs19): Macro deleted. - Callers changed to use progn instead. - - * frame.el (blink-cursor-mode): Doc fix. - - * files.el (find-backup-file-name): Use make-backup-file-name. - - * emacs-lisp/edebug.el (edebug-window-live-p): Always alias to - window-live-p. - (edebug-set-conditional-breakpoint): Unconditionally use - the former Emacs >=19 definition. - (edebug-mark): Define unconditionally. - (edebug-eval-expression): Always call read-from-minibuffer - and specify history list. - (edebug-lemacs-specific): Override emacs-mark, edebug-window-live-p, - edebug-set-conditional-breakpoint. - (edebug-emacs-version-specific): Function deleted; - do the job at top level. - (edebug-emacs-19-specific): Function deleted, this is the default. - -2001-10-29 Sam Steingold - - * w32-fns.el (convert-standard-filename): Handle cygwin-specific - "/cygdrive/LETTER/" pathnames. - -2001-10-29 Eli Zaretskii - - * faces.el (invert-face): Check for 'unspecified, not for nil, - when testing whether face colors are not specified. - From David.Kastrup@t-online.de (David Kastrup). - (read-face-name): Doc fix. - (make-face-bold, make-face-unbold, make-face-italic) - (make-face-unitalic, make-face-bold-italic, invert-face): - Remove trailing blank from the prompt passed to read-face-name. - -2001-10-29 Sam Steingold - - * emacs-lisp/bytecomp.el (byte-recompile-directory): - Report numbers of files skipped and failed too. - (byte-compile-file): Return 'no-byte-compile for skipped files. - -2001-10-29 Kai Gro,A_(Bjohann - - * log-view.el (log-view-mode-map): Bind `M-n' and `M-p', not `M n' - and `M p'. - -2001-10-29 Gerd Moellmann - - * international/iso-acc.el (iso-accents-compose): Push SECOND-CHAR - as is on unread-command-events instead of `(SECOND-CHAR)'. - -2001-10-29 Andre Spiegel - - * vc.el: Mention vc-*-switches in backend API documentation. - (vc-annotate): Adapt doc string to recent change. - -2001-10-29 Gerd Moellmann - - * enriched.el (enriched-face-ans): Handle face attributes - of the form `(FACE1 FACE2 ...)'. - - * dired-x.el (dired-omit-startup): Show ``Omit'' only in Dired buffers. - -2001-10-29 Alex Schroeder - - * progmodes/sql.el (sql-mysql): Doc change by RMS. - - * progmodes/sql.el (sql-db2): Doc change. - (sql-help): Doc change by Christian Egli . - (sql-mysql): Doc change by Christian Egli . - -2001-10-29 Gerd Moellmann - - * env.el (substitute-env-vars): Don't quote argument to `rx'; - it's a macro. - -2001-10-28 Per Abrahamsen - - * cus-start.el (recursive-load-depth-limit): Added. - -2001-10-28 Richard M. Stallman - - * textmodes/ispell.el (version18p, version20p): Vars deleted. - All uses removed--assume Emacs version is >= 20. - - * mail/supercite.el (sc-emacs-features): Test for "Emacs 19" - by really checking that it is not version 18. - - * emacs-lisp/lisp-mode.el (eval-defun): Doc fix. - -2001-10-28 Miles Bader - - * faces.el (face-attribute): Add INHERIT argument, consider face - inheritance if it's non-nil. - (face-attribute-merged-with): New function. - (face-attribute-specified-or): New macro. - (face-foreground, face-background, face-stipple): Add INHERIT - argument. Use `face-attribute-specified-or'. - -2001-10-28 Stefan Monnier - - * font-lock.el: Require `syntax'. - (font-lock-defaults-alist): Don't define keywords for lisp languages. - Use `c-font-lock-syntactic-face-function' for c languages. - (font-lock-mode): Don't unset vars when turning the mode off. - (font-lock-default-fontify-buffer): Don't unset vars at the end. - (font-lock-extra-managed-props): New var. - (font-lock-default-unfontify-region): Use it. - (font-lock-apply-syntactic-highlight): Flush the syntax cache. - Don't eval the value when there's no match. - (font-lock-ppss-stats): New var. - (font-lock-ppss): New fun. - (font-lock-fontify-syntactically-region): Use it and syntax.ppss. - (font-lock-apply-highlight): Allow `highlight' to set several props. - (font-lock-set-defaults): Use dolist. - (font-lock-unset-defaults): Remove. - (font-lock-match-c-style-declaration-item-and-skip-to-next): - Try to recognize prototypes using `foo P_ ((args))'. - ({c,c++,java,objc}-font-lock-keywords-{1,2,3}): Don't setq a defconst. - (c-font-lock-keywords-2): Fix last change to still use Anders' trick. - (c-font-lock-syntactic-face-function): New function. - (font-lock-match-c++-style-declaration-item-and-skip-to-next) - (c++-keywords): Use a more sophisticated regexp to handle - shallowly nested templates. - -2001-10-27 Stefan Monnier - - * textmodes/sgml-mode.el (sgml-empty-tags): New var. - (sgml-tag): Use it. Cleanup with `cond'. - (sgml-tags-invisible): Make sgml-tags-invisible buffer-local. - Mark the overlays and only delete those that are marked. - (sgml-skip-close-p): Remove. - (sgml-value): Replace sgml-skip-close-p with its definition. - (html-tag-alist): Use sgml-xml a bit more. - (html-mode): Set sgml-empty-tags. - - * textmodes/texnfo-upd.el: Use `when', `dolist', `push', ... - (texinfo-update-node, texinfo-sequential-node-update): - Don't bind the obsolete `auto-fill-hook'. - (texinfo-multi-file-included-list,texinfo-multi-file-master-menu-list): - Use `set-buffer' rather than `switch-to-buffer'. - (texinfo-multi-file-update): Use "Top" rather than `up-node-name'. - Use `set-buffer' rather than `switch-to-buffer'. - - * mail/sendmail.el (mail-mode-syntax-table): Let it inherit from - text-mode-syntax-table. - (mail-mode): Use define-derived-mode. - Fix ordering of alternatives in adaptive-fill-regexp. - (mail-mode-map): Don't rely on keymap's internal representation. - -2001-10-27 Sam Steingold - - * textmodes/sgml-mode.el (sgml-xml): Renamed from `html-xhtml'. - (sgml-xml-guess): Extracted from `html-mode' and generalized. - (sgml-mode-common): Call it. - (sgml-mode, html-mode): Set `mode-name' based on `sgml-xml'. - (sgml-tag, sgml-skip-close-p, html-tag-alist, html-line) - (html-horizontal-rule, html-image, html-ordered-list): - (html-unordered-list, html-list-item, html-paragraph): - (html-checkboxes, html-radio-buttons): Use `sgml-xml' instead of - `html-xhtml'. - -2001-10-26 Masayuki Ataka - - * textmodes/texinfmt.el (texinfo-format-ifnotinfo): New function. - (ifnothtml): New alias. - -2001-10-27 Stefan Monnier - - * textmodes/text-mode.el (text-mode): Use define-derived-mode. - (toggle-text-mode-auto-fill): Use derived-mode-p. - -2001-10-27 Gerd Moellmann - - * net/ange-ftp.el (ange-ftp-send-cmd): Call fix-name-func for - `mdtm'. From "Forrest Cahoon" . - -2001-10-26 Eli Zaretskii - - * term/pc-win.el (x-frob-font-slant, x-frob-font-weight): - Add make-obsolete cookies, to follow faces.el. - - These changes avoid warnings from the byte compiler in faces.el: - - * faces.el (internal-get-face): Use facep instead of the obsolete - internal-find-face. - (internal-frob-font-weight, internal-frob-font-slant): - New defaliases for obsolete functions. - (x-make-font-bold, x-make-font-demibold, x-make-font-unbold) - (x-make-font-italic, x-make-font-oblique, x-make-font-unitalic) - (x-make-font-bold-italic): Use internal-frob-font-weight and - internal-frob-font-slant aliases instead of the obsolete - x-frob-... functions. - -2001-10-26 Sam Steingold - - * textmodes/sgml-mode.el (html-mode): Set `html-xhtml' from the - DOCTYPE; set `mode-name' based on it. - (html-tag-alist): Use `html-xhtml' for "li", "dt" and "dd". - (sgml-tag): Close empty tags in XHTML. - -2001-10-26 Jason Rumney - - * w32-fns.el: (w32-charset-info-alist): Use ANSI for iso10646-1 - when UNICODE is not defined. - -2001-10-26 Sam Steingold - - * font-lock.el (c-font-lock-keywords-2): Do not require labels to - be alone on the line. - -2001-10-26 Eli Zaretskii - - * button.el (button): Special face definition for MS-DOS terminals. - -2001-10-26 Sam Steingold - - * progmodes/sh-script.el (sh-font-lock-syntactic-keywords): - Protect the /= test by checking that the args are non-nil. - (sh-font-lock-close-heredoc): Check eof for being non-nil. - -2001-10-26 Tomas Abrahamsson - - * textmodes/artist.el (artist-version): 1.2.4. - (artist-butlast-fn): New variable. - (artist-butlast): New function. - (artist-ellipse-mirror-quadrant): Use it. - (artist-mouse-draw-poly): Use nil for `point-list'. - (artist-mouse-draw-poly): Check for point-list being nil. - -2001-10-26 Peter Kleiweg - - * progmodes/ps-mode.el (ps-mode-print-function): Remove quote for - lambda expression. - (ps-mode-menu-main): Submenu with options on/off was replaced with - a toggle button. - (ps-mode, ps-run-mode): Define with `define-derived-mode' - (ps-mode): Autoload cookie added on same line as comment - (ps-mode-tabkey, ps-mode-backward-delete-char): - (ps-mode-r-balance): Replace `delete-horizontal-space' and - `indent-to' with `indent-line-to' - (ps-mode-print-buffer, ps-mode-print-region): Use `funcall' - instead of `eval'. - (ps-mode-print-region): Use `with-temp-buffer'. - (ps-run-start): Use of `mapconcat'. Use `apply' instead of `eval'. - (numerous places): Add back-tick and tick around names in - docstrings, fix punctuation in docstrings, remove trailing spaces. - -2001-10-25 Stefan Monnier - - * textmodes/sgml-mode.el (sgml-font-lock-keywords-1): Ignore comments. - (sgml-font-lock-keywords-2): Use `eval'. Moved from sgml-mode-common. - (sgml-font-lock-syntactic-keywords): New var. - (sgml-mode-common): Drop the two args. - Don't make buffer-local variables that aren't used. - Don't set sgml-font-lock-keywords-2 now that it uses `eval instead. - Don't set `before-string' props from sgml-display-text. - (sgml-mode): Use define-derived-mode. - (sgml-tags-invisible): Use sgml-display-text. - (sgml-quote): New command. - (html-tag-alist): Add args for `span'. - (html-mode): Use define-derived-mode. - Set sgml-display-text and sgml-tag-face-alist. - -2001-10-25 Sam Steingold - - * add-log.el (add-log-always-start-new-record): New user option. - (add-change-log-entry): Use it. - -2001-10-25 Richard M. Stallman - - * progmodes/etags.el (tags-query-replace): Make tags-loop-scan - bind case-fold-search if FROM is not all lower case. - -2001-10-25 Gerd Moellmann - - * startup.el (normal-top-level): Check for frame-initial-frame - only if it's really used. - - * mail/mh-utils.el (mh-recenter): Call recenter with arg `(4)'. - - * progmodes/compile.el (compilation-parse-errors-filename-function): - New variable. - (compilation-parse-errors): Use it. - -2001-10-25 Stefan Monnier - - * emacs-lisp/checkdoc.el (checkdoc-eval-defun): Call eval-defun - interactively so that C-u M-C-x still does edebug. - (checkdoc-sentencespace-region-engine): Don't force a double-space - after `.' if it doesn't look like an end-of-sentence. - (debug-ignored-errors): Add `disambiguate ...'. - -2001-10-24 Stefan Monnier - - * textmodes/texinfo.el (texinfo-environments) - (texinfo-environment-regexp): Hoist. - (texinfo-font-lock-keywords): Use `italic' and `bold' faces. - Only highlight the menu name in menu items. - Setup `@foo ... @end foo' as text clones. - (texinfo-clone-environment): New function. - (texinfo-mode): Simplify auto-fill-inhibit-regexp. - (texinfo-insert-block): Simplify. - (texinfo-insert-quote): Insert a plain " if preceded by \ or if - the command is repeated. - (texinfo-last-unended-begin, texinfo-next-unmatched-end): New funs. - (texinfo-insert-@end): Simplify. - - * textmodes/texnfo-upd.el (texinfo-section-types-regexp) - (texinfo-section-level-regexp, texinfo-subsection-level-regexp) - (texinfo-subsubsection-level-regexp) - (texinfo-update-menu-same-level-regexps) - (texinfo-update-menu-higher-regexps) - (texinfo-update-menu-lower-regexps): Hoist to eliminate warnings. - - * derived.el (define-derived-mode): Use {delay,run}-mode-hooks. - (derived-mode-p): Autoload. - - * subr.el (delay-mode-hooks, delayed-mode-hooks, run-mode-hooks): - New vars and functions. - (text-clone-maintain, text-clone-create): New functions. - -2001-10-25 Miles Bader - - * facemenu.el (facemenu-add-new-face): Fix variable names. - -2001-10-24 Richard M. Stallman - - * facemenu.el (facemenu-unlisted-faces): Improve doc strings - of t and nil values. - (facemenu-set-face): Handle START and END interactively. - (facemenu-set-foreground): Don't use a face; specify color directly. - (facemenu-set-background): Likewise. - (facemenu-set-face-from-menu): Doc fix. - (facemenu-active-faces): Use face-attribute-vector - to handle bare attributes not in faces. - (facemenu-get-face): Don't handle face names fg:... and bg:... - specially. - (facemenu-add-new-face): New argument MENU. - New way to handle adding colors to the color menus. - - * env.el (substitute-env-vars): Quote the arg to rx. - -2001-10-24 Sam Steingold - - * mouse.el (mouse-buffer-menu-mode-groups): Added "Version - Control" and "SGML" groups. - -2001-10-24 Martin Stjernholm - - * progmodes/cc-engine.el (c-beginning-of-member-init-list): - Better handling of C++ template args to avoid confusion with `<' - and `>' used as operators in member init expressions. - -2001-10-24 Gerd Moellmann - - * replace.el (perform-replace): Move START and END parameters - to the end of the argument list and make them optional. - - * progmodes/ebrowse.el, progmodes/etags.el: Adapt to change in - perform-replace. - - * international/fontset.el (x-must-resolve-font-name): New function. - (x-complement-fontset-spec): Use it. - -2001-10-23 Stefan Monnier - - * uniquify.el (uniquify-get-proposed-name): Fix (.. "usr" "/usr" 0). - - * progmodes/compile.el (compile-mouse-goto-error, compile-goto-error): - Turn caadr into caar of cdr. - -2001-10-23 Gerd Moellmann - - * info.el (Info-fontify-node): Bind down-mouse-{1,2} instead - of mouse-{1,2} since dragging is on the down event. - - * play/doctor.el (make-doctor-variables): Remove a '($ please)'. - - * mail/mh-utils.el (mh-recenter): Call `recenter' with arg t - if ARG is nil. - - * desktop.el (desktop-last-buffer): New variable. - (desktop-create-buffer): Set it. - (desktop-read): Bind it and switch to that buffer. - -2001-10-22 Gerd Moellmann - - * progmodes/compile.el (compilation-set-window-height): - Select old window only if it's still live. - -2001-10-22 Pavel Jan,Am(Bk - - * help-mode.el (help-buffer): Remove debugging code. - From Stefan Monnier . - -2001-10-22 Eli Zaretskii - - * files.el (file-name-sans-extension, file-name-extension): - Don't count the leading dots in file names as signaling an extension. - -2001-10-22 Andre Spiegel - - * vc.el (vc-diff-switches): Doc rewritten. - -2001-10-22 Eli Zaretskii - - * tooltip.el (tooltip-set-param): Doc fix. - - * textmodes/sgml-mode.el (sgml-mode-map): Bind 8-bit codes above - 127 to sgml-maybe-name-self. - (sgml-name-8bit-mode): Doc fix. - (sgml-char-names-table): New variable. - (sgml-name-char): Support non-ASCII and mule-unicode-* - characters. Doc fix. - (sgml-maybe-name-self): Convert unibyte characters to multibyte. - - * tooltip.el (tooltip-x-offset, tooltip-y-offset): Mention in the - doc string the effect of `left' and `top' parameters in - tooltip-frame-parameters, the default values, and the units. - (tooltip-frame-parameters): Mention `top' and `left' in the doc string. - (tooltip-show): Mention in the doc string the `top' and `left' - parameters in tooltip-frame-parameters, and x-max-tooltip-size. - -2001-10-22 Andre Spiegel - - Add autoscaling support for vc-annotate. - From J.D. Smith . - - * vc.el (vc-annotate-display-default): Accept colormap scaling - ratio (now deprecated). - (vc-annotate-display-autoscale): Added. - (vc-annotate-add-menu): New autoscaling menu options "Span to - Oldest" and "Span Oldest->Newest". Easymenu support added for - toggle menus driven by customize variable `vc-annotate-display-mode'. - (vc-annotate-display-select): Added. - (vc-annotate): Changed temp-buffer-show-function to - `vc-annotate-display-select'. - (vc-annotate-display): Removed arguments BUFFER and BACKEND. - Added argument OFFSET. Instead of backend function, calls now - generic `vc-annotate-difference'. - (vc-annotate-difference): Added as generic function instead of - backend-specific function. No longer takes argument POINT, but - instead accepts a time OFFSET. - (vc-default-annotate-current-time): Added. - - * vc-cvs.el (vc-cvs-annotate-difference): Removed to generic - version in vc.el, with - (vc-cvs-annotate-current-time): Added, as override of default. - (vc-cvs-annotate-time): Added. Taken mostly from the (now removed) - `vc-cvs-annotate-difference'. - -2001-10-22 Gerd Moellmann - - * saveplace.el (save-place): Require `saveplace'. - - * progmodes/cwarn.el (cwarn-font-lock-feature-keywords-alist): - Use `sexp' for :value-type instead of `face'. - -2001-10-21 Eli Zaretskii - - * mail/rmailsum.el (rmail-summary-font-lock-keywords): Fix the - regexps due to 5-digit message IDs. - -2001-10-21 Jason Rumney - - * term/w32-win.el (redisplay-dont-pause): Don't set. - -2001-10-21 Miles Bader - - * help-funs.el (help-manyarg-func-alist): Variable removed. - -2001-10-21 Miles Bader - - * help-funs.el (help-manyarg-func-alist): Remove entries for - `insert', `insert-and-inherit', `insert-before-markers', - `insert-before-markers-and-inherit', `message', `message-box', - `message-or-box', `propertize', `format', `encode-time', `append', - `concat', `vconcat', `nconc', `widget-apply', `make-hash-table', - `insert-string', `ml-if', `ml-provide-prefix-argument', and - `ml-prefix-argument-loop'. - -2001-10-21 Andre Spiegel - - * vc.el (vc-diff-internal, vc-coding-system-for-diff) - (vc-default-diff-tree): New functions. - (vc-version-diff): Use them. As a result, coding systems are now - set up properly for all sorts of diffs, and tree diffs can now - also be done locally. - (vc-diff): With a prefix argument, don't require that it's called - from a buffer under version control. - (diff-switches): Remove duplicate definition. - - * vc-cvs.el (vc-cvs-diff-tree): New function. - -2001-10-21 Miles Bader - - * help-funs.el (help-manyarg-func-alist): Remove entries for - `list', `vector', `make-byte-code', `call-process', - `call-process-region', `string', `+', `-', `*', `/', `max', `min', - `logand', `logior', and `logxor'. - - * wid-edit.el (checkbox): Swap bg/fg colors in image, and invert - image bits to compensate. Use `make-string' instead of - `make-bool-vector' (XBM apparently wants byte-aligned rows). - -2001-10-20 Kim F. Storm - - * simple.el (kill-ring-save): Don't show extent of copied region - if using transient-mark-mode and region is fully visible. - -See ChangeLog.9 for earlier changes. - -;; Local Variables: -;; coding: iso-2022-7bit -;; End: - - Copyright (C) 2001, 2002 Free Software Foundation, Inc. - Copying and distribution of this file, with or without modification, - are permitted provided the copyright notice and this notice are preserved. +2004-04-14 Stefan Monnier + + * emacs-lisp/bytecomp.el (batch-byte-compile-file): + Give a backtrace if requested. + + * progmodes/ada-mode.el (ada-create-menu): Remove redundant call. + + * progmodes/python.el (python-mouse-2-command, python-RET-command): + Remove unused functions. + (python-orig-start-line, python-orig-file): Remove. + (python-orig-start): New var. + (python-input-filter, python-compilation-line-number) + (python-send-region, python-load-file): Use it. + + * info.el (info): Always jump to *info*. + + * subr.el (posn-set-point): New function. + + * mouse.el (mouse-set-point): Use it. + + * progmodes/compile.el (compile-goto-error): Use it. + (compilation-button-map): New keymap. + (compilation-error-properties): Use it. + (compilation-shell-minor-mode-map): Don't bind mouse-2. + + * smerge-mode.el (smerge-popup-context-menu): Use it. + + * emacs-lisp/checkdoc.el (checkdoc-output-mode-map) + (checkdoc-find-error-mouse, checkdoc-find-error): Use it to merge the + mouse and non-mouse case. + + * diff-mode.el (diff-goto-source): Make it work for mouse bindings. + (diff-mouse-goto-source): Make it an alias of diff-goto-source. + + * pcvs.el (cvs-mode-toggle-mark): Rename from cvs-mouse-toggle-mark. + Make it work for non-mouse events. + + * pcvs-info.el (cvs-status-map): Update binding name. + +2004-04-14 Mark A. Hershberger + + * xml.el (xml-maybe-do-ns): New function to handle namespace + parsing of both attribute and element names. + (xml-ns-parse-ns-attrs, xml-ns-expand-el, xml-ns-expand-attr) + (xml-intern-attrlist): Remove in favor of xml-maybe-do-ns. + (xml-parse-tag): Update assumed namespaces. Clean up namespace parsing. + (xml-parse-attlist): Make it do its own namespace parsing. + +2004-04-14 Dave Love + + * progmodes/python.el (run-python): Fix use of \n. + (python-load-file): Remove `try' from Python fragment. + (python-describe-symbol): Fix message. + + * comint.el: Doc fixes. + (comint-last-input-start, comint-last-input-end) + (comint-last-output-start): Give them values. + (comint-arguments): Avoid warning. + (comint-skip-prompt): Use line-end-position. + (comint-backward-matching-input): Rename arg to agree with doc. + (comint-extract-string): Use syntax-ppss. + (comint-dynamic-simple-complete): Delete useless list construction. + (comint-redirect-subvert-readonly): New. + (comint-redirect-preoutput-filter): Use it. + + * emacs-lisp/lisp.el (beginning-of-defun-raw, end-of-defun): + Correctly handle negative arguments when calling hook functions. + +2004-04-14 Jesper Harder + + * info.el (info-apropos): Don't clobber Info-history-list. + +2004-04-14 Daniel Pfeiffer + + * progmodes/compile.el (compilation-setup): + Localize overlay-arrow-position. + (compilation-sentinel): Restructure code equivalently. + (compilation-next-error): Find message on same line after point if + not found before point. + (compile-mouse-goto-error): Restore function so that compilation + buffer need not be current and use compile-goto-error. + (compile-goto-error): Restore function. + (next-error): Set overlay-arrow-position. + (compilation-forget-errors): Don't localize already local + compilation-locs and remove FIXME about refontifying. + +2004-04-14 Kim F. Storm + + * startup.el (emacs-quick-startup): New defvar (set by -Q). + (command-line): New option -Q. Like -q --no-site-file, but + in addition it also disables menu-bar, tool-bar, scroll-bars, + tool-tips, and the blinking cursor. + (command-line-1): Skip startup screen if -Q. + (fancy-splash-head): Use :align-to center prop to center splash image. + + * emulation/cua-base.el (cua-read-only-cursor-color) + (cua-overwrite-cursor-color, cua-global-mark-cursor-color): Doc fix. + +2004-04-13 Dave Love + + * progmodes/python.el: Doc fixes. Changes for compiler warnings. + (syntax): Don't require. + (python) : Add :version. + (python-quote-syntax): Re-written. + (inferior-python-mode): Move stuff here from run-python and add + some more. + (python-preoutput-continuation, python-preoutput-result) + (python-dotty-syntax-table): New. + (python-describe-symbol): Use them. + (run-python): Move stuff to inferior-python-mode. Modify code + loaded into Python. + (python-send-region): Use python-proc, python-send-string. + (python-send-string): Send newlines too. Callers changed. + (python-load-file): Re-written. + (python-eldoc-function): New. + (info-look): Don't require. + (python-after-info-look): New. A modified version of former + top-level code for use with eval-after-load. + (python-maybe-jython, python-guess-indent): Use widened buffer. + (python-fill-paragraph): Re-written. + (python-mode): Fix outline-regexp. Set outline-heading-end-regexp, + eldoc-print-current-symbol-info-function. Add to eldoc-mode-hook. + +2004-04-13 Stefan Monnier + + * progmodes/python.el (run-python): Use compilation-shell-minor-mode. + Set compilation-error-regexp-alist earlier. + +2004-04-12 Stefan Monnier + + * progmodes/compile.el (compile-goto-error): Select the buffer/window + corresponding to the event. + + * url/url.el (url-retrieve): Use with-current-buffer. + + * url/url-http.el (url-http-parse-headers, url-http-file-exists-p): + Remove unused var `version'. + + * url/url-handlers.el (url-handler-mode): New minor mode. + (url-setup-file-name-handlers): Remove. + +2004-04-12 Joe Buehler + + * loadup.el: Add cygwin to system-type list, for unexec() support. + +2004-04-12 John Paul Wallington + + * ibuffer.el (ibuffer-delete-window-on-quit): Remove. + (ibuffer-restore-window-config-on-quit): New variable to replace + `ibuffer-delete-window-on-quit'. Update all references. + (ibuffer-prev-window-config): New variable. + (ibuffer-quit): Restore previous window configuration instead of + deleting window. + (ibuffer): Save window configuration before showing Ibuffer buffer. + + * help.el (describe-mode): Doc fix. + + * url/url-cookie.el (url-cookie-handle-set-cookie): Replace calls + to obsolete `assoc-ignore-case' with calls to `assoc-string'. + +2004-04-12 Stefan Monnier + + * progmodes/compile.el (compilation-mode-font-lock-keywords): Fix test + not to treat nil as a function. + + * vc-arch.el (vc-arch-root): Be a bit more careful. + (vc-arch-register): Save the buffer if we modified it. + (vc-arch-delete-rej-if-obsolete): Save excursion. + (vc-arch-find-file-hook): Use the simpler after-save-hook. + (vc-arch-responsible-p, vc-arch-init-version): New functions. + + * net/ldap.el (ldap-search): Use list*. + +2004-04-12 Juri Linkov + + * info.el (Info-follow-reference): Allow multiline reference name. + +2004-04-11 Dave Love + + * url/url-mailto.el (url-mailto): + * url/url-history.el (url-history-setup-save-timer): + * url/url-cookie.el (url-cookie-setup-save-timer): Avoid warnings. + + * url/url-file.el (url-file-build-filename): Don't use + directory-sep-char. + + * url/url-auth.el (url-register-auth-scheme): Fix `format' call. + + * url/url-about.el (url-scheme-registry): Defvar. + (url-about): Use text/plain. + + * url/url-vars.el (cl): Don't require. + (url): Add :version. + (url-bug-address): Use bug-gnu-emacs. + + * url/url-util.el (url-hexify-string): Don't give multibyte error + for char <16. + (mail-header-extract): Autoload. + + * url/url-parse.el: Doc fixes. + + * url/url-ldap.el (ldap): Require. + (url-ldap): Fix `format' call. + (url-ldap-certificate-formatter): Avoid warning. + + * url/url-https.el (url-https-create-secure-wrapper): Use modern + backquotes. + + * url/url-dav.el (url-dav-rename-file): Fix args of `signal'. + (url-intersection): New. + (url-dav-supported-p): Use it. + (url-dav-save-resource): Declare url-http-response-status special. + + * url/url-cache.el (url-util): Require. + + * emacs-lisp/bytecomp.el (byte-compile-cond): Fix last change. + + * progmodes/python.el: New file. + +2004-04-11 Andre Spiegel + + * vc-hooks.el (vc-arg-list): Function removed. + (vc-default-workfile-unchanged-p): Use condition-case to check for + backward compatibility. + + * vc.el (vc-print-log): Use condition-case to check for backward + compatibility. + +2004-04-11 Juri Linkov + + * dired.el (dired-faces): New defgroup. + (dired-header, dired-mark, dired-marked, dired-flagged) + (dired-warning, dired-directory, dired-symlink, dired-ignored): + New faces. + (dired-header-face, dired-mark-face, dired-marked-face) + (dired-flagged-face, dired-warning-face, dired-directory-face) + (dired-symlink-face, dired-ignored-face): New face variables. + (dired-font-lock-keywords): Use them instead of font-lock faces. + Split the rule for dired marks into 3 separate rules: for marks, + marked file names and flagged file names. + + * help-mode.el (help-make-xrefs): Add a final newline to the + *Help* buffer. + +2004-04-11 John Paul Wallington + + * replace.el (occur-engine): Distinguish between one and several + matches in the matches per buffer heading. + +2004-04-11 Kim F. Storm + + * ido.el (ido-confirm-unique-completion): New defcustom. + (ido-complete): Use it. + (ido-write-file): Set it to t unconditionally. + +2004-04-10 Miles Bader + + RCS keyword removal (only non-comment changes are enumerated here): + + * emacs-lisp/bytecomp.el (byte-compile-version): Variable removed. + (byte-compile-insert-header): Don't use `byte-compile-version'. + * url/url-vars.el (url-version): Use the constant string "Emacs" + instead of calculating something from the RCS `State' keyword + [the latter is almost entirely useless anyway]. + * forms.el (forms-version): Variable removed. + (forms-mode): Don't use `forms-version'. + * recentf.el (recentf-version): Variable removed. + * progmodes/delphi.el (delphi-version): Variable removed. + * progmodes/ada-mode.el (ada-mode): RCS keyword removed from docstring. + +2004-04-09 Stefan Monnier + + * emacs-lisp/easymenu.el (easy-menu-add): Make it work in non-X Emacs. + +2004-04-09 Jesper Harder + + * info.el (info-apropos): Improve menu item regexp. + +2004-04-09 Simon Josefsson + + * mail/smtpmail.el: Add comment, based on report by + kdc@rcn.com (Kevin D. Clark). + +2004-04-08 Stefan Monnier + + * progmodes/compile.el (compilation-mode-font-lock-keywords): + Redo one more thing that I didn't notice Daniel had undone. + +2004-04-08 Nick Roberts + + * progmodes/gdb-ui.el (gdb-source-window): Remove variable + (gdb-goto-breakpoint, gdb-display-buffer) + (gdb-display-source-buffer, gdb-view-source-function) + (gdb-view-assembler, gdb-setup-windows, gdb-restore-windows) + (gdb-source-info, gdb-frame-handler): Don't specify a window + for display. + (gdb-info-breakpoints-custom): Remove superfluous update of + assembler buffer. + (gdb-many-windows): Make settable outside gdb. + +2004-04-08 Glenn Morris + + * calendar/diary-lib.el (diary-mode, fancy-diary-display-mode): + Derive from fundamental-mode rather than text-mode. + +2004-04-08 Juri Linkov + + * info.el (Info-history): Doc fix. + (Info-history-list): New var. + (info-xref): Change magenta4 to blue, remove bold for dark and + light backgrounds, change bold to underline for non-color classes. + (info-xref-visited): New face. + (Info-fontify-visited-nodes): New custom. + (Info-hide-note-references): Add new value `hide'. Doc fix. + (Info-reference-name): New var. + (Info-selection-hook): New custom. + (Info-edit-mode-hook): New var. + (Info-find-file): New fun. + (Info-find-node): Move part of code to Info-find-file. + (Info-find-node-2): Add anchors to Info-history-list. Move point + to the place with the reference name if name is defined. + (Info-select-node): Add current node to Info-history-list. + (Info-goto-node): Switch to *info* from *info-history* *info-toc*. + (Info-search-whitespace-regexp): New custom. + (Info-search-case-fold): New var. + (Info-search): Add "case-sensitively" to the prompt. + Use Info-search-whitespace-regexp. Set Info-search-case-fold. + (Info-search-case-sensitively, Info-search-next): New fun. + (Info-up): Move point to the menu item of the current node. + (Info-history): New fun. Add *info-history* to same-window-buffer-names. + (Info-toc): New fun. Add *info-toc* to same-window-buffer-names. + (Info-insert-toc): New fun. + (Info-build-toc): New fun. + (Info-follow-reference): Add new arg `fork'. Doc fix. + Replace [ \n\t]* by [ \n\t]+ in the *Note regexp. For references + with the same name prefer the reference closest to point. + (Info-next-reference): Replace * by + in the *Note regexp. + Add regexp for http:// and ftp://. Skip the *Note prefix. + (Info-prev-reference): Replace * by + in the *Note regexp. + Add regexp for http:// and ftp://. Skip the *Note prefix. + (Info-follow-nearest-node): Add new arg `fork'. + (Info-try-follow-nearest-node): Add new arg `fork'. + Call browse-url for http:// and ftp:// references. + Set Info-reference-name for index entries. + (Info-mode-menu): Add menu items for Info-search-case-sensitively, + Info-search-next, Info-history, Info-toc, clone-buffer. + (Info-menu-update): Replace * by + in the *Note regexp. + (Info-mode): Add documentation for Info-history, Info-toc, + Info-search-case-sensitively, Info-search-next, clone-buffer. + (Info-fontify-menu-headers): Remove fun. Move code to + Info-fontify-node. + (Info-fontify-node): Add docstring. Add local vars + fontify-visited-p and not-fontified-p. If not-fontified-p is t + then fontify header line, titles, menu headers, http and ftp + references, refill paragraphs. If not-fontified-p is t or + fontify-visited-p is t then fontify cross references, menu items. + Fontify menu headers. Fontify http and ftp references. + Change regexp for cross references to require whitespace after *Note, + add matching groups for file and node names. Remove hack for quote. + Use display property for Info-hide-note-references=t. Use fifth + or fourth match for help-echo. Display visited nodes in a + different face. Unhide file names of external references. + Unhide newlines. Display visited menu items in a different face. + +2004-04-07 Stefan Monnier + + * progmodes/compile.el: Require CL. + (compilation-mode-font-lock-keywords): Re-install the "line as + function" patch. + + * help-fns.el (help-C-source-directory): New var. + (help-subr-name, help-C-file-name, help-find-C-source): New funs. + (describe-function-1, describe-variable): Use them. + + * help-mode.el (help-function-def, help-variable-def): Handle hyperrefs + to C source files specially. + +2004-04-07 Stefan Monnier + + * progmodes/compile.el: Require CL. + (compilation-mode-font-lock-keywords): Re-install the "line as + function" patch. + + * help-fns.el (help-C-source-directory): New var. + (help-subr-name, help-C-file-name, help-find-C-source): New funs. + (describe-function-1, describe-variable): Use them. + + * help-mode.el (help-function-def, help-variable-def): Handle hyperrefs + to C source files specially. + +2004-04-07 Jan Nieuwenhuizen + + * info.el (Info-hide-cookies-node): New function. + (Info-select-node): Use it. + (Info-display-images-node): Remove message with image file name. + +2004-04-07 Daniel Pfeiffer + + * progmodes/compile.el (compilation-warning-face) + (compilation-info-face, compilation-skip-threshold) + (compilation-skip-visited, compilation-context-lines): + Declare :version when added to Emacs. + (compilation-error-regexp-alist-alist): Extend caml and irix. + (compilation-setup): Fix if font-locked w/o font-lock-defaults. + (compilation-mode-font-lock-keywords): Temporarily undo line as + function patch, which wasn't ready. + +2004-04-07 Kenichi Handa + + * international/latin1-disp.el (latin1-display-setup): Check each + character is displayable or not instead of calling + latin1-display-check-font. + +2004-04-06 Kenichi Handa + + * language/ethio-util.el (ethio-sera-being-called-by-w3): + New variable. + (ethio-sera-to-fidel-ethio): Check ethio-sera-being-called-by-w3 + instead of sera-being-called-by-w3. + (ethio-fidel-to-sera-buffer): Likewise. + (ethio-find-file): Bind ethio-sera-being-called-by-w3 to t + instead of sera-being-called-by-w3. + (ethio-write-file): Likewise. + +2004-04-05 Vinicius Jose Latorre + + * printing.el: Dox fix. + +2004-04-05 Nick Roberts + + * progmodes/gdb-ui.el (gdb-use-inferior-io-buffer): New option. + (gdb-ann3, gdb-send, gdb-starting, gdb-stopping) + (gdb-setup-windows): Only use separate IO buffer if required. + +2004-04-06 Kim F. Storm + + * term.el (term-is-xemacs): Remove. + (term-if-xemacs, term-ifnot-xemacs): Test (featurep 'xemacs). + (term-window-width): New function. + (term-mode, term-check-size): Use it. + (term-mode): Disable overflow-newline-into-fringe in term buffer. + +2004-04-05 Per Abrahamsen + + * cus-edit.el (custom-add-parent-links): Change unbound variable + `symbol' to `name'. + +2004-04-05 Jesper Harder + * info.el (info-apropos): New function. + (Info-mode-menu): Add it. + (Info-find-node, Info-find-node-2): Grok apropos virtual file. + + * help-mode.el (help-make-xrefs): Recognize aliased variable with + inherited docstring. + + * play/gamegrid.el (gamegrid-add-score-insecure): Use sort-fields. + +2004-04-04 Stefan Monnier + + * textmodes/fill.el (fill-comment-paragraph): Obey indent-tabs-mode. + + * progmodes/compile.el (font-lock): Don't require any more. + (compilation-error-properties, compilation-start, compilation-sentinel) + (compilation-filter, next-error): Use with-current-buffer. + (compilation-skip-to-next-location, compilation-skip-threshold) + (compilation-skip-visited): Move to silence the byte-compiler. + (compilation-setup): Simplify. + (compilation-next-error): Use line-(beginning|end)-position. + Make sure `pt' is non-nil before using compilation-loop. + (compile-goto-error): Add optional event arg. Use it. + (compile-mouse-goto-error): Make it an alias of compile-goto-error. + (compilation-minor-mode-map, compilation-shell-minor-mode-map): + Update the binding for mouse-2. + (first-error): Set compilation-current-error to nil rather than bob. + (compilation-parsing-end, compilation-parse-errors-function) + (compilation-error-list, compilation-old-error-list): + "New" compatibility variables. + (compile-buffer-substring, compilation-compat-error-properties) + (compilation-compat-parse-errors, compilation-forget-errors): + New compatibility functions. + (compilation-mode-font-lock-keywords): Use them. + +2004-04-04 Luc Teirlinck + + * autorevert.el (auto-revert-handler): If point (or a window + point) is at the end of the buffer, keep it there after + reverting. This allows to tail a file. + Mention this in the `Commentary'. + + * format.el (format-write-file): Add optional argument CONFIRM + and make it behave like the analogous argument to `write-file'. + +2004-04-04 Vinicius Jose Latorre + + * progmodes/ebnf2ps.el: Doc fix. + (ebnf-version): New version number (4.2). + (ebnf-syntax): Customization and docstring fix. + (ebnf-eliminate-empty-rules, ebnf-optimize, ebnf-otz-initialize): + Put autoloaded funs before first use. + (ebnf-style-database): Add dtd entry. + (ebnf-syntax-alist): Add dtd initialization. + (ebnf-token-sequence): New fun. + (ebnf-comment-table): Add new comment action character. + (ebnf-dtd-parser, ebnf-dtd-initialize): Autoload funs from ebnf-dtd. + + * progmodes/ebnf-dtd.el: New file, implement a parser for DTD (Data + Type Definition for XML). + + * progmodes/ebnf-abn.el (ebnf-abn-concatenation): + * progmodes/ebnf-bnf.el (ebnf-sequence): + * progmodes/ebnf-ebx.el (ebnf-ebx-concatenation): + * progmodes/ebnf-iso.el (ebnf-iso-single-definition): + * progmodes/ebnf-yac.el (ebnf-yac-sequence): + Code simplification: call ebnf-token-sequence. + +2004-04-04 Eli Zaretskii + + * calendar/timeclock.el (timeclock-relative) + (timeclock-get-project-function, timeclock-get-workday-function) + (timeclock-query-out, timeclock-when-to-leave) + (timeclock-when-to-leave-string, timeclock-log-data) + (timeclock-generate-report, timeclock-in): Doc fixes. + +2004-04-03 Stefan Monnier + + * url: Import the URL package from its repository. + + * url/url-methods.el: + * url/url-parse.el: Don't require url-auto. + +2004-04-03 Andreas Schwab + + * diff-mode.el (diff-mode): Fix missing quote. + +2004-04-03 Juri Linkov + + * descr-text.el (describe-property-list): Add `font-lock-face'. + + * dired.el (dired-font-lock-keywords): Fix permission regexps. + +2004-04-02 Jan Dj,Ad(Brv + + * x-dnd.el (x-dnd-handle-moz-url, x-dnd-insert-utf16-text): + Use utf-16le on little endian machines and utf-16be otherwise. + +2004-04-02 David Kastrup + + * net/browse-url.el (browse-url-generic): Use call-process + instead of start-process to allow browsers that fork and detach. + +2004-04-01 Daniel Pfeiffer + + * compile.el (compilation-current-error): New var. + (compilation-setup, compile-mouse-goto-error) + (compile-goto-error, next-error): Use it. + (compilation-skip-to-next-location): Default to t, which gives + contiguous skipping like old compile (where this was redundant). + (compilation-next-error): Prevent previous-* commands from moving + back to message at or just before point. + +2004-04-01 Nick Roberts + + * progmodes/gdb-ui.el (gdb-view-source-function, gdb-view-assembler) + (gdb-source-info): Don't display source at startup, if required. + (gdb-show-main): New option. + (gdba): Update documentation. + (gdb-source): Cover case of auto-display output. + +2004-03-31 Luc Teirlinck + + * autorevert.el: Delete obsolete autoload's and defvar's. + (auto-revert-check-vc-info): New user option. + (auto-revert-vc-cvs-file-version, auto-revert-vc-buffer-p) + (auto-revert-handler-vc): Delete. + (auto-revert-handler): Treat return value `fast' of + buffer-stale-function specially. Check `auto-revert-check-vc-info'. + + * buff-menu.el (Buffer-menu-mode): Make the buffer-stale-function + return `fast'. + + * files.el (buffer-stale-function): Doc change. + +2004-03-31 Vinicius Jose Latorre + + * printing.el: New tip on Tips section. + (pr-version): New version number (6.7.4). + (pr-shell-file-name): Initialization fix. + +2004-03-31 Juri Linkov + + * dired.el: Add autoload for `dired-do-touch'. + (dired-touch-program): New var. + (dired-mode-map): Bind `dired-do-touch' to T and add menu-item. + (dired-no-confirm): Add `touch' to docstring. + + * dired-aux.el (dired-do-touch): New fun. + (dired-do-chxxx): Add argument -t for touch operation. + + * dired-x.el (dired-mark-sexp): Replace hard-coded month names by + `dired-move-to-filename-regexp'. + +2004-03-31 H,Ae(Bkan Granath (tiny change) + + * dired.el (dired-move-to-filename-regexp): Add `.' to HH:MM. + +2004-03-30 Vinicius Jose Latorre + + * progmodes/ebnf2ps.el (ebnf-eps-finish-and-write): Write a buffer if + and only if the buffer was modified. + +2004-03-30 Kenichi Handa + + * international/characters.el: Delete pairs for U+2308..U+230B. + +2004-03-29 Nick Roberts + + * progmodes/gud.el (gud-gdb-marker-filter): Include "\n" in regexp + to detect the beginning of a level 2 or 3 annotation. + +2004-03-29 Kenichi Handa + + * international/ucs-tables.el (ucs-insert): Fix the error message. + +2004-03-29 Kenichi Handa + + * international/mule-util.el (char-displayable-p): Fix generation + of XLFD file name. + + * Makefile.in (setwins, setwins_almost): Change directory to $wd + before finding directories by `find'. + +2004-03-28 Stefan Monnier + + * subr.el (interactive-form): Delete. Now implemented in C. + + * pcvs.el (cvs-parse-process): Workaround for Darwin. + + * vc.el (vc-version-diff, vc-default-diff-tree): Change `rel' -> `rev'. + (vc-diff-label): New fun. + (vc-diff-internal): Use it. + + * progmodes/gdb-ui.el (gdb-post-prompt): Fix test. + +2004-03-28 Vinicius Jose Latorre + + * progmodes/ebnf-abn.el (ebnf-abn-parser): Handle initial comments. + + * progmodes/ebnf-ebx.el: New file, implement a parser for EBNF used to + specify XML (EBNFX). + + * progmodes/ebnf2ps.el: Doc fix. + (ebnf-version): New version number (4.1). + (ebnf-syntax): Adjust customization. + (ebnf-style-database): Add ebnfx entry. + (ebnf-syntax-alist): Add ebnfx initialization. + (ebnf-ebx-parser, ebnf-ebx-initialize): Autoload funs from ebnf-ebx. + + * printing.el: Doc fix. + (pr-version): New version number (6.7.3). + (pr-menu-position): Adjust X and Y positions when mouse-pixel-position + returns nil for mouse position. Reported by Drew Adams + . + (pr-update-menus): Modify interactive declaration. Reported by Drew + Adams . + +2004-03-28 Nick Roberts + + * progmodes/gdb-ui.el (gdb-ann3, gdb-send-item) + (gud-gdba-marker-filter): Log the process input and output, if + required. (from Stefan Monnier) + (gdb-debug-log, gdb-enable-debug-log): New variables. + (gdb-post-prompt): Don't do gdb-var-update on Mac OS X. + +2004-03-28 Stefan Monnier + + * vc-hooks.el (vc-file-not-found-hook): Fix typo. + From lorentey@elte.hu (L,Bu(Brentey K,Ba(Broly). + +2004-03-27 Luc Teirlinck + + * autorevert.el (auto-revert-handler): Handle auto-revert-mode. + Call vc-find-file-hook here instead of in auto-revert-buffers. + (auto-revert-buffers): Delete call to vc-find-file-hook. + (auto-revert-verbose, global-auto-revert-non-file-buffers) + (global-auto-revert-mode, auto-revert-set-timer) + (auto-revert-handler, auto-revert-buffers): Doc fixes. + +2004-03-27 Francis J. Wright + + * woman.el (woman-change-fonts): Rename local variable + woman-font-alist to font-alist to avoid a compiler warning. + +2004-03-27 Dave Love + + * emacs-lisp/rx.el (rx): Doc fix. + Fix copyright years. + + * strokes.el (strokes-global-set-stroke-string): New function. + (strokes-list-strokes): Cope with strings, not just commands. + Set foreground colour of image. + (strokes-global-set-stroke): Doc fix. + +2004-03-26 Luc Teirlinck + + * buff-menu.el (Buffer-menu-revert-function): Make it suitable for + Auto Revert mode. + (Buffer-menu-files-only): New variable. + (Buffer-menu-toggle-files-only): New function. + (Buffer-menu-mode-map): Bind it to `T'. + (Buffer-menu-mode): Mention `T' in docstring. + Set buffer-stale-function. + (list-buffers-noselect): Mark buffer non-modified and set + Buffer-menu-files-only. + + * dired.el (buffer-stale-function): Remove no longer needed defvar. + + * autorevert.el (auto-revert-handler): Print revert message + before, rather than after, reverting. + (buffer-stale-function): Move to files.el. + + * files.el (buffer-stale-function): Move here from autorevert.el. + +2004-03-26 Stefan Monnier + + * vc.el (vc-maybe-resolve-conflicts): Don't prompt the user. + + * calc/calc.el (calc-mode-map): Use mapc. + + * apropos.el (apropos-mode): Don't autoload. + (apropos-symbols-internal): New fun. Extracted from `apropos'. + (apropos): Use it. + (apropos-print): Add optional `text' argument. + (apropos-describe-plist): Use help-buffer and hexlp-setup-xref. + Don't assume point-min == 1. + + * bs.el (bs-buffer-list): Use buffer-local-value. + (bs--set-toggle-to-show): Use with-current-buffer. + + * buff-menu.el (Buffer-menu-sort, Buffer-menu-make-sort-button): + New funs. + (list-buffers-noselect): Use them. Adjust :align-to to new style. + + * cvs-status.el (cvs-tree-use-jisx0208): Use char-displayable-p. + + * dabbrev.el (dabbrev-expand): Fix regexp construction. + (dabbrev--find-expansion): Use pop. + (dabbrev--search): Use match-string-no-properties. + + * dired.el (dired-mode): Use run-mode-hooks. + (dired-move-to-end-of-filename): Use match-string. + + * ediff-init.el (ediff-hide-face): Check that facemenu-unlisted-faces + is bound before using it. + (ediff-verbose-p): Make it into a var since it's not constant. + + * electric.el (Electric-pop-up-window): Avoid popping up a new frame. + + * faces.el (read-face-font): Don't cons up unnecessarily. + (header-line, tool-bar): Share common parts. + + * files.el (file-relative-name): Use compare-strings. + + * finder.el (finder-mode): Follow coding convention. + + * subr.el (read-number): New function. + + * ses.el (ses-read-number): Move to subr.el. + (ses-set-header-row): Use read-number. + +2004-03-26 Andre Spiegel + + * vc-hooks.el (vc-arg-list): New function, which handles both + compiled and uncompiled code. + (vc-default-workfile-unchanged-p): Use it. + + * vc.el (vc-print-log): Undo prev change, use new function + vc-arg-list from vc-hooks.el. + +2004-03-26 Masatake YAMATO + + * simple.el (completion-setup-function): Emphasize the + first uncommon characters in the completions; and de-emphasize + the common prefix substrings. + (completion-emphasis): New face. + (completion-de-emphasis): New face. + +2004-03-25 Juanma Barranquero + + * progmodes/cperl-mode.el (cperl-indent-alist, cperl-where-am-i): + Comment out (it's unused and unfinished code). + +2004-03-25 Sam Steingold + + * vc.el (vc-print-log): Fix a bug in the last patch: + backend-function may be a byte-compiled object, not a lambda. + +2004-03-25 Juri Linkov + + * descr-text.el (describe-property-list): Add a button + for `face' property that calls `describe-face'. + Suggested by luis fernandes + + * international/mule.el (keyboard-coding-system): + * kmacro.el (kmacro-call-macro): Fix docstring. + + * dired.el: Fix comments. + + * textmodes/fill.el (fill): Fix Info link. + + * font-lock.el (fast-lock, lazy-lock): + * jit-lock.el (jit-lock): Remove links to removed Support Modes + Info node. + + * eshell/eshell.el (eshell): Fix broken info-link. + + * eshell/em-alias.el (eshell-alias, eshell-bad-command-tolerance): + * eshell/em-banner.el (eshell-banner): + * eshell/em-smart.el (eshell-smart): + * eshell/esh-cmd.el (eshell-cmd): + Comment out broken info-links to incomplete Info manual. + + * info-xref.el: Fix commentary. + +2004-03-25 Kevin Ryde + + * info-xref.el (info-xref-check-buffer): Report empty filename parts. + Remove spurious node duplicate suppression, doesn't work, not wanted. + (info-xref-output): Take format style args, add "sit-for 0" to let + user see the results as they progress. + (info-xref-check-all-custom): New function. + +2004-03-25 Nick Roberts + + * gdb-ui.el: Moved to progmodes. + +2004-03-24 Stefan Monnier + + * diff-mode.el (diff-font-lock-keywords): Disable yank-handler. + +2004-03-24 Glenn Morris + + * calendar/appt.el (appt-check): Remove superfluous progn. + When finished with diary buffer: if it was not being displayed + before, kill it; otherwise restore its original state. + Suggested by Matthew Mundell . + + * calendar/calendar.el (calendar-set-mode-line): Use total + available mode-line width, rather than frame-width. + + * calendar/diary-lib.el (fancy-diary-display): Set mode-line + after mode change so effect not lost. + +2004-03-23 Dave Love + + * dired.el (dired) : Add link to manual. + (dired-font-lock-keywords): Add highlighting on unusual permissions. + (dired-revert): Use dolist. + (dired-mode-map): Add U binding. + (dired-mode): Add font-lock-beginning-of-syntax-function. + (dired-garbage-files-regexp): Make it a defcustom. + +2004-03-23 Stefan Monnier + + * vc-arch.el (vc-arch-diff): Handle the special case where `newvers' + is equivalent to nil. + (vc-arch-diff3-rej-p): Be a bit more flexible in what we accept. + (vc-arch-mode-line-string): Accept `added' state. + (vc-arch-state): Use inode-sigs if available. + (vc-arch-add-tagline): Rename from vc-arch-add-tag. + Copy&delete existing id file if any. Fallback if uuidgen is absent. + (vc-arch-tagline-re): New var. + (vc-arch-file-source-p, vc-arch-file-id, vc-arch-tagging-method): + New functions. + (vc-arch-find-file-not-found-hook, vc-arch-register): New backend ops. + (vc-arch-registered): Try our best guess using vc-arch-file-source-p. + + * vc-hooks.el (vc-default-find-file-not-found-hook): New fun. + (vc-file-not-found-hook): Use it. + + * diff-mode.el (diff-default-read-only): Change default. + (diff-mode-hook): Make it a defcustom. Add some options. + (diff-mode-map): Bind diff-refine-hook. + (diff-yank-handler): New var. + (diff-yank-function): New fun. + (diff-font-lock-keywords): Use them. + (diff-end-of-file): Handle case where file-header looks like diff text. + (diff-hunk-kill): Adjust to "new" hunk-next behavior. + (diff-file-kill): Delete a subsequent empty line, if applicable. + (diff-hunk-file-names): New fun, extracted from diff-tell-file-name. + (diff-find-file-name): Use it. + (diff-tell-file-name): New command. + (diff-mode): Be careful with view-mode. + (diff-delete-if-empty, diff-delete-empty-files, diff-make-unified): + New functions, for use in diff-mode-hook. + (diff-find-source-location): Catch "regex too large" errors. + (diff-apply-hunk, diff-test-hunk): Go to old or new file. + (diff-refine-hunk): New command. + + * smerge-mode.el (smerge-mode-menu): Fix activate pred for resolve. + (smerge-context-menu-map): Remove unused var. + (smerge-keep-all): Preserve markers. + (smerge-keep-n): New fun. + (smerge-keep-base, smerge-keep-other, smerge-keep-mine) + (smerge-keep-current, smerge-ediff): Use it. + (smerge-kill-current): Use it. Make it work on some 3-part conflicts. + (smerge-popup-context-menu): Also use context-menu on 3-part conflicts. + (smerge-resolve): Resolve trivial 3-part conflicts. + +2004-03-23 Juri Linkov + + * man.el (Man-width): New var. + (Man-getpage-in-background): Use it. + (Man-support-local-filenames): New var and fun. + (Man-build-man-command): Don't add a second %s. + (Man-fontify-manpage): Clean up message. + (Man-mode): Set outline-regexp, outline-level, + imenu-generic-expression. + + * woman.el (woman-fill-frame): Doc fix. + (woman-decode-region): Use window-width instead of frame-width. + + * abbrevlist.el (list-one-abbrev-table): + * descr-text.el (describe-char): + * international/mule-diag.el (describe-current-coding-system): + * international/quail.el (quail-insert-decode-map): + Use window-width instead of frame-width. + + * jka-compr.el (jka-compr-compression-info-list): Add tbz and dz. + (jka-compr-mode-alist-additions): Add tbz. + (jka-compr-write-region, jka-compr-insert-file-contents): + Add message for undefined compress-program. + (jka-compr-write-region): Remove redundant var bindings. + + * dired-x.el (dired-guess-shell-alist-default): Add choices for + extracting files into subdirectory. Add tbz and dz. Fix regexps. + Add extensions .[0-9] for man and nroff, and .pod for perldoc. + (dired-man): Use dired-guess-shell-command. + (dired-guess-shell-case-fold-search): Change defvar to defcustom. + Change default nil to t. + + * dired-aux.el (dired-compress-file-suffixes): Add dz and tbz. + (dired-compare-directories): Add default value for empty input. + + * help-at-pt.el: Move suggestions for key bindings to Commentary. + + * time.el (display-time-string-forms): Fix help-echo date format. + +2004-03-22 Luc Teirlinck + + * autorevert.el (global-auto-revert-non-file-buffers): Expand docstring. + (buffer-stale-function): New variable. + (auto-revert-list-diff, auto-revert-dired-file-list) + (auto-revert-dired-changed-p, auto-revert-buffer-p): Delete. + (auto-revert-handler): Take over some functionality of deleted + functions. + (auto-revert-buffers): Delete call to auto-revert-buffer-p. + + * dired.el (dired-directory-changed-p): New fun, extracted from + dired-internal-noselect. + (dired-buffer-stale-p): New fun. + (dired-internal-noselect): Use dired-directory-changed-p. + Eliminate revert messages. + (dired-mode): Set buffer-stale-function to dired-buffer-stale-p. + +2004-03-23 Kenichi Handa + + * international/characters.el: Setup syntaxes for more parentheses + Unicode characters. + + * international/mule-cmds.el (select-safe-coding-system): + Merge coding-system and auto-cs before comparing them. + +2004-03-22 Stefan Monnier + + * emacs-lisp/pp.el (pp-eval-expression): Simplify. + + * emacs-lisp/lisp-mode.el (lisp-mode-variables): Don't set + normal-auto-fill-function and comment-indent-function. + The default values now work just as well. + Don't set font-lock-beginning-of-syntax-function since we already set + syntax-begin-function. + (lisp-outline-level): Put ;;;###autoload at same level as (. + (prin1-char): Quote special chars. + + * emacs-lisp/lisp-mnt.el (lm-keywords-finder-p): Use defvar rather + than with-no-warnings. + + * emacs-lisp/edebug.el (edebug-display): Bring up a debug trace + if the source location can't be found. + (edebug-compute-previous-result): Use prin1-char. + + * emacs-lisp/checkdoc.el (checkdoc-error): Dont' assume point-min == 1. + (debug-ignored-errors): Add an entry. + + * emacs-lisp/bytecomp.el (byte-recompile-directory): Ignore hidden dir. + (byte-compile-file): Output warning when deleting a file. + + * emacs-lisp/byte-run.el (defsubst): Add edebug spec and use backquote. + (dont-compile, eval-when-compile, eval-and-compile): Add edebug spec. + + * emacs-lisp/byte-opt.el (byte-compile-log-lap) + (byte-compile-inline-expand): Use backquote. + (byte-optimize-pure-func): Rename from byte-optimize-concat. + (symbol-name, regexp-opt, regexp-quote): Mark as pure. + + * emacs-lisp/backquote.el (backquote-list*-macro): Use nreverse. + + * emacs-lisp/advice.el (ad-subr-arglist): Simplify. + +2004-03-22 Juri Linkov + + * finder.el (finder-known-keywords): Fix data, tex, unix. + + * play/landmark.el: Fix keywords. + + * language/ethio-util.el (ethio-find-file): Doc fix. + + * emacs-lisp/warnings.el: Doc fix. + + * textmodes/ispell.el (ispell-help): Doc fix. + +2004-03-21 Luc Teirlinck + + * format.el (format-insert-file): Always return a list of two + elements, like insert-file-contents does. + +2004-03-21 Andre Spiegel + + * vc.el Add new optional BUFFER argument to vc-BACKEND-print-log + and vc-BACKEND-diff. + (vc-print-log): If the print-log implementation supports it, use + the new BUFFER argument to direct output to *vc-change-log*, not *vc*. + (vc-version-diff, vc-diff-internal): Doc fixes. + + * vc-hooks.el (vc-default-workfile-unchanged-p): If the + implementation supports it, let diff output go to *vc*, + not *vc-diff*, since this is an internal call. + + * vc-cvs.el (vc-cvs-print-log, vc-cvs-diff): Add optional BUFFER arg. + + * vc-rcs.el (vc-rcs-print-log, vc-rcs-diff): Likewise. + + * vc-sccs.el (vc-sccs-print-log, vc-sccs-diff): Likewise. + +2004-03-21 Dave Love + + * progmodes/cfengine.el (cfengine-mode): + Set parse-sexp-ignore-comments. + + * emacs-lisp/rx.el (rx): Work at compile time, not run time. + +2004-03-21 Juanma Barranquero + + * allout.el (allout-mode): Fix docstring. + +2004-03-20 Luc Teirlinck + + * files.el (insert-directory): Fix bug if SWITCHES is a list. + + * autorevert.el (auto-revert-interval): Make new value take + effect immediately when set through Custom. + (auto-revert-set-timer): Add interactive declaration. + +2004-03-19 David Ponce + + * ruler-mode.el (ruler-mode-header-line-format-old): + Don't `make-variable-buffer-local'. + (ruler-mode-ruler-function): Default to `ruler-mode-ruler'. + (ruler-mode-header-line-format): Simply funcall the above. + (ruler-mode): Use `make-local-variable' and `kill-local-variable' + to save/restore a previous header line format. + (ruler-mode-space): Don't depend on a numeric WIDTH value. + (ruler-mode-ruler): Use symbolic display elements for scrollbar, + fringes and margins width. + (ruler-mode-ruler-function): Default to ruler-mode-ruler. + +2004-03-18 Stefan Monnier + + * log-edit.el (log-edit-font-lock-keywords): Typo. + + * textmodes/tex-mode.el (tex-shell): Set error parsing function here. + (tex-send-tex-command): Rather than here. + (tex-compilation-parse-errors): Simplify. + + * info.el (Info-default-dirs): Don't ignore last part of I-d-d-l. + + * time.el (display-time-string-forms): Add help-echo with date on time. + + * composite.el (compose-region): Use restore-buffer-modified-p. + + * disp-table.el (standard-display-8bit): Simplify. + + * server.el (server-process-filter): Delete temp frame. + + * add-log.el (add-change-log-entry): Simplify. + +2004-03-19 Kim F. Storm + + * hexl.el (hexl-mode-ruler): Adapt to new :align-to semantics. + (hexl-follow-line): Don't require 'fringe. + + * progmodes/compile.el (compilation-start): Always set + compilation-last-buffer and return it. + +2004-03-17 Luc Teirlinck + + * simple.el (clone-buffer): Doc fix. + +2004-03-18 Juanma Barranquero + + * emacs-lisp/byte-run.el (make-obsolete-variable): Fix docstring. + +2004-03-17 Stefan Monnier + + * log-edit.el (log-edit-font-lock-keywords): New var. + (log-edit-mode): Use it. + +2004-03-17 Nick Roberts + + * gdb-ui.el (gdb-var-list-children-handler): Handle C++ classes + properly for watching in speedbar. + +2004-03-17 Masatake YAMATO + + * smerge-mode.el (smerge-popup-context-menu): + Put `unwind-protect' around `overlay-put' and `popup-menu'. + +2004-03-16 Stefan Monnier + + * vc-arch.el (vc-arch-workfile-unchanged-p): Define to avoid dup-diff. + (vc-arch-workfile-version, vc-arch-mode-line-rewrite): + Take sealed revisions into account. + (vc-arch-checkin): Extract a summary line from the message. + +2004-03-16 Masatake YAMATO + + * register.el (register): Provide `register' feature. + +2004-03-15 Masatake YAMATO + + Added context menu support in smerge mode. + Most of the part is written by Stefan Monnier. + + * smerge-mode.el (smerge-context-menu-map, smerge-context-menu): + New keymap and menu. + (smerge-text-properties): New function. + (smerge-remove-props): New function. + (smerge-popup-context-menu): New function. + (smerge-resolve): Call `smerge-remove-props'. + (smerge-keep-base, smerge-keep-other, smerge-keep-mine): Ditto. + (smerge-keep-current): Ditto. + (smerge-kill-current): New function. + (smerge-match-conflict): Put text properties. + Detect the file as `same-diff conflict' if the filename is "ANCESTOR". + +2004-03-15 David Ponce + + * ruler-mode.el: (ruler-mode-left-fringe-cols) + (ruler-mode-right-fringe-cols, ruler-mode-left-scroll-bar-cols) + (ruler-mode-right-scroll-bar-cols): Remove. + (ruler-mode-window-col, ruler-mode-mouse-set-left-margin) + (ruler-mode-mouse-set-right-margin, ruler-mode-ruler): + Use fringe-columns and scroll-bar-columns. + +2004-03-15 Masatake YAMATO + + * hl-line.el (hl-line-range-function): New variable. + (hl-line-move): New function. + (global-hl-line-highlight): Use `hl-line-move'. + (hl-line-highlight): Ditto. + + * scroll-bar.el (scroll-bar-columns): + * fringe.el (fringe-columns): New function derived from ruler-mode.el. + + * ruler-mode.el (top-level): Require scroll-bar and fringe. + (ruler-mode-left-fringe-cols) + (ruler-mode-right-fringe-cols): Use `fringe-columns'. + (ruler-mode-right-scroll-bar-cols) + (ruler-mode-left-scroll-bar-cols): Use `scroll-bar-columns'. + (ruler-mode-ruler-function): New variable. + (ruler-mode-header-line-format): Call `ruler-mode-ruler-function' + if the value for `ruler-mode-ruler-function'is given. + + * hexl.el (hexl-mode-hook): Make the hook customizable. + (hexl-address-area, hexl-ascii-area): New customize variables. + (hexlify-buffer): Put font-lock-faces on the address area and + the ascii area. + (hexl-activate-ruler): New function. + (hexl-follow-line): New function. + (hexl-highlight-line-range): New function. + (hexl-mode-ruler): New function. + +2004-03-14 Stefan Monnier + + * vc-hooks.el (vc-handled-backends): Add Arch. Move MCVS down. + (vc-default-find-file-hook): New fun. + (vc-find-file-hook): Call new find-file-hook operation. + + * vc-arch.el: New file. + +2004-03-12 Jesper Harder + + * info-look.el (info-lookup): Reuse an existing Info window. + +2004-03-12 Francis J. Wright + + * woman.el (woman-preserve-ascii): Default value changed to t and + doc string revised. + +2004-03-12 Richard M. Stallman + + * pcvs.el (cvs-mode-add-change-log-entry-other-window): + Fix minor bug. + + * replace.el (occur-engine): Change message for count of matches. + + * emacs-lisp/bytecomp.el (byte-compile-get-constant): + For strings, do compare text properties. + +2004-03-11 Daniel Pfeiffer + + * progmodes/compile.el (compile-auto-highlight) + (compilation-error-list, compilation-old-error-list) + (compilation-parse-errors-function, compilation-parsing-end) + (compilation-error-message, compilation-directory-stack) + (compilation-enter-directory-regexp-alist) + (compilation-leave-directory-regexp-alist) + (compilation-file-regexp-alist, compilation-nomessage-regexp-alist) + (compilation-current-file, compilation-regexps): Remove vars. + + (compile-error-at-point, compilation-error-filedata) + (compilation-error-filedata-file-name, compile-reinitialize-errors) + (compilation-next-error-locus, compilation-forget-errors) + (count-regexp-groupings, compilation-parse-errors) + (compile-collect-regexps, compile-buffer-substring): Remove funs. + + (compile-internal): Make obsolete. + + (compilation-first-column, compilation-error) + (compilation-directory-matcher, compilation-page-delimiter) + (compilation-mode-font-lock-keywords, compilation-debug) + (compilation-error-face, compilation-warning-face) + (compilation-info-face, compilation-line-face) + (compilation-column-face, compilation-enter-directory-face) + (compilation-leave-directory-face, compilation-skip-threshold) + (compilation-skip-visited, compilation-context-lines): New vars. + + (compilation-warning-face, compilation-info-face) + (compilation-message-face): New faces. + + (compilation-error-regexp-alist-alist): New constant. + + (compilation-face, compilation-directory-properties) + (compilation-assq, compilation-error-properties, compilation-start) + (define-compilation-mode, compilation-loop) + (compilation-set-window): New functions. + + (compile): Additional argument for interactive compiles like TeX. + + * progmodes/grep.el (kill-grep): Move here from compile.el + (grep-error, grep-hit-face, grep-error-face) + (grep-mode-font-lock-keywords): New variables. + (grep-regexp-alist): Simplify regexp and add `binary' case. + (grep-mode): New mode. + (grep-process-setup): Simplify. + +2004-03-11 Jason Rumney + + * net/ldap.el (ldap-search-internal): Handle file URLs with drive + letters on DOS/Windows. + +2004-03-11 Stefan Monnier + + * server.el (server-name): New var. + (server-socket-dir): New var to replace server-socket-name. + (server-start): Use them. + +2004-03-11 Simon Josefsson + + * mail/smtpmail.el (smtpmail-read-response): Abort if process has + died to avoid infloop. Reported by Jonathan Glauner + . + +2004-03-10 Stefan Monnier + + * smerge-mode.el (smerge-check-cache, smerge-check): New var and fun. + (smerge-mode-menu): Use it to deactivate menu entries. + (smerge-keep-current): New fun. + (smerge-keep-current): Use it. + +2004-03-10 John Paul Wallington + + * foldout.el (foldout-fold-list, foldout-modeline-string): + Declare them as variables, not constants. + +2004-03-10 Vinicius Jose Latorre + + * ps-print.el: Modification to print *Messages* buffer. + (ps-print-version): New version 6.6.4. + (ps-message-log-max): New fun. + (ps-spool-without-faces, ps-spool-with-faces) + (ps-count-lines-preprint): Code fix. + + * printing.el: New tips in Tips section. + +2004-03-09 Vinicius Jose Latorre + + * delim-col.el: Doc fix. + + * printing.el: Doc fix. New doc section (Tips). + +2004-03-09 Stefan Monnier + + * type-break.el (type-break-emacs-variant): Remove. + (type-break-run-at-time, type-break-cancel-function-timers): + Use fboundp rather than version name and number. + +2004-03-09 Masatake YAMATO + + * hexl.el (hexl-mode): Use `make-local-variable' instead of + `make-variable-buffer-local'. + +2004-03-08 Michael Albinus + + * find-dired.el (find-dired): Call `shell-command' instead of + `start-process-shell-command'. By this, Tramp takes over + handling of remote directories. + +2004-03-07 Stefan Monnier + + * newcomment.el (comment-use-global-state): New var. + (comment-search-forward): Use it. + + * emacs-lisp/lisp-mode.el (lisp-mode-variables): Set it. + + * cus-edit.el (fill) : Move to fill.el. + + * textmodes/fill.el (fill) : Move from cus-edit.el. + (enable-kinsoku): Make it a defcustom. + (fill-comment-paragraph): Don't rely on fill-prefix to bound the + paragraph to same-comment-start-marker. + +2004-03-07 Dave Love + + * net/browse-url.el (rfc2368-parse-mailto-url): Autoload. + (browse-url-mail): Use it. + + * mail/rfc2368.el (rfc2368-unhexify-char): Delete. + (rfc2368-unhexify-string): Use replace-regexp-in-string. + +2004-03-07 Francis J. Wright + + * woman.el (woman-man.conf-path): Doc fix. + (woman-parse-man.conf): Also parse OPTIONAL_MANPATH. + +2004-03-07 Eli Zaretskii + + * sort.el (sort-columns): Remove ms-dos from the list of systems + where the external `sort' command is not used. + +2004-03-07 Kim F. Storm + + * gdb-ui.el (gdb-overlay-arrow-position): Add defvar. + (gdb-reset): Reset gdb-overlay-arrow-position marker and remove it + from overlay-arrow-variable-list. + (gdb-assembler-mode): Use add-to-list for gdb-overlay-arrow-position. + +2004-03-06 Nick Roberts + + * gdb-ui.el (gdb-assembler-mode, gdb-assembler-custom): Set up + overlay arrow string properly for the assembler buffer. + +2004-03-05 Stefan Monnier + + * mail/sendmail.el (mail-mode): Fix last change. + +2004-03-05 Nick Roberts + + * gdb-ui.el (gdb-assembler-mode): Create a second overlay arrow + for the assembler buffer. + (gdb-assembler-custom): Position the overlay arrow. + (gdb-put-arrow, gdb-remove-arrow): Delete functions. + +2004-03-04 Stefan Monnier + + * progmodes/sh-script.el (sh-font-lock-paren): Add @ in case patterns. + + * pcvs-info.el (cvs-fileinfo->backup-file): Use a more constraining + regexp to distinguish .#ChangeLog.9.1.400 and .#ChangeLog.1.400. + + * mail/sendmail.el (mail-mode): Set comment-start-skip. + + * newcomment.el (uncomment-region): Allow non-terminated comment. + (comment-normalize-vars): Check the user-specified comstart marker. + +2004-03-04 Jesper Harder + + * sort.el (sort-columns): Don't use external 'sort' on ms-windows. + Otherwise, do use it if the region only contains font-lock text + properties. + +2004-03-04 Masatake YAMATO + + * hexl.el (hexl-mode): Set `hexl-print-current-point-info' + as the callback function for eldoc. + (hexl-print-current-point-info): New function. + (hexl-current-address): Print the address in both decimal + and hexadecimal format. + +2004-03-04 Richard M. Stallman + + * mail/rmail.el (rmail-convert-to-babyl-format): + Specify t for UNIBYTE when calling mail-unquote-printable-region. + + * mail/mail-utils.el (mail-unquote-printable-region): + New arg UNIBYTE. + + * startup.el (command-switch-alist): Doc fix. + + * simple.el (undo): Temporarily set this-command to `undo-start', + then set it to `undo' once undo-start returns without error. + + * simple.el (minibuffer-history-sexp-flag): Doc fix. + + * simple.el (kill-line): Don't disregard trailing whitespace + in eol condition, if show-trailing-whitespace is set. + + * mouse-sel.el (mouse-sel-has-been-enabled): New var. + (mouse-sel-mode): When enabling, set mouse-sel-has-been-enabled. + When disabling, restore old values only if mouse-sel-has-been-enabled. + + * isearch.el (isearch-*-char): New arg WANT-BACKSLASH. + (isearch-{-char): New function. + (isearch-mode-map): Bind { to isearch-{-char. + + * font-lock.el (lisp-font-lock-keywords-2): + Turn off the CL with-... and do-... general patterns. + Instead, recognize several specific with... and do... constructs. + + * files.el (switch-to-buffer-other-window): + Bind same-window-buffer-names and same-window-regexps to nil. + (switch-to-buffer-other-frame): Likewise. + +2004-03-03 Stefan Monnier + + * textmodes/fill.el (fill-comment-paragraph): Be more careful when + recognizing leading comment on code line. + +2004-03-02 Stefan Monnier + + * Makefile.in (setwins, setwins_almost): Skip .arch-ids and other + hidden files/directories. + +2004-03-02 Stefan Monnier + + * textmodes/fill.el (fill-paragraph): Don't check comment-start-skip, + only comment-start (in case the mode hasn't set it). + + * Makefile.in (AUTOGENEL): New var. + (bootstrap-prepare): Rename from bootstrap-clean. + Don't remove elc files. + (maintainer-clean): New target. + + * xml.el (xml-get-attribute-or-nil): Simplify. + +2004-03-02 Juri Linkov + + * net/browse-url.el (browse-url-netscape, browse-url-mozilla) + (browse-url-galeon, browse-url-epiphany): Encode dollar signs in + URL to prevent their substitution with the environment variable + values by browsers. + +2004-03-03 Vinicius Jose Latorre + + * ps-print.el: Doc fix. + (ps-print-version): New version number (6.6.3). + (ps-right-header, ps-right-footer, ps-left-header, ps-left-footer): + Docstring fix. + (ps-kill-emacs-check): Check if ps-print temporary buffer is killed + before printing. + (ps-time-stamp-yyyy-mm-dd): New fun. + (ps-time-stamp-iso8601): Alias for ps-time-stamp-yyyy-mm-dd. + +2004-03-02 Kim F. Storm + + * gdb-ui.el (gdb-mouse-toggle-breakpoint): Remove debug message. + +2004-03-01 Juanma Barranquero + + * allout.el (allout-rebullet-heading): Fix typo in docstring. + + * desktop.el (desktop-file-version) + (desktop-after-read-hook): Fix typos. + (desktop-clear-preserve-buffers): Remove redundant info in + docstring already shown by the obsolescence message. + (desktop-truncate, desktop-internal-v2s) + (desktop-value-to-string): Change argument name to match docstring. + + * emulation/tpu-edt.el (tpu-set-mark): Fix typo in docstring. + + * eshell/em-smart.el (eshell-smart-maybe-jump-to-end): Fix typo in + docstring. + +2004-02-29 Vinicius Jose Latorre + + * printing.el: Replace "As Is..." in PostScript file print/preview by + "No Preprocessing...". Suggested by Colin Marquardt + . + (pr-insert-section-4): Adjust buffer interface. + +2004-02-29 Kai Grossjohann + + Version 2.0.39 of Tramp released. + + * net/tramp.el (tramp-handle-file-local-copy) + (tramp-handle-write-region, tramp-open-connection-rsh): + Variable name typo. Small change. From Patrick Tullmann + . + (tramp-process-connection-type): New variable. + (tramp-maybe-open-connection): Use it. + (tramp-do-copy-or-rename-via-buffer): Handle KEEP-DATE arg if possible. + (tramp-touch): Set last-modified time of a remote file. + (tramp-handle-write-region): Say which function is used when encoding. + +2004-02-29 Michael Albinus + + * net/tramp-smb.el (tramp-smb-handle-file-writable-p): Handle the + case of non-existing filename, too. Reported by Christoph Bauer + . + (tramp-smb-get-file-entries): The directory in question should + have permissions "drwxrwxrwx". Just virtual, because we don't + know the real permissions. Don't we know? + (tramp-smb-prompt): Add virtual prompt from listing shares, too. + (tramp-smb-errors): Add "NT_STATUS_ACCOUNT_LOCKED_OUT". + (tramp-smb-wait-for-output): Optimize algorithm getting pending + output. If it was received chunkwise, there have been problems. + Remove the "prompt not found" error message; it is obvious. + Simplify algorithm. + (tramp-smb-process-running): Remove. Since we acknowledge the + virtual prompt for shares, there's no need for distinction of + reading shares (process ends afterwards) and interactive mode of + smblient. + (tramp-smb-open-connection): Setting process sentinel removed. + (tramp-smb-errors): Add "NT_STATUS_WRONG_PASSWORD" and + "NT_STATUS_NETWORK_ACCESS_DENIED". + (tramp-smb-maybe-open-connection): Set `process-connection-type' + to 'pty. Suggested by Piet van Oostrum . + (top-level): Setting default value in `tramp-default-method-alist' + corrected. Order of USER and HOST have been wrong. + Nobody complained for months ... + (tramp-smb-maybe-open-connection): Use `tramp-process-connection-type'. + (tramp-smb-open-connection): Clear password cache if login has failed. + + * net/tramp.el (tramp-completion-mode) Don't check for 'xemacs' but + `tramp-unified-filenames'. + (tramp-completion-mode): Make test for XEmacs explicitely. + `event-to-character' can exists in Emacs packages too. + Reported by Matt Swift . + (tramp-buffer-name): Buffer name must contain the user if exists. + Reported by Adrian Phillips . + (tramp-do-copy-or-rename-file): Handle out-of-band methods. + Call `tramp-do-copy-or-rename-file-out-of-band' this case. + (tramp-do-copy-or-rename-file-out-of-band): Rename from + `tramp-do-copy-or-rename-file-one-local', because it handles also + the case both files use the same out-of-band method. + Implementation added. + (tramp-handle-file-local-copy, tramp-handle-write-region): + Out-of-band handling removed. `copy-file' called instead, which + calls `tramp-do-copy-or-rename-file-out-of-band'. + (tramp-action-password): Check for out-of-band method removed. + This function is used for 'login-program. + (tramp-post-connection): Use `tramp-method-out-of-band-p' when + appropriate. + (tramp-completion-function-alist-ssh): Add `tramp-parse-shostkeys' + and `tramp-parse-sknownhosts'. + (tramp-completion-function-alist): It's a defvar now, because we + want to apply the optimized `tramp-set-completion-function' + instead of a static list. + (tramp-set-completion-function): Implementation tuned. + Avoid double entries, and entries where the function or the + file/directory doesn't exist. + (tramp-parse-shostkeys, tramp-parse-sknownhosts): New functions + for SSH2. + (tramp-file-name-handler-alist): Add `dired-compress-file' entry. + (tramp-handle-dired-compress-file): New function. + (tramp-async-proc): New variable. + (tramp-handle-shell-command): Adding asynchronous processes. + They are far from being perfect, but it works at least for + `find-grep-dired' and `find-name-dired' in Emacs 21.4. + (top-level): Require password.el if visible. Should be mandatory + once No Gnus has found its way into (X)Emacs. + (tramp-read-passwd): Invoke `password-read' if available, + `read-passwd' otherwise. `ange-ftp-read-passwd' isn't used as + fallback any longer. + (tramp-clear-passwd): New function. + (tramp-process-actions, tramp-process-multi-actions): + Clear password cache if login has failed. + + * net/tramp-ftp.el (Commentary): Remove pointer to EFS. It has + its own module. + (tramp-ftp-file-name-handler): Unset `ange-ftp-ftp-name-arg' and + `ange-ftp-ftp-name-res'. There could be incorrect values from + previous calls in case the "ftp" method is used in the Tramp file + name. Reported by Katsumi Yamaoka . + +2004-02-28 Richard M. Stallman + + * term.el (term-mouse-paste): Call mouse-set-point. + + * thumbs.el: New file. + +2004-02-28 Vinicius Jose Latorre + + * progmodes/ebnf-abn.el: Doc fix. + + * progmodes/ebnf-bnf.el: Doc fix. + (ebnf-repeat): Code fix. + + * progmodes/ebnf2ps.el: Doc fix. + (ebnf-syntax-directory, ebnf-syntax-file): New funs. + +2004-02-28 Juri Linkov + + * ffap.el (dired-at-point): Additional writability test for + relative directory names. + (dired-at-point-prompter): Treat directories as a directory, get + the directory component from files. + (ffap-string-at-point): Return string from region if region is active. + (ffap-file-at-point): Remove redundant code. + +2004-02-28 Kim F. Storm + + * gdb-ui.el (breakpoint-enabled-icon, breakpoint-disabled-icon): + Initialize margin area images to nil. + (breakpoint-bitmap): New defvar for breakpoint fringe bitmaps. + (breakpoint-enabled-bitmap-face) + (breakpoint-disabled-bitmap-face): New faces for bpt in fringe. + (gdb-info-breakpoints-custom): Use gdb-remove-breakpoint-icons. + (gdb-info-breakpoints-custom): Use gdb-put-breakpoint-icon. + (gdb-mouse-toggle-breakpoint): Handle bpt in fringe. + (gdb-reset): Use gdb-remove-breakpoint-icons. + (gdb-put-string): Add dprop arg to specify alternative display + property (for setting fringe bitmap). + (gdb-remove-strings): Doc fix. + (gdb-put-breakpoint-icon): New defun which displays a breakpoint + icon in fringe (if available), or else as icon or text in display + margin. Creates necessary icons in breakpoint-bitmap, + breakpoint-enabled-icon, and/or breakpoint-disabled-icon. + Also make left window margin if required. + (gdb-remove-breakpoint-icons): New defun to remove breakpoint + icons inserted by gdb-put-breakpoint-icon. Remove left margin if + no longer needed. + (gdb-assembler-custom): Use gdb-remove-breakpoint-icons and + gdb-put-breakpoint-icon. + (gdb-assembler-mode): Don't set left-margin-width here. + +2004-02-27 Kevin Ryde + + * info-look.el: In scheme-mode symbol regexp, disallow backquote and + comma, so that it DTRT in macros. + +2004-02-27 Markus Rost + + * progmodes/sh-script.el (sh-shell-arg) + (sh-require-final-newline, sh-assignment-regexp, sh-builtins) + (sh-leading-keywords, sh-other-keywords): Fix custom type. + +2004-02-27 Dan Nicolaescu + + * faces.el (face-spec-set-match-display): Add a new attribute, + `min-colors'. + (region, highlight, secondary-selection): Use `min-colors'. + + * custom.el (defface): Add documentation for `min-colors'. + + * font-lock.el (font-lock-comment-face, font-lock-string-face) + (font-lock-keyword-face, font-lock-function-name-face) + (font-lock-variable-name-face, font-lock-constant-face): + Use `min-colors'. + + * isearch.el (isearch, isearch-lazy-highlight-face): Use `min-colors'. + +2004-02-25 Vinicius Jose Latorre + + * progmodes/ebnf2ps.el: Doc fix. For compatibility with Emacs 20, + define assq-delete-all if it's not defined. + (ebnf-generate-region): Code fix. + + * printing.el: Doc fix. + (pr-version): New version number (6.7.2). + (pr-command): Return empty string if command is an empty string. + +2004-02-24 Vinicius Jose Latorre + + * progmodes/ebnf-abn.el: New file, implements an ABNF parser. + + * progmodes/ebnf2ps.el: Doc fix. Accept ABNF (Augmented BNF). New + arrow shapes: semi-up-hollow, semi-up-full, semi-down-hollow and + semi-down-full. Fix a bug on productions like test = {"test"}* | ( + "tt" ["test"] ). Reported by Markus Dreyer + . + (ebnf-version): New version number (4.0). + (ebnf-print-directory, ebnf-print-file, ebnf-spool-directory) + (ebnf-spool-file, ebnf-eps-directory, ebnf-eps-file) + (ebnf-delete-style): New commands. + (ebnf-directory, ebnf-file): New funs. + (ebnf-special-show-delimiter, ebnf-file-suffix-regexp) + (ebnf-production-name-p, ebnf-stop-on-error): New options. + (ebnf-syntax-alist): New var. + (ebnf-element-width): New fun replacing ebnf-list-width. + (ebnf-arrow-shape, ebnf-syntax): Custom fix. + (ebnf-style-custom-list, ebnf-style-database, ebnf-arrow-shape-alist) + (ebnf-prologue): Adjust vars. + (ebnf-setup, ebnf-insert-style, ebnf-merge-style, ebnf-apply-style) + (ebnf-reset-style, ebnf-push-style, ebnf-pop-style) + (ebnf-check-style-values, ebnf-generate-production) + (ebnf-generate-region, ebnf-production-dimension, ebnf-justify-list) + (ebnf-make-terminal1, ebnf-make-or-more1, ebnf-make-repeat) + (ebnf-token-repeat): Code fix. + + * progmodes/ebnf-yac.el: Doc fix. Handle Bison pragmas %nonassoc, + %right, %left and %prec. Suggested by Matthew K. Junker + . + (ebnf-yac-definitions, ebnf-yac-lex): Code fix. + + * progmodes/ebnf-iso.el: Doc fix. + (ebnf-iso-token-table, ebnf-iso-non-terminal-chars): Adjust vars. + (ebnf-iso-lex): Code fix. + + * progmodes/ebnf-bnf.el: Doc fix. + (ebnf-bnf-lex): Code fix. + + * progmodes/ebnf-otz.el: Doc fix. + +2004-02-23 Luc Teirlinck + + * abbrev.el (write-abbrev-file): Make argument optional. Doc fix. + (abbrev-prefix-mark): Doc fix. + +2004-02-23 Nick Roberts + + * gdb-ui.el (gud-watch): Load tooltip, if necessary. + (gdb-var-create-handler): Force speedbar-update-flag to be non-nil. + (gdb-var-delete): Make interactive (really). + (gdb-edit-value): Make non-interactive. + + * progmodes/gud.el (gud-speedbar-menu-items): + Add gdb-var-delete and, indirectly, gdb-edit-value. + (gud-install-speedbar-variables): Bind gdb-var-delete to "D". + (gud-speedbar-buttons): Remove gdb-var-delete from tag-line. + (gud-gdb-marker-filter): Add comment for annotations. + +2004-02-23 Glenn Morris + + * calendar/calendar.el (generate-calendar) + (calendar-read-date): Prevent display of BC calendars once more - + reverts 2003-10-01 change. + (generate-calendar-month): Doc fix. + +2004-02-03 Matthew Mundell (tiny change) + + * calendar/diary-lib.el (fancy-diary-display): Don't rely on + return value of increment-calendar-month. + +2004-02-21 Stephen Compall + + * saveplace.el (save-place-forget-unreadable-files) + (save-place-save-skipped, save-place-skip-check-regexp): New vars. + (save-place-forget-unreadable-files): New function. + (save-place-alist-to-file): Use it to filter out files that are + no longer readable. + + * textmodes/texinfo.el (texinfo-insert-@item): Look for the + current Texinfo environment, using the same method as in + `texinfo-insert-@end', and insert a space rather than a newline if + point in a @table environment. + +2004-02-21 Juri Linkov + + * ffap.el (ffap-file-at-point): Try parent directories. + +2004-02-21 Klaus Zeitler + + * vcursor.el (vcursor-modifiers): New defcustom. + (vcursor-cs-binding): Use vcursor-modifiers instead of a + hard-coded list. + +2004-02-21 Masatake YAMATO + + * play/animate.el (animate-birthday-present): Accept names other + than `Sarah', too. + +2004-02-21 Juri Linkov + + * startup.el: Remove table of command line arguments from the + Commentary section. + +2004-02-20 John Wiegley + + * eshell/em-pred.el (eshell-modifier-alist): Change the "eval + again" modifier from 'e' to 'E', since 'e' is also used by the + "file extension" modifier. + +2004-02-19 Luc Teirlinck + + * help-fns.el (describe-categories): Doc fix. + +2003-02-19 Michael Kifer + + * ediff-util.el (ediff-compute-custom-diffs-maybe): Avoid creating + temporary file for buffer already visiting one. This change makes + output likely to be directly usable by patch program. + Suggested by Adrian Aichner + +2004-02-20 Nick Roberts + + * gdb-ui.el (gdb-use-colon-colon-notation): Set default to nil for + case of variables defined in compound statements. + (gdb-setup-windows, gdb-source-info, gdb-source-info): + Simplify constructions using switch-to-buffer. + +2004-02-19 Simon Josefsson + + * play/morse.el: Fix typo. + (morse-code): Add @. + +2004-02-19 Glenn Morris + + * calendar/appt.el (appt-display-format): Change default to + 'ignore, for backwards compatibility. + (appt-display-message): If appt-display-format is 'ignore, + respect old vars appt-msg-window and appt-visible. + (appt-activate): Don't depend on return value of cancel-timer. + + * calendar/calendar.el (calendar-holidays): Doc fix. + + * calendar/cal-coptic.el (coptic-prompt-for-date): + Use assoc-string instead of assoc-ignore-case. + * calendar/cal-french.el (calendar-goto-french-date): Ditto. + * calendar/cal-hebrew.el (calendar-goto-hebrew-date) + (mark-hebrew-diary-entries, list-yahrzeit-dates): Ditto. + * calendar/cal-islam.el (calendar-goto-islamic-date) + (mark-islamic-diary-entries): Ditto. + * calendar/cal-julian.el (calendar-goto-julian-date): Ditto. + * calendar/cal-mayan.el (calendar-read-mayan-haab-date) + (calendar-read-mayan-tzolkin-date): Ditto. + * calendar/calendar.el (calendar-read-date): Ditto. + * calendar/diary-lib.el (mark-diary-entries): Ditto. + +2004-02-18 Markus Rost + + * progmodes/executable.el (executable-command-find-posix-p): + Fix choice of the directory. + +2004-02-17 Luc Teirlinck + + * simple.el (interprogram-cut-function) + (interprogram-paste-function, kill-new, kill-append): + Doc fixes. + (kill-region): Make it return nil. Doc fix. + (yank-pop): Make its argument optional. + (yank): Make ARG `-' equivalent to `-1'. + +2004-02-17 Eli Zaretskii + + * mail/rmail.el (rmail-get-new-mail): Don't reference + rmail-use-spam-filter if rmail-spam-filter is not loaded. + +2004-02-16 Luc Teirlinck + + * autorevert.el (auto-revert-buffer-p): Only revert dired buffers + if one of global-auto-revert-non-file-buffers or autorevert-mode + is non-nil. + +2004-02-16 Eli Zaretskii + + * subr.el (delete-dups): A better implementation from Karl Heuer + . + +2004-02-16 Matt Hodges (tiny change) + + * net/telnet.el (telnet-interrupt-subjob): Move doc string to the + correct place. + * progmodes/icon.el (icon-indent-command): Ditto. + * textmodes/paragraphs.el (repunctuate-sentences): Ditto. + +2004-02-16 Eli Zaretskii + + * progmodes/grep.el (grep-compute-defaults): Undo change from + 2004-01-29: don't use executable-command-find-posix-p. + +2004-02-16 Richard Sharman + + * hilit-chg.el: Use require instead of eval-and-compile. + (highlight-compare-buffers): New function. + +2004-02-16 John Basrai (tiny change) + + * man.el (Man-fontify-manpage): Render section headings in + `Man-overstrike-face' even when overstrike was not used by man + formatter for section headings. + +2004-02-16 Eli Tziperman + + * rmail-spam-filter.el: (vm-use-spam-filter) + (rsf-min-region-length-added-to-spam-list): New variables. + (rsf-bbdb-auto-delete-spam-bbdb-entries): Rename from + rmail-bbdb-auto-delete-spam-entries. Add cc: to recipients for + spam testing. Don't delete spam message if automatic deletion + after output via variable rmail-delete-after-output is turned on. + (rsf-bbdb-dont-create-entries-for-deleted-messages): Rename from + rsf-bbdb-dont-create-entries-for-spam. + (check-field): New function, extracted from code in + rmail-spam-filter to ease addition of header fields like content-type. + (message-content-type): New variable to check the content-type: + field added, also in defcustom of rsf-definitions-alist. + (rmail-spam-filter): Replace repeated test code for header fields + by calls to check-field; change the call to + rmail-output-to-rmail-file such that rmail-current-message stays + the same to avoid wrong deletion of unseen flags. + (rsf-add-contents-type): New function to convert old format + of rmail-spam-definitions-alist into new one. + Change prefixes of all variables and functions from + rmail-spam-filter- or spam-filter- or rmail-spam- to rsf-. + +2004-02-16 Eli Zaretskii + + * loadhist.el (unload-hook-features-list): New defvar. + +2004-02-16 Dave Love + + * loadhist.el (unload-feature): Doc fix. Rename flist to + unload-hook-features-list. + +2004-02-16 Jay Belanger (tiny change) + + * calc/calc-embed.el (calc-do-embedded-activate): Add autoload + cookie. Don't check if we are looking-at open-formula. + +2004-02-16 Jesper Harder (tiny change) + + * subr.el (match-string-no-properties): Use substring-no-properties. + +2004-02-16 Eli Zaretskii + + * emacs-lisp/rx.el (rx-check, rx-check-any, rx-check-not) + (rx-repeat, rx-check-backref, rx-syntax, rx-to-string): + Use lower-case "rx" in all error message. + +2004-02-16 Dave Love + + * emacs-lisp/rx.el (rx-or): Put group around result. + (rx-constituents): Add backref. + (rx-syntax): Add string-delimiter, comment-delimiter. + (rx-categories): Add combining-diacritic. + (rx-check-not, rx-greedy, rx): Doc fix. + (rx-backref, rx-check-backref): New. + +2004-02-16 Jesper Harder + + * newcomment.el (uncomment-region): Allow eob as comment end. + +2004-02-16 Jari Aalto + + * filecache.el: All message and error commands now use prefix + "Filecache:" to make it easy to read *Messages* buffer. + +2004-02-16 Jari Aalto + + * autorevert.el: Add support to detect changed dired and VC buffers. + (auto-revert-active-p, auto-revert-list-diff) + (auto-revert-dired-file-list, auto-revert-dired-changed-p) + (auto-revert-handler, auto-revert-active-p): New functions. + (auto-revert-buffers): Move revert logic to `auto-revert-handler' + and `auto-revert-active-p'. + (eval-when-compile): Defvar dired-directory and vc-mode. + (auto-revert-vc-cvs-file-version, auto-revert-vc-buffer-p) + (auto-revert-handler-vc): New functions. + +2004-02-16 Alfred M. Szmidt (tiny change) + + * progmodes/compile.el (compilation-directory): New defvar. + (compile): Save current directory in compilation-directory. + (recompile): Bind default-directory to compilation-directory if + that is non-nil. + +2004-02-16 Dave Love + + * newcomment.el (comment-insert-comment-function) + (comment-region-function, uncomment-region-function): New. + (comment-indent): Use comment-insert-comment-function. + (uncomment-region): Use uncomment-region-function. + (comment-region): Use comment-region-function. + + * emacs-lisp/rx.el (rx-not): Bind case-fold-search to nil. + +2004-02-16 Richard Stallman + + * Makefile.in (TAGS, TAGS-LISP): Filter out of `els' only + loaddefs* and ldefs-boot*. + +2004-02-16 Eli Zaretskii + + * mail/mail-utils.el (rmail-dont-reply-to): Anchor user login name + and email address at the beginning and end of the address. + + * mail/rmail.el (rmail-default-dont-reply-to-names): Make "info-" + anchored at the beginning of the email address. + +2004-02-16 TAKAI Kousuke (tiny change) + + * international/ccl.el (ccl-compile-write): Pass `left' to + ccl-embed-code to generate correct code of write-expr-register. + +2004-02-15 Dan Nicolaescu (tiny change) + + * progmodes/grep.el (grep-compute-defaults): Fix typos. + +2004-02-15 Jan Dj,Ad(Brv + + * x-dnd.el: Mention support for Motif in commentary. + (x-dnd-handle-drag-n-drop-event): Ditto. + +2004-02-14 Jonathan Yavner + + * ses.el: Use "ses--" prefixes for buffer-local variables. + Use (point-min) instead of 1, even when we know the buffer + is unnarrowed. + (ses-build-load-map): Delete. Distribute its content to defconst's for + the three maps. + (ses-menu, ses-header-line-menu): New menus. + (ses-mode-map): Use them. + (ses-read-number) New fun. Duplicates code from interactive "N" spec. + +2004-02-14 Martin Stjernholm + + * Makefile.in: Fix the CC Mode recompile kludge so it works + when building in a different directory. + +2004-02-13 Luc Teirlinck + + * simple.el (kill-new): Put yank-handler property on the entire string. + +2004-02-11 Stefan Monnier + + * diff.el: Don't use compile any more, use diff-mode instead. + (diff-regexp-alist, diff-old-file, diff-new-file) + (diff-parse-differences, diff-process-setup): Remove. + (diff-sentinel): New fun. + (diff): Use it. Run the process ourselves. + Use diff-mode for the rest of the processing. + + * diff.el (diff): Simplify code handling `switch'. + +2004-02-11 Stefan Monnier + + * pcvs-defs.el (cvs-menu): Add `tag'. + +2004-02-11 Luc Teirlinck + + * simple.el (kill-append): Doc fix. + + * emacs-lisp/lisp-mode.el (lisp-mode-variables): + Adapt outline-regexp to the new conventions for commenting out code. + +2004-02-11 John Paul Wallington + + * mail/smtpmail.el (smtpmail-try-auth-methods): Fix typo. + +2004-02-10 Stefan Monnier + + * diff.el (diff-switches): New fun. + (diff, diff-backup): Use it. + (diff): Clean up the args construction. Use backquote. + Use listp instead of consp to avoid putting a nil arg. + (diff): Add a revert-buffer function. + +2004-02-10 Jan Dj,Ad(Brv + + * x-dnd.el (x-dnd-types-alist): Add COMPOUND_TEXT, FILE_NAME + handled by x-dnd-handle-file-name. + (x-dnd-known-types): Add COMPOUND_TEXT. + (x-dnd-init-frame): Call x-dnd-init-motif-for-frame. + (x-dnd-get-state-cons-for-frame): Must do copy-sequence on + x-dnd-empty-state. + (x-dnd-forget-drop): Ditto. + (x-dnd-save-state): Add optional parameter extra-data (for Motif). + (x-dnd-handle-one-url): Return private when inserting text. + (x-dnd-insert-ctext): New function. + (x-dnd-handle-file-name): New function for FILE_NAME. + (x-dnd-handle-drag-n-drop-event): Add Motif, remove call to error. + (x-dnd-init-motif-for-frame, x-dnd-get-motif-value) + (x-dnd-motif-value-to-list, x-dnd-handle-motif): New functions. + +2004-02-10 Kenichi Handa + + * term/x-win.el (x-select-utf8-or-ctext): Use compare-strings + instead of while loop. + +2004-02-10 Miles Bader + + * emacs-lisp/macroexp.el: New file, implements `macroexpand-all'. + +2004-02-09 Kenichi Handa + + * tar-mode.el (tar-extract): Fix for the case that a file doesn't + have end-of-line. + +2004-02-09 Martin Stjernholm + + * Makefile.in: Added extra dependencies in the recompile target + needed to cope with the compile time macro expansions in CC Mode. + +2004-02-09 Kim F. Storm + + * fringe.el (no-fringe-bitmap, undef-fringe-bitmap) + (left-truncation-fringe-bitmap, right-truncation-fringe-bitmap) + (up-arrow-fringe-bitmap, down-arrow-fringe-bitmap) + (continued-line-fringe-bitmap, continuation-line-fringe-bitmap) + (overlay-arrow-fringe-bitmap, top-left-angle-fringe-bitmap) + (top-right-angle-fringe-bitmap, bottom-left-angle-fringe-bitmap) + (bottom-right-angle-fringe-bitmap, left-bracket-fringe-bitmap) + (right-bracket-fringe-bitmap, filled-box-cursor-fringe-bitmap) + (hollow-box-cursor-fringe-bitmap, hollow-square-fringe-bitmap) + (bar-cursor-fringe-bitmap, hbar-cursor-fringe-bitmap) + (empty-line-fringe-bitmap): Define standard fringe bitmaps id's. + +2004-02-08 Stefan Monnier + + * window.el (window-safely-shrinkable-p): Don't change the buffer-list. + Don't allow shrink if there's a window on our right. + + * progmodes/prolog.el (prolog-program-name): Use gprolog if available. + (prolog-mode-syntax-table, prolog-mode-abbrev-table, prolog-mode-map): + Bring together declaration and initialization. + (prolog-mode-variables): Don't set the syntax table. + Don't set paragraph-start and comment-indent-function. + Add /*..*/ to the comment regexps. + (prolog-mode-commands): Remove. Do it during init of prolog-mode-map. + (prolog-mode-map): Don't bind TAB. + (prolog-mode): Set the syntax table. + (prolog-comment-indent): Remove. + (inferior-prolog-mode-map): Initialize in the declaration. + (inferior-prolog-mode-syntax-table) + (inferior-prolog-mode-abbrev-table): New vars. + (inferior-prolog-mode): Derive from comint-mode. + (run-prolog): Avoid switch-to-buffer which can fail in dedicated and + minibuffer windows. + + * progmodes/grep.el (grep-regexp-alist): Allow :, \t and ( + in file names, as long as it is unabmiguous. + +2004-02-08 Andreas Schwab + + * textmodes/reftex-toc.el + (reftex-toc-load-all-files-for-promotion): Remove useless use of + format. Doc fix. + + * textmodes/refer.el (refer-find-entry-internal): Remove extra + format string arguments. + + * tar-mode.el (tar-parse-octal-integer-safe): Add missing format + string argument. + + * progmodes/xscheme.el (verify-xscheme-buffer): Fix format strings. + + * play/zone.el (zone-call): Fix format string. + + * net/webjump.el (webjump-builtin): Add missing format string argument. + + * midnight.el (midnight-delay-set): Remove extra format string argument. + + * mail/rmail.el (rmail-get-new-mail): Remove useless use of format. + + * hexl.el (hexl-insert-char): Add missing format string argument. + + * format.el (format-decode): Fix format string. + + * emulation/vi.el (vi-mode): Remove extra format string argument. + (vi-repeat-last-search): Likewise. + (vi-reverse-last-search): Likewise. + (vi-goto-mark): Likewise. + (vi-reverse-last-find-char): Likewise. + (vi-repeat-last-find-char): Likewise. + (vi-locate-def): Likewise. + + * emacs-lisp/lisp-mnt.el (lm-verify): Remove useless use of format. + + * ediff-util.el (ediff-toggle-read-only): Remove extra format + string argument. + (ediff-toggle-regexp-match): Likewise. + + * dired-aux.el (dired-do-query-replace-regexp): Add missing + format string argument. + + * calc/calc-map.el (calc-get-operator): Remove extra format + string argument. + + * calc/calc-forms.el (calc-convert-time-zones): Fix format string. + + * calc/calc-ext.el (calc-do-prefix-help): Remove extra format + string argument. + + * eshell/esh-mode.el (eshell-send-invisible): Fix format string. + + * eshell/em-hist.el (eshell-hist-word-reference): Fix format string. + + * emulation/viper-ex.el (ex-mark): Remove extra format string argument. + + * emacs-lisp/cl-macs.el (defstruct): Remove extra format string arg. + (cl-struct-setf-expander): Likewise. + + * vc.el (with-vc-file): Fix unsafe uses of error. + (vc-cancel-version): Likewise. + +2004-02-08 Jan Nieuwenhuizen (tiny change) + + * progmodes/gud.el (gud-jdb-marker-filter): Add period as optional + thousands separator; fixes : regexp for + non-english locales. + +2004-02-08 Andreas Schwab + + * view.el (view-mode-enable): Revert previous change. + +2004-02-07 Kim F. Storm + + * simple.el (line-number-at-pos): Rename from line-at-pos. + Uses changed (what-line and vc-annotate-warp-version). + +2004-02-06 Stefan Monnier + + * diff-mode.el (diff-file-regexp-alist, diff-error-regexp-alist) + (diff-mode): Remove aborted attempt at support for compile.el. + (diff-mode, diff-minor-mode): Avoid obsolete write-contents-hooks. + +2004-02-06 Andreas Schwab + + * view.el (view-mode-enable): Add view-mode-map to + minor-mode-overriding-map-alist. + +2004-02-05 Jan Dj,Ad(Brv + + * x-dnd.el (x-dnd-get-local-file-name): Fix byte compiler warning + +2004-02-04 Stefan Monnier + + * progmodes/cperl-mode.el (cperl-fill-paragraph): Call fill-paragraph + with point inside rather than after the paragraph. + +2004-02-04 Sam Steingold + + * mail/smtpmail.el (smtpmail-try-auth-methods): + Do not try authentication when no mechanism is available. + Pass port-name as defaultport to `netrc-machine'. + +2004-02-04 Stephen Eglen + + * iswitchb.el (iswitchb-minibuffer-setup-hook): Update doc string + to show how minibuffer height can be constrained. + +2004-02-04 John Paul Wallington + + * files.el (auto-mode-alist): Fix .scm, .stk, .ss, .sch entry. + +2004-02-03 Jan Dj,Ad(Brv + + * x-dnd.el: New file for drag and drop. + + * term/x-win.el: require x-dnd, set after-make-frame-functions + to x-dnd-init-frame, let x-dnd-handle-drag-n-drop-event handle + drag-n-drop event. + + * dired.el (dired-dnd-test-function, dired-dnd-popup-notice) + (dired-dnd-do-ask-action, dired-dnd-handle-local-file) + (dired-dnd-handle-file): New functions for drag and drop support. + (dired-mode): Initialize drag and drop if x-dnd present. + +2004-02-02 Stefan Monnier + + * progmodes/cperl-mode.el (cperl-mode-map, cperl-do-auto-fill) + (cperl-menu): Use fill-paragraph, not cperl-fill-paragraph. + (cperl-mode): Set fill-paragraph-function. + (cperl-fill-paragraph): Make it non-interactive. + +2004-02-02 Benjamin Rutt + + * diff-mode.el (diff-mode-shared-map): Bind q to `quit-window'. + +2004-02-02 David Kastrup + + * replace.el (perform-replace): Allow 'literal argument in + regexp-flag to indicate literal replacement. + (query-replace-regexp-eval): Use it. + +2004-02-01 Andreas Schwab + + * progmodes/executable.el (executable-command-find-posix-p): Doc fix. + +2004-02-01 Stephen Eglen + + * info-look.el: Add support for maxima-mode. Update commentary + because info-lookup-symbol is now bound to C-h S. + +2004-01-31 Luc Teirlinck + + * simple.el (edit-and-eval-command): Bind print-level and + minibuffer-history-sexp-flag around call to read-from-minibuffer. + Correct initial position in command-history. + +2004-01-30 Luc Teirlinck + + * files.el (read-directory-name): Adapt the docstring to recent + change in Fread_file_name. + +2004-01-30 Jonathan Yavner + + * ses.el (ses-print-cell): If print format too wide for column + width, truncate decimal places if that helps to avoid "#####" fill. + * ses.el (ses-initial-column-width): Revert previous change. + +2004-01-29 Stefan Monnier + + * jit-lock.el (jit-lock-context-time, jit-lock-context-timer): New var. + (with-buffer-unmodified, with-buffer-prepared-for-jit-lock): + Add edebug info. + (jit-lock-mode): Setup/cancel the new timer. + (jit-lock-context-fontify): New fun. Extracted from + context fontification code of jit-lock-stealth-fontify. + (jit-lock-stealth-fontify): Don't do context fontification any more. + + * jit-lock.el (jit-lock-stealth-fontify): Allow quit. + (jit-lock-fontify-now): Handle the `quit' case. + (jit-lock-contextually): Rename from jit-lock-defer-contextually. + +2004-01-29 Jari Aalto + + * progmodes/executable.el (executable-command-find-posix-p): + New. Check if find handles arguments Posix-style. + + * progmodes/grep.el (grep-compute-defaults): + Use executable-command-find-posix-p. + (grep-find): Check `grep-find-command'. + + * filecache.el (file-cache-find-posix-p): Delete. + (file-cache-add-directory-using-find): + Use `executable-command-find-posix-p'. + +2004-01-29 Dave Love + + * emacs-lisp/lisp.el (beginning-of-defun-raw, end-of-defun): + Iterate the hook function if arg is given. + (mark-defun, narrow-to-defun): Change order of finding the limits. + + * emacs-lisp/bytecomp.el (byte-compile-compatibility): Doc fix. + (byte-compile-format-warn): New. + (byte-compile-callargs-warn): Use it. + (Format, message, error): Add byte-compile-format-like property. + (byte-compile-maybe-guarded): New. + (byte-compile-if, byte-compile-cond): Use it. + (byte-compile-lambda): Compile interactive forms, + just to make warnings about them. + +2004-01-29 Jonathan Yavner + + * ses.el (ses-initial-column-width): Increase to 14, so it will + work well with the default printer of "%.7g" for extreme values + like "-1.234567e+07". + +2004-01-29 Kenichi Handa + + * term/x-win.el (x-selection-value): Optimize for ASCII only case. + +2004-01-28 Peter 'Luna' Runestig + + * dos-w32.el: Added support for the `default-printer-name' function. + +2004-01-27 Stefan Monnier + + * server.el (server-socket-name): Don't use the hostname in the + socket name since /tmp is local to the host anyway. + + * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): Use a more + robust check of widening and fix var-naming. + +2004-01-27 Eli Tziperman + + * rmail-spam-filter.el: Change rmail-spam-filter- or spam-filter- + or rmail-spam- to rsf- in all function and variable names. + (rsf-min-region-to-spam-list): New variable. + (rsf-bbdb-auto-delete-spam-entries): Rename from + rmail-bbdb-auto-delete-spam-bbdb-entries. The cc: field is + scanned together with the recipients field for spam testing; Don't + delete spam message if rmail-delete-after-output is non-nil; + (rsf-check-field): New function, extracted from code in + rmail-spam-filter to ease addition of header fields like + content-type:; + (message-content-type): New variable. The content-type: field was + added also in defcustom of rsf-definitions-alist; + (rmail-spam-filter): Replace repeated test code for header fields + by calls to check-field; change the call to + rmail-output-to-rmail-file such that rmail-current-message stays + the same to avoid wrong deletion of unseen flags. + (rmail-use-spam-filter): Add autoload cookie. + +2004-01-27 Jari Aalto + + * filecache.el (file-cache-find-posix-p): New function. Detect Cygwin. + (file-cache-add-directory-using-find): Add Cygwin support. + (file-cache-find-command-posix-flag): New user variable. + + * filecache.el (file-cache-add-directory): Check for + directories an remove them from dir-files. + +2004-01-27 Richard M. Stallman + + * man.el (Man-fontify-manpage): Clean up message. + +2004-01-27 Kenichi Handa + + * textmodes/paragraphs.el (sentence-end-without-space): New variable. + (sentence-end): Define using sentence-end-without-space. + + * textmodes/fill.el (fill-delete-newlines): Don't add a space if + a sentence ends with one of a character in sentence-end-without-space. + +2004-01-26 Stefan Monnier + + * font-lock.el (font-lock): Add jit-lock as explicit group member. + (jit-lock): Group declaration moved to jit-lock.el. + (toplevel): Don't explicitly require jit-lock, since it's autoloaded + when necessary. + + * jit-lock.el (jit-lock): Move group declaration from font-lock.el. + (jit-lock-context-unfontify-pos): Rename from + jit-lock-first-unfontify-pos. + (jit-lock-defer-buffers): Rename from jit-lock-buffers. + +2004-01-25 Glenn Morris + + * progmodes/fortran.el (fortran-break-before-delimiters): Doc fix. + (fortran-break-delimiters-re, fortran-no-break-re): New consts. + (fortran-fill): When filling a string, adjust re-search-backward + argument for special case of string just on fill-column. + When filling non-string, allow one extra char if + fortran-break-before-delimiters is non-nil. + Suggested by Michael Hagemann . + Use fortran-break-delimiters-re and fortran-no-break-re to + correctly handle cases such as "**". + + * progmodes/f90.el (f90-break-delimiters): Doc fix. + (f90-no-break-re): Add some extra tokens. Doc fix. + +2004-01-24 Thien-Thi Nguyen + + * mail/rmail-spam-filter.el: + Use two semicolons as Commentary line prefix. + Add ";;; Code:" stylized comment. + Delete end-of-line whitespace. + Wrap (require 'cl) with `eval-when-compile'. + +2004-01-23 Benjamin Rutt + + * vc.el (vc-annotate): Fix improper use of `make-local-variable' + at the top level of vc.el. + +2004-01-23 Andre Spiegel + + * vc.el (vc-current-line): Function removed. This is now done by + the new function line-at-pos in simple.el. + (vc-annotate-warp-version): Use line-at-pos instead of + vc-current-line. + +2004-01-22 Kim F. Storm + + * simple.el (line-at-pos): New defun. + (what-line): Use it. Optimize by only counting lines in narrowed + region once. + +2004-01-22 Kenichi Handa + + * language/cyrillic.el (ccl-encode-windows-1251-font): Rearrange code + point (register r1) only for charset mule-unicode-0100-24ff. + +2004-01-21 Markus Rost + + * mail/rmail.el (rmail-convert-to-babyl-format): Avoid deleting + trailing white space and ensure a final newline. + + * mail/rmail-spam-filter.el (rmail-use-spam-filter): + Add autoload cookie. + +2004-01-21 Benjamin Rutt + + * vc.el (vc-annotate-mode): Inherit from fundamental-mode and + activate view-mode explicitly. + +2004-01-21 Jan Dj,Ad(Brv + + * term/x-win.el: Call menu-bar-enable-clipboard and make Paste + use clipboard first. + +2004-01-20 Stefan Monnier + + * vc-mcvs.el (vc-mcvs-mode-line-string): Remove. Does not work. + (vc-mcvs-workfile-version): Manually macro expand vc-mcvs-cvs. + (vc-mcvs-cvs): Remove. + (vc-mcvs-command): Remove use of assert. + + * outline.el (outline-insert-heading): Tighten up match. + (outline-demote, outline-move-subtree-down): Don't assume anything + about outline-regexp. + + * textmodes/texinfo.el (texinfo-mode): Remove ^ from outline-regexp. + (texinfo-show-structure): Explicitly add ^, and simplify. + +2004-01-20 Glenn Morris + + * calendar/appt.el (appt-check): Restore usage of + appt-issue-message deleted in previous change. + (top-level): Activate package when loaded (needed for backwards + compatibility). + +2004-01-20 Jesper Harder + + * mail/smtpmail.el (smtpmail-via-smtp): No need to add two bytes + following previous change to smtpmail-send-data. + +2004-01-20 Benjamin Rutt + + * vc.el (vc-default-previous-version): Doc enhancement. + (vc-default-next-version): New function. + (vc-print-log): New arg FOCUS-REV. + (vc-annotate-mode): Derive from view-mode. + (vc-annotate): New args REVISION, DISPLAY-MODE. + (vc-annotate-workfile-version, vc-annotate-extract-revision-at-line) + (vc-annotate-revision-at-line, vc-annotate-revision-previous-to-line) + (vc-annotate-show-log-revision-at-line, vc-annotate-warp-version) + (vc-annotate-show-diff-revision-at-line, vc-current-line) + (vc-annotate-prev-version, vc-annotate-next-version): New functions. + + * vc-cvs.el (vc-cvs-annotate-extract-revision-at-line): New function. + +2004-01-19 Karl Berry + + * textmodes/texinfo.el: Use "Texinfo" consistently, no "TeXinfo" + or "TexInfo". + +2004-01-19 Luc Teirlinck + + * subr.el (delete-dups): New function. + +2004-01-19 Karl Berry + + * textmodes/texinfo.el (texinfo-mode): Define outline-regexp to start + with ^, since that's what texinfo-show-structure + documentation says (plus it works much better in texinfo.txi). + +2004-01-18 Jesper Harder + + * mail/smtpmail.el (smtpmail-send-data): Don't append spurious newline. + +2004-01-18 David Ponce (tiny change) + + * progmodes/which-func.el (which-function-mode): Don't cancel + which-func-update-timer if not set. + +2004-01-17 Thien-Thi Nguyen + + * calendar/diary-lib.el (diary-entry-time): Fix typo/bug: + Remove spurious left square bracket in XX:XXam regexp. + +2004-01-16 Luc Teirlinck + + * progmodes/cc-defs.el: Do not require cl at run time. + +2004-01-16 Richard M. Stallman + + * emacs-lisp/cl.el (cl-cannot-unload): New function. + (cl-unload-hook): Defvar this to run cl-cannot-unload. + + * mail/rmail.el (rmail-get-new-mail): New local rsf-number-of-spam. + Call rmail-spam-filter. Delete and expunge spam. + Print number of spam messages deleted. + Save and restore the deletion status of old messages when reading + new mail with spam filter, so that expunging spam does not expunge + msgs deleted by the user. + (rmail-only-expunge): Add an optional argument dont-show to + prevent showing message after expunge. + +2004-01-15 Luc Teirlinck + + * emacs-lisp/cl.el (declare): Add `fmakunbound' for `declare'. + * subr.el (declare): New macro. + +2004-01-15 Thien-Thi Nguyen + + * progmodes/scheme.el (scheme-font-lock-keywords-2): Add "force". + +2004-01-14 Stefan Monnier + + * mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event): + Test window-system rather than system-type (for X11/Mac). + +2004-01-12 Luc Teirlinck + + * emacs-lisp/bytecomp.el (compile-defun): Doc fix. + +2004-01-12 Richard M. Stallman + + * mail/rmail.el (rmail-convert-to-babyl-format): + Use mail-unquote-printable-region. + (rmail-hex-string-to-integer, rmail-decode-quoted-printable): + (rmail-hex-char-to-integer): Functions deleted. + + * mail/mail-utils.el (mail-unquote-printable-hexdigit): Upcase CHAR. + (mail-unquote-printable-region): New arg NOERROR. + For invalid encoding, either signal an error to just return nil. + +2004-01-11 Glenn Morris + + * calendar/appt.el: Update copyright and commentary. + (appt-issue-message): Make obsolete. + (appt-visible, appt-msg-window): Make obsolete, in favour of + appt-display-format. + (appt-display-mode-line, appt-display-duration) + (appt-display-diary, appt-time-msg-list, appt-mode-string) + (appt-prev-comp-time, appt-display-count, appt-timer) + (appt-convert-time): Doc change. + (appt-disp-window-function, appt-delete-window-function): + Use defcustom rather than defvar. + (appt-display-format): New variable. + (appt-display-message): New function with display code from appt-check. + (appt-check): Add optional FORCE argument. Doc change. + Add appt-make-list to diary-hook if displaying diary. + Remove checking of view-diary-entries-initially. + Message display section removed to new function appt-display-message. + (appt-display-window): Doc change. Remove unused internal var + this-buffer. Do not beep, since appt-display-message does that. + (appt-make-list): Doc change. Use caar. + (appt-sort-list): Simplify by using builtin sort function. + (appt-update-list): New function for updating appts when diary is + saved. + (appt-activate): New autoloaded function to toggle package + functionality. + + * calendar/cal-x.el: (calendar-one-frame-setup) + (calendar-only-one-frame-setup, calendar-two-frame-setup): Doc change. + + * calendar/calendar.el: Update copyright. + (view-diary-entries-initially, european-calendar-style): Doc change. + (calendar-setup): Make defcustom rather than defvar. + (mark-visible-calendar-date): Initialize temp-face and faceinfo + in let binding so local to function. + + * calendar/diary-lib.el: Update copyright. + (diary, diary-entry-time): Doc change. + (list-diary-entries): Doc change. Trivial logic change. + (fancy-diary-display): Restore make-face command mistakenly + deleted 2003-05-08. + (show-all-diary-entries): Allow to pop-up frame if needed. + +2004-01-09 John Paul Wallington + + * bindings.el (mode-line-change-eol): Add EVENT parameter. + Temporarily select EVENT's window for changing eol type. + +2004-01-09 Deepak Goel + + * calendar/diary-lib.el (diary-entry-time): + Also accept time in the form XX[.XX][am/pm/AM/PM]. + (fancy-diary-font-lock-keywords): Likewise. + (diary-font-lock-keywords): Likewise. + * calendar/appt.el (appt-add): Likewise. + (appt-make-list): Likewise. + (appt-convert-time): Likewise. + +2004-01-08 Nick Roberts + + * gdb-ui.el (gdb-ann3): Revert previous change. + (gdb-source-info): Allow for case of where compilation directory + is not recorded. + +2004-01-08 John Paul Wallington + + * emerge.el (emerge-restore-buffer-characteristics): Doc fix. + +2004-01-07 Nick Roberts + + * progmodes/gud.el (gdb-first-prompt): Rename from gdb-first-pre-prompt + + * gdb-ui.el (gdba): Avoid duplication, use gdb-ann3. + (gdb-ann3): Use GDB command "set width 0" to prevent word wrapping + problems. + (gdb-prompt): Set (renamed) gdb-first-prompt to nil in gdb-ann3. + +2004-01-07 Luc Teirlinck + + * files.el (write-file-functions, write-contents-functions): + Clarify docstrings. + +2004-01-07 Kenichi Handa + + * international/mule.el (set-auto-coding): Fix for the case that + end-of-line is only CR. + +2004-01-07 Kim F. Storm + + * subr.el (event-start, event-end): Doc fix. + (posn-string, posn-image): New defuns. + (posn-object): Return either image or string object. + (posn-object-x-y): Return 8th element of position. + (posn-object-width-height): New defun. + +2004-01-06 Andreas Schwab + + * gdb-ui.el (gdb-frame-handler): Handle word wrapping anywhere in + output. + +2004-01-05 Karl Berry + + * emacs-lisp/copyright.el (copyright-regexp): Might as well allow + / and *, too. + +2003-12-31 Simon Josefsson + + * files.el (before-save-hook): Add. + (basic-save-buffer): Use before-save-hook. + + * emacs-lisp/copyright.el: Fix comment to recommend + before-save-hook instead of write-file-functions. + +2004-01-05 Richard M. Stallman + + * finder.el (finder-commentary): Call delete-other-windows. + + * net/ange-ftp.el (ange-ftp-file-attributes): + Pass 2 args to ange-ftp-real-file-attributes only if ID-FORMAT non-nil. + +2004-01-04 Karl Berry + + * emacs-lisp/copyright.el (copyright-regexp): Allow the common + comment characters % and # in the copyright year notice, + as well as ;. + +2004-01-04 Per Abrahamsen + + * wid-edit.el (default): Define dummy :value-delete. + Reported by Jesper Harder . + +2004-01-03 Richard M. Stallman + + * progmodes/compile.el (compile-internal): Use point, not point-min, + for set-window-point. + + * textmodes/tex-mode.el (latex-find-indent): Avoid error at end of buf. + + * emacs-lisp/lisp-mnt.el (lm-section-end): Require outline. + + * progmodes/grep.el (grep-mode-map): + Don't remap next-line, previous-line. + +2004-01-03 Eric M. Ludlam + + * speedbar.el (speedbar-edit-line): Change regexp to position + the cursor on the first character of this line's button. + +2004-01-03 Luc Teirlinck + + * subr.el (functionp): Doc fix. + +2004-01-03 Jesper Harder (tiny change) + + * progmodes/idlwave.el (idlwave-make-tags): + * textmodes/flyspell.el (flyspell-large-region):. + * progmodes/make-mode.el (makefile-query-by-make-minus-q): + * emulation/viper-util.el (viper-glob-unix-files): + * emacs-lisp/shadow.el (shadow-same-file-or-nonexistent): + * man.el (Man-init-defvars): + * jka-compr.el (jka-compr-call-process): + * files.el (get-free-disk-space,insert-directory): + * ediff-ptch.el (ediff-test-patch-utility): + * ediff-diff.el (ediff-test-utility): + * dired-aux.el (dired-check-process): + * mail/sendmail.el (sendmail-send-it): Don't use = or zerop to + test the return value of call-process, because it can be a string. + +2003-12-31 John Paul Wallington + + * bindings.el (completion-ignored-extensions): Add .pfsl. + +2003-12-31 Kim F. Storm + + * ido.el (ido-nonreadable-directory-p): New defun to check for + nonreadable directory without activating tramp (to avoid problems + with checking incomplete tramp paths). + (ido-set-current-directory, ido-file-internal) + (ido-file-name-all-completions1): Use it. + +2003-12-30 Luc Teirlinck + + * help-mode.el (help-xref-info-regexp): Make hyperlinks to Info + documentation if the anchor (or node) name is preceded by `info + anchor' or `Info anchor' in addition to earlier `info node' and + `Info node'. + (help-make-xrefs): Adapt to new value of `help-xref-info-regexp'. + +2003-12-30 Eli Zaretskii + + * mail/rmail.el (rmail-convert-to-babyl-format): Fix off-by-one + error in arguments to base64-decode-region. Remove ^M characters + after decoding base64. + +2003-12-30 Simon Josefsson + + * textmodes/texinfo.el: Change maintainer to FSF. Suggested by + karl@freefriends.org (Karl Berry), since the Texinfo Elisp files + have only been distributed with Emacs for some years. + (texinfo-mode-hook): Customize. + +2003-12-30 Eli Zaretskii + + * mail/rmail.el (rmail-convert-to-babyl-format): Make the code + cleaner (suggested by Richard Stallman). + + * progmodes/gud.el (gud-tool-bar-map): Modify names of icon files + for gud-next, gud-nexti, gud-step and gud-stepi to prevent + file-name clashes on 8+3 DOS filesystems. + + * toolbar/gud-next.pbm, toolbar/gud-next.xpm + * toolbar/gud-nexti.pbm, toolbar/gud-nexti.xpm + * toolbar/gud-step.pbm, toolbar/gud-step.xpm + * toolbar/gud-stepi.pbm, toolbar/gud-stepi.xpm: Renamed to + gud-n.*, gud-ni.*, gud-s.*, and gud-si.*, respectively, to avoid + file-name clashes on 8+3 filesystems. + + * emacs-lisp/tcover-unsafep.el, emacs-lisp/tcover-ses.el: + Renamed from testcover-unsafep.el and testcover-ses.el to avoid + file-name clashes on 8+3 DOS filesystems. + +2003-12-29 Richard M. Stallman + + * mail/mail-utils.el (mail-unquote-printable-hexdigit): + Upcase the character. + + * textmodes/flyspell.el (mail-mode-flyspell-verify): + Search for header separator alone on a line, literally, + and search for it backward, not forward. + (flyspell-abbrev-table): Always use global-abbrev-table + if there is no local one. + + * progmodes/sh-script.el (sh-get-indent-info): + Don't move point back if at bob. + + * progmodes/antlr-mode.el (save-buffer-state-x): Use with-no-warnings. + + * play/handwrite.el (handwrite): Make the handwrite credit message + a comment rather than an output command. + + * obsolete/sc.el: Display message that this file is obsolete. + + * net/ange-ftp.el (ange-ftp-start-process): Copy the environment. + + * mail/rfc822.el (rfc822-address-start): Declare variable. + Renamed from address-start. All uses changed. + + * term.el (term-exec): Set up sentinel. + (term-sentinel): New function. + (term-handle-exit): New function. + + * subr.el (assoc-ignore-case, assoc-ignore-representation): + Use assoc-string, and mark them obsolete. + (delay-mode-hooks): Mark as permanent local. + + * simple.el (sendmail-user-agent-compose): Use assoc-string. + + * register.el (copy-rectangle-to-register): Doc fix. + + * info.el (Info-insert-dir): Use assoc-string. + + * info-look.el (info-lookup): Use assoc-string. + + * frame.el (pop-up-frame-function): Use quote, not `function'. + (frame-notice-user-settings): Calculate ADJUSTED-TOP + copying with lists as coordinate values. + + * font-lock.el (font-lock-after-change-function): Bind inhibit-quit. + + * find-dired.el (kill-find): New command. + (find-dired): Make buffer read-only. + Set up a keymap with C-c C-k running kill-find. + (find-dired-filter, find-dired-sentinel): Bind inhibit-read-only. + + * files.el (backup-buffer-copy): If MODES is nil, don't set modes. + + * filecache.el (file-cache-ignore-case): New variable. + (file-cache-assoc-function): Var deleted. Use assoc-string instead. + + * comint.el (comint-arguments): Set COUNT after ARGS is complete. + (comint-dynamic-complete-as-filename): Rename local vars. + (comint-dynamic-list-filename-completions): Likewise. + + * comint.el (comint-dynamic-list-completions-config): New var. + (comint-dynamic-list-completions): Handle both SPC and TAB right. + + * comint.el (comint-file-name-chars): Add []. + (comint-word): Use skip-chars-backward, not search. + + * shell.el (shell-file-name-chars): Add []. + + * shell.el (shell-dynamic-complete-as-command): Rename local vars. + + * bookmark.el (bookmark-get-bookmark): Use assoc-string. + + * generic.el (define-generic-mode): Doc fix. + +2003-12-29 Eli Zaretskii + + * files.el (kill-some-buffers): Doc fix. + +2003-12-29 David Herring (tiny change) + + * comint.el (comint-watch-for-password-prompt): Pass `string' as + arg to send-invisible + (send-invisible): Doc fix. The argument is now a prompt, not the + string to send. + (comint-read-noecho): Doc fix. + +2003-12-29 Michael R. Wolf (tiny change) + + * net/ange-ftp.el (ange-ftp-name-format): Allow USER to contain + "@", as required by some ISP hosting service. Fix defcustom + argument syntax errors that prevented use of customization. + +2003-12-29 Eli Zaretskii + + * xml.el (xml-get-attribute-or-nil): Doc fix. + +2003-12-29 Peter 'Luna' Runestig + + * net/zone-mode.el (zone-mode): Use write-file-functions, not + write-file-hooks. + +2003-12-29 Eric Hanchrow (tiny change) + + * autorevert.el (auto-revert-interval): Doc fix. + +2003-12-29 Mark A. Hershberger + + * xml.el (xml-get-attribute-or-nil): New function, like + xml-get-attribute, but returns nil if the attribute was not found. + (xml-get-attribute): Convert to defsubst, uses + xml-get-attribute-or-nil. + +2003-12-29 Eli Zaretskii + + * emacs-lisp/easymenu.el (easy-menu-define): Doc fix. + +2003-12-29 Alex Schroeder (tiny change) + + * custom.el (custom-declare-theme): Use `value' when putting + properties on `theme'. + +2003-12-29 Takaaki Ota + + * subr.el (insert-for-yank): Call insert-for-yank-1 repetitively + for each yank-handler segment. + (insert-for-yank-1): New function, with the body of the previous + insert-for-yank. + + * textmodes/table.el (table-yank-handler): New defcustom. + (table--put-cell-indicator-property): Put yank-handler property + that indicates the yank handler for the table cell. + +2003-12-29 Jesper Harder (tiny change) + + * generic-x.el (etc-modules-conf-generic-mode): A more complete + set of keywords. + +2003-12-29 Eli Zaretskii + + * international/mule-cmds.el (reset-language-environment) + (set-language-environment): Don't invoke fontset-related functions + if fontset-list is not fboundp. + +2003-12-29 Kenichi Handa + + * international/mule-cmds.el (reset-language-environment): + Call set-overriding-fontspec-internal with nil. + (set-language-environment): Call set-overriding-fontspec-internal + if the language environment specify `overriding-fontspec'. + (language-info-alist): Doc added. + + * language/cyrillic.el (ccl-encode-koi8-font): Make it work for + characters of mule-unicode-0100-24ff. + (ccl-encode-windows-1251-font): New CCL program. + ("Bulgarian"): Specify overriding-fontspec. + ("Belarusian"): Likewise. + +2003-12-28 Sam Steingold + + * net/ange-ftp.el (ange-ftp-file-attributes): Add new optional + parameter ID-FORMAT to conform with the 2003-11-30 patch. + +2003-12-28 Nick Roberts + + * progmodes/gud.el (gud-gdb-command-name): Set default to + "gdb --annotate=3". + (gud-gdb-marker-filter): Look out for annotations. + (gdb-first-pre-prompt): New variable. + Remove trailing white space. + + * gdb-ui.el (gdb-prompt): Change filter for level 3 annotations, + if necessary. + (gdb-ann3): New function. Initialise M-x gdb as for M-x gdba if + annotations are detected. + (gud-gdba-marker-filter): Use global variable gud-marker-acc + instead of a local one to allow transition from + gud-gdb-marker-filter. + Remove trailing white space. + +2003-12-27 Kim F. Storm + + * ido.el: Handle non-readable directories. + (ido-decorations): Add 9th element for non-readable directory. + (ido-directory-nonreadable): New dynamic var. + (ido-set-current-directory): Set it. + (ido-read-buffer, ido-file-internal): + (ido-read-file-name, ido-read-directory-name): Let-bind it. + (ido-file-name-all-completions1): Return empty list for + non-readable directory. + (ido-exhibit): Print [Not readable] if directory is not readable. + (ido-expand-directory): New defun (based on tiny fix from Karl Chen). + (ido-read-file-name, ido-file-internal, ido-read-directory-name): + Use it. + +2003-12-27 Lars Hansen + + * ls-lisp.el (ls-lisp-insert-directory): Add parameter 'string in + calls to directory-files-and-attributes and file-attributes. + (ls-lisp-format): Remove system dependent handling of user and + group id's. + +2003-12-25 Luc Teirlinck + + * ffap.el (ffap-read-file-or-url): Revert previous change. + +2003-12-25 Robert J. Chassell + + * textmodes/texnfo-upd.el (texinfo-multi-file-update): Create a + new list of included files called `files-with-node-lines', that + only have node lines. This way @include commands can include any + file, such as version and update files without node lines, not + just files that are chapters. + +2003-12-25 Andreas Schwab + + * jka-compr.el (jka-compr-insert-file-contents): Avoid error when + file not found. + +2003-12-08 Miles Bader + + * dired.el (dired-between-files): Always use dired-move-to-filename, + which is more robust in non-english locales. + +2003-12-25 Markus Rost + + * vc.el (vc-dired-purge): Avoid error from `kill-line'. + +2003-12-24 Andreas Schwab + + * shell.el (shell-file-name-quote-list): Add backslash. + + * comint.el (comint-quote-filename): Correctly handle backslash + in comint-file-name-quote-list. + +2003-12-24 Kenichi Handa + + * international/mule-cmds.el (set-default-coding-systems): + Call ucs-set-table-for-input for all buffers that don't have local + value of buffer-file-coding-system. + + * international/ucs-tables.el (ucs-set-table-for-input): + If translation-table-for-encode is a symbol, get its + translation-table property. + +2003-12-23 Luc Teirlinck + + * ffap.el (ffap-read-file-or-url): Eliminate reliance of the call + to `completing-read' on a recently fixed bug. + + * fringe.el (fringe-query-style): Suggest `?' in minibuffer prompt, + instead of SPACE, to get the list of possible fringe modes. + SPACE only works if both `partial-completion-mode' and + `completion-auto-help' are nil. + + * complete.el (PC-is-complete-p): Delete. + (PC-do-completion): Replace all calls to `PC-is-complete-p' with + calls to `test-completion'. + +2003-12-23 Nick Roberts + + * progmodes/gud.el (gud-speedbar-buttons): Use speed-bar-edit-line + to edit values when there are no children. + + * gdb-ui.el (gdba, gdb-assembler-mode): Call the mode "Machine" as + a mode called "Assembler" already exists. + (gdb-use-colon-colon-notation, gdb-show-changed-values): New options. + (gud-watch): Use format option. Remove font properties from string. + (gdb-var-create-handler, gdb-var-list-children-handler): + Don't bother about properties as there are none. + (gdb-var-create-handler, gdb-var-list-children-handler) + (gdb-var-update-handler): Call gdb-var-evaluate-expression-handler + with two arguments. + (gdb-var-evaluate-expression-handler, gdb-post-prompt): + Let speedbar show value changes with a different font. + (gdb-edit-value): New defun. + (gdb-clear-partial-output, gdb-clear-inferior-io) + (def-gdb-auto-update-handler): Use erase-buffer. + (gdb-frame-handler): Display watch expressions in + FUNCTION::VARIABLE format if required. + +2003-12-23 John Paul Wallington + + * info.el (Info-unescape-quotes, Info-split-parameter-string) + (Info-goto-emacs-command-node): Doc fixes. + +2003-12-12 Jesper Harder + + * cus-edit.el (custom-add-parent-links): Define "many". + +2003-12-08 Per Abrahamsen + + * wid-edit.el (widget-child-value-get, widget-child-value-inline) + (widget-child-validate, widget-type-value-create) + (widget-type-default-get, widget-type-match): New functions. + (lazy): New widget. + (menu-choice, checklist, radio-button-choice, editable-list) + (group, documentation-string): Remove redundant (per 2003-10-25 + change) calls to `widget-children-value-delete'. + (widget-choice-value-get, widget-choice-value-inline): Remove. + (menu-choice): Update widget. + +2003-12-03 Kenichi Handa + + * language/cyrillic.el: Register "microsoft-cp1251" in + ctext-non-standard-encodings-alist. + ("Bulgarian"): Add ctext-non-standard-encodings. + ("Belarusian"): Likewise. + + * international/mule-conf.el (compound-text-with-extensions): + Change the type to 2 (iso-2022 base). + + * international/mule.el (ctext-non-standard-encodings-alist): + Change the format. + (ctext-non-standard-encodings): New variable. + (ctext-post-read-conversion): Fully re-written. + (ctext-non-standard-designations-alist): Delete it. + (ctext-non-standard-encodings-table): New function. + (ctext-pre-write-conversion): Fully re-written. + +2003-11-30 Per Abrahamsen + + * cus-edit.el (custom-add-parent-links): Add documentation links + for parent, if the item has none of its own. + +2003-11-30 Richard M. Stallman + + * dired-aux.el (dired-do-query-replace-regexp): + Report files visited read-only. + +2003-11-30 Juri Linkov + + * dired-aux.el (dired-compare-directories): New command. + (dired-file-set-difference, dired-files-attributes): New functions. + +2003-11-30 Kai Grossjohann + Version 2.0.38 of Tramp released. + + * net/tramp.el (tramp-chunksize): Extend docstring. Suggested by + Charles Curley . + (tramp-multi-connection-function-alist): Add ssht entry which adds + "-e none -t -t" to the list of ssh args. Suggested by Adrian + Aichner. + (tramp-get-method-parameter): New function to retrieve a method + parameter. This allows for omission of method parameters. + Callers adjusted. + +2003-11-30 Michael Albinus + + * net/tramp.el: Add new optional parameter ID-FORMAT to + `file-attributes'. Calls of `file-attributes' won't use this + parameter for backward compatibility reasons. + (tramp-perl-file-attributes): Add a new parameter to Perl script + in order to handle uid/gid as strings, if desired. + (tramp-handle-file-truename, tramp-handle-file-symlink-p): + Apply `file-attributes' instead of `tramp-handle-file-attributes' in + order to make the function more general. + (tramp-handle-file-attributes): Replace proprietary optional + parameter NONNUMERIC by the recently (Emacs 21.4) introduced ID-FORMAT. + (tramp-handle-file-attributes-with-perl): Handle parameter + NONNUMERIC if set. This wasn't done in the past. + (tramp-post-connection): Apply second parameter "$2" if + `tramp-remote-perl' is called. + + * net/tramp-smb.el (tramp-smb-handle-delete-file): + Correct cut'n'waste error (`filename' instead of `directory'). + (tramp-smb-handle-directory-files-and-attributes) + (tramp-smb-handle-file-attributes): Add recently (Emacs 21.4) + introduced parameter ID-FORMAT. + (tramp-smb-handle-make-directory-internal): Correct cut'n'waste + error (`directory' instead of `ldir'). + + * net/tramp-vc.el (tramp-handle-vc-user-login-name): Check if + `file-attributes' has a second parameter. If yes, apply it with + value "'integer". Otherwise, don't use that parameter (default is + integer format). + +2003-11-30 Luc Teirlinck + + * help.el (help-map): Bind `display-local-help' to `C-h .'. + (help-for-help): Add `C-h .' to the listed Help options. + Remove trailing whitespace. + + * help-at-pt.el: New file. + +2003-11-30 Jonathan Yavner + + * subr.el (noreturn, 1value): New macros for test coverage. + See `testcover.el'. + + * emacs-lisp/edebug.el: Add def-edebug-spec for `noreturn' and `1value'. + + * emacs-lisp/testcover.el (testcover-reinstrument): Special case + for macro `1value'. + (testcover-1value): New function. Checks that a 1value form + actually returns only one value. Requested by RMS. + +2003-11-29 Nick Roberts + + * gdb-ui.el (gud-watch, gdb-var-create-handler) + (gdb-var-list-children, gdb-var-list-children-handler) + (gdb-var-update-handler, gdb-var-delete): Add server prefix to the + gdb commands that use mi to keep them out of the command history. + +2003-11-29 Jan Dj,Ad(Brv + + * cus-start.el (all): Add use-file-dialog. + +2003-11-27 Stefan Monnier + + * textmodes/tex-mode.el (latex-mode): `tex-trailer' is not a regexp. + +2003-11-27 Kim F. Storm + + * subr.el (posn-object-x-y): New defun. + +2003-11-26 Stefan Monnier + + * progmodes/make-mode.el (makefile-font-lock-syntactic-keywords): + Don't use `space' for \\\n. + Be more selective as to which # are comment-starters. + +2003-11-26 Luc Teirlinck + + * subr.el (number-sequence): Improve handling of floating point + arguments (suggested by Kim Storm). Allow negative arguments. + +2003-11-26 Kenichi Handa + + * international/mule-cmds.el (standard-display-european-internal): + Cancel the standard-display-table setting for ` and '. + +2003-11-26 Kim F. Storm + + * ido.el (ido-use-filename-at-point, ido-use-url-at-point): + New defcustoms to add ffap-like functionality to ido. + (ido-saved-vc-hb): Rename from ido-saved-vc-mt. Uses changed. + (ido-no-final-slash): New defun. + (ido-make-prompt, ido-file-internal, ido-toggle-vc) + (ido-read-file-name): ): Toggle VC checking via + vc-handled-backends instead of vc-master-templates. + (ido-file-internal): Handle ido-use-url-at-point and + ido-use-filename-at-point via code borrowed from ffap-guesser. + Handle new ido-exit code ffap. + (ido-sort-list): Ignore final slash when sorting file names. + +2003-11-25 Kim F. Storm + + * emulation/cua-base.el (cua--standard-movement-commands): + Add forward-sentence and backward-sentence. + +2003-11-25 Stephen Eglen + + * iswitchb.el (iswitchb-read-buffer,iswitchb-exit-minibuffer): + iswitchb-exit is set to 'usefirst when user selects buffer at head + of list using RET. (Selecting buffers at the head of the list was + broken if the substring was also a complete buffername.) + +2003-11-23 Kim F. Storm + + * progmodes/compile.el (grep-command, grep-use-null-device) + (grep-find-command, grep-tree-command, grep-tree-files-aliases) + (grep-tree-ignore-case, grep-tree-ignore-CVS-directories) + (grep-regexp-alist, grep-program, find-program) + (grep-find-use-xargs, grep-history, grep-find-history) + (grep-process-setup, grep-compute-defaults) + (grep-default-command, grep, grep-tag-default, grep-find) + (grep-expand-command-macros, grep-tree-last-regexp) + (grep-tree-last-files, grep-tree): Move grep variables, functions + and commands to new file grep.el. + (compilation-mode-map): Remove grep commands from Compile sub-menu. + (compilation-process-setup-function): Doc fix. + (compilation-highlight-regexp, compilation-highlight-overlay): New + defvars used for highlighting current compile error in source buffer. + (compile-internal): New optional args HIGHLIGHT-REGEXP and + LOCAL-MAP which overrides compilation-highlight-regexp and + compilation-mode-map for this compilation. + Delay calling compilation-set-window-height until after running + compilation-process-setup-function so it can buffer-local override + compilation-window-height. + Check buffer-local value of compilation-scroll-output. + (compilation-set-window-height): Use buffer-local value of + compilation-window-height. + (compilation-revert-buffer): Don't pass (undefined) + preserve-modes arg to revert-buffer. + (next-error-no-select, previous-error-no-select): New commands. + (compilation-goto-locus): Temporarily highlight current match in + source buffer using compilation-highlight-regexp. + + * progmodes/grep.el: New file with grep code from compile.el. + (grep): New defcustom group. + (grep-window-height): New defcustom, like compilation-window-height. + (grep-auto-highlight): New defcustom, like compile-auto-highlight. + (grep-scroll-output): New defcustom, like compilation-scroll-output. + (grep-command, grep-use-null-device, grep-find-command) + (grep-tree-files-aliases, grep-tree-ignore-case) + (grep-tree-ignore-CVS-directories): Move to grep custom group. + (grep-setup-hook): New hook variable. + (grep-mode-map): New keymap for grep commands. Add Grep menu. + (grep-last-buffer): New defvar, override compilation-last-buffer. + (grep): Add optional arg HIGHLIGHT-REGEXP. Doc fix. + Call compile-internal with args highlight-regexp and grep-mode-map. + +2003-11-23 Kim F. Storm + + * subr.el (event-start, event-end): Doc fix. + (posn-window, posn-x-y, posn-timestamp): Simplify doc. + (posn-area, posn-actual-col-row, posn-object): New defuns. + (posn-col-row): Simplify doc. Rewrite to use cond. + (posn-point): Also return buffer position for events outside text + area (that info is now present in the event position). + + * mouse.el: Bind mouse-1 on left-fringe and right-fringe to + mouse-set-point so that hscroll still works now that clicks on + fringes generate specific mouse events. + (mouse-set-point): Note that it now works in fringes and margins + too due to new semantics of posn-point in fringes and margins. + + * gdb-ui.el (gdb-mouse-toggle-breakpoint): New defun. + (gdba): Bind it to [left-margin mouse-1] and [left-fringe mouse-1]. + +2003-11-20 Kim F. Storm + + * gdb-ui.el (gud-gdba-command-name): Find gdb command via PATH. + (breakpoint-xpm-data, breakpoint-enabled-pbm-data): Make smoother. + (breakpoint-enabled-icon, breakpoint-disabled-icon): Set :ascent + to 100 for icons to avoid increasing line height when shown. + +2003-11-17 Jesper Harder (tiny change) + + * newcomment.el (comment-normalize-vars): Initialize properly if + comment-start was nil. + +2003-11-19 Andreas Schwab + + * simple.el (set-variable): Fix indentation. + +2003-11-17 Kenichi Handa + + * international/latin1-disp.el (latin1-display-ucs-per-lynx): + Fix docstring. + +2003-11-17 Jesper Harder (tiny change) + + * international/latin1-disp.el (latin1-display): Fix docstring. + +2003-11-16 John Wiegley + + * eshell/em-ls.el (eshell-ls-file): There are times with + size-width is nil and uncomputed (when directories are created in + dired, for example); in this case, 4 is reasonable default value, + although it may caused skewed new entries (which could be avoided + by returning the original value of 8 in all cases, but 99% of the + time this is a waste of whitespace). + +2003-11-16 Martin Stjernholm + + * cc-engine.el (c-guess-continued-construct) + (c-guess-basic-syntax): Check a little more carefully if it's a + function declaration when an unknown construct followed by a block + is found inside a statement context. This avoids macros followed + by blocks to be taken as function declarations. + + (c-guess-continued-construct): Change the analysis of a statement + continuation with a brace open to `substatement-block', for + consistency with recognized statements. + + (c-add-stmt-syntax): Don't continue to the surrounding sexp if the + start is in a position so that `c-beginning-of-statement-1' jumped + to the beginning of the same statement. + + * cc-fonts.el, cc-engine.el (c-forward-<>-arglist-recur): + Don't accept binary operators in the arglist if we're in a function + call context, i.e. if `c-restricted-<>-arglists' is set. That avoids + template recognition in cases like "if (a < b || c > d)". + + (c-restricted-<>-arglists): New more appropriate name for + `c-disallow-comma-in-<>-arglists'. + + Accessing functions updated for the variable name change. + + * cc-engine.el (c-syntactic-re-search-forward): Fix bug where the + match data could get clobbered if NOT-INSIDE-TOKEN is used. + + * cc-engine.el (c-beginning-of-statement-1): Don't allow parens in + labels. + + (c-backward-to-decl-anchor): Use `c-beginning-of-statement-1' + instead of duplicating parts of it. This fixes bogus label + recognition. + + * cc-align.el (c-gnu-impose-minimum): Revert to the old method + of checking the context in which to apply the minimum indentation, + so that it isn't enforced in e.g. namespace blocks. + + * cc-vars.el (c-inside-block-syms): New constant used by + `c-gnu-impose-minimum'. It's defined close to `c-offsets-alist' + to somewhat reduce the risk of becoming stale. + + * cc-cmds.el, cc-engine.el (c-shift-line-indentation): Move from + cc-cmds to cc-engine to allow use from cc-align. + + * cc-engine.el (c-beginning-of-inheritance-list): Cope with fully + qualified identifiers containing "::". + + * cc-defs.el (c-make-keywords-re): Add kludge for bug in + `regexp-opt' in Emacs 20 and XEmacs when strings contain newlines. + + * cc-vars.el (c-emacs-features): Use a space in front of the name + of the temporary buffer. That also avoids dumping problems in + XEmacs due to undo info being left around after the buffer is killed. + + * cc-engine.el (c-in-knr-argdecl): Look closer at the function + arglist to see if it's a K&R style declaration. + + (c-guess-basic-syntax): CASE 5B.2: Check with `c-in-knr-argdecl' + before returning `knr-argdecl-intro'. + +2003-11-16 John Wiegley + + * eshell/em-ls.el (eshell-ls-file): Instead of making the size + field in a long-listing always 8 characters, use `size-width', + which has already been computed. + +2003-11-15 Thien-Thi Nguyen + + * subr.el (minor-mode-list): Add `hs-minor-mode'. + +2003-11-14 Thien-Thi Nguyen + + * diff-mode.el (diff-hunk-prev, diff-hunk-next): + Support operation while narrowed, with `diff-restrict-view'. + +2003-11-14 Thien-Thi Nguyen + + * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): + Take additional optional arg NARROWFUN. For the generated functions: + Add local var `was-narrowed-p'. Also, if NARROWFUN is specified, + include frags that arrange to check for and save narrowing state before + the move and then conditionally call NARROWFUN after the move. + +2003-11-14 John Wiegley + + * eshell/esh-var.el (eshell-parse-variable-ref): Add a backslash + that was optional, but obviously missing based on surrounding code. + + * eshell/esh-cmd.el (eshell-lisp-command): Do not late-convert + string arguments to numbers unless the whole argument was seen as + a number. + +2003-11-14 Kenichi Handa + + * international/mule.el (ctext-non-standard-encodings-alist): + Fix coding systems. + +2003-11-10 Kenichi Handa + + * language/kannada.el ("Kannada"): Add sample-text. + + * language/knd-util.el (kannada-compose-region) + (kannada-compose-string, kannada-post-read-conversion): + Add autoload cookie. + + * international/quail.el (quail-completion): Change the message + "corresponding translations" to "corresponding characters". + +2003-11-09 Markus Rost + + * descr-text.el (describe-char): Fix typo. + +2003-11-08 Kailash C. Chowksey + + These changes are to support Kannada language/script. + + * Makefile.in (DONTCOMPILE): Add kannada.el. + + * makefile.w32-in (DONTCOMPILE): Add kannada.el. + + * loadup.el: Preload kannada.el. + + * language/ind-util.el (ucs-kannada-to-is13194-alist) + (is13194-to-ucs-kannada-hashtbl, is13194-to-ucs-kannada-regexp): + New variables. + + * language/kannada.el: New file. + + * language/knd-util.el: New file. + +2003-11-07 Andreas Schwab + + * progmodes/autoconf.el (autoconf-font-lock-keywords): + Also highlight AH_*. + + * xml.el (xml-parse-dtd): Fix misplaced paren. + +2003-11-07 Kenichi Handa + + * language/european.el (windows-1252): Fix table (0x8F and 0x9E). + +2003-11-05 Juri Linkov + + * desktop.el (desktop-locals-to-save): Add buffer-file-coding-system. + (desktop-buffer-file): Use saved buffer-file-coding-system + for file reading. Set auto-insert to nil to prevent automatic + insertion into restored empty files. + +2003-11-04 Luc Teirlinck + + * files.el (risky-local-variable-p): Make second argument optional. + +2003-11-03 Stefan Monnier + + * subr.el (add-hook): Fix last change. + +2003-11-03 Eli Zaretskii + + * mail/rmail.el (rmail-convert-to-babyl-format): + If base64-decode-region signals an error, catch it and silently + ignore it. + +2003-11-01 Mark A. Hershberger + + * xml.el (xml-parse-region): Allow comments to appear after the + topmost element has closed. + (xml-ns-parse-ns-attrs, xml-ns-expand-el) + (xml-ns-expand-attr): New functions to do namespace handling. + (xml-intern-attrlist): Back-compatible handling of attribute names. + (xml-parse-tag): Move namespace handling to separate functions. + Now produces elements in the form ((:ns . "element") (attr-list) + children) instead of ('ns:element (attr-list) children). + (xml-parse-attlist): Fix attribute parsing. + (xml-parse-dtd): Change parsing so that it produces strings + instead of interned symbols. + +2003-11-01 era@iki.fi (tiny change) + + * dired.el (dired-ls-sorting-switches): Doc fix. + +2003-11-01 Oliver Scholz + + * emacs-lisp/rx.el (rx-or): Fix the case of + "(rx (and ?a (or ?b ?c) ?d))". + +2003-11-01 Christoph Wedler (tiny change) + + * textmodes/texinfmt.el (texinfo-pre-format-hook): New variable. + (texinfo-format-region): Use it. + (texinfo-format-buffer-1): Ditto. + +2003-11-01 Alan Mackenzie + + Changes to allow scrolling whilst in isearch mode: + * isearch.el (isearch-unread-key-sequence): New function, + extracted from isearch-other-meta-char. + (top level): (put 'foo 'isearch-scroll) on all Emacs's + "scrollable" standard functions. + (isearch-allow-scroll): New customizable variable. + (isearch-string-out-of-window, isearch-back-into-window) + (isearch-reread-key-sequence-naturally) + (isearch-lookup-scroll-key): New functions. + (isearch-other-meta-char): Doc string and functionality enhanced. + Now accepts a prefix argument. + (isearch-lazy-highlight-window-end): New variable. + (isearch-lazy-highlight-new-loop): Pay attention to the window's + end (thru isearch-lazy-highlight-window-end), not only its start. + + * simple.el (overriding-map-is-bound, saved-overriding-map): New vars. + (ensure-overriding-map-is-bound, restore-overriding-map): New funs. + (universal-argument, universal-argument-more, negative-argument) + (digit-argument, universal-argument-other-key): Minor changes. + +2003-11-01 Alexander Pohoyda (tiny change) + + * mail/rmailsum.el (rmail-summary-goto-msg): Don't call itself + recursively if the last message is deleted, thus avoiding an + infinite loop. + +2003-10-30 Stefan Monnier + + * textmodes/tex-mode.el (tex-compile-commands): Add `yap' and `ps2pdf'. + (tex-main-file): Don't add .tex if the extension is already present. + (tex-uptodate-p): Don't recurse indefinitely with symlinks. + +2003-10-29 Lute Kamstra + + * progmodes/octave-inf.el (inferior-octave-prompt): + Recognize version number in prompt. + +2003-10-28 Dave Love + + * international/characters.el: Fix some Unicode ranges. + +2003-10-28 Kenichi Handa + + * disp-table.el (standard-display-8bit) + (standard-display-default, standard-display-ascii) + (standard-display-g1, standard-display-graphic) + (standard-display-underline): Assure that standard-display-table + is a display table. + +2003-10-27 Stefan Monnier + + * simple.el (reindent-then-newline-and-indent): Delete space *after* + reindenting the first line. + +2003-10-25 Per Abrahamsen + + * wid-edit.el (widget-default-delete): Always delete child widgets. + +2003-10-24 Stefan Monnier + + * newcomment.el (comment-indent): Don't call indent-according-to-mode + if the line has code. + Don't try to line up with something that's too far left. + + * progmodes/octave-mod.el (octave-comment-start): Simplify. + (octave-mode-syntax-table): Add % as a comment starter. + (octave-point): Remove. + (octave-in-comment-p, octave-in-string-p) + (octave-not-in-string-or-comment-p, calculate-octave-indent) + (octave-blink-matching-block-open, octave-auto-fill): + Use line-(beginning|end)-position instead. + +2003-10-23 Francesco Potort,Al(B + + * emacs-lisp/authors.el (authors-aliases): Add correct realname + for Francesco Potort,Al(B. + +2003-10-23 Dave Love + + * international/mule-cmds.el (locale-charset-to-coding-system): + Don't rely on nil being a coding system. + + * mail/mail-extr.el (mail-extr-ignore-single-names): Add :version. + (mail-extr-address-syntax-table): Remove non-ASCII unibyte chars. + (mail-extr-voodoo): Use char classes in regexps (for non-ASCII). + +2003-10-21 Nick Roberts + + * gdb-ui.el (gdb-current-language): New variable. + (gdb-update-flag): Remove variable. + (gud-watch, gdb-frame-handler): Adapt for other languages (Fortran). + (gdb-take-last-elt): Remove function. + (gdb-dequeue-input): Avoid recursion by not using gdb-take-last-elt. + (gdb-post-prompt): Check for variable object changes here. + + * progmodes/gud.el (gud-speedbar-buttons): Check for variable + object changes in gdb-ui.el. + +2003-10-21 Richard M. Stallman + + * emacs-lisp/edebug.el (edebug-display-freq-count): Doc fix. + + * ls-lisp.el (ls-lisp-insert-directory): Arg is now wildcard-regexp. + Don't check for foo*/ wildcard form here. + (insert-directory): Recognize foo*/ as a wildcard. + Separate wildcard-regexp variable from the arg, wildcard. + + * subr.el (add-hook): Correctly detect when make-local-hook was used. + (remove-hook): Correctly handle strange cases about local hooks. + +2003-10-21 David Ponce + + * ruler-mode.el (ruler-mode-left-fringe-cols): Add new optional + argument REAL, to return a real number instead of a rounded + integer value. Define as inline function. + (ruler-mode-right-fringe-cols): Likewise. + (ruler-mode-scroll-bar-cols): New function. + (ruler-mode-left-scroll-bar-cols): Use it. Define as macro. + (ruler-mode-right-scroll-bar-cols): Likewise. + (ruler-mode-space): New function. + (ruler-mode-ruler): Use it. Handle variations of fringe style, + scroll bar mode and margins in a more robust way. + +2003-10-21 Christoph Wedler + + * progmodes/antlr-mode.el: Make major mode work with cc-mode-5.30+. + (antlr-c-init-language-vars): New function. + (antlr-mode): Use it with cc-mode before v5.29. + (antlr-c-common-init): Don't set some local vars here. + (antlr-mode): Set them here. + (antlr-c-forward-sws): New function alias. + (antlr-mode): Redefine with cc-mode before v5.30. + (antlr-skip-sexps): Use it. + (antlr-skip-exception-part): Ditto. + (antlr-skip-file-prelude): Ditto. + (antlr-outside-rule-p): Ditto. + (antlr-end-of-body): Ditto. + (antlr-option-kind): Ditto. + (antlr-insert-option-area): Ditto. + (antlr-file-dependencies): Ditto. + +2003-10-21 Roland Winkler + + * textmodes/bibtex.el (bibtex-move-outside-of-entry): + Move backward only if point was not inside an entry. + +2003-10-21 Richard M. Stallman + + * progmodes/compile.el (compile-auto-highlight): Undo July 7 change. + +2003-10-21 Juri Linkov + + * compare-w.el: Automatically skip non-matching text to resync. + (compare-windows-whitespace): Doc fix. + (compare-windows-sync, compare-windows-sync-string-size) + (compare-windows-recenter, compare-ignore-whitespace) + (compare-windows-highlight, compare-windows-face): New variables. + (compare-windows): Use compare-windows-sync. + (compare-windows-highlight, compare-windows-dehighlight) + (compare-windows-sync-regexp) + (compare-windows-sync-default-function): New functions. + +2003-10-21 Juri Linkov + + * diff.el (diff-parse-differences): Don't visit the files now; + instead, just record the error locus. + +2003-10-21 Dave Love + + * progmodes/cfengine.el: New file. + +2003-10-20 Stefan Monnier + + * complete.el (PC-do-completion): Do not forget to use `pred' as the + default-directory when completing file names. + +2003-10-20 Luc Teirlinck + + * help-mode.el (help-make-xrefs): Make sure that if a symbol is + followed by the word `face', it gets treated as a face, even if + it is also defined as a variable or a function. + +2003-10-20 Dave Love + + * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation): + Avoid incf in macro expansion. + +2003-10-20 John Paul Wallington + + * emacs-lisp/elint.el (elint-check-defcustom-form): Don't use + `evenp' so we don't implicitly require cl library at runtime. + +2003-10-18 Luc Teirlinck + + * help-mode.el (help-xref-symbol-regexp): Treat newlines as whitespace. + (help-make-xrefs): Only make cross-references for faces if + preceded or followed by the word `face'. Do not make a + cross-reference for variables without variable documentation, + unless preceded by the word `variable' or `option'. Update doc + string accordingly. + +2003-10-18 Thien-Thi Nguyen + + * progmodes/hideshow.el: Rewrite one-armed `if' + constructs using either `when' or `unless'. + (hs-grok-mode-type): Elide superfluous `progn'; nfc. + +2003-10-16 Nick Roberts + + * gdb-ui.el (breakpoint-xpm-data, breakpoint-enabled-pbm-data) + (breakpoint-disabled-pbm-data): Make breakpoint icons 10x10 + instead of 12x12. + +2003-10-16 Eli Zaretskii + + * mail/rmail.el (rmail-convert-to-babyl-format): Display a + message while converting to Babyl. + +2003-10-16 Vadim Nasardinov (tiny change) + + * allout.el (allout-mode): Doc fix. + +2003-10-16 Lute Kamstra + + * subr.el (force-mode-line-update): Fix docstring. + +2003-10-14 Dave Love + + * international/mule-cmds.el (find-multibyte-characters): Doc fix. + (default-input-method): Add :link, improve :type. + (locale-charset-language-names): Fix utf-8 pattern. + (locale-charset-match-p, locale-charset-alist) + (locale-charset-to-coding-system): New. + (set-locale-environment): Deal with codeset part of locale specs. + +2003-10-14 Lute Kamstra + + * fringe.el (fringe-mode): Use active voice in docstring. + (set-fringe-style): Ditto. + +2003-10-13 Lute Kamstra + + * fringe.el (fringe-mode): Fix docstring. + (set-fringe-style): Ditto. + +2003-10-12 Michael Kifer + + * ediff-mult.el (ediff-filegroup-action): + Use ediff-default-filtering-regexp. + + * ediff-util.el (ediff-recenter): Don't call + ediff-restore-highlighting twice. + (ediff-select-difference): Set current difference. + (ediff-unselect-and-select-difference): Add comment. + + * ediff.el (ediff-directories,ediff-directory-revisions) + (ediff-directories3,ediff-merge-directories) + (ediff-merge-directories-with-ancestor) + (ediff-merge-directory-revisions) + (ediff-merge-directory-revisions-with-ancestor): + Use ediff-default-filtering-regexp. + +2003-10-12 Andreas Schwab + + * international/mule-cmds.el (locale-charset-language-names): + Simplify regex by removing unused grouping. + +2003-10-10 Dave Love + + * bindings.el: Don't bind stop. + +2003-10-08 Miles Bader + + * gdb-ui.el (gdb-info-frames-custom): Use proper :inverse-video + face instead of attempting to emulate it. + +2003-10-07 Kenichi Handa + + * international/mule-diag.el (list-coding-systems-1): List coding + systems that are loaded automatically. + + * international/code-pages.el (iso-8859-11): Add autoload cookie. + + * international/mule.el (autoload-coding-system): New function. + +2003-10-07 Andreas Schwab + + * log-edit.el (log-edit-changelog-entries): Prefer local value of + change-log-default-name in the buffer visiting the file. + +2003-10-06 Dave Love + + * files.el (find-file-hook): Customize. + (auto-mode-alist): Add .stk, .ss, .sch, .orig. + + * bindings.el (completion-ignored-extensions): Remove .log. + (global-map): Add again, open, stop keys. + +2003-10-05 Richard M. Stallman + + * progmodes/sh-script.el (sh-feature): Handle sh-modify like sh-append. + (sh-for, sh-indexed-loop, sh-function, sh-while, sh-while-getopts): + Use sh-modify directly. + (sh-select): Use sh-append, not eval. + + * mail/emacsbug.el (report-emacs-bug): Fix previous change. + + * info.el (Info-following-node-name): New function. + + * loadhist.el (unload-feature-special-hooks): + Rename from loadhist-hook-functions. + (loadhist-hook-functions): Now an alias. + +2003-10-04 Eli Zaretskii + + * ldefs-boot.el: Renamed from loaddefs-boot.el, to prevent + file-name clashes on 8+3 filesystems. + + * Makefile.in (DONTCOMPILE, bootstrap-clean): + Rename loaddefs-boot.el to ldefs-boot.el + + * makefile.w32-in (DONTCOMPILE, bootstrap-clean-CMD) + (bootstrap-clean-SH): Rename loaddefs-boot.el to ldefs-boot.el + +2003-10-03 Lute Kamstra + + * info.el (Info-mode): Revert previous change. + (Info-escape-percent): New function. + (Info-fontify-node): Use it. + +2003-10-02 Andreas Schwab + + * loaddefs-boot.el: Regenerated. + +2003-10-01 Rajesh Vaidheeswarran + + * ffap.el: Remove defadvice related code from CVS since `complete' + provides a `PC-completion-as-file-name-predicate' variable that + ffap can override. + +2003-10-02 Kenichi Handa + + * international/utf-8.el (ccl-decode-mule-utf-8): + Lookup utf-subst-table-for-decode even for U+E000..U+FFFF. + + * international/subst-jis.el: Include U+FF00..U+FFEF in decode table. + * international/subst-big5.el: Likewise. + * international/subst-gb2312.el: Likewise. + * international/subst-ksc.el: Likewise. + +2003-10-01 Glenn Morris + + * calendar/calendar.el (increment-calendar-month) + (calendar-leap-year-p, calendar-absolute-from-gregorian) + (generate-calendar, calendar-read-date, calendar-interval) + (calendar-day-of-week): Handle years BC. + (generate-calendar-month, calendar-gregorian-from-absolute): Doc fix. + +2003-10-01 Dave Love + + * language/cyrillic.el (cp1251): Alias for windows-1251. + + * vc-cvs.el (vc-cvs-parse-entry): Revert last change to allow + bootstrap. + +2003-10-01 Lute Kamstra + + * files.el: Fix typo. + * imenu.el (imenu--generic-function): Docstring fix. + +2003-09-30 Richard M. Stallman + + * dired.el (dired-mode): Handle dired-directory as a list. + +2003-09-30 Nick Roberts + + * toolbar/gud-watch.xpm, toolbar/gud-watch.pbm: Add. + + * toolbar/gud-display.xpm, toolbar/gud-display.pbm: Remove. + + * progmodes/gud.el (gud-menu-map, gud-tool-bar-map): + Replace gud-display with gud-watch. + (gud-speedbar-buttons): Add stuff for watching expressions + in the speedbar when using M-x gdba. Use dolist on old part + of this function. + + * gdb-ui.el (gdb-var-list, gdb-var-changed, gdb-update-flag) + (gdb-update-flag): New variables. + (gdb-var-update, gdb-var-update-handler,gdb-var-delete) + (gdb-speedbar-expand-node, gdb-var-evaluate-expression-handler) + (gud-watch, gdb-var-create-handler) : New functions. + (gdb-var-list-children, gdb-var-list-children-handler) + (gdb-var-create-regexp, gdb-var-update-regexp) + (gdb-var-list-children-regexp): New constants. + (gud-gdba-command-name): Don't specify -noasync so that GDB/MI works. + (gdb-annotation-rules): Reduce annotation set (level 3). + (gdb-pre-prompt, gdb-prompt): Call handler in gdb-prompt. + (gdb-post-prompt): Don't update GDB buffers every time speedbar + updates. + (gdb-window-height, gdb-window-width, gdb-display-in-progress) + (gdb-expression-buffer-name, gdb-display-number, gdb-point) + (gdb-dive-display-number, gdb-nesting-level, gdb-expression) + (gdb-annotation-arg, gdb-dive-map, gdb-values, gdb-array-start) + (gdb-array-stop, gdb-array-slice-map, gdb-display-string) + (gdb-array-size, gdb-display-mode-map, gdb-expressions-mode-map): + (gdb-expressions-mode-menu, gdb-dive): Remove variables. + (gud-display, gud-display1) + (gdb-display-begin,gdb-display-number-end, gdb-delete-line) + (gdb-display-end, gdb-display-go-back, gdb-array-section-end) + (gdb-field-begin, gdb-field-end, gdb-elt,gdb-field-format-begin) + (gdb-field-format-end, gdb-dive, gdb-dive-new-frame) + (gdb-insert-field, gdb-array-format, gdb-mouse-array-slice) + (gdb-array-slice, gdb-array-format1, gdb-info-display-custom) + (gdb-delete-frames, gdb-display-mode, gdb-display-buffer-name) + (gdb-display-display-buffer, gdb-toggle-display) + (gdb-delete-display, gdb-expressions-popup-menu) + (gdb-expressions-mode, gdb-array-visualise): Remove functions. + (gdb-setup-windows, gdb-reset, gdb-source-info): Remove references + to display buffer. + +2003-09-30 Richard M. Stallman + + * progmodes/ada-mode.el (ada-mode): Don't use advice. + Instead, set which-func-functions. + + * progmodes/which-func.el (which-func-modes): Add ada-mode. + (which-func-functions): New variable. + (which-function): Use that. + + * info.el (Info-mode): Double each `%' in header line. + + * emacs-lisp/lisp-mnt.el (lm-with-file): + When FILE is nil, run BODY in current buffer. + + * mail/emacsbug.el (report-emacs-bug): Mention major and minor modes. + + * help.el (describe-mode): Start with a brief list of minor modes. + Find them thru minor-mode-list so as to find them all. + Show them in alphabetical order. + + * mail/sendmail.el (mail-aliases): Doc fix. + + * progmodes/sh-script.el (sh-mode-syntax-table): Add defvar. + +2003-09-30 Alexander Pohoyda (tiny change) + + * mail/rmailsum.el (rmail-make-summary-line-1): + Change comma after last label to a space. + (rmail-summary-font-lock-keywords): Adapt to that change. + +2003-09-30 Thien-Thi Nguyen + + * progmodes/scheme.el (scheme-mode-variables): When setting + `font-lock-defaults', also specify that "#" should + be interpreted with `word' syntax. + (scheme-font-lock-keywords-2): Also interpret "#:foo" as keyword. + +2003-09-30 Lars Hansen + + * desktop.el: A lot of comments updated. + (desktop-save-mode): Minor mode introduced. + (desktop-enable, desktop-clear-preserve-buffers): Make vars obsolete. + (desktop-load-default): Function made obsolete. + (desktop-locals-to-save): Variable made customizable. + (desktop-read): Optional parameter `dirname' added. + (desktop-change-dir, desktop-revert): Parameter `dirname' in + `desktop-read' used. + (desktop-save-in-load-dir): Rename to `desktop-save-in-desktop-dir'. + +2003-09-29 Rajesh Vaidheeswarran + + * whitespace.el (whitespace-clean-msg): Add user customizable message + for displaying ``clean'' output. + (whitespace-buffer): Use `whitespace-clean-msg'. + (whitespace-global-mode): Fix typo. + +2003-09-29 Thien-Thi Nguyen + + * pcvs.el (cvs-mode-unmark-up): Move to goal column when done. + +2003-09-29 Lute Kamstra + + * bindings.el (mode-line-modes): Remove superfluous :propertize + construct in initialization. + (mode-line-position): Change cons cell into proper list in + initialization. + +2003-09-29 SAITO Takuya (tiny change) + + * international/mule.el (decode-coding-inserted-region): Use car + of the return value of find-operation-coding-system. + +2003-09-29 Kenichi Handa + + * descr-text.el (describe-char): Fix previous change. + +2003-09-28 Kenichi Handa + + * descr-text.el (describe-char-display): New function. + (describe-char): Pay attention to display table on describing how + a character is displayed. + + * international/mule-cmds.el (encoded-string-description): + Prepend "0x" to each encoded byte. + +2003-09-28 Andreas Schwab + + * find-file.el (ff-special-constructs): Add autoload cookie. + +2003-09-28 Kevin Ryde + + * info.el (Info-find-index-name): Remove any "" suffixes which + makeinfo appends to duplicate index entries. + +2003-09-28 Eli Zaretskii + + * dired-x.el (dired-clean-tex): Doc fix. + + * language/chinese.el ("Chinese-GB", "Chinese-BIG5"): Set up for + using a Chinese tutorial. + +2003-09-28 Jesper Harder (tiny change) + + * mail/smtpmail.el (smtpmail-via-smtp): Don't insert a space + between "MAIL FROM:" and "RCPT TO:" and the following address. + +2003-09-28 Jesper Harder (tiny change) + + * textmodes/text-mode.el (paragraph-indent-minor-mode): Doc fix. + +2003-09-28 David Ponce + + * recentf.el (recentf-initialize-file-name-history): New defcustom. + (recentf-load-list): When `recentf-initialize-file-name-history' + is non-nil, initialize an empty `file-name-history' with the + recent list. + +2003-09-28 Evgeni Dobrev (tiny change) + + * man.el (Man-default-man-entry): Remove the leading `*' from the + word at point. + +2003-09-26 Lute Kamstra + + * bindings.el (mode-line-position): Mention size indication in + docstring. + +2003-09-26 Andre Spiegel + + * calendar/parse-time.el (parse-time-string): Add autoload cookie. + + * vc-cvs.el (vc-cvs-parse-entry): Don't require parse-time, + because it's autoloaded now. + +2003-09-25 Glenn Morris + + * progmodes/sh-script.el (sh-builtins): Add bash `shopt' builtin. + (sh-font-lock-keywords, sh-feature): Fix previous change of + sh-feature to avoid infloop with sh-font-lock-keywords. + +2003-09-25 Kim F. Storm + + * frame.el (frame-current-scroll-bars): New defun. + + * window.el (window-current-scroll-bars): New defun. + +2003-09-24 Martin Stjernholm + + * progmodes/cc-engine.el (c-parse-state): Fix bug that could + cause errors when the state cache contains info on parts that have + been narrowed out. + +2003-09-24 Martin Stjernholm + + * progmodes/cc-vars.el (c-comment-prefix-regexp): Document that + `c-setup-paragraph-variables' has to be used when this variable is + changed; it doesn't work to reinitialize the mode since that + typically clobbers the variable. + + * progmodes/cc-styles.el (c-setup-paragraph-variables): + Make it interactive. + +2003-09-24 Martin Stjernholm + + * progmodes/cc-fonts.el (c-font-lock-declarations): + Fix recognition of constructors and destructors for classes whose + names are matched by `*-font-lock-extra-types'. + + * progmodes/cc-langs.el (c-type-list-kwds): If "operator" is + followed by an identifier in C++ then it's a type. + +2003-09-24 Martin Stjernholm + + * progmodes/cc-fonts.el (c-font-lock-invalid-string): Fix eob + problem that primarily affected XEmacs. Don't use faces to find + unterminated strings since Emacs and XEmacs fontify strings + differently - this function should now work better in XEmacs. + +2003-09-24 Martin Stjernholm + + * progmodes/cc-cmds.el (c-electric-brace): Fix a bug in the + `expand-abbrev' workaround which caused braces to misbehave inside + macros. + + * progmodes/cc-engine.el (c-forward-keyword-clause): Fix error + handling. This bug could cause interactive font locking to bail out. + +2003-09-24 Martin Stjernholm + + * progmodes/cc-engine.el (c-just-after-func-arglist-p): + Handle paren-style types in Pike. Also fixed some cases of + insufficient handling of unbalanced parens. + +2003-09-24 Rajesh Vaidheeswarran + + * ffap.el (ffap-shell-prompt-regexp): Add regexp to identify + common shell prompts that are not common filename or URL characters. + (ffap-file-at-point): Use the new regexp to strip the prompts from + the file names. This is an issue mostly for user prompts that + don't have a trailing space and find-file-at-point is invoked from + within a shell inside emacs. + +2003-09-24 Andre Spiegel + + * vc-cvs.el (vc-cvs-parse-entry): Restore the code to compare time + stamps numerically, rather than textually. + +2003-09-24 Kenichi Handa + + * language/devan-util.el (devanagari-post-read-conversion): + * language/mlm-util.el (malayalam-post-read-conversion): + * language/tml-util.el (tamil-post-read-conversion): + Add autoload cookie. + + * international/utf-8.el (utf-8-post-read-conversion): + Call post-read-conversion functions for Devanagari, Malayalam, + and Tamil. + +2003-09-23 Dave Love + + * Makefile.in (bootstrap-clean): Fix misplaced `!'. + +2003-09-22 Nick Roberts + + * progmodes/gud.el (perldb): Add gud-until to list of commands. + Update gud-remove. + +2003-09-22 Richard M. Stallman + + * progmodes/sh-script.el (sh-mode-default-syntax-table): + Rename from sh-mode-syntax-table. Call sh-mode-syntax-table directly. + (sh-mode-syntax-table-input): New variable. + (sh-require-final-newline): Don't use eval. + (sh-builtins, sh-leading-keywords, sh-other-keywords) + (sh-variables, sh-font-lock-keywords): Don't use eval. + (sh-set-shell): When setting require-final-newline, + treat value = `require-final-newline' as don't change it. + Set sh-mode-syntax-table locally based on + sh-mode-syntax-table-input and sh-mode-default-syntax-table. + + * progmodes/compile.el (compile-internal): + Call compilation-set-window-height before setting window start. + +2003-09-22 Greg Hill (tiny change) + + * emacs-lisp/bytecomp.el (byte-compile-log-file): + Clear out byte-compile-last-warned-form. + +2003-09-22 Richard M. Stallman + + * woman.el (woman-file-name, woman-follow-word): + If current-word returns nil, use "". + + * simple.el (eval-expression): Bind standard-output in to-buffer case. + +2003-09-22 Richard M. Stallman + + * emacs-lisp/lisp-mnt.el (lm-with-file): + Don't visit the file, just use insert-file-contents in temp buffer. + +2003-09-22 Jari Aalto + + * emacs-lisp/lisp-mnt.el (lm-get-header-re): + Add surrounding \\( and \\) around the header, as in + for lm-history-header 'Change Log\\|History'. + +2003-09-22 John Paul Wallington + + * progmodes/ld-script.el: Add Commentary section, + minor cleanup of file header. + (ld-script-font-lock-keywords): Doc fix. + (toplevel): Provide `ld-script' feature. + +2003-09-21 Kim F. Storm + + * scroll-bar.el (set-scroll-bar-mode): Initialize to + new built-in variable default-frame-scroll-bars. + (scroll-bar-mode): Use default-frame-scroll-bars when enabling + scroll-bar-mode; notably, use it instead of t when we toggle + scroll-bars on. + (toggle-scroll-bar): Use default-frame-scroll-bars. + +2003-09-19 Masatake YAMATO + + * pcvs.el (cvs-do-removal): Change the prompt depending on + `filter' value. + +2003-09-19 Glenn Morris + + * startup.el (command-line-1): Stop startup-echo-area-message + being hidden by "Loading image..." message. + (use-fancy-splash-screens-p, display-splash-screen): + Move display-graphic-p test from latter to former. + + * progmodes/sh-script.el (sh-font-lock-keywords): + Highlight escaped EOLs differently from other backslash constructs. + +2003-09-19 Richard M. Stallman + + * emacs-lisp/edebug.el (edebug-var-status, edebug-restore-status): + New functions. + (edebug-enter, edebug-outside-excursion): Use them. + + * emacs-lisp/bytecomp.el (byte-compile-warning-prefix): + Fix the condition for whether to print "In WHERE". + +2003-09-19 Jari Aalto + + * finder.el (finder-mode-hook): New variable. + (finder-mode): Run hook finder-mode-hook + +2003-09-18 Masatake YAMATO + + * progmodes/ebrowse.el: Fix broken magic autoload comments. + +2003-09-17 Mario Lang + + * progmodes/gud.el (perldb): Change gud-print from just "%e" to + "p %e" to actually print the value in the GUD buffer. + +2003-09-16 Miles Bader + + From David Ponce : + * makefile.w32-in (DONTCOMPILE): Add loaddefs-boot.el. + (bootstrap-clean-CMD, bootstrap-clean-SH): Recreate loaddefs.el + from loaddefs-boot.el if necessary. + +2003-09-15 Zoltan Kemenczy + + * progmodes/gud.el (gud-find-class): Make jdb work again since + cc-mode changed the syntactic information. + +2003-09-15 David Ponce + + * recentf.el: (recentf-exclude): Accept predicates too. + (recentf-file-readable-p): New function. + (recentf-include-p): Handle predicates in recentf-exclude. + (recentf-add-file): Doc fix. Use recentf-file-readable-p. + (recentf-cleanup): Likewise. + (recentf-save-list): Use write-file to handle backup of + recentf-save-file. + +2003-09-15 Miles Bader + + * loaddefs-boot.el: Renamed from `loaddefs.el' + * Makefile.in (DONTCOMPILE): Add loaddefs-boot.el. + (bootstrap-clean): Recreate loaddefs.el from loaddefs-boot.el if + necessary. + +2003-09-13 Thien-Thi Nguyen + + * electric.el (Electric-pop-up-window): For the `one-window' case, + no longer disconcertingly move point in the original buffer. + +2003-09-12 Stefan Monnier + + * emacs-lisp/tq.el (tq-create): Fix mixed up unquote style. + +2003-09-12 Eric Hanchrow (tiny change) + + * dired.el (dired-mode-map): Fix typo. + +2003-09-11 Richard M. Stallman + + * dired.el (dired-mode-map): Bind M-g to dired-goto-file. + +2003-09-11 Paul Pogonyshev (tiny change) + + * window.el (kill-buffer-and-window): Remove `yes-or-no-p' so that + the function is less noisy. Now only `kill-buffer' can ask questions. + +2003-09-10 Mario Lang + + * battery.el: Update Commentary and Copyright. + (battery-linux-proc-acpi): Fix a bug in %b which made "!" never + appear due to wrong ordering of the expressions in `or'. + +2003-09-09 Lute Kamstra + + * misc.el (upcase-char): Fix docstring. + (zap-up-to-char): New command. + +2003-09-08 David Ponce + + Ensure that recentf correctly updates the menu bar. + * recentf.el (recentf-menu-path,recentf-menu-before): Doc fix. + (recentf-menu-bar): New function. + (recentf-clear-data): Use it + (recentf-update-menu): Likewise. Use easy-menu-add-item instead + of easy-menu-change. + +2003-09-08 Lute Kamstra + + * simple.el (size-indication-mode): New. + * bindings.el (mode-line-position): Add buffer size indicator. + +2003-09-04 Mario Lang + + * battery.el (battery-linux-proc-acpi): New function. + (battery-status-function): Modify default value calculation to also + check for availability of ACPI. + (battery-echo-area-format): Ditto. + (battery-mode-line-format): Ditto. + +2003-09-06 Dave Love + + * ielm.el (ielm-mode-hook): Add :options. + + * emacs-lisp/eldoc.el (eldoc-print-current-symbol-info-function): New. + (eldoc-print-current-symbol-info): Use it. + +2003-09-04 Nick Roberts + + * gdb-ui.el (gud-display1): Use gud-call to prevent extra prompt + being displayed in GUD buffer. + (gdb-idle-input-queue): Remove var. Use just one queue. + (gdb-enqueue-idle-input,gdb-dequeue-idle-input): + Remove functions. Use just one queue. + (gdb-prompt, gdb-subprompt, def-gdb-auto-update-trigger) + (gdb-invalidate-assembler, gdb-get-current-frame): + Modify functions. Use just one queue. + +2003-09-04 Dave Love + + * cus-start.el: Add blink-cursor-alist. + + * ruler-mode.el (ruler-mode-fill-column-char) + (ruler-mode-current-column-char): Use char-displayable-p, + not window-system. + + * international/codepage.el ("mule-diag"): Add eval-after-load clause. + + * language/european.el (windows-1252): Move from code-pages. + + * language/cyrillic.el ("Windows-1251"): Delete. + ("Bulgarian", "Belarusian"): Remove `features'. + (windows-1251): Move from code-pages. + + * international/mule-diag.el (non-iso-charset-alist): + Remove `codepage' stuff. + (print-designation, list-coding-systems-1): Output fixes. + + * international/code-pages.el (cp-make-translation-table) + (cp-valid-codes): Made defsubsts. + (cp-fix-safe-chars): Delete. + (mule-diag): Don't require. + (windows-1251, windows-1252): Remove to cyrillic.el/european.el. + (top-level): Check for defined coding system when defining + cp... aliases. Change w32-add-charset-info test to avoid warning. + (non-iso-charset-alist): Defvar when compiling. + (cp-make-coding-system): Doc fix. + +2003-09-02 Jason Rumney + + * international/titdic-cnv.el (tsang-quick-converter): Fix broken + line-ends from CVS before doing conversion. + +2003-09-02 Glenn Morris + + * calendar/diary-lib.el (diary-header-line-flag) + (diary-header-line-format): New variables. + (list-diary-entries): Use them to set header line in simple diary. + + * progmodes/sh-script.el (sh-font-lock-keywords): Use something + other than font-lock-string-face to highlight backslashes. + +2003-09-01 Jason Rumney + + * international/titdic-cnv.el (tit-read-key-value): Include \r in + regexp. + +2003-09-01 Dave Love + + * mouse.el (mouse-popup-menubar, mouse-skip-word): Doc fix. + + * menu-bar.el (menu-bar-showhide-menu): Amend date and time label + and :help; also line and column numbers labels. + + * international/mule-util.el (char-displayable-p): Move from + latin1-disp, rename and autoload. + + * international/latin1-disp.el (latin1-char-displayable-p): + Now obsolete alias. Replace uses with char-displayable-p. + (latin1-display-ucs-per-lynx): Fix last change. + + * international/mule-cmds.el (standard-display-european-internal): + Don't use char code for Latin-1 NBSP. + : Unfrob NBSP display table. Set display table to use + U+2018, U+2019 for `'. + (select-safe-coding-system): Message fix. + +2003-09-01 Kenichi Handa + + * international/fontset.el (setup-default-fontset): For Thai + font, specify "*" family. + +2003-09-01 Kevin Rodgers (tiny change) + + * progmodes/compile.el (previous-error): Accept a prefix + argument, similarly to next-error. + +2003-08-31 Masatake YAMATO + + * pcvs.el (cvs-do-removal): Use = instead of eq to check + the number of files. Bind the number of files to a local + variable. Suggested by Kevin Rodgers . + +2003-08-30 Eli Zaretskii + + * vc-hooks.el (vc-make-version-backup): Fix the change made on + 2003-07-26: msdos-long-file-names is a function, not a variable. + +2003-08-29 Richard M. Stallman + + * mail/sendmail.el (sendmail-sync-aliases, mail-setup): + Do nothing with mail-personal-alias-file if it is nil. + + * mail/mailabbrev.el (mail-abbrevs-sync-aliases): + Do nothing if mail-personal-alias-file is nil. + + * term.el (term-exec-1): Bind coding-system-for-read. + + * dired.el (dired-mouse-find-file-other-window): + Use dired-view-command-alist here, as in dired-view-file. + (dired-view-command-alist): Use %s to substitute file name. + Handle .ps_pages, .eps, .jpg, .gif, .png. + +2003-08-29 Paul Pogonyshev (tiny change) + + * info.el (Info-mode-map): Bind S-tab and to + `Info-prev-reference', instead of M-tab. + +2003-08-29 Martin Stjernholm + + * simple.el (blink-matching-open): Work correctly on chars that + are designated as parens through the syntax-table text property. + +2003-08-29 Thierry Emery (tiny change) + + * kinsoku.el (kinsoku-longer, kinsoku-shorter): Do not choose a + line break position in the middle of a non-kinsoku (e.g. latin) + word, making it skip until either a space or a character with + category "|". + (kinsoku-longer): Test for end of buffer. + +2003-08-28 Eli Zaretskii + + * mail/rmail.el (rmail-convert-to-babyl-format): + Detect quoted-printable- and base64-encoded messages and decode them + automatically. Set the message's encoding from the charset= + header, if any. Decode base64-encoded messages in Mail format as well. + +2003-08-26 Glenn Morris + + * mail/smtpmail.el: Fix previous change. + (smtpmail-send-queued-mail): Set smtpmail-mail-address before + calling smtpmail-via-smtp. + (smtpmail-via-smtp): Add fall-back values for envelope-from. + +2003-08-26 John Paul Wallington + + * image.el (image-jpeg-p): Don't search beyond length of data. + +2003-08-26 Martin Stjernholm + + * progmodes/cc-cmds.el (c-electric-brace): Work around for a + misfeature in `expand-abbrev' which caused electric keywords like + "else" to disappear if an open brace was typed directly afterwards. + +2003-08-26 Martin Stjernholm + + * progmodes/cc-vars.el (c-extra-types-widget): The doc string is + mandatory in `define-widget'. + + * progmodes/cc-align.el, progmodes/cc-langs.el (c-lineup-math): + Don't align the operators "!=", "<=" and ">=" as assignment operators. + + (c-assignment-operators): New language constant that only contains + the assignment operators. + + (c-assignment-op-regexp): New language var used by `c-lineup-math'. + +2003-08-26 Martin Stjernholm + + * progmodes/cc-engine.el (c-just-after-func-arglist-p): + Safeguard against unbalanced sexps. + +2003-08-26 Terje Rosten + + * version.el (emacs-version): Check for gtk. Include gtk version info. + +2003-08-25 John Paul Wallington + + * man.el (Man-default-man-entry): Don't whizz past the section + number before looking for it. + +2003-08-24 Nick Roberts + + * progmodes/gud.el (gud-display-line): Don't set window-point if + source buffer is not visible. (Only happens with M-x gdba). + + * gdb-ui.el (gdba): Remove gdb-quit (previously removed) from + documentation. + (gdb-source, gdb-source-info): Update to assembler unnecessary + as its done after each GDB command anyway. + (gdb-pre-prompt): Use with-current-buffer. + (gdb-insert-field): Add help-echo text. + (gdb-invalidate-assembler): Re-display of assembler now done in + gdb-info-breakpoints-custom. + (gdb-info-breakpoints-custom): Force re-display of assembler to + happen *after* update of breakpoints buffer. + (gdb-display-source-buffer): Don't choke if gdb-source-window + isn't visible. + (gdb-put-string, gdb-put-arrow): Remove free variables. + +2003-08-24 John Paul Wallington + + * ibuffer.el (ibuffer-formats): Make name and size columns wider. + + * man.el (Man-default-man-entry): Strip text properties when + snarfing parts of entry because `format' preserves properties. + +2003-08-24 Glenn Morris + + * files.el (file-newest-backup): Use `expand-file-name'. + + * calendar/diary-lib.el (simple-diary-display, make-diary-entry): + Allow the diary to pop up a new frame, if needed. + + * mail/sendmail.el (mail-specify-envelope-from): Doc change. + * mail/smtpmail.el (smtpmail-mail-address): Doc change. + (smtpmail-send-it): Make treatment of envelope-from consistent with + sendmail.el. + + * progmodes/sh-script.el (sh-builtins): Add some bash builtins. + (sh-leading-keywords): Add the bash `time' reserved word. + (sh-variables): Add some bash variables. + (sh-add-completer): Fix nil branch of case statement. + +2003-08-24 Masatake YAMATO + + * progmodes/ld-script.el: New file. + +2003-08-23 Markus Rost + + * vc-hooks.el (vc-ignore-vc-files, vc-master-templates): Doc fix. + +2003-08-23 Andre Spiegel + + * vc-hooks.el (vc-ignore-vc-files, vc-master-templates): + Better explain obsolescence, and what to use instead. + +2003-08-23 Masatake YAMATO + + * pcvs.el (cvs-do-removal): Show the deleted file name + on the prompt. + +2003-08-20 Dave Love + + * international/mule.el (make-coding-system) + (set-buffer-file-coding-system): Doc fix. + + * emacs-lisp/lisp-mode.el (common-lisp-mode): New. + + * emacs-lisp/lisp.el (beginning-of-defun-function): Doc fix. + + * international/utf-8.el (ucs-unicode-to-mule-cjk): Use smaller :size. + + * international/utf-16.el: Add mime-text-unsuitable coding system + properties. + + * international/latin1-disp.el (latin1-display): Add ?$,1s"(B. + + * cus-edit.el: Add some :links. + (bib): Remove. + + * textmodes/bib-mode.el (bib): Add :group external. + +2003-08-18 Luc Teirlinck + + * wid-edit.el (widget-echo-help): Make it handle expressions that + evaluate to strings. + +2003-08-18 Michael Mauger + + Version 1.8.0 of sql-mode. (Patch submitted 2003-06-21) + + Simplify selection of SQL products to define highlighting and + interactive mode. Includes detailed instructions on adding + support for new products. + + * progmodes/sql.el (sql-product): New variable. Identifies SQL + product for use in highlighting and interactive mode. + (sql-interactive-product): New variable. SQL product for + sql-interactive-mode. + (sql-product-support): New variable. Specifies product-specific + parameters to drive highlighting and interactive mode. + (sql-imenu-generic-expression): Add more object types. + (sql-sqlite-options): Correct comment. + (sql-ms-program): Use "osql" rather than "isql". + (sql-prompt-regexp, sql-prompt-length): Update comment. + (sql-mode-menu): Add "Start SQLi session" entry. + Replace Highlighting submenu with Product menu. Fix Send Region entry. + (sql-mode-abbrev-table): Add abbreviations. Support of + SYSTEM-FLAG on define-abbrev. Support was removed with last + check-in; it now handles older Emacsen without the SYSTEM-FLAG. + (sql-mode-font-lock-object-name): Add font-lock pattern for object + names. + (sql-mode-ansi-font-lock-keywords): Set as default value. + (sql-mode-oracle-font-lock-keywords): Set as default value. + Support Oracle 9i keywords. + (sql-mode-postgres-font-lock-keywords): Set as default value. + (sql-mode-linter-font-lock-keywords): Set as default value. + (sql-mode-ms-font-lock-keywords): New variable. Support Microsoft + SQLServer 2000. + (sql-mode-sybase-font-lock-keywords) + (sql-mode-interbase-font-lock-keywords) + (sql-mode-sqlite-font-lock-keywords) + (sql-mode-strong-font-lock-keywords) + (sql-mode-mysql-font-lock-keywords) + (sql-mode-db2-font-lock-keywords): New variables. Default to ANSI + keywords. + (sql-mode-font-lock-defaults): Update comment. + (sql-product-feature): New function. Returns feature associated + with a product from `sql-product-support' alist. + (sql-product-font-lock): New function. Set font-lock support + based on `sql-product'. + (sql-add-product-keywords): New function. Add font-lock rules to + product-specific keyword variables. + (sql-set-product): New function. Set `sql-product' and apply + appropriate font-lock highlighting. + (sql-highlight-product): New function. Set font-lock support + based on a product. Also set mode name to include product name. + (sql-highlight-ansi-keywords, sql-highlight-oracle-keywords) + (sql-highlight-postgres-keywords, sql-highlight-linter-keywords): + Use `sql-set-product'. + (sql-highlight-ms-keywords) + (sql-highlight-sybase-keywords) + (sql-highlight-interbase-keywords) + (sql-highlight-strong-keywords) + (sql-highlight-mysql-keywords) + (sql-highlight-sqlite-keywords) + (sql-highlight-db2-keywords): New functions. Use `sql-set-product'. + (sql-get-login): Prompt in the same order as the tokens. + (sql-mode): Uses `sql-product-highlight' and `sql-product-font-lock'. + (sql-product-interactive): New function. Common portions of + product-specific interactive mode wrappers. + (sql-interactive-mode): Rewritten to use product features. + (sql-oracle, sql-sybase, sql-informix, sql-sqlite, sql-mysql) + (sql-solid, sql-ingres, sql-ms, sql-postgres, sql-interbase) + (sql-db2, sql-linter): Use `sql-product-interactive'. + (sql-connect-oracle, sql-connect-sybase, sql-connect-informix) + (sql-connect-sqlite, sql-connect-mysql, sql-connect-solid) + (sql-connect-ingres, sql-connect-postgres) + (sql-connect-interbase, sql-connect-db2, sql-connect-linter): + New functions. Format command line parameters and invoke comint on + the appropriate interpreter. Code was in the corresponding + `sql-xyz' function before. + (sql-connect-ms): New function. Support -E argument to use + operating system credentials for authentication. + +2003-08-18 Kenichi Handa + + * international/mule.el (encode-char): Fix for the ASCII case. + +2003-08-15 Kenichi Handa + + * international/fontset.el (setup-default-fontset): Change "*" to + nil in the specifications of font family. + +2003-08-18 Kim F. Storm + + * kmacro.el (kmacro-keymap): Group related bindings in + initialization for clarity. Bind C-s to start macro. + Remove C-r binding. + (kmacro-initial-counter-value): New defvar to hold initial counter + value in case we set the value before defining a macro. + (kmacro-insert-counter): Clear kmacro-initial-counter-value.. + (kmacro-set-counter): Set kmacro-initial-counter-value if we are + not defining or executing macro. Doc fix. + (kmacro-add-counter): Clear kmacro-initial-counter-value. + (kmacro-view-last-item, kmacro-view-item-no): New defvars used to + temporarily view older elements on the macro ring without cycling + the ring. + (kmacro-display): Doc fix. + (kmacro-exec-ring-item): New helper function. + (kmacro-call-ring-2nd): Use it. + (kmacro-call-ring-2nd-repeat): Doc fix. + (kmacro-start-macro): Use (and clear) kmacro-initial-counter-value. + (kmacro-end-or-call-macro): Execute last viewed macro (using + kmacro-exec-ring-item) from ring if this follows + kmacro-view-macro. This allows us to find a macro on the ring + with C-x C-k C-v C-v ... and execute it (with C-k) without cycling + the ring to bring it to the head of the ring. + (kmacro-bind-to-key): Doc fix (describe reserved bindings). + Allow binding to reserved keys without specifying C-x C-k prefix. + Ask for confirmation if entered key sequence is already bound to + a non-macro command. + (kmacro-view-macro): Repeating command will show older elements + on the macro ring; C-k will execute the last viewed macro. + (kmacro-view-macro-repeat): Doc fix. Change its kmacro-repeat + property from 'ring to 'head. + +2003-08-17 Alan Shutko + + * calendar/calendar.el (calendar-make-alist): Correct off-by-one + keeping December out of the alist. + +2003-08-17 Edward M. Reingold + + * calendar/cal-move.el (calendar-goto-day-of-year): New function. + * calendar/calendar.el (calendar-mode-map): Bind it to key. + * calendar/cal-menu.el (calendar-mode-map): Add it to menu. + (calendar-flatten): New function. + (calendar-mouse-view-other-diary-entries) + (calendar-mouse-view-diary-entries): Rewritten to put any holidays + in the menu title and to show multi-line diary entries correctly + in the menu. + +2003-08-17 Luc Teirlinck + + * info.el (Info-scroll-prefer-subnodes): Add :version keyword to + defcustom, because the default was recently changed. + +2003-08-16 Richard M. Stallman + + * net/ange-ftp.el (ange-ftp-error): Add save-excursion. + + * emacs-lisp/lisp-mode.el (eval-last-sexp-print-value): + New subroutine, broken out of eval-last-sexp-1. + (eval-last-sexp-1): Use eval-last-sexp-print-value. + + * custom.el (custom-load-symbol): Load cus-load and cus-start first. + + * dabbrev.el (dabbrev--safe-replace-match): Use with-no-warnings. + + * simple.el (eval-expression): Use eval-last-sexp-print-value. + +2003-08-14 Jari Aalto + + * progmodes/compile.el (compilation-error-regexp-alist): + Add Java ANt error detection as described in document + http://ant.apache.org/faq.html + +2003-08-12 Juri Linkov (tiny change) + + * simple.el (backward-word, forward-to-indentation) + (backward-to-indentation): Argument changed to optional. + (next-line, previous-line): Use `or' instead of `unless'. + +2003-08-12 Vinicius Jose Latorre + + * progmodes/ebnf-iso.el (ebnf-no-meta-identifier): Becomes a var + instead of a constant. + +2003-08-12 Markus Rost + + * shell.el (shell): With prefix-arg, suggest a new buffer name. + +2003-08-12 Andre Spiegel + + * vc-sccs.el (vc-sccs-state-heuristic): Fix parentheses. + (vc-sccs-workfile-version): Search the entire delta table, rather + than just the first entry, because that might be a deleted version. + +2003-08-11 Karl Fogel + + * menu-bar.el (menu-bar-options-menu): Supply a body for the + [save-place] binding in the Options menu. Have it require + 'saveplace' and then toggle the variable manually, to avoid an an + unbound variable error. Thanks to + for the bug report. + +2003-08-11 Nick Roberts + + * gdb-ui.el (gdb-insert-field, gdb-array-format1) + (gdb-info-breakpoints-custom, gdb-info-frames-custom) + (gdb-info-threads-custom): Add help-echo text. + (gdb-display-back): Don't use purecopy. + (gdb-info-breakpoints-custom, gdb-reset) + (gdb-assembler-custom): Use display-images-p to test if breakpoint + icons can be displayed. + +2003-08-11 Markus Rost + + * textmodes/reftex-vars.el (reftex-auto-recenter-toc): Fix typo. + +2003-08-11 Stefan Monnier + + * bookmark.el (bookmark-completing-read): + Return a string, instead of a list of one string. + Use a popup menu if activated from the mouse. + (bookmark-edit-annotation): Remove unused vars. + (bookmark-jump, bookmark-relocate, bookmark-insert-location) + (bookmark-rename, bookmark-insert, bookmark-delete): Adjust calls + to bookmark-completing-read. + (bookmark-bmenu-show-filenames, bookmark-bmenu-hide-filenames) + (bookmark-bmenu-mark, bookmark-bmenu-select, bookmark-bmenu-unmark) + (bookmark-bmenu-delete, bookmark-bmenu-list): Use inhibit-read-only + and erase-buffer. + (bookmark-menu-delete, bookmark-menu-rename, bookmark-menu-locate) + (bookmark-menu-jump, bookmark-menu-insert) + (bookmark-popup-menu-and-apply-function) + (bookmark-menu-popup-paned-bookmark-menu): Remove. + (bookmark-menu-build-paned-menu): Remove by folding it into + bookmark-menu-popup-paned-menu. + (menu-bar-bookmark-map): Move the define-key statements here. + Use the "non-menu" commands since they now pop up a menu if needed. + (bookmark-exit-hook-internal): Simplify. + +2003-08-11 Carsten Dominik + + * reftex-toc.el (reftex-toc-rename-label): New function. + (reftex-toc-check-docstruct): New function. + + * reftex.el (reftex-region-active-p): New function. + + * reftex-parse.el (reftex-locate-bibliography-files): Improved the + regexp to find the \bibliography macro. + + * reftex-vars.el (reftex-section-levels): Removed subsubparagraph, + which does not exist in LaTeX. + (reftex-cite-format-builtin): Added amsrefs support. + (reftex-toc-confirm-promotion): New option + + * reftex-toc.el + (reftex-toc): Use `reftex-toc-split-windows-fraction'. + (reftex-toc-demote, reftex-toc-promote) + (reftex-toc-do-promote, reftex-toc-promote-prepare) + (reftex-toc-promote-action, reftex-toc-extract-section-number) + (reftex-toc-newhead-from-alist) + (reftex-toc-load-all-files-for-promotion): New functions. + (reftex-toc-help): Added description of new keys. + (reftex-toc-split-windows-fraction): New option. + (reftex-recenter-toc-when-idle): Search *toc* window on all + visible frames. + (reftex-toc): Additional parameter REUSE + (reftex-toc-recenter): Remember current frame. Call `reftex-toc' + with REUSE argument. + (reftex-recenter-toc-when-idle): Reset `current-prefix-arg' for + the call of `reftex-toc'. + (reftex-make-separate-toc-frame): New function . + (reftex-toc-recenter): When called with triple prefix arg, call + `reftex-make-separate-toc-frame' first. + (reftex-toc-toggle-dedicated-frame): New command. + (reftex-toc-quit): Adapted to delete frame when called in + dedicated frame. + + * reftex-index.el (reftex-index-phrase-match-is-indexed): Check + all enclosing macros. + + +2003-08-08 Vinicius Jose Latorre + + * progmodes/ebnf2ps.el (ebnf-total, ebnf-nprod): Move defvar before + first use. + +2003-08-07 Vinicius Jose Latorre + + * progmodes/ebnf2ps.el (ebnf-begin-job): Code fix. + +2003-08-06 Glenn Morris + + * calendar/calendar.el (list-diary-entries-hook) + (diary-display-hook, nongregorian-diary-listing-hook) + (mark-diary-entries-hook, nongregorian-diary-marking-hook): + Add some customize options for these hooks. + (calendar-abbrev-construct): Don't try to take a substring longer + than the original string. + +2003-08-05 Richard M. Stallman + + * emacs-lisp/testcover.el (noreturn): Report error if does return. + (testcover-reinstrument-clauses): Doc fix. + + * emacs-lisp/warnings.el: Doc fixes, args renamed. + (warning-type-format): Rename from warning-group-format. + + * emacs-lisp/bytecomp.el (byte-compile-not-obsolete-var): New var. + (byte-compile-variable-ref): Handle byte-compile-not-obsolete-var. + (byte-compile-defvar): Bind byte-compile-not-obsolete-var + to prevent warnings about defvar for an obsolete variable. + + * emacs-lisp/bytecomp.el (byte-compile-log-warning): + warning-group-format renamed to warning-type-format. + + * subr.el (read-passwd): Use clear-string instead of fillarray. + + * edmacro.el (edmacro-format-keys): Use edmacro-sanitize-for-string. + Use vconcat instead of concat. + (edmacro-sanitize-for-string): New function. + +2003-08-05 Dave Love + + * cus-start.el: Add open-paren-in-column-0-is-defun-start, + line-number-display-limit-width. + + * textmodes/tex-mode.el (tex-dvi-view-command): Fix quoted quotes. + +2003-08-05 Kenichi Handa + + * international/code-pages.el: Don't require mule-diag. + + * international/mule-diag.el (non-iso-charset-alist): + Add autoload cookie. + + * language/devan-util.el (dev-glyph-order): Add an entry for the + glyph code #xC4. + +2003-08-03 Glenn Morris + + * calendar/calendar.el (diary-file, diary-file-name-prefix) + (european-calendar-style, diary-date-forms) + (calendar-day-name-array, calendar-month-name-array): Doc change. + (generate-calendar-month): Adapt for new behaviour of + `calendar-day-name' function. + (calendar-abbrev-length, calendar-day-abbrev-array) + (calendar-month-abbrev-array): New variables. + (calendar-abbrev-construct): New function. + (calendar-day-name, calendar-month-name): Use new abbrev arrays, + rather than fixing abbrevs at some width. Calling syntax change. + (calendar-make-alist): Use abbrev arrays. Calling syntax change. + (calendar-date-string): Adapt for new behaviours of + `calendar-day-name' and `calendar-month-name' functions. + + * calendar/diary-lib.el (list-diary-entries): Adapt for new + behaviour of `calendar-day-name' and `calendar-month-name' functions. + (diary-name-pattern): Use abbrev arrays, rather than fixing + abbrevs at three chars. Calling syntax change. + (mark-diary-entries): Adapt for new behaviours of + `diary-name-pattern' and `calendar-make-alist' functions. + (fancy-diary-font-lock-keywords): Adapt for new behaviour of + `diary-name-pattern' function. + (font-lock-diary-date-forms): Use abbrev arrays, rather than + fixing abbrevs at three chars. Calling syntax change. + (cal-hebrew, cal-islam): Require when compiling. + (diary-font-lock-keywords): Adapt for new behaviour of + `font-lock-diary-date-forms' function. + + * calendar/cal-hebrew.el: Reposition some code so defined before used. + (calendar-hebrew-month-name-array-common-year) + (calendar-hebrew-month-name-array-leap-year): Add doc strings. + (list-hebrew-diary-entries): Adapt for new behaviours of + `calendar-day-name' and `add-to-diary-list' functions. + (mark-hebrew-diary-entries): Adapt for new behaviours of + `diary-name-pattern' and `calendar-make-alist' functions. + + * calendar/cal-islam.el (calendar-islamic-month-name-array): + Add doc string. + (list-islamic-diary-entries): Adapt for new behaviours of + `calendar-day-name' and `add-to-diary-list' functions. + (mark-islamic-diary-entries): Adapt for new behaviours of + `diary-name-pattern' and `calendar-make-alist' functions. + + * calendar/cal-menu.el (cal-menu-update): Adapt for new behaviour of + `calendar-month-name' function. + + * calendar/cal-coptic.el (coptic-name): defvar rather than defconst. + + * calendar/solar.el (solar-seasons-data): Move definition before use. + + * calendar/cal-tex.el (cal-tex-day-name-format): Doc fix. + (cal-tex-LaTeX-hourbox): Move definition before use. + + * calendar/cal-china.el, cal-hebrew.el, cal-islam.el, + cal-julian.el, cal-menu.el, cal-move.el, holidays.el, + lunar.el, solar.el + (displayed-month, displayed-year): Define for compiler. + +2003-08-03 Martin Stjernholm + + * progmodes/cc-mode.el (c-init-language-vars-for): Add argument + MODE. Renamed from c-init-c-language-vars'. + (c-initialize-cc-mode): Change accordingly. + (c-common-init): Ditto. + (c-mode): Ditto. + (c++-mode): Use `c-init-language-vars-for'. + (objc-mode): Ditto. + (java-mode): Ditto. + (idl-mode): Ditto. + (pike-mode): Ditto. + (awk-mode): Ditto. + +2003-08-03 Martin Stjernholm + + * progmodes/cc-engine.el (c-end-of-current-token): Return whether + or not the point moved. + + (c-search-decl-header-end): Don't trip up on operator identifiers + in C++ and operators like == in all languages. + + * progmodes/cc-engine.el (c-backward-to-decl-anchor): + Detect leading labels correctly. + +2003-08-02 Andreas Schwab + + * textmodes/ispell.el: Don't redo key bindings on loading, put + them only in loaddefs.el. + * bookmark.el: Likewise. + * dabbrev.el: Likewise. + * emerge.el: Likewise. + + * apropos.el (apropos-words-to-regexp): Only add `wild' if `words' + has more than one member. + + * progmodes/sh-script.el (sh-mode): Don't set mode-class property. + +2003-08-01 Vinicius Jose Latorre + + * lpr.el (printify-region): It was ending conversion before the + expected position. Reported by Keiichi Suzuki . + +2003-07-31 John Paul Wallington + + * net/browse-url.el (browse-url-epiphany): Doc fix. + +2003-07-30 Kenichi Handa + + * international/fontset.el (setup-default-fontset): + Change registry names of Akurti fonts. + +2003-07-29 Jesper Harder (tiny change) + + * comint.el (comint-read-noecho): Use `clear-string' instead of + `fillarray'. + +2003-07-29 Thomas W Murphy (tiny change) + + * outline.el (outline-mode-hook): Add defvar. + +2003-07-28 Nick Roberts + + * gdb-ui.el (gdb-setup-windows, gdb-restore-windows): + Restore assembler in source window if that is what has been selected. + (menu): Add gdb-restore-windows to menu. Make gdba + specific menus only visible from gdba. + +2003-07-28 Tak Ota (tiny change) + + * progmodes/compile.el (compilation-environment): New user variable. + (compile-internal): Respect it. + +2003-07-23 Masatake YAMATO + + * progmodes/gud.el (gdb-script-font-lock-keywords): + Put `font-lock-function-name-face' on a symbol which includes + `-' like `hook-run'. Put font-lock-variable-name-face + on a symbol starting with $. + +2003-07-27 Markus Rost + + * files.el (set-visited-file-name): Use truename for buffer-file-name. + +2003-07-26 Markus Rost + + * vc-hooks.el (vc-file-not-found-hook): Doc fix. + +2003-07-26 Andre Spiegel + + * vc-hooks.el (vc-default-registered, vc-make-version-backup): + Use with-no-warnings. + (vc-file-not-found-hook): Add this to find-file-not-found-functions, + rather than to find-file-not-found-hook, which doesn't exist. + +2003-07-26 Markus Rost + + * international/quail.el (quail-translate-key): Fix previous change. + +2003-07-25 John Paul Wallington + + * server.el (server-start): Check `server-process' is non-nil + before killing it to avoid killing current buffer's process. + + * simple.el (choose-completion-string): Use `minibufferp'; + test `completion-reference-buffer' if `buffer' arg is nil. + (push-mark): Use `when' and `unless'. + (pop-mark): Use `when'. + + * mouse-sel.el (mouse-sel-get-selection-function): + Check `x-last-selected-text-primary'. Don't barf if it or + `x-last-selected-text' aren't bound. + +2003-07-25 Kevin Rodgers (tiny change) + + * menu-bar.el (menu-bar-tools-menu): Minor change in strings. + +2003-07-23 Stefan Monnier + + * vc-svn.el (vc-svn-diff-switches): Don't default to vc-diff-switches. + +2003-07-23 John Paul Wallington + + * tooltip.el (defface tooltip): Inherit from variable-pitch. + +2003-07-23 Glenn Morris + + * emacs-lisp/derived.el (define-derived-mode): Mention hook in doc + string. Defvar the derived hook. + + * macros.el (insert-kbd-macro): Escape double quote character. + From Thomas W Murphy . + +2003-07-22 Stefan Monnier + + * textmodes/fill.el (fill-comment-paragraph): Construct a regexp + to match the specific mark rather than reusing comment-start-skip. + +2003-07-22 Thien-Thi Nguyen + + * progmodes/hideshow.el (hs-special-modes-alist): + Clarify MDATA-SELECTOR doc; nfc. Thanks to Michael Ernst. + +2003-07-21 Markus Rost + + * progmodes/idlwave.el (idlwave-comment-indent-char): Fix default + value using ?\s. + +2003-07-21 John Paul Wallington + + * subr.el (with-selected-window): Add closing paren. + +2003-07-21 Richard M. Stallman + + * emacs-lisp/lisp-mode.el (emacs-lisp-mode): Use run-mode-hooks. + (lisp-mode): Likewise. + + * subr.el (with-selected-window): Copy code form save-selected-window + so as to call select-window with norecord arg. + (dynamic-completion-table): Doc fix. + (lazy-completion-table): Doc fix. + + * international/mule-cmds.el (set-locale-environment): + langinfo renamed to locale-info. + + * international/mule.el (auto-coding-functions): Doc fix. + +2003-07-21 Kenichi Handa + + * international/quail.el (quail-translate-key): + Update quail-current-str correctly. + +2003-07-21 Andreas Schwab + + * progmodes/sh-script.el (sh-mode-syntax-table): Change syntax of + ?, to "_". + +2003-07-20 Kai Gro,A_(Bjohann + Version 2.0.36 of Tramp released. + + * net/tramp.el (tramp-default-password-end-of-line): Rename from + tramp-password-end-of-line. + (tramp-password-end-of-line): New method parameter. + (tramp-get-password-end-of-line): Function to access method + parameter `tramp-password-end-of-line', or variable + `tramp-default-password-end-of-line' (default value). + (tramp-methods): Add entries for new parameter + tramp-password-end-of-line. + (tramp-enter-password): Use new function + `tramp-get-password-end-of-line'. + (tramp-handle-insert-file-contents): Do not + unconditionally inhibit the file operation file-local-copy, only + do that when the inhibit-file-name-operation is currently + insert-file-contents. This fixes finding remote CVS-controlled + files. (It would barf on inserting the CVS/Entries file + literally, because the file-local-copy handler wasn't called.) + (tramp-handle-shell-command): Support optional third arg ERROR-BUFFER. + (tramp-sh-extra-args): Adapt defcustom type to XEmacs. + (tramp-initial-commands): New variable. + (tramp-process-initial-commands): New function, using the variable. + (tramp-open-connection-setup-interactive-shell): Call the new function. + (tramp-buffer-name, tramp-debug-buffer-name): Always put the + method into the buffer name, never use nil. Reported by Hanak + David . + (tramp-open-connection-setup-interactive-shell): Erase buffer + before sending "stty -onlcr". + + * net/tramp-vc.el (vc-workfile-unchanged-p): Add comment. + +2003-07-19 Markus Rost + + * textmodes/artist.el (artist-erase-char): Fix default value using ?\s. + +2003-07-19 John Paul Wallington + + * textmodes/artist.el (artist-butlast-fn, artist-draw-sline) + (artist-draw-rect, artist-draw-square): Doc fixes. + + * textmodes/enriched.el (enriched-decode-display-prop): Doc fix. + + * textmodes/two-column.el (2C-mode-line-format): Doc fix. + +2003-07-19 Kenichi Handa + + * international/kkc.el (kkc-show-conversion-list-update): + Highlight the correct candidate in the message. + +2003-07-18 John Paul Wallington + + * simple.el (current-word): Don't include punctuation char when + `really-word' arg is non-nil. + +2003-07-17 Martin Stjernholm + + * progmodes/awk-mode.el: Obsoleted by the AWK support in CC Mode - + moved to the directory obsolete. + +2003-07-16 Stefan Monnier + + * info.el (Info-menu-entry-name-re): Allow newlines in + menu entry names. + + * emacs-lisp/syntax.el (syntax-ppss-flush-cache): Rename from + syntax-ppss-after-change-function. + (syntax-ppss-after-change-function): New alias. Update uses. + (syntax-ppss): Catch the case where the buffer is narrowed. + +2003-07-16 Martin Stjernholm + + * progmodes/cc-defs.el (c-langelem-sym, c-langelem-pos) + (c-langelem-2nd-pos): Add accessor functions for syntactic elements. + +2003-07-16 Martin Stjernholm + + * progmodes/cc-engine.el (c-literal-faces): Declare as a variable + since it might be modified. + + * progmodes/cc-langs.el (c++-make-template-syntax-table) + (c-syntactic-ws-start, c-syntactic-ws-end): Give more consistent + names to these language constants. + +2003-07-15 Kim F. Storm + + * apropos.el (apropos-sort-by-scores): Rename from apropos-show-scores. + All uses changed. + +2003-07-14 Mark A. Hershberger + + * xml.el (xml-parse-tag, xml-parse-file, xml-parse-region): + Namespace support. + +2003-07-13 Juanma Barranquero + + * frame.el (modify-all-frames-parameters): Reinstall (copyright + papers received). + +2003-07-13 Karl Eichwalder + + * textmodes/po.el (po-find-charset): White space at the start of the + Content-Type field body is non-mandatory. + +2003-07-13 Masayuki Ataka (tiny change) + + * textmodes/texinfo.el (texinfo-section-list): + Append appendixsection; a synonym for appendixsec. + +2003-07-13 Jari Aalto + + * man.el (Man-translate-cleanup): New. + (Man-translate-references): Call `Man-translate-cleanup' to clean + leading, trailing and middle spaces. + +2003-07-13 Lars Hansen + + * desktop.el (desktop-buffer-dired-misc-data, desktop-buffer-dired): + Handle `dired-directory' being a list. + +2003-07-13 Jesper Harder (tiny change) + + * mail/smtpmail.el (smtpmail-send-it): Create smtpmail-queue-dir if + it doesn't exist. + +2003-07-12 Richard M. Stallman + + * progmodes/cc-engine.el (c-declare-lang-variables): Don't use mapcan. + + * progmodes/cc-defs.el (c-make-keywords-re): + Don't use delete-duplicates. + (c-lang-const): Don't use mapcan. + + * apropos.el (apropos-show-scores): Make it customizable. + Document new meaning. + (apropos): Compute scores from symbols. + (apropos-print): Don't sort by scores if apropos-show-scores is nil. + +2003-07-11 Vinicius Jose Latorre + + * ps-bdf.el: Fix copyright line. + (bdf-directory-list): Fix initialization code. + +2003-07-11 John Paul Wallington + + * emacs-lisp/ring.el (ring-empty-p): Use `zerop'. + (ring-p, ring-plus1, ring-minus1, ring-length, ring-index) + (ring-empty-p, ring-size, ring-copy, ring-ref): Doc fixes. + +2003-07-11 NAKAJIMA Mikio (tiny change) + + * emacs-lisp/ring.el (ring-elements): Doc fix. + +2003-07-11 Glenn Morris + + * calendar/timeclock.el (timeclock-relative) + (timeclock-ask-before-exiting, timeclock-use-display-time): + Doc changes. + (timeclock-modeline-display): Give a message if + `timeclock-use-display-time' is non-nil but `display-time-mode' + is not active. + +2003-07-11 Kenichi Handa + + * international/mule-cmds.el (set-language-environment): + Set current-language-environment to the correct string. + +2003-07-10 Vinicius Jose Latorre + + * ps-print.el: Print line number correctly in a region. Reported by + Tim Allen + (ps-print-version): New version number (6.6.2). + (ps-printing-region): Code fix. + +2003-07-10 John Paul Wallington + + * progmodes/etags.el (visit-tags-table-buffer): Add autoload cookie; + this function can be called from `add-completions-from-tags-table'. + +2003-07-10 Glenn Morris + + * calendar/timeclock.el (timeclock-use-display-time) + (timeclock-day-over-hook, timeclock-workday-remaining) + (timeclock-status-string, timeclock-when-to-leave) + (timeclock-when-to-leave-string, timeclock-log-data) + (timeclock-find-discrep, timeclock-day-base) + (timeclock-generate-report, timeclock-visit-timelog): Doc fix. + (timeclock-modeline-display): Set the variable + `timeclock-modeline-display'. + (timeclock-update-modeline): Doc fix. Respect value of + `timeclock-relative'. + +2003-07-09 Richard M. Stallman + + * textmodes/reftex-parse.el (reftex-all-document-files): + Add autoload cookie. + + * textmodes/reftex.el (reftex-all-document-files): Delete autoload. + (reftex-scanning-info-available-p): Add autoload cookie. + + * international/mule-cmds.el + (set-display-table-and-terminal-coding-system): Delete duplicate + aset on standard-display-table. + + * view.el (view-file): If existing buffer's major mode is special, + don't go into view mode. + + * dired.el (dired-move-to-filename-regexp): Allow quote in months. + +2003-07-08 Martin Stjernholm + + * progmodes/cc-engine.el (c-guess-basic-syntax): Do not do hidden + buffer changes; there's third party code that calls this function + directly. + +2003-07-08 Martin Stjernholm + + * progmodes/cc-fonts.el (javadoc-font-lock-keywords) + (autodoc-font-lock-keywords): Don't byte compile on font lock + initialization when running from byte compiled files. + +2003-07-08 Alan Mackenzie + + * progmodes/cc-engine.el: Fix AWK mode indentation when previous + statement ends with auto-increment "++". + +2003-07-08 Martin Stjernholm + + * progmodes/cc-langs.el, progmodes/cc-styles.el (c-style-alist) + (c-lang-variable-inits, c-lang-variable-inits-tail): The values of + these are changed, so declare them as variables and not constants. + +2003-07-08 Markus Rost + + * subr.el (dolist, dotimes): Doc fix. + +2003-07-08 Kim F. Storm + + * international/mule-cmds.el + (set-display-table-and-terminal-coding-system): Don't break + bootstrap if standard-display-table isn't setup yet. + +2003-07-07 Richard M. Stallman + + * ehelp.el (ehelp-command): Use defalias to define ehelp-command. + Give it a doc string, and autoload it. + + * desktop.el (desktop-buffer-info, desktop-buffer-mh): + Use with-no-warnings. + + * info.el (Info-search): If find invisible text, search again. + + * isearch.el (search-whitespace-regexp): Add a shy group around it. + + * man.el (Man-name-regexp): Match + as part of name. + + * simple.el (visible-mode): Rename from vis-mode. + (vis-mode-saved-buffer-invisibility-spec): Doc fix. + + * simple.el (current-word): New arg REALLY-WORD specifies + don't include punctuation chars. + + * emacs-lisp/debug.el (debug, debugger-env-macro): + Use with-no-warnings while accessing and binding unread-command-char. + + * international/mule-cmds.el + (set-display-table-and-terminal-coding-system): Use explicit loop + instead of calling standard-display-default. + + * net/ange-ftp.el (ange-ftp-file-symlink-p): + Use condition-case to catch error in ange-ftp-get-files. + + * net/browse-url.el (browse-url-browser-function): + Add alternative for Epiphany. + (browse-url-epiphany-program, browse-url-epiphany-arguments) + (browse-url-epiphany-startup-arguments) + (browse-url-epiphany-new-window-is-tab): New variables. + (browse-url-epiphany, browse-url-epiphany-sentinel): New functions. + + * progmodes/compile.el (compile-auto-highlight): Default now t. + (compile): Doc fix. + (compilation-next-error): Fix previous change. + + * textmodes/tex-mode.el (tex-main-file): Use with-no-warnings. + + * textmodes/sgml-mode.el (xml-mode): Add autoload cookie. + +2003-07-07 Nick Roberts + + * gdb-ui.el (gdb-source-info): Display current frame when + attaching to an existing process. + (gdb-setup-windows, gdb-source-info): Start with gud-comint-buffer + while laying out windows when attaching to an existing process. + +2003-07-07 Stefan Monnier + + * info.el (Info-menu): Use Info-menu-entry-name-re. + +2003-07-06 Stefan Monnier + + * vc-hooks.el (vc-stay-local, vc-stay-local-p): Move from vc.el. + * vc.el (vc-stay-local, vc-stay-local-p): Move to vc-hooks.el. + + * info.el (Info-menu-entry-name-re): Be careful to avoid multiple ways + to match the same text. + +2003-07-06 John Paul Wallington + + * vc.el (vc-annotate-offset): Move defvar up. + +2003-07-06 Kim F. Storm + + * info.el (Info-menu-entry-name-re): Add `:' to second [] part. + This should fix the infinite loop when extracting menu names. + +2003-07-05 Martin Stjernholm + + * files.el (auto-mode-alist, interpreter-mode-alist): + Remove entries to CC Mode modes to avoid duplicates; they are now added + with autoload directives in cc-mode.el. + +2003-07-05 Martin Stjernholm + + * progmodes/cc-langs.el, progmodes/cc-styles.el (c-style-alist) + (c-lang-variable-inits, c-lang-variable-inits-tail): The values of + these are changed, so declare them as variables and not constants. + + * progmodes/cc-mode.el: Fix some autoload problems: Try to + ensure that the entry for ".c" extension comes before the one for + ".C" on `auto-mode-alist', to behave better on case insensitive OS:es. + Fix incorrect entries that were added to `interpreter-mode-alist'. + Move the autoload directives for AWK to the top level since they + aren't recognized anywhere else. Do not use the new AWK mode doc + in the autoload form for the old AWK mode. + +2003-06-30 Roland Winkler + + * textmodes/bibtex.el (bibtex-sort-entry-class): New entry catch-all. + (bibtex-sort-ignore-string-entries): Default value t. + (bibtex-entry-kill-ring-max): Reintroduce as it was removed + erroneously in previous version. + (bibtex-string-files): Docstring reflects new parsing scheme. + (bibtex-autokey-transcriptions): Merge some rewrite entries, fix + docstring, add # as one of the chars to crush + (bibtex-autokey-prefix-string, bibtex-autokey-names) + (bibtex-autokey-names-stretch, bibtex-autokey-additional-names) + (bibtex-autokey-name-change-strings) + (bibtex-autokey-name-case-convert, bibtex-autokey-name-length) + (bibtex-autokey-name-separator, bibtex-autokey-year-length) + (bibtex-autokey-use-crossref, bibtex-autokey-titlewords) + (bibtex-autokey-title-terminators) + (bibtex-autokey-titlewords-stretch) + (bibtex-autokey-titleword-ignore) + (bibtex-autokey-titleword-case-convert) + (bibtex-autokey-titleword-abbrevs) + (bibtex-autokey-titleword-abbrevs) + (bibtex-autokey-titleword-change-strings) + (bibtex-autokey-titleword-length) + (bibtex-autokey-titleword-separator) + (bibtex-autokey-name-year-separator) + (bibtex-autokey-year-title-separator) + (bibtex-autokey-before-presentation-function) + (bibtex-entry-type-history, bibtex-entry-maybe-empty-head): + Fix docstring. + (bibtex-strings, bibtex-reference-keys): + Use lazy-completion-table and make-variable-buffer-local. + (bibtex-sort-entry-class-alist): Use downcase, account for catch-all. + (bibtex-braced-string-syntax-table) + (bibtex-quoted-string-syntax-table): New variables. + (bibtex-parse-nested-braces): Remove. + (bibtex-parse-field-string): Use syntax table and forward-sexp. + (bibtex-parse-association): Simplify. + (bibtex-parse-field-name): Obey bibtex-autoadd-commas. + (bibtex-parse-field-text): Simplify. + (bibtex-search-forward-field, bibtex-search-backward-field): + argument BOUND can take value t. + (bibtex-start-of-field, bibtex-start-of-name-in-field) + (bibtex-end-of-name-in-field, bibtex-end-of-field) + (bibtex-start-of-text-in-field, bibtex-end-of-text-in-field) + (bibtex-start-of-text-in-string, bibtex-end-of-text-in-string) + (bibtex-end-of-string, bibtex-type-in-head): Use defsubst. + (bibtex-skip-to-valid-entry): Return buffer position of beginning + and ending of entry. Update for changes of bibtex-search-entry. + Simplify. + (bibtex-map-entries): FUN is called with three arguments. + (bibtex-search-entry): Return a cons pair with buffer positions of + beginning and end of entry. + (bibtex-enclosing-field): Simplify. + (bibtex-format-entry): Use booktitle to set a missing title. + (bibtex-autokey-get-names): Fiddle with regexps. + (bibtex-generate-autokey): Use identity. + (bibtex-parse-keys): Use simplified parsing algorithm if + bibtex-parse-keys-fast is non-nil. Simplify. Change order of + arguments. Return alist of keys. + (bibtex-parse-strings): Simplify. Return alist of strings. + (bibtex-complete-string-cleanup): Fix docstring. + (bibtex-read-key): New function. + (bibtex-mode): Fix docstring. Do not parse for keys and + strings when the mode is entered. Set fill-paragraph-function to + bibtex-fill-field. Setup font-lock-mark-block-function the way + font-lock intended. + (bibtex-entry): Use bibtex-read-key. Obey bibtex-autofill-types. + (bibtex-parse-entry, bibtex-autofill-entry): New functions. + (bibtex-print-help-message, bibtex-remove-OPT-or-ALT) + (bibtex-Preamble): Avoid hard coded constants. + (bibtex-make-field): Fix docstring. Simplify. + (bibtex-beginning-of-entry): Always return new position of point. + (bibtex-end-of-entry): Rearrange cond clauses. + (bibtex-count-entries, bibtex-validate, bibtex-reformat): + Update for changes of bibtex-map-entries. + (bibtex-ispell-abstract): Do not move point. + (bibtex-entry-index): Use downcase. Simplify. + (bibtex-lessp): Handle catch-all. + (bibtex-find-crossref): Turn into a command. + (bibtex-find-entry): Simplify. Use bibtex-read-key. Fix regexp. + (bibtex-clean-entry): Use bibtex-read-key. Handle string and + preamble entries. + (bibtex-fill-field-bounds): New function. + (bibtex-fill-field): New command. Bound to fill-paragraph-function. + (bibtex-fill-entry): Use bibtex-fill-field-bounds + (bibtex-String): Use bibtex-strings. Always obey + bibtex-sort-ignore-string-entries. + +2003-07-05 John Paul Wallington + + * cus-theme.el (customize-create-theme): + Call `customize-create-theme' in Reset widget's notify function. + + * ibuffer.el (ibuffer-backward-line, ibuffer-forward-line) + (ibuffer-mark-interactive): Use `or' instead of `unless'. + (define-ibuffer-column name): Add summarizer. + (define-ibuffer-column size): Likewise. + (define-ibuffer-column filename): Likewise. + (define-ibuffer-column process): Likewise. Change BODY's output too. + (define-ibuffer-column filename-and-process): Likewise, likewise. + (ibuffer): Remove local vars `already-in' and `need-update'. + + * ibuf-ext.el: Don't require `derived' at compile-time. + +2003-07-05 Kim F. Storm + + * info.el: Disable paragraph refilling. + (Info-refill-paragraphs): New defcustom. + (Info-fontify-node): Use it. + +2003-07-04 Stefan Monnier + + * emacs-lisp/cl-macs.el (cl-transform-lambda): Strip &cl-defs + thingies from constructors created by defstruct. + + * emacs-lisp/bytecomp.el (byte-compile-defvar): Check and set + the default value of the variable. + (byte-code-meter): Move declaration to top level. + + * pcvs-parse.el (cvs-parse-status): Ignore extra fields from CVSNT. + + * info.el (Info-following-node-name-re): New fun. + (Info-following-node-name): Remove. + (Info-insert-dir): Use the new fun. + (Info-extract-pointer): Don't save restriction; use new fun. + (Info-menu-entry-name-re): New const. + (Info-menu-entry-name-re): Use it along with new fun. + (Info-node-spec-re): Use new fun. + (Info-complete-menu-item, Info-fontify-node): Use new const. + (Info-goto-node, Info-follow-reference, Info-menu-update): + Use match-string. + (Info-follow-reference): Use assoc-string. + Use a list of strings for the completion table. + (Info-fontify-node): Use match-string, line-end-position. + Limit the search for `node:' to the first line. + + * newcomment.el (uncomment-region): Remove padding coming from + comment-start rather than just from comment-padding. + + * vc-cvs.el (vc-cvs-repository-hostname): New operation. + (vc-cvs-stay-local-p): Use vc-stay-local-p. + (vc-cvs-rename-file): Remove (use the default). + (vc-cvs-register): Register parent dir if needed. + (vc-cvs-could-register): Return non-nil if parent can be registered. + (vc-cvs-state, vc-cvs-dir-state, vc-cvs-print-log, vc-cvs-diff) + (vc-cvs-diff-tree, vc-cvs-make-version-backups-p): Use vc-stay-local-p. + + * vc-svn.el (vc-svn-use-edit): Make it into a const. + (vc-svn-update): Fix the arguments to `svn'. + (vc-svn-diff-tree): Just use `vc-svn-diff'. + (vc-svn-create-snapshot, vc-svn-retrieve-snapshot): + Simple implementations, assuming `name' is a URL. + + * progmodes/sh-script.el (sh-font-lock-paren): Add [ and ] to the + set of chars allowed unquoted in a case pattern. + + * font-core.el (font-lock-defaults-alist): Remove obsolete entries. + + * font-lock.el (font-lock-extra-types-widget) + (c-font-lock-extra-types, c++-font-lock-extra-types) + (objc-font-lock-extra-types, java-font-lock-extra-types) + (c-font-lock-keywords-1, c-font-lock-keywords-2, c-font-lock-keywords) + (c-font-lock-keywords-3, c-font-lock-syntactic-face-function) + (font-lock-match-c++-style-declaration-item-and-skip-to-next) + (font-lock-match-c++-structor-declaration) + (c++-font-lock-keywords-1, c++-font-lock-keywords-2) + (c++-font-lock-keywords-3, c++-font-lock-keywords) + (objc-font-lock-keywords-1, objc-font-lock-keywords-2) + (objc-font-lock-keywords-3, objc-font-lock-keywords) + (java-font-lock-keywords-1, java-font-lock-keywords-2) + (java-font-lock-keywords-3, java-font-lock-keywords) + (java-font-lock-syntactic-face-function): Remove obsolete code + and constants. It's all in cc-fonts.el now. + +2003-07-04 Glenn Morris + + * mail/sendmail.el (mail-specify-envelope-from) + (mail-envelope-from): Doc fix. + +2003-07-04 Martin Stjernholm + + * generic-x.el: Do away with the dependency on `c-emacs-features' + when populating `rul-generic-mode-syntax-table'; we already know + this isn't XEmacs. + +See ChangeLog.10 for earlier changes. + +;; Local Variables: +;; coding: iso-2022-7bit +;; End: + + Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copying and distribution of this file, with or without modification, + are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: e39939be-dab3-400e-86f5-0e2701a883c1 diff --git a/lisp/ChangeLog.1 b/lisp/ChangeLog.1 index 35123abd07..c903f0a2e9 100644 --- a/lisp/ChangeLog.1 +++ b/lisp/ChangeLog.1 @@ -3249,3 +3249,5 @@ Copyright (C) 1985, 1986 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: b6060738-7fac-4c9c-80ae-67995bae78a7 diff --git a/lisp/ChangeLog b/lisp/ChangeLog.10 similarity index 96% copy from lisp/ChangeLog copy to lisp/ChangeLog.10 index b9b8390d04..6aae7e44cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog.10 @@ -1,777 +1,9 @@ -2003-08-05 Kenichi Handa - - * international/code-pages.el: Don't require mule-diag. - - * international/mule-diag.el (non-iso-charset-alist): Add - autoload cookie. - - * language/devan-util.el (dev-glyph-order): Add an entry for the - glyph code #xC4. - -2003-08-03 Glenn Morris - - * calendar/calendar.el (diary-file, diary-file-name-prefix) - (european-calendar-style, diary-date-forms) - (calendar-day-name-array, calendar-month-name-array): Doc change. - (generate-calendar-month): Adapt for new behaviour of - `calendar-day-name' function. - (calendar-abbrev-length, calendar-day-abbrev-array) - (calendar-month-abbrev-array): New variables. - (calendar-abbrev-construct): New function. - (calendar-day-name, calendar-month-name): Use new abbrev arrays, - rather than fixing abbrevs at some width. Calling syntax change. - (calendar-make-alist): Use abbrev arrays. Calling syntax change. - (calendar-date-string): Adapt for new behaviours of - `calendar-day-name' and `calendar-month-name' functions. - - * calendar/diary-lib.el (list-diary-entries): Adapt for new - behaviour of `calendar-day-name' and `calendar-month-name' - functions. - (diary-name-pattern): Use abbrev arrays, rather than fixing - abbrevs at three chars. Calling syntax change. - (mark-diary-entries): Adapt for new behaviours of - `diary-name-pattern' and `calendar-make-alist' functions. - (fancy-diary-font-lock-keywords): Adapt for new behaviour of - `diary-name-pattern' function. - (font-lock-diary-date-forms): Use abbrev arrays, rather than - fixing abbrevs at three chars. Calling syntax change. - (cal-hebrew, cal-islam): Require when compiling. - (diary-font-lock-keywords): Adapt for new behaviour of - `font-lock-diary-date-forms' function. - - * calendar/cal-hebrew.el: Reposition some code so defined before used. - (calendar-hebrew-month-name-array-common-year) - (calendar-hebrew-month-name-array-leap-year): Add doc strings. - (list-hebrew-diary-entries): Adapt for new behaviours of - `calendar-day-name' and `add-to-diary-list' functions. - (mark-hebrew-diary-entries): Adapt for new behaviours of - `diary-name-pattern' and `calendar-make-alist' functions. - - * calendar/cal-islam.el (calendar-islamic-month-name-array): Add - doc string. - (list-islamic-diary-entries): Adapt for new behaviours of - `calendar-day-name' and `add-to-diary-list' functions. - (mark-islamic-diary-entries): Adapt for new behaviours of - `diary-name-pattern' and `calendar-make-alist' functions. - - * calendar/cal-menu.el (cal-menu-update): Adapt for new behaviour of - `calendar-month-name' function. - - * calendar/cal-coptic.el (coptic-name): defvar rather than defconst. - - * calendar/solar.el (solar-seasons-data): Move definition before use. - - * calendar/cal-tex.el (cal-tex-day-name-format): Doc fix. - (cal-tex-LaTeX-hourbox): Move definition before use. - - * calendar/cal-china.el, cal-hebrew.el, cal-islam.el, - cal-julian.el, cal-menu.el, cal-move.el, holidays.el, - lunar.el, solar.el - (displayed-month, displayed-year): Define for compiler. - -2003-08-03 Martin Stjernholm - - * progmodes/cc-mode.el (c-init-language-vars-for): Add argument - MODE. Renamed from c-init-c-language-vars'. - (c-initialize-cc-mode): Change accordingly. - (c-common-init): Ditto. - (c-mode): Ditto. - (c++-mode): Use function. - (objc-mode): Ditto. - (java-mode): Ditto. - (idl-mode): Ditto. - (pike-mode): Ditto. - (awk-mode): Ditto. - -2003-08-03 Martin Stjernholm - - * progmodes/cc-engine.el (c-end-of-current-token): Return whether - or not the point moved. - - (c-search-decl-header-end): Don't trip up on operator identifiers - in C++ and operators like == in all languages. - - * progmodes/cc-engine.el (c-backward-to-decl-anchor): Detect - leading labels correctly. - -2003-08-02 Andreas Schwab - - * textmodes/ispell.el: Don't redo key bindings on loading, put - them only in loaddefs.el. - * bookmark.el: Likewise. - * dabbrev.el: Likewise. - * emerge.el: Likewise. - - * apropos.el (apropos-words-to-regexp): Only add `wild' if `words' - has more than one member. - - * progmodes/sh-script.el (sh-mode): Don't set mode-class property. - -2003-08-01 Vinicius Jose Latorre - - * lpr.el (printify-region): It was ending conversion before the - expected position. Reported by Keiichi Suzuki . - -2003-07-31 John Paul Wallington - - * net/browse-url.el (browse-url-epiphany): Doc fix. - -2003-07-30 Kenichi Handa - - * international/fontset.el (setup-default-fontset): Change - registry names of Akurti fonts. - -2003-07-29 Jesper Harder (tiny change) - - * comint.el (comint-read-noecho): Use `clear-string' instead of - `fillarray'. - -2003-07-29 Thomas W Murphy (tiny change) - - * outline.el (outline-mode-hook): Add defvar. - -2003-07-28 Nick Roberts - - * gdb-ui.el (gdb-setup-windows, gdb-restore-windows): Restore - assembler in source window if that is what has been selected. - (menu): Add gdb-restore-windows to menu. Make gdba - specific menus only visible from gdba. - -2003-07-28 Tak Ota (tiny change) - - * progmodes/compile.el (compilation-environment): New user variable. - (compile-internal): Respect it. - -2003-07-23 Masatake YAMATO - - * progmodes/gud.el (gdb-script-font-lock-keywords): - Put `font-lock-function-name-face' on a symbol which includes - `-' like `hook-run'. Put font-lock-variable-name-face - on a symbol starting with $. - -2003-07-27 Markus Rost - - * files.el (set-visited-file-name): Use truename for buffer-file-name. - -2003-07-26 Markus Rost - - * vc-hooks.el (vc-file-not-found-hook): Doc fix. - -2003-07-26 Andre Spiegel - - * vc-hooks.el (vc-default-registered, vc-make-version-backup): - Use with-no-warnings. - (vc-file-not-found-hook): Add this to find-file-not-found-functions, - rather than to find-file-not-found-hook, which doesn't exist. - -2003-07-26 Markus Rost - - * international/quail.el (quail-translate-key): Fix previous - change. - -2003-07-25 John Paul Wallington - - * server.el (server-start): Check `server-process' is non-nil - before killing it to avoid killing current buffer's process. - - * simple.el (choose-completion-string): Use `minibufferp'; - test `completion-reference-buffer' if `buffer' arg is nil. - (push-mark): Use `when' and `unless'. - (pop-mark): Use `when'. - - * mouse-sel.el (mouse-sel-get-selection-function): - Check `x-last-selected-text-primary'. Don't barf if it or - `x-last-selected-text' aren't bound. - -2003-07-25 Kevin Rodgers (tiny change) - - * menu-bar.el (menu-bar-tools-menu): Minor change in strings. - -2003-07-23 Stefan Monnier - - * vc-svn.el (vc-svn-diff-switches): Don't default to vc-diff-switches. - -2003-07-23 John Paul Wallington - - * tooltip.el (defface tooltip): Inherit from variable-pitch. - -2003-07-23 Glenn Morris - - * emacs-lisp/derived.el (define-derived-mode): Mention hook in doc - string. Defvar the derived hook. - - * macros.el (insert-kbd-macro): Escape double quote character. - From Thomas W Murphy . - -2003-07-22 Stefan Monnier - - * textmodes/fill.el (fill-comment-paragraph): Construct a regexp - to match the specific mark rather than reusing comment-start-skip. - -2003-07-22 Thien-Thi Nguyen - - * progmodes/hideshow.el (hs-special-modes-alist): - Clarify MDATA-SELECTOR doc; nfc. - -2003-07-21 Markus Rost - - * progmodes/idlwave.el (idlwave-comment-indent-char): Fix default - value using ?\s. - -2003-07-21 John Paul Wallington - - * subr.el (with-selected-window): Add closing paren. - -2003-07-21 Richard M. Stallman - - * emacs-lisp/lisp-mode.el (emacs-lisp-mode): Use run-mode-hooks. - (lisp-mode): Likewise. - - * subr.el (with-selected-window): Copy code form save-selected-window - so as to call select-window with norecord arg. - (dynamic-completion-table): Doc fix. - (lazy-completion-table): Doc fix. - - * international/mule-cmds.el (set-locale-environment): - langinfo renamed to locale-info. - - * international/mule.el (auto-coding-functions): Doc fix. - -2003-07-21 Kenichi Handa - - * international/quail.el (quail-translate-key): - Update quail-current-str correctly. - -2003-07-21 Andreas Schwab - - * progmodes/sh-script.el (sh-mode-syntax-table): Change syntax of - ?, to "_". - -2003-07-20 Kai Gro,A_(Bjohann - Version 2.0.36 of Tramp released. - - * net/tramp.el (tramp-default-password-end-of-line): Rename from - tramp-password-end-of-line. - (tramp-password-end-of-line): New method parameter. - (tramp-get-password-end-of-line): Function to access method - parameter `tramp-password-end-of-line', or variable - `tramp-default-password-end-of-line' (default value). - (tramp-methods): Add entries for new parameter - tramp-password-end-of-line. - (tramp-enter-password): Use new function - `tramp-get-password-end-of-line'. - (tramp-handle-insert-file-contents): Do not - unconditionally inhibit the file operation file-local-copy, only - do that when the inhibit-file-name-operation is currently - insert-file-contents. This fixes finding remote CVS-controlled - files. (It would barf on inserting the CVS/Entries file - literally, because the file-local-copy handler wasn't called.) - (tramp-handle-shell-command): Support optional third arg ERROR-BUFFER. - (tramp-sh-extra-args): Adapt defcustom type to XEmacs. - (tramp-initial-commands): New variable. - (tramp-process-initial-commands): New function, using the variable. - (tramp-open-connection-setup-interactive-shell): Call the new function. - (tramp-buffer-name, tramp-debug-buffer-name): Always put the - method into the buffer name, never use nil. Reported by Hanak - David . - (tramp-open-connection-setup-interactive-shell): Erase buffer - before sending "stty -onlcr". - - * net/tramp-vc.el (vc-workfile-unchanged-p): Add comment. - -2003-07-19 Markus Rost - - * textmodes/artist.el (artist-erase-char): Fix default value using ?\s. - -2003-07-19 John Paul Wallington - - * textmodes/artist.el (artist-butlast-fn, artist-draw-sline) - (artist-draw-rect, artist-draw-square): Doc fixes. - - * textmodes/enriched.el (enriched-decode-display-prop): Doc fix. - - * textmodes/two-column.el (2C-mode-line-format): Doc fix. - -2003-07-19 Kenichi Handa - - * international/kkc.el (kkc-show-conversion-list-update): - Highlight the correct candidate in the message. - -2003-07-18 John Paul Wallington - - * simple.el (current-word): Don't include punctuation char when - `really-word' arg is non-nil. - -2003-07-17 Martin Stjernholm - - * progmodes/awk-mode.el: Obsoleted by the AWK support in CC Mode - - moved to the directory obsolete. - -2003-07-16 Stefan Monnier - - * info.el (Info-menu-entry-name-re): Allow newlines in - menu entry names. - - * emacs-lisp/syntax.el (syntax-ppss-flush-cache): Rename from - syntax-ppss-after-change-function. - (syntax-ppss-after-change-function): New alias. Update uses. - (syntax-ppss): Catch the case where the buffer is narrowed. - -2003-07-16 Martin Stjernholm - - * progmodes/cc-defs.el (c-langelem-sym, c-langelem-pos) - (c-langelem-2nd-pos): Add accessor functions for syntactic elements. - -2003-07-16 Martin Stjernholm - - * progmodes/cc-engine.el (c-literal-faces): Declare as a variable - since it might be modified. - - * progmodes/cc-langs.el (c++-make-template-syntax-table) - (c-syntactic-ws-start, c-syntactic-ws-end): Give more consistent - names to these language constants. - -2003-07-15 Kim F. Storm - - * apropos.el (apropos-sort-by-scores): Rename from apropos-show-scores. - All uses changed. - -2003-07-14 Mark A. Hershberger - - * xml.el (xml-parse-tag, xml-parse-file, xml-parse-region): - Namespace support. - -2003-07-13 Juanma Barranquero - - * frame.el (modify-all-frames-parameters): Reinstall (copyright - papers received). - -2003-07-13 Karl Eichwalder - - * textmodes/po.el (po-find-charset): White space at the start of the - Content-Type field body is non-mandatory. - -2003-07-13 Masayuki Ataka (tiny change) - - * textmodes/texinfo.el (texinfo-section-list): - Append appendixsection; a synonym for appendixsec. - -2003-07-13 Jari Aalto - - * man.el (Man-translate-cleanup): New. - (Man-translate-references): Call `Man-translate-cleanup' to clean - leading, trailing and middle spaces. - -2003-07-13 Lars Hansen - - * desktop.el (desktop-buffer-dired-misc-data, desktop-buffer-dired): - Handle `dired-directory' being a list. - -2003-07-13 Jesper Harder (tiny change) - - * mail/smtpmail.el (smtpmail-send-it): Create smtpmail-queue-dir if - it doesn't exist. - -2003-07-12 Richard M. Stallman - - * progmodes/cc-engine.el (c-declare-lang-variables): Don't use mapcan. - - * progmodes/cc-defs.el (c-make-keywords-re): - Don't use delete-duplicates. - (c-lang-const): Don't use mapcan. - - * apropos.el (apropos-show-scores): Make it customizable. - Document new meaning. - (apropos): Compute scores from symbols. - (apropos-print): Don't sort by scores if apropos-show-scores is nil. - -2003-07-11 Vinicius Jose Latorre - - * ps-bdf.el: Fix copyright line. - (bdf-directory-list): Fix initialization code. - -2003-07-11 John Paul Wallington - - * emacs-lisp/ring.el (ring-empty-p): Use `zerop'. - (ring-p, ring-plus1, ring-minus1, ring-length, ring-index) - (ring-empty-p, ring-size, ring-copy, ring-ref): Doc fixes. - -2003-07-11 NAKAJIMA Mikio (tiny change) - - * emacs-lisp/ring.el (ring-elements): Doc fix. - -2003-07-11 Glenn Morris - - * calendar/timeclock.el (timeclock-relative) - (timeclock-ask-before-exiting, timeclock-use-display-time): - Doc changes. - (timeclock-modeline-display): Give a message if - `timeclock-use-display-time' is non-nil but `display-time-mode' - is not active. - -2003-07-11 Kenichi Handa - - * international/mule-cmds.el (set-language-environment): - Set current-language-environment to the correct string. - -2003-07-10 Vinicius Jose Latorre - - * ps-print.el: Print line number correctly in a region. Reported by - Tim Allen - (ps-print-version): New version number (6.6.2). - (ps-printing-region): Code fix. - -2003-07-10 John Paul Wallington - - * progmodes/etags.el (visit-tags-table-buffer): Add autoload cookie; - this function can be called from `add-completions-from-tags-table'. - -2003-07-10 Glenn Morris - - * calendar/timeclock.el (timeclock-use-display-time) - (timeclock-day-over-hook, timeclock-workday-remaining) - (timeclock-status-string, timeclock-when-to-leave) - (timeclock-when-to-leave-string, timeclock-log-data) - (timeclock-find-discrep, timeclock-day-base) - (timeclock-generate-report, timeclock-visit-timelog): Doc fix. - (timeclock-modeline-display): Set the variable - `timeclock-modeline-display'. - (timeclock-update-modeline): Doc fix. Respect value of - `timeclock-relative'. - -2003-07-09 Richard M. Stallman - - * textmodes/reftex-parse.el (reftex-all-document-files): - Add autoload cookie. - - * textmodes/reftex.el (reftex-all-document-files): Delete autoload. - (reftex-scanning-info-available-p): Add autoload cookie. - - * international/mule-cmds.el (set-display-table-and-terminal-coding-system): - Delete duplicate aset on standard-display-table. - - * view.el (view-file): If existing buffer's major mode is special, - don't go into view mode. - - * dired.el (dired-move-to-filename-regexp): Allow quote in months. - -2003-07-08 Martin Stjernholm - - * progmodes/cc-engine.el (c-guess-basic-syntax): Do not do hidden - buffer changes; there's third party code that calls this function - directly. - -2003-07-08 Martin Stjernholm - - * progmodes/cc-fonts.el (javadoc-font-lock-keywords) - (autodoc-font-lock-keywords): Don't byte compile on font lock - initialization when running from byte compiled files. - -2003-07-08 Alan Mackenzie - - * progmodes/cc-engine.el: Fix AWK mode indentation when previous - statement ends with auto-increment "++". - -2003-07-08 Martin Stjernholm - - * progmodes/cc-langs.el, progmodes/cc-styles.el (c-style-alist) - (c-lang-variable-inits, c-lang-variable-inits-tail): The values of - these are changed, so declare them as variables and not constants. - -2003-07-08 Markus Rost - - * subr.el (dolist, dotimes): Doc fix. - -2003-07-08 Kim F. Storm - - * international/mule-cmds.el (set-display-table-and-terminal-coding-system): - Don't break bootstrap if standard-display-table isn't setup yet. - -2003-07-07 Richard M. Stallman - - * ehelp.el (ehelp-command): Use defalias to define ehelp-command. - Give it a doc string, and autoload it. - - * desktop.el (desktop-buffer-info, desktop-buffer-mh): - Use with-no-warnings. - - * info.el (Info-search): If find invisible text, search again. - - * isearch.el (search-whitespace-regexp): Add a shy group around it. - - * man.el (Man-name-regexp): Match + as part of name. - - * simple.el (visible-mode): Rename from vis-mode. - (vis-mode-saved-buffer-invisibility-spec): Doc fix. - - * simple.el (current-word): New arg REALLY-WORD specifies - don't include punctuation chars. - - * emacs-lisp/debug.el (debug, debugger-env-macro): - Use with-no-warnings while accessing and binding unread-command-char. - - * international/mule-cmds.el (set-display-table-and-terminal-coding-system): - Use explicit loop instead of calling standard-display-default. - - * net/ange-ftp.el (ange-ftp-file-symlink-p): - Use condition-case to catch error in ange-ftp-get-files. - - * net/browse-url.el (browse-url-browser-function): - Add alternative for Epiphany. - (browse-url-epiphany-program, browse-url-epiphany-arguments) - (browse-url-epiphany-startup-arguments) - (browse-url-epiphany-new-window-is-tab): New variables. - (browse-url-epiphany, browse-url-epiphany-sentinel): New functions. - - * progmodes/compile.el (compile-auto-highlight): Default now t. - (compile): Doc fix. - (compilation-next-error): Fix previous change. - - * textmodes/tex-mode.el (tex-main-file): Use with-no-warnings. - - * textmodes/sgml-mode.el (xml-mode): Add autoload cookie. - -2003-07-07 Nick Roberts - - * gdb-ui.el (gdb-source-info): Display current frame when - attaching to an existing process. - (gdb-setup-windows, gdb-source-info): Start with gud-comint-buffer - while laying out windows when attaching to an existing process. - -2003-07-07 Stefan Monnier - - * info.el (Info-menu): Use Info-menu-entry-name-re. - -2003-07-06 Stefan Monnier - - * vc-hooks.el (vc-stay-local, vc-stay-local-p): Move from vc.el. - * vc.el (vc-stay-local, vc-stay-local-p): Move to vc-hooks.el. - - * info.el (Info-menu-entry-name-re): Be careful to avoid multiple ways - to match the same text. - -2003-07-06 John Paul Wallington - - * vc.el (vc-annotate-offset): Move defvar up. - -2003-07-06 Kim F. Storm - - * info.el (Info-menu-entry-name-re): Add `:' to second [] part. - This should fix the infinite loop when extracting menu names. - -2003-07-05 Martin Stjernholm - - * files.el (auto-mode-alist, interpreter-mode-alist): - Remove entries to CC Mode modes to avoid duplicates; they are now added - with autoload directives in cc-mode.el. - -2003-07-05 Martin Stjernholm - - * progmodes/cc-langs.el, progmodes/cc-styles.el (c-style-alist) - (c-lang-variable-inits, c-lang-variable-inits-tail): The values of - these are changed, so declare them as variables and not constants. - - * progmodes/cc-mode.el: Fix some autoload problems: Try to - ensure that the entry for ".c" extension comes before the one for - ".C" on `auto-mode-alist', to behave better on case insensitive OS:es. - Fix incorrect entries that were added to `interpreter-mode-alist'. - Move the autoload directives for AWK to the top level since they - aren't recognized anywhere else. Do not use the new AWK mode doc - in the autoload form for the old AWK mode. - -2003-06-30 Roland Winkler - - * textmodes/bibtex.el (bibtex-sort-entry-class): New entry catch-all. - (bibtex-sort-ignore-string-entries): Default value t. - (bibtex-entry-kill-ring-max): Reintroduce as it was removed - erroneously in previous version. - (bibtex-string-files): Docstring reflects new parsing scheme. - (bibtex-autokey-transcriptions): Merge some rewrite entries, fix - docstring, add # as one of the chars to crush - (bibtex-autokey-prefix-string, bibtex-autokey-names) - (bibtex-autokey-names-stretch, bibtex-autokey-additional-names) - (bibtex-autokey-name-change-strings) - (bibtex-autokey-name-case-convert, bibtex-autokey-name-length) - (bibtex-autokey-name-separator, bibtex-autokey-year-length) - (bibtex-autokey-use-crossref, bibtex-autokey-titlewords) - (bibtex-autokey-title-terminators) - (bibtex-autokey-titlewords-stretch) - (bibtex-autokey-titleword-ignore) - (bibtex-autokey-titleword-case-convert) - (bibtex-autokey-titleword-abbrevs) - (bibtex-autokey-titleword-abbrevs) - (bibtex-autokey-titleword-change-strings) - (bibtex-autokey-titleword-length) - (bibtex-autokey-titleword-separator) - (bibtex-autokey-name-year-separator) - (bibtex-autokey-year-title-separator) - (bibtex-autokey-before-presentation-function) - (bibtex-entry-type-history, bibtex-entry-maybe-empty-head): - Fix docstring. - (bibtex-strings, bibtex-reference-keys): - Use lazy-completion-table and make-variable-buffer-local. - (bibtex-sort-entry-class-alist): Use downcase, account for catch-all. - (bibtex-braced-string-syntax-table) - (bibtex-quoted-string-syntax-table): New variables. - (bibtex-parse-nested-braces): Remove. - (bibtex-parse-field-string): Use syntax table and forward-sexp. - (bibtex-parse-association): Simplify. - (bibtex-parse-field-name): Obey bibtex-autoadd-commas. - (bibtex-parse-field-text): Simplify. - (bibtex-search-forward-field, bibtex-search-backward-field): - argument BOUND can take value t. - (bibtex-start-of-field, bibtex-start-of-name-in-field) - (bibtex-end-of-name-in-field, bibtex-end-of-field) - (bibtex-start-of-text-in-field, bibtex-end-of-text-in-field) - (bibtex-start-of-text-in-string, bibtex-end-of-text-in-string) - (bibtex-end-of-string, bibtex-type-in-head): Use defsubst. - (bibtex-skip-to-valid-entry): Return buffer position of beginning - and ending of entry. Update for changes of bibtex-search-entry. - Simplify. - (bibtex-map-entries): FUN is called with three arguments. - (bibtex-search-entry): Return a cons pair with buffer positions of - beginning and end of entry. - (bibtex-enclosing-field): Simplify. - (bibtex-format-entry): Use booktitle to set a missing title. - (bibtex-autokey-get-names): Fiddle with regexps. - (bibtex-generate-autokey): Use identity. - (bibtex-parse-keys): Use simplified parsing algorithm if - bibtex-parse-keys-fast is non-nil. Simplify. Change order of - arguments. Return alist of keys. - (bibtex-parse-strings): Simplify. Return alist of strings. - (bibtex-complete-string-cleanup): Fix docstring. - (bibtex-read-key): New function. - (bibtex-mode): Fix docstring. Do not parse for keys and - strings when the mode is entered. Set fill-paragraph-function to - bibtex-fill-field. Setup font-lock-mark-block-function the way - font-lock intended. - (bibtex-entry): Use bibtex-read-key. Obey bibtex-autofill-types. - (bibtex-parse-entry, bibtex-autofill-entry): New functions. - (bibtex-print-help-message, bibtex-remove-OPT-or-ALT) - (bibtex-Preamble): Avoid hard coded constants. - (bibtex-make-field): Fix docstring. Simplify. - (bibtex-beginning-of-entry): Always return new position of point. - (bibtex-end-of-entry): Rearrange cond clauses. - (bibtex-count-entries, bibtex-validate, bibtex-reformat): - Update for changes of bibtex-map-entries. - (bibtex-ispell-abstract): Do not move point. - (bibtex-entry-index): Use downcase. Simplify. - (bibtex-lessp): Handle catch-all. - (bibtex-find-crossref): Turn into a command. - (bibtex-find-entry): Simplify. Use bibtex-read-key. Fix regexp. - (bibtex-clean-entry): Use bibtex-read-key. Handle string and - preamble entries. - (bibtex-fill-field-bounds): New function. - (bibtex-fill-field): New command. Bound to fill-paragraph-function. - (bibtex-fill-entry): Use bibtex-fill-field-bounds - (bibtex-String): Use bibtex-strings. Always obey - bibtex-sort-ignore-string-entries. - -2003-07-05 John Paul Wallington - - * cus-theme.el (customize-create-theme): - Call `customize-create-theme' in Reset widget's notify function. - - * ibuffer.el (ibuffer-backward-line, ibuffer-forward-line) - (ibuffer-mark-interactive): Use `or' instead of `unless'. - (define-ibuffer-column name): Add summarizer. - (define-ibuffer-column size): Likewise. - (define-ibuffer-column filename): Likewise. - (define-ibuffer-column process): Likewise. Change BODY's output too. - (define-ibuffer-column filename-and-process): Likewise, likewise. - (ibuffer): Remove local vars `already-in' and `need-update'. - - * ibuf-ext.el: Don't require `derived' at compile-time. - -2003-07-05 Kim F. Storm - - * info.el: Disable paragraph refilling. - (Info-refill-paragraphs): New defcustom. - (Info-fontify-node): Use it. - -2003-07-04 Stefan Monnier - - * emacs-lisp/cl-macs.el (cl-transform-lambda): Strip &cl-defs - thingies from constructors created by defstruct. - - * emacs-lisp/bytecomp.el (byte-compile-defvar): Check and set - the default value of the variable. - (byte-code-meter): Move declaration to top level. - - * pcvs-parse.el (cvs-parse-status): Ignore extra fields from CVSNT. - - * info.el (Info-following-node-name-re): New fun. - (Info-following-node-name): Remove. - (Info-insert-dir): Use the new fun. - (Info-extract-pointer): Don't save restriction; use new fun. - (Info-menu-entry-name-re): New const. - (Info-menu-entry-name-re): Use it along with new fun. - (Info-node-spec-re): Use new fun. - (Info-complete-menu-item, Info-fontify-node): Use new const. - (Info-goto-node, Info-follow-reference, Info-menu-update): - Use match-string. - (Info-follow-reference): Use assoc-string. - Use a list of strings for the completion table. - (Info-fontify-node): Use match-string, line-end-position. - Limit the search for `node:' to the first line. - - * newcomment.el (uncomment-region): Remove padding coming from - comment-start rather than just from comment-padding. - - * vc-cvs.el (vc-cvs-repository-hostname): New operation. - (vc-cvs-stay-local-p): Use vc-stay-local-p. - (vc-cvs-rename-file): Remove (use the default). - (vc-cvs-register): Register parent dir if needed. - (vc-cvs-could-register): Return non-nil if parent can be registered. - (vc-cvs-state, vc-cvs-dir-state, vc-cvs-print-log, vc-cvs-diff) - (vc-cvs-diff-tree, vc-cvs-make-version-backups-p): Use vc-stay-local-p. - - * vc-svn.el (vc-svn-use-edit): Make it into a const. - (vc-svn-update): Fix the arguments to `svn'. - (vc-svn-diff-tree): Just use `vc-svn-diff'. - (vc-svn-create-snapshot, vc-svn-retrieve-snapshot): - Simple implementations, assuming `name' is a URL. - - * progmodes/sh-script.el (sh-font-lock-paren): Add [ and ] to the - set of chars allowed unquoted in a case pattern. - - * font-core.el (font-lock-defaults-alist): Remove obsolete entries. - - * font-lock.el (font-lock-extra-types-widget) - (c-font-lock-extra-types, c++-font-lock-extra-types) - (objc-font-lock-extra-types, java-font-lock-extra-types) - (c-font-lock-keywords-1, c-font-lock-keywords-2, c-font-lock-keywords) - (c-font-lock-keywords-3, c-font-lock-syntactic-face-function) - (font-lock-match-c++-style-declaration-item-and-skip-to-next) - (font-lock-match-c++-structor-declaration) - (c++-font-lock-keywords-1, c++-font-lock-keywords-2) - (c++-font-lock-keywords-3, c++-font-lock-keywords) - (objc-font-lock-keywords-1, objc-font-lock-keywords-2) - (objc-font-lock-keywords-3, objc-font-lock-keywords) - (java-font-lock-keywords-1, java-font-lock-keywords-2) - (java-font-lock-keywords-3, java-font-lock-keywords) - (java-font-lock-syntactic-face-function): Remove obsolete code - and constants. It's all in cc-fonts.el now. - -2003-07-04 Glenn Morris - - * mail/sendmail.el (mail-specify-envelope-from) - (mail-envelope-from): Doc fix. - -2003-07-04 Martin Stjernholm - - * generic-x.el: Do away with the dependency on `c-emacs-features' - when populating `rul-generic-mode-syntax-table'; we already know - this isn't XEmacs. - 2003-07-03 Martin Stjernholm * progmodes/cc-menus.el (cc-imenu-init): Do not set `imenu-create-index-function' if the second argument is left out. This bug broke the imenu support in C, C++ and Java modes. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el, progmodes/cc-align.el (c-add-stmt-syntax, c-lineup-arglist) (c-lineup-arglist-close-under-paren): Fixes to cope with @@ -785,8 +17,6 @@ * progmodes/cc-fonts.el: Put (cc-require-when-compile 'cc-awk) to eliminate compile-time errors. -2003-07-03 Alan Mackenzie - * progmodes/cc-awk.el, progmodes/cc-engine.el: Add code to analyze AWK top-level forms properly (c-guess-basic-syntax CASE 5P), c-awk-backward-syntactic-ws. @@ -797,8 +27,6 @@ progmodes/cc-fix.el since it now contains compatibility stuff for later versions than (X)Emacs 19. -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el (c-paren-nontype-kwds): New language constant. (c-other-decl-kwds, c-postfix-decl-spec-kwds): Add compiler @@ -812,13 +40,9 @@ * progmodes/cc-engine.el (c-forward-keyword-clause): Support `c-paren-nontype-kwds'. -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el (c-primary-expr-regexp): Don't match a bare period as a float. -2003-07-03 Martin Stjernholm - * progmodes/cc-bytecomp.el (cc-bytecomp-setup-environment): Do not cover functions that have been bound. @@ -829,13 +53,9 @@ progmodes/cc-fonts.el, progmodes/cc-mode.el: Replaced external require's with `cc-external-require'. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-beginning-of-member-init-list) (c-guess-basic-syntax): Fixes in handling of bitfields. -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el (comment-end): Put a space in front of the comment ender in C, as it was before the move from cc-mode.el. @@ -844,8 +64,6 @@ * progmodes/cc-fonts.el: Do not load progmodes/cc-awk.elc or awk-font-lock-keywords unless there is an AWK Mode buffer. -2003-07-03 Alan Mackenzie - * progmodes/cc-awk.el: New file that implements AWK support, superseding the old separate derived mode in awk-mode.el. @@ -861,8 +79,6 @@ the modifier is followed by "{" in Pike before considering it to start a class-like block. -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el (c-initialize-cc-mode): Add some compatibility to make this function behave somewhat more as documented for derived modes. It's still not enough to make @@ -870,8 +86,6 @@ long time now so fixing it more might cause trouble elsewhere. :P -2003-07-03 Martin Stjernholm - * progmodes/cc-fonts.el (c-remove-font-lock-face): New macro to remove a font lock face properly (especially in XEmacs). @@ -886,14 +100,10 @@ to avoid the use of `font-lock-constant-face' for constants in emacsen that doesn't have it. -2003-07-03 Martin Stjernholm - * progmodes/cc-styles.el, progmodes/cc-vars.el, progmodes/cc-cmds.el: Fixes for the syntactic symbols for module and composition blocks. -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el (c-basic-common-init): Use `open-paren-in-column-0-is-defun-start' if it exists and works. @@ -901,13 +111,6 @@ to detect when `open-paren-in-column-0-is-defun-start' exists and actually works. -2003-07-03 Martin Stjernholm - - * progmodes/cc-align.el (c-lineup-argcont, c-lineup-gcc-asm-reg): - Don't quote nil in docstrings. - -2003-07-03 Martin Stjernholm - * progmodes/cc-vars.el, progmodes/cc-langs.el (c-primitive-type-kwds, c-font-lock-extra-types): "complex" and "imaginary" aren't keywords in C99, only macros that @@ -918,8 +121,6 @@ (c-constant-kwds): "false" and "true" are standard constant macros in C99. -2003-07-03 Martin Stjernholm - * progmodes/cc-menus.el, progmodes/cc-langs.el, progmodes/cc-engine.el, progmodes/cc-fonts.el, progmodes/cc-cmds.el: Fixed various regexps to use POSIX char @@ -929,19 +130,13 @@ New constants to make it easier to create regexps that use POSIX char classes in emacsen that support them. -2003-07-03 Martin Stjernholm - * progmodes/cc-vars.el (c-emacs-features): Detect in the regexp engine understands POSIX char classes. -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el (c-after-change): Add kludge for bug where this function sometimes gets positions outside the buffer range. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-beginning-of-member-init-list): Better handling of paretheses in unexpected places. @@ -949,24 +144,16 @@ regexp match order problem that could cause empty template args on the form "<>" to be missed. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-parse-state): Add kludge to avoid an infinite loop when Emacs' open-paren-in-column-zero rule kicks in and causes the sexp functions to misbehave. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-beginning-of-member-init-list): Fix bug when C++-like code is encountered in non-C++ mode. -2003-07-03 Martin Stjernholm - * progmodes/cc-defs.el (c-make-keywords-re): Add option to specify the language to look up `c-nonsymbol-key' in. -2003-07-03 Martin Stjernholm - * progmodes/cc-cmds.el, progmodes/cc-engine.el (c-auto-newline-analysis): New dynamically bound variable to turn off the topmost-intro-cont/statement-cont kludge for @@ -974,8 +161,6 @@ This fixes some cases where the setting for `brace-list-open' on `c-hanging-braces-alist' didn't have any effect. -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el (c-literal-start-regexp): Yet another language variable. @@ -995,8 +180,6 @@ * progmodes/cc-defs.el (c-safe-scan-lists): New wrapper macro to avoid the warnings with too many args to `scan-lists' in Emacs. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-syntactic-skip-backward): New function to make syntactic searches in the backward direction easier. @@ -1007,8 +190,6 @@ (c-safe-position): Remove the odd macro handling which was centered around the point instead of the passed position. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-in-knr-argdecl): Do not trip up on initialization expressions. @@ -1017,29 +198,21 @@ Tune the "macro block" heuristics to work better in nested arglist situations. -2003-07-03 Martin Stjernholm - * progmodes/cc-styles.el (c-set-offset): Don't find a default syntactic element through syntactic analysis if called outside a CC Mode buffer. -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el (c-basic-common-init): Install `c-fill-paragraph' on `fill-paragraph-function'. Although it's not the normal way to call it in a CC Mode buffer it makes a direct call to `fill-paragraph' work better. -2003-07-03 Martin Stjernholm - * progmodes/cc-vars.el, progmodes/cc-mode.el (c-require-final-newline): Make this variable an alist to specify a value for each language. The default value causes `require-final-newline' to be set to t only in languages where the standard requires a final newline. -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el, progmodes/cc-vars.el (c-require-final-newline): Add a variable to make the initialization of `require-final-newline' more configurable. @@ -1048,8 +221,6 @@ format string to "CC Mode Common Hook" since that causes confusion (although it is a more accurate name). -2003-07-03 Martin Stjernholm - * progmodes/cc-fonts.el (javadoc-font-lock-keywords) (autodoc-font-lock-keywords): Support for Javadoc and Pike Autodoc doc comments. @@ -1058,21 +229,15 @@ control the fontification of documentation comments on top of the normal mode font lock. -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el, progmodes/cc-fonts.el (c-primary-expr-regexp, c-font-lock-declarations): Avoid false recognition of parens as casts when they are followed by an operator that is both prefix and infix. -2003-07-03 Martin Stjernholm - * progmodes/cc-cmds.el (c-guess-fill-prefix): Tune the heuristics of when to use `c-block-comment-prefix' for an unclosed block comment. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el, progmodes/cc-langs.el (c-nonsymbol-sexp-kwds, c-forward-keyword-clause): Handle keywords like "extern" that can be followed by e.g. a string @@ -1081,8 +246,6 @@ * progmodes/cc-defs.el (c-make-keywords-re): Make a regexp correctly with one submatch when adorn is set and the list is empty. -2003-07-03 Martin Stjernholm - * progmodes/cc-fonts.el (c-font-lock-declarations): Fix a search that could go far past the relevant region and cause slowness. Do not limit the declaration detection to the @@ -1093,16 +256,12 @@ argument to handle declarations spanning the fontification limit better. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-in-literal, c-literal-limits) (c-literal-limits-fast, c-beginning-of-inheritance-list): Use the paren cache instead of the impaired ad hoc in `beginning-of-defun', so that these functions doesn't trip up on "{" in the first column inside strings or comments. -2003-07-03 Martin Stjernholm - * progmodes/cc-vars.el (c-hanging-braces-alist): Add `statement-cont' and made it auto newline free by default. @@ -1113,8 +272,6 @@ * progmodes/cc-vars.el (c-emacs-features): There's no need to have this constant autoloaded. -2003-07-03 Martin Stjernholm - * progmodes/cc-fonts.el (c-font-lock-declarations): Use `c-recognize-typeless-decls' to avoid fontifying some macro constructs as declarations in languages where a preceding type @@ -1123,21 +280,15 @@ * progmodes/cc-langs.el (c-recognize-typeless-decls): New language variable. -2003-07-03 Martin Stjernholm - * progmodes/cc-align.el (c-lineup-close-paren): Use `c-syntactic-eol' when checking if the open paren ends its line. * progmodes/cc-langs.el (c-syntactic-eol): Handle a line continuation backslash. -2003-07-03 Martin Stjernholm - * progmodes/cc-align.el (c-snug-do-while): Compatibility fix for changed structure in `c-syntactic-context'. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-parse-state): Filter angle bracket arglist parens in a better way than disabling the syntax table properties completely. @@ -1148,13 +299,9 @@ the face is used elsewhere (i.e. only for the definition of the symbol). -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el: Add autoload directives for the interface functions in cc-langs. -2003-07-03 Martin Stjernholm - * progmodes/cc-fonts.el (c-font-lock-declarations): Add a property to handle refontication in multiline declaration arglists better. @@ -1172,8 +319,6 @@ recursive template arglists. Fixes to cope with the new 'known type classification. -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el (c-basic-common-init): Add the new char property `c-type' to `text-property-default-nonsticky'. @@ -1186,8 +331,6 @@ caused existing function definitions to be overridden by phonies when the bytecomp environment is restored. -2003-07-03 Martin Stjernholm - * progmodes/cc-cmds.el (c-mask-paragraph): Masking is necessary in normal code too to avoid getting a fill prefix from a nearby comment. Change the name from `c-mask-comment' @@ -1199,8 +342,6 @@ older emacsen. The bug that would occur in that case would probably be rather nasty for the average user. -2003-07-03 Martin Stjernholm - * progmodes/cc-fonts.el (c-font-lock-declarations): Fine tuning of the decision tree that tells declarations from expressions to produce better results in some ambiguous cases. @@ -1222,13 +363,9 @@ Use `c-string-syntax' and `c-string-limit-regexp'. Replace some hardcoded comment start regexps with `c-comment-start-regexp'. -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el: Added an association for pike-mode on `intepreter-mode-alist'. -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el: Add the `auto-mode-alist' entries to the end instead of the start of the list, to avoid overriding user additions that are made before this file is loaded when @@ -1249,8 +386,6 @@ If someone is so inclined, restore the commented code, byte compile, and try to open a C++ file or something in font lock mode. -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el: Update the IDL support from the specs. This also adds the keywords for the variants PSDL and CIDL. (This is mostly done from reading the grammars only; @@ -1262,8 +397,6 @@ `parse-sexp-lookup-properties' is properly insulated from clobbering by the font-lock package at all relevant entry points. -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el (c-opt-after-id-concat-key): New language constant to make the recognition of identifier qualifiers more flexible. Recognize the identifier before @@ -1305,8 +438,6 @@ keyword as a symbol, to make fast reverse lookup of keywords to the `*-kwds' lists they come from. -2003-07-03 Martin Stjernholm - * progmodes/cc-defs.el (c-lang-defconst-eval-immediately): Add macro to be able to do direct evaluation in `c-lang-defconst' forms. @@ -1325,13 +456,9 @@ Objective-C instead of matching a protocol reference list as a type suffix. -2003-07-03 Martin Stjernholm - * progmodes/cc-align.el (c-gnu-impose-minimum): Fix a missing `save-excursion' that caused the point to jump around. -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el, progmodes/cc-menus.el (objc-mode) (cc-imenu-init): Fix initialization bug that has made the Objective-C support inoperational since 5.26. @@ -1340,16 +467,12 @@ (cc-imenu-objc-function): Don't add an empty "C" menu since imenu doesn't like that. -2003-07-03 Martin Stjernholm - * progmodes/cc-align.el (c-lineup-arglist) (c-lineup-arglist-close-under-paren, c-lineup-close-paren): Add DWIM to the functions that line up at or after the arglist open paren to avoid that if there are brace blocks inside, e.g. when a macro contains a code block. -2003-07-03 Martin Stjernholm - * progmodes/cc-vars.el (objc-font-lock-extra-types): Change default to treat identifiers starting with capital letters as types, according to Objective-C naming conventions. The types @@ -1369,16 +492,12 @@ directives are now considered part of the keywords to make things easier. -2003-07-03 Martin Stjernholm - * progmodes/cc-defs.el: (c-(up|down)-list-(forward|backward)): Make the position optional and added docstrings. (c-go-(up|down)-list-(forward|backward)): Add variants of the above that move point and return successfulness instead. -2003-07-03 Martin Stjernholm - * progmodes/cc-fonts.el (c-font-lock-<>-arglists): New function to fontify all occurrences of template arglists in C++. @@ -1386,27 +505,19 @@ New variable to be able to avoid false recognition of template arglists in some cases. -2003-07-03 Martin Stjernholm - * progmodes/cc-fonts.el, progmodes/cc-langs.el (c-decl-prefix-re, c-font-lock-declarations): Match template open brackets to get a declaration in the first template argument. (c-complex-decl-matchers): Fontify the second type in a "class X = Y" expression in C++. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-forward-<>-arglist): Break out the recursive part to a new function to improve efficiency when a nested template arglist search turns out to be futile. -2003-07-03 Martin Stjernholm - * progmodes/cc-menus.el (cc-imenu-java-generic-expression): Improve to avoid false matches on e.g. "else if (foo)". -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-forward-token-2) (c-backward-token-2): New functions that work like the -1 variants but that handle multicharacter operator tokens. @@ -1423,13 +534,9 @@ variables to parameterize some more of the hardcoded regexps in cc-engine. -2003-07-03 Martin Stjernholm - * progmodes/cc-align.el (c-lineup-cascaded-calls): Do not allow cascaded call lists containing both "->" and ".". -2003-07-03 Martin Stjernholm - * progmodes/cc-align.el, progmodes/cc-cmds.el, progmodes/cc-defs.el, progmodes/cc-engine.el, progmodes/cc-fonts.el, progmodes/cc-langs.el, @@ -1478,8 +585,6 @@ * progmodes/cc-bytecomp.el (cc-require-when-compile): New support macro for compile time `require's. -2003-07-03 Martin Stjernholm - * progmodes/cc-defs.el, progmodes/cc-mode.el (c-version): Move from cc-mode to cc-defs to make it accessible to the other components. @@ -1502,27 +607,19 @@ (cc-eval-when-compile): Move from cc-bytecomp to cc-defs to allow use at runtime. -2003-07-03 Martin Stjernholm - * progmodes/cc-bytecomp.el (cc-eval-when-compile): Workaround for a bug with nested `eval-when-compile' in XEmacs 21. -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el: Added autoloaded forms to install the appropriate file suffixes on `auto-mode-alist'. Necessary in XEmacs 21.5, and it can be useful elsewhere too. -2003-07-03 Martin Stjernholm - * progmodes/cc-align.el (c-lineup-cascaded-calls): Handle "." too, for use in Java. * progmodes/cc-engine.el (c-forward-sws, c-backward-sws): Do not handle cpp directives in languages that doesn't have any. -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el (c-operators): Add a high level description of all operators, along with their precedence and associativity. @@ -1530,8 +627,6 @@ where the position of the point and not the beginning of the line was used to calculate the indentation. -2003-07-03 Martin Stjernholm - * progmodes/cc-defs.el, progmodes/cc-engine.el (c-backward-single-comment, c-backward-comments): Add kludge for the bug in `forward-comment' in most (X)Emacs versions @@ -1539,8 +634,6 @@ there's no matching "/*". This has become more important now since it can cause incorrect caching by `c-backward-sws'. -2003-07-03 Martin Stjernholm - * progmodes/cc-cmds.el (c-hungry-backspace) (c-hungry-delete-forward): New functions to do hungry deletion regardless of hungry-delete mode. Contributed by Kevin Ryde. @@ -1551,8 +644,6 @@ improving responsiveness when there are lots of comments and cpp directives before point. -2003-07-03 Martin Stjernholm - * progmodes/cc-guess.el, progmodes/cc-langs.el, progmodes/cc-menus.el, progmodes/cc-mode.el, progmodes/cc-styles.el, progmodes/cc-vars.el, @@ -1566,8 +657,6 @@ (c-save-buffer-state): New macro that's put around any code that can manipulate text properties. -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el (c-basic-common-init): Setup `text-property-default-nonsticky' to avoid messing with the rear-nonsticky property on each character in Emacs 21. @@ -1586,8 +675,6 @@ (c-parse-sexp-lookup-properties): New macro that expands to either `parse-sexp-lookup-properties' or `lookup-syntax-properties'. -2003-07-03 Martin Stjernholm - * progmodes/cc-defs.el, progmodes/cc-engine.el, progmodes/cc-fonts.el: Put the faces into the buffer in the same way as the font-lock package does. This fixes a @@ -1616,8 +703,6 @@ interactive refontification a lot on the top level of macro heavy header files. -2003-07-03 Martin Stjernholm - * progmodes/cc-vars.el (c-emacs-features): Add check for syntax text properties. @@ -1686,13 +771,9 @@ Remove these helper macros since better and more correct tools are now available in progmodes/cc-langs.el. -2003-07-03 Martin Stjernholm - * progmodes/cc-align.el (c-lineup-string-cont): New lineup function to line up string literals that will be concatenated. -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el (c-populate-syntax-table): XEmacs classifies the hard space character as a symbol character but it's better to let it be in the punctuation class so that it's @@ -1701,8 +782,6 @@ identifiers in some languages (haven't checked), but using it would still be extremely confusing. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-beginning-of-statement-1): Fix a case when a labeled substatement caused incorrect association of the following continuation clause. @@ -1727,19 +806,13 @@ (c-state-cache-start): Fix buffer localness. -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el: Updates from the C99 standard (or actually from the latest web accessible draft of it). -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el: Update the keywords and operator tokens from the latest C++ and Java standards. Some other multichar token corrections. -2003-07-03 Martin Stjernholm - * progmodes/cc-cmds.el, progmodes/cc-engine.el, progmodes/cc-vars.el (c-syntactic-context) (c-syntactic-element): Do not bind any values to these @@ -1747,8 +820,6 @@ bound. This makes it much easier to debug cases when they've gotten global values somehow. -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el (c-regexp-opt): Fix to work around the non-greedy behavior that the regexp engine sometimes exposes. This bug only shows in (X)Emacs 19 where there's no regexp-opt package. @@ -1765,8 +836,6 @@ (c-lineup-gcc-asm-reg): Cope with that `c-most-enclosing-brace' might return nil. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-found-types, c-clear-found-types) (c-add-type, c-check-type, c-add-complex-type) (c-list-found-types, c-forward-type): Add a sort of symbol @@ -1780,16 +849,12 @@ * progmodes/cc-defs.el (c-mode-var): New defsubst to access mode prefixed variables uniformly. -2003-07-03 Martin Stjernholm - * progmodes/cc-align.el (c-lineup-arglist-close-under-paren): Work correctly with nested arglist-cont-nonempty symbols. (c-lineup-arglist-operators): New lineup function to line up infix operators under the open paren of the surrounding sexp. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-forward-syntactic-ws): Fix a bug that could cause an infinite loop if something that looks like a macro begins in the middle of a line. @@ -1798,8 +863,6 @@ to contain two conses in sequence when there's an unbalanced open paren in a macro. -2003-07-03 Martin Stjernholm - * progmodes/cc-defs.el (c-face-name-p): A defsubst to recognize the name of a face in a way that works also in XEmacs. @@ -1823,8 +886,6 @@ separate functions than choose between them at runtime using the argument. -2003-07-03 Martin Stjernholm - * progmodes/cc-align.el (c-gnu-impose-minimum): Fix bug due to the new placement of cpp-macro and comment-intro in the syntactic context, as pointed out by Kevin Ryde. Change the @@ -1836,21 +897,15 @@ `line-beginning-position' and `line-end-position' in emacsen that have them (currently Emacs 20 and later). -2003-07-03 Martin Stjernholm - * progmodes/cc-cmds.el (c-mask-comment): Fix a bug that sometimes caused code after a closed block comment to be taken into account when the fill prefix is calculated. -2003-07-03 Martin Stjernholm - * progmodes/cc-align.el (c-lineup-arglist, c-lineup-argcont) (c-lineup-math, c-lineup-cascaded-calls, c-lineup-gcc-asm-reg): Fixes to cope correctly with nested arglists for the lineups that can be used with arglist-cont-nonempty. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-add-stmt-syntax, c-guess-basic-syntax): Change the anchor position of arglist-cont-nonempty and arglist-close so that a relative @@ -1880,8 +935,6 @@ and string literals, and since those are nested innermost it won't matter. -2003-07-03 Martin Stjernholm - * progmodes/cc-align.el, progmodes/cc-defs.el, progmodes/cc-engine.el, progmodes/cc-vars.el (c-guess-basic-syntax, c-calc-offset) @@ -1901,19 +954,13 @@ line-up function distributed with CC Mode needed to be changed, for instance. -2003-07-03 Martin Stjernholm - * progmodes/cc-styles.el (c-set-style, c-set-style-1): Add another state for the `dont-override' flag where it only keeps globally set variables. -2003-07-03 Martin Stjernholm - * progmodes/cc-mode.el (c-postprocess-file-styles): Do nothing except in CC Mode modes. -2003-07-03 Martin Stjernholm - * progmodes/cc-vars.el, progmodes/cc-fonts.el, progmodes/cc-langs.el, progmodes/cc-mode.el: Add font lock support. @@ -1936,13 +983,9 @@ initialization. It's intended for use by other modes that embed CC Mode. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-add-stmt-syntax): Fix some cases of wrong anchoring, e.g. for else-if compounds. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-guess-basic-syntax): Fix anchor position for defun-open in K&R style functions. @@ -1953,8 +996,6 @@ (c-beginning-of-decl-1): Fix when the declaration is first in a macro. -2003-07-03 Martin Stjernholm - * progmodes/cc-engine.el (c-beginning-of-decl-1): Better way to handle protection labels, one which doesn't get confused by inherit colons. @@ -1962,21 +1003,15 @@ (c-end-of-decl-1): Don't treat functions that have "class" or "struct" in the return type as classes or structs. -2003-07-03 Martin Stjernholm - * progmodes/cc-langs.el (c-make-keywords-re): Fix the keyword adornment so that it works when a keyword ends with "_". -2003-07-03 Martin Stjernholm - * progmodes/cc-cmds.el (c-mask-comment): More fixes when used from `c-do-auto-fill' and point is at or near the limit of the comment. Fix bug when the prefix from `c-guess-fill-prefix' is longer than the text on the first line of the comment when it's masked. -2003-07-03 Martin Stjernholm - * progmodes/cc-cmds.el (c-mask-comment): Fix bug where point was moved to the following line when it was at the first line of a block comment where comment-start-skip matched to eol. @@ -2404,7 +1439,7 @@ looks for, and ignores, a literal copy of the value of shell-dirstack-query). -2003-06-06 Lute Kamstra +2003-06-06 Lute Kamstra * info.el (Info-complete-menu-item): Revert change of 2003-06-03. @@ -2465,7 +1500,7 @@ * info.el (Info-mode): Mention `c' and remove duplicate mention of `q' in documentation string. -2003-06-05 Lute Kamstra +2003-06-05 Lute Kamstra * shell.el (shell-mode): Put `shell-filter-ctrl-a-ctrl-b' on `comint-output-filter-functions' when bash is used as the inferior @@ -2571,7 +1606,7 @@ Check the return value of `string-match'. (Info-speedbar-fetch-file-nodes): Factor out common code. -2003-06-03 Lute Kamstra +2003-06-03 Lute Kamstra * cus-edit.el (custom-get-fresh-buffer): Test for nonexistence buffer. @@ -2731,7 +1766,7 @@ * sort.el (sort-subr): Add `predicate' arg. Remove `sortcar' code. -2003-06-02 Lute Kamstra +2003-06-02 Lute Kamstra * emacs-lisp/lisp-mnt.el (lm-synopsis): Use relative filenames correctly. Show the synopsis to the user when appropriate. @@ -3280,7 +2315,7 @@ * textmodes/paragraphs.el (repunctuate-sentences): New function. -2003-05-23 Lute Kamstra +2003-05-23 Lute Kamstra * emacs-lisp/lisp-mnt.el: Make the description of the library more accurate. @@ -3658,7 +2693,7 @@ (imenu-update-menubar): Use the new arg to keep the old behavior. (imenu--mouse-menu): Don't use the arg, to recover the lost behavior. -2003-05-16 Lute Kamstra +2003-05-16 Lute Kamstra * hl-line.el (hl-line-highlight, global-hl-line-highlight): Use `line-beginning-position' to determine the beginning of the next @@ -3675,7 +2710,7 @@ * emacs-lisp/autoload.el (make-autoload): Add arglist for define-derived-mode. -2003-05-15 Lute Kamstra +2003-05-15 Lute Kamstra * hl-line.el: Rewrite the local minor mode so that it can be sticky as well and made sticky the default. Reimplement the @@ -4131,7 +3166,7 @@ * help-fns.el (help-add-fundoc-usage): Use t for "no arglist". * emacs-lisp/advice.el (ad-make-advised-docstring): Adjust usage. -2003-05-06 Lute Kamstra +2003-05-06 Lute Kamstra * hl-line.el: Removed an erroneous comment. (hl-line-mode): Use buffer local hooks. @@ -5429,7 +4464,7 @@ * term/mac-win.el (iconify-or-deiconify-frame): Define for compatibility with packages that use it. -2003-03-28 Lute Kamstra +2003-03-28 Lute Kamstra * emacs-lisp/checkdoc.el (checkdoc-display-status-buffer): Fix docstring. @@ -5809,7 +4844,7 @@ * info.el (Info-following-node-name): Skip trailing period. (Info-extract-menu-node-name): Allow period in node name. -2003-03-07 Kevin Rodgers +2003-03-07 Kevin Rodgers (tiny change) * dired-x.el (dired-guess-shell-case-fold-search): New user option. (dired-guess-default): Use it. @@ -5820,7 +4855,7 @@ (dcl-font-lock-defaults): New var. (dcl-mode): Make and init local var `font-lock-defaults'. -2003-03-06 Kevin Rodgers +2003-03-06 Kevin Rodgers (tiny change) * ffap.el (dired-at-point): Check whether the user can create a directory before asking about creating it. @@ -24504,3 +23539,5 @@ See ChangeLog.9 for earlier changes. Copyright (C) 2001, 2002 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 5fcf8004-6f58-452a-b9d6-6950323a19c1 diff --git a/lisp/ChangeLog.2 b/lisp/ChangeLog.2 index ef5c6b1a07..fd97c5a07a 100644 --- a/lisp/ChangeLog.2 +++ b/lisp/ChangeLog.2 @@ -3997,3 +3997,5 @@ See ChangeLog.1 for earlier changes. Copyright (C) 1986, 1987, 1988 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: c315ba16-14ba-4b07-86e6-013a18f11be7 diff --git a/lisp/ChangeLog.3 b/lisp/ChangeLog.3 index 16cab8d127..90604fc8e6 100644 --- a/lisp/ChangeLog.3 +++ b/lisp/ChangeLog.3 @@ -12618,3 +12618,5 @@ See ChangeLog.2 for earlier changes. Copyright (C) 1989, 1993 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: f07a3446-5672-464a-8fdc-2ca92e8e7b2a diff --git a/lisp/ChangeLog.4 b/lisp/ChangeLog.4 index fda04b07fa..2e852552f0 100644 --- a/lisp/ChangeLog.4 +++ b/lisp/ChangeLog.4 @@ -8942,3 +8942,5 @@ See ChangeLog.3 for earlier changes. Copyright (C) 1993, 1994 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 91035822-35c7-44a9-8417-2454b88c3db2 diff --git a/lisp/ChangeLog.5 b/lisp/ChangeLog.5 index 5dfac95e9c..5d3125b3ff 100644 --- a/lisp/ChangeLog.5 +++ b/lisp/ChangeLog.5 @@ -9264,3 +9264,5 @@ See ChangeLog.4 for earlier changes. Copyright (C) 1994, 1995 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 1a8fbb45-25d0-48e2-a926-29ca4e3d343a diff --git a/lisp/ChangeLog.6 b/lisp/ChangeLog.6 index 49ca67fe5d..356715b8d0 100644 --- a/lisp/ChangeLog.6 +++ b/lisp/ChangeLog.6 @@ -8024,3 +8024,5 @@ See ChangeLog.5 for earlier changes. Copyright (C) 1995, 1996 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: f90e8ffe-6bd0-4423-97d9-637ac4382520 diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7 index be3b42d8ed..85dfaeaf35 100644 --- a/lisp/ChangeLog.7 +++ b/lisp/ChangeLog.7 @@ -23143,3 +23143,5 @@ See ChangeLog.6 for earlier changes. Copyright (C) 1997, 1998 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 0995d517-13da-45ab-9c2d-7911aa25512b diff --git a/lisp/ChangeLog.8 b/lisp/ChangeLog.8 index 60bb4e6813..b59c0bd27e 100644 --- a/lisp/ChangeLog.8 +++ b/lisp/ChangeLog.8 @@ -10015,3 +10015,5 @@ See ChangeLog.7 for earlier changes. Copyright (C) 1999 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: efdc1531-ed46-4e14-be59-bee4b23088f3 diff --git a/lisp/ChangeLog.9 b/lisp/ChangeLog.9 index d35bab0532..a0688eefe3 100644 --- a/lisp/ChangeLog.9 +++ b/lisp/ChangeLog.9 @@ -20698,3 +20698,5 @@ See ChangeLog.8 for earlier changes. Copyright (C) 2000, 2001 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: a7cd2b86-43eb-409b-883f-3700fa85334f diff --git a/lisp/Makefile.in b/lisp/Makefile.in index d1f5b43b76..e1db260776 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -1,5 +1,5 @@ # Maintenance productions for the Lisp directory -# Copyright (C) 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 2000, 01, 03, 2004 Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -61,6 +61,7 @@ DONTCOMPILE = \ $(lisp)/language/devanagari.el \ $(lisp)/language/malayalam.el \ $(lisp)/language/tamil.el \ + $(lisp)/language/kannada.el \ $(lisp)/language/english.el \ $(lisp)/language/greek.el \ $(lisp)/language/hebrew.el \ @@ -78,6 +79,7 @@ DONTCOMPILE = \ $(lisp)/language/chinese.el \ $(lisp)/language/indian.el \ $(lisp)/loaddefs.el \ + $(lisp)/ldefs-boot.el \ $(lisp)/loadup.el \ $(lisp)/mail/blessmail.el \ $(lisp)/patcomp.el \ @@ -106,6 +108,13 @@ DONTCOMPILE = \ $(lisp)/term/wyse50.el \ $(lisp)/version.el +# Elisp files auto-generated. +AUTOGENEL = loaddefs.el \ + cus-load.el \ + finder-inf.el \ + subdirs.el \ + eshell/esh-groups.el + # Files to compile before others during a bootstrap. This is done to # speed up the bootstrap process. The CC files are compiled first # because CC mode tweaks the compilation process, and requiring @@ -125,17 +134,17 @@ emacs = EMACSLOADPATH=$(lisp) LC_ALL=C $(EMACS) $(EMACSOPT) # Common command to find subdirectories -setwins=subdirs=`find $$wd -type d -print`; \ +setwins=subdirs=`(cd $$wd; find . -type d -print)`; \ for file in $$subdirs; do \ - case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \ - *) wins="$$wins $$file" ;; \ + case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* ) ;; \ + *) wins="$$wins $$wd/$$file" ;; \ esac; \ done -setwins_almost=subdirs=`find $$wd -type d -print`; \ +setwins_almost=subdirs=`(cd $$wd; find . -type d -print)`; \ for file in $$subdirs; do \ - case $$file in */Old | */RCS | */CVS | */CVS/* | */=* | */obsolete | */term ) ;; \ - *) wins="$$wins $$file" ;; \ + case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */obsolete | */term ) ;; \ + *) wins="$$wins $$wd/$$file" ;; \ esac; \ done @@ -184,11 +193,11 @@ update-authors: $(emacs) -f batch-update-authors $(srcdir)/AUTHORS $(srcdir) TAGS: $(lisptagsfiles1) $(lisptagsfiles2) - els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs.el,,"`; \ + els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs[^ ]*,," -e "s,$(lisp)/ldefs-boot[^ ]*,,"`; \ ${ETAGS} $$els TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2) - els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs.el,,"`; \ + els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs[^ ]*,," -e "s,$(lisp)/ldefs-boot[^ ]*,,"`; \ ${ETAGS} -o TAGS-LISP $$els .SUFFIXES: .elc .el @@ -269,18 +278,39 @@ compile-after-backup: backup-compiled-files compile-always # Note that this doesn't create .elc files. It only recompiles if an # .elc is present. -recompile: doit +recompile: doit $(lisp)/progmodes/cc-mode.elc LC_ALL=C $(EMACS) $(EMACSOPT) -f batch-byte-recompile-directory $(lisp) -# Prepare a bootstrap in the lisp subdirectory. Build loaddefs.el, -# because it's not sure it's up-to-date, and if it's not, that might -# lead to errors during the bootstrap because something fails to -# autoload as expected. Remove compiled Lisp files so that -# bootstrap-emacs will be built from sources only. +# CC Mode uses a compile time macro system which causes a compile time +# dependency in cc-mode.elc on the macros in cc-langs.el and the +# version string in cc-defs.el. +$(lisp)/progmodes/cc-mode.elc: \ + $(lisp)/progmodes/cc-mode.el \ + $(lisp)/progmodes/cc-langs.el \ + $(lisp)/progmodes/cc-defs.el + $(EMACS) $(EMACSOPT) -f batch-byte-compile $(lisp)/progmodes/cc-mode.el -bootstrap-clean: - if test -x $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi - cd $(lisp); rm -f *.elc */*.elc +# Prepare a bootstrap in the lisp subdirectory. +# +# Build loaddefs.el, because it's not sure it's up-to-date, and if it's not, +# that might lead to errors during the bootstrap because something fails to +# autoload as expected. However, if there is no emacs binary, then we can't +# build autoloads yet, so just make sure there's some loaddefs.el file, as +# it's necessary for generating the binary (because loaddefs.el is an +# automatically generated file, we don't want to store it in the source +# repository). + +bootstrap-prepare: + if test -x $(EMACS); then \ + $(MAKE) $(MFLAGS) autoloads; \ + else \ + if test ! -r $(lisp)/loaddefs.el; then \ + cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el; \ + fi \ + fi + +maintainer-clean: + cd $(lisp); rm -f *.elc */*.elc $(AUTOGENEL) # Generate/update files for the bootstrap process. @@ -294,4 +324,5 @@ bootstrap-after: finder-data custom-deps distclean: -rm -f ./Makefile +# arch-tag: d4ea703a-b91c-405c-a171-8dde30b163a7 # Makefile ends here. diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 929724dd99..1e3eea0e35 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -201,10 +201,13 @@ Does not display any message." ;(interactive "fRead abbrev file: ") (read-abbrev-file file t)) -(defun write-abbrev-file (file) - "Write all abbrev definitions to a file of Lisp code. +(defun write-abbrev-file (&optional file) + "Write all user-level abbrev definitions to a file of Lisp code. +This does not include system abbrevs; it includes only the abbrev tables +listed in listed in `abbrev-table-name-list'. The file written can be loaded in another session to define the same abbrevs. -The argument FILE is the file name to write." +The argument FILE is the file name to write. If omitted or nil, the file +specified in `abbrev-file-name' is used." (interactive (list (read-file-name "Write abbrev file: " @@ -307,7 +310,11 @@ Expands the abbreviation after defining it." "Mark current point as the beginning of an abbrev. Abbrev to be expanded starts here rather than at beginning of word. This way, you can expand an abbrev with a prefix: insert the prefix, -use this command, then insert the abbrev." +use this command, then insert the abbrev. This command inserts a +temporary hyphen after the prefix \(until the intended abbrev +expansion occurs). +If the prefix is itself an abbrev, this command expands it, unless +ARG is non-nil. Interactively, ARG is the prefix argument." (interactive "P") (or arg (expand-abbrev)) (setq abbrev-start-location (point-marker) @@ -335,4 +342,5 @@ If called from a Lisp program, arguments are START END &optional NOQUERY." (if (or noquery (y-or-n-p (format "Expand `%s'? " string))) (expand-abbrev))))))) +;;; arch-tag: dbd6f3ae-dfe3-40ba-b00f-f9e3ff960df5 ;;; abbrev.el ends here diff --git a/lisp/abbrevlist.el b/lisp/abbrevlist.el index 8ffa7cb529..9c8b0e0d58 100644 --- a/lisp/abbrevlist.el +++ b/lisp/abbrevlist.el @@ -39,7 +39,7 @@ abbrev-table) (setq abbrev-list (sort abbrev-list 'string-lessp)) (while abbrev-list - (if (> (+ first-column 40) (frame-width)) + (if (> (+ first-column 40) (window-width)) (progn (insert "\n") (setq first-column 0))) @@ -52,4 +52,5 @@ (provide 'abbrevlist) +;;; arch-tag: 178f0638-6597-4c16-bcee-576c3d8e9217 ;;; abbrevlist.el ends here diff --git a/lisp/add-log.el b/lisp/add-log.el index 32eb5e8e40..609dfde5f6 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -1,6 +1,6 @@ ;;; add-log.el --- change log maintenance commands for Emacs -;; Copyright (C) 1985, 86, 88, 93, 94, 97, 98, 2000, 2003 +;; Copyright (C) 1985, 86, 88, 93, 94, 97, 98, 2000, 03, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -489,8 +489,7 @@ non-nil, otherwise in local time." (funcall add-log-buffer-file-name-function) buffer-file-name)) (buffer-file (if buf-file-name (expand-file-name buf-file-name))) - (file-name (expand-file-name - (or file-name (find-change-log file-name buffer-file)))) + (file-name (expand-file-name (find-change-log file-name buffer-file))) ;; Set ITEM to the file name to use in the new item. (item (add-log-file-name buffer-file file-name)) bound) @@ -1044,4 +1043,5 @@ old-style time formats for entries are supported." (provide 'add-log) +;;; arch-tag: 81eee6fc-088f-4372-a37f-80ad9620e762 ;;; add-log.el ends here diff --git a/lisp/align.el b/lisp/align.el index 4f63895048..bae09d749d 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -1588,4 +1588,5 @@ aligner would have dealt with are." (run-hooks 'align-load-hook) +;;; arch-tag: ef79cccf-1db8-4888-a8a1-d7ce2d1532f7 ;;; align.el ends here diff --git a/lisp/allout.el b/lisp/allout.el index 34c8defaf4..3fa04449e1 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -5,7 +5,6 @@ ;; Author: Ken Manheimer ;; Maintainer: Ken Manheimer ;; Created: Dec 1991 - first release to usenet -;; Version: $Id: allout.el,v 1.42 2003/02/24 17:29:49 lektu Exp $|| ;; Keywords: outlines mode wp languages ;; This file is part of GNU Emacs. @@ -508,7 +507,7 @@ behavior." ;;;_ : Version ;;;_ = allout-version (defvar allout-version - (let ((rcs-rev "$Revision: 1.42 $")) + (let ((rcs-rev "$Revision: 1.47 $")) (condition-case err (save-match-data (string-match "Revision: \\([0-9]+\\.[0-9]+\\)" rcs-rev) @@ -1049,7 +1048,7 @@ and many other features. Below is a description of the bindings, and then explanation of special `allout-mode' features and terminology. See also the outline menubar additions for quick reference to many of the features, and see -the docstring of the variable `allout-init' for instructions on +the docstring of the function `allout-init' for instructions on priming your emacs session for automatic activation of `allout-mode'. @@ -1079,7 +1078,7 @@ C-c < allout-shift-out ... less deep. C-c allout-rebullet-topic Reconcile bullets of topic and its offspring - distinctive bullets are not changed, others alternated according to nesting depth. -C-c b allout-rebullet-current-heading Prompt for alternate bullet for +C-c * allout-rebullet-current-heading Prompt for alternate bullet for current topic. C-c # allout-number-siblings Number bullets of topic and siblings - the offspring are not affected. With repeat @@ -3015,9 +3014,9 @@ Third arg NUMBER-CONTROL can force the prefix to or away from numbered form. It has effect only if `allout-numbered-bullet' is non-nil and soliciting was not explicitly invoked (via first arg). Its effect, numbering or denumbering, then depends on the setting -of the forth arg, INDEX. +of the fourth arg, INDEX. -If NUMBER-CONTROL is non-nil and forth arg INDEX is nil, then the +If NUMBER-CONTROL is non-nil and fourth arg INDEX is nil, then the prefix of the topic is forced to be non-numbered. Null index and non-nil NUMBER-CONTROL forces denumbering. Non-nil INDEX (and non-nil NUMBER-CONTROL) forces a numbered-prefix form. If non-nil @@ -4770,4 +4769,5 @@ so pass them along when appropriate." ;;;allout-layout: (0 : -1 -1 0) ;;;End: +;;; arch-tag: cf38fbc3-c044-450f-8bff-afed8ba5681c ;;; allout.el ends here diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index af491b6793..30350d69a9 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el @@ -648,4 +648,5 @@ ESCAPE-SEQ is a SGR control sequences such as \\033[34m. The parameter (provide 'ansi-color) +;;; arch-tag: 00726118-9432-44fd-b72d-d2af7591c99c ;;; ansi-color.el ends here diff --git a/lisp/apropos.el b/lisp/apropos.el index 677c43b756..e5904e73b7 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -1,6 +1,6 @@ ;;; apropos.el --- apropos commands for users and programmers -;; Copyright (C) 1989, 1994, 1995, 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1989,94,1995,2001,02,03,2004 Free Software Foundation, Inc. ;; Author: Joe Wells ;; Rewritten: Daniel Pfeiffer @@ -58,6 +58,7 @@ ;;; Code: (require 'button) +(eval-when-compile (require 'cl)) (defgroup apropos nil "Apropos commands for users and programmers" @@ -348,7 +349,6 @@ This requires that at least 2 keywords (unless only one was given)." "Return t if DOC is really matched by the current keywords." (apropos-true-hit doc apropos-all-words)) -;;;###autoload (define-derived-mode apropos-mode fundamental-mode "Apropos" "Major mode for following hyperlinks in output of apropos commands. @@ -452,37 +452,42 @@ show unbound symbols and key bindings, which is a little more time-consuming. Returns list of symbols and documentation found." (interactive "sApropos symbol (regexp or words): \nP") (setq apropos-regexp (apropos-rewrite-regexp apropos-regexp)) - (setq apropos-accumulator - (apropos-internal apropos-regexp + (apropos-symbols-internal + (apropos-internal apropos-regexp (and (not do-all) (not apropos-do-all) (lambda (symbol) (or (fboundp symbol) (boundp symbol) (facep symbol) - (symbol-plist symbol)))))) - (let ((tem apropos-accumulator)) - (while tem - (if (get (car tem) 'apropos-inhibit) - (setq apropos-accumulator (delq (car tem) apropos-accumulator))) - (setq tem (cdr tem)))) - (let ((p apropos-accumulator) - symbol doc properties) - (while p - (setcar p (list - (setq symbol (car p)) - (apropos-score-symbol symbol) - (when (fboundp symbol) - (if (setq doc (condition-case nil - (documentation symbol t) - (void-function - "(alias for undefined function)") - (error - "(error retrieving function documentation)"))) - (substring doc 0 (string-match "\n" doc)) - "(not documented)")) - (when (boundp symbol) - (apropos-documentation-property + (symbol-plist symbol))))) + (or do-all apropos-do-all))) + +(defun apropos-symbols-internal (symbols keys &optional text) + ;; Filter out entries that are marked as apropos-inhibit. + (let ((all nil)) + (dolist (symbol symbols) + (unless (get symbol 'apropos-inhibit) + (push symbol all))) + (setq symbols all)) + (let ((apropos-accumulator + (mapcar + (lambda (symbol) + (let (doc properties) + (list + symbol + (apropos-score-symbol symbol) + (when (fboundp symbol) + (if (setq doc (condition-case nil + (documentation symbol t) + (void-function + "(alias for undefined function)") + (error + "(can't retrieve function documentation)"))) + (substring doc 0 (string-match "\n" doc)) + "(not documented)")) + (when (boundp symbol) + (apropos-documentation-property symbol 'variable-documentation t)) (when (setq properties (symbol-plist symbol)) (setq doc (list (car properties))) @@ -492,16 +497,14 @@ time-consuming. Returns list of symbols and documentation found." (when (get symbol 'widget-type) (apropos-documentation-property symbol 'widget-documentation t)) - (when (facep symbol) - (apropos-documentation-property - symbol 'face-documentation t)) - (when (get symbol 'custom-group) + (when (facep symbol) + (apropos-documentation-property + symbol 'face-documentation t)) + (when (get symbol 'custom-group) (apropos-documentation-property - symbol 'group-documentation t)))) - (setq p (cdr p)))) - (apropos-print - (or do-all apropos-do-all) - nil)) + symbol 'group-documentation t))))) + symbols))) + (apropos-print keys nil text))) ;;;###autoload @@ -755,7 +758,7 @@ Will return nil instead." function)) -(defun apropos-print (do-keys spacing) +(defun apropos-print (do-keys spacing &optional text) "Output result of apropos searching into buffer `*Apropos*'. The value of `apropos-accumulator' is the list of items to output. Each element should have the format @@ -764,8 +767,8 @@ The return value is the list that was in `apropos-accumulator', sorted alphabetically by symbol name; but this function also sets `apropos-accumulator' to nil before returning. -If SPACING is non-nil, it should be a string; -separate items with that string." +If SPACING is non-nil, it should be a string; separate items with that string. +If non-nil TEXT is a string that will be printed as a heading." (if (null apropos-accumulator) (message "No apropos matches for `%s'" apropos-orig-regexp) (setq apropos-accumulator @@ -794,6 +797,7 @@ separate items with that string." " or variable,\n" (substitute-command-keys "and type \\[apropos-follow] to get full documentation.\n\n")) + (if text (insert text "\n\n")) (while (consp p) (when (and spacing (not (bobp))) (princ spacing)) @@ -907,13 +911,15 @@ separate items with that string." (defun apropos-describe-plist (symbol) "Display a pretty listing of SYMBOL's plist." - (with-output-to-temp-buffer "*Help*" + (help-setup-xref (list 'apropos-describe-plist symbol) (interactive-p)) + (with-output-to-temp-buffer (help-buffer) (set-buffer standard-output) (princ "Symbol ") (prin1 symbol) (princ "'s plist is\n (") (if apropos-symbol-face - (put-text-property 8 (- (point) 14) 'face apropos-symbol-face)) + (put-text-property (+ (point-min) 7) (- (point) 14) + 'face apropos-symbol-face)) (insert (apropos-format-plist symbol "\n ")) (princ ")") (print-help-return-message))) @@ -921,4 +927,5 @@ separate items with that string." (provide 'apropos) +;;; arch-tag: d56fa2ac-e56b-4ce3-84ff-852f9c0dc66e ;;; apropos.el ends here diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 9730a72ff7..ba00d915d7 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1995, 1997, 1998, 2003 Free Software Foundation, Inc. -;; Author: Morten Welinder +;; Author: Morten Welinder ;; Keywords: archives msdog editing major-mode ;; Favourite-brand-of-beer: None, I hate beer. @@ -1817,4 +1817,5 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (provide 'arc-mode) +;;; arch-tag: e5966a01-35ec-4f27-8095-a043a79b457b ;;; arc-mode.el ends here diff --git a/lisp/array.el b/lisp/array.el index 4046296895..3aa5d4bd31 100644 --- a/lisp/array.el +++ b/lisp/array.el @@ -964,4 +964,5 @@ Entering array mode calls the function `array-mode-hook'." (provide 'array) +;;; arch-tag: 0086605d-79fe-4a1a-992a-456417261f80 ;;; array.el ends here diff --git a/lisp/autoarg.el b/lisp/autoarg.el index 8763c91777..78e71ef218 100644 --- a/lisp/autoarg.el +++ b/lisp/autoarg.el @@ -145,4 +145,5 @@ which invoked this function, excluding the Autoarg keymap." (provide 'autoarg) +;;; arch-tag: 2ba2ab4f-d60e-402a-ae4d-37e29af723c2 ;;; autoarg.el ends here diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index b13fe3ce50..489593aa92 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -331,4 +331,5 @@ insert a template for the file depending on the mode of the buffer." (provide 'autoinsert) +;;; arch-tag: 5b6630ac-c735-43cf-b097-b78c622af909 ;;; autoinsert.el ends here diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 9ccb8b8964..58bb6d2970 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -44,6 +44,17 @@ ;; seconds. The check is aborted whenever the user actually uses ;; Emacs. You should never even notice that this package is active ;; (except that your buffers will be reverted, of course). +;; +;; After reverting a file buffer, Auto Revert Mode normally puts point +;; at the same position that a regular manual revert would. However, +;; there is one exception to this rule. If point is at the end of the +;; buffer before reverting, it stays at the end. Similarly if point +;; is displayed at the end of a file buffer in any window, it will stay +;; at the end of the buffer in that window, even if the window is not +;; selected. This way, you can use Auto Revert Mode to `tail' a file. +;; Just put point at the end of the buffer and it will stay there. +;; These rules apply to file buffers. For non-file buffers, the +;; behavior may be mode dependent. ;; Usage: ;; @@ -70,6 +81,7 @@ ;; Dependencies: (require 'timer) + (eval-when-compile (require 'cl)) @@ -96,10 +108,27 @@ Global Auto-Revert Mode applies to all buffers." Never set this variable directly, use the command `auto-revert-mode' instead.") (put 'auto-revert-mode 'permanent-local t) +(defvar auto-revert-timer nil + "Timer used by Auto-Revert Mode.") + (defcustom auto-revert-interval 5 - "Time, in seconds, between Auto-Revert Mode file checks." + "Time, in seconds, between Auto-Revert Mode file checks. +The value may be an integer or floating point number. + +If a timer is already active, there are two ways to make sure +that the new value will take effect immediately. You can set +this variable through Custom or you can call the command +`auto-revert-set-timer' after setting the variable. Otherwise, +the new value will take effect the first time Auto Revert Mode +calls `auto-revert-set-timer' for internal reasons or in your +next editing session." :group 'auto-revert - :type 'integer) + :type 'number + :set (lambda (variable value) + (set-default variable value) + (and (boundp 'auto-revert-timer) + auto-revert-timer + (auto-revert-set-timer)))) (defcustom auto-revert-stop-on-user-input t "When non-nil Auto-Revert Mode stops checking files on user input." @@ -108,9 +137,7 @@ Never set this variable directly, use the command `auto-revert-mode' instead.") (defcustom auto-revert-verbose t "When nil, Auto-Revert Mode will not generate any messages. - -Currently, messages are generated when the mode is activated or -deactivated, and whenever a file is reverted." +When non-nil, a message is generated whenever a file is reverted." :group 'auto-revert :type 'boolean) @@ -146,9 +173,15 @@ would only waste precious space." "When nil only file buffers are reverted by Global Auto-Revert Mode. When non-nil, both file buffers and buffers with a custom -`revert-buffer-function' are reverted by Global Auto-Revert Mode. - -Use this option with care since it could lead to excessive reverts." +`revert-buffer-function' and a `buffer-stale-function' are +reverted by Global Auto-Revert Mode. + +Use this option with care since it could lead to excessive reverts. +Note also that for some non-file buffers the check whether the +buffer needs updating may be imperfect, due to efficiency +considerations, and may not take all information listed in the +buffer into account. Hence, a non-nil value for this option does +not necessarily make manual updates useless for non-file buffers." :group 'auto-revert :type 'boolean) @@ -163,13 +196,33 @@ Use this option with care since it could lead to excessive reverts." :group 'auto-revert :type 'hook) +(defcustom auto-revert-check-vc-info nil + "If non-nil Auto Revert Mode reliably updates version control info. +Auto Revert Mode updates version control info whenever the buffer +needs reverting, regardless of the value of this variable. +However, the version control state can change without changes to +the work file. If the change is made from the current Emacs +session, all info is updated. But if, for instance, a new +version is checked in from outside the current Emacs session, the +version control number in the mode line, as well as other version +control related information, may not be properly updated. If you +are worried about this, set this variable to a non-nil value. + +This currently works by automatically updating the version +control info every `auto-revert-interval' seconds. Nevertheless, +it should not cause excessive CPU usage on a reasonably fast +machine, if it does not apply to too many version controlled +buffers. CPU usage depends on the version control system" + :group 'auto-revert + :type 'boolean + :version "21.4") + (defvar global-auto-revert-ignore-buffer nil "*When non-nil, Global Auto-Revert Mode will not revert this buffer. This variable becomes buffer local when set in any fashion.") (make-variable-buffer-local 'global-auto-revert-ignore-buffer) - ;; Internal variables: (defvar auto-revert-buffer-list '() @@ -181,9 +234,6 @@ buffers to this list. The timer function `auto-revert-buffers' is responsible for purging the list of old buffers.") -(defvar auto-revert-timer nil - "Timer used by Auto-Revert Mode.") - (defvar auto-revert-remaining-buffers '() "Buffers not checked when user input stopped execution.") @@ -219,7 +269,7 @@ This function is designed to be added to hooks, for example: ;;;###autoload (define-minor-mode global-auto-revert-mode - "Revert any buffer when file on disk change. + "Revert any buffer when file on disk changes. With arg, turn Auto Revert mode on globally if and only if arg is positive. This is a minor mode that affects all buffers. @@ -231,7 +281,12 @@ Use `auto-revert-mode' to revert a particular buffer." (defun auto-revert-set-timer () - "Restart or cancel the timer." + "Restart or cancel the timer used by Auto-Revert Mode. +If such a timer is active, cancel it. Start a new timer if +Global Auto-Revert Mode is active or if Auto-Revert Mode is active +in some buffer. Restarting the timer ensures that Auto-Revert Mode +will use an up-to-date value of `auto-revert-interval'" + (interactive) (if (timerp auto-revert-timer) (cancel-timer auto-revert-timer)) (setq auto-revert-timer @@ -241,6 +296,54 @@ Use `auto-revert-mode' to revert a particular buffer." 'auto-revert-buffers) nil))) +(defun auto-revert-active-p () + "Check if auto-revert is active (in current buffer or globally)." + (or auto-revert-mode + (and + global-auto-revert-mode + (not global-auto-revert-ignore-buffer) + (not (memq major-mode + global-auto-revert-ignore-modes))))) + +(defun auto-revert-handler () + "Revert current buffer, if appropriate. +This is an internal function used by Auto-Revert Mode." + (unless (buffer-modified-p) + (let ((buffer (current-buffer)) revert eob eoblist) + (or (and buffer-file-name + (file-readable-p buffer-file-name) + (not (verify-visited-file-modtime buffer)) + (setq revert t)) + (and (or auto-revert-mode global-auto-revert-non-file-buffers) + revert-buffer-function + (boundp 'buffer-stale-function) + (functionp buffer-stale-function) + (setq revert (funcall buffer-stale-function t)))) + (when revert + (when (and auto-revert-verbose + (not (eq revert 'fast))) + (message "Reverting buffer `%s'." (buffer-name))) + ;; If point (or a window point) is at the end of the buffer, + ;; we want to keep it at the end after reverting. This allows + ;; to tail a file. + (when buffer-file-name + (setq eob (eobp)) + (walk-windows + #'(lambda (window) + (and (eq (window-buffer window) buffer) + (= (window-point window) (point-max)) + (push window eoblist))) + 'no-mini t)) + (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes) + (when buffer-file-name + (when eob (goto-char (point-max))) + (dolist (window eoblist) + (set-window-point window (point-max))))) + ;; `preserve-modes' avoids changing the (minor) modes. But we + ;; do want to reset the mode for VC, so we do it manually. + (when (or revert auto-revert-check-vc-info) + (vc-find-file-hook))))) + (defun auto-revert-buffers () "Revert buffers as specified by Auto-Revert and Global Auto-Revert Mode. @@ -249,10 +352,11 @@ Should `global-auto-revert-mode' be active all file buffers are checked. Should `auto-revert-mode' be active in some buffers, those buffers are checked. -Non-file buffers that have a custom `revert-buffer-function' are -reverted either when Auto-Revert Mode is active in that buffer, or -when the variable `global-auto-revert-non-file-buffers' is non-nil -and Global Auto-Revert Mode is active. +Non-file buffers that have a custom `revert-buffer-function' and +a `buffer-stale-function' are reverted either when Auto-Revert +Mode is active in that buffer, or when the variable +`global-auto-revert-non-file-buffers' is non-nil and Global +Auto-Revert Mode is active. This function stops whenever there is user input. The buffers not checked are stored in the variable `auto-revert-remaining-buffers'. @@ -291,27 +395,7 @@ the timer when no buffers need to be checked." (memq buf auto-revert-buffer-list)) (setq auto-revert-buffer-list (delq buf auto-revert-buffer-list))) - (when (and - (or auto-revert-mode - (and - global-auto-revert-mode - (not global-auto-revert-ignore-buffer) - (not (memq major-mode - global-auto-revert-ignore-modes)))) - (not (buffer-modified-p)) - (if (buffer-file-name) - (and (file-readable-p (buffer-file-name)) - (not (verify-visited-file-modtime buf))) - (and revert-buffer-function - (or (and global-auto-revert-mode - global-auto-revert-non-file-buffers) - auto-revert-mode)))) - (if auto-revert-verbose - (message "Reverting buffer `%s'." buf)) - (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes) - ;; `preserve-modes' avoids changing the (minor) modes. But we - ;; do want to reset the mode for VC, so we do it explicitly. - (vc-find-file-hook))) + (when (auto-revert-active-p) (auto-revert-handler))) ;; Remove dead buffer from `auto-revert-buffer-list'. (setq auto-revert-buffer-list (delq buf auto-revert-buffer-list)))) @@ -329,4 +413,5 @@ the timer when no buffers need to be checked." (run-hooks 'auto-revert-load-hook) +;;; arch-tag: f6bcb07b-4841-477e-9e44-b18678e58876 ;;; autorevert.el ends here diff --git a/lisp/avoid.el b/lisp/avoid.el index 4bc59de14a..5a5a09622c 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el @@ -416,4 +416,5 @@ definition of \"random distance\".)" (if mouse-avoidance-mode (mouse-avoidance-mode mouse-avoidance-mode)) +;;; arch-tag: 64ad4ef8-a870-4183-8d96-3aa93b7a6800 ;;; avoid.el ends here diff --git a/lisp/battery.el b/lisp/battery.el index 5980a839a4..c82d3ac02b 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -1,6 +1,6 @@ ;;; battery.el --- display battery status information -;; Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 2000, 2001, 2003 Free Software Foundation, Inc. ;; Author: Ralph Schleicher ;; Keywords: hardware @@ -24,9 +24,9 @@ ;;; Commentary: -;; There is at present only a function interpreting the new `/proc/apm' -;; file format of Linux version 1.3.58 or newer. That is, what a lucky -;; coincidence, exactly the interface provided by the author's laptop. +;; There is at present support for interpreting the new `/proc/apm' +;; file format of Linux version 1.3.58 or newer and for the `/proc/acpi/' +;; directory structure of Linux 2.4.20 and 2.6. ;;; Code: @@ -42,7 +42,10 @@ (defcustom battery-status-function (cond ((and (eq system-type 'gnu/linux) (file-readable-p "/proc/apm")) - 'battery-linux-proc-apm)) + 'battery-linux-proc-apm) + ((and (eq system-type 'gnu/linux) + (file-directory-p "/proc/acpi/battery")) + 'battery-linux-proc-acpi)) "*Function for getting battery status information. The function has to return an alist of conversion definitions. Its cons cells are of the form @@ -56,7 +59,9 @@ introduced by a `%' character in a control string." (defcustom battery-echo-area-format (cond ((eq battery-status-function 'battery-linux-proc-apm) - "Power %L, battery %B (%p%% load, remaining time %t)")) + "Power %L, battery %B (%p%% load, remaining time %t)") + ((eq battery-status-function 'battery-linux-proc-acpi) + "Power %L, battery %B at %r mA (%p%% load, remaining time %t)")) "*Control string formatting the string to display in the echo area. Ordinary characters in the control string are printed as-is, while conversion specifications introduced by a `%' character in the control @@ -70,7 +75,9 @@ string are substituted as defined by the current value of the variable (defcustom battery-mode-line-format (cond ((eq battery-status-function 'battery-linux-proc-apm) - " [%b%p%%]")) + " [%b%p%%]") + ((eq battery-status-function 'battery-linux-proc-acpi) + " [%b%p%%,%d°C]")) "*Control string formatting the string to display in the mode line. Ordinary characters in the control string are printed as-is, while conversion specifications introduced by a `%' character in the control @@ -218,6 +225,104 @@ The following %-sequences are provided: (cons ?t (or remaining-time "N/A"))))) +;;; `/proc/acpi/' interface for Linux. + +(defun battery-linux-proc-acpi () + "Get ACPI status information from Linux kernel. +This function works only with the new `/proc/acpi/' format introduced +in Linux version 2.4.20 and 2.6.0. + +The following %-sequences are provided: +%c Current capacity (mAh) +%B Battery status (verbose) +%b Battery status, empty means high, `-' means low, + `!' means critical, and `+' means charging +%d Temperature (in degrees Celsius) +%L AC line status (verbose) +%p battery load percentage +%m Remaining time in minutes +%h Remaining time in hours +%t Remaining time in the form `h:min'" + (let (capacity design-capacity rate charging-state warn low minutes hours) + (when (file-directory-p "/proc/acpi/battery/") + ;; ACPI provides information about each battery present in the system in + ;; a separate subdirectory. We are going to merge the available + ;; information together since displaying for a variable amount of + ;; batteries seems overkill for format-strings. + (mapc + (lambda (dir) + (with-temp-buffer + (insert-file-contents (expand-file-name "state" dir)) + (when (re-search-forward "present: +yes$" nil t) + (and (re-search-forward "charging state: +\\(.*\\)$" nil t) + (or (null charging-state) (string= charging-state + "unknown")) + ;; On most multi-battery systems, most of the time only one + ;; battery is "charging"/"discharging", the others are + ;; "unknown". + (setq charging-state (match-string 1))) + (when (re-search-forward "present rate: +\\([0-9]+\\) mA$" nil t) + (setq rate (+ (or rate 0) (string-to-int (match-string 1))))) + (when (re-search-forward "remaining capacity: +\\([0-9]+\\) mAh$" + nil t) + (setq capacity + (+ (or capacity 0) (string-to-int (match-string 1)))))) + (goto-char (point-max)) + (insert-file-contents (expand-file-name "info" dir)) + (when (re-search-forward "present: +yes$" nil t) + (when (re-search-forward "design capacity: +\\([0-9]+\\) mAh$" + nil t) + (setq design-capacity (+ (or design-capacity 0) + (string-to-int (match-string 1))))) + (when (re-search-forward "design capacity warning: +\\([0-9]+\\) mAh$" + nil t) + (setq warn (+ (or warn 0) (string-to-int (match-string 1))))) + (when (re-search-forward "design capacity low: +\\([0-9]+\\) mAh$" + nil t) + (setq low (+ (or low 0) + (string-to-int (match-string 1)))))))) + (directory-files "/proc/acpi/battery/" t "BAT"))) + (and capacity rate + (setq minutes (floor (* (/ (float (if (string= charging-state + "charging") + (- design-capacity capacity) + capacity)) rate) 60)) + hours (/ minutes 60))) + (list (cons ?c (or (and capacity (number-to-string capacity)) "N/A")) + (cons ?L (or (when (file-exists-p "/proc/acpi/ac_adapter/AC/state") + (with-temp-buffer + (insert-file-contents + "/proc/acpi/ac_adapter/AC/state") + (when (re-search-forward "state: +\\(.*\\)$" nil t) + (match-string 1)))) + "N/A")) + (cons ?d (or (when (file-exists-p + "/proc/acpi/thermal_zone/THRM/temperature") + (with-temp-buffer + (insert-file-contents + "/proc/acpi/thermal_zone/THRM/temperature") + (when (re-search-forward + "temperature: +\\([0-9]+\\) C$" nil t) + (match-string 1)))) + "N/A")) + (cons ?r (or (and rate (number-to-string rate)) "N/A")) + (cons ?B (or charging-state "N/A")) + (cons ?b (or (and (string= charging-state "charging") "+") + (and low (< capacity low) "!") + (and warn (< capacity warn) "-") + "")) + (cons ?h (or (and hours (number-to-string hours)) "N/A")) + (cons ?m (or (and minutes (number-to-string minutes)) "N/A")) + (cons ?t (or (and minutes + (format "%d:%02d" hours (- minutes (* 60 hours)))) + "N/A")) + (cons ?p (or (and design-capacity capacity + (number-to-string + (floor (/ capacity + (/ (float design-capacity) 100))))) + "N/A"))))) + + ;;; Private functions. (defun battery-format (format alist) @@ -271,4 +376,5 @@ The following %-sequences are provided: (provide 'battery) +;;; arch-tag: 65916f50-4754-4b6b-ac21-0b510f545a37 ;;; battery.el ends here diff --git a/lisp/bindings.el b/lisp/bindings.el index 88ff7c2a8e..a20b45bfe8 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -135,12 +135,14 @@ corresponding to the mode line clicked." "Local keymap for the coding-system part of the mode line.") -(defun mode-line-change-eol () +(defun mode-line-change-eol (event) "Cycle through the various possible kinds of end-of-line styles." - (interactive) - (let ((eol (coding-system-eol-type buffer-file-coding-system))) - (set-buffer-file-coding-system - (cond ((eq eol 0) 'dos) ((eq eol 1) 'mac) (t 'unix))))) + (interactive "e") + (save-selected-window + (select-window (posn-window (event-start event))) + (let ((eol (coding-system-eol-type buffer-file-coding-system))) + (set-buffer-file-coding-system + (cond ((eq eol 0) 'dos) ((eq eol 1) 'mac) (t 'unix)))))) (defvar mode-line-eol-desc-cache nil) @@ -251,19 +253,21 @@ Normally nil in most modes, since there is no process to display.") ;; Actual initialization is below. (defvar mode-line-position nil - "Mode-line control for displaying line number, column number and fraction.") + "Mode-line control for displaying the position in the buffer. +Normally displays the buffer percentage and, optionally, the +buffer size, the line number and the column number.") (defvar mode-line-modes nil "Mode-line control for displaying major and minor modes.") -(defvar mode-line-major-mode-keymap +(defvar mode-line-major-mode-keymap (let ((map (make-sparse-keymap))) (define-key map [mode-line mouse-2] 'describe-mode) (define-key map [mode-line down-mouse-3] 'mode-line-mode-menu-1) map) "\ Keymap to display on major mode.") -(defvar mode-line-minor-mode-keymap +(defvar mode-line-minor-mode-keymap (let ((map (make-sparse-keymap))) (define-key map [mode-line mouse-2] 'mode-line-minor-mode-help) (define-key map [mode-line down-mouse-3] 'mode-line-mode-menu-1) @@ -301,7 +305,7 @@ Keymap to display on minor modes.") `(:propertize ("" mode-name) help-echo "mouse-2: help for current major mode" local-map ,mode-line-major-mode-keymap) - `(:propertize ("" mode-line-process)) + '("" mode-line-process) `(:propertize ("" minor-mode-alist) help-echo "mouse-2: help for minor modes, mouse-3: minor mode menu" local-map ,mode-line-minor-mode-keymap) @@ -311,7 +315,9 @@ Keymap to display on minor modes.") (propertize ")%]--" 'help-echo help-echo))) (setq-default mode-line-position - `((-3 . ,(propertize "%p" 'help-echo help-echo)) + `((-3 ,(propertize "%p" 'help-echo help-echo)) + (size-indication-mode + (8 ,(propertize " of %I" 'help-echo help-echo))) (line-number-mode ((column-number-mode (10 ,(propertize " (%l,%c)" 'help-echo help-echo)) @@ -507,14 +513,16 @@ is okay. See `mode-line-format'.") ".fas" ".lib" ".mem" ;; CMUCL ".x86f" ".sparcf" - ;; Other CL implementations (Allegro, LispWorks) - ".fasl" ".ufsl" ".fsl" ".dxl" + ;; Other CL implementations (Allegro, LispWorks, OpenMCL) + ".fasl" ".ufsl" ".fsl" ".dxl" ".pfsl" ;; Libtool ".lo" ".la" ;; Gettext ".gmo" ".mo" ;; Texinfo-related - ".toc" ".log" ".aux" + ;; This used to contain .log, but that's commonly used for log + ;; files you do want to see, not just TeX stuff. -- fx + ".toc" ".aux" ".cp" ".fn" ".ky" ".pg" ".tp" ".vr" ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs"))) @@ -766,6 +774,11 @@ language you are using." (define-key global-map [S-insert] 'yank) (define-key global-map [undo] 'undo) (define-key global-map [redo] 'repeat-complex-command) +(define-key global-map [again] 'repeat-complex-command) ; Sun keyboard +(define-key global-map [open] 'find-file) ; Sun +;; The following wouldn't work to interrupt running code since C-g is +;; treated specially in the event loop. +;; (define-key global-map [stop] 'keyboard-quit) ; Sun ;; (define-key global-map [clearline] 'function-key-error) (define-key global-map [insertline] 'open-line) (define-key global-map [deleteline] 'kill-line) @@ -1029,4 +1042,5 @@ language you are using." ;; no-update-autoloads: t ;; End: +;;; arch-tag: 23b5c7e6-e47b-49ed-8c6c-ed213c5fffe0 ;;; bindings.el ends here diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 2e1a759509..67ae2c8486 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -335,10 +335,7 @@ through a file easier.") "Return the full entry for BOOKMARK in bookmark-alist. If BOOKMARK is not a string, return nil." (when (stringp bookmark) - (apply (if bookmark-completion-ignore-case - #'assoc-ignore-case - #'assoc) - (list bookmark bookmark-alist)))) + (assoc-string bookmark bookmark-alist bookmark-completion-ignore-case))) (defun bookmark-get-bookmark-record (bookmark) @@ -456,21 +453,21 @@ probably don't want to include one yourself. Optional second arg DEFAULT is a string to return if the user enters the empty string." (bookmark-maybe-load-default-file) ; paranoia - (let* ((completion-ignore-case bookmark-completion-ignore-case) - (default default) - (prompt (if default - (concat prompt (format " (%s): " default)) - (concat prompt ": "))) - (str - (completing-read prompt - bookmark-alist - nil - 0 - nil - 'bookmark-history))) - (if (string-equal "" str) - (list default) - (list str)))) + (if (listp last-nonmenu-event) + (bookmark-menu-popup-paned-menu t prompt (bookmark-all-names)) + (let* ((completion-ignore-case bookmark-completion-ignore-case) + (default default) + (prompt (if default + (concat prompt (format " (%s): " default)) + (concat prompt ": "))) + (str + (completing-read prompt + bookmark-alist + nil + 0 + nil + 'bookmark-history))) + (if (string-equal "" str) default str)))) (defmacro bookmark-maybe-historicize-string (string) @@ -924,10 +921,8 @@ When you have finished composing, type \\[bookmark-send-annotation]. (defun bookmark-edit-annotation (bookmark) "Pop up a buffer for editing bookmark BOOKMARK's annotation." - (let ((buf (current-buffer)) - (point (point))) - (pop-to-buffer (generate-new-buffer-name "*Bookmark Annotation Compose*")) - (bookmark-edit-annotation-mode bookmark))) + (pop-to-buffer (generate-new-buffer-name "*Bookmark Annotation Compose*")) + (bookmark-edit-annotation-mode bookmark)) (defun bookmark-insert-current-bookmark () @@ -1046,7 +1041,8 @@ if you wish to give the bookmark a new location, and bookmark-jump will then jump to the new location, as well as recording it in place of the old one in the permanent bookmark record." (interactive - (bookmark-completing-read "Jump to bookmark" bookmark-current-bookmark)) + (list (bookmark-completing-read "Jump to bookmark" + bookmark-current-bookmark))) (bookmark-maybe-historicize-string bookmark) (let ((cell (bookmark-jump-noselect bookmark))) (and cell @@ -1139,7 +1135,7 @@ be retrieved from a VC backend, else return nil." This makes an already existing bookmark point to that file, instead of the one it used to point at. Useful when a file has been renamed after a bookmark was set in it." - (interactive (bookmark-completing-read "Bookmark to relocate")) + (interactive (list (bookmark-completing-read "Bookmark to relocate"))) (bookmark-maybe-historicize-string bookmark) (bookmark-maybe-load-default-file) (let* ((bmrk-filename (bookmark-get-filename bookmark)) @@ -1156,7 +1152,7 @@ after a bookmark was set in it." "Insert the name of the file associated with BOOKMARK. Optional second arg NO-HISTORY means don't record this in the minibuffer history list `bookmark-history'." - (interactive (bookmark-completing-read "Insert bookmark location")) + (interactive (list (bookmark-completing-read "Insert bookmark location"))) (or no-history (bookmark-maybe-historicize-string bookmark)) (let ((start (point))) (prog1 @@ -1191,7 +1187,7 @@ must pass at least OLD when calling from Lisp. While you are entering the new name, consecutive C-w's insert consecutive words from the text of the buffer into the new bookmark name." - (interactive (bookmark-completing-read "Old bookmark name")) + (interactive (list (bookmark-completing-read "Old bookmark name"))) (bookmark-maybe-historicize-string old) (bookmark-maybe-load-default-file) @@ -1224,7 +1220,7 @@ You may have a problem using this function if the value of variable `bookmark-alist' is nil. If that happens, you need to load in some bookmarks. See help on function `bookmark-load' for more about this." - (interactive (bookmark-completing-read "Insert bookmark contents")) + (interactive (list (bookmark-completing-read "Insert bookmark contents"))) (bookmark-maybe-historicize-string bookmark) (bookmark-maybe-load-default-file) (let ((orig-point (point)) @@ -1247,7 +1243,8 @@ one most recently used in this file, if any\). Optional second arg BATCH means don't update the bookmark list buffer, probably because we were called from there." (interactive - (bookmark-completing-read "Delete bookmark" bookmark-current-bookmark)) + (list (bookmark-completing-read "Delete bookmark" + bookmark-current-bookmark))) (bookmark-maybe-historicize-string bookmark) (bookmark-maybe-load-default-file) (let ((will-go (bookmark-get-bookmark bookmark))) @@ -1533,9 +1530,8 @@ deletion, or > if it is flagged for displaying." (if (interactive-p) (switch-to-buffer (get-buffer-create "*Bookmark List*")) (set-buffer (get-buffer-create "*Bookmark List*"))) - (let ((buffer-read-only nil)) - (delete-region (point-max) (point-min)) - (goto-char (point-min)) ;sure are playing it safe... + (let ((inhibit-read-only t)) + (erase-buffer) (insert "% Bookmark\n- --------\n") (bookmark-maybe-sort-alist) (mapcar @@ -1638,7 +1634,7 @@ Optional argument SHOW means show them unconditionally." (goto-char (point-min)) (forward-line 2) (setq bookmark-bmenu-hidden-bookmarks ()) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (while (< (point) (point-max)) (let ((bmrk (bookmark-bmenu-bookmark))) (setq bookmark-bmenu-hidden-bookmarks @@ -1671,7 +1667,7 @@ Optional argument SHOW means show them unconditionally." (backward-word 1) (setq bookmark-bmenu-bookmark-column (current-column))) (save-excursion - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (while bookmark-bmenu-hidden-bookmarks (move-to-column bookmark-bmenu-bookmark-column t) (bookmark-kill-line) @@ -1774,7 +1770,7 @@ if an annotation exists." (interactive) (beginning-of-line) (if (bookmark-bmenu-check-position) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (delete-char 1) (insert ?>) (forward-line 1) @@ -1793,7 +1789,7 @@ You can mark bookmarks with the \\\\[bookmark-bmenu-mar (goto-char (point-min)) (while (re-search-forward "^>" nil t) (setq tem (bookmark-bmenu-bookmark)) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (delete-char -1) (insert ?\ )) (or (string-equal tem bmrk) @@ -1940,7 +1936,7 @@ Optional BACKUP means move up." (beginning-of-line) (if (bookmark-bmenu-check-position) (progn - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (delete-char 1) ;; any flags to reset according to circumstances? How about a ;; flag indicating whether this bookmark is being visited? @@ -1967,7 +1963,7 @@ To carry out the deletions that you've marked, use \\\\ (interactive) (beginning-of-line) (if (bookmark-bmenu-check-position) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (delete-char 1) (insert ?D) (forward-line 1) @@ -2047,149 +2043,38 @@ To carry out the deletions that you've marked, use \\\\ ;;; Menu bar stuff. Prefix is "bookmark-menu". -(defun bookmark-menu-build-paned-menu (name entries) - "Build a multi-paned menu named NAME from the strings in ENTRIES. -That is, ENTRIES is a list of strings which appear as the choices -in the menu. The number of panes depends on the number of entries. -The visible entries are truncated to `bookmark-menu-length', but the -strings returned are not." - (let* ((f-height (/ (frame-height) 2)) - (pane-list - (let (temp-pane-list - (iter 0)) - (while entries - (let (lst - (count 0)) - (while (and (< count f-height) entries) - (let ((str (car entries))) - (setq lst (cons - (cons - (if (> (length str) bookmark-menu-length) - (substring str 0 bookmark-menu-length) - str) - str) - lst)) - (setq entries (cdr entries)) - (setq count (1+ count)))) - (setq iter (1+ iter)) - (setq - temp-pane-list - (cons - (cons - (format "-*- %s (%d) -*-" name iter) - (nreverse lst)) - temp-pane-list)))) - (nreverse temp-pane-list)))) - - ;; Return the menu: - (cons (concat "-*- " name " -*-") pane-list))) - - (defun bookmark-menu-popup-paned-menu (event name entries) "Pop up multi-paned menu at EVENT, return string chosen from ENTRIES. That is, ENTRIES is a list of strings which appear as the choices in the menu. -The number of panes depends on the number of entries." - (interactive "e") - (x-popup-menu event (bookmark-menu-build-paned-menu name entries))) - - -(defun bookmark-menu-popup-paned-bookmark-menu (event name) - "Pop up menu of bookmarks, return chosen bookmark. -Pop up at EVENT, menu's name is NAME. -The number of panes depends on the number of bookmarks." - (bookmark-menu-popup-paned-menu event name (bookmark-all-names))) - - -(defun bookmark-popup-menu-and-apply-function (func-sym menu-label event) - ;; help function for making menus that need to apply a bookmark - ;; function to a string. - (let* ((choice (bookmark-menu-popup-paned-bookmark-menu - event menu-label))) - (if choice (apply func-sym (list choice))))) - - -;;;###autoload -(defun bookmark-menu-insert (event) - "Insert the text of the file pointed to by bookmark BOOKMARK. -You may have a problem using this function if the value of variable -`bookmark-alist' is nil. If that happens, you need to load in some -bookmarks. See help on function `bookmark-load' for more about -this. - -Warning: this function only takes an EVENT as argument. Use the -corresponding bookmark function from Lisp \(the one without the -\"-menu-\" in its name\)." - (interactive "e") - (bookmark-popup-menu-and-apply-function - 'bookmark-insert "Insert Bookmark Contents" event)) - - -;;;###autoload -(defun bookmark-menu-jump (event) - "Jump to bookmark BOOKMARK (a point in some file). -You may have a problem using this function if the value of variable -`bookmark-alist' is nil. If that happens, you need to load in some -bookmarks. See help on function `bookmark-load' for more about -this. - -Warning: this function only takes an EVENT as argument. Use the -corresponding bookmark function from Lisp \(the one without the -\"-menu-\" in its name\)." - (interactive "e") - (bookmark-popup-menu-and-apply-function - 'bookmark-jump "Jump to Bookmark" event)) - - -;;;###autoload -(defun bookmark-menu-locate (event) - "Insert the name of the file associated with BOOKMARK. -\(This is not the same as the contents of that file\). - -Warning: this function only takes an EVENT as argument. Use the -corresponding bookmark function from Lisp \(the one without the -\"-menu-\" in its name\)." - (interactive "e") - (bookmark-popup-menu-and-apply-function - 'bookmark-insert-location "Insert Bookmark Location" event)) - - -;;;###autoload -(defun bookmark-menu-rename (event) - "Change the name of OLD-BOOKMARK to NEWNAME. -If called from keyboard, prompts for OLD-BOOKMARK and NEWNAME. -If called from menubar, OLD-BOOKMARK is selected from a menu, and -prompts for NEWNAME. -If called from Lisp, prompts for NEWNAME if only OLD-BOOKMARK was -passed as an argument. If called with two strings, then no prompting -is done. You must pass at least OLD-BOOKMARK when calling from Lisp. - -While you are entering the new name, consecutive C-w's insert -consecutive words from the text of the buffer into the new bookmark -name. - -Warning: this function only takes an EVENT as argument. Use the -corresponding bookmark function from Lisp \(the one without the -\"-menu-\" in its name\)." - (interactive "e") - (bookmark-popup-menu-and-apply-function - 'bookmark-rename "Rename Bookmark" event)) - - -;;;###autoload -(defun bookmark-menu-delete (event) - "Delete the bookmark named NAME from the bookmark list. -Removes only the first instance of a bookmark with that name. If -there are one or more other bookmarks with the same name, they will -not be deleted. Defaults to the \"current\" bookmark \(that is, the -one most recently used in this file, if any\). - -Warning: this function only takes an EVENT as argument. Use the -corresponding bookmark function from Lisp \(the one without the -\"-menu-\" in its name\)." - (interactive "e") - (bookmark-popup-menu-and-apply-function - 'bookmark-delete "Delete Bookmark" event)) +The number of panes depends on the number of entries. +The visible entries are truncated to `bookmark-menu-length', but the +strings returned are not." + (let ((f-height (/ (frame-height) 2)) + (pane-list nil) + (iter 0)) + (while entries + (let (lst + (count 0)) + (while (and (< count f-height) entries) + (let ((str (car entries))) + (push (cons + (if (> (length str) bookmark-menu-length) + (substring str 0 bookmark-menu-length) + str) + str) + lst) + (setq entries (cdr entries)) + (setq count (1+ count)))) + (setq iter (1+ iter)) + (push (cons + (format "-*- %s (%d) -*-" name iter) + (nreverse lst)) + pane-list))) + + ;; Popup the menu and return the string. + (x-popup-menu event (cons (concat "-*- " name " -*-") + (nreverse pane-list))))) ;; Thanks to Roland McGrath for fixing menubar.el so that the @@ -2201,10 +2086,22 @@ corresponding bookmark function from Lisp \(the one without the ;; Emacs menubar stuff. ;;;###autoload -(defvar menu-bar-bookmark-map (make-sparse-keymap "Bookmark functions")) +(defvar menu-bar-bookmark-map + (let ((map (make-sparse-keymap "Bookmark functions"))) + (define-key map [load] '("Load a Bookmark File..." . bookmark-load)) + (define-key map [write] '("Save Bookmarks As..." . bookmark-write)) + (define-key map [save] '("Save Bookmarks" . bookmark-save)) + (define-key map [edit] '("Edit Bookmark List" . bookmark-bmenu-list)) + (define-key map [delete] '("Delete Bookmark" . bookmark-delete)) + (define-key map [rename] '("Rename Bookmark" . bookmark-rename)) + (define-key map [locate] '("Insert Location" . bookmark-locate)) + (define-key map [insert] '("Insert Contents" . bookmark-insert)) + (define-key map [set] '("Set Bookmark" . bookmark-set)) + (define-key map [jump] '("Jump to Bookmark" . bookmark-jump)) + map)) ;;;###autoload -(defalias 'menu-bar-bookmark-map (symbol-value 'menu-bar-bookmark-map)) +(defalias 'menu-bar-bookmark-map menu-bar-bookmark-map) ;; make bookmarks appear toward the right side of the menu. (if (boundp 'menu-bar-final-items) @@ -2213,55 +2110,24 @@ corresponding bookmark function from Lisp \(the one without the (cons 'bookmark menu-bar-final-items))) (setq menu-bar-final-items '(bookmark))) -;;;###autoload (define-key menu-bar-bookmark-map [load] -;;;###autoload '("Load a Bookmark File..." . bookmark-load)) - -;;;###autoload (define-key menu-bar-bookmark-map [write] -;;;###autoload '("Save Bookmarks As..." . bookmark-write)) - -;;;###autoload (define-key menu-bar-bookmark-map [save] -;;;###autoload '("Save Bookmarks" . bookmark-save)) - -;;;###autoload (define-key menu-bar-bookmark-map [edit] -;;;###autoload '("Edit Bookmark List" . bookmark-bmenu-list)) - -;;;###autoload (define-key menu-bar-bookmark-map [delete] -;;;###autoload '("Delete Bookmark" . bookmark-menu-delete)) - -;;;###autoload (define-key menu-bar-bookmark-map [rename] -;;;###autoload '("Rename Bookmark" . bookmark-menu-rename)) - -;;;###autoload (define-key menu-bar-bookmark-map [locate] -;;;###autoload '("Insert Location" . bookmark-menu-locate)) - -;;;###autoload (define-key menu-bar-bookmark-map [insert] -;;;###autoload '("Insert Contents" . bookmark-menu-insert)) - -;;;###autoload (define-key menu-bar-bookmark-map [set] -;;;###autoload '("Set Bookmark" . bookmark-set)) - -;;;###autoload (define-key menu-bar-bookmark-map [jump] -;;;###autoload '("Jump to Bookmark" . bookmark-menu-jump)) - ;;;; end bookmark menu stuff ;;;; ;;; Load Hook (defvar bookmark-load-hook nil - "Hook to run at the end of loading bookmark.") + "Hook run at the end of loading bookmark.") ;;; Exit Hook, called from kill-emacs-hook (defvar bookmark-exit-hook nil - "Hook to run when emacs exits") + "Hook run when emacs exits.") (defun bookmark-exit-hook-internal () "Save bookmark state, if necessary, at Emacs exit time. This also runs `bookmark-exit-hooks'." - (and - (progn (run-hooks 'bookmark-exit-hooks) t) - bookmark-alist - (bookmark-time-to-save-p t) - (bookmark-save))) + (run-hooks 'bookmark-exit-hooks) + (and bookmark-alist + (bookmark-time-to-save-p t) + (bookmark-save))) (add-hook 'kill-emacs-hook 'bookmark-exit-hook-internal) @@ -2270,4 +2136,5 @@ This also runs `bookmark-exit-hooks'." (provide 'bookmark) +;;; arch-tag: 139f519a-dd0c-4b8d-8b5d-f9fcf53ca8f6 ;;; bookmark.el ends here diff --git a/lisp/bs.el b/lisp/bs.el index ab46f205fb..2925811997 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -1,6 +1,6 @@ ;;; bs.el --- menu for selecting and displaying buffers -;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc. ;; Author: Olaf Sylvester ;; Maintainer: Olaf Sylvester ;; Keywords: convenience @@ -457,69 +457,61 @@ Used internally, only.") (defvar bs--marked-buffers nil "Currently marked buffers in Buffer Selection Menu.") -(defvar bs-mode-map () +(defvar bs-mode-map + (let ((map (make-sparse-keymap))) + (define-key map " " 'bs-select) + (define-key map "f" 'bs-select) + (define-key map "v" 'bs-view) + (define-key map "!" 'bs-select-in-one-window) + (define-key map [mouse-2] 'bs-mouse-select) ;; for GNU EMACS + (define-key map [button2] 'bs-mouse-select) ;; for XEmacs + (define-key map "F" 'bs-select-other-frame) + (let ((key ?1)) + (while (<= key ?9) + (define-key map (char-to-string key) 'digit-argument) + (setq key (1+ key)))) + (define-key map "-" 'negative-argument) + (define-key map "\e-" 'negative-argument) + (define-key map "o" 'bs-select-other-window) + (define-key map "\C-o" 'bs-tmp-select-other-window) + ;; for GNU EMACS + (define-key map [mouse-3] 'bs-mouse-select-other-frame) + ;; for XEmacs + (define-key map [button3] 'bs-mouse-select-other-frame) + (define-key map [up] 'bs-up) + (define-key map "n" 'bs-down) + (define-key map "p" 'bs-up) + (define-key map [down] 'bs-down) + (define-key map "\C-m" 'bs-select) + (define-key map "b" 'bs-bury-buffer) + (define-key map "s" 'bs-save) + (define-key map "S" 'bs-show-sorted) + (define-key map "a" 'bs-toggle-show-all) + (define-key map "d" 'bs-delete) + (define-key map "\C-d" 'bs-delete-backward) + (define-key map "k" 'bs-delete) + (define-key map "g" 'bs-refresh) + (define-key map "C" 'bs-set-configuration-and-refresh) + (define-key map "c" 'bs-select-next-configuration) + (define-key map "q" 'bs-kill) + ;; (define-key map "z" 'bs-kill) + (define-key map "\C-c\C-c" 'bs-kill) + (define-key map "\C-g" 'bs-abort) + (define-key map "\C-]" 'bs-abort) + (define-key map "%" 'bs-toggle-readonly) + (define-key map "~" 'bs-clear-modified) + (define-key map "M" 'bs-toggle-current-to-show) + (define-key map "+" 'bs-set-current-buffer-to-show-always) + ;;(define-key map "-" 'bs-set-current-buffer-to-show-never) + (define-key map "t" 'bs-visit-tags-table) + (define-key map "m" 'bs-mark-current) + (define-key map "u" 'bs-unmark-current) + (define-key map ">" 'scroll-right) + (define-key map "<" 'scroll-left) + (define-key map "?" 'bs-help) + map) "Keymap of `bs-mode'.") -(if bs-mode-map - () - (setq bs-mode-map (make-sparse-keymap)) - (define-key bs-mode-map " " 'bs-select) - (define-key bs-mode-map "f" 'bs-select) - (define-key bs-mode-map "v" 'bs-view) - (define-key bs-mode-map "!" 'bs-select-in-one-window) - (define-key bs-mode-map [mouse-2] 'bs-mouse-select) ;; for GNU EMACS - (define-key bs-mode-map [button2] 'bs-mouse-select) ;; for XEmacs - (define-key bs-mode-map "F" 'bs-select-other-frame) - - (let ((key ?1)) - (while (<= key ?9) - (define-key bs-mode-map (char-to-string key) 'digit-argument) - (setq key (1+ key)))) - - (define-key bs-mode-map "-" 'negative-argument) - (define-key bs-mode-map "\e-" 'negative-argument) - - (define-key bs-mode-map "o" 'bs-select-other-window) - (define-key bs-mode-map "\C-o" 'bs-tmp-select-other-window) - ;; for GNU EMACS - (define-key bs-mode-map [mouse-3] 'bs-mouse-select-other-frame) - ;; for XEmacs - (define-key bs-mode-map [button3] 'bs-mouse-select-other-frame) - (define-key bs-mode-map [up] 'bs-up) - (define-key bs-mode-map "n" 'bs-down) - (define-key bs-mode-map "p" 'bs-up) - (define-key bs-mode-map [down] 'bs-down) - (define-key bs-mode-map "\C-m" 'bs-select) - (define-key bs-mode-map "b" 'bs-bury-buffer) - (define-key bs-mode-map "s" 'bs-save) - (define-key bs-mode-map "S" 'bs-show-sorted) - (define-key bs-mode-map "a" 'bs-toggle-show-all) - (define-key bs-mode-map "d" 'bs-delete) - (define-key bs-mode-map "\C-d" 'bs-delete-backward) - (define-key bs-mode-map "k" 'bs-delete) - (define-key bs-mode-map "g" 'bs-refresh) - (define-key bs-mode-map "C" 'bs-set-configuration-and-refresh) - (define-key bs-mode-map "c" 'bs-select-next-configuration) - (define-key bs-mode-map "q" 'bs-kill) - ;; (define-key bs-mode-map "z" 'bs-kill) - (define-key bs-mode-map "\C-c\C-c" 'bs-kill) - (define-key bs-mode-map "\C-g" 'bs-abort) - (define-key bs-mode-map "\C-]" 'bs-abort) - (define-key bs-mode-map "%" 'bs-toggle-readonly) - (define-key bs-mode-map "~" 'bs-clear-modified) - (define-key bs-mode-map "M" 'bs-toggle-current-to-show) - (define-key bs-mode-map "+" 'bs-set-current-buffer-to-show-always) - ;;(define-key bs-mode-map "-" 'bs-set-current-buffer-to-show-never) - (define-key bs-mode-map "t" 'bs-visit-tags-table) - (define-key bs-mode-map "m" 'bs-mark-current) - (define-key bs-mode-map "u" 'bs-unmark-current) - (define-key bs-mode-map ">" 'scroll-right) - (define-key bs-mode-map "<" 'scroll-left) - (define-key bs-mode-map "\e\e" nil) - (define-key bs-mode-map "\e\e\e" 'bs-kill) - (define-key bs-mode-map [escape escape escape] 'bs-kill) - (define-key bs-mode-map "?" 'bs-help)) - ;; ---------------------------------------------------------------------- ;; Functions ;; ---------------------------------------------------------------------- @@ -554,9 +546,7 @@ a special function. SORT-DESCRIPTION is an element of `bs-sort-functions'." (extern-must-show-from-fun (and bs-must-show-function (funcall bs-must-show-function (car list)))) - (show-flag (save-excursion - (set-buffer (car list)) - bs-buffer-show-mark))) + (show-flag (buffer-local-value 'bs-buffer-show-mark (car list)))) (if (or (eq show-flag 'always) (and (or bs--show-all (not (eq show-flag 'never))) (not int-show-never) @@ -873,9 +863,7 @@ always. Otherwise it is marked to show never." "Set value `bs-buffer-show-mark' of buffer BUFFER to WHAT. Redisplay current line and display a message describing the status of buffer on current line." - (save-excursion - (set-buffer buffer) - (setq bs-buffer-show-mark what)) + (with-current-buffer buffer (setq bs-buffer-show-mark what)) (bs--update-current-line) (bs--set-window-height) (bs--show-config-message what)) @@ -1515,4 +1503,5 @@ name of buffer configuration." ;; Now provide feature bs (provide 'bs) +;;; arch-tag: c0d9ab34-bf06-4368-ae9d-af88878e6802 ;;; bs.el ends here diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index e2a263e33a..da1c8ed586 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -1,6 +1,6 @@ ;;; buff-menu.el --- buffer menu main function and support functions -;; Copyright (C) 1985, 86, 87, 93, 94, 95, 2000, 2001, 2002, 2003 +;; Copyright (C) 1985, 86, 87, 93, 94, 95, 2000, 2001, 2002, 03, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -47,22 +47,22 @@ ;;; Code: -;;;Trying to preserve the old window configuration works well in -;;;simple scenarios, when you enter the buffer menu, use it, and exit it. -;;;But it does strange things when you switch back to the buffer list buffer -;;;with C-x b, later on, when the window configuration is different. -;;;The choice seems to be, either restore the window configuration -;;;in all cases, or in no cases. -;;;I decided it was better not to restore the window config at all. -- rms. +;;Trying to preserve the old window configuration works well in +;;simple scenarios, when you enter the buffer menu, use it, and exit it. +;;But it does strange things when you switch back to the buffer list buffer +;;with C-x b, later on, when the window configuration is different. +;;The choice seems to be, either restore the window configuration +;;in all cases, or in no cases. +;;I decided it was better not to restore the window config at all. -- rms. -;;;But since then, I changed buffer-menu to use the selected window, -;;;so q now once again goes back to the previous window configuration. +;;But since then, I changed buffer-menu to use the selected window, +;;so q now once again goes back to the previous window configuration. -;;;(defvar Buffer-menu-window-config nil -;;; "Window configuration saved from entry to `buffer-menu'.") +;;(defvar Buffer-menu-window-config nil +;; "Window configuration saved from entry to `buffer-menu'.") -; Put buffer *Buffer List* into proper mode right away -; so that from now on even list-buffers is enough to get a buffer menu. +;; Put buffer *Buffer List* into proper mode right away +;; so that from now on even list-buffers is enough to get a buffer menu. (defgroup Buffer-menu nil "Show a menu of all buffers in a buffer." @@ -89,7 +89,7 @@ :type 'number :group 'Buffer-menu) -; This should get updated & resorted when you click on a column heading +;; 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.") @@ -99,6 +99,14 @@ nil for default sorting by visited order.") (defvar Buffer-menu-mode-map nil "Local keymap for `Buffer-menu-mode' buffers.") +(defvar Buffer-menu-files-only nil + "Non-nil if the current buffer-menu lists only file buffers. +This variable determines whether reverting the buffer lists only +file buffers. It affects both manual reverting and reverting by +Auto Revert Mode.") + +(make-variable-buffer-local 'Buffer-menu-files-only) + (if Buffer-menu-mode-map () (setq Buffer-menu-mode-map (make-keymap)) @@ -131,6 +139,7 @@ nil for default sorting by visited order.") (define-key Buffer-menu-mode-map "b" 'Buffer-menu-bury) (define-key Buffer-menu-mode-map "g" 'Buffer-menu-revert) (define-key Buffer-menu-mode-map "V" 'Buffer-menu-view) + (define-key Buffer-menu-mode-map "T" 'Buffer-menu-toggle-files-only) (define-key Buffer-menu-mode-map [mouse-2] 'Buffer-menu-mouse-select) ) @@ -167,13 +176,16 @@ Letters do not insert themselves; instead, they are commands. \\[Buffer-menu-backup-unmark] -- back up a line and remove marks. \\[Buffer-menu-toggle-read-only] -- toggle read-only status of buffer on this line. \\[Buffer-menu-revert] -- update the list of buffers. +\\[Buffer-menu-toggle-files-only] -- toggle whether the menu displays only file buffers. \\[Buffer-menu-bury] -- bury the buffer listed on this line." (kill-all-local-variables) (use-local-map Buffer-menu-mode-map) (setq major-mode 'Buffer-menu-mode) (setq mode-name "Buffer Menu") - (make-local-variable 'revert-buffer-function) - (setq revert-buffer-function 'Buffer-menu-revert-function) + (set (make-local-variable 'revert-buffer-function) + 'Buffer-menu-revert-function) + (set (make-local-variable 'buffer-stale-function) + #'(lambda (&optional noconfirm) 'fast)) (setq truncate-lines t) (setq buffer-read-only t) (run-hooks 'buffer-menu-mode-hook)) @@ -184,7 +196,21 @@ Letters do not insert themselves; instead, they are commands. (revert-buffer)) (defun Buffer-menu-revert-function (ignore1 ignore2) - (list-buffers)) + ;; We can not use save-excursion here. The buffer gets erased. + (let ((old-point (point))) + (list-buffers-noselect Buffer-menu-files-only) + (goto-char old-point))) + +(defun Buffer-menu-toggle-files-only (arg) + "Toggle whether the current buffer-menu displays only file buffers. +With a positive ARG display only file buffers. With zero or +negative ARG, display other buffers as well." + (interactive "P") + (setq Buffer-menu-files-only + (cond ((not arg) (not Buffer-menu-files-only)) + ((> (prefix-numeric-value arg) 0) t))) + (revert-buffer)) + (defun Buffer-menu-buffer (error-if-non-existent-p) "Return buffer described by this line of buffer menu." @@ -547,6 +573,29 @@ For more information, see the function `buffer-menu'." ? ) size)) +(defun Buffer-menu-sort (column) + "Sort the buffer menu by COLUMN." + (interactive "P") + (when column + (setq column (prefix-numeric-value column)) + (if (< column 2) (setq column 2)) + (if (> column 5) (setq column 5))) + (setq Buffer-menu-sort-column column) + (Buffer-menu-revert)) + +(defun Buffer-menu-make-sort-button (name column) + (if (equal column Buffer-menu-sort-column) (setq column nil)) + (propertize name + 'help-echo (if column + (concat "mouse-2: sort by " (downcase name)) + "mouse-2: sort by visited order") + 'mouse-face 'highlight + 'keymap (let ((map (make-sparse-keymap))) + (define-key map [header-line mouse-2] + `(lambda () (interactive) + (Buffer-menu-sort ,column))) + map))) + (defun list-buffers-noselect (&optional files-only) "Create and return a buffer with a list of names of existing buffers. The buffer is named `*Buffer List*'. @@ -557,29 +606,25 @@ For more information, see the function `buffer-menu'." (let* ((old-buffer (current-buffer)) (standard-output standard-output) (mode-end (make-string (- Buffer-menu-mode-width 2) ? )) - (header (concat (propertize "CRM " 'face 'fixed-pitch) - (Buffer-menu-buffer+size "Buffer" "Size") - " Mode" mode-end "File\n")) - list desired-point name file mode) + (header (concat " " (propertize "CRM " 'face 'fixed-pitch) + (Buffer-menu-buffer+size + (Buffer-menu-make-sort-button "Buffer" 2) + (Buffer-menu-make-sort-button "Size" 3)) + " " + (Buffer-menu-make-sort-button "Mode" 4) mode-end + (Buffer-menu-make-sort-button "File" 5) "\n")) + list desired-point name file) (when Buffer-menu-use-header-line - (let ((spaces - (- (car (window-inside-edges)) - (car (window-edges)))) - (pos 0)) + (let ((pos 0)) ;; Turn spaces in the header into stretch specs so they work ;; regardless of the header-line face. (while (string-match "[ \t]+" header pos) (setq pos (match-end 0)) (put-text-property (match-beginning 0) pos 'display ;; Assume fixed-size chars - (list 'space :align-to (+ spaces pos)) - header)) - ;; Add the leading space - (setq header (concat (propertize (make-string (floor spaces) ? ) - 'display (list 'space :width spaces)) + (list 'space :align-to (1- pos)) header)))) - (save-excursion - (set-buffer (get-buffer-create "*Buffer List*")) + (with-current-buffer (get-buffer-create "*Buffer List*") (setq buffer-read-only nil) (erase-buffer) (setq standard-output (current-buffer)) @@ -662,6 +707,9 @@ For more information, see the function `buffer-menu'." ;; current buffer is not displayed for some reason. (and desired-point (goto-char desired-point)) + (setq Buffer-menu-files-only files-only) + (set-buffer-modified-p nil) (current-buffer)))) +;;; arch-tag: e7dfcfc9-6cb2-46e4-bf55-8ef1936d83c6 ;;; buff-menu.el ends here diff --git a/lisp/button.el b/lisp/button.el index d6f089327a..35905b9e1e 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -444,4 +444,5 @@ Returns the button found." (provide 'button) +;;; arch-tag: 5f2c7627-413b-4097-b282-630f89d9c5e9 ;;; button.el ends here diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 5c0c27e703..bc2f8f3b15 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -1133,4 +1133,5 @@ (math-read-angle-brackets)) (t (throw 'syntax "Expected a number"))))) +;;; arch-tag: 5599e45d-e51e-44bb-9a20-9f4ed8c96c32 ;;; calc-aent.el ends here diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el index fe2ca52ed9..45ffff8bac 100644 --- a/lisp/calc/calc-alg.el +++ b/lisp/calc/calc-alg.el @@ -1618,4 +1618,5 @@ (math-scale-int 1 (- (nth 2 f))))))) f)) +;;; arch-tag: 52e7dcdf-9688-464d-a02b-4bbe789348d0 ;;; calc-alg.el ends here diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el index 0faef258b8..b8893bb3e1 100644 --- a/lisp/calc/calc-arith.el +++ b/lisp/calc/calc-arith.el @@ -2793,4 +2793,5 @@ (math-commutative-collect (nth 2 b) (not neg))) (setq bterms (cons (if neg (math-neg b) b) bterms))))) +;;; arch-tag: 6c396b5b-14c6-40ed-bb2a-7cc2e8111465 ;;; calc-arith.el ends here diff --git a/lisp/calc/calc-bin.el b/lisp/calc/calc-bin.el index c32ac9e34a..aaaa4683fc 100644 --- a/lisp/calc/calc-bin.el +++ b/lisp/calc/calc-bin.el @@ -804,4 +804,5 @@ math-radix-float-cache)))))))) +;;; arch-tag: f6dba7bc-53b2-41ae-919c-c266ab0ca8b3 ;;; calc-bin.el ends here diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el index 5772a90f6a..c7ecbecc80 100644 --- a/lisp/calc/calc-comb.el +++ b/lisp/calc/calc-comb.el @@ -1001,4 +1001,5 @@ +;;; arch-tag: 1d75ee9b-0815-42bd-a321-bb3dc001cc02 ;;; calc-comb.el ends here diff --git a/lisp/calc/calc-cplx.el b/lisp/calc/calc-cplx.el index 3730254403..0f9c0d1cf9 100644 --- a/lisp/calc/calc-cplx.el +++ b/lisp/calc/calc-cplx.el @@ -358,4 +358,5 @@ (t (calc-record-why 'numberp a) (list 'calcFunc-im a))))) +;;; arch-tag: de73a331-941c-4507-ae76-46c76adc70dd ;;; calc-cplx.el ends here diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index 61299b6d68..5fd77fe625 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -320,6 +320,7 @@ This is not required to be present for user-written mode annotations.") (aset info 8 val) (calc-embedded-update info 14 t t)))) +;;;###autoload (defun calc-do-embedded-activate (arg cbuf) (calc-plain-buffer-only) (if arg @@ -341,8 +342,8 @@ This is not required to be present for user-written mode annotations.") (setcdr active (delq (car info) (cdr active))))) (goto-char (point-min)) (while (re-search-forward pat nil t) - (if (looking-at calc-embedded-open-formula) - (goto-char (match-end 1))) +;;; (if (looking-at calc-embedded-open-formula) +;;; (goto-char (match-end 1))) (setq info (calc-embedded-make-info (point) cbuf nil)) (or (eq (car-safe (aref info 8)) 'error) (goto-char (aref info 5)))))) @@ -1202,4 +1203,5 @@ The command \\[yank] can retrieve it from there." (setq bp (if buf nil (cdr bp)))) (or first calc-embedded-quiet (message ""))))) +;;; arch-tag: 1b8f311e-fba1-40d3-b8c3-1d6f68fd26fc ;;; calc-embed.el ends here diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 5907688baa..47c02bc285 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1,6 +1,6 @@ ;;; calc-ext.el --- various extension functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2004 Free Software Foundation, Inc. ;; Author: David Gillespie ;; Maintainers: D. Goel @@ -591,6 +591,9 @@ (define-key calc-mode-map "v}" 'calc-matrix-brackets) (define-key calc-mode-map "v(" 'calc-vector-parens) (define-key calc-mode-map "v)" 'calc-matrix-brackets) + ;; We can't rely on the automatic upper->lower conversion because + ;; in the global map V is explicitly bound, so we need to bind it + ;; explicitly as well :-( --stef (define-key calc-mode-map "V" (lookup-key calc-mode-map "v")) (define-key calc-mode-map "z" 'nil) @@ -1262,7 +1265,7 @@ calc-kill calc-kill-region calc-yank)))) (if key (if msgs (message "%s: %s: %c-" group (car msgs) key) - (message "%s: (none) %c-" group (car msgs) key)) + (message "%s: (none) %c-" group key)) (message "%s: %s" group (car msgs)))) (and key (calc-unread-command key)))) @@ -3287,4 +3290,5 @@ A key may contain additional specs for Inverse, Hyperbolic, and Inv+Hyp.") (run-hooks 'calc-ext-load-hook) +;;; arch-tag: 1814ba7f-a390-49dc-9e25-a5adc205e97e ;;; calc-ext.el ends here diff --git a/lisp/calc/calc-fin.el b/lisp/calc/calc-fin.el index adb74b0e3a..74b5b0dbee 100644 --- a/lisp/calc/calc-fin.el +++ b/lisp/calc/calc-fin.el @@ -413,4 +413,5 @@ book salvage))) res))) +;;; arch-tag: 82f30ca8-d02f-4b33-84b4-bb6ecd84597b ;;; calc-fin.el ends here diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 1791f03430..31f9e776a0 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el @@ -1,6 +1,6 @@ ;;; calc-forms.el --- data format conversion functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc. ;; Author: David Gillespie ;; Maintainers: D. Goel @@ -212,11 +212,11 @@ ", to zone: ")))) (if (stringp old) (setq old (math-read-expr old))) (if (eq (car-safe old) 'error) - (error "Error in expression: " (nth 1 old))) + (error "Error in expression: %S" (nth 1 old))) (if (equal new "") (setq new "local")) (if (stringp new) (setq new (math-read-expr new))) (if (eq (car-safe new) 'error) - (error "Error in expression: " (nth 1 new))) + (error "Error in expression: %S" (nth 1 new))) (calc-enter-result 1 "tzcv" (list 'calcFunc-tzconv (calc-top-n 1) old new))))) @@ -1822,4 +1822,5 @@ and ends on the last Sunday of October at 2 a.m." (math-read-token) res)) +;;; arch-tag: a3d8f33b-9508-4043-8060-d02b8c9c750c ;;; calc-forms.el ends here diff --git a/lisp/calc/calc-frac.el b/lisp/calc/calc-frac.el index 443b647b4e..3aa3bbdae4 100644 --- a/lisp/calc/calc-frac.el +++ b/lisp/calc/calc-frac.el @@ -225,4 +225,5 @@ (math-reject-arg b 'integerp)) (math-reject-arg a 'integerp))) +;;; arch-tag: 89d65274-0b3b-42d8-aacd-eaf86da5b4ea ;;; calc-frac.el ends here diff --git a/lisp/calc/calc-funcs.el b/lisp/calc/calc-funcs.el index 65da1376da..fcf11bd65e 100644 --- a/lisp/calc/calc-funcs.el +++ b/lisp/calc/calc-funcs.el @@ -973,4 +973,5 @@ (put 'calcFunc-ltpt 'math-expandable t) +;;; arch-tag: 421ddb7a-550f-4dda-a31c-06638ebfc43a ;;; calc-funcs.el ends here diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el index 032575048c..df7bbe377a 100644 --- a/lisp/calc/calc-graph.el +++ b/lisp/calc/calc-graph.el @@ -1437,4 +1437,5 @@ This \"dumb\" driver will be present in Gnuplot 3.0." (goto-char (point-max)) (insert "\n")))))) +;;; arch-tag: e4b06a52-c386-4d54-a2bb-7c0a0ef533c2 ;;; calc-graph.el ends here diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index ba77605566..e66f50bd40 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el @@ -655,4 +655,5 @@ C-w Describe how there is no warranty for Calc." "} (matrix brackets); . (abbreviate); / (multi-lines)") "vec/mat" ?v)) +;;; arch-tag: 2d347593-7591-449e-a64a-93dab5f2f686 ;;; calc-help.el ends here diff --git a/lisp/calc/calc-incom.el b/lisp/calc/calc-incom.el index 8d85a9edef..b8bb7ab4f9 100644 --- a/lisp/calc/calc-incom.el +++ b/lisp/calc/calc-incom.el @@ -226,4 +226,5 @@ (error "Interval form is incomplete")) (t (error "Object is incomplete")))) +;;; arch-tag: b8001270-4dc7-481b-a3e3-a952e19b390d ;;; calc-incom.el ends here diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el index 7d94a239cf..1ad703eb9c 100644 --- a/lisp/calc/calc-keypd.el +++ b/lisp/calc/calc-keypd.el @@ -613,4 +613,5 @@ (error "Not a Calc command: %s" (key-description keys))))) +;;; arch-tag: 4ba0d360-2bb6-40b8-adfa-eb373765b3f9 ;;; calc-keypd.el ends here diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index 661905b207..bb6699a4ac 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el @@ -1113,4 +1113,5 @@ (setq h (1+ h)))) h)) +;;; arch-tag: 483bfe15-f290-4fef-bb7d-ce65be687f2e ;;; calc-lang.el ends here diff --git a/lisp/calc/calc-macs.el b/lisp/calc/calc-macs.el index 1782a34611..68a92159d0 100644 --- a/lisp/calc/calc-macs.el +++ b/lisp/calc/calc-macs.el @@ -201,4 +201,5 @@ (or (consp b) (< a b)))) +;;; arch-tag: 08ba8ec2-fcff-4b80-a079-ec661bdb057e ;;; calc-macs.el ends here diff --git a/lisp/calc/calc-maint.el b/lisp/calc/calc-maint.el index a597fb8086..9e73b85381 100644 --- a/lisp/calc/calc-maint.el +++ b/lisp/calc/calc-maint.el @@ -388,4 +388,5 @@ Usage: C-x C-f calc.texinfo RET (save-buffer)) (message "Wrote file calcsum.tex")) +;;; arch-tag: 46cf3de8-6248-4a11-9034-d9850195761d ;;; calc-maint.el ends here diff --git a/lisp/calc/calc-map.el b/lisp/calc/calc-map.el index b7cf8f71ba..a6a5777df7 100644 --- a/lisp/calc/calc-map.el +++ b/lisp/calc/calc-map.el @@ -1,6 +1,6 @@ ;;; calc-map.el --- higher-order functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc. ;; Author: David Gillespie ;; Maintainers: D. Goel @@ -700,10 +700,7 @@ (calcFunc-afixp . 2)))))) (oper3 (if (eq (nth 2 oper) 'calcFunc-inner) (calc-get-operator - (format "%s%s, inner (add)" msg dir - (substring - (symbol-name (nth 2 oper)) - 9))) + (format "%s%s, inner (add)" msg dir)) '(0 0 0))) (args nil) (nargs (if (> (nth 1 oper) 0) @@ -1261,4 +1258,5 @@ (setq mat (cons (cons 'vec row) mat))) (cons 'vec (nreverse mat)))) +;;; arch-tag: 980eac49-00e0-4870-b72a-e726b74c7990 ;;; calc-map.el ends here diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el index 093679232e..1456a8e2b5 100644 --- a/lisp/calc/calc-math.el +++ b/lisp/calc/calc-math.el @@ -1676,4 +1676,5 @@ (t (list 'calcFunc-deg a)))) (put 'calcFunc-deg 'math-expandable t) +;;; arch-tag: c7367e8e-d0b8-4f70-8577-2fb3f31dbb4c ;;; calc-math.el ends here diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index 648840a5bb..772b39ffed 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el @@ -746,4 +746,5 @@ doing 'M-x toggle-debug-on-error', then reproducing the bug. " ))) (defalias 'calc-report-bug 'report-calc-bug) +;;; arch-tag: 7984d9d0-62e5-41dc-afb8-e904b975f250 ;;; calc-misc.el ends here diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el index 5febb343e3..00f5658022 100644 --- a/lisp/calc/calc-mode.el +++ b/lisp/calc/calc-mode.el @@ -674,4 +674,5 @@ (error "Unrecognized character: %c" (aref arg bad))) (calc-change-mode 'calc-matrix-brackets code t)))) +;;; arch-tag: ecc70eea-c712-43f2-9085-4205e58d6ddf ;;; calc-mode.el ends here diff --git a/lisp/calc/calc-mtx.el b/lisp/calc/calc-mtx.el index 8f331e3e96..99442d4d33 100644 --- a/lisp/calc/calc-mtx.el +++ b/lisp/calc/calc-mtx.el @@ -365,4 +365,5 @@ (math-reject-arg m "*Singular matrix")) (math-reject-arg m 'square-matrixp))) +;;; arch-tag: fc0947b1-90e1-4a23-8950-d8ead9c3a306 ;;; calc-mtx.el ends here diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el index 21318deede..213b7dc447 100644 --- a/lisp/calc/calc-poly.el +++ b/lisp/calc/calc-poly.el @@ -1139,4 +1139,5 @@ (defun calcFunc-expandpow (x n) (math-normalize (math-expand-power x n))) +;;; arch-tag: d2566c51-2ccc-45f1-8c50-f3462c2953ff ;;; calc-poly.el ends here diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 84bcbdd7a8..5733938ad7 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -2242,4 +2242,5 @@ (math-read-expr-level (nth 3 op)) (nth 1 x)) (throw 'syntax "Syntax error")))))) +;;; arch-tag: 4c5a183b-c9e5-4632-bb3f-e41a764518b0 ;;; calc-prog.el ends here diff --git a/lisp/calc/calc-rewr.el b/lisp/calc/calc-rewr.el index 21553ed0dd..51cffb753f 100644 --- a/lisp/calc/calc-rewr.el +++ b/lisp/calc/calc-rewr.el @@ -2043,4 +2043,5 @@ nil nil) (cdr rules))))))) +;;; arch-tag: ca8d7b7d-bff1-4535-90f3-e2241f5e786b ;;; calc-rewr.el ends here diff --git a/lisp/calc/calc-rules.el b/lisp/calc/calc-rules.el index 90abce2218..f11df8e1f5 100644 --- a/lisp/calc/calc-rules.el +++ b/lisp/calc/calc-rules.el @@ -438,4 +438,5 @@ fitsystem(y, xv, pv, 0) := fitsystem(y, xv, cons(fvh,fvt)) hasfitparams(pv)))), fitparam(n) = x := x ]")) +;;; arch-tag: 0ed54a52-38f3-4ed7-9ca7-b8ecf8f2febe ;;; calc-rules.el ends here diff --git a/lisp/calc/calc-sel.el b/lisp/calc/calc-sel.el index 07820a44b2..abc90d80e5 100644 --- a/lisp/calc/calc-sel.el +++ b/lisp/calc/calc-sel.el @@ -825,4 +825,5 @@ (interactive "P") (calc-sel-add-both-sides no-simp t)) +;;; arch-tag: e5169792-777d-428f-bff5-acca66813fa2 ;;; calc-sel.el ends here diff --git a/lisp/calc/calc-stat.el b/lisp/calc/calc-stat.el index 2f844969bd..42d58776a4 100644 --- a/lisp/calc/calc-stat.el +++ b/lisp/calc/calc-stat.el @@ -586,4 +586,5 @@ (math-div (math-mul suminvsqrwts (1- len)) len)) (if pop len (1- len))))))))) +;;; arch-tag: 423858e9-8513-489c-9f35-710cd9d9c307 ;;; calc-stat.el ends here diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index dadc2e45ab..cb7156bfc7 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el @@ -619,4 +619,5 @@ (calc-slow-wrapper (calc-binary-op "sub" 'calcFunc-subscr arg))) +;;; arch-tag: 2fbfec82-a521-42ca-bcd8-4f254ae6313e ;;; calc-store.el ends here diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el index 33f8d964e6..6b26139884 100644 --- a/lisp/calc/calc-stuff.el +++ b/lisp/calc/calc-stuff.el @@ -288,4 +288,5 @@ With a prefix, push that prefix as a number onto the stack." (nth 2 expr))) (t (cons (car expr) (mapcar 'math-map-over-constants-rec (cdr expr)))))) +;;; arch-tag: 789332ef-a178-49d3-8fb7-5d7ed7e21f56 ;;; calc-stuff.el ends here diff --git a/lisp/calc/calc-trail.el b/lisp/calc/calc-trail.el index ebea9a4868..cee2b4fc46 100644 --- a/lisp/calc/calc-trail.el +++ b/lisp/calc/calc-trail.el @@ -177,4 +177,5 @@ (kill-line n))) (calc-trail-here))) +;;; arch-tag: 59b76655-d882-4aab-a3ee-b83870e530d0 ;;; calc-trail.el ends here diff --git a/lisp/calc/calc-undo.el b/lisp/calc/calc-undo.el index a90a3e1668..4e9a14f4aa 100644 --- a/lisp/calc/calc-undo.el +++ b/lisp/calc/calc-undo.el @@ -150,4 +150,5 @@ (or (eq (car (car list)) 'pop) (calc-undo-does-pushes (cdr list))))) +;;; arch-tag: eeb485d2-fb3d-454a-9d79-450af1f50d6c ;;; calc-undo.el ends here diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index 952606788e..b8735a9dc3 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -1300,4 +1300,5 @@ Entries are (SYMBOL EXPR DOC-STRING TEMP-TYPE BASE-UNITS).") ;; coding: iso-latin-1 ;; End: +;;; arch-tag: e993314f-3adc-4191-be61-4ef8874881c4 ;;; calc-units.el ends here diff --git a/lisp/calc/calc-vec.el b/lisp/calc/calc-vec.el index 9762eab758..51d7450278 100644 --- a/lisp/calc/calc-vec.el +++ b/lisp/calc/calc-vec.el @@ -1577,4 +1577,5 @@ (setq mat (nconc mat (list (math-read-vector))))) mat) +;;; arch-tag: 7902a7af-ec69-440a-8635-ebb4db263402 ;;; calc-vec.el ends here diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 351a8ed2e5..6d9db84c36 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -571,4 +571,5 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (calc-enter-result num "edit" vals) (calc-enter-result 1 "edit" vals (- num)))))))))) +;;; arch-tag: ca61019e-caca-4daa-b32c-b6afe372d5b5 ;;; calc-yank.el ends here diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 6312b20919..782275c9b0 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -1,6 +1,6 @@ ;;; calc.el --- the GNU Emacs calculator -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: David Gillespie ;; Maintainers: D. Goel @@ -733,13 +733,13 @@ scientific notation in calc-mode.") (define-key map "\M-\C-m" 'calc-last-args-stub) (define-key map "\C-j" 'calc-over) - (mapcar (lambda (x) (define-key map (char-to-string x) 'undefined)) - "lOW") - (mapcar (lambda (x) (define-key map (char-to-string x) 'calc-missing-key)) - (concat "ABCDEFGHIJKLMNPQRSTUVXZabcdfghjkmoprstuvwxyz" - ":\\|!()[]<>{},;=~`\C-k\M-k\C-w\M-w\C-y\C-_")) - (mapcar (lambda (x) (define-key map (char-to-string x) 'calcDigit-start)) - "_0123456789.#@") + (mapc (lambda (x) (define-key map (char-to-string x) 'undefined)) + "lOW") + (mapc (lambda (x) (define-key map (char-to-string x) 'calc-missing-key)) + (concat "ABCDEFGHIJKLMNPQRSTUVXZabcdfghjkmoprstuvwxyz" + ":\\|!()[]<>{},;=~`\C-k\M-k\C-w\M-w\C-y\C-_")) + (mapc (lambda (x) (define-key map (char-to-string x) 'calcDigit-start)) + "_0123456789.#@") map)) (defvar calc-digit-map @@ -2952,8 +2952,7 @@ If mouse is pressed in Calc window, push cut buffer contents onto the stack." (if (eq calc-language 'big) (setq s (concat s "\n")) (when calc-line-numbering - (aset s 0 ?1) - (aset s 1 ?:))) + (setq s (concat "1:" (substring s 2))))) (setcar (cdr entry) (calc-count-lines s)) s)) @@ -3375,4 +3374,5 @@ Also looks for the equivalent TeX words, \\gets and \\evalto." (run-hooks 'calc-load-hook) +;;; arch-tag: 0c3b170c-4ce6-4eaf-8d9b-5834d1fe938f ;;; calc.el ends here diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index 9bde5fad57..2a463009e5 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el @@ -3418,4 +3418,5 @@ (math-normalize accum)))) (list 'calcFunc-taylor expr var num)))) +;;; arch-tag: f2932ec8-dd63-418b-a542-11a644b9d4c4 ;;; calcalg2.el ends here diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el index 4025e337ae..56ee7f6987 100644 --- a/lisp/calc/calcalg3.el +++ b/lisp/calc/calcalg3.el @@ -1775,4 +1775,5 @@ (while (setq expr (cdr expr)) (math-all-vars-rec (car expr))))) +;;; arch-tag: ff9f2920-8111-48b5-b3fa-b0682c3e44a6 ;;; calcalg3.el ends here diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index 2379b2ff5f..59bbbebdc0 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el @@ -1707,4 +1707,5 @@ (math-comp-to-string-raw-step (cdr cl) indent)) "")) +;;; arch-tag: 7c45d10a-a286-4dab-af49-7ae8989fbf78 ;;; calccomp.el ends here diff --git a/lisp/calc/calcsel2.el b/lisp/calc/calcsel2.el index 25a5b529e6..66f6ce88bc 100644 --- a/lisp/calc/calcsel2.el +++ b/lisp/calc/calcsel2.el @@ -296,4 +296,5 @@ (interactive "P") (calc-rewrite-selection "InvertRules" many "jinv")) +;;; arch-tag: 7c5b8d65-b8f0-45d9-820d-9930f8ee114b ;;; calcsel2.el ends here diff --git a/lisp/calculator.el b/lisp/calculator.el index 64f6ea8af1..a9410ae961 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -1687,4 +1687,5 @@ To use this, apply a binary operator (evaluate it), then call this." (provide 'calculator) +;;; arch-tag: a1b9766c-af8a-4a74-b466-65ad8eeb0c73 ;;; calculator.el ends here diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index c3f4d77fca..002aec878c 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -1,6 +1,6 @@ ;;; appt.el --- appointment notification functions -;; Copyright (C) 1989, 1990, 1994, 1998 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1990, 1994, 1998, 2004 Free Software Foundation, Inc. ;; Author: Neil Mager ;; Maintainer: FSF @@ -27,7 +27,7 @@ ;; ;; appt.el - visible and/or audible notification of -;; appointments from ~/diary file. +;; appointments from diary file. ;; ;;; ;;; Thanks to Edward M. Reingold for much help and many suggestions, @@ -35,62 +35,41 @@ ;;; ;;; ;;; This functions in this file will alert the user of a -;;; pending appointment based on their diary file. +;;; pending appointment based on his/her diary file. This package +;;; is documented in the Emacs manual. ;;; -;;; A message will be displayed in the mode line of the Emacs buffer -;;; and (if you request) the terminal will beep and display a message -;;; from the diary in the mini-buffer, or you can choose to -;;; have a message displayed in a new buffer. +;;; To activate this package, simply use (appt-activate 1). +;;; A `diary-file' with appointments of the format described in the +;;; documentation of the function `appt-check' is required. +;;; Relevant customizable variables are also listed in the +;;; documentation of that function. ;;; -;;; The variable `appt-message-warning-time' allows the -;;; user to specify how much notice they want before the appointment. The -;;; variable `appt-issue-message' specifies whether the user wants -;;; to be notified of a pending appointment. +;;; Today's appointment list is initialized from the diary when this +;;; package is activated. Additionally, the appointments list is +;;; recreated automatically at 12:01am for those who do not logout +;;; every day or are programming late. It is also updated when the +;;; `diary-file' is saved. Calling `appt-check' with an argument forces +;;; a re-initialization at any time. ;;; -;;; In order to use the appt package, you only need -;;; to load it---provided you have appointments. -;;; -;;; Before that, you can also set some options if you want -;;; (setq view-diary-entries-initially t) -;;; (setq appt-issue-message t) -;;; -;;; This is an example of what can be in your diary file: -;;; Monday -;;; 9:30am Coffee break -;;; 12:00pm Lunch -;;; -;;; Based upon the above lines in your .emacs and diary files, -;;; the calendar and diary will be displayed when you enter -;;; Emacs and your appointments list will automatically be created. -;;; You will then be reminded at 9:20am about your coffee break -;;; and at 11:50am to go to lunch. -;;; -;;; Use describe-function on appt-check for a description of other variables -;;; that can be used to personalize the notification system. -;;; -;;; In order to add or delete items from todays list, use appt-add -;;; and appt-delete. -;;; -;;; Additionally, the appointments list is recreated automatically -;;; at 12:01am for those who do not logout every day or are programming -;;; late. +;;; In order to add or delete items from today's list, without +;;; changing the diary file, use `appt-add' and `appt-delete'. ;;; + ;;; Brief internal description - Skip this if you are not interested! ;;; -;;; The function appt-make-list creates the appointments list which appt-check -;;; reads. This is all done automatically. -;;; It is invoked from the function list-diary-entries. +;;; The function `appt-make-list' creates the appointments list which +;;; `appt-check' reads. ;;; ;;; You can change the way the appointment window is created/deleted by -;;; setting the variables +;;; setting the variables ;;; ;;; appt-disp-window-function ;;; and ;;; appt-delete-window-function ;;; -;;; For instance, these variables can be set to functions that display +;;; For instance, these variables could be set to functions that display ;;; appointments in pop-up frames, which are lowered or iconified after -;;; appt-display-interval minutes. +;;; `appt-display-interval' minutes. ;;; ;;; Code: @@ -98,16 +77,19 @@ ;; Make sure calendar is loaded when we compile this. (require 'calendar) -(provide 'appt) ;;;###autoload (defcustom appt-issue-message t "*Non-nil means check for appointments in the diary buffer. -To be detected, the diary entry must have the time -as the first thing on a line." +To be detected, the diary entry must have the format described in the +documentation of the function `appt-check'." :type 'boolean :group 'appt) +(make-obsolete-variable 'appt-issue-message + "use the function `appt-activate', and the \ +variable `appt-display-format' instead." "21.4") + ;;;###autoload (defcustom appt-message-warning-time 12 "*Time in minutes before an appointment that the warning begins." @@ -122,80 +104,157 @@ as the first thing on a line." ;;;###autoload (defcustom appt-visible t - "*Non-nil means display appointment message in echo area." + "*Non-nil means display appointment message in echo area. +This variable is only relevant if `appt-msg-window' is nil." :type 'boolean :group 'appt) +(make-obsolete-variable 'appt-visible 'appt-display-format "21.4") + ;;;###autoload -(defcustom appt-display-mode-line t - "*Non-nil means display minutes to appointment and time on the mode line." +(defcustom appt-msg-window t + "*Non-nil means display appointment message in another window. +If non-nil, this variable overrides `appt-visible'." :type 'boolean :group 'appt) +(make-obsolete-variable 'appt-msg-window 'appt-display-format "21.4") + +;; TODO - add popup. +(defcustom appt-display-format 'ignore + "How appointment reminders should be displayed. +The options are: + window - use a separate window + echo - use the echo area + nil - no visible reminder. +See also `appt-audible' and `appt-display-mode-line'. + +The default value is 'ignore, which means to fall back on the value +of the (obsolete) variables `appt-msg-window' and `appt-visible'." + :type '(choice + (const :tag "Separate window" window) + (const :tag "Echo-area" echo) + (const :tag "No visible display" nil)) + :group 'appt + :version "21.4") + ;;;###autoload -(defcustom appt-msg-window t - "*Non-nil means display appointment message in another window." +(defcustom appt-display-mode-line t + "*Non-nil means display minutes to appointment and time on the mode line. +This is in addition to any other display of appointment messages." :type 'boolean :group 'appt) ;;;###autoload (defcustom appt-display-duration 10 - "*The number of seconds an appointment message is displayed." + "*The number of seconds an appointment message is displayed. +Only relevant if reminders are to be displayed in their own window." :type 'integer :group 'appt) ;;;###autoload (defcustom appt-display-diary t - "*Non-nil means to display the next days diary on the screen. + "*Non-nil displays the diary when the appointment list is first initialized. This will occur at midnight when the appointment list is updated." :type 'boolean :group 'appt) -(defvar appt-time-msg-list nil - "The list of appointments for today. -Use `appt-add' and `appt-delete' to add and delete appointments from list. -The original list is generated from the today's `diary-entries-list'. -The number before each time/message is the time in minutes from midnight.") - -(defconst appt-max-time 1439 - "11:59pm in minutes - number of minutes in a day minus 1.") - (defcustom appt-display-interval 3 "*Number of minutes to wait between checking the appointment list." :type 'integer :group 'appt) +(defcustom appt-disp-window-function 'appt-disp-window + "Function called to display appointment window. +Only relevant if reminders are being displayed in a window." + :type '(choice (const appt-disp-window) + function) + :group 'appt) + +(defcustom appt-delete-window-function 'appt-delete-window + "Function called to remove appointment window and buffer. +Only relevant if reminders are being displayed in a window." + :type '(choice (const appt-delete-window) + function) + :group 'appt) + + +;;; Internal variables below this point. + (defvar appt-buffer-name " *appt-buf*" "Name of the appointments buffer.") -(defvar appt-disp-window-function 'appt-disp-window - "Function called to display appointment window.") +(defvar appt-time-msg-list nil + "The list of appointments for today. +Use `appt-add' and `appt-delete' to add and delete appointments. +The original list is generated from today's `diary-entries-list', and +can be regenerated using the function `appt-check'. +Each element of the generated list has the form (MINUTES) STRING; where +MINUTES is the time in minutes of the appointment after midnight, and +STRING is the description of the appointment.") -(defvar appt-delete-window-function 'appt-delete-window - "Function called to remove appointment window and buffer.") +(defconst appt-max-time 1439 + "11:59pm in minutes - number of minutes in a day minus 1.") (defvar appt-mode-string nil "String being displayed in the mode line saying you have an appointment. -The actual string includes the amount of time till the appointment.") +The actual string includes the amount of time till the appointment. +Only used if `appt-display-mode-line' is non-nil.") (defvar appt-prev-comp-time nil - "Time of day (mins since midnight) at which we last checked appointments.") + "Time of day (mins since midnight) at which we last checked appointments. +A nil value forces the diary file to be (re-)checked for appointments.") (defvar appt-now-displayed nil "Non-nil when we have started notifying about a appointment that is near.") -(defvar appt-display-count nil) +(defvar appt-display-count nil + "Internal variable used to count number of consecutive reminders.") -(defun appt-check () - "Check for an appointment and update the mode line. -Note: the time must be the first thing in the line in the diary -for a warning to be issued. +(defvar appt-timer nil + "Timer used for diary appointment notifications (`appt-check'). +If this is non-nil, appointment checking is active.") + + +;;; Functions. + +(defun appt-display-message (string mins) + "Display a reminder about an appointment. +The string STRING describes the appointment, due in integer MINS minutes. +The format of the visible reminder is controlled by `appt-display-format'. +The variable `appt-audible' controls the audible reminder." + ;; let binding for backwards compatability. Remove when obsolete + ;; vars appt-msg-window and appt-visible are dropped. + (let ((appt-display-format + (if (eq appt-display-format 'ignore) + (cond (appt-msg-window 'window) + (appt-visible 'echo)) + appt-display-format))) + (cond ((eq appt-display-format 'window) + (funcall appt-disp-window-function + (number-to-string mins) + (format-time-string "%a %b %e " (current-time)) + string) + (run-at-time (format "%d sec" appt-display-duration) + nil + appt-delete-window-function)) + ((eq appt-display-format 'echo) + (message "%s" string))) + (if appt-audible (beep 1)))) + + +(defun appt-check (&optional force) + "Check for an appointment and update any reminder display. +If optional argument FORCE is non-nil, reparse the diary file for +appointments. Otherwise the diary file is only parsed once per day, +and when saved. -The format of the time can be either 24 hour or am/pm. -Example: +Note: the time must be the first thing in the line in the diary +for a warning to be issued. The format of the time can be either +24 hour or am/pm. For example: - 02/23/89 - 18:00 Dinner + 02/23/89 + 18:00 Dinner Thursday 11:45am Lunch meeting. @@ -203,42 +262,41 @@ Example: Appointments are checked every `appt-display-interval' minutes. The following variables control appointment notification: -`appt-issue-message' - If t, the diary buffer is checked for appointments. - -`appt-message-warning-time' - Variable used to determine if appointment message - should be displayed. +`appt-display-format' + Controls the format in which reminders are displayed. `appt-audible' - Variable used to determine if appointment is audible. + Variable used to determine if reminder is audible. Default is t. -`appt-visible' - Variable used to determine if appointment message should be - displayed in the mini-buffer. Default is t. +`appt-message-warning-time' + Variable used to determine when appointment message + should first be displayed. + +`appt-display-mode-line' + If non-nil, a generic message giving the time remaining + is shown in the mode-line when an appointment is due. + +`appt-display-interval' + Interval in minutes at which to check for pending appointments. + +`appt-display-diary' + Display the diary buffer when the appointment list is + initialized for the first time in a day. -`appt-msg-window' - Variable used to determine if appointment message - should temporarily appear in another window. Mutually exclusive - to `appt-visible'. +The following variables are only relevant if reminders are being +displayed in a window: `appt-display-duration' - The number of seconds an appointment message - is displayed in another window. + The number of seconds an appointment message is displayed. `appt-disp-window-function' - Function called to display appointment window. You can customize - appt.el by setting this variable to a function different from the - one provided with this package. + Function called to display appointment window. `appt-delete-window-function' - Function called to remove appointment window and buffer. You can - customize appt.el by setting this variable to a function different - from the one provided with this package." + Function called to remove appointment window and buffer." (let* ((min-to-app -1) - (new-time "") (prev-appt-mode-string appt-mode-string) (prev-appt-display-count (or appt-display-count 0)) ;; Non-nil means do a full check for pending appointments @@ -248,7 +306,7 @@ The following variables control appointment notification: (full-check (or (not appt-now-displayed) ;; This is true every appt-display-interval minutes. - (= 0 (mod prev-appt-display-count appt-display-interval)))) + (zerop (mod prev-appt-display-count appt-display-interval)))) ;; Non-nil means only update the interval displayed in the mode line. (mode-line-only (and (not full-check) appt-now-displayed))) @@ -267,19 +325,38 @@ The following variables control appointment notification: ;; At the first check in any given day, update our ;; appointments to today's list. - (if (or (null appt-prev-comp-time) - (< cur-comp-time appt-prev-comp-time)) + (if (or force ; eg initialize, diary save + (null appt-prev-comp-time) ; first check + (< cur-comp-time appt-prev-comp-time)) ; new day (condition-case nil - (progn - (if (and view-diary-entries-initially appt-display-diary) - (diary) - (let ((diary-display-hook 'appt-make-list)) - (diary)))) + (if appt-display-diary + (let ((diary-hook + (if (assoc 'appt-make-list diary-hook) + diary-hook + (cons 'appt-make-list diary-hook)))) + (diary)) + (let ((diary-display-hook 'appt-make-list) + (d-buff (find-buffer-visiting + (substitute-in-file-name diary-file))) + selective) + (if d-buff ; diary buffer exists + (with-current-buffer d-buff + (setq selective selective-display))) + (diary) + ;; If the diary buffer existed before this command, + ;; restore its display state. Otherwise, kill it. + (if d-buff + ;; Displays the diary buffer. + (or selective (show-all-diary-entries)) + (and + (setq d-buff (find-buffer-visiting + (substitute-in-file-name diary-file))) + (kill-buffer d-buff))))) (error nil))) - (setq appt-prev-comp-time cur-comp-time) - (setq appt-mode-string nil) - (setq appt-display-count nil) + (setq appt-prev-comp-time cur-comp-time + appt-mode-string nil + appt-display-count nil) ;; If there are entries in the list, and the ;; user wants a message issued, @@ -317,45 +394,21 @@ The following variables control appointment notification: (when (and (<= min-to-app appt-message-warning-time) (>= min-to-app 0)) - (setq appt-now-displayed t) - (setq appt-display-count - (1+ prev-appt-display-count)) + (setq appt-now-displayed t + appt-display-count (1+ prev-appt-display-count)) (unless mode-line-only - (if appt-msg-window - (progn - (setq new-time (format-time-string "%a %b %e " - (current-time))) - (funcall - appt-disp-window-function - (number-to-string min-to-app) new-time - (car (cdr (car appt-time-msg-list)))) - - (run-at-time - (format "%d sec" appt-display-duration) - nil - appt-delete-window-function)) - ;;; else - - (if appt-visible - (message "%s" - (car (cdr (car appt-time-msg-list))))) - - (if appt-audible - (beep 1)))) - + (appt-display-message (cadr (car appt-time-msg-list)) + min-to-app)) (when appt-display-mode-line (setq appt-mode-string - (concat " App't in " - (number-to-string min-to-app) - " min. "))) + (format " App't in %s min." min-to-app))) ;; When an appointment is reached, ;; delete it from the list. ;; Reset the count to 0 in case we display another ;; appointment on the next cycle. - (if (= min-to-app 0) - (setq appt-time-msg-list - (cdr appt-time-msg-list) + (if (zerop min-to-app) + (setq appt-time-msg-list (cdr appt-time-msg-list) appt-display-count nil))))) ;; If we have changed the mode line string, @@ -372,7 +425,9 @@ The following variables control appointment notification: (defun appt-disp-window (min-to-app new-time appt-msg) - "Display appointment message APPT-MSG in a separate buffer." + "Display appointment message APPT-MSG in a separate buffer. +The appointment is due in MIN-TO-APP (a string) minutes. +NEW-TIME is a string giving the date." (require 'electric) ;; Make sure we're not in the minibuffer @@ -384,9 +439,8 @@ The following variables control appointment notification: (if (display-multi-frame-p) (select-frame (other-frame 1))))) - (let* ((this-buffer (current-buffer)) - (this-window (selected-window)) - (appt-disp-buf (set-buffer (get-buffer-create appt-buffer-name)))) + (let ((this-window (selected-window)) + (appt-disp-buf (set-buffer (get-buffer-create appt-buffer-name)))) (if (cdr (assq 'unsplittable (frame-parameters))) ;; In an unsplittable frame, use something somewhere else. @@ -405,9 +459,7 @@ The following variables control appointment notification: (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t)) (set-buffer-modified-p nil) (raise-frame (selected-frame)) - (select-window this-window) - (if appt-audible - (beep 1)))) + (select-window this-window))) (defun appt-delete-window () "Function called to undisplay appointment messages. @@ -437,10 +489,9 @@ Usually just deletes the appointment buffer." The time should be in either 24 hour format or am/pm format." (interactive "sTime (hh:mm[am/pm]): \nsMessage: ") - (if (string-match "[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?" new-appt-time) - nil + (unless (string-match "[0-9]?[0-9][:.][0-9][0-9]\\(am\\|pm\\)?" + new-appt-time) (error "Unacceptable time-string")) - (let* ((appt-time-string (concat new-appt-time " " new-appt-msg)) (appt-time (list (appt-convert-time new-appt-time))) (time-msg (cons appt-time (list appt-time-string)))) @@ -451,7 +502,7 @@ The time should be in either 24 hour format or am/pm format." (defun appt-delete () "Delete an appointment from the list of appointments." (interactive) - (let* ((tmp-msg-list appt-time-msg-list)) + (let ((tmp-msg-list appt-time-msg-list)) (while tmp-msg-list (let* ((element (car tmp-msg-list)) (prompt-string (concat "Delete " @@ -475,15 +526,11 @@ The time should be in either 24 hour format or am/pm format." (defvar diary-entries-list)) ;;;###autoload (defun appt-make-list () - "Create the appointments list from todays diary buffer. + "Create the appointments list from today's diary buffer. The time must be at the beginning of a line for it to be -put in the appointments list. - 02/23/89 - 12:00pm lunch - Wednesday - 10:00am group meeting -We assume that the variables DATE and NUMBER -hold the arguments that `list-diary-entries' received. +put in the appointments list (see examples in documentation of +the function `appt-check'). We assume that the variables DATE and +NUMBER hold the arguments that `list-diary-entries' received. They specify the range of dates that the diary is being processed for." ;; We have something to do if the range of dates that the diary is @@ -519,7 +566,7 @@ They specify the range of dates that the diary is being processed for." (calendar-current-date) (car (car entry-list)))) (let ((time-string (cadr (car entry-list)))) (while (string-match - "\\([0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?\\).*" + "\\([0-9]?[0-9][:.][0-9][0-9]\\(am\\|pm\\)?\\).*" time-string) (let* ((beg (match-beginning 0)) ;; Get just the time for this appointment. @@ -527,7 +574,7 @@ They specify the range of dates that the diary is being processed for." ;; Find the end of this appointment ;; (the start of the next). (end (string-match - "^[ \t]*[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?" + "^[ \t]*[0-9]?[0-9][:.][0-9][0-9]\\(am\\|pm\\)?" time-string (match-end 0))) ;; Get the whole string for this appointment. @@ -556,47 +603,33 @@ They specify the range of dates that the diary is being processed for." (cur-hour (nth 2 now)) (cur-min (nth 1 now)) (cur-comp-time (+ (* cur-hour 60) cur-min)) - (appt-comp-time (car (car (car appt-time-msg-list))))) + (appt-comp-time (car (caar appt-time-msg-list)))) (while (and appt-time-msg-list (< appt-comp-time cur-comp-time)) (setq appt-time-msg-list (cdr appt-time-msg-list)) (if appt-time-msg-list - (setq appt-comp-time (car (car (car appt-time-msg-list)))))))))) + (setq appt-comp-time (car (caar appt-time-msg-list))))))))) (defun appt-sort-list (appt-list) - "Simple sort to put the appointments list APPT-LIST in order. -Scan the list for the smallest element left in the list. -Append the smallest element left into the new list, and remove -it from the original list." - (let ((order-list nil)) - (while appt-list - (let* ((element (car appt-list)) - (element-time (car (car element))) - (tmp-list (cdr appt-list))) - (while tmp-list - (if (< element-time (car (car (car tmp-list)))) - nil - (setq element (car tmp-list)) - (setq element-time (car (car element)))) - (setq tmp-list (cdr tmp-list))) - (setq order-list (nconc order-list (list element))) - (setq appt-list (delq element appt-list)))) - order-list)) + "Sort an appointment list, putting earlier items at the front. +APPT-LIST is a list of the same format as `appt-time-msg-list'." +(sort appt-list (lambda (e1 e2) (< (caar e1) (caar e2))))) (defun appt-convert-time (time2conv) - "Convert hour:min[am/pm] format to minutes from midnight." - + "Convert hour:min[am/pm] format to minutes from midnight. +A period (.) can be used instead of a colon (:) to separate the +hour and minute parts." (let ((conv-time 0) (hr 0) (min 0)) - (string-match ":\\([0-9][0-9]\\)" time2conv) + (string-match "[:.]\\([0-9][0-9]\\)" time2conv) (setq min (string-to-int (match-string 1 time2conv))) - (string-match "[0-9]?[0-9]:" time2conv) + (string-match "[0-9]?[0-9][:.]" time2conv) (setq hr (string-to-int (match-string 0 time2conv))) @@ -614,15 +647,45 @@ it from the original list." (setq conv-time (+ (* hr 60) min)) conv-time)) -(defvar appt-timer nil - "Timer used for diary appointment notifications (`appt-check').") -(unless appt-timer - (setq appt-timer (run-at-time t 60 'appt-check))) +(defun appt-update-list () + "If the current buffer is visiting the diary, update appointments. +This function is intended for use with `write-file-functions'." + (and (string-equal buffer-file-name (expand-file-name diary-file)) + appt-timer + (let ((appt-display-diary nil)) + (appt-check t))) + nil) + + +;;;###autoload +(defun appt-activate (&optional arg) +"Toggle checking of appointments. +With optional numeric argument ARG, turn appointment checking on if +ARG is positive, otherwise off." + (interactive "P") + (let ((appt-active appt-timer)) + (setq appt-active (if arg (> (prefix-numeric-value arg) 0) + (not appt-active))) + (remove-hook 'write-file-functions 'appt-update-list) + (or global-mode-string (setq global-mode-string '(""))) + (delq 'appt-mode-string global-mode-string) + (when appt-timer + (cancel-timer appt-timer) + (setq appt-timer nil)) + (when appt-active + (add-hook 'write-file-functions 'appt-update-list) + (setq appt-timer (run-at-time t 60 'appt-check) + global-mode-string + (append global-mode-string '(appt-mode-string))) + (appt-check t)))) + + +;; This is needed for backwards compatibility. Feh. +(appt-activate 1) + -(or global-mode-string (setq global-mode-string '(""))) -(or (memq 'appt-mode-string global-mode-string) - (setq global-mode-string - (append global-mode-string '(appt-mode-string)))) +(provide 'appt) +;;; arch-tag: bf5791c4-8921-499e-a26f-772b1788d347 ;;; appt.el ends here diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el index 3749b4c628..6e506b93f7 100644 --- a/lisp/calendar/cal-china.el +++ b/lisp/calendar/cal-china.el @@ -501,4 +501,5 @@ Echo Chinese date unless NOECHO is t." (provide 'cal-china) +;;; arch-tag: 7e5b7e0d-676c-47e3-8696-93e7ea0ab644 ;;; cal-china.el ends here diff --git a/lisp/calendar/cal-coptic.el b/lisp/calendar/cal-coptic.el index 13c731f98f..df1201a23c 100644 --- a/lisp/calendar/cal-coptic.el +++ b/lisp/calendar/cal-coptic.el @@ -151,14 +151,14 @@ Echo Coptic date unless NOECHO is t." (calendar-coptic-from-absolute (calendar-absolute-from-gregorian today)))))) (completion-ignore-case t) - (month (cdr (assoc-ignore-case + (month (cdr (assoc-string (completing-read (format "%s calendar month name: " coptic-name) (mapcar 'list (append coptic-calendar-month-name-array nil)) nil t) (calendar-make-alist coptic-calendar-month-name-array - 1)))) + 1) t))) (last (coptic-calendar-last-day-of-month month year)) (day (calendar-read (format "%s calendar day (1-%d): " coptic-name last) @@ -234,4 +234,5 @@ Echo Ethiopic date unless NOECHO is t." (provide 'cal-coptic) +;;; arch-tag: 72d49161-25df-4072-9312-b182cdca7627 ;;; cal-coptic.el ends here diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el index 2c6c2a3033..68943b77b2 100644 --- a/lisp/calendar/cal-dst.el +++ b/lisp/calendar/cal-dst.el @@ -394,4 +394,5 @@ Conversion to daylight savings time is done according to (provide 'cal-dst) +;;; arch-tag: a141d204-213c-4ca5-bdc6-f9df3aa92aad ;;; cal-dst.el ends here diff --git a/lisp/calendar/cal-french.el b/lisp/calendar/cal-french.el index c21375e28c..d988b008f5 100644 --- a/lisp/calendar/cal-french.el +++ b/lisp/calendar/cal-french.el @@ -228,12 +228,12 @@ Echo French Revolutionary date unless NOECHO is t." (concat "Jour " x)) special-days)))))))) (completion-ignore-case t) - (month (cdr (assoc-ignore-case + (month (cdr (assoc-string (completing-read "Mois ou Sansculottide: " month-list nil t) - (calendar-make-alist month-list 1 'car)))) + (calendar-make-alist month-list 1 'car) t))) (day (if (> month 12) (- month 12) (calendar-read @@ -254,4 +254,5 @@ Echo French Revolutionary date unless NOECHO is t." (provide 'cal-french) +;;; arch-tag: 7e8045a3-8609-46b5-9cde-cf40ce541cf9 ;;; cal-french.el ends here diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index 46d593bae6..776868159b 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el @@ -236,17 +236,17 @@ Driven by the variable `calendar-date-display-form'." calendar-hebrew-month-name-array-leap-year calendar-hebrew-month-name-array-common-year)) (completion-ignore-case t) - (month (cdr (assoc-ignore-case + (month (cdr (assoc-string (completing-read "Hebrew calendar month name: " (mapcar 'list (append month-array nil)) (if (= year 3761) '(lambda (x) (let ((m (cdr - (assoc-ignore-case + (assoc-string (car x) - (calendar-make-alist - month-array))))) + (calendar-make-alist month-array) + t)))) (< 0 (calendar-absolute-from-hebrew (list m @@ -254,7 +254,7 @@ Driven by the variable `calendar-date-display-form'." m year) year)))))) t) - (calendar-make-alist month-array 1)))) + (calendar-make-alist month-array 1) t))) (last (hebrew-calendar-last-day-of-month month year)) (first (if (and (= year 3761) (= month 10)) 18 1)) @@ -753,18 +753,18 @@ is provided for use as part of the nongregorian-diary-marking-hook." (string-to-int y-str))))) (if dd-name (mark-calendar-days-named - (cdr (assoc-ignore-case dd-name + (cdr (assoc-string dd-name (calendar-make-alist calendar-day-name-array - 0 nil calendar-day-abbrev-array)))) + 0 nil calendar-day-abbrev-array) t))) (if mm-name (setq mm (if (string-equal mm-name "*") 0 (cdr - (assoc-ignore-case + (assoc-string mm-name (calendar-make-alist - calendar-hebrew-month-name-array-leap-year)))))) + calendar-hebrew-month-name-array-leap-year) t))))) (mark-hebrew-calendar-date-pattern mm dd yy))))) (setq d (cdr d))))) @@ -839,12 +839,12 @@ from the cursor position." (int-to-string (extract-calendar-year today)))) (month-array calendar-month-name-array) (completion-ignore-case t) - (month (cdr (assoc-ignore-case + (month (cdr (assoc-string (completing-read "Month of death (name): " (mapcar 'list (append month-array nil)) nil t) - (calendar-make-alist month-array 1)))) + (calendar-make-alist month-array 1) t))) (last (calendar-last-day-of-month month year)) (day (calendar-read (format "Day of death (1-%d): " last) @@ -1205,4 +1205,5 @@ have 30 days), and has Passover start on Tuesday.") (provide 'cal-hebrew) +;;; arch-tag: aaab6718-7712-42ac-a32d-28fe1f944f3c ;;; cal-hebrew.el ends here diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el index c4eb50b477..8dcf5c29b1 100644 --- a/lisp/calendar/cal-islam.el +++ b/lisp/calendar/cal-islam.el @@ -154,12 +154,12 @@ Driven by the variable `calendar-date-display-form'." (calendar-absolute-from-gregorian today)))))) (month-array calendar-islamic-month-name-array) (completion-ignore-case t) - (month (cdr (assoc-ignore-case + (month (cdr (assoc-string (completing-read "Islamic calendar month name: " (mapcar 'list (append month-array nil)) nil t) - (calendar-make-alist month-array 1)))) + (calendar-make-alist month-array 1) t))) (last (islamic-calendar-last-day-of-month month year)) (day (calendar-read (format "Islamic calendar day (1-%d): " last) @@ -372,16 +372,16 @@ provided for use as part of the nongregorian-diary-marking-hook." (string-to-int y-str))))) (if dd-name (mark-calendar-days-named - (cdr (assoc-ignore-case dd-name + (cdr (assoc-string dd-name (calendar-make-alist calendar-day-name-array - 0 nil calendar-day-abbrev-array)))) + 0 nil calendar-day-abbrev-array) t))) (if mm-name (setq mm (if (string-equal mm-name "*") 0 - (cdr (assoc-ignore-case + (cdr (assoc-string mm-name (calendar-make-alist - calendar-islamic-month-name-array)))))) + calendar-islamic-month-name-array) t))))) (mark-islamic-calendar-date-pattern mm dd yy))))) (setq d (cdr d))))) @@ -497,4 +497,5 @@ Prefix arg will make the entry nonmarking." (provide 'cal-islam) +;;; arch-tag: a951b6c1-6f47-48d5-bac3-1b505cd719f7 ;;; cal-islam.el ends here diff --git a/lisp/calendar/cal-iso.el b/lisp/calendar/cal-iso.el index 97c9cbeee6..0d9ad45c7d 100644 --- a/lisp/calendar/cal-iso.el +++ b/lisp/calendar/cal-iso.el @@ -127,4 +127,5 @@ Defaults to today's date if DATE is not given." (provide 'cal-iso) +;;; arch-tag: 3c0154cc-d30f-4981-9f60-42bdf7a468f6 ;;; cal-iso.el ends here diff --git a/lisp/calendar/cal-julian.el b/lisp/calendar/cal-julian.el index 95482cff8a..67fb8515b2 100644 --- a/lisp/calendar/cal-julian.el +++ b/lisp/calendar/cal-julian.el @@ -115,12 +115,12 @@ Driven by the variable `calendar-date-display-form'." today)))))) (month-array calendar-month-name-array) (completion-ignore-case t) - (month (cdr (assoc-ignore-case + (month (cdr (assoc-string (completing-read "Julian calendar month name: " (mapcar 'list (append month-array nil)) nil t) - (calendar-make-alist month-array 1)))) + (calendar-make-alist month-array 1) t))) (last (if (and (zerop (% year 4)) (= month 2)) 29 @@ -210,4 +210,5 @@ Echo astronomical (Julian) day number unless NOECHO is t." (provide 'cal-julian) +;;; arch-tag: 0520acdd-1c60-4188-9aa8-9b8c24d856ae ;;; cal-julian.el ends here diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el index b19d3fac01..c2c3e027c4 100644 --- a/lisp/calendar/cal-mayan.el +++ b/lisp/calendar/cal-mayan.el @@ -256,11 +256,11 @@ Returns nil if such a tzolkin-haab combination is impossible." (haab-month-list (append calendar-mayan-haab-month-name-array (and (< haab-day 5) '("Uayeb")))) (haab-month (cdr - (assoc-ignore-case + (assoc-string (completing-read "Haab uinal: " (mapcar 'list haab-month-list) nil t) - (calendar-make-alist haab-month-list 1))))) + (calendar-make-alist haab-month-list 1) t)))) (cons haab-day haab-month))) (defun calendar-read-mayan-tzolkin-date () @@ -271,11 +271,11 @@ Returns nil if such a tzolkin-haab combination is impossible." '(lambda (x) (and (> x 0) (< x 14))))) (tzolkin-name-list (append calendar-mayan-tzolkin-names-array nil)) (tzolkin-name (cdr - (assoc-ignore-case + (assoc-string (completing-read "Tzolkin uinal: " (mapcar 'list tzolkin-name-list) nil t) - (calendar-make-alist tzolkin-name-list 1))))) + (calendar-make-alist tzolkin-name-list 1) t)))) (cons tzolkin-count tzolkin-name))) (defun calendar-next-calendar-round-date @@ -376,4 +376,5 @@ Defaults to today's date if DATE is not given." (provide 'cal-mayan) +;;; arch-tag: 54f35144-cd0f-4873-935a-a60129de07df ;;; cal-mayan.el ends here diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index 3b973586ca..3c6cc78eb7 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el @@ -117,6 +117,8 @@ '("Astronomical Date" . calendar-goto-astro-day-number)) (define-key calendar-mode-map [menu-bar goto iso] '("ISO Date" . calendar-goto-iso-date)) +(define-key calendar-mode-map [menu-bar goto day-of-year] + '("Day of Year" . calendar-goto-day-of-year)) (define-key calendar-mode-map [menu-bar goto gregorian] '("Other Date" . calendar-goto-date)) (define-key calendar-mode-map [menu-bar goto end-of-year] @@ -164,6 +166,15 @@ (define-key calendar-mode-map [menu-bar scroll fwd-1] '("Forward 1 Month" . scroll-calendar-left)) +(defun calendar-flatten (list) + "Flatten LIST eliminating sublists structure; result is a list of atoms. +This is the same as the preorder list of leaves in a rooted forest." + (if (atom list) + (list list) + (if (cdr list) + (append (calendar-flatten (car list)) (calendar-flatten (cdr list))) + (calendar-flatten (car list))))) + (defun cal-menu-x-popup-menu (position menu) "Like `x-popup-menu', but prints an error message if popup menus are not available." @@ -307,53 +318,48 @@ ERROR is t, otherwise just returns nil." (if l l '("None"))))))) (and selection (call-interactively selection)))) -(defun calendar-mouse-view-diary-entries () - "Pop up menu of diary entries for mouse selected date." +(defun calendar-mouse-view-diary-entries (&optional date diary) + "Pop up menu of diary entries for mouse-selected date. +Use optional DATE and alternative file DIARY. + +Any holidays are shown if `holidays-in-diary-buffer' is t." (interactive) - (let* ((date (calendar-event-to-date)) - (l (mapcar '(lambda (x) (list (car (cdr x)))) - (let ((diary-list-include-blanks nil) - (diary-display-hook 'ignore)) - (list-diary-entries date 1)))) + (let* ((date (if date date (calendar-event-to-date))) + (diary-file (if diary diary diary-file)) + (diary-list-include-blanks nil) + (diary-display-hook 'ignore) + (diary-entries + (mapcar '(lambda (x) (split-string (car (cdr x)) "\^M\\|\n")) + (list-diary-entries date 1))) + (holidays (if holidays-in-diary-buffer + (mapcar '(lambda (x) (list x)) + (check-calendar-holidays date)))) + (title (concat "Diary entries " + (if diary (format "from %s " diary) "") + "for " + (calendar-date-string date))) (selection (cal-menu-x-popup-menu event - (list - (format "Diary entries for %s" (calendar-date-string date)) - (append - (list (format "Diary entries for %s" (calendar-date-string date))) - (if l l '("None"))))))) + (list title + (append + (list title) + (if holidays + (mapcar '(lambda (x) (list (concat " " (car x)))) + holidays)) + (if holidays + (list "--shadow-etched-in" "--shadow-etched-in")) + (if diary-entries + (mapcar 'list (calendar-flatten diary-entries)) + '("None"))))))) (and selection (call-interactively selection)))) (defun calendar-mouse-view-other-diary-entries () "Pop up menu of diary entries from alternative file on mouse-selected date." (interactive) - (let* ((date (calendar-event-to-date)) - (diary-list-include-blanks nil) - (diary-display-hook 'ignore) - (diary-file (read-file-name - "Enter diary file name: " - default-directory nil t)) - ; The following doesn't really do the right thing. The problem is - ; that a newline in the diary entry does not give a newline in a - ; pop-up menu; for that you need a separate list item. When the (car - ; (cdr x)) contains newlines, the item should be split into a list of - ; items. Too minor and messy to worry about. - (l (mapcar '(lambda (x) (list (car (cdr x)))) - (list-diary-entries date 1))) - (selection - (cal-menu-x-popup-menu - event - (list - (format "Diary entries from %s for %s" - diary-file - (calendar-date-string date)) - (append - (list (format "Diary entries from %s for %s" - diary-file - (calendar-date-string date))) - (if l l '("None"))))))) - (and selection (call-interactively selection)))) + (calendar-mouse-view-diary-entries + (calendar-event-to-date) + (read-file-name "Enter diary file name: " default-directory nil t))) (defun calendar-mouse-insert-diary-entry () "Insert diary entry for mouse-selected date." @@ -612,4 +618,5 @@ The output is in landscape format, one month to a page." (provide 'cal-menu) +;;; arch-tag: aa81cf73-ce89-48a4-97ec-9ef861e87fe9 ;;; cal-menu.el ends here diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index b711e226a0..045c11ba1d 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el @@ -327,6 +327,28 @@ Moves forward if ARG is negative." (calendar-cursor-to-visible-date date) (run-hooks 'calendar-move-hook)) +(defun calendar-goto-day-of-year (year day &optional noecho) + "Move cursor to YEAR, DAY number; echo DAY/YEAR unless NOECHO is t. +Negative DAY counts backward from end of year." + (interactive + (let* ((year (calendar-read + "Year (>0): " + (lambda (x) (> x 0)) + (int-to-string (extract-calendar-year + (calendar-current-date))))) + (last (if (calendar-leap-year-p year) 366 365)) + (day (calendar-read + (format "Day number (+/- 1-%d): " last) + '(lambda (x) (and (<= 1 (abs x)) (<= (abs x) last)))))) + (list year day))) + (calendar-goto-date + (calendar-gregorian-from-absolute + (if (< 0 day) + (+ -1 day (calendar-absolute-from-gregorian (list 1 1 year))) + (+ 1 day (calendar-absolute-from-gregorian (list 12 31 year)))))) + (or noecho (calendar-print-day-of-year))) + (provide 'cal-move) +;;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781 ;;; cal-move.el ends here diff --git a/lisp/calendar/cal-persia.el b/lisp/calendar/cal-persia.el index c9b8a2af07..ff09c14b47 100644 --- a/lisp/calendar/cal-persia.el +++ b/lisp/calendar/cal-persia.el @@ -206,4 +206,5 @@ Echo Persian date unless NOECHO is t." (provide 'cal-persia) +;;; arch-tag: 2832383c-e4b4-4dc2-8ee9-cfbdd53e5e2d ;;; cal-persia.el ends here diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index 5af65a380b..ac6fad4ed6 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el @@ -1781,4 +1781,5 @@ without erasing current contents." (provide 'cal-tex) +;;; arch-tag: ca8168a4-5a00-4508-a565-17e3bccce6d0 ;;; cal-tex.el ends here diff --git a/lisp/calendar/cal-x.el b/lisp/calendar/cal-x.el index 416230ef52..97fbb72af6 100644 --- a/lisp/calendar/cal-x.el +++ b/lisp/calendar/cal-x.el @@ -69,7 +69,9 @@ Location and color should be set in .Xdefaults.") Can be used to change frame parameters, such as font, color, location, etc.") (defun calendar-one-frame-setup (&optional arg) - "Start calendar and display it in a dedicated frame together with the diary." + "Start calendar and display it in a dedicated frame together with the diary. +This function requires a display capable of multiple frames, else +`calendar-basic-setup' is used instead." (if (not (display-multi-frame-p)) (calendar-basic-setup arg) (if (frame-live-p calendar-frame) (delete-frame calendar-frame)) @@ -97,7 +99,9 @@ Can be used to change frame parameters, such as font, color, location, etc.") 'diary)))))) (defun calendar-only-one-frame-setup (&optional arg) - "Start calendar and display it in a dedicated frame." + "Start calendar and display it in a dedicated frame. +This function requires a display capable of multiple frames, else +`calendar-basic-setup' is used instead." (if (not (display-multi-frame-p)) (calendar-basic-setup arg) (if (frame-live-p calendar-frame) (delete-frame calendar-frame)) @@ -116,7 +120,9 @@ Can be used to change frame parameters, such as font, color, location, etc.") (set-window-dedicated-p (selected-window) 'calendar)))))) (defun calendar-two-frame-setup (&optional arg) - "Start calendar and diary in separate, dedicated frames." + "Start calendar and diary in separate, dedicated frames. +This function requires a display capable of multiple frames, else +`calendar-basic-setup' is used instead." (if (not (display-multi-frame-p)) (calendar-basic-setup arg) (if (frame-live-p calendar-frame) (delete-frame calendar-frame)) @@ -162,4 +168,5 @@ Can be used to change frame parameters, such as font, color, location, etc.") (provide 'cal-x) +;;; arch-tag: c6dbddca-ae84-442d-87fc-244b76e38e17 ;;; cal-x.el ends here diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 88d389072c..0d38563e63 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1,7 +1,7 @@ ;;; calendar.el --- calendar functions ;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, -;; 2000, 2001, 2003 Free Software Foundation, Inc. +;; 2000, 2001, 2003, 2004 Free Software Foundation, Inc. ;; Author: Edward M. Reingold ;; Keywords: calendar @@ -154,10 +154,11 @@ the screen." ;;;###autoload (defcustom view-diary-entries-initially nil - "*Non-nil means display current date's diary entries on entry. + "*Non-nil means display current date's diary entries on entry to calendar. The diary is displayed in another window when the calendar is first displayed, if the current date is visible. The number of days of diary entries displayed -is governed by the variable `number-of-diary-entries'." +is governed by the variable `number-of-diary-entries'. This variable can +be overridden by the value of `calendar-setup'." :type 'boolean :group 'diary) @@ -573,7 +574,10 @@ are Names can be capitalized or not, written in full (as specified by the variable `calendar-day-name-array'), or abbreviated (as specified by -`calendar-day-abbrev-array') with or without a period." +`calendar-day-abbrev-array') with or without a period. To take effect, +this variable should be set before the calendar package and its associates +are loaded. Otherwise, use one of the functions `european-calendar' or +`american-calendar' to force the appropriate update." :type 'boolean :group 'diary) @@ -753,6 +757,7 @@ in your `.emacs' file to cause the fancy diary buffer to be displayed with diary entries from various included files, each day's entries sorted into lexicographic order." :type 'hook + :options '(include-other-diary-files sort-diary-entries) :group 'diary) ;;;###autoload @@ -785,6 +790,7 @@ diary buffer will not show days for which there are no diary entries, even if that day is a holiday; if you want such days to be shown in the fancy diary buffer, set the variable `diary-list-include-blanks' to t." :type 'hook + :options '(fancy-diary-display) :group 'diary) ;;;###autoload @@ -795,6 +801,7 @@ relevant entries. You can use either or both of `list-hebrew-diary-entries' and `list-islamic-diary-entries'. The documentation for these functions describes the style of such diary entries." :type 'hook + :options '(list-hebrew-diary-entries list-islamic-diary-entries) :group 'diary) ;;;###autoload @@ -812,6 +819,7 @@ variable `diary-include-string'. When you use `mark-included-diary-files' as part of the mark-diary-entries-hook, you will probably also want to use the function `include-other-diary-files' as part of `list-diary-entries-hook'." :type 'hook + :options '(mark-included-diary-files) :group 'diary) ;;;###autoload @@ -822,6 +830,7 @@ relevant entries. You can use either or both of `mark-hebrew-diary-entries' and `mark-islamic-diary-entries'. The documentation for these functions describes the style of such diary entries." :type 'hook + :options '(mark-hebrew-diary-entries mark-islamic-diary-entries) :group 'diary) ;;;###autoload @@ -1155,7 +1164,7 @@ example, to include American presidential elections, which occur on the first Tuesday after the first Monday in November of years divisible by 4, add (holiday-sexp - (if (zerop (% year 4)) + '(if (zerop (% year 4)) (calendar-gregorian-from-absolute (1+ (calendar-dayname-on-or-before 1 (+ 6 (calendar-absolute-from-gregorian @@ -1201,11 +1210,16 @@ with descriptive strings such as "Name of the buffer used for the lunar phases.") (defmacro increment-calendar-month (mon yr n) - "Move the variables MON and YR to the month and year by N months. -Forward if N is positive or backward if N is negative." - `(let ((macro-y (+ (* ,yr 12) ,mon -1 ,n))) - (setq ,mon (1+ (% macro-y 12))) - (setq ,yr (/ macro-y 12)))) + "Increment the variables MON and YR by N months. +Forward if N is positive or backward if N is negative. +A negative YR is interpreted as BC; -1 being 1 BC, and so on." + `(let (macro-y) + (if (< ,yr 0) (setq ,yr (1+ ,yr))) ; -1 BC -> 0 AD, etc + (setq macro-y (+ (* ,yr 12) ,mon -1 ,n) + ,mon (1+ (mod macro-y 12)) + ,yr (/ macro-y 12)) + (and (< macro-y 0) (> ,mon 1) (setq ,yr (1- ,yr))) + (if (< ,yr 1) (setq ,yr (1- ,yr))))) ; 0 AD -> -1 BC, etc (defmacro calendar-for-loop (var from init to final do &rest body) "Execute a for loop." @@ -1265,7 +1279,10 @@ Forward if N is positive or backward if N is negative." (car (cdr (cdr date)))) (defsubst calendar-leap-year-p (year) - "Return t if YEAR is a Gregorian leap year." + "Return t if YEAR is a Gregorian leap year. +A negative year is interpreted as BC; -1 being 1 BC, and so on." + ;; 1 BC = 0 AD, 2 BC acts like 1 AD, etc. + (if (< year 0) (setq year (1- (abs year)))) (and (zerop (% year 4)) (or (not (zerop (% year 100))) (zerop (% year 400))))) @@ -1305,13 +1322,30 @@ while (calendar-day-number '(12 31 1980)) returns 366." (defsubst calendar-absolute-from-gregorian (date) "The number of days elapsed between the Gregorian date 12/31/1 BC and DATE. -The Gregorian date Sunday, December 31, 1 BC is imaginary." - (let ((prior-years (1- (extract-calendar-year date)))) - (+ (calendar-day-number date);; Days this year - (* 365 prior-years);; + Days in prior years - (/ prior-years 4);; + Julian leap years - (- (/ prior-years 100));; - century years - (/ prior-years 400))));; + Gregorian leap years +The Gregorian date Sunday, December 31, 1 BC is imaginary. +DATE is a list of the form (month day year). A negative year is +interpreted as BC; -1 being 1 BC, and so on. Dates before 12/31/1 BC +return negative results." + (let ((year (extract-calendar-year date)) + offset-years) + (cond ((= year 0) + (error "There was no year zero")) + ((> year 0) + (setq offset-years (1- year)) + (+ (calendar-day-number date) ; Days this year + (* 365 offset-years) ; + Days in prior years + (/ offset-years 4) ; + Julian leap years + (- (/ offset-years 100)) ; - century years + (/ offset-years 400))) ; + Gregorian leap years + (t + ;; Years between date and 1 BC, excluding 1 BC (1 for 2 BC, etc). + (setq offset-years (abs (1+ year))) + (- (calendar-day-number date) + (* 365 offset-years) + (/ offset-years 4) + (- (/ offset-years 100)) + (/ offset-years 400) + (calendar-day-number '(12 31 -1))))))) ; days in year 1 BC (autoload 'calendar-goto-today "cal-move" "Reposition the calendar window so the current date is visible." @@ -1401,6 +1435,10 @@ The Gregorian date Sunday, December 31, 1 BC is imaginary." "Move cursor to DATE." t) +(autoload 'calendar-goto-day-of-year "cal-move" + "Move cursor to day of year." + t) + (autoload 'calendar-only-one-frame-setup "cal-x" "Start calendar and display it in a dedicated frame.") @@ -1411,12 +1449,19 @@ The Gregorian date Sunday, December 31, 1 BC is imaginary." "Start calendar and diary in separate, dedicated frames.") ;;;###autoload -(defvar calendar-setup nil - "The frame set up of the calendar. -The choices are `one-frame' (calendar and diary together in one separate, -dedicated frame), `two-frames' (calendar and diary in separate, dedicated -frames), `calendar-only' (calendar in a separate, dedicated frame); with -any other value the current frame is used.") +(defcustom calendar-setup nil + "The frame setup of the calendar. +The choices are: `one-frame' (calendar and diary together in one separate, +dedicated frame); `two-frames' (calendar and diary in separate, dedicated +frames); `calendar-only' (calendar in a separate, dedicated frame); with +any other value the current frame is used. Using any of the first +three options overrides the value of `view-diary-entries-initially'." + :type '(choice + (const :tag "calendar and diary in separate frame" one-frame) + (const :tag "calendar and diary each in own frame" two-frames) + (const :tag "calendar in separate frame" calendar-only) + (const :tag "use current frame" nil)) + :group 'calendar) ;;;###autoload (defun calendar (&optional arg) @@ -1870,6 +1915,7 @@ Or, for optional MON, YR." font-lock-mode) (font-lock-fontify-buffer)) (and mark-holidays-in-calendar +;;; (calendar-date-is-legal-p today) ; useful for BC dates (mark-calendar-holidays) (sit-for 0)) (unwind-protect @@ -1880,10 +1926,14 @@ Or, for optional MON, YR." (defun generate-calendar (month year) "Generate a three-month Gregorian calendar centered around MONTH, YEAR." +;;; A negative YEAR is interpreted as BC; -1 being 1 BC, and so on. +;;; Note that while calendars for years BC could be displayed as it +;;; stands, almost all other calendar functions (eg holidays) would +;;; at best have unpredictable results for such dates. (if (< (+ month (* 12 (1- year))) 2) (error "Months before February, 1 AD are not available")) - (setq displayed-month month) - (setq displayed-year year) + (setq displayed-month month + displayed-year year) (erase-buffer) (increment-calendar-month month year -1) (calendar-for-loop i from 0 to 2 do @@ -2011,6 +2061,7 @@ the inserted text. Value is always t." (define-key calendar-mode-map "\C-x\C-x" 'calendar-exchange-point-and-mark) (define-key calendar-mode-map "\e=" 'calendar-count-days-region) (define-key calendar-mode-map "gd" 'calendar-goto-date) + (define-key calendar-mode-map "gD" 'calendar-goto-day-of-year) (define-key calendar-mode-map "gj" 'calendar-goto-julian-date) (define-key calendar-mode-map "ga" 'calendar-goto-astro-day-number) (define-key calendar-mode-map "gh" 'calendar-goto-hebrew-date) @@ -2385,7 +2436,8 @@ ERROR is t, otherwise just returns nil." (defun calendar-gregorian-from-absolute (date) "Compute the list (month day year) corresponding to the absolute DATE. The absolute date is the number of days elapsed since the (imaginary) -Gregorian date Sunday, December 31, 1 BC." +Gregorian date Sunday, December 31, 1 BC. This function does not +handle dates in years BC." ;; See the footnote on page 384 of ``Calendrical Calculations, Part II: ;; Three Historical Calendars'' by E. M. Reingold, N. Dershowitz, and S. M. ;; Clamen, Software--Practice and Experience, Volume 23, Number 4 @@ -2496,12 +2548,12 @@ If optional NODAY is t, does not ask for day, but just returns (calendar-current-date))))) (month-array calendar-month-name-array) (completion-ignore-case t) - (month (cdr (assoc-ignore-case + (month (cdr (assoc-string (completing-read "Month name: " (mapcar 'list (append month-array nil)) nil t) - (calendar-make-alist month-array 1)))) + (calendar-make-alist month-array 1) t))) (last (calendar-last-day-of-month month year))) (if noday (if (eq noday t) @@ -2513,7 +2565,11 @@ If optional NODAY is t, does not ask for day, but just returns year)))) (defun calendar-interval (mon1 yr1 mon2 yr2) - "The number of months difference between MON1, YR1 and MON2, YR2." + "The number of months difference between MON1, YR1 and MON2, YR2. +The result is positive if the second date is later than the first. +Negative years are interpreted as years BC; -1 being 1 BC, and so on." + (if (< yr1 0) (setq yr1 (1+ yr1))) ; -1 BC -> 0 AD, etc + (if (< yr2 0) (setq yr2 (1+ yr2))) (+ (* 12 (- yr2 yr1)) (- mon2 mon1))) @@ -2564,10 +2620,12 @@ of full names. The return value is the ABBREV array, with any nil elements replaced by the first three characters taken from the corresponding element of FULL. If optional argument PERIOD is non-nil, each element returned has a final `.' character." - (let (elem array) + (let (elem array name) (dotimes (i (length full)) - (setq elem (or (aref abbrev i) - (substring (aref full i) 0 calendar-abbrev-length)) + (setq name (aref full i) + elem (or (aref abbrev i) + (substring name 0 + (min calendar-abbrev-length (length name)))) elem (format "%s%s" elem (if period "." "")) array (append array (list elem)))) (vconcat array))) @@ -2615,7 +2673,7 @@ If FILTER is provided, apply it to each key in the alist." (aseqp (if abbrevs (calendar-abbrev-construct abbrevs sequence 'period))) alist elem) - (dotimes (i (1- (length sequence)) (reverse alist)) + (dotimes (i (length sequence) (reverse alist)) (setq index (+ i offset) elem (elt sequence i) alist @@ -2642,8 +2700,10 @@ argument ABBREV is non-nil, in which case (1- month))) (defun calendar-day-of-week (date) - "Return the day-of-the-week index of DATE, 0 for Sunday, 1 for Monday, etc." - (% (calendar-absolute-from-gregorian date) 7)) + "Return the day-of-the-week index of DATE, 0 for Sunday, 1 for Monday, etc. +DATE is a list of the form (month day year). A negative year is +interpreted as BC; -1 being 1 BC, and so on." + (mod (calendar-absolute-from-gregorian date) 7)) (defun calendar-unmark () "Delete all diary/holiday marks/highlighting from the calendar." @@ -2666,6 +2726,9 @@ argument ABBREV is non-nil, in which case (year (extract-calendar-year date))) (and (<= 1 month) (<= month 12) (<= 1 day) (<= day (calendar-last-day-of-month month year)) + ;; BC dates left as non-legal, to suppress errors from + ;; complex holiday algorithms not suitable for years BC. + ;; Note there are side effects on calendar navigation. (<= 1 year)))) (defun calendar-date-equal (date1 date2) @@ -2698,16 +2761,16 @@ MARK defaults to `diary-entry-marker'." (delete-char 1) (insert mark) (forward-char -2)) - (progn ; attr list - (setq temp-face - (make-symbol (apply 'concat "temp-face-" - (mapcar '(lambda (sym) - (cond ((symbolp sym) (symbol-name sym)) - ((numberp sym) (int-to-string sym)) - (t sym))) mark)))) + (let ; attr list + ((temp-face + (make-symbol (apply 'concat "temp-face-" + (mapcar '(lambda (sym) + (cond ((symbolp sym) (symbol-name sym)) + ((numberp sym) (int-to-string sym)) + (t sym))) mark)))) + (faceinfo mark)) (make-face temp-face) ;; Remove :face info from the mark, copy the face info into temp-face - (setq faceinfo mark) (while (setq faceinfo (memq :face faceinfo)) (copy-face (read (nth 1 faceinfo)) temp-face) (setcar faceinfo nil) @@ -2871,7 +2934,10 @@ Defaults to today's date if DATE is not given." (defun calendar-set-mode-line (str) "Set mode line to STR, centered, surrounded by dashes." (setq mode-line-format - (calendar-string-spread (list str) ?- (frame-width)))) + (calendar-string-spread + (list str) ?- + ;; As per doc of window-width, total visible mode-line length. + (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges)))))) (defun calendar-mod (m n) "Non-negative remainder of M/N with N instead of 0." @@ -2885,4 +2951,5 @@ Defaults to today's date if DATE is not given." ;;; byte-compile-dynamic: t ;;; End: +;;; arch-tag: 19c61596-c8fb-4c69-bcf1-7dd739919cd8 ;;; calendar.el ends here diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 3e516aed3b..eba932847c 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1,6 +1,6 @@ ;;; diary-lib.el --- diary functions -;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1995, 2003 +;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1995, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Edward M. Reingold @@ -52,8 +52,8 @@ If so, return the expanded file name, otherwise signal an error." (defun diary (&optional arg) "Generate the diary window for ARG days starting with the current date. If no argument is provided, the number of days of diary entries is governed -by the variable `number-of-diary-entries'. This function is suitable for -execution in a `.emacs' file." +by the variable `number-of-diary-entries'. A value of ARG less than 1 +does nothing. This function is suitable for execution in a `.emacs' file." (interactive "P") (diary-check-diary-file) (let ((date (calendar-current-date))) @@ -258,12 +258,33 @@ search." (list entry ret-attr)))) +;; This can be removed once the kill/yank treatment of invisible text +;; (see etc/TODO) is fixed. -- gm +(defcustom diary-header-line-flag t + "*If non-nil, `simple-diary-display' will show a header line. +The format of the header is specified by `diary-header-line-format'." + :group 'diary + :type 'boolean + :version "21.4") + +(defcustom diary-header-line-format + '(:eval (calendar-string-spread + (list (if selective-display + "Selective display active - press \"s\" in calendar \ +before edit/copy" + "Diary")) + ?\ (frame-width))) + "*Format of the header line displayed by `simple-diary-display'. +Only used if `diary-header-line-flag' is non-nil." + :group 'diary + :type 'sexp + :version "21.4") (defun list-diary-entries (date number) "Create and display a buffer containing the relevant lines in diary-file. The arguments are DATE and NUMBER; the entries selected are those for NUMBER days starting with date DATE. The other entries are hidden -using selective display. +using selective display. If NUMBER is less than 1, this function does nothing. Returns a list of all relevant diary entries found, if any, in order by date. The list entries have the form ((month day year) string specifier) where @@ -293,27 +314,29 @@ These hooks have the following distinct roles: `diary-hook' is run last. This can be used for an appointment notification function." - (if (< 0 number) - (let ((original-date date);; save for possible use in the hooks - old-diary-syntax-table - diary-entries-list - file-glob-attrs - (date-string (calendar-date-string date)) - (d-file (substitute-in-file-name diary-file))) - (message "Preparing diary...") - (save-excursion - (let ((diary-buffer (find-buffer-visiting d-file))) - (if (not diary-buffer) - (set-buffer (find-file-noselect d-file t)) - (set-buffer diary-buffer) - (or (verify-visited-file-modtime diary-buffer) - (revert-buffer t t)))) - (setq file-glob-attrs (nth 1 (diary-pull-attrs nil ""))) - (setq selective-display t) - (setq selective-display-ellipses nil) - (setq old-diary-syntax-table (syntax-table)) - (set-syntax-table diary-syntax-table) - (unwind-protect + (when (> number 0) + (let ((original-date date);; save for possible use in the hooks + old-diary-syntax-table + diary-entries-list + file-glob-attrs + (date-string (calendar-date-string date)) + (d-file (substitute-in-file-name diary-file))) + (message "Preparing diary...") + (save-excursion + (let ((diary-buffer (find-buffer-visiting d-file))) + (if (not diary-buffer) + (set-buffer (find-file-noselect d-file t)) + (set-buffer diary-buffer) + (or (verify-visited-file-modtime diary-buffer) + (revert-buffer t t)))) + (setq file-glob-attrs (nth 1 (diary-pull-attrs nil ""))) + (setq selective-display t) + (setq selective-display-ellipses nil) + (if diary-header-line-flag + (setq header-line-format diary-header-line-format)) + (setq old-diary-syntax-table (syntax-table)) + (set-syntax-table diary-syntax-table) + (unwind-protect (let ((buffer-read-only nil) (diary-modified (buffer-modified-p)) (mark (regexp-quote diary-nonmarking-symbol))) @@ -409,7 +432,6 @@ These hooks have the following distinct roles: 'list-diary-entries-hook) (if diary-display-hook (run-hooks 'diary-display-hook) - ;; FIXME Error if calendar-setup 'calendar-only -- gm. (simple-diary-display)) (run-hooks 'diary-hook) diary-entries-list)))) @@ -466,17 +488,19 @@ changing the variable `diary-include-string'." "Display the diary buffer if there are any relevant entries or holidays." (let* ((holiday-list (if holidays-in-diary-buffer (check-calendar-holidays original-date))) - (msg (format "No diary entries for %s %s" - (concat date-string (if holiday-list ":" "")) - (mapconcat 'identity holiday-list "; ")))) - (calendar-set-mode-line - (concat "Diary for " date-string - (if holiday-list ": " "") - (mapconcat 'identity holiday-list "; "))) + (hol-string (format "%s%s%s" + date-string + (if holiday-list ": " "") + (mapconcat 'identity holiday-list "; "))) + (msg (format "No diary entries for %s" hol-string)) + ;; If selected window is dedicated (to the calendar), + ;; need a new one to display the diary. + (pop-up-frames (window-dedicated-p (selected-window)))) + (calendar-set-mode-line (format "Diary for %s" hol-string)) (if (or (not diary-entries-list) (and (not (cdr diary-entries-list)) (string-equal (car (cdr (car diary-entries-list))) ""))) - (if (<= (length msg) (frame-width)) + (if (< (length msg) (frame-width)) (message "%s" msg) (set-buffer (get-buffer-create holiday-buffer)) (setq buffer-read-only nil) @@ -530,7 +554,6 @@ This function is provided for optional use as the `diary-display-hook'." (message "%s" msg) (set-buffer (get-buffer-create holiday-buffer)) (setq buffer-read-only nil) - (calendar-set-mode-line date-string) (erase-buffer) (insert (mapconcat 'identity holiday-list "\n")) (goto-char (point-min)) @@ -563,8 +586,10 @@ This function is provided for optional use as the `diary-display-hook'." (extract-calendar-month date)) (setq holiday-list-last-year (extract-calendar-year date)) - (increment-calendar-month - holiday-list-last-month holiday-list-last-year 1) + (progn + (increment-calendar-month + holiday-list-last-month holiday-list-last-year 1) + t) (setq holiday-list (let ((displayed-month holiday-list-last-month) (displayed-year holiday-list-last-year)) @@ -611,10 +636,10 @@ This function is provided for optional use as the `diary-display-hook'." sym (symbol-name sym))) marks)))) - faceinfo) - ;; Remove :face info from the marks, + (faceinfo marks)) + (make-face temp-face) + ;; Remove :face info from the marks, ;; copy the face info into temp-face - (setq faceinfo marks) (while (setq faceinfo (memq :face faceinfo)) (copy-face (read (nth 1 faceinfo)) temp-face) (setcar faceinfo nil) @@ -632,6 +657,7 @@ This function is provided for optional use as the `diary-display-hook'." (setq buffer-read-only t) (display-buffer fancy-diary-buffer) (fancy-diary-display-mode) + (calendar-set-mode-line date-string) (message "Preparing diary...done")))) (defun make-fancy-diary-buffer () @@ -691,7 +717,8 @@ This function gets rid of the selective display of the diary file so that all entries, not just some, are visible. If there is no diary buffer, one is created." (interactive) - (let ((d-file (diary-check-diary-file))) + (let ((d-file (diary-check-diary-file)) + (pop-up-frames (window-dedicated-p (selected-window)))) (save-excursion (set-buffer (or (find-buffer-visiting d-file) (find-file-noselect d-file t))) @@ -881,19 +908,19 @@ After the entries are marked, the hooks `nongregorian-diary-marking-hook' and marks (nth 1 temp)))) (if dd-name (mark-calendar-days-named - (cdr (assoc-ignore-case + (cdr (assoc-string dd-name (calendar-make-alist calendar-day-name-array - 0 nil calendar-day-abbrev-array))) marks) + 0 nil calendar-day-abbrev-array) t)) marks) (if mm-name (setq mm (if (string-equal mm-name "*") 0 - (cdr (assoc-ignore-case + (cdr (assoc-string mm-name (calendar-make-alist calendar-month-name-array - 1 nil calendar-month-abbrev-array)))))) + 1 nil calendar-month-abbrev-array) t))))) (mark-calendar-date-pattern mm dd yy marks)))) (setq d (cdr d)))) (mark-sexp-diary-entries) @@ -1073,12 +1100,15 @@ after those with times." (defun diary-entry-time (s) "Return time at the beginning of the string S as a military-style integer. For example, returns 1325 for 1:25pm. -Returns `diary-unknown-time' (default value -9999) if no time is recognized. The recognized forms are XXXX, X:XX, or -XX:XX (military time), and XXam, XXAM, XXpm, XXPM, XX:XXam, XX:XXAM XX:XXpm, -or XX:XXPM." + +Returns `diary-unknown-time' (default value -9999) if no time is recognized. +The recognized forms are XXXX, X:XX, or XX:XX (military time), and XXam, +XXAM, XXpm, XXPM, XX:XXam, XX:XXAM XX:XXpm, or XX:XXPM. A period (.) can +be used instead of a colon (:) to separate the hour and minute parts." (let ((case-fold-search nil)) (cond ((string-match ; Military time - "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\):?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)" s) + "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)" + s) (+ (* 100 (string-to-int (substring s (match-beginning 1) (match-end 1)))) (string-to-int (substring s (match-beginning 2) (match-end 2))))) @@ -1090,7 +1120,7 @@ or XX:XXPM." (if (equal ?a (downcase (aref s (match-beginning 2)))) 0 1200))) ((string-match ; Hour and minute XX:XXam or XX:XXpm - "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\):\\([0-9][0-9]\\)\\([ap]\\)m\\>" s) + "\\`[ \t\n\\^M]*\\([0-9]?[0-9]\\)[:.]\\([0-9][0-9]\\)\\([ap]\\)m\\>" s) (+ (* 100 (% (string-to-int (substring s (match-beginning 1) (match-end 1))) 12)) @@ -1262,7 +1292,7 @@ A number of built-in functions are available for this type of diary entry: Marking these entries is *extremely* time consuming, so these entries are best if they are nonmarking." - (let ((s-entry (concat "\\(\\`\\|\^M\\|\n\\)" + (let ((s-entry (concat "\\(\\`\\|\^M\\|\n\\)" (regexp-quote diary-nonmarking-symbol) "?" (regexp-quote sexp-diary-entry-symbol) @@ -1589,7 +1619,8 @@ Do nothing if DATE or STRING is nil." (defun make-diary-entry (string &optional nonmarking file) "Insert a diary entry STRING which may be NONMARKING in FILE. If omitted, NONMARKING defaults to nil and FILE defaults to `diary-file'." - (find-file-other-window (substitute-in-file-name (or file diary-file))) + (let ((pop-up-frames (window-dedicated-p (selected-window)))) + (find-file-other-window (substitute-in-file-name (or file diary-file)))) (widen) (goto-char (point-max)) (when (let ((case-fold-search t)) @@ -1696,13 +1727,13 @@ Prefix arg will make the entry nonmarking." arg))) ;;;###autoload -(define-derived-mode diary-mode text-mode +(define-derived-mode diary-mode fundamental-mode "Diary" "Major mode for editing the diary file." (set (make-local-variable 'font-lock-defaults) '(diary-font-lock-keywords t))) -(define-derived-mode fancy-diary-display-mode text-mode +(define-derived-mode fancy-diary-display-mode fundamental-mode "Diary" "Major mode used while displaying diary entries using Fancy Display." (set (make-local-variable 'font-lock-defaults) @@ -1728,7 +1759,7 @@ Prefix arg will make the entry nonmarking." '("^\\(Erev \\)?Rosh Hodesh.*" . font-lock-function-name-face) '("^Day.*omer.*$" . font-lock-builtin-face) '("^Parashat.*$" . font-lock-comment-face) - '("^[ \t]*[0-9]?[0-9]\\(:?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\(-[0-9]?[0-9]\\(:?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\)?" + '("^[ \t]*[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\(-[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)?\\)?" . font-lock-variable-name-face)) "Keywords to highlight in fancy diary display") @@ -1823,11 +1854,12 @@ names." "?\\(" (regexp-quote islamic-diary-entry-symbol) "\\)") '(1 font-lock-reference-face)) '(font-lock-diary-sexps . font-lock-keyword-face) - '("[0-9]?[0-9]\\(:?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)\\(-[0-9]?[0-9]\\(:?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)\\)?" + '("[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)\\(-[0-9]?[0-9]\\([:.]?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)\\)?" . font-lock-function-name-face))) "Forms to highlight in diary-mode") (provide 'diary-lib) +;;; arch-tag: 22dd506e-2e33-410d-9ae1-095a0c1b2010 ;;; diary-lib.el ends here diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 0678135e2c..b262ac50a3 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -510,4 +510,5 @@ date. If date is nil, or if the date is not visible, there is no holiday." (provide 'holidays) +;;; arch-tag: 48eb3117-75a7-4dbe-8fd9-873c3cbb0d37 ;;; holidays.el ends here diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 183e28b5b6..7efed3ff27 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el @@ -398,4 +398,5 @@ calendar-time-zone." (provide 'lunar) +;;; arch-tag: 72f0b8a4-7bcc-4a1b-b67a-ff53c4a1d222 ;;; lunar.el ends here diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el index 7020e490b4..bf75b18621 100644 --- a/lisp/calendar/parse-time.el +++ b/lisp/calendar/parse-time.el @@ -174,6 +174,7 @@ ((5) (0 49) ,#'(lambda () (+ 2000 parse-time-elt)))) "(slots predicate extractor...)") +;;;###autoload (defun parse-time-string (string) "Parse the time-string STRING into (SEC MIN HOUR DAY MON YEAR DOW DST TZ). The values are identical to those of `decode-time', but any values that are @@ -216,4 +217,5 @@ unknown are returned as nil." (provide 'parse-time) +;;; arch-tag: 07066094-45a8-4c68-b307-86195e2c1103 ;;; parse-time.el ends here diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index 51558d9d12..8a514fa641 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -1096,4 +1096,5 @@ Requires floating point." (provide 'solar) +;;; arch-tag: bc0ff693-df58-4666-bde4-2a7837ccb8fe ;;; solar.el ends here diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index c3a738a993..b36d5ab2f3 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el @@ -186,4 +186,5 @@ If DATE is malformed, return a time value of zeros." (provide 'time-date) +;;; arch-tag: addcf07b-b20a-465b-af72-550b8ac5190f ;;; time-date.el ends here diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el index f4b68764d0..0507ddab64 100644 --- a/lisp/calendar/timeclock.el +++ b/lisp/calendar/timeclock.el @@ -1,6 +1,6 @@ ;;; timeclock.el --- mode for keeping track of how much you work -;; Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. ;; Author: John Wiegley ;; Created: 25 Mar 1999 @@ -60,7 +60,7 @@ ;; `timeclock-modeline-display' again. ;; You may also want Emacs to ask you before exiting, if you are -;; current working on a project. This can be done either by setting +;; currently working on a project. This can be done either by setting ;; `timeclock-ask-before-exiting' to t using M-x customize (this is ;; the default), or by adding the following to your .emacs file: ;; @@ -94,7 +94,7 @@ :group 'timeclock) (defcustom timeclock-relative t - "*When reporting time, make it relative to `timeclock-workday'? + "*Whether to maken reported time relative to `timeclock-workday'. For example, if the length of a normal workday is eight hours, and you work four hours on Monday, then the amount of time \"remaining\" on Tuesday is twelve hours -- relative to an averaged work period of @@ -107,7 +107,7 @@ previous days. This only affects the timeclock modeline display." (defcustom timeclock-get-project-function 'timeclock-ask-for-project "*The function used to determine the name of the current project. When clocking in, and no project is specified, this function will be -called to determine what the current project to be worked on is. +called to determine what is the current project to be worked on. If this variable is nil, no questions will be asked." :type 'function :group 'timeclock) @@ -115,7 +115,7 @@ If this variable is nil, no questions will be asked." (defcustom timeclock-get-reason-function 'timeclock-ask-for-reason "*A function used to determine the reason for clocking out. When clocking out, and no reason is specified, this function will be -called to determine what the reason is. +called to determine what is the reason. If this variable is nil, no questions will be asked." :type 'function :group 'timeclock) @@ -123,17 +123,17 @@ If this variable is nil, no questions will be asked." (defcustom timeclock-get-workday-function nil "*A function used to determine the length of today's workday. The first time that a user clocks in each day, this function will be -called to determine what the length of the current workday is. If +called to determine what is the length of the current workday. If the return value is nil, or equal to `timeclock-workday', nothing special will be done. If it is a quantity different from `timeclock-workday', however, a record will be output to the timelog file to note the fact that -that day has a different length from the norm." +that day has a length that is different from the norm." :type '(choice (const nil) function) :group 'timeclock) (defcustom timeclock-ask-before-exiting t "*If non-nil, ask if the user wants to clock out before exiting Emacs. -This variable only has an effect if set with \\[customize]." +This variable only has effect if set with \\[customize]." :set (lambda (symbol value) (if value (add-hook 'kill-emacs-query-functions 'timeclock-query-out) @@ -151,9 +151,9 @@ This variable only has an effect if set with \\[customize]." (defcustom timeclock-use-display-time t "*If non-nil, use `display-time-hook' for doing modeline updates. -The advantage to this is that it means one less timer has to be set -running amok in Emacs' process space. The disadvantage is that it -requires you to have `display-time' running. If you don't want to use +The advantage of this is that one less timer has to be set running +amok in Emacs' process space. The disadvantage is that it requires +you to have `display-time' running. If you don't want to use `display-time', but still want the modeline to show how much time is left, set this variable to nil. Changing the value of this variable while timeclock information is being displayed in the modeline has no @@ -240,7 +240,7 @@ The format of this list is (CODE TIME PROJECT).") Normally, timeclock assumes that you intend to work for `timeclock-workday' seconds every day. Any days in which you work more or less than this amount is considered either a positive or -negative discrepancy. If you work in such a manner that the +a negative discrepancy. If you work in such a manner that the discrepancy is always brought back to zero, then you will by definition have worked an average amount equal to `timeclock-workday' each day.") @@ -254,8 +254,8 @@ will be the same as `timeclock-discrepancy'.") ; ? gm (defvar timeclock-last-period nil "Integer representing the number of seconds in the last period. -Note that you shouldn't access this value, but should use the function -`timeclock-last-period' instead.") +Note that you shouldn't access this value, but instead should use the +function `timeclock-last-period'.") (defvar timeclock-mode-string nil "The timeclock string (optionally) displayed in the modeline. @@ -343,7 +343,7 @@ weekend). *If not called interactively, ARG should be the number of _seconds_ worked today*. This feature only has effect the first time this function is called within a day. -PROJECT as the project being clocked into. If PROJECT is nil, and +PROJECT is the project being clocked into. If PROJECT is nil, and FIND-PROJECT is non-nil -- or the user calls `timeclock-in' interactively -- call the function `timeclock-get-project-function' to discover the name of the project." @@ -446,17 +446,18 @@ worked today, ignoring the time worked on previous days." ;;;###autoload (defun timeclock-change (&optional arg project) - "Change to working on a different project, by clocking in then out. -With a prefix ARG, consider the previous project as having been -finished at the time of changeover. PROJECT is the name of the last -project you were working on." + "Change to working on a different project. +This clocks out of the current project, then clocks in on a new one. +With a prefix ARG, consider the previous project as finished at the +time of changeover. PROJECT is the name of the last project you were +working on." (interactive "P") (timeclock-out arg) (timeclock-in nil project (interactive-p))) ;;;###autoload (defun timeclock-query-out () - "Ask the user before clocking out. + "Ask the user whether to clock out. This is a useful function for adding to `kill-emacs-query-functions'." (and (equal (car timeclock-last-event) "i") (y-or-n-p "You're currently clocking time, clock out? ") @@ -550,7 +551,7 @@ non-nil, the amount returned will be relative to past time worked." ;; Should today-only be removed in favour of timeclock-relative? - gm (defsubst timeclock-when-to-leave (&optional today-only) - "Return a time value representing at when the workday ends today. + "Return a time value representing the end of today's workday. If TODAY-ONLY is non-nil, the value returned will be relative only to the time worked today, and not to past time." (timeclock-seconds-to-time @@ -565,7 +566,7 @@ the time worked today, and not to past time." ;;;###autoload (defun timeclock-when-to-leave-string (&optional show-seconds today-only) - "Return a string representing at what time the workday ends today. + "Return a string representing the end of today's workday. This string is relative to the value of `timeclock-workday'. If SHOW-SECONDS is non-nil, the value printed/returned will include seconds. If TODAY-ONLY is non-nil, the value returned will be @@ -852,8 +853,8 @@ i, o or O. The meanings of the codes are: h Set the required working time for the given day. This must be the first entry for that day. The COMMENT in this case is - the number of hours that must be worked. Floating point - amounts are allowed. + the number of hours in this workday. Floating point amounts + are allowed. i Clock in. The COMMENT in this case should be the name of the project worked on. @@ -1144,7 +1145,7 @@ If optional argument TIME is non-nil, use that instead of the current time." (apply 'encode-time decoded))) (defun timeclock-geometric-mean (l) - "Compute the geometric mean of the list L." + "Compute the geometric mean of the values in the list L." (let ((total 0) (count 0)) (while l @@ -1158,7 +1159,7 @@ If optional argument TIME is non-nil, use that instead of the current time." (defun timeclock-generate-report (&optional html-p) "Generate a summary report based on the current timelog file. By default, the report is in plain text, but if the optional argument -HTML-P is non-nil html markup is added." +HTML-P is non-nil, HTML markup is added." (interactive) (let ((log (timeclock-log-data)) (today (timeclock-day-base))) @@ -1363,4 +1364,5 @@ HTML-P is non-nil html markup is added." (if (file-readable-p timeclock-file) (timeclock-reread-log)) +;;; arch-tag: a0be3377-deb6-44ec-b9a2-a7be28436a40 ;;; timeclock.el ends here diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 884e547b2d..0caedee7c8 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -5,7 +5,6 @@ ;; Author: Oliver Seidel ;; [Not clear the above works, July 2000] ;; Created: 2 Aug 1997 -;; Version: $Id: todo-mode.el,v 1.49 2001/11/17 04:01:31 rms Exp $ ;; Keywords: calendar, todo ;; This file is part of GNU Emacs. @@ -93,12 +92,6 @@ ;; extensions that are not explicitly listed in the above quick ;; installation. ;; -;; Version -;; -;; Which version of todo-mode.el does this documentation refer to? -;; -;; $Id: todo-mode.el,v 1.49 2001/11/17 04:01:31 rms Exp $ -;; ;; Pre-Requisites ;; ;; This package will require the following packages to be @@ -961,4 +954,5 @@ Number of entries for each category is given by `todo-print-priorities'." (provide 'todo-mode) +;;; arch-tag: 6fd91be5-776e-4464-a109-da4ea0e4e497 ;;; todo-mode.el ends here diff --git a/lisp/case-table.el b/lisp/case-table.el index f54d0b75c5..71e82bcabe 100644 --- a/lisp/case-table.el +++ b/lisp/case-table.el @@ -115,4 +115,5 @@ SYNTAX should be \" \", \"w\", \".\" or \"_\"." (provide 'case-table) +;;; arch-tag: 3c2cf885-2c9a-449a-9972-2e269191896d ;;; case-table.el ends here diff --git a/lisp/cdl.el b/lisp/cdl.el index 5dd87f45db..53c9ced9ce 100644 --- a/lisp/cdl.el +++ b/lisp/cdl.el @@ -46,4 +46,5 @@ (provide 'cdl) +;;; arch-tag: b8e95a6e-2387-4077-ad9a-af54b09b8615 ;;; cdl.el ends here diff --git a/lisp/chistory.el b/lisp/chistory.el index 8b9c639404..dde30c75e0 100644 --- a/lisp/chistory.el +++ b/lisp/chistory.el @@ -191,4 +191,5 @@ and runs the normal hook `command-history-hook'." (provide 'chistory) +;;; arch-tag: c201a0cd-89f2-4d39-a532-4cb309391dbd ;;; chistory.el ends here diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el index 2e95658004..a9190d3210 100644 --- a/lisp/cmuscheme.el +++ b/lisp/cmuscheme.el @@ -437,4 +437,5 @@ This is a good place to put keybindings." (provide 'cmuscheme) +;;; arch-tag: e8795f4a-c496-45a2-97b4-8e0f2a2c57d2 ;;; cmuscheme.el ends here diff --git a/lisp/comint.el b/lisp/comint.el index 0fa6c36330..57e785dce4 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1,6 +1,6 @@ ;;; comint.el --- general command interpreter in a window stuff -;; Copyright (C) 1988,90,92,93,94,95,96,97,98,99,2000,01,02,2003 +;; Copyright (C) 1988,90,92,93,94,95,96,97,98,99,2000,01,02,03,2004 ;; Free Software Foundation, Inc. ;; Author: Olin Shivers @@ -27,14 +27,9 @@ ;;; Commentary: -;; Please send me bug reports, bug fixes, and extensions, so that I can -;; merge them into the master source. -;; - Olin Shivers (shivers@cs.cmu.edu) -;; - Simon Marshall (simon@gnu.org) - ;; This file defines a general command-interpreter-in-a-buffer package -;; (comint mode). The idea is that you can build specific process-in-a-buffer -;; modes on top of comint mode -- e.g., lisp, shell, scheme, T, soar, .... +;; (comint mode). The idea is that you can build specific process-in-a-buffer +;; modes on top of comint mode -- e.g., Lisp, shell, scheme, T, soar, .... ;; This way, all these specific packages share a common base functionality, ;; and a common set of bindings, which makes them easier to use (and ;; saves code, implementation time, etc., etc.). @@ -45,13 +40,13 @@ ;; ;; - The file cmuscheme.el defines a scheme-in-a-buffer mode. ;; - The file tea.el tunes scheme and inferior-scheme modes for T. -;; - The file soar.el tunes lisp and inferior-lisp modes for Soar. -;; - cmutex.el defines tex and latex modes that invoke tex, latex, bibtex, -;; previewers, and printers from within emacs. -;; - background.el allows csh-like job control inside emacs. +;; - The file soar.el tunes Lisp and inferior-lisp modes for Soar. +;; - cmutex.el defines TeX and LaTeX modes that invoke TeX, LaTeX, BibTeX, +;; previewers, and printers from within Emacs. +;; - background.el allows csh-like job control inside Emacs. ;; It is pretty easy to make new derived modes for other processes. -;; For documentation on the functionality provided by comint mode, and +;; For documentation on the functionality provided by Comint mode, and ;; the hooks available for customising it, see the comments below. ;; For further information on the standard derived modes (shell, ;; inferior-lisp, inferior-scheme, ...), see the relevant source files. @@ -66,23 +61,23 @@ ;; Comint Mode Commands: (common to all derived modes, like shell & cmulisp ;; mode) ;; -;; m-p comint-previous-input Cycle backwards in input history -;; m-n comint-next-input Cycle forwards -;; m-r comint-previous-matching-input Previous input matching a regexp -;; m-s comint-next-matching-input Next input that matches -;; m-c-l comint-show-output Show last batch of process output -;; return comint-send-input -;; c-d comint-delchar-or-maybe-eof Delete char unless at end of buff -;; c-c c-a comint-bol-or-process-mark First time, move point to bol; +;; M-p comint-previous-input Cycle backwards in input history +;; M-n comint-next-input Cycle forwards +;; M-r comint-previous-matching-input Previous input matching a regexp +;; M-s comint-next-matching-input Next input that matches +;; M-C-l comint-show-output Show last batch of process output +;; RET comint-send-input +;; C-d comint-delchar-or-maybe-eof Delete char unless at end of buff +;; C-c C-a comint-bol-or-process-mark First time, move point to bol; ;; second time, move to process-mark. -;; c-c c-u comint-kill-input ^u -;; c-c c-w backward-kill-word ^w -;; c-c c-c comint-interrupt-subjob ^c -;; c-c c-z comint-stop-subjob ^z -;; c-c c-\ comint-quit-subjob ^\ -;; c-c c-o comint-delete-output Delete last batch of process output -;; c-c c-r comint-show-output Show last batch of process output -;; c-c c-l comint-dynamic-list-input-ring List input history +;; C-c C-u comint-kill-input ^u +;; C-c C-w backward-kill-word ^w +;; C-c C-c comint-interrupt-subjob ^c +;; C-c C-z comint-stop-subjob ^z +;; C-c C-\ comint-quit-subjob ^\ +;; C-c C-o comint-delete-output Delete last batch of process output +;; C-c C-r comint-show-output Show last batch of process output +;; C-c C-l comint-dynamic-list-input-ring List input history ;; ;; Not bound by default in comint-mode (some are in shell mode) ;; comint-run Run a program under comint-mode @@ -97,7 +92,7 @@ ;; comint-kill-subjob No mercy. ;; comint-show-maximum-output Show as much output as possible. ;; comint-continue-subjob Send CONT signal to buffer's process -;; group. Useful if you accidentally +;; group. Useful if you accidentally ;; suspend your process (with C-c C-z). ;; comint-get-next-from-history Fetch successive input history lines ;; comint-accumulate Combine lines to send them together @@ -105,7 +100,7 @@ ;; comint-goto-process-mark Move point to where process-mark is. ;; comint-set-process-mark Set process-mark to point. -;; comint-mode-hook is the comint mode hook. Basically for your keybindings. +;; comint-mode-hook is the Comint mode hook. Basically for your keybindings. ;;; Code: @@ -189,7 +184,7 @@ This is a good thing to set in mode hooks.") (defcustom comint-input-autoexpand nil "*If non-nil, expand input command history references on completion. -This mirrors the optional behavior of tcsh (its autoexpand and histlit). +This mirrors the optional behavior of tcsh (its autoexpand and histlist). If the value is `input', then the expansion is seen on input. If the value is `history', then the expansion is only when inserting @@ -256,7 +251,7 @@ The default is nil. See the variable `comint-scroll-show-maximum-output' and the function `comint-postoutput-scroll-to-bottom'. -This variable is buffer-local in all comint buffers." +This variable is buffer-local in all Comint buffers." :type '(choice (const :tag "off" nil) (const t) (const all) @@ -275,16 +270,16 @@ and output from the subprocess is inserted. Non-nil means scroll so that the window is full of text and point is on the last line. A value of nil -means don't do anyting special--scroll normally. +means don't do anything special--scroll normally. See also the variable `comint-move-point-for-output' and the function `comint-postoutput-scroll-to-bottom'. -This variable is buffer-local in all comint buffers." +This variable is buffer-local in all Comint buffers." :type 'boolean :group 'comint) (defcustom comint-buffer-maximum-size 1024 - "*The maximum size in lines for comint buffers. + "*The maximum size in lines for Comint buffers. Comint buffers are truncated from the top to be no greater than this number, if the function `comint-truncate-buffer' is on `comint-output-filter-functions'." :type 'integer @@ -297,7 +292,7 @@ the function `comint-truncate-buffer' is on `comint-output-filter-functions'." "Separator between commands in the history file.") (defvar comint-input-history-ignore "^#" - "Regexp for history entries that should be ignored when comint initializes.") + "Regexp for history entries that should be ignored when Comint initializes.") (defcustom comint-process-echoes nil "*If non-nil, assume that the subprocess echoes any input. @@ -316,7 +311,7 @@ This variable is buffer-local." (defcustom comint-password-prompt-regexp "\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|\ Kerberos \\|CVS \\|UNIX \\| SMB \\|^\\)\ -[Pp]assword\\( (again)\\)?\\|\ +\[Pp]assword\\( (again)\\)?\\|\ pass phrase\\|\\(Enter\\|Repeat\\) passphrase\\)\ \\( for [^:]+\\)?:\\s *\\'" "*Regexp matching prompts for passwords in the inferior process. @@ -326,7 +321,7 @@ This is used by `comint-watch-for-password-prompt'." ;; Here are the per-interpreter hooks. (defvar comint-get-old-input (function comint-get-old-input-default) - "Function that returns old text in comint mode. + "Function that returns old text in Comint mode. This function is called when return is typed while the point is in old text. It returns the text to be submitted as process input. The default is `comint-get-old-input-default', which either grabs the @@ -398,15 +393,15 @@ field boundaries in a natural way)." :group 'comint) (defcustom comint-mode-hook '(turn-on-font-lock) - "Called upon entry into `comint-mode' + "Hook run upon entry to `comint-mode'. This is run before the process is cranked up." :type 'hook :group 'comint) (defcustom comint-exec-hook '() - "Called each time a process is exec'd by `comint-exec'. + "Hook run each time a process is exec'd by `comint-exec'. This is called after the process is cranked up. It is useful for things that -must be done each time a process is executed in a comint mode buffer (e.g., +must be done each time a process is executed in a Comint mode buffer (e.g., `(process-kill-without-query)'). In contrast, the `comint-mode-hook' is only executed once when the buffer is created." :type 'hook @@ -414,14 +409,15 @@ executed once when the buffer is created." (defvar comint-mode-map nil) +;; Fixme: Is this still relevant? (defvar comint-ptyp t "Non-nil if communications via pty; false if by pipe. Buffer local. This is to work around a bug in Emacs process signaling.") (defvar comint-input-ring nil) -(defvar comint-last-input-start) -(defvar comint-last-input-end) -(defvar comint-last-output-start) +(defvar comint-last-input-start nil) +(defvar comint-last-input-end nil) +(defvar comint-last-output-start nil) (defvar comint-input-ring-index nil "Index of last matched history element.") (defvar comint-matching-input-from-input-string "" @@ -644,7 +640,7 @@ BUFFER can be either a buffer or the name of one." ;;;###autoload (defun make-comint-in-buffer (name buffer program &optional startfile &rest switches) - "Make a comint process NAME in BUFFER, running PROGRAM. + "Make a Comint process NAME in BUFFER, running PROGRAM. If BUFFER is nil, it defaults to NAME surrounded by `*'s. PROGRAM should be either a string denoting an executable program to create via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP @@ -667,20 +663,20 @@ If PROGRAM is a string, any more args are arguments to PROGRAM." ;;;###autoload (defun make-comint (name program &optional startfile &rest switches) - "Make a comint process NAME in a buffer, running PROGRAM. + "Make a Comint process NAME in a buffer, running PROGRAM. The name of the buffer is made by surrounding NAME with `*'s. PROGRAM should be either a string denoting an executable program to create via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP connection to be opened via `open-network-stream'. If there is already a running process in that buffer, it is not restarted. Optional third arg -STARTFILE is the name of a file to send the contents of to the process. +STARTFILE is the name of a file to send the contents of the process to. If PROGRAM is a string, any more args are arguments to PROGRAM." (apply #'make-comint-in-buffer name nil program startfile switches)) ;;;###autoload (defun comint-run (program) - "Run PROGRAM in a comint buffer and switch to it. + "Run PROGRAM in a Comint buffer and switch to it. The buffer name is made by surrounding the file name of PROGRAM with `*'s. The file name is used to make a symbol name, such as `comint-sh-hook', and any hooks on this symbol are run in the buffer. @@ -691,9 +687,10 @@ See `make-comint' and `comint-exec'." (run-hooks (intern-soft (concat "comint-" name "-hook"))))) (defun comint-exec (buffer name command startfile switches) - "Start up a process in buffer BUFFER for comint modes. + "Start up a process named NAME in buffer BUFFER for Comint modes. +Runs the given COMMAND with SWITCHES with output to STARTFILE. Blasts any old process running in the buffer. Doesn't set the buffer mode. -You can use this to cheaply run a series of processes in the same comint +You can use this to cheaply run a series of processes in the same Comint buffer. The hook `comint-exec-hook' is run after each exec." (with-current-buffer buffer (let ((proc (get-buffer-process buffer))) ; Blast any old process. @@ -778,7 +775,7 @@ buffer. The hook `comint-exec-hook' is run after each exec." (defun comint-insert-clicked-input (event) - "In a comint buffer, set the current input to the clicked-on previous input." + "In a Comint buffer, set the current input to the clicked-on previous input." (interactive "e") (let ((pos (posn-point (event-end event)))) (if (not (eq (get-char-property pos 'field) 'input)) @@ -825,7 +822,7 @@ buffer. The hook `comint-exec-hook' is run after each exec." ;; comint-replace-by-expanded-history-before-point Workhorse function. (defun comint-read-input-ring (&optional silent) - "Sets the buffer's `comint-input-ring' from a history file. + "Set the buffer's `comint-input-ring' from a history file. The name of the file is given by the variable `comint-input-ring-file-name'. The history ring is of size `comint-input-ring-size', regardless of file size. If `comint-input-ring-file-name' is nil this function does nothing. @@ -970,7 +967,7 @@ See also `comint-read-input-ring'." (defun comint-regexp-arg (prompt) - ;; Return list of regexp and prefix arg using PROMPT. + "Return list of regexp and prefix arg using PROMPT." (let* (;; Don't clobber this. (last-command last-command) (regexp (read-from-minibuffer prompt nil nil nil @@ -996,7 +993,7 @@ See also `comint-read-input-ring'." arg))) (defun comint-search-start (arg) - ;; Index to start a directional search, starting at comint-input-ring-index + "Index to start a directional search, starting at `comint-input-ring-index'." (if comint-input-ring-index ;; If a search is running, offset by 1 in direction of arg (mod (+ comint-input-ring-index (if (> arg 0) 1 -1)) @@ -1120,7 +1117,7 @@ Expansion is dependent on the value of `comint-input-autoexpand'. This function depends on the buffer's idea of the input history, which may not match the command interpreter's idea, assuming it has one. -Assumes history syntax is like typical Un*x shells'. However, since emacs +Assumes history syntax is like typical Un*x shells'. However, since Emacs cannot know the interpreter's idea of input line numbers, assuming it has one, it cannot expand absolute input line number references. @@ -1285,9 +1282,10 @@ Quotes are single and double." (t nth)))) (comint-arguments string nth mth))))) -;; Return a list of arguments from ARG. Break it up at the -;; delimiters in comint-delimiter-argument-list. Returned list is backwards. (defun comint-delim-arg (arg) + "Return a list of arguments from ARG. +Break it up at the delimiters in `comint-delimiter-argument-list'. +Returned list is backwards." (if (null comint-delimiter-argument-list) (list arg) (let ((args nil) @@ -1321,8 +1319,8 @@ Argument 0 is the command name." ;; The third matches '-quoted strings. ;; The fourth matches `-quoted strings. ;; This seems to fit the syntax of BASH 2.0. - (let* ((first (if (and (eq system-type 'windows-nt) - (w32-shell-dos-semantics)) + (let* ((first (if (if (fboundp 'w32-shell-dos-semantics) + (w32-shell-dos-semantics)) "[^ \n\t\"'`]+\\|" "[^ \n\t\"'`\\]+\\|\\\\[\"'`\\ \t]+\\|")) (argpart (concat first @@ -1331,7 +1329,7 @@ Argument 0 is the command name." `[^`]*`\\)")) (args ()) (pos 0) (count 0) - beg str value quotes) + beg str quotes) ;; Build a list of all the args until we have as many as we want. (while (and (or (null mth) (<= count mth)) (string-match argpart string pos)) @@ -1344,16 +1342,16 @@ Argument 0 is the command name." ;; Put the previous arg, if there was one, onto ARGS. (setq str (substring string beg pos) args (if quotes (cons str args) - (nconc (comint-delim-arg str) args)) - count (1+ count))) + (nconc (comint-delim-arg str) args)))) + (setq count (length args)) (setq quotes (match-beginning 1)) (setq beg (match-beginning 0)) (setq pos (match-end 0)))) (if beg (setq str (substring string beg pos) args (if quotes (cons str args) - (nconc (comint-delim-arg str) args)) - count (1+ count))) + (nconc (comint-delim-arg str) args)))) + (setq count (length args)) (let ((n (or nth (1- count))) (m (if mth (1- (- count mth)) 0))) (mapconcat @@ -1379,7 +1377,8 @@ After the process output mark, sends all text from the process mark to point as input to the process. Before the process output mark, calls value of variable `comint-get-old-input' to retrieve old input, copies it to the process mark, and sends it. A terminal newline is also -inserted into the buffer and sent to the process. +inserted into the buffer and sent to the process unless NO-NEWLINE is +non-nil. Any history reference may be expanded depending on the value of the variable `comint-input-autoexpand'. The list of function names contained in the value @@ -1391,7 +1390,7 @@ If variable `comint-eol-on-send' is non-nil, then point is moved to the end of line before sending the input. After the input has been sent, if `comint-process-echoes' is non-nil, -then comint-send-input waits to see if the process outputs a string +then `comint-send-input' waits to see if the process outputs a string matching the input, and if so, deletes that part of the output. The values of `comint-get-old-input', `comint-input-filter-functions', and @@ -1399,19 +1398,19 @@ The values of `comint-get-old-input', `comint-input-filter-functions', and in the buffer. E.g., If the interpreter is the csh, - comint-get-old-input is the default: + `comint-get-old-input' is the default: If `comint-use-prompt-regexp-instead-of-fields' is nil, then either return the current input field, if point is on an input field, or the current line, if point is on an output field. If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then return the current line with any initial string matching the regexp `comint-prompt-regexp' removed. - comint-input-filter-functions monitors input for \"cd\", \"pushd\", and + `comint-input-filter-functions' monitors input for \"cd\", \"pushd\", and \"popd\" commands. When it sees one, it cd's the buffer. comint-input-filter is the default: returns t if the input isn't all white space. -If the comint is Lucid Common Lisp, +If the Comint is Lucid Common Lisp, comint-get-old-input snarfs the sexp ending at point. comint-input-filter-functions does nothing. comint-input-filter returns nil if the input matches input-filter-regexp, @@ -1542,17 +1541,17 @@ You can use `add-hook' to add functions to this list either globally or locally.") (defvar comint-inhibit-carriage-motion nil - "If nil, comint will interpret `carriage control' characters in output. + "If nil, Comint will interpret `carriage control' characters in output. See `comint-carriage-motion' for details.") ;; When non-nil, this is an overlay over the last recognized prompt in ;; the buffer; it is used when highlighting the prompt. (defvar comint-last-prompt-overlay nil) -;; `snapshot' any current comint-last-prompt-overlay, freezing its -;; attributes in place, even when more input comes a long and moves the -;; prompt overlay. (defun comint-snapshot-last-prompt () + "`snapshot' any current `comint-last-prompt-overlay'. +freeze its attributes in place, even when more input comes a long +and moves the prompt overlay." (when comint-last-prompt-overlay (let ((inhibit-read-only t)) (add-text-properties (overlay-start comint-last-prompt-overlay) @@ -1835,10 +1834,9 @@ Calls `comint-get-old-input' to get old input." (defun comint-skip-prompt () "Skip past the text matching regexp `comint-prompt-regexp'. If this takes us past the end of the current line, don't skip at all." - (let ((eol (save-excursion (end-of-line) (point)))) - (if (and (looking-at comint-prompt-regexp) - (<= (match-end 0) eol)) - (goto-char (match-end 0))))) + (if (and (looking-at comint-prompt-regexp) + (<= (match-end 0) (line-end-position))) + (goto-char (match-end 0)))) (defun comint-after-pmark-p () "Return t if point is after the process output marker." @@ -1847,7 +1845,7 @@ If this takes us past the end of the current line, don't skip at all." (defun comint-simple-send (proc string) "Default function for sending to PROC input STRING. -This just sends STRING plus a newline. To override this, +This just sends STRING plus a newline. To override this, set the hook `comint-input-sender'." (comint-send-string proc string) (if comint-input-sender-no-newline @@ -1856,7 +1854,7 @@ set the hook `comint-input-sender'." (comint-send-string proc "\n"))) (defun comint-line-beginning-position () - "Returns the buffer position of the beginning of the line, after any prompt. + "Return the buffer position of the beginning of the line, after any prompt. If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then the prompt skip is done by skipping text matching the regular expression `comint-prompt-regexp', a buffer local variable." @@ -1876,7 +1874,7 @@ prompt skip is done by skipping text matching the regular expression (constrain-to-field (line-beginning-position) (line-end-position)))) (defun comint-bol (&optional arg) - "Goes to the beginning of line, then skips past the prompt, if any. + "Go to the beginning of line, then skip past the prompt, if any. If prefix argument is given (\\[universal-argument]) the prompt is not skipped. If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then the prompt skip is done by skipping text matching the regular expression @@ -1901,7 +1899,8 @@ RET, LFD, or ESC. DEL or C-h rubs out. C-u kills line. C-g aborts (if filter and C-g is pressed, this function returns nil rather than a string). Note that the keystrokes comprising the text can still be recovered -\(temporarily) with \\[view-lossage]. Some people find this worrysome. +\(temporarily) with \\[view-lossage]. Some people find this worrisome (see, +however, `clear-this-command-keys'). Once the caller uses the password, it can erase the password by doing (clear-string STRING)." (let ((ans "") @@ -1948,24 +1947,22 @@ by doing (clear-string STRING)." (message "") ans))) -(defun send-invisible (str) +(defun send-invisible (&optional prompt) "Read a string without echoing. Then send it to the process running in the current buffer. The string is sent using `comint-input-sender'. Security bug: your string can still be temporarily recovered with -\\[view-lossage]." +\\[view-lossage]; `clear-this-command-keys' can fix that." (interactive "P") ; Defeat snooping via C-x ESC ESC (let ((proc (get-buffer-process (current-buffer)))) - (cond ((not proc) - (error "Current buffer has no process")) - ((stringp str) - (comint-snapshot-last-prompt) - (funcall comint-input-sender proc str)) - (t - (let ((str (comint-read-noecho "Non-echoed text: " t))) - (if (stringp str) - (send-invisible str) - (message "Warning: text will be echoed"))))))) + (if proc + (let ((str (comint-read-noecho (or prompt "Non-echoed text: ") t))) + (if (stringp str) + (progn + (comint-snapshot-last-prompt) + (funcall comint-input-sender proc str)) + (message "Warning: text will be echoed"))) + (error "Current buffer has no process")))) (defun comint-watch-for-password-prompt (string) "Prompt in the minibuffer for password and send without echoing. @@ -1977,13 +1974,12 @@ This function could be in the list `comint-output-filter-functions'." (when (string-match comint-password-prompt-regexp string) (when (string-match "^[ \n\r\t\v\f\b\a]+" string) (setq string (replace-match "" t t string))) - (let ((pw (comint-read-noecho string t))) - (send-invisible pw)))) + (send-invisible string))) ;; Low-level process communication (defun comint-send-string (process string) - "Like `process-send-string', but also does extra bookkeeping for comint mode." + "Like `process-send-string', but also does extra bookkeeping for Comint mode." (if process (with-current-buffer (if (processp process) (process-buffer process) @@ -1993,7 +1989,7 @@ This function could be in the list `comint-output-filter-functions'." (process-send-string process string)) (defun comint-send-region (process start end) - "Like `process-send-region', but also does extra bookkeeping for comint mode." + "Like `process-send-region', but also does extra bookkeeping for Comint mode." (if process (with-current-buffer (if (processp process) (process-buffer process) @@ -2079,17 +2075,17 @@ Sets mark to the value of point when this command is run." (defun comint-interrupt-subjob () "Interrupt the current subjob. This command also kills the pending input -between the process-mark and point." +between the process mark and point." (interactive) (comint-skip-input) (interrupt-process nil comint-ptyp) ;; (process-send-string nil "\n") - ) +) (defun comint-kill-subjob () "Send kill signal to the current subjob. This command also kills the pending input -between the process-mark and point." +between the process mark and point." (interactive) (comint-skip-input) (kill-process nil comint-ptyp)) @@ -2097,7 +2093,7 @@ between the process-mark and point." (defun comint-quit-subjob () "Send quit signal to the current subjob. This command also kills the pending input -between the process-mark and point." +between the process mark and point." (interactive) (comint-skip-input) (quit-process nil comint-ptyp)) @@ -2105,7 +2101,7 @@ between the process-mark and point." (defun comint-stop-subjob () "Stop the current subjob. This command also kills the pending input -between the process-mark and point. +between the process mark and point. WARNING: if there is no current subjob, you can end up suspending the top-level process running in the buffer. If you accidentally do @@ -2157,7 +2153,7 @@ Sends an EOF only if point is at the end of the buffer and there is no input." (process-send-eof)) -(defun comint-backward-matching-input (regexp arg) +(defun comint-backward-matching-input (regexp n) "Search backward through buffer for input fields that match REGEXP. If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then input fields are identified by lines that match `comint-prompt-regexp'. @@ -2168,8 +2164,8 @@ If N is negative, find the next or Nth next match." (if comint-use-prompt-regexp-instead-of-fields ;; Use comint-prompt-regexp (let* ((re (concat comint-prompt-regexp ".*" regexp)) - (pos (save-excursion (end-of-line (if (> arg 0) 0 1)) - (if (re-search-backward re nil t arg) + (pos (save-excursion (end-of-line (if (> n 0) 0 1)) + (if (re-search-backward re nil t n) (point))))) (if (null pos) (progn (message "Not found") @@ -2177,14 +2173,14 @@ If N is negative, find the next or Nth next match." (goto-char pos) (comint-bol nil))) ;; Use input fields - (let* ((dir (if (< arg 0) -1 1)) + (let* ((dir (if (< n 0) -1 1)) (pos (save-excursion - (while (/= arg 0) + (while (/= n 0) (unless (re-search-backward regexp nil t dir) (error "Not found")) (when (eq (get-char-property (point) 'field) 'input) - (setq arg (- arg dir)))) + (setq n (- n dir)))) (field-beginning)))) (goto-char pos)))) @@ -2254,7 +2250,7 @@ occurrence of text matching `comint-prompt-regexp'." ;; Needs fixing: ;; make comint-arguments understand negative indices as bash does (defun comint-insert-previous-argument (index) - "Insert the INDEXth argument from the previous comint command-line at point. + "Insert the INDEXth argument from the previous Comint command-line at point. Spaces are added at beginning and/or end of the inserted string if necessary to ensure that it's separated from adjacent arguments. Interactively, if no prefix argument is given, the last argument is inserted. @@ -2327,39 +2323,35 @@ This command is like `M-.' in bash." ;; COMINT-GET-SOURCE -- used by the source-file processing commands to prompt ;; for the file to process. -;; (COMINT-SOURCE-DEFAULT previous-dir/file source-modes) -;;============================================================================ -;; This function computes the defaults for the load-file and compile-file -;; commands for tea, soar, cmulisp, and cmuscheme modes. -;; -;; - PREVIOUS-DIR/FILE is a pair (directory . filename) from the last -;; source-file processing command. nil if there hasn't been one yet. -;; - SOURCE-MODES is a list used to determine what buffers contain source -;; files: if the major mode of the buffer is in SOURCE-MODES, it's source. -;; Typically, (lisp-mode) or (scheme-mode). -;; -;; If the command is given while the cursor is inside a string, *and* -;; the string is an existing filename, *and* the filename is not a directory, -;; then the string is taken as default. This allows you to just position -;; your cursor over a string that's a filename and have it taken as default. -;; -;; If the command is given in a file buffer whose major mode is in -;; SOURCE-MODES, then the filename is the default file, and the -;; file's directory is the default directory. -;; -;; If the buffer isn't a source file buffer (e.g., it's the process buffer), -;; then the default directory & file are what was used in the last source-file -;; processing command (i.e., PREVIOUS-DIR/FILE). If this is the first time -;; the command has been run (PREVIOUS-DIR/FILE is nil), the default directory -;; is the cwd, with no default file. (\"no default file\" = nil) -;; -;; SOURCE-REGEXP is typically going to be something like (tea-mode) -;; for T programs, (lisp-mode) for Lisp programs, (soar-mode lisp-mode) -;; for Soar programs, etc. -;; -;; The function returns a pair: (default-directory . default-file). - (defun comint-source-default (previous-dir/file source-modes) + "Compute the defaults for `load-file' and `compile-file' commands. + +PREVIOUS-DIR/FILE is a pair (directory . filename) from the last +source-file processing command. nil if there hasn't been one yet. +SOURCE-MODES is a list used to determine what buffers contain source +files: if the major mode of the buffer is in SOURCE-MODES, it's source. +Typically, (lisp-mode) or (scheme-mode). + +If the command is given while the cursor is inside a string, *and* +the string is an existing filename, *and* the filename is not a directory, +then the string is taken as default. This allows you to just position +your cursor over a string that's a filename and have it taken as default. + +If the command is given in a file buffer whose major mode is in +SOURCE-MODES, then the filename is the default file, and the +file's directory is the default directory. + +If the buffer isn't a source file buffer (e.g., it's the process buffer), +then the default directory & file are what was used in the last source-file +processing command (i.e., PREVIOUS-DIR/FILE). If this is the first time +the command has been run (PREVIOUS-DIR/FILE is nil), the default directory +is the cwd, with no default file. (\"no default file\" = nil) + +SOURCE-REGEXP is typically going to be something like (tea-mode) +for T programs, (lisp-mode) for Lisp programs, (soar-mode lisp-mode) +for Soar programs, etc. + +The function returns a pair: (default-directory . default-file)." (cond ((and buffer-file-name (memq major-mode source-modes)) (cons (file-name-directory buffer-file-name) (file-name-nondirectory buffer-file-name))) @@ -2368,15 +2360,13 @@ This command is like `M-.' in bash." (cons default-directory nil)))) -;; (COMINT-CHECK-SOURCE fname) -;;============================================================================ -;; Prior to loading or compiling (or otherwise processing) a file (in the CMU -;; process-in-a-buffer modes), this function can be called on the filename. -;; If the file is loaded into a buffer, and the buffer is modified, the user -;; is queried to see if he wants to save the buffer before proceeding with -;; the load or compile. - (defun comint-check-source (fname) + "Check whether to save buffers visiting file FNAME. +Prior to loading or compiling (or otherwise processing) a file (in the CMU +process-in-a-buffer modes), this function can be called on the filename. +If the file is loaded into a buffer, and the buffer is modified, the user +is queried to see if he wants to save the buffer before proceeding with +the load or compile." (let ((buff (get-file-buffer fname))) (if (and buff (buffer-modified-p buff) @@ -2387,44 +2377,33 @@ This command is like `M-.' in bash." (save-buffer) (set-buffer old-buffer))))) - -;; (COMINT-GET-SOURCE prompt prev-dir/file source-modes mustmatch-p) -;;============================================================================ -;; COMINT-GET-SOURCE is used to prompt for filenames in command-interpreter -;; commands that process source files (like loading or compiling a file). -;; It prompts for the filename, provides a default, if there is one, -;; and returns the result filename. -;; -;; See COMINT-SOURCE-DEFAULT for more on determining defaults. -;; -;; PROMPT is the prompt string. PREV-DIR/FILE is the (directory . file) pair -;; from the last source processing command. SOURCE-MODES is a list of major -;; modes used to determine what file buffers contain source files. (These -;; two arguments are used for determining defaults). If MUSTMATCH-P is true, -;; then the filename reader will only accept a file that exists. -;; -;; A typical use: -;; (interactive (comint-get-source "Compile file: " prev-lisp-dir/file -;; '(lisp-mode) t)) - -;; This is pretty stupid about strings. It decides we're in a string -;; if there's a quote on both sides of point on the current line. (defun comint-extract-string () - "Return string around POINT that starts the current line, or nil." - (save-excursion - (let* ((point (point)) - (bol (progn (beginning-of-line) (point))) - (eol (progn (end-of-line) (point))) - (start (progn (goto-char point) - (and (search-backward "\"" bol t) - (1+ (point))))) - (end (progn (goto-char point) - (and (search-forward "\"" eol t) - (1- (point)))))) - (and start end - (buffer-substring-no-properties start end))))) + "Return string around POINT, or nil." + (let ((syntax (syntax-ppss))) + (when (nth 3 syntax) + (condition-case () + (buffer-substring-no-properties (1+ (nth 8 syntax)) + (progn (goto-char (nth 8 syntax)) + (forward-sexp) + (1- (point)))) + (error nil))))) (defun comint-get-source (prompt prev-dir/file source-modes mustmatch-p) + "Prompt for filenames in commands that process source files, +e.g. loading or compiling a file. +Provides a default, if there is one, and returns the result filename. + +See `comint-source-default' for more on determining defaults. + +PROMPT is the prompt string. PREV-DIR/FILE is the (directory . file) pair +from the last source processing command. SOURCE-MODES is a list of major +modes used to determine what file buffers contain source files. (These +two arguments are used for determining defaults). If MUSTMATCH-P is true, +then the filename reader will only accept a file that exists. + +A typical use: + (interactive (comint-get-source \"Compile file: \" prev-lisp-dir/file + '(lisp-mode) t))" (let* ((def (comint-source-default prev-dir/file source-modes)) (stringfile (comint-extract-string)) (sfile-p (and stringfile @@ -2466,9 +2445,10 @@ This command is like `M-.' in bash." ;; process responds with and put it in a pop-up window or on the message ;; line. We just display the buffer. Low tech. Simple. Works good. -;; Send to the inferior process PROC the string STR. Pop-up but do not select -;; a window for the inferior process so that its response can be seen. (defun comint-proc-query (proc str) + "Send to the inferior process PROC the string STR. +Pop-up but do not select a window for the inferior process so that +its response can be seen." (let* ((proc-buf (process-buffer proc)) (proc-mark (process-mark proc))) (display-buffer proc-buf) @@ -2547,13 +2527,13 @@ Note that this applies to `comint-dynamic-complete-filename' only." (defvar comint-file-name-prefix "" "Prefix prepended to absolute file names taken from process input. -This is used by comint's and shell's completion functions, and by shell's +This is used by Comint's and shell's completion functions, and by shell's directory tracking functions.") (defvar comint-file-name-chars (if (memq system-type '(ms-dos windows-nt cygwin)) "~/A-Za-z0-9_^$!#%&{}@`'.,:()-" - "~/A-Za-z0-9+@:_.$#%,={}-") + "[]~/A-Za-z0-9+@:_.$#%,={}-") "String of characters valid in a file name. Note that all non-ASCII characters are considered valid in a file name regardless of what this variable says. @@ -2567,27 +2547,33 @@ This is a good thing to set in mode hooks.") (defun comint-directory (directory) - ;; Return expanded DIRECTORY, with `comint-file-name-prefix' if absolute. + "Return expanded DIRECTORY, with `comint-file-name-prefix' if absolute." (expand-file-name (if (file-name-absolute-p directory) (concat comint-file-name-prefix directory) directory))) (defun comint-word (word-chars) - "Return the word of WORD-CHARS at point, or nil if non is found. + "Return the word of WORD-CHARS at point, or nil if none is found. Word constituents are considered to be those in WORD-CHARS, which is like the inside of a \"[...]\" (see `skip-chars-forward'), plus all non-ASCII characters." (save-excursion - (let ((non-word-chars (concat "[^\\\\" word-chars "]")) (here (point))) - (while (and (re-search-backward non-word-chars nil 'move) - ;;(memq (char-after (point)) shell-file-name-quote-list) - (or (>= (following-char) 128) - (eq (preceding-char) ?\\))) - (backward-char 1)) - ;; Don't go forward over a word-char (this can happen if we're at bob). - (when (or (not (bobp)) (looking-at non-word-chars)) - (forward-char 1)) + (let ((here (point)) + giveup) + (while (not giveup) + (let ((startpoint (point))) + (skip-chars-backward (concat "\\\\" word-chars)) + ;; Fixme: This isn't consistent with Bash, at least -- not + ;; all non-ASCII chars should be word constituents. + (if (and (> (- (point) 2) (point-min)) + (= (char-after (- (point) 2)) ?\\)) + (forward-char -2)) + (if (and (> (- (point) 1) (point-min)) + (>= (char-after (- (point) 1)) 128)) + (forward-char -1)) + (if (= (point) startpoint) + (setq giveup t)))) ;; Set match-data to match the entire string. (when (< (point) here) (set-match-data (list (point) here)) @@ -2625,11 +2611,13 @@ Magic characters are those in `comint-file-name-quote-list'." (if (null comint-file-name-quote-list) filename (let ((regexp - (format "\\(^\\|[^\\]\\)\\([%s]\\)" + (format "[%s]" (mapconcat 'char-to-string comint-file-name-quote-list "")))) (save-match-data - (while (string-match regexp filename) - (setq filename (replace-match "\\1\\\\\\2" nil nil filename))) + (let ((i 0)) + (while (string-match regexp filename i) + (setq filename (replace-match "\\\\\\&" nil nil filename)) + (setq i (1+ (match-end 0))))) filename)))) (defun comint-unquote-filename (filename) @@ -2697,10 +2685,10 @@ See `comint-dynamic-complete-filename'. Returns t if successful." (t (cdr comint-completion-addsuffix)))) (filename (or (comint-match-partial-filename) "")) - (pathdir (file-name-directory filename)) - (pathnondir (file-name-nondirectory filename)) - (directory (if pathdir (comint-directory pathdir) default-directory)) - (completion (file-name-completion pathnondir directory))) + (filedir (file-name-directory filename)) + (filenondir (file-name-nondirectory filename)) + (directory (if filedir (comint-directory filedir) default-directory)) + (completion (file-name-completion filenondir directory))) (cond ((null completion) (message "No completions of %s" filename) (setq success nil)) @@ -2714,21 +2702,21 @@ See `comint-dynamic-complete-filename'. Returns t if successful." (let ((file (concat (file-name-as-directory directory) completion))) (insert (comint-quote-filename (substring (directory-file-name completion) - (length pathnondir)))) + (length filenondir)))) (cond ((symbolp (file-name-completion completion directory)) ;; We inserted a unique completion. (insert (if (file-directory-p file) dirsuffix filesuffix)) (unless minibuffer-p (message "Completed"))) ((and comint-completion-recexact comint-completion-addsuffix - (string-equal pathnondir completion) + (string-equal filenondir completion) (file-exists-p file)) ;; It's not unique, but user wants shortest match. (insert (if (file-directory-p file) dirsuffix filesuffix)) (unless minibuffer-p (message "Completed shortest"))) ((or comint-completion-autolist - (string-equal pathnondir completion)) + (string-equal filenondir completion)) ;; It's not unique, list possible completions. (comint-dynamic-list-filename-completions)) (t @@ -2769,7 +2757,6 @@ See also `comint-dynamic-complete-filename'." (suffix (cond ((not comint-completion-addsuffix) "") ((not (consp comint-completion-addsuffix)) " ") (t (cdr comint-completion-addsuffix)))) - (candidates (mapcar (function (lambda (x) (list x))) candidates)) (completions (all-completions stub candidates))) (cond ((null completions) (message "No completions of %s" stub) @@ -2812,10 +2799,10 @@ See also `comint-dynamic-complete-filename'." ;; but subsequent changes may have made this unnecessary. sm. ;;(file-name-handler-alist nil) (filename (or (comint-match-partial-filename) "")) - (pathdir (file-name-directory filename)) - (pathnondir (file-name-nondirectory filename)) - (directory (if pathdir (comint-directory pathdir) default-directory)) - (completions (file-name-all-completions pathnondir directory))) + (filedir (file-name-directory filename)) + (filenondir (file-name-nondirectory filename)) + (directory (if filedir (comint-directory filedir) default-directory)) + (completions (file-name-all-completions filenondir directory))) (if (not completions) (message "No completions of %s" filename) (comint-dynamic-list-completions @@ -2827,6 +2814,8 @@ See also `comint-dynamic-complete-filename'." ;; command is repeatedly used without the set of completions changing. (defvar comint-displayed-dynamic-completions nil) +(defvar comint-dynamic-list-completions-config nil) + (defun comint-dynamic-list-completions (completions) "List in help buffer sorted COMPLETIONS. Typing SPC flushes the help buffer." @@ -2856,30 +2845,35 @@ Typing SPC flushes the help buffer." (select-window window) (scroll-up)))) - (let ((conf (current-window-configuration))) - (with-output-to-temp-buffer "*Completions*" - (display-completion-list completions)) - (message "Type space to flush; repeat completion command to scroll") - (let (key first) - (if (save-excursion - (set-buffer (get-buffer "*Completions*")) - (set (make-local-variable - 'comint-displayed-dynamic-completions) - completions) - (setq key (read-key-sequence nil) - first (aref key 0)) - (and (consp first) (consp (event-start first)) - (eq (window-buffer (posn-window (event-start first))) - (get-buffer "*Completions*")) - (eq (key-binding key) 'mouse-choose-completion))) - ;; If the user does mouse-choose-completion with the mouse, - ;; execute the command, then delete the completion window. - (progn - (mouse-choose-completion first) - (set-window-configuration conf)) - (if (eq first ?\ ) - (set-window-configuration conf) - (setq unread-command-events (listify-key-sequence key))))))))) + ;; Display a completion list for the first time. + (setq comint-dynamic-list-completions-config + (current-window-configuration)) + (with-output-to-temp-buffer "*Completions*" + (display-completion-list completions)) + (message "Type space to flush; repeat completion command to scroll")) + + ;; Read the next key, to process SPC. + (let (key first) + (if (save-excursion + (set-buffer (get-buffer "*Completions*")) + (set (make-local-variable + 'comint-displayed-dynamic-completions) + completions) + (setq key (read-key-sequence nil) + first (aref key 0)) + (and (consp first) (consp (event-start first)) + (eq (window-buffer (posn-window (event-start first))) + (get-buffer "*Completions*")) + (eq (key-binding key) 'mouse-choose-completion))) + ;; If the user does mouse-choose-completion with the mouse, + ;; execute the command, then delete the completion window. + (progn + (mouse-choose-completion first) + (set-window-configuration comint-dynamic-list-completions-config)) + (unless (eq first ?\ ) + (setq unread-command-events (listify-key-sequence key))) + (unless (eq first ?\t) + (set-window-configuration comint-dynamic-list-completions-config)))))) (defun comint-get-next-from-history () @@ -2951,34 +2945,36 @@ the process mark is at the beginning of the accumulated input." ;; ;; My particular use is SQL interpreters; I want to be able to execute a ;; query using the process associated with a comint-buffer, and save that -;; somewhere else. Because the process might have state (for example, it +;; somewhere else. Because the process might have state (for example, it ;; could be in an uncommitted transaction), just running starting a new ;; process and having it execute the query and then finish, would not -;; work. I'm sure there are other uses as well, although in many cases +;; work. I'm sure there are other uses as well, although in many cases ;; starting a new process is the simpler, and thus preferable, approach. ;; ;; The basic implementation is as follows: comint-redirect changes the -;; preoutput filter functions (comint-preoutput-filter-functions) to use -;; its own filter. The filter puts the output into the designated buffer, +;; preoutput filter functions (`comint-preoutput-filter-functions') to use +;; its own filter. The filter puts the output into the designated buffer, ;; or buffers, until it sees a regexp that tells it to stop (by default, -;; this is the prompt for the interpreter, comint-prompt-regexp). When it +;; this is the prompt for the interpreter, `comint-prompt-regexp'). When it ;; sees the stop regexp, it restores the old filter functions, and runs -;; comint-redirect-hook. +;; `comint-redirect-hook'. ;; ;; Each comint buffer may only use one redirection at a time, but any number ;; of different comint buffers may be simultaneously redirected. ;; ;; NOTE: It is EXTREMELY important that `comint-prompt-regexp' be set to the ;; correct prompt for your interpreter, or that you supply a regexp that says -;; when the redirection is finished. Otherwise, redirection will continue -;; indefinitely. The code now does a sanity check to ensure that it can find +;; when the redirection is finished. Otherwise, redirection will continue +;; indefinitely. The code now does a sanity check to ensure that it can find ;; a prompt in the comint buffer; however, it is still important to ensure that ;; this prompt is set correctly. ;; -;; XXX: This doesn't work so well unless comint-prompt-regexp is set; +;; XXX: This doesn't work so well unless `comint-prompt-regexp' is set; ;; perhaps it should prompt for a terminating string (with an ;; appropriate magic default by examining what we think is the prompt)? ;; +;; Fixme: look for appropriate fields, rather than regexp, if +;; `comint-use-prompt-regexp-instead-of-fields' is true. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Variables @@ -3044,6 +3040,12 @@ in the process buffer already.") When redirection is completed, the process filter is restored to this value.") +(defvar comint-redirect-subvert-readonly nil + "Non-nil means comint-redirect can insert into otherwise-readonly buffers. +The readonly status is toggled around insertion. +This is useful, for instance, for insertion into Help mode buffers. +You probably want to set it locally to the output buffer.") + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -3060,7 +3062,7 @@ Output from COMINT-BUFFER is redirected to OUTPUT-BUFFER, until something in the output matches FINISHED-REGEXP. If optional argument ECHO-INPUT is non-nil, output is echoed to the -original comint buffer. +original Comint buffer. This function is called by `comint-redirect-send-command-to-process', and does not normally need to be invoked by the end user or programmer." @@ -3106,7 +3108,7 @@ and does not normally need to be invoked by the end user or programmer." The variable `comint-redirect-output-buffer' says which buffer(s) to place output in. -INPUT-STRING is the input from the comint process. +INPUT-STRING is the input from the Comint process. This function runs as a process filter, and does not need to be invoked by the end user." @@ -3121,11 +3123,11 @@ end user." (defun comint-redirect-preoutput-filter (input-string) - "Comint filter function which redirects comint output to a buffer or buffers. + "Comint filter function which redirects Comint output to a buffer or buffers. The variable `comint-redirect-output-buffer' says which buffer(s) to place output in. -INPUT-STRING is the input from the comint process. +INPUT-STRING is the input from the Comint process. This function does not need to be invoked by the end user." (let ((output-buffer-list @@ -3157,15 +3159,14 @@ This function does not need to be invoked by the end user." ;; Send output to all registered buffers (save-excursion - (mapcar - (function (lambda(buf) - ;; Set this buffer to the output buffer - (set-buffer (get-buffer-create buf)) - ;; Go to the end of the buffer - (goto-char (point-max)) - ;; Insert the output - (insert filtered-input-string))) - output-buffer-list)) + (dolist (buf output-buffer-list) + ;; Set this buffer to the output buffer + (set-buffer (get-buffer-create buf)) + ;; Go to the end of the buffer + (goto-char (point-max)) + ;; Insert the output + (let ((inhibit-read-only comint-redirect-subvert-readonly)) + (insert filtered-input-string)))) ;; Message (and comint-redirect-verbose @@ -3189,7 +3190,7 @@ This function does not need to be invoked by the end user." ;;;###autoload (defun comint-redirect-send-command (command output-buffer echo &optional no-display) "Send COMMAND to process in current buffer, with output to OUTPUT-BUFFER. -With prefix arg, echo output in process buffer. +With prefix arg ECHO, echo output in process buffer. If NO-DISPLAY is non-nil, do not show the output buffer." (interactive "sCommand: \nBOutput Buffer: \nP") @@ -3394,4 +3395,5 @@ REGEXP-GROUP is the regular expression group in REGEXP to use." (provide 'comint) +;;; arch-tag: 1793314c-09db-40be-9549-9aeae3e75164 ;;; comint.el ends here diff --git a/lisp/compare-w.el b/lisp/compare-w.el index 8772cfcc6d..d283016750 100644 --- a/lisp/compare-w.el +++ b/lisp/compare-w.el @@ -1,6 +1,6 @@ ;;; compare-w.el --- compare text between windows for Emacs -;; Copyright (C) 1986, 1989, 1993, 1997 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1989, 1993, 1997, 2003 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: convenience files @@ -37,27 +37,100 @@ :group 'tools) (defcustom compare-windows-whitespace "\\(\\s-\\|\n\\)+" - "*Regexp that defines whitespace sequences for \\[compare-windows]. + "*Regexp or function that defines whitespace sequences for `compare-windows'. That command optionally ignores changes in whitespace. The value of `compare-windows-whitespace' is normally a regexp, but it can also be a function. The function's job is to categorize any whitespace around (including before) point; it should also advance -past any whitespace. The function is called in each buffer, with +past any whitespace. The function is called in each window, with point at the current scanning point. It gets one argument, the point -where `compare-windows' was originally called; it should not look at +where \\[compare-windows] was originally called; it should not look at any text before that point. -If the function returns the same value for both buffers, then the +If the function returns the same value for both windows, then the whitespace is considered to match, and is skipped." :type '(choice regexp function) :group 'compare-w) +(defcustom compare-ignore-whitespace nil + "*Non-nil means `compare-windows' ignores whitespace." + :type 'boolean + :group 'compare-w) + (defcustom compare-ignore-case nil - "*Non-nil means \\[compare-windows] ignores case differences." + "*Non-nil means `compare-windows' ignores case differences." + :type 'boolean + :group 'compare-w) + +(defcustom compare-windows-sync 'compare-windows-sync-default-function + "*Function or regexp that is used to synchronize points in two +windows if before calling `compare-windows' points are located +on mismatched positions. + +The value of `compare-windows-sync' can be a function. The +function's job is to advance points in both windows to the next +matching text. If the value of `compare-windows-sync' is a +regexp, then points in both windows are advanced to the next +occurrence of this regexp. + +The current default value is the general function +`compare-windows-sync-default-function' that is able to +synchronize points by using quadratic algorithm to find the first +matching 32-character string in two windows. + +The other useful values of this variable could be such functions +as `forward-word', `forward-sentence', `forward-paragraph', or a +regexp containing some field separator or a newline, depending on +the nature of the difference units separator. The variable can +be made buffer-local. + +If the value of this variable is `nil', then function `ding' is +called to beep or flash the screen when points are mismatched." + :type '(choice regexp function) + :group 'compare-w) + +(defcustom compare-windows-sync-string-size 32 + "*Size of string from one window that is searched in second window. + +Small number makes difference regions more fine-grained, but it +may fail by finding the wrong match. The bigger number makes +difference regions more coarse-grained. + +The default value 32 is good for the most cases." + :type 'integer + :group 'compare-w) + +(defcustom compare-windows-recenter nil + "*List of two values, each of which is used as argument of +function `recenter' called in each of two windows to place +matching points side-by-side. + +The value `(-1 0)' is useful if windows are split vertically, +and the value `((4) (4))' for horizontally split windows." + :type '(list sexp sexp) + :group 'compare-w) + +(defcustom compare-windows-highlight t + "*Non-nil means compare-windows highlights the differences." :type 'boolean :group 'compare-w) +(defface compare-windows-face + '((((type tty pc) (class color)) + (:background "turquoise3")) + (((class color) (background light)) + (:background "paleturquoise")) + (((class color) (background dark)) + (:background "paleturquoise4")) + (t (:underline t))) + "Face for highlighting of compare-windows difference regions." + :group 'compare-w) + +(defvar compare-windows-overlay1 nil) +(defvar compare-windows-overlay2 nil) +(defvar compare-windows-sync-point nil) + ;;;###autoload (defun compare-windows (ignore-whitespace) "Compare text in current window with text in next window. @@ -70,18 +143,34 @@ If both windows display the same buffer, the mark is pushed twice in that buffer: first in the other window, then in the selected window. -A prefix arg means ignore changes in whitespace. -The variable `compare-windows-whitespace' controls how whitespace is skipped. -If `compare-ignore-case' is non-nil, changes in case are also ignored." +A prefix arg means reverse the value of variable +`compare-ignore-whitespace'. If `compare-ignore-whitespace' is +nil, then a prefix arg means ignore changes in whitespace. If +`compare-ignore-whitespace' is non-nil, then a prefix arg means +don't ignore changes in whitespace. The variable +`compare-windows-whitespace' controls how whitespace is skipped. +If `compare-ignore-case' is non-nil, changes in case are also +ignored. + +If `compare-windows-sync' is non-nil, then successive calls of +this command work in interlaced mode: +on first call it advances points to the next difference, +on second call it synchronizes points by skipping the difference, +on third call it again advances points to the next difference and so on." (interactive "P") (let* (p1 p2 maxp1 maxp2 b1 b2 w2 (progress 1) (opoint1 (point)) opoint2 - (skip-func (if ignore-whitespace - (if (stringp compare-windows-whitespace) - 'compare-windows-skip-whitespace - compare-windows-whitespace)))) + (skip-func (if (if ignore-whitespace ; XOR + (not compare-ignore-whitespace) + compare-ignore-whitespace) + (if (stringp compare-windows-whitespace) + 'compare-windows-skip-whitespace + compare-windows-whitespace))) + (sync-func (if (stringp compare-windows-sync) + 'compare-windows-sync-regexp + compare-windows-sync))) (setq p1 (point) b1 (current-buffer)) (setq w2 (next-window (selected-window))) (if (eq w2 (selected-window)) @@ -99,9 +188,8 @@ If `compare-ignore-case' is non-nil, changes in case are also ignored." (push-mark) (while (> progress 0) - ;; If both buffers have whitespace next to point, + ;; If both windows have whitespace next to point, ;; optionally skip over it. - (and skip-func (save-excursion (let (p1a p2a w1 w2 result1 result2) @@ -124,10 +212,36 @@ If `compare-ignore-case' is non-nil, changes in case are also ignored." (setq p1 (+ p1 progress) p2 (+ p2 progress))) ;; Advance point now rather than later, in case we're interrupted. (goto-char p1) - (set-window-point w2 p2)) + (set-window-point w2 p2) + (when compare-windows-recenter + (recenter (car compare-windows-recenter)) + (with-selected-window w2 (recenter (cadr compare-windows-recenter))))) (if (= (point) opoint1) - (ding)))) + (if (not sync-func) + (ding) + ;; If points are not advanced (i.e. already on mismatch position), + ;; then synchronize points between both windows + (save-excursion + (setq compare-windows-sync-point nil) + (funcall sync-func) + (setq p1 (point)) + (set-buffer b2) + (goto-char p2) + (funcall sync-func) + (setq p2 (point))) + (goto-char p1) + (set-window-point w2 p2) + (when compare-windows-recenter + (recenter (car compare-windows-recenter)) + (with-selected-window w2 (recenter (cadr compare-windows-recenter)))) + ;; If points are still not synchronized, then ding + (when (and (= p1 opoint1) (= p2 opoint2)) + ;; Display error message when current points in two windows + ;; are unmatched and next matching points can't be found. + (compare-windows-dehighlight) + (ding) + (message "No more matching points")))))) ;; Move forward over whatever might be called whitespace. ;; compare-windows-whitespace is a regexp that matches whitespace. @@ -135,7 +249,6 @@ If `compare-ignore-case' is non-nil, changes in case are also ignored." ;; and find the latest point at which a match ends. ;; Don't try starting points before START, though. ;; Value is non-nil if whitespace is found. - ;; If there is whitespace before point, but none after, ;; then return t, but don't advance point. (defun compare-windows-skip-whitespace (start) @@ -159,6 +272,91 @@ If `compare-ignore-case' is non-nil, changes in case are also ignored." (or (/= beg opoint) (/= end opoint)))) +;; Move forward to the next synchronization regexp. +(defun compare-windows-sync-regexp () + (if (stringp compare-windows-sync) + (re-search-forward compare-windows-sync nil t))) + +;; Function works in two passes: one call on each window. +;; On the first call both matching points are computed, +;; and one of them is stored in compare-windows-sync-point +;; to be used when this function is called on second window. +(defun compare-windows-sync-default-function () + (if (not compare-windows-sync-point) + (let* ((w2 (next-window (selected-window))) + (b2 (window-buffer w2)) + (point-max2 (with-current-buffer b2 (point-max))) + (op2 (window-point w2)) + (op1 (point)) + (region-size compare-windows-sync-string-size) + (string-size compare-windows-sync-string-size) + in-bounds-p s1 p2 p12s p12) + (while (and + ;; until matching points are found + (not p12s) + ;; until size exceeds the maximum points of both buffers + ;; (bounds below take care to not overdo in each of them) + (or (setq in-bounds-p (< region-size (max (- (point-max) op1) + (- point-max2 op2)))) + ;; until string size becomes smaller than 4 + (> string-size 4))) + (if in-bounds-p + ;; make the next search in the double-sized region; + ;; on first iteration it is 2*compare-windows-sync-string-size, + ;; on last iterations it exceeds both buffers maximum points + (setq region-size (* region-size 2)) + ;; if region size exceeds the maximum points of both buffers, + ;; then start to halve the string size until 4; + ;; this helps to find differences near the end of buffers + (setq string-size (/ string-size 2))) + (let ((p1 op1) + (bound1 (- (min (+ op1 region-size) (point-max)) string-size)) + (bound2 (min (+ op2 region-size) point-max2))) + (while (< p1 bound1) + (setq s1 (buffer-substring-no-properties p1 (+ p1 string-size))) + (setq p2 (with-current-buffer b2 + (goto-char op2) + (let ((case-fold-search compare-ignore-case)) + (search-forward s1 bound2 t)))) + (when p2 + (setq p2 (- p2 string-size)) + (setq p12s (cons (list (+ p1 p2) p1 p2) p12s))) + (setq p1 (1+ p1))))) + (when p12s + ;; use closest matching points (i.e. points with minimal sum) + (setq p12 (cdr (assq (apply 'min (mapcar 'car p12s)) p12s))) + (goto-char (car p12)) + (compare-windows-highlight op1 (car p12) op2 (cadr p12) b2)) + (setq compare-windows-sync-point (or (cadr p12) t))) + ;; else set point in the second window to the pre-calculated value + (if (numberp compare-windows-sync-point) + (goto-char compare-windows-sync-point)) + (setq compare-windows-sync-point nil))) + +;; Highlight differences +(defun compare-windows-highlight (beg1 end1 beg2 end2 buf2) + (when compare-windows-highlight + (if compare-windows-overlay1 + (move-overlay compare-windows-overlay1 beg1 end1 (current-buffer)) + (setq compare-windows-overlay1 (make-overlay beg1 end1 (current-buffer))) + (overlay-put compare-windows-overlay1 'face 'compare-windows-face) + (overlay-put compare-windows-overlay1 'priority 1)) + (if compare-windows-overlay2 + (move-overlay compare-windows-overlay2 beg2 end2 buf2) + (setq compare-windows-overlay2 (make-overlay beg2 end2 buf2)) + (overlay-put compare-windows-overlay2 'face 'compare-windows-face) + (overlay-put compare-windows-overlay2 'priority 1)) + ;; Remove highlighting before next command is executed + (add-hook 'pre-command-hook 'compare-windows-dehighlight))) + +(defun compare-windows-dehighlight () + "Remove highlighting created by `compare-windows-highlight'." + (interactive) + (remove-hook 'pre-command-hook 'compare-windows-dehighlight) + (and compare-windows-overlay1 (delete-overlay compare-windows-overlay1)) + (and compare-windows-overlay2 (delete-overlay compare-windows-overlay2))) + (provide 'compare-w) +;;; arch-tag: 4177aab1-48e6-4a98-b7a1-000ee285de46 ;;; compare-w.el ends here diff --git a/lisp/complete.el b/lisp/complete.el index 4f22336520..d3c5de459d 100644 --- a/lisp/complete.el +++ b/lisp/complete.el @@ -1,6 +1,6 @@ ;;; complete.el --- partial completion mechanism plus other goodies -;; Copyright (C) 1990, 1991, 1992, 1993, 1999, 2000 +;; Copyright (C) 1990, 1991, 1992, 1993, 1999, 2000, 2003 ;; Free Software Foundation, Inc. ;; Author: Dave Gillespie @@ -368,7 +368,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") ;; Check if buffer contents can already be considered complete (if (and (eq mode 'exit) - (PC-is-complete-p str table pred)) + (test-completion str table pred)) 'complete ;; Do substitutions in directory names @@ -394,7 +394,9 @@ of `minibuffer-completion-table' and the minibuffer contents.") ;; Add wildcards if necessary (and filename (let ((dir (file-name-directory str)) - (file (file-name-nondirectory str))) + (file (file-name-nondirectory str)) + ;; The base dir for file-completion is passed in `predicate'. + (default-directory (expand-file-name pred))) (while (and (stringp dir) (not (file-directory-p dir))) (setq dir (directory-file-name dir)) (setq file (concat (replace-regexp-in-string @@ -408,6 +410,8 @@ of `minibuffer-completion-table' and the minibuffer contents.") (and filename (string-match "\\*.*/" str) (let ((pat str) + ;; The base dir for file-completion is passed in `predicate'. + (default-directory (expand-file-name pred)) files) (setq p (1+ (string-match "/[^/]*\\'" pat))) (while (setq p (string-match PC-delim-regex pat p)) @@ -637,7 +641,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") (if improved ;; We changed it... would it be complete without the space? - (if (PC-is-complete-p (buffer-substring 1 (1- end)) + (if (test-completion (buffer-substring 1 (1- end)) table pred) (delete-region (1- end) end))) @@ -645,7 +649,7 @@ of `minibuffer-completion-table' and the minibuffer contents.") ;; We changed it... enough to be complete? (and (eq mode 'exit) - (PC-is-complete-p (field-string) table pred)) + (test-completion (field-string) table pred)) ;; If totally ambiguous, display a list of completions (if (or (eq completion-auto-help t) @@ -676,20 +680,6 @@ of `minibuffer-completion-table' and the minibuffer contents.") (car poss))))) t))))) - -(defun PC-is-complete-p (str table pred) - (let ((res (if (listp table) - (assoc str table) - (if (vectorp table) - (or (equal str "nil") ; heh, heh, heh - (intern-soft str table)) - (funcall table str pred 'lambda))))) - (and res - (or (not pred) - (and (not (listp table)) (not (vectorp table))) - (funcall pred res)) - res))) - (defun PC-chop-word (new old) (let ((i -1) (j -1)) @@ -954,4 +944,5 @@ absolute rather than relative to some directory on the SEARCH-PATH." (provide 'complete) +;;; arch-tag: fc7e2768-ff44-4e22-b579-4d825b968458 ;;; complete.el ends here diff --git a/lisp/completion.el b/lisp/completion.el index 6f7eb569f7..2fb0ef0a3b 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -2505,4 +2505,5 @@ TYPE is the type of the wrapper to be added. Can be :before or :under." (provide 'completion) +;;; arch-tag: 6990dafe-4abd-4a1f-8c42-ffb25e120f5e ;;; completion.el ends here diff --git a/lisp/composite.el b/lisp/composite.el index 2590323304..736e94d4d6 100644 --- a/lisp/composite.el +++ b/lisp/composite.el @@ -213,7 +213,7 @@ text in the composition." (if (or (vectorp components) (listp components)) (setq components (encode-composition-components components))) (compose-region-internal start end components modification-func) - (set-buffer-modified-p modified-p))) + (restore-buffer-modified-p modified-p))) (defun decompose-region (start end) "Decompose text in the current region. @@ -530,4 +530,6 @@ Optional 3rd arg WITH-COMPOSITION-RULE is ignored." (make-obsolete 'decompose-composite-char 'char-to-string "21.1") + +;;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33 ;;; composite.el ends here diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el index e448f27991..bd9fd71b57 100644 --- a/lisp/cus-dep.el +++ b/lisp/cus-dep.el @@ -187,4 +187,6 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS" (kill-emacs)) + +;;; arch-tag: b7b6421a-bf7a-44fd-a382-6f44976bdf68 ;;; cus-dep.el ends here diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 9041ec3c14..951b14f7f0 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1,6 +1,6 @@ ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages ;; -;; Copyright (C) 1996,97,1999,2000,01,02,2003 Free Software Foundation, Inc. +;; Copyright (C) 1996,97,1999,2000,01,02,03,2004 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen ;; Maintainer: FSF @@ -74,6 +74,7 @@ (defgroup emulations nil "Emulations of other editors." + :link '(custom-manual "(emacs)Emulation") :group 'editing) (defgroup mouse nil @@ -88,11 +89,6 @@ "Interfacing to external utilities." :group 'emacs) -(defgroup bib nil - "Code related to the `bib' bibliography processor." - :tag "Bibliography" - :group 'external) - (defgroup processes nil "Process, subshell, compilation, and job control support." :group 'external @@ -117,6 +113,7 @@ (defgroup c nil "Support for the C language and related languages." + :link '(custom-manual "(ccmode)") :group 'languages) (defgroup tools nil @@ -141,6 +138,7 @@ (defgroup news nil "Support for netnews reading and posting." + :link '(custom-manual "(gnus)") :group 'applications) (defgroup games nil @@ -195,6 +193,7 @@ (defgroup i18n nil "Internationalization and alternate character-set support." + :link '(custom-manual "(emacs)International") :group 'environment :group 'editing) @@ -245,8 +244,6 @@ (defgroup customize '((widgets custom-group)) "Customization of the Customization support." :link '(custom-manual "(elisp)Customization") - :link '(url-link :tag "(Old?) Development Page" - "http://www.dina.kvl.dk/~abraham/custom/") :prefix "custom-" :group 'help) @@ -272,6 +269,7 @@ (defgroup abbrev-mode nil "Word abbreviations mode." + :link '(custom-manual "(emacs)Abbrevs") :group 'abbrev) (defgroup alloc nil @@ -281,16 +279,13 @@ (defgroup undo nil "Undoing changes in buffers." + :link '(custom-manual "(emacs)Undo") :group 'editing) (defgroup modeline nil "Content of the modeline." :group 'environment) -(defgroup fill nil - "Indenting and filling text." - :group 'editing) - (defgroup editing-basics nil "Most basic editing facilities." :group 'editing) @@ -321,6 +316,7 @@ (defgroup minibuffer nil "Controling the behaviour of the minibuffer." + :link '(custom-manual "(emacs)Minibuffer") :group 'environment) (defgroup keyboard nil @@ -349,6 +345,7 @@ (defgroup windows nil "Windows within a frame." + :link '(custom-manual "(emacs)Windows") :group 'environment) ;;; Utilities. @@ -1954,7 +1951,7 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." (type (widget-type widget)) (buttons (widget-get widget :buttons)) (start (point)) - found) + (parents nil)) (insert (or initial-string "Parent groups:")) (mapatoms (lambda (symbol) (let ((entry (assq name (get symbol 'custom-group)))) @@ -1965,12 +1962,30 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." :tag (custom-unlispify-tag-name symbol) symbol) buttons) - (setq found t))))) - (widget-put widget :buttons buttons) - (if found - (insert "\n") + (setq parents (cons symbol parents)))))) + (and (null (get name 'custom-links)) ;No links of its own. + (= (length parents) 1) ;A single parent. + (let* ((links (get (car parents) 'custom-links)) + (many (> (length links) 2))) + (when links + (insert "\nParent documentation: ") + (while links + (push (widget-create-child-and-convert widget (car links)) + buttons) + (setq links (cdr links)) + (cond ((null links) + (insert ".\n")) + ((null (cdr links)) + (if many + (insert ", and ") + (insert " and "))) + (t + (insert ", "))))))) + (if parents + (insert "\n") (delete-region start (point))) - found)) + (widget-put widget :buttons buttons) + parents)) ;;; The `custom-comment' Widget. @@ -4111,4 +4126,5 @@ if that value is non-nil." (provide 'cus-edit) +;;; arch-tag: 64533aa4-1b1a-48c3-8812-f9dc718e8a6f ;;; cus-edit.el ends here diff --git a/lisp/cus-face.el b/lisp/cus-face.el index f1744cc9e6..1ff07c4c36 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el @@ -394,4 +394,5 @@ ARGS is defined as for `custom-theme-reset-faces'" (provide 'cus-face) +;;; arch-tag: 9a5c4b63-0d27-4c92-a5af-f2c7ed764c2b ;;; cus-face.el ends here diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 0f036a167e..1d1dc653b1 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -126,6 +126,7 @@ (insert-default-directory minibuffer boolean) ;; fns.c (use-dialog-box menu boolean "21.1") + (use-file-dialog menu boolean "21.4") ;; frame.c (default-frame-alist frames (repeat (cons :format "%v" @@ -203,6 +204,8 @@ ;; syntax.c (parse-sexp-ignore-comments editing-basics boolean) (words-include-escapes editing-basics boolean) + (open-paren-in-column-0-is-defun-start editing-basics boolean + "21.1") ;; window.c (temp-buffer-show-function windows (choice (const nil) function)) (display-buffer-function windows (choice (const nil) function)) @@ -257,12 +260,14 @@ (line-number-display-limit display (choice integer (const :tag "No limit" nil))) + (line-number-display-limit-width display integer) (highlight-nonselected-windows display boolean) (message-log-max debug (choice (const :tag "Disable" nil) (integer :menu-tag "lines" :format "%v") (other :tag "Unlimited" t))) (unibyte-display-via-language-environment mule boolean) + (blink-cursor-alist cursor alist "21.5") ;; xfaces.c (scalable-fonts-allowed display boolean) ;; xfns.c @@ -322,6 +327,8 @@ (put symbol 'custom-version version))))) (custom-add-to-group 'iswitchb 'read-buffer-function 'custom-variable) +(custom-add-to-group 'font-lock 'open-paren-in-column-0-is-defun-start + 'custom-variable) (put 'selection-coding-system 'custom-set (lambda (symbol value) (set-selection-coding-system value) @@ -334,4 +341,5 @@ (unless purify-flag (provide 'cus-start)) +;;; arch-tag: 4502730d-bcb3-4f5e-99a3-a86f2d54af60 ;;; cus-start.el ends here diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 02ba2de194..f1001990d3 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -154,4 +154,5 @@ It includes all faces in list FACES." (unless (looking-at "\n") (princ "\n"))))) +;;; arch-tag: cd6919bc-63af-410e-bae2-b6702e762344 ;;; cus-theme.el ends here diff --git a/lisp/custom.el b/lisp/custom.el index bcec5904fd..f5cfd55400 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1,6 +1,7 @@ ;;; custom.el --- tools for declaring and initializing options ;; -;; Copyright (C) 1996, 1997, 1999, 2001, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1997, 1999, 2001, 2002, 2004 +;; Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen ;; Maintainer: FSF @@ -264,7 +265,7 @@ FACE does not need to be quoted. Third argument DOC is the face documentation. -If FACE has been set with `custom-set-face', set the face attributes +If FACE has been set with `custom-set-faces', set the face attributes as specified by that function, otherwise set the face attributes according to SPEC. @@ -306,6 +307,10 @@ following REQ are defined: `background' (what color is used for the background text) Should be one of `light' or `dark'. +`min-colors' (the minimum number of colors the frame should support) + Should be an integer, it is compared with the result of + `display-color-cells'. + Read the section about customization in the Emacs Lisp manual for more information." ;; It is better not to use backquote in this file, @@ -502,6 +507,14 @@ LOAD should be either a library file name, or a feature name." "Load all dependencies for SYMBOL." (unless custom-load-recursion (let ((custom-load-recursion t)) + ;; Load these files if not already done, + ;; to make sure we know all the dependencies of SYMBOL. + (condition-case nil + (require 'cus-load) + (error nil)) + (condition-case nil + (require 'cus-start) + (error nil)) (dolist (load (get symbol 'custom-loads)) (cond ((symbolp load) (condition-case nil (require load) (error nil))) ;; This is subsumed by the test below, but it's much faster. @@ -550,17 +563,17 @@ from THEME by `custom-make-theme-feature'." (error "Keyword %s is missing an argument" keyword)) (setq args (cdr args)) (cond ((eq keyword :short-description) - (put theme 'theme-short-description short-description)) + (put theme 'theme-short-description value)) ((eq keyword :immediate) - (put theme 'theme-immediate immediate)) + (put theme 'theme-immediate value)) ((eq keyword :variable-set-string) - (put theme 'theme-variable-set-string variable-set-string)) + (put theme 'theme-variable-set-string value)) ((eq keyword :variable-reset-string) - (put theme 'theme-variable-reset-string variable-reset-string)) + (put theme 'theme-variable-reset-string value)) ((eq keyword :face-set-string) - (put theme 'theme-face-set-string face-set-string)) + (put theme 'theme-face-set-string value)) ((eq keyword :face-reset-string) - (put theme 'theme-face-reset-string face-reset-string))))))) + (put theme 'theme-face-reset-string value))))))) (defmacro deftheme (theme &optional doc &rest args) "Declare custom theme THEME. @@ -1063,4 +1076,5 @@ This means reset VARIABLE to its value in TO-THEME." (provide 'custom) +;;; arch-tag: 041b6116-aabe-4f9a-902d-74092bc3dab2 ;;; custom.el ends here diff --git a/lisp/cvs-status.el b/lisp/cvs-status.el index 27c5c20649..528ab74e50 100644 --- a/lisp/cvs-status.el +++ b/lisp/cvs-status.el @@ -1,6 +1,6 @@ ;;; cvs-status.el --- major mode for browsing `cvs status' output -;; Copyright (C) 1999, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 03, 2004 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: pcl-cvs cvs status tree tools @@ -385,7 +385,7 @@ the list is a three-string list TAG, KIND, REV." ;;;; (defvar cvs-tree-use-jisx0208 - nil ;; (and (char-display-font 'japanese-jisx0208) t) + (and (char-displayable-p (make-char 'japanese-jisx0208 40 44)) t) "*Non-nil if we should use the graphical glyphs from `japanese-jisx0208'. Otherwise, default to ASCII chars like +, - and |.") @@ -513,4 +513,5 @@ Optional prefix ARG chooses between two representations." (provide 'cvs-status) +;;; arch-tag: db8b5094-d02a-473e-a476-544e89ff5ad0 ;;; cvs-status.el ends here diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index 11a8aac6f6..3763f2ccab 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el @@ -1,6 +1,6 @@ ;;; dabbrev.el --- dynamic abbreviation package -;; Copyright (C) 1985, 86, 92, 94, 96, 1997, 2000, 01, 2003 +;; Copyright (C) 1985, 86, 92, 94, 96, 1997, 2000, 01, 03, 2004 ;; Free Software Foundation, Inc. ;; Author: Don Morrison @@ -529,7 +529,7 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." ;; Take the following word, with intermediate separators, ;; as our expansion this time. (re-search-forward - (concat "\\(\\(" dabbrev--abbrev-char-regexp "\\)+\\)")) + (concat "\\(?:" dabbrev--abbrev-char-regexp "\\)+")) (setq expansion (buffer-substring-no-properties dabbrev--last-expansion-location (point))) @@ -793,10 +793,7 @@ of the start of the occurrence." ;; Walk through the buffers till we find a match. (let (expansion) (while (and (not expansion) dabbrev--friend-buffer-list) - (setq dabbrev--last-buffer - (car dabbrev--friend-buffer-list)) - (setq dabbrev--friend-buffer-list - (cdr dabbrev--friend-buffer-list)) + (setq dabbrev--last-buffer (pop dabbrev--friend-buffer-list)) (set-buffer dabbrev--last-buffer) (dabbrev--scanning-message) (setq dabbrev--last-expansion-location (point-min)) @@ -851,7 +848,8 @@ of the start of the occurrence." (defun dabbrev--safe-replace-match (string &optional fixedcase literal) (if (eq major-mode 'picture-mode) - (picture-replace-match string fixedcase literal) + (with-no-warnings + (picture-replace-match string fixedcase literal)) (replace-match string fixedcase literal))) ;;;---------------------------------------------------------------- @@ -999,8 +997,7 @@ Leaves point at the location of the start of the expansion." nil ;; We have a truly valid match. Find the end. (re-search-forward pattern2) - (setq found-string (buffer-substring-no-properties - (match-beginning 0) (match-end 0))) + (setq found-string (match-string-no-properties 0)) (setq result found-string) (and ignore-case (setq found-string (downcase found-string))) ;; Ignore this match if it's already in the table. @@ -1009,9 +1006,7 @@ Leaves point at the location of the start of the expansion." (string= found-string table-string)) (setq found-string nil))) ;; Prepare to continue searching. - (if reverse - (goto-char (match-beginning 0)) - (goto-char (match-end 0)))) + (goto-char (if reverse (match-beginning 0) (match-end 0)))) ;; If we found something, use it. (when found-string ;; Put it into `dabbrev--last-table' @@ -1027,4 +1022,5 @@ Leaves point at the location of the start of the expansion." (provide 'dabbrev) +;;; arch-tag: 29e58596-f080-4306-a409-70296cf9d46f ;;; dabbrev.el ends here diff --git a/lisp/delim-col.el b/lisp/delim-col.el index 70791a3dae..b5be7ff4eb 100644 --- a/lisp/delim-col.el +++ b/lisp/delim-col.el @@ -2,9 +2,9 @@ ;; Copyright (C) 1999, 2000 Free Software Foundation, Inc. -;; Author: Vinicius Jose Latorre -;; Maintainer: Vinicius Jose Latorre -;; Time-stamp: <2001-10-13 10:02:26 pavel> +;; Author: Vinicius Jose Latorre +;; Maintainer: Vinicius Jose Latorre +;; Time-stamp: <2004/03/09 21:32:06 vinicius> ;; Version: 2.1 ;; Keywords: internal ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ @@ -479,4 +479,5 @@ START and END delimits the corners of text rectangle." (provide 'delim-col) +;;; arch-tag: 1cc0c5c5-1b2a-43e4-9ba5-bf9441cfd1a9 ;;; delim-col.el ends here diff --git a/lisp/delsel.el b/lisp/delsel.el index 9305dfbf31..88e23cb218 100644 --- a/lisp/delsel.el +++ b/lisp/delsel.el @@ -151,4 +151,5 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (provide 'delsel) +;;; arch-tag: 1e388890-1b50-4ed0-9347-763b1343b6ed ;;; delsel.el ends here diff --git a/lisp/desktop.el b/lisp/desktop.el index 41884f787d..45f951883c 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -37,39 +37,19 @@ ;; - buffer-read-only ;; - some local variables -;; To use this, first put these two lines in the bottom of your .emacs -;; file (the later the better): +;; To use this, use customize to turn on desktop-save-mode or add the +;; following line somewhere in your .emacs file: ;; -;; (desktop-load-default) -;; (desktop-read) +;; (desktop-save-mode 1) ;; -;; Between these two lines you may wish to add something that updates the -;; variables `desktop-globals-to-save' and/or `desktop-locals-to-save'. If -;; for instance you want to save the local variable `foobar' for every buffer -;; in which it is local, you could add the line -;; -;; (setq desktop-locals-to-save (cons 'foobar desktop-locals-to-save)) -;; -;; To avoid saving excessive amounts of data you may also wish to add -;; something like the following -;; -;; (add-hook 'kill-emacs-hook -;; '(lambda () -;; (desktop-truncate search-ring 3) -;; (desktop-truncate regexp-search-ring 3))) -;; -;; which will make sure that no more than three search items are saved. You -;; must place this line *after* the `(desktop-load-default)' line. See also -;; the variable `desktop-save-hook'. - -;; Start Emacs in the root directory of your "project". The desktop saver -;; is inactive by default. You activate it by M-x desktop-save RET. When -;; you exit the next time the above data will be saved. This ensures that -;; all the files you were editing will be reloaded the next time you start -;; Emacs from the same directory and that points will be set where you -;; left them. If you save a desktop file in your home directory it will -;; act as a default desktop when you start Emacs from a directory that -;; doesn't have its own. I never do this, but you may want to. +;; For further usage information, look at the section +;; "Saving Emacs Sessions" in the GNU Emacs Manual. + +;; When the desktop module is loaded, the function `desktop-kill' is +;; added to the `kill-emacs-hook'. This function is responsible for +;; saving the desktop when Emacs is killed. Furthermore an anonymous +;; function is added to the `after-init-hook'. This function is +;; responsible for loading the desktop when Emacs is started. ;; Some words on minor modes: Most minor modes are controlled by ;; buffer-local variables, which have a standard save / restore @@ -110,7 +90,7 @@ (mapcar 'require '(info dired reporter))) (defvar desktop-file-version "206" - "Verion number of desktop file format. + "Version number of desktop file format. Written into the desktop file and used at desktop read to provide backward compatibility.") @@ -122,24 +102,32 @@ backward compatibility.") "Save status of Emacs when you exit." :group 'frames) -(defcustom desktop-enable nil - "*Non-nil enable Desktop to save the state of Emacs when you exit." - :group 'desktop - :type 'boolean - :require 'desktop - :initialize 'custom-initialize-default - :version "20.3") +;;;###autoload +(define-minor-mode desktop-save-mode + "Toggle desktop saving mode. +With numeric ARG, turn desktop saving on if ARG is positive, off +otherwise. See variable `desktop-save' for a description of when the +desktop is saved." + :global t + :group 'desktop) + +;; Maintained for backward compatibility +(defvaralias 'desktop-enable 'desktop-save-mode) +(make-obsolete-variable 'desktop-enable 'desktop-save-mode) (defcustom desktop-save 'ask-if-new - "*When the user changes desktop or quits emacs, should the desktop be saved? -\(in the current desktop directory) + "*Specifies whether the desktop should be saved when it is killed. +A desktop is killed when the user changes desktop or quits Emacs. +Possible values are: t -- always save. ask -- always ask. ask-if-new -- ask if no desktop file exists, otherwise just save. ask-if-exists -- ask if desktop file exists, otherwise don't save. if-exists -- save if desktop file exists, otherwise don't save. nil -- never save. -The desktop is never saved when `desktop-enable' is nil." +The desktop is never saved when `desktop-save-mode' is nil. +The variables `desktop-directory' and `desktop-base-file-name' +determine where the desktop is saved." :type '(choice (const :tag "Always save" t) (const :tag "Always ask" ask) @@ -151,7 +139,7 @@ The desktop is never saved when `desktop-enable' is nil." (defcustom desktop-base-file-name (convert-standard-filename ".emacs.desktop") - "File for Emacs desktop, not including the directory name." + "Name of file for Emacs desktop, excluding the directory part." :type 'file :group 'desktop) (defvaralias 'desktop-basefilename 'desktop-base-file-name) @@ -163,25 +151,25 @@ The base name of the file is specified in `desktop-base-file-name'." :group 'desktop) (defcustom desktop-missing-file-warning nil - "*If non-nil then desktop warns when a file no longer exists. + "*If non-nil then `desktop-read' warns when a file no longer exists. Otherwise it simply ignores that file." :type 'boolean :group 'desktop) (defcustom desktop-no-desktop-file-hook nil - "Normal hook run after fail of `desktop-read' due to missing desktop file. + "Normal hook run when `desktop-read' can't find a desktop file. May e.g. be used to show a dired buffer." :type 'hook :group 'desktop) (defcustom desktop-after-read-hook nil - "Normal hook run after a sucessful `desktop-read'. + "Normal hook run after a successful `desktop-read'. May e.g. be used to show a buffer list." :type 'hook :group 'desktop) (defcustom desktop-save-hook nil - "Hook run before desktop saves the state of Emacs. + "Normal hook run before the desktop is saved in a desktop file. This is useful for truncating history lists, for example." :type 'hook :group 'desktop) @@ -193,11 +181,10 @@ This is useful for truncating history lists, for example." search-ring regexp-search-ring register-alist) - "List of global variables to save when killing Emacs. -An element may be variable name (a symbol) -or a cons cell of the form (VAR . MAX-SIZE), -which means to truncate VAR's value to at most MAX-SIZE elements -\(if the value is a list) before saving the value. + "List of global variables saved by `desktop-save'. +An element may be variable name (a symbol) or a cons cell of the form +\(VAR . MAX-SIZE), which means to truncate VAR's value to at most +MAX-SIZE elements (if the value is a list) before saving the value. Feature: Saving `kill-ring' implies saving `kill-ring-yank-pointer'." :type '(repeat (restricted-sexp :match-alternatives (symbolp consp))) :group 'desktop) @@ -209,7 +196,7 @@ Feature: Saving `kill-ring' implies saving `kill-ring-yank-pointer'." search-ring-yank-pointer regexp-search-ring regexp-search-ring-yank-pointer) - "List of global variables set to clear by `desktop-clear'. + "List of global variables to clear by `desktop-clear'. An element may be variable name (a symbol) or a cons cell of the form \(VAR . FORM). Symbols are set to nil and for cons cells VAR is set to the value obtained by evaluateing FORM." @@ -217,19 +204,21 @@ to the value obtained by evaluateing FORM." :group 'desktop) (defcustom desktop-clear-preserve-buffers-regexp - "^\\*tramp/.+\\*$" + "^\\(\\*scratch\\*\\|\\*Messages\\*\\|\\*tramp/.+\\*\\)$" "Regexp identifying buffers that `desktop-clear' should not delete." :type 'regexp :group 'desktop) ;; Maintained for backward compatibility -(defcustom desktop-clear-preserve-buffers - '("*scratch*" "*Messages*") - "*List of buffer names that `desktop-clear' should not delete." +(defcustom desktop-clear-preserve-buffers nil + "*List of buffer names that `desktop-clear' should not delete. +This variable is maintained for backward compatibility only." :type '(repeat string) :group 'desktop) +(make-obsolete-variable 'desktop-clear-preserve-buffers + 'desktop-clear-preserve-buffers-regexp) -(defvar desktop-locals-to-save '( +(defcustom desktop-locals-to-save '( desktop-locals-to-save ; Itself! Think it over. truncate-lines case-fold-search @@ -237,9 +226,12 @@ to the value obtained by evaluateing FORM." fill-column overwrite-mode change-log-default-name - line-number-mode) + line-number-mode + buffer-file-coding-system) "List of local variables to save for each buffer. -The variables are saved only when they really are local.") +The variables are saved only when they really are local." + :type '(repeat symbol) + :group 'desktop) (make-variable-buffer-local 'desktop-locals-to-save) ;; We skip .log files because they are normally temporary. @@ -251,7 +243,7 @@ The variables are saved only when they really are local.") :type 'regexp :group 'desktop) -;; Skip ange-ftp files +;; Skip tramp and ange-ftp files (defcustom desktop-files-not-to-save "^/[^/:]*:" "Regexp identifying files whose buffers are to be excluded from saving." @@ -260,7 +252,7 @@ The variables are saved only when they really are local.") (defcustom desktop-buffer-modes-to-save '(Info-mode rmail-mode) - "If a buffer is of one of these major modes, save the buffer name. + "If a buffer is of one of these major modes, save the buffer state. It is up to the functions in `desktop-buffer-handlers' to decide whether the buffer should be recreated or not, and how." :type '(repeat symbol) @@ -284,17 +276,18 @@ Possible values are: '(desktop-buffer-info-misc-data desktop-buffer-dired-misc-data) "*Functions used to determine auxiliary information for a buffer. -These functions are called in order, with no arguments. If a function -returns non-nil, its value is saved along with the desktop buffer for -which it was called; no further functions will be called. +These functions are called by `desktop-save' in order, with no +arguments. If a function returns non-nil, its value is saved along +with the state of the buffer for which it was called; no further +functions will be called. -File names should formatted using the call +When file names are returned, they should be formatted using the call \"(desktop-file-name FILE-NAME dirname)\". -Later, when desktop.el restores the buffers it has saved, each of the -`desktop-buffer-handlers' functions will have access to a buffer local -variable, named `desktop-buffer-misc', whose value is what the -\"misc\" function returned previously." +Later, when `desktop-read' restores buffers, each of the functions in +`desktop-buffer-handlers' will have access to a buffer local variable, +named `desktop-buffer-misc', whose value is what the function in +`desktop-buffer-misc-functions' returned." :type '(repeat function) :group 'desktop) @@ -304,7 +297,7 @@ variable, named `desktop-buffer-misc', whose value is what the desktop-buffer-mh desktop-buffer-info desktop-buffer-file) - "*List of functions to call in order to create a buffer. + "*Functions called by `desktop-read' in order to create a buffer. The functions are called without explicit parameters but can use the following variables: @@ -343,7 +336,7 @@ this table." ;; ---------------------------------------------------------------------------- (defvar desktop-dirname nil - "The directory in which the current desktop file resides.") + "The directory in which the desktop file should be saved.") (defconst desktop-header ";; -------------------------------------------------------------------------- @@ -355,17 +348,18 @@ this table." "Hooks run after all buffers are loaded; intended for internal use.") ;; ---------------------------------------------------------------------------- -(defun desktop-truncate (l n) +(defun desktop-truncate (list n) "Truncate LIST to at most N elements destructively." - (let ((here (nthcdr (1- n) l))) + (let ((here (nthcdr (1- n) list))) (if (consp here) (setcdr here nil)))) ;; ---------------------------------------------------------------------------- (defun desktop-clear () "Empty the Desktop. -This kills all buffers except for internal ones and those listed -in `desktop-clear-preserve-buffers'. Furthermore, it clears the +This kills all buffers except for internal ones and those matching +`desktop-clear-preserve-buffers-regexp' or listed in +`desktop-clear-preserve-buffers'. Furthermore, it clears the variables listed in `desktop-globals-to-clear'." (interactive) (dolist (var desktop-globals-to-clear) @@ -389,15 +383,15 @@ variables listed in `desktop-globals-to-clear'." (add-hook 'kill-emacs-hook 'desktop-kill) (defun desktop-kill () - "If `desktop-enable' is non-nil, do what `desktop-save' says to do. + "If `desktop-save-mode' is non-nil, do what `desktop-save' says to do. If the desktop should be saved and `desktop-dirname' is nil, ask the user where to save the desktop." (when (and - desktop-enable + desktop-save-mode (let ((exists (file-exists-p (expand-file-name desktop-base-file-name desktop-dirname)))) (or - (eq desktop-save 't) + (eq desktop-save t) (and exists (memq desktop-save '(ask-if-new if-exists))) (and (or @@ -429,22 +423,22 @@ is nil, ask the user where to save the desktop." value))) ;; ---------------------------------------------------------------------------- -(defun desktop-internal-v2s (val) +(defun desktop-internal-v2s (value) "Convert VALUE to a pair (QUOTE . TXT); (eval (read TXT)) gives VALUE. TXT is a string that when read and evaluated yields value. QUOTE may be `may' (value may be quoted), `must' (values must be quoted), or nil (value may not be quoted)." (cond - ((or (numberp val) (null val) (eq t val)) - (cons 'may (prin1-to-string val))) - ((stringp val) - (let ((copy (copy-sequence val))) + ((or (numberp value) (null value) (eq t value)) + (cons 'may (prin1-to-string value))) + ((stringp value) + (let ((copy (copy-sequence value))) (set-text-properties 0 (length copy) nil copy) ;; Get rid of text properties because we cannot read them (cons 'may (prin1-to-string copy)))) - ((symbolp val) - (cons 'must (prin1-to-string val))) - ((vectorp val) + ((symbolp value) + (cons 'must (prin1-to-string value))) + ((vectorp value) (let* ((special nil) (pass1 (mapcar (lambda (el) @@ -452,7 +446,7 @@ QUOTE may be `may' (value may be quoted), (if (null (car res)) (setq special t)) res)) - val))) + value))) (if special (cons nil (concat "(vector " (mapconcat (lambda (el) @@ -463,8 +457,8 @@ QUOTE may be `may' (value may be quoted), " ") ")")) (cons 'may (concat "[" (mapconcat 'cdr pass1 " ") "]"))))) - ((consp val) - (let ((p val) + ((consp value) + (let ((p value) newlist use-list* anynil) @@ -494,13 +488,13 @@ QUOTE may be `may' (value may be quoted), ")")) (cons 'must (concat "(" (mapconcat 'cdr newlist " ") ")"))))) - ((subrp val) + ((subrp value) (cons nil (concat "(symbol-function '" - (substring (prin1-to-string val) 7 -1) + (substring (prin1-to-string value) 7 -1) ")"))) - ((markerp val) - (let ((pos (prin1-to-string (marker-position val))) - (buf (prin1-to-string (buffer-name (marker-buffer val))))) + ((markerp value) + (let ((pos (prin1-to-string (marker-position value))) + (buf (prin1-to-string (buffer-name (marker-buffer value))))) (cons nil (concat "(let ((mk (make-marker)))" " (add-hook 'desktop-delay-hook" " (list 'lambda '() (list 'set-marker mk " @@ -509,12 +503,12 @@ QUOTE may be `may' (value may be quoted), (cons 'may "\"Unprintable entity\"")))) ;; ---------------------------------------------------------------------------- -(defun desktop-value-to-string (val) +(defun desktop-value-to-string (value) "Convert VALUE to a string that when read evaluates to the same value. Not all types of values are supported." (let* ((print-escape-newlines t) (float-output-format nil) - (quote.txt (desktop-internal-v2s val)) + (quote.txt (desktop-internal-v2s value)) (quote (car quote.txt)) (txt (cdr quote.txt))) (if (eq quote 'must) @@ -580,7 +574,9 @@ DIRNAME must be the directory in which the desktop file will be saved." ;; ---------------------------------------------------------------------------- (defun desktop-save (dirname) - "Save the Desktop file. Parameter DIRNAME specifies where to save desktop." + "Save the desktop in a desktop file. +Parameter DIRNAME specifies where to save the desktop file. +See also `desktop-base-file-name'." (interactive "DDirectory to save desktop file in: ") (run-hooks 'desktop-save-hook) (setq dirname (file-name-as-directory (expand-file-name dirname))) @@ -665,82 +661,98 @@ DIRNAME must be the directory in which the desktop file will be saved." ;; ---------------------------------------------------------------------------- (defun desktop-remove () - "Delete the Desktop file and inactivate the desktop system." + "Delete desktop file in `desktop-dirname'. +This function also sets `desktop-dirname' to nil." (interactive) - (if desktop-dirname - (let ((filename (expand-file-name desktop-base-file-name desktop-dirname))) - (setq desktop-dirname nil) - (if (file-exists-p filename) + (when desktop-dirname + (let ((filename (expand-file-name desktop-base-file-name desktop-dirname))) + (setq desktop-dirname nil) + (when (file-exists-p filename) (delete-file filename))))) + ;; ---------------------------------------------------------------------------- ;;;###autoload -(defun desktop-read () - "Read the Desktop file and the files it specifies. -This is a no-op when Emacs is running in batch mode. -Look for the desktop file according to the variables `desktop-base-file-name' -and `desktop-path'. If no desktop file is found, clear the desktop. -Returns t if it has read a desktop file, nil otherwise." +(defun desktop-read (&optional dirname) + "Read and process the desktop file in directory DIRNAME. +Look for a desktop file in DIRNAME, or if DIRNAME is omitted, look in +directories listed in `desktop-path'. If a desktop file is found, it +is processed and `desktop-after-read-hook' is run. If no desktop file +is found, clear the desktop and run `desktop-no-desktop-file-hook'. +This function is a no-op when Emacs is running in batch mode. +It returns t if a desktop file was loaded, nil otherwise." (interactive) (unless noninteractive - (let ((dirs desktop-path)) - (while - (and - dirs - (not - (file-exists-p (expand-file-name desktop-base-file-name (car dirs))))) - (setq dirs (cdr dirs))) - (setq desktop-dirname (and dirs (file-name-as-directory (expand-file-name (car dirs))))) - (if desktop-dirname - (let ((desktop-first-buffer nil)) - ;; Evaluate desktop buffer. - (load (expand-file-name desktop-base-file-name desktop-dirname) t t t) - ;; `desktop-create-buffer' puts buffers at end of the buffer list. - ;; We want buffers existing prior to evaluating the desktop (and not reused) - ;; to be placed at the end of the buffer list, so we move them here. - (mapcar 'bury-buffer - (nreverse (cdr (memq desktop-first-buffer (nreverse (buffer-list)))))) - (switch-to-buffer (car (buffer-list))) - (run-hooks 'desktop-delay-hook) - (setq desktop-delay-hook nil) - (run-hooks 'desktop-after-read-hook) - (message "Desktop loaded.") - t) - (desktop-clear) - (run-hooks 'desktop-no-desktop-file-hook) - (message "No desktop file.") - nil)))) + (setq desktop-dirname + (file-name-as-directory + (expand-file-name + (or + ;; If DIRNAME is specified, use it. + (and (< 0 (length dirname)) dirname) + ;; Otherwise search desktop file in desktop-path. + (let ((dirs desktop-path)) + (while + (and + dirs + (not + (file-exists-p (expand-file-name desktop-base-file-name (car dirs))))) + (setq dirs (cdr dirs))) + (and dirs (car dirs))) + ;; If not found and `desktop-path' is non-nil, use its first element. + (and desktop-path (car desktop-path)) + ;; Default: Home directory. + "~")))) + (if (file-exists-p (expand-file-name desktop-base-file-name desktop-dirname)) + ;; Desktop file found, process it. + (let ((desktop-first-buffer nil)) + ;; Evaluate desktop buffer. + (load (expand-file-name desktop-base-file-name desktop-dirname) t t t) + ;; `desktop-create-buffer' puts buffers at end of the buffer list. + ;; We want buffers existing prior to evaluating the desktop (and not reused) + ;; to be placed at the end of the buffer list, so we move them here. + (mapcar 'bury-buffer + (nreverse (cdr (memq desktop-first-buffer (nreverse (buffer-list)))))) + (switch-to-buffer (car (buffer-list))) + (run-hooks 'desktop-delay-hook) + (setq desktop-delay-hook nil) + (run-hooks 'desktop-after-read-hook) + (message "Desktop loaded.") + t) + ;; No desktop file found. + (desktop-clear) + (let ((default-directory desktop-dirname)) + (run-hooks 'desktop-no-desktop-file-hook)) + (message "No desktop file.") + nil))) ;; ---------------------------------------------------------------------------- +;; Maintained for backward compatibility ;;;###autoload (defun desktop-load-default () "Load the `default' start-up library manually. -Also inhibit further loading of it. Call this from your `.emacs' file -to provide correct modes for autoloaded files." +Also inhibit further loading of it." (if (not inhibit-default-init) ; safety check (progn (load "default" t t) (setq inhibit-default-init t)))) +(make-obsolete 'desktop-load-default 'desktop-save-mode) ;; ---------------------------------------------------------------------------- ;;;###autoload -(defun desktop-change-dir (dir) - "Save and clear the desktop, then load the desktop from directory DIR. -However, if `desktop-enable' was nil at call, don't save the old desktop. -This function always sets `desktop-enable' to t." - (interactive "DNew directory: ") - (setq dir (file-name-as-directory (expand-file-name dir desktop-dirname))) +(defun desktop-change-dir (dirname) + "Change to desktop saved in DIRNAME. +Kill the desktop as specified by variables `desktop-save-mode' and +`desktop-save', then clear the desktop and load the desktop file in +directory DIRNAME." + (interactive "DChange to directory: ") + (setq dirname (file-name-as-directory (expand-file-name dirname desktop-dirname))) (desktop-kill) (desktop-clear) - (setq desktop-enable t) - (let ((desktop-path (list dir)) - (default-directory dir)) - (desktop-read)) - ;; Set `desktop-dirname' even in no desktop file was found - (setq desktop-dirname dir)) - ;; ---------------------------------------------------------------------------- + (desktop-read dirname)) + +;; ---------------------------------------------------------------------------- ;;;###autoload -(defun desktop-save-in-load-dir () - "Save desktop in directory from which it was loaded." +(defun desktop-save-in-desktop-dir () + "Save the desktop in directory `desktop-dirname'." (interactive) (if desktop-dirname (desktop-save desktop-dirname) @@ -752,9 +764,12 @@ This function always sets `desktop-enable' to t." (defun desktop-revert () "Revert to the last loaded desktop." (interactive) - (unless desktop-dirname (error "No desktop has been loaded")) - (setq desktop-enable nil) - (desktop-change-dir desktop-dirname)) + (unless desktop-dirname + (error "Unknown desktop directory")) + (unless (file-exists-p (expand-file-name desktop-base-file-name desktop-dirname)) + (error "No desktop file found")) + (desktop-clear) + (desktop-read desktop-dirname)) ;; ---------------------------------------------------------------------------- ;; Note: the following functions use the dynamic variable binding in Lisp. @@ -835,11 +850,13 @@ This function always sets `desktop-enable' to t." ;; First element of `desktop-buffer-misc' is the value of `dired-directory'. ;; This value is a directory name, optionally with with shell wildcard or ;; a directory name followed by list of files. - (let* ((dired-directory (car desktop-buffer-misc)) - (dir (if (consp dired-directory) (car dired-directory) dired-directory))) + (let* ((dired-dir (car desktop-buffer-misc)) + (dir (if (consp dired-dir) (car dired-dir) dired-dir))) (if (file-directory-p (file-name-directory dir)) (progn - (dired dired-directory) + (dired dired-dir) + ;; The following elements of `desktop-buffer-misc' are the keys + ;; from `dired-subdir-alist'. (mapcar 'dired-maybe-insert-subdir (cdr desktop-buffer-misc)) (current-buffer)) (message "Directory %s no longer exists." dir) @@ -855,7 +872,12 @@ This function always sets `desktop-enable' to t." (y-or-n-p (format "File \"%s\" no longer exists. Re-create? " desktop-buffer-file-name)))) - (let ((buf (find-file-noselect desktop-buffer-file-name))) + (let* ((auto-insert nil) ; Disable auto insertion + (coding-system-for-read + (or coding-system-for-read + (cdr (assq 'buffer-file-coding-system + desktop-buffer-locals)))) + (buf (find-file-noselect desktop-buffer-file-name))) (condition-case nil (switch-to-buffer buf) (error (pop-to-buffer buf))) @@ -961,7 +983,7 @@ This function always sets `desktop-enable' to t." (cons 'overwrite-mode (car mim))))) ;; ---------------------------------------------------------------------------- -;; When `desktop-enable' is non-nil and "--no-desktop" is not specified on the +;; When `desktop-save-mode' is non-nil and "--no-desktop" is not specified on the ;; command line, we do the rest of what it takes to use desktop, but do it ;; after finishing loading the init file. ;; We cannot use `command-switch-alist' to process "--no-desktop" because these @@ -972,10 +994,9 @@ This function always sets `desktop-enable' to t." (let ((key "--no-desktop")) (if (member key command-line-args) (delete key command-line-args) - (when desktop-enable - (desktop-load-default) - (desktop-read)))))) + (when desktop-save-mode (desktop-read)))))) (provide 'desktop) +;;; arch-tag: 221907c3-1771-4fd3-9c2e-c6f700c6ede9 ;;; desktop.el ends here diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 30b9467c72..f6b2520a11 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -1,6 +1,6 @@ ;;; diff-mode.el --- a mode for viewing/editing context diffs -;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1998,1999,2000,01,02,03,2004 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: convenience patch diff @@ -28,7 +28,7 @@ ;; commands, editing and various conversions as well as jumping ;; to the corresponding source file. -;; Inspired by Pavel Machek's patch-mode.el () +;; Inspired by Pavel Machek's patch-mode.el () ;; Some efforts were spent to have it somewhat compatible with XEmacs' ;; diff-mode as well as with compilation-minor-mode @@ -38,20 +38,19 @@ ;; Todo: -;; - Improve narrowed-view support. -;; - re-enable (conditionally) the `compile' support after improving it to use -;; the same code as diff-goto-source. -;; - Support for # comments in context->unified. -;; - Allow diff.el to use diff-mode. -;; This mostly means ability to jump from half-hunk to half-hunk -;; in context (and normal) diffs and to jump to the corresponding -;; (i.e. new or old) file. +;; - Add a `delete-after-apply' so C-c C-a automatically deletes hunks. +;; Also allow C-c C-a to delete already-applied hunks. +;; +;; - Try `diff ' to try and fuzzily discover the source location +;; of a hunk. Show then the changes between and and make it +;; possible to apply them to , , or . +;; Or maybe just make it into a ".rej to diff3-markers converter". +;; +;; - Refine hunk on a word-by-word basis. +;; +;; - Use the new next-error-function to allow C-x `. ;; - Handle `diff -b' output in context->unified. -;; Low priority: -;; - Spice up the minor-mode with font-lock support. -;; - Recognize pcl-cvs' special string for `cvs-execute-single'. - ;;; Code: (eval-when-compile (require 'cl)) @@ -63,7 +62,7 @@ :group 'tools :group 'diff) -(defcustom diff-default-read-only t +(defcustom diff-default-read-only nil "If non-nil, `diff-mode' buffers default to being read-only." :type 'boolean :group 'diff-mode) @@ -87,8 +86,10 @@ when editing big diffs)." :type 'boolean) -(defvar diff-mode-hook nil - "Run after setting up the `diff-mode' major mode.") +(defcustom diff-mode-hook nil + "Run after setting up the `diff-mode' major mode." + :type 'hook + :options '(diff-delete-empty-files diff-make-unified)) (defvar diff-outline-regexp "\\([*+][*+][*+] [^0-9]\\|@@ ...\\|\\*\\*\\* [0-9].\\|--- [0-9]..\\)") @@ -109,7 +110,7 @@ when editing big diffs)." ("}" . diff-file-next) ("{" . diff-file-prev) ("\C-m" . diff-goto-source) - ([mouse-2] . diff-mouse-goto-source) + ([mouse-2] . diff-goto-source) ;; From XEmacs' diff-mode. ("W" . widen) ;;("." . diff-goto-source) ;display-buffer @@ -127,7 +128,8 @@ when editing big diffs)." ("r" . diff-restrict-view) ("R" . diff-reverse-direction) ("U" . diff-context->unified) - ("C" . diff-unified->context)) + ("C" . diff-unified->context) + ("q" . quit-window)) "Basic keymap for `diff-mode', bound to various prefix keys.") (easy-mmode-defmap diff-mode-map @@ -135,6 +137,7 @@ when editing big diffs)." ;; From compilation-minor-mode. ("\C-c\C-c" . diff-goto-source) ;; Misc operations. + ("\C-c\C-r" . diff-refine-hunk) ("\C-c\C-s" . diff-split-hunk) ("\C-c\C-a" . diff-apply-hunk) ("\C-c\C-t" . diff-test-hunk)) @@ -240,8 +243,31 @@ when editing big diffs)." "`diff-mode' face used to highlight nonexistent files in recursive diffs.") (defvar diff-nonexistent-face 'diff-nonexistent-face) +(defconst diff-yank-handler '(diff-yank-function)) +(defun diff-yank-function (text) + ;; FIXME: the yank-handler is now called separately on each piece of text + ;; with a yank-handler property, so the next-single-property-change call + ;; below will always return nil :-( --stef + (let ((mixed (next-single-property-change 0 'yank-handler text)) + (start (point))) + ;; First insert the text. + (insert text) + ;; If the text does not include any diff markers and if we're not + ;; yanking back into a diff-mode buffer, get rid of the prefixes. + (unless (or mixed (derived-mode-p 'diff-mode)) + (undo-boundary) ; Just in case the user wanted the prefixes. + (let ((re (save-excursion + (if (re-search-backward "^[>][ \t]") + "^[ <>!+-]")))) + (save-excursion + (while (re-search-backward re start t) + (replace-match "" t t))))))) + + (defvar diff-font-lock-keywords - '(("^\\(@@ -[0-9,]+ \\+[0-9,]+ @@\\)\\(.*\\)$" ;unified + `(("^\\(@@ -[0-9,]+ \\+[0-9,]+ @@\\)\\(.*\\)$" ;unified (1 diff-hunk-header-face) (2 diff-function-face)) ("^--- .+ ----$" . diff-hunk-header-face) ;context @@ -252,13 +278,13 @@ when editing big diffs)." ("^\\(---\\|\\+\\+\\+\\|\\*\\*\\*\\) \\(\\S-+\\)\\(.*[^*-]\\)?\n" (0 diff-header-face) (2 diff-file-header-face prepend)) ("^[0-9,]+[acd][0-9,]+$" . diff-hunk-header-face) - ("^!.*\n" . diff-changed-face) ;context - ("^[+>].*\n" . diff-added-face) - ("^[-<].*\n" . diff-removed-face) + ("^!.*\n" (0 diff-changed-face)) + ("^[+>].*\n" (0 diff-added-face)) + ("^[-<].*\n" (0 diff-removed-face)) ("^Index: \\(.+\\).*\n" (0 diff-header-face) (1 diff-index-face prepend)) ("^Only in .*\n" . diff-nonexistent-face) ("^#.*" . font-lock-string-face) - ("^[^-=+*!<>].*\n" . diff-context-face))) + ("^[^-=+*!<>].*\n" (0 diff-context-face)))) (defconst diff-font-lock-defaults '(diff-font-lock-keywords t nil nil nil (font-lock-multiline . nil))) @@ -270,18 +296,6 @@ when editing big diffs)." '((nil "\\+\\+\\+\\ \\([^\t\n]+\\)[\t\n]" 1) ; unidiffs (nil "^--- \\([^\t\n]+\\)\t.*\n\\*" 1))) ; context diffs -;;;; -;;;; Compile support -;;;; - -(defvar diff-file-regexp-alist - '(("Index: \\(.+\\)" 1))) - -(defvar diff-error-regexp-alist - '(("@@ -\\([0-9]+\\),[0-9]+ \\+\\([0-9]+\\),[0-9]+ @@" nil 2) - ("--- \\([0-9]+\\),[0-9]+ ----" nil 1) - ("\\([0-9]+\\)\\(,[0-9]+\\)?[adc]\\([0-9]+\\)" nil 3))) - ;;;; ;;;; Movement ;;;; @@ -322,12 +336,15 @@ when editing big diffs)." (defun diff-end-of-file () (re-search-forward "^[-+#!<>0-9@* \\]" nil t) - (re-search-forward "^[^-+#!<>0-9@* \\]" nil 'move) - (beginning-of-line)) + (re-search-forward (concat "^[^-+#!<>0-9@* \\]\\|" diff-file-header-re) + nil 'move) + (if (match-beginning 1) + (goto-char (match-beginning 1)) + (beginning-of-line))) ;; Define diff-{hunk,file}-{prev,next} (easy-mmode-define-navigation - diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk) + diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view) (easy-mmode-define-navigation diff-file diff-file-header-re "file" diff-end-of-hunk) @@ -348,7 +365,8 @@ If the prefix ARG is given, restrict the view to the current file instead." (interactive) (diff-beginning-of-hunk) (let* ((start (point)) - (nexthunk (ignore-errors (diff-hunk-next) (point))) + (nexthunk (when (re-search-forward diff-hunk-header-re nil t) + (match-beginning 0))) (firsthunk (ignore-errors (goto-char start) (diff-beginning-of-file) (diff-hunk-next) (point))) @@ -374,6 +392,7 @@ If the prefix ARG is given, restrict the view to the current file instead." (re-search-backward "^Index: " prevhunk t)))) (when index (setq start index)) (diff-end-of-file) + (if (looking-at "^\n") (forward-char 1)) ;`tla' generates such diffs. (kill-region start (point)))) (defun diff-kill-junk () @@ -450,31 +469,55 @@ like \(diff-merge-strings \"b/foo\" \"b/bar\" \"/a/c/foo\")." (match-string 4 str) (substring str (match-end 6) (match-end 5)))))) -(defun diff-find-file-name (&optional old) - "Return the file corresponding to the current patch. -Non-nil OLD means that we want the old file." +(defun diff-tell-file-name (old name) + "Tell Emacs where the find the source file of the current hunk. +If the OLD prefix arg is passed, tell the file NAME of the old file." + (interactive + (let* ((old current-prefix-arg) + (fs (diff-hunk-file-names current-prefix-arg))) + (unless fs (error "No file name to look for")) + (list old (read-file-name (format "File for %s: " (car fs)) + nil (diff-find-file-name old) t)))) + (let ((fs (diff-hunk-file-names old))) + (unless fs (error "No file name to look for")) + (push (cons fs name) diff-remembered-files-alist))) + +(defun diff-hunk-file-names (&optional old) + "Give the list of file names textually mentioned for the current hunk." (save-excursion (unless (looking-at diff-file-header-re) (or (ignore-errors (diff-beginning-of-file)) (re-search-forward diff-file-header-re nil t))) - (let* ((limit (save-excursion + (let ((limit (save-excursion (condition-case () (progn (diff-hunk-prev) (point)) (error (point-min))))) - (header-files - (if (looking-at "[-*][-*][-*] \\(\\S-+\\)\\(\\s-.*\\)?\n[-+][-+][-+] \\(\\S-+\\)") - (list (if old (match-string 1) (match-string 3)) - (if old (match-string 3) (match-string 1))) - (forward-line 1) nil)) - (fs (append - (when (save-excursion - (re-search-backward "^Index: \\(.+\\)" limit t)) - (list (match-string 1))) - header-files - (when (re-search-backward "^diff \\(-\\S-+ +\\)*\\(\\S-+\\)\\( +\\(\\S-+\\)\\)?" nil t) - (list (if old (match-string 2) (match-string 4)) - (if old (match-string 4) (match-string 2)))))) - (fs (delq nil fs))) + (header-files + (if (looking-at "[-*][-*][-*] \\(\\S-+\\)\\(\\s-.*\\)?\n[-+][-+][-+] \\(\\S-+\\)") + (list (if old (match-string 1) (match-string 3)) + (if old (match-string 3) (match-string 1))) + (forward-line 1) nil))) + (delq nil + (append + (when (and (not old) + (save-excursion + (re-search-backward "^Index: \\(.+\\)" limit t))) + (list (match-string 1))) + header-files + (when (re-search-backward + "^diff \\(-\\S-+ +\\)*\\(\\S-+\\)\\( +\\(\\S-+\\)\\)?" + nil t) + (list (if old (match-string 2) (match-string 4)) + (if old (match-string 4) (match-string 2))))))))) + +(defun diff-find-file-name (&optional old) + "Return the file corresponding to the current patch. +Non-nil OLD means that we want the old file." + (save-excursion + (unless (looking-at diff-file-header-re) + (or (ignore-errors (diff-beginning-of-file)) + (re-search-forward diff-file-header-re nil t))) + (let ((fs (diff-hunk-file-names old))) (or ;; use any previously used preference (cdr (assoc fs diff-remembered-files-alist)) @@ -504,14 +547,6 @@ Non-nil OLD means that we want the old file." file))))) -(defun diff-mouse-goto-source (event) - "Run `diff-goto-source' for the diff at a mouse click." - (interactive "e") - (save-excursion - (mouse-set-point event) - (diff-goto-source))) - - (defun diff-ediff-patch () "Call `ediff-patch-file' on the current buffer." (interactive) @@ -878,37 +913,23 @@ a diff with \\[diff-reverse-direction]." ;; (set (make-local-variable 'page-delimiter) "--- [^\t]+\t") ;; compile support - ;;;; compile support is not good enough yet. It should be merged - ;;;; with diff.el's support. - (set (make-local-variable 'compilation-file-regexp-alist) - diff-file-regexp-alist) - (set (make-local-variable 'compilation-error-regexp-alist) - diff-error-regexp-alist) - (when (string-match "\\.rej\\'" (or buffer-file-name "")) - (set (make-local-variable 'compilation-current-file) - (substring buffer-file-name 0 (match-beginning 0)))) - ;; Be careful not to change compilation-last-buffer when we're just - ;; doing a C-x v = (for example). - (if (boundp 'compilation-last-buffer) - (let ((compilation-last-buffer compilation-last-buffer)) - (compilation-minor-mode 1)) - (compilation-minor-mode 1)) - ;; M-RET and RET should be done by diff-mode because the `compile' - ;; support is significantly less good. - (add-to-list 'minor-mode-overriding-map-alist - (cons 'compilation-minor-mode (make-sparse-keymap))) - (when (and (> (point-max) (point-min)) diff-default-read-only) (toggle-read-only t)) ;; setup change hooks (if (not diff-update-on-the-fly) - (add-hook 'write-contents-hooks 'diff-write-contents-hooks) + (add-hook 'write-contents-functions 'diff-write-contents-hooks nil t) (make-local-variable 'diff-unhandled-changes) (add-hook 'after-change-functions 'diff-after-change-function nil t) (add-hook 'post-command-hook 'diff-post-command-hook nil t)) ;; Neat trick from Dave Love to add more bindings in read-only mode: - (add-to-list 'minor-mode-overriding-map-alist - (cons 'buffer-read-only diff-mode-shared-map)) + (let ((ro-bind (cons 'buffer-read-only diff-mode-shared-map))) + (add-to-list 'minor-mode-overriding-map-alist ro-bind) + ;; Turn off this little trick in case the buffer is put in view-mode. + (add-hook 'view-mode-hook + `(lambda () + (setq minor-mode-overriding-map-alist + (delq ',ro-bind minor-mode-overriding-map-alist))) + nil t)) ;; add-log support (set (make-local-variable 'add-log-current-defun-function) 'diff-current-defun) @@ -923,11 +944,34 @@ a diff with \\[diff-reverse-direction]." ;; FIXME: setup font-lock ;; setup change hooks (if (not diff-update-on-the-fly) - (add-hook 'write-contents-hooks 'diff-write-contents-hooks) + (add-hook 'write-contents-functions 'diff-write-contents-hooks nil t) (make-local-variable 'diff-unhandled-changes) (add-hook 'after-change-functions 'diff-after-change-function nil t) (add-hook 'post-command-hook 'diff-post-command-hook nil t))) +;;; Handy hook functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defun diff-delete-if-empty () + ;; An empty diff file means there's no more diffs to integrate, so we + ;; can just remove the file altogether. Very handy for .rej files if we + ;; remove hunks as we apply them. + (when (and buffer-file-name + (eq 0 (nth 7 (file-attributes buffer-file-name)))) + (delete-file buffer-file-name))) + +(defun diff-delete-empty-files () + "Arrange for empty diff files to be removed." + (add-hook 'after-save-hook 'diff-delete-if-empty nil t)) + +(defun diff-make-unified () + "Turn context diffs into unified diffs if applicable." + (if (save-excursion + (goto-char (point-min)) + (looking-at "\\*\\*\\* ")) + (let ((mod (buffer-modified-p))) + (unwind-protect + (diff-context->unified (point-min) (point-max)) + (restore-buffer-modified-p mod))))) ;;; ;;; Misc operations that have proved useful at some point. @@ -1091,12 +1135,17 @@ SWITCHED is non-nil if the patch is already applied." (goto-line (string-to-number line)) (let* ((orig-pos (point)) (switched nil) + ;; FIXME: Check for case where both OLD and NEW are found. (pos (or (diff-find-text (car old)) (progn (setq switched t) (diff-find-text (car new))) (progn (setq switched nil) - (diff-find-approx-text (car old))) + (condition-case nil + (diff-find-approx-text (car old)) + (invalid-regexp nil))) ;Regex too big. (progn (setq switched t) - (diff-find-approx-text (car new))) + (condition-case nil + (diff-find-approx-text (car new)) + (invalid-regexp nil))) ;Regex too big. (progn (setq switched nil) nil)))) (nconc (list buf) @@ -1127,7 +1176,8 @@ the value of this variable when given an appropriate prefix argument). With a prefix argument, REVERSE the hunk." (interactive "P") (destructuring-bind (buf line-offset pos old new &optional switched) - (diff-find-source-location nil reverse) + ;; If REVERSE go to the new file, otherwise go to the old. + (diff-find-source-location (not reverse) reverse) (cond ((null line-offset) (error "Can't find the text to patch")) @@ -1159,21 +1209,25 @@ With a prefix argument, REVERSE the hunk." With a prefix argument, try to REVERSE the hunk." (interactive "P") (destructuring-bind (buf line-offset pos src dst &optional switched) - (diff-find-source-location nil reverse) + ;; If REVERSE go to the new file, otherwise go to the old. + (diff-find-source-location (not reverse) reverse) (set-window-point (display-buffer buf) (+ (car pos) (cdr src))) (diff-hunk-status-msg line-offset (diff-xor reverse switched) t))) -(defun diff-goto-source (&optional other-file) +(defalias 'diff-mouse-goto-source 'diff-goto-source) + +(defun diff-goto-source (&optional other-file event) "Jump to the corresponding source line. `diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg is given) determines whether to jump to the old or the new file. If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[universal-argument]) then `diff-jump-to-old-file' is also set, for the next invocations." - (interactive "P") + (interactive (list current-prefix-arg last-input-event)) ;; When pointing at a removal line, we probably want to jump to ;; the old location, and else to the new (i.e. as if reverting). ;; This is a convenient detail when using smerge-diff. + (if event (posn-set-point (event-end event))) (let ((rev (not (save-excursion (beginning-of-line) (looking-at "[-<]"))))) (destructuring-bind (buf line-offset pos src dst &optional switched) (diff-find-source-location other-file rev) @@ -1204,6 +1258,49 @@ For use in `add-log-current-defun-function'." (goto-char (+ (car pos) (cdr src))) (add-log-current-defun)))))) +(defun diff-refine-hunk () + "Refine the current hunk by ignoring space differences." + (interactive) + (let* ((char-offset (- (point) (progn (diff-beginning-of-hunk) (point)))) + (opts (case (char-after) (?@ "-bu") (?* "-bc") (t "-b"))) + (line-nb (and (or (looking-at "[^0-9]+\\([0-9]+\\)") + (error "Can't find line number")) + (string-to-number (match-string 1)))) + (hunk (delete-and-extract-region + (point) (save-excursion (diff-end-of-hunk) (point)))) + (lead (make-string (1- line-nb) ?\n)) ;Line nums start at 1. + (file1 (make-temp-file "diff1")) + (file2 (make-temp-file "diff2")) + (coding-system-for-read buffer-file-coding-system) + old new) + (unwind-protect + (save-excursion + (setq old (diff-hunk-text hunk nil char-offset)) + (setq new (diff-hunk-text hunk t char-offset)) + (write-region (concat lead (car old)) nil file1 nil 'nomessage) + (write-region (concat lead (car new)) nil file2 nil 'nomessage) + (with-temp-buffer + (let ((status + (call-process diff-command nil t nil + opts file1 file2))) + (case status + (0 nil) ;Nothing to reformat. + (1 (goto-char (point-min)) + ;; Remove the file-header. + (when (re-search-forward diff-hunk-header-re nil t) + (delete-region (point-min) (match-beginning 0)))) + (t (goto-char (point-max)) + (unless (bolp) (insert "\n")) + (insert hunk))) + (setq hunk (buffer-string)) + (unless (memq status '(0 1)) + (error "Diff returned: %s" status))))) + ;; Whatever happens, put back some equivalent text: either the new + ;; one or the original one in case some error happened. + (insert hunk) + (delete-file file1) + (delete-file file2)))) + ;; provide the package (provide 'diff-mode) @@ -1242,4 +1339,5 @@ For use in `add-log-current-defun-function'." ;; use `combine-after-change-calls' to minimize the slowdown of font-lock. ;; +;;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66 ;;; diff-mode.el ends here diff --git a/lisp/diff.el b/lisp/diff.el dissimilarity index 71% index a5fa702650..231130db21 100644 --- a/lisp/diff.el +++ b/lisp/diff.el @@ -1,304 +1,171 @@ -;;; diff.el --- run `diff' in compilation-mode - -;; Copyright (C) 1992, 1994, 1996, 2001 Free Software Foundation, Inc. - -;; Maintainer: FSF -;; Keywords: unix, tools - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Commentary: - -;; This package helps you explore differences between files, using the -;; UNIX command diff(1). The commands are `diff' and `diff-backup'. -;; You can specify options with `diff-switches'. - -;;; Code: - -(require 'compile) - -(defgroup diff nil - "Comparing files with `diff'." - :group 'tools) - -;;;###autoload -(defcustom diff-switches "-c" - "*A string or list of strings specifying switches to be be passed to diff." - :type '(choice string (repeat string)) - :group 'diff) - -;;;###autoload -(defcustom diff-command "diff" - "*The command to use to run diff." - :type 'string - :group 'diff) - -(defvar diff-regexp-alist - '( - ;; -u format: @@ -OLDSTART,OLDEND +NEWSTART,NEWEND @@ - ("^@@ -\\([0-9]+\\),[0-9]+ \\+\\([0-9]+\\),[0-9]+ @@$" 1 2) - - ;; -c format: *** OLDSTART,OLDEND **** - ("^\\*\\*\\* \\([0-9]+\\),[0-9]+ \\*\\*\\*\\*$" 1 nil) - ;; --- NEWSTART,NEWEND ---- - ("^--- \\([0-9]+\\),[0-9]+ ----$" nil 1) - - ;; plain diff format: OLDSTART[,OLDEND]{a,d,c}NEWSTART[,NEWEND] - ("^\\([0-9]+\\)\\(,[0-9]+\\)?[adc]\\([0-9]+\\)\\(,[0-9]+\\)?$" 1 3) - - ;; -e (ed) format: OLDSTART[,OLDEND]{a,d,c} - ("^\\([0-9]+\\)\\(,[0-9]+\\)?[adc]$" 1) - - ;; -f format: {a,d,c}OLDSTART[ OLDEND] - ;; -n format: {a,d,c}OLDSTART LINES-CHANGED - ("^[adc]\\([0-9]+\\)\\( [0-9]+\\)?$" 1) - ) - "Alist of regular expressions to match difference sections in \\[diff] output. -Each element has the form (REGEXP OLD-IDX NEW-IDX). -Any text that REGEXP matches identifies one difference hunk -or the header of a hunk. - -The OLD-IDX'th subexpression of REGEXP gives the line number -in the old file, and NEW-IDX'th subexpression gives the line number -in the new file. If OLD-IDX or NEW-IDX -is nil, REGEXP matches only half a hunk.") - -(defvar diff-old-file nil - "This is the old file name in the comparison in this buffer.") -(defvar diff-new-file nil - "This is the new file name in the comparison in this buffer.") -(defvar diff-old-temp-file nil - "This is the name of a temp file to be deleted after diff finishes.") -(defvar diff-new-temp-file nil - "This is the name of a temp file to be deleted after diff finishes.") - -;; See compilation-parse-errors-function (compile.el). -(defun diff-parse-differences (limit-search find-at-least) - (setq compilation-error-list nil) - (message "Parsing differences...") - - ;; Don't reparse diffs already seen at last parse. - (if compilation-parsing-end (goto-char compilation-parsing-end)) - - ;; Construct in REGEXP a regexp composed of all those in dired-regexp-alist. - (let ((regexp (mapconcat (lambda (elt) - (concat "\\(" (car elt) "\\)")) - diff-regexp-alist - "\\|")) - ;; (GROUP-IDX OLD-IDX NEW-IDX) - (groups (let ((subexpr 1)) - (mapcar (lambda (elt) - (prog1 - (cons subexpr - (mapcar (lambda (n) - (and n - (+ subexpr n))) - (cdr elt))) - (setq subexpr (+ subexpr 1 - (count-regexp-groupings - (car elt)))))) - diff-regexp-alist))) - - (new-error - (function (lambda (file subexpr) - (setq compilation-error-list - (cons - (cons (save-excursion - ;; Report location of message - ;; at beginning of line. - (goto-char - (match-beginning subexpr)) - (beginning-of-line) - (point-marker)) - ;; Report location of corresponding text. - (let ((line (string-to-int - (buffer-substring - (match-beginning subexpr) - (match-end subexpr))))) - (save-excursion - (save-match-data - (set-buffer (find-file-noselect file))) - (save-excursion - (goto-line line) - (point-marker))))) - compilation-error-list))))) - - (found-desired nil) - (num-loci-found 0) - g) - - (while (and (not found-desired) - ;; We don't just pass LIMIT-SEARCH to re-search-forward - ;; because we want to find matches containing LIMIT-SEARCH - ;; but which extend past it. - (re-search-forward regexp nil t)) - - ;; Find which individual regexp matched. - (setq g groups) - (while (and g (null (match-beginning (car (car g))))) - (setq g (cdr g))) - (setq g (car g)) - - (if (nth 1 g) ;OLD-IDX - (funcall new-error diff-old-file (nth 1 g))) - (if (nth 2 g) ;NEW-IDX - (funcall new-error diff-new-file (nth 2 g))) - - (setq num-loci-found (1+ num-loci-found)) - (if (or (and find-at-least - (>= num-loci-found find-at-least)) - (and limit-search (>= (point) limit-search))) - ;; We have found as many new loci as the user wants, - ;; or the user wanted a specific diff, and we're past it. - (setq found-desired t))) - (set-marker compilation-parsing-end - (if found-desired (point) - ;; Set to point-max, not point, so we don't perpetually - ;; parse the last bit of text when it isn't a diff header. - (point-max))) - (message "Parsing differences...done")) - (setq compilation-error-list (nreverse compilation-error-list))) - -(defun diff-process-setup () - "Set up \`compilation-exit-message-function' for \`diff'." - ;; Avoid frightening people with "abnormally terminated" - ;; if diff finds differences. - (set (make-local-variable 'compilation-exit-message-function) - (lambda (status code msg) - (cond ((not (eq status 'exit)) - (cons msg code)) - ((zerop code) - '("finished (no differences)\n" . "no differences")) - ((= code 1) - '("finished\n" . "differences found")) - (t - (cons msg code)))))) - -;;;###autoload -(defun diff (old new &optional switches no-async) - "Find and display the differences between OLD and NEW files. -Interactively the current buffer's file name is the default for NEW -and a backup file for NEW is the default for OLD. -With prefix arg, prompt for diff switches. -If NO-ASYNC is non-nil, call diff synchronously." - (interactive - (nconc - (let (oldf newf) - (nreverse - (list - (setq newf (buffer-file-name) - newf (if (and newf (file-exists-p newf)) - (read-file-name - (concat "Diff new file: (default " - (file-name-nondirectory newf) ") ") - nil newf t) - (read-file-name "Diff new file: " nil nil t))) - (setq oldf (file-newest-backup newf) - oldf (if (and oldf (file-exists-p oldf)) - (read-file-name - (concat "Diff original file: (default " - (file-name-nondirectory oldf) ") ") - (file-name-directory oldf) oldf t) - (read-file-name "Diff original file: " - (file-name-directory newf) nil t)))))) - (if current-prefix-arg - (list (read-string "Diff switches: " - (if (stringp diff-switches) - diff-switches - (mapconcat 'identity diff-switches " ")))) - nil))) - (setq new (expand-file-name new) - old (expand-file-name old)) - (let ((old-alt (file-local-copy old)) - (new-alt (file-local-copy new)) - buf) - (save-excursion - (let ((compilation-process-setup-function 'diff-process-setup) - (command - (mapconcat 'identity - (append (list diff-command) - ;; Use explicitly specified switches - (if switches - (if (consp switches) - switches (list switches)) - ;; If not specified, use default. - (if (consp diff-switches) - diff-switches - (list diff-switches))) - (if (or old-alt new-alt) - (list "-L" old "-L" new)) - (list - (shell-quote-argument (or old-alt old))) - (list - (shell-quote-argument (or new-alt new)))) - " "))) - (setq buf - (compile-internal command - "No more differences" "Diff" - 'diff-parse-differences - nil nil nil nil nil nil no-async)) - (set-buffer buf) - (set (make-local-variable 'diff-old-file) old) - (set (make-local-variable 'diff-new-file) new) - (set (make-local-variable 'diff-old-temp-file) old-alt) - (set (make-local-variable 'diff-new-temp-file) new-alt) - (set (make-local-variable 'compilation-finish-function) - (function (lambda (buff msg) - (if diff-old-temp-file - (delete-file diff-old-temp-file)) - (if diff-new-temp-file - (delete-file diff-new-temp-file))))) - ;; When async processes aren't available, the compilation finish - ;; function doesn't get chance to run. Invoke it by hand. - (or (fboundp 'start-process) - (funcall compilation-finish-function nil nil)) - buf)))) - -;;;###autoload -(defun diff-backup (file &optional switches) - "Diff this file with its backup file or vice versa. -Uses the latest backup, if there are several numerical backups. -If this file is a backup, diff it with its original. -The backup file is the first file given to `diff'." - (interactive (list (read-file-name "Diff (file with backup): ") - (if current-prefix-arg - (read-string "Diff switches: " - (if (stringp diff-switches) - diff-switches - (mapconcat 'identity - diff-switches " "))) - nil))) - (let (bak ori) - (if (backup-file-name-p file) - (setq bak file - ori (file-name-sans-versions file)) - (setq bak (or (diff-latest-backup-file file) - (error "No backup found for %s" file)) - ori file)) - (diff bak ori switches))) - -(defun diff-latest-backup-file (fn) ; actually belongs into files.el - "Return the latest existing backup of FILE, or nil." - (let ((handler (find-file-name-handler fn 'diff-latest-backup-file))) - (if handler - (funcall handler 'diff-latest-backup-file fn) - (file-newest-backup fn)))) - -(provide 'diff) - -;;; diff.el ends here +;;; diff.el --- run `diff' in compilation-mode + +;; Copyright (C) 1992, 1994, 1996, 2001, 2004 Free Software Foundation, Inc. + +;; Maintainer: FSF +;; Keywords: unix, tools + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This package helps you explore differences between files, using the +;; UNIX command diff(1). The commands are `diff' and `diff-backup'. +;; You can specify options with `diff-switches'. + +;;; Code: + +(defgroup diff nil + "Comparing files with `diff'." + :group 'tools) + +;;;###autoload +(defcustom diff-switches "-c" + "*A string or list of strings specifying switches to be be passed to diff." + :type '(choice string (repeat string)) + :group 'diff) + +;;;###autoload +(defcustom diff-command "diff" + "*The command to use to run diff." + :type 'string + :group 'diff) + +(defvar diff-old-temp-file nil + "This is the name of a temp file to be deleted after diff finishes.") +(defvar diff-new-temp-file nil + "This is the name of a temp file to be deleted after diff finishes.") + +;; prompt if prefix arg present +(defun diff-switches () + (if current-prefix-arg + (read-string "Diff switches: " + (if (stringp diff-switches) + diff-switches + (mapconcat 'identity diff-switches " "))))) + +(defun diff-sentinel (code) + "Code run when the diff process exits. +CODE is the exit code of the process. It should be 0 iff no diffs were found." + (if diff-old-temp-file (delete-file diff-old-temp-file)) + (if diff-new-temp-file (delete-file diff-new-temp-file)) + (save-excursion + (goto-char (point-max)) + (insert (format "\nDiff finished%s. %s\n" + (if (equal 0 code) " (no differences)" "") + (current-time-string))))) + +;;;###autoload +(defun diff (old new &optional switches no-async) + "Find and display the differences between OLD and NEW files. +Interactively the current buffer's file name is the default for NEW +and a backup file for NEW is the default for OLD. +If NO-ASYNC is non-nil, call diff synchronously. +With prefix arg, prompt for diff switches." + (interactive + (let (oldf newf) + (setq newf (buffer-file-name) + newf (if (and newf (file-exists-p newf)) + (read-file-name + (concat "Diff new file: (default " + (file-name-nondirectory newf) ") ") + nil newf t) + (read-file-name "Diff new file: " nil nil t))) + (setq oldf (file-newest-backup newf) + oldf (if (and oldf (file-exists-p oldf)) + (read-file-name + (concat "Diff original file: (default " + (file-name-nondirectory oldf) ") ") + (file-name-directory oldf) oldf t) + (read-file-name "Diff original file: " + (file-name-directory newf) nil t))) + (list oldf newf (diff-switches)))) + (setq new (expand-file-name new) + old (expand-file-name old)) + (or switches (setq switches diff-switches)) ; If not specified, use default. + (let* ((old-alt (file-local-copy old)) + (new-alt (file-local-copy new)) + (command + (mapconcat 'identity + `(,diff-command + ;; Use explicitly specified switches + ,@(if (listp switches) switches (list switches)) + ,@(if (or old-alt new-alt) + (list "-L" old "-L" new)) + ,(shell-quote-argument (or old-alt old)) + ,(shell-quote-argument (or new-alt new))) + " ")) + (buf (get-buffer-create "*Diff*")) + proc) + (save-excursion + (display-buffer buf) + (set-buffer buf) + (setq buffer-read-only nil) + (buffer-disable-undo (current-buffer)) + (erase-buffer) + (buffer-enable-undo (current-buffer)) + (diff-mode) + (set (make-local-variable 'revert-buffer-function) + `(lambda (ignore-auto noconfirm) + (diff ',old ',new ',switches ',no-async))) + (set (make-local-variable 'diff-old-temp-file) old-alt) + (set (make-local-variable 'diff-new-temp-file) new-alt) + (insert command "\n") + (if (and (not no-async) (fboundp 'start-process)) + (progn + (setq proc (start-process "Diff" buf shell-file-name + shell-command-switch command)) + (set-process-sentinel + proc (lambda (proc msg) + (with-current-buffer (process-buffer proc) + (diff-sentinel (process-exit-status proc)))))) + ;; Async processes aren't available. + (diff-sentinel + (call-process shell-file-name nil buf nil + shell-command-switch command)))) + buf)) + +;;;###autoload +(defun diff-backup (file &optional switches) + "Diff this file with its backup file or vice versa. +Uses the latest backup, if there are several numerical backups. +If this file is a backup, diff it with its original. +The backup file is the first file given to `diff'. +With prefix arg, prompt for diff switches." + (interactive (list (read-file-name "Diff (file with backup): ") + (diff-switches))) + (let (bak ori) + (if (backup-file-name-p file) + (setq bak file + ori (file-name-sans-versions file)) + (setq bak (or (diff-latest-backup-file file) + (error "No backup found for %s" file)) + ori file)) + (diff bak ori switches))) + +(defun diff-latest-backup-file (fn) ; actually belongs into files.el + "Return the latest existing backup of FILE, or nil." + (let ((handler (find-file-name-handler fn 'diff-latest-backup-file))) + (if handler + (funcall handler 'diff-latest-backup-file fn) + (file-newest-backup fn)))) + +(provide 'diff) + +;;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd +;;; diff.el ends here diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 5bba250b67..0709e0cfe1 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1,6 +1,6 @@ ;;; dired-aux.el --- less commonly used parts of dired -*-byte-compile-dynamic: t;-*- -;; Copyright (C) 1985, 1986, 1992, 1994, 1998, 2000, 2001 +;; Copyright (C) 1985, 1986, 1992, 1994, 1998, 2000, 2001, 2004 ;; Free Software Foundation, Inc. ;; Author: Sebastian Kremer . @@ -88,8 +88,105 @@ With prefix arg, prompt for argument SWITCHES which is options for `diff'." nil)) (diff-backup (dired-get-filename) switches)) +(defun dired-compare-directories (dir2 predicate) + "Mark files with different file attributes in two dired buffers. +Compare file attributes of files in the current directory +with file attributes in directory DIR2 using PREDICATE on pairs of files +with the same name. Mark files for which PREDICATE returns non-nil. +Mark files with different names if PREDICATE is nil (or interactively +when the user enters empty input at the predicate prompt). + +PREDICATE is a Lisp expression that can refer to the following variables: + + size1, size2 - file size in bytes + mtime1, mtime2 - last modification time in seconds, as a float + fa1, fa2 - list of file attributes + returned by function `file-attributes' + + where 1 refers to attribute of file in the current dired buffer + and 2 to attribute of file in second dired buffer. + +Examples of PREDICATE: + + (> mtime1 mtime2) - mark newer files + (not (= size1 size2)) - mark files with different sizes + (not (string= (nth 8 fa1) (nth 8 fa2))) - mark files with different modes + (not (and (= (nth 2 fa1) (nth 2 fa2)) - mark files with different UID + (= (nth 3 fa1) (nth 3 fa2)))) and GID." + (interactive + (list (read-file-name (format "Compare %s with: " + (dired-current-directory)) + (dired-dwim-target-directory)) + (read-from-minibuffer "Mark if (lisp expr or RET): " nil nil t nil "nil"))) + (let* ((dir1 (dired-current-directory)) + (file-alist1 (dired-files-attributes dir1)) + (file-alist2 (dired-files-attributes dir2)) + (file-list1 (mapcar + 'cadr + (dired-file-set-difference + file-alist1 file-alist2 + predicate))) + (file-list2 (mapcar + 'cadr + (dired-file-set-difference + file-alist2 file-alist1 + predicate)))) + (dired-fun-in-all-buffers + dir1 nil + (lambda () + (dired-mark-if + (member (dired-get-filename nil t) file-list1) nil))) + (dired-fun-in-all-buffers + dir2 nil + (lambda () + (dired-mark-if + (member (dired-get-filename nil t) file-list2) nil))) + (message "Marked in dir1: %s files, in dir2: %s files" + (length file-list1) + (length file-list2)))) + +(defun dired-file-set-difference (list1 list2 predicate) + "Combine LIST1 and LIST2 using a set-difference operation. +The result list contains all file items that appear in LIST1 but not LIST2. +This is a non-destructive function; it makes a copy of the data if necessary +to avoid corrupting the original LIST1 and LIST2. +PREDICATE (see `dired-compare-directories') is an additional match +condition. Two file items are considered to match if they are equal +*and* PREDICATE evaluates to t." + (if (or (null list1) (null list2)) + list1 + (let (res) + (dolist (file1 list1) + (unless (let ((list list2)) + (while (and list + (not (let* ((file2 (car list)) + (fa1 (caddr file1)) + (fa2 (caddr file2)) + (size1 (nth 7 fa1)) + (size2 (nth 7 fa2)) + (mtime1 (float-time (nth 5 fa1))) + (mtime2 (float-time (nth 5 fa2)))) + (and + (equal (car file1) (car file2)) + (not (eval predicate)))))) + (setq list (cdr list))) + list) + (setq res (cons file1 res)))) + (nreverse res)))) + +(defun dired-files-attributes (dir) + "Return a list of all file names and attributes from DIR. +List has a form of (file-name full-file-name (attribute-list))" + (mapcar + (lambda (file-name) + (let ((full-file-name (expand-file-name file-name dir))) + (list file-name + full-file-name + (file-attributes full-file-name)))) + (directory-files dir))) + (defun dired-do-chxxx (attribute-name program op-symbol arg) - ;; Change file attributes (mode, group, owner) of marked files and + ;; Change file attributes (mode, group, owner, timestamp) of marked files and ;; refresh their file lines. ;; ATTRIBUTE-NAME is a string describing the attribute to the user. ;; PROGRAM is the program used to change the attribute. @@ -106,7 +203,10 @@ With prefix arg, prompt for argument SWITCHES which is options for `diff'." (dired-bunch-files 10000 (function dired-check-process) (append - (list operation program new-attribute) + (list operation program) + (if (eq op-symbol 'touch) + '("-t") nil) + (list new-attribute) (if (string-match "gnu" system-configuration) '("--") nil)) files)) @@ -139,6 +239,12 @@ This calls chmod, thus symbolic modes like `g+w' are allowed." (error "chown not supported on this system")) (dired-do-chxxx "Owner" dired-chown-program 'chown arg)) +(defun dired-do-touch (&optional arg) + "Change the timestamp of the marked (or next ARG) files. +This calls touch." + (interactive "P") + (dired-do-chxxx "Timestamp" dired-touch-program 'touch arg)) + ;; Process all the files in FILES in batches of a convenient size, ;; by means of (FUNCALL FUNCTION ARGS... SOME-FILES...). ;; Batches are chosen to need less than MAX chars for the file names, @@ -466,8 +572,8 @@ the list of file names explicitly with the FILE-LIST argument." (set-buffer err-buffer) (erase-buffer) (setq default-directory dir ; caller's default-directory - err (/= 0 - (apply (function dired-call-process) program nil arguments))) + err (not (eq 0 + (apply (function dired-call-process) program nil arguments)))) (if err (progn (dired-log (concat program " " (prin1-to-string arguments) "\n")) @@ -564,6 +670,8 @@ and use this command with a prefix argument (the value does not matter)." ;; For .z, try gunzip. It might be an old gzip file, ;; or it might be from compact? pack? (which?) but gunzip handles both. ("\\.z\\'" "" "gunzip") + ("\\.dz\\'" "" "dictunzip") + ("\\.tbz\\'" ".tar" "bunzip2") ("\\.bz2\\'" "" "bunzip2") ;; This item controls naming for compression. ("\\.tar\\'" ".tgz" nil)) @@ -2015,6 +2123,11 @@ If you exit (\\[keyboard-quit], RET or q), you can resume the query replace with the command \\[tags-loop-continue]." (interactive "sQuery replace in marked files (regexp): \nsQuery replace %s by: \nP") + (dolist (file (dired-get-marked-files nil nil 'dired-nondirectory-p)) + (let ((buffer (get-file-buffer file))) + (if (and buffer (with-current-buffer buffer + buffer-read-only)) + (error "File `%s' is visited read-only" file)))) (tags-query-replace from to delimited '(dired-get-marked-files nil nil 'dired-nondirectory-p))) @@ -2037,4 +2150,5 @@ true then the type of the file linked to by FILE is printed instead." (provide 'dired-aux) +;;; arch-tag: 4b508de9-a153-423d-8d3f-a1bbd86f4f60 ;;; dired-aux.el ends here diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 5c6df8f87e..21fe4902e5 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -2,12 +2,12 @@ ;; Author: Sebastian Kremer ;; Lawrence R. Dodd -;; Maintainer: FSF (unless Dodd can be found) +;; Maintainer: nobody (want to volunteer?) ;; Version: 2.37+ ;; Date: 1994/08/18 19:27:42 ;; Keywords: dired extensions files -;; Copyright (C) 1993, 1994, 1997, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1994, 1997, 2001, 2003, 2004 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -398,7 +398,7 @@ See variable `dired-patch-unclean-extensions'." (defun dired-clean-tex () "Flag dispensable files created by [La]TeX etc. for deletion. -See variables `dired-texinfo-unclean-extensions', +See variables `dired-tex-unclean-extensions', `dired-latex-unclean-extensions', `dired-bibtex-unclean-extensions' and `dired-texinfo-unclean-extensions'." (interactive) @@ -887,9 +887,17 @@ dired." (defvar dired-guess-shell-alist-default (list - (list "\\.tar$" '(if dired-guess-shell-gnutar - (concat dired-guess-shell-gnutar " xvf") - "tar xvf")) + (list "\\.tar$" + '(if dired-guess-shell-gnutar + (concat dired-guess-shell-gnutar " xvf") + "tar xvf") + ;; Extract files into a separate subdirectory + '(if dired-guess-shell-gnutar + (concat "mkdir " (file-name-sans-extension file) + "; " dired-guess-shell-gnutar " -C " + (file-name-sans-extension file) " -xvf") + (concat "mkdir " (file-name-sans-extension file) + "; tar -C " (file-name-sans-extension file) " -xvf"))) ;; REGEXPS for compressed archives must come before the .Z rule to ;; be recognized: @@ -907,32 +915,68 @@ dired." '(if dired-guess-shell-gnutar (concat dired-guess-shell-gnutar " zxvf") (concat "gunzip -qc * | tar xvf -")) + ;; Extract files into a separate subdirectory + '(if dired-guess-shell-gnutar + (concat "mkdir " (file-name-sans-extension file) + "; " dired-guess-shell-gnutar " -C " + (file-name-sans-extension file) " -zxvf") + (concat "mkdir " (file-name-sans-extension file) + "; gunzip -qc * | tar -C " + (file-name-sans-extension file) " -xvf -")) ;; Optional decompression. '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q" ""))) + ;; bzip2'ed archives - (list "\\.tar\\.bz2$" + (list "\\.t\\(ar\\.bz2\\|bz\\)$" "bunzip2 -c * | tar xvf -" + ;; Extract files into a separate subdirectory + '(concat "mkdir " (file-name-sans-extension file) + "; bunzip2 -c * | tar -C " + (file-name-sans-extension file) " -xvf -") ;; Optional decompression. "bunzip2") - '("\\.shar.Z$" "zcat * | unshar") - '("\\.shar.g?z$" "gunzip -qc * | unshar") + '("\\.shar\\.Z$" "zcat * | unshar") + '("\\.shar\\.g?z$" "gunzip -qc * | unshar") '("\\.e?ps$" "ghostview" "xloadimage" "lpr") - (list "\\.e?ps.g?z$" "gunzip -qc * | ghostview -" + (list "\\.e?ps\\.g?z$" "gunzip -qc * | ghostview -" ;; Optional decompression. '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) - (list "\\.e?ps.Z$" "zcat * | ghostview -" + (list "\\.e?ps\\.Z$" "zcat * | ghostview -" ;; Optional conversion to gzip format. '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") " " dired-guess-shell-znew-switches)) + '("\\.patch$" "cat * | patch") - '("\\.patch.g?z$" "gunzip -qc * | patch") - (list "\\.patch.Z$" "zcat * | patch" + (list "\\.patch\\.g?z$" "gunzip -qc * | patch" + ;; Optional decompression. + '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) + (list "\\.patch\\.Z$" "zcat * | patch" ;; Optional conversion to gzip format. '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") " " dired-guess-shell-znew-switches)) + ;; The following four extensions are useful with dired-man ("N" key) + (list "\\.[0-9]$" '(progn (require 'man) + (if (Man-support-local-filenames) + "man -l" + "cat * | tbl | nroff -man -h"))) + (list "\\.[0-9]\\.g?z$" '(progn (require 'man) + (if (Man-support-local-filenames) + "man -l" + "gunzip -qc * | tbl | nroff -man -h")) + ;; Optional decompression. + '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) + (list "\\.[0-9]\\.Z$" '(progn (require 'man) + (if (Man-support-local-filenames) + "man -l" + "zcat * | tbl | nroff -man -h")) + ;; Optional conversion to gzip format. + '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") + " " dired-guess-shell-znew-switches)) + '("\\.pod$" "perldoc" "pod2man * | nroff -man") + '("\\.dvi$" "xdvi" "dvips") ; preview and printing '("\\.au$" "play") ; play Sun audiofiles '("\\.mpg$" "mpeg_play") @@ -945,7 +989,7 @@ dired." '("\\.gif$" "xloadimage") ; view gif pictures '("\\.tif$" "xloadimage") '("\\.png$" "display") ; xloadimage 4.1 doesn't grok PNG - '("\\.jpg$" "xloadimage") + '("\\.jpe?g$" "xloadimage") '("\\.fig$" "xfig") ; edit fig pictures '("\\.out$" "xgraph") ; for plotting purposes. '("\\.tex$" "latex" "tex") @@ -953,14 +997,18 @@ dired." '("\\.pdf$" "xpdf") ; edit PDF files ;; Some other popular archivers. + (list "\\.zip$" "unzip" + ;; Extract files into a separate subdirectory + '(concat "unzip" (if dired-guess-shell-gzip-quiet " -q") + " -d " (file-name-sans-extension file))) '("\\.zoo$" "zoo x//") - '("\\.zip$" "unzip") '("\\.lzh$" "lharc x") '("\\.arc$" "arc x") '("\\.shar$" "unshar") ;; Compression. (list "\\.g?z$" '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) + (list "\\.dz$" "dictunzip") (list "\\.bz2$" "bunzip2") (list "\\.Z$" "uncompress" ;; Optional conversion to gzip format. @@ -998,9 +1046,11 @@ You can set this variable in your ~/.emacs. For example, to add rules for :group 'dired-x :type '(alist :key-type regexp :value-type (repeat sexp))) -(defvar dired-guess-shell-case-fold-search nil - "*If non-nil, `dired-guess-shell-alist-default' and -`dired-guess-shell-alist-user' are matched case-insensitively.") +(defcustom dired-guess-shell-case-fold-search t + "If non-nil, `dired-guess-shell-alist-default' and +`dired-guess-shell-alist-user' are matched case-insensitively." + :group 'dired-x + :type 'boolean) (defun dired-guess-default (files) "Guess a shell commands for FILES. Return command or list of commands. @@ -1278,8 +1328,10 @@ NOSELECT the files are merely found but not selected." Uses ../lisp/man.el of \\[manual-entry] fame." (interactive) (require 'man) - (let ((file (dired-get-filename)) - (manual-program "nroff -man -h")) + (let* ((file (dired-get-filename)) + (manual-program (replace-regexp-in-string "\\*" "%s" + (dired-guess-shell-command + "Man command: " (list file))))) (Man-getpage-in-background file))) ;;; Run Info on files. @@ -1465,8 +1517,7 @@ to mark all zero length files." ;; Karsten Wenger fixed uid. (setq uid (buffer-substring (+ (point) 1) (progn (forward-word 1) (point)))) - (re-search-forward "\\(Jan\\|Feb\\|Mar\\|Apr\\|May\\|Jun\\|\ -Jul\\|Aug\\|Sep\\|Oct\\|Nov\\|Dec\\)") + (re-search-forward dired-move-to-filename-regexp) (goto-char (match-beginning 1)) (forward-char -1) (setq size (string-to-int (buffer-substring (save-excursion @@ -1665,4 +1716,5 @@ variables `dired-x-variable-list' in the message." ;; As Barry Warsaw would say: "This might be useful..." (provide 'dired-x) +;;; arch-tag: 71a43ba2-7a00-4793-a028-0613dd7765ae ;;; dired-x.el ends here diff --git a/lisp/dired.el b/lisp/dired.el index e01299f5eb..f562a0492e 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1,6 +1,6 @@ ;;; dired.el --- directory-browsing commands -;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 1997, 2000, 2001, 2003 +;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 97, 2000, 01, 03, 2004 ;; Free Software Foundation, Inc. ;; Author: Sebastian Kremer @@ -39,6 +39,7 @@ (defgroup dired nil "Directory editing." + :link '(custom-manual "(emacs)Dired") :group 'files) (defgroup dired-mark nil @@ -78,6 +79,9 @@ some of the `ls' switches are not supported; see the doc string of (defvar dired-chmod-program "chmod" "Name of chmod command (usually `chmod').") +(defvar dired-touch-program "touch" + "Name of touch command (usually `touch').") + ;;;###autoload (defcustom dired-ls-F-marks-symlinks nil "*Informs dired about how `ls -lF' marks symbolic links. @@ -192,6 +196,21 @@ with the buffer narrowed to the listing." ;; Note this can't simply be run inside function `dired-ls' as the hook ;; functions probably depend on the dired-subdir-alist to be OK. +;; Fixme: This should use mailcap. +(defcustom dired-view-command-alist + '(("[.]\\(ps\\|ps_pages\\|eps\\)\\'" . "gv -spartan -color -watch %s") + ("[.]pdf\\'" . "xpdf %s") + ("[.]\\(jpe?g\\|gif\\|png\\)\\'" . "eog %s") + ("[.]dvi\\'" . "xdvi -sidemargin 0.5 -topmargin 1 %s")) + "Alist specifying how to view special types of files. +Each element has the form (REGEXP . SHELL-COMMAND). +When the file name matches REGEXP, `dired-view-file' +invokes SHELL-COMMAND to view the file, processing it through `format'. +Use `%s' in SHELL-COMMAND to specify where to put the file name." + :group 'dired + :type '(alist :key-type regexp :value-type string) + :version "21.4") + ;; Internal variables (defvar dired-marker-char ?* ; the answer is 42 @@ -269,21 +288,96 @@ The match starts at the beginning of the line and ends after the end of the line (\\n or \\r). Subexpression 2 must end right before the \\n or \\r.") +(defgroup dired-faces nil + "Faces used by dired." + :group 'dired + :group 'faces) + +(defface dired-header + '((t (:inherit font-lock-type-face))) + "Face used for directory headers." + :group 'dired-faces + :version "21.4") +(defvar dired-header-face 'dired-header + "Face name used for directory headers.") + +(defface dired-mark + '((t (:inherit font-lock-constant-face))) + "Face used for dired marks." + :group 'dired-faces + :version "21.4") +(defvar dired-mark-face 'dired-mark + "Face name used for dired marks.") + +(defface dired-marked + '((t (:inherit font-lock-warning-face))) + "Face used for marked files." + :group 'dired-faces + :version "21.4") +(defvar dired-marked-face 'dired-marked + "Face name used for marked files.") + +(defface dired-flagged + '((t (:inherit font-lock-warning-face))) + "Face used for flagged files." + :group 'dired-faces + :version "21.4") +(defvar dired-flagged-face 'dired-flagged + "Face name used for flagged files.") + +(defface dired-warning + '((t (:inherit font-lock-comment-face))) + "Face used to highlight a part of a buffer that needs user attention." + :group 'dired-faces + :version "21.4") +(defvar dired-warning-face 'dired-warning + "Face name used for a part of a buffer that needs user attention.") + +(defface dired-directory + '((t (:inherit font-lock-function-name-face))) + "Face used for subdirectories." + :group 'dired-faces + :version "21.4") +(defvar dired-directory-face 'dired-directory + "Face name used for subdirectories.") + +(defface dired-symlink + '((t (:inherit font-lock-keyword-face))) + "Face used for symbolic links." + :group 'dired-faces + :version "21.4") +(defvar dired-symlink-face 'dired-symlink + "Face name used for symbolic links.") + +(defface dired-ignored + '((t (:inherit font-lock-string-face))) + "Face used for files suffixed with `completion-ignored-extensions'." + :group 'dired-faces + :version "21.4") +(defvar dired-ignored-face 'dired-ignored + "Face name used for files suffixed with `completion-ignored-extensions'.") + (defvar dired-font-lock-keywords (list ;; ;; Directory headers. - (list dired-subdir-regexp '(1 font-lock-type-face)) + (list dired-subdir-regexp '(1 dired-header-face)) + ;; + ;; Dired marks. + (list dired-re-mark '(0 dired-mark-face)) ;; ;; We make heavy use of MATCH-ANCHORED, since the regexps don't identify the ;; file name itself. We search for Dired defined regexps, and then use the ;; Dired defined function `dired-move-to-filename' before searching for the ;; simple regexp ".+". It is that regexp which matches the file name. ;; - ;; Dired marks. - (list dired-re-mark - '(0 font-lock-constant-face) - '(".+" (dired-move-to-filename) nil (0 font-lock-warning-face))) + ;; Marked files. + (list (concat "^[" (char-to-string dired-marker-char) "]") + '(".+" (dired-move-to-filename) nil (0 dired-marked-face))) + ;; + ;; Flagged files. + (list (concat "^[" (char-to-string dired-del-marker) "]") + '(".+" (dired-move-to-filename) nil (0 dired-flagged-face))) ;; People who are paranoid about security would consider this more ;; important than other things such as whether it is a directory. ;; But we don't want to encourage paranoia, so our default @@ -292,33 +386,43 @@ Subexpression 2 must end right before the \\n or \\r.") ;;; ;; Files that are group or world writable. ;;; (list (concat dired-re-maybe-mark dired-re-inode-size ;;; "\\([-d]\\(....w....\\|.......w.\\)\\)") -;;; '(1 font-lock-comment-face) -;;; '(".+" (dired-move-to-filename) nil (0 font-lock-comment-face))) +;;; '(1 dired-warning-face) +;;; '(".+" (dired-move-to-filename) nil (0 dired-warning-face))) + ;; However, we don't need to highlight the file name, only the + ;; permissions, to win generally. -- fx. + ;; Fixme: we could also put text properties on the permission + ;; fields with keymaps to frob the permissions, somewhat a la XEmacs. + (list (concat dired-re-maybe-mark dired-re-inode-size + "[-d]....\\(w\\)....") ; group writable + '(1 dired-warning-face)) + (list (concat dired-re-maybe-mark dired-re-inode-size + "[-d].......\\(w\\).") ; world writable + '(1 dired-warning-face)) ;; ;; Subdirectories. (list dired-re-dir - '(".+" (dired-move-to-filename) nil (0 font-lock-function-name-face))) + '(".+" (dired-move-to-filename) nil (0 dired-directory-face))) ;; ;; Symbolic links. (list dired-re-sym - '(".+" (dired-move-to-filename) nil (0 font-lock-keyword-face))) + '(".+" (dired-move-to-filename) nil (0 dired-symlink-face))) ;; ;; Files suffixed with `completion-ignored-extensions'. '(eval . ;; It is quicker to first find just an extension, then go back to the ;; start of that file name. So we do this complex MATCH-ANCHORED form. (list (concat "\\(" (regexp-opt completion-ignored-extensions) "\\|#\\)$") - '(".+" (dired-move-to-filename) nil (0 font-lock-string-face))))) + '(".+" (dired-move-to-filename) nil (0 dired-ignored-face))))) "Additional expressions to highlight in Dired mode.") ;;; Macros must be defined before they are used, for the byte compiler. -;; Mark all files for which CONDITION evals to non-nil. -;; CONDITION is evaluated on each line, with point at beginning of line. -;; MSG is a noun phrase for the type of files being marked. -;; It should end with a noun that can be pluralized by adding `s'. -;; Return value is the number of files marked, or nil if none were marked. (defmacro dired-mark-if (predicate msg) + "Mark all files for which PREDICATE evals to non-nil. +PREDICATE is evaluated on each line, with point at beginning of line. +MSG is a noun phrase for the type of files being marked. +It should end with a noun that can be pluralized by adding `s'. +Return value is the number of files marked, or nil if none were marked." `(let (buffer-read-only count) (save-excursion (setq count 0) @@ -499,12 +603,34 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh." (setq dir-or-list dirname)) (dired-internal-noselect dir-or-list switches))) +;; The following is an internal dired function. It returns non-nil if +;; the directory visited by the current dired buffer has changed on +;; disk. DIRNAME should be the directory name of that directory. +(defun dired-directory-changed-p (dirname) + (not (let ((attributes (file-attributes dirname)) + (modtime (visited-file-modtime))) + (or (eq modtime 0) + (not (eq (car attributes) t)) + (and (= (car (nth 5 attributes)) (car modtime)) + (= (nth 1 (nth 5 attributes)) (cdr modtime))))))) + +(defun dired-buffer-stale-p (&optional noconfirm) + "Return non-nil if current dired buffer needs updating. +If NOCONFIRM is non-nil, then this function always returns nil +for a remote directory. This feature is used by Auto Revert Mode." + (let ((dirname + (if (consp dired-directory) (car dired-directory) dired-directory))) + (and (stringp dirname) + (not (when noconfirm (file-remote-p dirname))) + (file-readable-p dirname) + (dired-directory-changed-p dirname)))) + ;; Separate function from dired-noselect for the sake of dired-vms.el. (defun dired-internal-noselect (dir-or-list &optional switches mode) ;; If there is an existing dired buffer for DIRNAME, just leave ;; buffer as it is (don't even call dired-revert). ;; This saves time especially for deep trees or with ange-ftp. - ;; The user can type `g'easily, and it is more consistent with find-file. + ;; The user can type `g' easily, and it is more consistent with find-file. ;; But if SWITCHES are given they are probably different from the ;; buffer's old value, so call dired-sort-other, which does ;; revert the buffer. @@ -530,20 +656,14 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh." ;; kill-all-local-variables any longer. (setq buffer (create-file-buffer (directory-file-name dirname))))) (set-buffer buffer) - (if (not new-buffer-p) ; existing buffer ... - (cond (switches ; ... but new switches + (if (not new-buffer-p) ; existing buffer ... + (cond (switches ; ... but new switches ;; file list may have changed (setq dired-directory dir-or-list) ;; this calls dired-revert (dired-sort-other switches)) ;; If directory has changed on disk, offer to revert. - ((if (let ((attributes (file-attributes dirname)) - (modtime (visited-file-modtime))) - (or (eq modtime 0) - (not (eq (car attributes) t)) - (and (= (car (nth 5 attributes)) (car modtime)) - (= (nth 1 (nth 5 attributes)) (cdr modtime))))) - nil + ((when (dired-directory-changed-p dirname) (message "%s" (substitute-command-keys "Directory has changed on disk; type \\[revert-buffer] to update Dired"))))) @@ -604,10 +724,12 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh." ;; Read in a new dired buffer -;; dired-readin differs from dired-insert-subdir in that it accepts -;; wildcards, erases the buffer, and builds the subdir-alist anew -;; (including making it buffer-local and clearing it first). (defun dired-readin () + "Read in a new dired buffer. +Differs from dired-insert-subdir in that it accepts +wildcards, erases the buffer, and builds the subdir-alist anew +\(including making it buffer-local and clearing it first)." + ;; default-directory and dired-actual-switches must be buffer-local ;; and initialized by now. (let (dirname) @@ -620,7 +742,6 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh." ;; based on dired-directory, e.g. with ange-ftp to a SysV host ;; where ls won't understand -Al switches. (run-hooks 'dired-before-readin-hook) - (message "Reading directory %s..." dirname) (if (consp buffer-undo-list) (setq buffer-undo-list nil)) (let (buffer-read-only @@ -629,7 +750,6 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh." (widen) (erase-buffer) (dired-readin-insert)) - (message "Reading directory %s...done" dirname) (goto-char (point-min)) ;; Must first make alist buffer local and set it to nil because ;; dired-build-subdir-alist will call dired-clear-alist first @@ -726,8 +846,8 @@ If HDR is non-nil, insert a header line with the directory name." ;; Insert "wildcard" line where "total" line would be for a full dir. (insert " wildcard " (file-name-nondirectory dir) "\n"))))) -;; Make the file names highlight when the mouse is on them. (defun dired-insert-set-properties (beg end) + "Make the file names highlight when the mouse is on them." (save-excursion (goto-char beg) (while (< (point) end) @@ -746,10 +866,10 @@ If HDR is non-nil, insert a header line with the directory name." ;; Reverting a dired buffer (defun dired-revert (&optional arg noconfirm) - ;; Reread the dired buffer. Must also be called after - ;; dired-actual-switches have changed. - ;; Should not fail even on completely garbaged buffers. - ;; Preserves old cursor, marks/flags, hidden-p. + "Reread the dired buffer. +Must also be called after dired-actual-switches have changed. +Should not fail even on completely garbaged buffers. +Preserves old cursor, marks/flags, hidden-p." (widen) ; just in case user narrowed (let ((opoint (point)) (ofile (dired-get-filename nil t)) @@ -776,10 +896,9 @@ If HDR is non-nil, insert a header line with the directory name." (goto-char opoint)) ; was before (dired-move-to-filename) (save-excursion ; hide subdirs that were hidden - (mapcar (function (lambda (dir) - (if (dired-goto-subdir dir) - (dired-hide-subdir 1)))) - hidden-subdirs))) + (dolist (dir hidden-subdirs) + (if (dired-goto-subdir dir) + (dired-hide-subdir 1))))) ;; outside of the let scope ;;; Might as well not override the user if the user changed this. ;;; (setq buffer-read-only t) @@ -789,7 +908,7 @@ If HDR is non-nil, insert a header line with the directory name." ;; Some of these are also used when inserting subdirs. (defun dired-remember-marks (beg end) - ;; Return alist of files and their marks, from BEG to END. + "Return alist of files and their marks, from BEG to END." (if selective-display ; must unhide to make this work. (let (buffer-read-only) (subst-char-in-region beg end ?\r ?\n))) @@ -802,9 +921,9 @@ If HDR is non-nil, insert a header line with the directory name." alist (cons (cons fil chr) alist))))) alist)) -;; Mark all files remembered in ALIST. -;; Each element of ALIST looks like (FILE . MARKERCHAR). (defun dired-mark-remembered (alist) + "Mark all files remembered in ALIST. +Each element of ALIST looks like (FILE . MARKERCHAR)." (let (elt fil chr) (while alist (setq elt (car alist) @@ -817,8 +936,8 @@ If HDR is non-nil, insert a header line with the directory name." (delete-char 1) (insert chr)))))) -;; Return a list of names of subdirs currently hidden. (defun dired-remember-hidden () + "Return a list of names of subdirs currently hidden." (let ((l dired-subdir-alist) dir pos result) (while l (setq dir (car (car l)) @@ -830,9 +949,9 @@ If HDR is non-nil, insert a header line with the directory name." (setq result (cons dir result)))) result)) -;; Try to insert all subdirs that were displayed before, -;; according to the former subdir alist OLD-SUBDIR-ALIST. (defun dired-insert-old-subdirs (old-subdir-alist) + "Try to insert all subdirs that were displayed before. +Do so according to the former subdir alist OLD-SUBDIR-ALIST." (or (string-match "R" dired-actual-switches) (let (elt dir) (while old-subdir-alist @@ -845,20 +964,17 @@ If HDR is non-nil, insert a header line with the directory name." (dired-insert-subdir dir)) (error nil)))))) -;; Remove directory DIR from any directory cache. (defun dired-uncache (dir) + "Remove directory DIR from any directory cache." (let ((handler (find-file-name-handler dir 'dired-uncache))) (if handler (funcall handler 'dired-uncache dir)))) ;; dired mode key bindings and initialization -(defvar dired-mode-map nil "Local keymap for dired-mode buffers.") -(if dired-mode-map - nil +(defvar dired-mode-map ;; This looks ugly when substitute-command-keys uses C-d instead d: ;; (define-key dired-mode-map "\C-d" 'dired-flag-file-deletion) - (let ((map (make-keymap))) (suppress-keymap map) (define-key map [mouse-2] 'dired-mouse-find-file-other-window) @@ -881,6 +997,7 @@ If HDR is non-nil, insert a header line with the directory name." (define-key map "Q" 'dired-do-query-replace-regexp) (define-key map "R" 'dired-do-rename) (define-key map "S" 'dired-do-symlink) + (define-key map "T" 'dired-do-touch) (define-key map "X" 'dired-do-shell-command) (define-key map "Z" 'dired-do-compress) (define-key map "!" 'dired-do-shell-command) @@ -923,6 +1040,7 @@ If HDR is non-nil, insert a header line with the directory name." (define-key map "*u" 'dired-unmark) (define-key map "*?" 'dired-unmark-all-files) (define-key map "*!" 'dired-unmark-all-marks) + (define-key map "U" 'dired-unmark-all-marks) (define-key map "*\177" 'dired-unmark-backward) (define-key map "*\C-n" 'dired-next-marked-file) (define-key map "*\C-p" 'dired-prev-marked-file) @@ -934,6 +1052,7 @@ If HDR is non-nil, insert a header line with the directory name." (define-key map "f" 'dired-find-file) (define-key map "\C-m" 'dired-advertised-find-file) (define-key map "g" 'revert-buffer) + (define-key map "\M-g" 'dired-goto-file) (define-key map "h" 'describe-mode) (define-key map "i" 'dired-maybe-insert-subdir) (define-key map "k" 'dired-do-kill-lines) @@ -1149,6 +1268,9 @@ If HDR is non-nil, insert a header line with the directory name." (define-key map [menu-bar operate chmod] '(menu-item "Change Mode..." dired-do-chmod :help "Change mode (attributes) of marked files")) + (define-key map [menu-bar operate touch] + '(menu-item "Change Timestamp..." dired-do-touch + :help "Change timestamp of marked files")) (define-key map [menu-bar operate load] '(menu-item "Load" dired-do-load :help "Load marked Emacs Lisp files")) @@ -1181,7 +1303,8 @@ If HDR is non-nil, insert a header line with the directory name." '(menu-item "Copy to..." dired-do-copy :help "Copy current file or all marked files")) - (setq dired-mode-map map))) + map) + "Local keymap for `dired-mode' buffers.") ;; Dired mode is suitable only for specially formatted data. (put 'dired-mode 'mode-class 'special) @@ -1264,18 +1387,32 @@ Keybindings: (propertized-buffer-identification "%17b")) (set (make-local-variable 'revert-buffer-function) (function dired-revert)) + (set (make-local-variable 'buffer-stale-function) + (function dired-buffer-stale-p)) (set (make-local-variable 'page-delimiter) "\n\n") (set (make-local-variable 'dired-directory) (or dirname default-directory)) ;; list-buffers uses this to display the dir being edited in this buffer. (set (make-local-variable 'list-buffers-directory) - (expand-file-name dired-directory)) + (expand-file-name (if (listp dired-directory) + (car dired-directory) + dired-directory))) (set (make-local-variable 'dired-actual-switches) (or switches dired-listing-switches)) - (set (make-local-variable 'font-lock-defaults) '(dired-font-lock-keywords t)) + (set (make-local-variable 'font-lock-defaults) + '(dired-font-lock-keywords t nil nil beginning-of-line)) (dired-sort-other dired-actual-switches t) - (run-hooks 'dired-mode-hook)) + (run-mode-hooks 'dired-mode-hook) + (when (featurep 'x-dnd) + (make-variable-buffer-local 'x-dnd-test-function) + (make-variable-buffer-local 'x-dnd-protocol-alist) + (setq x-dnd-test-function 'dired-dnd-test-function) + (setq x-dnd-protocol-alist + (append '(("^file:///" . dired-dnd-handle-local-file) + ("^file://" . dired-dnd-handle-file) + ("^file:" . dired-dnd-handle-local-file)) + x-dnd-protocol-alist)))) ;; Idiosyncratic dired commands that don't deal with marks. @@ -1392,21 +1529,24 @@ Creates a buffer if necessary." (set-buffer (window-buffer window)) (goto-char pos) (setq file (dired-get-file-for-visit))) - (select-window window) - (find-file-other-window (file-name-sans-versions file t)))) - -(defcustom dired-view-command-alist - '(("[.]ps\\'" . "gv -spartan -color -watch") - ("[.]pdf\\'" . "xpdf") - ("[.]dvi\\'" . "xdvi -sidemargin 0.5 -topmargin 1")) - "Alist specifying how to view special types of files. -Each element has the form (REGEXP . SHELL-COMMAND). -When the file name matches REGEXP, `dired-view-file' -invokes SHELL-COMMAND to view the file, putting the file name -at the end of the command." - :group 'dired - :type '(alist :key-type regexp :value-type string) - :version "21.4") + (if (file-directory-p file) + (or (and (cdr dired-subdir-alist) + (dired-goto-subdir file)) + (progn + (select-window window) + (dired-other-window file))) + (let (cmd) + ;; Look for some other way to view a certain file. + (dolist (elt dired-view-command-alist) + (if (string-match (car elt) file) + (setq cmd (cdr elt)))) + (if cmd + (call-process shell-file-name nil 0 nil + "-c" + (concat (format cmd (shell-quote-argument file)) + " &")) + (select-window window) + (find-file-other-window (file-name-sans-versions file t))))))) (defun dired-view-file () "In Dired, examine a file in view mode, returning to dired when done. @@ -1427,8 +1567,7 @@ see `dired-view-command-alist'. Otherwise, display it in another buffer." (if cmd (call-process shell-file-name nil 0 nil "-c" - (concat cmd " " - (shell-quote-argument file) + (concat (format cmd (shell-quote-argument file)) " &")) (view-file file)))))) @@ -1573,7 +1712,7 @@ DIR must be a directory name, not a file name." (s " ") (yyyy "[0-9][0-9][0-9][0-9]") (dd "[ 0-3][0-9]") - (HH:MM "[ 0-2][0-9]:[0-5][0-9]") + (HH:MM "[ 0-2][0-9][:.][0-5][0-9]") (seconds "[0-6][0-9]\\([.,][0-9]+\\)?") (zone "[-+][0-2][0-9][0-5][0-9]") (iso-mm-dd "[01][0-9]-[0-3][0-9]") @@ -1661,12 +1800,9 @@ regardless of the language.") (string-match "[xst]" ;; execute bit set anywhere? (concat - (buffer-substring (match-beginning 2) - (match-end 2)) - (buffer-substring (match-beginning 3) - (match-end 3)) - (buffer-substring (match-beginning 4) - (match-end 4)))))) + (match-string 2) + (match-string 3) + (match-string 4))))) (or no-error (error "No file on this line")))) ;; Move point to end of name: (if symlink @@ -2279,8 +2415,8 @@ if there are no flagged files." (defvar dired-no-confirm nil "A list of symbols for commands dired should not confirm. Command symbols are `byte-compile', `chgrp', `chmod', `chown', `compress', -`copy', `delete', `hardlink', `load', `move', `print', `shell', `symlink' and -`uncompress'.") +`copy', `delete', `hardlink', `load', `move', `print', `shell', `symlink', +`touch' and `uncompress'.") (defun dired-mark-pop-up (bufname op-symbol files function &rest args) "Return FUNCTION's result on ARGS after showing which files are marked. @@ -2361,12 +2497,10 @@ FILES is the list of marked files." (dired-move-to-filename))) (defun dired-between-files () - ;; Point must be at beginning of line - ;; Should be equivalent to (save-excursion (not (dired-move-to-filename))) - ;; but is about 1.5..2.0 times as fast. (Actually that's not worth it) - (or (looking-at "^$\\|^. *$\\|^. total\\|^. wildcard\\|^. used\\|^. find") - (and (looking-at dired-subdir-regexp) - (save-excursion (not (dired-move-to-filename)))))) + ;; This used to be a regexp match of the `total ...' line output by + ;; ls, which is slightly faster, but that is not very robust; notably, + ;; it fails for non-english locales. + (save-excursion (not (dired-move-to-filename)))) (defun dired-next-marked-file (arg &optional wrap opoint) "Move to the next marked file, wrapping around the end of the buffer." @@ -2591,11 +2725,15 @@ A prefix argument says to unflag those files instead." (file-name-nondirectory fn))))) "auto save file"))) -(defvar dired-garbage-files-regexp +(defcustom dired-garbage-files-regexp + ;; `log' here is dubious, since it's typically used for useful log + ;; files, not just TeX stuff. -- fx (concat (regexp-opt '(".log" ".toc" ".dvi" ".bak" ".orig" ".rej" ".aux")) "\\'") - "*Regular expression to match \"garbage\" files for `dired-flag-garbage-files'.") + "Regular expression to match \"garbage\" files for `dired-flag-garbage-files'." + :type 'regexp + :group 'dired) (defun dired-flag-garbage-files () "Flag for deletion all files that match `dired-garbage-files-regexp'." @@ -2751,7 +2889,14 @@ Thus, use \\[backward-page] to find the beginning of a group of errors." ;; So anything that does not contain these is sort "by name". (defvar dired-ls-sorting-switches "SXU" - "String of `ls' switches (single letters) except `t' that influence sorting.") + "String of `ls' switches \(single letters\) except `t' that influence sorting. + +This indicates to Dired which option switches to watch out for because they +will change the sorting order behavior of `ls'. + +To change the default sorting order \(e.g. add a `-v' option\), see the +variable `dired-listing-switches'. To temporarily override the listing +format, use `\\[universal-argument] \\[dired]'.") (defvar dired-sort-by-date-regexp (concat "^-[^" dired-ls-sorting-switches @@ -2829,10 +2974,10 @@ With a prefix argument you can edit the current listing switches instead." (concat result (substring string start)))) (defun dired-sort-other (switches &optional no-revert) - ;; Specify new ls SWITCHES for current dired buffer. Values matching - ;; `dired-sort-by-date-regexp' or `dired-sort-by-name-regexp' set the - ;; minor mode accordingly, others appear literally in the mode line. - ;; With optional second arg NO-REVERT, don't refresh the listing afterwards. + "Specify new ls SWITCHES for current dired buffer. +Values matching `dired-sort-by-date-regexp' or `dired-sort-by-name-regexp' +set the minor mode accordingly, others appear literally in the mode line. +With optional second arg NO-REVERT, don't refresh the listing afterwards." (dired-sort-R-check switches) (setq dired-actual-switches switches) (if (eq major-mode 'dired-mode) (dired-sort-set-modeline)) @@ -2914,6 +3059,10 @@ This calls chmod, thus symbolic modes like `g+w' are allowed." "Change the owner of the marked (or next ARG) files." t) +(autoload 'dired-do-touch "dired-aux" + "Change the timestamp of the marked (or next ARG) files." + t) + (autoload 'dired-do-print "dired-aux" "Print the marked (or next ARG) files. Uses the shell command coming from variables `lpr-command' and @@ -3107,6 +3256,93 @@ true then the type of the file linked to by FILE is printed instead." (autoload 'dired-query "dired-aux") + +;;;; Drag and drop support + +(defun dired-dnd-test-function (window action types) + "The test function for drag and drop into dired buffers. +WINDOW is where the mouse is when this function is called. It may be a frame +if the mouse is over the menu bar, scroll bar or tool bar. +ACTION is the suggested action from the source, and TYPES are the +types the drop data can have. This function only accepts drops with +types in `x-dnd-known-types'. It returns the action suggested by the source." + (let ((type (x-dnd-choose-type types))) + (if type + (cons action type) + nil))) + +(defun dired-dnd-popup-notice () + (x-popup-dialog + t + '("Recursive copies not enabled.\nSee variable dired-recursive-copies." + ("Ok" . nil)))) + + +(defun dired-dnd-do-ask-action (uri) + ;; No need to get actions and descriptions from the source, + ;; we only have three actions anyway. + (let ((action (x-popup-menu + t + (list "What action?" + (cons "" + '(("Copy here" . copy) + ("Move here" . move) + ("Link here" . link) + "--" + ("Cancel" . nil))))))) + (if action + (dired-dnd-handle-local-file uri action) + nil))) + +(defun dired-dnd-handle-local-file (uri action) + "Copy, move or link a file to the dired directory. +URI is the file to handle, ACTION is one of copy, move, link or ask. +Ask means pop up a menu for the user to select one of copy, move or link." + (require 'dired-aux) + (let* ((from (x-dnd-get-local-file-name uri t)) + (to (if from (concat (dired-current-directory) + (file-name-nondirectory from)) + nil))) + (if from + (cond ((or (eq action 'copy) + (eq action 'private)) ; Treat private as copy. + + ;; If copying a directory and dired-recursive-copies is nil, + ;; dired-copy-file silently fails. Pop up a notice. + (if (and (file-directory-p from) + (not dired-recursive-copies)) + (dired-dnd-popup-notice) + (progn + (dired-copy-file from to 1) + (dired-relist-entry to) + action))) + + ((eq action 'move) + (dired-rename-file from to 1) + (dired-relist-entry to) + action) + + ((eq action 'link) + (make-symbolic-link from to 1) + (dired-relist-entry to) + action) + + ((eq action 'ask) + (dired-dnd-do-ask-action uri)) + + (t nil))))) + +(defun dired-dnd-handle-file (uri action) + "Copy, move or link a file to the dired directory if it is a local file. +URI is the file to handle. If the hostname in the URI isn't local, do nothing. +ACTION is one of copy, move, link or ask. +Ask means pop up a menu for the user to select one of copy, move or link." + (let ((local-file (x-dnd-get-local-file-uri uri))) + (if local-file (dired-dnd-handle-local-file local-file action) + nil))) + + + (if (eq system-type 'vax-vms) (load "dired-vms")) @@ -3114,4 +3350,5 @@ true then the type of the file linked to by FILE is printed instead." (run-hooks 'dired-load-hook) ; for your customizations +;;; arch-tag: e1af7a8f-691c-41a0-aac1-ddd4d3c87517 ;;; dired.el ends here diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el index 75fbf244f9..41aea04988 100644 --- a/lisp/dirtrack.el +++ b/lisp/dirtrack.el @@ -334,4 +334,5 @@ You can enable directory tracking by adding this function to (provide 'dirtrack) +;;; arch-tag: 168de071-be88-4937-aff6-2aba9f328d5a ;;; dirtrack.el ends here diff --git a/lisp/disp-table.el b/lisp/disp-table.el index 106ccd028e..0c2984759c 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el @@ -1,6 +1,6 @@ ;;; disp-table.el --- functions for dealing with char tables -;; Copyright (C) 1987, 1994, 1995, 1999 Free Software Foundation, Inc. +;; Copyright (C) 1987, 94, 95, 1999, 2004 Free Software Foundation, Inc. ;; Author: Erik Naggum ;; Based on a previous version by Howard Gayle @@ -113,15 +113,17 @@ Valid symbols are `truncation', `wrap', `escape', `control', ;;;###autoload (defun standard-display-8bit (l h) "Display characters in the range L to H literally." + (or standard-display-table + (setq standard-display-table (make-display-table))) (while (<= l h) - (if (and (>= l ?\ ) (< l 127)) - (aset standard-display-table l nil) - (aset standard-display-table l (vector l))) + (aset standard-display-table l (if (or (< l ?\ ) (>= l 127)) (vector l))) (setq l (1+ l)))) ;;;###autoload (defun standard-display-default (l h) "Display characters in the range L to H using the default notation." + (or standard-display-table + (setq standard-display-table (make-display-table))) (while (<= l h) (if (and (>= l ?\ ) (characterp l)) (aset standard-display-table l nil)) @@ -133,6 +135,8 @@ Valid symbols are `truncation', `wrap', `escape', `control', ;;;###autoload (defun standard-display-ascii (c s) "Display character C using printable string S." + (or standard-display-table + (setq standard-display-table (make-display-table))) (aset standard-display-table c (vconcat s))) ;;;###autoload @@ -142,6 +146,8 @@ This function assumes that your terminal uses the SO/SI characters; it is meaningless for an X frame." (if (memq window-system '(x w32)) (error "Cannot use string glyphs in a windowing system")) + (or standard-display-table + (setq standard-display-table (make-display-table))) (aset standard-display-table c (vector (create-glyph (concat "\016" (char-to-string sc) "\017"))))) @@ -152,12 +158,16 @@ This function assumes VT100-compatible escapes; it is meaningless for an X frame." (if (memq window-system '(x w32)) (error "Cannot use string glyphs in a windowing system")) + (or standard-display-table + (setq standard-display-table (make-display-table))) (aset standard-display-table c (vector (create-glyph (concat "\e(0" (char-to-string gc) "\e(B"))))) ;;;###autoload (defun standard-display-underline (c uc) "Display character C as character UC plus underlining." + (or standard-display-table + (setq standard-display-table (make-display-table))) (aset standard-display-table c (vector (if window-system @@ -227,4 +237,5 @@ for users who call this function in `.emacs'." (provide 'disp-table) +;;; arch-tag: ffe4c28c-960c-47aa-b8a8-ae89d371ffc7 ;;; disp-table.el ends here diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el index ba2aff981e..65b6c0063c 100644 --- a/lisp/dos-fns.el +++ b/lisp/dos-fns.el @@ -252,4 +252,5 @@ that your video hardware might not support 50-line mode." (provide 'dos-fns) +;;; arch-tag: 00b03579-8ebb-4a02-8762-5c5a929774ad ;;; dos-fns.el ends here diff --git a/lisp/dos-vars.el b/lisp/dos-vars.el index ee008d2094..93ff681796 100644 --- a/lisp/dos-vars.el +++ b/lisp/dos-vars.el @@ -44,4 +44,5 @@ in `standard-display-table' as appropriate for your codepage, if :type '(hook) :version "20.3.3") +;;; arch-tag: dce8a0d9-ab29-413f-84ed-8b89d6190546 ;;; dos-vars.el ends here diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el index 4768586b33..d7b411fab3 100644 --- a/lisp/dos-w32.el +++ b/lisp/dos-w32.el @@ -378,7 +378,8 @@ indicates a specific program should be invoked." (printer (or (and (boundp 'dos-printer) (stringp (symbol-value 'dos-printer)) (symbol-value 'dos-printer)) - printer-name))) + printer-name + (default-printer-name)))) (or (eq coding-system-for-write 'no-conversion) (setq coding-system-for-write (aref eol-type 1))) ; force conversion to DOS EOLs @@ -411,7 +412,8 @@ indicates a specific program should be invoked." (let ((printer (or (and (boundp 'dos-ps-printer) (stringp (symbol-value 'dos-ps-printer)) (symbol-value 'dos-ps-printer)) - ps-printer-name))) + ps-printer-name + (default-printer-name)))) (direct-print-region-helper printer start end lpr-prog delete-text buf display rest))) @@ -424,4 +426,5 @@ indicates a specific program should be invoked." (provide 'dos-w32) +;;; arch-tag: dcfefdd2-362f-4fbc-9141-9634f5f4d6a7 ;;; dos-w32.el ends here diff --git a/lisp/double.el b/lisp/double.el index b658f00792..fc931992bd 100644 --- a/lisp/double.el +++ b/lisp/double.el @@ -207,4 +207,5 @@ when pressed twice. See variable `double-map' for details." (provide 'double) +;;; arch-tag: 2e170036-44cb-4493-bc32-ada0a4395221 ;;; double.el ends here diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index 0330941543..bed46c7161 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el @@ -282,4 +282,5 @@ Returns to Electric Buffer Menu when done." (provide 'ebuff-menu) +;;; arch-tag: 1d4509b3-eece-4d4f-95ea-77c83eaf0275 ;;; ebuff-menu.el ends here diff --git a/lisp/echistory.el b/lisp/echistory.el index dd6b429872..a01cad89f4 100644 --- a/lisp/echistory.el +++ b/lisp/echistory.el @@ -152,4 +152,5 @@ The Command History listing is recomputed each time this mode is invoked." (provide 'echistory) +;;; arch-tag: 1e5018fe-190f-44a7-9109-a895dcac4c50 ;;; echistory.el ends here diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index 99b9a23f7c..4ba4ab316f 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el @@ -64,8 +64,8 @@ Must produce output compatible with Unix's diff3 program." ;; The following functions needed for setting diff/diff3 options ;; test if diff supports the --binary option (defsubst ediff-test-utility (diff-util option &optional files) - (zerop (apply 'call-process - (append (list diff-util nil nil nil option) files)))) + (eq 0 (apply 'call-process + (append (list diff-util nil nil nil option) files)))) (defun ediff-diff-mandatory-option (diff-util) (let ((file (if (boundp 'null-device) null-device "/dev/null"))) @@ -1346,4 +1346,5 @@ arguments to `skip-chars-forward'." ;;; End: +;;; arch-tag: a86d448e-58d7-4572-a1d9-fdedfa22f648 ;;; ediff-diff.el ends here diff --git a/lisp/ediff-help.el b/lisp/ediff-help.el index 640b9e5ec2..bdd92f5c12 100644 --- a/lisp/ediff-help.el +++ b/lisp/ediff-help.el @@ -324,4 +324,5 @@ the value of this variable and the variables `ediff-help-message-*' in (customize-group "ediff")) +;;; arch-tag: 05659813-7fcf-4274-964f-d2f577431a9d ;;; ediff-help.el ends here diff --git a/lisp/ediff-hook.el b/lisp/ediff-hook.el index e8cf252f99..7ea6f24d7b 100644 --- a/lisp/ediff-hook.el +++ b/lisp/ediff-hook.el @@ -370,4 +370,5 @@ (provide 'ediff-hook) +;;; arch-tag: 512f8656-8a4b-4789-af5d-5c6144498df3 ;;; ediff-hook.el ends here diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el index 0ce7e4323e..81299b9c63 100644 --- a/lisp/ediff-init.el +++ b/lisp/ediff-init.el @@ -1,6 +1,6 @@ ;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff -;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02 Free Software Foundation, Inc. +;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 04 Free Software Foundation, Inc. ;; Author: Michael Kifer @@ -895,7 +895,8 @@ to temp files when Ediff needs to find fine differences." (sit-for 1))))) (defun ediff-hide-face (face) - (if (and (ediff-has-face-support-p) ediff-emacs-p) + (if (and (ediff-has-face-support-p) (boundp 'add-to-list) + (boundp 'facemenu-unlisted-faces)) (add-to-list 'facemenu-unlisted-faces face))) @@ -1288,7 +1289,7 @@ This property can be toggled interactively." ;;; Misc ;; if nil, this silences some messages -(defconst ediff-verbose-p t) +(defvar ediff-verbose-p t) (defcustom ediff-autostore-merges 'group-jobs-only "*Save the results of merge jobs automatically. @@ -1762,4 +1763,5 @@ Unless optional argument INPLACE is non-nil, return a new string." (provide 'ediff-init) +;;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5 ;;; ediff-init.el ends here diff --git a/lisp/ediff-merg.el b/lisp/ediff-merg.el index e7f6de3e86..237ce514cb 100644 --- a/lisp/ediff-merg.el +++ b/lisp/ediff-merg.el @@ -388,4 +388,5 @@ Combining is done according to the specifications in variable ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) ;;; End: +;;; arch-tag: 9b798cf9-02ba-487f-a62e-b63aa823dbfb ;;; ediff-merg.el ends here diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el index a89902e8d3..f5eff1eb49 100644 --- a/lisp/ediff-mult.el +++ b/lisp/ediff-mult.el @@ -1689,6 +1689,7 @@ all marked sessions must be active." (info (ediff-get-meta-info meta-buf pos)) (session-buf (ediff-get-session-buffer info)) (session-number (ediff-get-session-number-at-pos pos meta-buf)) + (default-regexp (eval ediff-default-filtering-regexp)) merge-autostore-dir file1 file2 file3 regexp) (setq file1 (ediff-get-session-objA-name info) @@ -1717,8 +1718,16 @@ all marked sessions must be active." ;; do ediff/ediff-merge on subdirectories (if (ediff-buffer-live-p session-buf) (ediff-show-meta-buffer session-buf) - (setq regexp (read-string "Filter through regular expression: " - nil 'ediff-filtering-regexp-history)) + (setq regexp + (read-string + (if (stringp default-regexp) + (format + "Filter through regular expression (default %s): " + default-regexp) + "Filter through regular expression: ") + nil + 'ediff-filtering-regexp-history + (eval ediff-default-filtering-regexp))) (ediff-directories-internal file1 file2 file3 regexp ediff-session-action-function @@ -2363,4 +2372,5 @@ last-command-char is used to decide which action to take." ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) ;;; End: +;;; arch-tag: c8a76898-f96f-4d9c-be9d-129134017188 ;;; ediff-mult.el ends here diff --git a/lisp/ediff-ptch.el b/lisp/ediff-ptch.el index 9590c9a181..342f75fd1e 100644 --- a/lisp/ediff-ptch.el +++ b/lisp/ediff-ptch.el @@ -86,10 +86,10 @@ See also `ediff-backup-specs'." (defun ediff-test-patch-utility () (condition-case nil - (cond ((zerop (call-process ediff-patch-program nil nil nil "-z." "-b")) + (cond ((eq 0 (call-process ediff-patch-program nil nil nil "-z." "-b")) ;; GNU `patch' v. >= 2.2 'gnu) - ((zerop (call-process ediff-patch-program nil nil nil "-b")) + ((eq 0 (call-process ediff-patch-program nil nil nil "-b")) 'posix) (t 'traditional)) (file-error nil))) @@ -802,4 +802,5 @@ you can still examine the changes via M-x ediff-files" ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) ;;; End: +;;; arch-tag: 2fe2161e-e116-469b-90fa-5cbb44c1bd1b ;;; ediff-ptch.el ends here diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el index b551f05643..79f85cc189 100644 --- a/lisp/ediff-util.el +++ b/lisp/ediff-util.el @@ -1,6 +1,6 @@ ;;; ediff-util.el --- the core commands and utilities of ediff -;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02 Free Software Foundation, Inc. +;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 04 Free Software Foundation, Inc. ;; Author: Michael Kifer @@ -826,7 +826,8 @@ Reestablish the default three-window display." (eq this-command 'ediff-quit)))) )) - (ediff-restore-highlighting) + (or no-rehighlight + (ediff-restore-highlighting)) (ediff-with-current-buffer control-buf (ediff-refresh-mode-lines)) )) @@ -1079,8 +1080,10 @@ of the current buffer." (eq this-command 'ediff-toggle-read-only) (file-exists-p file) (not (file-writable-p file))) - (message "Warning: file %s is read-only" - (ediff-abbreviate-file-name file) (beep 1))) + (progn + (beep 1) + (message "Warning: file %s is read-only" + (ediff-abbreviate-file-name file)))) )))) ;; checkout if visited file is checked in @@ -2232,7 +2235,7 @@ a regular expression typed in by the user." (if (y-or-n-p (format "Ignore regions that match %s regexps, OK? " - msg-connective alt-msg-connective)) + msg-connective)) (message "Will ignore regions that match %s regexps" msg-connective) (setq ediff-hide-regexp-connective alt-connective) (message "Will ignore regions that match %s regexps" @@ -2271,7 +2274,7 @@ a regular expression typed in by the user." (if (y-or-n-p (format "Focus on regions that match %s regexps, OK? " - msg-connective alt-msg-connective)) + msg-connective)) (message "Will focus on regions that match %s regexps" msg-connective) (setq ediff-focus-regexp-connective alt-connective) @@ -2940,6 +2943,8 @@ Hit \\[ediff-recenter] to reset the windows afterward." )) (ediff-install-fine-diff-if-necessary n) + ;; set current difference here so the hook will be able to refer to it + (setq ediff-current-difference n) (run-hooks 'ediff-select-hook)))) @@ -2991,6 +2996,9 @@ Hit \\[ediff-recenter] to reset the windows afterward." (or (eq flag 'unselect-only) (ediff-select-difference n)) + ;; need to set current diff here even though it is also set in + ;; ediff-select-difference because ediff-select-difference might not + ;; be called if unselect-only is specified (setq ediff-current-difference n) ) ; end protected section @@ -3393,29 +3401,33 @@ Without an argument, it saves customized diff argument, if available (let ((buf-A-file-name (buffer-file-name ediff-buffer-A)) (buf-B-file-name (buffer-file-name ediff-buffer-B)) file-A file-B) - (if (stringp buf-A-file-name) - (setq buf-A-file-name (file-name-nondirectory buf-A-file-name))) - (if (stringp buf-B-file-name) - (setq buf-B-file-name (file-name-nondirectory buf-B-file-name))) - (setq file-A (ediff-make-temp-file ediff-buffer-A buf-A-file-name) - file-B (ediff-make-temp-file ediff-buffer-B buf-B-file-name)) - + (unless (and buf-A-file-name (file-exists-p buf-A-file-name)) + (setq file-A + (ediff-make-temp-file ediff-buffer-A))) + (unless (and buf-B-file-name (file-exists-p buf-B-file-name)) + (setq file-B + (ediff-make-temp-file ediff-buffer-B))) (or (ediff-buffer-live-p ediff-custom-diff-buffer) (setq ediff-custom-diff-buffer (get-buffer-create (ediff-unique-buffer-name "*ediff-custom-diff" "*")))) (ediff-with-current-buffer ediff-custom-diff-buffer - (setq buffer-read-only nil) - (erase-buffer)) + (setq buffer-read-only nil) + (erase-buffer)) (ediff-exec-process ediff-custom-diff-program ediff-custom-diff-buffer 'synchronize - ediff-custom-diff-options file-A file-B) + ediff-custom-diff-options + ;; repetition of buf-A-file-name is needed so it'll return a file + (or (and buf-A-file-name (file-exists-p buf-A-file-name) buf-A-file-name) + file-A) + (or (and buf-B-file-name (file-exists-p buf-B-file-name) buf-B-file-name) + file-B)) ;; put the diff file in diff-mode, if it is available (if (fboundp 'diff-mode) (with-current-buffer ediff-custom-diff-buffer (diff-mode))) - (delete-file file-A) - (delete-file file-B) + (and file-A (file-exists-p file-A) (delete-file file-A)) + (and file-B (file-exists-p file-B) (delete-file file-B)) )) (defun ediff-show-diff-output (arg) @@ -4286,4 +4298,5 @@ Mail anyway? (y or n) ") ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) ;;; End: +;;; arch-tag: f51099b6-ef4b-470f-88a1-3a0e0b03a879 ;;; ediff-util.el ends here diff --git a/lisp/ediff-vers.el b/lisp/ediff-vers.el index 6438b4b380..effce2a1ad 100644 --- a/lisp/ediff-vers.el +++ b/lisp/ediff-vers.el @@ -312,4 +312,5 @@ (provide 'ediff-vers) +;;; arch-tag: bbb34f0c-2a90-426a-a77a-c75f479ebbbf ;;; ediff-vers.el ends here diff --git a/lisp/ediff-wind.el b/lisp/ediff-wind.el index f2a0ccdd79..dde306a385 100644 --- a/lisp/ediff-wind.el +++ b/lisp/ediff-wind.el @@ -1318,4 +1318,5 @@ It assumes that it is called from within the control buffer." ;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) ;;; End: +;;; arch-tag: 73d9a5d7-eed7-4d9c-8b4b-21d5d78eb597 ;;; ediff-wind.el ends here diff --git a/lisp/ediff.el b/lisp/ediff.el index edc16265b0..78ea48f4a1 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el @@ -501,6 +501,7 @@ the same name in both. The third argument, REGEXP, is nil or a regular expression; only file names that match the regexp are considered." (interactive (let ((dir-A (ediff-get-default-directory-name)) + (default-regexp (eval ediff-default-filtering-regexp)) f) (list (setq f (ediff-read-file-name "Directory A to compare:" dir-A nil)) (ediff-read-file-name "Directory B to compare:" @@ -508,11 +509,14 @@ expression; only file names that match the regexp are considered." ediff-last-dir-B (ediff-strip-last-dir f)) nil) - (read-string (format - "Filter through regular expression (default %S): " - (eval ediff-default-filtering-regexp)) - (eval ediff-default-filtering-regexp) - 'ediff-filtering-regexp-history) + (read-string + (if (stringp default-regexp) + (format "Filter through regular expression (default %s): " + default-regexp) + "Filter through regular expression: ") + nil + 'ediff-filtering-regexp-history + (eval ediff-default-filtering-regexp)) ))) (ediff-directories-internal dir1 dir2 nil regexp 'ediff-files 'ediff-directories @@ -528,14 +532,19 @@ expression; only file names that match the regexp are considered." The second argument, REGEXP, is a regular expression that filters the file names. Only the files that are under revision control are taken into account." (interactive - (let ((dir-A (ediff-get-default-directory-name))) + (let ((dir-A (ediff-get-default-directory-name)) + (default-regexp (eval ediff-default-filtering-regexp)) + ) (list (ediff-read-file-name "Directory to compare with revision:" dir-A nil) - (read-string (format - "Filter through regular expression (default %S): " - (eval ediff-default-filtering-regexp)) - (eval ediff-default-filtering-regexp) - 'ediff-filtering-regexp-history) + (read-string + (if (stringp default-regexp) + (format "Filter through regular expression (default %s): " + default-regexp) + "Filter through regular expression: ") + nil + 'ediff-filtering-regexp-history + (eval ediff-default-filtering-regexp)) ))) (ediff-directory-revisions-internal dir1 regexp 'ediff-revision 'ediff-directory-revisions @@ -553,6 +562,7 @@ regular expression; only file names that match the regexp are considered." (interactive (let ((dir-A (ediff-get-default-directory-name)) + (default-regexp (eval ediff-default-filtering-regexp)) f) (list (setq f (ediff-read-file-name "Directory A to compare:" dir-A nil)) (setq f (ediff-read-file-name "Directory B to compare:" @@ -565,11 +575,14 @@ regular expression; only file names that match the regexp are considered." ediff-last-dir-C (ediff-strip-last-dir f)) nil) - (read-string (format - "Filter through regular expression (default %S): " - (eval ediff-default-filtering-regexp)) - (eval ediff-default-filtering-regexp) - 'ediff-filtering-regexp-history) + (read-string + (if (stringp default-regexp) + (format "Filter through regular expression (default %s): " + default-regexp) + "Filter through regular expression: ") + nil + 'ediff-filtering-regexp-history + (eval ediff-default-filtering-regexp)) ))) (ediff-directories-internal dir1 dir2 dir3 regexp 'ediff-files3 'ediff-directories3 @@ -585,6 +598,7 @@ the same name in both. The third argument, REGEXP, is nil or a regular expression; only file names that match the regexp are considered." (interactive (let ((dir-A (ediff-get-default-directory-name)) + (default-regexp (eval ediff-default-filtering-regexp)) f) (list (setq f (ediff-read-file-name "Directory A to merge:" dir-A nil)) (ediff-read-file-name "Directory B to merge:" @@ -592,11 +606,14 @@ expression; only file names that match the regexp are considered." ediff-last-dir-B (ediff-strip-last-dir f)) nil) - (read-string (format - "Filter through regular expression (default %S): " - (eval ediff-default-filtering-regexp)) - (eval ediff-default-filtering-regexp) - 'ediff-filtering-regexp-history) + (read-string + (if (stringp default-regexp) + (format "Filter through regular expression (default %s): " + default-regexp) + "Filter through regular expression: ") + nil + 'ediff-filtering-regexp-history + (eval ediff-default-filtering-regexp)) ))) (ediff-directories-internal dir1 dir2 nil regexp 'ediff-merge-files 'ediff-merge-directories @@ -617,6 +634,7 @@ without ancestor. The fourth argument, REGEXP, is nil or a regular expression; only file names that match the regexp are considered." (interactive (let ((dir-A (ediff-get-default-directory-name)) + (default-regexp (eval ediff-default-filtering-regexp)) f) (list (setq f (ediff-read-file-name "Directory A to merge:" dir-A nil)) (setq f (ediff-read-file-name "Directory B to merge:" @@ -629,11 +647,14 @@ only file names that match the regexp are considered." ediff-last-dir-C (ediff-strip-last-dir f)) nil) - (read-string (format - "Filter through regular expression (default %S): " - (eval ediff-default-filtering-regexp)) - (eval ediff-default-filtering-regexp) - 'ediff-filtering-regexp-history) + (read-string + (if (stringp default-regexp) + (format "Filter through regular expression (default %s): " + default-regexp) + "Filter through regular expression: ") + nil + 'ediff-filtering-regexp-history + (eval ediff-default-filtering-regexp)) ))) (ediff-directories-internal dir1 dir2 ancestor-dir regexp @@ -648,14 +669,19 @@ only file names that match the regexp are considered." The second argument, REGEXP, is a regular expression that filters the file names. Only the files that are under revision control are taken into account." (interactive - (let ((dir-A (ediff-get-default-directory-name))) + (let ((dir-A (ediff-get-default-directory-name)) + (default-regexp (eval ediff-default-filtering-regexp)) + ) (list (ediff-read-file-name "Directory to merge with revisions:" dir-A nil) - (read-string (format - "Filter through regular expression (default %S): " - (eval ediff-default-filtering-regexp)) - (eval ediff-default-filtering-regexp) - 'ediff-filtering-regexp-history) + (read-string + (if (stringp default-regexp) + (format "Filter through regular expression (default %s): " + default-regexp) + "Filter through regular expression: ") + nil + 'ediff-filtering-regexp-history + (eval ediff-default-filtering-regexp)) ))) (ediff-directory-revisions-internal dir1 regexp 'ediff-merge-revisions 'ediff-merge-directory-revisions @@ -673,14 +699,19 @@ names. Only the files that are under revision control are taken into account." The second argument, REGEXP, is a regular expression that filters the file names. Only the files that are under revision control are taken into account." (interactive - (let ((dir-A (ediff-get-default-directory-name))) + (let ((dir-A (ediff-get-default-directory-name)) + (default-regexp (eval ediff-default-filtering-regexp)) + ) (list (ediff-read-file-name "Directory to merge with revisions and ancestors:" dir-A nil) - (read-string (format - "Filter through regular expression (default %S): " - (eval ediff-default-filtering-regexp)) - (eval ediff-default-filtering-regexp) - 'ediff-filtering-regexp-history) + (read-string + (if (stringp default-regexp) + (format "Filter through regular expression (default %s): " + default-regexp) + "Filter through regular expression: ") + nil + 'ediff-filtering-regexp-history + (eval ediff-default-filtering-regexp)) ))) (ediff-directory-revisions-internal dir1 regexp 'ediff-merge-revisions-with-ancestor @@ -1455,4 +1486,5 @@ With optional NODE, goes to that node." (run-hooks 'ediff-load-hook) +;;; arch-tag: 97c71396-db02-4f41-8b48-6a51c3348fcc ;;; ediff.el ends here diff --git a/lisp/edmacro.el b/lisp/edmacro.el index 68e9f40a10..072b52fc8f 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -418,7 +418,7 @@ doubt, use whitespace." (while (memq (aref rest-mac i) (cdr mdigs)) (incf i)) (and (not (memq (aref rest-mac i) pkeys)) - (prog1 (concat "M-" (edmacro-subseq rest-mac 0 i) " ") + (prog1 (vconcat "M-" (edmacro-subseq rest-mac 0 i) " ") (callf edmacro-subseq rest-mac i))))) (and (eq (aref rest-mac 0) ?\C-u) (eq (key-binding [?\C-u]) 'universal-argument) @@ -437,7 +437,7 @@ doubt, use whitespace." '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9)) (incf i)) (and (not (memq (aref rest-mac i) pkeys)) - (prog1 (concat "C-u " (edmacro-subseq rest-mac 1 i) " ") + (prog1 (vconcat "C-u " (edmacro-subseq rest-mac 1 i) " ") (callf edmacro-subseq rest-mac i))))))) (bind-len (apply 'max 1 (loop for map in maps @@ -525,7 +525,8 @@ doubt, use whitespace." (t (error "Unrecognized item in macro: %s" ch))))) (or fkey key) " ")))) - (if prefix (setq desc (concat prefix desc))) + (if prefix + (setq desc (concat (edmacro-sanitize-for-string prefix) desc))) (unless (string-match " " desc) (let ((times 1) (pos bind-len)) (while (not (edmacro-mismatch rest-mac rest-mac @@ -608,6 +609,16 @@ If START or END is negative, it counts from the end." (setq i (1+ i) start (1+ start))) res)))))) +(defun edmacro-sanitize-for-string (seq) + "Convert a key sequence vector into a string. +The string represents the same events; Meta is indicated by bit 7. +This function assumes that the events can be stored in a string." + (setq seq (copy-sequence seq)) + (loop for i below (length seq) do + (when (< (aref seq i) 0) + (setf (aref seq i) (logand (aref seq i) 127)))) + seq) + (defun edmacro-fix-menu-commands (macro &optional noerror) (if (vectorp macro) (let (result) @@ -727,4 +738,5 @@ If START or END is negative, it counts from the end." (provide 'edmacro) +;;; arch-tag: 726807b4-3ae6-49de-b0ae-b9590973e0d7 ;;; edmacro.el ends here diff --git a/lisp/ehelp.el b/lisp/ehelp.el index 51ba11d4c8..12ebbeb0c0 100644 --- a/lisp/ehelp.el +++ b/lisp/ehelp.el @@ -426,4 +426,5 @@ will select it.)" (provide 'ehelp) +;;; arch-tag: e0e3037f-42c0-433e-ba18-322c5d951f46 ;;; ehelp.el ends here diff --git a/lisp/electric.el b/lisp/electric.el index 87a151b480..3d2bf140c8 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -1,6 +1,6 @@ ;;; electric.el --- window maker and Command loop for `electric' modes -;; Copyright (C) 1985, 1986, 1995 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1995, 2004 Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: FSF @@ -144,12 +144,12 @@ (buf (get-buffer buffer)) (one-window (one-window-p t)) (pop-up-windows t) + (pop-up-frames nil) (target-height) (lines)) (if (not buf) (error "Buffer %s does not exist" buffer) - (save-excursion - (set-buffer buf) + (with-current-buffer buf (setq lines (count-lines (point-min) (point-max))) (setq target-height (min (max (if max-height (min max-height (1+ lines)) (1+ lines)) @@ -160,7 +160,6 @@ (cond ((and (eq (window-buffer win) buf)) (select-window win)) (one-window - (goto-char (window-start win)) (pop-to-buffer buffer) (setq win (selected-window)) (enlarge-window (- target-height (window-height win)))) @@ -175,4 +174,5 @@ (provide 'electric) +;;; arch-tag: dae045eb-dc2d-4fb7-9f27-9cc2ce277be8 ;;; electric.el ends here diff --git a/lisp/elide-head.el b/lisp/elide-head.el index 8a5f62d0e5..8fc8e12a3f 100644 --- a/lisp/elide-head.el +++ b/lisp/elide-head.el @@ -119,4 +119,5 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks." (provide 'elide-head) +;;; arch-tag: a00e6b5b-6aeb-45b1-b734-63e23df80928 ;;; elide-head.el ends here diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index bc04780272..7686722c5b 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -1,6 +1,6 @@ ;;; advice.el --- an overloading mechanism for Emacs Lisp functions -;; Copyright (C) 1993,1994,2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1993,1994,2000,01,2004 Free Software Foundation, Inc. ;; Author: Hans Chalupsky ;; Maintainer: FSF @@ -2563,29 +2563,31 @@ supplied to make subr arglist lookup more efficient." Either use the one stored under the `ad-subr-arglist' property, or try to retrieve it from the docstring and cache it under that property, or otherwise use `(&rest ad-subr-args)'." - (cond ((ad-subr-args-defined-p subr-name) - (ad-get-subr-args subr-name)) - ;; says jwz: Should use this for Lemacs 19.8 and above: - ;;((fboundp 'subr-min-args) - ;; ...) - ;; says hans: I guess what Jamie means is that I should use the values - ;; of `subr-min-args' and `subr-max-args' to construct the subr arglist - ;; without having to look it up via parsing the docstring, e.g., - ;; values 1 and 2 would suggest `(arg1 &optional arg2)' as an - ;; argument list. However, that won't work because there is no - ;; way to distinguish a subr with args `(a &optional b &rest c)' from - ;; one with args `(a &rest c)' using that mechanism. Also, the argument - ;; names from the docstring are more meaningful. Hence, I'll stick with - ;; the old way of doing things. - (t (let ((doc (or (ad-real-documentation subr-name t) ""))) - (cond ((string-match "^\\(([^\)]+)\\)\n?\\'" doc) - (ad-define-subr-args - subr-name - (cdr (car (read-from-string - (downcase (match-string 1 doc)))))) - (ad-get-subr-args subr-name)) - ;; This is actually an error. - (t '(&rest ad-subr-args))))))) + (if (ad-subr-args-defined-p subr-name) + (ad-get-subr-args subr-name) + ;; says jwz: Should use this for Lemacs 19.8 and above: + ;;((fboundp 'subr-min-args) + ;; ...) + ;; says hans: I guess what Jamie means is that I should use the values + ;; of `subr-min-args' and `subr-max-args' to construct the subr arglist + ;; without having to look it up via parsing the docstring, e.g., + ;; values 1 and 2 would suggest `(arg1 &optional arg2)' as an + ;; argument list. However, that won't work because there is no + ;; way to distinguish a subr with args `(a &optional b &rest c)' from + ;; one with args `(a &rest c)' using that mechanism. Also, the argument + ;; names from the docstring are more meaningful. Hence, I'll stick with + ;; the old way of doing things. + (let ((doc (or (ad-real-documentation subr-name t) ""))) + (if (not (string-match "\n\n\\((.+)\\)\\'" doc)) + ;; Signalling an error leads to bugs during bootstrapping because + ;; the DOC file is not yet built (which is an error, BTW). + ;; (error "The usage info is missing from the subr %s" subr-name) + '(&rest ad-subr-args) + (ad-define-subr-args + subr-name + (cdr (car (read-from-string + (downcase (match-string 1 doc)))))) + (ad-get-subr-args subr-name))))) (defun ad-docstring (definition) "Return the unexpanded docstring of DEFINITION." @@ -3983,4 +3985,5 @@ Use only in REAL emergencies." (provide 'advice) +;;; arch-tag: 29f8c9a1-8c88-471f-95d7-e28541c6b7c0 ;;; advice.el ends here diff --git a/lisp/emacs-lisp/assoc.el b/lisp/emacs-lisp/assoc.el index 997badc173..42ce33ad7b 100644 --- a/lisp/emacs-lisp/assoc.el +++ b/lisp/emacs-lisp/assoc.el @@ -137,4 +137,5 @@ extra values are ignored. Returns the created alist." (provide 'assoc) +;;; arch-tag: 3e58bd89-d912-4b74-a0dc-6ed9735922bc ;;; assoc.el ends here diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 325d3903e8..3d0936a8c4 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el @@ -60,7 +60,7 @@ files.") ("Eric S. Raymond" "Eric Raymond") ("Eric Youngdale" "(Eric Youngdale at youngdale@v6550c.nrl.navy.mil)") ("Fran,Ag(Bois Pinard" "Francois Pinard") - ("Francesco Potorti" "Francesco Potorti`") + ("Francesco Potort,Al(B" "Francesco Potorti" "Francesco Potorti`") ("Frederic Pierresteguy" "Fred Pierresteguy") ("Geoff Voelker" "voelker") ("Hallvard B. Furuseth" "Hallvard B Furuseth") @@ -638,4 +638,5 @@ the Emacs source tree, from which to build the file." (authors root) (write-file file))) +;;; arch-tag: 659d5900-5ff2-43b0-954c-a315cc1e4dc1 ;;; authors.el ends here diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 7aafeb3beb..43da3d0982 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -567,4 +567,5 @@ Calls `update-directory-autoloads' on the command line arguments." (provide 'autoload) +;;; arch-tag: 00244766-98f4-4767-bf42-8a22103441c6 ;;; autoload.el ends here diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el index eafa63d6e3..6a2baeb3fe 100644 --- a/lisp/emacs-lisp/backquote.el +++ b/lisp/emacs-lisp/backquote.el @@ -1,6 +1,6 @@ ;;; backquote.el --- implement the ` Lisp construct -;;; Copyright (C) 1990, 1992, 1994, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 92, 1994, 2001, 2004 Free Software Foundation, Inc. ;; Author: Rick Sladkey ;; Maintainer: FSF @@ -44,6 +44,9 @@ "Like `list' but the last argument is the tail of the new list. For example (backquote-list* 'a 'b 'c) => (a b . c)" + ;; The recursive solution is much nicer: + ;; (if list (cons first (apply 'backquote-list*-function list)) first)) + ;; but Emacs is not very good at efficiently processing recursion. (if list (let* ((rest list) (newlist (cons first nil)) (last newlist)) (while (cdr rest) @@ -58,7 +61,10 @@ For example (backquote-list* 'a 'b 'c) => (a b . c)" "Like `list' but the last argument is the tail of the new list. For example (backquote-list* 'a 'b 'c) => (a b . c)" - (setq list (reverse (cons first list)) + ;; The recursive solution is much nicer: + ;; (if list (list 'cons first (cons 'backquote-list*-macro list)) first)) + ;; but Emacs is not very good at efficiently processing such things. + (setq list (nreverse (cons first list)) first (car list) list (cdr list)) (if list @@ -214,4 +220,5 @@ Vectors work just like lists. Nested backquotes are permitted." tail)) (t (cons 'list heads))))) +;;; arch-tag: 1a26206a-6b5e-4c56-8e24-2eef0f7e0e7a ;;; backquote.el ends here diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el index cc8a7bf96f..acf9806c51 100644 --- a/lisp/emacs-lisp/benchmark.el +++ b/lisp/emacs-lisp/benchmark.el @@ -114,4 +114,6 @@ non-interactive use see also `benchmark-run' and (nth 2 result) (nth 1 result))))) (provide 'benchmark) + +;;; arch-tag: be570e24-4b51-4784-adf3-fa2b56c31946 ;;; benchmark.el ends here diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index 312d4b386b..d8b4b4f6c1 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -619,4 +619,5 @@ If optional second arg SEP is a string, use that as separator." (provide 'bindat) +;;; arch-tag: 5e6708c3-03e2-4ad7-9885-5041b779c3fb ;;; bindat.el ends here diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 47cbec1fbc..825df2526c 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1,6 +1,6 @@ ;;; byte-opt.el --- the optimization passes of the emacs-lisp byte compiler -;;; Copyright (c) 1991, 1994, 2000, 2001, 2002 Free Software Foundation, Inc. +;; Copyright (c) 1991,1994,2000,01,02,2004 Free Software Foundation, Inc. ;; Author: Jamie Zawinski ;; Hallvard Furuseth @@ -148,37 +148,37 @@ ;; Other things to consider: -;;;;; Associative math should recognize subcalls to identical function: -;;;(disassemble (lambda (x) (+ (+ (foo) 1) (+ (bar) 2)))) -;;;;; This should generate the same as (1+ x) and (1- x) - -;;;(disassemble (lambda (x) (cons (+ x 1) (- x 1)))) -;;;;; An awful lot of functions always return a non-nil value. If they're -;;;;; error free also they may act as true-constants. - -;;;(disassemble (lambda (x) (and (point) (foo)))) -;;;;; When -;;;;; - all but one arguments to a function are constant -;;;;; - the non-constant argument is an if-expression (cond-expression?) -;;;;; then the outer function can be distributed. If the guarding -;;;;; condition is side-effect-free [assignment-free] then the other -;;;;; arguments may be any expressions. Since, however, the code size -;;;;; can increase this way they should be "simple". Compare: - -;;;(disassemble (lambda (x) (eq (if (point) 'a 'b) 'c))) -;;;(disassemble (lambda (x) (if (point) (eq 'a 'c) (eq 'b 'c)))) - -;;;;; (car (cons A B)) -> (progn B A) -;;;(disassemble (lambda (x) (car (cons (foo) 42)))) - -;;;;; (cdr (cons A B)) -> (progn A B) -;;;(disassemble (lambda (x) (cdr (cons 42 (foo))))) - -;;;;; (car (list A B ...)) -> (progn B ... A) -;;;(disassemble (lambda (x) (car (list (foo) 42 (bar))))) - -;;;;; (cdr (list A B ...)) -> (progn A (list B ...)) -;;;(disassemble (lambda (x) (cdr (list 42 (foo) (bar))))) +;; ;; Associative math should recognize subcalls to identical function: +;; (disassemble (lambda (x) (+ (+ (foo) 1) (+ (bar) 2)))) +;; ;; This should generate the same as (1+ x) and (1- x) + +;; (disassemble (lambda (x) (cons (+ x 1) (- x 1)))) +;; ;; An awful lot of functions always return a non-nil value. If they're +;; ;; error free also they may act as true-constants. + +;; (disassemble (lambda (x) (and (point) (foo)))) +;; ;; When +;; ;; - all but one arguments to a function are constant +;; ;; - the non-constant argument is an if-expression (cond-expression?) +;; ;; then the outer function can be distributed. If the guarding +;; ;; condition is side-effect-free [assignment-free] then the other +;; ;; arguments may be any expressions. Since, however, the code size +;; ;; can increase this way they should be "simple". Compare: + +;; (disassemble (lambda (x) (eq (if (point) 'a 'b) 'c))) +;; (disassemble (lambda (x) (if (point) (eq 'a 'c) (eq 'b 'c)))) + +;; ;; (car (cons A B)) -> (prog1 A B) +;; (disassemble (lambda (x) (car (cons (foo) 42)))) + +;; ;; (cdr (cons A B)) -> (progn A B) +;; (disassemble (lambda (x) (cdr (cons 42 (foo))))) + +;; ;; (car (list A B ...)) -> (prog1 A B ...) +;; (disassemble (lambda (x) (car (list (foo) 42 (bar))))) + +;; ;; (cdr (list A B ...)) -> (progn A (list B ...)) +;; (disassemble (lambda (x) (cdr (list 42 (foo) (bar))))) ;;; Code: @@ -217,10 +217,8 @@ args))))) (defmacro byte-compile-log-lap (format-string &rest args) - (list 'and - '(memq byte-optimize-log '(t byte)) - (cons 'byte-compile-log-lap-1 - (cons format-string args)))) + `(and (memq byte-optimize-log '(t byte)) + (byte-compile-log-lap-1 ,format-string ,@args))) ;;; byte-compile optimizers to support inlining @@ -274,18 +272,18 @@ (let (string) (fetch-bytecode fn) (setq string (aref fn 1)) + ;; Isn't it an error for `string' not to be unibyte?? --stef (if (fboundp 'string-as-unibyte) (setq string (string-as-unibyte string))) - (cons (list 'lambda (aref fn 0) - (list 'byte-code string (aref fn 2) (aref fn 3))) + (cons `(lambda ,(aref fn 0) + (byte-code ,string ,(aref fn 2) ,(aref fn 3))) (cdr form))) (if (eq (car-safe fn) 'lambda) (cons fn (cdr form)) ;; Give up on inlining. form)))))) -;;; ((lambda ...) ...) -;;; +;; ((lambda ...) ...) (defun byte-compile-unfold-lambda (form &optional name) (or name (setq name "anonymous lambda")) (let ((lambda (car form)) @@ -604,14 +602,14 @@ (nreverse result))) -;;; some source-level optimizers -;;; -;;; when writing optimizers, be VERY careful that the optimizer returns -;;; something not EQ to its argument if and ONLY if it has made a change. -;;; This implies that you cannot simply destructively modify the list; -;;; you must return something not EQ to it if you make an optimization. -;;; -;;; It is now safe to optimize code such that it introduces new bindings. +;; some source-level optimizers +;; +;; when writing optimizers, be VERY careful that the optimizer returns +;; something not EQ to its argument if and ONLY if it has made a change. +;; This implies that you cannot simply destructively modify the list; +;; you must return something not EQ to it if you make an optimization. +;; +;; It is now safe to optimize code such that it introduces new bindings. ;; I'd like this to be a defsubst, but let's not be self-referential... (defmacro byte-compile-trueconstp (form) @@ -721,10 +719,10 @@ (condition-case () (eval form) (error form))) -;;; It is not safe to delete the function entirely -;;; (actually, it would be safe if we know the sole arg -;;; is not a marker). -;; ((null (cdr (cdr form))) (nth 1 form)) +;;; It is not safe to delete the function entirely +;;; (actually, it would be safe if we know the sole arg +;;; is not a marker). +;;; ((null (cdr (cdr form))) (nth 1 form)) ((null (cddr form)) (if (numberp (nth 1 form)) (nth 1 form) @@ -763,9 +761,9 @@ (numberp last)) (setq form (nconc (list '- (- (nth 1 form) last) (nth 2 form)) (delq last (copy-sequence (nthcdr 3 form)))))))) -;;; It is not safe to delete the function entirely -;;; (actually, it would be safe if we know the sole arg -;;; is not a marker). +;;; It is not safe to delete the function entirely +;;; (actually, it would be safe if we know the sole arg +;;; is not a marker). ;;; (if (eq (nth 2 form) 0) ;;; (nth 1 form) ; (- x 0) --> x (byte-optimize-predicate @@ -780,9 +778,9 @@ (setq form (byte-optimize-delay-constants-math form 1 '*)) ;; If there is a constant in FORM, it is now the last element. (cond ((null (cdr form)) 1) -;;; It is not safe to delete the function entirely -;;; (actually, it would be safe if we know the sole arg -;;; is not a marker or if it appears in other arithmetic). +;;; It is not safe to delete the function entirely +;;; (actually, it would be safe if we know the sole arg +;;; is not a marker or if it appears in other arithmetic). ;;; ((null (cdr (cdr form))) (nth 1 form)) ((let ((last (car (reverse form)))) (cond ((eq 0 last) (cons 'progn (cdr form))) @@ -1117,8 +1115,16 @@ (byte-optimize-predicate form)) form)) -(put 'concat 'byte-optimizer 'byte-optimize-concat) -(defun byte-optimize-concat (form) +(put 'concat 'byte-optimizer 'byte-optimize-pure-func) +(put 'symbol-name 'byte-optimizer 'byte-optimize-pure-func) +(put 'regexp-opt 'byte-optimizer 'byte-optimize-pure-func) +(put 'regexp-quote 'byte-optimizer 'byte-optimize-pure-func) +(defun byte-optimize-pure-func (form) + "Do constant folding for pure functions. +This assumes that the function will not have any side-effects and that +its return value depends solely on its arguments. +If the function can signal an error, this might change the semantics +of FORM by signalling the error at compile-time." (let ((args (cdr form)) (constant t)) (while (and args constant) @@ -1181,28 +1187,28 @@ `(progn ,(cadr form) (setq ,(cadr var) ,@(cddr form)))) (t form)))) -;;; enumerating those functions which need not be called if the returned -;;; value is not used. That is, something like -;;; (progn (list (something-with-side-effects) (yow)) -;;; (foo)) -;;; may safely be turned into -;;; (progn (progn (something-with-side-effects) (yow)) -;;; (foo)) -;;; Further optimizations will turn (progn (list 1 2 3) 'foo) into 'foo. - -;;; Some of these functions have the side effect of allocating memory -;;; and it would be incorrect to replace two calls with one. -;;; But we don't try to do those kinds of optimizations, -;;; so it is safe to list such functions here. -;;; Some of these functions return values that depend on environment -;;; state, so that constant folding them would be wrong, -;;; but we don't do constant folding based on this list. - -;;; However, at present the only optimization we normally do -;;; is delete calls that need not occur, and we only do that -;;; with the error-free functions. - -;;; I wonder if I missed any :-\) +;; enumerating those functions which need not be called if the returned +;; value is not used. That is, something like +;; (progn (list (something-with-side-effects) (yow)) +;; (foo)) +;; may safely be turned into +;; (progn (progn (something-with-side-effects) (yow)) +;; (foo)) +;; Further optimizations will turn (progn (list 1 2 3) 'foo) into 'foo. + +;; Some of these functions have the side effect of allocating memory +;; and it would be incorrect to replace two calls with one. +;; But we don't try to do those kinds of optimizations, +;; so it is safe to list such functions here. +;; Some of these functions return values that depend on environment +;; state, so that constant folding them would be wrong, +;; but we don't do constant folding based on this list. + +;; However, at present the only optimization we normally do +;; is delete calls that need not occur, and we only do that +;; with the error-free functions. + +;; I wonder if I missed any :-\) (let ((side-effect-free-fns '(% * + - / /= 1+ 1- < <= = > >= abs acos append aref ash asin atan assoc assq @@ -1303,8 +1309,8 @@ (defconst byte-constref-ops '(byte-constant byte-constant2 byte-varref byte-varset byte-varbind)) -;;; This function extracts the bitfields from variable-length opcodes. -;;; Originally defined in disass.el (which no longer uses it.) +;; This function extracts the bitfields from variable-length opcodes. +;; Originally defined in disass.el (which no longer uses it.) (defun disassemble-offset () "Don't call this!" @@ -1341,11 +1347,11 @@ (aref bytes ptr)))) -;;; This de-compiler is used for inline expansion of compiled functions, -;;; and by the disassembler. -;;; -;;; This list contains numbers, which are pc values, -;;; before each instruction. +;; This de-compiler is used for inline expansion of compiled functions, +;; and by the disassembler. +;; +;; This list contains numbers, which are pc values, +;; before each instruction. (defun byte-decompile-bytecode (bytes constvec) "Turns BYTECODE into lapcode, referring to CONSTVEC." (let ((byte-compile-constants nil) @@ -1466,38 +1472,39 @@ byte-member byte-assq byte-quo byte-rem) byte-compile-side-effect-and-error-free-ops)) -;;; This crock is because of the way DEFVAR_BOOL variables work. -;;; Consider the code -;;; -;;; (defun foo (flag) -;;; (let ((old-pop-ups pop-up-windows) -;;; (pop-up-windows flag)) -;;; (cond ((not (eq pop-up-windows old-pop-ups)) -;;; (setq old-pop-ups pop-up-windows) -;;; ...)))) -;;; -;;; Uncompiled, old-pop-ups will always be set to nil or t, even if FLAG is -;;; something else. But if we optimize -;;; -;;; varref flag -;;; varbind pop-up-windows -;;; varref pop-up-windows -;;; not -;;; to -;;; varref flag -;;; dup -;;; varbind pop-up-windows -;;; not -;;; -;;; we break the program, because it will appear that pop-up-windows and -;;; old-pop-ups are not EQ when really they are. So we have to know what -;;; the BOOL variables are, and not perform this optimization on them. - -;;; The variable `byte-boolean-vars' is now primitive and updated -;;; automatically by DEFVAR_BOOL. +;; This crock is because of the way DEFVAR_BOOL variables work. +;; Consider the code +;; +;; (defun foo (flag) +;; (let ((old-pop-ups pop-up-windows) +;; (pop-up-windows flag)) +;; (cond ((not (eq pop-up-windows old-pop-ups)) +;; (setq old-pop-ups pop-up-windows) +;; ...)))) +;; +;; Uncompiled, old-pop-ups will always be set to nil or t, even if FLAG is +;; something else. But if we optimize +;; +;; varref flag +;; varbind pop-up-windows +;; varref pop-up-windows +;; not +;; to +;; varref flag +;; dup +;; varbind pop-up-windows +;; not +;; +;; we break the program, because it will appear that pop-up-windows and +;; old-pop-ups are not EQ when really they are. So we have to know what +;; the BOOL variables are, and not perform this optimization on them. + +;; The variable `byte-boolean-vars' is now primitive and updated +;; automatically by DEFVAR_BOOL. (defun byte-optimize-lapcode (lap &optional for-effect) - "Simple peephole optimizer. LAP is both modified and returned." + "Simple peephole optimizer. LAP is both modified and returned. +If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." (let (lap0 lap1 lap2 @@ -2030,4 +2037,5 @@ byte-optimize-lapcode)))) nil) +;;; arch-tag: 0f14076b-737e-4bef-aae6-908826ec1ff1 ;;; byte-opt.el ends here diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index a28f89cd91..9956d5003c 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -1,6 +1,6 @@ ;;; byte-run.el --- byte-compiler support for inlining -;; Copyright (C) 1992 Free Software Foundation, Inc. +;; Copyright (C) 1992, 2004 Free Software Foundation, Inc. ;; Author: Jamie Zawinski ;; Hallvard Furuseth @@ -67,14 +67,14 @@ ;; This has a special byte-hunk-handler in bytecomp.el. (defmacro defsubst (name arglist &rest body) "Define an inline function. The syntax is just like that of `defun'." + (declare (debug defun)) (or (memq (get name 'byte-optimizer) '(nil byte-compile-inline-expand)) (error "`%s' is a primitive" name)) - (list 'prog1 - (cons 'defun (cons name (cons arglist body))) - (list 'eval-and-compile - (list 'put (list 'quote name) - ''byte-optimizer ''byte-compile-inline-expand)))) + `(prog1 + (defun ,name ,arglist ,@body) + (eval-and-compile + (put ',name 'byte-optimizer 'byte-compile-inline-expand)))) (defun make-obsolete (fn new &optional when) "Make the byte-compiler warn that FUNCTION is obsolete. @@ -91,9 +91,9 @@ was first made obsolete, for example a date or a release number." fn) (defun make-obsolete-variable (var new &optional when) - "Make the byte-compiler warn that VARIABLE is obsolete, -and NEW should be used instead. If NEW is a string, then that is the -`use instead' message. + "Make the byte-compiler warn that VARIABLE is obsolete. +The warning will say that NEW should be used instead. +If NEW is a string, that is the `use instead' message. If provided, WHEN should be a string indicating when the variable was first made obsolete, for example a date or a release number." (interactive @@ -109,6 +109,7 @@ was first made obsolete, for example a date or a release number." (defmacro dont-compile (&rest body) "Like `progn', but the body always runs interpreted (not compiled). If you think you need this, you're probably making a mistake somewhere." + (declare (debug t)) (list 'eval (list 'quote (if (cdr body) (cons 'progn body) (car body))))) @@ -121,6 +122,7 @@ If you think you need this, you're probably making a mistake somewhere." (defmacro eval-when-compile (&rest body) "Like `progn', but evaluates the body at compile time. The result of the body appears to the compiler as a quoted constant." + (declare (debug t)) ;; Not necessary because we have it in b-c-initial-macro-environment ;; (list 'quote (eval (cons 'progn body))) (cons 'progn body)) @@ -128,6 +130,7 @@ The result of the body appears to the compiler as a quoted constant." (put 'eval-and-compile 'lisp-indent-hook 0) (defmacro eval-and-compile (&rest body) "Like `progn', but evaluates the body at compile time and at load time." + (declare (debug t)) ;; Remember, it's magic. (cons 'progn body)) @@ -169,4 +172,5 @@ The result of the body appears to the compiler as a quoted constant." ;; (file-format emacs19))" ;; nil) +;;; arch-tag: 76f8328a-1f66-4df2-9b6d-5c3666dc05e9 ;;; byte-run.el ends here diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index b9c864a679..3e3bfe2a07 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1,6 +1,6 @@ ;;; bytecomp.el --- compilation of Lisp code into byte code -;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1998, 2000, 2001, 2002, 2003 +;; Copyright (C) 1985,86,87,92,94,1998,2000,01,02,03,2004 ;; Free Software Foundation, Inc. ;; Author: Jamie Zawinski @@ -8,10 +8,6 @@ ;; Maintainer: FSF ;; Keywords: lisp -;;; This version incorporates changes up to version 2.10 of the -;;; Zawinski-Furuseth compiler. -(defconst byte-compile-version "$Revision: 2.134 $") - ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify @@ -75,7 +71,7 @@ ;; User customization variables: ;; ;; byte-compile-verbose Whether to report the function currently being -;; compiled in the minibuffer; +;; compiled in the echo area; ;; byte-optimize Whether to do optimizations; this may be ;; t, nil, 'source, or 'byte; ;; byte-optimize-log Whether to report (in excruciating detail) @@ -130,7 +126,7 @@ ;; (baz 0)) ;; ;; o It is possible to open-code a function in the same file it is defined -;; in without having to load that file before compiling it. the +;; in without having to load that file before compiling it. The ;; byte-compiler has been modified to remember function definitions in ;; the compilation environment in the same way that it remembers macro ;; definitions. @@ -251,7 +247,9 @@ if you change this variable." :type 'boolean) (defcustom byte-compile-compatibility nil - "*Non-nil means generate output that can run in Emacs 18." + "*Non-nil means generate output that can run in Emacs 18. +This only means that it can run in principle, if it doesn't require +facilities that have been added more recently." :group 'bytecomp :type 'boolean) @@ -351,6 +349,9 @@ Elements of the list may be be: (const callargs) (const redefine) (const obsolete) (const noruntime) (const cl-functions)))) +(defvar byte-compile-not-obsolete-var nil + "If non-nil, this is a variable that shouldn't be reported as obsolete.") + (defcustom byte-compile-generate-call-tree nil "*Non-nil means collect call-graph information when compiling. This records functions were called and from where. @@ -441,6 +442,11 @@ Each element looks like (FUNCTIONNAME . DEFINITION). It is Used for warnings when the function is not known to be defined or is later defined with incorrect args.") +(defvar byte-compile-noruntime-functions nil + "Alist of functions called that may not be defined when the compiled code is run. +Used for warnings about calling a function that is defined during compilation +but won't necessarily be defined when the compiled file is loaded.") + (defvar byte-compile-tag-number 0) (defvar byte-compile-output nil "Alist describing contents to put in byte code string. @@ -773,7 +779,7 @@ otherwise pop it") (defun byte-compile-eval (form) "Eval FORM and mark the functions defined therein. -Each function's symbol gets marked with the `byte-compile-noruntime' property." +Each function's symbol gets added to `byte-compile-noruntime-functions'." (let ((hist-orig load-history) (hist-nil-orig current-load-list)) (prog1 (eval form) @@ -791,17 +797,17 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." (cond ((symbolp s) (unless (memq s old-autoloads) - (put s 'byte-compile-noruntime t))) + (push s byte-compile-noruntime-functions))) ((and (consp s) (eq t (car s))) (push (cdr s) old-autoloads)) ((and (consp s) (eq 'autoload (car s))) - (put (cdr s) 'byte-compile-noruntime t))))))) + (push (cdr s) byte-compile-noruntime-functions))))))) ;; Go through current-load-list for the locally defined funs. (let (old-autoloads) (while (and hist-nil-new (not (eq hist-nil-new hist-nil-orig))) (let ((s (pop hist-nil-new))) (when (and (symbolp s) (not (memq s old-autoloads))) - (put s 'byte-compile-noruntime t)) + (push s byte-compile-noruntime-functions)) (when (and (consp s) (eq t (car s))) (push (cdr s) old-autoloads)))))))))) @@ -926,7 +932,7 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." (when (or (and byte-compile-current-file (not (equal byte-compile-current-file byte-compile-last-logged-file))) - (and byte-compile-last-warned-form + (and byte-compile-current-form (not (eq byte-compile-current-form byte-compile-last-warned-form)))) (insert (format "\nIn %s:\n" form))) @@ -972,7 +978,8 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." (setq default-directory dir) (unless was-same (insert (format "Entering directory `%s'\n" default-directory)))) - (setq byte-compile-last-logged-file byte-compile-current-file) + (setq byte-compile-last-logged-file byte-compile-current-file + byte-compile-last-warned-form nil) ;; Do this after setting default-directory. (unless (eq major-mode 'compilation-mode) (compilation-mode)) @@ -982,7 +989,7 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." ;; Also log the current function and file if not already done. (defun byte-compile-log-warning (string &optional fill level) (let ((warning-prefix-function 'byte-compile-warning-prefix) - (warning-group-format "") + (warning-type-format "") (warning-fill-prefix (if fill " "))) (display-warning 'bytecomp string level "*Compile-Log*"))) @@ -1166,10 +1173,11 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." "requires" "accepts only") (byte-compile-arglist-signature-string sig)))) + (byte-compile-format-warn form) ;; Check to see if the function will be available at runtime ;; and/or remember its arity if it's unknown. (or (and (or sig (fboundp (car form))) ; might be a subr or autoload. - (not (get (car form) 'byte-compile-noruntime))) + (not (memq (car form) byte-compile-noruntime-functions))) (eq (car form) byte-compile-current-form) ; ## this doesn't work ; with recursion. ;; It's a currently-undefined function. @@ -1183,6 +1191,32 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." (cons (list (car form) n) byte-compile-unresolved-functions))))))) +(defun byte-compile-format-warn (form) + "Warn if FORM is `format'-like with inconsistent args. +Applies if head of FORM is a symbol with non-nil property +`byte-compile-format-like' and first arg is a constant string. +Then check the number of format fields matches the number of +extra args." + (when (and (symbolp (car form)) + (stringp (nth 1 form)) + (get (car form) 'byte-compile-format-like)) + (let ((nfields (with-temp-buffer + (insert (nth 1 form)) + (goto-char 1) + (let ((n 0)) + (while (re-search-forward "%." nil t) + (unless (eq ?% (char-after (1+ (match-beginning 0)))) + (setq n (1+ n)))) + n))) + (nargs (- (length form) 2))) + (unless (= nargs nfields) + (byte-compile-warn + "`%s' called with %d args to fill %d format field(s)" (car form) + nargs nfields))))) + +(dolist (elt '(format message error)) + (put elt 'byte-compile-format-like t)) + ;; Warn if the function or macro is being redefined with a different ;; number of arguments. (defun byte-compile-arglist-warn (form macrop) @@ -1250,7 +1284,7 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." (let ((func (car-safe form))) (if (and byte-compile-cl-functions (memq func byte-compile-cl-functions) - ;; Aliases which won't have been expended at this point. + ;; Aliases which won't have been expanded at this point. ;; These aren't all aliases of subrs, so not trivial to ;; avoid hardwiring the list. (not (memq func @@ -1455,7 +1489,8 @@ recompile every `.el' file that already has a `.elc' file." source dest) (dolist (file files) (setq source (expand-file-name file directory)) - (if (and (not (member file '("." ".." "RCS" "CVS"))) + (if (and (not (member file '("RCS" "CVS"))) + (not (eq ?\. (aref file 0))) (file-directory-p source) (not (file-symlink-p source))) ;; This file is a subdirectory. Handle them differently. @@ -1573,11 +1608,14 @@ The value is non-nil if there were no errors, nil if errors." ;; compile this file. (if (with-current-buffer input-buffer no-byte-compile) (progn - (message "%s not compiled because of `no-byte-compile: %s'" - (file-relative-name filename) - (with-current-buffer input-buffer no-byte-compile)) - (if (file-exists-p target-file) - (condition-case nil (delete-file target-file) (error nil))) + ;; (message "%s not compiled because of `no-byte-compile: %s'" + ;; (file-relative-name filename) + ;; (with-current-buffer input-buffer no-byte-compile)) + (when (file-exists-p target-file) + (message "%s deleted because of `no-byte-compile: %s'" + (file-relative-name target-file) + (buffer-local-value 'no-byte-compile input-buffer)) + (condition-case nil (delete-file target-file) (error nil))) ;; We successfully didn't compile this file. 'no-byte-compile) (when byte-compile-verbose @@ -1654,7 +1692,7 @@ The value is non-nil if there were no errors, nil if errors." ;;;###autoload (defun compile-defun (&optional arg) "Compile and evaluate the current top-level form. -Print the result in the minibuffer. +Print the result in the echo area. With argument, insert value in current buffer after the form." (interactive "P") (save-excursion @@ -1818,10 +1856,7 @@ With argument, insert value in current buffer after the form." " on " (current-time-string) "\n;;; from file " filename "\n") (insert ";;; in Emacs version " emacs-version "\n") - (insert ";;; with bytecomp version " - (progn (string-match "[0-9.]+" byte-compile-version) - (match-string 0 byte-compile-version)) - "\n;;; " + (insert ";;; " (cond ((eq byte-optimize 'source) "with source-level optimization only") ((eq byte-optimize 'byte) "with byte-level optimization only") @@ -2449,17 +2484,19 @@ If FORM is a lambda or a macro, byte-compile it as a function." (if (cdr (cdr int)) (byte-compile-warn "malformed interactive spec: %s" (prin1-to-string int))) - ;; If the interactive spec is a call to `list', - ;; don't compile it, because `call-interactively' - ;; looks at the args of `list'. + ;; If the interactive spec is a call to `list', don't + ;; compile it, because `call-interactively' looks at the + ;; args of `list'. Actually, compile it to get warnings, + ;; but don't use the result. (let ((form (nth 1 int))) (while (memq (car-safe form) '(let let* progn save-excursion)) (while (consp (cdr form)) (setq form (cdr form))) (setq form (car form))) - (or (eq (car-safe form) 'list) - (setq int (list 'interactive - (byte-compile-top-level (nth 1 int))))))) + (if (eq (car-safe form) 'list) + (byte-compile-top-level (nth 1 int)) + (setq int (list 'interactive + (byte-compile-top-level (nth 1 int))))))) ((cdr int) (byte-compile-warn "malformed interactive spec: %s" (prin1-to-string int))))) @@ -2705,7 +2742,8 @@ If FORM is a lambda or a macro, byte-compile it as a function." (if (symbolp var) "constant" "nonvariable") (prin1-to-string var)) (if (and (get var 'byte-obsolete-variable) - (memq 'obsolete byte-compile-warnings)) + (memq 'obsolete byte-compile-warnings) + (not (eq var byte-compile-not-obsolete-var))) (let* ((ob (get var 'byte-obsolete-variable)) (when (cdr ob))) (byte-compile-warn "%s is an obsolete variable%s; %s" var @@ -2735,7 +2773,8 @@ If FORM is a lambda or a macro, byte-compile it as a function." (defmacro byte-compile-get-constant (const) `(or (if (stringp ,const) - (assoc ,const byte-compile-constants) + (assoc-default ,const byte-compile-constants + 'equal-including-properties nil) (assq ,const byte-compile-constants)) (car (setq byte-compile-constants (cons (list ,const) byte-compile-constants))))) @@ -3262,51 +3301,55 @@ If FORM is a lambda or a macro, byte-compile it as a function." (if ,discard 'byte-goto-if-nil 'byte-goto-if-nil-else-pop)) ,tag)) +(defmacro byte-compile-maybe-guarded (condition &rest body) + "Execute forms in BODY, potentially guarded by CONDITION. +CONDITION is the test in an `if' form or in a `cond' clause. +BODY is to compile the first arm of the if or the body of the +cond clause. If CONDITION is of the form `(foundp 'foo)' +or `(boundp 'foo)', the relevant warnings from BODY about foo +being undefined will be suppressed." + (declare (indent 1) (debug t)) + `(let* ((fbound + (if (eq 'fboundp (car-safe ,condition)) + (and (eq 'quote (car-safe (nth 1 ,condition))) + ;; Ignore if the symbol is already on the + ;; unresolved list. + (not (assq (nth 1 (nth 1 ,condition)) ; the relevant symbol + byte-compile-unresolved-functions)) + (nth 1 (nth 1 ,condition))))) + (bound (if (or (eq 'boundp (car-safe ,condition)) + (eq 'default-boundp (car-safe ,condition))) + (and (eq 'quote (car-safe (nth 1 ,condition))) + (nth 1 (nth 1 ,condition))))) + ;; Maybe add to the bound list. + (byte-compile-bound-variables + (if bound + (cons bound byte-compile-bound-variables) + byte-compile-bound-variables))) + (progn ,@body) + ;; Maybe remove the function symbol from the unresolved list. + (if fbound + (setq byte-compile-unresolved-functions + (delq (assq fbound byte-compile-unresolved-functions) + byte-compile-unresolved-functions))))) + (defun byte-compile-if (form) (byte-compile-form (car (cdr form))) ;; Check whether we have `(if (fboundp ...' or `(if (boundp ...' ;; and avoid warnings about the relevent symbols in the consequent. - (let* ((clause (nth 1 form)) - (fbound (if (eq 'fboundp (car-safe clause)) - (and (eq 'quote (car-safe (nth 1 clause))) - ;; Ignore if the symbol is already on the - ;; unresolved list. - (not (assq - (nth 1 (nth 1 clause)) ; the relevant symbol - byte-compile-unresolved-functions)) - (nth 1 (nth 1 clause))))) - (bound (if (eq 'boundp (car-safe clause)) - (and (eq 'quote (car-safe (nth 1 clause))) - (nth 1 (nth 1 clause))))) - (donetag (byte-compile-make-tag))) + (let ((clause (nth 1 form)) + (donetag (byte-compile-make-tag))) (if (null (nthcdr 3 form)) ;; No else-forms (progn (byte-compile-goto-if nil for-effect donetag) - ;; Maybe add to the bound list. - (let ((byte-compile-bound-variables - (if bound - (cons bound byte-compile-bound-variables) - byte-compile-bound-variables))) + (byte-compile-maybe-guarded clause (byte-compile-form (nth 2 form) for-effect)) - ;; Maybe remove the function symbol from the unresolved list. - (if fbound - (setq byte-compile-unresolved-functions - (delq (assq fbound byte-compile-unresolved-functions) - byte-compile-unresolved-functions))) (byte-compile-out-tag donetag)) (let ((elsetag (byte-compile-make-tag))) (byte-compile-goto 'byte-goto-if-nil elsetag) - ;; As above for the first form. - (let ((byte-compile-bound-variables - (if bound - (cons bound byte-compile-bound-variables) - byte-compile-bound-variables))) - (byte-compile-form (nth 2 form) for-effect)) - (if fbound - (setq byte-compile-unresolved-functions - (delq (assq fbound byte-compile-unresolved-functions) - byte-compile-unresolved-functions))) + (byte-compile-maybe-guarded clause + (byte-compile-form (nth 2 form) for-effect)) (byte-compile-goto 'byte-goto donetag) (byte-compile-out-tag elsetag) (byte-compile-body (cdr (cdr (cdr form))) for-effect) @@ -3329,17 +3372,20 @@ If FORM is a lambda or a macro, byte-compile it as a function." (if (null (cdr clause)) ;; First clause is a singleton. (byte-compile-goto-if t for-effect donetag) - (setq nexttag (byte-compile-make-tag)) - (byte-compile-goto 'byte-goto-if-nil nexttag) - (byte-compile-body (cdr clause) for-effect) - (byte-compile-goto 'byte-goto donetag) - (byte-compile-out-tag nexttag))))) + (setq nexttag (byte-compile-make-tag)) + (byte-compile-goto 'byte-goto-if-nil nexttag) + (byte-compile-maybe-guarded (car clause) + (byte-compile-body (cdr clause) for-effect)) + (byte-compile-goto 'byte-goto donetag) + (byte-compile-out-tag nexttag))))) ;; Last clause - (and (cdr clause) (not (eq (car clause) t)) - (progn (byte-compile-form (car clause)) - (byte-compile-goto-if nil for-effect donetag) - (setq clause (cdr clause)))) - (byte-compile-body-do-effect clause) + (let ((guard (car clause))) + (and (cdr clause) (not (eq guard t)) + (progn (byte-compile-form guard) + (byte-compile-goto-if nil for-effect donetag) + (setq clause (cdr clause)))) + (byte-compile-maybe-guarded guard + (byte-compile-body-do-effect clause))) (byte-compile-out-tag donetag))) (defun byte-compile-and (form) @@ -3610,13 +3656,14 @@ If FORM is a lambda or a macro, byte-compile it as a function." fun var string)) `(put ',var 'variable-documentation ,string)) (if (cddr form) ; `value' provided - (if (eq fun 'defconst) - ;; `defconst' sets `var' unconditionally. - (let ((tmp (make-symbol "defconst-tmp-var"))) - `(funcall '(lambda (,tmp) (defconst ,var ,tmp)) - ,value)) - ;; `defvar' sets `var' only when unbound. - `(if (not (default-boundp ',var)) (setq-default ,var ,value))) + (let ((byte-compile-not-obsolete-var var)) + (if (eq fun 'defconst) + ;; `defconst' sets `var' unconditionally. + (let ((tmp (make-symbol "defconst-tmp-var"))) + `(funcall '(lambda (,tmp) (defconst ,var ,tmp)) + ,value)) + ;; `defvar' sets `var' only when unbound. + `(if (not (default-boundp ',var)) (setq-default ,var ,value)))) (when (eq fun 'defconst) ;; This will signal an appropriate error at runtime. `(eval ',form))) @@ -3921,27 +3968,29 @@ already up-to-date." (kill-emacs (if error 1 0)))) (defun batch-byte-compile-file (file) - (condition-case err + (if debug-on-error (byte-compile-file file) - (file-error - (message (if (cdr err) - ">>Error occurred processing %s: %s (%s)" + (condition-case err + (byte-compile-file file) + (file-error + (message (if (cdr err) + ">>Error occurred processing %s: %s (%s)" ">>Error occurred processing %s: %s") - file - (get (car err) 'error-message) - (prin1-to-string (cdr err))) - (let ((destfile (byte-compile-dest-file file))) - (if (file-exists-p destfile) - (delete-file destfile))) - nil) - (error - (message (if (cdr err) - ">>Error occurred processing %s: %s (%s)" + file + (get (car err) 'error-message) + (prin1-to-string (cdr err))) + (let ((destfile (byte-compile-dest-file file))) + (if (file-exists-p destfile) + (delete-file destfile))) + nil) + (error + (message (if (cdr err) + ">>Error occurred processing %s: %s (%s)" ">>Error occurred processing %s: %s") - file - (get (car err) 'error-message) - (prin1-to-string (cdr err))) - nil))) + file + (get (car err) 'error-message) + (prin1-to-string (cdr err))) + nil)))) ;;;###autoload (defun batch-byte-recompile-directory () @@ -4036,4 +4085,5 @@ For example, invoke `emacs -batch -f batch-byte-recompile-directory .'." (run-hooks 'bytecomp-load-hook) +;;; arch-tag: 9c97b0f0-8745-4571-bfc3-8dceb677292a ;;; bytecomp.el ends here diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index a5fb3cede5..fddab94dfd 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -1,6 +1,6 @@ ;;; checkdoc.el --- check documentation strings for style requirements -;;; Copyright (C) 1997, 1998, 2001 Free Software Foundation +;;; Copyright (C) 1997, 1998, 2001, 2004 Free Software Foundation ;; Author: Eric M. Ludlam ;; Version: 0.6.2 @@ -653,8 +653,7 @@ style." (sit-for 2)) (setq err-list (cdr err-list)))) (beginning-of-defun) - (let ((pe (car err-list)) - (ne (funcall findfunc nil))) + (let ((ne (funcall findfunc nil))) (if ne (setq err-list (cons ne err-list)) (cond ((not err-list) @@ -900,7 +899,7 @@ Prefix argument TAKE-NOTES means to continue through the whole buffer and save warnings in a separate buffer. Second optional argument START-POINT is the starting location. If this is nil, `point-min' is used instead." (interactive "P") - (let ((wrong nil) (msg nil) (errors nil) + (let ((wrong nil) (msg nil) ;; Assign a flag to spellcheck flag (checkdoc-spellcheck-documentation-flag (car (memq checkdoc-spellcheck-documentation-flag @@ -2598,14 +2597,13 @@ This function will not modify `match-data'." (setq checkdoc-output-mode-map (make-sparse-keymap)) (if (not (string-match "XEmacs" emacs-version)) (define-key checkdoc-output-mode-map [mouse-2] - 'checkdoc-find-error-mouse)) + 'checkdoc-find-error)) (define-key checkdoc-output-mode-map "\C-c\C-c" 'checkdoc-find-error) (define-key checkdoc-output-mode-map "\C-m" 'checkdoc-find-error)) (defun checkdoc-output-mode () "Create and setup the buffer used to maintain checkdoc warnings. -\\\\[checkdoc-find-error] - Go to this error location -\\[checkdoc-find-error-mouse] - Goto the error clicked on." +\\\\[checkdoc-find-error] - Go to this error location." (if (get-buffer checkdoc-diagnostic-buffer) (get-buffer checkdoc-diagnostic-buffer) (save-excursion @@ -2619,16 +2617,11 @@ This function will not modify `match-data'." (run-hooks 'checkdoc-output-mode-hook) (current-buffer)))) -(defun checkdoc-find-error-mouse (e) - ;; checkdoc-params: (e) - "Call `checkdoc-find-error' where the user clicks the mouse." - (interactive "e") - (mouse-set-point e) - (checkdoc-find-error)) - -(defun checkdoc-find-error () +(defalias 'checkdoc-find-error-mouse 'checkdoc-find-error) +(defun checkdoc-find-error (&optional event) "In a checkdoc diagnostic buffer, find the error under point." - (interactive) + (interactive (list last-input-event)) + (if event (posn-set-point (event-end e))) (beginning-of-line) (if (looking-at "\\(\\(\\w+\\|\\s_\\)+\\.el\\):\\([0-9]+\\):") (let ((l (string-to-int (match-string 3))) @@ -2657,7 +2650,7 @@ function called to create the messages." (setq checkdoc-pending-errors t) (checkdoc-output-to-error-buffer "\n" (checkdoc-buffer-label) ":" - (int-to-string (count-lines (point-min) (or point 1))) ": " + (int-to-string (count-lines (point-min) (or point (point-min)))) ": " msg)) (defun checkdoc-output-to-error-buffer (&rest text) @@ -2692,8 +2685,11 @@ function called to create the messages." (add-to-list 'debug-ignored-errors "Argument `.*' should appear (as .*) in the doc string") +(add-to-list 'debug-ignored-errors + "Lisp symbol `.*' should appear in quotes") (add-to-list 'debug-ignored-errors "Disambiguate .* by preceding .*") (provide 'checkdoc) +;;; arch-tag: c49a7ec8-3bb7-46f2-bfbc-d5f26e033b26 ;;; checkdoc.el ends here diff --git a/lisp/emacs-lisp/cl-compat.el b/lisp/emacs-lisp/cl-compat.el index 9afe4fe426..c3fbbe0993 100644 --- a/lisp/emacs-lisp/cl-compat.el +++ b/lisp/emacs-lisp/cl-compat.el @@ -185,4 +185,5 @@ (provide 'cl-compat) +;;; arch-tag: 9996bb4f-aaf5-4592-b436-bf64759a3163 ;;; cl-compat.el ends here diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index b0b8d3379f..bfd21e27d0 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -749,4 +749,5 @@ This also does some trivial optimizations to make the form prettier." (run-hooks 'cl-extra-load-hook) +;;; arch-tag: bcd03437-0871-43fb-a8f1-ad0e0b5427ed ;;; cl-extra.el ends here diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index 485a052295..2e6265d4df 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el @@ -605,4 +605,5 @@ If nil, indent backquoted lists as data, i.e., like quoted lists." ;(put 'defclass 'common-lisp-indent-function '((&whole 2 &rest (&whole 2 &rest 1) &rest (&whole 2 &rest 1))) ;(put 'defgeneric 'common-lisp-indent-function 'defun) +;;; arch-tag: 7914d50f-92ec-4476-93fc-0f043a380e03 ;;; cl-indent.el ends here diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index fc1d6ffef0..c61c275f2b 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1,6 +1,6 @@ ;;; cl-macs.el --- Common Lisp macros -*-byte-compile-dynamic: t;-*- -;; Copyright (C) 1993, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2003, 2004 Free Software Foundation, Inc. ;; Author: Dave Gillespie ;; Version: 2.02 @@ -2261,8 +2261,7 @@ copier, a `NAME-p' predicate, and setf-able `NAME-SLOT' accessors. (list (list 'or pred-check (list 'error (format "%s accessing a non-%s" - accessor name) - 'cl-x)))) + accessor name))))) (list (if (eq type 'vector) (list 'aref 'cl-x pos) (if (= pos 0) '(car cl-x) (list 'nth pos 'cl-x)))))) forms) @@ -2340,8 +2339,7 @@ copier, a `NAME-p' predicate, and setf-able `NAME-SLOT' accessors. (list (list 'or (subst temp 'cl-x pred-form) (list 'error (format - "%s storing a non-%s" accessor name) - temp)))) + "%s storing a non-%s" accessor name))))) (list (if (eq (car (get name 'cl-struct-type)) 'vector) (list 'aset temp pos store) (list 'setcar @@ -2657,4 +2655,5 @@ surrounded by (block NAME ...). ;;; byte-compile-warnings: (redefine callargs free-vars unresolved obsolete noruntime) ;;; End: +;;; arch-tag: afd947a6-b553-4df1-bba5-000be6388f46 ;;; cl-macs.el ends here diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el index 8cb6412f77..93237f0206 100644 --- a/lisp/emacs-lisp/cl-seq.el +++ b/lisp/emacs-lisp/cl-seq.el @@ -903,4 +903,5 @@ Keywords supported: :test :test-not :key" (run-hooks 'cl-seq-load-hook) +;;; arch-tag: ec1cc072-9006-4225-b6ba-d6b07ed1710c ;;; cl-seq.el ends here diff --git a/lisp/emacs-lisp/cl-specs.el b/lisp/emacs-lisp/cl-specs.el index 077f006ec3..97c7d67ac5 100644 --- a/lisp/emacs-lisp/cl-specs.el +++ b/lisp/emacs-lisp/cl-specs.el @@ -7,7 +7,6 @@ ;; LCD Archive Entry: ;; cl-specs.el|Daniel LaLiberte|liberte@holonexus.org ;; |Edebug specs for cl.el -;; |$Date: 2003/02/04 12:53:34 $|1.1| ;; This file is part of GNU Emacs. @@ -470,4 +469,5 @@ (def-edebug-spec loop-d-type-spec (&or (loop-d-type-spec . [&or nil loop-d-type-spec]) cl-type-spec)) +;;; arch-tag: b29aa3c2-cf67-4af8-9ee1-318fea61b478 ;;; cl-specs.el ends here diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index f2ced20e59..b098a467f9 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -108,6 +108,10 @@ printer proceeds to the next function on the list. This variable is not used at present, but it is defined in hopes that a future Emacs interpreter will be able to use it.") +(defvar cl-unload-hook '(cl-cannot-unload) + "Prevent unloading the feature `cl', since it does not work.") +(defun cl-cannot-unload () + (error "Cannot unload the feature `cl'")) ;;; Predicates. @@ -579,9 +583,10 @@ Keywords supported: :test :test-not :key" "Non-nil means don't make CL functions autoload.") ;;; Autoload the other portions of the package. -;; We want to replace the basic versions of dolist, dotimes below. +;; We want to replace the basic versions of dolist, dotimes, declare below. (fmakunbound 'dolist) (fmakunbound 'dotimes) +(fmakunbound 'declare) (mapcar (function (lambda (set) (let ((file (if cl-fake-autoloads "" (car set)))) @@ -695,4 +700,5 @@ Keywords supported: :test :test-not :key" (run-hooks 'cl-load-hook) +;;; arch-tag: 5f07fa74-f153-4524-9303-21f5be125851 ;;; cl.el ends here diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el index 43b32e42d2..58ab919c2f 100644 --- a/lisp/emacs-lisp/copyright.el +++ b/lisp/emacs-lisp/copyright.el @@ -1,6 +1,6 @@ ;;; copyright.el --- update the copyright notice in current buffer -;; Copyright (C) 1991, 92, 93, 94, 95, 1998, 2001, 2003 +;; Copyright (C) 1991, 92, 93, 94, 95, 1998, 2001, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer @@ -27,7 +27,8 @@ ;; Allows updating the copyright year and above mentioned GPL version manually ;; or when saving a file. -;; Do (add-hook 'write-file-functions 'copyright-update). +;; Do (add-hook 'before-save-hook 'copyright-update), or use +;; M-x customize-variable RET before-save-hook RET. ;;; Code: @@ -189,4 +190,5 @@ version \\([0-9]+\\), or (at" ;; coding: utf-8 ;; End: +;;; arch-tag: b4991afb-b6b1-4590-bebe-e076d9d4aee8 ;;; copyright.el ends here diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index 46293bf94f..572c658d0f 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -629,4 +629,5 @@ INHERIT-INPUT-METHOD." (provide 'crm) +;;; arch-tag: db1911d9-86c6-4a42-b32a-4910701b15a6 ;;; crm.el ends here diff --git a/lisp/emacs-lisp/cust-print.el b/lisp/emacs-lisp/cust-print.el index a8cf6acd17..929989b618 100644 --- a/lisp/emacs-lisp/cust-print.el +++ b/lisp/emacs-lisp/cust-print.el @@ -688,4 +688,5 @@ See `custom-format' for the details." (provide 'cust-print) +;;; arch-tag: 3a5a8650-622c-48c4-87d8-e01bf72ec580 ;;; cust-print.el ends here diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 10c4fd4f73..6e10b596e2 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -733,4 +733,5 @@ If argument is nil or an empty string, cancel for all functions." (provide 'debug) +;;; arch-tag: b6ec7047-f801-4103-9c63-d69322db9d3b ;;; debug.el ends here diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 4aa8529080..811511a1f0 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -437,4 +437,5 @@ Where the new table already has an entry, nothing is copied from the old one." (provide 'derived) +;;; arch-tag: 630be248-47d1-4f02-afa0-8207de0ebea0 ;;; derived.el ends here diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el index 6b7f9bc1b3..d8890bd023 100644 --- a/lisp/emacs-lisp/disass.el +++ b/lisp/emacs-lisp/disass.el @@ -265,4 +265,5 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler." (provide 'disass) +;;; arch-tag: 89482fe4-a087-4761-8dc6-d771054e763a ;;; disass.el ends here diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 9175f692aa..2439fdd4de 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -1,6 +1,6 @@ ;;; easy-mmode.el --- easy definition for major and minor modes -;; Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1997,2000,01,02,03,2004 Free Software Foundation, Inc. ;; Author: Georges Brun-Cottan ;; Maintainer: Stefan Monnier @@ -419,7 +419,7 @@ CSS contains a list of syntax specifications of the form (CHAR . SYNTAX)." ;;; easy-mmode-define-navigation ;;; -(defmacro easy-mmode-define-navigation (base re &optional name endfun) +(defmacro easy-mmode-define-navigation (base re &optional name endfun narrowfun) "Define BASE-next and BASE-prev to navigate in the buffer. RE determines the places the commands should move point to. NAME should describe the entities matched by RE. It is used to build @@ -427,10 +427,19 @@ NAME should describe the entities matched by RE. It is used to build BASE-next also tries to make sure that the whole entry is visible by searching for its end (by calling ENDFUN if provided or by looking for the next entry) and recentering if necessary. -ENDFUN should return the end position (with or without moving point)." +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." (let* ((base-name (symbol-name base)) (prev-sym (intern (concat base-name "-prev"))) - (next-sym (intern (concat base-name "-next")))) + (next-sym (intern (concat base-name "-next"))) + (check-narrow-maybe + (when narrowfun + '(setq was-narrowed + (prog1 (or (< (- (point-max) (point-min)) (buffer-size))) + (widen))))) + (re-narrow-maybe (when narrowfun + `(when was-narrowed (,narrowfun))))) (unless name (setq name base-name)) `(progn (add-to-list 'debug-ignored-errors @@ -440,28 +449,36 @@ ENDFUN should return the end position (with or without moving point)." (interactive) (unless count (setq count 1)) (if (< count 0) (,prev-sym (- count)) - (if (looking-at ,re) (incf count)) - (if (not (re-search-forward ,re nil t count)) - (if (looking-at ,re) - (goto-char (or ,(if endfun `(,endfun)) (point-max))) - (error "No next %s" ,name)) - (goto-char (match-beginning 0)) - (when (and (eq (current-buffer) (window-buffer (selected-window))) - (interactive-p)) - (let ((endpt (or (save-excursion - ,(if endfun `(,endfun) - `(re-search-forward ,re nil t 2))) - (point-max)))) - (unless (pos-visible-in-window-p endpt nil t) - (recenter '(0)))))))) + (if (looking-at ,re) (setq count (1+ count))) + (let (was-narrowed) + ,check-narrow-maybe + (if (not (re-search-forward ,re nil t count)) + (if (looking-at ,re) + (goto-char (or ,(if endfun `(,endfun)) (point-max))) + (error "No next %s" ,name)) + (goto-char (match-beginning 0)) + (when (and (eq (current-buffer) (window-buffer (selected-window))) + (interactive-p)) + (let ((endpt (or (save-excursion + ,(if endfun `(,endfun) + `(re-search-forward ,re nil t 2))) + (point-max)))) + (unless (pos-visible-in-window-p endpt nil t) + (recenter '(0)))))) + ,re-narrow-maybe))) (defun ,prev-sym (&optional count) ,(format "Go to the previous COUNT'th %s" (or name base-name)) (interactive) (unless count (setq count 1)) (if (< count 0) (,next-sym (- count)) - (unless (re-search-backward ,re nil t count) - (error "No previous %s" ,name))))))) + (let (was-narrowed) + ,check-narrow-maybe + (unless (re-search-backward ,re nil t count) + (error "No previous %s" ,name)) + ,re-narrow-maybe)))))) + (provide 'easy-mmode) +;;; arch-tag: d48a5250-6961-4528-9cb0-3c9ea042a66a ;;; easy-mmode.el ends here diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 2bed70866a..88f7657b6b 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el @@ -1,6 +1,6 @@ ;;; easymenu.el --- support the easymenu interface for defining a menu -;; Copyright (C) 1994, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1994,96,98,1999,2000,2004 Free Software Foundation, Inc. ;; Keywords: emulations ;; Author: Richard Stallman @@ -59,8 +59,8 @@ It may be followed by the following keyword argument pairs :filter FUNCTION -FUNCTION is a function with one argument, the menu. It returns the actual -menu displayed. +FUNCTION is a function with one argument, the rest of menu items. +It returns the remaining items of the displayed menu. :visible INCLUDE @@ -478,7 +478,9 @@ Do it only if `easy-menu-precalculate-equivalent-keybindings' is on." (when easy-menu-precalculate-equivalent-keybindings (if (and (symbolp menu) (not (keymapp menu)) (boundp menu)) (setq menu (symbol-value menu))) - (if (keymapp menu) (x-popup-menu nil menu)))) + ;; x-popup-menu does not exist on tty-only Emacs. + ;; (if (keymapp menu) (x-popup-menu nil menu)) + )) (defun add-submenu (menu-path submenu &optional before in-menu) "Add submenu SUBMENU in the menu at MENU-PATH. @@ -620,4 +622,5 @@ In some cases we use that to select between the local and global maps." (provide 'easymenu) +;;; arch-tag: 2a04020d-90d2-476d-a7c6-71e072007a4a ;;; easymenu.el ends here diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 8fd8bf95ea..8a924d045f 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -1,6 +1,6 @@ ;;; edebug.el --- a source-level debugger for Emacs Lisp -;; Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 97, 1999, 2000, 01, 2003 +;; Copyright (C) 1988,89,90,91,92,93,94,95,97,1999,2000,01,03,2004 ;; Free Software Foundation, Inc. ;; Author: Daniel LaLiberte @@ -2090,6 +2090,10 @@ expressions; a `progn' form will be returned enclosing these forms." (def-edebug-spec push (form sexp)) (def-edebug-spec pop (sexp)) +(def-edebug-spec 1value (form)) +(def-edebug-spec noreturn (form)) + + ;; Anything else? @@ -2241,8 +2245,10 @@ error is signaled again." ;; Save the outside value of executing macro. (here??) (edebug-outside-executing-macro executing-kbd-macro) - (edebug-outside-pre-command-hook pre-command-hook) - (edebug-outside-post-command-hook post-command-hook)) + (edebug-outside-pre-command-hook + (edebug-var-status 'pre-command-hook)) + (edebug-outside-post-command-hook + (edebug-var-status 'post-command-hook))) (unwind-protect (let (;; Don't keep reading from an executing kbd macro ;; within edebug unless edebug-continue-kbd-macro is @@ -2267,10 +2273,11 @@ error is signaled again." edebug-next-execution-mode nil) (edebug-enter edebug-function edebug-args edebug-body)) ;; Reset global variables in case outside value was changed. - (setq executing-kbd-macro edebug-outside-executing-macro - pre-command-hook edebug-outside-pre-command-hook - post-command-hook edebug-outside-post-command-hook - ))) + (setq executing-kbd-macro edebug-outside-executing-macro) + (edebug-restore-status + 'post-command-hook edebug-outside-post-command-hook) + (edebug-restore-status + 'pre-command-hook edebug-outside-pre-command-hook))) (let* ((edebug-data (get edebug-function 'edebug)) (edebug-def-mark (car edebug-data)) ; mark at def start @@ -2291,6 +2298,30 @@ error is signaled again." (funcall edebug-body)) ))) +(defun edebug-var-status (var) + "Return a cons cell describing the status of VAR's current binding. +The purpose of this function is so you can properly undo +subsequent changes to the same binding, by passing the status +cons cell to `edebug-restore-status'. The status cons cell +has the form (LOCUS . VALUE), where LOCUS can be a buffer +\(for a buffer-local binding), a frame (for a frame-local binding), +or nil (if the default binding is current)." + (cons (variable-binding-locus var) + (symbol-value var))) + +(defun edebug-restore-status (var status) + "Reset VAR based on STATUS. +STATUS should be a list you got from `edebug-var-status'." + (let ((locus (car status)) + (value (cdr status))) + (cond ((bufferp locus) + (if (buffer-live-p locus) + (with-current-buffer locus + (set var value)))) + ((framep locus) + (modify-frame-parameters locus (list (cons var value)))) + (t + (set var value))))) (defun edebug-enter-trace (edebug-body) (let ((edebug-stack-depth (1+ edebug-stack-depth)) @@ -2478,6 +2509,11 @@ MSG is printed after `::::} '." (defun edebug-display () + (unless (marker-position edebug-def-mark) + ;; The buffer holding the source has been killed. + ;; Let's at least show a backtrace so the user can figure out + ;; which function we're talking about. + (debug)) ;; Setup windows for edebug, determine mode, maybe enter recursive-edit. ;; Uses local variables of edebug-enter, edebug-before, edebug-after ;; and edebug-debugger. @@ -3511,8 +3547,9 @@ Return the result of the last expression." (executing-kbd-macro edebug-outside-executing-macro) (defining-kbd-macro edebug-outside-defining-kbd-macro) - (pre-command-hook edebug-outside-pre-command-hook) - (post-command-hook edebug-outside-post-command-hook) + ;; Get the values out of the saved statuses. + (pre-command-hook (cdr edebug-outside-pre-command-hook)) + (post-command-hook (cdr edebug-outside-post-command-hook)) ;; See edebug-display (overlay-arrow-position edebug-outside-o-a-p) @@ -3552,13 +3589,18 @@ Return the result of the last expression." edebug-outside-executing-macro executing-kbd-macro edebug-outside-defining-kbd-macro defining-kbd-macro - edebug-outside-pre-command-hook pre-command-hook - edebug-outside-post-command-hook post-command-hook edebug-outside-o-a-p overlay-arrow-position edebug-outside-o-a-s overlay-arrow-string edebug-outside-c-i-e-a cursor-in-echo-area - ))) ; let + ) + + ;; Restore the outside saved values; don't alter + ;; the outside binding loci. + (setcdr edebug-outside-pre-command-hook pre-command-hook) + (setcdr edebug-outside-post-command-hook post-command-hook) + + )) ; let )) (defvar cl-debug-env nil) ;; defined in cl; non-nil when lexical env used. @@ -3644,17 +3686,14 @@ Return the result of the last expression." (edebug-prin1-to-string value))) (defun edebug-compute-previous-result (edebug-previous-value) + (if edebug-unwrap-results + (setq edebug-previous-value + (edebug-unwrap* edebug-previous-value))) (setq edebug-previous-result - (if (and (integerp edebug-previous-value) - (< edebug-previous-value 256) - (>= edebug-previous-value 0)) - (format "Result: %s = %s" edebug-previous-value - (single-key-description edebug-previous-value)) - (if edebug-unwrap-results - (setq edebug-previous-value - (edebug-unwrap* edebug-previous-value))) - (concat "Result: " - (edebug-safe-prin1-to-string edebug-previous-value))))) + (concat "Result: " + (edebug-safe-prin1-to-string edebug-previous-value) + (let ((name (prin1-char edebug-previous-value))) + (if name (concat " = " name)))))) (defun edebug-previous-result () "Print the previous result." @@ -3676,14 +3715,13 @@ Print result in minibuffer." (edebug-safe-prin1-to-string (car values))))) (defun edebug-eval-last-sexp () - "Evaluate sexp before point in the outside environment; -print value in minibuffer." + "Evaluate sexp before point in the outside environment; value in minibuffer." (interactive) (edebug-eval-expression (edebug-last-sexp))) (defun edebug-eval-print-last-sexp () - "Evaluate sexp before point in the outside environment; -print value into current buffer." + "Evaluate sexp before point in the outside environment; insert the value. +This prints the value into current buffer." (interactive) (let* ((edebug-form (edebug-last-sexp)) (edebug-result-string @@ -3698,12 +3736,15 @@ print value into current buffer." ;;; Edebug Minor Mode -;; Global GUD bindings for all emacs-lisp-mode buffers. -(define-key emacs-lisp-mode-map "\C-x\C-a\C-s" 'edebug-step-mode) -(define-key emacs-lisp-mode-map "\C-x\C-a\C-n" 'edebug-next-mode) -(define-key emacs-lisp-mode-map "\C-x\C-a\C-c" 'edebug-go-mode) -(define-key emacs-lisp-mode-map "\C-x\C-a\C-l" 'edebug-where) +(defvar gud-inhibit-global-bindings + "*Non-nil means don't do global rebindings of C-x C-a subcommands.") +;; Global GUD bindings for all emacs-lisp-mode buffers. +(unless gud-inhibit-global-bindings + (define-key emacs-lisp-mode-map "\C-x\C-a\C-s" 'edebug-step-mode) + (define-key emacs-lisp-mode-map "\C-x\C-a\C-n" 'edebug-next-mode) + (define-key emacs-lisp-mode-map "\C-x\C-a\C-c" 'edebug-go-mode) + (define-key emacs-lisp-mode-map "\C-x\C-a\C-l" 'edebug-where)) (defvar edebug-mode-map (let ((map (copy-keymap emacs-lisp-mode-map))) @@ -4110,8 +4151,8 @@ You must include newlines in FMT to break lines, but one newline is appended." ;;; Frequency count and coverage (defun edebug-display-freq-count () - "Display the frequency count data for each line of the current -definition. The frequency counts are inserted as comment lines after + "Display the frequency count data for each line of the current definition. +The frequency counts are inserted as comment lines after each line, and you can undo all insertions with one `undo' command. The counts are inserted starting under the `(' before an expression @@ -4415,4 +4456,5 @@ With prefix argument, make it a temporary breakpoint." (provide 'edebug) +;;; arch-tag: 19c8d05c-4554-426e-ac72-e0fa1fcb0808 ;;; edebug.el ends here diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index cbcd5b2a55..bc868759d9 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -7,8 +7,6 @@ ;; Keywords: extensions ;; Created: 1995-10-06 -;; $Id: eldoc.el,v 1.24 2003/02/11 00:11:55 monnier Exp $ - ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify @@ -40,11 +38,14 @@ ;; One useful way to enable this minor mode is to put the following in your ;; .emacs: ;; -;; (autoload 'turn-on-eldoc-mode "eldoc" nil t) ;; (add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode) ;; (add-hook 'lisp-interaction-mode-hook 'turn-on-eldoc-mode) ;; (add-hook 'ielm-mode-hook 'turn-on-eldoc-mode) +;; Major modes for other languages may use Eldoc by defining an +;; appropriate function as the buffer-local value of +;; `eldoc-print-current-symbol-info-function'. + ;;; Code: (require 'help-fns) ;For fundoc-usage handling functions. @@ -233,19 +234,32 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive." (not (eq (selected-window) (minibuffer-window))))) +(defvar eldoc-print-current-symbol-info-function nil + "If non-nil, function to call to return doc string. +The function of no args should return a one-line string for displaying +doc about a function etc. appropriate to the context around point. +It should return nil if there's no doc appropriate for the context. +Typically doc is returned if point is on a function-like name or in its +arg list. + +This variable is expected to be made buffer-local by modes (other than +Emacs Lisp mode) that support Eldoc.") + (defun eldoc-print-current-symbol-info () (condition-case err (and (eldoc-display-message-p) - (let* ((current-symbol (eldoc-current-symbol)) - (current-fnsym (eldoc-fnsym-in-current-sexp)) - (doc (cond - ((eq current-symbol current-fnsym) - (or (eldoc-get-fnsym-args-string current-fnsym) - (eldoc-get-var-docstring current-symbol))) - (t - (or (eldoc-get-var-docstring current-symbol) - (eldoc-get-fnsym-args-string current-fnsym)))))) - (eldoc-message doc))) + (if eldoc-print-current-symbol-info-function + (eldoc-message (funcall eldoc-print-current-symbol-info-function)) + (let* ((current-symbol (eldoc-current-symbol)) + (current-fnsym (eldoc-fnsym-in-current-sexp)) + (doc (cond + ((eq current-symbol current-fnsym) + (or (eldoc-get-fnsym-args-string current-fnsym) + (eldoc-get-var-docstring current-symbol))) + (t + (or (eldoc-get-var-docstring current-symbol) + (eldoc-get-fnsym-args-string current-fnsym)))))) + (eldoc-message doc)))) ;; This is run from post-command-hook or some idle timer thing, ;; so we need to be careful that errors aren't ignored. (error (message "eldoc error: %s" err)))) @@ -451,4 +465,5 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive." (provide 'eldoc) +;;; arch-tag: c9a58f9d-2055-46c1-9b82-7248b71a8375 ;;; eldoc.el ends here diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index 502094fd37..f0f8add487 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el @@ -540,7 +540,8 @@ CODE can be a lambda expression, a macro, or byte-compiled code." (defun elint-check-defcustom-form (form env) "Lint the defcustom FORM in ENV." (if (and (> (length form) 3) - (evenp (length form))) ; even no. of keyword/value args + ;; even no. of keyword/value args ? + (zerop (logand (length form) 1))) (elint-env-add-global-var (elint-form (nth 2 form) env) (car (cdr form))) (elint-error "Malformed variable declaration: %s" form) @@ -801,4 +802,5 @@ If no documentation could be found args will be `unknown'." (provide 'elint) +;;; arch-tag: b2f061e2-af84-4ddc-8e39-f5e969ac228f ;;; elint.el ends here diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index 01544e3aa1..44400dcaa2 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -603,4 +603,5 @@ displayed." (provide 'elp) +;;; arch-tag: c4eef311-9b3e-4bb2-8a54-3485d41b4eb1 ;;; elp.el ends here diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 7194d4e54d..a0c2e3c0d7 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -609,4 +609,5 @@ Returns nil if the buffer has been deleted." ;;; eval: (put 'ewoc--set-buffer-bind-dll-let* 'lisp-indent-hook 2) ;;; End: +;;; arch-tag: d78915b9-9a07-44bf-aac6-04a1fc1bd6d4 ;;; ewoc.el ends here diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index c4ae7f12b3..5a7cd1093c 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -403,4 +403,5 @@ Point is saved if FUNCTION is in the current buffer." (provide 'find-func) +;;; arch-tag: 43ecd81c-74dc-4d9a-8f63-a61e55670d64 ;;; find-func.el ends here diff --git a/lisp/emacs-lisp/find-gc.el b/lisp/emacs-lisp/find-gc.el index a52ae3631f..1c12729521 100644 --- a/lisp/emacs-lisp/find-gc.el +++ b/lisp/emacs-lisp/find-gc.el @@ -151,4 +151,5 @@ (provide 'find-gc) +;;; arch-tag: 4a26a538-a008-40d9-a1ef-23bb6dbecef4 ;;; find-gc.el ends here diff --git a/lisp/emacs-lisp/float-sup.el b/lisp/emacs-lisp/float-sup.el index 4c45112e98..ce5d6124ad 100644 --- a/lisp/emacs-lisp/float-sup.el +++ b/lisp/emacs-lisp/float-sup.el @@ -60,4 +60,5 @@ (provide 'lisp-float-type) +;;; arch-tag: e7837072-a4af-4d08-9953-8a3e755abf9d ;;; float-sup.el ends here diff --git a/lisp/emacs-lisp/gulp.el b/lisp/emacs-lisp/gulp.el index a176a7ac01..589be6fb77 100644 --- a/lisp/emacs-lisp/gulp.el +++ b/lisp/emacs-lisp/gulp.el @@ -173,4 +173,5 @@ That is a list of elements, each of the form (MAINTAINER PACKAGES...)." (provide 'gulp) +;;; arch-tag: 42750a11-460a-4efc-829f-342d075530e5 ;;; gulp.el ends here diff --git a/lisp/emacs-lisp/helper.el b/lisp/emacs-lisp/helper.el index 0e02f05955..9d22735e1d 100644 --- a/lisp/emacs-lisp/helper.el +++ b/lisp/emacs-lisp/helper.el @@ -157,4 +157,5 @@ (provide 'helper) +;;; arch-tag: a0984577-d3e9-4124-ae0d-c46fe740f6a9 ;;; helper.el ends here diff --git a/lisp/emacs-lisp/levents.el b/lisp/emacs-lisp/levents.el index 13d13beb99..cd3fe2764c 100644 --- a/lisp/emacs-lisp/levents.el +++ b/lisp/emacs-lisp/levents.el @@ -290,4 +290,5 @@ GNU Emacs 19 does not currently generate process-output events." (provide 'levents) +;;; arch-tag: a80c21da-69d7-46de-9cdb-5f68577b5525 ;;; levents.el ends here diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 18967677b3..671f3c8ce2 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -1,6 +1,6 @@ ;;; lisp-mnt.el --- utility functions for Emacs Lisp maintainers -;; Copyright (C) 1992, 1994, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994, 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. ;; Author: Eric S. Raymond ;; Maintainer: FSF @@ -180,8 +180,8 @@ Leading comment characters and whitespace should be in regexp group 1." If called with optional MODE and with value `section', return section regexp instead." (if (eq mode 'section) - (concat "^;;;;* " header ":[ \t]*$") - (concat lm-header-prefix header "[ \t]*:[ \t]*"))) + (concat "^;;;;* \\(" header "\\):[ \t]*$") + (concat lm-header-prefix "\\(" header "\\)[ \t]*:[ \t]*"))) (defun lm-get-package-name () "Return package name by looking at the first line." @@ -214,6 +214,7 @@ The end of the section is defined as the beginning of the next section of the same level or lower. The function `lisp-outline-level' is used to compute the level of a section. If no such section exists, return the end of the buffer." + (require 'outline) ;; for outline-regexp. (let ((start (lm-section-start header))) (when start (save-excursion @@ -296,15 +297,16 @@ The returned value is a list of strings, one per line." ;; These give us smart access to the header fields and commentary (defmacro lm-with-file (file &rest body) - "Make a buffer with FILE current, and execute BODY. -If FILE isn't in a buffer, load it in, and kill it after BODY is executed." + "Execute BODY in a buffer containing the contents of FILE. +If FILE is nil, execute BODY in the current buffer." (let ((filesym (make-symbol "file"))) - `(save-excursion - (let ((,filesym ,file)) - (if ,filesym (set-buffer (find-file-noselect ,filesym))) - (prog1 (progn ,@body) - (if (and ,filesym (not (get-buffer-window (current-buffer) t))) - (kill-buffer (current-buffer)))))))) + `(let ((,filesym ,file)) + (if ,filesym + (with-temp-buffer + (insert-file-contents ,filesym) + ,@body) + (save-excursion + ,@body))))) (put 'lm-with-file 'lisp-indent-function 1) (put 'lm-with-file 'edebug-form-spec t) @@ -450,14 +452,14 @@ This can be found in an RCS or SCCS header." (if keywords (split-string keywords ",?[ \t]")))) +(defvar finder-known-keywords) (defun lm-keywords-finder-p (&optional file) "Return non-nil if any keywords in FILE are known to finder." (require 'finder) (let ((keys (lm-keywords-list file))) (catch 'keyword-found (while keys - (if (assoc (intern (car keys)) - (with-no-warnings finder-known-keywords)) + (if (assoc (intern (car keys)) finder-known-keywords) (throw 'keyword-found t)) (setq keys (cdr keys))) nil))) @@ -520,7 +522,7 @@ copyright notice is allowed." (setq ret (cond ((null name) - (format "Package %s does not exist")) + "Can't find package name") ((not (lm-authors)) "`Author:' tag missing") ((not (lm-maintainer)) @@ -544,7 +546,7 @@ copyright notice is allowed." (concat "^;;;[ \t]+" name "[ \t]+ends here[ \t]*$" "\\|^;;;[ \t]+ End of file[ \t]+" name) nil t))) - (format "Can't find the footer line")) + "Can't find the footer line") ((not (and (lm-copyright-mark) (lm-crack-copyright))) "Can't find a valid copyright notice") ((not (or non-fsf-ok @@ -607,4 +609,5 @@ Prompts for bug subject TOPIC. Leaves you in a mail buffer." (provide 'lisp-mnt) +;;; arch-tag: fa3c5ab4-a37b-4e46-b7cf-b6d78b90e69e ;;; lisp-mnt.el ends here diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index a7dad3428f..8cd0fdf0da 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1,6 +1,6 @@ ;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands -;; Copyright (C) 1985, 1986, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1985,86,1999,2000,01,03,2004 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: lisp, languages @@ -173,8 +173,6 @@ ;; because lisp-fill-paragraph should do the job. ;; I believe that newcomment's auto-fill code properly deals with it -stef ;;(set (make-local-variable 'adaptive-fill-mode) nil) - (make-local-variable 'normal-auto-fill-function) - (setq normal-auto-fill-function 'lisp-mode-auto-fill) (make-local-variable 'indent-line-function) (setq indent-line-function 'lisp-indent-line) (make-local-variable 'indent-region-function) @@ -182,7 +180,7 @@ (make-local-variable 'parse-sexp-ignore-comments) (setq parse-sexp-ignore-comments t) (make-local-variable 'outline-regexp) - (setq outline-regexp ";;;;* \\|(") + (setq outline-regexp ";;;;* [^ \t\n]\\|(") (make-local-variable 'outline-level) (setq outline-level 'lisp-outline-level) (make-local-variable 'comment-start) @@ -195,8 +193,8 @@ (setq comment-add 1) ;default to `;;' in comment-region (make-local-variable 'comment-column) (setq comment-column 40) - (make-local-variable 'comment-indent-function) - (setq comment-indent-function 'lisp-comment-indent) + ;; Don't get confused by `;' in doc strings when paragraph-filling. + (set (make-local-variable 'comment-use-global-state) t) (make-local-variable 'imenu-generic-expression) (setq imenu-generic-expression lisp-imenu-generic-expression) (make-local-variable 'multibyte-syntax-as-symbol) @@ -205,14 +203,14 @@ (setq font-lock-defaults '((lisp-font-lock-keywords lisp-font-lock-keywords-1 lisp-font-lock-keywords-2) - nil nil (("+-*/.<>=!?$%_&~^:" . "w")) beginning-of-defun + nil nil (("+-*/.<>=!?$%_&~^:" . "w")) nil (font-lock-mark-block-function . mark-defun) (font-lock-syntactic-face-function . lisp-font-lock-syntactic-face-function)))) (defun lisp-outline-level () "Lisp mode `outline-level' function." - (if (looking-at "(") + (if (looking-at "(\\|;;;###autoload") 1000 (looking-at outline-regexp) (- (match-end 0) (match-beginning 0)))) @@ -358,6 +356,9 @@ if that value is non-nil." (set-syntax-table lisp-mode-syntax-table) (run-mode-hooks 'lisp-mode-hook)) +;; Used in old LispM code. +(defalias 'common-lisp-mode 'lisp-mode) + ;; This will do unless inf-lisp.el is loaded. (defun lisp-eval-defun (&optional and-go) "Send the current defun to the Lisp process made by \\[run-lisp]." @@ -448,14 +449,18 @@ alternative printed representations that can be displayed." If CHAR is not a character, return nil." (and (integerp char) (characterp (event-basic-type char)) - (concat - "?" - (mapconcat - (lambda (modif) - (cond ((eq modif 'super) "\\s-") - (t (string ?\\ (upcase (aref (symbol-name modif) 0)) ?-)))) - (event-modifiers char) "") - (string (event-basic-type char))))) + (let ((c (event-basic-type char))) + (concat + "?" + (mapconcat + (lambda (modif) + (cond ((eq modif 'super) "\\s-") + (t (string ?\\ (upcase (aref (symbol-name modif) 0)) ?-)))) + (event-modifiers char) "") + (cond + ((memq c '(?\; ?\( ?\) ?\{ ?\} ?\[ ?\] ?\" ?\' ?\\)) (string ?\\ c)) + ((eq c 127) "\\C-?") + (t (string c))))))) (defun eval-last-sexp-1 (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in minibuffer. @@ -512,27 +517,30 @@ With argument, print output into current buffer." expr 'args))))) expr))))))) - (let ((unabbreviated (let ((print-length nil) (print-level nil)) - (prin1-to-string value))) - (print-length eval-expression-print-length) - (print-level eval-expression-print-level) - (char-string (prin1-char value)) - (beg (point)) - end) - (prog1 - (prin1 value) - (if (and (eq standard-output t) char-string) - (princ (concat " = " char-string))) - (setq end (point)) - (when (and (bufferp standard-output) - (or (not (null print-length)) - (not (null print-level))) - (not (string= unabbreviated - (buffer-substring-no-properties beg end)))) - (last-sexp-setup-props beg end value - unabbreviated - (buffer-substring-no-properties beg end)) - )))))) + (eval-last-sexp-print-value value)))) + +(defun eval-last-sexp-print-value (value) + (let ((unabbreviated (let ((print-length nil) (print-level nil)) + (prin1-to-string value))) + (print-length eval-expression-print-length) + (print-level eval-expression-print-level) + (char-string (prin1-char value)) + (beg (point)) + end) + (prog1 + (prin1 value) + (if (and (eq standard-output t) char-string) + (princ (concat " = " char-string))) + (setq end (point)) + (when (and (bufferp standard-output) + (or (not (null print-length)) + (not (null print-level))) + (not (string= unabbreviated + (buffer-substring-no-properties beg end)))) + (last-sexp-setup-props beg end value + unabbreviated + (buffer-substring-no-properties beg end)) + )))) (defun eval-last-sexp (eval-last-sexp-arg-internal) @@ -663,8 +671,8 @@ which see." ;; This function just forces a more costly detection of comments (using ;; parse-partial-sexp from beginning-of-defun). I.e. It avoids the problem of ;; taking a `;' inside a string started on another line for a comment starter. -;; Note: `newcomment' gets it right in 99% of the cases if you're using -;; font-lock, anyway, so we could get rid of it. -stef +;; Note: `newcomment' gets it right now since we set comment-use-global-state +;; so we could get rid of it. -stef (defun lisp-mode-auto-fill () (if (> (current-column) (current-fill-column)) (if (save-excursion @@ -1167,4 +1175,5 @@ means don't indent that line." (provide 'lisp-mode) +;;; arch-tag: 414c7f93-c245-4b77-8ed5-ed05ef7ff1bf ;;; lisp-mode.el ends here diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index c6ec7cf5b9..e1ed508b86 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -1,6 +1,6 @@ ;;; lisp.el --- Lisp editing commands for Emacs -;; Copyright (C) 1985, 1986, 1994, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1985, 86, 1994, 2000, 2004 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: lisp, languages @@ -157,8 +157,9 @@ normal recipe (see `beginning-of-defun'). Major modes can define this if defining `defun-prompt-regexp' is not sufficient to handle the mode's needs. -The function should go to the line on which the current defun starts, -and return non-nil, or should return nil if it can't find the beginning.") +The function (of no args) should go to the line on which the current +defun starts, and return non-nil, or should return nil if it can't +find the beginning.") (defun beginning-of-defun (&optional arg) "Move backward to the beginning of a defun. @@ -187,7 +188,12 @@ If variable `beginning-of-defun-function' is non-nil, its value is called as a function to find the defun's beginning." (interactive "p") (if beginning-of-defun-function - (funcall beginning-of-defun-function) + (if (> (setq arg (or arg 1)) 0) + (dotimes (i arg) + (funcall beginning-of-defun-function)) + ;; Better not call end-of-defun-function directly, in case + ;; it's not defined. + (end-of-defun (- arg))) (and arg (< arg 0) (not (eobp)) (forward-char 1)) (and (re-search-backward (if defun-prompt-regexp (concat (if open-paren-in-column-0-is-defun-start @@ -217,12 +223,17 @@ matches the open-parenthesis that starts a defun; see function If variable `end-of-defun-function' is non-nil, its value is called as a function to find the defun's end." (interactive "p") + (if (or (null arg) (= arg 0)) (setq arg 1)) (if end-of-defun-function - (funcall end-of-defun-function) - (if (or (null arg) (= arg 0)) (setq arg 1)) + (if (> arg 0) + (dotimes (i arg) + (funcall end-of-defun-function)) + ;; Better not call beginning-of-defun-function + ;; directly, in case it's not defined. + (beginning-of-defun (- arg))) (let ((first t)) (while (and (> arg 0) (< (point) (point-max))) - (let ((pos (point)) npos) + (let ((pos (point))) (while (progn (if (and first (progn @@ -266,10 +277,14 @@ already marked." (end-of-defun) (point)))) (t + ;; Do it in this order for the sake of languages with nested + ;; functions where several can end at the same place as with + ;; the offside rule, e.g. Python. (push-mark (point)) - (end-of-defun) - (push-mark (point) nil t) (beginning-of-defun) + (push-mark (point) nil t) + (end-of-defun) + (exchange-point-and-mark) (re-search-backward "^\n" (- (point) 1) t)))) (defun narrow-to-defun (&optional arg) @@ -279,10 +294,13 @@ Optional ARG is ignored." (interactive) (save-excursion (widen) - (end-of-defun) - (let ((end (point))) - (beginning-of-defun) - (narrow-to-region (point) end)))) + ;; Do it in this order for the sake of languages with nested + ;; functions where several can end at the same place as with the + ;; offside rule, e.g. Python. + (beginning-of-defun) + (let ((beg (point))) + (end-of-defun) + (narrow-to-region beg (point))))) (defun insert-parentheses (arg) "Enclose following ARG sexps in parentheses. Leave point after open-paren. @@ -445,4 +463,5 @@ considered." (display-completion-list list))) (message "Making completion list...%s" "done"))))))) +;;; arch-tag: aa7fa8a4-2e6f-4e9b-9cd9-fef06340e67e ;;; lisp.el ends here diff --git a/lisp/emacs-lisp/lmenu.el b/lisp/emacs-lisp/lmenu.el index b97b3577ed..ab29ed972f 100644 --- a/lisp/emacs-lisp/lmenu.el +++ b/lisp/emacs-lisp/lmenu.el @@ -436,4 +436,5 @@ BEFORE, if provided, is the name of a menu before which this menu should (provide 'lmenu) +;;; arch-tag: 7051c396-2837-435a-ae11-b2d2e2af8fc1 ;;; lmenu.el ends here diff --git a/lisp/emacs-lisp/lselect.el b/lisp/emacs-lisp/lselect.el index 693e6474f0..b292eefbae 100644 --- a/lisp/emacs-lisp/lselect.el +++ b/lisp/emacs-lisp/lselect.el @@ -232,4 +232,5 @@ the kill ring or the Clipboard." (provide 'lselect) +;;; arch-tag: 92fa54d4-c5d1-4e9b-ad58-cf1e13930556 ;;; lselect.el ends here diff --git a/lisp/emacs-lisp/lucid.el b/lisp/emacs-lisp/lucid.el index d039fcea9c..80e5ef330d 100644 --- a/lisp/emacs-lisp/lucid.el +++ b/lisp/emacs-lisp/lucid.el @@ -263,4 +263,5 @@ This is an XEmacs compatibility function." (provide 'lucid) +;;; arch-tag: 80f9ab46-0b36-4151-86ed-3edb6d449c9e ;;; lucid.el ends here diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el new file mode 100644 index 0000000000..b5a279bbbf --- /dev/null +++ b/lisp/emacs-lisp/macroexp.el @@ -0,0 +1,197 @@ +;;; macroexp.el --- Additional macro-expansion support +;; +;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +;; +;; Author: Miles Bader +;; Keywords: lisp, compiler, macros + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: +;; +;; This file contains macro-expansions functions that are not defined in +;; the Lisp core, namely `macroexpand-all', which expands all macros in +;; a form, not just a top-level one. +;; + +;;; Code: + +;; Bound by the top-level `macroexpand-all', and modified to include any +;; macros defined by `defmacro'. +(defvar macroexpand-all-environment nil) + +(defun maybe-cons (car cdr original-cons) + "Return (CAR . CDR), using ORIGINAL-CONS if possible." + (if (and (eq car (car original-cons)) (eq cdr (cdr original-cons))) + original-cons + (cons car cdr))) + +;; We use this special macro to iteratively process forms and share list +;; structure of the result with the input. Doing so recursively using +;; `maybe-cons' results in excessively deep recursion for very long +;; input forms. +(defmacro macroexp-accumulate (#1=#:\(var\ list\) &rest body) + "Return a list of the results of evaluating BODY for each element of LIST. +Evaluate BODY with VAR bound to each `car' from LIST, in turn. +Return a list of the values of the final form in BODY. +The list structure of the result will share as much with LIST as +possible (for instance, when BODY just returns VAR unchanged, the +result will be eq to LIST)." + (let ((var (car #1#)) + (list (cadr #1#)) + (shared (make-symbol "shared")) + (unshared (make-symbol "unshared")) + (tail (make-symbol "tail")) + (new-el (make-symbol "new-el"))) + `(let* ((,shared ,list) + (,unshared nil) + (,tail ,shared) + ,var ,new-el) + (while ,tail + (setq ,var (car ,tail) + ,new-el (progn ,@body)) + (unless (eq ,var ,new-el) + (while (not (eq ,shared ,tail)) + (push (pop ,shared) ,unshared)) + (setq ,shared (cdr ,shared)) + (push ,new-el ,unshared)) + (setq ,tail (cdr ,tail))) + (nconc (nreverse ,unshared) ,shared)))) +(put 'macroexp-accumulate 'lisp-indent-function 1) + +(defun macroexpand-all-forms (forms &optional skip) + "Return FORMS with macros expanded. FORMS is a list of forms. +If SKIP is non-nil, then don't expand that many elements at the start of +FORMS." + (macroexp-accumulate (form forms) + (if (or (null skip) (zerop skip)) + (macroexpand-all-1 form) + (setq skip (1- skip)) + form))) + +(defun macroexpand-all-clauses (clauses &optional skip) + "Return CLAUSES with macros expanded. +CLAUSES is a list of lists of forms; any clause that's not a list is ignored. +If SKIP is non-nil, then don't expand that many elements at the start of +each clause." + (macroexp-accumulate (clause clauses) + (if (listp clause) + (macroexpand-all-forms clause skip) + clause))) + +(defun macroexpand-all-1 (form) + "Expand all macros in FORM. +This is an internal version of `macroexpand-all'. +Assumes the caller has bound `macroexpand-all-environment'." + (if (and (listp form) (eq (car form) 'backquote-list*)) + ;; Special-case `backquote-list*', as it is normally a macro that + ;; generates exceedingly deep expansions from relatively shallow input + ;; forms. We just process it `in reverse' -- first we expand all the + ;; arguments, _then_ we expand the top-level definition. + (macroexpand (macroexpand-all-forms form 1) + macroexpand-all-environment) + ;; Normal form; get its expansion, and then expand arguments. + (setq form (macroexpand form macroexpand-all-environment)) + (if (consp form) + (let ((fun (car form))) + (cond + ((eq fun 'cond) + (maybe-cons fun (macroexpand-all-clauses (cdr form)) form)) + ((eq fun 'condition-case) + (maybe-cons + fun + (maybe-cons (cadr form) + (maybe-cons (macroexpand-all-1 (nth 2 form)) + (macroexpand-all-clauses (nthcdr 3 form) 1) + (cddr form)) + (cdr form)) + form)) + ((eq fun 'defmacro) + (push (cons (cadr form) (cons 'lambda (cddr form))) + macroexpand-all-environment) + (macroexpand-all-forms form 3)) + ((eq fun 'defun) + (macroexpand-all-forms form 3)) + ((memq fun '(defvar defconst)) + (macroexpand-all-forms form 2)) + ((eq fun 'function) + (if (and (consp (cadr form)) (eq (car (cadr form)) 'lambda)) + (maybe-cons fun + (maybe-cons (macroexpand-all-forms (cadr form) 2) + nil + (cadr form)) + form) + form)) + ((memq fun '(let let*)) + (maybe-cons fun + (maybe-cons (macroexpand-all-clauses (cadr form) 1) + (macroexpand-all-forms (cddr form)) + (cdr form)) + form)) + ((eq fun 'quote) + form) + ((and (consp fun) (eq (car fun) 'lambda)) + ;; embedded lambda + (maybe-cons (macroexpand-all-forms fun 2) + (macroexpand-all-forms (cdr form)) + form)) + ;; The following few cases are for normal function calls that + ;; are known to funcall one of their arguments. The byte + ;; compiler has traditionally handled these functions specially + ;; by treating a lambda expression quoted by `quote' as if it + ;; were quoted by `function'. We make the same transformation + ;; here, so that any code that cares about the difference will + ;; see the same transformation. + ;; First arg is a function: + ((and (memq fun '(apply mapcar mapatoms mapconcat mapc)) + (consp (cadr form)) + (eq (car (cadr form)) 'quote)) + ;; We don't use `maybe-cons' since there's clearly a change. + (cons fun + (cons (macroexpand-all-1 (cons 'function (cdr (cadr form)))) + (macroexpand-all-forms (cddr form))))) + ;; Second arg is a function: + ((and (eq fun 'sort) + (consp (nth 2 form)) + (eq (car (nth 2 form)) 'quote)) + ;; We don't use `maybe-cons' since there's clearly a change. + (cons fun + (cons (macroexpand-all-1 (cadr form)) + (cons (macroexpand-all-1 + (cons 'function (cdr (nth 2 form)))) + (macroexpand-all-forms (nthcdr 3 form)))))) + (t + ;; For everything else, we just expand each argument (for + ;; setq/setq-default this works alright because the variable names + ;; are symbols). + (macroexpand-all-forms form 1)))) + form))) + +;;;###autoload +(defun macroexpand-all (form &optional environment) + "Return result of expanding macros at all levels in FORM. +If no macros are expanded, FORM is returned unchanged. +The second optional arg ENVIRONMENT specifies an environment of macro +definitions to shadow the loaded ones for use in file byte-compilation." + (let ((macroexpand-all-environment environment)) + (macroexpand-all-1 form))) + +(provide 'macroexp) + +;;; arch-tag: af9b8c24-c196-43bc-91e1-a3570790fa5a +;;; macroexp.el ends here diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 2fa97f163d..1f493e746f 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -261,4 +261,5 @@ the current %s and exit." ;; Return the number of actions that were taken. actions)) +;;; arch-tag: 1d0a3201-a151-4c10-b231-4da47c9e6dc3 ;;; map-ynp.el ends here diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 2e54f224a4..c93868859f 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -1,6 +1,6 @@ ;;; pp.el --- pretty printer for Emacs Lisp -;; Copyright (C) 1989, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1993, 2001, 2004 Free Software Foundation, Inc. ;; Author: Randal Schwartz ;; Keywords: lisp @@ -120,12 +120,10 @@ in the variable `values'." (message "%s" (buffer-substring (point-min) (point))) )))))) (with-output-to-temp-buffer "*Pp Eval Output*" - (pp (car values))) - (save-excursion - (set-buffer "*Pp Eval Output*") - (emacs-lisp-mode) - (make-local-variable 'font-lock-verbose) - (setq font-lock-verbose nil)))) + (pp (car values)) + (with-current-buffer standard-output + (emacs-lisp-mode) + (set (make-local-variable 'font-lock-verbose) nil))))) ;;;###autoload (defun pp-eval-last-sexp (arg) @@ -167,4 +165,5 @@ Ignores leading comment characters." (provide 'pp) ; so (require 'pp) works +;;; arch-tag: b0f7c65b-02c7-42bb-9ee3-508a59b8fbb9 ;;; pp.el ends here diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 8740a68911..9c904e6c0b 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -682,4 +682,5 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions." (provide 're-builder) +;;; arch-tag: 5c5515ac-4085-4524-a421-033f44f032e7 ;;; re-builder.el ends here diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index c85f83e85e..33aad74582 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -307,4 +307,5 @@ in REGEXP." (provide 'regexp-opt) +;;; arch-tag: 6c5a66f4-29af-4fd6-8c3b-4b554d5b4370 ;;; regexp-opt.el ends here diff --git a/lisp/emacs-lisp/regi.el b/lisp/emacs-lisp/regi.el index c0cae5b577..ae9151585f 100644 --- a/lisp/emacs-lisp/regi.el +++ b/lisp/emacs-lisp/regi.el @@ -255,4 +255,5 @@ useful information: (provide 'regi) +;;; arch-tag: 804b4e45-4109-4f76-9a88-21887b881747 ;;; regi.el ends here diff --git a/lisp/emacs-lisp/ring.el b/lisp/emacs-lisp/ring.el index 6891619c20..fce07953ba 100644 --- a/lisp/emacs-lisp/ring.el +++ b/lisp/emacs-lisp/ring.el @@ -162,4 +162,5 @@ will be performed." (provide 'ring) +;;; arch-tag: e707682b-ed69-47c9-b20f-cf2c68cc92d2 ;;; ring.el ends here diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index 3ac3538822..6656cf5ed3 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -1,6 +1,6 @@ ;;; rx.el --- sexp notation for regular expressions -;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. ;; Author: Gerd Moellmann ;; Maintainer: FSF @@ -120,6 +120,7 @@ (optional . zero-or-one) (minimal-match . (rx-greedy 1 1)) (maximal-match . (rx-greedy 1 1)) + (backref . (rx-backref 1 1 rx-check-backref)) (line-start . "^") (line-end . "$") (string-start . "\\`") @@ -175,7 +176,9 @@ all arguments must satisfy PREDICATE.") (escape . ?\\) (character-quote . ?/) (comment-start . ?<) - (comment-end . ?>)) + (comment-end . ?>) + (string-delimiter . ?|) + (comment-delimiter . ?!)) "Alist mapping Rx syntax symbols to syntax characters. Each entry has the form (SYMBOL . CHAR), where SYMBOL is a valid symbol in `(syntax SYMBOL)', and CHAR is the syntax character @@ -204,6 +207,7 @@ regular expressions.") (japanese-katakana-two-byte . ?K) (korean-hangul-two-byte . ?N) (cyrillic-two-byte . ?Y) + (combining-diacritic . ?^) (ascii . ?a) (arabic . ?b) (chinese . ?c) @@ -255,16 +259,16 @@ See also `rx-constituents'." (type-pred (nth 3 rx))) (when (and (not (null min-args)) (< nargs min-args)) - (error "Rx form `%s' requires at least %d args" + (error "rx form `%s' requires at least %d args" (car form) min-args)) (when (and (not (null max-args)) (> nargs max-args)) - (error "Rx form `%s' accepts at most %d args" + (error "rx form `%s' accepts at most %d args" (car form) max-args)) (when (not (null type-pred)) (dolist (sub-form (cdr form)) (unless (funcall type-pred sub-form) - (error "Rx form `%s' requires args satisfying `%s'" + (error "rx form `%s' requires args satisfying `%s'" (car form) type-pred)))))) @@ -286,9 +290,11 @@ FORM is of the form `(and FORM1 ...)'." (dolist (arg (cdr form)) (unless (stringp arg) (setq all-args-strings nil))) - (if all-args-strings - (regexp-opt (cdr form)) - (mapconcat #'rx-to-string (cdr form) "\\|")))) + (concat "\\(?:" + (if all-args-strings + (regexp-opt (cdr form)) + (mapconcat #'rx-to-string (cdr form) "\\|")) + "\\)"))) (defun rx-quote-for-set (string) @@ -308,10 +314,10 @@ If STRING starts with a '^', move it to the end." "Check arg ARG for Rx `any'." (cond ((integerp arg) t) ((and (stringp arg) (zerop (length arg))) - (error "String arg for Rx `any' must not be empty")) + (error "String arg for rx `any' must not be empty")) ((stringp arg) t) (t - (error "Rx `any' requires string or character arg")))) + (error "rx `any' requires string or character arg")))) (defun rx-any (form) @@ -328,22 +334,23 @@ matches anything." (concat "[" (rx-quote-for-set (cadr form)) "]"))))) -(defun rx-check-not (form) - "Check arguments of FORM. FORM is `(not ...)'." +(defun rx-check-not (arg) + "Check arg ARG for Rx `not'." (unless (or (memq form '(digit control hex-digit blank graphic printing alphanumeric letter ascii nonascii lower punctuation space upper word)) (and (consp form) (memq (car form) '(not any in syntax category:)))) - (error "Rx `not' syntax error: %s" form)) + (error "rx `not' syntax error: %s" form)) t) (defun rx-not (form) "Parse and produce code from FORM. FORM is `(not ...)'." (rx-check form) - (let ((result (rx-to-string (cadr form) 'no-group))) + (let ((result (rx-to-string (cadr form) 'no-group)) + case-fold-search) (cond ((string-match "\\`\\[^" result) (if (= (length result) 4) (substring result 2 3) @@ -373,14 +380,14 @@ FORM is either `(repeat N FORM1)' or `(repeat N M FORM1)'." (cond ((= (length form) 3) (unless (and (integerp (nth 1 form)) (> (nth 1 form) 0)) - (error "Rx `repeat' requires positive integer first arg")) + (error "rx `repeat' requires positive integer first arg")) (format "%s\\{%d\\}" (rx-to-string (nth 2 form)) (nth 1 form))) ((or (not (integerp (nth 2 form))) (< (nth 2 form) 0) (not (integerp (nth 1 form))) (< (nth 1 form) 0) (< (nth 2 form) (nth 1 form))) - (error "Rx `repeat' range error")) + (error "rx `repeat' range error")) (t (format "%s\\{%d,%d\\}" (rx-to-string (nth 3 form)) (nth 1 form) (nth 2 form))))) @@ -393,6 +400,16 @@ FORM is either `(repeat N FORM1)' or `(repeat N M FORM1)'." (cdr form) nil) "\\)")) +(defun rx-backref (form) + "Parse and produce code from FORM, which is `(backref N)'." + (rx-check form) + (format "\\%d" (nth 1 form))) + +(defun rx-check-backref (arg) + "Check arg ARG for Rx `backref'." + (or (and (integerp arg) (>= arg 1) (<= arg 9)) + (error "rx `backref' requires numeric 1<=arg<=9: %s" arg))) + (defun rx-kleene (form) "Parse and produce code from FORM. FORM is `(OP FORM1)', where OP is one of the `zero-or-one', @@ -481,10 +498,10 @@ of all atomic regexps." (defun rx-greedy (form) - "Parse and produce code from FORM. If FORM is '(minimal-match -FORM1)', non-greedy versions of `*', `+', and `?' operators will be -used in FORM1. If FORM is '(maximal-match FORM1)', greedy operators -will be used." + "Parse and produce code from FORM. +If FORM is '(minimal-match FORM1)', non-greedy versions of `*', +`+', and `?' operators will be used in FORM1. If FORM is +'(maximal-match FORM1)', greedy operators will be used." (rx-check form) (let ((rx-greedy-flag (eq (car form) 'maximal-match))) (rx-to-string (cadr form)))) @@ -510,19 +527,19 @@ NO-GROUP non-nil means don't put shy groups around the result." (cond ((stringp info) info) ((null info) - (error "Unknown Rx form `%s'" form)) + (error "Unknown rx form `%s'" form)) (t (funcall (nth 0 info) form))))) ((consp form) (let ((info (rx-info (car form)))) (unless (consp info) - (error "Unknown Rx form `%s'" (car form))) + (error "Unknown rx form `%s'" (car form))) (let ((result (funcall (nth 0 info) form))) (if (or no-group (string-match "\\`\\\\[(]" result)) result (concat "\\(?:" result "\\)"))))) (t - (error "Rx syntax error at `%s'" form)))) + (error "rx syntax error at `%s'" form)))) ;;;###autoload @@ -663,6 +680,8 @@ CHAR `character-quote' (\\s/) `comment-start' (\\s<) `comment-end' (\\s>) + `string-delimiter' (\\s|) + `comment-delimiter' (\\s!) `(not (syntax SYNTAX))' matches a character that has not syntax SYNTAX. @@ -691,6 +710,7 @@ CHAR `japanese-katakana-two-byte' (\\cK) `korean-hangul-two-byte' (\\cN) `cyrillic-two-byte' (\\cY) + `combining-diacritic' (\\c^) `ascii' (\\ca) `arabic' (\\cb) `chinese' (\\cc) @@ -730,7 +750,7 @@ CHAR `(minimal-match SEXP)' produce a non-greedy regexp for SEXP. Normally, regexps matching - zero or more occurrances of something are \"greedy\" in that they + zero or more occurrences of something are \"greedy\" in that they match as much as they can, as long as the overall regexp can still match. A non-greedy regexp matches as little as possible. @@ -779,16 +799,22 @@ CHAR `(repeat N M SEXP)' matches N to M occurrences of what SEXP matches. +`(backref N)' + matches what was matched previously by submatch N. + +`(backref N)' + matches what was matched previously by submatch N. + `(eval FORM)' - evaluate FORM and insert result. If result is a string, - `regexp-quote' it. + evaluate FORM and insert result. If result is a string, + `regexp-quote' it. `(regexp REGEXP)' - include REGEXP in string notation in the result." - - `(rx-to-string ',regexp)) + include REGEXP in string notation in the result." + (rx-to-string regexp)) (provide 'rx) +;;; arch-tag: 12d01a63-0008-42bb-ab8c-1c7d63be370b ;;; rx.el ends here diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index 82230b1d2e..eeaaa7ffc0 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -161,7 +161,7 @@ See the documentation for `list-load-path-shadows' for further information." ;; sizes. (and (= (nth 7 (file-attributes f1)) (nth 7 (file-attributes f2))) - (zerop (call-process "cmp" nil nil nil "-s" f1 f2)))))))) + (eq 0 (call-process "cmp" nil nil nil "-s" f1 f2)))))))) ;;;###autoload (defun list-load-path-shadows () @@ -257,4 +257,5 @@ version unless you know what you are doing.\n") (provide 'shadow) +;;; arch-tag: 0480e8a7-62ed-4a12-a9f6-f44ded9b0830 ;;; shadow.el ends here diff --git a/lisp/emacs-lisp/sregex.el b/lisp/emacs-lisp/sregex.el index 1200e7b3c3..3f7aaa16bc 100644 --- a/lisp/emacs-lisp/sregex.el +++ b/lisp/emacs-lisp/sregex.el @@ -605,4 +605,5 @@ has one of the following forms: (provide 'sregex) +;;; arch-tag: 460c1f5a-eb6e-42ec-a451-ffac78bdf492 ;;; sregex.el ends here diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index 7bd8378ab8..793306adda 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -289,4 +289,6 @@ Point is at POS when this function returns." ;; (syntax-ppss-depth (syntax-ppss)))) (provide 'syntax) + +;;; arch-tag: 302f1eeb-e77c-4680-a8c5-c543e01161a5 ;;; syntax.el ends here diff --git a/lisp/emacs-lisp/tcover-ses.el b/lisp/emacs-lisp/tcover-ses.el new file mode 100644 index 0000000000..48ec9fa64d --- /dev/null +++ b/lisp/emacs-lisp/tcover-ses.el @@ -0,0 +1,712 @@ +;;;; testcover-ses.el -- Example use of `testcover' to test "SES" + +;; Copyright (C) 2002 Free Software Foundation, Inc. + +;; Author: Jonathan Yavner +;; Maintainer: Jonathan Yavner +;; Keywords: spreadsheet lisp utility + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +(require 'testcover) + +;;;Here are some macros that exercise SES. Set `pause' to t if you want the +;;;macros to pause after each step. +(let* ((pause nil) + (x (if pause "q" "")) + (y "ses-test.ses\r<")) + ;;Fiddle with the existing spreadsheet + (fset 'ses-exercise-example + (concat "" data-directory "ses-example.ses\r<" + x "10" + x " " + x "" + x "pses-center\r" + x "p\r" + x "\t\t" + x "\r A9 B9\r" + x "" + x "\r 2\r" + x "" + x "50\r" + x "4" + x " " + x "" + x "(+ o\0" + x "-1o \r" + x "" + x)) + ;;Create a new spreadsheet + (fset 'ses-exercise-new + (concat y + x "\"%.8g\"\r" + x "2\r" + x "" + x "" + x "2" + x "\"Header\r" + x "(sqrt 1\r" + x "pses-center\r" + x "\t" + x "(+ A2 A3\r" + x "(* B2 A3\r" + x "2" + x "\rB3\r" + x "" + x)) + ;;Basic cell display + (fset 'ses-exercise-display + (concat y ":(revert-buffer t t)\r" + x "" + x "\"Very long\r" + x "w3\r" + x "w3\r" + x "(/ 1 0\r" + x "234567\r" + x "5w" + x "\t1\r" + x "" + x "234567\r" + x "\t" + x "" + x "345678\r" + x "3w" + x "\0>" + x "" + x "" + x "" + x "" + x "" + x "" + x "" + x "1\r" + x "" + x "" + x "\"1234567-1234567-1234567\r" + x "123\r" + x "2" + x "\"1234567-1234567-1234567\r" + x "123\r" + x "w8\r" + x "\"1234567\r" + x "w5\r" + x)) + ;;Cell formulas + (fset 'ses-exercise-formulas + (concat y ":(revert-buffer t t)\r" + x "\t\t" + x "\t" + x "(* B1 B2 D1\r" + x "(* B2 B3\r" + x "(apply '+ (ses-range B1 B3)\r" + x "(apply 'ses+ (ses-range B1 B3)\r" + x "(apply 'ses+ (ses-range A2 A3)\r" + x "(mapconcat'number-to-string(ses-range B2 B4) \"-\"\r" + x "(apply 'concat (reverse (ses-range A3 D3))\r" + x "(* (+ A2 A3) (ses+ B2 B3)\r" + x "" + x "2" + x "5\t" + x "(apply 'ses+ (ses-range E1 E2)\r" + x "(apply 'ses+ (ses-range A5 B5)\r" + x "(apply 'ses+ (ses-range E1 F1)\r" + x "(apply 'ses+ (ses-range D1 E1)\r" + x "\t" + x "(ses-average (ses-range A2 A5)\r" + x "(apply 'ses+ (ses-range A5 A6)\r" + x "k" + x " " + x "" + x "2" + x "3 " + x "o" + x "2o" + x "3k" + x "(ses-average (ses-range B3 E3)\r" + x "k" + x "12345678\r" + x)) + ;;Recalculating and reconstructing + (fset 'ses-exercise-recalc + (concat y ":(revert-buffer t t)\r" + x " " + x "\t\t" + x "" + x "(/ 1 0\r" + x "" + x "\n" + x "" + x "\"%.6g\"\r" + x " " + x ">nw" + x "\0>xdelete-region\r" + x " " + x "8" + x "\0>xdelete-region\r" + x " " + x "" + x " k" + x " " + x "\"Very long\r" + x "" + x "\r\r" + x "" + x "o" + x "" + x "\"Very long2\r" + x "o" + x "" + x "\rC3\r" + x "\rC2\r" + x "\0" + x "\rC4\r" + x "\rC2\r" + x "\0" + x "" + x "xses-mode\r" + x "<" + x "2k" + x)) + ;;Header line + (fset 'ses-exercise-header-row + (concat y ":(revert-buffer t t)\r" + x "<" + x ">" + x "6<" + x ">" + x "7<" + x ">" + x "8<" + x "2<" + x ">" + x "3w" + x "10<" + x ">" + x "2 " + x)) + ;;Detecting unsafe formulas and printers + (fset 'ses-exercise-unsafe + (concat y ":(revert-buffer t t)\r" + x "p(lambda (x) (delete-file x))\rn" + x "p(lambda (x) (delete-file \"ses-nothing\"))\ry" + x "\0n" + x "(delete-file \"x\"\rn" + x "(delete-file \"ses-nothing\"\ry" + x "\0n" + x "(open-network-stream \"x\" nil \"localhost\" \"smtp\"\ry" + x "\0n" + x)) + ;;Inserting and deleting rows + (fset 'ses-exercise-rows + (concat y ":(revert-buffer t t)\r" + x "" + x "\"%s=\"\r" + x "20" + x "p\"%s+\"\r" + x "" + x "123456789\r" + x "\021" + x "" + x " " + x "(not B25\r" + x "k" + x "jA3\r" + x "19 " + x " " + x "100" ;Make this approx your CPU speed in MHz + x)) + ;;Inserting and deleting columns + (fset 'ses-exercise-columns + (concat y ":(revert-buffer t t)\r" + x "\"%s@\"\r" + x "o" + x "" + x "o" + x " " + x "k" + x "w8\r" + x "p\"%.7s*\"\r" + x "o" + x "" + x "2o" + x "3k" + x "\"%.6g\"\r" + x "26o" + x "\026\t" + x "26o" + x "0\r" + x "26\t" + x "400" + x "50k" + x "\0D" + x)) + (fset 'ses-exercise-editing + (concat y ":(revert-buffer t t)\r" + x "1\r" + x "('x\r" + x "" + x "" + x "\r\r" + x "w9\r" + x "\r.5\r" + x "\r 10\r" + x "w12\r" + x "\r'\r" + x "\r\r" + x "jA4\r" + x "(+ A2 100\r" + x "3\r" + x "jB1\r" + x "(not A1\r" + x "\"Very long\r" + x "" + x "h" + x "H" + x "" + x ">\t" + x "" + x "" + x "2" + x "" + x "o" + x "h" + x "\0" + x "\"Also very long\r" + x "H" + x "\0'\r" + x "'Trial\r" + x "'qwerty\r" + x "(concat o<\0" + x "-1o\r" + x "(apply '+ o<\0-1o\r" + x "2" + x "-2" + x "-2" + x "2" + x " " + x "H" + x "\0" + x "\"Another long one\r" + x "H" + x "" + x "<" + x "" + x ">" + x "\0" + x)) + ;;Sorting of columns + (fset 'ses-exercise-sort-column + (concat y ":(revert-buffer t t)\r" + x "\"Very long\r" + x "99\r" + x "o13\r" + x "(+ A3 B3\r" + x "7\r8\r(* A4 B4\r" + x "\0A\r" + x "\0B\r" + x "\0C\r" + x "o" + x "\0C\r" + x)) + ;;Simple cell printers + (fset 'ses-exercise-cell-printers + (concat y ":(revert-buffer t t)\r" + x "\"4\t76\r" + x "\"4\n7\r" + x "p\"{%S}\"\r" + x "p(\"[%s]\")\r" + x "p(\"<%s>\")\r" + x "\0" + x "p\r" + x "pnil\r" + x "pses-dashfill\r" + x "48\r" + x "\t" + x "\0p\r" + x "p\r" + x "pses-dashfill\r" + x "\0pnil\r" + x "5\r" + x "pses-center\r" + x "\"%s\"\r" + x "w8\r" + x "p\r" + x "p\"%.7g@\"\r" + x "\r" + x "\"%.6g#\"\r" + x "\"%.6g.\"\r" + x "\"%.6g.\"\r" + x "pidentity\r" + x "6\r" + x "\"UPCASE\r" + x "pdowncase\r" + x "(* 3 4\r" + x "p(lambda (x) '(\"Hi\"))\r" + x "p(lambda (x) '(\"Bye\"))\r" + x)) + ;;Spanning cell printers + (fset 'ses-exercise-spanning-printers + (concat y ":(revert-buffer t t)\r" + x "p\"%.6g*\"\r" + x "pses-dashfill-span\r" + x "5\r" + x "pses-tildefill-span\r" + x "\"4\r" + x "p\"$%s\"\r" + x "p(\"$%s\")\r" + x "8\r" + x "p(\"!%s!\")\r" + x "\t\"12345678\r" + x "pses-dashfill-span\r" + x "\"23456789\r" + x "\t" + x "(not t\r" + x "w6\r" + x "\"5\r" + x "o" + x "k" + x "k" + x "\t" + x "" + x "o" + x "2k" + x "k" + x)) + ;;Cut/copy/paste - within same buffer + (fset 'ses-exercise-paste-1buf + (concat y ":(revert-buffer t t)\r" + x "\0w" + x "" + x "o" + x "\"middle\r" + x "\0" + x "w" + x "\0" + x "w" + x "" + x "" + x "2y" + x "y" + x "y" + x ">" + x "y" + x ">y" + x "<" + x "p\"<%s>\"\r" + x "pses-dashfill\r" + x "\0" + x "" + x "" + x "y" + x "\r\0w" + x "\r" + x "3(+ G2 H1\r" + x "\0w" + x ">" + x "" + x "8(ses-average (ses-range G2 H2)\r" + x "\0k" + x "7" + x "" + x "(ses-average (ses-range E7 E9)\r" + x "\0 " + x "" + x "(ses-average (ses-range E7 F7)\r" + x "\0k" + x "" + x "(ses-average (ses-range D6 E6)\r" + x "\0k" + x "" + x "2" + x "\"Line A\r" + x "pses-tildefill-span\r" + x "\"Subline A(1)\r" + x "pses-dashfill-span\r" + x "\0w" + x "" + x "" + x "\0w" + x "" + x)) + ;;Cut/copy/paste - between two buffers + (fset 'ses-exercise-paste-2buf + (concat y ":(revert-buffer t t)\r" + x "o\"middle\r\0" + x "" + x "4bses-test.txt\r" + x " " + x "\"xxx\0" + x "wo" + x "" + x "" + x "o\"\0" + x "wo" + x "o123.45\0" + x "o" + x "o1 \0" + x "o" + x ">y" + x "o symb\0" + x "oy2y" + x "o1\t\0" + x "o" + x "w9\np\"<%s>\"\n" + x "o\n2\t\"3\nxxx\t5\n\0" + x "oy" + x)) + ;;Export text, import it back + (fset 'ses-exercise-import-export + (concat y ":(revert-buffer t t)\r" + x "\0xt" + x "4bses-test.txt\r" + x "\n-1o" + x "xTo-1o" + x "'crunch\r" + x "pses-center-span\r" + x "\0xT" + x "o\n-1o" + x "\0y" + x "\0xt" + x "\0y" + x "12345678\r" + x "'bunch\r" + x "\0xtxT" + x))) + +(defun ses-exercise-macros () + "Executes all SES coverage-test macros." + (dolist (x '(ses-exercise-example + ses-exercise-new + ses-exercise-display + ses-exercise-formulas + ses-exercise-recalc + ses-exercise-header-row + ses-exercise-unsafe + ses-exercise-rows + ses-exercise-columns + ses-exercise-editing + ses-exercise-sort-column + ses-exercise-cell-printers + ses-exercise-spanning-printers + ses-exercise-paste-1buf + ses-exercise-paste-2buf + ses-exercise-import-export)) + (message "" x) + (execute-kbd-macro x))) + +(defun ses-exercise-signals () + "Exercise code paths that lead to error signals, other than those for +spreadsheet files with invalid formatting." + (message "") + (switch-to-buffer "ses-test.ses") + (deactivate-mark) + (ses-jump 'A1) + (ses-set-curcell) + (dolist (x '((ses-column-widths 14) + (ses-column-printers "%s") + (ses-column-printers ["%s" "%s" "%s"]) ;Should be two + (ses-column-widths [14]) + (ses-delete-column -99) + (ses-delete-column 2) + (ses-delete-row -1) + (ses-goto-data 'hogwash) + (ses-header-row -56) + (ses-header-row 99) + (ses-insert-column -14) + (ses-insert-row 0) + (ses-jump 'B8) ;Covered by preceding cell + (ses-printer-validate '("%s" t)) + (ses-printer-validate '([47])) + (ses-read-header-row -1) + (ses-read-header-row 32767) + (ses-relocate-all 0 0 -1 1) + (ses-relocate-all 0 0 1 -1) + (ses-select (ses-range A1 A2) 'x (ses-range B1 B1)) + (ses-set-cell 0 0 'hogwash nil) + (ses-set-column-width 0 0) + (ses-yank-cells #("a\nb" + 0 1 (ses (A1 nil nil)) + 2 3 (ses (A3 nil nil))) + nil) + (ses-yank-cells #("ab" + 0 1 (ses (A1 nil nil)) + 1 2 (ses (A2 nil nil))) + nil) + (ses-yank-pop nil) + (ses-yank-tsf "1\t2\n3" nil) + (let ((curcell nil)) (ses-check-curcell)) + (let ((curcell 'A1)) (ses-check-curcell 'needrange)) + (let ((curcell '(A1 . A2))) (ses-check-curcell 'end)) + (let ((curcell '(A1 . A2))) (ses-sort-column "B")) + (let ((curcell '(C1 . D2))) (ses-sort-column "B")) + (execute-kbd-macro "jB10\n2") + (execute-kbd-macro [?j ?B ?9 ?\n ?\C-@ ?\C-f ?\C-f cut]) + (progn (kill-new "x") (execute-kbd-macro ">n")) + (execute-kbd-macro "\0w"))) + (condition-case nil + (progn + (eval x) + (signal 'singularity-error nil)) ;Shouldn't get here + (singularity-error (error "No error from %s?" x)) + (error nil))) + ;;Test quit-handling in ses-update-cells. Cant' use `eval' here. + (let ((inhibit-quit t)) + (setq quit-flag t) + (condition-case nil + (progn + (ses-update-cells '(A1)) + (signal 'singularity-error nil)) + (singularity-error (error "Quit failure in ses-update-cells")) + (error nil)) + (setq quit-flag nil))) + +(defun ses-exercise-invalid-spreadsheets () + "Execute code paths that detect invalid spreadsheet files." + ;;Detect invalid spreadsheets + (let ((p&d "\n\n \n(ses-cell A1 nil nil nil nil)\n\n") + (cw "(ses-column-widths [7])\n") + (cp "(ses-column-printers [ses-center])\n") + (dp "(ses-default-printer \"%.7g\")\n") + (hr "(ses-header-row 0)\n") + (p11 "(2 1 1)") + (igp ses-initial-global-parameters)) + (dolist (x (list "(1)" + "(x 2 3)" + "(1 x 3)" + "(1 -1 0)" + "(1 2 x)" + "(1 2 -1)" + "(3 1 1)" + "\n\n (2 1 1)" + "\n\n \n(ses-cell)(2 1 1)" + "\n\n \n(x)\n(2 1 1)" + "\n\n\n \n(ses-cell A2)\n(2 2 2)" + "\n\n\n \n(ses-cell B1)\n(2 2 2)" + "\n\n \n(ses-cell A1 nil nil nil nil)\n(2 1 1)" + (concat p&d "(x)\n(x)\n(x)\n(x)\n" p11) + (concat p&d "(ses-column-widths)(x)\n(x)\n(x)\n" p11) + (concat p&d cw "(x)\n(x)\n(x)\n(2 1 1)") + (concat p&d cw "(ses-column-printers)(x)\n(x)\n" p11) + (concat p&d cw cp "(x)\n(x)\n" p11) + (concat p&d cw cp "(ses-default-printer)(x)\n" p11) + (concat p&d cw cp dp "(x)\n" p11) + (concat p&d cw cp dp "(ses-header-row)" p11) + (concat p&d cw cp dp hr p11) + (concat p&d cw cp dp "\n" hr igp))) + (condition-case nil + (with-temp-buffer + (insert x) + (ses-load) + (signal 'singularity-error nil)) ;Shouldn't get here + (singularity-error (error "%S is an invalid spreadsheet!" x)) + (error nil))))) + +(defun ses-exercise-startup () + "Prepare for coverage tests" + ;;Clean up from any previous runs + (condition-case nil (kill-buffer "ses-example.ses") (error nil)) + (condition-case nil (kill-buffer "ses-test.ses") (error nil)) + (condition-case nil (delete-file "ses-test.ses") (file-error nil)) + (delete-other-windows) ;Needed for "\C-xo" in ses-exercise-editing + (setq ses-mode-map nil) ;Force rebuild + (testcover-unmark-all "ses.el") + ;;Enable + (let ((testcover-1value-functions + ;;forward-line always returns 0, for us. + ;;remove-text-properties always returns t for us. + ;;ses-recalculate-cell returns the same " " any time curcell is a cons + ;;Macros ses-dorange and ses-dotimes-msg generate code that always + ;; returns nil + (append '(forward-line remove-text-properties ses-recalculate-cell + ses-dorange ses-dotimes-msg) + testcover-1value-functions)) + (testcover-constants + ;;These maps get initialized, then never changed again + (append '(ses-mode-map ses-mode-print-map ses-mode-edit-map) + testcover-constants))) + (testcover-start "ses.el" t)) + (require 'unsafep)) ;In case user has safe-functions = t! + + +;;;######################################################################### +(defun ses-exercise () + "Executes all SES coverage tests and displays the results." + (interactive) + (ses-exercise-startup) + ;;Run the keyboard-macro tests + (let ((safe-functions nil) + (ses-initial-size '(1 . 1)) + (ses-initial-column-width 7) + (ses-initial-default-printer "%.7g") + (ses-after-entry-functions '(forward-char)) + (ses-mode-hook nil)) + (ses-exercise-macros) + (ses-exercise-signals) + (ses-exercise-invalid-spreadsheets) + ;;Upgrade of old-style spreadsheet + (with-temp-buffer + (insert " \n\n \n(ses-cell A1 nil nil nil nil)\n\n(ses-column-widths [7])\n(ses-column-printers [nil])\n(ses-default-printer \"%.7g\")\n\n( ;Global parameters (these are read first)\n 1 ;SES file-format\n 1 ;numrows\n 1 ;numcols\n)\n\n") + (ses-load)) + ;;ses-vector-delete is always called from buffer-undo-list with the same + ;;symbol as argument. We'll give it a different one here. + (let ((x [1 2 3])) + (ses-vector-delete 'x 0 0)) + ;;ses-create-header-string behaves differently in a non-window environment + ;;but we always test under windows. + (let ((window-system (not window-system))) + (scroll-left 7) + (ses-create-header-string)) + ;;Test for nonstandard after-entry functions + (let ((ses-after-entry-functions '(forward-line)) + ses-mode-hook) + (ses-read-cell 0 0 1) + (ses-read-symbol 0 0 t))) + ;;Tests with unsafep disabled + (let ((safe-functions t) + ses-mode-hook) + (message "") + (kill-buffer "ses-example.ses") + (find-file "ses-example.ses")) + ;;Checks for nonstandard default values for new spreadsheets + (let (ses-mode-hook) + (dolist (x '(("%.6g" 8 (2 . 2)) + ("%.8g" 6 (3 . 3)))) + (let ((ses-initial-size (nth 2 x)) + (ses-initial-column-width (nth 1 x)) + (ses-initial-default-printer (nth 0 x))) + (with-temp-buffer + (set-buffer-modified-p t) + (ses-mode))))) + ;;Test error-handling in command hook, outside a macro. + ;;This will ring the bell. + (let (curcell-overlay) + (ses-command-hook)) + ;;Due to use of run-with-timer, ses-command-hook sometimes gets called + ;;after we switch to another buffer. + (switch-to-buffer "*scratch*") + (ses-command-hook) + ;;Print results + (message "") + (testcover-mark-all "ses.el") + (testcover-next-mark) + ;;Cleanup + (delete-other-windows) + (kill-buffer "ses-test.txt") + ;;Could do this here: (testcover-end "ses.el") + (message "Done")) + +;;; arch-tag: 87052ba4-5cf8-46cf-9375-fe245f3360b8 +;; testcover-ses.el ends here. diff --git a/lisp/emacs-lisp/tcover-unsafep.el b/lisp/emacs-lisp/tcover-unsafep.el new file mode 100644 index 0000000000..4359209b4d --- /dev/null +++ b/lisp/emacs-lisp/tcover-unsafep.el @@ -0,0 +1,140 @@ +;;;; testcover-unsafep.el -- Use testcover to test unsafep's code coverage + +;; Copyright (C) 2002 Free Software Foundation, Inc. + +;; Author: Jonathan Yavner +;; Maintainer: Jonathan Yavner +;; Keywords: safety lisp utility + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +(require 'testcover) + +;;;These forms are all considered safe +(defconst testcover-unsafep-safe + '(((lambda (x) (* x 2)) 14) + (apply 'cdr (mapcar '(lambda (x) (car x)) y)) + (cond ((= x 4) 5) (t 27)) + (condition-case x (car y) (error (car x))) + (dolist (x y) (message "here: %s" x)) + (dotimes (x 14 (* x 2)) (message "here: %d" x)) + (let (x) (dolist (y '(1 2 3) (1+ y)) (push y x))) + (let (x) (apply '(lambda (x) (* x 2)) 14)) + (let ((x '(2))) (push 1 x) (pop x) (add-to-list 'x 2)) + (let ((x 1) (y 2)) (setq x (+ x y))) + (let ((x 1)) (let ((y (+ x 3))) (* x y))) + (let* nil (current-time)) + (let* ((x 1) (y (+ x 3))) (* x y)) + (mapcar (lambda (x &optional y &rest z) (setq y (+ x 2)) (* y 3)) '(1 2 3)) + (mapconcat #'(lambda (var) (propertize var 'face 'bold)) '("1" "2") ", ") + (setq buffer-display-count 14 mark-active t) + ;;This is not safe if you insert it into a buffer! + (propertize "x" 'display '(height (progn (delete-file "x") 1)))) + "List of forms that `unsafep' should decide are safe.") + +;;;These forms are considered unsafe +(defconst testcover-unsafep-unsafe + '(( (add-to-list x y) + . (unquoted x)) + ( (add-to-list y x) + . (unquoted y)) + ( (add-to-list 'y x) + . (global-variable y)) + ( (not (delete-file "unsafep.el")) + . (function delete-file)) + ( (cond (t (aset local-abbrev-table 0 0))) + . (function aset)) + ( (cond (t (setq unsafep-vars ""))) + . (risky-local-variable unsafep-vars)) + ( (condition-case format-alist 1) + . (risky-local-variable format-alist)) + ( (condition-case x 1 (error (setq format-alist ""))) + . (risky-local-variable format-alist)) + ( (dolist (x (sort globalvar 'car)) (princ x)) + . (function sort)) + ( (dotimes (x 14) (delete-file "x")) + . (function delete-file)) + ( (let ((post-command-hook "/tmp/")) 1) + . (risky-local-variable post-command-hook)) + ( (let ((x (delete-file "x"))) 2) + . (function delete-file)) + ( (let (x) (add-to-list 'x (delete-file "x"))) + . (function delete-file)) + ( (let (x) (condition-case y (setq x 1 z 2))) + . (global-variable z)) + ( (let (x) (condition-case z 1 (error (delete-file "x")))) + . (function delete-file)) + ( (let (x) (mapc (lambda (x) (setcar x 1)) '((1 . 2) (3 . 4)))) + . (function setcar)) + ( (let (y) (push (delete-file "x") y)) + . (function delete-file)) + ( (let* ((x 1)) (setq y 14)) + . (global-variable y)) + ( (mapc 'car (list '(1 . 2) (cons 3 4) (kill-buffer "unsafep.el"))) + . (function kill-buffer)) + ( (mapcar x y) + . (unquoted x)) + ( (mapcar '(lambda (x) (rename-file x "x")) '("unsafep.el")) + . (function rename-file)) + ( (mapconcat x1 x2 " ") + . (unquoted x1)) + ( (pop format-alist) + . (risky-local-variable format-alist)) + ( (push 1 format-alist) + . (risky-local-variable format-alist)) + ( (setq buffer-display-count (delete-file "x")) + . (function delete-file)) + ;;These are actualy safe (they signal errors) + ( (apply '(x) '(1 2 3)) + . (function (x))) + ( (let (((x))) 1) + . (variable (x))) + ( (let (1) 2) + . (variable 1)) + ) + "A-list of (FORM . REASON)... that`unsafep' should decide are unsafe.") + + +;;;######################################################################### +(defun testcover-unsafep () + "Executes all unsafep tests and displays the coverage results." + (interactive) + (testcover-unmark-all "unsafep.el") + (testcover-start "unsafep.el") + (let (save-functions) + (dolist (x testcover-unsafep-safe) + (if (unsafep x) + (error "%S should be safe" x))) + (dolist (x testcover-unsafep-unsafe) + (if (not (equal (unsafep (car x)) (cdr x))) + (error "%S should be unsafe: %s" (car x) (cdr x)))) + (setq safe-functions t) + (if (or (unsafep '(delete-file "x")) + (unsafep-function 'delete-file)) + (error "safe-functions=t should allow delete-file")) + (setq safe-functions '(setcar)) + (if (unsafep '(setcar x 1)) + (error "safe-functions=(setcar) should allow setcar")) + (if (not (unsafep '(setcdr x 1))) + (error "safe-functions=(setcar) should not allow setcdr"))) + (testcover-mark-all "unsafep.el") + (testcover-end "unsafep.el") + (message "Done")) + +;;; arch-tag: a7616c27-1998-47ae-9304-76d1439dbf29 +;; testcover-unsafep.el ends here. diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index d422a42374..547e2cbd32 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -171,14 +171,13 @@ call to one of the `testcover-1value-functions'." ;;; Add instrumentation to your module ;;;========================================================================= -;;;###autoload (defun testcover-start (filename &optional byte-compile) "Uses edebug to instrument all macros and functions in FILENAME, then changes the instrumentation from edebug to testcover--much faster, no problems with type-ahead or post-command-hook, etc. If BYTE-COMPILE is non-nil, byte-compiles each function after instrumenting." (interactive "f") - (let ((buf (find-file filename)) + (let ((buf (find-file filename)) (load-read-function 'testcover-read) (edebug-all-defs t)) (setq edebug-form-data nil @@ -210,7 +209,8 @@ non-nil, byte-compiles each function after instrumenting." "Reinstruments FORM to use testcover instead of edebug. This function modifies the list that FORM points to. Result is non-nil if FORM will always return the same value." - (let ((fun (car-safe form))) + (let ((fun (car-safe form)) + id) (cond ((not fun) ;Atom (or (not (symbolp form)) @@ -234,10 +234,10 @@ always return the same value." (testcover-reinstrument (cadr form))) ((memq fun testcover-compose-functions) ;;1-valued if all arguments are - (setq fun t) - (mapc #'(lambda (x) (setq fun (or (testcover-reinstrument x) fun))) + (setq id t) + (mapc #'(lambda (x) (setq id (or (testcover-reinstrument x) id))) (cdr form)) - fun) + id) ((eq fun 'edebug-enter) ;;(edebug-enter 'SYM ARGS #'(lambda nil FORMS)) ;; => (testcover-enter 'SYM #'(lambda nil FORMS)) @@ -250,17 +250,22 @@ always return the same value." ;; => (testcover-after YYY FORM), mark XXX as ok-coverage (unless (eq (cadr form) 0) (aset testcover-vector (cadr (cadr form)) 'ok-coverage)) - (setq fun (nth 2 form)) + (setq id (nth 2 form)) (setcdr form (nthcdr 2 form)) - (if (not (memq (car-safe (nth 2 form)) testcover-noreturn-functions)) - (setcar form 'testcover-after) + (cond + ((memq (car-safe (nth 2 form)) testcover-noreturn-functions) ;;This function won't return, so set the value in advance ;;(edebug-after (edebug-before XXX) YYY FORM) ;; => (progn (edebug-after YYY nil) FORM) (setcar form 'progn) - (setcar (cdr form) `(testcover-after ,fun nil))) + (setcar (cdr form) `(testcover-after ,id nil))) + ((eq (car-safe (nth 2 form)) '1value) + ;;This function is always supposed to return the same value + (setcar form 'testcover-1value)) + (t + (setcar form 'testcover-after))) (when (testcover-reinstrument (nth 2 form)) - (aset testcover-vector fun '1value))) + (aset testcover-vector id '1value))) ((eq fun 'defun) (if (testcover-reinstrument-list (nthcdr 3 form)) (push (cadr form) testcover-module-1value-functions))) @@ -316,8 +321,11 @@ always return the same value." ;;Hack - pretend the arg is 1-valued here (if (symbolp (cadr form)) ;A pseudoconstant variable t + (if (eq (car (cadr form)) 'edebug-after) + (setq id (car (nth 3 (cadr form)))) + (setq id (car (cadr form)))) (let ((testcover-1value-functions - (cons (car (cadr form)) testcover-1value-functions))) + (cons id testcover-1value-functions))) (testcover-reinstrument (cadr form))))) (t ;Some other function or weird thing (testcover-reinstrument-list (cdr form)) @@ -334,8 +342,8 @@ always be nil, so we return t for 1-valued." result)) (defun testcover-reinstrument-clauses (clauselist) - "Reinstruments each list in CLAUSELIST. Result is t if every -clause is 1-valued." + "Reinstrument each list in CLAUSELIST. +Result is t if every clause is 1-valued." (let ((result t)) (mapc #'(lambda (x) (setq result (and (testcover-reinstrument-list x) result))) @@ -348,15 +356,6 @@ clause is 1-valued." (let ((buf (find-file-noselect buffer))) (eval-buffer buf t))) -(defmacro 1value (form) - "For code-coverage testing, indicate that FORM is expected to always have -the same value." - form) - -(defmacro noreturn (form) - "For code-coverage testing, indicate that FORM will always signal an error." - form) - ;;;========================================================================= ;;; Accumulate coverage data @@ -379,6 +378,19 @@ binding `testcover-vector' to the code-coverage vector for TESTCOVER-SYM (aset testcover-vector idx 'ok-coverage))) val) +(defun testcover-1value (idx val) + "Internal function for coverage testing. Returns VAL after installing it in +`testcover-vector' at offset IDX. Error if FORM does not always return the +same value during coverage testing." + (cond + ((eq (aref testcover-vector idx) '1value) + (aset testcover-vector idx (cons '1value val))) + ((not (and (eq (car-safe (aref testcover-vector idx)) '1value) + (equal (cdr (aref testcover-vector idx)) val))) + (error "Value of form marked with `1value' does vary."))) + val) + + ;;;========================================================================= ;;; Display the coverage data as color splotches on your code. @@ -411,6 +423,7 @@ eliminated by adding more test cases." (setq len (1- len) data (aref coverage len)) (when (and (not (eq data 'ok-coverage)) + (not (eq (car-safe data) '1value)) (setq j (+ def-mark (aref points len)))) (setq ov (make-overlay (1- j) j)) (overlay-put ov 'face @@ -445,4 +458,5 @@ coverage tests. This function creates many overlays." (goto-char (next-overlay-change (point))) (end-of-line)) +;;; arch-tag: 72324a4a-4a2e-4142-9249-cc56d6757588 ;; testcover.el ends here. diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index b7db0d01dc..4ab2ac8e0d 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -476,4 +476,5 @@ If the user does not answer after SECONDS seconds, return DEFAULT-VALUE." (provide 'timer) +;;; arch-tag: b1a9237b-7787-4382-9e46-8f2c3b3273e0 ;;; timer.el ends here diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el index 917309e3b9..f7db20859d 100644 --- a/lisp/emacs-lisp/tq.el +++ b/lisp/emacs-lisp/tq.el @@ -1,6 +1,6 @@ ;;; tq.el --- utility to maintain a transaction queue -;; Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1987, 1992, 2003 Free Software Foundation, Inc. ;; Author: Scott Draves ;; Maintainer: FSF @@ -50,7 +50,7 @@ to a tcp server on another machine." (process-name process))))))) (set-process-filter process `(lambda (proc string) - (tq-filter '(, tq) string))) + (tq-filter ',tq string))) tq)) ;;; accessors @@ -120,4 +120,5 @@ that's how we tell where the answer ends." (provide 'tq) +;;; arch-tag: 65dea08c-4edd-4cde-83a5-e8a15b993b79 ;;; tq.el ends here diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el index b2cbb52980..a6ff9b1528 100644 --- a/lisp/emacs-lisp/trace.el +++ b/lisp/emacs-lisp/trace.el @@ -309,4 +309,5 @@ was not traced this is a noop." (provide 'trace) +;;; arch-tag: cfd170a7-4932-4331-8c8b-b7151942e5a1 ;;; trace.el ends here diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index 5daa345dbc..197728d232 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el @@ -259,4 +259,5 @@ is okay if GLOBAL-OKAY is non-nil." (local-variable-p sym))) `(global-variable ,sym)))) +;;; arch-tag: 6216f98b-eb8f-467a-9c33-7a7644f50658 ;; unsafep.el ends here. diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index 4d0354236a..e2bf813f9c 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -25,7 +25,7 @@ ;;; Commentary: ;; This file implements the entry points `warn', `lwarn' -;; and `display-warnings'. +;; and `display-warning'. ;;; Code: @@ -43,7 +43,7 @@ Each element looks like (LEVEL STRING FUNCTION) and defines LEVEL as a severity level. STRING specifies the description of this level. STRING should use `%s' to -specify where to put the warning group information, +specify where to put the warning type information, or it can omit the `%s' so as not to include that information. The optional FUNCTION, if non-nil, is a function to call @@ -91,26 +91,26 @@ the warning is completely ignored." (defcustom warning-suppress-log-types nil "List of warning types that should not be logged. -If any element of this list matches the GROUP argument to `display-warning', +If any element of this list matches the TYPE argument to `display-warning', the warning is completely ignored. -The element must match the first elements of GROUP. +The element must match the first elements of TYPE. Thus, (foo bar) as an element matches (foo bar) -or (foo bar ANYTHING...) as GROUP. -If GROUP is a symbol FOO, that is equivalent to the list (FOO), +or (foo bar ANYTHING...) as TYPE. +If TYPE is a symbol FOO, that is equivalent to the list (FOO), so only the element (FOO) will match it." :group 'warnings :type '(repeat (repeat symbol)) :version "21.4") (defcustom warning-suppress-types nil - "Custom groups for warnings not to display immediately. -If any element of this list matches the GROUP argument to `display-warning', + "List of warning types not to display immediately. +If any element of this list matches the TYPE argument to `display-warning', the warning is logged nonetheless, but the warnings buffer is not immediately displayed. -The element must match an initial segment of the list GROUP. +The element must match an initial segment of the list TYPE. Thus, (foo bar) as an element matches (foo bar) -or (foo bar ANYTHING...) as GROUP. -If GROUP is a symbol FOO, that is equivalent to the list (FOO), +or (foo bar ANYTHING...) as TYPE. +If TYPE is a symbol FOO, that is equivalent to the list (FOO), so only the element (FOO) will match it. See also `warning-suppress-log-types'." :group 'warnings @@ -155,9 +155,9 @@ also call that function before the next warning.") ;;; safely, testing the existing value, before they call one of the ;;; warnings functions. ;;;###autoload -(defvar warning-group-format " (%s)" - "Format for displaying the warning group in the warning message. -The result of formatting the group this way gets included in the +(defvar warning-type-format " (%s)" + "Format for displaying the warning type in the warning message. +The result of formatting the type this way gets included in the message under the control of the string in `warning-levels'.") (defun warning-numeric-level (level) @@ -166,19 +166,19 @@ message under the control of the string in `warning-levels'.") (link (memq elt warning-levels))) (length link))) -(defun warning-suppress-p (group suppress-list) - "Non-nil if a warning with group GROUP should be suppressed. +(defun warning-suppress-p (type suppress-list) + "Non-nil if a warning with type TYPE should be suppressed. SUPPRESS-LIST is the list of kinds of warnings to suppress." (let (some-match) (dolist (elt suppress-list) - (if (symbolp group) - ;; If GROUP is a symbol, the ELT must be (GROUP). + (if (symbolp type) + ;; If TYPE is a symbol, the ELT must be (TYPE). (if (and (consp elt) - (eq (car elt) group) + (eq (car elt) type) (null (cdr elt))) (setq some-match t)) - ;; If GROUP is a list, ELT must match it or some initial segment of it. - (let ((tem1 group) + ;; If TYPE is a list, ELT must match it or some initial segment of it. + (let ((tem1 type) (tem2 elt) (match t)) ;; Check elements of ELT until we run out of them. @@ -187,7 +187,7 @@ SUPPRESS-LIST is the list of kinds of warnings to suppress." (setq match nil)) (setq tem1 (cdr tem1) tem2 (cdr tem2))) - ;; If ELT is an initial segment of GROUP, MATCH is t now. + ;; If ELT is an initial segment of TYPE, MATCH is t now. ;; So set SOME-MATCH. (if match (setq some-match t))))) @@ -196,10 +196,10 @@ SUPPRESS-LIST is the list of kinds of warnings to suppress." some-match)) ;;;###autoload -(defun display-warning (group message &optional level buffer-name) +(defun display-warning (type message &optional level buffer-name) "Display a warning message, MESSAGE. -GROUP should be a custom group name (a symbol), -or else a list of symbols whose first element is a custom group name. +TYPE is the warning type: either a custom group name (a symbol), +or a list of symbols whose first element is a custom group name. \(The rest of the symbols represent subcategories, for warning purposes only, and you can use whatever symbols you like.) @@ -224,8 +224,8 @@ See also `warning-series', `warning-prefix-function' and (setq level (cdr (assq level warning-level-aliases)))) (or (< (warning-numeric-level level) (warning-numeric-level warning-minimum-log-level)) - (warning-suppress-p group warning-suppress-log-types) - (let* ((groupname (if (consp group) (car group) group)) + (warning-suppress-p type warning-suppress-log-types) + (let* ((typename (if (consp type) (car type) type)) (buffer (get-buffer-create (or buffer-name "*Warnings*"))) (level-info (assq level warning-levels)) start end) @@ -243,7 +243,7 @@ See also `warning-series', `warning-prefix-function' and (setq level-info (funcall warning-prefix-function level level-info))) (insert (format (nth 1 level-info) - (format warning-group-format groupname)) + (format warning-type-format typename)) message) (newline) (when (and warning-fill-prefix (not (string-match "\n" message))) @@ -273,7 +273,7 @@ See also `warning-series', `warning-prefix-function' and ;; immediate display. (or (< (warning-numeric-level level) (warning-numeric-level warning-minimum-level)) - (warning-suppress-p group warning-suppress-types) + (warning-suppress-p type warning-suppress-types) (let ((window (display-buffer buffer))) (when (and (markerp warning-series) (eq (marker-buffer warning-series) buffer)) @@ -281,13 +281,13 @@ See also `warning-series', `warning-prefix-function' and (sit-for 0))))))) ;;;###autoload -(defun lwarn (group level message &rest args) +(defun lwarn (type level message &rest args) "Display a warning message made from (format MESSAGE ARGS...). Aside from generating the message with `format', this is equivalent to `display-warning'. -GROUP should be a custom group name (a symbol). -or else a list of symbols whose first element is a custom group name. +TYPE is the warning type: either a custom group name (a symbol). +or a list of symbols whose first element is a custom group name. \(The rest of the symbols represent subcategories and can be whatever you like.) @@ -296,16 +296,17 @@ LEVEL should be either :warning, :error, or :emergency. if you do not attend to it promptly. :error -- invalid data or circumstances. :warning -- suspicious data or circumstances." - (display-warning group (apply 'format message args) level)) + (display-warning type (apply 'format message args) level)) ;;;###autoload (defun warn (message &rest args) "Display a warning message made from (format MESSAGE ARGS...). Aside from generating the message with `format', this is equivalent to `display-warning', using -`emacs' as the group and `:warning' as the level." +`emacs' as the type and `:warning' as the level." (display-warning 'emacs (apply 'format message args))) (provide 'warnings) +;;; arch-tag: faaad1c8-7b2a-4161-af38-5ab4afde0496 ;;; warnings.el ends here diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el index f060e9f789..26ed4ffa39 100644 --- a/lisp/emacs-lock.el +++ b/lisp/emacs-lock.el @@ -103,4 +103,5 @@ If t is found, signal error and display the locked buffer name." (provide 'emacs-lock) +;;; arch-tag: 58e6cb43-7cf0-401a-bcb6-4902a0b8bdc1 ;;; emacs-lock.el ends here diff --git a/lisp/emerge.el b/lisp/emerge.el index f3972ac597..f9821111e7 100644 --- a/lisp/emerge.el +++ b/lisp/emerge.el @@ -1454,7 +1454,7 @@ These characteristics are restored by `emerge-restore-buffer-characteristics'." emerge-merging-values))))) (defun emerge-restore-buffer-characteristics () - "Restores characteristics saved by `emerge-remember-buffer-characteristics'." + "Restore characteristics saved by `emerge-remember-buffer-characteristics'." (let ((A-values emerge-A-buffer-values) (B-values emerge-B-buffer-values)) (emerge-eval-in-buffer emerge-A-buffer @@ -3112,7 +3112,7 @@ SPC, it is ignored; if it is anything else, it is processed as a command." (setq unread-command-events (list c))))) (erase-buffer))))) -;; Improved auto-save gfile names. +;; Improved auto-save file names. ;; This function fixes many problems with the standard auto-save file names: ;; Auto-save files for non-file buffers get put in the default directory ;; for the buffer, whether that makes sense or not. @@ -3209,4 +3209,5 @@ More precisely, a [...] regexp to match any one such character." (provide 'emerge) +;;; arch-tag: a575f092-6e44-400e-b8a2-4124e9377585 ;;; emerge.el ends here diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el index 0f19d9e4cc..2ca819c042 100644 --- a/lisp/emulation/crisp.el +++ b/lisp/emulation/crisp.el @@ -394,4 +394,5 @@ With ARG, turn CRiSP mode on if ARG is positive, off otherwise." (run-hooks 'crisp-load-hook) (provide 'crisp) +;;; arch-tag: e5369375-fafb-4240-b7ae-4cb460ef05ee ;;; crisp.el ends here diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 0de58dbf40..24f95ec21e 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -419,19 +419,22 @@ Default is to load cursor color from initial or default frame parameters." :group 'cua) (defcustom cua-read-only-cursor-color "darkgreen" - "*Cursor color used in read-only buffers, if non-nil." + "*Cursor color used in read-only buffers, if non-nil. +Only used when `cua-enable-cursor-indications' is non-nil." :type 'color :group 'cua) (defcustom cua-overwrite-cursor-color "yellow" "*Cursor color used when overwrite mode is set, if non-nil. -Also used to indicate that rectangle padding is in effect." +Also used to indicate that rectangle padding is in effect. +Only used when `cua-enable-cursor-indications' is non-nil." :type 'color :group 'cua) (defcustom cua-global-mark-cursor-color "cyan" "*Indication for active global mark. -Will change cursor color to specified color if string." +Will change cursor color to specified color if string. +Only used when `cua-enable-cursor-indications' is non-nil." :type 'color :group 'cua) @@ -850,7 +853,7 @@ of text." With no prefix argument, clear mark if already set. Otherwise, set mark, and push old mark position on local mark ring; also push mark on -global mark ring if last mark was set in another buffer. +global mark ring if last mark was set in another buffer. With argument, jump to mark, and pop a new position for mark off the local mark ring \(this does not affect the global mark ring\). @@ -890,7 +893,9 @@ With a double \\[universal-argument] prefix argument, unconditionally set mark." forward-word backward-word end-of-line beginning-of-line end-of-buffer beginning-of-buffer - scroll-up scroll-down forward-paragraph backward-paragraph) + scroll-up scroll-down + forward-sentence backward-sentence + forward-paragraph backward-paragraph) "List of standard movement commands. Extra commands should be added to `cua-movement-commands'") @@ -1248,4 +1253,5 @@ paste (in addition to the normal emacs bindings)." (provide 'cua) +;;; arch-tag: 21fb6289-ba25-4fee-bfdc-f9fb351acf05 ;;; cua-base.el ends here diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el index 4055fb2b1c..8280691ae1 100644 --- a/lisp/emulation/cua-gmrk.el +++ b/lisp/emulation/cua-gmrk.el @@ -390,4 +390,5 @@ With prefix argument, don't jump to global mark when cancelling it." (setq cua--global-mark-initialized t)) +;;; arch-tag: 553d8076-a91d-48ae-825d-6cb962a5f67f ;;; cua-gmrk.el ends here diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index 47b315d062..fefd700102 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -1382,4 +1382,5 @@ With prefix arg, indent to that column." (setq cua--rectangle-initialized t)) +;;; arch-tag: b730df53-17b9-4a89-bd63-4a71ec196731 ;;; cua-rect.el ends here diff --git a/lisp/emulation/edt-lk201.el b/lisp/emulation/edt-lk201.el index 6afadd6c16..e63fd84cbe 100644 --- a/lisp/emulation/edt-lk201.el +++ b/lisp/emulation/edt-lk201.el @@ -57,4 +57,5 @@ ("HELP" . [help]) ("DO" . [menu]) ("F17" . [f17]) ("F18" . [f18]) ("F19" . [f19]) ("F20" . [f20]))) +;;; arch-tag: 36f498cf-c3f6-41b0-911b-83b1348855ec ;;; edt-lk201.el ends here diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el index d983ea8e71..e4943ff4a0 100644 --- a/lisp/emulation/edt-mapper.el +++ b/lisp/emulation/edt-mapper.el @@ -521,4 +521,5 @@ (sit-for 600) (kill-emacs t) +;;; arch-tag: 9eea59c8-b8b7-4d66-b858-c8920624c518 ;;; edt-mapper.el ends here diff --git a/lisp/emulation/edt-pc.el b/lisp/emulation/edt-pc.el index 30e1b53546..509f4f498c 100644 --- a/lisp/emulation/edt-pc.el +++ b/lisp/emulation/edt-pc.el @@ -87,4 +87,5 @@ ("HELP" . "" ) ("DO" . "" ) ("F17" . "" ) ("F18" . "" ) ("F19" . "" ) ("F20" . "" ))) +;;; arch-tag: 4593d053-183a-4062-97de-57b8877595ce ;;; edt-pc.el ends here diff --git a/lisp/emulation/edt-vt100.el b/lisp/emulation/edt-vt100.el index 283b7827c7..0ad749ec13 100644 --- a/lisp/emulation/edt-vt100.el +++ b/lisp/emulation/edt-vt100.el @@ -46,4 +46,5 @@ "Set terminal width to 132 columns." (vt100-wide-mode 1)) +;;; arch-tag: c9f10c95-915f-44b5-93ff-4654abca4dd4 ;;; edt-vt100.el ends here diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index 427a803da8..ff0298e9a1 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el @@ -2701,4 +2701,5 @@ G-C-\\: Split Window | FNDNXT | Yank | CUT | (provide 'edt) +;;; arch-tag: 18d1c54f-6900-4078-8bbc-7c2292f48941 ;;; edt.el ends here diff --git a/lisp/emulation/keypad.el b/lisp/emulation/keypad.el index 47c9fead29..5cf1d7c2e5 100644 --- a/lisp/emulation/keypad.el +++ b/lisp/emulation/keypad.el @@ -271,4 +271,5 @@ the decimal key on the keypad is mapped to DECIMAL instead of `.'" (setq i (1+ i))))) +;;; arch-tag: 0899d2bd-9e12-4b4e-9aef-d0014d3b6414 ;;; keypad.el ends here diff --git a/lisp/emulation/pc-mode.el b/lisp/emulation/pc-mode.el index 22c5b289f0..8b4d0d79f2 100644 --- a/lisp/emulation/pc-mode.el +++ b/lisp/emulation/pc-mode.el @@ -54,4 +54,5 @@ C-Escape does list-buffers." (provide 'pc-mode) +;;; arch-tag: df007c05-f885-4cd0-8c1e-487d0f8dd9c9 ;;; pc-mode.el ends here diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el index 6b7b7ece9c..c7ea973467 100644 --- a/lisp/emulation/pc-select.el +++ b/lisp/emulation/pc-select.el @@ -982,4 +982,5 @@ You must modify via \\[customize] for this variable to have an effect." :group 'pc-select :require 'pc-select) +;;; arch-tag: 10697b70-ae07-4f3e-ad23-7814a3f418c2 ;;; pc-select.el ends here diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el index 1296d49796..b164588d8f 100644 --- a/lisp/emulation/tpu-edt.el +++ b/lisp/emulation/tpu-edt.el @@ -551,7 +551,7 @@ version of Emacs." (t (mark)))) (defun tpu-set-mark (pos) - "TPU-edt verion of the `set-mark' function. + "TPU-edt version of the `set-mark' function. Sets the mark at POS and activates the region according to the current version of Emacs." (set-mark pos) @@ -2522,4 +2522,5 @@ If FILE is nil, try to load a default file. The default file names are (provide 'tpu-edt) +;;; arch-tag: f3dfe61c-2cbd-4f73-b9cc-eb215020b857 ;;; tpu-edt.el ends here diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el index 465b923f89..ced88ff3fd 100644 --- a/lisp/emulation/tpu-extras.el +++ b/lisp/emulation/tpu-extras.el @@ -480,4 +480,5 @@ version that respects the bottom scroll margin." GOLD-map) (message "The cursor is now bound to the flow of your text.")) +;;; arch-tag: 89676fa4-33ec-48cb-9135-6f3bf230ab1a ;;; tpu-extras.el ends here diff --git a/lisp/emulation/tpu-mapper.el b/lisp/emulation/tpu-mapper.el index e6a50c074d..68a760e201 100644 --- a/lisp/emulation/tpu-mapper.el +++ b/lisp/emulation/tpu-mapper.el @@ -392,4 +392,5 @@ ") (goto-char (point-min)) +;;; arch-tag: bab5872f-cd3a-4c1c-aedb-047b67646f6c ;;; tpu-mapper.el ends here diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index 7ae43c8b16..4e17644e66 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el @@ -455,7 +455,7 @@ Syntax table and abbrevs while in vi mode remain as they were in Emacs." (vi-mode-setup)) (if (eq major-mode 'vi-mode) - (message "Already in vi-mode." (ding)) + (progn (ding) (message "Already in vi-mode.")) (setq vi-mode-old-local-map (current-local-map)) (setq vi-mode-old-mode-name mode-name) (setq vi-mode-old-major-mode major-mode) @@ -703,7 +703,7 @@ use those instead of the ones saved." regexp-search-ring search-ring)))) (if (null search-command) - (message "No last search command to repeat." (ding)) + (progn (ding) (message "No last search command to repeat.")) (funcall search-command search-string nil nil arg))) (defun vi-reverse-last-search (arg &optional search-command search-string) @@ -718,7 +718,7 @@ If the optional search args are given, use those instead of the ones saved." regexp-search-ring search-ring)))) (if (null search-command) - (message "No last search command to repeat." (ding)) + (progn (ding) (message "No last search command to repeat.")) (funcall (cond ((eq search-command 're-search-forward) 're-search-backward) ((eq search-command 're-search-backward) 're-search-forward) ((eq search-command 'search-forward) 'search-backward) @@ -838,7 +838,7 @@ Goto mark '@' means jump into and pop the top mark on the mark ring." (t (let ((mark (vi-get-mark mark-char))) (if (null mark) - (message "Mark register undefined." (vi-ding)) + (progn (vi-ding) (message "Mark register undefined.")) (set-mark-command nil) (goto-char mark) (if line-flag (back-to-indentation))))))) @@ -881,7 +881,7 @@ is given, it is used instead of the saved one." (interactive "p") (if (null find-arg) (setq find-arg vi-last-find-char)) (if (null find-arg) - (message "No last find char to repeat." (ding)) + (progn (ding) (message "No last find char to repeat.")) (vi-find-char (cons (* (car find-arg) -1) (cdr find-arg)) count))) ;6/13/86 (defun vi-find-char (arg count) @@ -909,7 +909,7 @@ it is used instead of the saved one." (interactive "p") (if (null find-arg) (setq find-arg vi-last-find-char)) (if (null find-arg) - (message "No last find char to repeat." (ding)) + (progn (ding) (message "No last find char to repeat.")) (vi-find-char find-arg count))) (defun vi-backward-find-char (count char) @@ -1465,7 +1465,8 @@ It assumes a `(def..' always starts at the beginning of a line." (goto-char (point-min)) (if (re-search-forward (concat "^(def[unvarconst ]*" name) nil t) nil - (message "No definition for \"%s\" in current file." name (ding)) + (ding) + (message "No definition for \"%s\" in current file." name) (set-mark-command t)))) (defun vi-split-open-line (arg) @@ -1486,4 +1487,5 @@ With ARG, inserts that many newlines." (provide 'vi) +;;; arch-tag: ac9bdac3-8acb-4ddd-bdae-c6dd873153b3 ;;; vi.el ends here diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el index 80e941d2ed..cbb0aa55aa 100644 --- a/lisp/emulation/vip.el +++ b/lisp/emulation/vip.el @@ -3072,4 +3072,5 @@ vip-s-string" (provide 'vip) +;;; arch-tag: bff623ef-48f7-41d4-9aa3-2e840c9ab415 ;;; vip.el ends here diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index 02bffa64bd..eb5e5ede4c 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -4947,4 +4947,5 @@ Mail anyway (y or n)? ") +;;; arch-tag: 739a6450-5fda-44d0-88b0-325053d888c2 ;;; viper-cmd.el ends here diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index f4d3e8c766..c94edf54bc 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -1,6 +1,6 @@ ;;; viper-ex.el --- functions implementing the Ex commands for Viper -;; Copyright (C) 1994, 95, 96, 97, 98, 2000, 01, 02 Free Software Foundation, Inc. +;; Copyright (C) 1994, 95, 96, 97, 98, 2000, 01, 02, 04 Free Software Foundation, Inc. ;; Author: Michael Kifer @@ -1458,7 +1458,7 @@ reversed." (if (eq 1 (length name)) (setq char (string-to-char name)) (error "`%s': Spurious text \"%s\" after mark name" - name (substring name 1) viper-SpuriousText)) + name (substring name 1))) (save-window-excursion (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) @@ -2318,4 +2318,5 @@ Type 'mak ' (including the space) to run make with no args." +;;; arch-tag: 56b80d36-f880-4d10-bd66-85ad91a295db ;;; viper-ex.el ends here diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 8787e2eaa6..2a13f00535 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -1009,4 +1009,5 @@ Should be set in `~/.viper' file." ;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) ;;; End: +;;; arch-tag: 4efa2416-1fcb-4690-be10-1a2a0248d250 ;;; viper-init.el ends here diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el index 2369346a3f..146b54b703 100644 --- a/lisp/emulation/viper-keym.el +++ b/lisp/emulation/viper-keym.el @@ -637,4 +637,5 @@ form ((key . function) (key . function) ... )." ;;; End: +;;; arch-tag: 43af4b2f-0bea-400b-889e-221ebc00acb1 ;;; viper-keym.el ends here diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el index b13c922188..c6a3fdfe1f 100644 --- a/lisp/emulation/viper-macs.el +++ b/lisp/emulation/viper-macs.el @@ -929,4 +929,5 @@ name from there." (call-last-kbd-macro))) +;;; arch-tag: ecd3cc5c-8cd0-4bbe-b2ec-7e75a4b7d0aa ;;; viper-macs.el ends here diff --git a/lisp/emulation/viper-mous.el b/lisp/emulation/viper-mous.el index 1889a901e8..250f7cf5a5 100644 --- a/lisp/emulation/viper-mous.el +++ b/lisp/emulation/viper-mous.el @@ -674,4 +674,5 @@ This buffer may be different from the one where the click occurred." ;;; End: +;;; arch-tag: e56b2390-06c4-4dd1-96f5-c7876e2d8c2f ;;; viper-mous.el ends here diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index fc7f0c8223..5e533e5f54 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el @@ -394,17 +394,17 @@ command))) (goto-char (point-min)) ;; Issue an error, if no match. - (if (> status 0) - (save-excursion - (skip-chars-forward " \t\n\j") - (if (looking-at "ls:") - (viper-forward-Word 1)) - (error "%s: %s" - (if (stringp gshell) - gshell - "shell") - (buffer-substring (point) (viper-line-pos 'end))) - )) + (unless (eq 0 status) + (save-excursion + (skip-chars-forward " \t\n\j") + (if (looking-at "ls:") + (viper-forward-Word 1)) + (error "%s: %s" + (if (stringp gshell) + gshell + "shell") + (buffer-substring (point) (viper-line-pos 'end))) + )) (goto-char (point-min)) (viper-get-filenames-from-buffer 'one-per-line)) )) @@ -1517,4 +1517,5 @@ This option is appropriate if you like Emacs-style words." ;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) ;;; End: +;;; arch-tag: 7f023fd5-dd9e-4378-a397-9c179553b0e3 ;;; viper-util.el ends here diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index f5837192ce..15ec74b41f 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -1285,4 +1285,5 @@ These two lines must come in the order given. ;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) ;;; End: +;;; arch-tag: 5f3e844c-c4e6-4bbd-9b73-63bdc14e7d79 ;;; viper.el ends here diff --git a/lisp/emulation/ws-mode.el b/lisp/emulation/ws-mode.el index 330506b102..54be36299c 100644 --- a/lisp/emulation/ws-mode.el +++ b/lisp/emulation/ws-mode.el @@ -755,4 +755,5 @@ sWith: " ) (provide 'ws-mode) +;;; arch-tag: 6dd864bf-2ccb-4d59-af6e-492eba2890a3 ;;; ws-mode.el ends here diff --git a/lisp/env.el b/lisp/env.el index 6aef5457a1..3d92501279 100644 --- a/lisp/env.el +++ b/lisp/env.el @@ -180,4 +180,5 @@ for its value." (provide 'env) +;;; arch-tag: b7d6a8f7-bc81-46db-8e39-8d721d4ed0b8 ;;; env.el ends here diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el index ff6d66eb9e..0312f9d7ad 100644 --- a/lisp/eshell/em-alias.el +++ b/lisp/eshell/em-alias.el @@ -28,7 +28,7 @@ (defgroup eshell-alias nil "Command aliases allow for easy definition of alternate commands." :tag "Command aliases" - :link '(info-link "(eshell)Command aliases") + ;; :link '(info-link "(eshell)Command aliases") :group 'eshell-module) ;;; Commentary: @@ -103,7 +103,7 @@ gained by using this module." (defcustom eshell-bad-command-tolerance 3 "*The number of failed commands to ignore before creating an alias." :type 'integer - :link '(custom-manual "(eshell)Auto-correction of bad commands") + ;; :link '(custom-manual "(eshell)Auto-correction of bad commands") :group 'eshell-alias) ;;; @@ -272,4 +272,5 @@ These are all the command aliases which begin with NAME." eshell-prevent-alias-expansion)))) (eshell-parse-command alias)))))))))) +;;; arch-tag: 8b018fc1-4e07-4ccc-aa73-c0a1ba361f82 ;;; em-alias.el ends here diff --git a/lisp/eshell/em-banner.el b/lisp/eshell/em-banner.el index dc5f52bcdc..d63c99be00 100644 --- a/lisp/eshell/em-banner.el +++ b/lisp/eshell/em-banner.el @@ -30,7 +30,7 @@ It exists so that others wishing to create their own Eshell extension modules may have a simple template to begin with." :tag "Login banner" - :link '(info-link "(eshell)Login banner") + ;; :link '(info-link "(eshell)Login banner") :group 'eshell-module) ;;; Commentary: @@ -89,4 +89,5 @@ This can be any sexp, and should end with at least two newlines." (goto-char (point-min)) (looking-at msg))) +;;; arch-tag: e738b4ef-8671-42ae-a757-291779b92491 ;;; em-banner.el ends here diff --git a/lisp/eshell/em-basic.el b/lisp/eshell/em-basic.el index 49947eede7..5972ffc28b 100644 --- a/lisp/eshell/em-basic.el +++ b/lisp/eshell/em-basic.el @@ -182,4 +182,5 @@ or `eshell-printn' for display." (eval-when-compile (defvar print-func)) +;;; arch-tag: 385a31b1-cb95-46f0-9829-9d352ee77db8 ;;; em-basic.el ends here diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 4851804d38..695a9fb4ed 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -449,4 +449,5 @@ to writing a completion function." ;;; Code: +;;; arch-tag: 0e914699-673a-45f8-8cbf-82e1dbc571bc ;;; em-cmpl.el ends here diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index 2838ec5e8b..73837c324a 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -569,4 +569,5 @@ in the minibuffer: ;;; Code: +;;; arch-tag: 1e9c5a95-f1bd-45f8-ad36-55aac706e787 ;;; em-dirs.el ends here diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el index 08a92de1c8..24447c3e66 100644 --- a/lisp/eshell/em-glob.el +++ b/lisp/eshell/em-glob.el @@ -357,4 +357,5 @@ the form: (eshell-glob-entries (car rdirs) globs recurse-p) (setq rdirs (cdr rdirs))))) +;;; arch-tag: d0548f54-fb7c-4978-a88e-f7c26f7f68ca ;;; em-glob.el ends here diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 0f94f741b8..b38c7a519e 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -1,6 +1,6 @@ ;;; em-hist.el --- history list management -;; Copyright (C) 1999, 2000 Free Software Foundation +;; Copyright (C) 1999, 2000, 2004 Free Software Foundation ;; Author: John Wiegley @@ -523,7 +523,7 @@ See also `eshell-read-history'." ((string= "^" ref) 1) ((string= "$" ref) nil) ((string= "%" ref) - (error "`%' history word designator not yet implemented")))) + (error "`%%' history word designator not yet implemented")))) (defun eshell-hist-parse-arguments (&optional silent b e) "Parse current command arguments in a history-code-friendly way." @@ -984,4 +984,5 @@ If N is negative, search backwards for the -Nth previous match." (isearch-done) (eshell-send-input)) +;;; arch-tag: 1a847333-f864-4b96-9acd-b549d620b6c6 ;;; em-hist.el ends here diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index dc8d09eac9..3b5252c18a 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -480,8 +480,8 @@ whose cdr is the list of file attributes." "")) (let* ((str (eshell-ls-printable-size (nth 7 attrs))) (len (length str))) - (if (< len 8) - (concat (make-string (- 8 len) ? ) str) + (if (< len (or size-width 4)) + (concat (make-string (- (or size-width 4) len) ? ) str) str)) " " (format-time-string (concat @@ -898,4 +898,5 @@ Use TRUENAME for predicate tests, if passed." ;;; Code: +;;; arch-tag: 9295181c-0cb2-499c-999b-89f5359842cb ;;; em-ls.el ends here diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index 1c00156cf8..26349b4e94 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el @@ -113,7 +113,7 @@ The format of each entry is (put 'eshell-predicate-alist 'risky-local-variable t) (defcustom eshell-modifier-alist - '((?e . '(lambda (lst) + '((?E . '(lambda (lst) (mapcar (function (lambda (str) @@ -207,7 +207,7 @@ EXAMPLES: "Eshell modifier quick reference: FOR SINGLE ARGUMENTS, or each argument of a list of strings: - e evaluate again + E evaluate again L lowercase U uppercase C capitalize @@ -600,4 +600,5 @@ that 'ls -l' will show in the first column of its display. " (lambda (str) (split-string str ,sep))) lst)))) +;;; arch-tag: 8b5ce022-17f3-4c40-93c7-5faafaa63f31 ;;; em-pred.el ends here diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el index 1eff7acf34..e1446d9a8b 100644 --- a/lisp/eshell/em-prompt.el +++ b/lisp/eshell/em-prompt.el @@ -172,4 +172,5 @@ If this takes us past the end of the current line, don't skip at all." ;;; Code: +;;; arch-tag: 01c1574b-ce70-4e89-bc38-e6619f61e208 ;;; em-prompt.el ends here diff --git a/lisp/eshell/em-rebind.el b/lisp/eshell/em-rebind.el index e3aefd9b55..1f79990855 100644 --- a/lisp/eshell/em-rebind.el +++ b/lisp/eshell/em-rebind.el @@ -243,4 +243,5 @@ input." ;;; Code: +;;; arch-tag: 76d84f12-cc56-4d67-9b7d-c6b44ad20530 ;;; em-rebind.el ends here diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el index ebb33f7ed4..192a520fcb 100644 --- a/lisp/eshell/em-script.el +++ b/lisp/eshell/em-script.el @@ -138,4 +138,5 @@ environment, binding ARGS to $1, $2, etc.") ;;; Code: +;;; arch-tag: a346439d-5ba8-4faf-ac2b-3aacfeaa4647 ;;; em-script.el ends here diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el index 4002914027..750d797828 100644 --- a/lisp/eshell/em-smart.el +++ b/lisp/eshell/em-smart.el @@ -33,7 +33,7 @@ some of the edit/review concepts inherent in the design of Plan 9's Most likely you will have to turn this option on and play around with it to get a real sense of how it works." :tag "Smart display of output" - :link '(info-link "(eshell)Smart display of output") + ;; :link '(info-link "(eshell)Smart display of output") :group 'eshell-module) ;;; Commentary: @@ -242,7 +242,7 @@ The options are `begin', `after' or `end'." (defun eshell-smart-maybe-jump-to-end () "Jump to the end of the input buffer. -This is done whenever a command exits sucessfully and both the command +This is done whenever a command exits successfully and both the command and the end of the buffer are still visible." (when (and (= eshell-last-command-status 0) (if (eq eshell-review-quick-commands 'not-even-short-output) @@ -323,4 +323,5 @@ and the end of the buffer are still visible." ;;; Code: +;;; arch-tag: 8c0112c7-379c-4d54-9a1c-204d68786a4b ;;; em-smart.el ends here diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el index afd8e9596e..e8a38f1521 100644 --- a/lisp/eshell/em-term.el +++ b/lisp/eshell/em-term.el @@ -265,4 +265,5 @@ allowed." ;;; Code: +;;; arch-tag: ab7c8fe4-3101-4257-925b-1354c6b2fe9d ;;; em-term.el ends here diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 3c14635842..8446eb1aa9 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -1015,4 +1015,5 @@ Show wall-clock time elapsed during execution of COMMAND.") ;;; Code: +;;; arch-tag: 2462edd2-a76a-4cf2-897d-92e9a82ac1c9 ;;; em-unix.el ends here diff --git a/lisp/eshell/em-xtra.el b/lisp/eshell/em-xtra.el index 427eed3c1e..46e8da998c 100644 --- a/lisp/eshell/em-xtra.el +++ b/lisp/eshell/em-xtra.el @@ -118,4 +118,5 @@ naturally accessible within Emacs." ;;; Code: +;;; arch-tag: f944cfda-a118-470c-a0d6-b41a3a5c99c7 ;;; em-xtra.el ends here diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index ff86304296..0659912a58 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el @@ -385,4 +385,5 @@ special character that is not itself a backslash." (char-to-string (char-after))))) (goto-char end))))))) +;;; arch-tag: 7f593a2b-8fc1-4def-8f84-8f51ed0198d6 ;;; esh-arg.el ends here diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index a47e2ba4c9..9b4f54ce8b 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -30,7 +30,7 @@ pressing . There are several different kinds of commands, however." :tag "Command invocation" - :link '(info-link "(eshell)Command invocation") + ;; :link '(info-link "(eshell)Command invocation") :group 'eshell) ;;; Commentary: @@ -1400,7 +1400,8 @@ messages, and errors." (let ((arg (car args))) (if (and (stringp arg) (> (length arg) 0) - (get-text-property 0 'number arg)) + (not (text-property-not-all + 0 (length arg) 'number t arg))) (setcar args (string-to-number arg)))) (setq args (cdr args)))) (eshell-apply object eshell-last-arguments)) @@ -1416,4 +1417,5 @@ messages, and errors." (defalias 'eshell-lisp-command* 'eshell-lisp-command) +;;; arch-tag: 8e4f3867-a0c5-441f-96ba-ddd142d94366 ;;; esh-cmd.el ends here diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index 9ebb0962f4..9730536ac3 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el @@ -316,4 +316,5 @@ line of the form #!." ;;; Code: +;;; arch-tag: 178d4064-7e60-4745-b81f-bab5d8d7c40f ;;; esh-ext.el ends here diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index fad9df29bb..8d1036b736 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -508,4 +508,5 @@ Returns what was actually sent, or nil if nothing was sent." ;;; Code: +;;; arch-tag: 9ca2080f-d5e0-4b26-aa0b-d59194a905a2 ;;; esh-io.el ends here diff --git a/lisp/eshell/esh-maint.el b/lisp/eshell/esh-maint.el index c2dfe83a51..4ae19603a4 100644 --- a/lisp/eshell/esh-maint.el +++ b/lisp/eshell/esh-maint.el @@ -141,4 +141,5 @@ ;; (delete-file "README.texi") ;; (kill-buffer "README.texi")) +;;; arch-tag: 662089b6-78ec-48c5-b94f-d212279e8902 ;;; esh-maint.el ends here diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 9a7a52ee72..fefa340f2b 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -1,6 +1,6 @@ ;;; esh-mode.el --- user interface -;; Copyright (C) 1999, 2000, 2001 Free Software Foundation +;; Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation ;; Author: John Wiegley @@ -1020,7 +1020,7 @@ a key." Then send it to the process running in the current buffer." (interactive "P") ; Defeat snooping via C-x ESC ESC (let ((str (read-passwd - (format "Password: " + (format "%s Password: " (process-name (eshell-interactive-process)))))) (if (stringp str) (process-send-string (eshell-interactive-process) @@ -1080,4 +1080,5 @@ This function could be in the list `eshell-output-filter-functions'." ;;; Code: +;;; arch-tag: ec65bc2b-da14-4547-81d3-a32af3a4dc57 ;;; esh-mode.el ends here diff --git a/lisp/eshell/esh-module.el b/lisp/eshell/esh-module.el index a7a2a280c9..4c8ffceef7 100644 --- a/lisp/eshell/esh-module.el +++ b/lisp/eshell/esh-module.el @@ -153,4 +153,5 @@ customization group. Example: `eshell-cmpl' for that module." (unload-feature module) (message "Unloading %s...done" (symbol-name module)))))) +;;; arch-tag: 97a3fa16-9d08-40e6-bc2c-36bd70986507 ;;; esh-module.el ends here diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el index 2187d61422..765c5bec46 100644 --- a/lisp/eshell/esh-opt.el +++ b/lisp/eshell/esh-opt.el @@ -225,4 +225,5 @@ This assumes that symbols have been intern'd by `eshell-with-options'." ;;; Code: +;;; arch-tag: 45c6c2d0-8091-46a1-a205-2f4bafd8230c ;;; esh-opt.el ends here diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index d5ffa4c1c9..c16e93e687 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -503,4 +503,5 @@ See the variable `eshell-kill-processes-on-exit'." ;;; Code: +;;; arch-tag: ac477a3e-ee4d-4b44-8ec6-212010e607bb ;;; esh-proc.el ends here diff --git a/lisp/eshell/esh-test.el b/lisp/eshell/esh-test.el index 0145e17181..54edf5e35a 100644 --- a/lisp/eshell/esh-test.el +++ b/lisp/eshell/esh-test.el @@ -239,4 +239,5 @@ "\n")))) nil t)) +;;; arch-tag: 6e32275a-8285-4a4e-b7cf-819aa7c86b8e ;;; esh-test.el ends here diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index ce1fa52c37..a2fd0915cf 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -789,4 +789,5 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. ;;; Code: +;;; arch-tag: 70159778-5c7a-480a-bae4-3ad332fca19d ;;; esh-util.el ends here diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index c966dd1451..fabcf36708 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -430,7 +430,7 @@ Possible options are: (eshell-parse-double-quote)))) (if name (list 'eshell-get-variable (eval name) 'indices)))) - ((eq (char-after) ?<) + ((eq (char-after) ?\<) (let ((end (eshell-find-delimiter ?\< ?\>))) (if (not end) (throw 'eshell-incomplete ?\<) @@ -650,4 +650,5 @@ For example, to retrieve the second element of a user's record in ;;; Code: +;;; arch-tag: 393654fe-bdad-4f27-9a10-b1472ded14cf ;;; esh-var.el ends here diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el index 926b4031a8..b3307c81b4 100644 --- a/lisp/eshell/eshell.el +++ b/lisp/eshell/eshell.el @@ -34,7 +34,7 @@ is intended to be a functional replacement for command shells such as bash, zsh, rc, 4dos; since Emacs itself is capable of handling most of the tasks accomplished by such tools." :tag "The Emacs shell" - :link '(info-link "(eshell)The Emacs shell") + :link '(info-link "(eshell)Top") :version "21.1" :group 'applications) @@ -561,4 +561,5 @@ Emacs." (run-hooks 'eshell-load-hook) +;;; arch-tag: 9d4d5214-0e4e-4e02-b349-39add640d63f ;;; eshell.el ends here diff --git a/lisp/expand.el b/lisp/expand.el index bb024e5866..2e2767289c 100644 --- a/lisp/expand.el +++ b/lisp/expand.el @@ -504,4 +504,5 @@ This is used only in conjunction with `expand-add-abbrevs'." ;; run load hooks (run-hooks 'expand-load-hook) +;;; arch-tag: fee53e9e-30e3-4ef3-b191-9785e1f8e885 ;;; expand.el ends here diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 78bdfc6115..3893e32065 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -734,4 +734,6 @@ Returns the non-nil value it found, or nil if all were nil." (facemenu-update) (provide 'facemenu) + +;;; arch-tag: 85f6d02b-9085-420e-b651-0678f0e9c7eb ;;; facemenu.el ends here diff --git a/lisp/faces.el b/lisp/faces.el index 9a4aa7c83a..882ef1cba5 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1,6 +1,6 @@ ;;; faces.el --- Lisp faces -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +;; Copyright (C) 1992,1993,1994,1995,1996,1998,1999,2000,2001,2002,2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -1071,8 +1071,7 @@ of a global face. Value is the new attribute value." If optional argument FRAME Is nil or omitted, use the selected frame." (let ((completion-ignore-case t)) (completing-read (format "Set font attributes of face `%s' from font: " face) - (mapcar 'list (append (fontset-list) - (x-list-fonts "*" nil frame)))))) + (append (fontset-list) (x-list-fonts "*" nil frame))))) (defun read-all-face-attributes (face &optional frame) @@ -1316,6 +1315,8 @@ If FRAME is nil, the current FRAME is used." (not (featurep 'motif))) (and (memq 'x-toolkit options) (featurep 'x-toolkit)))) + ((eq req 'min-colors) + (>= (display-color-cells frame) (car options))) ((eq req 'class) (memq (frame-parameter frame 'display-type) options)) ((eq req 'background) @@ -1833,7 +1834,9 @@ created." (put 'modeline-inactive 'face-alias 'mode-line-inactive) (defface header-line - '((((type tty)) + '((t + :inherit mode-line) + (((type tty)) ;; This used to be `:inverse-video t', but that doesn't look very ;; good when combined with inverse-video mode-lines and multiple ;; windows. Underlining looks better, and is more consistent with @@ -1843,41 +1846,37 @@ created." ;; highlighting; this may be too confusing in general, although it ;; happens to look good with the only current use of header-lines, ;; the info browser. XXX + :inverse-video nil ;Override the value inherited from mode-line. :underline t) (((class color grayscale) (background light)) :background "grey90" :foreground "grey20" - :box nil - :inherit mode-line) + :box nil) (((class color grayscale) (background dark)) :background "grey20" :foreground "grey90" - :box nil - :inherit mode-line) + :box nil) (((class mono) (background light)) :background "white" :foreground "black" :inverse-video nil :box nil - :underline t - :inherit mode-line) + :underline t) (((class mono) (background dark)) :background "black" :foreground "white" :inverse-video nil :box nil - :underline t - :inherit mode-line)) + :underline t)) "Basic header-line face." :version "21.1" :group 'basic-faces) (defface tool-bar - '((((type x w32 mac) (class color)) + '((t :box (:line-width 1 :style released-button) - :background "grey75" :foreground "black") + :foreground "black") + (((type x w32 mac) (class color)) + :background "grey75") (((type x) (class mono)) - :box (:line-width 1 :style released-button) - :background "grey" :foreground "black") - (t - ())) + :background "grey")) "Basic tool-bar face." :version "21.1" :group 'basic-faces) @@ -1894,14 +1893,18 @@ created." (append minibuffer-prompt-properties (list 'face 'minibuffer-prompt))) (defface region - '((((type tty) (class color)) + '((((class color) (min-colors 88) (background dark)) + :background "blue3") + (((class color) (min-colors 88) (background light)) + :background "lightgoldenrod2") + (((class color) (min-colors 16) (background dark)) + :background "blue3") + (((class color) (min-colors 16) (background light)) + :background "lightgoldenrod2") + (((class color) (min-colors 8)) :background "blue" :foreground "white") (((type tty) (class mono)) :inverse-video t) - (((class color) (background dark)) - :background "blue3") - (((class color) (background light)) - :background "lightgoldenrod2") (t :background "gray")) "Basic face for highlighting the region." :version "21.1" @@ -1992,24 +1995,32 @@ created." (defface highlight - '((((type tty) (class color)) - :background "green" :foreground "black") - (((class color) (background light)) + '((((class color) (min-colors 88) (background light)) :background "darkseagreen2") - (((class color) (background dark)) + (((class color) (min-colors 88) (background dark)) :background "darkolivegreen") + (((class color) (min-colors 16) (background light)) + :background "darkseagreen2") + (((class color) (min-colors 16) (background dark)) + :background "darkolivegreen") + (((class color) (min-colors 8)) + :background "green" :foreground "black") (t :inverse-video t)) "Basic face for highlighting." :group 'basic-faces) (defface secondary-selection - '((((type tty) (class color)) - :background "cyan" :foreground "black") - (((class color) (background light)) + '((((class color) (min-colors 88) (background light)) :background "yellow") - (((class color) (background dark)) + (((class color) (min-colors 88) (background dark)) :background "SkyBlue4") + (((class color) (min-colors 16) (background light)) + :background "yellow") + (((class color) (min-colors 16) (background dark)) + :background "SkyBlue4") + (((class color) (min-colors 8)) + :background "cyan" :foreground "black") (t :inverse-video t)) "Basic face for displaying the secondary selection." :group 'basic-faces) @@ -2216,4 +2227,5 @@ If that can't be done, return nil." (provide 'faces) +;;; arch-tag: 19a4759f-2963-445f-b004-425b9aadd7d6 ;;; faces.el ends here diff --git a/lisp/fast-lock.el b/lisp/fast-lock.el index c37a4adb19..6812361a28 100644 --- a/lisp/fast-lock.el +++ b/lisp/fast-lock.el @@ -859,4 +859,5 @@ See `fast-lock-get-face-properties'." (provide 'fast-lock) +;;; arch-tag: 638c431e-8cae-4538-80a1-963ff97d233e ;;; fast-lock.el ends here diff --git a/lisp/ffap.el b/lisp/ffap.el index 5bea298f4d..38f7f92405 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -1,8 +1,9 @@ -;; ffap.el --- find file (or url) at point -;; -;; Copyright (C) 1995, 96, 97, 2000 Free Software Foundation, Inc. -;; +;;; ffap.el --- find file (or url) at point + +;; Copyright (C) 1995, 96, 97, 2000, 2004 Free Software Foundation, Inc. + ;; Author: Michelangelo Grigni +;; Maintainer: Rajesh Vaidheeswarran ;; Created: 29 Mar 1993 ;; Keywords: files, hypermedia, matching, mouse, convenience ;; X-URL: ftp://ftp.mathcs.emory.edu/pub/mic/emacs/ @@ -65,6 +66,7 @@ ;; (setq ffap-alist nil) ; faster, dumber prompting ;; (setq ffap-machine-p-known 'accept) ; no pinging ;; (setq ffap-url-regexp nil) ; disable URL features in ffap +;; (setq ffap-shell-prompt-regexp nil) ; disable shell prompt stripping ;; ;; ffap uses `browse-url' (if found, else `w3-fetch') to fetch URL's. ;; For a hairier `ffap-url-fetcher', try ffap-url.el (same ftp site). @@ -120,6 +122,18 @@ Otherwise return nil (or the optional DEFAULT value)." (let ((sym (intern-soft name))) (if (and sym (boundp sym)) (symbol-value sym) default))) +(defcustom ffap-shell-prompt-regexp + ;; This used to test for some shell prompts that don't have a space + ;; after them. The common root shell prompt (#) is not listed since it + ;; also doubles up as a valid URL character. + "[$%><]*" + "Paths matching this regexp are stripped off the shell prompt +If nil, ffap doesn't do shell prompt stripping." + :type '(choice (const :tag "Disable" nil) + (const :tag "Standard" "[$%><]*") + regexp) + :group 'ffap) + (defcustom ffap-ftp-regexp ;; This used to test for ange-ftp or efs being present, but it should be ;; harmless (and simpler) to give it this value unconditionally. @@ -687,7 +701,7 @@ kpathsea, a library used by some versions of TeX." (defun ffap-locate-file (file &optional nosuffix path dir-ok) ;; The Emacs 20 version of locate-library could almost replace this, - ;; except it does not let us overrride the suffix list. The + ;; except it does not let us override the suffix list. The ;; compression-suffixes search moved to ffap-file-exists-string. "A generic path-searching function, mimics `load' by default. Returns path to file that \(load FILE\) would load, or nil. @@ -952,6 +966,7 @@ possibly a major-mode name, or one of the symbol MODE (defaults to value of `major-mode') is a symbol used to look up string syntax parameters in `ffap-string-at-point-mode-alist'. If MODE is not found, we use `file' instead of MODE. +If the region is active, return a string from the region. Sets `ffap-string-at-point' and `ffap-string-at-point-region'." (let* ((args (cdr @@ -959,15 +974,19 @@ Sets `ffap-string-at-point' and `ffap-string-at-point-region'." (assq 'file ffap-string-at-point-mode-alist)))) (pt (point)) (str - (buffer-substring - (save-excursion - (skip-chars-backward (car args)) - (skip-chars-forward (nth 1 args) pt) - (setcar ffap-string-at-point-region (point))) - (save-excursion - (skip-chars-forward (car args)) - (skip-chars-backward (nth 2 args) pt) - (setcar (cdr ffap-string-at-point-region) (point)))))) + (if (and transient-mark-mode mark-active) + (buffer-substring + (setcar ffap-string-at-point-region (region-beginning)) + (setcar (cdr ffap-string-at-point-region) (region-end))) + (buffer-substring + (save-excursion + (skip-chars-backward (car args)) + (skip-chars-forward (nth 1 args) pt) + (setcar ffap-string-at-point-region (point))) + (save-excursion + (skip-chars-forward (car args)) + (skip-chars-backward (nth 2 args) pt) + (setcar (cdr ffap-string-at-point-region) (point))))))) (set-text-properties 0 (length str) nil str) (setq ffap-string-at-point str))) @@ -1109,9 +1128,11 @@ which may actually result in an url rather than a filename." ;; Try stripping off line numbers; good for compilation/grep output. ((and (not abs) (string-match ":[0-9]" name) (ffap-file-exists-string (substring name 0 (match-beginning 0))))) - ;; Immediately test local filenames. If default-directory is - ;; remote, you probably already have a connection. - ((and (not abs) (ffap-file-exists-string name))) + ;; Try stripping off prominent (non-root - #) shell prompts + ;; if the ffap-shell-prompt-regexp is non-nil. + ((and ffap-shell-prompt-regexp + (not abs) (string-match ffap-shell-prompt-regexp name) + (ffap-file-exists-string (substring name (match-end 0))))) ;; Accept remote names without actual checking (too slow): ((if abs (ffap-file-remote-p name) @@ -1166,6 +1187,14 @@ which may actually result in an url rather than a filename." remote-dir (substring name (match-end 1))))) (ffap-file-exists-string (ffap-replace-file-component remote-dir name)))))) + ;; Try all parent directories by deleting the trailing directory + ;; name until existing directory is found or name stops changing + ((let ((dir name)) + (while (and dir + (not (ffap-file-exists-string dir)) + (not (equal dir (setq dir (file-name-directory + (directory-file-name dir))))))) + (ffap-file-exists-string dir))) ) (set-match-data data)))) @@ -1230,9 +1259,7 @@ which may actually result in an url rather than a filename." ;; This code assumes that you load ffap.el after complete.el. ;; ;; We must inform complete about whether our completion function -;; will do filename style completion. For earlier versions of -;; complete.el, this requires a defadvice. For recent versions -;; there may be a special variable for this purpose. +;; will do filename style completion. (defun ffap-complete-as-file-p nil ;; Will `minibuffer-completion-table' complete the minibuffer @@ -1246,15 +1273,7 @@ which may actually result in an url rather than a filename." (featurep 'complete) (if (boundp 'PC-completion-as-file-name-predicate) ;; modern version of complete.el, just set the variable: - (setq PC-completion-as-file-name-predicate 'ffap-complete-as-file-p) - (require 'advice) - (defadvice PC-do-completion (around ffap-fix act) - "Work with ffap." - (let ((minibuffer-completion-table - (if (eq t (ffap-complete-as-file-p)) - 'read-file-name-internal - minibuffer-completion-table))) - ad-do-it)))) + (setq PC-completion-as-file-name-predicate 'ffap-complete-as-file-p))) ;;; Highlighting (`ffap-highlight'): @@ -1658,7 +1677,9 @@ ffap most of the time." (if (file-directory-p filename) (dired (expand-file-name filename)) (dired (concat (expand-file-name filename) "*")))) - ((and (file-writable-p (file-name-directory filename)) + ((and (file-writable-p + (or (file-name-directory (directory-file-name filename)) + filename)) (y-or-n-p "Directory does not exist, create it? ")) (make-directory filename) (dired filename)) @@ -1671,9 +1692,24 @@ ffap most of the time." (ffap-read-file-or-url (if ffap-url-regexp "Dired file or URL: " "Dired file: ") (prog1 - (setq guess (or guess (ffap-guesser))) - (and guess (ffap-highlight)) - )) + (setq guess (or guess + (let ((guess (ffap-guesser))) + (if (or (not guess) + (ffap-url-p guess) + (ffap-file-remote-p guess)) + guess + (setq guess (abbreviate-file-name + (expand-file-name guess))) + (cond + ;; Interpret local directory as a directory. + ((file-directory-p guess) + (file-name-as-directory guess)) + ;; Get directory component from local files. + ((file-regular-p guess) + (file-name-directory guess)) + (guess)))) + )) + (and guess (ffap-highlight)))) (ffap-highlight t))) ;;; Offer default global bindings (`ffap-bindings'): @@ -1704,4 +1740,6 @@ Of course if you do not like these bindings, just roll your own!") (eval (cons 'progn ffap-bindings))) + +;;; arch-tag: 9dd3e88a-5dec-4607-bd57-60ae9ede8ebc ;;; ffap.el ends here diff --git a/lisp/filecache.el b/lisp/filecache.el index b8cb51ae1e..bd0b0f7778 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el @@ -170,6 +170,19 @@ do not use this variable." :type 'string :group 'file-cache) +(defcustom file-cache-find-command-posix-flag 'not-defined + "*Set to t, if `file-cache-find-command' handles wildcards POSIX style. +This variable is automatically set to nil or non-nil +if it has the initial value `not-defined' whenever you first +call the `file-cache-add-directory-using-find'. + +Under Windows operating system where Cygwin is available, this value +should be t." + :type '(choice (const :tag "Yes" t) + (const :tag "No" nil) + (const :tag "Unknown" not-defined)) + :group 'file-cache) + (defcustom file-cache-locate-command "locate" "*External program used by `file-cache-add-directory-using-locate'." :type 'string @@ -212,13 +225,10 @@ Defaults to the value of `case-fold-search'." :group 'file-cache ) -(defcustom file-cache-assoc-function - (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin)) - 'assoc-ignore-case - 'assoc) - "Function to use to check completions in the file cache. -Defaults to `assoc-ignore-case' on DOS and Windows, and `assoc' on -other systems." +(defcustom file-cache-ignore-case + (memq system-type (list 'ms-dos 'windows-nt 'cygwin)) + "Non-nil means ignore case when checking completions in the file cache. +Defaults to nil on DOS and Windows, and t on other systems." :type 'sexp :group 'file-cache ) @@ -270,11 +280,13 @@ be added to the cache." ;; Filter out files we don't want to see (mapcar '(lambda (file) - (mapcar - '(lambda (regexp) - (if (string-match regexp file) - (setq dir-files (delq file dir-files)))) - file-cache-filter-regexps)) + (if (file-directory-p file) + (setq dir-files (delq file dir-files)) + (mapcar + '(lambda (regexp) + (if (string-match regexp file) + (setq dir-files (delq file dir-files)))) + file-cache-filter-regexps))) dir-files) (file-cache-add-file-list dir-files)))) @@ -298,11 +310,12 @@ in each directory, not to the directory list itself." "Add FILE to the file cache." (interactive "fAdd File: ") (if (not (file-exists-p file)) - (message "File %s does not exist" file) + (message "Filecache: file %s does not exist" file) (let* ((file-name (file-name-nondirectory file)) (dir-name (file-name-directory file)) - (the-entry (funcall file-cache-assoc-function - file-name file-cache-alist)) + (the-entry (assoc-string + file-name file-cache-alist + file-cache-ignore-case)) ) ;; Does the entry exist already? (if the-entry @@ -324,12 +337,21 @@ in each directory, not to the directory list itself." Find is run in DIRECTORY." (interactive "DAdd files under directory: ") (let ((dir (expand-file-name directory))) + (if (eq file-cache-find-command-posix-flag 'not-defined) + (setq file-cache-find-command-posix-flag + (executable-command-find-posix-p file-cache-find-command))) (set-buffer (get-buffer-create file-cache-buffer)) (erase-buffer) (call-process file-cache-find-command nil (get-buffer file-cache-buffer) nil dir "-name" - (if (eq system-type 'windows-nt) "'*'" "*") + (cond + (file-cache-find-command-posix-flag + "\\*") + ((eq system-type 'windows-nt) + "'*'") + (t + "*")) "-print") (file-cache-add-from-file-cache-buffer))) @@ -402,7 +424,7 @@ or the optional REGEXP argument." (interactive (list (completing-read "Delete file from cache: " file-cache-alist))) (setq file-cache-alist - (delq (funcall file-cache-assoc-function file file-cache-alist) + (delq (assoc-string file file-cache-alist file-cache-ignore-case) file-cache-alist))) (defun file-cache-delete-file-list (file-list) @@ -419,7 +441,8 @@ or the optional REGEXP argument." (setq delete-list (cons (car elt) delete-list)))) file-cache-alist) (file-cache-delete-file-list delete-list) - (message "Deleted %d files from file cache" (length delete-list)))) + (message "Filecache: deleted %d files from file cache" + (length delete-list)))) (defun file-cache-delete-directory (directory) "Delete DIRECTORY from the file cache." @@ -432,8 +455,8 @@ or the optional REGEXP argument." (setq result (1+ result)))) file-cache-alist) (if (zerop result) - (error "No entries containing %s found in cache" directory) - (message "Deleted %d entries" result)))) + (error "Filecache: no entries containing %s found in cache" directory) + (message "Filecache: deleted %d entries" result)))) (defun file-cache-do-delete-directory (dir entry) (let ((directory-list (cdr entry)) @@ -458,21 +481,22 @@ or the optional REGEXP argument." ;; Returns the name of a directory for a file in the cache (defun file-cache-directory-name (file) - (let* ((directory-list (cdr (funcall file-cache-assoc-function - file file-cache-alist))) + (let* ((directory-list (cdr (assoc-string + file file-cache-alist + file-cache-ignore-case))) (len (length directory-list)) (directory) (num) ) (if (not (listp directory-list)) - (error "Unknown type in file-cache-alist for key %s" file)) + (error "Filecache: unknown type in file-cache-alist for key %s" file)) (cond ;; Single element ((eq 1 len) (setq directory (elt directory-list 0))) ;; No elements ((eq 0 len) - (error "No directory found for key %s" file)) + (error "Filecache: no directory found for key %s" file)) ;; Multiple elements (t (let* ((minibuffer-dir (file-name-directory (minibuffer-contents))) @@ -556,7 +580,8 @@ the name is considered already unique; only the second substitution ;; If we've already inserted a unique string, see if the user ;; wants to use that one (if (and (string= string completion-string) - (funcall file-cache-assoc-function string file-cache-alist)) + (assoc-string string file-cache-alist + file-cache-ignore-case)) (if (and (eq last-command this-command) (string= file-cache-last-completion completion-string)) (progn @@ -725,7 +750,8 @@ match REGEXP." "Debugging function." (interactive (list (completing-read "File Cache: " file-cache-alist))) - (message "%s" (funcall file-cache-assoc-function file file-cache-alist)) + (message "%s" (assoc-string file file-cache-alist + file-cache-ignore-case)) ) (defun file-cache-display () @@ -753,4 +779,5 @@ match REGEXP." (provide 'filecache) +;;; arch-tag: 433d3ca4-4af2-47ce-b2cf-1f727460f538 ;;; filecache.el ends here diff --git a/lisp/files.el b/lisp/files.el index f4e62a71d3..ca6719055b 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1,6 +1,6 @@ ;;; files.el --- file input and output commands for Emacs -;; Copyright (C) 1985,86,87,92,93,94,95,96,97,98,99,2000,01,02,2003 +;; Copyright (C) 1985,86,87,92,93,94,95,96,97,98,99,2000,01,02,03,2004 ;;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -42,7 +42,7 @@ (defcustom delete-auto-save-files t "*Non-nil means delete auto-save file when a buffer is saved or killed. -Note that auto-save file will not be deleted if the buffer is killed +Note that the auto-save file will not be deleted if the buffer is killed when it has unsaved changes." :type 'boolean :group 'auto-save) @@ -355,10 +355,14 @@ The functions are called in the order given until one of them returns non-nil.") ;;;It is not useful to make this a local variable. ;;;(put 'find-file-hooks 'permanent-local t) -(defvar find-file-hook nil +(defcustom find-file-hook nil "List of functions to be called after a buffer is loaded from a file. The buffer's local variables (if any) will have been processed before the -functions are called.") +functions are called." + :group 'find-file + :type 'hook + :options '(auto-insert) + :version "21.4") (defvaralias 'find-file-hooks 'find-file-hook) (make-obsolete-variable 'find-file-hooks 'find-file-hook "21.4") @@ -371,7 +375,12 @@ So any buffer-local binding of this variable is discarded if you change the visited file name with \\[set-visited-file-name], but not when you change the major mode. -See also `write-contents-functions'.") +This hook is not run if any of the functions in +`write-contents-functions' returns non-nil. Both hooks pertain +to how to save a buffer to file, for instance, choosing a suitable +coding system and setting mode bits. (See Info +node `(elisp)Saving Buffers'.) To perform various checks or +updates before the buffer is saved, use `before-save-hook' .") (put 'write-file-functions 'permanent-local t) (defvaralias 'write-file-hooks 'write-file-functions) (make-obsolete-variable 'write-file-hooks 'write-file-functions "21.4") @@ -391,7 +400,11 @@ buffer's contents, not to the particular visited file; thus, `set-visited-file-name' does not clear this variable; but changing the major mode does clear it. -See also `write-file-functions'.") +For hooks that _do_ pertain to the particular visited file, use +`write-file-functions'. Both this variable and +`write-file-functions' relate to how a buffer is saved to file. +To perform various checks or updates before the buffer is saved, +use `before-save-hook'.") (make-variable-buffer-local 'write-contents-functions) (defvaralias 'write-contents-hooks 'write-contents-functions) (make-obsolete-variable 'write-contents-hooks 'write-contents-functions "21.4") @@ -477,13 +490,18 @@ patterns and to guarantee valid names." (defun read-directory-name (prompt &optional dir default-dirname mustmatch initial) "Read directory name, prompting with PROMPT and completing in directory DIR. Value is not expanded---you must call `expand-file-name' yourself. -Default name to DEFAULT-DIRNAME if user enters a null string. +Default name to DEFAULT-DIRNAME if user exits with the same +non-empty string that was inserted by this function. (If DEFAULT-DIRNAME is omitted, the current buffer's directory is used, except that if INITIAL is specified, that combined with DIR is used.) +If the user exits with an empty minibuffer, this function returns +an empty string. (This can only happen if the user erased the +pre-inserted contents or if `insert-default-directory' is nil.) Fourth arg MUSTMATCH non-nil means require existing directory's name. Non-nil and non-t means also require confirmation after completion. Fifth arg INITIAL specifies text to start with. -DIR defaults to current buffer's directory default." +DIR should be an absolute directory name. It defaults to +the value of `default-directory'." (unless dir (setq dir default-directory)) (unless default-dirname @@ -837,7 +855,9 @@ do not put this buffer at the front of the list of recently selected ones. This uses the function `display-buffer' as a subroutine; see its documentation for additional customization information." (interactive "BSwitch to buffer in other window: ") - (let ((pop-up-windows t)) + (let ((pop-up-windows t) + ;; Don't let these interfere. + same-window-buffer-names same-window-regexps) (pop-to-buffer buffer t norecord))) (defun switch-to-buffer-other-frame (buffer &optional norecord) @@ -848,7 +868,8 @@ do not put this buffer at the front of the list of recently selected ones. This uses the function `display-buffer' as a subroutine; see its documentation for additional customization information." (interactive "BSwitch to buffer in other frame: ") - (let ((pop-up-frames t)) + (let ((pop-up-frames t) + same-window-buffer-names same-window-regexps) (pop-to-buffer buffer t norecord) (raise-frame (window-frame (selected-window))))) @@ -1601,7 +1622,7 @@ in that case, this function acts as if `enable-local-variables' were t." ("\\.ltx\\'" . latex-mode) ("\\.dtx\\'" . doctex-mode) ("\\.el\\'" . emacs-lisp-mode) - ("\\.scm\\'" . scheme-mode) + ("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . scheme-mode) ("\\.l\\'" . lisp-mode) ("\\.lisp\\'" . lisp-mode) ("\\.f\\'" . fortran-mode) @@ -1717,6 +1738,7 @@ in that case, this function acts as if `enable-local-variables' were t." ("\\.[1-9]\\'" . nroff-mode) ("\\.g\\'" . antlr-mode) ("\\.ses\\'" . ses-mode) + ("\\.orig\\'" nil t) ; from patch ("\\.in\\'" nil t))) "Alist of filename patterns vs corresponding major mode functions. Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL). @@ -2154,7 +2176,7 @@ is specified, returning t if it is specified." (put 'format-alist 'risky-local-variable t) (put 'vc-mode 'risky-local-variable t) (put 'imenu-generic-expression 'risky-local-variable t) -(put 'imenu-index-alist 'risky-local-variable t) +(put 'imenu--index-alist 'risky-local-variable t) (put 'standard-input 'risky-local-variable t) (put 'standard-output 'risky-local-variable t) (put 'unread-command-events 'risky-local-variable t) @@ -2174,9 +2196,10 @@ is specified, returning t if it is specified." ;; This case is safe because the user gets to check it before it is used. (put 'compile-command 'safe-local-variable 'stringp) -(defun risky-local-variable-p (sym val) +(defun risky-local-variable-p (sym &optional val) "Non-nil if SYM could be dangerous as a file-local variable with value VAL. -If VAL is nil, the question is whether any value might be dangerous." +If VAL is nil or omitted, the question is whether any value might be +dangerous." (let ((safep (get sym 'safe-local-variable))) (or (memq sym ignored-local-variables) (get sym 'risky-local-variable) @@ -2414,7 +2437,7 @@ This makes the buffer visit that file, and marks it as not modified. If you specify just a directory name as FILENAME, that means to use the default file name but in that directory. You can also yank -the default file name into the minibuffer to edit it, using M-n. +the default file name into the minibuffer to edit it, using \\\\[next-history-element]. If the buffer is not already visiting a file, the default file name for the output file is the buffer name. @@ -2546,7 +2569,8 @@ BACKUPNAME is the backup file name, which is the old file renamed." (not (file-writable-p to-name))) (delete-file to-name)) (copy-file from-name to-name t t))) - (set-file-modes to-name (logand modes #o1777))) + (and modes + (set-file-modes to-name (logand modes #o1777)))) (defun file-name-sans-versions (name &optional keep-backup-version) "Return file NAME sans backup versions or strings. @@ -2881,9 +2905,9 @@ on a DOS/Windows machine, it returns FILENAME on expanded form." (or ;; Test for different drives on DOS/Windows (and + ;; Should `cygwin' really be included here? --stef (memq system-type '(ms-dos cygwin windows-nt)) - (not (string-equal (substring filename 0 2) - (substring directory 0 2)))) + (not (eq t (compare-strings filename 0 2 directory 0 2)))) ;; Test for different remote file handlers (not (eq hf hd)) ;; Test for different remote file system identification @@ -2901,21 +2925,22 @@ on a DOS/Windows machine, it returns FILENAME on expanded form." filename (let ((ancestor ".") (filename-dir (file-name-as-directory filename))) - (while - (and - (not (string-match (concat "\\`" (regexp-quote directory)) - filename-dir)) - (not (string-match (concat "\\`" (regexp-quote directory)) - filename))) + (while (not + (or + (eq t (compare-strings filename-dir nil (length directory) + directory nil nil case-fold-search)) + (eq t (compare-strings filename nil (length directory) + directory nil nil case-fold-search)))) (setq directory (file-name-directory (substring directory 0 -1)) ancestor (if (equal ancestor ".") ".." (concat "../" ancestor)))) ;; Now ancestor is empty, or .., or ../.., etc. - (if (string-match (concat "^" (regexp-quote directory)) filename) + (if (eq t (compare-strings filename nil (length directory) + directory nil nil case-fold-search)) ;; We matched within FILENAME's directory part. ;; Add the rest of FILENAME onto ANCESTOR. - (let ((rest (substring filename (match-end 0)))) + (let ((rest (substring filename (length directory)))) (if (and (equal ancestor ".") (not (equal rest ""))) ;; But don't bother with ANCESTOR if it would give us `./'. rest @@ -2983,6 +3008,12 @@ the last real save, but optional arg FORCE non-nil means delete anyway." (defvar auto-save-hook nil "Normal hook run just before auto-saving.") +(defcustom before-save-hook nil + "Normal hook that is run before a buffer is saved to its file." + :options '(copyright-update) + :type 'hook + :group 'files) + (defcustom after-save-hook nil "Normal hook that is run after a buffer is saved to its file." :options '(executable-make-buffer-file-executable-if-script-p) @@ -3005,7 +3036,8 @@ in such cases.") The hooks `write-contents-functions' and `write-file-functions' get a chance to do the job of saving; if they do not, then the buffer is saved in the visited file file in the usual way. -After saving the buffer, this function runs `after-save-hook'." +Before and after saving the buffer, this function runs +`before-save-hook' and `after-save-hook', respectively." (interactive) (save-current-buffer ;; In an indirect buffer, save its base buffer instead. @@ -3061,6 +3093,7 @@ After saving the buffer, this function runs `after-save-hook'." (insert ?\n)))) ;; Support VC version backups. (vc-before-save) + (run-hooks 'before-save-hook) (or (run-hook-with-args-until-success 'write-contents-functions) (run-hook-with-args-until-success 'local-write-file-hooks) (run-hook-with-args-until-success 'write-file-functions) @@ -3343,7 +3376,7 @@ saying what text to write." ;; ordinary or numeric backups. It might create a directory for ;; backups as a side-effect, according to `backup-directory-alist'. (let* ((filename (file-name-sans-versions - (make-backup-file-name filename))) + (make-backup-file-name (expand-file-name filename)))) (file (file-name-nondirectory filename)) (dir (file-name-directory filename)) (comp (file-name-all-completions file dir)) @@ -3421,6 +3454,20 @@ and second, t if reading the auto-save file. The function you specify is responsible for updating (or preserving) point.") +(defvar buffer-stale-function nil + "Function to check whether a non-file buffer needs reverting. +This should be a function with one optional argument NOCONFIRM. +Auto Revert Mode sets NOCONFIRM to t. The function should return +non-nil if the buffer should be reverted. A return value of +`fast' means that the need for reverting was not checked, but +that reverting the buffer is fast. The buffer is current when +this function is called. + +The idea behind the NOCONFIRM argument is that it should be +non-nil if the buffer is going to be reverted without asking the +user. In such situations, one has to be careful with potentially +time consuming operations.") + (defvar before-revert-hook nil "Normal hook for `revert-buffer' to run before reverting. If `revert-buffer-function' is used to override the normal revert @@ -3721,8 +3768,9 @@ This command is used in the special Dired buffer created by (kill-buffer buffer)))) (defun kill-some-buffers (&optional list) - "For each buffer in LIST, ask whether to kill it. -LIST defaults to all existing live buffers." + "Kill some buffers. Asks the user whether to kill each one of them. +Non-interactively, if optional argument LIST is non-`nil', it +specifies the list of buffers to kill, asking for approval for each one." (interactive) (if (null list) (setq list (buffer-list))) @@ -4129,10 +4177,10 @@ program specified by `directory-free-space-program' if that is non-nil." (save-match-data (with-temp-buffer (when (and directory-free-space-program - (zerop (call-process directory-free-space-program - nil t nil - directory-free-space-args - dir))) + (eq 0 (call-process directory-free-space-program + nil t nil + directory-free-space-args + dir))) ;; Usual format is a header line followed by a line of ;; numbers. (goto-char (point-min)) @@ -4172,14 +4220,20 @@ program specified by `directory-free-space-program' if that is non-nil." (defun insert-directory (file switches &optional wildcard full-directory-p) "Insert directory listing for FILE, formatted according to SWITCHES. Leaves point after the inserted text. -SWITCHES may be a string of options, or a list of strings. +SWITCHES may be a string of options, or a list of strings +representing individual options. Optional third arg WILDCARD means treat FILE as shell wildcard. Optional fourth arg FULL-DIRECTORY-P means file is a directory and switches do not contain `d', so that a full listing is expected. This works by running a directory listing program whose name is in the variable `insert-directory-program'. -If WILDCARD, it also runs the shell specified by `shell-file-name'." +If WILDCARD, it also runs the shell specified by `shell-file-name'. + +When SWITCHES contains the long `--dired' option,this function +treats it specially, for the sake of dired. However, the +normally equivalent short `-D' option is just passed on to +`insert-directory-program', as any other option." ;; We need the directory in order to find the right handler. (let ((handler (find-file-name-handler (expand-file-name file) 'insert-directory))) @@ -4252,23 +4306,25 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'." file)))))))) ;; If `insert-directory-program' failed, signal an error. - (if (/= result 0) - ;; On non-Posix systems, we cannot open a directory, so - ;; don't even try, because that will always result in - ;; the ubiquitous "Access denied". Instead, show the - ;; command line so the user can try to guess what went wrong. - (if (and (file-directory-p file) - (memq system-type '(ms-dos windows-nt))) - (error - "Reading directory: \"%s %s -- %s\" exited with status %s" - insert-directory-program - (if (listp switches) (concat switches) switches) - file result) - ;; Unix. Access the file to get a suitable error. - (access-file file "Reading directory") - (error "Listing directory failed but `access-file' worked"))) - - (when (string-match "--dired\\>" switches) + (unless (eq 0 result) + ;; On non-Posix systems, we cannot open a directory, so + ;; don't even try, because that will always result in + ;; the ubiquitous "Access denied". Instead, show the + ;; command line so the user can try to guess what went wrong. + (if (and (file-directory-p file) + (memq system-type '(ms-dos windows-nt))) + (error + "Reading directory: \"%s %s -- %s\" exited with status %s" + insert-directory-program + (if (listp switches) (concat switches) switches) + file result) + ;; Unix. Access the file to get a suitable error. + (access-file file "Reading directory") + (error "Listing directory failed but `access-file' worked"))) + + (when (if (stringp switches) + (string-match "--dired\\>" switches) + (member "--dired" switches)) (forward-line -2) (when (looking-at "//SUBDIRED//") (delete-region (point) (progn (forward-line 1) (point))) @@ -4475,4 +4531,5 @@ With prefix arg, silently save all file-visiting buffers, then kill." (define-key ctl-x-5-map "\C-f" 'find-file-other-frame) (define-key ctl-x-5-map "r" 'find-file-read-only-other-frame) +;;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f ;;; files.el ends here diff --git a/lisp/filesets.el b/lisp/filesets.el index 489a103549..cd42be6373 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -2519,4 +2519,5 @@ Set up hooks, load the cache file -- if existing -- and build the menu." ;;; sentence-end-double-space:t ;;; End: +;;; arch-tag: 2c03f85f-c3df-4cec-b0a3-b46fd5592d70 ;;; filesets.el ends here diff --git a/lisp/find-dired.el b/lisp/find-dired.el index 8ea6bbc61d..5bef4d6bf3 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el @@ -121,8 +121,14 @@ as the final argument." "" (concat "\\( " args " \\) ")) (car find-ls-option))) + ;; Start the find process. + (shell-command (concat args "&") (current-buffer)) ;; The next statement will bomb in classic dired (no optional arg allowed) (dired-mode dir (cdr find-ls-option)) + (let ((map (make-sparse-keymap))) + (set-keymap-parent map (current-local-map)) + (define-key map "\C-c\C-k" 'kill-find) + (use-local-map map)) (make-local-variable 'dired-sort-inhibit) (setq dired-sort-inhibit t) (set (make-local-variable 'revert-buffer-function) @@ -144,14 +150,24 @@ as the final argument." ;; Make second line a ``find'' line in analogy to the ``total'' or ;; ``wildcard'' line. (insert " " args "\n") - ;; Start the find process. - (let ((proc (start-process-shell-command find-dired-find-program (current-buffer) args))) + (setq buffer-read-only t) + (let ((proc (get-buffer-process (current-buffer)))) (set-process-filter proc (function find-dired-filter)) (set-process-sentinel proc (function find-dired-sentinel)) ;; Initialize the process marker; it is used by the filter. (move-marker (process-mark proc) 1 (current-buffer))) (setq mode-line-process '(":%s")))) +(defun kill-find () + "Kill the `find' process running in the current buffer." + (interactive) + (let ((find (get-buffer-process (current-buffer)))) + (and find (eq (process-status find) 'run) + (eq (process-filter find) (function find-dired-filter)) + (condition-case nil + (delete-process find) + (error nil))))) + ;;;###autoload (defun find-name-dired (dir pattern) "Search DIR recursively for files matching the globbing pattern PATTERN, @@ -192,7 +208,8 @@ Thus ARG can also contain additional grep options." (defun find-dired-filter (proc string) ;; Filter for \\[find-dired] processes. - (let ((buf (process-buffer proc))) + (let ((buf (process-buffer proc)) + (inhibit-read-only t)) (if (buffer-name buf) ; not killed? (save-excursion (set-buffer buf) @@ -229,7 +246,8 @@ Thus ARG can also contain additional grep options." (defun find-dired-sentinel (proc state) ;; Sentinel for \\[find-dired] processes. - (let ((buf (process-buffer proc))) + (let ((buf (process-buffer proc)) + (inhibit-read-only t)) (if (buffer-name buf) (save-excursion (set-buffer buf) @@ -252,4 +270,5 @@ Thus ARG can also contain additional grep options." (provide 'find-dired) +;;; arch-tag: 8edece95-af00-4221-bc74-a4bd2f75f9b0 ;;; find-dired.el ends here diff --git a/lisp/find-file.el b/lisp/find-file.el index 0831b16427..4805d08400 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -4,7 +4,7 @@ ;; Maintainer: FSF ;; Keywords: c, matching, tools -;; Copyright (C) 1994, 1995, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 2002, 2003 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -182,6 +182,7 @@ To override this, give an argument to `ff-find-other-file'." :type 'boolean :group 'ff) +;;;###autoload (defvar ff-special-constructs '( ;; C/C++ include, for NeXTSTEP too @@ -966,4 +967,5 @@ That name was previously determined by `ff-which-function-are-we-in'." (provide 'find-file) +;;; arch-tag: 5a2fc49e-3b0a-4708-9acf-fb14e471a97a ;;; find-file.el ends here diff --git a/lisp/find-lisp.el b/lisp/find-lisp.el index 937a82348f..f813004317 100644 --- a/lisp/find-lisp.el +++ b/lisp/find-lisp.el @@ -360,4 +360,5 @@ It is a function which takes two arguments, the directory and its parent." ;; autocompile: t ;; End: +;;; arch-tag: a711374c-f12a-46f6-aa18-ba7d77b9602a ;;; find-lisp.el ends here diff --git a/lisp/finder.el b/lisp/finder.el index 21ff1c9106..dc7343b9fb 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -1,6 +1,6 @@ ;;; finder.el --- topic & keyword-based code finder -;; Copyright (C) 1992, 1997, 1998, 1999, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1992,97,98,1999,2001,2004 Free Software Foundation, Inc. ;; Author: Eric S. Raymond ;; Created: 16 Jun 1992 @@ -44,6 +44,9 @@ ;; during byte-compilation (at which point it might be missing). (load "finder-inf" t t) +(defvar finder-mode-hook nil + "*Hook run when function `finder-mode' is called.") + ;; Local variable in finder buffer. (defvar finder-headmark) @@ -58,7 +61,7 @@ (calendar . "calendar and time management support") (comm . "communications, networking, remote access to files") (convenience . "convenience features for faster editing") - (data . "support editing files of data") + (data . "support for editing files of data") (docs . "support for Emacs documentation") (emulations . "emulations of other editors") (extensions . "Emacs Lisp language extensions") @@ -84,25 +87,24 @@ (outlines . "support for hierarchical outlining") (processes . "process, subshell, compilation, and job control support") (terminals . "support for terminal types") - (tex . "code related to the TeX formatter") + (tex . "supporting code for the TeX formatter") (tools . "programming tools") - (unix . "front-ends/assistants for, or emulators of, UNIX features") + (unix . "front-ends/assistants for, or emulators of, UNIX-like features") ;; Not a custom group and not currently useful. ;; (vms . "support code for vms") (wp . "word processing") )) -(defvar finder-mode-map nil) -(or finder-mode-map - (let ((map (make-sparse-keymap))) - (define-key map " " 'finder-select) - (define-key map "f" 'finder-select) - (define-key map [mouse-2] 'finder-mouse-select) - (define-key map "\C-m" 'finder-select) - (define-key map "?" 'finder-summary) - (define-key map "q" 'finder-exit) - (define-key map "d" 'finder-list-keywords) - (setq finder-mode-map map))) +(defvar finder-mode-map + (let ((map (make-sparse-keymap))) + (define-key map " " 'finder-select) + (define-key map "f" 'finder-select) + (define-key map [mouse-2] 'finder-mouse-select) + (define-key map "\C-m" 'finder-select) + (define-key map "?" 'finder-summary) + (define-key map "q" 'finder-exit) + (define-key map "d" 'finder-list-keywords) + map)) ;;; Code for regenerating the keyword list. @@ -279,6 +281,7 @@ FILE should be in a form suitable for passing to `locate-library'." (error "Can't find any Commentary section")) ;; This used to use *Finder* but that would clobber the ;; directory of categories. + (delete-other-windows) (pop-to-buffer "*Finder-package*") (setq buffer-read-only nil) (erase-buffer) @@ -332,12 +335,13 @@ FILE should be in a form suitable for passing to `locate-library'." \\[finder-select] more help for the item on the current line \\[finder-exit] exit Finder mode and kill the Finder buffer." (interactive) + (kill-all-local-variables) (use-local-map finder-mode-map) (set-syntax-table emacs-lisp-mode-syntax-table) (setq mode-name "Finder") (setq major-mode 'finder-mode) - (make-local-variable 'finder-headmark) - (setq finder-headmark nil)) + (set (make-local-variable 'finder-headmark) nil) + (run-mode-hooks 'finder-mode-hook)) (defun finder-summary () "Summarize basic Finder commands." @@ -362,4 +366,5 @@ finder directory, \\[finder-exit] = quit, \\[finder-summary] = help"))) (provide 'finder) +;;; arch-tag: ec85ff49-8cb8-41f5-a63f-9131d53ce2c5 ;;; finder.el ends here diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el index 44b496357a..63654572f9 100644 --- a/lisp/flow-ctrl.el +++ b/lisp/flow-ctrl.el @@ -123,4 +123,5 @@ to get the effect of a C-q." (provide 'flow-ctrl) +;;; arch-tag: 0eb7b19e-0d93-4e0b-9ea2-72b574076a56 ;;; flow-ctrl.el ends here diff --git a/lisp/foldout.el b/lisp/foldout.el index 21f2208723..10f3cecd3e 100644 --- a/lisp/foldout.el +++ b/lisp/foldout.el @@ -214,12 +214,12 @@ (if (not (boundp 'outline-minor-mode)) (error "Can't find outline-minor-mode")) -(defconst foldout-fold-list nil +(defvar foldout-fold-list nil "List of start and end markers for the folds currently entered. An end marker of nil means the fold ends after (point-max).") (make-variable-buffer-local 'foldout-fold-list) -(defconst foldout-modeline-string nil +(defvar foldout-modeline-string nil "Modeline string announcing that we are in an outline fold.") (make-variable-buffer-local 'foldout-modeline-string) @@ -567,4 +567,5 @@ Valid modifiers are shift, control, meta, alt, hyper and super.") (provide 'foldout) +;;; arch-tag: 19d095a2-1f09-42a7-a5ac-e2a3078cfe95 ;;; foldout.el ends here diff --git a/lisp/follow.el b/lisp/follow.el index 4480ba6b84..0ae6e17538 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -2347,4 +2347,5 @@ This prevents `mouse-drag-region' from messing things up." ;; | save it". -- Douglas Adams, "Last Chance to See" | ;; \------------------------------------------------------------------------/ +;;; arch-tag: 7b16bb1a-808c-4991-a8cc-66d3822936d0 ;;; follow.el ends here diff --git a/lisp/font-core.el b/lisp/font-core.el index e5e3aea920..ce4a35a0ec 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el @@ -297,3 +297,4 @@ means that Font Lock mode is turned on for buffers in C and C++ modes only." ;;; font-core.el ends here +;;; arch-tag: f8c286e1-02f7-41d9-b89b-1b67780aed71 diff --git a/lisp/font-lock.el b/lisp/font-lock.el index d8aad734a8..27497057a9 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1,6 +1,6 @@ ;;; font-lock.el --- Electric font lock mode -;; Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001, 02, 2003 +;; Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001, 02, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: jwz, then rms, then sm @@ -210,7 +210,7 @@ (require 'syntax) ;; Define core `font-lock' group. -(defgroup font-lock nil +(defgroup font-lock '((jit-lock custom-group)) "Font Lock mode text highlighting package." :link '(custom-manual "(emacs)Font Lock") :link '(custom-manual "(elisp)Font Lock Mode") @@ -228,22 +228,13 @@ ;; Define support mode groups here to impose `font-lock' group order. (defgroup fast-lock nil "Font Lock support mode to cache fontification." - :link '(custom-manual "(emacs)Support Modes") :load 'fast-lock :group 'font-lock) (defgroup lazy-lock nil "Font Lock support mode to fontify lazily." - :link '(custom-manual "(emacs)Support Modes") :load 'lazy-lock :group 'font-lock) - -(defgroup jit-lock nil - "Font Lock support mode to fontify just-in-time." - :link '(custom-manual "(emacs)Support Modes") - :version "21.1" - :load 'jit-lock - :group 'font-lock) ;; User variables. @@ -1031,7 +1022,8 @@ what properties to clear before refontifying a region.") ;; Called when any modification is made to buffer text. (defun font-lock-after-change-function (beg end old-len) - (let ((inhibit-point-motion-hooks t)) + (let ((inhibit-point-motion-hooks t) + (inhibit-quit t)) (save-excursion (save-match-data ;; Rescan between start of lines enclosing the region. @@ -1566,24 +1558,34 @@ Sets various variables using `font-lock-defaults' (or, if nil, using ;; But now we do it the custom way. Note that `defface' will not overwrite any ;; faces declared above via `custom-declare-face'. (defface font-lock-comment-face - '((((type tty pc) (class color) (background light)) (:foreground "red")) - (((type tty pc) (class color) (background dark)) (:foreground "red1")) - (((class grayscale) (background light)) + '((((class grayscale) (background light)) (:foreground "DimGray" :weight bold :slant italic)) (((class grayscale) (background dark)) (:foreground "LightGray" :weight bold :slant italic)) - (((class color) (background light)) (:foreground "Firebrick")) - (((class color) (background dark)) (:foreground "chocolate1")) + (((class color) (min-colors 88) (background light)) + (:foreground "Firebrick")) + (((class color) (min-colors 88) (background dark)) + (:foreground "chocolate1")) + (((class color) (min-colors 16) (background light)) + (:foreground "red")) + (((class color) (min-colors 16) (background dark)) + (:foreground "red1")) + (((class color) (min-colors 8) (background light)) + (:foreground "red")) + (((class color) (min-colors 8) (background dark)) + (:foreground "red1")) (t (:weight bold :slant italic))) "Font Lock mode face used to highlight comments." :group 'font-lock-highlighting-faces) (defface font-lock-string-face - '((((type tty) (class color)) (:foreground "green")) - (((class grayscale) (background light)) (:foreground "DimGray" :slant italic)) + '((((class grayscale) (background light)) (:foreground "DimGray" :slant italic)) (((class grayscale) (background dark)) (:foreground "LightGray" :slant italic)) - (((class color) (background light)) (:foreground "RosyBrown")) - (((class color) (background dark)) (:foreground "LightSalmon")) + (((class color) (min-colors 88) (background light)) (:foreground "RosyBrown")) + (((class color) (min-colors 88) (background dark)) (:foreground "LightSalmon")) + (((class color) (min-colors 16) (background light)) (:foreground "RosyBrown")) + (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon")) + (((class color) (min-colors 8)) (:foreground "green")) (t (:slant italic))) "Font Lock mode face used to highlight strings." :group 'font-lock-highlighting-faces) @@ -1594,71 +1596,84 @@ Sets various variables using `font-lock-defaults' (or, if nil, using :group 'font-lock-highlighting-faces) (defface font-lock-keyword-face - '((((type tty) (class color)) (:foreground "cyan" :weight bold)) - (((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) + '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) - (((class color) (background light)) (:foreground "Purple")) - (((class color) (background dark)) (:foreground "Cyan")) + (((class color) (min-colors 88) (background light)) (:foreground "Purple")) + (((class color) (min-colors 88) (background dark)) (:foreground "Cyan")) + (((class color) (min-colors 16) (background light)) (:foreground "Purple")) + (((class color) (min-colors 16) (background dark)) (:foreground "Cyan")) + (((class color) (min-colors 8)) (:foreground "cyan" :weight bold)) (t (:weight bold))) "Font Lock mode face used to highlight keywords." :group 'font-lock-highlighting-faces) (defface font-lock-builtin-face - '((((type tty) (class color)) (:foreground "blue" :weight light)) - (((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) + '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) - (((class color) (background light)) (:foreground "Orchid")) - (((class color) (background dark)) (:foreground "LightSteelBlue")) + (((class color) (min-colors 88) (background light)) (:foreground "Orchid")) + (((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue")) + (((class color) (min-colors 16) (background light)) (:foreground "Orchid")) + (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue")) + (((class color) (min-colors 8)) (:foreground "blue" :weight bold)) (t (:weight bold))) "Font Lock mode face used to highlight builtins." :group 'font-lock-highlighting-faces) (defface font-lock-function-name-face - '((((type tty) (class color)) (:foreground "blue" :weight bold)) - (((class color) (background light)) (:foreground "Blue")) - (((class color) (background dark)) (:foreground "LightSkyBlue")) + '((((class color) (min-colors 88) (background light)) (:foreground "Blue")) + (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) + (((class color) (min-colors 16) (background light)) (:foreground "Blue")) + (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue")) + (((class color) (min-colors 8)) (:foreground "blue" :weight bold)) (t (:inverse-video t :weight bold))) "Font Lock mode face used to highlight function names." :group 'font-lock-highlighting-faces) (defface font-lock-variable-name-face - '((((type tty) (class color)) (:foreground "yellow" :weight light)) - (((class grayscale) (background light)) + '((((class grayscale) (background light)) (:foreground "Gray90" :weight bold :slant italic)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold :slant italic)) - (((class color) (background light)) (:foreground "DarkGoldenrod")) - (((class color) (background dark)) (:foreground "LightGoldenrod")) + (((class color) (min-colors 88) (background light)) (:foreground "DarkGoldenrod")) + (((class color) (min-colors 88) (background dark)) (:foreground "LightGoldenrod")) + (((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod")) + (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod")) + (((class color) (min-colors 8)) (:foreground "yellow" :weight light)) (t (:weight bold :slant italic))) "Font Lock mode face used to highlight variable names." :group 'font-lock-highlighting-faces) (defface font-lock-type-face - '((((type tty) (class color)) (:foreground "green")) - (((class grayscale) (background light)) (:foreground "Gray90" :weight bold)) + '((((class grayscale) (background light)) (:foreground "Gray90" :weight bold)) (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold)) - (((class color) (background light)) (:foreground "ForestGreen")) - (((class color) (background dark)) (:foreground "PaleGreen")) + (((class color) (min-colors 88) (background light)) (:foreground "ForestGreen")) + (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen")) + (((class color) (min-colors 16) (background light)) (:foreground "ForestGreen")) + (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen")) + (((class color) (min-colors 8)) (:foreground "green")) (t (:weight bold :underline t))) "Font Lock mode face used to highlight type and classes." :group 'font-lock-highlighting-faces) (defface font-lock-constant-face - '((((type tty) (class color)) (:foreground "magenta")) - (((class grayscale) (background light)) + '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold :underline t)) (((class grayscale) (background dark)) (:foreground "Gray50" :weight bold :underline t)) - (((class color) (background light)) (:foreground "CadetBlue")) - (((class color) (background dark)) (:foreground "Aquamarine")) + (((class color) (min-colors 88) (background light)) (:foreground "CadetBlue")) + (((class color) (min-colors 88) (background dark)) (:foreground "Aquamarine")) + (((class color) (min-colors 16) (background light)) (:foreground "CadetBlue")) + (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) + (((class color) (min-colors 8)) (:foreground "magenta")) (t (:weight bold :underline t))) "Font Lock mode face used to highlight constants and labels." :group 'font-lock-highlighting-faces) (defface font-lock-warning-face - '((((type tty) (class color)) (:foreground "red")) - (((class color) (background light)) (:foreground "Red" :weight bold)) - (((class color) (background dark)) (:foreground "Pink" :weight bold)) + '((((class color) (min-colors 88) (background light)) (:foreground "Red" :weight bold)) + (((class color) (min-colors 88) (background dark)) (:foreground "Pink" :weight bold)) + (((class color) (min-colors 16) (background light)) (:foreground "Red" :weight bold)) + (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :weight bold)) (((class color) (min-colors 8)) (:foreground "red")) (t (:inverse-video t :weight bold))) "Font Lock mode face used to highlight warnings." :group 'font-lock-highlighting-faces) @@ -1874,10 +1889,13 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." "condition-case" "track-mouse" "eval-after-load" "eval-and-compile" "eval-when-compile" "eval-when" + "with-category-table" "with-current-buffer" "with-electric-help" + "with-local-quit" "with-no-warnings" "with-output-to-string" "with-output-to-temp-buffer" + "with-selected-window" "with-syntax-table" "with-temp-buffer" "with-temp-file" "with-temp-message" - "with-timeout") t) + "with-timeout" "with-timeout-handler") t) "\\>") 1) ;; @@ -1892,7 +1910,13 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." "proclaim" "declaim" "declare" "symbol-macrolet" "lexical-let" "lexical-let*" "flet" "labels" "compiler-let" "destructuring-bind" "macrolet" "tagbody" "block" - "return" "return-from") t) + "return" "return-from" + "with-accessors" "with-compilation-unit" + "with-condition-restarts" "with-hash-table-iterator" + "with-input-from-string" "with-open-file" + "with-open-stream" "with-output-to-string" + "with-package-iterator" "with-simple-restart" + "with-slots" "with-standard-io-syntax") t) "\\>") 1) ;; @@ -1917,8 +1941,11 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." ;; ELisp and CLisp `&' keywords as types. '("\\&\\sw+\\>" . font-lock-type-face) ;; - ;; CL `with-' and `do-' constructs - '("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1 font-lock-keyword-face) +;;; This is too general -- rms. +;;; A user complained that he has functions whose names start with `do' +;;; and that they get the wrong color. +;;; ;; CL `with-' and `do-' constructs +;;; '("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1 font-lock-keyword-face) ))) "Gaudy level highlighting for Lisp modes.") @@ -1927,7 +1954,5 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." (provide 'font-lock) -(when (eq font-lock-support-mode 'jit-lock-mode) - (require 'jit-lock)) - +;;; arch-tag: 682327e4-64d8-4057-b20b-1fbb9f1fc54c ;;; font-lock.el ends here diff --git a/lisp/format.el b/lisp/format.el index 00c71f8a45..3f1f9c6298 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -1,6 +1,6 @@ ;;; format.el --- read and save files in multiple formats -;; Copyright (c) 1994, 1995, 1997, 1999 Free Software Foundation +;; Copyright (c) 1994, 1995, 1997, 1999, 2004 Free Software Foundation ;; Author: Boris Goldowsky @@ -278,7 +278,7 @@ For most purposes, consider using `format-decode-region' instead." (let ((do format) f) (while do (or (setq f (assq (car do) format-alist)) - (error "Unknown format" (car do))) + (error "Unknown format %s" (car do))) ;; Decode: (if (nth 3 f) (setq end (format-decode-run-method (nth 3 f) begin end))) @@ -357,11 +357,15 @@ one of the formats defined in `format-alist', or a list of such symbols." (funcall to-fn beg end (current-buffer))))) (setq format (cdr format))))))) -(defun format-write-file (filename format) +(defun format-write-file (filename format &optional confirm) "Write current buffer into file FILENAME using some FORMAT. -Makes buffer visit that file and sets the format as the default for future +Make buffer visit that file and set the format as the default for future saves. If the buffer is already visiting a file, you can specify a directory -name as FILENAME, to write a file of the same old name in that directory." +name as FILENAME, to write a file of the same old name in that directory. + +If optional third arg CONFIRM is non-nil, this function asks for +confirmation before overwriting an existing file. Interactively, +confirmation is required unless you supply a prefix argument." (interactive ;; Same interactive spec as write-file, plus format question. (let* ((file (if buffer-file-name @@ -373,7 +377,7 @@ name as FILENAME, to write a file of the same old name in that directory." nil nil (buffer-name)))) (fmt (format-read (format "Write file `%s' in format: " (file-name-nondirectory file))))) - (list file fmt))) + (list file fmt (not current-prefix-arg)))) (let ((old-formats buffer-file-format) preserve-formats) (dolist (fmt old-formats) @@ -384,7 +388,7 @@ name as FILENAME, to write a file of the same old name in that directory." (dolist (fmt preserve-formats) (unless (memq fmt buffer-file-format) (setq buffer-file-format (append buffer-file-format (list fmt)))))) - (write-file filename)) + (write-file filename confirm)) (defun format-find-file (filename format) "Find the file FILENAME using data format FORMAT. @@ -407,7 +411,7 @@ The optional third and fourth arguments BEG and END specify the part of the file to read. The return value is like the value of `insert-file-contents': -a list (ABSOLUTE-FILE-NAME . SIZE)." +a list (ABSOLUTE-FILE-NAME SIZE)." (interactive ;; Same interactive spec as write-file, plus format question. (let* ((file (read-file-name "Find file: ")) @@ -420,7 +424,7 @@ a list (ABSOLUTE-FILE-NAME . SIZE)." (setq size (nth 1 value))) (if format (setq size (format-decode format size) - value (cons (car value) size))) + value (list (car value) size))) value)) (defun format-read (&optional prompt) @@ -1040,4 +1044,5 @@ OLD and NEW are the values." (provide 'format) +;;; arch-tag: c387e9c7-a93d-47bf-89bc-8ca67e96755a ;;; format.el ends here diff --git a/lisp/forms-d2.el b/lisp/forms-d2.el index ae338abf10..19164b6a6d 100644 --- a/lisp/forms-d2.el +++ b/lisp/forms-d2.el @@ -85,4 +85,5 @@ used to fill to the column." ;; That's all, folks! +;;; arch-tag: 8e5d5dac-7abf-4722-ab5e-03eb749beaca ;;; forms-d2.el ends here diff --git a/lisp/forms-pass.el b/lisp/forms-pass.el index b635c965cf..4b3cb3a17b 100644 --- a/lisp/forms-pass.el +++ b/lisp/forms-pass.el @@ -30,4 +30,5 @@ "Shell: " 7 "\n")) +;;; arch-tag: 74801012-1a2d-4173-b9e4-fcfa241e2305 ;;; forms-pass.el ends here diff --git a/lisp/forms.el b/lisp/forms.el index 39ee142dc2..aa0582c918 100644 --- a/lisp/forms.el +++ b/lisp/forms.el @@ -301,11 +301,6 @@ (provide 'forms) ;;; official (provide 'forms-mode) ;;; for compatibility -(defconst forms-version (substring "$Revision: 2.47 $" 11 -2) - "The version number of forms-mode (as string). The complete RCS id is: - - $Id: forms.el,v 2.47 2003/05/28 11:19:48 rms Exp $") - (defcustom forms-mode-hook nil "Hook run upon entering Forms mode." :group 'forms @@ -694,7 +689,7 @@ Commands: Equivalent keys in read-only mode: ;;(message "forms: proceeding setup (new file)...") (progn (insert - "GNU Emacs Forms Mode version " forms-version "\n\n" + "GNU Emacs Forms Mode\n\n" (if (file-exists-p forms-file) (concat "No records available in file `" forms-file "'\n\n") (format "Creating new file `%s'\nwith %d field%s per record\n\n" @@ -2059,4 +2054,5 @@ Usage: (setq forms-number-of-fields (goto-char (point-max)) (insert ret))))) +;;; arch-tag: 4a6695c7-d47a-4a21-809b-5cec7f8ec7a1 ;;; forms.el ends here diff --git a/lisp/frame.el b/lisp/frame.el index f8df2c7a2e..a470fbc0f9 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -85,8 +85,9 @@ for pop-up frames." :group 'frames) (setq pop-up-frame-function - (function (lambda () - (make-frame pop-up-frame-alist)))) + ;; Using `function' here caused some sort of problem. + '(lambda () + (make-frame pop-up-frame-alist))) (defcustom special-display-frame-alist '((height . 14) (width . 80) (unsplittable . t)) @@ -335,10 +336,22 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." frame-initial-geometry-arguments))) (top (frame-parameter frame-initial-frame 'top))) (when (and (consp initial-top) (eq '- (car initial-top))) - (setq newparms - (append newparms - `((top . ,(+ top (* lines char-height)))) - nil))) + (let ((adjusted-top + (cond ((and (consp top) + (eq '+ (car top))) + (list '+ + (+ (cadr top) + (* lines char-height)))) + ((and (consp top) + (eq '- (car top))) + (list '- + (- (cadr top) + (* lines char-height)))) + (t (+ top (* lines char-height)))))) + (setq newparms + (append newparms + `((top . ,adjusted-top)) + nil)))) (modify-frame-parameters frame-initial-frame newparms) (tool-bar-mode -1))))) @@ -942,6 +955,18 @@ one frame, otherwise the name is displayed on the frame's caption bar." (interactive "sFrame name: ") (modify-frame-parameters (selected-frame) (list (cons 'name name)))) + +(defun frame-current-scroll-bars (&optional frame) + "Return the current scroll-bar settings in frame FRAME. +Value is a cons (VERTICAL . HORISONTAL) where VERTICAL specifies the +current location of the vertical scroll-bars (left, right, or nil), +and HORISONTAL specifies the current location of the horisontal scroll +bars (top, bottom, or nil)." + (let ((vert (frame-parameter frame 'vertical-scroll-bars)) + (hor nil)) + (unless (memq vert '(left right nil)) + (setq vert default-frame-scroll-bars)) + (cons vert hor))) ;;;; Frame/display capabilities. (defun display-mouse-p (&optional display) @@ -1327,4 +1352,5 @@ Use Custom to set this variable to get the display updated." (provide 'frame) +;;; arch-tag: 82979c70-b8f2-4306-b2ad-ddbd6b328b56 ;;; frame.el ends here diff --git a/lisp/fringe.el b/lisp/fringe.el index bbc27d5839..f52ecdf64d 100644 --- a/lisp/fringe.el +++ b/lisp/fringe.el @@ -35,6 +35,33 @@ ;;; Code: +;; Standard fringe bitmaps + +(defconst no-fringe-bitmap 0) +(defconst undef-fringe-bitmap 1) +(defconst left-truncation-fringe-bitmap 2) +(defconst right-truncation-fringe-bitmap 3) +(defconst up-arrow-fringe-bitmap 4) +(defconst down-arrow-fringe-bitmap 5) +(defconst continued-line-fringe-bitmap 6) +(defconst continuation-line-fringe-bitmap 7) +(defconst overlay-arrow-fringe-bitmap 8) +(defconst top-left-angle-fringe-bitmap 9) +(defconst top-right-angle-fringe-bitmap 10) +(defconst bottom-left-angle-fringe-bitmap 11) +(defconst bottom-right-angle-fringe-bitmap 12) +(defconst left-bracket-fringe-bitmap 13) +(defconst right-bracket-fringe-bitmap 14) +(defconst filled-box-cursor-fringe-bitmap 15) +(defconst hollow-box-cursor-fringe-bitmap 16) +(defconst hollow-square-fringe-bitmap 17) +(defconst bar-cursor-fringe-bitmap 18) +(defconst hbar-cursor-fringe-bitmap 19) +(defconst empty-line-fringe-bitmap 20) + + +;; Control presence of fringes + (defvar fringe-mode) (defun set-fringe-mode-1 (ignore value) @@ -119,7 +146,7 @@ If ALL-FRAMES, the negation of the fringe values in Otherwise the negation of the fringe value in the currently selected frame parameter is used." (let ((mode (intern (completing-read - "Select fringe mode for all frames (SPACE for list): " + "Select fringe mode for all frames (type ? for list): " '(("none") ("default") ("left-only") ("right-only") ("half") ("minimal")) nil t)))) @@ -139,34 +166,70 @@ frame parameter is used." ;;;###autoload (defun fringe-mode (&optional mode) - "Toggle appearance of fringes on all frames. -Valid values for MODE include `none', `default', `left-only', -`right-only', `minimal' and `half'. MODE can also be a cons cell -where the integer in car will be used as left fringe width and the -integer in cdr will be used as right fringe width. If MODE is not -specified, the user is queried. -It applies to all frames that exist and frames to be created in the -future. -If you want to set appearance of fringes on the selected frame only, -see `set-fringe-style'." + "Set the default appearance of fringes on all frames. + +When called interactively, query the user for MODE. Valid values +for MODE include `none', `default', `left-only', `right-only', +`minimal' and `half'. + +When used in a Lisp program, MODE can be a cons cell where the +integer in car specifies the left fringe width and the integer in +cdr specifies the right fringe width. MODE can also be a single +integer that specifies both the left and the right fringe width. +If a fringe width specification is nil, that means to use the +default width (8 pixels). This command may round up the left and +right width specifications to ensure that their sum is a multiple +of the character width of a frame. It never rounds up a fringe +width of 0. + +Fringe widths set by `set-window-fringes' override the default +fringe widths set by this command. This command applies to all +frames that exist and frames to be created in the future. If you +want to set the default appearance of fringes on the selected +frame only, see the command `set-fringe-style'." (interactive (list (fringe-query-style 'all-frames))) (set-fringe-mode mode)) ;;;###autoload (defun set-fringe-style (&optional mode) - "Set appearance of fringes on selected frame. -Valid values for MODE include `none', `default', `left-only', -`right-only', `minimal' and `half'. MODE can also be a cons cell -where the integer in car will be used as left fringe width and the -integer in cdr will be used as right fringe width. If MODE is not -specified, the user is queried. -If you want to set appearance of fringes on all frames, see `fringe-mode'." + "Set the default appearance of fringes on the selected frame. + +When called interactively, query the user for MODE. Valid values +for MODE include `none', `default', `left-only', `right-only', +`minimal' and `half'. + +When used in a Lisp program, MODE can be a cons cell where the +integer in car specifies the left fringe width and the integer in +cdr specifies the right fringe width. MODE can also be a single +integer that specifies both the left and the right fringe width. +If a fringe width specification is nil, that means to use the +default width (8 pixels). This command may round up the left and +right width specifications to ensure that their sum is a multiple +of the character width of a frame. It never rounds up a fringe +width of 0. + +Fringe widths set by `set-window-fringes' override the default +fringe widths set by this command. If you want to set the +default appearance of fringes on all frames, see the command +`fringe-mode'." (interactive (list (fringe-query-style))) (modify-frame-parameters (selected-frame) (list (cons 'left-fringe (if (consp mode) (car mode) mode)) (cons 'right-fringe (if (consp mode) (cdr mode) mode))))) +(defsubst fringe-columns (side &optional real) + "Return the width, measured in columns, of the fringe area on SIDE. +If optional argument REAL is non-nil, return a real floating point +number instead of a rounded integer value. +SIDE must be the symbol `left' or `right'." + (funcall (if real '/ 'ceiling) + (or (funcall (if (eq side 'left) 'car 'cadr) + (window-fringes)) + 0) + (float (frame-char-width)))) + (provide 'fringe) +;;; arch-tag: 6611ef60-0869-47ed-8b93-587ee7d3ff5d ;;; fringe.el ends here diff --git a/lisp/generic-x.el b/lisp/generic-x.el index 03ef7a5113..88703af799 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el @@ -1868,7 +1868,38 @@ you must reload generic-x to enable the specified modes." ;;List of comment characters (list ?#) ;;List of keywords - (list "alias" "pre-install" "post-install" "options" "probeall") + (list + "above" + "alias" + "below" + "define" + "depfile" + "else" + "elseif" + "endif" + "if" + "include" + "insmod_opt" + "install" + "keep" + "options" + "path" + "generic_stringfile" + "pcimapfile" + "isapnpmapfile" + "usbmapfile" + "parportmapfile" + "ieee1394mapfile" + "pnpbiosmapfile" + "probe" + "probeall" + "prune" + "post-install" + "post-remove" + "pre-install" + "pre-remove" + "remove" + "persistdir") ;;List of additional font-lock-expressions nil ;;List of additional automode-alist expressions @@ -1879,4 +1910,5 @@ you must reload generic-x to enable the specified modes." (provide 'generic-x) +;;; arch-tag: cde692a5-9ff6-4506-9999-c67999c2bdb5 ;;; generic-x.el ends here diff --git a/lisp/generic.el b/lisp/generic.el index 80885915e7..d35a31a2b6 100644 --- a/lisp/generic.el +++ b/lisp/generic.el @@ -54,7 +54,7 @@ ;; ;; * Additional expressions to font-lock. This should be a list of ;; expressions, each of which should be of the same form -;; as those in `font-lock-defaults-alist'. +;; as those in `font-lock-keywords'. ;; ;; * List of regular expressions to be placed in auto-mode-alist. ;; @@ -206,7 +206,7 @@ KEYWORD-LIST is a list of keywords to highlight with `font-lock-keyword-face'. Each keyword should be a string. FONT-LOCK-LIST is a list of additional expressions to highlight. Each entry -in the list should have the same form as an entry in `font-lock-defaults-alist' +in the list should have the same form as an entry in `font-lock-keywords'. AUTO-MODE-LIST is a list of regular expressions to add to `auto-mode-alist'. These regexps are added to `auto-mode-alist' as soon as `define-generic-mode' @@ -417,4 +417,5 @@ The regexp is highlighted with FACE." (provide 'generic) +;;; arch-tag: 239c1fc4-1303-48d9-9ac0-657d655669ea ;;; generic.el ends here diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 43be1e84e4..dc39720f79 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,20 @@ +2004-03-27 Juanma Barranquero + + * gnus-srvr.el (gnus-server-prepare): Remove spurious call to `cdr'. + +2004-03-22 Stefan Monnier + + * gnus-art.el: Use inhibit-read-only instead of buffer-read-only. + (gnus-narrow-to-page): Don't assume point-min == 1. + (gnus-article-edit-mode): Derive from message-mode. + (gnus-button-alist): Add buttons to (info "(emacs)Keymaps"). + + * gnus-score.el (gnus-score-find-bnews): Simplify and don't assume + point-min == 1. + + * imap.el (imap-parse-address-list, imap-parse-body-ext): + Disable incorrect use of `assert'. + 2004-03-05 Stefan Monnier * message.el (message-mode): Fix last change. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 0a9920c038..5f0487968f 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1,6 +1,6 @@ ;;; gnus-art.el --- article mode commands for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 +;; Copyright (C) 1996, 97, 98, 1999, 2000, 01, 02, 2004 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -1142,7 +1142,7 @@ Initialized from `text-mode-syntax-table.") (unless gnus-inhibit-hiding (save-excursion (save-restriction - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) (case-fold-search t) (max (1+ (length gnus-sorted-header-list))) (ignored (when (not gnus-visible-headers) @@ -1200,7 +1200,7 @@ always hide." (not gnus-show-all-headers)) (save-excursion (save-restriction - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) (list gnus-boring-article-headers) (inhibit-point-motion-hooks t) elem) @@ -1303,7 +1303,7 @@ always hide." (defun article-normalize-headers () "Make all header lines 40 characters long." (interactive) - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) column) (save-excursion (save-restriction @@ -1346,7 +1346,7 @@ FROM is a string of characters to translate from; to is a string of characters to translate to." (save-excursion (when (article-goto-body) - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) (x (make-string 225 ?x)) (i -1)) (while (< (incf i) (length x)) @@ -1362,7 +1362,7 @@ characters to translate to." MAP is an alist where the elements are on the form (\"from\" \"to\")." (save-excursion (when (article-goto-body) - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) elem) (while (setq elem (pop map)) (save-excursion @@ -1374,7 +1374,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (interactive) (save-excursion (when (article-goto-body) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (while (search-forward "\b" nil t) (let ((next (char-after)) (previous (char-after (- (point) 2)))) @@ -1399,7 +1399,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." "Fill lines that are wider than the window width." (interactive) (save-excursion - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) (width (window-width (get-buffer-window (current-buffer))))) (save-restriction (article-goto-body) @@ -1417,7 +1417,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." "Capitalize the first word in each sentence." (interactive) (save-excursion - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) (paragraph-start "^[\n\^L]")) (article-goto-body) (while (not (eobp)) @@ -1428,7 +1428,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." "Remove trailing CRs and then translate remaining CRs into LFs." (interactive) (save-excursion - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (goto-char (point-min)) (while (re-search-forward "\r+$" nil t) (replace-match "" t t)) @@ -1440,7 +1440,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." "Remove all trailing blank lines from the article." (interactive) (save-excursion - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (goto-char (point-max)) (delete-region (point) @@ -1583,7 +1583,7 @@ If FORCE, decode the article whether it is marked as quoted-printable or not." (interactive (list 'force)) (save-excursion - (let ((buffer-read-only nil) type charset) + (let ((inhibit-read-only t) type charset) (if (gnus-buffer-live-p gnus-original-article-buffer) (with-current-buffer gnus-original-article-buffer (setq type @@ -1610,7 +1610,7 @@ or not." If FORCE, decode the article whether it is marked as base64 not." (interactive (list 'force)) (save-excursion - (let ((buffer-read-only nil) type charset) + (let ((inhibit-read-only t) type charset) (if (gnus-buffer-live-p gnus-original-article-buffer) (with-current-buffer gnus-original-article-buffer (setq type @@ -1643,14 +1643,14 @@ If FORCE, decode the article whether it is marked as base64 not." (interactive) (require 'rfc1843) (save-excursion - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (rfc1843-decode-region (point-min) (point-max))))) (defun article-wash-html () "Format an html article." (interactive) (save-excursion - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) charset) (if (gnus-buffer-live-p gnus-original-article-buffer) (with-current-buffer gnus-original-article-buffer @@ -1794,7 +1794,7 @@ always hide." (save-excursion (set-buffer gnus-article-buffer) (when (article-goto-body) - (let* ((buffer-read-only nil) + (let* ((inhibit-read-only t) (start (point)) (end (point-max)) (orig (buffer-substring start end)) @@ -1812,7 +1812,7 @@ always hide." (unless (gnus-article-check-hidden-text 'signature arg) (save-excursion (save-restriction - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (when (gnus-article-narrow-to-signature) (gnus-article-hide-text-type (point-min) (point-max) 'signature))))))) @@ -2001,7 +2001,7 @@ means show, 0 means toggle." (defun gnus-article-show-hidden-text (type &optional dummy) "Show all hidden text of type TYPE. Originally it is hide instead of DUMMY." - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) (inhibit-point-motion-hooks t)) (gnus-remove-text-properties-when 'article-type type @@ -2054,7 +2054,7 @@ should replace the \"Date:\" one, or should be added below it." (forward-line 1)) (when (and date (not (string= date ""))) (goto-char (point-min)) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) ;; Delete any old Date headers. (while (re-search-forward date-regexp nil t) (if pos @@ -2238,7 +2238,7 @@ This format is defined by the `gnus-article-time-format' variable." "Show all hidden text in the article buffer." (interactive) (save-excursion - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (gnus-article-unhide-text (point-min) (point-max))))) (defun article-emphasize (&optional arg) @@ -2252,7 +2252,7 @@ This format is defined by the `gnus-article-time-format' variable." gnus-article-emphasis-alist) (error)) gnus-emphasis-alist)) - (buffer-read-only nil) + (inhibit-read-only t) (props (append '(article-type emphasis) gnus-hidden-properties)) regexp elem beg invisible visible face) @@ -2837,7 +2837,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (when (and (boundp 'transient-mark-mode) transient-mark-mode) (setq mark-active nil)) - (if (not (setq result (let ((buffer-read-only nil)) + (if (not (setq result (let ((inhibit-read-only t)) (gnus-request-article-this-buffer article group)))) ;; There is no such article. @@ -3671,7 +3671,7 @@ If given a numerical ARG, move forward ARG pages." (widen) ;; Remove any old next/prev buttons. (when (gnus-visual-p 'page-marker) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (gnus-remove-text-with-property 'gnus-prev) (gnus-remove-text-with-property 'gnus-next))) (when @@ -3686,12 +3686,12 @@ If given a numerical ARG, move forward ARG pages." (match-beginning 0) (point))) (when (and (gnus-visual-p 'page-marker) - (not (= (point-min) 1))) + (> (point-min) (save-restriction (widen) (point-min)))) (save-excursion (goto-char (point-min)) (gnus-insert-prev-page-button))) (when (and (gnus-visual-p 'page-marker) - (< (+ (point-max) 2) (buffer-size))) + (< (point-max) (save-restriction (widen) (point-max)))) (save-excursion (goto-char (point-max)) (gnus-insert-next-page-button))))) @@ -4044,7 +4044,7 @@ If given a prefix, show the hidden text instead." (methods (and (stringp article) gnus-refer-article-method)) result - (buffer-read-only nil)) + (inhibit-read-only t)) (if (or (not (listp methods)) (and (symbolp (car methods)) (assq (car methods) nnoo-definition-alist))) @@ -4140,7 +4140,7 @@ If given a prefix, show the hidden text instead." "\C-c\C-w" gnus-article-edit-mode-map) "f" gnus-article-edit-full-stops)) -(define-derived-mode gnus-article-edit-mode text-mode "Article Edit" +(define-derived-mode gnus-article-edit-mode message-mode "Article Edit" "Major mode for editing articles. This is an extended text-mode. @@ -4212,7 +4212,7 @@ groups." (gnus-article-edit-exit) (save-excursion (set-buffer buf) - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (funcall func arg)) ;; The cache and backlog have to be flushed somewhat. (when gnus-keep-backlog @@ -4289,6 +4289,9 @@ groups." ("\\bmailto:\\([^ \n\t]+\\)" 0 t gnus-url-mailto 1) ;; This is how URLs _should_ be embedded in text... ("]*\\)>" 0 t gnus-button-embedded-url 1) + ;; Info manual references. + ("(\\(info\\|Info-goto-node\\)[ \n\t]+\"\\(([^)\"\n]+)[^\"\n]+\\)\")" + 0 t Info-goto-node 2) ;; Raw URLs. (,gnus-button-url-regexp 0 t browse-url 0)) "*Alist of regexps matching buttons in article bodies. @@ -4296,7 +4299,7 @@ groups." Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where REGEXP: is the string matching text around the button, BUTTON: is the number of the regexp grouping actually matching the button, -FORM: is a lisp expression which must eval to true for the button to +FORM: is a Lisp expression which must eval to true for the button to be added, CALLBACK: is the function to call when the user push this button, and each PAR: is a number of a regexp grouping whose text will be passed to CALLBACK. @@ -4405,7 +4408,7 @@ do the highlighting. See the documentation for those functions." (set-buffer gnus-article-buffer) (save-restriction (let ((alist gnus-header-face-alist) - (buffer-read-only nil) + (inhibit-read-only t) (case-fold-search t) (inhibit-point-motion-hooks t) entry regexp header-face field-face from hpoints fpoints) @@ -4444,7 +4447,7 @@ It does this by highlighting everything after (interactive) (save-excursion (set-buffer gnus-article-buffer) - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) (inhibit-point-motion-hooks t)) (save-restriction (when (and gnus-signature-face @@ -4469,7 +4472,7 @@ specified by `gnus-button-alist'." (interactive (list 'force)) (save-excursion (set-buffer gnus-article-buffer) - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) (inhibit-point-motion-hooks t) (case-fold-search t) (alist gnus-button-alist) @@ -4514,7 +4517,7 @@ specified by `gnus-button-alist'." (save-excursion (set-buffer gnus-article-buffer) (save-restriction - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) (inhibit-point-motion-hooks t) (case-fold-search t) (alist gnus-header-button-alist) @@ -4572,7 +4575,7 @@ specified by `gnus-button-alist'." (defun gnus-signature-toggle (end) (save-excursion (set-buffer gnus-article-buffer) - (let ((buffer-read-only nil) + (let ((inhibit-read-only t) (inhibit-point-motion-hooks t)) (if (text-property-any end (point-max) 'article-type 'signature) (gnus-remove-text-properties-when @@ -4737,7 +4740,7 @@ forbidden in URL encoding." (define-key gnus-prev-page-map "\r" 'gnus-button-prev-page)) (defun gnus-insert-prev-page-button () - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (gnus-eval-format gnus-prev-page-line-format nil `(gnus-prev t local-map ,gnus-prev-page-map @@ -4768,7 +4771,7 @@ forbidden in URL encoding." (select-window win))) (defun gnus-insert-next-page-button () - (let ((buffer-read-only nil)) + (let ((inhibit-read-only t)) (gnus-eval-format gnus-next-page-line-format nil `(gnus-next t local-map ,gnus-next-page-map @@ -4796,8 +4799,8 @@ forbidden in URL encoding." "List of methods used to decode headers. This variable is a list of FUNCTION or (REGEXP . FUNCTION). If item -is FUNCTION, FUNCTION will be apply to all newsgroups. If item is a -\(REGEXP . FUNCTION), FUNCTION will be only apply to these newsgroups +is FUNCTION, FUNCTION will be applied to all newsgroups. If item is a +\(REGEXP . FUNCTION), FUNCTION will be only applied to these newsgroups whose names match REGEXP. For example: diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index 0623d1bd8f..91035d89f2 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -2586,13 +2586,11 @@ GROUP using BNews sys file syntax." (replace-match ".*" t t)) (goto-char (point-min)) ;; Deal with "not."s. - (if (looking-at "not.") - (progn - (setq not-match t) - (setq regexp - (concat "^" (buffer-substring 5 (point-max)) "$"))) - (setq regexp (concat "^" (buffer-substring 1 (point-max)) "$")) - (setq not-match nil)) + (setq not-match (looking-at "not.")) + (setq regexp + (concat "^" (buffer-substring (+ (point-min) (if not-match 4 0)) + (point-max)) + "$")) ;; Finally - if this resulting regexp matches the group name, ;; we add this score file to the list of score files ;; applicable to this group. diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 31ad693a54..4015916a67 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -219,7 +219,7 @@ The following commands are available: (while alist (unless (member (cdar alist) done) (push (cdar alist) done) - (cdr (setq server (pop alist))) + (setq server (pop alist)) (when (and server (car server) (cdr server)) (gnus-server-insert-server-line (car server) (cdr server)))) (when (member (cdar alist) done) diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index 0fe3ed8850..45c7ba4bbb 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el @@ -1,5 +1,5 @@ ;;; imap.el --- imap library -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Simon Josefsson @@ -1803,7 +1803,8 @@ Return nil if no complete line has arrived." (when (eq (char-after) ?\)) (imap-forward) (nreverse addresses))) - (assert (imap-parse-nil)))) + ;; (assert (imap-parse-nil)) ; With assert, the code might not be eval'd. + (imap-parse-nil))) ;; mailbox = "INBOX" / astring ;; ; INBOX is case-insensitive. All case variants of @@ -2343,7 +2344,8 @@ Return nil if no complete line has arrived." (imap-forward) (push (imap-parse-string-list) dsp) (imap-forward)) - (assert (imap-parse-nil))) + ;; (assert (imap-parse-nil)) ; Code in assert might not be eval'd. + (imap-parse-nil)) (push (nreverse dsp) ext)) (when (eq (char-after) ?\ );; body-fld-lang (imap-forward) diff --git a/lisp/gs.el b/lisp/gs.el index d3bec85f14..f160dca197 100644 --- a/lisp/gs.el +++ b/lisp/gs.el @@ -212,4 +212,5 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful." (provide 'gs) +;;; arch-tag: 06ab51b8-4932-4cfe-9f60-b924a8edb3f0 ;;; gs.el ends here diff --git a/lisp/help-at-pt.el b/lisp/help-at-pt.el new file mode 100644 index 0000000000..ad1f2b3a96 --- /dev/null +++ b/lisp/help-at-pt.el @@ -0,0 +1,357 @@ +;;; help-at-pt.el --- local help through the keyboard + +;; Copyright (C) 2003 Free Software Foundation, Inc. + +;; Author: Luc Teirlinck +;; Keywords: help + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This file contains functionality to make the help provided by the +;; help-echo text or overlay property available to the keyboard user. +;; It also supports a more keyboard oriented alternative to +;; `help-echo', namely a new text or overlay property `kbd-help'. +;; +;; It provides facilities to access the local help available at point +;; either on demand, using the command `display-local-help', or +;; automatically after a suitable idle time, through the customizable +;; variable `help-at-pt-display-when-idle'. +;; +;; You can get a more global overview of the local help available in +;; the buffer, using the commands `scan-buf-next-region' and +;; `scan-buf-previous-region', which move to the start of the next or +;; previous region with available local help and print the help found +;; there. +;; +;; Suggested key bindings: +;; +;; (global-set-key [C-tab] 'scan-buf-next-region) +;; (global-set-key [C-M-tab] 'scan-buf-previous-region) +;; +;; You do not have to do anything special to use the functionality +;; provided by this file, because all important functions autoload. + +;;; Code: + +(defgroup help-at-pt nil + "Features for displaying local help." + :group 'help + :version "21.4") + +;;;###autoload +(defun help-at-pt-string (&optional kbd) + "Return the help-echo string at point. +Normally, the string produced by the `help-echo' text or overlay +property, or nil, is returned. +If KBD is non-nil, `kbd-help' is used instead, and any +`help-echo' property is ignored. In this case, the return value +can also be t, if that is the value of the `kbd-help' property." + (let* ((prop (if kbd 'kbd-help 'help-echo)) + (pair (get-char-property-and-overlay (point) prop)) + (val (car pair)) + (ov (cdr pair))) + (if (functionp val) + (funcall val (selected-window) (if ov ov (current-buffer)) (point)) + (eval val)))) + +;;;###autoload +(defun help-at-pt-kbd-string () + "Return the keyboard help string at point. +If the `kbd-help' text or overlay property at point produces a +string, return it. Otherwise, use the `help-echo' property. If +this produces no string either, return nil." + (let ((kbd (help-at-pt-string t)) + (echo (help-at-pt-string))) + (if (and kbd (not (eq kbd t))) kbd echo))) + +;;;###autoload +(defun display-local-help (&optional arg) + "Display local help in the echo area. +This displays a short help message, namely the string produced by +the `kbd-help' property at point. If `kbd-help' does not produce +a string, but the `help-echo' property does, then that string is +printed instead. + +A numeric argument ARG prevents display of a message in case +there is no help. While ARG can be used interactively, it is +mainly meant for use from Lisp." + (interactive "P") + (let ((help (help-at-pt-kbd-string))) + (if help + (message "%s" help) + (if (not arg) (message "No local help at point"))))) + +(defcustom help-at-pt-timer-delay 1 + "*Delay before displaying local help. +This is used if `help-at-pt-display-when-idle' is enabled. +The value may be an integer or floating point number. + +If a timer is already active, there are two ways to make the new +value take effect immediately. After setting the value, you can +first call `help-at-pt-cancel-timer' and then set a new timer +with `help-at-pt-set-timer'. Alternatively, you can set this +variable through Custom. This will not set a timer if none is +active, but if one is already active, Custom will make it use the +new value." + :group 'help-at-pt + :type 'number + :set (lambda (variable value) + (set-default variable value) + (when (and (boundp 'help-at-pt-timer) help-at-pt-timer) + (timer-set-idle-time help-at-pt-timer value t)))) + +(defvar help-at-pt-timer nil + "Non-nil means that a timer is set that checks for local help. +If non-nil, this is the value returned by the call of +`run-with-idle-timer' that set that timer. This variable is used +internally to enable `help-at-pt-display-when-idle'. Do not set it +yourself.") + +;;;###autoload +(defun help-at-pt-cancel-timer () + "Cancel any timer set by `help-at-pt-set-timer'. +This disables `help-at-pt-display-when-idle'." + (interactive) + (let ((inhibit-quit t)) + (when help-at-pt-timer + (cancel-timer help-at-pt-timer) + (setq help-at-pt-timer nil)))) + +;;;###autoload +(defun help-at-pt-set-timer () + "Enable `help-at-pt-display-when-idle'. +This is done by setting a timer, if none is currently active." + (interactive) + (unless help-at-pt-timer + (setq help-at-pt-timer + (run-with-idle-timer + help-at-pt-timer-delay t #'help-at-pt-maybe-display)))) + +;;;###autoload +(defcustom help-at-pt-display-when-idle 'never + "*Automatically show local help on point-over. +If the value is t, the string obtained from any `kbd-help' or +`help-echo' property at point is automatically printed in the +echo area, if nothing else is already displayed there, or after a +quit. If both `kbd-help' and `help-echo' produce help strings, +`kbd-help' is used. If the value is a list, the help only gets +printed if there is a text or overlay property at point that is +included in this list. Suggested properties are `keymap', +`local-map', `button' and `kbd-help'. Any value other than t or +a non-empty list disables the feature. + +This variable only takes effect after a call to +`help-at-pt-set-timer'. The help gets printed after Emacs has +been idle for `help-at-pt-timer-delay' seconds. You can call +`help-at-pt-cancel-timer' to cancel the timer set by, and the +effect of, `help-at-pt-set-timer'. + +When this variable is set through Custom, `help-at-pt-set-timer' +is called automatically, unless the value is `never', in which +case `help-at-pt-cancel-timer' is called. Specifying an empty +list of properties through Custom will set the timer, thus +enabling buffer local values. It sets the actual value to nil. +Thus, Custom distinguishes between a nil value and other values +that disable the feature, which Custom identifies with `never'. +The default is `never'." + :group 'help-at-pt + :type '(choice (const :tag "Always" + :format "%t\n%h" + :doc + "This choice can get noisy. +The text printed from the `help-echo' property is often only +relevant when using the mouse. If you mind about too many +messages getting printed in the echo area, use \"In certain +situations\". See the documentation there for more information." + t) + (repeat :tag "In certain situations" + ;; unless we specify 0 offset the doc string + ;; for this choice gets indented very + ;; differently than for the other two + ;; choices, when "More" is selected. + :offset 0 + :format "%{%t%}:\n%v%i\n%h" + :doc + "This choice lets you specify a list of \ +text properties. +Presence of any of these properties will trigger display of +available local help on point-over. +If you use this alternative through Custom without listing any +properties, a timer will be set anyway. This will enable buffer +local values. Use \"Never\" if you do not want a timer to be set. + +Suggested properties: +The `keymap' and `local-map' properties change keybindings in +parts of the buffer. Some of these keymaps are mode independent +and are not mentioned in the mode documentation. Hence, the help +text is likely to be useful. +Specifying `button' is relevant in Custom and similar buffers. +In these buffers, most, but not all, of the text shown this way is +available by default when using tab, but not on regular point-over. +The presence of a `kbd-help' property guarantees that non mouse +specific help is available." + :value (keymap local-map button kbd-help) + symbol) + (other :tag "Never" + :format "%t\n%h" + :doc + "This choice normally disables buffer local values. +If you choose this value through Custom and a timer checking for +local help is currently active, it will be canceled. No new +timer will be set. Call `help-at-pt-set-timer' after choosing +this option, or use \"In certain situations\" and specify no text +properties, to enable buffer local values." + never)) + :initialize 'custom-initialize-default + :set #'(lambda (variable value) + (set-default variable value) + (if (eq value 'never) + (help-at-pt-cancel-timer) + (help-at-pt-set-timer))) + :set-after '(help-at-pt-timer-delay) + :require 'help-at-pt) + +;; Function for use in `help-at-pt-set-timer'. +(defun help-at-pt-maybe-display () + (and (or (eq help-at-pt-display-when-idle t) + (and (consp help-at-pt-display-when-idle) + (catch 'found + (dolist (prop help-at-pt-display-when-idle) + (if (get-char-property (point) prop) + (throw 'found t)))))) + (or (not (current-message)) + (string= (current-message) "Quit")) + (display-local-help t))) + +;;;###autoload +(defun scan-buf-move-to-region (prop &optional arg hook) + "Go to the start of the next region with non-nil PROP property. +Then run HOOK, which should be a quoted symbol that is a normal +hook.variable, or an expression evaluating to such a symbol. +Adjacent areas with different non-nil PROP properties are +considered different regions. + +With numeric argument ARG, move to the start of the ARGth next +such region, then run HOOK. If ARG is negative, move backward. +If point is already in a region, then that region does not count +toward ARG. If ARG is 0 and point is inside a region, move to +the start of that region. If ARG is 0 and point is not in a +region, print a message to that effect, but do not move point and +do not run HOOK. If there are not enough regions to move over, +an error results and the number of available regions is mentioned +in the error message. Point is not moved and HOOK is not run." + (cond ((> arg 0) + (if (= (point) (point-max)) + (error "No further `%s' regions" prop)) + (let ((pos (point))) + (dotimes (x arg) + (setq pos (next-single-char-property-change pos prop)) + (unless (get-char-property pos prop) + (setq pos (next-single-char-property-change pos prop)) + (unless (get-char-property pos prop) + (cond ((= x 0) + (error "No further `%s' regions" prop)) + ((= x 1) + (error "There is only one further `%s' region" prop)) + (t + (error + "There are only %d further `%s' regions" + x prop)))))) + (goto-char pos) + (run-hooks hook))) + ((= arg 0) + (let ((val (get-char-property (point) prop))) + (cond ((not val) + (message "Point is not in a `%s' region" prop)) + ((eq val (get-char-property (1- (point)) prop)) + (goto-char + (previous-single-char-property-change (point) prop)) + (run-hooks hook)) + (t (run-hooks hook))))) + ((< arg 0) + (let ((pos (point)) (val (get-char-property (point) prop))) + (and val + (eq val (get-char-property (1- pos) prop)) + (setq pos + (previous-single-char-property-change pos prop))) + (if (= pos (point-min)) + (error "No prior `%s' regions" prop)) + (dotimes (x (- arg)) + (setq pos (previous-single-char-property-change pos prop)) + (unless (get-char-property pos prop) + (setq pos (previous-single-char-property-change pos prop)) + (unless (get-char-property pos prop) + (cond ((= x 0) + (error "No prior `%s' regions" prop)) + ((= x 1) + (error "There is only one prior `%s' region" prop)) + (t + (error "There are only %d prior `%s' regions" + x prop)))))) + (goto-char pos) + (run-hooks hook))))) + +;; To be moved to a different file and replaced by a defcustom in a +;; future version. +(defvar scan-buf-move-hook '(display-local-help) + "Normal hook run by `scan-buf-next-region'. +Also used by `scan-buf-previous-region'. The hook is run after +positioning point.") + +;;;###autoload +(defun scan-buf-next-region (&optional arg) + "Go to the start of the next region with non-nil help-echo. +Print the help found there using `display-local-help'. Adjacent +areas with different non-nil help-echo properties are considered +different regions. + +With numeric argument ARG, move to the start of the ARGth next +help-echo region. If ARG is negative, move backward. If point +is already in a help-echo region, then that region does not count +toward ARG. If ARG is 0 and point is inside a help-echo region, +move to the start of that region. If ARG is 0 and point is not +in such a region, just print a message to that effect. If there +are not enough regions to move over, an error results and the +number of available regions is mentioned in the error message. + +A potentially confusing subtlety is that point can be in a +help-echo region without any local help being available. This is +because `help-echo' can be a function evaluating to nil. This +rarely happens in practice." + (interactive "p") + (scan-buf-move-to-region 'help-echo arg 'scan-buf-move-hook)) + +;;;###autoload +(defun scan-buf-previous-region (&optional arg) + "Go to the start of the previous region with non-nil help-echo. +Print the help found there using `display-local-help'. Adjacent +areas with different non-nil help-echo properties are considered +different regions. With numeric argument ARG, behaves like +`scan-buf-next-region' with argument -ARG.." + (interactive "p") + (scan-buf-move-to-region 'help-echo (- arg) 'scan-buf-move-hook)) + +(defvar help-at-pt-unload-hook '(help-at-pt-cancel-timer) + "Normal hook run when `help-at-pt' is unloaded.") + +(provide 'help-at-pt) + +;;; arch-tag: d0b8b86d-d23f-45d0-a82d-208d6205a583 +;;; help-at-pt.el ends here diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 71a5044002..ab76b5eb23 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -1,6 +1,6 @@ ;;; help-fns.el --- Complex help functions -;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003 +;; Copyright (C) 1985, 86, 93, 94, 98, 1999, 2000, 01, 02, 03, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -215,6 +215,61 @@ ARGLIST can also be t or a string of the form \"(fun ARG1 ARG2 ...)\"." (intern (upcase name)))))) arglist))) +(defvar help-C-source-directory + (let ((dir (expand-file-name "src" source-directory))) + (when (and (file-directory-p dir) (file-readable-p dir)) + dir)) + "Directory where the C source files of Emacs can be found. +If nil, do not try to find the source code of functions and variables +defined in C.") + +(defun help-subr-name (subr) + (let ((name (prin1-to-string subr))) + (if (string-match "\\`#\\'" name) + (match-string 1 name) + (error "Unexpected subroutine print name: %s" name)))) + +(defun help-C-file-name (subr-or-var kind) + "Return the name of the C file where SUBR-OR-VAR is defined. +KIND should be `var' for a variable or `subr' for a subroutine." + (let ((docbuf (get-buffer-create " *DOC*")) + (name (if (eq 'var kind) + (concat "V" (symbol-name subr-or-var)) + (concat "F" (help-subr-name subr-or-var))))) + (with-current-buffer docbuf + (goto-char (point-min)) + (if (eobp) + (insert-file-contents-literally + (expand-file-name internal-doc-file-name doc-directory))) + (search-forward (concat "" name "\n")) + (re-search-backward "S\\(.*\\)") + (let ((file (match-string 1))) + (if (string-match "\\.\\(o\\|obj\\)\\'" file) + (replace-match ".c" t t file) + file))))) + +(defun help-find-C-source (fun-or-var file kind) + "Find the source location where SUBR-OR-VAR is defined in FILE. +KIND should be `var' for a variable or `subr' for a subroutine." + (setq file (expand-file-name file help-C-source-directory)) + (unless (file-readable-p file) + (error "The C source file %s is not available" + (file-name-nondirectory file))) + (if (eq 'fun kind) + (setq fun-or-var (indirect-function fun-or-var))) + (with-current-buffer (find-file-noselect file) + (goto-char (point-min)) + (unless (re-search-forward + (if (eq 'fun kind) + (concat "DEFUN[ \t\n]*([ \t\n]*\"" + (regexp-quote (help-subr-name fun-or-var)) + "\"") + (concat "DEFVAR[A-Z_]*[ \t\n]*([ \t\n]*\"" + (regexp-quote (symbol-name fun-or-var)))) + nil t) + (error "Can't find source for %s" fun)) + (cons (current-buffer) (match-beginning 0)))) + ;;;###autoload (defun describe-function-1 (function) (let* ((def (if (symbolp function) @@ -280,8 +335,10 @@ ARGLIST can also be t or a string of the form \"(fun ARG1 ARG2 ...)\"." (when (re-search-backward "^;;; Generated autoloads from \\(.*\\)" nil t) (setq file-name (match-string 1))))))) - (cond - (file-name + (when (and (null file-name) (subrp def) help-C-source-directory) + ;; Find the C source file name. + (setq file-name (concat "src/" (help-C-file-name def 'subr)))) + (when file-name (princ " in `") ;; We used to add .el to the file name, ;; but that's completely wrong when the user used load-file. @@ -289,9 +346,9 @@ ARGLIST can also be t or a string of the form \"(fun ARG1 ARG2 ...)\"." (princ "'") ;; Make a hyperlink to the library. (with-current-buffer standard-output - (save-excursion + (save-excursion (re-search-backward "`\\([^`']+\\)'" nil t) - (help-xref-button 1 'help-function-def function file-name))))) + (help-xref-button 1 'help-function-def function file-name)))) (princ ".") (terpri) (when (commandp function) @@ -500,6 +557,13 @@ it is displayed along with the global value." (when (re-search-backward "^;;; Generated autoloads from \\(.*\\)" nil t) (setq file-name (match-string 1))))))) + (when (and (null file-name) + (integerp (get variable 'variable-documentation))) + ;; It's a variable not defined in Elisp but in C. + (if help-C-source-directory + (setq file-name + (concat "src/" (help-C-file-name variable 'var))) + (princ "\n\nDefined in core C code."))) (when file-name (princ "\n\nDefined in `") (princ file-name) @@ -544,7 +608,9 @@ BUFFER defaults to the current buffer." ;;;###autoload (defun describe-categories (&optional buffer) "Describe the category specifications in the current category table. -The descriptions are inserted in a buffer, which is then displayed." +The descriptions are inserted in a buffer, which is then displayed. +If BUFFER is non-nil, then describe BUFFER's category table instead. +BUFFER should be a buffer or a buffer name." (interactive) (setq buffer (or buffer (current-buffer))) (help-setup-xref (list #'describe-categories buffer) (interactive-p)) @@ -566,4 +632,5 @@ The descriptions are inserted in a buffer, which is then displayed." (provide 'help-fns) +;;; arch-tag: 9e10331c-ae81-4d13-965d-c4819aaab0b3 ;;; help-fns.el ends here diff --git a/lisp/help-macro.el b/lisp/help-macro.el index 567b2c1a2f..a36eed86d0 100644 --- a/lisp/help-macro.el +++ b/lisp/help-macro.el @@ -196,4 +196,5 @@ and then returns." (provide 'help-macro) +;;; arch-tag: 59fee949-1686-485a-8a05-83418073e257 ;;; help-macro.el ends here diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 368aa37098..149eebb3d3 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -1,6 +1,6 @@ ;;; help-mode.el --- `help-mode' used by *Help* buffers -;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002 +;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -150,8 +150,11 @@ The format is (FUNCTION ARGS...).") ;; Don't use find-function-noselect because it follows ;; aliases (which fails for built-in functions). (let ((location - (if (bufferp file) (cons file fun) - (find-function-search-for-symbol fun nil file)))) + (cond + ((bufferp file) (cons file fun)) + ((string-match "\\`src/\\(.*\\.c\\)" file) + (help-find-C-source fun (match-string 1 file) 'fun)) + (t (find-function-search-for-symbol fun nil file))))) (pop-to-buffer (car location)) (goto-char (cdr location)))) 'help-echo (purecopy "mouse-2, RET: find function's definition")) @@ -160,7 +163,10 @@ The format is (FUNCTION ARGS...).") :supertype 'help-xref 'help-function (lambda (var &optional file) (let ((location - (find-variable-noselect var file))) + (cond + ((string-match "\\`src/\\(.*\\.c\\)" file) + (help-find-C-source var (match-string 1 file) 'var)) + (t (find-variable-noselect var file))))) (pop-to-buffer (car location)) (goto-char (cdr location)))) 'help-echo (purecopy"mouse-2, RET: find variable's definition")) @@ -213,7 +219,8 @@ Commands: "\\(function\\|command\\)\\|" "\\(face\\)\\|" "\\(symbol\\)\\|" - "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)\\s-+\\)?" + "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)" + "[ \t\n]+\\)?" ;; Note starting with word-syntax character: "`\\(\\sw\\(\\sw\\|\\s_\\)+\\)'")) "Regexp matching doc string references to symbols. @@ -230,7 +237,7 @@ when help commands related to multilingual environment (e.g., (defconst help-xref-info-regexp - (purecopy "\\<[Ii]nfo[ \t\n]+node[ \t\n]+`\\([^']+\\)'") + (purecopy "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+`\\([^']+\\)'") "Regexp matching doc string references to an Info node.") ;;;###autoload @@ -278,7 +285,10 @@ Find cross-reference information in a buffer and activate such cross references for selection with `help-follow'. Cross-references have the canonical form `...' and the type of reference may be disambiguated by the preceding word(s) used in -`help-xref-symbol-regexp'. +`help-xref-symbol-regexp'. Faces only get cross-referenced if +preceded or followed by the word `face'. Variables without +variable documentation do not get cross-referenced, unless +preceded by the word `variable' or `option'. If the variable `help-xref-mule-regexp' is non-nil, find also cross-reference information related to multilingual environment @@ -306,11 +316,11 @@ that." ;; Info references (save-excursion (while (re-search-forward help-xref-info-regexp nil t) - (let ((data (match-string 1))) + (let ((data (match-string 2))) (save-match-data (unless (string-match "^([^)]+)" data) (setq data (concat "(emacs)" data)))) - (help-xref-button 1 'help-info data)))) + (help-xref-button 2 'help-info data)))) ;; Mule related keywords. Do this before trying ;; `help-xref-symbol-regexp' because some of Mule ;; keywords have variable or function definitions. @@ -342,11 +352,11 @@ that." (sym (intern-soft data))) (if sym (cond - ((match-string 3) ; `variable' &c + ((match-string 3) ; `variable' &c (and (boundp sym) ; `variable' doesn't ensure ; it's actually bound (help-xref-button 8 'help-variable sym))) - ((match-string 4) ; `function' &c + ((match-string 4) ; `function' &c (and (fboundp sym) ; similarly (help-xref-button 8 'help-function sym))) ((match-string 5) ; `face' @@ -354,23 +364,33 @@ that." (help-xref-button 8 'help-face sym))) ((match-string 6)) ; nothing for `symbol' ((match-string 7) -;; this used: -;; #'(lambda (arg) -;; (let ((location -;; (find-function-noselect arg))) -;; (pop-to-buffer (car location)) -;; (goto-char (cdr location)))) +;;; this used: +;;; #'(lambda (arg) +;;; (let ((location +;;; (find-function-noselect arg))) +;;; (pop-to-buffer (car location)) +;;; (goto-char (cdr location)))) (help-xref-button 8 'help-function-def sym)) + ((facep sym) + (if (save-match-data (looking-at "[ \t\n]+face\\W")) + (help-xref-button 8 'help-face sym))) ((and (boundp sym) (fboundp sym)) ;; We can't intuit whether to use the ;; variable or function doc -- supply both. (help-xref-button 8 'help-symbol sym)) - ((boundp sym) + ((and + (boundp sym) + (or + (documentation-property + sym 'variable-documentation) + (condition-case nil + (documentation-property + (indirect-variable sym) + 'variable-documentation) + (cyclic-variable-indirection nil)))) (help-xref-button 8 'help-variable sym)) ((fboundp sym) - (help-xref-button 8 'help-function sym)) - ((facep sym) - (help-xref-button 8 'help-face sym))))))) + (help-xref-button 8 'help-function sym))))))) ;; An obvious case of a key substitution: (save-excursion (while (re-search-forward @@ -412,11 +432,13 @@ that." (goto-char (point-max)) (while (and (not (bobp)) (bolp)) (delete-char -1)) + (insert "\n") ;; Make a back-reference in this buffer if appropriate. (when help-xref-stack - (insert "\n\n") + (insert "\n") (help-insert-xref-button help-back-label 'help-back - (current-buffer)))) + (current-buffer)) + (insert "\n"))) ;; View mode steals RET from us. (set (make-local-variable 'minor-mode-overriding-map-alist) (list (cons 'view-mode help-xref-override-view-map))) @@ -592,4 +614,5 @@ For the cross-reference format, see `help-make-xrefs'." (provide 'help-mode) +;;; arch-tag: 850954ae-3725-4cb4-8e91-0bf6d52d6b0b ;;; help-mode.el ends here diff --git a/lisp/help.el b/lisp/help.el index a4b28d2e45..b589de9447 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -49,6 +49,7 @@ (define-key help-map (char-to-string help-char) 'help-for-help) (define-key help-map [help] 'help-for-help) (define-key help-map [f1] 'help-for-help) +(define-key help-map "." 'display-local-help) (define-key help-map "?" 'help-for-help) (define-key help-map "\C-c" 'describe-copying) @@ -177,7 +178,7 @@ If FUNCTION is nil, it applies `message', thus displaying the message." (defalias 'help 'help-for-help) (make-help-screen help-for-help - "a b c C e f F i I k C-k l L m p s t v w C-c C-d C-f C-n C-p C-t C-w or ? :" + "a b c C e f F i I k C-k l L m p s t v w C-c C-d C-f C-n C-p C-t C-w . or ? :" "You have typed %THIS-KEY%, the help character. Type a Help option: \(Use SPC or DEL to scroll through this text. Type \\\\[help-quit] to exit the Help command.) @@ -217,6 +218,8 @@ v describe-variable. Type name of a variable; it displays the variable's documentation and value. w where-is. Type command name; it prints which keystrokes invoke that command. +. display-local-help. Display any available local help at point + in the echo area. C-c Display Emacs copying permission (GNU General Public License). C-d Display Emacs ordering information. @@ -561,11 +564,13 @@ the last key hit are used." (defun describe-mode (&optional buffer) "Display documentation of current major mode and minor modes. -The major mode description comes first, followed by the minor modes, -each on a separate page. -For this to work correctly for a minor mode, the mode's indicator variable -\(listed in `minor-mode-alist') must also be a function whose documentation -describes the minor mode." +A brief summary of the minor modes comes first, followed by the +major mode description. This is followed by detailed +descriptions of the minor modes, each on a separate page. + +For this to work correctly for a minor mode, the mode's indicator +variable \(listed in `minor-mode-alist') must also be a function +whose documentation describes the minor mode." (interactive) (help-setup-xref (list #'describe-mode (or buffer (current-buffer))) (interactive-p)) @@ -574,48 +579,70 @@ describes the minor mode." (with-output-to-temp-buffer (help-buffer) (save-excursion (when buffer (set-buffer buffer)) - (when minor-mode-alist - (princ "The major mode is described first. -For minor modes, see following pages.\n\n")) - (princ mode-name) - (princ " mode:\n") - (princ (documentation major-mode)) - (let ((minor-modes minor-mode-alist)) - (while minor-modes - (let* ((minor-mode (car (car minor-modes))) - (indicator (car (cdr (car minor-modes))))) - ;; Document a minor mode if it is listed in minor-mode-alist, - ;; bound locally in this buffer, non-nil, and has a function - ;; definition. - (if (and (boundp minor-mode) - (symbol-value minor-mode) - (fboundp minor-mode)) - (let ((pretty-minor-mode minor-mode)) - (if (string-match "\\(-minor\\)?-mode\\'" - (symbol-name minor-mode)) - (setq pretty-minor-mode - (capitalize - (substring (symbol-name minor-mode) - 0 (match-beginning 0))))) - (while (and indicator (symbolp indicator) - (boundp indicator) - (not (eq indicator (symbol-value indicator)))) - (setq indicator (symbol-value indicator))) - (princ "\n\f\n") - (princ (format "%s minor mode (%s):\n" - pretty-minor-mode - (if indicator - (format "indicator%s" indicator) - "no indicator"))) - (princ (documentation minor-mode))))) - (setq minor-modes (cdr minor-modes)))) + (let (minor-modes) + ;; Find enabled minor mode we will want to mention. + (dolist (mode minor-mode-list) + ;; Document a minor mode if it is listed in minor-mode-alist, + ;; non-nil, and has a function definition. + (and (boundp mode) (symbol-value mode) + (fboundp mode) + (let ((pretty-minor-mode mode) + indicator) + (if (string-match "\\(-minor\\)?-mode\\'" + (symbol-name mode)) + (setq pretty-minor-mode + (capitalize + (substring (symbol-name mode) + 0 (match-beginning 0))))) + (setq indicator (cadr (assq mode minor-mode-alist))) + (while (and indicator (symbolp indicator) + (boundp indicator) + (not (eq indicator (symbol-value indicator)))) + (setq indicator (symbol-value indicator))) + (push (list pretty-minor-mode mode indicator) + minor-modes)))) + (if auto-fill-function + (push '("Auto Fill" auto-fill-mode " Fill") + minor-modes)) + (setq minor-modes + (sort minor-modes + (lambda (a b) (string-lessp (car a) (car b))))) + (when minor-modes + (princ "Summary of minor modes:\n") + (dolist (mode minor-modes) + (let ((pretty-minor-mode (nth 0 mode)) + (indicator (nth 2 mode))) + (princ (format " %s minor mode (%s):\n" + pretty-minor-mode + (if indicator + (format "indicator%s" indicator) + "no indicator"))))) + (princ "\n(Full information about these minor modes +follows the description of the major mode.)\n\n")) + ;; Document the major mode. + (princ mode-name) + (princ " mode:\n") + (princ (documentation major-mode)) + ;; Document the minor modes fully. + (dolist (mode minor-modes) + (let ((pretty-minor-mode (nth 0 mode)) + (mode-function (nth 1 mode)) + (indicator (nth 2 mode))) + (princ "\n\f\n") + (princ (format "%s minor mode (%s):\n" + pretty-minor-mode + (if indicator + (format "indicator%s" indicator) + "no indicator"))) + (princ (documentation mode-function))))) (print-help-return-message)))) + (defun describe-minor-mode (minor-mode) "Display documentation of a minor mode given as MINOR-MODE. MINOR-MODE can be a minor mode symbol or a minor mode indicator string appeared on the mode-line." - (interactive (list (completing-read + (interactive (list (completing-read "Minor mode: " (nconc (describe-minor-mode-completion-table-for-symbol) @@ -633,14 +660,14 @@ appeared on the mode-line." (t (error "No such minor mode: %s" minor-mode))))) -;; symbol +;; symbol (defun describe-minor-mode-completion-table-for-symbol () ;; In order to list up all minor modes, minor-mode-list ;; is used here instead of minor-mode-alist. (delq nil (mapcar 'symbol-name minor-mode-list))) (defun describe-minor-mode-from-symbol (symbol) "Display documentation of a minor mode given as a symbol, SYMBOL" - (interactive (list (intern (completing-read + (interactive (list (intern (completing-read "Minor mode symbol: " (describe-minor-mode-completion-table-for-symbol))))) (if (fboundp symbol) @@ -649,7 +676,7 @@ appeared on the mode-line." ;; indicator (defun describe-minor-mode-completion-table-for-indicator () - (delq nil + (delq nil (mapcar (lambda (x) (let ((i (format-mode-line x))) ;; remove first space if existed @@ -658,15 +685,15 @@ appeared on the mode-line." nil) ((eq (aref i 0) ?\ ) (substring i 1)) - (t + (t i)))) minor-mode-alist))) (defun describe-minor-mode-from-indicator (indicator) "Display documentation of a minor mode specified by INDICATOR. If you call this function interactively, you can give indicator which is currently activated with completion." - (interactive (list - (completing-read + (interactive (list + (completing-read "Minor mode indicator: " (describe-minor-mode-completion-table-for-indicator)))) (let ((minor-mode (lookup-minor-mode-from-indicator indicator))) @@ -677,17 +704,17 @@ is currently activated with completion." (defun lookup-minor-mode-from-indicator (indicator) "Return a minor mode symbol from its indicator on the modeline." ;; remove first space if existed - (if (and (< 0 (length indicator)) + (if (and (< 0 (length indicator)) (eq (aref indicator 0) ?\ )) (setq indicator (substring indicator 1))) (let ((minor-modes minor-mode-alist) result) (while minor-modes (let* ((minor-mode (car (car minor-modes))) - (anindicator (format-mode-line + (anindicator (format-mode-line (car (cdr (car minor-modes)))))) ;; remove first space if existed - (if (and (stringp anindicator) + (if (and (stringp anindicator) (> (length anindicator) 0) (eq (aref anindicator 0) ?\ )) (setq anindicator (substring anindicator 1))) @@ -744,4 +771,5 @@ out of view." ;; defcustoms which require 'help'. (provide 'help) +;;; arch-tag: cf427352-27e9-49b7-9a6f-741ebab02423 ;;; help.el ends here diff --git a/lisp/hexl.el b/lisp/hexl.el index e4f6423bb8..cc36c37602 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -1,6 +1,6 @@ ;;; hexl.el --- edit a file in a hex dump format using the hexl filter -;; Copyright (C) 1989, 1994, 1998, 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1994, 1998, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Keith Gabryelski ;; Maintainer: FSF @@ -42,6 +42,8 @@ ;;; Code: +(require 'eldoc) + ;; ;; vars here ;; @@ -76,6 +78,22 @@ Quoting cannot be used, so the arguments cannot themselves contain spaces." :group 'hexl :version "20.3") +(defcustom hexl-mode-hook '(hexl-follow-line hexl-activate-ruler) + "Normal hook run when entering Hexl mode." + :type 'hook + :options '(hexl-follow-line hexl-activate-ruler turn-on-eldoc-mode) + :group 'hexl) + +(defface hexl-address-area + '((t (:inherit header-line))) + "Face used in address are of hexl-mode buffer." + :group 'hexl) + +(defface hexl-ascii-area + '((t (:inherit header-line))) + "Face used in ascii are of hexl-mode buffer." + :group 'hexl) + (defvar hexl-max-address 0 "Maximum offset into hexl buffer.") @@ -236,6 +254,13 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode. (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t) + ;; Set a callback function for eldoc. + (set (make-local-variable 'eldoc-print-current-symbol-info-function) + 'hexl-print-current-point-info) + (eldoc-add-command-completions "hexl-") + (eldoc-remove-command "hexl-save-buffer" + "hexl-current-address") + (if hexl-follow-ascii (hexl-follow-ascii 1))) (run-hooks 'hexl-mode-hook)) @@ -361,9 +386,15 @@ Ask the user for confirmation." (- current-column 41) (/ (- current-column (/ current-column 5)) 2)))) (when (interactive-p) - (message "Current address is %d" hexl-address)) + (message "Current address is %d/0x%08x" hexl-address hexl-address)) hexl-address)) +(defun hexl-print-current-point-info () + "Return current hexl-address in string. +This function is indented to be used as eldoc callback." + (let ((addr (hexl-current-address))) + (format "Current address is %d/0x%08x" addr addr))) + (defun hexl-address-to-marker (address) "Return buffer position for ADDRESS." (interactive "nAddress: ") @@ -633,6 +664,15 @@ This discards the buffer's undo information." (apply 'call-process-region (point-min) (point-max) (expand-file-name hexl-program exec-directory) t t nil (split-string hexl-options)) + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "^[0-9a-f]+:" nil t) + (put-text-property (match-beginning 0) (match-end 0) + 'font-lock-face 'hexl-address-area)) + (goto-char (point-min)) + (while (re-search-forward " \\(.+$\\)" nil t) + (put-text-property (match-beginning 1) (match-end 1) + 'font-lock-face 'hexl-ascii-area))) (if (> (point) (hexl-address-to-marker hexl-max-address)) (hexl-goto-address hexl-max-address)))) @@ -742,7 +782,7 @@ and their encoded form is inserted byte by byte." CH must be a unibyte character whose value is between 0 and 255." (if (or (< ch 0) (> ch 255)) - (error "Invalid character 0x%x -- must be in the range [0..255]")) + (error "Invalid character 0x%x -- must be in the range [0..255]" ch)) (let ((address (hexl-current-address t))) (while (> num 0) (let ((hex-position @@ -850,6 +890,31 @@ Customize the variable `hexl-follow-ascii' to disable this feature." (remove-hook 'post-command-hook 'hexl-follow-ascii-find t) ))))) +(defun hexl-activate-ruler () + "Activate `ruler-mode'" + (require 'ruler-mode) + (set (make-local-variable 'ruler-mode-ruler-function) + 'hexl-mode-ruler) + (ruler-mode 1)) + +(defun hexl-follow-line () + "Activate `hl-line-mode'" + (require 'frame) + (require 'hl-line) + (set (make-local-variable 'hl-line-range-function) + 'hexl-highlight-line-range) + (set (make-local-variable 'hl-line-face) + 'highlight) + (hl-line-mode 1)) + +(defun hexl-highlight-line-range () + "Return the range of address area for the point. +This function is assumed to be used as call back function for `hl-line-mode'." + (cons + (line-beginning-position) + ;; 9 stands for (length "87654321:") + (+ (line-beginning-position) 9))) + (defun hexl-follow-ascii-find () "Find and highlight the ASCII element corresponding to current point." (let ((pos (+ 51 @@ -858,6 +923,29 @@ Customize the variable `hexl-follow-ascii' to disable this feature." (move-overlay hexl-ascii-overlay pos (1+ pos)) )) +(defun hexl-mode-ruler () + "Return a string ruler for hexl mode." + (let* ((highlight (mod (hexl-current-address) 16)) + (s " 87654321 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789abcdef") + (pos 0)) + (set-text-properties 0 (length s) nil s) + ;; Turn spaces in the header into stretch specs so they work + ;; regardless of the header-line face. + (while (string-match "[ \t]+" s pos) + (setq pos (match-end 0)) + (put-text-property (match-beginning 0) pos 'display + ;; Assume fixed-size chars + `(space :align-to ,(1- pos)) + s)) + ;; Highlight the current column. + (put-text-property (+ 11 (/ (* 5 highlight) 2)) + (+ 13 (/ (* 5 highlight) 2)) + 'face 'highlight s) + ;; Highlight the current ascii column + (put-text-property (+ 13 39 highlight) (+ 13 40 highlight) + 'face 'highlight s) + s)) + ;; startup stuff. (if hexl-mode-map @@ -953,4 +1041,5 @@ Customize the variable `hexl-follow-ascii' to disable this feature." (provide 'hexl) +;;; arch-tag: d5a7aa8a-9bce-480b-bcff-6c4c7ca5ea4a ;;; hexl.el ends here diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 2d96ac9848..99eeb69817 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -564,4 +564,5 @@ Optional argument END is maximum excursion." (provide 'hi-lock) +;;; arch-tag: d2e8fd07-4cc9-4c6f-a200-1e729bc54066 ;;; hi-lock.el ends here diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index 8eb3a6ea37..6c2c7e26ea 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el @@ -61,7 +61,8 @@ ;; ;; You can also use the command highlight-compare-with-file to show changes ;; in this file compared with another file (typically the previous version -;; of the file). +;; of the file). The command highlight-compare-buffers can be used to +;; compare two buffers. ;; ;; ;; There are currently three hooks run by `highlight-changes-mode': @@ -147,6 +148,7 @@ ;; highlight-changes-remove-highlight ;; highlight-changes-rotate-faces ;; highlight-compare-with-file +;; highlight-compare-buffers ;; ;; You can automatically rotate faces when the buffer is saved; @@ -174,7 +176,7 @@ ;;; History: -;; R Sharman (rsharman@magma.ca) Feb 1998: +;; R Sharman (rsharman@pobox.com) Feb 1998: ;; - initial release as change-mode. ;; Jari Aalto Mar 1998 ;; - fixes for byte compile errors @@ -187,7 +189,9 @@ ;; - Changed to use overlays ;; August 98 ;; - renamed to Highlight Changes mode. - +;; Dec 2003 +;; - Use require for ediff stuff +;; - Added highlight-compare-buffers ;;; Code: @@ -401,17 +405,8 @@ Otherwise, this list will be constructed when needed from (make-variable-buffer-local 'hilit-chg-string) - -(eval-and-compile - ;; For highlight-compare-with-file - (defvar ediff-number-of-differences) - (autoload 'ediff-setup "ediff") - (autoload 'ediff-with-current-buffer "ediff") - (autoload 'ediff-really-quit "ediff") - (autoload 'ediff-make-fine-diffs "ediff") - (autoload 'ediff-get-fine-diff-vector "ediff") - (autoload 'ediff-get-difference "ediff")) - +(require 'ediff-init) +(require 'ediff-util) ;;; Functions... @@ -803,16 +798,108 @@ buffer to be saved): nil) ;; ======================================================================== -;; Comparing with an existing file. -;; This uses ediff to find the differences. +;; Comparing buffers/files +;; These use ediff to find the differences. + +(defun highlight-markup-buffers + (buf-a file-a buf-b file-b &optional markup-a-only) + "Get differences between two buffers and set highlight changes. +Both buffers are done unless optional parameter MARKUP-A-ONLY +is non-nil." + (save-window-excursion + (let* (change-info + change-a change-b + a-start a-end len-a + b-start b-end len-b + (bufa-modified (buffer-modified-p buf-a)) + (bufb-modified (buffer-modified-p buf-b)) + (buf-a-read-only (with-current-buffer buf-a buffer-read-only)) + (buf-b-read-only (with-current-buffer buf-b buffer-read-only)) + temp-a temp-b) + (if (and file-a bufa-modified) + (if (y-or-n-p (format "Save buffer %s? " buf-a)) + (with-current-buffer buf-a + (save-buffer) + (setq bufa-modified (buffer-modified-p buf-a))) + (setq file-a nil))) + (or file-a + (setq temp-a (setq file-a (ediff-make-temp-file buf-a nil)))) + + (if (and file-b bufb-modified) + (if (y-or-n-p (format "Save buffer %s? " buf-b)) + (with-current-buffer buf-b + (save-buffer) + (setq bufb-modified (buffer-modified-p buf-b))) + (setq file-b nil))) + (or file-b + (setq temp-b (setq file-b (ediff-make-temp-file buf-b nil)))) + (set-buffer buf-a) + (highlight-changes-mode 'active) + (or markup-a-only (with-current-buffer buf-b + (highlight-changes-mode 'active))) + (setq change-info (hilit-chg-get-diff-info buf-a file-a buf-b file-b)) + + + (setq change-a (car change-info)) + (setq change-b (car (cdr change-info))) + + (hilit-chg-make-list) + (while change-a + (setq a-start (nth 0 (car change-a))) + (setq a-end (nth 1 (car change-a))) + (setq b-start (nth 0 (car change-b))) + (setq b-end (nth 1 (car change-b))) + (setq len-a (- a-end a-start)) + (setq len-b (- b-end b-start)) + (set-buffer buf-a) + (hilit-chg-set-face-on-change a-start a-end len-b buf-a-read-only) + (or markup-a-only + (with-current-buffer buf-b + (hilit-chg-set-face-on-change b-start b-end len-a + buf-b-read-only) + )) + (setq change-a (cdr change-a)) + (setq change-b (cdr change-b))) + (or bufa-modified + (with-current-buffer buf-a (set-buffer-modified-p nil))) + (or bufb-modified + (with-current-buffer buf-b (set-buffer-modified-p nil))) + (if temp-a + (delete-file temp-a)) + (if temp-b + (delete-file temp-b))) + )) + +;;;###autoload +(defun highlight-compare-buffers (buf-a buf-b) +"Compare two buffers and highlight the differences. + +The default is the current buffer and the one in the next window. + +If either buffer is modified and is visiting a file, you are prompted +to save the file. + +Unless the buffer is unmodified and visiting a file, the buffer is +written to a temporary file for comparison. + +If a buffer is read-only, differences will be highlighted but no property +changes are made, so \\[highlight-changes-next-change] and +\\[highlight-changes-previous-change] will not work." + (interactive + (list + (get-buffer (read-buffer "buffer-a " (current-buffer) t)) + (get-buffer + (read-buffer "buffer-b " + (window-buffer (next-window (selected-window))) t)))) + (let ((file-a (buffer-file-name buf-a)) + (file-b (buffer-file-name buf-b))) + (highlight-markup-buffers buf-a file-a buf-b file-b) + )) ;;;###autoload (defun highlight-compare-with-file (file-b) "Compare this buffer with a file, and highlight differences. -The current buffer must be an unmodified buffer visiting a file, -and must not be read-only. - If the buffer has a backup filename, it is used as the default when this function is called interactively. @@ -829,64 +916,24 @@ changes are made, so \\[highlight-changes-next-change] and "" ;; directory nil ;; default 'yes ;; must exist - (let ((f (make-backup-file-name - (or (buffer-file-name (current-buffer)) - (error "no file for this buffer"))))) - (if (file-exists-p f) f ""))))) - + (let ((f (buffer-file-name (current-buffer)))) + (if f + (progn + (setq f (make-backup-file-name f)) + (or (file-exists-p f) + (setq f nil))) + ) + f)))) (let* ((buf-a (current-buffer)) - (buf-a-read-only buffer-read-only) - (orig-pos (point)) (file-a (buffer-file-name)) (existing-buf (get-file-buffer file-b)) (buf-b (or existing-buf (find-file-noselect file-b))) - (buf-b-read-only (with-current-buffer buf-b buffer-read-only)) - xy xx yy p q - a-start a-end len-a - b-start b-end len-b) - - ;; We use the fact that the buffer is not marked modified at the - ;; end where we clear its modified status - (if (buffer-modified-p buf-a) - (if (y-or-n-p (format "OK to save %s? " file-a)) - (save-buffer buf-a) - (error "Buffer must be saved before comparing with a file"))) - (if (and existing-buf (buffer-modified-p buf-b)) - (if (y-or-n-p (format "OK to save %s? " file-b)) - (save-buffer buf-b) - (error "Cannot compare with a file in an unsaved buffer"))) - (highlight-changes-mode 'active) - (if existing-buf (with-current-buffer buf-b - (highlight-changes-mode 'active))) - (save-window-excursion - (setq xy (hilit-chg-get-diff-info buf-a file-a buf-b file-b))) - (setq xx (car xy)) - (setq p xx) - (setq yy (car (cdr xy))) - (setq q yy) - (hilit-chg-make-list) - (while p - (setq a-start (nth 0 (car p))) - (setq a-end (nth 1 (car p))) - (setq b-start (nth 0 (car q))) - (setq b-end (nth 1 (car q))) - (setq len-a (- a-end a-start)) - (setq len-b (- b-end b-start)) - (set-buffer buf-a) - (hilit-chg-set-face-on-change a-start a-end len-b buf-a-read-only) - (set-buffer-modified-p nil) - (goto-char orig-pos) - (if existing-buf - (with-current-buffer buf-b - (hilit-chg-set-face-on-change b-start b-end len-a - buf-b-read-only ) - )) - (setq p (cdr p)) - (setq q (cdr q))) - (if existing-buf - (set-buffer-modified-p nil) - (kill-buffer buf-b)))) + (buf-b-read-only (with-current-buffer buf-b buffer-read-only))) + (highlight-markup-buffers buf-a file-a buf-b file-b (not existing-buf)) + (unless existing-buf + (kill-buffer buf-b)) + )) (defun hilit-chg-get-diff-info (buf-a file-a buf-b file-b) @@ -1116,4 +1163,5 @@ from `global-highlight-changes' when turning on global Highlight Changes mode." (provide 'hilit-chg) +;;; arch-tag: de00301d-5bad-44da-aa82-e0e010b0c463 ;;; hilit-chg.el ends here diff --git a/lisp/hippie-exp.el b/lisp/hippie-exp.el index 499e99352e..91eb01b519 100644 --- a/lisp/hippie-exp.el +++ b/lisp/hippie-exp.el @@ -1222,4 +1222,5 @@ string). It returns t if a new completion is found, nil otherwise." (provide 'hippie-exp) +;;; arch-tag: 5e6e00bf-b061-4a7a-9b46-de0ae105ab99 ;;; hippie-exp.el ends here diff --git a/lisp/hl-line.el b/lisp/hl-line.el index 3ad75ae78f..5ed334f404 100644 --- a/lisp/hl-line.el +++ b/lisp/hl-line.el @@ -3,6 +3,7 @@ ;; Copyright (C) 1998, 2000, 2001, 2003 Free Software Foundation, Inc. ;; Author: Dave Love +;; Maintainer: FSF ;; Created: 1998-09-13 ;; Keywords: faces, frames, emulation @@ -25,8 +26,8 @@ ;;; Commentary: -;; Provides a buffer-local minor mode (toggled by M-x hl-line-mode) -;; and a global minor mode (toggled by M-x global-hl-line-mode) to +;; Provides a local minor mode (toggled by M-x hl-line-mode) and +;; a global minor mode (toggled by M-x global-hl-line-mode) to ;; highlight, on a suitable terminal, the line on which point is. The ;; global mode highlights the current line in the selected window only ;; (except when the minibuffer window is selected). This was @@ -56,6 +57,10 @@ ;; it to nil to avoid highlighting specific buffers, when the global ;; mode is used. +;; In default whole the line is highlighted. The range of highlighting +;; can be changed by defining an appropriate function as the +;; buffer-local value of `hl-line-range-function'. + ;;; Code: (defgroup hl-line nil @@ -77,6 +82,15 @@ the command `hl-line-mode' to turn Hl-Line mode on." :version "21.4" :group 'hl-line) +(defvar hl-line-range-function nil + "If non-nil, function to call to return highlight range. +The function of no args should return a cons cell; its car value +is the beginning position of highlight and its cdr value is the +end position of highlight in the buffer. +It should return nil if there's no region to be highlighted. + +This variable is expected to be made buffer-local by modes.") + (defvar hl-line-overlay nil "Overlay used by Hl-Line mode to highlight the current line.") (make-variable-buffer-local 'hl-line-overlay) @@ -123,8 +137,7 @@ addition to `hl-line-highlight' on `post-command-hook'." (overlay-put hl-line-overlay 'face hl-line-face)) (overlay-put hl-line-overlay 'window (unless hl-line-sticky-flag (selected-window))) - (move-overlay hl-line-overlay - (line-beginning-position) (line-beginning-position 2))) + (hl-line-move hl-line-overlay)) (hl-line-unhighlight))) (defun hl-line-unhighlight () @@ -157,14 +170,31 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and (setq global-hl-line-overlay (make-overlay 1 1)) ; to be moved (overlay-put global-hl-line-overlay 'face hl-line-face)) (overlay-put global-hl-line-overlay 'window (selected-window)) - (move-overlay global-hl-line-overlay - (line-beginning-position) (line-beginning-position 2))))) + (hl-line-move global-hl-line-overlay)))) (defun global-hl-line-unhighlight () "Deactivate the Global-Hl-Line overlay on the current line." (if global-hl-line-overlay (delete-overlay global-hl-line-overlay))) +(defun hl-line-move (overlay) + "Move the hl-line-mode overlay. +If `hl-line-range-function' is non-nil, move the OVERLAY to the position +where the function returns. If `hl-line-range-function' is nil, fill +the line including the point by OVERLAY." + (let (tmp b e) + (if hl-line-range-function + (setq tmp (funcall hl-line-range-function) + b (car tmp) + e (cdr tmp)) + (setq tmp t + b (line-beginning-position) + e (line-beginning-position 2))) + (if tmp + (move-overlay overlay b e) + (move-overlay overlay 1 1)))) + (provide 'hl-line) +;;; arch-tag: ac806940-0876-4959-8c89-947563ee2833 ;;; hl-line.el ends here diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index b0faa40833..9492d5565f 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -1460,4 +1460,5 @@ defaults to one." (provide 'ibuf-ext) +;;; arch-tag: 9af21953-deda-4c30-b76d-f81d9128e76d ;;; ibuf-ext.el ends here diff --git a/lisp/ibuf-macs.el b/lisp/ibuf-macs.el index 27f12df6e5..d6b4c2e1da 100644 --- a/lisp/ibuf-macs.el +++ b/lisp/ibuf-macs.el @@ -286,4 +286,5 @@ bound to the current value of the filter." (provide 'ibuf-macs) +;;; arch-tag: 2748edce-82c9-4cd9-9d9d-bd73e43c20c5 ;;; ibuf-macs.el ends here diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 23bf4e55d6..a1fd3195d4 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -47,8 +47,8 @@ Operations include sorting, marking by regular expression, and the ability to filter the displayed buffers by various criteria." :group 'convenience) -(defcustom ibuffer-formats '((mark modified read-only " " (name 16 16 :left :elide) - " " (size 7 -1 :right) +(defcustom ibuffer-formats '((mark modified read-only " " (name 18 18 :left :elide) + " " (size 9 -1 :right) " " (mode 16 16 :right :elide) " " filename-and-process) (mark " " (name 16 -1) " " filename)) "A list of ways to display buffer lines. @@ -786,8 +786,11 @@ directory, like `default-directory'." (define-key map [down-mouse-3] 'ibuffer-mouse-popup-menu) map)) -(defvar ibuffer-delete-window-on-quit nil - "Whether or not to delete the window upon exiting `ibuffer'.") +(defvar ibuffer-restore-window-config-on-quit nil + "If non-nil, restore previous window configuration upon exiting `ibuffer'.") + +(defvar ibuffer-prev-window-config nil + "Window configuration before starting Ibuffer.") (defvar ibuffer-did-modification nil) @@ -2183,13 +2186,14 @@ If optional arg SILENT is non-nil, do not display progress messages." (defun ibuffer-quit () "Quit this `ibuffer' session. -Delete the current window iff `ibuffer-delete-window-on-quit' is non-nil." +Try to restore the previous window configuration iff +`ibuffer-restore-window-config-on-quit' is non-nil." (interactive) - (if ibuffer-delete-window-on-quit - (progn + (if ibuffer-restore-window-config-on-quit + (progn (bury-buffer) (unless (= (count-windows) 1) - (delete-window))) + (set-window-configuration ibuffer-prev-window-config))) (bury-buffer))) ;;;###autoload @@ -2232,6 +2236,7 @@ locally in this buffer." (interactive "P") (when ibuffer-use-other-window (setq other-window-p t)) + (setq ibuffer-prev-window-config (current-window-configuration)) (let ((buf (get-buffer-create (or name "*Ibuffer*")))) (if other-window-p (funcall (if noselect #'(lambda (buf) (display-buffer buf t)) #'pop-to-buffer) buf) @@ -2243,7 +2248,7 @@ locally in this buffer." (select-window (get-buffer-window buf)) (or (eq major-mode 'ibuffer-mode) (ibuffer-mode)) - (setq ibuffer-delete-window-on-quit other-window-p) + (setq ibuffer-restore-window-config-on-quit other-window-p) (when shrink (setq ibuffer-shrink-to-minimum-size shrink)) (when qualifiers @@ -2470,7 +2475,7 @@ will be inserted before the group at point." (set (make-local-variable 'ibuffer-cached-eliding-string) nil) (set (make-local-variable 'ibuffer-cached-elide-long-columns) nil) (set (make-local-variable 'ibuffer-current-format) nil) - (set (make-local-variable 'ibuffer-delete-window-on-quit) nil) + (set (make-local-variable 'ibuffer-restore-window-config-on-quit) nil) (set (make-local-variable 'ibuffer-did-modification) nil) (set (make-local-variable 'ibuffer-tmp-hide-regexps) nil) (set (make-local-variable 'ibuffer-tmp-show-regexps) nil) @@ -2492,4 +2497,5 @@ will be inserted before the group at point." ;; coding: iso-8859-1 ;; End: +;;; arch-tag: 72581688-0603-4954-b8cf-837c700f62e8 ;;; ibuffer.el ends here diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 4e368c8c80..6317662d39 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -363,4 +363,5 @@ are exhibited within the square braces.)" ;;;outline-layout: (-2 :) ;;;End: +;;; arch-tag: 339ec25a-0741-4eb6-be63-997532e89b0f ;;; icomplete.el ends here diff --git a/lisp/ido.el b/lisp/ido.el index bdf830f92f..6a66ce0388 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -489,6 +489,13 @@ Value can be toggled within `ido' using `ido-toggle-prefix'." :type 'boolean :group 'ido) +(defcustom ido-confirm-unique-completion nil + "*Non-nil means that even a unique completion must be confirmed. +This means that \\[ido-complete] must always be followed by \\[ido-exit-minibuffer] +even when there is only one unique completion." + :type 'boolean + :group 'ido) + (defcustom ido-cannot-complete-command 'ido-completion-help "*Command run when `ido-complete' can't complete any more. The most useful values are `ido-completion-help', which pops up a @@ -553,6 +560,20 @@ the `ido-work-directory-list' list." :group 'ido) +(defcustom ido-use-filename-at-point nil + "*Non-nil means that ido shall look for a filename at point. +If found, use that as the starting point for filename selection." + :type 'boolean + :group 'ido) + + +(defcustom ido-use-url-at-point nil + "*Non-nil means that ido shall look for a URL at point. +If found, call `find-file-at-point' to visit it." + :type 'boolean + :group 'ido) + + (defcustom ido-enable-tramp-completion t "*Non-nil means that ido shall perform tramp method and server name completion. A tramp file name uses the following syntax: /method:user@host:filename." @@ -671,16 +692,17 @@ Obsolete. Set 3rd element of `ido-decorations' instead." :type '(choice string (const nil)) :group 'ido) -(defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]") +(defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]") "*List of strings used by ido to display the alternatives in the minibuffer. -There are 8 elements in this list, each is a pair of strings: +There are 9 elements in this list: 1st and 2nd elements are used as brackets around the prospect list, 3rd element is the separator between prospects (ignored if ido-separator is set), 4th element is the string inserted at the end of a truncated list of prospects, 5th and 6th elements are used as brackets around the common match string which can be completed using TAB, 7th element is the string displayed when there are a no matches, and -8th element displayed if there is a single match (and faces are not used)." +8th element is displayed if there is a single match (and faces are not used). +9th element is displayed when the current directory is non-readable." :type '(repeat string) :group 'ido) @@ -917,6 +939,9 @@ it doesn't interfere with other minibuffer usage.") ;; `ido-cur-list'. It is in no specific order. (defvar ido-ignored-list) +;; Remember if current directory is non-readable (so we cannot do completion). +(defvar ido-directory-nonreadable) + ;; Keep current item list if non-nil. (defvar ido-keep-item-list) @@ -954,8 +979,8 @@ it doesn't interfere with other minibuffer usage.") ;; Value is a list (ido-text dir cur-list ignored-list matches). (defvar ido-pre-merge-state) -;; Original value of vc-master-templates for use in ido-toggle-vc. -(defvar ido-saved-vc-mt) +;; Original value of vc-handled-backends for use in ido-toggle-vc. +(defvar ido-saved-vc-hb) ;; Stores temporary state of literal find file. (defvar ido-find-literal) @@ -1372,6 +1397,22 @@ This function also adds a hook to the minibuffer." (fix-it (concat dir "/")) (t nil))) +(defun ido-no-final-slash (s) + ;; Remove optional final slash from string S + (let ((l (1- (length s)))) + (if (and (> l 0) (eq (aref s l) ?/)) + (substring s 0 l) + s))) + +(defun ido-nonreadable-directory-p (dir) + ;; Return t if dir is a directory, but not readable + ;; Do not check for non-readable directories via tramp, as this causes a premature + ;; connect on incomplete tramp paths (after entring just method:). + (let ((ido-enable-tramp-completion nil)) + (and (ido-final-slash dir) + (file-directory-p dir) + (not (file-readable-p dir))))) + (defun ido-set-current-directory (dir &optional subdir no-merge) ;; Set ido's current directory to DIR or DIR/SUBDIR (setq dir (ido-final-slash dir t)) @@ -1385,6 +1426,7 @@ This function also adds a hook to the minibuffer." (setq ido-current-directory dir) (if (get-buffer ido-completion-buffer) (kill-buffer ido-completion-buffer)) + (setq ido-directory-nonreadable (ido-nonreadable-directory-p dir)) t)) (defun ido-set-current-home (&optional dir) @@ -1408,7 +1450,7 @@ This function also adds a hook to the minibuffer." (floor (* (frame-width) ido-max-file-prompt-width)) ido-max-file-prompt-width)) (literal (and (boundp 'ido-find-literal) ido-find-literal "(literal) ")) - (vc-off (and ido-saved-vc-mt (not vc-master-templates) "[-VC] ")) + (vc-off (and ido-saved-vc-hb (not vc-handled-backends) "[-VC] ")) (prefix nil) (rule ido-rewrite-file-prompt-rules)) (let ((case-fold-search nil)) @@ -1791,7 +1833,8 @@ PROMPT is the prompt to give to the user. DEFAULT if given is the default buffer to be selected, which will go to the front of the list. If REQUIRE-MATCH is non-nil, an existing-buffer must be selected. If INITIAL is non-nil, it specifies the initial input string." - (let ((ido-current-directory nil)) + (let ((ido-current-directory nil) + (ido-directory-nonreadable nil)) (ido-read-internal 'buffer prompt 'ido-buffer-history default require-match initial))) (defun ido-record-work-directory (&optional dir) @@ -1830,24 +1873,54 @@ If INITIAL is non-nil, it specifies the initial input string." (if (> (length ido-work-file-list) ido-max-work-file-list) (setcdr (nthcdr (1- ido-max-work-file-list) ido-work-file-list) nil)))) +(defun ido-expand-directory (dir) + ;; Expand DIR or use DEFAULT-DIRECTORY if nil. + ;; Add final slash to result in case it was missing from DEFAULT-DIRECTORY. + (ido-final-slash (expand-file-name (or dir default-directory)) t)) + (defun ido-file-internal (method &optional fallback default prompt item initial) ;; Internal function for ido-find-file and friends - (let ((ido-current-directory (expand-file-name (or default default-directory))) - filename) - - (if (or (not ido-mode) (ido-is-slow-ftp-host)) - (setq filename t - ido-exit 'fallback)) + (unless item + (setq item 'file)) + (let* ((ido-current-directory (ido-expand-directory default)) + (ido-directory-nonreadable (ido-nonreadable-directory-p ido-current-directory)) + filename) - (let (ido-saved-vc-mt - (vc-master-templates (and (boundp 'vc-master-templates) vc-master-templates)) + (cond + ((or (not ido-mode) (ido-is-slow-ftp-host)) + (setq filename t + ido-exit 'fallback)) + + ((and (eq item 'file) + (or ido-use-url-at-point ido-use-filename-at-point)) + (let (fn d) + (require 'ffap) + ;; Duplicate code from ffap-guesser as we want different behaviour for files and URLs. + (cond + ((and ido-use-url-at-point + ffap-url-regexp + (ffap-fixup-url (or (ffap-url-at-point) + (ffap-gopher-at-point)))) + (setq ido-exit 'ffap + filename t)) + + ((and ido-use-filename-at-point + (setq fn (ffap-string-at-point)) + (not (string-match "^http:/" fn)) + (setq d (file-name-directory fn)) + (file-directory-p d)) + (setq ido-current-directory d) + (setq initial (file-name-nondirectory fn))))))) + + (let (ido-saved-vc-hb + (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends)) (ido-work-directory-index -1) (ido-work-file-index -1) (ido-find-literal nil)) (unless filename - (setq ido-saved-vc-mt vc-master-templates) - (setq filename (ido-read-internal (or item 'file) + (setq ido-saved-vc-hb vc-handled-backends) + (setq filename (ido-read-internal item (or prompt "Find file: ") 'ido-file-history nil nil initial))) @@ -1868,6 +1941,9 @@ If INITIAL is non-nil, it specifies the initial input string." ((eq ido-exit 'dired) (dired (concat ido-current-directory (or ido-text "")))) + ((eq ido-exit 'ffap) + (find-file-at-point)) + ((eq method 'alt-file) (ido-record-work-file filename) (setq default-directory ido-current-directory) @@ -1987,7 +2063,11 @@ If INITIAL is non-nil, it specifies the initial input string." (string-equal ido-current-directory "/") (string-match "..[@:]\\'" (car ido-matches))))) ;; only one choice, so select it. - (exit-minibuffer)) + (if (not ido-confirm-unique-completion) + (exit-minibuffer) + (setq ido-rescan (not ido-enable-prefix)) + (delete-region (minibuffer-prompt-end) (point)) + (insert (car ido-matches)))) (t ;; else there could be some completions (setq res ido-common-match-string) @@ -2087,8 +2167,8 @@ If no merge has yet taken place, toggle automatic merging option." (interactive) (if (and ido-mode (eq ido-cur-item 'file)) (progn - (setq vc-master-templates - (if vc-master-templates nil ido-saved-vc-mt)) + (setq vc-handled-backends + (if vc-handled-backends nil ido-saved-vc-hb)) (setq ido-text-init ido-text) (setq ido-exit 'keep) (exit-minibuffer)))) @@ -2477,7 +2557,8 @@ for first matching file." (defun ido-sort-list (items) ;; Simple list of file or buffer names - (sort items (lambda (a b) (string-lessp a b)))) + (sort items (lambda (a b) (string-lessp (ido-no-final-slash a) + (ido-no-final-slash b))))) (defun ido-sort-merged-list (items promote) ;; Input is list of ("file" . "dir") cons cells. @@ -2644,30 +2725,33 @@ for first matching file." (setq ido-temp-list items))) (defun ido-file-name-all-completions1 (dir) - (if (and ido-enable-tramp-completion - (string-match "\\`/\\([^/:]+:\\([^/:@]+@\\)?\\)\\'" dir)) - - ;; Trick tramp's file-name-all-completions handler to DTRT, as it - ;; has some pretty obscure requirements. This seems to work... - ;; /ftp: => (f-n-a-c "/ftp:" "") - ;; /ftp:kfs: => (f-n-a-c "" "/ftp:kfs:") - ;; /ftp:kfs@ => (f-n-a-c "ftp:kfs@" "/") - ;; /ftp:kfs@kfs: => (f-n-a-c "" "/ftp:kfs@kfs:") - ;; Currently no attempt is made to handle multi: stuff. - - (let* ((prefix (match-string 1 dir)) - (user-flag (match-beginning 2)) - (len (and prefix (length prefix))) - compl) - (if user-flag - (setq dir (substring dir 1))) - (require 'tramp nil t) - (ido-trace "tramp complete" dir) - (setq compl (file-name-all-completions dir (if user-flag "/" ""))) - (if (> len 0) - (mapcar (lambda (c) (substring c len)) compl) - compl)) - (file-name-all-completions "" dir))) + (cond + ((ido-nonreadable-directory-p dir) '()) + ((and ido-enable-tramp-completion + (string-match "\\`/\\([^/:]+:\\([^/:@]+@\\)?\\)\\'" dir)) + + ;; Trick tramp's file-name-all-completions handler to DTRT, as it + ;; has some pretty obscure requirements. This seems to work... + ;; /ftp: => (f-n-a-c "/ftp:" "") + ;; /ftp:kfs: => (f-n-a-c "" "/ftp:kfs:") + ;; /ftp:kfs@ => (f-n-a-c "ftp:kfs@" "/") + ;; /ftp:kfs@kfs: => (f-n-a-c "" "/ftp:kfs@kfs:") + ;; Currently no attempt is made to handle multi: stuff. + + (let* ((prefix (match-string 1 dir)) + (user-flag (match-beginning 2)) + (len (and prefix (length prefix))) + compl) + (if user-flag + (setq dir (substring dir 1))) + (require 'tramp nil t) + (ido-trace "tramp complete" dir) + (setq compl (file-name-all-completions dir (if user-flag "/" ""))) + (if (> len 0) + (mapcar (lambda (c) (substring c len)) compl) + compl))) + (t + (file-name-all-completions "" dir)))) (defun ido-file-name-all-completions (dir) ;; Return name of all files in DIR @@ -3323,6 +3407,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." (ido-work-directory-match-only nil) (ido-ignore-files (cons "[^/]\\'" ido-ignore-files)) (ido-report-no-match nil) + (ido-confirm-unique-completion t) (ido-auto-merge-work-directories-length -1)) (ido-file-internal 'write 'write-file nil "Write file: "))) @@ -3469,6 +3554,11 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." (expand-file-name "/" ido-current-directory) "/")) (setq refresh t)) + ((and ido-directory-nonreadable + (file-directory-p (concat ido-current-directory (file-name-directory contents)))) + (ido-set-current-directory + (concat ido-current-directory (file-name-directory contents))) + (setq refresh t)) (t (ido-trace "try single dir") (setq try-single-dir-match t)))) @@ -3525,6 +3615,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." (exit-minibuffer)) (when (and (not ido-matches) + (not ido-directory-nonreadable) ;; ido-rescan ? ido-process-ignore-lists ido-ignored-list) @@ -3547,7 +3638,8 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." (memq ido-cur-item '(file dir)) (not (ido-is-root-directory)) (> (length contents) 1) - (not (string-match "[$]" contents))) + (not (string-match "[$]" contents)) + (not ido-directory-nonreadable)) (ido-trace "merge?") (if ido-use-merged-list (ido-undo-merge-work-directory contents nil) @@ -3609,9 +3701,12 @@ For details of keybindings, do `\\[describe-function] ido-find-file'." (setq comps (cons first (cdr comps))))) (cond ((null comps) - (if ido-report-no-match - (nth 6 ido-decorations) ;; [No Match] - "")) + (cond + (ido-directory-nonreadable + (or (nth 8 ido-decorations) " [Not readable]")) + (ido-report-no-match + (nth 6 ido-decorations)) ;; [No match] + (t ""))) ((null (cdr comps)) ;one match (concat (if (> (length (ido-name (car comps))) (length name)) @@ -3722,13 +3817,14 @@ See `read-file-name' for additional parameters." (ido-read-directory-name prompt dir default-filename mustmatch initial)) ((and (not (memq this-command ido-read-file-name-non-ido)) (or (null predicate) (eq predicate 'file-exists-p))) - (let (filename - ido-saved-vc-mt - (vc-master-templates (and (boundp 'vc-master-templates) vc-master-templates)) - (ido-current-directory (expand-file-name (or dir default-directory))) - (ido-work-directory-index -1) - (ido-work-file-index -1) - (ido-find-literal nil)) + (let* (filename + ido-saved-vc-hb + (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends)) + (ido-current-directory (ido-expand-directory dir)) + (ido-directory-nonreadable (not (file-readable-p ido-current-directory))) + (ido-work-directory-index -1) + (ido-work-file-index -1) + (ido-find-literal nil)) (setq filename (ido-read-internal 'file prompt 'ido-file-history default-filename mustmatch initial)) (if filename @@ -3741,11 +3837,12 @@ See `read-file-name' for additional parameters." (defun ido-read-directory-name (prompt &optional dir default-dirname mustmatch initial) "Read directory name, prompting with PROMPT and completing in directory DIR. See `read-file-name' for additional parameters." - (let (filename - ido-saved-vc-mt - (ido-current-directory (expand-file-name (or dir default-directory))) - (ido-work-directory-index -1) - (ido-work-file-index -1)) + (let* (filename + ido-saved-vc-hb + (ido-current-directory (ido-expand-directory dir)) + (ido-directory-nonreadable (not (file-readable-p ido-current-directory))) + (ido-work-directory-index -1) + (ido-work-file-index -1)) (setq filename (ido-read-internal 'dir prompt 'ido-file-history default-dirname mustmatch initial)) (if filename @@ -3753,4 +3850,5 @@ See `read-file-name' for additional parameters." ido-current-directory (concat ido-current-directory filename))))) +;;; arch-tag: b63a3500-1735-41bd-8a01-05373f0864da ;;; ido.el ends here diff --git a/lisp/ielm.el b/lisp/ielm.el index 16235f065e..aa60d5de6c 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -30,29 +30,8 @@ ;; Input is handled by the comint package, and output is passed ;; through the pretty-printer. -;; To install: copy this file to a directory in your load-path, and -;; add the following line to your .emacs file: -;; -;; (autoload 'ielm "ielm" "Start an inferior Emacs Lisp session" t) -;; -;; For completion to work, the comint.el from Emacs 19.23 is -;; required. If you do not have it, or if you are running Lemacs, -;; also add the following code to your .emacs: -;; -;; (setq ielm-mode-hook -;; '(lambda nil -;; (define-key ielm-map "\t" -;; '(lambda nil (interactive) (or (ielm-tab) -;; (lisp-complete-symbol)))))) - ;; To start: M-x ielm. Type C-h m in the *ielm* buffer for more info. -;; The latest version is available by WWW from -;; http://mathssun5.lancs.ac.uk:2080/~maa036/elisp/dir.html -;; or by anonymous FTP from -;; /anonymous@wingra.stat.wisc.edu:pub/src/emacs-lisp/ielm.el.gz -;; or from the author: David M. Smith - ;;; Code: (require 'comint) @@ -95,6 +74,7 @@ such as `edebug-defun' to work with such inputs." (defcustom ielm-mode-hook nil "*Hooks to be run when IELM (`inferior-emacs-lisp-mode') is started." + :options '(turn-on-eldoc-mode) :type 'hook :group 'ielm) @@ -550,4 +530,5 @@ Switches to the buffer `*ielm*', or creates it if it does not exist." (provide 'ielm) +;;; arch-tag: ef60e4c0-9c4f-4bdb-8402-271313329790 ;;; ielm.el ends here diff --git a/lisp/image-file.el b/lisp/image-file.el index 13a2eeb591..4a13019a09 100644 --- a/lisp/image-file.el +++ b/lisp/image-file.el @@ -181,4 +181,5 @@ Image files are those whose name has an extension in (provide 'image-file) +;;; arch-tag: 04cafe36-f7ba-4c80-9f47-4cb656520ce1 ;;; image-file.el ends here diff --git a/lisp/image.el b/lisp/image.el index 25d05c9902..0e71bd4a34 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -67,7 +67,8 @@ We accept the tag Exif because that is the same format." (when (and (>= code #xe0) (<= code #xef)) ;; APP0 LEN1 LEN2 "JFIF\0" (throw 'jfif - (string-match "JFIF\\|Exif" (substring data i (+ i nbytes))))) + (string-match "JFIF\\|Exif" + (substring data i (min (+ i nbytes) len))))) (setq i (+ i 1 nbytes)))))))) @@ -292,4 +293,5 @@ Example: (provide 'image) +;;; arch-tag: 8e76a07b-eb48-4f3e-a7a0-1a7ba9f096b3 ;;; image.el ends here diff --git a/lisp/imenu.el b/lisp/imenu.el index f4c378a5e1..42f50fba3a 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -751,6 +751,9 @@ for modes which use `imenu--generic-function'. If it is not set, but PATTERNS is an alist with elements that look like this: (MENU-TITLE REGEXP INDEX). +or like this: + (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...) +with zero or more ARGUMENTS. MENU-TITLE is a string used as the title for the submenu or nil if the entries are not nested. @@ -766,9 +769,13 @@ function, variable or type) that is to appear in the menu. See `lisp-imenu-generic-expression' for an example of PATTERNS. Returns an index of the current buffer as an alist. The elements in -the alist look like: (INDEX-NAME . INDEX-POSITION). They may also be -nested index lists like (INDEX-NAME . INDEX-ALIST) depending on -PATTERNS." +the alist look like: + (INDEX-NAME . INDEX-POSITION) +or like: + (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...) +They may also be nested index alists like: + (INDEX-NAME . INDEX-ALIST) +depending on PATTERNS." (let ((index-alist (list 'dummy)) prev-pos beg @@ -1055,4 +1062,5 @@ for more information." (provide 'imenu) +;;; arch-tag: 98a2f5f5-4b91-4704-b18c-3aacf77d77a7 ;;; imenu.el ends here diff --git a/lisp/indent.el b/lisp/indent.el index f742f25432..e56db11b6f 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -535,4 +535,5 @@ Use \\[edit-tab-stops] to edit them interactively." (define-key ctl-x-map "\t" 'indent-rigidly) (define-key esc-map "i" 'tab-to-tab-stop) +;;; arch-tag: f402b2a7-e44f-492f-b5b8-38996020b7c3 ;;; indent.el ends here diff --git a/lisp/info-look.el b/lisp/info-look.el index afdf123ecb..3513812183 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -1,7 +1,7 @@ ;;; info-look.el --- major-mode-sensitive Info index lookup facility ;; An older version of this was known as libc.el. -;; Copyright (C) 1995,96,97,98,99,2001,2003 Free Software Foundation, Inc. +;; Copyright (C) 1995,96,97,98,99,2001,2003,2004 Free Software Foundation, Inc. ;; Author: Ralph Schleicher ;; (did not show signs of life (Nov 2001) -stef) @@ -27,7 +27,7 @@ ;;; Commentary: ;; Really cool code to lookup info indexes. -;; Try especially info-lookup-symbol (aka C-h TAB). +;; Try especially info-lookup-symbol (aka C-h S). ;;; Code: @@ -321,7 +321,7 @@ If optional argument QUERY is non-nil, query for the help mode." (let* ((completions (info-lookup->completions topic mode)) (ignore-case (info-lookup->ignore-case topic mode)) (entry (or (assoc (if ignore-case (downcase item) item) completions) - (assoc-ignore-case item completions) + (assoc-string item completions t) (error "Not documented as a %s: %s" topic (or item "")))) (modes (info-lookup->all-modes topic mode)) (window (selected-window)) @@ -338,7 +338,8 @@ If optional argument QUERY is non-nil, query for the help mode." (info-frame (and window (window-frame window)))) (if (and info-frame (display-multi-frame-p) - (memq info-frame (frames-on-display-list))) + (memq info-frame (frames-on-display-list)) + (not (eq info-frame (selected-frame)))) (select-frame info-frame) (switch-to-buffer-other-window "*info*"))))) (while (and (not found) modes) @@ -808,7 +809,7 @@ Return nil if there is nothing appropriate in the buffer near point." (info-lookup-maybe-add-help :mode 'scheme-mode - :regexp "[^()'\" \t\n]+" + :regexp "[^()`',\" \t\n]+" :ignore-case t ;; Aubrey Jaffer's rendition from :doc-spec '(("(r5rs)Index" nil @@ -830,6 +831,17 @@ Return nil if there is nothing appropriate in the buffer near point." nil; "^ - [^:]+:[ ]+" don't think this prefix is useful here. nil))) +(info-lookup-maybe-add-help + :mode 'maxima-mode + :ignore-case t + :regexp "[a-zA-Z_%]+" + :doc-spec '( ("(maxima)Function and Variable Index" nil + "^ - [^:]+:[ ]+\\(\\[[^=]*=[ ]+\\)?" nil))) + +(info-lookup-maybe-add-help + :mode 'inferior-maxima-mode + :other-modes '(maxima-mode)) + ;; coreutils and bash builtins overlap in places, eg. printf, so there's a ;; question which should come first. Some of the coreutils descriptions are ;; more detailed, but if bash is usually /bin/sh on a GNU system then the @@ -878,4 +890,5 @@ Return nil if there is nothing appropriate in the buffer near point." (provide 'info-look) +;;; arch-tag: 0f1e3ea3-32a2-4461-bbab-3cff93539a74 ;;; info-look.el ends here diff --git a/lisp/info-xref.el b/lisp/info-xref.el index bc959cee8a..ab9b26c10d 100644 --- a/lisp/info-xref.el +++ b/lisp/info-xref.el @@ -1,26 +1,26 @@ -;;; info-xref.el --- check external references in an Info document. +;;; info-xref.el --- check external references in an Info document + +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. -;; Copyright 2003 Free Software Foundation, Inc -;; ;; Author: Kevin Ryde ;; Keywords: docs -;; -;; info-xref.el 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. -;; -;; info-xref.el 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 can get a copy of the GNU General Public License online at -;; http://www.gnu.org/licenses/gpl.txt, or you should have one in the file -;; COPYING which comes with GNU Emacs and other GNU programs. Failing that, -;; write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. ;;; Commentary: @@ -59,31 +59,10 @@ ;; this is that if for instance there's a source code directory in ;; `Info-directory-list' then a lot of extraneous files might be read, which ;; will be time consuming but should be harmless. - - -;;; Install: - -;; Put info-xref.el somewhere in your `load-path', and in your .emacs put -;; -;; (autoload 'info-xref-check "info-xref" nil t) -;; (autoload 'info-xref-check-all "info-xref" nil t) -;; -;; then ;; -;; M-x info-xref-check -;; -;; and enter an info file name. - - -;;; Emacsen: - -;; Designed for use with GNU Emacs 21. - - -;;; History: - -;; Version 1 - the first version. - +;; `M-x info-xref-check-all-custom' is a related command, it goes through +;; all info document references in customizable variables, checking them +;; like info file cross references. ;;; Code: @@ -204,32 +183,37 @@ should open up the purported top file and see what subfiles it says." This should be the raw file contents, not `Info-mode'." (goto-char (point-min)) (while (re-search-forward - "\\*[Nn]ote[ \n\t]+[^:]*:[ \n\t]+\\(\\(([^)]+)\\)[^.,]+\\)[.,]" + "\\*[Nn]ote[ \n\t]+[^:]*:[ \n\t]+\\(\\(([^)]*)\\)[^.,]+\\)[.,]" nil t) (let* ((file (match-string 2)) (node ;; Canonicalize spaces: we could use "[\t\n ]+" but ;; we try to avoid uselessly replacing " " with " ". (replace-regexp-in-string "[\t\n][\t\n ]*\\| [\t\n ]+" " " (match-string 1) t t))) - ;; see if the file exists, if we haven't tried it before - (unless (assoc file info-xref-xfile-alist) - (let ((found (info-xref-goto-node-p file))) - (push (cons file found) info-xref-xfile-alist) - (unless found - (info-xref-output (format "Not available to check: %s\n" file))))) - ;; if the file exists, try the node, if we haven't before - (when (cdr (assoc file info-xref-xfile-alist)) - (unless (assoc node info-xref-xfile-alist) + (if (string-equal "()" file) + (info-xref-output "Empty filename part: %s\n" node) + ;; see if the file exists, if we haven't tried it before + (unless (assoc file info-xref-xfile-alist) + (let ((found (info-xref-goto-node-p file))) + (push (cons file found) info-xref-xfile-alist) + (unless found + (info-xref-output "Not available to check: %s\n" file)))) + ;; if the file exists, try the node + (when (cdr (assoc file info-xref-xfile-alist)) (if (info-xref-goto-node-p node) (setq info-xref-good (1+ info-xref-good)) (setq info-xref-bad (1+ info-xref-bad)) - (info-xref-output (format "No such node: %s\n" node)))))))) + (info-xref-output "No such node: %s\n" node))))))) -(defun info-xref-output (str) - "Emit STR as an info-xref result message." +(defun info-xref-output (str &rest args) + "Emit a `format'-ed message STR+ARGS to the info-xref output buffer." (with-current-buffer info-xref-results-buffer - (insert info-xref-filename-heading str) - (setq info-xref-filename-heading ""))) + (insert info-xref-filename-heading + (apply 'format str args)) + (setq info-xref-filename-heading "") + ;; all this info-xref can be pretty slow, display now so the user can + ;; see some progress + (sit-for 0))) ;; When asking Info-goto-node to fork, *info* needs to be the current ;; buffer, otherwise it seems to clone the current buffer but then do the @@ -259,6 +243,68 @@ This should be the raw file contents, not `Info-mode'." (unless (equal (current-buffer) oldbuf) (kill-buffer (current-buffer)))))))) +;;;###autoload +(defun info-xref-check-all-custom () + "Check info references in all customize groups and variables. +`custom-manual' and `info-link' entries in the `custom-links' list are checked. + +`custom-load' autoloads for all symbols are loaded in order to get all the +link information. This will be a lot of lisp packages loaded, and can take +quite a while." + + (interactive) + (pop-to-buffer info-xref-results-buffer t) + (erase-buffer) + (let ((info-xref-filename-heading "")) + + ;; `custom-load-symbol' is not used, since it quietly ignores errors, + ;; but we want to show them (since they may mean incomplete checking). + ;; + ;; Just one pass through mapatoms is made. There shouldn't be any new + ;; custom-loads setup by packages loaded. + ;; + (info-xref-output "Loading custom-load autoloads ...\n") + (require 'cus-start) + (require 'cus-load) + (let ((viper-mode nil)) ;; tell viper.el not to ask about viperizing + (mapatoms + (lambda (symbol) + (dolist (load (get symbol 'custom-loads)) + (cond ((symbolp load) + (condition-case cause (require load) + (error + (info-xref-output "Symbol `%s': cannot require '%s: %s\n" + symbol load cause)))) + ;; skip if previously loaded + ((assoc load load-history)) + ((assoc (locate-library load) load-history)) + (t + (condition-case cause (load load) + (error + (info-xref-output "Symbol `%s': cannot load \"%s\": %s\n" + symbol load cause))))))))) + + ;; Don't bother to check whether the info file exists as opposed to just + ;; a missing node. If you have the lisp then you should have the + ;; documentation, so missing node name will be the usual fault. + ;; + (info-xref-output "\nChecking custom-links references ...\n") + (let ((good 0) + (bad 0)) + (mapatoms + (lambda (symbol) + (dolist (link (get symbol 'custom-links)) + (when (memq (car link) '(custom-manual info-link)) + (if (info-xref-goto-node-p (cadr link)) + (setq good (1+ good)) + (setq bad (1+ bad)) + ;; symbol-file gives nil for preloaded variables, would need + ;; to copy what describe-variable does to show the right place + (info-xref-output "Symbol `%s' (in %s): cannot goto node: %s\n" + symbol (symbol-file symbol) (cadr link))))))) + (info-xref-output "%d good, %d bad\n" good bad)))) + (provide 'info-xref) +;;; arch-tag: 69d4d528-69ed-4cc2-8eb4-c666a0c1d5ac ;;; info-xref.el ends here diff --git a/lisp/info.el b/lisp/info.el index 3082aa7231..c67a1a5f0c 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1,7 +1,6 @@ ;;; info.el --- info package for Emacs -;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, -;; 2002, 2003 +;; Copyright (C) 1985,86,92,93,94,95,96,97,98,99,2000,01,02,03,2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -45,9 +44,13 @@ (defvar Info-history nil - "List of info nodes user has visited. + "Stack of info nodes user has visited. Each element of list is a list (FILENAME NODENAME BUFFERPOS).") +(defvar Info-history-list nil + "List of all info nodes user has visited. +Each element of list is a list (FILENAME NODENAME).") + (defcustom Info-enable-edit nil "*Non-nil means the \\\\[Info-edit] command in Info can edit the current node. This is convenient if you want to write info files by hand. @@ -76,12 +79,25 @@ The Lisp code is executed when the node is selected.") :group 'info) (defface info-xref - '((((class color) (background light)) (:foreground "magenta4" :weight bold)) - (((class color) (background dark)) (:foreground "cyan" :weight bold)) - (t (:weight bold))) + '((((class color) (background light)) (:foreground "blue")) + (((class color) (background dark)) (:foreground "cyan")) + (t (:underline t))) "Face for Info cross-references." :group 'info) +(defface info-xref-visited + '((((class color) (background light)) (:foreground "magenta4")) + (((class color) (background dark)) (:foreground "magenta4")) + (t (:underline t))) + "Face for visited Info cross-references." + :group 'info) + +(defcustom Info-fontify-visited-nodes t + "*Non-nil means to fontify visited nodes in a different face." + :version "21.4" + :type 'boolean + :group 'info) + (defcustom Info-fontify-maximum-menu-size 100000 "*Maximum size of menu to fontify if `font-lock-mode' is non-nil." :type 'integer @@ -149,17 +165,19 @@ that you visit a subnode before getting to the end of the menu. Setting this option to nil results in behavior similar to the stand-alone Info reader program, which visits the first subnode from the menu only when you hit the end of the current node." + :version "21.4" :type 'boolean :group 'info) (defcustom Info-hide-note-references t "*If non-nil, hide the tag and section reference in *note and * menu items. -Also replaces the \"*note\" text with \"see\". -If value is non-nil but not t, the reference section is still shown." +If value is non-nil but not `hide', also replaces the \"*note\" with \"see\". +If value is non-nil but not t or `hide', the reference section is still shown." :version "21.4" - :type '(choice (const :tag "No reformatting" nil) + :type '(choice (const :tag "No hiding" nil) (const :tag "Replace tag and hide reference" t) - (other :tag "Replace only tag" tag)) + (const :tag "Hide tag and reference" hide) + (other :tag "Only replace tag" tag)) :group 'info) (defcustom Info-refill-paragraphs nil @@ -170,14 +188,31 @@ file, so be prepared for a few surprises if you enable this feature." :type 'boolean :group 'info) +(defcustom Info-search-whitespace-regexp "\\\\(?:\\\\s-+\\\\)" + "*If non-nil, regular expression to match a sequence of whitespace chars. +This applies to Info search for regular expressions. +You might want to use something like \"[ \\t\\r\\n]+\" instead. +In the Customization buffer, that is `[' followed by a space, +a tab, a carriage return (control-M), a newline, and `]+'." + :type 'regexp + :group 'info) + (defcustom Info-mode-hook ;; Try to obey obsolete Info-fontify settings. (unless (and (boundp 'Info-fontify) (null Info-fontify)) '(turn-on-font-lock)) - "Hooks run when `info-mode' is called." + "Hooks run when `Info-mode' is called." + :type 'hook + :group 'info) + +(defcustom Info-selection-hook nil + "Hooks run when `Info-select-node' is called." :type 'hook :group 'info) +(defvar Info-edit-mode-hook nil + "Hooks run when `Info-edit-mode' is called.") + (defvar Info-current-file nil "Info file that Info is now looking at, or nil. This is the name that was specified in Info, not the actual file name. @@ -204,6 +239,11 @@ Marker points nowhere if file has no tag table.") (defvar Info-index-alternatives nil "List of possible matches for last `Info-index' command.") +(defvar Info-reference-name nil + "Name of the selected cross-reference. +Point is moved to the proper occurrence of this name within a node +after selecting it.") + (defvar Info-standalone nil "Non-nil if Emacs was started solely as an Info browser.") @@ -386,7 +426,9 @@ Do the right thing if the file has been compressed or zipped." ;; version, so we should look there first. `Info-insert-dir' ;; currently expects to find `alternative' first on the list. (cons alternative - (reverse (cdr (reverse Info-default-directory-list))))))) + ;; Don't drop the last part, it might contain non-Emacs stuff. + ;; (reverse (cdr (reverse + Info-default-directory-list)))) ;; ))) (defun info-initialize () "Initialize `Info-directory-list', if that hasn't been done yet." @@ -428,18 +470,16 @@ The top-level Info directory is made by combining all the files named `dir' in all the directories in that path." (interactive (if current-prefix-arg (list (read-file-name "Info file name: " nil nil t)))) + (pop-to-buffer "*info*") (if file - (progn - (pop-to-buffer "*info*") - ;; If argument already contains parentheses, don't add another set - ;; since the argument will then be parsed improperly. This also - ;; has the added benefit of allowing node names to be included - ;; following the parenthesized filename. - (if (and (stringp file) (string-match "(.*)" file)) - (Info-goto-node file) - (Info-goto-node (concat "(" file ")")))) - (if (get-buffer "*info*") - (pop-to-buffer "*info*") + ;; If argument already contains parentheses, don't add another set + ;; since the argument will then be parsed improperly. This also + ;; has the added benefit of allowing node names to be included + ;; following the parenthesized filename. + (if (and (stringp file) (string-match "(.*)" file)) + (Info-goto-node file) + (Info-goto-node (concat "(" file ")"))) + (if (zerop (buffer-size)) (Info-directory)))) ;;;###autoload @@ -486,19 +526,22 @@ In standalone mode, \\\\[Info-exit] exits Emacs itself." (forward-line 1) ; does the line after delimiter match REGEXP? (re-search-backward regexp beg t)))) -(defun Info-find-node (filename nodename &optional no-going-back) - "Go to an info node specified as separate FILENAME and NODENAME. -NO-GOING-BACK is non-nil if recovering from an error in this function; -it says do not attempt further (recursive) error recovery." - (info-initialize) +(defun Info-find-file (filename &optional noerror) + "Return expanded FILENAME, or t, if FILENAME is \"dir\". +Optional second argument NOERROR, if t, means if file is not found +just return nil (no error)." ;; Convert filename to lower case if not found as specified. ;; Expand it. (if (stringp filename) (let (temp temp-downcase found) (setq filename (substitute-in-file-name filename)) - (if (string= (downcase filename) "dir") - (setq found t) - (let ((dirs (if (string-match "^\\./" filename) + (cond + ((string= (downcase filename) "dir") + (setq found t)) + ((string= filename "apropos") + (setq found 'apropos)) + (t + (let ((dirs (if (string-match "^\\./" filename) ;; If specified name starts with `./' ;; then just try current directory. '("./") @@ -536,10 +579,20 @@ it says do not attempt further (recursive) error recovery." temp (car (car suffix-list)) nil))) (setq found temp))) (setq suffix-list (cdr suffix-list)))) - (setq dirs (cdr dirs))))) + (setq dirs (cdr dirs)))))) (if found (setq filename found) - (error "Info file %s does not exist" filename)))) + (if noerror + (setq filename nil) + (error "Info file %s does not exist" filename))) + filename))) + +(defun Info-find-node (filename nodename &optional no-going-back) + "Go to an info node specified as separate FILENAME and NODENAME. +NO-GOING-BACK is non-nil if recovering from an error in this function; +it says do not attempt further (recursive) error recovery." + (info-initialize) + (setq filename (Info-find-file filename)) ;; Record the node we are leaving. (if (and Info-current-file (not no-going-back)) (setq Info-history @@ -684,10 +737,14 @@ a case-insensitive match is tried." Info-current-file-completions nil buffer-file-name nil) (erase-buffer) - (if (eq filename t) - (Info-insert-dir) + (cond + ((eq filename t) + (Info-insert-dir)) + ((eq filename 'apropos) + (insert-buffer-substring " *info-apropos*")) + (t (info-insert-file-contents filename nil) - (setq default-directory (file-name-directory filename))) + (setq default-directory (file-name-directory filename)))) (set-buffer-modified-p nil) ;; See whether file has a tag table. Record the location if yes. (goto-char (point-max)) @@ -722,7 +779,11 @@ a case-insensitive match is tried." (set-marker Info-tag-table-marker pos))) (set-marker Info-tag-table-marker nil)) (setq Info-current-file - (if (eq filename t) "dir" filename)))) + (cond + ((eq filename t) "dir") + ((eq filename 'apropos) "apropos") + (t filename))) + )) ;; Use string-equal, not equal, to ignore text props. (if (string-equal nodename "*") (progn (setq Info-current-node nodename) @@ -786,7 +847,18 @@ a case-insensitive match is tried." nodename))) (Info-select-node) - (goto-char (or anchorpos (point-min)))))) + (goto-char (point-min)) + (cond (anchorpos + (let ((new-history (list Info-current-file + (substring-no-properties nodename)))) + ;; Add anchors to the history too + (setq Info-history-list + (cons new-history + (delete new-history Info-history-list)))) + (goto-char anchorpos)) + (Info-reference-name + (Info-find-index-name Info-reference-name) + (setq Info-reference-name nil)))))) ;; If we did not finish finding the specified node, ;; go back to the previous one. (or Info-current-node no-going-back (null Info-history) @@ -917,7 +989,7 @@ a case-insensitive match is tried." (beginning-of-line) (setq end (point)) (push (list nodename other beg end) this-buffer-nodes))) - (if (assoc-ignore-case "top" this-buffer-nodes) + (if (assoc-string "top" this-buffer-nodes t) (setq nodes (nconc this-buffer-nodes nodes)) (setq problems t) (message "No `top' node in %s" Info-dir-file-name))))) @@ -1085,7 +1157,7 @@ a case-insensitive match is tried." (+ (- nodepos lastfilepos) (point))))) (defun Info-unescape-quotes (value) - "Unescape double quotes and backslashes in VALUE" + "Unescape double quotes and backslashes in VALUE." (let ((start 0) (unquote value)) (while (string-match "[^\\\"]*\\(\\\\\\)[\\\\\"]" unquote start) @@ -1098,10 +1170,9 @@ a case-insensitive match is tried." ;; into the Info file for handling images. (defun Info-split-parameter-string (parameter-string) "Return alist of (\"KEY\" . \"VALUE\") from PARAMETER-STRING; a - whitespace separated list of KEY=VALUE pairs. If VALUE - contains whitespace or double quotes, it must be quoted in - double quotes and any double quotes or backslashes must be - escaped (\\\",\\\\)." +whitespace separated list of KEY=VALUE pairs. If VALUE contains +whitespace or double quotes, it must be quoted in double quotes and +any double quotes or backslashes must be escaped (\\\",\\\\)." (let ((start 0) (parameter-alist)) (while (string-match @@ -1133,12 +1204,28 @@ a case-insensitive match is tried." (image (if (file-exists-p image-file) (create-image image-file) "[broken image]"))) - (message "Found image: %S" image-file) (if (not (get-text-property start 'display)) (add-text-properties start (point) `(display ,image rear-nonsticky (display))))))) (set-buffer-modified-p nil))) +;; Texinfo 4.7 adds cookies of the form ^@^H[NAME CONTENTS ^@^H]. +;; Hide any construct of the general form ^@[^@-^_][ ... ^@[^@-^_]], +;; including one optional trailing newline. +(defun Info-hide-cookies-node () + "Hide unrecognised cookies in current node." + (save-excursion + (let ((inhibit-read-only t) + (case-fold-search t)) + (goto-char (point-min)) + (while (re-search-forward + "\\(\0[\0-\37][[][^\0]*\0[\0-\37][]]\n?\\)" + nil t) + (let* ((start (match-beginning 1))) + (if (not (get-text-property start 'invisible)) + (put-text-property start (point) 'invisible t))))) + (set-buffer-modified-p nil))) + (defun Info-select-node () "Select the info node that point is in." ;; Bind this in case the user sets it to nil. @@ -1173,8 +1260,13 @@ a case-insensitive match is tried." (read (current-buffer)))))) (point-max))) (if Info-enable-active-nodes (eval active-expression)) + ;; Add a new unique history item to full history list + (let ((new-history (list Info-current-file Info-current-node))) + (setq Info-history-list + (cons new-history (delete new-history Info-history-list)))) (Info-fontify-node) (Info-display-images-node) + (Info-hide-cookies-node) (run-hooks 'Info-selection-hook))))) (defun Info-set-mode-line () @@ -1206,6 +1298,8 @@ If FORK is a string, it is the name to use for the new buffer." (if fork (set-buffer (clone-buffer (concat "*info-" (if (stringp fork) fork nodename) "*") t))) + (if (member (buffer-name) '("*info-history*" "*info-toc*")) + (switch-to-buffer "*info*")) (let (filename) (string-match "\\s *\\((\\s *\\([^\t)]*\\)\\s *)\\s *\\|\\)\\(.*\\)" nodename) @@ -1314,13 +1408,18 @@ If FORK is a string, it is the name to use for the new buffer." (defvar Info-search-history nil "The history list for `Info-search'.") +(defvar Info-search-case-fold nil + "The value of `case-fold-search' from previous `Info-search' command.") + (defun Info-search (regexp) "Search for REGEXP, starting from point, and select node it's found in." (interactive (list (read-string (if Info-search-history - (format "Regexp search (default `%s'): " + (format "Regexp search%s (default `%s'): " + (if case-fold-search "" " case-sensitively") (car Info-search-history)) - "Regexp search: ") + (format "Regexp search%s: " + (if case-fold-search "" " case-sensitively"))) nil 'Info-search-history))) (when transient-mark-mode (deactivate-mark)) @@ -1333,6 +1432,10 @@ If FORK is a string, it is the name to use for the new buffer." (opoint (point)) (ostart (window-start)) (osubfile Info-current-subfile)) + (when Info-search-whitespace-regexp + (setq regexp (replace-regexp-in-string + "[ \t\n]+" Info-search-whitespace-regexp regexp))) + (setq Info-search-case-fold case-fold-search) (save-excursion (save-restriction (widen) @@ -1408,6 +1511,20 @@ If FORK is a string, it is the name to use for the new buffer." (equal ofile Info-current-file)) (setq Info-history (cons (list ofile onode opoint) Info-history)))))) + +(defun Info-search-case-sensitively () + "Search for a regexp case-sensitively." + (interactive) + (let ((case-fold-search nil)) + (call-interactively 'Info-search))) + +(defun Info-search-next () + "Search for next regexp from a previous `Info-search' command." + (interactive) + (let ((case-fold-search Info-search-case-fold)) + (if Info-search-history + (Info-search (car Info-search-history)) + (call-interactively 'Info-search)))) (defun Info-extract-pointer (name &optional errorname) "Extract the value of the node-pointer named NAME. @@ -1440,6 +1557,11 @@ End of submatch 0, 1, and 3 are the same, so you can safely concat." "[" (or allowedchars "^,\t\n") " ]" ;The last char can't be a space. "\\|\\)\\)")) ;Allow empty node names. +;;; For compatibility; other files have used this name. +(defun Info-following-node-name () + (and (looking-at (Info-following-node-name-re)) + (match-string 1))) + (defun Info-next () "Go to the next node of this node." (interactive) @@ -1454,12 +1576,25 @@ End of submatch 0, 1, and 3 are the same, so you can safely concat." "Go to the superior node of this node. If SAME-FILE is non-nil, do not move to a different Info file." (interactive) - (let ((node (Info-extract-pointer "up"))) + (let ((old-node Info-current-node) + (old-file Info-current-file) + (node (Info-extract-pointer "up")) p) (and (or same-file (not (stringp Info-current-file))) (string-match "^(" node) (error "Up node is in another Info file")) - (Info-goto-node node)) - (Info-restore-point Info-history)) + (Info-goto-node node) + (setq p (point)) + (goto-char (point-min)) + (if (and (search-forward "\n* Menu:" nil t) + (re-search-forward + (if (string-equal old-node "Top") + (concat "\n\\*[^:]+: +(" (file-name-nondirectory old-file) ")") + (concat "\n\\* +\\(" (regexp-quote old-node) + ":\\|[^:]+: +" (regexp-quote old-node) "\\)")) + nil t)) + (beginning-of-line) + (goto-char p) + (Info-restore-point Info-history)))) (defun Info-last () "Go back to the last node visited." @@ -1481,9 +1616,160 @@ If SAME-FILE is non-nil, do not move to a different Info file." (interactive) (Info-find-node "dir" "top")) -(defun Info-follow-reference (footnotename) +;;;###autoload (add-hook 'same-window-buffer-names "*info-history*") + +(defun Info-history () + "Create the buffer *info-history* with a menu of visited nodes." + (interactive) + (let ((curr-file Info-current-file) + (curr-node Info-current-node) + p) + (pop-to-buffer + (with-current-buffer (get-buffer-create "*info-history*") + (let ((inhibit-read-only t)) + (erase-buffer) + (goto-char (point-min)) + (insert "Node: History\n\n") + (insert "Recently Visited Nodes\n**********************\n\n") + (insert "* Menu:\n\n") + (let ((hl Info-history-list)) + (while hl + (let ((file (nth 0 (car hl))) + (node (nth 1 (car hl)))) + (if (and (string-equal file curr-file) + (string-equal node curr-node)) + (setq p (point))) + (insert "* " node ": (" (file-name-nondirectory file) + ")" node ".\n")) + (setq hl (cdr hl)))) + (or (eq major-mode 'Info-mode) (Info-mode)) + (setq Info-current-file "info-history") + (setq Info-current-node "Info History") + (Info-set-mode-line) + (if (not (bobp)) (Info-fontify-node)) + (current-buffer)))) + (goto-char (or p (point-min))))) + +;;;###autoload (add-hook 'same-window-buffer-names "*info-toc*") + +(defun Info-toc () + "Create the buffer *info-toc* with Info file's table of contents." + (interactive) + (let ((curr-file Info-current-file) + (curr-node Info-current-node) + p) + (pop-to-buffer + (with-current-buffer (get-buffer-create "*info-toc*") + (if (not (equal Info-current-file curr-file)) + (let ((inhibit-read-only t) + (node-list (Info-build-toc curr-file))) + (erase-buffer) + (goto-char (point-min)) + (insert "Node: Contents\n\n") + (insert "Table of Contents\n*****************\n\n") + (insert "*Note Top::\n") + (Info-insert-toc + (nth 2 (assoc "Top" node-list)) ; get Top nodes + node-list 0) + (or (eq major-mode 'Info-mode) (Info-mode)) + (setq Info-current-file curr-file) + (setq Info-current-node "Contents") + (Info-set-mode-line))) + (if (not (bobp)) + (let ((Info-hide-note-references 'hide)) + (Info-fontify-node))) + (goto-char (point-min)) + (if (setq p (search-forward (concat "*Note " curr-node "::") nil t)) + (setq p (- p (length curr-node) 2))) + (current-buffer))) + (goto-char (or p (point-min))))) + +(defun Info-insert-toc (nodes node-list level) + "Insert table of contents with references to nodes." + (let ((section "Top")) + (while nodes + (let ((node (assoc (car nodes) node-list))) + (unless (member (nth 1 node) (list nil section)) + (insert (setq section (nth 1 node)) "\n")) + (insert (make-string level ?\t)) + (insert "*Note " (car nodes) "::\n") + (Info-insert-toc (nth 2 node) node-list (1+ level)) + (setq nodes (cdr nodes)))))) + +(defun Info-build-toc (file) + "Build table of contents from menus of Info FILE and its subfiles." + (if (equal file "dir") + (error "Table of contents for Info directory is not supported yet")) + (with-temp-buffer + (let ((default-directory (or (and (stringp file) + (file-name-directory + (setq file (Info-find-file file)))) + default-directory)) + (sections '(("Top" "Top"))) + nodes subfiles) + (while (or file subfiles) + (or file (message "Searching subfile %s..." (car subfiles))) + (erase-buffer) + (info-insert-file-contents (or file (car subfiles))) + (while (and (search-forward "\n\^_\nFile:" nil 'move) + (search-forward "Node: " nil 'move)) + (let ((nodename (substring-no-properties (Info-following-node-name))) + (bound (- (or (save-excursion (search-forward "\n\^_" nil t)) + (point-max)) 2)) + (section "Top") + menu-items) + (when (and (not (string-match "\\" nodename)) + (re-search-forward "^\\* Menu:" bound t)) + (forward-line 1) + (beginning-of-line) + (setq bound (or (and (equal nodename "Top") + (save-excursion + (re-search-forward + "^[ \t-]*The Detailed Node Listing" nil t))) + bound)) + (while (< (point) bound) + (cond + ;; Menu item line + ((looking-at "^\\* +[^:]+:") + (beginning-of-line) + (forward-char 2) + (let ((menu-node-name (substring-no-properties + (Info-extract-menu-node-name)))) + (setq menu-items (cons menu-node-name menu-items)) + (if (equal nodename "Top") + (setq sections + (cons (list menu-node-name section) sections))))) + ;; Other non-empty strings in the Top node are section names + ((and (equal nodename "Top") + (looking-at "^\\([^ \t\n*=.-][^:\n]*\\)")) + (setq section (match-string-no-properties 1)))) + (forward-line 1) + (beginning-of-line))) + (setq nodes (cons (list nodename + (cadr (assoc nodename sections)) + (nreverse menu-items)) + nodes)) + (goto-char bound))) + (if file + (save-excursion + (goto-char (point-min)) + (if (search-forward "\n\^_\nIndirect:" nil t) + (let ((bound (save-excursion (search-forward "\n\^_" nil t)))) + (while (re-search-forward "^\\(.*\\): [0-9]+$" bound t) + (setq subfiles (cons (match-string-no-properties 1) + subfiles))))) + (setq subfiles (nreverse subfiles) + file nil)) + (setq subfiles (cdr subfiles)))) + (message "") + (nreverse nodes)))) + +(defun Info-follow-reference (footnotename &optional fork) "Follow cross reference named FOOTNOTENAME to the node it refers to. -FOOTNOTENAME may be an abbreviation of the reference name." +FOOTNOTENAME may be an abbreviation of the reference name. +If FORK is non-nil (interactively with a prefix arg), show the node in +a new info buffer. If FORK is a string, it is the name to use for the +new buffer." (interactive (let ((completion-ignore-case t) (case-fold-search t) @@ -1496,7 +1782,7 @@ FOOTNOTENAME may be an abbreviation of the reference name." (setq bol (point)) (goto-char (point-min)) - (while (re-search-forward "\\*note[ \n\t]*\\([^:]*\\):" nil t) + (while (re-search-forward "\\*note[ \n\t]+\\([^:]*\\):" nil t) (setq str (match-string-no-properties 1)) ;; See if this one should be the default. (and (null default) @@ -1533,7 +1819,7 @@ FOOTNOTENAME may be an abbreviation of the reference name." "Follow reference named: ") completions nil t))) (list (if (equal input "") - default input))) + default input) current-prefix-arg)) (error "No cross-references in this node")))) (unless footnotename @@ -1545,17 +1831,34 @@ FOOTNOTENAME may be an abbreviation of the reference name." (setq str (concat (substring str 0 i) "[ \t\n]+" (substring str (1+ i)))) (setq i (+ i 6))) (save-excursion - (goto-char (point-min)) - (or (re-search-forward str nil t) - (error "No cross-reference named %s" footnotename)) - (goto-char (+ (match-beginning 0) 5)) - (setq target - (Info-extract-menu-node-name t))) + ;; Move point to the beginning of reference if point is on reference + (or (looking-at "\\*note[ \n\t]+") + (and (looking-back "\\*note[ \n\t]+") + (goto-char (match-beginning 0))) + (if (and (save-excursion + (goto-char (+ (point) 5)) ; skip a possible *note + (re-search-backward "\\*note[ \n\t]+" nil t) + (looking-at (concat "\\*note[ \n\t]+" + (Info-following-node-name-re "^.,\t")))) + (<= (point) (match-end 0))) + (goto-char (match-beginning 0)))) + ;; Go to the reference closest to point + (let ((next-ref (save-excursion (and (re-search-forward str nil t) + (+ (match-beginning 0) 5)))) + (prev-ref (save-excursion (and (re-search-backward str nil t) + (+ (match-beginning 0) 5))))) + (goto-char (cond ((and next-ref prev-ref) + (if (< (abs (- next-ref (point))) + (abs (- prev-ref (point)))) + next-ref prev-ref)) + ((or next-ref prev-ref)) + ((error "No cross-reference named %s" footnotename)))) + (setq target (Info-extract-menu-node-name t)))) (while (setq i (string-match "[ \t\n]+" target i)) (setq target (concat (substring target 0 i) " " (substring target (match-end 0)))) (setq i (+ i 1))) - (Info-goto-node target))) + (Info-goto-node target fork))) (defconst Info-menu-entry-name-re "\\(?:[^:]\\|:[^:,.;() \t\n]\\)*" ;; We allow newline because this is also used in Info-follow-reference, @@ -1962,7 +2265,7 @@ parent node." (defun Info-next-reference (&optional recur) "Move cursor to the next cross-reference or menu item in the node." (interactive) - (let ((pat "\\*note[ \n\t]*\\([^:]*\\):\\|^\\* .*:") + (let ((pat "\\*note[ \n\t]+\\([^:]+\\):\\|^\\* .*:\\|[hf]t?tp://") (old-pt (point)) (case-fold-search t)) (or (eobp) (forward-char 1)) @@ -1973,7 +2276,7 @@ parent node." (progn (goto-char old-pt) (error "No cross references in this node"))))) - (goto-char (match-beginning 0)) + (goto-char (or (match-beginning 1) (match-beginning 0))) (if (looking-at "\\* Menu:") (if recur (error "No cross references in this node") @@ -1982,7 +2285,7 @@ parent node." (defun Info-prev-reference (&optional recur) "Move cursor to the previous cross-reference or menu item in the node." (interactive) - (let ((pat "\\*note[ \n\t]*\\([^:]*\\):\\|^\\* .*:") + (let ((pat "\\*note[ \n\t]+\\([^:]+\\):\\|^\\* .*:\\|[hf]t?tp://") (old-pt (point)) (case-fold-search t)) (or (re-search-backward pat nil t) @@ -1992,7 +2295,7 @@ parent node." (progn (goto-char old-pt) (error "No cross references in this node"))))) - (goto-char (match-beginning 0)) + (goto-char (or (match-beginning 1) (match-beginning 0))) (if (looking-at "\\* Menu:") (if recur (error "No cross references in this node") @@ -2111,10 +2414,70 @@ Give a blank topic name to go to the Index node itself." (search-forward (format "`%s'" (substring name 0 (match-beginning 1))) nil t)) - (search-forward name nil t)) - (beginning-of-line) + (search-forward name nil t) + ;; Try again without the " <1>" makeinfo can append + (and (string-match "\\`\\(.*\\) <[0-9]+>\\'" name) + (Info-find-index-name (match-string 1 name)))) + (progn (beginning-of-line) t) ;; non-nil for recursive call (goto-char (point-min))))) +;;;###autoload +(defun info-apropos (string) + "Grovel indices of all known Info files on your system for STRING. +Build a menu of the possible matches." + (interactive "sIndex apropos: ") + (unless (string= string "") + (let ((pattern (format "\n\\* +\\([^\n]*%s[^\n]*\\):[ \t]+\\([^.]+\\)." + (regexp-quote string))) + (ohist Info-history) + (ohist-list Info-history-list) + (current-node Info-current-node) + (current-file Info-current-file) + manuals matches temp-file node) + (let ((Info-fontify-maximum-menu-size 0) + Info-use-header-lines + Info-hide-note-references) + (Info-directory) + (message "Searching indices...") + (goto-char (point-min)) + (re-search-forward "\\* Menu: *\n" nil t) + (while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t) + (add-to-list 'manuals (match-string 1))) + (dolist (manual manuals) + (message "Searching %s" manual) + (condition-case nil + (save-excursion + (Info-find-node manual "Top") + (when (re-search-forward "\n\\* \\(.*\\\\)" nil t) + (goto-char (match-beginning 1)) + (Info-goto-node (Info-extract-menu-node-name)) + (while + (progn + (goto-char (point-min)) + (while (re-search-forward pattern nil t) + (add-to-list 'matches + (list (match-string 1) + (match-string 2) + manual))) + (and (setq node (Info-extract-pointer "next" t)) + (string-match "\\" node))) + (Info-goto-node node)))) + (error nil)))) + (Info-goto-node (concat "(" current-file ")" current-node)) + (setq Info-history ohist + Info-history-list ohist-list) + (message "Searching indices...done") + (if (null matches) + (message "No matches found") + (with-current-buffer (get-buffer-create " *info-apropos*") + (erase-buffer) + (insert "\n\nFile: apropos, Node: Top, Up: (dir)\n") + (insert "* Menu: \nNodes whose indices contain \"" string "\"\n\n") + (dolist (entry matches) + (insert "* " (car entry) " [" (nth 2 entry) + "]: (" (nth 2 entry) ")" (nth 1 entry) ".\n"))) + (Info-find-node "apropos" "top"))))) + (defun Info-undefined () "Make command be undefined in Info." (interactive) @@ -2200,12 +2563,12 @@ At end of the node's text, moves to the next node, or up if none." (save-excursion (forward-line 1) (eobp)) (Info-next-preorder))) -(defun Info-follow-nearest-node () +(defun Info-follow-nearest-node (&optional fork) "Follow a node reference near point. If point is on a reference, follow that reference. Otherwise, if point is in a menu item description, follow that menu item." - (interactive) - (or (Info-try-follow-nearest-node) + (interactive "P") + (or (Info-try-follow-nearest-node fork) (when (save-excursion (search-backward "\n* menu:" nil t)) (save-excursion @@ -2214,35 +2577,45 @@ if point is in a menu item description, follow that menu item." (beginning-of-line 0)) (when (looking-at "\\* +\\([^\t\n]*\\):") (Info-goto-node - (Info-extract-menu-item (match-string-no-properties 1))) + (Info-extract-menu-item (match-string-no-properties 1)) fork) t))) (error "Point neither on reference nor in menu item description"))) ;; Common subroutine. -(defun Info-try-follow-nearest-node () +(defun Info-try-follow-nearest-node (&optional fork) "Follow a node reference near point. Return non-nil if successful." (let (node) (cond - ((setq node (Info-get-token (point) "\\*note[ \n]" - "\\*note[ \n]\\([^:]*\\):")) - (Info-follow-reference node)) + ((and (Info-get-token (point) "[hf]t?tp://" "[hf]t?tp://\\([^ \t\n\"`({<>})']+\\)") + (or (featurep 'browse-url) (require 'browse-url nil t))) + (setq node t) + (browse-url (browse-url-url-at-point))) + ((setq node (Info-get-token (point) "\\*note[ \n\t]+" + "\\*note[ \n\t]+\\([^:]*\\):\\(:\\|[ \n\t]*(\\)?")) +;;; (or (match-string 2) +;;; (setq Info-reference-name +;;; (replace-regexp-in-string +;;; "[ \n\t]+" " " (match-string-no-properties 1)))) + (Info-follow-reference node fork)) ;; menu item: node name ((setq node (Info-get-token (point) "\\* +" "\\* +\\([^:]*\\)::")) - (Info-goto-node node)) + (Info-goto-node node fork)) ;; menu item: index entry ((Info-get-token (point) "\\* +" "\\* +\\(.*\\): ") + (if (save-match-data (string-match "\\" Info-current-node)) + (setq Info-reference-name (match-string-no-properties 1))) (beginning-of-line) (forward-char 2) (setq node (Info-extract-menu-node-name)) - (Info-goto-node node)) + (Info-goto-node node fork)) ((setq node (Info-get-token (point) "Up: " "Up: \\([^,\n\t]*\\)")) - (Info-goto-node node)) + (Info-goto-node node fork)) ((setq node (Info-get-token (point) "Next: " "Next: \\([^,\n\t]*\\)")) - (Info-goto-node node)) + (Info-goto-node node fork)) ((setq node (Info-get-token (point) "File: " "File: \\([^,\n\t]*\\)")) - (Info-goto-node "Top")) + (Info-goto-node "Top" fork)) ((setq node (Info-get-token (point) "Prev: " "Prev: \\([^,\n\t]*\\)")) - (Info-goto-node node))) + (Info-goto-node node fork))) node)) (defvar Info-mode-map nil @@ -2255,7 +2628,8 @@ if point is in a menu item description, follow that menu item." (define-key Info-mode-map " " 'Info-scroll-up) (define-key Info-mode-map "\C-m" 'Info-follow-nearest-node) (define-key Info-mode-map "\t" 'Info-next-reference) - (define-key Info-mode-map "\e\t" 'Info-prev-reference) + (define-key Info-mode-map [(shift tab)] 'Info-prev-reference) + (define-key Info-mode-map [backtab] 'Info-prev-reference) (define-key Info-mode-map "1" 'Info-nth-menu-item) (define-key Info-mode-map "2" 'Info-nth-menu-item) (define-key Info-mode-map "3" 'Info-nth-menu-item) @@ -2325,19 +2699,31 @@ if point is in a menu item description, follow that menu item." ("Reference" ["You should never see this" report-emacs-bug t]) ["Search..." Info-search :help "Search for regular expression in this Info file"] + ["Search Case-Sensitively..." Info-search-case-sensitively + :help "Search for regular expression case sensitively"] + ["Search Next" Info-search-next + :help "Search for another occurrence of regular expression"] ["Go to Node..." Info-goto-node :help "Go to a named node"] ["Last" Info-last :active Info-history :help "Go to the last node you were at"] + ["History" Info-history :active Info-history-list + :help "Go to the history buffer"] + ["Table of Contents" Info-toc + :help "Go to the buffer with a table of contents"] ("Index..." ["Lookup a String" Info-index :help "Look for a string in the index items"] ["Next Matching Item" Info-index-next - :help "Look for another occurrence of previous item"]) + :help "Look for another occurrence of previous item"] + ["Lookup a string in all indices" info-apropos + :help "Look for a string in the indices of all manuals"]) ["Edit" Info-edit :help "Edit contents of this node" :active Info-enable-edit] ["Copy Node Name" Info-copy-current-node-name :help "Copy the name of the current node into the kill ring"] + ["Clone Info buffer" clone-buffer + :help "Create a twin copy of the current Info buffer."] ["Exit" Info-exit :help "Stop reading Info"])) @@ -2393,7 +2779,7 @@ if point is in a menu item description, follow that menu item." (case-fold-search t)) (save-excursion (goto-char (point-min)) - (while (re-search-forward "\\*note[ \n\t]*\\([^:]*\\):" nil t) + (while (re-search-forward "\\*note[ \n\t]+\\([^:]*\\):" nil t) (setq str (match-string 1)) (setq i 0) (while (setq i (string-match "[ \n\t]+" str i)) @@ -2466,6 +2852,8 @@ Selecting other nodes: \\[Info-directory] Go to the Info directory node. \\[Info-follow-reference] Follow a cross reference. Reads name of reference. \\[Info-last] Move to the last node you were at. +\\[Info-history] Go to the history buffer. +\\[Info-toc] Go to the buffer with a table of contents. \\[Info-index] Look up a topic in this file's Index and move to that node. \\[Info-index-next] (comma) Move to the next match from a previous `i' command. \\[Info-top-node] Go to the Top node of this file. @@ -2486,6 +2874,7 @@ Moving within a node: Advanced commands: \\[Info-copy-current-node-name] Put name of current info node in the kill ring. +\\[clone-buffer] Select a new cloned Info buffer in another window. \\[Info-edit] Edit contents of selected node. 1 Pick first item in node's menu. 2, 3, 4, 5 Pick second ... fifth item in node's menu. @@ -2494,6 +2883,10 @@ Advanced commands: \\[universal-argument] \\[info] Move to new Info file with completion. \\[Info-search] Search through this Info file for specified regexp, and select the node in which the next occurrence is found. +\\[Info-search-case-sensitively] Search through this Info file + for specified regexp case-sensitively. +\\[Info-search-next] Search for another occurrence of regexp + from a previous `Info-search' command. \\[Info-next-reference] Move cursor to next cross-reference or menu item. \\[Info-prev-reference] Move cursor to previous cross-reference or menu item." (kill-all-local-variables) @@ -2673,12 +3066,12 @@ The locations are of the format used in `Info-history', i.e. "Go to the Info node in the Emacs manual for command COMMAND. The command is found by looking up in Emacs manual's indices or in another manual found via COMMAND's `info-file' property or -the variable `Info-file-list-for-emacs'. COMMAND must be a symbol -or string." +the variable `Info-file-list-for-emacs'. +COMMAND must be a symbol or string." (interactive "CFind documentation for command: ") ;; If command is given as a string, convert it to a symbol. (if (stringp command) - (setq command (intern command))) + (setq command (intern command))) (or (commandp command) (signal 'wrong-type-argument (list 'commandp command))) (let ((where (Info-find-emacs-command-nodes command))) @@ -2762,16 +3155,26 @@ the variable `Info-file-list-for-emacs'." "Face for headers in Info menus." :group 'info) -(defun Info-fontify-menu-headers () - "Add the face `info-menu-header' to any header before a menu entry." - (save-excursion - (goto-char (point-min)) - (when (re-search-forward "^\\* Menu:" nil t) - (put-text-property (match-beginning 0) (match-end 0) - 'font-lock-face 'info-menu-header) - (while (re-search-forward "\n\n\\([^*\n ].*\\)\n\n?[*]" nil t) - (put-text-property (match-beginning 1) (match-end 1) - 'font-lock-face 'info-menu-header))))) +(defun Info-escape-percent (string) + "Double all occurrences of `%' in STRING. + +Return a new string with all `%' characters replaced by `%%'. +Preserve text properties." + (let ((start 0) + (end (length string)) + mb me m matches) + (save-match-data + (while (and (< start end) (string-match "%" string start)) + (setq mb (match-beginning 0) + me (1+ mb) + m (substring string mb me) + matches (cons m + (cons m + (cons (substring string start mb) + matches))) + start me)) + (push (substring string start end) matches) + (apply #'concat (nreverse matches))))) (defvar Info-next-link-keymap (let ((keymap (make-sparse-keymap))) @@ -2802,201 +3205,313 @@ the variable `Info-file-list-for-emacs'." "Keymap to put on the Up link in the text or the header line.") (defun Info-fontify-node () - ;; Only fontify the node if it hasn't already been done. - (unless (let ((where (next-property-change (point-min)))) - (and where (not (= where (point-max))))) - (save-excursion - (let ((inhibit-read-only t) - (case-fold-search t) - paragraph-markers) - (goto-char (point-min)) - (when (looking-at "^\\(File: [^,: \t]+,?[ \t]+\\)?") - (goto-char (match-end 0)) - (while (looking-at "[ \t]*\\([^:, \t\n]+\\):[ \t]+\\([^:,\t\n]+\\),?") - (goto-char (match-end 0)) - (let* ((nbeg (match-beginning 2)) - (nend (match-end 2)) - (tbeg (match-beginning 1)) - (tag (match-string 1))) - (if (string-equal tag "Node") - (put-text-property nbeg nend 'font-lock-face 'info-header-node) - (put-text-property nbeg nend 'font-lock-face 'info-header-xref) - (put-text-property tbeg nend 'mouse-face 'highlight) - (put-text-property tbeg nend - 'help-echo - (concat "Go to node " - (buffer-substring nbeg nend))) - ;; Always set up the text property keymap. - ;; It will either be used in the buffer - ;; or copied in the header line. - (put-text-property tbeg nend 'keymap - (cond - ((equal tag "Prev") Info-prev-link-keymap) - ((equal tag "Next") Info-next-link-keymap) - ((equal tag "Up") Info-up-link-keymap)))))) - (when Info-use-header-line - (goto-char (point-min)) - (let ((header-end (line-end-position)) - header) - ;; If we find neither Next: nor Prev: link, show the entire - ;; node header. Otherwise, don't show the File: and Node: - ;; parts, to avoid wasting precious space on information that - ;; is available in the mode line. - (if (re-search-forward - "\\(next\\|up\\|prev[ious]*\\): " - header-end t) - (progn - (goto-char (match-beginning 1)) - (setq header (buffer-substring (point) header-end))) - (if (re-search-forward "node:[ \t]*[^ \t]+[ \t]*" header-end t) - (setq header - (concat "No next, prev or up links -- " - (buffer-substring (point) header-end))) - (setq header (buffer-substring (point) header-end)))) - - (put-text-property (point-min) (1+ (point-min)) - 'header-line header) - ;; Hide the part of the first line - ;; that is in the header, if it is just part. - (unless (bobp) - ;; Hide the punctuation at the end, too. - (skip-chars-backward " \t,") - (put-text-property (point) header-end 'invisible t))))) - (goto-char (point-min)) - (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\|\\.+\\)$" - nil t) - (let* ((c (preceding-char)) - (face - (cond ((= c ?*) 'Info-title-1-face) - ((= c ?=) 'Info-title-2-face) - ((= c ?-) 'Info-title-3-face) - (t 'Info-title-4-face)))) - (put-text-property (match-beginning 1) (match-end 1) - 'font-lock-face face)) - ;; This is a serious problem for trying to handle multiple - ;; frame types at once. We want this text to be invisible - ;; on frames that can display the font above. - (when (memq (framep (selected-frame)) '(x pc w32 mac)) - (add-text-properties (1- (match-beginning 2)) (match-end 2) - '(invisible t front-sticky nil rear-nonsticky t)))) - (goto-char (point-min)) - (while (re-search-forward "\\(\\*Note[ \t]*\\)\n?[ \t]*\\([^:]*\\)\\(:[^.,:(]*\\(([^)]*)[^.,:]*\\)?[,:]?\n?\\)" nil t) - (unless (= (char-after (1- (match-beginning 0))) ?\") ; hack - (let ((start (match-beginning 0)) - (next (point)) - (hide-tag Info-hide-note-references) - other-tag) - (when hide-tag - ;; *Note is often used where *note should have been - (goto-char start) - (skip-syntax-backward " ") - (setq other-tag - (cond ((memq (char-before) '(nil ?\. ?! ??)) - "See ") - ((memq (char-before) '(?\, ?\; ?\: ?-)) - "see ") - ((memq (char-before) '(?\( ?\[ ?\{)) - ;; Check whether the paren is preceded by - ;; an end of sentence - (skip-syntax-backward " (") - (if (memq (char-before) '(nil ?\. ?! ??)) - "See " - "see ")) - ((save-match-data (looking-at "\n\n")) - "See "))) - (goto-char next)) - (if hide-tag - (add-text-properties (match-beginning 1) (match-end 1) - '(invisible t front-sticky nil rear-nonsticky t))) - (add-text-properties - (match-beginning 2) (match-end 2) - (cons 'help-echo - (cons (if (match-end 4) - (concat "mouse-2: go to " (match-string 4)) - "mouse-2: go to this node") - '(font-lock-face info-xref - mouse-face highlight)))) - (when (eq Info-hide-note-references t) - (add-text-properties (match-beginning 3) (match-end 3) - '(invisible t front-sticky nil rear-nonsticky t))) - (when other-tag - (save-excursion - (goto-char (match-beginning 1)) - (insert other-tag))) - (when (and Info-refill-paragraphs - (or hide-tag (eq Info-hide-note-references t))) - (push (set-marker (make-marker) start) - paragraph-markers))))) - - (when (and Info-refill-paragraphs - paragraph-markers) - (let ((fill-nobreak-invisible t) - (fill-individual-varying-indent nil) - (paragraph-start "\f\\|[ \t]*[-*]\\|[ \t]*$") - (paragraph-separate ".*\\.[ \t]*\n[ \t]\\|[ \t]*[-*]\\|[ \t\f]*$") - (adaptive-fill-mode nil)) - (goto-char (point-max)) - (while paragraph-markers - (let ((m (car paragraph-markers))) - (setq paragraph-markers (cdr paragraph-markers)) - (when (< m (point)) - (goto-char m) - (beginning-of-line) - (let ((beg (point))) - (when (zerop (forward-paragraph)) - (fill-individual-paragraphs beg (point) nil nil) - (goto-char beg)))) - (set-marker m nil))))) - - (goto-char (point-min)) - (when (and (search-forward "\n* Menu:" nil t) - (not (string-match "\\" Info-current-node)) - ;; Don't take time to annotate huge menus - (< (- (point-max) (point)) Info-fontify-maximum-menu-size)) - (let ((n 0) - cont) - (while (re-search-forward - (concat "^\\* +\\(" Info-menu-entry-name-re "\\)\\(:" - Info-node-spec-re "\\([ \t]*\\)\\)") - nil t) - (setq n (1+ n)) - (if (and (<= n 9) (zerop (% n 3))) ; visual aids to help with 1-9 keys - (put-text-property (match-beginning 0) - (1+ (match-beginning 0)) - 'font-lock-face 'info-menu-5)) - (add-text-properties - (match-beginning 1) (match-end 1) - (cons 'help-echo - (cons - (if (match-end 3) - (concat "mouse-2: go to " (match-string 3)) - "mouse-2: go to this node") - '(font-lock-face info-xref - mouse-face highlight)))) - (when (eq Info-hide-note-references t) - (put-text-property (match-beginning 2) (1- (match-end 6)) - 'invisible t) - ;; We need a stretchable space like :align-to but with - ;; a minimum value. - (put-text-property (1- (match-end 6)) (match-end 6) 'display - (if (>= 22 (- (match-end 1) - (match-beginning 0))) - '(space :align-to 24) - '(space :width 2))) - (setq cont (looking-at ".")) - (while (and (= (forward-line 1) 0) - (looking-at "\\([ \t]+\\)[^*\n]")) - (put-text-property (match-beginning 1) (1- (match-end 1)) - 'invisible t) - (put-text-property (1- (match-end 1)) (match-end 1) - 'display - (if cont - '(space :align-to 26) - '(space :align-to 24))) - (setq cont t)))))) - - (Info-fontify-menu-headers) - (set-buffer-modified-p nil))))) + "Fontify the node." + (save-excursion + (let* ((inhibit-read-only t) + (case-fold-search t) + paragraph-markers + (not-fontified-p ; the node hasn't already been fontified + (not (let ((where (next-property-change (point-min)))) + (and where (not (= where (point-max))))))) + (fontify-visited-p ; visited nodes need to be re-fontified + (and Info-fontify-visited-nodes + ;; Don't take time to refontify visited nodes in huge nodes + (< (- (point-max) (point-min)) Info-fontify-maximum-menu-size)))) + + ;; Fontify header line + (goto-char (point-min)) + (when (and not-fontified-p (looking-at "^\\(File: [^,: \t]+,?[ \t]+\\)?")) + (goto-char (match-end 0)) + (while (looking-at "[ \t]*\\([^:, \t\n]+\\):[ \t]+\\([^:,\t\n]+\\),?") + (goto-char (match-end 0)) + (let* ((nbeg (match-beginning 2)) + (nend (match-end 2)) + (tbeg (match-beginning 1)) + (tag (match-string 1))) + (if (string-equal tag "Node") + (put-text-property nbeg nend 'font-lock-face 'info-header-node) + (put-text-property nbeg nend 'font-lock-face 'info-header-xref) + (put-text-property tbeg nend 'mouse-face 'highlight) + (put-text-property tbeg nend + 'help-echo + (concat "Go to node " + (buffer-substring nbeg nend))) + ;; Always set up the text property keymap. + ;; It will either be used in the buffer + ;; or copied in the header line. + (put-text-property tbeg nend 'keymap + (cond + ((equal tag "Prev") Info-prev-link-keymap) + ((equal tag "Next") Info-next-link-keymap) + ((equal tag "Up") Info-up-link-keymap)))))) + (when Info-use-header-line + (goto-char (point-min)) + (let ((header-end (line-end-position)) + header) + ;; If we find neither Next: nor Prev: link, show the entire + ;; node header. Otherwise, don't show the File: and Node: + ;; parts, to avoid wasting precious space on information that + ;; is available in the mode line. + (if (re-search-forward + "\\(next\\|up\\|prev[ious]*\\): " + header-end t) + (progn + (goto-char (match-beginning 1)) + (setq header (buffer-substring (point) header-end))) + (if (re-search-forward "node:[ \t]*[^ \t]+[ \t]*" header-end t) + (setq header + (concat "No next, prev or up links -- " + (buffer-substring (point) header-end))) + (setq header (buffer-substring (point) header-end)))) + (put-text-property (point-min) (1+ (point-min)) + 'header-line (Info-escape-percent header)) + ;; Hide the part of the first line + ;; that is in the header, if it is just part. + (unless (bobp) + ;; Hide the punctuation at the end, too. + (skip-chars-backward " \t,") + (put-text-property (point) header-end 'invisible t))))) + + ;; Fontify titles + (goto-char (point-min)) + (when not-fontified-p + (while (re-search-forward "\n\\([^ \t\n].+\\)\n\\(\\*+\\|=+\\|-+\\|\\.+\\)$" + nil t) + (let* ((c (preceding-char)) + (face + (cond ((= c ?*) 'Info-title-1-face) + ((= c ?=) 'Info-title-2-face) + ((= c ?-) 'Info-title-3-face) + (t 'Info-title-4-face)))) + (put-text-property (match-beginning 1) (match-end 1) + 'font-lock-face face)) + ;; This is a serious problem for trying to handle multiple + ;; frame types at once. We want this text to be invisible + ;; on frames that can display the font above. + (when (memq (framep (selected-frame)) '(x pc w32 mac)) + (add-text-properties (1- (match-beginning 2)) (match-end 2) + '(invisible t front-sticky nil rear-nonsticky t))))) + + ;; Fontify cross references + (goto-char (point-min)) + (when (or not-fontified-p fontify-visited-p) + (while (re-search-forward "\\(\\*Note[ \n\t]+\\)\\([^:]*\\)\\(:[ \t]*\\([^.,:(]*\\)\\(\\(([^)]*)\\)[^.,:]*\\)?[,:]?\n?\\)" nil t) + (let ((start (match-beginning 0)) + (next (point)) + other-tag) + (when not-fontified-p + (when Info-hide-note-references + ;; *Note is often used where *note should have been + (goto-char start) + (skip-syntax-backward " ") + (setq other-tag + (cond ((memq (char-before) '(nil ?\. ?! ??)) + "See ") + ((memq (char-before) '(?\, ?\; ?\: ?-)) + "see ") + ((memq (char-before) '(?\( ?\[ ?\{)) + ;; Check whether the paren is preceded by + ;; an end of sentence + (skip-syntax-backward " (") + (if (memq (char-before) '(nil ?\. ?! ??)) + "See " + "see ")) + ((save-match-data (looking-at "\n\n")) + "See "))) + (goto-char next) + (add-text-properties + (match-beginning 1) + (or (save-match-data + ;; Don't hide \n after *Note + (let ((start1 (match-beginning 1))) + (if (string-match "\n" (match-string 1)) + (+ start1 (match-beginning 0))))) + (match-end 1)) + (if (and other-tag (not (eq Info-hide-note-references 'hide))) + `(display ,other-tag front-sticky nil rear-nonsticky t) + '(invisible t front-sticky nil rear-nonsticky t)))) + (add-text-properties + (match-beginning 2) (match-end 2) + (list + 'help-echo (if (or (match-end 5) + (not (equal (match-string 4) ""))) + (concat "mouse-2: go to " (or (match-string 5) + (match-string 4))) + "mouse-2: go to this node") + 'mouse-face 'highlight))) + (when (or not-fontified-p fontify-visited-p) + (add-text-properties + (match-beginning 2) (match-end 2) + (list + 'font-lock-face + ;; Display visited nodes in a different face + (if (and Info-fontify-visited-nodes + (save-match-data + (let* ((node (replace-regexp-in-string + "^[ \t]+" "" + (replace-regexp-in-string + "[ \t\n]+" " " + (or (match-string 5) + (and (not (equal (match-string 4) "")) + (match-string 4)) + (match-string 2))))) + (file (file-name-nondirectory + Info-current-file)) + (hl Info-history-list) + res) + (if (string-match "(\\([^)]+\\))\\([^)]*\\)" node) + (setq file (match-string 1 node) + node (if (equal (match-string 2 node) "") + "Top" + (match-string 2 node)))) + (while hl + (if (and (string-equal node (nth 1 (car hl))) + (string-equal file + (file-name-nondirectory + (nth 0 (car hl))))) + (setq res (car hl) hl nil) + (setq hl (cdr hl)))) + res))) 'info-xref-visited 'info-xref)))) + (when not-fontified-p + (when (memq Info-hide-note-references '(t hide)) + (add-text-properties (match-beginning 3) (match-end 3) + '(invisible t front-sticky nil rear-nonsticky t)) + ;; Unhide the file name of the external reference in parens + (if (match-string 6) + (remove-text-properties (match-beginning 6) (match-end 6) + '(invisible t front-sticky nil rear-nonsticky t))) + ;; Unhide newline because hidden newlines cause too long lines + (save-match-data + (let ((start3 (match-beginning 3))) + (if (string-match "\n[ \t]*" (match-string 3)) + (remove-text-properties (+ start3 (match-beginning 0)) (+ start3 (match-end 0)) + '(invisible t front-sticky nil rear-nonsticky t)))))) + (when (and Info-refill-paragraphs Info-hide-note-references) + (push (set-marker (make-marker) start) + paragraph-markers)))))) + + ;; Refill paragraphs (experimental feature) + (when (and not-fontified-p + Info-refill-paragraphs + paragraph-markers) + (let ((fill-nobreak-invisible t) + (fill-individual-varying-indent nil) + (paragraph-start "\f\\|[ \t]*[-*]\\|[ \t]*$") + (paragraph-separate ".*\\.[ \t]*\n[ \t]\\|[ \t]*[-*]\\|[ \t\f]*$") + (adaptive-fill-mode nil)) + (goto-char (point-max)) + (while paragraph-markers + (let ((m (car paragraph-markers))) + (setq paragraph-markers (cdr paragraph-markers)) + (when (< m (point)) + (goto-char m) + (beginning-of-line) + (let ((beg (point))) + (when (zerop (forward-paragraph)) + (fill-individual-paragraphs beg (point) nil nil) + (goto-char beg)))) + (set-marker m nil))))) + + ;; Fontify menu items + (goto-char (point-min)) + (when (and (or not-fontified-p fontify-visited-p) + (search-forward "\n* Menu:" nil t) + (not (string-match "\\" Info-current-node)) + ;; Don't take time to annotate huge menus + (< (- (point-max) (point)) Info-fontify-maximum-menu-size)) + (let ((n 0) + cont) + (while (re-search-forward + (concat "^\\* +\\(" Info-menu-entry-name-re "\\)\\(:" + Info-node-spec-re "\\([ \t]*\\)\\)") + nil t) + (when not-fontified-p + (setq n (1+ n)) + (if (and (<= n 9) (zerop (% n 3))) ; visual aids to help with 1-9 keys + (put-text-property (match-beginning 0) + (1+ (match-beginning 0)) + 'font-lock-face 'info-menu-5))) + (when not-fontified-p + (add-text-properties + (match-beginning 1) (match-end 1) + (list + 'help-echo (if (match-end 3) + (concat "mouse-2: go to " (match-string 3)) + "mouse-2: go to this node") + 'mouse-face 'highlight))) + (when (or not-fontified-p fontify-visited-p) + (add-text-properties + (match-beginning 1) (match-end 1) + (list + 'font-lock-face + ;; Display visited menu items in a different face + (if (and Info-fontify-visited-nodes + (save-match-data + (let ((node (if (equal (match-string 3) "") + (match-string 1) + (match-string 3))) + (file (file-name-nondirectory Info-current-file)) + (hl Info-history-list) + res) + (if (string-match "(\\([^)]+\\))\\([^)]*\\)" node) + (setq file (match-string 1 node) + node (if (equal (match-string 2 node) "") + "Top" + (match-string 2 node)))) + (while hl + (if (and (string-equal node (nth 1 (car hl))) + (string-equal file + (file-name-nondirectory + (nth 0 (car hl))))) + (setq res (car hl) hl nil) + (setq hl (cdr hl)))) + res))) 'info-xref-visited 'info-xref)))) + (when (and not-fontified-p (memq Info-hide-note-references '(t hide))) + (put-text-property (match-beginning 2) (1- (match-end 6)) + 'invisible t) + ;; Unhide the file name in parens + (if (and (match-end 4) (not (eq (char-after (match-end 4)) ?.))) + (remove-text-properties (match-beginning 4) (match-end 4) + '(invisible t))) + ;; We need a stretchable space like :align-to but with + ;; a minimum value. + (put-text-property (1- (match-end 6)) (match-end 6) 'display + (if (>= 22 (- (match-end 1) + (match-beginning 0))) + '(space :align-to 24) + '(space :width 2))) + (setq cont (looking-at ".")) + (while (and (= (forward-line 1) 0) + (looking-at "\\([ \t]+\\)[^*\n]")) + (put-text-property (match-beginning 1) (1- (match-end 1)) + 'invisible t) + (put-text-property (1- (match-end 1)) (match-end 1) + 'display + (if cont + '(space :align-to 26) + '(space :align-to 24))) + (setq cont t)))))) + + ;; Fontify menu headers + ;; Add the face `info-menu-header' to any header before a menu entry + (goto-char (point-min)) + (when (and not-fontified-p (re-search-forward "^\\* Menu:" nil t)) + (put-text-property (match-beginning 0) (match-end 0) + 'font-lock-face 'info-menu-header) + (while (re-search-forward "\n\n\\([^*\n ].*\\)\n\n?[*]" nil t) + (put-text-property (match-beginning 1) (match-end 1) + 'font-lock-face 'info-menu-header))) + + ;; Fontify http and ftp references + (goto-char (point-min)) + (when not-fontified-p + (while (re-search-forward "[hf]t?tp://[^ \t\n\"`({<>})']+" nil t) + (add-text-properties (match-beginning 0) (match-end 0) + '(font-lock-face info-xref + mouse-face highlight + help-echo "mouse-2: go to this URL")))) + + (set-buffer-modified-p nil)))) ;; When an Info buffer is killed, make sure the associated tags buffer @@ -3200,4 +3715,5 @@ BUFFER is the buffer speedbar is requesting buttons for." (provide 'info) +;;; arch-tag: f2480fe2-2139-40c1-a49b-6314991164ac ;;; info.el ends here diff --git a/lisp/informat.el b/lisp/informat.el index 1b07792fa6..acfb093c06 100644 --- a/lisp/informat.el +++ b/lisp/informat.el @@ -503,4 +503,5 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\"" (provide 'informat) +;;; arch-tag: 581c440e-5be1-4f31-b005-2d5824bbf569 ;;; informat.el ends here diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el index 777bf13c1a..883b53d83e 100644 --- a/lisp/international/ccl.el +++ b/lisp/international/ccl.el @@ -774,7 +774,8 @@ (ccl-check-register right rrr) (ccl-embed-code 'write-expr-register 0 (logior (ash op 3) - (get right 'ccl-register-number)))))) + (get right 'ccl-register-number)) + left)))) (t (error "CCL: Invalid argument: %s" cmd)))) @@ -1544,4 +1545,5 @@ See the documentation of `define-ccl-program' for the detail of CCL program." (provide 'ccl) +;;; arch-tag: 836bcd27-63a1-4a56-b232-1145ecf823fb ;;; ccl.el ends here diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 71260420ad..c437bd1b0b 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -682,6 +682,15 @@ (set-case-syntax c "." tbl) (setq c (1+ c))) ;; Fixme: These aren't all right: + (setq c #x2010) + (while (<= c #x2016) + (set-case-syntax c "_" tbl) + (setq c (1+ c))) + ;; Punctuation syntax for quotation marks (like `) + (while (<= c #x201f) + (set-case-syntax c "." tbl) + (setq c (1+ c))) + ;; Fixme: These aren't all right: (while (<= c #x2027) (set-case-syntax c "_" tbl) (setq c (1+ c))) @@ -738,6 +747,65 @@ ;; Fixme: syntax for symbols &c ) + +(let ((pairs + '("$,1sEsF(B" ; U+2045 U+2046 + "$,1s}s~(B" ; U+207D U+207E + "$,1t-t.(B" ; U+208D U+208E + "$,1{){*(B" ; U+2329 U+232A + "$,1|T|U(B" ; U+23B4 U+23B5 + "$,2&H&I(B" ; U+2768 U+2769 + "$,2&J&K(B" ; U+276A U+276B + "$,2&L&M(B" ; U+276C U+276D + "$,2&P&Q(B" ; U+2770 U+2771 + "$,2&R&S(B" ; U+2772 U+2773 + "$,2&T&U(B" ; U+2774 U+2775 + "$,2'f'g(B" ; U+27E6 U+27E7 + "$,2'h'i(B" ; U+27E8 U+27E9 + "$,2'j'k(B" ; U+27EA U+27EB + "$,2,#,$(B" ; U+2983 U+2984 + "$,2,%,&(B" ; U+2985 U+2986 + "$,2,',((B" ; U+2987 U+2988 + "$,2,),*(B" ; U+2989 U+298A + "$,2,+,,(B" ; U+298B U+298C + "$,2,-,.(B" ; U+298D U+298E + "$,2,/,0(B" ; U+298F U+2990 + "$,2,1,2(B" ; U+2991 U+2992 + "$,2,3,4(B" ; U+2993 U+2994 + "$,2,5,6(B" ; U+2995 U+2996 + "$,2,7,8(B" ; U+2997 U+2998 + "$,2-<-=(B" ; U+29FC U+29FD + "$,2=H=I(B" ; U+3008 U+3009 + "$,2=J=K(B" ; U+300A U+300B + "$,2=L=M(B" ; U+300C U+300D + "$,2=N=O(B" ; U+300E U+300F + "$,2=P=Q(B" ; U+3010 U+3011 + "$,2=T=U(B" ; U+3014 U+3015 + "$,2=V=W(B" ; U+3016 U+3017 + "$,2=X=Y(B" ; U+3018 U+3019 + "$,2=Z=[(B" ; U+301A U+301B + "$,3m~m(B" ; U+FD3E U+FD3F + "$,3pUpV(B" ; U+FE35 U+FE36 + "$,3pWpX(B" ; U+FE37 U+FE38 + "$,3pYpZ(B" ; U+FE39 U+FE3A + "$,3p[p\(B" ; U+FE3B U+FE3C + "$,3p]p^(B" ; U+FE3D U+FE3E + "$,3p_p`(B" ; U+FE3F U+FE40 + "$,3papb(B" ; U+FE41 U+FE42 + "$,3pcpd(B" ; U+FE43 U+FE44 + "$,3pypz(B" ; U+FE59 U+FE5A + "$,3p{p|(B" ; U+FE5B U+FE5C + "$,3p}p~(B" ; U+FE5D U+FE5E + "$,3rhri(B" ; U+FF08 U+FF09 + "$,3s;s=(B" ; U+FF3B U+FF3D + "$,3s[s](B" ; U+FF5B U+FF5D + "$,3s_s`(B" ; U+FF5F U+FF60 + "$,3sbsc(B" ; U+FF62 U+FF63 + ))) + (dolist (elt pairs) + (modify-syntax-entry (aref elt 0) (string ?\( (aref elt 1))) + (modify-syntax-entry (aref elt 1) (string ?\) (aref elt 0))))) + ;; For each character set, put the information of the most proper ;; coding system to encode it by `preferred-coding-system' property. @@ -1008,4 +1076,5 @@ ;;; coding: utf-8-emacs ;;; End: +;;; arch-tag: 85889c35-9f4d-4912-9bf5-82de31b0d42d ;;; characters.el ends here diff --git a/lisp/international/codepage.el b/lisp/international/codepage.el index e11b26e860..e4880bd56a 100644 --- a/lisp/international/codepage.el +++ b/lisp/international/codepage.el @@ -141,4 +141,5 @@ (provide 'codepage) +;;; arch-tag: 80328de8-b94e-4386-be26-5876105731f0 ;;; codepage.el ends here diff --git a/lisp/international/encoded-kb.el b/lisp/international/encoded-kb.el index a6ceb3f2d0..b62effd42f 100644 --- a/lisp/international/encoded-kb.el +++ b/lisp/international/encoded-kb.el @@ -425,4 +425,5 @@ as a multilingual text encoded in a coding system set by (provide 'encoded-kb) +;;; arch-tag: 76f0f9b3-65e7-45c3-b692-59509a87ad44 ;;; encoded-kb.el ends here diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 81fcaa9813..a751579c05 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -745,4 +745,5 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") ;; (provide 'fontset) +;;; arch-tag: bb53e629-0234-403c-950e-551e61554849 ;;; fontset.el ends here diff --git a/lisp/international/isearch-x.el b/lisp/international/isearch-x.el index 64df952de6..60736277b9 100644 --- a/lisp/international/isearch-x.el +++ b/lisp/international/isearch-x.el @@ -130,4 +130,5 @@ (isearch-update))) (isearch-process-search-char last-char))) +;;; arch-tag: 1a90a6cf-2cb2-477a-814a-9ff895852822 ;;; isearch-x.el ends here diff --git a/lisp/international/iso-acc.el b/lisp/international/iso-acc.el index 840a564800..971d1d128e 100644 --- a/lisp/international/iso-acc.el +++ b/lisp/international/iso-acc.el @@ -475,4 +475,5 @@ Noninteractively, this operates on text from START to END." (add-hook 'minibuffer-setup-hook 'iso-acc-minibuf-setup) +;;; arch-tag: 149ff409-7c3e-4574-9b5d-ac038939c0a6 ;;; iso-acc.el ends here diff --git a/lisp/international/iso-ascii.el b/lisp/international/iso-ascii.el index 86f3d2b434..3bffb1795f 100644 --- a/lisp/international/iso-ascii.el +++ b/lisp/international/iso-ascii.el @@ -175,4 +175,5 @@ (provide 'iso-ascii) +;;; arch-tag: 687edf0d-f792-471e-b50e-be805938359a ;;; iso-ascii.el ends here diff --git a/lisp/international/iso-cvt.el b/lisp/international/iso-cvt.el index 6c8a31a8fa..b0dffc40f5 100644 --- a/lisp/international/iso-cvt.el +++ b/lisp/international/iso-cvt.el @@ -892,4 +892,5 @@ Optional arg BUFFER is ignored (for use in `format-alist')." (provide 'iso-cvt) +;;; arch-tag: 64ae843f-ed0e-43e1-ba50-ffd581b90840 ;;; iso-cvt.el ends here diff --git a/lisp/international/iso-insert.el b/lisp/international/iso-insert.el index 9dcfb123b8..e181d16588 100644 --- a/lisp/international/iso-insert.el +++ b/lisp/international/iso-insert.el @@ -628,4 +628,5 @@ (provide 'iso-insert) +;;; arch-tag: eb5f97bd-a034-4851-92ff-ab1f1bf92814 ;;; iso-insert.el ends here diff --git a/lisp/international/iso-swed.el b/lisp/international/iso-swed.el index 156e345269..60cc7fd632 100644 --- a/lisp/international/iso-swed.el +++ b/lisp/international/iso-swed.el @@ -148,4 +148,5 @@ (provide 'iso-swed) +;;; arch-tag: 6b3dc269-660c-44b6-a25f-680b921eaf2c ;;; iso-swed.el ends here diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el index ea5f9ff53a..a071b14b3d 100644 --- a/lisp/international/iso-transl.el +++ b/lisp/international/iso-transl.el @@ -292,4 +292,5 @@ sequence VECTOR. (VECTOR is normally one character long.)") (provide 'iso-transl) +;;; arch-tag: 034cfedf-7ebd-461d-bcd0-5c79e6dc0b61 ;;; iso-transl.el ends here diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el index 72d98d9386..682a2a8f2b 100644 --- a/lisp/international/ja-dic-cnv.el +++ b/lisp/international/ja-dic-cnv.el @@ -569,4 +569,5 @@ To get complete usage, invoke: ;; coding: iso-2022-7bit ;; End: +;;; arch-tag: dec06fb0-8118-45b1-80d7-dc360b6fd3b2 ;;; ja-dic-cnv.el ends here diff --git a/lisp/international/ja-dic-utl.el b/lisp/international/ja-dic-utl.el index 30b7de1838..07d9e1ff76 100644 --- a/lisp/international/ja-dic-utl.el +++ b/lisp/international/ja-dic-utl.el @@ -222,4 +222,5 @@ LEIM is available from the same ftp directory as Emacs.")) ;; coding: iso-2022-7bit ;; End: +;;; arch-tag: df2218fa-469c-40f6-bace-7f89a053f9c0 ;;; ja-dic-utl.el ends here diff --git a/lisp/international/kinsoku.el b/lisp/international/kinsoku.el index b551161a6f..28d6409d46 100644 --- a/lisp/international/kinsoku.el +++ b/lisp/international/kinsoku.el @@ -121,11 +121,17 @@ The value 0 means there's no limitation.") ;; Try to resolve `kinsoku' restriction by making the current line longer. (defun kinsoku-longer () - (let ((pos-and-column (save-excursion - (forward-char 1) - (while (aref (char-category-set (following-char)) ?>) - (forward-char 1)) - (cons (point) (current-column))))) + (let ((pos-and-column + (save-excursion + (forward-char 1) + (while (and (not (eobp)) + (or (aref (char-category-set (following-char)) ?>) + ;; protect non-kinsoku words + (not (or (eq (preceding-char) ? ) + (aref (char-category-set (preceding-char)) + ?|))))) + (forward-char 1)) + (cons (point) (current-column))))) (if (or (<= kinsoku-limit 0) (< (cdr pos-and-column) (+ (current-fill-column) kinsoku-limit))) (goto-char (car pos-and-column))))) @@ -135,9 +141,14 @@ The value 0 means there's no limitation.") (defun kinsoku-shorter (linebeg) (let ((pos (save-excursion (forward-char -1) - (while (and (< linebeg (point)) - (or (aref (char-category-set (preceding-char)) ?<) - (aref (char-category-set (following-char)) ?>))) + (while (and + (< linebeg (point)) + (or (aref (char-category-set (preceding-char)) ?<) + (aref (char-category-set (following-char)) ?>) + ;; protect non-kinsoku words + (not (or (eq (preceding-char) ? ) + (aref (char-category-set (preceding-char)) + ?|))))) (forward-char -1)) (point)))) (if (< linebeg pos) @@ -170,4 +181,5 @@ the context of text formatting." (aref (char-category-set (preceding-char)) ?<)) (kinsoku-shorter linebeg)))) +;;; arch-tag: e6b036bc-9e5b-4e9f-a22c-4ed04e37777e ;;; kinsoku.el ends here diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el index a25cab5f4d..972bbbfddd 100644 --- a/lisp/international/kkc.el +++ b/lisp/international/kkc.el @@ -656,4 +656,5 @@ and change the current conversion to the last one in the group." ;; (provide 'kkc) +;;; arch-tag: 3cbfd56e-74e6-4f60-bb46-ba7c2d366fbf ;;; kkc.el ends here diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el index 1ab79c4f1a..a0be6db3d2 100644 --- a/lisp/international/latin1-disp.el +++ b/lisp/international/latin1-disp.el @@ -84,7 +84,7 @@ This option also treats some characters in the `mule-unicode-...' charsets if you don't have a Unicode font with which to display them. Setting this variable directly does not take effect; -use either M-x customize of the function `latin1-display'." +use either \\[customize] or the function `latin1-display'." :group 'latin1-display :type 'boolean :require 'latin1-disp @@ -106,7 +106,7 @@ a Unicode font with which to display them." (if sets (progn (mapc #'latin1-display-setup sets) - (unless (latin1-char-displayable-p + (unless (char-displayable-p (make-char 'mule-unicode-0100-24ff 32 33)) ;; It doesn't look as though we have a Unicode font. (map-char-table @@ -133,6 +133,7 @@ a Unicode font with which to display them." (?\$,1rt(B "--") ;; EM DASH (?\$,1ub(B "TM") ;; TRADE MARK SIGN (?\$,1s:(B ">") ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + (?$,1s"(B ",A7(B") ))) (setq latin1-display t)) (mapc #'latin1-display-reset latin1-display-sets) @@ -220,47 +221,11 @@ character set: `latin-2', `hebrew' etc." (setq language 'cyrillic-iso)) (let* ((info (get-language-info language 'charset)) (char (and info (make-char (car (remq 'ascii info)) ?\ )))) - (and char (latin1-char-displayable-p char)))) + (and char (char-displayable-p char)))) -;; This should be moved into mule-utils or somewhere after 21.1. -(defun latin1-char-displayable-p (char) - "Return non-nil if we should be able to display CHAR. -On a multi-font display, the test is only whether there is an -appropriate font from the selected frame's fontset to display CHAR's -charset in general. Since fonts may be specified on a per-character -basis, this may not be accurate." - (cond ((< char 256) - ;; Single byte characters are always displayable. - t) - ((display-multi-font-p) - ;; On a window system, a character is displayable if we have - ;; a font for that character in the default face of the - ;; currently selected frame. - (let ((fontset (frame-parameter (selected-frame) 'font)) - font-pattern) - (if (query-fontset fontset) - (setq font-pattern (fontset-font fontset char))) - (or font-pattern - (setq font-pattern (fontset-font "fontset-default" char))) - (if font-pattern - (progn - ;; Now FONT-PATTERN is a string or a cons of family - ;; field pattern and registry field pattern. - (or (stringp font-pattern) - (setq font-pattern (concat "-" - (or (car font-pattern) "*") - "-*-" - (cdr font-pattern)))) - (x-list-fonts font-pattern 'default (selected-frame) 1))))) - (t - (let ((coding (terminal-coding-system))) - (if coding - (let ((safe-chars (coding-system-get coding 'safe-chars)) - (safe-charsets (coding-system-get coding 'safe-charsets))) - (or (and safe-chars - (aref safe-chars char)) - (and safe-charsets - (memq (char-charset char) safe-charsets))))))))) +;; Backwards compatibility. +(defalias 'latin1-char-displayable-p 'char-displayable-p) +(make-obsolete 'latin1-char-displayable-p 'char-displayable-p "21.5") (defun latin1-display-setup (set &optional force) "Set up Latin-1 display for characters in the given SET. @@ -269,12 +234,11 @@ whether a font for SET is available and don't set the display if it is. If FORCE is non-nil, set up the display regardless." (cond ((eq set 'latin-2) - (when (or force - (not (latin1-display-check-font set))) - (latin1-display-identities set) - (mapc - (lambda (l) - (apply 'latin1-display-char l)) + (latin1-display-identities set) + (mapc + (lambda (l) + (or (char-displayable-p (car l)) + (apply 'latin1-display-char l))) '((?,BF(B "'C" "C'") (?,BP(B "'D" "/D") (?,B&(B "'S" "S'") @@ -335,15 +299,14 @@ is. If FORCE is non-nil, set up the display regardless." (?,Bk(B "\"e") (?,B=(B "''" "'") (?,B7(B "'<") ; Lynx's rendering of caron - )))) + ))) ((eq set 'latin-3) - (when (or force - (not (latin1-display-check-font set))) - (latin1-display-identities set) - (mapc - (lambda (l) - (apply 'latin1-display-char l)) + (latin1-display-identities set) + (mapc + (lambda (l) + (or (char-displayable-p (car l)) + (apply 'latin1-display-char l))) '((?,C!(B "/H") (?,C"(B "~`" "'(") (?,C&(B "^H" "H^") @@ -371,15 +334,14 @@ is. If FORCE is non-nil, set up the display regardless." (?,Cx(B "^g" "g^") (?,C}(B "~u" "u(") (?,C~(B "^s" "s^") - (?,C(B "/." "^."))))) + (?,C(B "/." "^.")))) ((eq set 'latin-4) - (when (or force - (not (latin1-display-check-font set))) - (latin1-display-identities set) - (mapc - (lambda (l) - (apply 'latin1-display-char l)) + (latin1-display-identities set) + (mapc + (lambda (l) + (or (char-displayable-p (car l)) + (apply 'latin1-display-char l))) '((?,D!(B "A," "A;") (?,D"(B "k/" "kk") (?,D#(B "R," ",R") @@ -428,15 +390,14 @@ is. If FORCE is non-nil, set up the display regardless." (?,Dy(B "u," "u;") (?,D}(B "u~" "~u") (?,D~(B "u-") - (?,D(B "^."))))) + (?,D(B "^.")))) ((eq set 'latin-5) - (when (or force - (not (latin1-display-check-font set))) - (latin1-display-identities set) - (mapc - (lambda (l) - (apply 'latin1-display-char l)) + (latin1-display-identities set) + (mapc + (lambda (l) + (or (char-displayable-p (car l)) + (apply 'latin1-display-char l))) '((?,Mp(B "~g" "g(") (?,MP(B "~G" "G(") (?,M](B ".I" "I^.") @@ -445,15 +406,14 @@ is. If FORCE is non-nil, set up the display regardless." (?,Mj(B "^e" "e<") ; from latin-post (?,Ml(B ".e" "e^.") (?,Mo(B "\"i" "i-") ; from latin-post - (?,M}(B ".i" "i."))))) + (?,M}(B ".i" "i.")))) ((eq set 'latin-8) - (when (or force - (not (latin1-display-check-font set))) - (latin1-display-identities set) - (mapc - (lambda (l) - (apply 'latin1-display-char l)) + (latin1-display-identities set) + (mapc + (lambda (l) + (or (char-displayable-p (car l)) + (apply 'latin1-display-char l))) '((?,_!(B ".B" "B`") (?,_"(B ".b" "b`") (?,_%(B ".c" "c`") @@ -484,15 +444,14 @@ is. If FORCE is non-nil, set up the display regardless." (?,_W(B ".T" "T`") (?,_~(B "^y" "y^") (?,_^(B "^Y" "Y^") - (?,_/(B "\"Y"))))) + (?,_/(B "\"Y")))) ((eq set 'latin-9) - (when (or force - (not (latin1-display-check-font set))) - (latin1-display-identities set) - (mapc - (lambda (l) - (apply 'latin1-display-char l)) + (latin1-display-identities set) + (mapc + (lambda (l) + (or (char-displayable-p (car l)) + (apply 'latin1-display-char l))) '((?,b((B "~s" "s<") (?,b&(B "~S" "S<") (?,b$(B "Euro" "E=") @@ -500,14 +459,13 @@ is. If FORCE is non-nil, set up the display regardless." (?,b4(B "~Z" "Z<") (?,b>(B "\"Y") (?,b=(B "oe") - (?,b<(B "OE"))))) + (?,b<(B "OE")))) ((eq set 'greek) - (when (or force - (not (latin1-display-check-font set))) - (mapc - (lambda (l) - (apply 'latin1-display-char l)) + (mapc + (lambda (l) + (or (char-displayable-p (car l)) + (apply 'latin1-display-char l))) '((?,F!(B "9'") (?,F"(B "'9") (?,F/(B "-M") @@ -566,9 +524,10 @@ is. If FORCE is non-nil, set up the display regardless." (?,F|(B "'o") (?,F}(B "'u") (?,F~(B "'w"))) - (mapc - (lambda (l) - (aset standard-display-table (car l) (string-to-vector (cadr l)))) + (mapc + (lambda (l) + (or (char-displayable-p (car l)) + (aset standard-display-table (car l) (string-to-vector (cadr l))))) '((?,FA(B "A") (?,FB(B "B") (?,FE(B "E") @@ -583,23 +542,22 @@ is. If FORCE is non-nil, set up the display regardless." (?,FT(B "T") (?,FU(B "Y") (?,FW(B "X") - (?,Fo(B "o"))))) + (?,Fo(B "o")))) ((eq set 'hebrew) - (when (or force - (not (latin1-display-check-font set))) - ;; Don't start with identities, since we don't have definitions - ;; for a lot of Hebrew in internal.el. (Intlfonts is also - ;; missing some glyphs.) - (let ((i 34)) - (while (<= i 62) - (aset standard-display-table - (make-char 'hebrew-iso8859-8 i) - (vector (make-char 'latin-iso8859-1 i))) - (setq i (1+ i)))) - (mapc - (lambda (l) - (aset standard-display-table (car l) (string-to-vector (cadr l)))) + ;; Don't start with identities, since we don't have definitions + ;; for a lot of Hebrew in internal.el. (Intlfonts is also + ;; missing some glyphs.) + (let ((i 34)) + (while (<= i 62) + (aset standard-display-table + (make-char 'hebrew-iso8859-8 i) + (vector (make-char 'latin-iso8859-1 i))) + (setq i (1+ i)))) + (mapc + (lambda (l) + (or (char-displayable-p (car l)) + (aset standard-display-table (car l) (string-to-vector (cadr l))))) '((?,H_(B "=2") (?,H`(B "A+") (?,Ha(B "B+") @@ -627,19 +585,21 @@ is. If FORCE is non-nil, set up the display regardless." (?,Hw(B "Q+") (?,Hx(B "R+") (?,Hy(B "Sh") - (?,Hz(B "T+"))))) + (?,Hz(B "T+")))) ;; Arabic probably isn't so useful in the absence of Arabic ;; language support... ((eq set 'arabic) (setq set 'arabic) - (when (or force - (not (latin1-display-check-font set))) - (aset standard-display-table ?,G (B ",A (B") - (aset standard-display-table ?,G$(B ",A$(B") - (aset standard-display-table ?,G-(B ",A-(B") - (mapc (lambda (l) - (apply 'latin1-display-char l)) + (or (char-displayable-p ?,G (B) + (aset standard-display-table ?,G (B ",A (B")) + (or (char-displayable-p ?,G$(B) + (aset standard-display-table ?,G$(B ",A$(B")) + (or (char-displayable-p ?,G-(B) + (aset standard-display-table ?,G-(B ",A-(B")) + (mapc (lambda (l) + (or (char-displayable-p (car l)) + (apply 'latin1-display-char l))) '((?,G,(B ",+") (?,G;(B ";+") (?,G?(B "?+") @@ -687,15 +647,14 @@ is. If FORCE is non-nil, set up the display regardless." (?,Go(B "'+") (?,Gp(B "1+") (?,Gq(B "3+") - (?,Gr(B "0+"))))) + (?,Gr(B "0+")))) ((eq set 'cyrillic) (setq set 'cyrillic-iso) - (when (or force - (not (latin1-display-check-font set))) - (mapc - (lambda (l) - (apply 'latin1-display-char l)) + (mapc + (lambda (l) + (or (char-displayable-p (car l)) + (apply 'latin1-display-char l))) '((?,L"(B "Dj") (?,L#(B "Gj") (?,L$(B "IE") @@ -762,9 +721,10 @@ is. If FORCE is non-nil, set up the display regardless." (?,L|(B "kj") (?,L~(B "v%") (?,L(B "dzh"))) - (mapc - (lambda (l) - (aset standard-display-table (car l) (string-to-vector (cadr l)))) + (mapc + (lambda (l) + (or (char-displayable-p (car l)) + (aset standard-display-table (car l) (string-to-vector (cadr l))))) '((?,L!(B ",AK(B") (?,L%(B "S") (?,L&(B "I") @@ -793,7 +753,7 @@ is. If FORCE is non-nil, set up the display regardless." (?,Lu(B "s") (?,Lv(B "i") (?,Lw(B ",Ao(B") - (?,Lx(B "j"))))) + (?,Lx(B "j")))) (t (error "Unsupported character set: %S" set))) @@ -802,11 +762,11 @@ is. If FORCE is non-nil, set up the display regardless." ;;;###autoload (defcustom latin1-display-ucs-per-lynx nil "Set up Latin-1/ASCII display for Unicode characters. -This uses the transliterations of the Lynx browser. The display is't +This uses the transliterations of the Lynx browser. The display isn't changed if the display can render Unicode characters. Setting this variable directly does not take effect; -use either M-x customize of the function `latin1-display'." +use either \\[customize] or the function `latin1-display'." :group 'latin1-display :type 'boolean :require 'latin1-disp @@ -825,7 +785,7 @@ turn it off and display Unicode characters literally. The display is't changed if the display can render Unicode characters." (interactive "p") (if (> arg 0) - (unless (latin1-char-displayable-p + (unless (char-displayable-p (make-char 'mule-unicode-0100-24ff 32 33)) ;; It doesn't look as though we have a Unicode font. (let ((latin1-display-format "%s")) @@ -3244,8 +3204,8 @@ is't changed if the display can render Unicode characters." (?\$,3sc(B "\"") (?\$,3sd(B ",") ;; Not from Lynx - (?$,3r_(B . "") - (?$,3u=(B . "?"))))) + (?$,3r_(B "") + (?$,3u=(B "?"))))) (aset standard-display-table (make-char 'mule-unicode-0100-24ff) nil) (aset standard-display-table @@ -3257,4 +3217,5 @@ is't changed if the display can render Unicode characters." (provide 'latin1-disp) +;;; arch-tag: 68b2872e-d667-4f48-8e2f-ec2ba2d29406 ;;; latin1-disp.el ends here diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 3178ec3b2b..cd60e266b4 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1,4 +1,4 @@ -;;; mule-cmds.el --- commands for mulitilingual environment +;;; mule-cmds.el --- commands for mulitilingual environment -*-coding: iso-2022-7bit -*- ;; Copyright (C) 1995, 2003 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. ;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. @@ -293,7 +293,7 @@ wrong, use this command again to toggle back to the right mode." (not (eq cmd 'universal-argument-other-key))) (let ((current-prefix-arg prefix-arg) ;; Have to bind `last-command-char' here so that - ;; `digit-argument', for isntance, can compute the + ;; `digit-argument', for instance, can compute the ;; prefix arg. (last-command-char (aref keyseq 0))) (call-interactively cmd))) @@ -326,6 +326,11 @@ This also sets the following values: o default value for the command `set-keyboard-coding-system'." (check-coding-system coding-system) (setq-default buffer-file-coding-system coding-system) + (if (fboundp 'ucs-set-table-for-input) + (dolist (buffer (buffer-list)) + (or (local-variable-p 'buffer-file-coding-system buffer) + (ucs-set-table-for-input buffer)))) + (if default-enable-multibyte-characters (setq default-file-name-coding-system coding-system)) ;; If coding-system is nil, honor that on MS-DOS as well, so @@ -870,7 +875,7 @@ one of the following safe coding systems, or edit the buffer:\n") (insert "\n") (fill-region-as-paragraph pos (point))) (insert "Or specify any other coding system -on your risk of losing the problematic characters.\n"))) +at the risk of losing the problematic characters.\n"))) ;; Read a coding system. (setq default-coding-system (or (car safe) (car codings))) @@ -902,13 +907,33 @@ on your risk of losing the problematic characters.\n"))) (goto-char (point-min)) (set-auto-coding (or file buffer-file-name "") (buffer-size)))))) - (if (and auto-cs coding-system + ;; Merge coding-system and auto-cs as far as possible. + (if (not coding-system) + (setq coding-system auto-cs) + (if (not auto-cs) + (setq auto-cs coding-system) + (let ((eol-type-1 (coding-system-eol-type coding-system)) + (eol-type-2 (coding-system-eol-type auto-cs))) + (if (eq (coding-system-base coding-system) 'undecided) + (setq coding-system (coding-system-change-text-conversion + coding-system auto-cs)) + (if (eq (coding-system-base auto-cs) 'undecided) + (setq auto-cs (coding-system-change-text-conversion + auto-cs coding-system)))) + (if (vectorp eol-type-1) + (or (vectorp eol-type-2) + (setq coding-system (coding-system-change-eol-conversion + coding-system eol-type-2))) + (if (vectorp eol-type-2) + (setq auto-cs (coding-system-change-eol-conversion + auto-cs eol-type-1))))))) + + (if (and auto-cs ;; Don't barf if writing a compressed file, say. ;; This check perhaps isn't ideal, but is probably ;; the best thing to do. (not (auto-coding-alist-lookup (or file buffer-file-name ""))) - (not (coding-system-equal (coding-system-base coding-system) - (coding-system-base auto-cs)))) + (not (coding-system-equal coding-system auto-cs))) (unless (yes-or-no-p (format "Selected encoding %s disagrees with \ %s specified by file contents. Really save (else edit coding cookies \ @@ -981,6 +1006,12 @@ Meaningful values for KEY include environment. features value is a list of features requested in this language environment. + ctext-non-standard-encodings + value is a list of non-standard encoding + names used in extended segments of CTEXT. + See the variable + `ctext-non-standard-encodings' for more + detail. The following keys take effect only when multibyte characters are globally disabled, i.e. the value of `default-enable-multibyte-characters' @@ -1720,6 +1751,15 @@ specifies the character set for the major languages of Western Europe." (while required-features (require (car required-features)) (setq required-features (cdr required-features)))) + + ;; Don't invoke fontset-related functions if fontsets aren't + ;; supported in this build of Emacs. + (when (fboundp 'fontset-list) + (let ((overriding-fontspec (get-language-info language-name + 'overriding-fontspec))) + (if overriding-fontspec + (set-overriding-fontspec-internal overriding-fontspec)))) + (let ((func (get-language-info language-name 'setup-function))) (if (functionp func) (funcall func))) @@ -1801,7 +1841,7 @@ Setting this variable directly does not take effect. See (aset standard-display-table 160 [32]) ;; With luck, non-Latin-1 fonts are more recent and so don't ;; have this bug. - (aset standard-display-table 2208 [32]) ; Latin-1 NBSP + (aset standard-display-table (make-char 'latin-iso8859-1 160) [32]) ;; Most Windows programs send out apostrophes as \222. Most X fonts ;; don't contain a character at that position. Map it to the ASCII ;; apostrophe. [This is actually RIGHT SINGLE QUOTATION MARK, @@ -1809,7 +1849,23 @@ Setting this variable directly does not take effect. See ;; fonts probably have the appropriate glyph at this position, ;; so they could use standard-display-8bit. It's better to use a ;; proper windows-1252 coding system. --fx] - (aset standard-display-table 146 [39])))) + (aset standard-display-table 146 [39]) + ;; XFree86 4 has changed most of the fonts from their designed + ;; versions such that `' no longer appears as balanced quotes. + ;; Assume it has iso10646 fonts installed, so we can display + ;; balanced quotes. + (when (and (eq window-system 'x) + (string= "The XFree86 Project, Inc" (x-server-vendor)) + (> (aref (number-to-string (nth 2 (x-server-version))) 0) + ?3)) + ;; We suppress these setting for the moment because the + ;; above assumption is wrong. + ;; (aset standard-display-table ?' [?,F"(B]) + ;; (aset standard-display-table ?` [?,F!(B]) + ;; The fonts don't have the relevant bug. + (aset standard-display-table 160 nil) + (aset standard-display-table (make-char 'latin-iso8859-1 160) + nil))))) (defun set-language-environment-coding-systems (language-name &optional eol-type) @@ -1834,7 +1890,7 @@ of `buffer-file-coding-system' set by this function." (put 'describe-specified-language-support 'apropos-inhibit t) -;; Print a language specific information such as input methods, +;; Print language-specific information such as input methods, ;; charsets, and coding systems. This function is intended to be ;; called from the menu: ;; [menu-bar mule describe-language-environment LANGUAGE] @@ -1958,6 +2014,13 @@ of `buffer-file-coding-system' set by this function." ;; http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1/en_listp1.html. ;; CODESET and MODIFIER are implementation-dependent. + ;; jasonr comments: MS Windows uses three letter codes for + ;; languages instead of the two letter ISO codes that POSIX + ;; uses. In most cases the first two letters are the same, so + ;; most of the regexps in locale-language-names work. Japanese + ;; and Chinese are exceptions, which are listed in the + ;; non-standard section at the bottom of locale-language-names. + ; aa Afar ; ab Abkhazian ("af" . "Latin-1") ; Afrikaans @@ -2151,14 +2214,13 @@ If the language name is nil, there is no corresponding language environment.") (".*8859[-_]?9\\>" . "Latin-5") (".*8859[-_]?14\\>" . "Latin-8") (".*8859[-_]?15\\>" . "Latin-9") - (".*utf\\(-?8\\)\\>" . "UTF-8") - ;; @euro actually indicates the monetary component, but it - ;; probably implies a Latin-9 codeset component. - ;; utf-8@euro exists, so put this last. + (".*utf\\(?:-?8\\)?\\>" . "UTF-8") + ;; utf-8@euro exists, so put this last. (@euro really specifies + ;; the currency, rather than the charset.) (".*@euro\\>" . "Latin-9"))) "List of pairs of locale regexps and charset language names. The first element whose locale regexp matches the start of a downcased locale -specifies the language name whose charsets corresponds to that locale. +specifies the language name whose charset corresponds to that locale. This language name is used if its charsets disagree with the charsets of the language name that would otherwise be used for this locale.") @@ -2193,13 +2255,39 @@ names. E.g. `ISO_8859-1' and `iso88591' both match `iso-8859-1'." (setq charset2 (replace-regexp-in-string "[-_]" "" charset2)) (eq t (compare-strings charset1 nil nil charset2 nil nil t))) +(defvar locale-charset-alist nil + "Coding system alist keyed on locale-style charset name. +Used by `locale-charset-to-coding-system'.") + +(defun locale-charset-to-coding-system (charset) + "Find coding system corresponding to CHARSET. +CHARSET is any sort of non-Emacs charset name, such as might be used +in a locale codeset, or elsewhere. It is matched to a coding system +first by case-insensitive lookup in `locale-charset-alist'. Then +matches are looked for in the coding system list, treating case and +the characters `-' and `_' as insignificant. The coding system base +is returned. Thus, for instance, if charset \"ISO8859-2\", +`iso-latin-2' is returned." + (or (car (assoc-ignore-case charset locale-charset-alist)) + (let ((cs coding-system-alist) + c) + (while (and (not c) cs) + (if (locale-charset-match-p charset (caar cs)) + (setq c (intern (caar cs))) + (pop cs))) + (if c (coding-system-base c))))) + +;; Fixme: This ought to deal with the territory part of the locale +;; too, for setting things such as calendar holidays, ps-print paper +;; size, spelling dictionary. + (defun set-locale-environment (&optional locale-name) "Set up multi-lingual environment for using LOCALE-NAME. This sets the language environment, the coding system priority, the default input method and sometimes other things. LOCALE-NAME should be a string which is the name of a locale supported -by the system; often it is of the form xx_XX.CODE, where xx is a +by the system. Often it is of the form xx_XX.CODE, where xx is a language, XX is a country, and CODE specifies a character set and coding system. For example, the locale name \"ja_JP.EUC\" might name a locale for Japanese in Japan using the `japanese-iso-8bit' @@ -2223,7 +2311,7 @@ See also `locale-charset-language-names', `locale-language-names', (setq locale-translation-file-name (let ((files '("/usr/lib/X11/locale/locale.alias" ; e.g. X11R6.4 - "/usr/X11R6/lib/X11/locale/locale.alias" ; e.g. RedHat 4.2 + "/usr/X11R6/lib/X11/locale/locale.alias" ; XFree86, e.g. RedHat 4.2 "/usr/openwin/lib/locale/locale.alias" ; e.g. Solaris 2.6 ;; ;; The following name appears after the X-related names above, @@ -2271,7 +2359,11 @@ See also `locale-charset-language-names', `locale-language-names', (charset-language-name (locale-name-match locale locale-charset-language-names)) (coding-system - (locale-name-match locale locale-preferred-coding-systems))) + (or (locale-name-match locale locale-preferred-coding-systems) + (when locale + (if (string-match "\\.\\([^@]+\\)" locale) + (locale-charset-to-coding-system + (match-string 1 locale))))))) ;; Give preference to charset-language-name over language-name. (if (and charset-language-name @@ -2393,7 +2485,7 @@ It can be retrieved with `(get-char-code-property CHAR PROPNAME)'." (if (and coding-system (eq (coding-system-type coding-system) 'iso-2022)) ;; Try to get a pretty description for ISO 2022 escape sequences. (function (lambda (x) (or (cdr (assq x iso-2022-control-alist)) - (format "%02X" x)))) + (format "0x%02X" x)))) (function (lambda (x) (format "0x%02X" x)))) str " ")) @@ -2439,4 +2531,5 @@ If CODING-SYSTEM can't safely encode CHAR, return nil." (defvar nonascii-translation-table nil "This variable is obsolete.") +;;; arch-tag: b382c432-4b36-460e-bf4c-05efd0bb18dc ;;; mule-cmds.el ends here diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index 12e3231bf4..2e516c08aa 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -1387,10 +1387,17 @@ Like `compound-text', but does not produce escape sequences for compositions." (define-coding-system 'compound-text-with-extensions "Compound text encoding with ICCCM Extended Segment extensions. +See the variable `ctext-non-standard-encodings-alist' for the +detail about how extended segments are handled. + This coding system should be used only for X selections. It is inappropriate for decoding and encoding files, process I/O, etc." - :coding-type 'raw-text + :coding-type 'iso-2022 :mnemonic ?x + :charset-list 'iso-2022 + :designation [(ascii 94) (latin-iso8859-1 katakana-jisx0201 96) nil nil] + :flags '(ascii-at-eol ascii-at-cntl + designation locking-shift single-shift) :post-read-conversion 'ctext-post-read-conversion :pre-write-conversion 'ctext-pre-write-conversion) @@ -1491,4 +1498,5 @@ for decoding and encoding files, process I/O, etc." ;; no-byte-compile: t ;; End: +;;; arch-tag: 7d5fed55-b6df-42f6-8d3d-0011190551f5 ;;; mule-conf.el ends here diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el index 0ba9bf5360..c3ea76c871 100644 --- a/lisp/international/mule-util.el +++ b/lisp/international/mule-util.el @@ -2,12 +2,11 @@ ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. -;; Copyright (C) 2002 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2002 Free Software Foundation, Inc. ;; Copyright (C) 2003 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H13PRO009 - ;; Keywords: mule, multilingual ;; This file is part of GNU Emacs. @@ -186,18 +185,18 @@ defaults to \"...\"." ;; (("foobarbaz" 6 nil nil "...") . "foo...") ;; (("foobarbaz" 7 2 nil "...") . "ob...") ;; (("foobarbaz" 9 3 nil "...") . "barbaz") -;; (("$B$3(Bh$B$s(Be$B$K(Bl$B$A(Bl$B$O(Bo" 15 1 ? t) . " h$B$s(Be$B$K(Bl$B$A(Bl$B$O(Bo") -;; (("$B$3(Bh$B$s(Be$B$K(Bl$B$A(Bl$B$O(Bo" 14 1 ? t) . " h$B$s(Be$B$K(Bl$B$A(B...") -;; (("x" 3 nil nil "$(0GnM$(B") . "x") -;; (("$AVP(B" 2 nil nil "$(0GnM$(B") . "$AVP(B") -;; (("$AVP(B" 1 nil ?x "$(0GnM$(B") . "x") ;; XEmacs error -;; (("$AVPND(B" 3 nil ? "$(0GnM$(B") . "$AVP(B ") ;; XEmacs error -;; (("foobarbaz" 4 nil nil "$(0GnM$(B") . "$(0GnM$(B") -;; (("foobarbaz" 5 nil nil "$(0GnM$(B") . "f$(0GnM$(B") -;; (("foobarbaz" 6 nil nil "$(0GnM$(B") . "fo$(0GnM$(B") -;; (("foobarbaz" 8 3 nil "$(0GnM$(B") . "b$(0GnM$(B") -;; (("$B$3(Bh$B$s(Be$B$K(Bl$B$A(Bl$B$O(Bo" 14 4 ?x "$BF|K\8l(B") . "xe$B$KF|K\8l(B") -;; (("$B$3(Bh$B$s(Be$B$K(Bl$B$A(Bl$B$O(Bo" 13 4 ?x "$BF|K\8l(B") . "xex$BF|K\8l(B") +;; (("$A$3(Bh$A$s(Be$A$K(Bl$A$A(Bl$A$O(Bo" 15 1 ? t) . " h$A$s(Be$A$K(Bl$A$A(Bl$A$O(Bo") +;; (("$A$3(Bh$A$s(Be$A$K(Bl$A$A(Bl$A$O(Bo" 14 1 ? t) . " h$A$s(Be$A$K(Bl$A$A(B...") +;; (("x" 3 nil nil "$(Gemk#(B") . "x") +;; (("$AVP(B" 2 nil nil "$(Gemk#(B") . "$AVP(B") +;; (("$AVP(B" 1 nil ?x "$(Gemk#(B") . "x") ;; XEmacs error +;; (("$AVPND(B" 3 nil ? "$(Gemk#(B") . "$AVP(B ") ;; XEmacs error +;; (("foobarbaz" 4 nil nil "$(Gemk#(B") . "$(Gemk#(B") +;; (("foobarbaz" 5 nil nil "$(Gemk#(B") . "f$(Gemk#(B") +;; (("foobarbaz" 6 nil nil "$(Gemk#(B") . "fo$(Gemk#(B") +;; (("foobarbaz" 8 3 nil "$(Gemk#(B") . "b$(Gemk#(B") +;; (("$A$3(Bh$A$s(Be$A$K(Bl$A$A(Bl$A$O(Bo" 14 4 ?x "$AHU1>$(Gk#(B") . "xe$A$KHU1>$(Gk#(B") +;; (("$A$3(Bh$A$s(Be$A$K(Bl$A$A(Bl$A$O(Bo" 13 4 ?x "$AHU1>$(Gk#(B") . "xex$AHU1>$(Gk#(B") ;; )) ;; (let (ret) ;; (condition-case e @@ -366,6 +365,50 @@ language environment LANG-ENV." (with-coding-priority coding-priority (detect-coding-region from to))))) +;;;###autoload +(defun char-displayable-p (char) + "Return non-nil if we should be able to display CHAR. +On a multi-font display, the test is only whether there is an +appropriate font from the selected frame's fontset to display CHAR's +charset in general. Since fonts may be specified on a per-character +basis, this may not be accurate." + (cond ((< char 256) + ;; Single byte characters are always displayable. + t) + ((display-multi-font-p) + ;; On a window system, a character is displayable if we have + ;; a font for that character in the default face of the + ;; currently selected frame. + (let ((fontset (frame-parameter (selected-frame) 'font)) + font-pattern) + (if (query-fontset fontset) + (setq font-pattern (fontset-font fontset char))) + (or font-pattern + (setq font-pattern (fontset-font "fontset-default" char))) + (if font-pattern + (progn + ;; Now FONT-PATTERN is a string or a cons of family + ;; field pattern and registry field pattern. + (or (stringp font-pattern) + (let ((family (or (car font-pattern) "*")) + (registry (or (cdr font-pattern) "*"))) + (or (string-match "-" family) + (setq family (concat "*-" family))) + (or (string-match "-" registry) + (setq registry (concat registry "-*"))) + (setq font-pattern + (format "-%s-*-*-*-*-*-*-*-*-*-*-%s" + family registry)))) + (x-list-fonts font-pattern 'default (selected-frame) 1))))) + (t + (let ((coding (terminal-coding-system))) + (if coding + (let ((safe-chars (coding-system-get coding 'safe-chars)) + (safe-charsets (coding-system-get coding 'safe-charsets))) + (or (and safe-chars + (aref safe-chars char)) + (and safe-charsets + (memq (char-charset char) safe-charsets))))))))) (provide 'mule-util) @@ -373,4 +416,5 @@ language environment LANG-ENV." ;; coding: iso-2022-7bit ;; End: +;;; arch-tag: 5bdb52b6-a3a5-4529-b7a0-37d01b0e570b ;;; mule-util.el ends here diff --git a/lisp/international/mule.el b/lisp/international/mule.el index d2cc9c0f19..8b2702bc30 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1117,7 +1117,7 @@ If CODING-SYSTEM leaves the text conversion unspecified, or if it leaves the end-of-line conversion unspecified, FORCE controls what to do. If FORCE is nil, get the unspecified aspect (or aspects) from the buffer's previous `buffer-file-coding-system' value (if it is -specified there). Otherwise, levae it unspecified. +specified there). Otherwise, leave it unspecified. This marks the buffer modified so that the succeeding \\[save-buffer] surely saves the buffer with CODING-SYSTEM. From a program, if you @@ -1229,7 +1229,7 @@ See Info node `Specify Coding' and Info node `Single-Byte Character Support'. On non-windowing terminals, this is set from the locale by default. Setting this variable directly does not take effect; -use either M-x customize or \\[set-keyboard-coding-system]." +use either \\[customize] or \\[set-keyboard-coding-system]." :type '(coding-system :tag "Coding system") :link '(info-link "(emacs)Specify Coding") :link '(info-link "(emacs)Single-Byte Character Support") @@ -1302,12 +1302,42 @@ Now we have more convenient function `set-coding-system-priority'." ;;; X selections (defvar ctext-non-standard-encodings-alist - '(("ISO8859-15" . latin-iso8859-15) - ("ISO8859-14" . latin-iso8859-14) - ("KOI8-R" . koi8-r) - ("BIG5-0" . big5)) - "Alist of non-standard encoding names vs Emacs coding systems. -This alist is used to decode an extened segment of a compound text.") + '(("big5-0" big5 2 (chinese-big5-1 chinese-big5-2)) + ("ISO8859-14" iso-8859-14 1 latin-iso8859-14) + ("ISO8859-15" iso-8859-15 1 latin-iso8859-15)) + "Alist of non-standard encoding names vs the corresponding usages in CTEXT. + +It controls how extended segments of a compound text are handled +by the coding system `compound-text-with-extensions'. + +Each element has the form (ENCODING-NAME CODING-SYSTEM N-OCTET CHARSET). + +ENCODING-NAME is an encoding name of an \"extended segments\". + +CODING-SYSTEM is the coding-system to encode (or decode) the +characters into (or from) the extended segment. + +N-OCTET is the number of octets (bytes) that encodes a character +in the segment. It can be 0 (meaning the number of octets per +character is variable), 1, 2, 3, or 4. + +CHARSET is a charater set containing characters that are encoded +in the segment. It can be a list of character sets. It can also +be a char-table, in which case characters that have non-nil value +in the char-table are the target. + +On decoding CTEXT, all encoding names listed here are recognized. + +On encoding CTEXT, encoding names in the variable +`ctext-non-standard-encodings' (which see) and in the information +listed for the current language environment under the key +`ctext-non-standard-encodings' are used.") + +(defvar ctext-non-standard-encodings + '("big5-0") + "List of non-standard encoding names used in extended segments of CTEXT. +Each element must be one of the names listed in the variable +`ctext-non-standard-encodings-alist' (which see).") (defvar ctext-non-standard-encodings-regexp (string-to-multibyte @@ -1319,13 +1349,9 @@ This alist is used to decode an extened segment of a compound text.") "\\(\e%G[^\e]*\e%@\\)"))) ;; Functions to support "Non-Standard Character Set Encodings" defined -;; by the COMPOUND-TEXT spec. -;; We support that by decoding the whole data by `ctext' which just -;; pertains byte sequences belonging to ``extended segment'', then -;; decoding those byte sequences one by one in Lisp. -;; This function also supports "The UTF-8 encoding" described in the -;; section 7 of the documentation fo COMPOUND-TEXT distributed with -;; XFree86. +;; by the COMPOUND-TEXT spec. They also support "The UTF-8 encoding" +;; described in the section 7 of the documentation of COMPOUND-TEXT +;; distributed with XFree86. (defun ctext-post-read-conversion (len) "Decode LEN characters encoded as Compound Text with Extended Segments." @@ -1348,14 +1374,14 @@ This alist is used to decode an extened segment of a compound text.") (let* ((M (char-after (+ pos 4))) (L (char-after (+ pos 5))) (encoding (match-string 2)) - (coding (or (cdr (assoc-ignore-case - encoding - ctext-non-standard-encodings-alist)) - (coding-system-p - (intern (downcase encoding)))))) - (if enable-multibyte-characters - (setq M (multibyte-char-to-unibyte M) - L (multibyte-char-to-unibyte L))) + (encoding-info (assoc-ignore-case + encoding + ctext-non-standard-encodings-alist)) + (coding (if encoding-info + (nth 1 encoding-info) + (setq encoding (intern (downcase encoding))) + (and (coding-system-p encoding) + encoding)))) (setq bytes (- (+ (* (- M 128) 128) (- L 128)) (- (point) (+ pos 6)))) (when coding @@ -1363,40 +1389,39 @@ This alist is used to decode an extened segment of a compound text.") (forward-char bytes) (decode-coding-region (- (point) bytes) (point) coding))) ;; ESC % G --UTF-8-BYTES-- ESC % @ - (setq bytes (- (point) pos)) - (decode-coding-region (- (point) bytes) (point) 'utf-8)))) + (delete-char -3) + (delete-region pos (+ pos 3)) + (decode-coding-region pos (point) 'utf-8)))) (goto-char (point-min)) (- (point-max) (point))))) -;; If you add charsets here, be sure to modify the regexp used by -;; ctext-pre-write-conversion to look up non-standard charsets. -(defvar ctext-non-standard-designations-alist - '(("$(0" . (big5 "big5-0" 2)) - ("$(1" . (big5 "big5-0" 2)) - ;; The following are actually standard; generating extended - ;; segments for them is wrong and screws e.g. Latin-9 users. - ;; 8859-{10,13,16} aren't Emacs charsets anyhow. -- fx -;; ("-V" . (t "iso8859-10" 1)) -;; ("-Y" . (t "iso8859-13" 1)) -;; ("-_" . (t "iso8859-14" 1)) -;; ("-b" . (t "iso8859-15" 1)) -;; ("-f" . (t "iso8859-16" 1)) - ) - "Alist of ctext control sequences that introduce character sets which -are not in the list of approved encodings, and the corresponding -coding system, identifier string, and number of octets per encoded -character. - -Each element has the form (CTLSEQ . (ENCODING CHARSET NOCTETS)). CTLSEQ -is the control sequence (sans the leading ESC) that introduces the character -set in the text encoded by compound-text. ENCODING is a coding system -symbol; if it is t, it means that the ctext coding system already encodes -the text correctly, and only the leading control sequence needs to be altered. -If ENCODING is a coding system, we need to re-encode the text with that -coding system. CHARSET is the name of the charset we need to put into -the leading control sequence. NOCTETS is the number of octets (bytes) that -encode each character in this charset. NOCTETS can be 0 (meaning the number -of octets per character is variable), 1, 2, 3, or 4.") +;; Return a char table of extended segment usage for each character. +;; Each value of the char table is nil, one of the elements of +;; `ctext-non-standard-encodings-alist', or the symbol `utf-8'. + +(defun ctext-non-standard-encodings-table () + (let ((table (make-char-table 'translation-table))) + (aset table (make-char 'mule-unicode-0100-24ff) 'utf-8) + (aset table (make-char 'mule-unicode-2500-33ff) 'utf-8) + (aset table (make-char 'mule-unicode-e000-ffff) 'utf-8) + (dolist (encoding (reverse + (append + (get-language-info current-language-environment + 'ctext-non-standard-encodings) + ctext-non-standard-encodings))) + (let* ((slot (assoc encoding ctext-non-standard-encodings-alist)) + (charset (nth 3 slot))) + (if charset + (cond ((charsetp charset) + (aset table (make-char charset) slot)) + ((listp charset) + (dolist (elt charset) + (aset table (make-char elt) slot))) + ((char-table-p charset) + (map-char-table #'(lambda (k v) + (if (and v (> k 128)) (aset table k slot))) + charset)))))) + table)) (defun ctext-pre-write-conversion (from to) "Encode characters between FROM and TO as Compound Text w/Extended Segments. @@ -1412,47 +1437,56 @@ text, and convert it in the temporary buffer. Otherwise, convert in-place." (insert from)) ;; Now we can encode the whole buffer. - (let ((case-fold-search nil) + (let ((encoding-table (ctext-non-standard-encodings-table)) last-coding-system-used - pos posend desig encode-info encoding chset noctets textlen) - (goto-char (point-min)) - ;; At first encode the whole buffer. - (encode-coding-region (point-min) (point-max) 'ctext-no-compositions) - ;; Then replace ISO-2022 charset designations with extended - ;; segments, for those charsets that are not part of the - ;; official X registry. The regexp below finds the leading - ;; sequences for big5. - (while (re-search-forward "\e\\(\$([01]\\)" nil 'move) - (setq pos (match-beginning 0) - posend (point) - desig (match-string 1) - encode-info (cdr (assoc desig - ctext-non-standard-designations-alist)) - encoding (car encode-info) - chset (cadr encode-info) - noctets (car (cddr encode-info))) - (skip-chars-forward "^\e") - (cond - ((eq encoding t) ; only the leading sequence needs to be changed - (setq textlen (+ (- (point) posend) (length chset) 1)) - ;; Generate the control sequence for an extended segment. - (replace-match (string-to-multibyte (format "\e%%/%d%c%c%s" - noctets - (+ (/ textlen 128) 128) - (+ (% textlen 128) 128) - chset)) - t t)) - ((coding-system-p encoding) ; need to recode the entire segment... - (decode-coding-region pos (point) 'ctext-no-compositions) - (encode-coding-region pos (point) encoding) - (setq textlen (+ (- (point) pos) (length chset) 1)) - (save-excursion - (goto-char pos) - (insert (string-to-multibyte (format "\e%%/%d%c%c%s" - noctets - (+ (/ textlen 128) 128) - (+ (% textlen 128) 128) - chset))))))) + last-pos last-encoding-info + encoding-info end-pos) + (goto-char (setq last-pos (point-min))) + (setq end-pos (point-marker)) + (while (re-search-forward "[^\000-\177]+" nil t) + ;; Found a sequence of non-ASCII characters. + (setq last-pos (match-beginning 0) + last-encoding-info (aref encoding-table (char-after last-pos))) + (set-marker end-pos (match-end 0)) + (goto-char (1+ last-pos)) + (catch 'tag + (while t + (setq encoding-info + (if (< (point) end-pos) + (aref encoding-table (following-char)))) + (unless (eq last-encoding-info encoding-info) + (cond ((consp last-encoding-info) + ;; Encode the previous range using an extended + ;; segment. + (let ((encoding-name (car last-encoding-info)) + (coding-system (nth 1 last-encoding-info)) + (noctets (nth 2 last-encoding-info)) + len) + (encode-coding-region last-pos (point) coding-system) + (setq len (+ (length encoding-name) 1 + (- (point) last-pos))) + (save-excursion + (goto-char last-pos) + (insert (string-to-multibyte + (format "\e%%/%d%c%c%s" + noctets + (+ (/ len 128) 128) + (+ (% len 128) 128) + encoding-name)))))) + ((eq last-encoding-info 'utf-8) + ;; Encode the previous range using UTF-8 encoding + ;; extention. + (encode-coding-region last-pos (point) 'mule-utf-8) + (save-excursion + (goto-char last-pos) + (insert "\e%G")) + (insert "\e%@"))) + (setq last-pos (point) + last-encoding-info encoding-info)) + (if (< (point) end-pos) + (forward-char 1) + (throw 'tag nil))))) + (set-marker end-pos nil) (goto-char (point-min)))) ;; Must return nil, as build_annotations_2 expects that. nil) @@ -1596,31 +1630,36 @@ function by default." (setq coding-system nil))))) ;; If no coding: tag in the head, check the tail. + ;; Here we must pay attention to the case that the end-of-line + ;; is just "\r" and we can't use "^" nor "$" in regexp. (when (and tail-found (not coding-system)) (goto-char tail-start) - (search-forward "\n\^L" nil t) + (re-search-forward "[\r\n]\^L" nil t) (if (re-search-forward - "^\\(.*\\)[ \t]*Local Variables:[ \t]*\\(.*\\)$" tail-end t) - ;; The prefix is what comes before "local variables:" in its - ;; line. The suffix is what comes after "local variables:" + "[\r\n]\\([^[\r\n]*\\)[ \t]*Local Variables:[ \t]*\\([^\r\n]*\\)[\r\n]" + tail-end t) + ;; The prefix is what comes before "local variables:" in its + ;; line. The suffix is what comes after "local variables:" ;; in its line. (let* ((prefix (regexp-quote (match-string 1))) (suffix (regexp-quote (match-string 2))) (re-coding (concat - "^" prefix + "[\r\n]" prefix ;; N.B. without the \n below, the regexp can ;; eat newlines. - "[ \t]*coding[ \t]*:[ \t]*\\([^ \t\n]+\\)[ \t]*" - suffix "$")) + "[ \t]*coding[ \t]*:[ \t]*\\([^ \t\r\n]+\\)[ \t]*" + suffix "[\r\n]")) (re-unibyte (concat - "^" prefix - "[ \t]*unibyte[ \t]*:[ \t]*\\([^ \t\n]+\\)[ \t]*" - suffix "$")) + "[\r\n]" prefix + "[ \t]*unibyte[ \t]*:[ \t]*\\([^ \t\r\n]+\\)[ \t]*" + suffix "[\r\n]")) (re-end - (concat "^" prefix "[ \t]*End *:[ \t]*" suffix "$")) - (pos (point))) + (concat "[\r\n]" prefix "[ \t]*End *:[ \t]*" suffix + "[\r\n]?")) + (pos (1- (point)))) + (forward-char -1) ; skip back \r or \n. (re-search-forward re-end tail-end 'move) (setq tail-end (point)) (goto-char pos) @@ -1788,9 +1827,9 @@ of the function `insert-file-contents'." (setq coding (funcall set-auto-coding-function filename (- (point-max) (point-min))))) (or coding - (setq coding (find-operation-coding-system - 'insert-file-contents - filename visit beg end replace))) + (setq coding (car (find-operation-coding-system + 'insert-file-contents + filename visit beg end replace)))) (if (coding-system-p coding) (or enable-multibyte-characters (setq coding @@ -2062,4 +2101,5 @@ This function is intended to be added to `auto-coding-functions'." ;;; (provide 'mule) +;;; arch-tag: 9aebaa6e-0e8a-40a9-b857-cb5d04a39e7c ;;; mule.el ends here diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el index 05dc2bd520..ebe2eaec90 100644 --- a/lisp/international/ogonek.el +++ b/lisp/international/ogonek.el @@ -500,4 +500,5 @@ followed by a non-Polish character, that is one not listed in the (provide 'ogonek) +;;; arch-tag: 672d7744-28ac-412b-965e-06a27e50d1d7 ;;; ogonek.el ends here diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 60c8884be3..1415648be3 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -2097,7 +2097,7 @@ are shown (at most to the depth specified `quail-completion-max-depth')." (scroll-other-window))) (setq quail-current-key key) (erase-buffer) - (insert "Possible completion and corresponding translations are:\n") + (insert "Possible completion and corresponding characters are:\n") (quail-completion-1 key map 1) (goto-char (point-min)) (display-buffer (current-buffer)) @@ -2277,8 +2277,8 @@ should be made by `quail-build-decode-map' (which see)." (or (> (length x) (length y)) (and (= (length x) (length y)) (not (string< x y)))))))) - (let ((frame-width (frame-width (window-frame (get-buffer-window - (current-buffer) 'visible)))) + (let ((window-width (window-width (get-buffer-window + (current-buffer) 'visible))) (single-key-width 3) (single-trans-width 4) (multiple-key-width 3) @@ -2307,7 +2307,7 @@ should be made by `quail-build-decode-map' (which see)." (setq multiple-key-width width))) (when single-list (setq col-width (+ single-key-width 1 single-trans-width 1) - cols (/ frame-width col-width) + cols (/ window-width col-width) rows (/ (length single-list) cols)) (if (> (% (length single-list) cols) 0) (setq rows (1+ rows))) @@ -2353,7 +2353,7 @@ should be made by `quail-build-decode-map' (which see)." (lambda (x) (let ((width (if (integerp x) (char-width x) (string-width x)))) - (when (> (+ (current-column) 1 width) frame-width) + (when (> (+ (current-column) 1 width) window-width) (insert "\n") (indent-to multiple-key-width)) (insert " " x)))) @@ -2390,7 +2390,7 @@ package to describe." (with-current-buffer standard-output (setq quail-current-package package-def)))) ;; Then, insert text in the help buffer while paying attention to - ;; the width of the frame in which the buffer displayed. + ;; the width of the window in which the buffer displayed. (with-current-buffer (help-buffer) (setq buffer-read-only nil) (insert "Input method: " (quail-name) @@ -2808,4 +2808,5 @@ call it with one argument STRING." ;; (provide 'quail) +;;; arch-tag: 46d7db54-5467-42c4-a2a9-53ca90a1e886 ;;; quail.el ends here diff --git a/lisp/international/swedish.el b/lisp/international/swedish.el index 0171433b0a..b13a5e685b 100644 --- a/lisp/international/swedish.el +++ b/lisp/international/swedish.el @@ -155,4 +155,5 @@ Leaves point just after the word that looks Swedish." (provide 'swedish) +;;; arch-tag: a117019d-acac-4ac4-8eac-0dbd49a41d32 ;;; swedish.el ends here diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el index 12beba682f..d92e28981e 100644 --- a/lisp/international/titdic-cnv.el +++ b/lisp/international/titdic-cnv.el @@ -209,7 +209,7 @@ SPC, 6, 3, 4, or 7 specifing a tone (SPC:$(0?v(N(B, 6:$(0Dm(N(B, 3:$(0&9Vy ;; Return a value of the key in the current line. (defsubst tit-read-key-value () - (if (looking-at "[^ \t\n]+") + (if (looking-at "[^ \t\r\n]+") (car (read-from-string (concat "\"" (match-string 0) "\""))))) ;; Return an appropriate quail-package filename from FILENAME (TIT @@ -766,6 +766,11 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." (insert "(quail-define-rules\n") (save-excursion (set-buffer dicbuf) + ;; Handle double CR line ends, which result when checking out of + ;; CVS on MS-Windows. + (goto-char (point-min)) + (while (re-search-forward "\r\r$" nil t) + (replace-match "")) (goto-char (point-min)) (search-forward "A440") (beginning-of-line) @@ -1177,4 +1182,5 @@ to store generated Quail packages." ;; coding: iso-2022-7bit ;; End: +;;; arch-tag: 8ad478b2-a985-4da2-b47f-d8ee5d7c24a3 ;;; titdic-cnv.el ends here diff --git a/lisp/international/utf-7.el b/lisp/international/utf-7.el index 842d81c92a..8d98b442ac 100644 --- a/lisp/international/utf-7.el +++ b/lisp/international/utf-7.el @@ -136,4 +136,6 @@ ESC and SKIP-CHARS are adjusted for the normal and IMAP versions." ;; (utf-7-encode from to t)) (provide 'utf-7) + +;;; arch-tag: 975ee403-90a4-4286-97d2-4ed1323f4ef9 ;;; utf-7.el ends here diff --git a/lisp/isearch.el b/lisp/isearch.el index f647c6052e..f972956716 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1,6 +1,6 @@ ;;; isearch.el --- incremental search minor mode -;; Copyright (C) 1992, 93, 94, 95, 96, 97, 1999, 2000, 01, 2003 +;; Copyright (C) 1992, 93, 94, 95, 96, 97, 1999, 2000, 01, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Daniel LaLiberte @@ -236,10 +236,10 @@ Default value, nil, means edit the string instead." (or (char-table-p (nth 1 map)) (error "The initialization of isearch-mode-map must be updated")) ;; Make all multibyte characters search for themselves. - ;; Fixme: is this range right? - (set-char-table-range (nth 1 map) (cons #x100 #x3FFFFF) + (set-char-table-range (nth 1 map) (cons #x100 (max-char)) 'isearch-printing-char) - ;; Make function keys, etc, exit the search. + ;; Make function keys, etc, which aren't bound to a scrolling-function + ;; exit the search. (define-key map [t] 'isearch-other-control-char) ;; Control chars, by default, end isearch mode transparently. ;; We need these explicit definitions because, in a dense keymap, @@ -297,6 +297,7 @@ Default value, nil, means edit the string instead." ;; Nothing special for + because it matches at least once. (define-key map "*" 'isearch-*-char) (define-key map "?" 'isearch-*-char) + (define-key map "{" 'isearch-{-char) (define-key map "|" 'isearch-|-char) ;; Turned off because I find I expect to get the global definition--rms. @@ -1182,21 +1183,30 @@ might return the position of the end of the line." (isearch-update)) +(defun isearch-{-char () + "Handle \{ specially in regexps." + (interactive) + (isearch-*-char t)) + ;; *, ?, and | chars can make a regexp more liberal. ;; They can make a regexp match sooner or make it succeed instead of failing. ;; So go back to place last successful search started ;; or to the last ^S/^R (barrier), whichever is nearer. ;; + needs no special handling because the string must match at least once. -(defun isearch-*-char () - "Handle * and ? specially in regexps." +(defun isearch-*-char (&optional want-backslash) + "Handle * and ? specially in regexps. +When WANT-BACKSLASH is non-nil, do special handling for \{." (interactive) (if isearch-regexp (let ((idx (length isearch-string))) (while (and (> idx 0) (eq (aref isearch-string (1- idx)) ?\\)) (setq idx (1- idx))) - (when (= (mod (- (length isearch-string) idx) 2) 0) + ;; * and ? are special when not preceded by \. + ;; { is special when it is preceded by \. + (when (= (mod (- (length isearch-string) idx) 2) + (if want-backslash 1 0)) (setq isearch-adjusted t) ;; Get the isearch-other-end from before the last search. ;; We want to start from there, @@ -1221,18 +1231,176 @@ might return the position of the end of the line." (goto-char isearch-barrier))) (isearch-process-search-char last-command-char)) +(defun isearch-unread-key-sequence (keylist) + "Unread the given key-sequence KEYLIST. +Scroll-bar or mode-line events are processed appropriately." + (cancel-kbd-macro-events) + (apply 'isearch-unread keylist) + ;; If the event was a scroll-bar or mode-line click, the event will have + ;; been prefixed by a symbol such as vertical-scroll-bar. We must remove + ;; it here, because this symbol will be attached to the event again next + ;; time it gets read by read-key-sequence. + ;; + ;; (Old comment from isearch-other-meta-char: "Note that we don't have to + ;; modify the event anymore in 21 because read_key_sequence no longer + ;; modifies events to produce fake prefix keys.") + (if (and (> (length keylist) 1) + (symbolp (car keylist)) + (listp (cadr keylist)) + (not (numberp (posn-point + (event-start (cadr keylist) ))))) + (pop unread-command-events))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; scrolling within Isearch mode. Alan Mackenzie (acm@muc.de), 2003/2/24 +;; +;; The idea here is that certain vertical scrolling commands (like C-l +;; `recenter') should be usable WITHIN Isearch mode. For a command to be +;; suitable, it must NOT alter the buffer, swap to another buffer or frame, +;; tamper with isearch's state, or move point. It is unacceptable for the +;; search string to be scrolled out of the current window. If a command +;; attempts this, we scroll the text back again. +;; +;; We implement this feature with a property called `isearch-scroll'. +;; If a command's symbol has the value t for this property it is a +;; scrolling command. The feature needs to be enabled by setting the +;; customizable variable `isearch-allow-scroll' to a non-nil value. +;; +;; The universal argument commands (e.g. C-u) in simple.el are marked +;; as scrolling commands, and isearch.el has been amended to allow +;; prefix arguments to be passed through to scrolling commands. Thus +;; M-0 C-l will scroll point to the top of the window. +;; +;; Horizontal scrolling commands are currently not catered for. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; Set the isearch-scroll property on some standard functions: +;; Scroll-bar functions: +(if (fboundp 'scroll-bar-toolkit-scroll) + (put 'scroll-bar-toolkit-scroll 'isearch-scroll t)) +(if (fboundp 'mac-handle-scroll-bar-event) + (put 'mac-handle-scroll-bar-event 'isearch-scroll t)) +(if (fboundp 'w32-handle-scroll-bar-event) + (put 'w32-handle-scroll-bar-event 'isearch-scroll t)) + +;; Commands which scroll the window: +(put 'recenter 'isearch-scroll t) +(put 'reposition-window 'isearch-scroll t) +(put 'scroll-up 'isearch-scroll t) +(put 'scroll-down 'isearch-scroll t) + +;; Commands which act on the other window +(put 'list-buffers 'isearch-scroll t) +(put 'scroll-other-window 'isearch-scroll t) +(put 'scroll-other-window-down 'isearch-scroll t) +(put 'beginning-of-buffer-other-window 'isearch-scroll t) +(put 'end-of-buffer-other-window 'isearch-scroll t) + +;; Commands which change the window layout +(put 'delete-other-windows 'isearch-scroll t) +(put 'balance-windows 'isearch-scroll t) +(put 'split-window-vertically 'isearch-scroll t) +(put 'enlarge-window 'isearch-scroll t) + +;; Universal argument commands +(put 'universal-argument 'isearch-scroll t) +(put 'negative-argument 'isearch-scroll t) +(put 'digit-argument 'isearch-scroll t) + +(defcustom isearch-allow-scroll nil + "If non-nil, scrolling commands are allowed during incremental search." + :type 'boolean + :group 'isearch) + +(defun isearch-string-out-of-window (isearch-point) + "Test whether the search string is currently outside of the window. +Return nil if it's completely visible, or if point is visible, +together with as much of the search string as will fit; the symbol +`above' if we need to scroll the text downwards; the symbol `below', +if upwards." + (let ((w-start (window-start)) + (w-end (window-end nil t)) + (w-L1 (save-excursion (move-to-window-line 1) (point))) + (w-L-1 (save-excursion (move-to-window-line -1) (point))) + start end) ; start and end of search string in buffer + (if isearch-forward + (setq end isearch-point start (or isearch-other-end isearch-point)) + (setq start isearch-point end (or isearch-other-end isearch-point))) + (cond ((or (and (>= start w-start) (<= end w-end)) + (if isearch-forward + (and (>= isearch-point w-L-1) (< isearch-point w-end)) ; point on Line -1 + (and (>= isearch-point w-start) (< isearch-point w-L1)))) ; point on Line 0 + nil) + ((and (< start w-start) + (< isearch-point w-L-1)) + 'above) + (t 'below)))) + +(defun isearch-back-into-window (above isearch-point) + "Scroll the window to bring the search string back into view. +Restore point to ISEARCH-POINT in the process. ABOVE is t when the +search string is above the top of the window, nil when it is beneath +the bottom." + (let (start end) + (if isearch-forward + (setq end isearch-point start (or isearch-other-end isearch-point)) + (setq start isearch-point end (or isearch-other-end isearch-point))) + (if above + (progn + (goto-char start) + (recenter 0) + (when (>= isearch-point (window-end nil t)) + (goto-char isearch-point) + (recenter -1))) + (goto-char end) + (recenter -1) + (when (< isearch-point (window-start)) + (goto-char isearch-point) + (recenter 0)))) + (goto-char isearch-point)) + +(defun isearch-reread-key-sequence-naturally (keylist) + "Reread key sequence KEYLIST with Isearch mode's keymap deactivated. +Return the key sequence as a string/vector." + (isearch-unread-key-sequence keylist) + (let (overriding-terminal-local-map) + (read-key-sequence nil))) ; This will go through function-key-map, if nec. + +(defun isearch-lookup-scroll-key (key-seq) + "If KEY-SEQ is bound to a scrolling command, return it as a symbol. +Otherwise return nil." + (let* ((overriding-terminal-local-map nil) + (binding (key-binding key-seq))) + (and binding (symbolp binding) (commandp binding) + (eq (get binding 'isearch-scroll) t) + binding))) (defalias 'isearch-other-control-char 'isearch-other-meta-char) -(defun isearch-other-meta-char () - "Exit the search normally and reread this key sequence. -But only if `search-exit-option' is non-nil, the default. -If it is the symbol `edit', the search string is edited in the minibuffer -and the meta character is unread so that it applies to editing the string." - (interactive) - (let* ((key (this-command-keys)) +(defun isearch-other-meta-char (&optional arg) + "Process a miscellaneous key sequence in Isearch mode. + +Try to convert the current key-sequence to something usable in Isearch +mode, either by converting it with `function-key-map', downcasing a +key with C-, or finding a \"scrolling command\" bound to +it. \(In the last case, we may have to read more events.) If so, +either unread the converted sequence or execute the command. + +Otherwise, if `search-exit-option' is non-nil (the default) unread the +key-sequence and exit the search normally. If it is the symbol +`edit', the search string is edited in the minibuffer and the meta +character is unread so that it applies to editing the string. + +ARG is the prefix argument. It will be transmitted through to the +scrolling command or to the command whose key-sequence exits +Isearch mode." + (interactive "P") + (let* ((key (if current-prefix-arg ; not nec the same as ARG + (substring (this-command-keys) universal-argument-num-events) + (this-command-keys))) (main-event (aref key 0)) - (keylist (listify-key-sequence key))) + (keylist (listify-key-sequence key)) + scroll-command isearch-point) (cond ((and (= (length key) 1) (let ((lookup (lookup-key function-key-map key))) (not (or (null lookup) (integerp lookup) @@ -1284,23 +1452,27 @@ and the meta character is unread so that it applies to editing the string." ((eq search-exit-option 'edit) (apply 'isearch-unread keylist) (isearch-edit-string)) + ;; Handle a scrolling function. + ((and isearch-allow-scroll + (progn (setq key (isearch-reread-key-sequence-naturally keylist)) + (setq keylist (listify-key-sequence key)) + (setq main-event (aref key 0)) + (setq scroll-command (isearch-lookup-scroll-key key)))) + ;; From this point onwards, KEY, KEYLIST and MAIN-EVENT hold a + ;; complete key sequence, possibly as modified by function-key-map, + ;; not merely the one or two event fragment which invoked + ;; isearch-other-meta-char in the first place. + (setq isearch-point (point)) + (setq prefix-arg arg) + (command-execute scroll-command) + (let ((ab-bel (isearch-string-out-of-window isearch-point))) + (if ab-bel + (isearch-back-into-window (eq ab-bel 'above) isearch-point))) + (isearch-update)) (search-exit-option (let (window) - (cancel-kbd-macro-events) - (apply 'isearch-unread keylist) - - ;; Properly handle scroll-bar and mode-line clicks for - ;; which a dummy prefix event was generated as (aref key - ;; 0). Note that we don't have to modify the event - ;; anymore in 21 because read_key_sequence no longer modifies - ;; events to produce fake prefix keys. - (when (and (> (length key) 1) - (symbolp (aref key 0)) - (listp (aref key 1)) - (not (numberp (posn-point - (event-start (aref key 1)))))) - (pop unread-command-events) - (setq main-event (car unread-command-events))) + (isearch-unread-key-sequence keylist) + (setq main-event (car unread-command-events)) ;; If we got a mouse click event, that event contains the ;; window clicked on. maybe it was read with the buffer @@ -1330,8 +1502,9 @@ and the meta character is unread so that it applies to editing the string." (isearch-done) (isearch-clean-overlays)) (isearch-done) - (isearch-clean-overlays)))) - (t;; otherwise nil + (isearch-clean-overlays) + (setq prefix-arg arg)))) + (t;; otherwise nil (isearch-process-search-string key key))))) (defun isearch-quote-char () @@ -1961,26 +2134,30 @@ A value of nil means highlight all matches." :group 'isearch) (defface isearch - '((((type tty pc) (class color)) - (:background "magenta4" :foreground "cyan1")) - (((class color) (background light)) + '((((class color) (min-colors 88) (background light)) ;; The background must not be too dark, for that means ;; the character is hard to see when the cursor is there. (:background "magenta2" :foreground "lightskyblue1")) - (((class color) (background dark)) + (((class color) (min-colors 88) (background dark)) (:background "palevioletred2" :foreground "brown4")) + (((class color) (min-colors 16)) + (:background "magenta4" :foreground "cyan1")) + (((class color) (min-colors 8)) + (:background "magenta4" :foreground "cyan1")) (t (:inverse-video t))) "Face for highlighting Isearch matches." :group 'isearch-faces) (defvar isearch 'isearch) (defface isearch-lazy-highlight-face - '((((type tty pc) (class color)) - (:background "turquoise3")) - (((class color) (background light)) + '((((class color) (min-colors 88) (background light)) (:background "paleturquoise")) - (((class color) (background dark)) + (((class color) (min-colors 88) (background dark)) (:background "paleturquoise4")) + (((class color) (min-colors 16)) + (:background "turquoise3")) + (((class color) (min-colors 8)) + (:background "turquoise3")) (t (:underline t))) "Face for lazy highlighting of Isearch matches other than the current one." :group 'isearch-faces) @@ -1994,6 +2171,7 @@ A value of nil means highlight all matches." (defvar isearch-lazy-highlight-last-string nil) (defvar isearch-lazy-highlight-window nil) (defvar isearch-lazy-highlight-window-start nil) +(defvar isearch-lazy-highlight-window-end nil) (defvar isearch-lazy-highlight-case-fold-search nil) (defvar isearch-lazy-highlight-regexp nil) @@ -2028,12 +2206,15 @@ search string to change or the window to scroll)." (not (eq isearch-lazy-highlight-regexp isearch-regexp)) (not (= (window-start) - isearch-lazy-highlight-window-start)))) + isearch-lazy-highlight-window-start)) + (not (= (window-end) ; Window may have been split/joined. + isearch-lazy-highlight-window-end)))) ;; something important did indeed change (isearch-lazy-highlight-cleanup t) ;kill old loop & remove overlays (when (not isearch-invalid-regexp) (setq isearch-lazy-highlight-window (selected-window) isearch-lazy-highlight-window-start (window-start) + isearch-lazy-highlight-window-end (window-end) isearch-lazy-highlight-start (point) isearch-lazy-highlight-end (point) isearch-lazy-highlight-last-string isearch-string @@ -2121,4 +2302,5 @@ CASE-FOLD non-nil means the search was case-insensitive." isearch-case-fold-search case-fold) (isearch-search)) +;;; arch-tag: 74850515-f7d8-43a6-8a2c-ca90a4c1e675 ;;; isearch.el ends here diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 239c8d6eb0..aab768387d 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -29,6 +29,8 @@ ;; Installation: ;; To get the functions in this package bound to keys, use ;; M-x iswitchb-mode or customize the option `iswitchb-mode'. +;; Alternatively, add the following line to your .emacs: +;; (iswitchb-mode 1) ;; As you type in a substring, the list of buffers currently matching ;; the substring is displayed as you type. The list is ordered so @@ -375,18 +377,11 @@ See documentation of `walk-windows' for useful values.") "Iswitchb-specific customization of minibuffer setup. This hook is run during minibuffer setup iff `iswitchb' will be active. -It is intended for use in customizing iswitchb for interoperation -with other packages." -;;; For instance: - -;;; \(add-hook 'iswitchb-minibuffer-setup-hook -;;; \(function -;;; \(lambda () -;;; \(make-local-variable 'resize-minibuffer-window-max-height) -;;; \(setq resize-minibuffer-window-max-height 3)))) - -;;; will constrain rsz-mini to a maximum minibuffer height of 3 lines when -;;; iswitchb is running. Copied from `icomplete-minibuffer-setup-hook'." +For instance: +\(add-hook 'iswitchb-minibuffer-setup-hook + '\(lambda () (set (make-local-variable 'max-mini-window-height) 3))) +will constrain the minibuffer to a maximum height of 3 lines when +iswitchb is running." :type 'hook :group 'iswitchb) @@ -608,7 +603,8 @@ If REQUIRE-MATCH is non-nil, an existing-buffer must be selected." nil ;require-match [handled elsewhere] nil ;initial-contents 'iswitchb-history))) - (if (get-buffer iswitchb-final-text) + (if (and (not (eq iswitchb-exit 'usefirst)) + (get-buffer iswitchb-final-text)) ;; This happens for example if the buffer was chosen with the mouse. (setq iswitchb-matches (list iswitchb-final-text))) @@ -710,7 +706,9 @@ The result is stored in `iswitchb-common-match-string'." (interactive) (if (or (not iswitchb-require-match) (iswitchb-existing-buffer-p)) - (throw 'exit nil))) + (progn + (setq iswitchb-exit 'usefirst) + (throw 'exit nil)))) (defun iswitchb-select-buffer-text () "Select the buffer named by the prompt. @@ -1346,4 +1344,5 @@ This mode enables switching between buffers using substrings. See (provide 'iswitchb) +;;; arch-tag: d74198ae-753f-44f2-b34f-0c515398d90a ;;; iswitchb.el ends here diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index b143393c86..43c8457c80 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -1,6 +1,6 @@ ;;; jit-lock.el --- just-in-time fontification -;; Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000, 2001, 2004 Free Software Foundation, Inc. ;; Author: Gerd Moellmann ;; Keywords: faces files @@ -32,6 +32,7 @@ (eval-when-compile (defmacro with-buffer-unmodified (&rest body) "Eval BODY, preserving the current buffer's modified state." + (declare (debug t)) (let ((modified (make-symbol "modified"))) `(let ((,modified (buffer-modified-p))) (unwind-protect @@ -42,6 +43,7 @@ (defmacro with-buffer-prepared-for-jit-lock (&rest body) "Execute BODY in current buffer, overriding several variables. Preserves the `buffer-modified-p' state of the current buffer." + (declare (debug t)) `(with-buffer-unmodified (let ((buffer-undo-list t) (inhibit-read-only t) @@ -56,6 +58,11 @@ Preserves the `buffer-modified-p' state of the current buffer." ;;; Customization. +(defgroup jit-lock nil + "Font Lock support mode to fontify just-in-time." + :version "21.1" + :group 'font-lock) + (defcustom jit-lock-chunk-size 500 "*Jit-lock chunks of this many characters, or smaller." :type 'integer @@ -109,15 +116,16 @@ See also `jit-lock-stealth-nice'." :group 'jit-lock) -(defcustom jit-lock-defer-contextually 'syntax-driven - "*If non-nil, means deferred fontification should be syntactically true. -If nil, means deferred fontification occurs only on those lines modified. This +(defvaralias 'jit-lock-defer-contextually 'jit-lock-contextually) +(defcustom jit-lock-contextually 'syntax-driven + "*If non-nil, means fontification should be syntactically true. +If nil, means fontification occurs only on those lines modified. This means where modification on a line causes syntactic change on subsequent lines, those subsequent lines are not refontified to reflect their new context. -If t, means deferred fontification occurs on those lines modified and all +If t, means fontification occurs on those lines modified and all subsequent lines. This means those subsequent lines are refontified to reflect -their new syntactic context, either immediately or when scrolling into them. -If any other value, e.g., `syntax-driven', means deferred syntactically true +their new syntactic context, after `jit-lock-context-time' seconds. +If any other value, e.g., `syntax-driven', means syntactically true fontification occurs only if syntactic fontification is performed using the buffer mode's syntax table, i.e., only if `font-lock-keywords-only' is nil. @@ -127,6 +135,10 @@ The value of this variable is used when JIT Lock mode is turned on." (other :tag "syntax-driven" syntax-driven)) :group 'jit-lock) +(defcustom jit-lock-context-time 0.5 + "Idle time after which text is contextually refontified, if applicable." + :type '(number :tag "seconds")) + (defcustom jit-lock-defer-time nil ;; 0.25 "Idle time after which deferred fontification should take place. If nil, fontification is not deferred." @@ -145,19 +157,20 @@ If nil, fontification is not deferred." They are called with two arguments: the START and END of the region to fontify.") (make-variable-buffer-local 'jit-lock-functions) -(defvar jit-lock-first-unfontify-pos nil +(defvar jit-lock-context-unfontify-pos nil "Consider text after this position as contextually unfontified. If nil, contextual fontification is disabled.") -(make-variable-buffer-local 'jit-lock-first-unfontify-pos) +(make-variable-buffer-local 'jit-lock-context-unfontify-pos) (defvar jit-lock-stealth-timer nil "Timer for stealth fontification in Just-in-time Lock mode.") - +(defvar jit-lock-context-timer nil + "Timer for context fontification in Just-in-time Lock mode.") (defvar jit-lock-defer-timer nil "Timer for deferred fontification in Just-in-time Lock mode.") -(defvar jit-lock-buffers nil +(defvar jit-lock-defer-buffers nil "List of buffers with pending deferred fontification.") ;;; JIT lock mode @@ -181,9 +194,9 @@ following ways: been idle for `jit-lock-stealth-time' seconds, while Emacs remains idle. This is useful if any buffer has any deferred fontification. -- Deferred context fontification if `jit-lock-defer-contextually' is +- Deferred context fontification if `jit-lock-contextually' is non-nil. This means fontification updates the buffer corresponding to - true syntactic context, after `jit-lock-stealth-time' seconds of Emacs + true syntactic context, after `jit-lock-context-time' seconds of Emacs idle time, while Emacs remains idle. Otherwise, fontification occurs on modified lines only, and subsequent lines can remain fontified corresponding to previous syntactic contexts. This is useful where @@ -212,10 +225,14 @@ the variable `jit-lock-stealth-nice'." (run-with-idle-timer jit-lock-defer-time t 'jit-lock-deferred-fontify))) - ;; Initialize deferred contextual fontification if requested. - (when (eq jit-lock-defer-contextually t) - (setq jit-lock-first-unfontify-pos - (or jit-lock-first-unfontify-pos (point-max)))) + ;; Initialize contextual fontification if requested. + (when (eq jit-lock-contextually t) + (unless jit-lock-context-timer + (setq jit-lock-context-timer + (run-with-idle-timer jit-lock-context-time t + 'jit-lock-context-fontify))) + (setq jit-lock-context-unfontify-pos + (or jit-lock-context-unfontify-pos (point-max)))) ;; Setup our hooks. (add-hook 'after-change-functions 'jit-lock-after-change nil t) @@ -224,7 +241,8 @@ the variable `jit-lock-stealth-nice'." ;; Turn Just-in-time Lock mode off. (t ;; Cancel our idle timers. - (when (and (or jit-lock-stealth-timer jit-lock-defer-timer) + (when (and (or jit-lock-stealth-timer jit-lock-defer-timer + jit-lock-context-timer) ;; Only if there's no other buffer using them. (not (catch 'found (dolist (buf (buffer-list)) @@ -233,6 +251,9 @@ the variable `jit-lock-stealth-nice'." (when jit-lock-stealth-timer (cancel-timer jit-lock-stealth-timer) (setq jit-lock-stealth-timer nil)) + (when jit-lock-context-timer + (cancel-timer jit-lock-context-timer) + (setq jit-lock-context-timer nil)) (when jit-lock-defer-timer (cancel-timer jit-lock-defer-timer) (setq jit-lock-defer-timer nil))) @@ -248,8 +269,8 @@ FUN will be called with two arguments START and END indicating the region that needs to be (re)fontified. If non-nil, CONTEXTUAL means that a contextual fontification would be useful." (add-hook 'jit-lock-functions fun nil t) - (when (and contextual jit-lock-defer-contextually) - (set (make-local-variable 'jit-lock-defer-contextually) t)) + (when (and contextual jit-lock-contextually) + (set (make-local-variable 'jit-lock-contextually) t)) (jit-lock-mode t)) (defun jit-lock-unregister (fun) @@ -281,8 +302,8 @@ is active." ;; No deferral. (jit-lock-fontify-now start (+ start jit-lock-chunk-size)) ;; Record the buffer for later fontification. - (unless (memq (current-buffer) jit-lock-buffers) - (push (current-buffer) jit-lock-buffers)) + (unless (memq (current-buffer) jit-lock-defer-buffers) + (push (current-buffer) jit-lock-defer-buffers)) ;; Mark the area as defer-fontified so that the redisplay engine ;; is happy and so that the idle timer can find the places to fontify. (with-buffer-prepared-for-jit-lock @@ -330,7 +351,13 @@ Defaults to the whole buffer. END can be out of bounds." ;; We mark it first, to make sure that we don't indefinitely ;; re-execute this fontification if an error occurs. (put-text-property start next 'fontified t) - (run-hook-with-args 'jit-lock-functions start next) + (condition-case err + (run-hook-with-args 'jit-lock-functions start next) + ;; If the user quits (which shouldn't happen in normal on-the-fly + ;; jit-locking), make sure the fontification will be performed + ;; before displaying the block again. + (quit (put-text-property start next 'fontified nil) + (funcall 'signal (car err) (cdr err)))) ;; Find the start of the next chunk, if any. (setq start (text-property-any next end 'fontified nil)))))))) @@ -390,11 +417,9 @@ This functions is called after Emacs has been idle for (let ((buffers (buffer-list)) minibuffer-auto-raise message-log-max) - (while (and buffers (not (input-pending-p))) - (let ((buffer (car buffers))) - (setq buffers (cdr buffers)) - - (with-current-buffer buffer + (with-local-quit + (while (and buffers (not (input-pending-p))) + (with-current-buffer (pop buffers) (when jit-lock-mode ;; This is funny. Calling sit-for with 3rd arg non-nil ;; so that it doesn't redisplay, internally calls @@ -414,28 +439,6 @@ This functions is called after Emacs has been idle for (concat "JIT stealth lock " (buffer-name))) - ;; Perform deferred unfontification, if any. - (when jit-lock-first-unfontify-pos - (save-restriction - (widen) - (when (and (>= jit-lock-first-unfontify-pos (point-min)) - (< jit-lock-first-unfontify-pos (point-max))) - ;; If we're in text that matches a complex multi-line - ;; font-lock pattern, make sure the whole text will be - ;; redisplayed eventually. - (when (get-text-property jit-lock-first-unfontify-pos - 'jit-lock-defer-multiline) - (setq jit-lock-first-unfontify-pos - (or (previous-single-property-change - jit-lock-first-unfontify-pos - 'jit-lock-defer-multiline) - (point-min)))) - (with-buffer-prepared-for-jit-lock - (remove-text-properties - jit-lock-first-unfontify-pos (point-max) - '(fontified nil jit-lock-defer-multiline nil))) - (setq jit-lock-first-unfontify-pos (point-max))))) - ;; In the following code, the `sit-for' calls cause a ;; redisplay, so it's required that the ;; buffer-modified flag of a buffer that is displayed @@ -452,8 +455,8 @@ This functions is called after Emacs has been idle for (jit-lock-fontify-now start (+ start jit-lock-chunk-size)) ;; If stealth jit-locking is done backwards, this leads to ;; excessive O(n^2) refontification. -stef - ;; (when (>= jit-lock-first-unfontify-pos start) - ;; (setq jit-lock-first-unfontify-pos end)) + ;; (when (>= jit-lock-context-unfontify-pos start) + ;; (setq jit-lock-context-unfontify-pos end)) ;; Wait a little if load is too high. (when (and jit-lock-stealth-load @@ -466,9 +469,9 @@ This functions is called after Emacs has been idle for (defun jit-lock-deferred-fontify () "Fontify what was deferred." - (when jit-lock-buffers + (when jit-lock-defer-buffers ;; Mark the deferred regions back to `fontified = nil' - (dolist (buffer jit-lock-buffers) + (dolist (buffer jit-lock-defer-buffers) (when (buffer-live-p buffer) (with-current-buffer buffer ;; (message "Jit-Defer %s" (buffer-name)) @@ -482,7 +485,7 @@ This functions is called after Emacs has been idle for pos 'fontified nil (point-max))) 'fontified nil)) (setq pos (next-single-property-change pos 'fontified))))))))) - (setq jit-lock-buffers nil) + (setq jit-lock-defer-buffers nil) ;; Force fontification of the visible parts. (let ((jit-lock-defer-time nil)) ;; (message "Jit-Defer Now") @@ -491,6 +494,36 @@ This functions is called after Emacs has been idle for ))) +(defun jit-lock-context-fontify () + "Refresh fontification to take new context into account." + (dolist (buffer (buffer-list)) + (with-current-buffer buffer + (when jit-lock-context-unfontify-pos + ;; (message "Jit-Context %s" (buffer-name)) + (save-restriction + (widen) + (when (and (>= jit-lock-context-unfontify-pos (point-min)) + (< jit-lock-context-unfontify-pos (point-max))) + ;; If we're in text that matches a complex multi-line + ;; font-lock pattern, make sure the whole text will be + ;; redisplayed eventually. + ;; Despite its name, we treat jit-lock-defer-multiline here + ;; rather than in jit-lock-defer since it has to do with multiple + ;; lines, i.e. with context. + (when (get-text-property jit-lock-context-unfontify-pos + 'jit-lock-defer-multiline) + (setq jit-lock-context-unfontify-pos + (or (previous-single-property-change + jit-lock-context-unfontify-pos + 'jit-lock-defer-multiline) + (point-min)))) + (with-buffer-prepared-for-jit-lock + ;; Force contextual refontification. + (remove-text-properties + jit-lock-context-unfontify-pos (point-max) + '(fontified nil jit-lock-defer-multiline nil))) + (setq jit-lock-context-unfontify-pos (point-max)))))))) + (defun jit-lock-after-change (start end old-len) "Mark the rest of the buffer as not fontified after a change. Installed on `after-change-functions'. @@ -522,10 +555,11 @@ will take place when text is fontified stealthily." ;; Request refontification. (put-text-property start end 'fontified nil)) ;; Mark the change for deferred contextual refontification. - (when jit-lock-first-unfontify-pos - (setq jit-lock-first-unfontify-pos - (min jit-lock-first-unfontify-pos start)))))) + (when jit-lock-context-unfontify-pos + (setq jit-lock-context-unfontify-pos + (min jit-lock-context-unfontify-pos start)))))) (provide 'jit-lock) +;;; arch-tag: 56b5de6e-f581-453b-bb97-49c39372ff9e ;;; jit-lock.el ends here diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index 3d14089349..fa852bd19b 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el @@ -1,6 +1,6 @@ ;;; jka-compr.el --- reading/writing/loading compressed files -;; Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: jka@ece.cmu.edu (Jay K. Adams) ;; Maintainer: FSF @@ -138,6 +138,10 @@ for `jka-compr-compression-info-list')." "bzip2ing" "bzip2" nil "bunzip2ing" "bzip2" ("-d") nil t "BZh"] + ["\\.tbz\\'" + "bzip2ing" "bzip2" nil + "bunzip2ing" "bzip2" ("-d") + nil nil "BZh"] ["\\.tgz\\'" "zipping" "gzip" ("-c" "-q") "unzipping" "gzip" ("-c" "-q" "-d") @@ -145,7 +149,14 @@ for `jka-compr-compression-info-list')." ["\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'" "zipping" "gzip" ("-c" "-q") "unzipping" "gzip" ("-c" "-q" "-d") - t t "\037\213"]) + t t "\037\213"] + ;; dzip is gzip with random access. Its compression program can't + ;; read/write stdin/out, so .dz files can only be viewed without + ;; saving, having their contents decompressed with gzip. + ["\\.dz\\'" + nil nil nil + "unzipping" "gzip" ("-c" "-q" "-d") + nil t "\037\213"]) "List of vectors that describe available compression techniques. Each element, which describes a compression technique, is a vector of @@ -160,6 +171,7 @@ APPEND-FLAG STRIP-EXTENSION-FLAG FILE-MAGIC-CHARS], where: type of compression (nil means no message) compress-program is a program that performs this compression + (nil means visit file in read-only mode) compress-args is a list of args to pass to the compress program @@ -199,7 +211,7 @@ invoked." :group 'jka-compr) (defcustom jka-compr-mode-alist-additions - (list (cons "\\.tgz\\'" 'tar-mode)) + (list (cons "\\.tgz\\'" 'tar-mode) (cons "\\.tbz\\'" 'tar-mode)) "A list of pairs to add to `auto-mode-alist' when jka-compr is installed." :type '(repeat (cons string symbol)) :group 'jka-compr) @@ -356,7 +368,7 @@ to keep: LEN chars starting BEG chars from the beginning." (jka-compr-delete-temp-file err-file))) - (or (zerop + (or (eq 0 (apply 'call-process prog infile @@ -421,10 +433,7 @@ There should be no more than seven characters after the final `/'." (let ((can-append (jka-compr-info-can-append info)) (compress-program (jka-compr-info-compress-program info)) (compress-message (jka-compr-info-compress-message info)) - (uncompress-program (jka-compr-info-uncompress-program info)) - (uncompress-message (jka-compr-info-uncompress-message info)) (compress-args (jka-compr-info-compress-args info)) - (uncompress-args (jka-compr-info-uncompress-args info)) (base-name (file-name-nondirectory visit-file)) temp-file temp-buffer ;; we need to leave `last-coding-system-used' set to its @@ -432,6 +441,9 @@ There should be no more than seven characters after the final `/'." ;; that `basic-save-buffer' sees the right value. (coding-system-used last-coding-system-used)) + (or compress-program + (error "No compression program defined")) + (setq temp-buffer (get-buffer-create " *jka-compr-wr-temp*")) (with-current-buffer temp-buffer (widen) (erase-buffer)) @@ -590,10 +602,11 @@ There should be no more than seven characters after the final `/'." (file-exists-p local-copy) (delete-file local-copy))) - (decode-coding-inserted-region - (point) (+ (point) size) - (jka-compr-byte-compiler-base-file-name file) - visit beg end replace) + (unless notfound + (decode-coding-inserted-region + (point) (+ (point) size) + (jka-compr-byte-compiler-base-file-name file) + visit beg end replace)) (and visit @@ -630,6 +643,9 @@ There should be no more than seven characters after the final `/'." ;;; (setq size insval))) ;;; (setq p (cdr p)))) + (or (jka-compr-info-compress-program info) + (message "You can't save this buffer because compression program is not defined")) + (list filename size)) (jka-compr-run-real-handler 'insert-file-contents @@ -940,4 +956,5 @@ Returns the new status of auto compression (non-nil means on)." (provide 'jka-compr) +;;; arch-tag: 3f15b630-e9a7-46c4-a22a-94afdde86ebc ;;; jka-compr.el ends here diff --git a/lisp/kermit.el b/lisp/kermit.el index a11163133b..cf56a6216b 100644 --- a/lisp/kermit.el +++ b/lisp/kermit.el @@ -149,4 +149,5 @@ command `kermit | tr -d '\\015''." (provide 'kermit) +;;; arch-tag: 6633215d-6c47-4e66-9f27-16fba02a8dce ;;; kermit.el ends here diff --git a/lisp/kmacro.el b/lisp/kmacro.el index a4cb27f528..a129ab53ce 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -174,29 +174,37 @@ macro to be executed before appending to it." (defvar kmacro-keymap (let ((map (make-sparse-keymap))) + ;; Start, end, execute macros (define-key map "s" 'kmacro-start-macro) + (define-key map "\C-s" 'kmacro-start-macro) (define-key map "\C-k" 'kmacro-end-or-call-macro-repeat) - (define-key map "\C-e" 'kmacro-edit-macro-repeat) - (define-key map "\r" 'kmacro-edit-macro) - (define-key map " " 'kmacro-step-edit-macro) - (define-key map "l" 'kmacro-edit-lossage) - (define-key map "\C-i" 'kmacro-insert-counter) - (define-key map "\C-a" 'kmacro-add-counter) - (define-key map "\C-v" 'kmacro-view-macro-repeat) - (define-key map "\C-l" 'kmacro-call-ring-2nd-repeat) - (define-key map "\C-r" 'kmacro-view-ring-2nd) + (define-key map "r" 'apply-macro-to-region-lines) + (define-key map "q" 'kbd-macro-query) ;; Like C-x q + + ;; macro ring (define-key map "\C-n" 'kmacro-cycle-ring-next) (define-key map "\C-p" 'kmacro-cycle-ring-previous) + (define-key map "\C-v" 'kmacro-view-macro-repeat) + (define-key map "\C-d" 'kmacro-delete-ring-head) + (define-key map "\C-t" 'kmacro-swap-ring) + (define-key map "\C-l" 'kmacro-call-ring-2nd-repeat) + + ;; macro counter (define-key map "\C-f" 'kmacro-set-format) (define-key map "\C-c" 'kmacro-set-counter) - (define-key map "\C-t" 'kmacro-swap-ring) + (define-key map "\C-i" 'kmacro-insert-counter) + (define-key map "\C-a" 'kmacro-add-counter) + + ;; macro editing + (define-key map "\C-e" 'kmacro-edit-macro-repeat) + (define-key map "\r" 'kmacro-edit-macro) + (define-key map "e" 'edit-kbd-macro) + (define-key map "l" 'kmacro-edit-lossage) + (define-key map " " 'kmacro-step-edit-macro) + + ;; naming and binding (define-key map "b" 'kmacro-bind-to-key) - (define-key map "\C-d" 'kmacro-delete-ring-head) - ;; Compatibility bindings - (define-key map "q" 'kbd-macro-query) (define-key map "n" 'name-last-kbd-macro) - (define-key map "e" 'edit-kbd-macro) - (define-key map "r" 'apply-macro-to-region-lines) map) "Keymap for keyboard macro commands.") (defalias 'kmacro-keymap kmacro-keymap) @@ -229,13 +237,18 @@ macro to be executed before appending to it." (defvar kmacro-counter-value-start kmacro-counter "Macro counter at start of macro execution.") -(defvar kmacro-last-counter 0 "Last counter inserted by key macro.") +(defvar kmacro-last-counter 0 + "Last counter inserted by key macro.") + +(defvar kmacro-initial-counter-value nil + "Initial counter value for the next keyboard macro to be defined.") (defun kmacro-insert-counter (arg) "Insert macro counter and increment with ARG or 1 if missing. With \\[universal-argument], insert previous kmacro-counter (but do not modify counter)." (interactive "P") + (setq kmacro-initial-counter-value nil) (if (and arg (listp arg)) (insert (format kmacro-counter-format kmacro-last-counter)) (insert (format kmacro-counter-format kmacro-counter)) @@ -260,12 +273,16 @@ With \\[universal-argument], insert previous kmacro-counter (but do not modify c (defun kmacro-set-counter (arg) "Set kmacro-counter to ARG or prompt if missing. -With \\[universal-argument], reset counter to its value prior to this iteration of the macro." +With \\[universal-argument] prefix, reset counter to its value prior to this iteration of the macro." (interactive "NMacro counter value: ") (setq kmacro-last-counter kmacro-counter kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg)) kmacro-counter-value-start arg)) + ;; setup initial macro counter value if we are not executing a macro. + (setq kmacro-initial-counter-value + (and (not (or defining-kbd-macro executing-kbd-macro)) + kmacro-counter)) (unless executing-kbd-macro (kmacro-display-counter))) @@ -274,6 +291,7 @@ With \\[universal-argument], reset counter to its value prior to this iteration "Add numeric prefix arg (prompt if missing) to macro counter. With \\[universal-argument], restore previous counter value." (interactive "NAdd to macro counter: ") + (setq kmacro-initial-counter-value nil) (let ((last kmacro-last-counter)) (setq kmacro-last-counter kmacro-counter kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg)) @@ -303,6 +321,11 @@ the macro ring (when defining or executing) is not stored in the ring; instead it is available in the variables `last-kbd-macro', `kmacro-counter', and `kmacro-counter-format'.") +;; Remember what we are currently looking at with kmacro-view-macro. + +(defvar kmacro-view-last-item nil) +(defvar kmacro-view-item-no 0) + (defun kmacro-ring-head () "Return pseudo head element in macro ring." @@ -361,8 +384,11 @@ Check only `last-kbd-macro' if optional arg NONE is non-nil." (t nil))) -(defun kmacro-display (macro &optional trunc descr empty ) - "Display a keyboard MACRO." +(defun kmacro-display (macro &optional trunc descr empty) + "Display a keyboard MACRO. +Optional arg TRUNC non-nil specifies to limit width of macro to 60 chars. +Optional arg DESCR is descriptive text for macro; default is \"Macro:\". +Optional arg EMPTY is message to print if no macros are defined." (if macro (let* ((x 60) (m (format-kbd-macro macro)) @@ -410,19 +436,26 @@ Check only `last-kbd-macro' if optional arg NONE is non-nil." keys))) +(defun kmacro-exec-ring-item (item arg) + "Execute item ITEM from the macro ring." + ;; Use counter and format specific to the macro on the ring! + (let ((kmacro-counter (nth 1 item)) + (kmacro-counter-format-start (nth 2 item))) + (execute-kbd-macro (car item) arg #'kmacro-loop-setup-function) + (setcar (cdr item) kmacro-counter))) + + (defun kmacro-call-ring-2nd (arg) "Execute second keyboard macro at in macro ring." (interactive "P") (unless (kmacro-ring-empty-p) - ;; should use counter format specific to the macro on the ring! - (let ((kmacro-counter (nth 1 (car kmacro-ring))) - (kmacro-counter-format-start (nth 2 (car kmacro-ring)))) - (execute-kbd-macro (car (car kmacro-ring)) arg #'kmacro-loop-setup-function) - (setcar (cdr (car kmacro-ring)) kmacro-counter)))) + (kmacro-exec-ring-item (car kmacro-ring) arg))) (defun kmacro-call-ring-2nd-repeat (arg) - "Like `kmacro-call-ring-2nd', but allow repeat without repeating prefix." + "Execute second keyboard macro at in macro ring. +This is like `kmacro-call-ring-2nd', but allows repeating macro commands +without repeating the prefix." (interactive "P") (let ((keys (kmacro-get-repeat-prefix))) (kmacro-call-ring-2nd arg) @@ -439,7 +472,6 @@ Check only `last-kbd-macro' if optional arg NONE is non-nil." (kmacro-display (car (car kmacro-ring)) "2nd macro"))) - (defun kmacro-cycle-ring-next (&optional arg) "Move to next keyboard macro in keyboard macro ring. Displays the selected macro in the echo area." @@ -533,7 +565,10 @@ The format of the counter can be modified via \\[kmacro-set-format]." kmacro-ring)) (if (>= len kmacro-ring-max) (setcdr (nthcdr len kmacro-ring) nil)))) - (setq kmacro-counter (if arg (prefix-numeric-value arg) 0) + (setq kmacro-counter (or (if arg (prefix-numeric-value arg)) + kmacro-initial-counter-value + 0) + kmacro-initial-counter-value nil kmacro-counter-value-start kmacro-counter kmacro-last-counter kmacro-counter kmacro-counter-format-start kmacro-counter-format)) @@ -574,7 +609,7 @@ command. See `kmacro-call-repeat-key' and `kmacro-call-repeat-with-arg' for details on how to adjust or disable this behaviour. To make a macro permanent so you can call it even after defining -others, use M-x name-last-kbd-macro." +others, use \\[name-last-kbd-macro]." (interactive "p") (let ((repeat-key (and (null no-repeat) (> (length (this-single-command-keys)) 1) @@ -645,6 +680,9 @@ With \\[universal-argument], call second macro in macro ring." (if kmacro-call-repeat-key (kmacro-call-macro arg no-repeat t) (kmacro-end-macro arg))) + ((and (eq this-command 'kmacro-view-macro) ;; We are in repeat mode! + kmacro-view-last-item) + (kmacro-exec-ring-item (car kmacro-view-last-item) arg)) ((and arg (listp arg)) (kmacro-call-ring-2nd 1)) (t @@ -689,34 +727,97 @@ If kbd macro currently being defined end it before activating it." ;;; Misc. commands +;; An idea for macro bindings: +;; Create a separate keymap installed as a minor-mode keymap (e.g. in +;; the emulation-mode-map-alists) in which macro bindings are made +;; independent of any other bindings. When first binding is made, +;; the kemap is created, installed, and enabled. Key seq. C-x C-k + +;; can then be used to toggle the use of this keymap on and off. +;; This means that it would be safe(r) to bind ordinary keys like +;; letters and digits, provided that we inhibit the keymap while +;; executing the macro later on (but that's controversial...) + (defun kmacro-bind-to-key (arg) - "When not defining or executing a macro, offer to bind last macro to a key." + "When not defining or executing a macro, offer to bind last macro to a key. +The key sequences [C-x C-k 0] through [C-x C-k 9] and [C-x C-k A] +through [C-x C-k Z] are reserved for user bindings, and to bind to +one of these sequences, just enter the digit or letter, rather than +the whole sequence. + +You can bind to any valid key sequence, but if you try to bind to +a key with an existing command binding, you will be asked for +confirmation whether to replace that binding. Note that the +binding is made in the `global-map' keymap, so the macro binding +may be shaded by a local key binding." (interactive "p") (if (or defining-kbd-macro executing-kbd-macro) (if defining-kbd-macro (message "Cannot save macro while defining it.")) (unless last-kbd-macro (error "No keyboard macro defined")) - (let ((key-seq (read-key-sequence "Bind last macro to key: "))) - (unless (equal key-seq "") - (define-key global-map key-seq last-kbd-macro))))) + (let ((key-seq (read-key-sequence "Bind last macro to key: ")) + ok cmd) + (when (= (length key-seq) 1) + (let ((ch (aref key-seq 0))) + (if (or (and (>= ch ?0) (<= ch ?9)) + (and (>= ch ?A) (<= ch ?Z))) + (setq key-seq (concat "\C-x\C-k" key-seq) + ok t)))) + (when (and (not (equal key-seq "")) + (or ok + (not (setq cmd (key-binding key-seq))) + (stringp cmd) + (vectorp cmd) + (yes-or-no-p (format "%s runs command %S. Bind anyway? " + (format-kbd-macro key-seq) + cmd)))) + (define-key global-map key-seq last-kbd-macro) + (message "Keyboard macro bound to %s" (format-kbd-macro key-seq)))))) (defun kmacro-view-macro (&optional arg) - "Display the last keyboard macro." + "Display the last keyboard macro. +If repeated, it shows previous elements in the macro ring." (interactive) - (kmacro-display last-kbd-macro)) - + (cond + ((or (kmacro-ring-empty-p) + (not (eq last-command 'kmacro-view-macro))) + (setq kmacro-view-last-item nil)) + ((null kmacro-view-last-item) + (setq kmacro-view-last-item kmacro-ring + kmacro-view-item-no 2)) + ((consp kmacro-view-last-item) + (setq kmacro-view-last-item (cdr kmacro-view-last-item) + kmacro-view-item-no (1+ kmacro-view-item-no))) + (t + (setq kmacro-view-last-item nil))) + (setq this-command 'kmacro-view-macro + last-command this-command) ;; in case we repeat + (kmacro-display (if kmacro-view-last-item + (car (car kmacro-view-last-item)) + last-kbd-macro) + nil + (if kmacro-view-last-item + (concat (cond ((= kmacro-view-item-no 2) "2nd") + ((= kmacro-view-item-no 3) "3nd") + (t (format "%dth" kmacro-view-item-no))) + " previous macro") + "Last macro"))) (defun kmacro-view-macro-repeat (&optional arg) - "Like `kmacro-view-macro', but allow repeat without repeating prefix." + "Display the last keyboard macro. +If repeated, it shows previous elements in the macro ring. +To execute the displayed macro ring item without changing the macro ring, +just enter C-k. +This is like `kmacro-view-macro', but allows repeating macro commands +without repeating the prefix." (interactive) (let ((keys (kmacro-get-repeat-prefix))) (kmacro-view-macro arg) (if (and last-kbd-macro keys) (kmacro-repeat-on-last-key keys)))) -(put 'kmacro-view-macro-repeat 'kmacro-repeat 'head) +(put 'kmacro-view-macro-repeat 'kmacro-repeat 'ring) (defun kmacro-edit-macro-repeat (&optional arg) @@ -1104,4 +1205,6 @@ To customize possible responses, change the \"bindings\" in `kmacro-step-edit-ma (setq last-kbd-macro kmacro-step-edit-new-macro)))) (provide 'kmacro) + +;;; arch-tag: d3fe0b24-ae41-47de-a4d6-41a77d5559f0 ;;; kmacro.el ends here diff --git a/lisp/language/china-util.el b/lisp/language/china-util.el index 3f6dee9488..03b41af703 100644 --- a/lisp/language/china-util.el +++ b/lisp/language/china-util.el @@ -190,4 +190,5 @@ Return the length of resulting text." ;; (provide 'china-util) +;;; arch-tag: 5a47b084-b9ac-420e-8191-70c5b3a14836 ;;; china-util.el ends here diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el index 2b96a9f8f4..7e03ed40dd 100644 --- a/lisp/language/chinese.el +++ b/lisp/language/chinese.el @@ -107,7 +107,8 @@ (input-method . "chinese-py-punct") (features china-util) (sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B") - (documentation . "Support for Chinese GB2312 character set.")) + (documentation . "Support for Chinese GB2312 character set.") + (tutorial . "TUTORIAL.cn")) '("Chinese")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -131,7 +132,8 @@ (input-method . "chinese-py-punct-b5") (features china-util) (sample-text . "Cantonese ($(0GnM$(B,$(0N]0*Hd(B) $(0*/=((B, $(0+$)p(B") - (documentation . "Support for Chinese Big5 character set.")) + (documentation . "Support for Chinese Big5 character set.") + (tutorial . "TUTORIAL.zh")) '("Chinese")) (define-coding-system 'chinese-big5-hkscs @@ -253,4 +255,5 @@ converted to CNS).")) (provide 'chinese) +;;; arch-tag: b82fcf7a-84f6-4e0b-b38c-1742dac0e09f ;;; chinese.el ends here diff --git a/lisp/language/cyril-util.el b/lisp/language/cyril-util.el index 5d53f224a0..1a5c435328 100644 --- a/lisp/language/cyril-util.el +++ b/lisp/language/cyril-util.el @@ -193,4 +193,5 @@ If the argument is nil, we return the display table to its standard state." ;; coding: iso-2022-7bit ;; End: +;;; arch-tag: f6d9dd5d-685c-45d6-a5d8-1e2178228b7e ;;; cyril-util.el ends here diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el index f95a5427a1..e879b4d0b1 100644 --- a/lisp/language/cyrillic.el +++ b/lisp/language/cyrillic.el @@ -122,6 +122,23 @@ Support for Russian using koi8-r and the russian-computer input method.") (tutorial . "TUTORIAL.ru")) '("Cyrillic")) +(define-coding-system 'koi8-u + "KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)" + :coding-type 'charset + :mnemonic ?U + :charset-list '(koi8-u) + :mime-charset 'koi8-u) + +(set-language-info-alist + "Ukrainian" `((charset koi8-u) + (coding-system koi8-u) + (coding-priority koi8-u) + (nonascii-translation . koi8-u) + (input-method . "ukrainian-computer") + (documentation + . "Support for Ukrainian with KOI8-U character set.")) + '("Cyrillic")) + ;;; ALTERNATIVNYJ stuff (define-coding-system 'cyrillic-alternativnyj @@ -220,13 +237,20 @@ Support for Russian using koi8-r and the russian-computer input method.") (documentation . "Support for Tajik using KOI8-T.")) '("Cyrillic")) +(let ((elt `("microsoft-cp1251" windows-1251 1 + ,(get 'encode-windows-1251 'translation-table))) + (slot (assoc "microsoft-cp1251" ctext-non-standard-encodings-alist))) + (if slot + (setcdr slot (cdr elt)) + (push elt ctext-non-standard-encodings-alist))) + (set-language-info-alist "Bulgarian" `((coding-system windows-1251) (coding-priority windows-1251) (nonascii-translation . windows-1251) (charset windows-1251) + (ctext-non-standard-encodings "microsoft-cp1251") (input-method . "bulgarian-bds") - (features code-pages) (documentation . "Support for Bulgrian with windows-1251 character set.")) '("Cyrillic")) @@ -236,8 +260,8 @@ Support for Russian using koi8-r and the russian-computer input method.") (coding-priority windows-1251) (nonascii-translation . windows-1251) (charset windows-1251) + (ctext-non-standard-encodings "microsoft-cp1251") (input-method . "belarusian") - (features code-pages) (documentation . "Support for Belarusian with windows-1251 character set. \(The name Belarusian replaced Byelorussian in the early 1990s.)")) @@ -253,4 +277,5 @@ Support for Russian using koi8-r and the russian-computer input method.") (provide 'cyrillic) +;;; arch-tag: bda71ae0-ba41-4cb6-a6e0-1dff542313d3 ;;; cyrillic.el ends here diff --git a/lisp/language/czech.el b/lisp/language/czech.el index 0d3cb342d4..9aca0d16d4 100644 --- a/lisp/language/czech.el +++ b/lisp/language/czech.el @@ -46,4 +46,5 @@ and selects the Czech tutorial.")) (provide 'czech) +;;; arch-tag: 45ac0d83-ca13-4b5e-9e82-821e44080c24 ;;; czech.el ends here diff --git a/lisp/language/devan-util.el b/lisp/language/devan-util.el index 4e3fbc9a25..64dbf576af 100644 --- a/lisp/language/devan-util.el +++ b/lisp/language/devan-util.el @@ -85,6 +85,7 @@ (devanagari-compose-region (point-min) (point-max)) (buffer-string))) +;;;###autoload (defun devanagari-post-read-conversion (len) (save-excursion (save-restriction @@ -586,19 +587,14 @@ preferred rule from the sanskrit fonts." ) (setq preceding-r t) (goto-char (+ 2 (point)))) ;; translate the rest characters into glyphs - (while (not (eobp)) - (if (looking-at dev-char-glyph-regexp) - (let ((end (match-end 0))) - (setq match-str (match-string 0) - glyph-str - (concat glyph-str - (gethash match-str dev-char-glyph-hash))) - ;; count the number of consonant-glyhs. - (if (string-match devanagari-consonant match-str) - (setq cons-num (1+ cons-num))) - (goto-char end)) - (setq glyph-str (concat glyph-str (string (following-char)))) - (forward-char 1))) + (while (re-search-forward dev-char-glyph-regexp nil t) + (setq match-str (match-string 0)) + (setq glyph-str + (concat glyph-str + (gethash match-str dev-char-glyph-hash))) + ;; count the number of consonant-glyhs. + (if (string-match devanagari-consonant match-str) + (setq cons-num (1+ cons-num)))) ;; preceding-r must be attached before the anuswar if exists. (if preceding-r (if last-modifier @@ -652,4 +648,5 @@ preferred rule from the sanskrit fonts." ) (provide 'devan-util) +;;; arch-tag: 9bc4d6e3-f2b9-4110-886e-ff9b66b7eebc ;;; devan-util.el ends here diff --git a/lisp/language/devanagari.el b/lisp/language/devanagari.el index 94f11b403d..6b1ff46a0a 100644 --- a/lisp/language/devanagari.el +++ b/lisp/language/devanagari.el @@ -51,4 +51,5 @@ are supported in this language environment.")) (provide 'devanagari) +;;; arch-tag: fd13667d-868b-41e8-81ef-79dd28bbfed2 ;;; devanagari.el ends here diff --git a/lisp/language/english.el b/lisp/language/english.el index 342dea6da9..6d13519746 100644 --- a/lisp/language/english.el +++ b/lisp/language/english.el @@ -65,4 +65,5 @@ Nothing special is needed to handle English.") (set-language-info-alist "ASCII" (cdr (assoc "English" language-info-alist))) +;;; arch-tag: e440bdb0-91b0-4fb4-ae38-425780f8f745 ;;; english.el ends here diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el index 3b59ddca66..5a81f59f9d 100644 --- a/lisp/language/ethio-util.el +++ b/lisp/language/ethio-util.el @@ -417,6 +417,9 @@ If nil, use uppercases.") nil nil nil nil nil ]) +;; To avoid byte-compiler warnings. It should never be set globally. +(defvar ethio-sera-being-called-by-w3) + ;;;###autoload (defun ethio-sera-to-fidel-region (beg end &optional secondary force) "Convert the characters in region from SERA to FIDEL. @@ -587,8 +590,8 @@ the conversion of \"a\"." (cond ;; skip from "<" to ">" (or from "&" to ";") if in w3-mode - ((and (boundp 'sera-being-called-by-w3) - sera-being-called-by-w3 + ((and (boundp 'ethio-sera-being-called-by-w3) + ethio-sera-being-called-by-w3 (or (= ch ?<) (= ch ?&))) (search-forward (if (= ch ?<) ">" ";") nil 0)) @@ -1174,8 +1177,8 @@ See also the descriptions of the variables (goto-char (1+ (match-end 0)))) ; because we inserted one byte (\) ;; skip from "<" to ">" (or from "&" to ";") if called from w3 - ((and (boundp 'sera-being-called-by-w3) - sera-being-called-by-w3 + ((and (boundp 'ethio-sera-being-called-by-w3) + ethio-sera-being-called-by-w3 (or (= ch ?<) (= ch ?&))) (search-forward (if (= ch ?<) ">" ";") nil 0)) @@ -1826,7 +1829,7 @@ Otherwise, [0-9A-F]." ;;;###autoload (defun ethio-find-file nil - "Transcribe file content into Ethiopic dependig on filename suffix." + "Transcribe file content into Ethiopic depending on filename suffix." (cond ((string-match "\\.sera$" (buffer-file-name)) @@ -1835,7 +1838,7 @@ Otherwise, [0-9A-F]." (set-buffer-modified-p nil))) ((string-match "\\.html$" (buffer-file-name)) - (let ((sera-being-called-by-w3 t)) + (let ((ethio-sera-being-called-by-w3 t)) (save-excursion (ethio-sera-to-fidel-marker 'force) (goto-char (point-min)) @@ -1872,7 +1875,7 @@ Otherwise, [0-9A-F]." ((string-match "\\.html$" (buffer-file-name)) (save-excursion - (let ((sera-being-called-by-w3 t) + (let ((ethio-sera-being-called-by-w3 t) (lq (aref ethio-fidel-to-sera-map 461)) (rq (aref ethio-fidel-to-sera-map 462))) (aset ethio-fidel-to-sera-map 461 "«te;") @@ -2005,4 +2008,5 @@ mark." ;; (provide 'ethio-util) +;;; arch-tag: c8feb3d6-39bf-4b0a-b6ef-26f03fbc8140 ;;; ethio-util.el ends here diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el index b198cf4308..a0140b585f 100644 --- a/lisp/language/ethiopic.el +++ b/lisp/language/ethiopic.el @@ -80,4 +80,5 @@ (provide 'ethiopic) +;;; arch-tag: e81329d9-1286-43ba-92fd-54ce5c7b213c ;;; ethiopic.el ends here diff --git a/lisp/language/european.el b/lisp/language/european.el index 2035d47948..3da1850a71 100644 --- a/lisp/language/european.el +++ b/lisp/language/european.el @@ -28,9 +28,8 @@ ;;; Commentary: -;; For European scripts, character sets ISO8859-1,2,3,4,9,10,13,14,15, -;; windows-1250,2,4,7, mac-roman, adobe-standard-encoding, cp850 and -;; next are supported. +;; For European scripts, all the ISO Latin character sets are +;; supported, along with various others. ;;; Code: @@ -272,7 +271,7 @@ covered by other ISO-8859 character sets: (unibyte-display . iso-latin-9) (input-method . "latin-9-prefix") (sample-text - . "AVE. ,b&(48<=>(B ,b$(B") + . "AVE. ,B)9.>,b<=,_/(B ,b$(B") (documentation . "\ This language environment is a generic one for the Latin-9 (ISO-8859-15) character set which supports the same languages as Latin-1 with the @@ -484,7 +483,7 @@ and it selects the Spanish tutorial.")) (nonascii-translation . iso-8859-9) (unibyte-display . iso-latin-5) (input-method . "turkish-postfix") - (sample-text . "Turkish (T,M|(Brk,Mg(Be) Merhaba") + (sample-text . "Turkish (T,A|(Brk,Ag(Be) Merhaba") (setup-function . (lambda () (set-case-syntax-pair ?I ?,C9(B (standard-case-table)) @@ -510,7 +509,7 @@ method and applying Turkish case rules for the characters i, I, ,C9(B, ,C)(B (nonascii-translation . iso-8859-2) (unibyte-display . iso-8859-2) (tutorial . "TUTORIAL.pl") - (sample-text . "P,Bs(Bjd,B<(B, ki,Bq(B-,B?(Be t,Bj(B chmurno,B6f(B w g,B31(Bb flaszy") + (sample-text . "P,As(Bjd,B<(B, ki,Bq(B-,B?(Be t,Bj(B chmurno,B6f(B w g,B31(Bb flaszy") (documentation . t)) '("European")) @@ -724,4 +723,5 @@ or nil if no characters are composed." (provide 'european) +;;; arch-tag: 9e018b12-fb02-4120-907b-9adeaf84b5c2 ;;; european.el ends here diff --git a/lisp/language/georgian.el b/lisp/language/georgian.el index f38529d20a..40f84c0dc6 100644 --- a/lisp/language/georgian.el +++ b/lisp/language/georgian.el @@ -49,4 +49,5 @@ (provide 'georgian) +;;; arch-tag: 15499fbb-26d4-4a13-9d78-135eef7d32f5 ;;; georgian.el ends here diff --git a/lisp/language/greek.el b/lisp/language/greek.el index 6061ed203c..e3625b4c7c 100644 --- a/lisp/language/greek.el +++ b/lisp/language/greek.el @@ -82,4 +82,5 @@ (provide 'greek) +;;; arch-tag: 9ba48d79-84bc-45e1-9318-685dc3921410 ;;; greek.el ends here diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el index 871ec1b223..bc59d23b3e 100644 --- a/lisp/language/hebrew.el +++ b/lisp/language/hebrew.el @@ -85,4 +85,5 @@ Right-to-left writing is not yet supported."))) (provide 'hebrew) +;;; arch-tag: 3ca04f32-3f1e-498e-af46-8267498ba5d9 ;;; hebrew.el ends here diff --git a/lisp/language/ind-util.el b/lisp/language/ind-util.el index 862ebf39e8..80be2a97e1 100644 --- a/lisp/language/ind-util.el +++ b/lisp/language/ind-util.el @@ -714,9 +714,10 @@ FUNCTION will be called 15 times." (ucs-oriya-to-is13194-alist nil) (ucs-tamil-to-is13194-alist nil) (ucs-telugu-to-is13194-alist nil) - (ucs-malayalam-to-is13194-alist nil)) + (ucs-malayalam-to-is13194-alist nil) + (ucs-kannada-to-is13194-alist nil)) (dolist (script '(devanagari bengali assamese gurmukhi gujarati - oriya tamil telugu malayalam)) + oriya tamil telugu malayalam kannada)) (let ((hashtable (intern (concat "is13194-to-ucs-" (symbol-name script) "-hashtbl" ))) (regexp (intern (concat "is13194-to-ucs-" @@ -764,6 +765,8 @@ FUNCTION will be called 15 times." (defvar is13194-to-ucs-telugu-regexp nil) (defvar is13194-to-ucs-malayalam-hashtbl nil) (defvar is13194-to-ucs-malayalam-regexp nil) +(defvar is13194-to-ucs-kannada-hashtbl nil) +(defvar is13194-to-ucs-kannada-regexp nil) (defvar ucs-to-is13194-regexp ;; only Devanagari is supported now. @@ -1221,4 +1224,5 @@ Returns new end position." (provide 'ind-util) +;;; arch-tag: 59aacd71-46c2-4cb3-bb26-e12bbad55545 ;;; ind-util.el ends here diff --git a/lisp/language/indian.el b/lisp/language/indian.el index d7b4c365bc..a15df9c45a 100644 --- a/lisp/language/indian.el +++ b/lisp/language/indian.el @@ -157,4 +157,5 @@ The default value is `devanagari'.") (provide 'indian) +;;; arch-tag: 83aa8fc7-7ee2-4364-a6e5-498f5e3b8c2f ;;; indian.el ends here diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el index 7c2cc06924..e9a80fc99a 100644 --- a/lisp/language/japan-util.el +++ b/lisp/language/japan-util.el @@ -320,4 +320,5 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading." ;; (provide 'japan-util) +;;; arch-tag: b579595c-c9ad-4b57-9314-98cd8b214f89 ;;; japan-util.el ends here diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el index 961e724e96..b4ec979d42 100644 --- a/lisp/language/japanese.el +++ b/lisp/language/japanese.el @@ -244,4 +244,5 @@ eucJP-ms is defined in ." (provide 'japanese) +;;; arch-tag: 450f5537-9d53-4d5e-b731-4cf116d8cbc9 ;;; japanese.el ends here diff --git a/lisp/language/kannada.el b/lisp/language/kannada.el new file mode 100644 index 0000000000..1a3575f24d --- /dev/null +++ b/lisp/language/kannada.el @@ -0,0 +1,54 @@ +;;; kannada.el --- Support for Kannada -*- coding: iso-2022-7bit; no-byte-compile: t -*- + +;; Copyright (C) 2003 Free Software Foundation, Inc. + +;; Maintainer: CHOWKSEY, Kailash C. +;; Keywords: multilingual, Indian, Kannada + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This file defines language-info of Kannada script. + +;;; Code: + +(set-language-info-alist + "Kannada" '((charset mule-unicode-0100-24ff indian-is13194 + indian-2-column indian-glyph ;; comment out later + ) + (coding-system mule-utf-8) + (coding-priority mule-utf-8) + (input-method . "kannada-itrans") + (features knd-util) + (sample-text + . (kannada-compose-string + (copy-sequence "Kannada ($,1>u?(?M?(?!(B) $,1?(?.?8?M>u?>?0(B"))) + (documentation . "\ +Kannada language and script is supported in this language +environment.")) + '("Indian")) + +;; For automatic composition. +(set-char-table-range composition-function-table '(#x0c80 . #x0cff) + 'kannada-composition-function) + +(provide 'kannada) + +;;; arch-tag: 880ba90b-f6f5-4131-bc1d-930705b78416 +;;; kannada.el ends here diff --git a/lisp/language/knd-util.el b/lisp/language/knd-util.el new file mode 100644 index 0000000000..75e8b93d17 --- /dev/null +++ b/lisp/language/knd-util.el @@ -0,0 +1,541 @@ +;;; knd-util.el --- Support for composing Kannada characters + +;; Copyright (C) 2003 Free Software Foundation, Inc. + +;; Maintainer: Maintainer: CHOWKSEY, Kailash C. +;; Keywords: multilingual, Kannada + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;; Created: Jul. 14. 2003 + +;;; Commentary: + +;; This file provides character(Unicode) to glyph(CDAC) conversion and +;; composition of Kannada script characters. + +;;; Code: + +;;;###autoload + +;; Kannada Composable Pattern +;; C .. Consonants +;; V .. Vowel +;; H .. Virama +;; M .. Matra +;; V .. Vowel +;; (N .. Zerowidth Non Joiner) +;; (J .. Zerowidth Joiner. ) +;; 1. vowel +;; V(A)? +;; 2. syllable : maximum of 5 consecutive consonants. (e.g. kartsnya) +;; ((CH)?(CH)?(CH)?CH)?C(H|M?)? + +(defconst kannada-consonant + "[$,1>u(B-$,1?9(B]") + +(defconst kannada-consonant-needs-twirl + "[$,1>u>w(B-$,1>{>}(B-$,1>~? (B-$,1?"?$(B-$,1?+?-?0?3(B-$,1?9(B]\\($,1?M(B[$,1>u(B-$,1?9(B]\\)*[$,1?A?B?C?D>b(B]?$") + +(defconst kannada-composable-pattern + (concat + "\\([$,1>b(B-$,1>t?`>l(B]\\)\\|[$,1>c(B]" + "\\|\\(" + "\\(?:\\(?:[$,1>u(B-$,1?9(B]$,1?M(B\\)?\\(?:[$,1>u(B-$,1?9(B]$,1?M(B\\)?\\(?:[$,1>u(B-$,1?9(B]$,1?M(B\\)?[$,1>u(B-$,1?9(B]$,1?M(B\\)?" + "[$,1>u(B-$,1?9(B]\\(?:$,1?M(B\\|[$,1?>(B-$,1?M?U?C(B]?\\)?" + "\\)") + "Regexp matching a composable sequence of Kannada characters.") + +;;;###autoload +(defun kannada-compose-region (from to) + (interactive "r") + (save-excursion + (save-restriction + (narrow-to-region from to) + (goto-char (point-min)) + (while (re-search-forward kannada-composable-pattern nil t) + (kannada-compose-syllable-region (match-beginning 0) + (match-end 0)))))) +;;;###autoload +(defun kannada-compose-string (string) + (with-temp-buffer + (insert (decompose-string string)) + (kannada-compose-region (point-min) (point-max)) + (buffer-string))) + +;;;###autoload +(defun kannada-post-read-conversion (len) + (save-excursion + (save-restriction + (let ((buffer-modified-p (buffer-modified-p))) + (narrow-to-region (point) (+ (point) len)) + (kannada-compose-region (point-min) (point-max)) + (set-buffer-modified-p buffer-modified-p) + (- (point-max) (point-min)))))) + +(defun kannada-range (from to) + "Make the list of the integers of range FROM to TO." + (let (result) + (while (<= from to) (setq result (cons to result) to (1- to))) result)) + +(defun kannada-regexp-of-hashtbl-keys (hashtbl) + "Return a regular expression that matches all keys in hashtable HASHTBL." + (let ((max-specpdl-size 1000)) + (regexp-opt + (sort + (let (dummy) + (maphash (function (lambda (key val) (setq dummy (cons key dummy)))) hashtbl) + dummy) + (function (lambda (x y) (> (length x) (length y)))))))) + +(defun kannada-regexp-of-hashtbl-vals (hashtbl) + "Return a regular expression that matches all values in hashtable HASHTBL." + (let ((max-specpdl-size 1000)) + (regexp-opt + (sort + (let (dummy) + (maphash (function (lambda (key val) (setq dummy (cons val dummy)))) hashtbl) + dummy) + (function (lambda (x y) (> (length x) (length y)))))))) + +;;;###autoload +(defun kannada-composition-function (pos &optional string) + "Compose Kannada characters after the position POS. +If STRING is not nil, it is a string, and POS is an index to the string. +In this case, compose characters after POS of the string." + (if string + ;; Not yet implemented. + nil + (goto-char pos) + (if (looking-at kannada-composable-pattern) + (prog1 (match-end 0) + (kannada-compose-syllable-region pos (match-end 0)))))) + +;; Notes on conversion steps. + +;; 1. chars to glyphs +;; +;; Rules will not be applied to the virama appeared at the end of the +;; text. Also, the preceding/following "r" will be treated as special case. + +;; 2. glyphs reordering. +;; +;; The glyphs are split by virama, and each glyph groups are +;; re-ordered in the following order. +;; +;; Note that `consonant-glyph' mentioned here does not contain the +;; vertical bar (right modifier) attached at the right of the +;; consonant. +;; +;; If the glyph-group contains right modifier, +;; (1) consonant-glyphs/vowels +;; (2) spacing +;; (3) right modifier (may be matra) +;; (4) top matra +;; (5) preceding "r" +;; (7) following "r" +;; (8) bottom matra or virama. +;; +;; Otherwise, +;; (1) consonant-glyph/vowels, with nukta sign +;; (3) left matra +;; (4) top matra +;; (5) preceding "r" +;; (7) following "r" +;; (8) bottom matra or virama. +;; (2) spacing + +;; 3. glyph to glyph +;; +;; For better display, some glyph display would be tuned. + +;; 4. Composition. +;; +;; left modifiers will be attached at the left. +;; others will be attached right. + +;; Problem:: +;; Can we generalize this methods to other Indian scripts? + +(defvar knd-char-glyph + '(("$,1>e(B" . "$,43@(B") + ("$,1>f(B" . "$,43A(B") + ("$,1?>(B" . "$,44{(B") + ("$,1>g(B" . "$,43B(B") + ("$,1??(B" . nil) + ("$,1>h(B" . "$,43C(B") + ("$,1?@(B" . nil) + ("$,1>i(B" . "$,43D(B") + ("$,1?A(B" . "\$,44(B") + ("$,1>j(B" . "$,43E(B") + ("$,1?B(B" . "\$,45 (B") + ("$,1>k(B" . "$,43F4(B") + ("$,1?C(B" . "\$,45$(B") + ("$,1?`(B" . "$,43F5 (B") + ("$,1?D(B" . "\$,45%(B") + ;;("$,1>l(B" . nil) ; not implemented. + ;;("$,1?a(B" . nil) + ("$,1>n(B" . "$,43G(B") + ("$,1>o(B" . "$,43H(B") + ("$,1>p(B" . "$,43I(B") + ("$,1?F(B" . "\$,45&(B") + ("$,1?G(B" . "\$,45&4~(B") + ("$,1?H(B" . "\$,45&5'(B") + ("$,1>r(B" . "$,43J(B") + ("$,1?J(B" . "$,45&5 (B") + ("$,1>s(B" . "$,43K(B") + ("$,1?K(B" . "\$,45&5 4~(B") + ("$,1>t(B" . "$,43L(B") + ("$,1?L(B" . "\$,45((B") + ("$,1>b(B" . "$,43M(B") + ("$,1>c(B" . "$,43N(B") + ("$,1>u?M(B" . "$,43O5)(B") ("$,1>u(B" . "$,43O(B") ("$,1>u??(B" . "$,43P(B") ("$,1>u?@(B" . "$,43P4~(B") + ("$,1>v?M(B" . "$,43S5)(B") ("$,1>v(B" . "$,43S(B") ("$,1>v??(B" . "$,43T(B") ("$,1>v?@(B" . "$,43T4~(B") ("$,1>v?F(B" . "$,43S5&(B") ("$,1>v?G(B" . "$,43S5&4~(B") ("$,1>v?H(B" . "$,43S5&5'(B") ("$,1>v?J(B" . "$,43S5&5&5 (B") ("$,1>v?K(B" . "$,43S5&5&5 4~(B") ("$,1>v?L(B" . "$,43S5((B") + ("$,1>w?M(B" . "$,43V5)(B") ("$,1>w(B" . "$,43V(B") ("$,1>w??(B" . "$,43W(B") ("$,1>w?@(B" . "$,43W4~(B") + ("$,1>x?M(B" . "$,43Y5)(B") ("$,1>x(B" . "$,43Y(B") ("$,1>x??(B" . "$,43Z(B") ("$,1>x?@(B" . "$,43Z4~(B") + ("$,1>y?M(B" . "$,43\5)(B") ("$,1>y(B" . "$,43\(B") + ("$,1>z?M(B" . "$,43^5)(B") ("$,1>z(B" . "$,43^(B") ("$,1>z??(B" . "$,43_(B") ("$,1>z?@(B" . "$,43_4~(B") + ("$,1>{?M(B" . "$,43a5)(B") ("$,1>{(B" . "$,43a(B") ("$,1>{??(B" . "$,43b(B") ("$,1>{?@(B" . "$,43b4~(B") + ("$,1>|?M(B" . "$,43d5)(B") ("$,1>|(B" . "$,43d(B") ("$,1>|??(B" . "$,43f(B") ("$,1>|?@(B" . "$,43f4~(B") ("$,1>|?F(B" . "$,43e5&(B") ("$,1>|?G(B" . "$,43e5&4~(B") ("$,1>|?H(B" . "$,43e5&5'(B") ("$,1>|?J(B" . "$,43e5&5&5 (B") ("$,1>|?K(B" . "$,43e5&5&5 4~(B") ("$,1>|?L(B" . "$,43e5((B") + ("$,1>}?M(B" . "$,44a4z3h45)(B") ("$,1>}(B" . "$,44a4z3h4(B") ("$,1>}??(B" . "$,44b3h4(B") ("$,1>}?@(B" . "$,44b3h44~(B") ("$,1>}?B(B". "$,44a4z3h5 (B") ("$,1>}?J(B". "$,44a5&3h5 (B") ("$,1>}?K(B". "$,44a5&3h5 4~(B") + ("$,1>~?M(B" . "$,43j5)(B") ("$,1>~(B" . "$,43j(B") + ("$,1>?M(B" . "$,43m5)(B") ("$,1>(B" . "$,43l(B") ("$,1?#?>(B" . "$,43m4{(B") ("$,1>??(B" . "$,43n(B") ("$,1>?@(B" . "$,43n4~(B") ("$,1>?F(B" . "$,43m5&(B") ("$,1>?G(B" . "$,43m5&4~(B") ("$,1>?H(B" . "$,43m5&5'(B") ("$,1>?J(B" . "$,43m5&5&5 (B") ("$,1>?K(B" . "$,43m5&5&5 4~(B") ("$,1>?L(B" . "$,43m5((B") + ("$,1? ?M(B" . "$,43p5)(B") ("$,1? (B" . "$,43p(B") ("$,1? ??(B" . "$,43q(B") ("$,1? ?@(B" . "$,43q4~(B") + ("$,1?!?M(B" . "$,43s5)(B") ("$,1?!(B" . "$,43s(B") ("$,1?!??(B" . "$,43t(B") ("$,1?!?@(B" . "$,43t4~(B") + ("$,1?"?M(B" . "$,43v5)(B") ("$,1?"(B" . "$,43v(B") ("$,1?"??(B" . "$,43w(B") ("$,1?"?@(B" . "$,43w4~(B") + ("$,1?#?M(B" . "$,43z5)(B") ("$,1?#(B" . "$,43y(B") ("$,1?#?>(B" . "$,43z4{(B") ("$,1?#??(B" . "$,43{(B") ("$,1?#?@(B" . "$,43{4~(B") ("$,1?#?F(B" . "$,43z5&(B") ("$,1?#?G(B" . "$,43z5&4~(B") ("$,1?#?H(B" . "$,43z5&5'(B") ("$,1?#?J(B" . "$,43z5&5&5 (B") ("$,1?#?K(B" . "$,43z5&5&5 4~(B") ("$,1?#?L(B" . "$,43z5((B") + ("$,1?$?M(B" . "$,43}5)(B") ("$,1?$(B" . "$,43}(B") ("$,1?$??(B" . "$,43~(B") ("$,1?$?@(B" . "$,43~4~(B") + ("$,1?%?M(B" . "$,44B5)(B") ("$,1?%(B" . "$,44B(B") ("$,1?%??(B" . "$,44C(B") ("$,1?%?@(B" . "$,44C4~(B") + ("$,1?&?M(B" . "$,44E5)(B") ("$,1?&(B" . "$,44E(B") ("$,1?&??(B" . "$,44F(B") ("$,1?&?@(B" . "$,44F4~(B") + ("$,1?'?M(B" . "$,44H5)(B") ("$,1?'(B" . "$,44H(B") ("$,1?'??(B" . "$,44I(B") ("$,1?'?@(B" . "$,44I4~(B") + ("$,1?(?M(B" . "$,44K5)(B") ("$,1?((B" . "$,44K(B") ("$,1?(??(B" . "$,44L(B") ("$,1?(?@(B" . "$,44L4~(B") + ("$,1?*?M(B" . "$,44N5)(B") ("$,1?*(B" . "$,44N(B") ("$,1?*??(B" . "$,44O(B") ("$,1?*?@(B" . "$,44O4~(B") ("$,1?*?A(B" . "$,44N5"(B") ("$,1?*?B(B" . "$,44N5#(B") ("$,1?*?J(B" . "$,44N5&5#(B") ("$,1?*?K(B" . "$,44N5&5#4~(B") + ("$,1?+?M(B" . "$,44Q5)(B") ("$,1?+(B" . "$,44Q(B") ("$,1?+??(B" . "$,44R(B") ("$,1?+?@(B" . "$,44R4~(B") ("$,1?+?A(B" . "$,44Q5"(B") ("$,1?+?B(B" . "$,44Q5#(B") ("$,1?+?J(B" . "$,44Q5&5#(B") ("$,1?+?K(B" . "$,44Q5&5#4~(B") + ("$,1?,?M(B" . "$,44W5)(B") ("$,1?,(B" . "$,44V(B") ("$,1?,?>(B". "$,44W4{(B") ("$,1?,??(B" . "$,44X(B") ("$,1?,?@(B" . "$,44X4~(B") ("$,1?,?F(B" . "$,44W5&(B") ("$,1?,?G(B" . "$,44W5&4~(B") ("$,1?,?H(B" . "$,44W5&5'(B") ("$,1?,?J(B" . "$,44W5&5&5 (B") ("$,1?,?K(B" . "$,44W5&5&5 4~(B") ("$,1?,?L(B" . "$,44W5((B") + ("$,1?-?M(B" . "$,44Z5)(B") ("$,1?-(B" . "$,44Z(B") ("$,1?-??(B" . "$,44[(B") ("$,1?-?@(B" . "$,44[4~(B") + ("$,1?.?M(B" . "$,44h5!5)(B") ("$,1?.(B" . "$,44h4z4(B") ("$,1?.?>(B" . "$,44h4z5!4{(B") ("$,1?.??(B" . "$,44i4(B") ("$,1?.?@(B" . "$,44i44~(B") ("$,1?.?J(B". "$,44h5&5 (B") ("$,1?.?K(B". "$,44h5&5 4~(B") + ("$,1?/?M(B" . "$,44^4z5!5)(B") ("$,1?/(B" . "$,44^4z4(B") ("$,1?/?>(B" . "$,44^4z5!4{(B")("$,1?/??(B" . "$,44_4(B") ("$,1?/?@(B" . "$,44_44~(B") ("$,1?/?J(B" . "$,44^5&5 (B") ("$,1?/?K(B" . "$,44^5&5 4~(B") + ("$,1?0?M(B" . "$,44a5)(B") ("$,1?0(B" . "$,44a(B") ("$,1?0??(B" . "$,44b(B") ("$,1?0?@(B" . "$,44b4~(B") + ("$,1?0?M(B" . "$,44a5)(B") ("$,1?0(B" . "$,44a(B") ("$,1?0??(B" . "$,44b(B") ("$,1?0?@(B" . "$,44b4~(B") + ("$,1?2?M(B" . "$,44e5)(B") ("$,1?2(B" . "$,44d(B") ("$,1?2?>(B" . "$,44e4{(B") ("$,1?2??(B" . "$,44f(B") ("$,1?2?@(B" . "$,44f4~(B") ("$,1?2?F(B" . "$,44e5&(B") ("$,1?2?G(B" . "$,44e5&4~(B") ("$,1?2?H(B" . "$,44e5&5'(B") ("$,1?2?J(B" . "$,44e5&5&5 (B") ("$,1?2?K(B" . "$,44e5&5&5 4~(B") ("$,1?2?L(B" . "$,44e5((B") + ("$,1?5?M(B" . "$,44h5)(B") ("$,1?5(B" . "$,44h(B") ("$,1?5??(B" . "$,44i(B") ("$,1?5?@(B" . "$,44i4~(B") ("$,1?5?A(B" . "$,44h5"(B") ("$,1?5?B(B" . "$,44h5#(B") ("$,1?5?J(B" . "$,44h5&5#(B") ("$,1?5?K(B" . "$,44h5&5#4~(B") + ("$,1?6?M(B" . "$,44k5)(B") ("$,1?6(B" . "$,44k(B") ("$,1?6??(B" . "$,44l(B") ("$,1?6?@(B" . "$,44l4~(B") + ("$,1?7?M(B" . "$,44n5)(B") ("$,1?7(B" . "$,44n(B") ("$,1?7??(B" . "$,44o(B") ("$,1?7?@(B" . "$,44o4~(B") + ("$,1?8?M(B" . "$,44q5)(B") ("$,1?8(B" . "$,44q(B") ("$,1?8??(B" . "$,44r(B") ("$,1?8?@(B" . "$,44r4~(B") + ("$,1?9?M(B" . "$,44t5)(B") ("$,1?9(B" . "$,44t(B") ("$,1?9??(B" . "$,44u(B") ("$,1?9?@(B" . "$,44u4~(B") + ("$,1?3?M(B" . "$,44w5)(B") ("$,1?3(B" . "$,44w(B") ("$,1?3??(B" . "$,44x(B") ("$,1?3?@(B" . "$,44x4~(B")) +"Kannada characters to glyphs conversion table. +Default value contains only the basic rules.") + +(defvar knd-char-glyph-hash + (let* ((hash (make-hash-table :test 'equal))) + (mapc (function (lambda (x) (puthash (car x) (cdr x) hash))) + knd-char-glyph) + hash)) + +(defvar knd-char-glyph-regexp + (kannada-regexp-of-hashtbl-keys knd-char-glyph-hash)) + +(defvar knd-conjunct-glyph + '(("$,1>u(B" . "$,43Q(B") ("$,1>v(B" . "$,43U(B") ("$,1>w(B" . "$,43X(B") ("$,1>x(B" . "$,43[(B") ("$,1>y(B" . "$,43](B") + ("$,1>z(B" . "$,43`(B") ("$,1>{(B" . "$,43c(B") ("$,1>|(B" . "$,43g(B") ("$,1>}(B" . "$,43i(B") ("$,1>~(B" . "$,43k(B") + ("$,1>(B" . "$,43o(B") ("$,1? (B" . "$,43r(B") ("$,1?!(B" . "$,43u(B") ("$,1?"(B" . "$,43x(B") ("$,1?#(B" . "$,43|(B") + ("$,1?$(B" . "$,44A(B") ("$,1?%(B" . "$,44D(B") ("$,1?&(B" . "$,44G(B") ("$,1?'(B" . "$,44J(B") ("$,1?((B" . "$,44M(B") + ("$,1?*(B" . "$,44P(B") ("$,1?+(B" . "$,44U(B") ("$,1?,(B" . "$,44Y(B") ("$,1?-(B" . "$,44\(B") ("$,1?.(B" . "$,44](B") + ("$,1?/(B" . "$,44`(B") ("$,1?0(B" . "$,44c(B") ("$,1?2(B" . "$,44g(B") ("$,1?3(B" . "$,44y(B") ("$,1?5(B" . "$,44j(B") + ("$,1?6(B" . "$,44m(B") ("$,1?7(B" . "$,44p(B") ("$,1?8(B" . "$,44s(B") ("$,1?9(B" . "$,44v(B")) +"Kannada characters to conjunct glyphs conversion table.") + +(defvar knd-conjunct-glyph-hash + (let* ((hash (make-hash-table :test 'equal))) + (mapc (function (lambda (x) (puthash (car x) (cdr x) hash))) + knd-conjunct-glyph) + hash)) + +(defvar knd-conjunct-glyph-regexp + (kannada-regexp-of-hashtbl-vals knd-conjunct-glyph-hash)) + +(mapc + (function (lambda (x) + (put-char-code-property (aref (cdr x) 0) 'reference-point '(5 . 3)))) + knd-conjunct-glyph) + +;; glyph-to-glyph conversion table. +;; it is supposed that glyphs are ordered in +;; [consonant/nukta] - [matra/virama] - [preceding-r] - [anuswar]. + +(defvar knd-glyph-glyph + '(("$,45$4A(B" . "$,45*(B") + ("$,45'4A(B" . "$,45+(B") + ("$,44A3g(B" . "$,45,(B") + ("$,45$3Q(B" . "$,45-(B"))) + +(defvar knd-glyph-glyph-hash + (let* ((hash (make-hash-table :test 'equal))) + (mapc (function (lambda (x) (puthash (car x) (cdr x) hash))) + knd-glyph-glyph) + hash)) +(defvar knd-glyph-glyph-regexp + (kannada-regexp-of-hashtbl-keys knd-glyph-glyph-hash)) + +(defun knd-charseq (from &optional to) + (if (null to) (setq to from)) + (number-sequence (decode-char 'kannada-cdac from) + (decode-char 'kannada-cdac to))) + +(defvar knd-glyph-cv + (append + (knd-charseq #x40 #x50) + (knd-charseq #x52 #x54) + (knd-charseq #x56 #x57) + (knd-charseq #x59 #x5a) + (knd-charseq #x5c) + (knd-charseq #x5e #x5f) + (knd-charseq #x61 #x62) + (knd-charseq #x64 #x66) + (knd-charseq #x6a) + (knd-charseq #x6c #x6e) + (knd-charseq #x70 #x71) + (knd-charseq #x73 #x74) + (knd-charseq #x76 #x77) + (knd-charseq #x79 #x7b) + (knd-charseq #x7d #x7e) + (knd-charseq #xa2 #xa3) + (knd-charseq #xa5 #xa6) + (knd-charseq #xa8 #xa9) + (knd-charseq #xab #xac) + (knd-charseq #xae #xaf) + (knd-charseq #xb1 #xb2) + (knd-charseq #xb6 #xb8) + (knd-charseq #xb6 #xb8) + (knd-charseq #xba #xbb) + (knd-charseq #xbe #xbf) + (knd-charseq #xc1 #xc2) + (knd-charseq #xc4 #xc6) + (knd-charseq #xc8 #xc9) + (knd-charseq #xcb #xcc) + (knd-charseq #xce #xcf) + (knd-charseq #xd1 #xd2) + (knd-charseq #xd4 #xd5) + (knd-charseq #xd7 #xd8) + (knd-charseq #xc3)) + "Kannada Consonants/Vowels/Nukta Glyphs") + +(defvar knd-glyph-space + (knd-charseq #xb3 #xb4) + "Kannada Spacing Glyphs") + +(defvar knd-glyph-right-modifier + (append + (knd-charseq #xdb #xdd) + (knd-charseq #xdf) + (knd-charseq #xe0 #xe3) + (knd-charseq #xe9)) + "Kannada Modifiers attached at the right side.") + +(defvar knd-glyph-right-modifier-regexp + (concat "[" knd-glyph-right-modifier "]")) + +(defvar knd-glyph-jha-tail + (knd-charseq #x68) + "Kannada tail for jha.") + +(defvar knd-glyph-top-matra + (append + (knd-charseq #xda) + (knd-charseq #xdd) + (knd-charseq #xe6) + (knd-charseq #xe8)) + "Kannada Matras attached at the top side.") + +(defvar knd-glyph-bottom-matra + (append + (knd-charseq #xe4 #xe5) + (knd-charseq #xe7)) + "Kannada Matras attached at the bottom.") + +(defvar knd-glyph-end-marks + (append + (knd-charseq #x25) + (knd-charseq #x4d #x4e) + (knd-charseq #xde)) + "Kannada end marks: arkavattu, virama, au and diirghaa.") + +(defvar knd-glyph-bottom-modifier + (append + (knd-charseq #x51) + (knd-charseq #x55) + (knd-charseq #x58) + (knd-charseq #x5b) + (knd-charseq #x5d) + (knd-charseq #x60) + (knd-charseq #x63) + (knd-charseq #x67) + (knd-charseq #x69) + (knd-charseq #x6b) + (knd-charseq #x6f) + (knd-charseq #x72) + (knd-charseq #x75) + (knd-charseq #x78) + (knd-charseq #x7c) + (knd-charseq #xa1) + (knd-charseq #xa4) + (knd-charseq #xa7) + (knd-charseq #xaa) + (knd-charseq #xad) + (knd-charseq #xb0) + (knd-charseq #xb5) + (knd-charseq #xb9) + (knd-charseq #xbc #xbd) + (knd-charseq #xc0) + (knd-charseq #xc3) + (knd-charseq #xc7) + (knd-charseq #xca) + (knd-charseq #xcd) + (knd-charseq #xd0) + (knd-charseq #xd3) + (knd-charseq #xd6) + (knd-charseq #xd9) + (knd-charseq #xea #xef)) + "Kannada Modifiers attached at the bottom.") + +(defvar knd-glyph-order + `((,knd-glyph-cv . 1) + (,knd-glyph-top-matra . 2) + (,knd-glyph-jha-tail . 3) + (,knd-glyph-right-modifier . 4) + (,knd-glyph-space . 5) + (,knd-glyph-bottom-modifier . 5) + (,knd-glyph-bottom-matra . 6) + (,knd-glyph-end-marks . 7) + )) + +(mapc + (function (lambda (x) + (mapc + (function (lambda (y) + (put-char-code-property y 'composition-order (cdr x)))) + (car x)))) + knd-glyph-order) + +(defun kannada-compose-syllable-string (string) + (with-temp-buffer + (insert (decompose-string string)) + (kannada-compose-syllable-region (point-min) (point-max)) + (buffer-string))) + +;; kch +(defun kannada-compose-syllable-region (from to) + "Compose kannada syllable in region FROM to TO." + (let ((glyph-str nil) (cons-num 0) (glyph-str-list nil) + (last-virama nil) (preceding-r nil) (last-modifier nil) + (last-char (char-before to)) match-str pos + glyph-block split-pos (conj nil) (rest nil)) + (save-excursion + (save-restriction + ;;; *** char-to-glyph conversion *** + ;; Special rule 1. -- Last virama must be preserved. + (if (eq last-char ?$,1?M(B) + (progn + (setq last-virama t) + (narrow-to-region from (1- to))) + (narrow-to-region from to)) + (goto-char (point-min)) + ;; Special rule 2. -- preceding "r virama" must be modifier. + (when (looking-at "$,1?0?M(B.") + (setq preceding-r t) + (goto-char (+ 2 (point)))) + ;; remove conjunct consonants + (while (re-search-forward knd-char-glyph-regexp nil t) + (setq match-str (match-string 0)) + (if (and (string-match kannada-consonant match-str) + (> cons-num 0)) + (progn + (setq conj (concat conj (gethash (match-string 0 match-str) + knd-conjunct-glyph-hash))) + (setq match-str (replace-match "" t nil match-str)) + (if (string-match "$,1?M(B" rest) + (setq rest (replace-match "" t nil rest))))) + (setq rest (concat rest match-str)) + ;; count the number of consonant-glyhs. + (if (string-match kannada-consonant match-str) + (setq cons-num (1+ cons-num)))) + ;; translate the rest characters into glyphs + (setq pos 0) + (while (string-match knd-char-glyph-regexp rest pos) + (setq match-str (match-string 0 rest)) + (setq pos (match-end 0)) + (setq glyph-str + (concat glyph-str (gethash match-str knd-char-glyph-hash)))) + + (if conj (setq glyph-str (concat glyph-str conj))) + (if last-virama (setq glyph-str (concat glyph-str "$,45)(B")) + (goto-char (point-min)) + (if (re-search-forward kannada-consonant-needs-twirl nil t) + (progn + (setq match-str (match-string 0)) + (setq glyph-str (concat glyph-str "$,44z(B"))))) + ;; preceding-r must be attached + (if preceding-r + (setq glyph-str (concat glyph-str "$,43%(B"))) + ;;; *** glyph-to-glyph conversion *** + (when (string-match knd-glyph-glyph-regexp glyph-str) + (setq glyph-str + (replace-match (gethash (match-string 0 glyph-str) + knd-glyph-glyph-hash) + nil t glyph-str))) + ;;; *** glyph reordering *** + (while (setq split-pos (string-match "$,45)(B\\|.$" glyph-str)) + (setq glyph-block (substring glyph-str 0 (1+ split-pos))) + (setq glyph-str (substring glyph-str (1+ split-pos))) + (setq + glyph-block + (sort (string-to-list glyph-block) + (function (lambda (x y) + (< (get-char-code-property x 'composition-order) + (get-char-code-property y 'composition-order)))))) + (setq glyph-str-list (nconc glyph-str-list glyph-block))) + ;;; *** insert space glyphs for kerning *** + (if (> cons-num 0) + (let ((curr glyph-str-list) (prev nil) (last-bott nil) bott co) + (while curr + (setq co (get-char-code-property + (car curr) 'composition-order) + bott (or (eq co 5) (eq co 6))) + (if (and bott last-bott) + (setcdr prev (cons ?$,44T(B curr))) + (setq last-bott bott prev curr curr (cdr curr))))) + ;; concatenate and attach reference-points. + (setq glyph-str + (cdr + (apply + 'nconc + (mapcar + (function (lambda (x) + (list + (or (get-char-code-property x 'reference-point) + '(5 . 3) ;; default reference point. + ) + x))) + glyph-str-list)))))) + (compose-region from to glyph-str))) + +(provide 'knd-util) + +;;; arch-tag: 78d32230-a960-46a5-b622-61ed6ffcf8fc +;;; knd-util.el ends here diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el index 9a945668c7..222832022a 100644 --- a/lisp/language/korea-util.el +++ b/lisp/language/korea-util.el @@ -135,4 +135,5 @@ ;; (provide 'korea-util) +;;; arch-tag: b17d0981-05da-4577-99f8-1db87fff8b44 ;;; korea-util.el ends here diff --git a/lisp/language/korean.el b/lisp/language/korean.el index f010de6989..9595ab4ed0 100644 --- a/lisp/language/korean.el +++ b/lisp/language/korean.el @@ -73,4 +73,5 @@ The following key bindings are available while using Korean input methods: (provide 'korean) +;;; arch-tag: ca7c7348-5ca3-4623-887a-7fd33d725d0e ;;; korean.el ends here diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el index 4db213dab0..ad0253648e 100644 --- a/lisp/language/lao-util.el +++ b/lisp/language/lao-util.el @@ -518,4 +518,5 @@ syllable. In that case, FROM and TO are indexes to STR." ;; (provide 'lao-util) +;;; arch-tag: 1f828781-3cb8-4695-88af-8f33222338ce ;;; lao-util.el ends here diff --git a/lisp/language/lao.el b/lisp/language/lao.el index 8edc282a46..ec5c07342e 100644 --- a/lisp/language/lao.el +++ b/lisp/language/lao.el @@ -53,4 +53,5 @@ (provide 'lao) +;;; arch-tag: ba540fd9-6352-4449-a9cd-669afd21fa57 ;;; lao.el ends here diff --git a/lisp/language/malayalam.el b/lisp/language/malayalam.el index 27bf122fd7..4c8fad08fe 100644 --- a/lisp/language/malayalam.el +++ b/lisp/language/malayalam.el @@ -48,4 +48,5 @@ South Indian language Malayalam is supported in this language environment.")) (provide 'malayalam) +;;; arch-tag: 5f500e53-1e4f-4bb2-aa93-ad8736f0349f ;;; malayalam.el ends here diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el index a4c72742d7..537267ce9b 100644 --- a/lisp/language/misc-lang.el +++ b/lisp/language/misc-lang.el @@ -43,4 +43,5 @@ and Italian."))) (provide 'misc-lang) +;;; arch-tag: 6953585c-1a1a-4c09-be82-a2518afb6074 ;;; misc-lang.el ends here diff --git a/lisp/language/mlm-util.el b/lisp/language/mlm-util.el index b492d269ff..16246aaa2b 100644 --- a/lisp/language/mlm-util.el +++ b/lisp/language/mlm-util.el @@ -74,6 +74,7 @@ (malayalam-compose-region (point-min) (point-max)) (buffer-string))) +;;;###autoload (defun malayalam-post-read-conversion (len) (save-excursion (save-restriction @@ -409,4 +410,5 @@ In this case, compose characters after POS of the string." (provide 'mlm-util) +;;; arch-tag: 7f25ee67-8f9d-49f2-837b-35c412c00eba ;;; devan-util.el ends here diff --git a/lisp/language/romanian.el b/lisp/language/romanian.el index a89a9ab777..ef7e4cf74c 100644 --- a/lisp/language/romanian.el +++ b/lisp/language/romanian.el @@ -53,4 +53,5 @@ An environment for generic Latin-10 encoding is also available.")) (provide 'romanian) +;;; arch-tag: a0bf93ee-2f02-4678-a477-c08acc35366b ;;; romanian.el ends here diff --git a/lisp/language/slovak.el b/lisp/language/slovak.el index 42983b7262..308be4286e 100644 --- a/lisp/language/slovak.el +++ b/lisp/language/slovak.el @@ -47,4 +47,5 @@ and selects the Slovak tutorial.")) (provide 'slovak) +;;; arch-tag: 1bae098a-33b2-4426-8c29-59e44fe05484 ;;; slovak.el ends here diff --git a/lisp/language/tamil.el b/lisp/language/tamil.el index 04f3eacc5e..c62093098e 100644 --- a/lisp/language/tamil.el +++ b/lisp/language/tamil.el @@ -43,4 +43,5 @@ South Indian Language Tamil supported in this language environment.")) 'tamil-composition-function) (provide 'tamil) +;;; arch-tag: 2201ac78-7d1e-4674-9bcb-9923c7a2bd9c ;;; tamil.el ends here diff --git a/lisp/language/thai-util.el b/lisp/language/thai-util.el index 251c1fee5b..259a102c61 100644 --- a/lisp/language/thai-util.el +++ b/lisp/language/thai-util.el @@ -205,4 +205,5 @@ positions (integers or markers) specifying the region." ;; (provide 'thai-util) +;;; arch-tag: 59425d6a-8cf9-4e06-a6ab-8ab7dc7a7a97 ;;; thai-util.el ends here diff --git a/lisp/language/thai.el b/lisp/language/thai.el index 0723c3d182..40bd298aee 100644 --- a/lisp/language/thai.el +++ b/lisp/language/thai.el @@ -80,4 +80,5 @@ This is the same as `thai-tis620' with the addition of no-break-space." (provide 'thai) +;;; arch-tag: c7eb0e91-4db0-4619-81f8-8762e7d51e15 ;;; thai.el ends here diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el index 260cf7efe5..ec53d121f0 100644 --- a/lisp/language/tibet-util.el +++ b/lisp/language/tibet-util.el @@ -434,4 +434,5 @@ before writing buffer in Unicode. See also (provide 'tibet-util) +;;; arch-tag: 7a7333e8-1584-446c-b39c-a02b9def265d ;;; tibet-util.el ends here diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el index ab9516f73d..4b580f4a81 100644 --- a/lisp/language/tibetan.el +++ b/lisp/language/tibetan.el @@ -613,4 +613,5 @@ This also matches some punctuation characters which need conversion.") (provide 'tibetan) +;;; arch-tag: 8d37c8d7-f95d-450f-9ec2-819e61fc79a7 ;;; tibetan.el ends here diff --git a/lisp/language/tml-util.el b/lisp/language/tml-util.el index 34c18741e9..e9670e3d1a 100644 --- a/lisp/language/tml-util.el +++ b/lisp/language/tml-util.el @@ -76,6 +76,7 @@ (tamil-compose-region (point-min) (point-max)) (buffer-string))) +;;;###autoload (defun tamil-post-read-conversion (len) (save-excursion (save-restriction @@ -368,4 +369,5 @@ In this case, compose characters after POS of the string." (provide 'tml-util) +;;; arch-tag: 4d1c9737-e7b1-44cf-a040-4f64c50e773e ;;; tml-util.el ends here diff --git a/lisp/language/utf-8-lang.el b/lisp/language/utf-8-lang.el index 3aa845921a..70475846db 100644 --- a/lisp/language/utf-8-lang.el +++ b/lisp/language/utf-8-lang.el @@ -51,4 +51,6 @@ encoded in UTF-8.")) nil) (provide 'utf-8-lang) + +;;; arch-tag: dfa339e1-296f-4b1e-9fe8-2b65279ec813 ;;; utf-8-lang.el ends here diff --git a/lisp/language/viet-util.el b/lisp/language/viet-util.el index 04c26f1475..c2f1218a53 100644 --- a/lisp/language/viet-util.el +++ b/lisp/language/viet-util.el @@ -292,4 +292,5 @@ positions (integers or markers) specifying the stretch of the region." ;;; (provide 'viet-util) +;;; arch-tag: 082a4d3b-168f-45b4-b3e1-82bfa1b5a194 ;;; viet-util.el ends here diff --git a/lisp/language/vietnamese.el b/lisp/language/vietnamese.el index 8f403f112e..a5360d781f 100644 --- a/lisp/language/vietnamese.el +++ b/lisp/language/vietnamese.el @@ -105,4 +105,5 @@ Telex, VIQR is the default setting."))) (provide 'vietnamese) +;;; arch-tag: 5bd4f1aa-2d4e-4f33-b7d8-0679c6a19ee6 ;;; vietnamese.el ends here diff --git a/lisp/lazy-lock.el b/lisp/lazy-lock.el index b335fb8405..3547674bf3 100644 --- a/lisp/lazy-lock.el +++ b/lisp/lazy-lock.el @@ -1050,4 +1050,5 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'." (provide 'lazy-lock) +;;; arch-tag: c1776846-f046-4a45-9684-54b951b12fc9 ;;; lazy-lock.el ends here diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el new file mode 100644 index 0000000000..15d3eb0eb9 --- /dev/null +++ b/lisp/ldefs-boot.el @@ -0,0 +1,26024 @@ +;;; loaddefs.el --- automatically extracted autoloads +;; +;;; Code: + +;;;### (autoloads (5x5-crack 5x5-crack-xor-mutate 5x5-crack-mutating-best +;;;;;; 5x5-crack-mutating-current 5x5-crack-randomly 5x5) "5x5" +;;;;;; "play/5x5.el" (16211 27037)) +;;; Generated autoloads from play/5x5.el + +(autoload (quote 5x5) "5x5" "\ +Play 5x5. + +The object of 5x5 is very simple, by moving around the grid and flipping +squares you must fill the grid. + +5x5 keyboard bindings are: +\\<5x5-mode-map> +Flip \\[5x5-flip-current] +Move up \\[5x5-up] +Move down \\[5x5-down] +Move left \\[5x5-left] +Move right \\[5x5-right] +Start new game \\[5x5-new-game] +New game with random grid \\[5x5-randomize] +Random cracker \\[5x5-crack-randomly] +Mutate current cracker \\[5x5-crack-mutating-current] +Mutate best cracker \\[5x5-crack-mutating-best] +Mutate xor cracker \\[5x5-crack-xor-mutate] +Quit current game \\[5x5-quit-game] + +\(fn &optional SIZE)" t nil) + +(autoload (quote 5x5-crack-randomly) "5x5" "\ +Attempt to crack 5x5 using random solutions. + +\(fn)" t nil) + +(autoload (quote 5x5-crack-mutating-current) "5x5" "\ +Attempt to crack 5x5 by mutating the current solution. + +\(fn)" t nil) + +(autoload (quote 5x5-crack-mutating-best) "5x5" "\ +Attempt to crack 5x5 by mutating the best solution. + +\(fn)" t nil) + +(autoload (quote 5x5-crack-xor-mutate) "5x5" "\ +Attempt to crack 5x5 by xor the current and best solution. +Mutate the result. + +\(fn)" t nil) + +(autoload (quote 5x5-crack) "5x5" "\ +Attempt to find a solution for 5x5. + +5x5-crack takes the argument BREEDER which should be a function that takes +two parameters, the first will be a grid vector array that is the current +solution and the second will be the best solution so far. The function +should return a grid vector array that is the new solution. + +\(fn BREEDER)" t nil) + +;;;*** + +;;;### (autoloads (ada-mode ada-add-extensions) "ada-mode" "progmodes/ada-mode.el" +;;;;;; (16249 32008)) +;;; Generated autoloads from progmodes/ada-mode.el + +(autoload (quote ada-add-extensions) "ada-mode" "\ +Define SPEC and BODY as being valid extensions for Ada files. +Going from body to spec with `ff-find-other-file' used these +extensions. +SPEC and BODY are two regular expressions that must match against the file +name + +\(fn SPEC BODY)" nil nil) + +(autoload (quote ada-mode) "ada-mode" "\ +Ada mode is the major mode for editing Ada code. + +Bindings are as follows: (Note: 'LFD' is control-j.) +\\{ada-mode-map} + + Indent line '\\[ada-tab]' + Indent line, insert newline and indent the new line. '\\[newline-and-indent]' + + Re-format the parameter-list point is in '\\[ada-format-paramlist]' + Indent all lines in region '\\[ada-indent-region]' + + Adjust case of identifiers and keywords in region '\\[ada-adjust-case-region]' + Adjust case of identifiers and keywords in buffer '\\[ada-adjust-case-buffer]' + + Fill comment paragraph, justify and append postfix '\\[fill-paragraph]' + + Next func/proc/task '\\[ada-next-procedure]' Previous func/proc/task '\\[ada-previous-procedure]' + Next package '\\[ada-next-package]' Previous package '\\[ada-previous-package]' + + Goto matching start of current 'end ...;' '\\[ada-move-to-start]' + Goto end of current block '\\[ada-move-to-end]' + +Comments are handled using standard GNU Emacs conventions, including: + Start a comment '\\[indent-for-comment]' + Comment region '\\[comment-region]' + Uncomment region '\\[ada-uncomment-region]' + Continue comment on next line '\\[indent-new-comment-line]' + +If you use imenu.el: + Display index-menu of functions & procedures '\\[imenu]' + +If you use find-file.el: + Switch to other file (Body <-> Spec) '\\[ff-find-other-file]' + or '\\[ff-mouse-find-other-file] + Switch to other file in other window '\\[ada-ff-other-window]' + or '\\[ff-mouse-find-other-file-other-window] + If you use this function in a spec and no body is available, it gets created with body stubs. + +If you use ada-xref.el: + Goto declaration: '\\[ada-point-and-xref]' on the identifier + or '\\[ada-goto-declaration]' with point on the identifier + Complete identifier: '\\[ada-complete-identifier]'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (ada-header) "ada-stmt" "progmodes/ada-stmt.el" +;;;;;; (16211 27038)) +;;; Generated autoloads from progmodes/ada-stmt.el + +(autoload (quote ada-header) "ada-stmt" "\ +Insert a descriptive header at the top of the file. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (ada-find-file) "ada-xref" "progmodes/ada-xref.el" +;;;;;; (16211 27038)) +;;; Generated autoloads from progmodes/ada-xref.el + +(autoload (quote ada-find-file) "ada-xref" "\ +Open a file anywhere in the source path. +Completion is available. + +\(fn FILENAME)" t nil) + +;;;*** + +;;;### (autoloads (change-log-redate change-log-merge add-log-current-defun +;;;;;; change-log-mode add-change-log-entry-other-window add-change-log-entry +;;;;;; find-change-log prompt-for-change-log-name add-log-mailing-address +;;;;;; add-log-full-name add-log-current-defun-function) "add-log" +;;;;;; "add-log.el" (16211 27008)) +;;; Generated autoloads from add-log.el + +(defvar add-log-current-defun-function nil "\ +*If non-nil, function to guess name of surrounding function. +It is used by `add-log-current-defun' in preference to built-in rules. +Returns function's name as a string, or nil if outside a function.") + +(custom-autoload (quote add-log-current-defun-function) "add-log") + +(defvar add-log-full-name nil "\ +*Full name of user, for inclusion in ChangeLog daily headers. +This defaults to the value returned by the function `user-full-name'.") + +(custom-autoload (quote add-log-full-name) "add-log") + +(defvar add-log-mailing-address nil "\ +*Electronic mail addresses of user, for inclusion in ChangeLog headers. +This defaults to the value of `user-mail-address'. In addition to +being a simple string, this value can also be a list. All elements +will be recognized as referring to the same user; when creating a new +ChangeLog entry, one element will be chosen at random.") + +(custom-autoload (quote add-log-mailing-address) "add-log") + +(autoload (quote prompt-for-change-log-name) "add-log" "\ +Prompt for a change log name. + +\(fn)" nil nil) + +(autoload (quote find-change-log) "add-log" "\ +Find a change log file for \\[add-change-log-entry] and return the name. + +Optional arg FILE-NAME specifies the file to use. +If FILE-NAME is nil, use the value of `change-log-default-name'. +If 'change-log-default-name' is nil, behave as though it were 'ChangeLog' +\(or whatever we use on this operating system). + +If 'change-log-default-name' contains a leading directory component, then +simply find it in the current directory. Otherwise, search in the current +directory and its successive parents for a file so named. + +Once a file is found, `change-log-default-name' is set locally in the +current buffer to the complete file name. +Optional arg BUFFER-FILE overrides `buffer-file-name'. + +\(fn &optional FILE-NAME BUFFER-FILE)" nil nil) + +(autoload (quote add-change-log-entry) "add-log" "\ +Find change log file, and add an entry for today and an item for this file. +Optional arg WHOAMI (interactive prefix) non-nil means prompt for user +name and site. + +Second arg FILE-NAME is file name of the change log. +If nil, use the value of `change-log-default-name'. + +Third arg OTHER-WINDOW non-nil means visit in other window. + +Fourth arg NEW-ENTRY non-nil means always create a new entry at the front; +never append to an existing entry. Option `add-log-keep-changes-together' +otherwise affects whether a new entry is created. + +Option `add-log-always-start-new-record' non-nil means always create a +new record, even when the last record was made on the same date and by +the same person. + +The change log file can start with a copyright notice and a copying +permission notice. The first blank line indicates the end of these +notices. + +Today's date is calculated according to `change-log-time-zone-rule' if +non-nil, otherwise in local time. + +\(fn &optional WHOAMI FILE-NAME OTHER-WINDOW NEW-ENTRY)" t nil) + +(autoload (quote add-change-log-entry-other-window) "add-log" "\ +Find change log file in other window and add entry and item. +This is just like `add-change-log-entry' except that it displays +the change log file in another window. + +\(fn &optional WHOAMI FILE-NAME)" t nil) + (define-key ctl-x-4-map "a" 'add-change-log-entry-other-window) + +(autoload (quote change-log-mode) "add-log" "\ +Major mode for editing change logs; like Indented Text Mode. +Prevents numeric backups and sets `left-margin' to 8 and `fill-column' to 74. +New log entries are usually made with \\[add-change-log-entry] or \\[add-change-log-entry-other-window]. +Each entry behaves as a paragraph, and the entries for one day as a page. +Runs `change-log-mode-hook'. +\\{change-log-mode-map} + +\(fn)" t nil) + +(defvar add-log-lisp-like-modes (quote (emacs-lisp-mode lisp-mode scheme-mode dsssl-mode lisp-interaction-mode)) "\ +*Modes that look like Lisp to `add-log-current-defun'.") + +(defvar add-log-c-like-modes (quote (c-mode c++-mode c++-c-mode objc-mode)) "\ +*Modes that look like C to `add-log-current-defun'.") + +(defvar add-log-tex-like-modes (quote (TeX-mode plain-TeX-mode LaTeX-mode plain-tex-mode latex-mode)) "\ +*Modes that look like TeX to `add-log-current-defun'.") + +(autoload (quote add-log-current-defun) "add-log" "\ +Return name of function definition point is in, or nil. + +Understands C, Lisp, LaTeX (\"functions\" are chapters, sections, ...), +Texinfo (@node titles) and Perl. + +Other modes are handled by a heuristic that looks in the 10K before +point for uppercase headings starting in the first column or +identifiers followed by `:' or `='. See variables +`add-log-current-defun-header-regexp' and +`add-log-current-defun-function'. + +Has a preference of looking backwards. + +\(fn)" nil nil) + +(autoload (quote change-log-merge) "add-log" "\ +Merge the contents of ChangeLog file OTHER-LOG with this buffer. +Both must be found in Change Log mode (since the merging depends on +the appropriate motion commands). OTHER-LOG can be either a file name +or a buffer. + +Entries are inserted in chronological order. Both the current and +old-style time formats for entries are supported. + +\(fn OTHER-LOG)" t nil) + +(autoload (quote change-log-redate) "add-log" "\ +Fix any old-style date entries in the current log file to default format. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (defadvice ad-add-advice ad-default-compilation-action +;;;;;; ad-redefinition-action) "advice" "emacs-lisp/advice.el" (16211 +;;;;;; 27023)) +;;; Generated autoloads from emacs-lisp/advice.el + +(defvar ad-redefinition-action (quote warn) "\ +*Defines what to do with redefinitions during Advice de/activation. +Redefinition occurs if a previously activated function that already has an +original definition associated with it gets redefined and then de/activated. +In such a case we can either accept the current definition as the new +original definition, discard the current definition and replace it with the +old original, or keep it and raise an error. The values `accept', `discard', +`error' or `warn' govern what will be done. `warn' is just like `accept' but +it additionally prints a warning message. All other values will be +interpreted as `error'.") + +(custom-autoload (quote ad-redefinition-action) "advice") + +(defvar ad-default-compilation-action (quote maybe) "\ +*Defines whether to compile advised definitions during activation. +A value of `always' will result in unconditional compilation, `never' will +always avoid compilation, `maybe' will compile if the byte-compiler is already +loaded, and `like-original' will compile if the original definition of the +advised function is compiled or a built-in function. Every other value will +be interpreted as `maybe'. This variable will only be considered if the +COMPILE argument of `ad-activate' was supplied as nil.") + +(custom-autoload (quote ad-default-compilation-action) "advice") + +(autoload (quote ad-add-advice) "advice" "\ +Add a piece of ADVICE to FUNCTION's list of advices in CLASS. +If FUNCTION already has one or more pieces of advice of the specified +CLASS then POSITION determines where the new piece will go. The value +of POSITION can either be `first', `last' or a number where 0 corresponds +to `first'. Numbers outside the range will be mapped to the closest +extreme position. If there was already a piece of ADVICE with the same +name, then the position argument will be ignored and the old advice +will be overwritten with the new one. + If the FUNCTION was not advised already, then its advice info will be +initialized. Redefining a piece of advice whose name is part of the cache-id +will clear the cache. + +\(fn FUNCTION ADVICE CLASS POSITION)" nil nil) + +(autoload (quote defadvice) "advice" "\ +Define a piece of advice for FUNCTION (a symbol). +The syntax of `defadvice' is as follows: + + (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...) + [DOCSTRING] [INTERACTIVE-FORM] + BODY... ) + +FUNCTION ::= Name of the function to be advised. +CLASS ::= `before' | `around' | `after' | `activation' | `deactivation'. +NAME ::= Non-nil symbol that names this piece of advice. +POSITION ::= `first' | `last' | NUMBER. Optional, defaults to `first', + see also `ad-add-advice'. +ARGLIST ::= An optional argument list to be used for the advised function + instead of the argument list of the original. The first one found in + before/around/after-advices will be used. +FLAG ::= `protect'|`disable'|`activate'|`compile'|`preactivate'|`freeze'. + All flags can be specified with unambiguous initial substrings. +DOCSTRING ::= Optional documentation for this piece of advice. +INTERACTIVE-FORM ::= Optional interactive form to be used for the advised + function. The first one found in before/around/after-advices will be used. +BODY ::= Any s-expression. + +Semantics of the various flags: +`protect': The piece of advice will be protected against non-local exits in +any code that precedes it. If any around-advice of a function is protected +then automatically all around-advices will be protected (the complete onion). + +`activate': All advice of FUNCTION will be activated immediately if +FUNCTION has been properly defined prior to this application of `defadvice'. + +`compile': In conjunction with `activate' specifies that the resulting +advised function should be compiled. + +`disable': The defined advice will be disabled, hence, it will not be used +during activation until somebody enables it. + +`preactivate': Preactivates the advised FUNCTION at macro-expansion/compile +time. This generates a compiled advised definition according to the current +advice state that will be used during activation if appropriate. Only use +this if the `defadvice' gets actually compiled. + +`freeze': Expands the `defadvice' into a redefining `defun/defmacro' according +to this particular single advice. No other advice information will be saved. +Frozen advices cannot be undone, they behave like a hard redefinition of +the advised function. `freeze' implies `activate' and `preactivate'. The +documentation of the advised function can be dumped onto the `DOC' file +during preloading. + +See Info node `(elisp)Advising Functions' for comprehensive documentation. + +\(fn FUNCTION ARGS &rest BODY)" nil (quote macro)) + +;;;*** + +;;;### (autoloads (align-newline-and-indent align-unhighlight-rule +;;;;;; align-highlight-rule align-current align-entire align-regexp +;;;;;; align) "align" "align.el" (16211 27008)) +;;; Generated autoloads from align.el + +(autoload (quote align) "align" "\ +Attempt to align a region based on a set of alignment rules. +BEG and END mark the region. If BEG and END are specifically set to +nil (this can only be done programmatically), the beginning and end of +the current alignment section will be calculated based on the location +of point, and the value of `align-region-separate' (or possibly each +rule's `separate' attribute). + +If SEPARATE is non-nil, it overrides the value of +`align-region-separate' for all rules, except those that have their +`separate' attribute set. + +RULES and EXCLUDE-RULES, if either is non-nil, will replace the +default rule lists defined in `align-rules-list' and +`align-exclude-rules-list'. See `align-rules-list' for more details +on the format of these lists. + +\(fn BEG END &optional SEPARATE RULES EXCLUDE-RULES)" t nil) + +(autoload (quote align-regexp) "align" "\ +Align the current region using an ad-hoc rule read from the minibuffer. +BEG and END mark the limits of the region. This function will prompt +for the REGEXP to align with. If no prefix arg was specified, you +only need to supply the characters to be lined up and any preceding +whitespace is replaced. If a prefix arg was specified, the full +regexp with parenthesized whitespace should be supplied; it will also +prompt for which parenthesis GROUP within REGEXP to modify, the amount +of SPACING to use, and whether or not to REPEAT the rule throughout +the line. See `align-rules-list' for more information about these +options. + +For example, let's say you had a list of phone numbers, and wanted to +align them so that the opening parentheses would line up: + + Fred (123) 456-7890 + Alice (123) 456-7890 + Mary-Anne (123) 456-7890 + Joe (123) 456-7890 + +There is no predefined rule to handle this, but you could easily do it +using a REGEXP like \"(\". All you would have to do is to mark the +region, call `align-regexp' and type in that regular expression. + +\(fn BEG END REGEXP &optional GROUP SPACING REPEAT)" t nil) + +(autoload (quote align-entire) "align" "\ +Align the selected region as if it were one alignment section. +BEG and END mark the extent of the region. If RULES or EXCLUDE-RULES +is set to a list of rules (see `align-rules-list'), it can be used to +override the default alignment rules that would have been used to +align that section. + +\(fn BEG END &optional RULES EXCLUDE-RULES)" t nil) + +(autoload (quote align-current) "align" "\ +Call `align' on the current alignment section. +This function assumes you want to align only the current section, and +so saves you from having to specify the region. If RULES or +EXCLUDE-RULES is set to a list of rules (see `align-rules-list'), it +can be used to override the default alignment rules that would have +been used to align that section. + +\(fn &optional RULES EXCLUDE-RULES)" t nil) + +(autoload (quote align-highlight-rule) "align" "\ +Highlight the whitespace which a given rule would have modified. +BEG and END mark the extent of the region. TITLE identifies the rule +that should be highlighted. If RULES or EXCLUDE-RULES is set to a +list of rules (see `align-rules-list'), it can be used to override the +default alignment rules that would have been used to identify the text +to be colored. + +\(fn BEG END TITLE &optional RULES EXCLUDE-RULES)" t nil) + +(autoload (quote align-unhighlight-rule) "align" "\ +Remove any highlighting that was added by `align-highlight-rule'. + +\(fn)" t nil) + +(autoload (quote align-newline-and-indent) "align" "\ +A replacement function for `newline-and-indent', aligning as it goes. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (allout-init) "allout" "allout.el" (16271 3441)) +;;; Generated autoloads from allout.el + +(autoload (quote allout-init) "allout" "\ +Prime `allout-mode' to enable/disable auto-activation, wrt `allout-layout'. + +MODE is one of the following symbols: + + - nil (or no argument) deactivate auto-activation/layout; + - `activate', enable auto-activation only; + - `ask', enable auto-activation, and enable auto-layout but with + confirmation for layout operation solicited from user each time; + - `report', just report and return the current auto-activation state; + - anything else (eg, t) for auto-activation and auto-layout, without + any confirmation check. + +Use this function to setup your emacs session for automatic activation +of allout outline mode, contingent to the buffer-specific setting of +the `allout-layout' variable. (See `allout-layout' and +`allout-expose-topic' docstrings for more details on auto layout). + +`allout-init' works by setting up (or removing) +`allout-find-file-hook' in `find-file-hooks', and giving +`allout-auto-activation' a suitable setting. + +To prime your emacs session for full auto-outline operation, include +the following two lines in your emacs init file: + +\(require 'allout) +\(allout-init t) + +\(fn &optional MODE)" t nil) + +;;;*** + +;;;### (autoloads (ange-ftp-hook-function ange-ftp-reread-dir) "ange-ftp" +;;;;;; "net/ange-ftp.el" (16211 27037)) +;;; Generated autoloads from net/ange-ftp.el + +(defalias (quote ange-ftp-re-read-dir) (quote ange-ftp-reread-dir)) + +(autoload (quote ange-ftp-reread-dir) "ange-ftp" "\ +Reread remote directory DIR to update the directory cache. +The implementation of remote ftp file names caches directory contents +for speed. Therefore, when new remote files are created, Emacs +may not know they exist. You can use this command to reread a specific +directory, so that Emacs will know its current contents. + +\(fn &optional DIR)" t nil) + +(autoload (quote ange-ftp-hook-function) "ange-ftp" "\ +Not documented + +\(fn OPERATION &rest ARGS)" nil nil) + +(put (quote ange-ftp-hook-function) (quote file-remote-p) t) + +;;;*** + +;;;### (autoloads (animate-birthday-present animate-sequence animate-string) +;;;;;; "animate" "play/animate.el" (16211 27038)) +;;; Generated autoloads from play/animate.el + +(autoload (quote animate-string) "animate" "\ +Display STRING starting at position VPOS, HPOS, using animation. +The characters start at randomly chosen places, +and all slide in parallel to their final positions, +passing through `animate-n-steps' positions before the final ones. +If HPOS is nil (or omitted), center the string horizontally +in the current window. + +\(fn STRING VPOS &optional HPOS)" nil nil) + +(autoload (quote animate-sequence) "animate" "\ +Display strings from LIST-OF-STRING with animation in a new buffer. +Strings will be separated from each other by SPACE lines. + +\(fn LIST-OF-STRINGS SPACE)" nil nil) + +(autoload (quote animate-birthday-present) "animate" "\ +Display Sarah's birthday present in a new buffer. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (ansi-color-process-output ansi-color-for-comint-mode-on) +;;;;;; "ansi-color" "ansi-color.el" (16211 27008)) +;;; Generated autoloads from ansi-color.el + +(autoload (quote ansi-color-for-comint-mode-on) "ansi-color" "\ +Set `ansi-color-for-comint-mode' to t. + +\(fn)" t nil) + +(autoload (quote ansi-color-process-output) "ansi-color" "\ +Maybe translate SGR control sequences of comint output into text-properties. + +Depending on variable `ansi-color-for-comint-mode' the comint output is +either not processed, SGR control sequences are filtered using +`ansi-color-filter-region', or SGR control sequences are translated into +text-properties using `ansi-color-apply-on-region'. + +The comint output is assumed to lie between the marker +`comint-last-output-start' and the process-mark. + +This is a good function to put in `comint-output-filter-functions'. + +\(fn STRING)" nil nil) + +;;;*** + +;;;### (autoloads (antlr-set-tabs antlr-mode antlr-show-makefile-rules) +;;;;;; "antlr-mode" "progmodes/antlr-mode.el" (16277 42320)) +;;; Generated autoloads from progmodes/antlr-mode.el + +(autoload (quote antlr-show-makefile-rules) "antlr-mode" "\ +Show Makefile rules for all grammar files in the current directory. +If the `major-mode' of the current buffer has the value `makefile-mode', +the rules are directory inserted at point. Otherwise, a *Help* buffer +is shown with the rules which are also put into the `kill-ring' for +\\[yank]. + +This command considers import/export vocabularies and grammar +inheritance and provides a value for the \"-glib\" option if necessary. +Customize variable `antlr-makefile-specification' for the appearance of +the rules. + +If the file for a super-grammar cannot be determined, special file names +are used according to variable `antlr-unknown-file-formats' and a +commentary with value `antlr-help-unknown-file-text' is added. The +*Help* buffer always starts with the text in `antlr-help-rules-intro'. + +\(fn)" t nil) + +(autoload (quote antlr-mode) "antlr-mode" "\ +Major mode for editing ANTLR grammar files. +\\{antlr-mode-map} + +\(fn)" t nil) + +(autoload (quote antlr-set-tabs) "antlr-mode" "\ +Use ANTLR's convention for TABs according to `antlr-tab-offset-alist'. +Used in `antlr-mode'. Also a useful function in `java-mode-hook'. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (appt-make-list appt-delete appt-add appt-display-diary +;;;;;; appt-display-duration appt-msg-window appt-display-mode-line +;;;;;; appt-visible appt-audible appt-message-warning-time appt-issue-message) +;;;;;; "appt" "calendar/appt.el" (16211 27023)) +;;; Generated autoloads from calendar/appt.el + +(defvar appt-issue-message t "\ +*Non-nil means check for appointments in the diary buffer. +To be detected, the diary entry must have the time +as the first thing on a line.") + +(custom-autoload (quote appt-issue-message) "appt") + +(defvar appt-message-warning-time 12 "\ +*Time in minutes before an appointment that the warning begins.") + +(custom-autoload (quote appt-message-warning-time) "appt") + +(defvar appt-audible t "\ +*Non-nil means beep to indicate appointment.") + +(custom-autoload (quote appt-audible) "appt") + +(defvar appt-visible t "\ +*Non-nil means display appointment message in echo area.") + +(custom-autoload (quote appt-visible) "appt") + +(defvar appt-display-mode-line t "\ +*Non-nil means display minutes to appointment and time on the mode line.") + +(custom-autoload (quote appt-display-mode-line) "appt") + +(defvar appt-msg-window t "\ +*Non-nil means display appointment message in another window.") + +(custom-autoload (quote appt-msg-window) "appt") + +(defvar appt-display-duration 10 "\ +*The number of seconds an appointment message is displayed.") + +(custom-autoload (quote appt-display-duration) "appt") + +(defvar appt-display-diary t "\ +*Non-nil means to display the next days diary on the screen. +This will occur at midnight when the appointment list is updated.") + +(custom-autoload (quote appt-display-diary) "appt") + +(autoload (quote appt-add) "appt" "\ +Add an appointment for the day at NEW-APPT-TIME and issue message NEW-APPT-MSG. +The time should be in either 24 hour format or am/pm format. + +\(fn NEW-APPT-TIME NEW-APPT-MSG)" t nil) + +(autoload (quote appt-delete) "appt" "\ +Delete an appointment from the list of appointments. + +\(fn)" t nil) + +(autoload (quote appt-make-list) "appt" "\ +Create the appointments list from todays diary buffer. +The time must be at the beginning of a line for it to be +put in the appointments list. + 02/23/89 + 12:00pm lunch + Wednesday + 10:00am group meeting +We assume that the variables DATE and NUMBER +hold the arguments that `list-diary-entries' received. +They specify the range of dates that the diary is being processed for. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (apropos-documentation apropos-value apropos apropos-documentation-property +;;;;;; apropos-command apropos-variable apropos-mode) "apropos" +;;;;;; "apropos.el" (16211 27008)) +;;; Generated autoloads from apropos.el + +(autoload (quote apropos-mode) "apropos" "\ +Major mode for following hyperlinks in output of apropos commands. + +\\{apropos-mode-map} + +\(fn)" t nil) + +(autoload (quote apropos-variable) "apropos" "\ +Show user variables that match REGEXP. +With optional prefix DO-ALL or if `apropos-do-all' is non-nil, also show +normal variables. + +\(fn REGEXP &optional DO-ALL)" t nil) + +(defalias (quote command-apropos) (quote apropos-command)) + +(autoload (quote apropos-command) "apropos" "\ +Show commands (interactively callable functions) that match APROPOS-REGEXP. +With optional prefix DO-ALL, or if `apropos-do-all' is non-nil, also show +noninteractive functions. + +If VAR-PREDICATE is non-nil, show only variables, and only those that +satisfy the predicate VAR-PREDICATE. + +\(fn APROPOS-REGEXP &optional DO-ALL VAR-PREDICATE)" t nil) + +(autoload (quote apropos-documentation-property) "apropos" "\ +Like (documentation-property SYMBOL PROPERTY RAW) but handle errors. + +\(fn SYMBOL PROPERTY RAW)" nil nil) + +(autoload (quote apropos) "apropos" "\ +Show all bound symbols whose names match APROPOS-REGEXP. +With optional prefix DO-ALL or if `apropos-do-all' is non-nil, also +show unbound symbols and key bindings, which is a little more +time-consuming. Returns list of symbols and documentation found. + +\(fn APROPOS-REGEXP &optional DO-ALL)" t nil) + +(autoload (quote apropos-value) "apropos" "\ +Show all symbols whose value's printed image matches APROPOS-REGEXP. +With optional prefix DO-ALL or if `apropos-do-all' is non-nil, also looks +at the function and at the names and values of properties. +Returns list of symbols and values found. + +\(fn APROPOS-REGEXP &optional DO-ALL)" t nil) + +(autoload (quote apropos-documentation) "apropos" "\ +Show symbols whose documentation contain matches for APROPOS-REGEXP. +With optional prefix DO-ALL or if `apropos-do-all' is non-nil, also use +documentation that is not stored in the documentation file and show key +bindings. +Returns list of symbols and documentation found. + +\(fn APROPOS-REGEXP &optional DO-ALL)" t nil) + +;;;*** + +;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (16211 +;;;;;; 27009)) +;;; Generated autoloads from arc-mode.el + +(autoload (quote archive-mode) "arc-mode" "\ +Major mode for viewing an archive file in a dired-like way. +You can move around using the usual cursor motion commands. +Letters no longer insert themselves. +Type `e' to pull a file out of the archive and into its own buffer; +or click mouse-2 on the file's line in the archive mode buffer. + +If you edit a sub-file of this archive (as with the `e' command) and +save it, the contents of that buffer will be saved back into the +archive. + +\\{archive-mode-map} + +\(fn &optional FORCE)" nil nil) + +;;;*** + +;;;### (autoloads (array-mode) "array" "array.el" (16211 27011)) +;;; Generated autoloads from array.el + +(autoload (quote array-mode) "array" "\ +Major mode for editing arrays. + + Array mode is a specialized mode for editing arrays. An array is +considered to be a two-dimensional set of strings. The strings are +NOT recognized as integers or real numbers. + + The array MUST reside at the top of the buffer. + + TABs are not respected, and may be converted into spaces at any time. +Setting the variable 'array-respect-tabs to non-nil will prevent TAB conversion, +but will cause many functions to give errors if they encounter one. + + Upon entering array mode, you will be prompted for the values of +several variables. Others will be calculated based on the values you +supply. These variables are all local to the buffer. Other buffer +in array mode may have different values assigned to the variables. +The variables are: + +Variables you assign: + array-max-row: The number of rows in the array. + array-max-column: The number of columns in the array. + array-columns-per-line: The number of columns in the array per line of buffer. + array-field-width: The width of each field, in characters. + array-rows-numbered: A logical variable describing whether to ignore + row numbers in the buffer. + +Variables which are calculated: + array-line-length: The number of characters in a buffer line. + array-lines-per-row: The number of buffer lines used to display each row. + + The following commands are available (an asterisk indicates it may +take a numeric prefix argument): + + * \\\\[array-forward-column] Move forward one column. + * \\[array-backward-column] Move backward one column. + * \\[array-next-row] Move down one row. + * \\[array-previous-row] Move up one row. + + * \\[array-copy-forward] Copy the current field into the column to the right. + * \\[array-copy-backward] Copy the current field into the column to the left. + * \\[array-copy-down] Copy the current field into the row below. + * \\[array-copy-up] Copy the current field into the row above. + + * \\[array-copy-column-forward] Copy the current column into the column to the right. + * \\[array-copy-column-backward] Copy the current column into the column to the left. + * \\[array-copy-row-down] Copy the current row into the row below. + * \\[array-copy-row-up] Copy the current row into the row above. + + \\[array-fill-rectangle] Copy the field at mark into every cell with row and column + between that of point and mark. + + \\[array-what-position] Display the current array row and column. + \\[array-goto-cell] Go to a particular array cell. + + \\[array-make-template] Make a template for a new array. + \\[array-reconfigure-rows] Reconfigure the array. + \\[array-expand-rows] Expand the array (remove row numbers and + newlines inside rows) + + \\[array-display-local-variables] Display the current values of local variables. + +Entering array mode calls the function `array-mode-hook'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (16211 +;;;;;; 27040)) +;;; Generated autoloads from textmodes/artist.el + +(autoload (quote artist-mode) "artist" "\ +Toggle artist mode. With arg, turn artist mode on if arg is positive. +Artist lets you draw lines, squares, rectangles and poly-lines, ellipses +and circles with your mouse and/or keyboard. + +How to quit artist mode + + Type \\[artist-mode-off] to quit artist-mode. + + +How to submit a bug report + + Type \\[artist-submit-bug-report] to submit a bug report. + + +Drawing with the mouse: + + mouse-2 + shift mouse-2 Pops up a menu where you can select what to draw with + mouse-1, and where you can do some settings (described + below). + + mouse-1 + shift mouse-1 Draws lines, rectangles or poly-lines, erases, cuts, copies + or pastes: + + Operation Not shifted Shifted + -------------------------------------------------------------- + Pen fill-char at point line from last point + to new point + -------------------------------------------------------------- + Line Line in any direction Straight line + -------------------------------------------------------------- + Rectangle Rectangle Square + -------------------------------------------------------------- + Poly-line Poly-line in any dir Straight poly-lines + -------------------------------------------------------------- + Ellipses Ellipses Circles + -------------------------------------------------------------- + Text Text (see thru) Text (overwrite) + -------------------------------------------------------------- + Spray-can Spray-can Set size for spray + -------------------------------------------------------------- + Erase Erase character Erase rectangle + -------------------------------------------------------------- + Vaporize Erase single line Erase connected + lines + -------------------------------------------------------------- + Cut Cut rectangle Cut square + -------------------------------------------------------------- + Copy Copy rectangle Copy square + -------------------------------------------------------------- + Paste Paste Paste + -------------------------------------------------------------- + Flood-fill Flood-fill Flood-fill + -------------------------------------------------------------- + + * Straight lines can only go horizontally, vertically + or diagonally. + + * Poly-lines are drawn while holding mouse-1 down. When you + release the button, the point is set. If you want a segment + to be straight, hold down shift before pressing the + mouse-1 button. Click mouse-2 or mouse-3 to stop drawing + poly-lines. + + * See thru for text means that text already in the buffer + will be visible through blanks in the text rendered, while + overwrite means the opposite. + + * Vaporizing connected lines only vaporizes lines whose + _endpoints_ are connected. See also the variable + `artist-vaporize-fuzziness'. + + * Cut copies, then clears the rectangle/square. + + * When drawing lines or poly-lines, you can set arrows. + See below under ``Arrows'' for more info. + + * The mode line shows the currently selected drawing operation. + In addition, if it has an asterisk (*) at the end, you + are currently drawing something. + + * Be patient when flood-filling -- large areas take quite + some time to fill. + + + mouse-3 Erases character under pointer + shift mouse-3 Erases rectangle + + +Settings + + Set fill Sets the character used when filling rectangles/squares + + Set line Sets the character used when drawing lines + + Erase char Sets the character used when erasing + + Rubber-banding Toggles rubber-banding + + Trimming Toggles trimming of line-endings (that is: when the shape + is drawn, extraneous white-space at end of lines is removed) + + Borders Toggles the drawing of line borders around filled shapes. + + +Drawing with keys + + \\[artist-key-set-point] Does one of the following: + For lines/rectangles/squares: sets the first/second endpoint + For poly-lines: sets a point (use C-u \\[artist-key-set-point] to set last point) + When erase characters: toggles erasing + When cutting/copying: Sets first/last endpoint of rect/square + When pasting: Pastes + + \\[artist-select-operation] Selects what to draw + + Move around with \\[artist-next-line], \\[artist-previous-line], \\[artist-forward-char] and \\[artist-backward-char]. + + \\[artist-select-fill-char] Sets the charater to use when filling + \\[artist-select-line-char] Sets the charater to use when drawing + \\[artist-select-erase-char] Sets the charater to use when erasing + \\[artist-toggle-rubber-banding] Toggles rubber-banding + \\[artist-toggle-trim-line-endings] Toggles trimming of line-endings + \\[artist-toggle-borderless-shapes] Toggles borders on drawn shapes + + +Arrows + + \\[artist-toggle-first-arrow] Sets/unsets an arrow at the beginning + of the line/poly-line + + \\[artist-toggle-second-arrow] Sets/unsets an arrow at the end + of the line/poly-line + + +Selecting operation + + There are some keys for quickly selecting drawing operations: + + \\[artist-select-op-line] Selects drawing lines + \\[artist-select-op-straight-line] Selects drawing straight lines + \\[artist-select-op-rectangle] Selects drawing rectangles + \\[artist-select-op-square] Selects drawing squares + \\[artist-select-op-poly-line] Selects drawing poly-lines + \\[artist-select-op-straight-poly-line] Selects drawing straight poly-lines + \\[artist-select-op-ellipse] Selects drawing ellipses + \\[artist-select-op-circle] Selects drawing circles + \\[artist-select-op-text-see-thru] Selects rendering text (see thru) + \\[artist-select-op-text-overwrite] Selects rendering text (overwrite) + \\[artist-select-op-spray-can] Spray with spray-can + \\[artist-select-op-spray-set-size] Set size for the spray-can + \\[artist-select-op-erase-char] Selects erasing characters + \\[artist-select-op-erase-rectangle] Selects erasing rectangles + \\[artist-select-op-vaporize-line] Selects vaporizing single lines + \\[artist-select-op-vaporize-lines] Selects vaporizing connected lines + \\[artist-select-op-cut-rectangle] Selects cutting rectangles + \\[artist-select-op-copy-rectangle] Selects copying rectangles + \\[artist-select-op-paste] Selects pasting + \\[artist-select-op-flood-fill] Selects flood-filling + + +Variables + + This is a brief overview of the different varaibles. For more info, + see the documentation for the variables (type \\[describe-variable] RET). + + artist-rubber-banding Interactively do rubber-banding or not + artist-first-char What to set at first/second point... + artist-second-char ...when not rubber-banding + artist-interface-with-rect If cut/copy/paste should interface with rect + artist-arrows The arrows to use when drawing arrows + artist-aspect-ratio Character height-to-width for squares + artist-trim-line-endings Trimming of line endings + artist-flood-fill-right-border Right border when flood-filling + artist-flood-fill-show-incrementally Update display while filling + artist-pointer-shape Pointer shape to use while drawing + artist-ellipse-left-char Character to use for narrow ellipses + artist-ellipse-right-char Character to use for narrow ellipses + artist-borderless-shapes If shapes should have borders + artist-picture-compatibility Whether or not to be picture mode compatible + artist-vaporize-fuzziness Tolerance when recognizing lines + artist-spray-interval Seconds between repeated sprayings + artist-spray-radius Size of the spray-area + artist-spray-chars The spray-``color'' + artist-spray-new-chars Initial spray-``color'' + +Hooks + + When entering artist-mode, the hook `artist-mode-init-hook' is called. + When quitting artist-mode, the hook `artist-mode-exit-hook' is called. + + +Keymap summary + +\\{artist-mode-map} + +\(fn &optional STATE)" t nil) + +;;;*** + +;;;### (autoloads (asm-mode) "asm-mode" "progmodes/asm-mode.el" (16211 +;;;;;; 27038)) +;;; Generated autoloads from progmodes/asm-mode.el + +(autoload (quote asm-mode) "asm-mode" "\ +Major mode for editing typical assembler code. +Features a private abbrev table and the following bindings: + +\\[asm-colon] outdent a preceding label, tab to next tab stop. +\\[tab-to-tab-stop] tab to next tab stop. +\\[asm-newline] newline, then tab to next tab stop. +\\[asm-comment] smart placement of assembler comments. + +The character used for making comments is set by the variable +`asm-comment-char' (which defaults to `?\\;'). + +Alternatively, you may set this variable in `asm-mode-set-comment-hook', +which is called near the beginning of mode initialization. + +Turning on Asm mode runs the hook `asm-mode-hook' at the end of initialization. + +Special commands: +\\{asm-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (auto-show-mode auto-show-mode) "auto-show" "obsolete/auto-show.el" +;;;;;; (16211 27037)) +;;; Generated autoloads from obsolete/auto-show.el + +(defvar auto-show-mode nil "\ +Obsolete.") + +(custom-autoload (quote auto-show-mode) "auto-show") + +(autoload (quote auto-show-mode) "auto-show" "\ +This command is obsolete. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (autoarg-kp-mode autoarg-mode) "autoarg" "autoarg.el" +;;;;;; (16211 27012)) +;;; Generated autoloads from autoarg.el + +(defvar autoarg-mode nil "\ +Non-nil if Autoarg mode is enabled. +See the command `autoarg-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `autoarg-mode'.") + +(custom-autoload (quote autoarg-mode) "autoarg") + +(autoload (quote autoarg-mode) "autoarg" "\ +Toggle Autoarg minor mode globally. +With ARG, turn Autoarg mode on if ARG is positive, off otherwise. +\\ +In Autoarg mode digits are bound to `digit-argument' -- i.e. they +supply prefix arguments as C-DIGIT and M-DIGIT normally do -- and +C-DIGIT inserts DIGIT. \\[autoarg-terminate] terminates the prefix sequence +and inserts the digits of the autoarg sequence into the buffer. +Without a numeric prefix arg the normal binding of \\[autoarg-terminate] is +invoked, i.e. what it would be with Autoarg mode off. + +For example: +`6 9 \\[autoarg-terminate]' inserts `69' into the buffer, as does `C-6 C-9'. +`6 9 a' inserts 69 `a's into the buffer. +`6 9 \\[autoarg-terminate] \\[autoarg-terminate]' inserts `69' into the buffer and +then invokes the normal binding of \\[autoarg-terminate]. +`C-u \\[autoarg-terminate]' invokes the normal binding of \\[autoarg-terminate] four times. + +\\{autoarg-mode-map} + +\(fn &optional ARG)" t nil) + +(defvar autoarg-kp-mode nil "\ +Non-nil if Autoarg-Kp mode is enabled. +See the command `autoarg-kp-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `autoarg-kp-mode'.") + +(custom-autoload (quote autoarg-kp-mode) "autoarg") + +(autoload (quote autoarg-kp-mode) "autoarg" "\ +Toggle Autoarg-KP minor mode globally. +With ARG, turn Autoarg mode on if ARG is positive, off otherwise. +\\ +This is similar to \\[autoarg-mode] but rebinds the keypad keys `kp-1' +&c to supply digit arguments. + +\\{autoarg-kp-mode-map} + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (autoconf-mode) "autoconf" "progmodes/autoconf.el" +;;;;;; (16301 41845)) +;;; Generated autoloads from progmodes/autoconf.el + +(autoload (quote autoconf-mode) "autoconf" "\ +Major mode for editing Autoconf configure.in files. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (auto-insert-mode define-auto-insert auto-insert) +;;;;;; "autoinsert" "autoinsert.el" (16211 27012)) +;;; Generated autoloads from autoinsert.el + +(autoload (quote auto-insert) "autoinsert" "\ +Insert default contents into new files if variable `auto-insert' is non-nil. +Matches the visited file name against the elements of `auto-insert-alist'. + +\(fn)" t nil) + +(autoload (quote define-auto-insert) "autoinsert" "\ +Associate CONDITION with (additional) ACTION in `auto-insert-alist'. +Optional AFTER means to insert action after all existing actions for CONDITION, +or if CONDITION had no actions, after all other CONDITIONs. + +\(fn CONDITION ACTION &optional AFTER)" nil nil) + +(defvar auto-insert-mode nil "\ +Non-nil if Auto-Insert mode is enabled. +See the command `auto-insert-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `auto-insert-mode'.") + +(custom-autoload (quote auto-insert-mode) "autoinsert") + +(autoload (quote auto-insert-mode) "autoinsert" "\ +Toggle Auto-insert mode. +With prefix ARG, turn Auto-insert mode on if and only if ARG is positive. +Returns the new status of Auto-insert mode (non-nil means on). + +When Auto-insert mode is enabled, when new files are created you can +insert a template for the file depending on the mode of the buffer. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (batch-update-autoloads update-directory-autoloads +;;;;;; update-file-autoloads) "autoload" "emacs-lisp/autoload.el" +;;;;;; (16211 27023)) +;;; Generated autoloads from emacs-lisp/autoload.el + +(autoload (quote update-file-autoloads) "autoload" "\ +Update the autoloads for FILE in `generated-autoload-file' +\(which FILE might bind in its local variables). +Return FILE if there was no autoload cookie in it. + +\(fn FILE)" t nil) + +(autoload (quote update-directory-autoloads) "autoload" "\ +Update loaddefs.el with all the current autoloads from DIRS, and no old ones. +This uses `update-file-autoloads' (which see) do its work. +In an interactive call, you must give one argument, the name +of a single directory. In a call from Lisp, you can supply multiple +directories as separate arguments, but this usage is discouraged. + +The function does NOT recursively descend into subdirectories of the +directory or directories specified. + +\(fn &rest DIRS)" t nil) + +(autoload (quote batch-update-autoloads) "autoload" "\ +Update loaddefs.el autoloads in batch mode. +Calls `update-directory-autoloads' on the command line arguments. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (global-auto-revert-mode turn-on-auto-revert-mode +;;;;;; auto-revert-mode) "autorevert" "autorevert.el" (16211 27012)) +;;; Generated autoloads from autorevert.el + +(defvar auto-revert-mode nil "\ +*Non-nil when Auto-Revert Mode is active. +Never set this variable directly, use the command `auto-revert-mode' instead.") + +(autoload (quote auto-revert-mode) "autorevert" "\ +Toggle reverting buffer when file on disk changes. + +With arg, turn Auto Revert mode on if and only if arg is positive. +This is a minor mode that affects only the current buffer. +Use `global-auto-revert-mode' to automatically revert all buffers. + +\(fn &optional ARG)" t nil) + +(autoload (quote turn-on-auto-revert-mode) "autorevert" "\ +Turn on Auto-Revert Mode. + +This function is designed to be added to hooks, for example: + (add-hook 'c-mode-hook 'turn-on-auto-revert-mode) + +\(fn)" nil nil) + +(defvar global-auto-revert-mode nil "\ +Non-nil if Global-Auto-Revert mode is enabled. +See the command `global-auto-revert-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `global-auto-revert-mode'.") + +(custom-autoload (quote global-auto-revert-mode) "autorevert") + +(autoload (quote global-auto-revert-mode) "autorevert" "\ +Revert any buffer when file on disk change. + +With arg, turn Auto Revert mode on globally if and only if arg is positive. +This is a minor mode that affects all buffers. +Use `auto-revert-mode' to revert a particular buffer. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (mouse-avoidance-mode mouse-avoidance-mode) "avoid" +;;;;;; "avoid.el" (16211 27012)) +;;; Generated autoloads from avoid.el + +(defvar mouse-avoidance-mode nil "\ +Activate mouse avoidance mode. +See function `mouse-avoidance-mode' for possible values. +Setting this variable directly does not take effect; +use either \\[customize] or the function `mouse-avoidance-mode'.") + +(custom-autoload (quote mouse-avoidance-mode) "avoid") + +(autoload (quote mouse-avoidance-mode) "avoid" "\ +Set cursor avoidance mode to MODE. +MODE should be one of the symbols `banish', `exile', `jump', `animate', +`cat-and-mouse', `proteus', or `none'. + +If MODE is nil, toggle mouse avoidance between `none' and `banish' +modes. Positive numbers and symbols other than the above are treated +as equivalent to `banish'; negative numbers and `-' are equivalent to `none'. + +Effects of the different modes: + * banish: Move the mouse to the upper-right corner on any keypress. + * exile: Move the mouse to the corner only if the cursor gets too close, + and allow it to return once the cursor is out of the way. + * jump: If the cursor gets too close to the mouse, displace the mouse + a random distance & direction. + * animate: As `jump', but shows steps along the way for illusion of motion. + * cat-and-mouse: Same as `animate'. + * proteus: As `animate', but changes the shape of the mouse pointer too. + +Whenever the mouse is moved, the frame is also raised. + +\(see `mouse-avoidance-threshold' for definition of \"too close\", +and `mouse-avoidance-nudge-dist' and `mouse-avoidance-nudge-var' for +definition of \"random distance\".) + +\(fn &optional MODE)" t nil) + +;;;*** + +;;;### (autoloads (backquote) "backquote" "emacs-lisp/backquote.el" +;;;;;; (16211 27023)) +;;; Generated autoloads from emacs-lisp/backquote.el + +(autoload (quote backquote) "backquote" "\ +Argument STRUCTURE describes a template to build. + +The whole structure acts as if it were quoted except for certain +places where expressions are evaluated and inserted or spliced in. + +For example: + +b => (ba bb bc) ; assume b has this value +`(a b c) => (a b c) ; backquote acts like quote +`(a ,b c) => (a (ba bb bc) c) ; insert the value of b +`(a ,@b c) => (a ba bb bc c) ; splice in the value of b + +Vectors work just like lists. Nested backquotes are permitted. + +\(fn ARG)" nil (quote macro)) + +(defalias (quote \`) (symbol-function (quote backquote))) + +;;;*** + +;;;### (autoloads (display-battery battery) "battery" "battery.el" +;;;;;; (16223 32933)) +;;; Generated autoloads from battery.el + +(autoload (quote battery) "battery" "\ +Display battery status information in the echo area. +The text being displayed in the echo area is controlled by the variables +`battery-echo-area-format' and `battery-status-function'. + +\(fn)" t nil) + +(autoload (quote display-battery) "battery" "\ +Display battery status information in the mode line. +The text being displayed in the mode line is controlled by the variables +`battery-mode-line-format' and `battery-status-function'. +The mode line will be updated automatically every `battery-update-interval' +seconds. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (benchmark benchmark-run-compiled benchmark-run) +;;;;;; "benchmark" "emacs-lisp/benchmark.el" (16211 27023)) +;;; Generated autoloads from emacs-lisp/benchmark.el + +(autoload (quote benchmark-run) "benchmark" "\ +Time execution of FORMS. +If REPETITIONS is supplied as a number, run forms that many times, +accounting for the overhead of the resulting loop. Otherwise run +FORMS once. +Return a list of the total elapsed time for execution, the number of +garbage collections that ran, and the time taken by garbage collection. +See also `benchmark-run-compiled'. + +\(fn &optional REPETITIONS &rest FORMS)" nil (quote macro)) + +(autoload (quote benchmark-run-compiled) "benchmark" "\ +Time execution of compiled version of FORMS. +This is like `benchmark-run', but what is timed is a funcall of the +byte code obtained by wrapping FORMS in a `lambda' and compiling the +result. The overhead of the `lambda's is accounted for. + +\(fn &optional REPETITIONS &rest FORMS)" nil (quote macro)) + +(autoload (quote benchmark) "benchmark" "\ +Print the time taken for REPETITIONS executions of FORM. +Interactively, REPETITIONS is taken from the prefix arg. For +non-interactive use see also `benchmark-run' and +`benchmark-run-compiled'. + +\(fn REPETITIONS FORM)" t nil) + +;;;*** + +;;;### (autoloads (bibtex-mode) "bibtex" "textmodes/bibtex.el" (16277 +;;;;;; 42320)) +;;; Generated autoloads from textmodes/bibtex.el + +(autoload (quote bibtex-mode) "bibtex" "\ +Major mode for editing BibTeX files. + +General information on working with BibTeX mode: + +You should use commands such as \\[bibtex-Book] to get a template for a +specific entry. You should then fill in all desired fields using +\\[bibtex-next-field] to jump from field to field. After having filled +in all desired fields in the entry, you should clean the new entry +with the command \\[bibtex-clean-entry]. + +Some features of BibTeX mode are available only by setting the variable +`bibtex-maintain-sorted-entries' to non-nil. However, then BibTeX mode will +work only with buffers containing valid (syntactical correct) entries +and with entries being sorted. This is usually the case, if you have +created a buffer completely with BibTeX mode and finished every new +entry with \\[bibtex-clean-entry]. + +For third party BibTeX files, call the function `bibtex-convert-alien' +to fully take advantage of all features of BibTeX mode. + + +Special information: + +A command such as \\[bibtex-Book] will outline the fields for a BibTeX book entry. + +The optional fields start with the string OPT, and are thus ignored by BibTeX. +Alternatives from which only one is required start with the string ALT. +The OPT or ALT string may be removed from a field with \\[bibtex-remove-OPT-or-ALT]. +\\[bibtex-make-field] inserts a new field after the current one. +\\[bibtex-kill-field] kills the current field entirely. +\\[bibtex-yank] yanks the last recently killed field after the current field. +\\[bibtex-remove-delimiters] removes the double-quotes or braces around the text of the current field. + \\[bibtex-empty-field] replaces the text of the current field with the default \"\" or {}. + +The command \\[bibtex-clean-entry] cleans the current entry, i.e. it removes OPT/ALT +from all non-empty optional or alternative fields, checks that no required +fields are empty, and does some formatting dependent on the value of +`bibtex-entry-format'. +Note: some functions in BibTeX mode depend on entries being in a special +format (all fields beginning on separate lines), so it is usually a bad +idea to remove `realign' from `bibtex-entry-format'. + +Use \\[bibtex-find-text] to position the cursor at the end of the current field. +Use \\[bibtex-next-field] to move to end of the next field. + +The following may be of interest as well: + + Functions: + `bibtex-entry' + `bibtex-kill-entry' + `bibtex-yank-pop' + `bibtex-pop-previous' + `bibtex-pop-next' + `bibtex-complete' + `bibtex-print-help-message' + `bibtex-generate-autokey' + `bibtex-beginning-of-entry' + `bibtex-end-of-entry' + `bibtex-reposition-window' + `bibtex-mark-entry' + `bibtex-ispell-abstract' + `bibtex-ispell-entry' + `bibtex-narrow-to-entry' + `bibtex-sort-buffer' + `bibtex-validate' + `bibtex-count' + `bibtex-fill-entry' + `bibtex-reformat' + `bibtex-convert-alien' + + Variables: + `bibtex-field-delimiters' + `bibtex-include-OPTcrossref' + `bibtex-include-OPTkey' + `bibtex-user-optional-fields' + `bibtex-entry-format' + `bibtex-sort-ignore-string-entries' + `bibtex-maintain-sorted-entries' + `bibtex-entry-field-alist' + `bibtex-predefined-strings' + `bibtex-string-files' + +--------------------------------------------------------- +Entry to BibTeX mode calls the value of `bibtex-mode-hook' if that value is +non-nil. + +\\{bibtex-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "binhex" "gnus/binhex.el" (16211 27027)) +;;; Generated autoloads from gnus/binhex.el + +(defconst binhex-begin-line "^:...............................................................$") + +;;;*** + +;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (16211 +;;;;;; 27038)) +;;; Generated autoloads from play/blackbox.el + +(autoload (quote blackbox) "blackbox" "\ +Play blackbox. +Optional prefix argument is the number of balls; the default is 4. + +What is blackbox? + +Blackbox is a game of hide and seek played on an 8 by 8 grid (the +Blackbox). Your opponent (Emacs, in this case) has hidden several +balls (usually 4) within this box. By shooting rays into the box and +observing where they emerge it is possible to deduce the positions of +the hidden balls. The fewer rays you use to find the balls, the lower +your score. + +Overview of play: + +\\To play blackbox, type \\[blackbox]. An optional prefix argument +specifies the number of balls to be hidden in the box; the default is +four. + +The cursor can be moved around the box with the standard cursor +movement keys. + +To shoot a ray, move the cursor to the edge of the box and press SPC. +The result will be determined and the playfield updated. + +You may place or remove balls in the box by moving the cursor into the +box and pressing \\[bb-romp]. + +When you think the configuration of balls you have placed is correct, +press \\[bb-done]. You will be informed whether you are correct or +not, and be given your score. Your score is the number of letters and +numbers around the outside of the box plus five for each incorrectly +placed ball. If you placed any balls incorrectly, they will be +indicated with `x', and their actual positions indicated with `o'. + +Details: + +There are three possible outcomes for each ray you send into the box: + + Detour: the ray is deflected and emerges somewhere other than + where you sent it in. On the playfield, detours are + denoted by matching pairs of numbers -- one where the + ray went in, and the other where it came out. + + Reflection: the ray is reflected and emerges in the same place + it was sent in. On the playfield, reflections are + denoted by the letter `R'. + + Hit: the ray strikes a ball directly and is absorbed. It does + not emerge from the box. On the playfield, hits are + denoted by the letter `H'. + +The rules for how balls deflect rays are simple and are best shown by +example. + +As a ray approaches a ball it is deflected ninety degrees. Rays can +be deflected multiple times. In the diagrams below, the dashes +represent empty box locations and the letter `O' represents a ball. +The entrance and exit points of each ray are marked with numbers as +described under \"Detour\" above. Note that the entrance and exit +points are always interchangeable. `*' denotes the path taken by the +ray. + +Note carefully the relative positions of the ball and the ninety +degree deflection it causes. + + 1 + - * - - - - - - - - - - - - - - - - - - - - - - + - * - - - - - - - - - - - - - - - - - - - - - - +1 * * - - - - - - - - - - - - - - - O - - - - O - + - - O - - - - - - - O - - - - - - - * * * * - - + - - - - - - - - - - - * * * * * 2 3 * * * - - * - - + - - - - - - - - - - - * - - - - - - - O - * - - + - - - - - - - - - - - * - - - - - - - - * * - - + - - - - - - - - - - - * - - - - - - - - * - O - + 2 3 + +As mentioned above, a reflection occurs when a ray emerges from the same point +it was sent in. This can happen in several ways: + + + - - - - - - - - - - - - - - - - - - - - - - - - + - - - - O - - - - - O - O - - - - - - - - - - - +R * * * * - - - - - - - * - - - - O - - - - - - - + - - - - O - - - - - - * - - - - R - - - - - - - - + - - - - - - - - - - - * - - - - - - - - - - - - + - - - - - - - - - - - * - - - - - - - - - - - - + - - - - - - - - R * * * * - - - - - - - - - - - - + - - - - - - - - - - - - O - - - - - - - - - - - + +In the first example, the ray is deflected downwards by the upper +ball, then left by the lower ball, and finally retraces its path to +its point of origin. The second example is similar. The third +example is a bit anomalous but can be rationalized by realizing the +ray never gets a chance to get into the box. Alternatively, the ray +can be thought of as being deflected downwards and immediately +emerging from the box. + +A hit occurs when a ray runs straight into a ball: + + - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - O - - - + - - - - - - - - - - - - O - - - H * * * * - - - - + - - - - - - - - H * * * * O - - - - - - * - - - - + - - - - - - - - - - - - O - - - - - - O - - - - +H * * * O - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - + +Be sure to compare the second example of a hit with the first example of +a reflection. + +\(fn NUM)" t nil) + +;;;*** + +;;;### (autoloads (bookmark-bmenu-list bookmark-load bookmark-save +;;;;;; bookmark-write bookmark-delete bookmark-insert bookmark-rename +;;;;;; bookmark-insert-location bookmark-relocate bookmark-jump +;;;;;; bookmark-set) "bookmark" "bookmark.el" (16211 27012)) +;;; Generated autoloads from bookmark.el + (define-key ctl-x-map "rb" 'bookmark-jump) + (define-key ctl-x-map "rm" 'bookmark-set) + (define-key ctl-x-map "rl" 'bookmark-bmenu-list) + +(defvar bookmark-map nil "\ +Keymap containing bindings to bookmark functions. +It is not bound to any key by default: to bind it +so that you have a bookmark prefix, just use `global-set-key' and bind a +key of your choice to `bookmark-map'. All interactive bookmark +functions have a binding in this keymap.") + (define-prefix-command 'bookmark-map) + (define-key bookmark-map "x" 'bookmark-set) + (define-key bookmark-map "m" 'bookmark-set) ; "m" for "mark" + (define-key bookmark-map "j" 'bookmark-jump) + (define-key bookmark-map "g" 'bookmark-jump) ; "g" for "go" + (define-key bookmark-map "i" 'bookmark-insert) + (define-key bookmark-map "e" 'edit-bookmarks) + (define-key bookmark-map "f" 'bookmark-insert-location) ; "f" for "find" + (define-key bookmark-map "r" 'bookmark-rename) + (define-key bookmark-map "d" 'bookmark-delete) + (define-key bookmark-map "l" 'bookmark-load) + (define-key bookmark-map "w" 'bookmark-write) + (define-key bookmark-map "s" 'bookmark-save) + +(autoload (quote bookmark-set) "bookmark" "\ +Set a bookmark named NAME inside a file. +If name is nil, then the user will be prompted. +With prefix arg, will not overwrite a bookmark that has the same name +as NAME if such a bookmark already exists, but instead will \"push\" +the new bookmark onto the bookmark alist. Thus the most recently set +bookmark with name NAME would be the one in effect at any given time, +but the others are still there, should you decide to delete the most +recent one. + +To yank words from the text of the buffer and use them as part of the +bookmark name, type C-w while setting a bookmark. Successive C-w's +yank successive words. + +Typing C-u inserts the name of the last bookmark used in the buffer +\(as an aid in using a single bookmark name to track your progress +through a large file). If no bookmark was used, then C-u inserts the +name of the file being visited. + +Use \\[bookmark-delete] to remove bookmarks (you give it a name, +and it removes only the first instance of a bookmark with that name from +the list of bookmarks.) + +\(fn &optional NAME PARG)" t nil) + +(autoload (quote bookmark-jump) "bookmark" "\ +Jump to bookmark BOOKMARK (a point in some file). +You may have a problem using this function if the value of variable +`bookmark-alist' is nil. If that happens, you need to load in some +bookmarks. See help on function `bookmark-load' for more about +this. + +If the file pointed to by BOOKMARK no longer exists, you will be asked +if you wish to give the bookmark a new location, and bookmark-jump +will then jump to the new location, as well as recording it in place +of the old one in the permanent bookmark record. + +\(fn BOOKMARK)" t nil) + +(autoload (quote bookmark-relocate) "bookmark" "\ +Relocate BOOKMARK to another file (reading file name with minibuffer). +This makes an already existing bookmark point to that file, instead of +the one it used to point at. Useful when a file has been renamed +after a bookmark was set in it. + +\(fn BOOKMARK)" t nil) + +(autoload (quote bookmark-insert-location) "bookmark" "\ +Insert the name of the file associated with BOOKMARK. +Optional second arg NO-HISTORY means don't record this in the +minibuffer history list `bookmark-history'. + +\(fn BOOKMARK &optional NO-HISTORY)" t nil) + +(defalias (quote bookmark-locate) (quote bookmark-insert-location)) + +(autoload (quote bookmark-rename) "bookmark" "\ +Change the name of OLD bookmark to NEW name. +If called from keyboard, prompt for OLD and NEW. If called from +menubar, select OLD from a menu and prompt for NEW. + +If called from Lisp, prompt for NEW if only OLD was passed as an +argument. If called with two strings, then no prompting is done. You +must pass at least OLD when calling from Lisp. + +While you are entering the new name, consecutive C-w's insert +consecutive words from the text of the buffer into the new bookmark +name. + +\(fn OLD &optional NEW)" t nil) + +(autoload (quote bookmark-insert) "bookmark" "\ +Insert the text of the file pointed to by bookmark BOOKMARK. +You may have a problem using this function if the value of variable +`bookmark-alist' is nil. If that happens, you need to load in some +bookmarks. See help on function `bookmark-load' for more about +this. + +\(fn BOOKMARK)" t nil) + +(autoload (quote bookmark-delete) "bookmark" "\ +Delete BOOKMARK from the bookmark list. +Removes only the first instance of a bookmark with that name. If +there are one or more other bookmarks with the same name, they will +not be deleted. Defaults to the \"current\" bookmark (that is, the +one most recently used in this file, if any). +Optional second arg BATCH means don't update the bookmark list buffer, +probably because we were called from there. + +\(fn BOOKMARK &optional BATCH)" t nil) + +(autoload (quote bookmark-write) "bookmark" "\ +Write bookmarks to a file (reading the file name with the minibuffer). +Don't use this in Lisp programs; use `bookmark-save' instead. + +\(fn)" t nil) + +(autoload (quote bookmark-save) "bookmark" "\ +Save currently defined bookmarks. +Saves by default in the file defined by the variable +`bookmark-default-file'. With a prefix arg, save it in file FILE +\(second argument). + +If you are calling this from Lisp, the two arguments are PREFIX-ARG +and FILE, and if you just want it to write to the default file, then +pass no arguments. Or pass in nil and FILE, and it will save in FILE +instead. If you pass in one argument, and it is non-nil, then the +user will be interactively queried for a file to save in. + +When you want to load in the bookmarks from a file, use +`bookmark-load', \\[bookmark-load]. That function will prompt you +for a file, defaulting to the file defined by variable +`bookmark-default-file'. + +\(fn &optional PARG FILE)" t nil) + +(autoload (quote bookmark-load) "bookmark" "\ +Load bookmarks from FILE (which must be in bookmark format). +Appends loaded bookmarks to the front of the list of bookmarks. If +optional second argument OVERWRITE is non-nil, existing bookmarks are +destroyed. Optional third arg NO-MSG means don't display any messages +while loading. + +If you load a file that doesn't contain a proper bookmark alist, you +will corrupt Emacs's bookmark list. Generally, you should only load +in files that were created with the bookmark functions in the first +place. Your own personal bookmark file, `~/.emacs.bmk', is +maintained automatically by Emacs; you shouldn't need to load it +explicitly. + +If you load a file containing bookmarks with the same names as +bookmarks already present in your Emacs, the new bookmarks will get +unique numeric suffixes \"<2>\", \"<3>\", ... following the same +method buffers use to resolve name collisions. + +\(fn FILE &optional OVERWRITE NO-MSG)" t nil) + +(autoload (quote bookmark-bmenu-list) "bookmark" "\ +Display a list of existing bookmarks. +The list is displayed in a buffer named `*Bookmark List*'. +The leftmost column displays a D if the bookmark is flagged for +deletion, or > if it is flagged for displaying. + +\(fn)" t nil) + +(defalias (quote list-bookmarks) (quote bookmark-bmenu-list)) + +(defalias (quote edit-bookmarks) (quote bookmark-bmenu-list)) + +(defvar menu-bar-bookmark-map (let ((map (make-sparse-keymap "Bookmark functions"))) (define-key map [load] (quote ("Load a Bookmark File..." . bookmark-load))) (define-key map [write] (quote ("Save Bookmarks As..." . bookmark-write))) (define-key map [save] (quote ("Save Bookmarks" . bookmark-save))) (define-key map [edit] (quote ("Edit Bookmark List" . bookmark-bmenu-list))) (define-key map [delete] (quote ("Delete Bookmark" . bookmark-delete))) (define-key map [rename] (quote ("Rename Bookmark" . bookmark-rename))) (define-key map [locate] (quote ("Insert Location" . bookmark-locate))) (define-key map [insert] (quote ("Insert Contents" . bookmark-insert))) (define-key map [set] (quote ("Set Bookmark" . bookmark-set))) (define-key map [jump] (quote ("Jump to Bookmark" . bookmark-jump))) map)) + +(defalias (quote menu-bar-bookmark-map) menu-bar-bookmark-map) + +;;;*** + +;;;### (autoloads (browse-url-kde browse-url-generic browse-url-mail +;;;;;; browse-url-mmm browse-url-lynx-emacs browse-url-lynx-xterm +;;;;;; browse-url-w3-gnudoit browse-url-w3 browse-url-iximosaic +;;;;;; browse-url-cci browse-url-grail browse-url-mosaic browse-url-gnome-moz +;;;;;; browse-url-galeon browse-url-mozilla browse-url-netscape +;;;;;; browse-url-default-browser browse-url-at-mouse browse-url-at-point +;;;;;; browse-url browse-url-of-region browse-url-of-dired-file +;;;;;; browse-url-of-buffer browse-url-of-file browse-url-browser-function) +;;;;;; "browse-url" "net/browse-url.el" (16211 27037)) +;;; Generated autoloads from net/browse-url.el + +(defvar browse-url-browser-function (cond ((memq system-type (quote (windows-nt ms-dos cygwin))) (quote browse-url-default-windows-browser)) ((memq system-type (quote (darwin))) (quote browse-url-default-macosx-browser)) (t (quote browse-url-default-browser))) "\ +*Function to display the current buffer in a WWW browser. +This is used by the `browse-url-at-point', `browse-url-at-mouse', and +`browse-url-of-file' commands. + +If the value is not a function it should be a list of pairs +\(REGEXP . FUNCTION). In this case the function called will be the one +associated with the first REGEXP which matches the current URL. The +function is passed the URL and any other args of `browse-url'. The last +regexp should probably be \".\" to specify a default browser.") + +(custom-autoload (quote browse-url-browser-function) "browse-url") + +(autoload (quote browse-url-of-file) "browse-url" "\ +Ask a WWW browser to display FILE. +Display the current buffer's file if FILE is nil or if called +interactively. Turn the filename into a URL with function +`browse-url-file-url'. Pass the URL to a browser using the +`browse-url' function then run `browse-url-of-file-hook'. + +\(fn &optional FILE)" t nil) + +(autoload (quote browse-url-of-buffer) "browse-url" "\ +Ask a WWW browser to display BUFFER. +Display the current buffer if BUFFER is nil. Display only the +currently visible part of BUFFER (from a temporary file) if buffer is +narrowed. + +\(fn &optional BUFFER)" t nil) + +(autoload (quote browse-url-of-dired-file) "browse-url" "\ +In Dired, ask a WWW browser to display the file named on this line. + +\(fn)" t nil) + +(autoload (quote browse-url-of-region) "browse-url" "\ +Ask a WWW browser to display the current region. + +\(fn MIN MAX)" t nil) + +(autoload (quote browse-url) "browse-url" "\ +Ask a WWW browser to load URL. +Prompts for a URL, defaulting to the URL at or before point. Variable +`browse-url-browser-function' says which browser to use. + +\(fn URL &rest ARGS)" t nil) + +(autoload (quote browse-url-at-point) "browse-url" "\ +Ask a WWW browser to load the URL at or before point. +Doesn't let you edit the URL like `browse-url'. Variable +`browse-url-browser-function' says which browser to use. + +\(fn &optional ARG)" t nil) + +(autoload (quote browse-url-at-mouse) "browse-url" "\ +Ask a WWW browser to load a URL clicked with the mouse. +The URL is the one around or before the position of the mouse click +but point is not changed. Doesn't let you edit the URL like +`browse-url'. Variable `browse-url-browser-function' says which browser +to use. + +\(fn EVENT)" t nil) + +(autoload (quote browse-url-default-browser) "browse-url" "\ +Find a suitable browser and ask it to load URL. +Default to the URL around or before point. + +When called interactively, if variable `browse-url-new-window-flag' is +non-nil, load the document in a new window, if possible, otherwise use +a random existing one. A non-nil interactive prefix argument reverses +the effect of `browse-url-new-window-flag'. + +When called non-interactively, optional second argument NEW-WINDOW is +used instead of `browse-url-new-window-flag'. + +The order attempted is gnome-moz-remote, Mozilla, Galeon, Netscape, +Mosaic, IXI Mosaic, Lynx in an xterm, MMM, Konqueror, and then W3. + +\(fn URL &rest ARGS)" nil nil) + +(autoload (quote browse-url-netscape) "browse-url" "\ +Ask the Netscape WWW browser to load URL. +Default to the URL around or before point. The strings in variable +`browse-url-netscape-arguments' are also passed to Netscape. + +When called interactively, if variable `browse-url-new-window-flag' is +non-nil, load the document in a new Netscape window, otherwise use a +random existing one. A non-nil interactive prefix argument reverses +the effect of `browse-url-new-window-flag'. + +When called non-interactively, optional second argument NEW-WINDOW is +used instead of `browse-url-new-window-flag'. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-mozilla) "browse-url" "\ +Ask the Mozilla WWW browser to load URL. +Default to the URL around or before point. The strings in variable +`browse-url-mozilla-arguments' are also passed to Mozilla. + +When called interactively, if variable `browse-url-new-window-flag' is +non-nil, load the document in a new Mozilla window, otherwise use a +random existing one. A non-nil interactive prefix argument reverses +the effect of `browse-url-new-window-flag'. + +If `browse-url-mozilla-new-window-is-tab' is non-nil, then whenever a +document would otherwise be loaded in a new window, it is loaded in a +new tab in an existing window instead. + +When called non-interactively, optional second argument NEW-WINDOW is +used instead of `browse-url-new-window-flag'. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-galeon) "browse-url" "\ +Ask the Galeon WWW browser to load URL. +Default to the URL around or before point. The strings in variable +`browse-url-galeon-arguments' are also passed to Galeon. + +When called interactively, if variable `browse-url-new-window-flag' is +non-nil, load the document in a new Galeon window, otherwise use a +random existing one. A non-nil interactive prefix argument reverses +the effect of `browse-url-new-window-flag'. + +If `browse-url-galeon-new-window-is-tab' is non-nil, then whenever a +document would otherwise be loaded in a new window, it is loaded in a +new tab in an existing window instead. + +When called non-interactively, optional second argument NEW-WINDOW is +used instead of `browse-url-new-window-flag'. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-gnome-moz) "browse-url" "\ +Ask Mozilla/Netscape to load URL via the GNOME program `gnome-moz-remote'. +Default to the URL around or before point. The strings in variable +`browse-url-gnome-moz-arguments' are also passed. + +When called interactively, if variable `browse-url-new-window-flag' is +non-nil, load the document in a new browser window, otherwise use an +existing one. A non-nil interactive prefix argument reverses the +effect of `browse-url-new-window-flag'. + +When called non-interactively, optional second argument NEW-WINDOW is +used instead of `browse-url-new-window-flag'. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-mosaic) "browse-url" "\ +Ask the XMosaic WWW browser to load URL. + +Default to the URL around or before point. The strings in variable +`browse-url-mosaic-arguments' are also passed to Mosaic and the +program is invoked according to the variable +`browse-url-mosaic-program'. + +When called interactively, if variable `browse-url-new-window-flag' is +non-nil, load the document in a new Mosaic window, otherwise use a +random existing one. A non-nil interactive prefix argument reverses +the effect of `browse-url-new-window-flag'. + +When called non-interactively, optional second argument NEW-WINDOW is +used instead of `browse-url-new-window-flag'. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-grail) "browse-url" "\ +Ask the Grail WWW browser to load URL. +Default to the URL around or before point. Runs the program in the +variable `browse-url-grail'. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-cci) "browse-url" "\ +Ask the XMosaic WWW browser to load URL. +Default to the URL around or before point. + +This function only works for XMosaic version 2.5 or later. You must +select `CCI' from XMosaic's File menu, set the CCI Port Address to the +value of variable `browse-url-CCI-port', and enable `Accept requests'. + +When called interactively, if variable `browse-url-new-window-flag' is +non-nil, load the document in a new browser window, otherwise use a +random existing one. A non-nil interactive prefix argument reverses +the effect of `browse-url-new-window-flag'. + +When called non-interactively, optional second argument NEW-WINDOW is +used instead of `browse-url-new-window-flag'. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-iximosaic) "browse-url" "\ +Ask the IXIMosaic WWW browser to load URL. +Default to the URL around or before point. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-w3) "browse-url" "\ +Ask the w3 WWW browser to load URL. +Default to the URL around or before point. + +When called interactively, if variable `browse-url-new-window-flag' is +non-nil, load the document in a new window. A non-nil interactive +prefix argument reverses the effect of `browse-url-new-window-flag'. + +When called non-interactively, optional second argument NEW-WINDOW is +used instead of `browse-url-new-window-flag'. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-w3-gnudoit) "browse-url" "\ +Ask another Emacs running gnuserv to load the URL using the W3 browser. +The `browse-url-gnudoit-program' program is used with options given by +`browse-url-gnudoit-args'. Default to the URL around or before point. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-lynx-xterm) "browse-url" "\ +Ask the Lynx WWW browser to load URL. +Default to the URL around or before point. A new Lynx process is run +in an Xterm window using the Xterm program named by `browse-url-xterm-program' +with possible additional arguments `browse-url-xterm-args'. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-lynx-emacs) "browse-url" "\ +Ask the Lynx WWW browser to load URL. +Default to the URL around or before point. With a prefix argument, run +a new Lynx process in a new buffer. + +When called interactively, if variable `browse-url-new-window-flag' is +non-nil, load the document in a new lynx in a new term window, +otherwise use any existing one. A non-nil interactive prefix argument +reverses the effect of `browse-url-new-window-flag'. + +When called non-interactively, optional second argument NEW-WINDOW is +used instead of `browse-url-new-window-flag'. + +\(fn URL &optional NEW-BUFFER)" t nil) + +(autoload (quote browse-url-mmm) "browse-url" "\ +Ask the MMM WWW browser to load URL. +Default to the URL around or before point. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-mail) "browse-url" "\ +Open a new mail message buffer within Emacs. +Default to using the mailto: URL around or before point as the +recipient's address. Supplying a non-nil interactive prefix argument +will cause the mail to be composed in another window rather than the +current one. + +When called interactively, if variable `browse-url-new-window-flag' is +non-nil use `compose-mail-other-window', otherwise `compose-mail'. A +non-nil interactive prefix argument reverses the effect of +`browse-url-new-window-flag'. + +When called non-interactively, optional second argument NEW-WINDOW is +used instead of `browse-url-new-window-flag'. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-generic) "browse-url" "\ +Ask the WWW browser defined by `browse-url-generic-program' to load URL. +Default to the URL around or before point. A fresh copy of the +browser is started up in a new process with possible additional arguments +`browse-url-generic-args'. This is appropriate for browsers which +don't offer a form of remote control. + +\(fn URL &optional NEW-WINDOW)" t nil) + +(autoload (quote browse-url-kde) "browse-url" "\ +Ask the KDE WWW browser to load URL. +Default to the URL around or before point. + +\(fn URL &optional NEW-WINDOW)" t nil) + +;;;*** + +;;;### (autoloads (snarf-bruces bruce) "bruce" "play/bruce.el" (16211 +;;;;;; 27038)) +;;; Generated autoloads from play/bruce.el + +(autoload (quote bruce) "bruce" "\ +Adds that special touch of class to your outgoing mail. + +\(fn)" t nil) + +(autoload (quote snarf-bruces) "bruce" "\ +Return a vector containing the lines from `bruce-phrases-file'. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (bs-show bs-customize bs-cycle-previous bs-cycle-next) +;;;;;; "bs" "bs.el" (16211 27012)) +;;; Generated autoloads from bs.el + +(autoload (quote bs-cycle-next) "bs" "\ +Select next buffer defined by buffer cycling. +The buffers taking part in buffer cycling are defined +by buffer configuration `bs-cycle-configuration-name'. + +\(fn)" t nil) + +(autoload (quote bs-cycle-previous) "bs" "\ +Select previous buffer defined by buffer cycling. +The buffers taking part in buffer cycling are defined +by buffer configuration `bs-cycle-configuration-name'. + +\(fn)" t nil) + +(autoload (quote bs-customize) "bs" "\ +Customization of group bs for Buffer Selection Menu. + +\(fn)" t nil) + +(autoload (quote bs-show) "bs" "\ +Make a menu of buffers so you can manipulate buffers or the buffer list. +\\ +There are many key commands similar to `Buffer-menu-mode' for +manipulating buffer list and buffers itself. +User can move with [up] or [down], select a buffer +by \\[bs-select] or [SPC] + +Type \\[bs-kill] to leave Buffer Selection Menu without a selection. +Type \\[bs-help] after invocation to get help on commands available. +With prefix argument ARG show a different buffer list. Function +`bs--configuration-name-for-prefix-arg' determine accordingly +name of buffer configuration. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (insert-text-button make-text-button insert-button +;;;;;; make-button define-button-type) "button" "button.el" (16310 +;;;;;; 39781)) +;;; Generated autoloads from button.el + +(defvar button-map (let ((map (make-sparse-keymap))) (define-key map " " (quote push-button)) (define-key map [mouse-2] (quote push-button)) map) "\ +Keymap used by buttons.") + +(defvar button-buffer-map (let ((map (make-sparse-keymap))) (define-key map [9] (quote forward-button)) (define-key map [backtab] (quote backward-button)) map) "\ +Keymap useful for buffers containing buttons. +Mode-specific keymaps may want to use this as their parent keymap.") + +(autoload (quote define-button-type) "button" "\ +Define a `button type' called NAME. +The remaining arguments form a sequence of PROPERTY VALUE pairs, +specifying properties to use as defaults for buttons with this type +\(a button's type may be set by giving it a `type' property when +creating the button, using the :type keyword argument). + +In addition, the keyword argument :supertype may be used to specify a +button-type from which NAME inherits its default property values +\(however, the inheritance happens only when NAME is defined; subsequent +changes to a supertype are not reflected in its subtypes). + +\(fn NAME &rest PROPERTIES)" nil nil) + +(autoload (quote make-button) "button" "\ +Make a button from BEG to END in the current buffer. +The remaining arguments form a sequence of PROPERTY VALUE pairs, +specifying properties to add to the button. +In addition, the keyword argument :type may be used to specify a +button-type from which to inherit other properties; see +`define-button-type'. + +Also see `make-text-button', `insert-button'. + +\(fn BEG END &rest PROPERTIES)" nil nil) + +(autoload (quote insert-button) "button" "\ +Insert a button with the label LABEL. +The remaining arguments form a sequence of PROPERTY VALUE pairs, +specifying properties to add to the button. +In addition, the keyword argument :type may be used to specify a +button-type from which to inherit other properties; see +`define-button-type'. + +Also see `insert-text-button', `make-button'. + +\(fn LABEL &rest PROPERTIES)" nil nil) + +(autoload (quote make-text-button) "button" "\ +Make a button from BEG to END in the current buffer. +The remaining arguments form a sequence of PROPERTY VALUE pairs, +specifying properties to add to the button. +In addition, the keyword argument :type may be used to specify a +button-type from which to inherit other properties; see +`define-button-type'. + +This function is like `make-button', except that the button is actually +part of the text instead of being a property of the buffer. Creating +large numbers of buttons can also be somewhat faster using +`make-text-button'. + +Also see `insert-text-button'. + +\(fn BEG END &rest PROPERTIES)" nil nil) + +(autoload (quote insert-text-button) "button" "\ +Insert a button with the label LABEL. +The remaining arguments form a sequence of PROPERTY VALUE pairs, +specifying properties to add to the button. +In addition, the keyword argument :type may be used to specify a +button-type from which to inherit other properties; see +`define-button-type'. + +This function is like `insert-button', except that the button is +actually part of the text instead of being a property of the buffer. +Creating large numbers of buttons can also be somewhat faster using +`insert-text-button'. + +Also see `make-text-button'. + +\(fn LABEL &rest PROPERTIES)" nil nil) + +;;;*** + +;;;### (autoloads (batch-byte-recompile-directory batch-byte-compile +;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile +;;;;;; compile-defun byte-compile-file byte-recompile-directory +;;;;;; byte-force-recompile) "bytecomp" "emacs-lisp/bytecomp.el" +;;;;;; (16239 4666)) +;;; Generated autoloads from emacs-lisp/bytecomp.el + +(autoload (quote byte-force-recompile) "bytecomp" "\ +Recompile every `.el' file in DIRECTORY that already has a `.elc' file. +Files in subdirectories of DIRECTORY are processed also. + +\(fn DIRECTORY)" t nil) + +(autoload (quote byte-recompile-directory) "bytecomp" "\ +Recompile every `.el' file in DIRECTORY that needs recompilation. +This is if a `.elc' file exists but is older than the `.el' file. +Files in subdirectories of DIRECTORY are processed also. + +If the `.elc' file does not exist, normally this function *does not* +compile the corresponding `.el' file. However, +if ARG (the prefix argument) is 0, that means do compile all those files. +A nonzero ARG means ask the user, for each such `.el' file, +whether to compile it. + +A nonzero ARG also means ask about each subdirectory before scanning it. + +If the third argument FORCE is non-nil, +recompile every `.el' file that already has a `.elc' file. + +\(fn DIRECTORY &optional ARG FORCE)" t nil) + +(autoload (quote byte-compile-file) "bytecomp" "\ +Compile a file of Lisp code named FILENAME into a file of byte code. +The output file's name is made by appending `c' to the end of FILENAME. +With prefix arg (noninteractively: 2nd arg), LOAD the file after compiling. +The value is non-nil if there were no errors, nil if errors. + +\(fn FILENAME &optional LOAD)" t nil) + +(autoload (quote compile-defun) "bytecomp" "\ +Compile and evaluate the current top-level form. +Print the result in the minibuffer. +With argument, insert value in current buffer after the form. + +\(fn &optional ARG)" t nil) + +(autoload (quote byte-compile) "bytecomp" "\ +If FORM is a symbol, byte-compile its function definition. +If FORM is a lambda or a macro, byte-compile it as a function. + +\(fn FORM)" nil nil) + +(autoload (quote display-call-tree) "bytecomp" "\ +Display a call graph of a specified file. +This lists which functions have been called, what functions called +them, and what functions they call. The list includes all functions +whose definitions have been compiled in this Emacs session, as well as +all functions called by those functions. + +The call graph does not include macros, inline functions, or +primitives that the byte-code interpreter knows about directly (eq, +cons, etc.). + +The call tree also lists those functions which are not known to be called +\(that is, to which no calls have been compiled), and which cannot be +invoked interactively. + +\(fn &optional FILENAME)" t nil) + +(autoload (quote batch-byte-compile-if-not-done) "bytecomp" "\ +Like `byte-compile-file' but doesn't recompile if already up to date. +Use this from the command line, with `-batch'; +it won't work in an interactive Emacs. + +\(fn)" nil nil) + +(autoload (quote batch-byte-compile) "bytecomp" "\ +Run `byte-compile-file' on the files remaining on the command line. +Use this from the command line, with `-batch'; +it won't work in an interactive Emacs. +Each file is processed even if an error occurred previously. +For example, invoke \"emacs -batch -f batch-byte-compile $emacs/ ~/*.el\". +If NOFORCE is non-nil, don't recompile a file that seems to be +already up-to-date. + +\(fn &optional NOFORCE)" nil nil) + +(autoload (quote batch-byte-recompile-directory) "bytecomp" "\ +Run `byte-recompile-directory' on the dirs remaining on the command line. +Must be used only with `-batch', and kills Emacs on completion. +For example, invoke `emacs -batch -f batch-byte-recompile-directory .'. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (16211 27023)) +;;; Generated autoloads from calendar/cal-dst.el + +(put (quote calendar-daylight-savings-starts) (quote risky-local-variable) t) + +(put (quote calendar-daylight-savings-ends) (quote risky-local-variable) t) + +;;;*** + +;;;### (autoloads (list-yahrzeit-dates) "cal-hebrew" "calendar/cal-hebrew.el" +;;;;;; (16211 27023)) +;;; Generated autoloads from calendar/cal-hebrew.el + +(autoload (quote list-yahrzeit-dates) "cal-hebrew" "\ +List Yahrzeit dates for *Gregorian* DEATH-DATE from START-YEAR to END-YEAR. +When called interactively from the calendar window, the date of death is taken +from the cursor position. + +\(fn DEATH-DATE START-YEAR END-YEAR)" t nil) + +;;;*** + +;;;### (autoloads (defmath calc-embedded-activate calc-embedded calc-grab-rectangle +;;;;;; calc-grab-region full-calc-keypad calc-keypad calc-eval quick-calc +;;;;;; full-calc calc calc-dispatch) "calc" "calc/calc.el" (16211 +;;;;;; 27022)) +;;; Generated autoloads from calc/calc.el + +(defvar calc-info-filename "calc.info" "\ +*File name in which to look for the Calculator's Info documentation.") + +(defvar calc-settings-file user-init-file "\ +*File in which to record permanent settings; default is `user-init-file'.") + +(defvar calc-autoload-directory nil "\ +Name of directory from which additional \".elc\" files for Calc should be +loaded. Should include a trailing \"/\". +If nil, use original installation directory. +This can safely be nil as long as the Calc files are on the load-path.") + +(defvar calc-gnuplot-name "gnuplot" "\ +*Name of GNUPLOT program, for calc-graph features.") + +(defvar calc-gnuplot-plot-command nil "\ +*Name of command for displaying GNUPLOT output; %s = file name to print.") + +(defvar calc-gnuplot-print-command "lp %s" "\ +*Name of command for printing GNUPLOT output; %s = file name to print.") + (global-set-key "\e#" 'calc-dispatch) + +(autoload (quote calc-dispatch) "calc" "\ +Invoke the GNU Emacs Calculator. See `calc-dispatch-help' for details. + +\(fn &optional ARG)" t nil) + +(autoload (quote calc) "calc" "\ +The Emacs Calculator. Full documentation is listed under \"calc-mode\". + +\(fn &optional ARG FULL-DISPLAY INTERACTIVE)" t nil) + +(autoload (quote full-calc) "calc" "\ +Invoke the Calculator and give it a full-sized window. + +\(fn)" t nil) + +(autoload (quote quick-calc) "calc" "\ +Do a quick calculation in the minibuffer without invoking full Calculator. + +\(fn)" t nil) + +(autoload (quote calc-eval) "calc" "\ +Do a quick calculation and return the result as a string. +Return value will either be the formatted result in string form, +or a list containing a character position and an error message in string form. + +\(fn STR &optional SEPARATOR &rest ARGS)" nil nil) + +(autoload (quote calc-keypad) "calc" "\ +Invoke the Calculator in \"visual keypad\" mode. +This is most useful in the X window system. +In this mode, click on the Calc \"buttons\" using the left mouse button. +Or, position the cursor manually and do M-x calc-keypad-press. + +\(fn)" t nil) + +(autoload (quote full-calc-keypad) "calc" "\ +Invoke the Calculator in full-screen \"visual keypad\" mode. +See calc-keypad for details. + +\(fn)" t nil) + +(autoload (quote calc-grab-region) "calc" "\ +Parse the region as a vector of numbers and push it on the Calculator stack. + +\(fn TOP BOT ARG)" t nil) + +(autoload (quote calc-grab-rectangle) "calc" "\ +Parse a rectangle as a matrix of numbers and push it on the Calculator stack. + +\(fn TOP BOT ARG)" t nil) + +(autoload (quote calc-embedded) "calc" "\ +Start Calc Embedded mode on the formula surrounding point. + +\(fn ARG &optional END OBEG OEND)" t nil) + +(autoload (quote calc-embedded-activate) "calc" "\ +Scan the current editing buffer for all embedded := and => formulas. +Also looks for the equivalent TeX words, \\gets and \\evalto. + +\(fn &optional ARG CBUF)" t nil) + +(autoload (quote defmath) "calc" "\ +Not documented + +\(fn FUNC ARGS &rest BODY)" nil (quote macro)) + +;;;*** + +;;;### (autoloads (calc-extensions) "calc-ext" "calc/calc-ext.el" +;;;;;; (16211 27022)) +;;; Generated autoloads from calc/calc-ext.el + +(autoload (quote calc-extensions) "calc-ext" "\ +This function is part of the autoload linkage for parts of Calc. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (calculator) "calculator" "calculator.el" (16211 +;;;;;; 27012)) +;;; Generated autoloads from calculator.el + +(autoload (quote calculator) "calculator" "\ +Run the Emacs calculator. +See the documentation for `calculator-mode' for more information. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (calendar solar-holidays islamic-holidays christian-holidays +;;;;;; hebrew-holidays other-holidays local-holidays oriental-holidays +;;;;;; general-holidays holidays-in-diary-buffer diary-list-include-blanks +;;;;;; nongregorian-diary-marking-hook mark-diary-entries-hook nongregorian-diary-listing-hook +;;;;;; diary-display-hook diary-hook list-diary-entries-hook print-diary-entries-hook +;;;;;; american-calendar-display-form european-calendar-display-form +;;;;;; european-date-diary-pattern american-date-diary-pattern european-calendar-style +;;;;;; abbreviated-calendar-year sexp-diary-entry-symbol diary-include-string +;;;;;; islamic-diary-entry-symbol hebrew-diary-entry-symbol diary-nonmarking-symbol +;;;;;; diary-file calendar-move-hook today-invisible-calendar-hook +;;;;;; today-visible-calendar-hook initial-calendar-window-hook +;;;;;; calendar-load-hook all-islamic-calendar-holidays all-christian-calendar-holidays +;;;;;; all-hebrew-calendar-holidays mark-holidays-in-calendar view-calendar-holidays-initially +;;;;;; calendar-remove-frame-by-deleting mark-diary-entries-in-calendar +;;;;;; number-of-diary-entries view-diary-entries-initially calendar-offset +;;;;;; calendar-week-start-day) "calendar" "calendar/calendar.el" +;;;;;; (16252 34047)) +;;; Generated autoloads from calendar/calendar.el + +(defvar calendar-week-start-day 0 "\ +*The day of the week on which a week in the calendar begins. +0 means Sunday (default), 1 means Monday, and so on.") + +(custom-autoload (quote calendar-week-start-day) "calendar") + +(defvar calendar-offset 0 "\ +*The offset of the principal month from the center of the calendar window. +0 means the principal month is in the center (default), -1 means on the left, ++1 means on the right. Larger (or smaller) values push the principal month off +the screen.") + +(custom-autoload (quote calendar-offset) "calendar") + +(defvar view-diary-entries-initially nil "\ +*Non-nil means display current date's diary entries on entry. +The diary is displayed in another window when the calendar is first displayed, +if the current date is visible. The number of days of diary entries displayed +is governed by the variable `number-of-diary-entries'.") + +(custom-autoload (quote view-diary-entries-initially) "calendar") + +(defvar number-of-diary-entries 1 "\ +*Specifies how many days of diary entries are to be displayed initially. +This variable affects the diary display when the command \\[diary] is used, +or if the value of the variable `view-diary-entries-initially' is t. For +example, if the default value 1 is used, then only the current day's diary +entries will be displayed. If the value 2 is used, then both the current +day's and the next day's entries will be displayed. + +The value can also be a vector such as [0 2 2 2 2 4 1]; this value +says to display no diary entries on Sunday, the display the entries +for the current date and the day after on Monday through Thursday, +display Friday through Monday's entries on Friday, and display only +Saturday's entries on Saturday. + +This variable does not affect the diary display with the `d' command +from the calendar; in that case, the prefix argument controls the +number of days of diary entries displayed.") + +(custom-autoload (quote number-of-diary-entries) "calendar") + +(defvar mark-diary-entries-in-calendar nil "\ +*Non-nil means mark dates with diary entries, in the calendar window. +The marking symbol is specified by the variable `diary-entry-marker'.") + +(custom-autoload (quote mark-diary-entries-in-calendar) "calendar") + +(defvar calendar-remove-frame-by-deleting nil "\ +*Determine how the calendar mode removes a frame no longer needed. +If nil, make an icon of the frame. If non-nil, delete the frame.") + +(custom-autoload (quote calendar-remove-frame-by-deleting) "calendar") + +(defvar view-calendar-holidays-initially nil "\ +*Non-nil means display holidays for current three month period on entry. +The holidays are displayed in another window when the calendar is first +displayed.") + +(custom-autoload (quote view-calendar-holidays-initially) "calendar") + +(defvar mark-holidays-in-calendar nil "\ +*Non-nil means mark dates of holidays in the calendar window. +The marking symbol is specified by the variable `calendar-holiday-marker'.") + +(custom-autoload (quote mark-holidays-in-calendar) "calendar") + +(defvar all-hebrew-calendar-holidays nil "\ +*If nil, show only major holidays from the Hebrew calendar. +This means only those Jewish holidays that appear on secular calendars. + +If t, show all the holidays that would appear in a complete Hebrew calendar.") + +(custom-autoload (quote all-hebrew-calendar-holidays) "calendar") + +(defvar all-christian-calendar-holidays nil "\ +*If nil, show only major holidays from the Christian calendar. +This means only those Christian holidays that appear on secular calendars. + +If t, show all the holidays that would appear in a complete Christian +calendar.") + +(custom-autoload (quote all-christian-calendar-holidays) "calendar") + +(defvar all-islamic-calendar-holidays nil "\ +*If nil, show only major holidays from the Islamic calendar. +This means only those Islamic holidays that appear on secular calendars. + +If t, show all the holidays that would appear in a complete Islamic +calendar.") + +(custom-autoload (quote all-islamic-calendar-holidays) "calendar") + +(defvar calendar-load-hook nil "\ +*List of functions to be called after the calendar is first loaded. +This is the place to add key bindings to `calendar-mode-map'.") + +(custom-autoload (quote calendar-load-hook) "calendar") + +(defvar initial-calendar-window-hook nil "\ +*List of functions to be called when the calendar window is first opened. +The functions invoked are called after the calendar window is opened, but +once opened is never called again. Leaving the calendar with the `q' command +and reentering it will cause these functions to be called again.") + +(custom-autoload (quote initial-calendar-window-hook) "calendar") + +(defvar today-visible-calendar-hook nil "\ +*List of functions called whenever the current date is visible. +This can be used, for example, to replace today's date with asterisks; a +function `calendar-star-date' is included for this purpose: + (setq today-visible-calendar-hook 'calendar-star-date) +It can also be used to mark the current date with `calendar-today-marker'; +a function is also provided for this: + (setq today-visible-calendar-hook 'calendar-mark-today) + +The corresponding variable `today-invisible-calendar-hook' is the list of +functions called when the calendar function was called when the current +date is not visible in the window. + +Other than the use of the provided functions, the changing of any +characters in the calendar buffer by the hooks may cause the failure of the +functions that move by days and weeks.") + +(custom-autoload (quote today-visible-calendar-hook) "calendar") + +(defvar today-invisible-calendar-hook nil "\ +*List of functions called whenever the current date is not visible. + +The corresponding variable `today-visible-calendar-hook' is the list of +functions called when the calendar function was called when the current +date is visible in the window. + +Other than the use of the provided functions, the changing of any +characters in the calendar buffer by the hooks may cause the failure of the +functions that move by days and weeks.") + +(custom-autoload (quote today-invisible-calendar-hook) "calendar") + +(defvar calendar-move-hook nil "\ +*List of functions called whenever the cursor moves in the calendar. + +For example, + + (add-hook 'calendar-move-hook (lambda () (view-diary-entries 1))) + +redisplays the diary for whatever date the cursor is moved to.") + +(custom-autoload (quote calendar-move-hook) "calendar") + +(defvar diary-file "~/diary" "\ +*Name of the file in which one's personal diary of dates is kept. + +The file's entries are lines beginning with any of the forms +specified by the variable `american-date-diary-pattern', by default: + + MONTH/DAY + MONTH/DAY/YEAR + MONTHNAME DAY + MONTHNAME DAY, YEAR + DAYNAME + +with the remainder of the line being the diary entry string for +that date. MONTH and DAY are one or two digit numbers, YEAR is a +number and may be written in full or abbreviated to the final two +digits (if `abbreviated-calendar-year' is non-nil). MONTHNAME +and DAYNAME can be spelled in full (as specified by the variables +`calendar-month-name-array' and `calendar-day-name-array'), +abbreviated (as specified by `calendar-month-abbrev-array' and +`calendar-day-abbrev-array') with or without a period, +capitalized or not. Any of DAY, MONTH, or MONTHNAME, YEAR can be +`*' which matches any day, month, or year, respectively. If the +date does not contain a year, it is generic and applies to any +year. A DAYNAME entry applies to the appropriate day of the week +in every week. + +The European style (in which the day precedes the month) can be +used instead, if you execute `european-calendar' when in the +calendar, or set `european-calendar-style' to t in your .emacs +file. The European forms (see `european-date-diary-pattern') are + + DAY/MONTH + DAY/MONTH/YEAR + DAY MONTHNAME + DAY MONTHNAME YEAR + DAYNAME + +To revert to the default American style from the European style, execute +`american-calendar' in the calendar. + +A diary entry can be preceded by the character +`diary-nonmarking-symbol' (ordinarily `&') to make that entry +nonmarking--that is, it will not be marked on dates in the calendar +window but will appear in a diary window. + +Multiline diary entries are made by indenting lines after the first with +either a TAB or one or more spaces. + +Lines not in one the above formats are ignored. Here are some sample diary +entries (in the default American style): + + 12/22/1988 Twentieth wedding anniversary!! + &1/1. Happy New Year! + 10/22 Ruth's birthday. + 21: Payday + Tuesday--weekly meeting with grad students at 10am + Supowit, Shen, Bitner, and Kapoor to attend. + 1/13/89 Friday the thirteenth!! + &thu 4pm squash game with Lloyd. + mar 16 Dad's birthday + April 15, 1989 Income tax due. + &* 15 time cards due. + +If the first line of a diary entry consists only of the date or day name with +no trailing blanks or punctuation, then that line is not displayed in the +diary window; only the continuation lines is shown. For example, the +single diary entry + + 02/11/1989 + Bill Blattner visits Princeton today + 2pm Cognitive Studies Committee meeting + 2:30-5:30 Lizzie at Lawrenceville for `Group Initiative' + 4:00pm Jamie Tappenden + 7:30pm Dinner at George and Ed's for Alan Ryan + 7:30-10:00pm dance at Stewart Country Day School + +will appear in the diary window without the date line at the beginning. This +facility allows the diary window to look neater, but can cause confusion if +used with more than one day's entries displayed. + +Diary entries can be based on Lisp sexps. For example, the diary entry + + %%(diary-block 11 1 1990 11 10 1990) Vacation + +causes the diary entry \"Vacation\" to appear from November 1 through November +10, 1990. Other functions available are `diary-float', `diary-anniversary', +`diary-cyclic', `diary-day-of-year', `diary-iso-date', `diary-french-date', +`diary-hebrew-date', `diary-islamic-date', `diary-mayan-date', +`diary-chinese-date', `diary-coptic-date', `diary-ethiopic-date', +`diary-persian-date', `diary-yahrzeit', `diary-sunrise-sunset', +`diary-phases-of-moon', `diary-parasha', `diary-omer', `diary-rosh-hodesh', +and `diary-sabbath-candles'. See the documentation for the function +`list-sexp-diary-entries' for more details. + +Diary entries based on the Hebrew and/or the Islamic calendar are also +possible, but because these are somewhat slow, they are ignored +unless you set the `nongregorian-diary-listing-hook' and the +`nongregorian-diary-marking-hook' appropriately. See the documentation +for these functions for details. + +Diary files can contain directives to include the contents of other files; for +details, see the documentation for the variable `list-diary-entries-hook'.") + +(custom-autoload (quote diary-file) "calendar") + +(defvar diary-nonmarking-symbol "&" "\ +*Symbol indicating that a diary entry is not to be marked in the calendar.") + +(custom-autoload (quote diary-nonmarking-symbol) "calendar") + +(defvar hebrew-diary-entry-symbol "H" "\ +*Symbol indicating a diary entry according to the Hebrew calendar.") + +(custom-autoload (quote hebrew-diary-entry-symbol) "calendar") + +(defvar islamic-diary-entry-symbol "I" "\ +*Symbol indicating a diary entry according to the Islamic calendar.") + +(custom-autoload (quote islamic-diary-entry-symbol) "calendar") + +(defvar diary-include-string "#include" "\ +*The string indicating inclusion of another file of diary entries. +See the documentation for the function `include-other-diary-files'.") + +(custom-autoload (quote diary-include-string) "calendar") + +(defvar sexp-diary-entry-symbol "%%" "\ +*The string used to indicate a sexp diary entry in `diary-file'. +See the documentation for the function `list-sexp-diary-entries'.") + +(custom-autoload (quote sexp-diary-entry-symbol) "calendar") + +(defvar abbreviated-calendar-year t "\ +*Interpret a two-digit year DD in a diary entry as either 19DD or 20DD. +For the Gregorian calendar; similarly for the Hebrew and Islamic calendars. +If this variable is nil, years must be written in full.") + +(custom-autoload (quote abbreviated-calendar-year) "calendar") + +(defvar european-calendar-style nil "\ +*Use the European style of dates in the diary and in any displays. +If this variable is t, a date 1/2/1990 would be interpreted as February 1, +1990. The default European date styles (see `european-date-diary-pattern') +are + + DAY/MONTH + DAY/MONTH/YEAR + DAY MONTHNAME + DAY MONTHNAME YEAR + DAYNAME + +Names can be capitalized or not, written in full (as specified by the +variable `calendar-day-name-array'), or abbreviated (as specified by +`calendar-day-abbrev-array') with or without a period.") + +(custom-autoload (quote european-calendar-style) "calendar") + +(defvar american-date-diary-pattern (quote ((month "/" day "[^/0-9]") (month "/" day "/" year "[^0-9]") (monthname " *" day "[^,0-9]") (monthname " *" day ", *" year "[^0-9]") (dayname "\\W"))) "\ +*List of pseudo-patterns describing the American patterns of date used. +See the documentation of `diary-date-forms' for an explanation.") + +(custom-autoload (quote american-date-diary-pattern) "calendar") + +(defvar european-date-diary-pattern (quote ((day "/" month "[^/0-9]") (day "/" month "/" year "[^0-9]") (backup day " *" monthname "\\W+\\<\\([^*0-9]\\|\\([0-9]+[:aApP]\\)\\)") (day " *" monthname " *" year "[^0-9]") (dayname "\\W"))) "\ +*List of pseudo-patterns describing the European patterns of date used. +See the documentation of `diary-date-forms' for an explanation.") + +(custom-autoload (quote european-date-diary-pattern) "calendar") + +(defvar european-calendar-display-form (quote ((if dayname (concat dayname ", ")) day " " monthname " " year)) "\ +*Pseudo-pattern governing the way a date appears in the European style. +See the documentation of `calendar-date-display-form' for an explanation.") + +(custom-autoload (quote european-calendar-display-form) "calendar") + +(defvar american-calendar-display-form (quote ((if dayname (concat dayname ", ")) monthname " " day ", " year)) "\ +*Pseudo-pattern governing the way a date appears in the American style. +See the documentation of `calendar-date-display-form' for an explanation.") + +(custom-autoload (quote american-calendar-display-form) "calendar") + +(defvar print-diary-entries-hook (quote lpr-buffer) "\ +*List of functions called after a temporary diary buffer is prepared. +The buffer shows only the diary entries currently visible in the diary +buffer. The default just does the printing. Other uses might include, for +example, rearranging the lines into order by day and time, saving the buffer +instead of deleting it, or changing the function used to do the printing.") + +(custom-autoload (quote print-diary-entries-hook) "calendar") + +(defvar list-diary-entries-hook nil "\ +*List of functions called after diary file is culled for relevant entries. +It is to be used for diary entries that are not found in the diary file. + +A function `include-other-diary-files' is provided for use as the value of +this hook. This function enables you to use shared diary files together +with your own. The files included are specified in the diary file by lines +of the form + + #include \"filename\" + +This is recursive; that is, #include directives in files thus included are +obeyed. You can change the \"#include\" to some other string by changing +the variable `diary-include-string'. When you use `include-other-diary-files' +as part of the list-diary-entries-hook, you will probably also want to use the +function `mark-included-diary-files' as part of `mark-diary-entries-hook'. + +For example, you could use + + (setq list-diary-entries-hook + '(include-other-diary-files sort-diary-entries)) + (setq diary-display-hook 'fancy-diary-display) + +in your `.emacs' file to cause the fancy diary buffer to be displayed with +diary entries from various included files, each day's entries sorted into +lexicographic order.") + +(custom-autoload (quote list-diary-entries-hook) "calendar") + +(defvar diary-hook nil "\ +*List of functions called after the display of the diary. +Can be used for appointment notification.") + +(custom-autoload (quote diary-hook) "calendar") + +(defvar diary-display-hook nil "\ +*List of functions that handle the display of the diary. +If nil (the default), `simple-diary-display' is used. Use `ignore' for no +diary display. + +Ordinarily, this just displays the diary buffer (with holidays indicated in +the mode line), if there are any relevant entries. At the time these +functions are called, the variable `diary-entries-list' is a list, in order +by date, of all relevant diary entries in the form of ((MONTH DAY YEAR) +STRING), where string is the diary entry for the given date. This can be +used, for example, a different buffer for display (perhaps combined with +holidays), or produce hard copy output. + +A function `fancy-diary-display' is provided as an alternative +choice for this hook; this function prepares a special noneditable diary +buffer with the relevant diary entries that has neat day-by-day arrangement +with headings. The fancy diary buffer will show the holidays unless the +variable `holidays-in-diary-buffer' is set to nil. Ordinarily, the fancy +diary buffer will not show days for which there are no diary entries, even +if that day is a holiday; if you want such days to be shown in the fancy +diary buffer, set the variable `diary-list-include-blanks' to t.") + +(custom-autoload (quote diary-display-hook) "calendar") + +(defvar nongregorian-diary-listing-hook nil "\ +*List of functions called for listing diary file and included files. +As the files are processed for diary entries, these functions are used to cull +relevant entries. You can use either or both of `list-hebrew-diary-entries' +and `list-islamic-diary-entries'. The documentation for these functions +describes the style of such diary entries.") + +(custom-autoload (quote nongregorian-diary-listing-hook) "calendar") + +(defvar mark-diary-entries-hook nil "\ +*List of functions called after marking diary entries in the calendar. + +A function `mark-included-diary-files' is also provided for use as the +`mark-diary-entries-hook'; it enables you to use shared diary files together +with your own. The files included are specified in the diary file by lines +of the form + #include \"filename\" +This is recursive; that is, #include directives in files thus included are +obeyed. You can change the \"#include\" to some other string by changing the +variable `diary-include-string'. When you use `mark-included-diary-files' as +part of the mark-diary-entries-hook, you will probably also want to use the +function `include-other-diary-files' as part of `list-diary-entries-hook'.") + +(custom-autoload (quote mark-diary-entries-hook) "calendar") + +(defvar nongregorian-diary-marking-hook nil "\ +*List of functions called for marking diary file and included files. +As the files are processed for diary entries, these functions are used to cull +relevant entries. You can use either or both of `mark-hebrew-diary-entries' +and `mark-islamic-diary-entries'. The documentation for these functions +describes the style of such diary entries.") + +(custom-autoload (quote nongregorian-diary-marking-hook) "calendar") + +(defvar diary-list-include-blanks nil "\ +*If nil, do not include days with no diary entry in the list of diary entries. +Such days will then not be shown in the fancy diary buffer, even if they +are holidays.") + +(custom-autoload (quote diary-list-include-blanks) "calendar") + +(defvar holidays-in-diary-buffer t "\ +*Non-nil means include holidays in the diary display. +The holidays appear in the mode line of the diary buffer, or in the +fancy diary buffer next to the date. This slows down the diary functions +somewhat; setting it to nil makes the diary display faster.") + +(custom-autoload (quote holidays-in-diary-buffer) "calendar") + +(put (quote general-holidays) (quote risky-local-variable) t) + +(defvar general-holidays (quote ((holiday-fixed 1 1 "New Year's Day") (holiday-float 1 1 3 "Martin Luther King Day") (holiday-fixed 2 2 "Groundhog Day") (holiday-fixed 2 14 "Valentine's Day") (holiday-float 2 1 3 "President's Day") (holiday-fixed 3 17 "St. Patrick's Day") (holiday-fixed 4 1 "April Fools' Day") (holiday-float 5 0 2 "Mother's Day") (holiday-float 5 1 -1 "Memorial Day") (holiday-fixed 6 14 "Flag Day") (holiday-float 6 0 3 "Father's Day") (holiday-fixed 7 4 "Independence Day") (holiday-float 9 1 1 "Labor Day") (holiday-float 10 1 2 "Columbus Day") (holiday-fixed 10 31 "Halloween") (holiday-fixed 11 11 "Veteran's Day") (holiday-float 11 4 4 "Thanksgiving"))) "\ +*General holidays. Default value is for the United States. +See the documentation for `calendar-holidays' for details.") + +(custom-autoload (quote general-holidays) "calendar") + +(put (quote oriental-holidays) (quote risky-local-variable) t) + +(defvar oriental-holidays (quote ((if (fboundp (quote atan)) (holiday-chinese-new-year)))) "\ +*Oriental holidays. +See the documentation for `calendar-holidays' for details.") + +(custom-autoload (quote oriental-holidays) "calendar") + +(put (quote local-holidays) (quote risky-local-variable) t) + +(defvar local-holidays nil "\ +*Local holidays. +See the documentation for `calendar-holidays' for details.") + +(custom-autoload (quote local-holidays) "calendar") + +(put (quote other-holidays) (quote risky-local-variable) t) + +(defvar other-holidays nil "\ +*User defined holidays. +See the documentation for `calendar-holidays' for details.") + +(custom-autoload (quote other-holidays) "calendar") + +(put (quote hebrew-holidays-1) (quote risky-local-variable) t) + +(defvar hebrew-holidays-1 (quote ((holiday-rosh-hashanah-etc) (if all-hebrew-calendar-holidays (holiday-julian 11 (let* ((m displayed-month) (y displayed-year) (year)) (increment-calendar-month m y -1) (let ((year (extract-calendar-year (calendar-julian-from-absolute (calendar-absolute-from-gregorian (list m 1 y)))))) (if (zerop (% (1+ year) 4)) 22 21))) "\"Tal Umatar\" (evening)"))))) + +(put (quote hebrew-holidays-2) (quote risky-local-variable) t) + +(defvar hebrew-holidays-2 (quote ((if all-hebrew-calendar-holidays (holiday-hanukkah) (holiday-hebrew 9 25 "Hanukkah")) (if all-hebrew-calendar-holidays (holiday-hebrew 10 (let ((h-year (extract-calendar-year (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian (list displayed-month 28 displayed-year)))))) (if (= (% (calendar-absolute-from-hebrew (list 10 10 h-year)) 7) 6) 11 10)) "Tzom Teveth")) (if all-hebrew-calendar-holidays (holiday-hebrew 11 15 "Tu B'Shevat"))))) + +(put (quote hebrew-holidays-3) (quote risky-local-variable) t) + +(defvar hebrew-holidays-3 (quote ((if all-hebrew-calendar-holidays (holiday-hebrew 11 (let ((m displayed-month) (y displayed-year)) (increment-calendar-month m y 1) (let* ((h-year (extract-calendar-year (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian (list m (calendar-last-day-of-month m y) y))))) (s-s (calendar-hebrew-from-absolute (if (= (% (calendar-absolute-from-hebrew (list 7 1 h-year)) 7) 6) (calendar-dayname-on-or-before 6 (calendar-absolute-from-hebrew (list 11 17 h-year))) (calendar-dayname-on-or-before 6 (calendar-absolute-from-hebrew (list 11 16 h-year)))))) (day (extract-calendar-day s-s))) day)) "Shabbat Shirah"))))) + +(put (quote hebrew-holidays-4) (quote risky-local-variable) t) + +(defvar hebrew-holidays-4 (quote ((holiday-passover-etc) (if (and all-hebrew-calendar-holidays (let* ((m displayed-month) (y displayed-year) (year)) (increment-calendar-month m y -1) (let ((year (extract-calendar-year (calendar-julian-from-absolute (calendar-absolute-from-gregorian (list m 1 y)))))) (= 21 (% year 28))))) (holiday-julian 3 26 "Kiddush HaHamah")) (if all-hebrew-calendar-holidays (holiday-tisha-b-av-etc))))) + +(put (quote hebrew-holidays) (quote risky-local-variable) t) + +(defvar hebrew-holidays (append hebrew-holidays-1 hebrew-holidays-2 hebrew-holidays-3 hebrew-holidays-4) "\ +*Jewish holidays. +See the documentation for `calendar-holidays' for details.") + +(custom-autoload (quote hebrew-holidays) "calendar") + +(put (quote christian-holidays) (quote risky-local-variable) t) + +(defvar christian-holidays (quote ((if all-christian-calendar-holidays (holiday-fixed 1 6 "Epiphany")) (holiday-easter-etc) (if all-christian-calendar-holidays (holiday-greek-orthodox-easter)) (if all-christian-calendar-holidays (holiday-fixed 8 15 "Assumption")) (if all-christian-calendar-holidays (holiday-advent)) (holiday-fixed 12 25 "Christmas") (if all-christian-calendar-holidays (holiday-julian 12 25 "Eastern Orthodox Christmas")))) "\ +*Christian holidays. +See the documentation for `calendar-holidays' for details.") + +(custom-autoload (quote christian-holidays) "calendar") + +(put (quote islamic-holidays) (quote risky-local-variable) t) + +(defvar islamic-holidays (quote ((holiday-islamic 1 1 (format "Islamic New Year %d" (let ((m displayed-month) (y displayed-year)) (increment-calendar-month m y 1) (extract-calendar-year (calendar-islamic-from-absolute (calendar-absolute-from-gregorian (list m (calendar-last-day-of-month m y) y))))))) (if all-islamic-calendar-holidays (holiday-islamic 1 10 "Ashura")) (if all-islamic-calendar-holidays (holiday-islamic 3 12 "Mulad-al-Nabi")) (if all-islamic-calendar-holidays (holiday-islamic 7 26 "Shab-e-Mi'raj")) (if all-islamic-calendar-holidays (holiday-islamic 8 15 "Shab-e-Bara't")) (holiday-islamic 9 1 "Ramadan Begins") (if all-islamic-calendar-holidays (holiday-islamic 9 27 "Shab-e Qadr")) (if all-islamic-calendar-holidays (holiday-islamic 10 1 "Id-al-Fitr")) (if all-islamic-calendar-holidays (holiday-islamic 12 10 "Id-al-Adha")))) "\ +*Islamic holidays. +See the documentation for `calendar-holidays' for details.") + +(custom-autoload (quote islamic-holidays) "calendar") + +(put (quote solar-holidays) (quote risky-local-variable) t) + +(defvar solar-holidays (quote ((if (fboundp (quote atan)) (solar-equinoxes-solstices)) (if (progn (require (quote cal-dst)) t) (funcall (quote holiday-sexp) calendar-daylight-savings-starts (quote (format "Daylight Savings Time Begins %s" (if (fboundp (quote atan)) (solar-time-string (/ calendar-daylight-savings-starts-time (float 60)) calendar-standard-time-zone-name) ""))))) (funcall (quote holiday-sexp) calendar-daylight-savings-ends (quote (format "Daylight Savings Time Ends %s" (if (fboundp (quote atan)) (solar-time-string (/ calendar-daylight-savings-ends-time (float 60)) calendar-daylight-time-zone-name) "")))))) "\ +*Sun-related holidays. +See the documentation for `calendar-holidays' for details.") + +(custom-autoload (quote solar-holidays) "calendar") + +(put (quote calendar-holidays) (quote risky-local-variable) t) + +(defvar calendar-setup nil "\ +The frame set up of the calendar. +The choices are `one-frame' (calendar and diary together in one separate, +dedicated frame), `two-frames' (calendar and diary in separate, dedicated +frames), `calendar-only' (calendar in a separate, dedicated frame); with +any other value the current frame is used.") + +(autoload (quote calendar) "calendar" "\ +Choose between the one frame, two frame, or basic calendar displays. +If called with an optional prefix argument, prompts for month and year. + +The original function `calendar' has been renamed `calendar-basic-setup'. +See the documentation of that function for more information. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (pike-mode idl-mode java-mode objc-mode c++-mode +;;;;;; c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el" +;;;;;; (16211 27038)) +;;; Generated autoloads from progmodes/cc-mode.el + +(autoload (quote c-initialize-cc-mode) "cc-mode" "\ +Initialize CC Mode for use in the current buffer. +If the optional NEW-STYLE-INIT is nil or left out then all necessary +initialization to run CC Mode for the C language is done. Otherwise +only some basic setup is done, and a call to `c-init-language-vars' or +`c-init-language-vars-for' is necessary too (which gives more +control). See \"cc-mode.el\" for more info. + +\(fn &optional NEW-STYLE-INIT)" nil nil) + +(defvar c-mode-syntax-table nil "\ +Syntax table used in c-mode buffers.") + (add-to-list 'auto-mode-alist '("\\.\\(cc\\|hh\\)\\'" . c++-mode)) + (add-to-list 'auto-mode-alist '("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode)) + (add-to-list 'auto-mode-alist '("\\.\\(CC?\\|HH?\\)\\'" . c++-mode)) + (add-to-list 'auto-mode-alist '("\\.[ch]\\'" . c-mode)) + (add-to-list 'auto-mode-alist '("\\.y\\(acc\\)?\\'" . c-mode)) + (add-to-list 'auto-mode-alist '("\\.lex\\'" . c-mode)) + +(autoload (quote c-mode) "cc-mode" "\ +Major mode for editing K&R and ANSI C code. +To submit a problem report, enter `\\[c-submit-bug-report]' from a +c-mode buffer. This automatically sets up a mail buffer with version +information already added. You just need to add a description of the +problem, including a reproducible test case, and send the message. + +To see what version of CC Mode you are running, enter `\\[c-version]'. + +The hook `c-mode-common-hook' is run with no args at mode +initialization, then `c-mode-hook'. + +Key bindings: +\\{c-mode-map} + +\(fn)" t nil) + +(defvar c++-mode-syntax-table nil "\ +Syntax table used in c++-mode buffers.") + +(autoload (quote c++-mode) "cc-mode" "\ +Major mode for editing C++ code. +To submit a problem report, enter `\\[c-submit-bug-report]' from a +c++-mode buffer. This automatically sets up a mail buffer with +version information already added. You just need to add a description +of the problem, including a reproducible test case, and send the +message. + +To see what version of CC Mode you are running, enter `\\[c-version]'. + +The hook `c-mode-common-hook' is run with no args at mode +initialization, then `c++-mode-hook'. + +Key bindings: +\\{c++-mode-map} + +\(fn)" t nil) + +(defvar objc-mode-syntax-table nil "\ +Syntax table used in objc-mode buffers.") + (add-to-list 'auto-mode-alist '("\\.m\\'" . objc-mode)) + +(autoload (quote objc-mode) "cc-mode" "\ +Major mode for editing Objective C code. +To submit a problem report, enter `\\[c-submit-bug-report]' from an +objc-mode buffer. This automatically sets up a mail buffer with +version information already added. You just need to add a description +of the problem, including a reproducible test case, and send the +message. + +To see what version of CC Mode you are running, enter `\\[c-version]'. + +The hook `c-mode-common-hook' is run with no args at mode +initialization, then `objc-mode-hook'. + +Key bindings: +\\{objc-mode-map} + +\(fn)" t nil) + +(defvar java-mode-syntax-table nil "\ +Syntax table used in java-mode buffers.") + (add-to-list 'auto-mode-alist '("\\.java\\'" . java-mode)) + +(autoload (quote java-mode) "cc-mode" "\ +Major mode for editing Java code. +To submit a problem report, enter `\\[c-submit-bug-report]' from a +java-mode buffer. This automatically sets up a mail buffer with +version information already added. You just need to add a description +of the problem, including a reproducible test case, and send the +message. + +To see what version of CC Mode you are running, enter `\\[c-version]'. + +The hook `c-mode-common-hook' is run with no args at mode +initialization, then `java-mode-hook'. + +Key bindings: +\\{java-mode-map} + +\(fn)" t nil) + +(defvar idl-mode-syntax-table nil "\ +Syntax table used in idl-mode buffers.") + (add-to-list 'auto-mode-alist '("\\.idl\\'" . idl-mode)) + +(autoload (quote idl-mode) "cc-mode" "\ +Major mode for editing CORBA's IDL, PSDL and CIDL code. +To submit a problem report, enter `\\[c-submit-bug-report]' from an +idl-mode buffer. This automatically sets up a mail buffer with +version information already added. You just need to add a description +of the problem, including a reproducible test case, and send the +message. + +To see what version of CC Mode you are running, enter `\\[c-version]'. + +The hook `c-mode-common-hook' is run with no args at mode +initialization, then `idl-mode-hook'. + +Key bindings: +\\{idl-mode-map} + +\(fn)" t nil) + +(defvar pike-mode-syntax-table nil "\ +Syntax table used in pike-mode buffers.") + (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(.in\\)?\\)\\'" . pike-mode)) + (add-to-list 'interpreter-mode-alist '("pike" . pike-mode)) + +(autoload (quote pike-mode) "cc-mode" "\ +Major mode for editing Pike code. +To submit a problem report, enter `\\[c-submit-bug-report]' from a +pike-mode buffer. This automatically sets up a mail buffer with +version information already added. You just need to add a description +of the problem, including a reproducible test case, and send the +message. + +To see what version of CC Mode you are running, enter `\\[c-version]'. + +The hook `c-mode-common-hook' is run with no args at mode +initialization, then `pike-mode-hook'. + +Key bindings: +\\{pike-mode-map} + +\(fn)" t nil) + (add-to-list 'auto-mode-alist '("\\.awk\\'" . awk-mode)) + (add-to-list 'interpreter-mode-alist '("awk" . awk-mode)) + (add-to-list 'interpreter-mode-alist '("mawk" . awk-mode)) + (add-to-list 'interpreter-mode-alist '("nawk" . awk-mode)) + (add-to-list 'interpreter-mode-alist '("gawk" . awk-mode)) + (autoload 'awk-mode "cc-mode" "Major mode for editing AWK code.") + +;;;*** + +;;;### (autoloads (c-set-offset c-add-style c-set-style) "cc-styles" +;;;;;; "progmodes/cc-styles.el" (16241 41611)) +;;; Generated autoloads from progmodes/cc-styles.el + +(autoload (quote c-set-style) "cc-styles" "\ +Set CC Mode variables to use one of several different indentation styles. +STYLENAME is a string representing the desired style from the list of +styles described in the variable `c-style-alist'. See that variable +for details of setting up styles. + +The variable `c-indentation-style' always contains the buffer's current +style name. + +If the optional argument DONT-OVERRIDE is t, no style variables that +already have values will be overridden. I.e. in the case of +`c-offsets-alist', syntactic symbols will only be added, and in the +case of all other style variables, only those set to `set-from-style' +will be reassigned. + +If DONT-OVERRIDE is neither nil nor t, only those style variables that +have default (i.e. non-buffer local) values will keep their settings +while the rest will be overridden. This is useful to avoid overriding +global settings done in ~/.emacs when setting a style from a mode hook +\(providing the style variables are buffer local, which is the +default). + +Obviously, setting DONT-OVERRIDE to t is useful mainly when the +initial style is chosen for a CC Mode buffer by a major mode. Since +that is done internally by CC Mode, it typically won't have any effect +when used elsewhere. + +\(fn STYLENAME &optional DONT-OVERRIDE)" t nil) + +(autoload (quote c-add-style) "cc-styles" "\ +Adds a style to `c-style-alist', or updates an existing one. +STYLE is a string identifying the style to add or update. DESCRIPTION +is an association list describing the style and must be of the form: + + ([BASESTYLE] (VARIABLE . VALUE) [(VARIABLE . VALUE) ...]) + +See the variable `c-style-alist' for the semantics of BASESTYLE, +VARIABLE and VALUE. This function also sets the current style to +STYLE using `c-set-style' if the optional SET-P flag is non-nil. + +\(fn STYLE DESCRIPTION &optional SET-P)" t nil) + +(autoload (quote c-set-offset) "cc-styles" "\ +Change the value of a syntactic element symbol in `c-offsets-alist'. +SYMBOL is the syntactic element symbol to change and OFFSET is the new +offset for that syntactic element. The optional argument is not used +and exists only for compatibility reasons. + +\(fn SYMBOL OFFSET &optional IGNORED)" t nil) + +;;;*** + +;;;### (autoloads (ccl-execute-with-args check-ccl-program define-ccl-program +;;;;;; declare-ccl-program ccl-dump ccl-compile) "ccl" "international/ccl.el" +;;;;;; (16211 27032)) +;;; Generated autoloads from international/ccl.el + +(autoload (quote ccl-compile) "ccl" "\ +Return the compiled code of CCL-PROGRAM as a vector of integers. + +\(fn CCL-PROGRAM)" nil nil) + +(autoload (quote ccl-dump) "ccl" "\ +Disassemble compiled CCL-CODE. + +\(fn CCL-CODE)" nil nil) + +(autoload (quote declare-ccl-program) "ccl" "\ +Declare NAME as a name of CCL program. + +This macro exists for backward compatibility. In the old version of +Emacs, to compile a CCL program which calls another CCL program not +yet defined, it must be declared as a CCL program in advance. But, +now CCL program names are resolved not at compile time but before +execution. + +Optional arg VECTOR is a compiled CCL code of the CCL program. + +\(fn NAME &optional VECTOR)" nil (quote macro)) + +(autoload (quote define-ccl-program) "ccl" "\ +Set NAME the compiled code of CCL-PROGRAM. + +CCL-PROGRAM has this form: + (BUFFER_MAGNIFICATION + CCL_MAIN_CODE + [ CCL_EOF_CODE ]) + +BUFFER_MAGNIFICATION is an integer value specifying the approximate +output buffer magnification size compared with the bytes of input data +text. If the value is zero, the CCL program can't execute `read' and +`write' commands. + +CCL_MAIN_CODE and CCL_EOF_CODE are CCL program codes. CCL_MAIN_CODE +executed at first. If there's no more input data when `read' command +is executed in CCL_MAIN_CODE, CCL_EOF_CODE is executed. If +CCL_MAIN_CODE is terminated, CCL_EOF_CODE is not executed. + +Here's the syntax of CCL program code in BNF notation. The lines +starting by two semicolons (and optional leading spaces) describe the +semantics. + +CCL_MAIN_CODE := CCL_BLOCK + +CCL_EOF_CODE := CCL_BLOCK + +CCL_BLOCK := STATEMENT | (STATEMENT [STATEMENT ...]) + +STATEMENT := + SET | IF | BRANCH | LOOP | REPEAT | BREAK | READ | WRITE | CALL + | TRANSLATE | MAP | LOOKUP | END + +SET := (REG = EXPRESSION) + | (REG ASSIGNMENT_OPERATOR EXPRESSION) + ;; The following form is the same as (r0 = integer). + | integer + +EXPRESSION := ARG | (EXPRESSION OPERATOR ARG) + +;; Evaluate EXPRESSION. If the result is nonzero, execute +;; CCL_BLOCK_0. Otherwise, execute CCL_BLOCK_1. +IF := (if EXPRESSION CCL_BLOCK_0 CCL_BLOCK_1) + +;; Evaluate EXPRESSION. Provided that the result is N, execute +;; CCL_BLOCK_N. +BRANCH := (branch EXPRESSION CCL_BLOCK_0 [CCL_BLOCK_1 ...]) + +;; Execute STATEMENTs until (break) or (end) is executed. +LOOP := (loop STATEMENT [STATEMENT ...]) + +;; Terminate the most inner loop. +BREAK := (break) + +REPEAT := + ;; Jump to the head of the most inner loop. + (repeat) + ;; Same as: ((write [REG | integer | string]) + ;; (repeat)) + | (write-repeat [REG | integer | string]) + ;; Same as: ((write REG [ARRAY]) + ;; (read REG) + ;; (repeat)) + | (write-read-repeat REG [ARRAY]) + ;; Same as: ((write integer) + ;; (read REG) + ;; (repeat)) + | (write-read-repeat REG integer) + +READ := ;; Set REG_0 to a byte read from the input text, set REG_1 + ;; to the next byte read, and so on. + (read REG_0 [REG_1 ...]) + ;; Same as: ((read REG) + ;; (if (REG OPERATOR ARG) CCL_BLOCK_0 CCL_BLOCK_1)) + | (read-if (REG OPERATOR ARG) CCL_BLOCK_0 CCL_BLOCK_1) + ;; Same as: ((read REG) + ;; (branch REG CCL_BLOCK_0 [CCL_BLOCK_1 ...])) + | (read-branch REG CCL_BLOCK_0 [CCL_BLOCK_1 ...]) + ;; Read a character from the input text while parsing + ;; multibyte representation, set REG_0 to the charset ID of + ;; the character, set REG_1 to the code point of the + ;; character. If the dimension of charset is two, set REG_1 + ;; to ((CODE0 << 7) | CODE1), where CODE0 is the first code + ;; point and CODE1 is the second code point. + | (read-multibyte-character REG_0 REG_1) + +WRITE := + ;; Write REG_0, REG_1, ... to the output buffer. If REG_N is + ;; a multibyte character, write the corresponding multibyte + ;; representation. + (write REG_0 [REG_1 ...]) + ;; Same as: ((r7 = EXPRESSION) + ;; (write r7)) + | (write EXPRESSION) + ;; Write the value of `integer' to the output buffer. If it + ;; is a multibyte character, write the corresponding multibyte + ;; representation. + | (write integer) + ;; Write the byte sequence of `string' as is to the output + ;; buffer. + | (write string) + ;; Same as: (write string) + | string + ;; Provided that the value of REG is N, write Nth element of + ;; ARRAY to the output buffer. If it is a multibyte + ;; character, write the corresponding multibyte + ;; representation. + | (write REG ARRAY) + ;; Write a multibyte representation of a character whose + ;; charset ID is REG_0 and code point is REG_1. If the + ;; dimension of the charset is two, REG_1 should be ((CODE0 << + ;; 7) | CODE1), where CODE0 is the first code point and CODE1 + ;; is the second code point of the character. + | (write-multibyte-character REG_0 REG_1) + +;; Call CCL program whose name is ccl-program-name. +CALL := (call ccl-program-name) + +;; Terminate the CCL program. +END := (end) + +;; CCL registers that can contain any integer value. As r7 is also +;; used by CCL interpreter, its value is changed unexpectedly. +REG := r0 | r1 | r2 | r3 | r4 | r5 | r6 | r7 + +ARG := REG | integer + +OPERATOR := + ;; Normal arithmethic operators (same meaning as C code). + + | - | * | / | % + + ;; Bitwize operators (same meaning as C code) + | & | `|' | ^ + + ;; Shifting operators (same meaning as C code) + | << | >> + + ;; (REG = ARG_0 <8 ARG_1) means: + ;; (REG = ((ARG_0 << 8) | ARG_1)) + | <8 + + ;; (REG = ARG_0 >8 ARG_1) means: + ;; ((REG = (ARG_0 >> 8)) + ;; (r7 = (ARG_0 & 255))) + | >8 + + ;; (REG = ARG_0 // ARG_1) means: + ;; ((REG = (ARG_0 / ARG_1)) + ;; (r7 = (ARG_0 % ARG_1))) + | // + + ;; Normal comparing operators (same meaning as C code) + | < | > | == | <= | >= | != + + ;; If ARG_0 and ARG_1 are higher and lower byte of Shift-JIS + ;; code, and CHAR is the corresponding JISX0208 character, + ;; (REG = ARG_0 de-sjis ARG_1) means: + ;; ((REG = CODE0) + ;; (r7 = CODE1)) + ;; where CODE0 is the first code point of CHAR, CODE1 is the + ;; second code point of CHAR. + | de-sjis + + ;; If ARG_0 and ARG_1 are the first and second code point of + ;; JISX0208 character CHAR, and SJIS is the correponding + ;; Shift-JIS code, + ;; (REG = ARG_0 en-sjis ARG_1) means: + ;; ((REG = HIGH) + ;; (r7 = LOW)) + ;; where HIGH is the higher byte of SJIS, LOW is the lower + ;; byte of SJIS. + | en-sjis + +ASSIGNMENT_OPERATOR := + ;; Same meaning as C code + += | -= | *= | /= | %= | &= | `|=' | ^= | <<= | >>= + + ;; (REG <8= ARG) is the same as: + ;; ((REG <<= 8) + ;; (REG |= ARG)) + | <8= + + ;; (REG >8= ARG) is the same as: + ;; ((r7 = (REG & 255)) + ;; (REG >>= 8)) + + ;; (REG //= ARG) is the same as: + ;; ((r7 = (REG % ARG)) + ;; (REG /= ARG)) + | //= + +ARRAY := `[' integer ... `]' + + +TRANSLATE := + (translate-character REG(table) REG(charset) REG(codepoint)) + | (translate-character SYMBOL REG(charset) REG(codepoint)) + ;; SYMBOL must refer to a table defined by `define-translation-table'. +LOOKUP := + (lookup-character SYMBOL REG(charset) REG(codepoint)) + | (lookup-integer SYMBOL REG(integer)) + ;; SYMBOL refers to a table defined by `define-translation-hash-table'. +MAP := + (iterate-multiple-map REG REG MAP-IDs) + | (map-multiple REG REG (MAP-SET)) + | (map-single REG REG MAP-ID) +MAP-IDs := MAP-ID ... +MAP-SET := MAP-IDs | (MAP-IDs) MAP-SET +MAP-ID := integer + +\(fn NAME CCL-PROGRAM &optional DOC)" nil (quote macro)) + +(autoload (quote check-ccl-program) "ccl" "\ +Check validity of CCL-PROGRAM. +If CCL-PROGRAM is a symbol denoting a CCL program, return +CCL-PROGRAM, else return nil. +If CCL-PROGRAM is a vector and optional arg NAME (symbol) is supplied, +register CCL-PROGRAM by name NAME, and return NAME. + +\(fn CCL-PROGRAM &optional NAME)" nil (quote macro)) + +(autoload (quote ccl-execute-with-args) "ccl" "\ +Execute CCL-PROGRAM with registers initialized by the remaining args. +The return value is a vector of resulting CCL registers. + +See the documentation of `define-ccl-program' for the detail of CCL program. + +\(fn CCL-PROG &rest ARGS)" nil nil) + +;;;*** + +;;;### (autoloads (cfengine-mode) "cfengine" "progmodes/cfengine.el" +;;;;;; (16278 45828)) +;;; Generated autoloads from progmodes/cfengine.el + +(autoload (quote cfengine-mode) "cfengine" "\ +Major mode for editing cfengine input. +There are no special keybindings by default. + +Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves +to the action header. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (checkdoc-minor-mode checkdoc-ispell-defun checkdoc-ispell-comments +;;;;;; checkdoc-ispell-continue checkdoc-ispell-start checkdoc-ispell-message-text +;;;;;; checkdoc-ispell-message-interactive checkdoc-ispell-interactive +;;;;;; checkdoc-ispell-current-buffer checkdoc-ispell checkdoc-defun +;;;;;; checkdoc-eval-defun checkdoc-message-text checkdoc-rogue-spaces +;;;;;; checkdoc-comments checkdoc-continue checkdoc-start checkdoc-current-buffer +;;;;;; checkdoc-eval-current-buffer checkdoc-message-interactive +;;;;;; checkdoc-interactive checkdoc) "checkdoc" "emacs-lisp/checkdoc.el" +;;;;;; (16211 27023)) +;;; Generated autoloads from emacs-lisp/checkdoc.el + +(autoload (quote checkdoc) "checkdoc" "\ +Interactively check the entire buffer for style errors. +The current status of the check will be displayed in a buffer which +the users will view as each check is completed. + +\(fn)" t nil) + +(autoload (quote checkdoc-interactive) "checkdoc" "\ +Interactively check the current buffer for doc string errors. +Prefix argument START-HERE will start the checking from the current +point, otherwise the check starts at the beginning of the current +buffer. Allows navigation forward and backwards through document +errors. Does not check for comment or space warnings. +Optional argument SHOWSTATUS indicates that we should update the +checkdoc status window instead of the usual behavior. + +\(fn &optional START-HERE SHOWSTATUS)" t nil) + +(autoload (quote checkdoc-message-interactive) "checkdoc" "\ +Interactively check the current buffer for message string errors. +Prefix argument START-HERE will start the checking from the current +point, otherwise the check starts at the beginning of the current +buffer. Allows navigation forward and backwards through document +errors. Does not check for comment or space warnings. +Optional argument SHOWSTATUS indicates that we should update the +checkdoc status window instead of the usual behavior. + +\(fn &optional START-HERE SHOWSTATUS)" t nil) + +(autoload (quote checkdoc-eval-current-buffer) "checkdoc" "\ +Evaluate and check documentation for the current buffer. +Evaluation is done first because good documentation for something that +doesn't work is just not useful. Comments, doc strings, and rogue +spacing are all verified. + +\(fn)" t nil) + +(autoload (quote checkdoc-current-buffer) "checkdoc" "\ +Check current buffer for document, comment, error style, and rogue spaces. +With a prefix argument (in Lisp, the argument TAKE-NOTES), +store all errors found in a warnings buffer, +otherwise stop after the first error. + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-start) "checkdoc" "\ +Start scanning the current buffer for documentation string style errors. +Only documentation strings are checked. +Use `checkdoc-continue' to continue checking if an error cannot be fixed. +Prefix argument TAKE-NOTES means to collect all the warning messages into +a separate buffer. + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-continue) "checkdoc" "\ +Find the next doc string in the current buffer which has a style error. +Prefix argument TAKE-NOTES means to continue through the whole buffer and +save warnings in a separate buffer. Second optional argument START-POINT +is the starting location. If this is nil, `point-min' is used instead. + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-comments) "checkdoc" "\ +Find missing comment sections in the current Emacs Lisp file. +Prefix argument TAKE-NOTES non-nil means to save warnings in a +separate buffer. Otherwise print a message. This returns the error +if there is one. + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-rogue-spaces) "checkdoc" "\ +Find extra spaces at the end of lines in the current file. +Prefix argument TAKE-NOTES non-nil means to save warnings in a +separate buffer. Otherwise print a message. This returns the error +if there is one. +Optional argument INTERACT permits more interactive fixing. + +\(fn &optional TAKE-NOTES INTERACT)" t nil) + +(autoload (quote checkdoc-message-text) "checkdoc" "\ +Scan the buffer for occurrences of the error function, and verify text. +Optional argument TAKE-NOTES causes all errors to be logged. + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-eval-defun) "checkdoc" "\ +Evaluate the current form with `eval-defun' and check its documentation. +Evaluation is done first so the form will be read before the +documentation is checked. If there is a documentation error, then the display +of what was evaluated will be overwritten by the diagnostic message. + +\(fn)" t nil) + +(autoload (quote checkdoc-defun) "checkdoc" "\ +Examine the doc string of the function or variable under point. +Call `error' if the doc string has problems. If NO-ERROR is +non-nil, then do not call error, but call `message' instead. +If the doc string passes the test, then check the function for rogue white +space at the end of each line. + +\(fn &optional NO-ERROR)" t nil) + +(autoload (quote checkdoc-ispell) "checkdoc" "\ +Check the style and spelling of everything interactively. +Calls `checkdoc' with spell-checking turned on. +Prefix argument TAKE-NOTES is the same as for `checkdoc' + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-ispell-current-buffer) "checkdoc" "\ +Check the style and spelling of the current buffer. +Calls `checkdoc-current-buffer' with spell-checking turned on. +Prefix argument TAKE-NOTES is the same as for `checkdoc-current-buffer' + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-ispell-interactive) "checkdoc" "\ +Check the style and spelling of the current buffer interactively. +Calls `checkdoc-interactive' with spell-checking turned on. +Prefix argument TAKE-NOTES is the same as for `checkdoc-interactive' + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-ispell-message-interactive) "checkdoc" "\ +Check the style and spelling of message text interactively. +Calls `checkdoc-message-interactive' with spell-checking turned on. +Prefix argument TAKE-NOTES is the same as for `checkdoc-message-interactive' + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-ispell-message-text) "checkdoc" "\ +Check the style and spelling of message text interactively. +Calls `checkdoc-message-text' with spell-checking turned on. +Prefix argument TAKE-NOTES is the same as for `checkdoc-message-text' + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-ispell-start) "checkdoc" "\ +Check the style and spelling of the current buffer. +Calls `checkdoc-start' with spell-checking turned on. +Prefix argument TAKE-NOTES is the same as for `checkdoc-start' + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-ispell-continue) "checkdoc" "\ +Check the style and spelling of the current buffer after point. +Calls `checkdoc-continue' with spell-checking turned on. +Prefix argument TAKE-NOTES is the same as for `checkdoc-continue' + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-ispell-comments) "checkdoc" "\ +Check the style and spelling of the current buffer's comments. +Calls `checkdoc-comments' with spell-checking turned on. +Prefix argument TAKE-NOTES is the same as for `checkdoc-comments' + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-ispell-defun) "checkdoc" "\ +Check the style and spelling of the current defun with Ispell. +Calls `checkdoc-defun' with spell-checking turned on. +Prefix argument TAKE-NOTES is the same as for `checkdoc-defun' + +\(fn &optional TAKE-NOTES)" t nil) + +(autoload (quote checkdoc-minor-mode) "checkdoc" "\ +Toggle Checkdoc minor mode, a mode for checking Lisp doc strings. +With prefix ARG, turn Checkdoc minor mode on iff ARG is positive. + +In Checkdoc minor mode, the usual bindings for `eval-defun' which is +bound to \\ \\[checkdoc-eval-defun] and `checkdoc-eval-current-buffer' are overridden to include +checking of documentation strings. + +\\{checkdoc-minor-mode-map} + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (encode-hz-buffer encode-hz-region decode-hz-buffer +;;;;;; decode-hz-region) "china-util" "language/china-util.el" (16211 +;;;;;; 27033)) +;;; Generated autoloads from language/china-util.el + +(autoload (quote decode-hz-region) "china-util" "\ +Decode HZ/ZW encoded text in the current region. +Return the length of resulting text. + +\(fn BEG END)" t nil) + +(autoload (quote decode-hz-buffer) "china-util" "\ +Decode HZ/ZW encoded text in the current buffer. + +\(fn)" t nil) + +(autoload (quote encode-hz-region) "china-util" "\ +Encode the text in the current region to HZ. +Return the length of resulting text. + +\(fn BEG END)" t nil) + +(autoload (quote encode-hz-buffer) "china-util" "\ +Encode the text in the current buffer to HZ. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (command-history list-command-history repeat-matching-complex-command) +;;;;;; "chistory" "chistory.el" (16211 27012)) +;;; Generated autoloads from chistory.el + +(autoload (quote repeat-matching-complex-command) "chistory" "\ +Edit and re-evaluate complex command with name matching PATTERN. +Matching occurrences are displayed, most recent first, until you select +a form for evaluation. If PATTERN is empty (or nil), every form in the +command history is offered. The form is placed in the minibuffer for +editing and the result is evaluated. + +\(fn &optional PATTERN)" t nil) + +(autoload (quote list-command-history) "chistory" "\ +List history of commands typed to minibuffer. +The number of commands listed is controlled by `list-command-history-max'. +Calls value of `list-command-history-filter' (if non-nil) on each history +element to judge if that element should be excluded from the list. + +The buffer is left in Command History mode. + +\(fn)" t nil) + +(autoload (quote command-history) "chistory" "\ +Examine commands from `command-history' in a buffer. +The number of commands listed is controlled by `list-command-history-max'. +The command history is filtered by `list-command-history-filter' if non-nil. +Use \\\\[command-history-repeat] to repeat the command on the current line. + +Otherwise much like Emacs-Lisp Mode except that there is no self-insertion +and digits provide prefix arguments. Tab does not indent. +\\{command-history-map} + +This command always recompiles the Command History listing +and runs the normal hook `command-history-hook'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "cl" "emacs-lisp/cl.el" (16211 27024)) +;;; Generated autoloads from emacs-lisp/cl.el + +(defvar custom-print-functions nil "\ +This is a list of functions that format user objects for printing. +Each function is called in turn with three arguments: the object, the +stream, and the print level (currently ignored). If it is able to +print the object it returns true; otherwise it returns nil and the +printer proceeds to the next function on the list. + +This variable is not used at present, but it is defined in hopes that +a future Emacs interpreter will be able to use it.") + +;;;*** + +;;;### (autoloads (common-lisp-indent-function) "cl-indent" "emacs-lisp/cl-indent.el" +;;;;;; (16211 27024)) +;;; Generated autoloads from emacs-lisp/cl-indent.el + +(autoload (quote common-lisp-indent-function) "cl-indent" "\ +Not documented + +\(fn INDENT-POINT STATE)" nil nil) + +;;;*** + +;;;### (autoloads (c-macro-expand) "cmacexp" "progmodes/cmacexp.el" +;;;;;; (16211 27038)) +;;; Generated autoloads from progmodes/cmacexp.el + +(autoload (quote c-macro-expand) "cmacexp" "\ +Expand C macros in the region, using the C preprocessor. +Normally display output in temp buffer, but +prefix arg means replace the region with it. + +`c-macro-preprocessor' specifies the preprocessor to use. +Prompt for arguments to the preprocessor (e.g. `-DDEBUG -I ./include') +if the user option `c-macro-prompt-flag' is non-nil. + +Noninteractive args are START, END, SUBST. +For use inside Lisp programs, see also `c-macro-expansion'. + +\(fn START END SUBST)" t nil) + +;;;*** + +;;;### (autoloads (run-scheme) "cmuscheme" "cmuscheme.el" (16211 +;;;;;; 27012)) +;;; Generated autoloads from cmuscheme.el + +(autoload (quote run-scheme) "cmuscheme" "\ +Run an inferior Scheme process, input and output via buffer *scheme*. +If there is a process already running in `*scheme*', switch to that buffer. +With argument, allows you to edit the command line (default is value +of `scheme-program-name'). Runs the hooks `inferior-scheme-mode-hook' +\(after the `comint-mode-hook' is run). +\(Type \\[describe-mode] in the process buffer for a list of commands.) + +\(fn CMD)" t nil) + (add-hook 'same-window-buffer-names "*scheme*") + +;;;*** + +;;;### (autoloads (cp-make-coding-system) "code-pages" "international/code-pages.el" +;;;;;; (16271 3438)) +;;; Generated autoloads from international/code-pages.el + +(autoload (quote cp-make-coding-system) "code-pages" "\ +Make coding system NAME for and 8-bit, extended-ASCII character set. +V is a 128-long vector of characters to translate the upper half of +the character set. DOC-STRING and MNEMONIC are used as the +corresponding args of `make-coding-system'. If MNEMONIC isn't given, +?* is used. +Return an updated `non-iso-charset-alist'. + +\(fn NAME V &optional DOC-STRING MNEMONIC)" nil (quote macro)) +(autoload-coding-system 'pt154 '(require 'code-pages)) +(autoload-coding-system 'iso-8859-11 '(require 'code-pages)) + +;;;*** + +;;;### (autoloads (codepage-setup cp-supported-codepages cp-offset-for-codepage +;;;;;; cp-language-for-codepage cp-charset-for-codepage cp-make-coding-systems-for-codepage) +;;;;;; "codepage" "international/codepage.el" (16215 28546)) +;;; Generated autoloads from international/codepage.el + +(autoload (quote cp-make-coding-systems-for-codepage) "codepage" "\ +Create a coding system to convert IBM CODEPAGE into charset ISO-NAME +whose first character is at offset OFFSET from the beginning of 8-bit +ASCII table. + +The created coding system has the usual 3 subsidiary systems: for Unix-, +DOS- and Mac-style EOL conversion. However, unlike built-in coding +systems, the Mac-style EOL conversion is currently not supported by the +decoder and encoder created by this function. + +\(fn CODEPAGE ISO-NAME OFFSET)" nil nil) + +(autoload (quote cp-charset-for-codepage) "codepage" "\ +Return the charset for which there is a translation table to DOS CODEPAGE. +CODEPAGE must be the name of a DOS codepage, a string. + +\(fn CODEPAGE)" nil nil) + +(autoload (quote cp-language-for-codepage) "codepage" "\ +Return the name of the MULE language environment for CODEPAGE. +CODEPAGE must be the name of a DOS codepage, a string. + +\(fn CODEPAGE)" nil nil) + +(autoload (quote cp-offset-for-codepage) "codepage" "\ +Return the offset to be used in setting up coding systems for CODEPAGE. +CODEPAGE must be the name of a DOS codepage, a string. + +\(fn CODEPAGE)" nil nil) + +(autoload (quote cp-supported-codepages) "codepage" "\ +Return an alist of supported codepages. + +Each association in the alist has the form (NNN . CHARSET), where NNN is the +codepage number, and CHARSET is the MULE charset which is the closest match +for the character set supported by that codepage. + +A codepage NNN is supported if a variable called `cpNNN-decode-table' exists, +is a vector, and has a charset property. + +\(fn)" nil nil) + +(autoload (quote codepage-setup) "codepage" "\ +Create a coding system cpCODEPAGE to support the IBM codepage CODEPAGE. + +These coding systems are meant for encoding and decoding 8-bit non-ASCII +characters used by the IBM codepages, typically in conjunction with files +read/written by MS-DOS software, or for display on the MS-DOS terminal. + +\(fn CODEPAGE)" t nil) + +;;;*** + +;;;### (autoloads (comint-redirect-results-list-from-process comint-redirect-results-list +;;;;;; comint-redirect-send-command-to-process comint-redirect-send-command +;;;;;; comint-run make-comint make-comint-in-buffer) "comint" "comint.el" +;;;;;; (16211 27012)) +;;; Generated autoloads from comint.el + +(autoload (quote make-comint-in-buffer) "comint" "\ +Make a comint process NAME in BUFFER, running PROGRAM. +If BUFFER is nil, it defaults to NAME surrounded by `*'s. +PROGRAM should be either a string denoting an executable program to create +via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP +connection to be opened via `open-network-stream'. If there is already a +running process in that buffer, it is not restarted. Optional third arg +STARTFILE is the name of a file to send the contents of to the process. + +If PROGRAM is a string, any more args are arguments to PROGRAM. + +\(fn NAME BUFFER PROGRAM &optional STARTFILE &rest SWITCHES)" nil nil) + +(autoload (quote make-comint) "comint" "\ +Make a comint process NAME in a buffer, running PROGRAM. +The name of the buffer is made by surrounding NAME with `*'s. +PROGRAM should be either a string denoting an executable program to create +via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP +connection to be opened via `open-network-stream'. If there is already a +running process in that buffer, it is not restarted. Optional third arg +STARTFILE is the name of a file to send the contents of to the process. + +If PROGRAM is a string, any more args are arguments to PROGRAM. + +\(fn NAME PROGRAM &optional STARTFILE &rest SWITCHES)" nil nil) + +(autoload (quote comint-run) "comint" "\ +Run PROGRAM in a comint buffer and switch to it. +The buffer name is made by surrounding the file name of PROGRAM with `*'s. +The file name is used to make a symbol name, such as `comint-sh-hook', and any +hooks on this symbol are run in the buffer. +See `make-comint' and `comint-exec'. + +\(fn PROGRAM)" t nil) + +(autoload (quote comint-redirect-send-command) "comint" "\ +Send COMMAND to process in current buffer, with output to OUTPUT-BUFFER. +With prefix arg, echo output in process buffer. + +If NO-DISPLAY is non-nil, do not show the output buffer. + +\(fn COMMAND OUTPUT-BUFFER ECHO &optional NO-DISPLAY)" t nil) + +(autoload (quote comint-redirect-send-command-to-process) "comint" "\ +Send COMMAND to PROCESS, with output to OUTPUT-BUFFER. +With prefix arg, echo output in process buffer. + +If NO-DISPLAY is non-nil, do not show the output buffer. + +\(fn COMMAND OUTPUT-BUFFER PROCESS ECHO &optional NO-DISPLAY)" t nil) + +(autoload (quote comint-redirect-results-list) "comint" "\ +Send COMMAND to current process. +Return a list of expressions in the output which match REGEXP. +REGEXP-GROUP is the regular expression group in REGEXP to use. + +\(fn COMMAND REGEXP REGEXP-GROUP)" nil nil) + +(autoload (quote comint-redirect-results-list-from-process) "comint" "\ +Send COMMAND to PROCESS. +Return a list of expressions in the output which match REGEXP. +REGEXP-GROUP is the regular expression group in REGEXP to use. + +\(fn PROCESS COMMAND REGEXP REGEXP-GROUP)" nil nil) + +;;;*** + +;;;### (autoloads (compare-windows) "compare-w" "compare-w.el" (16277 +;;;;;; 42321)) +;;; Generated autoloads from compare-w.el + +(autoload (quote compare-windows) "compare-w" "\ +Compare text in current window with text in next window. +Compares the text starting at point in each window, +moving over text in each one as far as they match. + +This command pushes the mark in each window +at the prior location of point in that window. +If both windows display the same buffer, +the mark is pushed twice in that buffer: +first in the other window, then in the selected window. + +A prefix arg means reverse the value of variable +`compare-ignore-whitespace'. If `compare-ignore-whitespace' is +nil, then a prefix arg means ignore changes in whitespace. If +`compare-ignore-whitespace' is non-nil, then a prefix arg means +don't ignore changes in whitespace. The variable +`compare-windows-whitespace' controls how whitespace is skipped. +If `compare-ignore-case' is non-nil, changes in case are also +ignored. + +If `compare-windows-sync' is non-nil, then successive calls of +this command work in interlaced mode: +on first call it advances points to the next difference, +on second call it synchronizes points by skipping the difference, +on third call it again advances points to the next difference and so on. + +\(fn IGNORE-WHITESPACE)" t nil) + +;;;*** + +;;;### (autoloads (next-error compilation-minor-mode compilation-shell-minor-mode +;;;;;; compilation-mode grep-tree grep-find grep compile compilation-search-path +;;;;;; compilation-ask-about-save compilation-window-height compilation-mode-hook) +;;;;;; "compile" "progmodes/compile.el" (16277 42320)) +;;; Generated autoloads from progmodes/compile.el + +(defvar compilation-mode-hook nil "\ +*List of hook functions run by `compilation-mode' (see `run-hooks').") + +(custom-autoload (quote compilation-mode-hook) "compile") + +(defvar compilation-window-height nil "\ +*Number of lines in a compilation window. If nil, use Emacs default.") + +(custom-autoload (quote compilation-window-height) "compile") + +(defvar compilation-process-setup-function nil "\ +*Function to call to customize the compilation process. +This functions is called immediately before the compilation process is +started. It can be used to set any variables or functions that are used +while processing the output of the compilation process.") + +(defvar compilation-buffer-name-function nil "\ +Function to compute the name of a compilation buffer. +The function receives one argument, the name of the major mode of the +compilation buffer. It should return a string. +nil means compute the name with `(concat \"*\" (downcase major-mode) \"*\")'.") + +(defvar compilation-finish-function nil "\ +Function to call when a compilation process finishes. +It is called with two arguments: the compilation buffer, and a string +describing how the process finished.") + +(defvar compilation-finish-functions nil "\ +Functions to call when a compilation process finishes. +Each function is called with two arguments: the compilation buffer, +and a string describing how the process finished.") + +(defvar compilation-ask-about-save t "\ +*Non-nil means \\[compile] asks which buffers to save before compiling. +Otherwise, it saves all modified buffers without asking.") + +(custom-autoload (quote compilation-ask-about-save) "compile") + +(defvar compilation-search-path (quote (nil)) "\ +*List of directories to search for source files named in error messages. +Elements should be directory names, not file names of directories. +nil as an element means to try the default directory.") + +(custom-autoload (quote compilation-search-path) "compile") + +(autoload (quote compile) "compile" "\ +Compile the program including the current buffer. Default: run `make'. +Runs COMMAND, a shell command, in a separate process asynchronously +with output going to the buffer `*compilation*'. + +You can then use the command \\[next-error] to find the next error message +and move to the source code that caused it. + +Interactively, prompts for the command if `compilation-read-command' is +non-nil; otherwise uses `compile-command'. With prefix arg, always prompts. + +To run more than one compilation at once, start one and rename +the `*compilation*' buffer to some other name with +\\[rename-buffer]. Then start the next one. On most systems, +termination of the main compilation process kills its +subprocesses. + +The name used for the buffer is actually whatever is returned by +the function in `compilation-buffer-name-function', so you can set that +to a function that generates a unique name. + +\(fn COMMAND)" t nil) + +(autoload (quote grep) "compile" "\ +Run grep, with user-specified args, and collect output in a buffer. +While grep runs asynchronously, you can use \\[next-error] (M-x next-error), +or \\\\[compile-goto-error] in the grep output buffer, to go to the lines +where grep found matches. + +This command uses a special history list for its COMMAND-ARGS, so you can +easily repeat a grep command. + +A prefix argument says to default the argument based upon the current +tag the cursor is over, substituting it into the last grep command +in the grep command history (or into `grep-command' +if that history list is empty). + +\(fn COMMAND-ARGS)" t nil) + +(autoload (quote grep-find) "compile" "\ +Run grep via find, with user-specified args COMMAND-ARGS. +Collect output in a buffer. +While find runs asynchronously, you can use the \\[next-error] command +to find the text that grep hits refer to. + +This command uses a special history list for its arguments, so you can +easily repeat a find command. + +\(fn COMMAND-ARGS)" t nil) + +(autoload (quote grep-tree) "compile" "\ +Grep for REGEXP in FILES in directory tree rooted at DIR. +Collect output in a buffer. +Interactively, prompt separately for each search parameter. +With prefix arg, reuse previous REGEXP. +The search is limited to file names matching shell pattern FILES. +FILES may use abbreviations defined in `grep-tree-files-aliases', e.g. +entering `ch' is equivalent to `*.[ch]'. + +While find runs asynchronously, you can use the \\[next-error] command +to find the text that grep hits refer to. + +This command uses a special history list for its arguments, so you can +easily repeat a find command. + +When used non-interactively, optional arg SUBDIRS limits the search to +those sub directories of DIR. + +\(fn REGEXP FILES DIR &optional SUBDIRS)" t nil) + +(autoload (quote compilation-mode) "compile" "\ +Major mode for compilation log buffers. +\\To visit the source for a line-numbered error, +move point to the error message line and type \\[compile-goto-error]. +To kill the compilation, type \\[kill-compilation]. + +Runs `compilation-mode-hook' with `run-hooks' (which see). + +\(fn &optional NAME-OF-MODE)" t nil) + +(autoload (quote compilation-shell-minor-mode) "compile" "\ +Toggle compilation shell minor mode. +With arg, turn compilation mode on if and only if arg is positive. +In this minor mode, all the error-parsing commands of the +Compilation major mode are available but bound to keys that don't +collide with Shell mode. See `compilation-mode'. +Turning the mode on runs the normal hook `compilation-shell-minor-mode-hook'. + +\(fn &optional ARG)" t nil) + +(autoload (quote compilation-minor-mode) "compile" "\ +Toggle compilation minor mode. +With arg, turn compilation mode on if and only if arg is positive. +In this minor mode, all the error-parsing commands of the +Compilation major mode are available. See `compilation-mode'. +Turning the mode on runs the normal hook `compilation-minor-mode-hook'. + +\(fn &optional ARG)" t nil) + +(autoload (quote next-error) "compile" "\ +Visit next compilation error message and corresponding source code. + +If all the error messages parsed so far have been processed already, +the message buffer is checked for new ones. + +A prefix ARGP specifies how many error messages to move; +negative means move back to previous error messages. +Just \\[universal-argument] as a prefix means reparse the error message buffer +and start at the first error. + +\\[next-error] normally uses the most recently started compilation or +grep buffer. However, it can operate on any buffer with output from +the \\[compile] and \\[grep] commands, or, more generally, on any +buffer in Compilation mode or with Compilation Minor mode enabled. To +specify use of a particular buffer for error messages, type +\\[next-error] in that buffer. + +Once \\[next-error] has chosen the buffer for error messages, +it stays with that buffer until you use it in some other buffer which +uses Compilation mode or Compilation Minor mode. + +See variables `compilation-parse-errors-function' and +`compilation-error-regexp-alist' for customization ideas. + +\(fn &optional ARGP)" t nil) + (define-key ctl-x-map "`" 'next-error) + +;;;*** + +;;;### (autoloads (partial-completion-mode) "complete" "complete.el" +;;;;;; (16276 26334)) +;;; Generated autoloads from complete.el + +(defvar partial-completion-mode nil "\ +Non-nil if Partial-Completion mode is enabled. +See the command `partial-completion-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `partial-completion-mode'.") + +(custom-autoload (quote partial-completion-mode) "complete") + +(autoload (quote partial-completion-mode) "complete" "\ +Toggle Partial Completion mode. +With prefix ARG, turn Partial Completion mode on if ARG is positive. + +When Partial Completion mode is enabled, TAB (or M-TAB if `PC-meta-flag' is +nil) is enhanced so that if some string is divided into words and each word is +delimited by a character in `PC-word-delimiters', partial words are completed +as much as possible and `*' characters are treated likewise in file names. + +For example, M-x p-c-m expands to M-x partial-completion-mode since no other +command begins with that sequence of characters, and +\\[find-file] f_b.c TAB might complete to foo_bar.c if that file existed and no +other file in that directory begin with that sequence of characters. + +Unless `PC-disable-includes' is non-nil, the `<...>' sequence is interpreted +specially in \\[find-file]. For example, +\\[find-file] RET finds the file `/usr/include/sys/time.h'. +See also the variable `PC-include-file-path'. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (dynamic-completion-mode) "completion" "completion.el" +;;;;;; (16211 27013)) +;;; Generated autoloads from completion.el + +(autoload (quote dynamic-completion-mode) "completion" "\ +Enable dynamic word-completion. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (decompose-composite-char compose-last-chars compose-chars-after +;;;;;; find-composition compose-chars decompose-string compose-string +;;;;;; decompose-region compose-region) "composite" "composite.el" +;;;;;; (16211 27013)) +;;; Generated autoloads from composite.el + +(defconst reference-point-alist (quote ((tl . 0) (tc . 1) (tr . 2) (Bl . 3) (Bc . 4) (Br . 5) (bl . 6) (bc . 7) (br . 8) (cl . 9) (cc . 10) (cr . 11) (top-left . 0) (top-center . 1) (top-right . 2) (base-left . 3) (base-center . 4) (base-right . 5) (bottom-left . 6) (bottom-center . 7) (bottom-right . 8) (center-left . 9) (center-center . 10) (center-right . 11) (ml . 3) (mc . 10) (mr . 5) (mid-left . 3) (mid-center . 10) (mid-right . 5))) "\ +Alist of symbols vs integer codes of glyph reference points. +A glyph reference point symbol is to be used to specify a composition +rule in COMPONENTS argument to such functions as `compose-region' and +`make-composition'. + +Meanings of glyph reference point codes are as follows: + + 0----1----2 <---- ascent 0:tl or top-left + | | 1:tc or top-center + | | 2:tr or top-right + | | 3:Bl or base-left 9:cl or center-left + 9 10 11 <---- center 4:Bc or base-center 10:cc or center-center + | | 5:Br or base-right 11:cr or center-right + --3----4----5-- <-- baseline 6:bl or bottom-left + | | 7:bc or bottom-center + 6----7----8 <---- descent 8:br or bottom-right + +Glyph reference point symbols are to be used to specify composition +rule of the form (GLOBAL-REF-POINT . NEW-REF-POINT), where +GLOBAL-REF-POINT is a reference point in the overall glyphs already +composed, and NEW-REF-POINT is a reference point in the new glyph to +be added. + +For instance, if GLOBAL-REF-POINT is `br' (bottom-right) and +NEW-REF-POINT is `tc' (top-center), the overall glyph is updated as +follows (the point `*' corresponds to both reference points): + + +-------+--+ <--- new ascent + | | | + | global| | + | glyph | | + -- | | |-- <--- baseline (doesn't change) + +----+--*--+ + | | new | + | |glyph| + +----+-----+ <--- new descent +") + +(autoload (quote compose-region) "composite" "\ +Compose characters in the current region. + +Characters are composed relatively, i.e. composed by overstricking or +stacking depending on ascent, descent and other properties. + +When called from a program, expects these four arguments. + +First two arguments START and END are positions (integers or markers) +specifying the region. + +Optional 3rd argument COMPONENTS, if non-nil, is a character or a +sequence (vector, list, or string) of integers. In this case, +characters are composed not relatively but according to COMPONENTS. + +If it is a character, it is an alternate character to display instead +of the text in the region. + +If it is a string, the elements are alternate characters. + +If it is a vector or list, it is a sequence of alternate characters and +composition rules, where (2N)th elements are characters and (2N+1)th +elements are composition rules to specify how to compose (2N+2)th +elements with previously composed N glyphs. + +A composition rule is a cons of global and new glyph reference point +symbols. See the documentation of `reference-point-alist' for more +detail. + +Optional 4th argument MODIFICATION-FUNC is a function to call to +adjust the composition when it gets invalid because of a change of +text in the composition. + +\(fn START END &optional COMPONENTS MODIFICATION-FUNC)" t nil) + +(autoload (quote decompose-region) "composite" "\ +Decompose text in the current region. + +When called from a program, expects two arguments, +positions (integers or markers) specifying the region. + +\(fn START END)" t nil) + +(autoload (quote compose-string) "composite" "\ +Compose characters in string STRING. + +The return value is STRING where `composition' property is put on all +the characters in it. + +Optional 2nd and 3rd arguments START and END specify the range of +STRING to be composed. They defaults to the beginning and the end of +STRING respectively. + +Optional 4th argument COMPONENTS, if non-nil, is a character or a +sequence (vector, list, or string) of integers. See the function +`compose-region' for more detail. + +Optional 5th argument MODIFICATION-FUNC is a function to call to +adjust the composition when it gets invalid because of a change of +text in the composition. + +\(fn STRING &optional START END COMPONENTS MODIFICATION-FUNC)" nil nil) + +(autoload (quote decompose-string) "composite" "\ +Return STRING where `composition' property is removed. + +\(fn STRING)" nil nil) + +(autoload (quote compose-chars) "composite" "\ +Return a string from arguments in which all characters are composed. +For relative composition, arguments are characters. +For rule-based composition, Mth (where M is odd) arguments are +characters, and Nth (where N is even) arguments are composition rules. +A composition rule is a cons of glyph reference points of the form +\(GLOBAL-REF-POINT . NEW-REF-POINT). See the documentation of +`reference-point-alist' for more detail. + +\(fn &rest ARGS)" nil nil) + +(autoload (quote find-composition) "composite" "\ +Return information about a composition at or nearest to buffer position POS. + +If the character at POS has `composition' property, the value is a list +of FROM, TO, and VALID-P. + +FROM and TO specify the range of text that has the same `composition' +property, VALID-P is non-nil if and only if this composition is valid. + +If there's no composition at POS, and the optional 2nd argument LIMIT +is non-nil, search for a composition toward LIMIT. + +If no composition is found, return nil. + +Optional 3rd argument STRING, if non-nil, is a string to look for a +composition in; nil means the current buffer. + +If a valid composition is found and the optional 4th argument DETAIL-P +is non-nil, the return value is a list of FROM, TO, COMPONENTS, +RELATIVE-P, MOD-FUNC, and WIDTH. + +COMPONENTS is a vector of integers, the meaning depends on RELATIVE-P. + +RELATIVE-P is t if the composition method is relative, else nil. + +If RELATIVE-P is t, COMPONENTS is a vector of characters to be +composed. If RELATIVE-P is nil, COMPONENTS is a vector of characters +and composition rules as described in `compose-region'. + +MOD-FUNC is a modification function of the composition. + +WIDTH is a number of columns the composition occupies on the screen. + +\(fn POS &optional LIMIT STRING DETAIL-P)" nil nil) + +(autoload (quote compose-chars-after) "composite" "\ +Compose characters in current buffer after position POS. + +It looks up the char-table `composition-function-table' (which see) by +a character after POS. If non-nil value is found, the format of the +value should be an alist of PATTERNs vs FUNCs, where PATTERNs are +regular expressions and FUNCs are functions. If the text after POS +matches one of PATTERNs, call the corresponding FUNC with three +arguments POS, TO, and PATTERN, where TO is the end position of text +matching PATTERN, and return what FUNC returns. Otherwise, return +nil. + +FUNC is responsible for composing the text properly. The return value +is: + nil -- if no characters were composed. + CHARS (integer) -- if CHARS characters were composed. + +Optional 2nd arg LIMIT, if non-nil, limits the matching of text. + +Optional 3rd arg OBJECT, if non-nil, is a string that contains the +text to compose. In that case, POS and LIMIT index to the string. + +This function is the default value of `compose-chars-after-function'. + +\(fn POS &optional LIMIT OBJECT)" nil nil) + +(autoload (quote compose-last-chars) "composite" "\ +Compose last characters. +The argument is a parameterized event of the form + (compose-last-chars N COMPONENTS), +where N is the number of characters before point to compose, +COMPONENTS, if non-nil, is the same as the argument to `compose-region' +\(which see). If it is nil, `compose-chars-after' is called, +and that function find a proper rule to compose the target characters. +This function is intended to be used from input methods. +The global keymap binds special event `compose-last-chars' to this +function. Input method may generate an event (compose-last-chars N COMPONENTS) +after a sequence character events. + +\(fn ARGS)" t nil) +(global-set-key [compose-last-chars] 'compose-last-chars) + +(autoload (quote decompose-composite-char) "composite" "\ +Convert CHAR to string. + +If optional 2nd arg TYPE is non-nil, it is `string', `list', or +`vector'. In this case, CHAR is converted to string, list of CHAR, or +vector of CHAR respectively. +Optional 3rd arg WITH-COMPOSITION-RULE is ignored. + +\(fn CHAR &optional TYPE WITH-COMPOSITION-RULE)" nil nil) + +(make-obsolete (quote decompose-composite-char) (quote char-to-string) "21.1") + +;;;*** + +;;;### (autoloads (shuffle-vector cookie-snarf cookie-insert cookie) +;;;;;; "cookie1" "play/cookie1.el" (16211 27038)) +;;; Generated autoloads from play/cookie1.el + +(autoload (quote cookie) "cookie1" "\ +Return a random phrase from PHRASE-FILE. +When the phrase file is read in, display STARTMSG at the beginning +of load, ENDMSG at the end. + +\(fn PHRASE-FILE STARTMSG ENDMSG)" nil nil) + +(autoload (quote cookie-insert) "cookie1" "\ +Insert random phrases from PHRASE-FILE; COUNT of them. +When the phrase file is read in, display STARTMSG at the beginning +of load, ENDMSG at the end. + +\(fn PHRASE-FILE &optional COUNT STARTMSG ENDMSG)" nil nil) + +(autoload (quote cookie-snarf) "cookie1" "\ +Reads in the PHRASE-FILE, returns it as a vector of strings. +Emit STARTMSG and ENDMSG before and after. Caches the result; second +and subsequent calls on the same file won't go to disk. + +\(fn PHRASE-FILE STARTMSG ENDMSG)" nil nil) + +(autoload (quote shuffle-vector) "cookie1" "\ +Randomly permute the elements of VECTOR (all permutations equally likely). + +\(fn VECTOR)" nil nil) + +;;;*** + +;;;### (autoloads (copyright copyright-update) "copyright" "emacs-lisp/copyright.el" +;;;;;; (16211 27024)) +;;; Generated autoloads from emacs-lisp/copyright.el + +(autoload (quote copyright-update) "copyright" "\ +Update copyright notice at beginning of buffer to indicate the current year. +With prefix ARG, replace the years in the notice rather than adding +the current year after them. If necessary, and +`copyright-current-gpl-version' is set, any copying permissions +following the copyright are updated as well. +If non-nil, INTERACTIVEP tells the function to behave as when it's called +interactively. + +\(fn &optional ARG INTERACTIVEP)" t nil) + +(autoload (quote copyright) "copyright" "\ +Insert a copyright by $ORGANIZATION notice at cursor. + +\(fn &optional STR ARG)" t nil) + +;;;*** + +;;;### (autoloads (cperl-mode) "cperl-mode" "progmodes/cperl-mode.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/cperl-mode.el + +(autoload (quote cperl-mode) "cperl-mode" "\ +Major mode for editing Perl code. +Expression and list commands understand all C brackets. +Tab indents for Perl code. +Paragraphs are separated by blank lines only. +Delete converts tabs to spaces as it moves back. + +Various characters in Perl almost always come in pairs: {}, (), [], +sometimes <>. When the user types the first, she gets the second as +well, with optional special formatting done on {}. (Disabled by +default.) You can always quote (with \\[quoted-insert]) the left +\"paren\" to avoid the expansion. The processing of < is special, +since most the time you mean \"less\". CPerl mode tries to guess +whether you want to type pair <>, and inserts is if it +appropriate. You can set `cperl-electric-parens-string' to the string that +contains the parenths from the above list you want to be electrical. +Electricity of parenths is controlled by `cperl-electric-parens'. +You may also set `cperl-electric-parens-mark' to have electric parens +look for active mark and \"embrace\" a region if possible.' + +CPerl mode provides expansion of the Perl control constructs: + + if, else, elsif, unless, while, until, continue, do, + for, foreach, formy and foreachmy. + +and POD directives (Disabled by default, see `cperl-electric-keywords'.) + +The user types the keyword immediately followed by a space, which +causes the construct to be expanded, and the point is positioned where +she is most likely to want to be. eg. when the user types a space +following \"if\" the following appears in the buffer: if () { or if () +} { } and the cursor is between the parentheses. The user can then +type some boolean expression within the parens. Having done that, +typing \\[cperl-linefeed] places you - appropriately indented - on a +new line between the braces (if you typed \\[cperl-linefeed] in a POD +directive line, then appropriate number of new lines is inserted). + +If CPerl decides that you want to insert \"English\" style construct like + + bite if angry; + +it will not do any expansion. See also help on variable +`cperl-extra-newline-before-brace'. (Note that one can switch the +help message on expansion by setting `cperl-message-electric-keyword' +to nil.) + +\\[cperl-linefeed] is a convenience replacement for typing carriage +return. It places you in the next line with proper indentation, or if +you type it inside the inline block of control construct, like + + foreach (@lines) {print; print} + +and you are on a boundary of a statement inside braces, it will +transform the construct into a multiline and will place you into an +appropriately indented blank line. If you need a usual +`newline-and-indent' behaviour, it is on \\[newline-and-indent], +see documentation on `cperl-electric-linefeed'. + +Use \\[cperl-invert-if-unless] to change a construction of the form + + if (A) { B } + +into + + B if A; + +\\{cperl-mode-map} + +Setting the variable `cperl-font-lock' to t switches on font-lock-mode +\(even with older Emacsen), `cperl-electric-lbrace-space' to t switches +on electric space between $ and {, `cperl-electric-parens-string' is +the string that contains parentheses that should be electric in CPerl +\(see also `cperl-electric-parens-mark' and `cperl-electric-parens'), +setting `cperl-electric-keywords' enables electric expansion of +control structures in CPerl. `cperl-electric-linefeed' governs which +one of two linefeed behavior is preferable. You can enable all these +options simultaneously (recommended mode of use) by setting +`cperl-hairy' to t. In this case you can switch separate options off +by setting them to `null'. Note that one may undo the extra +whitespace inserted by semis and braces in `auto-newline'-mode by +consequent \\[cperl-electric-backspace]. + +If your site has perl5 documentation in info format, you can use commands +\\[cperl-info-on-current-command] and \\[cperl-info-on-command] to access it. +These keys run commands `cperl-info-on-current-command' and +`cperl-info-on-command', which one is which is controlled by variable +`cperl-info-on-command-no-prompt' and `cperl-clobber-lisp-bindings' +\(in turn affected by `cperl-hairy'). + +Even if you have no info-format documentation, short one-liner-style +help is available on \\[cperl-get-help], and one can run perldoc or +man via menu. + +It is possible to show this help automatically after some idle time. +This is regulated by variable `cperl-lazy-help-time'. Default with +`cperl-hairy' (if the value of `cperl-lazy-help-time' is nil) is 5 +secs idle time . It is also possible to switch this on/off from the +menu, or via \\[cperl-toggle-autohelp]. Requires `run-with-idle-timer'. + +Use \\[cperl-lineup] to vertically lineup some construction - put the +beginning of the region at the start of construction, and make region +span the needed amount of lines. + +Variables `cperl-pod-here-scan', `cperl-pod-here-fontify', +`cperl-pod-face', `cperl-pod-head-face' control processing of POD and +here-docs sections. With capable Emaxen results of scan are used +for indentation too, otherwise they are used for highlighting only. + +Variables controlling indentation style: + `cperl-tab-always-indent' + Non-nil means TAB in CPerl mode should always reindent the current line, + regardless of where in the line point is when the TAB command is used. + `cperl-indent-left-aligned-comments' + Non-nil means that the comment starting in leftmost column should indent. + `cperl-auto-newline' + Non-nil means automatically newline before and after braces, + and after colons and semicolons, inserted in Perl code. The following + \\[cperl-electric-backspace] will remove the inserted whitespace. + Insertion after colons requires both this variable and + `cperl-auto-newline-after-colon' set. + `cperl-auto-newline-after-colon' + Non-nil means automatically newline even after colons. + Subject to `cperl-auto-newline' setting. + `cperl-indent-level' + Indentation of Perl statements within surrounding block. + The surrounding block's indentation is the indentation + of the line on which the open-brace appears. + `cperl-continued-statement-offset' + Extra indentation given to a substatement, such as the + then-clause of an if, or body of a while, or just a statement continuation. + `cperl-continued-brace-offset' + Extra indentation given to a brace that starts a substatement. + This is in addition to `cperl-continued-statement-offset'. + `cperl-brace-offset' + Extra indentation for line if it starts with an open brace. + `cperl-brace-imaginary-offset' + An open brace following other text is treated as if it the line started + this far to the right of the actual line indentation. + `cperl-label-offset' + Extra indentation for line that is a label. + `cperl-min-label-indent' + Minimal indentation for line that is a label. + +Settings for K&R and BSD indentation styles are + `cperl-indent-level' 5 8 + `cperl-continued-statement-offset' 5 8 + `cperl-brace-offset' -5 -8 + `cperl-label-offset' -5 -8 + +CPerl knows several indentation styles, and may bulk set the +corresponding variables. Use \\[cperl-set-style] to do this. Use +\\[cperl-set-style-back] to restore the memorized preexisting values +\(both available from menu). + +If `cperl-indent-level' is 0, the statement after opening brace in +column 0 is indented on +`cperl-brace-offset'+`cperl-continued-statement-offset'. + +Turning on CPerl mode calls the hooks in the variable `cperl-mode-hook' +with no args. + +DO NOT FORGET to read micro-docs (available from `Perl' menu) +or as help on variables `cperl-tips', `cperl-problems', +`cperl-praise', `cperl-speed'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (cpp-parse-edit cpp-highlight-buffer) "cpp" "progmodes/cpp.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/cpp.el + +(autoload (quote cpp-highlight-buffer) "cpp" "\ +Highlight C code according to preprocessor conditionals. +This command pops up a buffer which you should edit to specify +what kind of highlighting to use, and the criteria for highlighting. +A prefix arg suppresses display of that buffer. + +\(fn ARG)" t nil) + +(autoload (quote cpp-parse-edit) "cpp" "\ +Edit display information for cpp conditionals. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (crisp-mode crisp-mode) "crisp" "emulation/crisp.el" +;;;;;; (16211 27026)) +;;; Generated autoloads from emulation/crisp.el + +(defvar crisp-mode nil "\ +Track status of CRiSP emulation mode. +A value of nil means CRiSP mode is not enabled. A value of t +indicates CRiSP mode is enabled. + +Setting this variable directly does not take effect; +use either M-x customize or the function `crisp-mode'.") + +(custom-autoload (quote crisp-mode) "crisp") + +(autoload (quote crisp-mode) "crisp" "\ +Toggle CRiSP/Brief emulation minor mode. +With ARG, turn CRiSP mode on if ARG is positive, off otherwise. + +\(fn &optional ARG)" t nil) + +(defalias (quote brief-mode) (quote crisp-mode)) + +;;;*** + +;;;### (autoloads (completing-read-multiple) "crm" "emacs-lisp/crm.el" +;;;;;; (16211 27024)) +;;; Generated autoloads from emacs-lisp/crm.el + +(autoload (quote completing-read-multiple) "crm" "\ +Read multiple strings in the minibuffer, with completion. +By using this functionality, a user may specify multiple strings at a +single prompt, optionally using completion. + +Multiple strings are specified by separating each of the strings with +a prespecified separator character. For example, if the separator +character is a comma, the strings 'alice', 'bob', and 'eve' would be +specified as 'alice,bob,eve'. + +The default value for the separator character is the value of +`crm-default-separator' (comma). The separator character may be +changed by modifying the value of `crm-separator'. + +Contiguous strings of non-separator-characters are referred to as +'elements'. In the aforementioned example, the elements are: 'alice', +'bob', and 'eve'. + +Completion is available on a per-element basis. For example, if the +contents of the minibuffer are 'alice,bob,eve' and point is between +'l' and 'i', pressing TAB operates on the element 'alice'. + +The return value of this function is a list of the read strings. + +See the documentation for `completing-read' for details on the arguments: +PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF, and +INHERIT-INPUT-METHOD. + +\(fn PROMPT TABLE &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT HIST DEF INHERIT-INPUT-METHOD)" nil nil) + +;;;*** + +;;;### (autoloads (cua-mode) "cua-base" "emulation/cua-base.el" (16211 +;;;;;; 27026)) +;;; Generated autoloads from emulation/cua-base.el + +(defvar cua-mode nil "\ +Non-nil if Cua mode is enabled. +See the command `cua-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `cua-mode'.") + +(custom-autoload (quote cua-mode) "cua-base") + +(autoload (quote cua-mode) "cua-base" "\ +Toggle CUA key-binding mode. +When enabled, using shifted movement keys will activate the region (and +highlight the region using `transient-mark-mode'), and typed text replaces +the active selection. C-z, C-x, C-c, and C-v will undo, cut, copy, and +paste (in addition to the normal emacs bindings). + +\(fn &optional ARG)" t nil) + (eval-after-load 'CUA-mode + '(error (concat "\n\n" + "CUA-mode is now part of the standard GNU Emacs distribution,\n" + "so you may now enable and customize CUA via the Options menu.\n\n" + "Your " (file-name-nondirectory user-init-file) " loads an older version of CUA-mode which does\n" + "not work correctly with this version of GNU Emacs.\n" + "To correct this, remove the loading and customization of the\n" + "old version from the " user-init-file " file.\n\n"))) + +;;;*** + +;;;### (autoloads (customize-menu-create custom-menu-create custom-save-all +;;;;;; customize-save-customized custom-file customize-browse custom-buffer-create-other-window +;;;;;; custom-buffer-create customize-apropos-groups customize-apropos-faces +;;;;;; customize-apropos-options customize-apropos customize-saved +;;;;;; customize-rogue customize-customized customize-face-other-window +;;;;;; customize-face customize-changed-options customize-option-other-window +;;;;;; customize-option customize-group-other-window customize-group +;;;;;; customize-mode customize customize-save-variable customize-set-variable +;;;;;; customize-set-value) "cus-edit" "cus-edit.el" (16211 27013)) +;;; Generated autoloads from cus-edit.el + (add-hook 'same-window-regexps "\\`\\*Customiz.*\\*\\'") + +(autoload (quote customize-set-value) "cus-edit" "\ +Set VARIABLE to VALUE, and return VALUE. VALUE is a Lisp object. + +If VARIABLE has a `variable-interactive' property, that is used as if +it were the arg to `interactive' (which see) to interactively read the value. + +If VARIABLE has a `custom-type' property, it must be a widget and the +`:prompt-value' property of that widget will be used for reading the value. + +If given a prefix (or a COMMENT argument), also prompt for a comment. + +\(fn VARIABLE VALUE &optional COMMENT)" t nil) + +(autoload (quote customize-set-variable) "cus-edit" "\ +Set the default for VARIABLE to VALUE, and return VALUE. +VALUE is a Lisp object. + +If VARIABLE has a `custom-set' property, that is used for setting +VARIABLE, otherwise `set-default' is used. + +The `customized-value' property of the VARIABLE will be set to a list +with a quoted VALUE as its sole list member. + +If VARIABLE has a `variable-interactive' property, that is used as if +it were the arg to `interactive' (which see) to interactively read the value. + +If VARIABLE has a `custom-type' property, it must be a widget and the +`:prompt-value' property of that widget will be used for reading the value. + +If given a prefix (or a COMMENT argument), also prompt for a comment. + +\(fn VARIABLE VALUE &optional COMMENT)" t nil) + +(autoload (quote customize-save-variable) "cus-edit" "\ +Set the default for VARIABLE to VALUE, and save it for future sessions. +Return VALUE. + +If VARIABLE has a `custom-set' property, that is used for setting +VARIABLE, otherwise `set-default' is used. + +The `customized-value' property of the VARIABLE will be set to a list +with a quoted VALUE as its sole list member. + +If VARIABLE has a `variable-interactive' property, that is used as if +it were the arg to `interactive' (which see) to interactively read the value. + +If VARIABLE has a `custom-type' property, it must be a widget and the +`:prompt-value' property of that widget will be used for reading the value. + +If given a prefix (or a COMMENT argument), also prompt for a comment. + +\(fn VARIABLE VALUE &optional COMMENT)" t nil) + +(autoload (quote customize) "cus-edit" "\ +Select a customization buffer which you can use to set user options. +User options are structured into \"groups\". +Initially the top-level group `Emacs' and its immediate subgroups +are shown; the contents of those subgroups are initially hidden. + +\(fn)" t nil) + +(autoload (quote customize-mode) "cus-edit" "\ +Customize options related to the current major mode. +If a prefix \\[universal-argument] was given (or if the current major mode has no known group), +then prompt for the MODE to customize. + +\(fn MODE)" t nil) + +(autoload (quote customize-group) "cus-edit" "\ +Customize GROUP, which must be a customization group. + +\(fn GROUP)" t nil) + +(autoload (quote customize-group-other-window) "cus-edit" "\ +Customize GROUP, which must be a customization group. + +\(fn GROUP)" t nil) + +(defalias (quote customize-variable) (quote customize-option)) + +(autoload (quote customize-option) "cus-edit" "\ +Customize SYMBOL, which must be a user option variable. + +\(fn SYMBOL)" t nil) + +(defalias (quote customize-variable-other-window) (quote customize-option-other-window)) + +(autoload (quote customize-option-other-window) "cus-edit" "\ +Customize SYMBOL, which must be a user option variable. +Show the buffer in another window, but don't select it. + +\(fn SYMBOL)" t nil) + +(autoload (quote customize-changed-options) "cus-edit" "\ +Customize all user option variables changed in Emacs itself. +This includes new user option variables and faces, and new +customization groups, as well as older options and faces whose default +values have changed since the previous major Emacs release. + +With argument SINCE-VERSION (a string), customize all user option +variables that were added (or their meanings were changed) since that +version. + +\(fn SINCE-VERSION)" t nil) + +(autoload (quote customize-face) "cus-edit" "\ +Customize SYMBOL, which should be a face name or nil. +If SYMBOL is nil, customize all faces. + +Interactively, when point is on text which has a face specified, +suggest to customized that face, if it's customizable. + +\(fn &optional FACE)" t nil) + +(autoload (quote customize-face-other-window) "cus-edit" "\ +Show customization buffer for face SYMBOL in other window. + +Interactively, when point is on text which has a face specified, +suggest to customized that face, if it's customizable. + +\(fn &optional FACE)" t nil) + +(autoload (quote customize-customized) "cus-edit" "\ +Customize all user options set since the last save in this session. + +\(fn)" t nil) + +(autoload (quote customize-rogue) "cus-edit" "\ +Customize all user variable modified outside customize. + +\(fn)" t nil) + +(autoload (quote customize-saved) "cus-edit" "\ +Customize all already saved user options. + +\(fn)" t nil) + +(autoload (quote customize-apropos) "cus-edit" "\ +Customize all user options matching REGEXP. +If ALL is `options', include only options. +If ALL is `faces', include only faces. +If ALL is `groups', include only groups. +If ALL is t (interactively, with prefix arg), include options which are not +user-settable, as well as faces and groups. + +\(fn REGEXP &optional ALL)" t nil) + +(autoload (quote customize-apropos-options) "cus-edit" "\ +Customize all user options matching REGEXP. +With prefix arg, include options which are not user-settable. + +\(fn REGEXP &optional ARG)" t nil) + +(autoload (quote customize-apropos-faces) "cus-edit" "\ +Customize all user faces matching REGEXP. + +\(fn REGEXP)" t nil) + +(autoload (quote customize-apropos-groups) "cus-edit" "\ +Customize all user groups matching REGEXP. + +\(fn REGEXP)" t nil) + +(autoload (quote custom-buffer-create) "cus-edit" "\ +Create a buffer containing OPTIONS. +Optional NAME is the name of the buffer. +OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where +SYMBOL is a customization option, and WIDGET is a widget for editing +that option. + +\(fn OPTIONS &optional NAME DESCRIPTION)" nil nil) + +(autoload (quote custom-buffer-create-other-window) "cus-edit" "\ +Create a buffer containing OPTIONS. +Optional NAME is the name of the buffer. +OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where +SYMBOL is a customization option, and WIDGET is a widget for editing +that option. + +\(fn OPTIONS &optional NAME DESCRIPTION)" nil nil) + +(autoload (quote customize-browse) "cus-edit" "\ +Create a tree browser for the customize hierarchy. + +\(fn &optional GROUP)" t nil) + +(defvar custom-file nil "\ +File used for storing customization information. +The default is nil, which means to use your init file +as specified by `user-init-file'. If you specify some other file, +you need to explicitly load that file for the settings to take effect. + +When you change this variable, look in the previous custom file +\(usually your init file) for the forms `(custom-set-variables ...)' +and `(custom-set-faces ...)', and copy them (whichever ones you find) +to the new custom file. This will preserve your existing customizations.") + +(custom-autoload (quote custom-file) "cus-edit") + +(autoload (quote customize-save-customized) "cus-edit" "\ +Save all user options which have been set in this session. + +\(fn)" t nil) + +(autoload (quote custom-save-all) "cus-edit" "\ +Save all customizations in `custom-file'. + +\(fn)" nil nil) + +(autoload (quote custom-menu-create) "cus-edit" "\ +Create menu for customization group SYMBOL. +The menu is in a format applicable to `easy-menu-define'. + +\(fn SYMBOL)" nil nil) + +(autoload (quote customize-menu-create) "cus-edit" "\ +Return a customize menu for customization group SYMBOL. +If optional NAME is given, use that as the name of the menu. +Otherwise the menu will be named `Customize'. +The format is suitable for use with `easy-menu-define'. + +\(fn SYMBOL &optional NAME)" nil nil) + +;;;*** + +;;;### (autoloads (custom-reset-faces custom-theme-reset-faces custom-theme-face-value +;;;;;; custom-set-faces custom-declare-face) "cus-face" "cus-face.el" +;;;;;; (16211 27013)) +;;; Generated autoloads from cus-face.el + +(autoload (quote custom-declare-face) "cus-face" "\ +Like `defface', but FACE is evaluated as a normal argument. + +\(fn FACE SPEC DOC &rest ARGS)" nil nil) + +(autoload (quote custom-set-faces) "cus-face" "\ +Initialize faces according to user preferences. +This associates the settings with the `user' theme. +The arguments should be a list where each entry has the form: + + (FACE SPEC [NOW [COMMENT]]) + +SPEC is stored as the saved value for FACE, as well as the value for the +`user' theme. The `user' theme is one of the default themes known to Emacs. +See `custom-known-themes' for more information on the known themes. +See `custom-theme-set-faces' for more information on the interplay +between themes and faces. +See `defface' for the format of SPEC. + +If NOW is present and non-nil, FACE is created now, according to SPEC. +COMMENT is a string comment about FACE. + +\(fn &rest ARGS)" nil nil) + +(autoload (quote custom-theme-face-value) "cus-face" "\ +Return spec of FACE in THEME if THEME modifies FACE. +Value is nil otherwise. The association between theme and spec for FACE +is stored in FACE's property `theme-face'. The appropriate face +is retrieved using `custom-theme-value'. + +\(fn FACE THEME)" nil nil) + +(autoload (quote custom-theme-reset-faces) "cus-face" "\ +Reset the value of the face to values previously defined. +Associate this setting with THEME. + +ARGS is a list of lists of the form + + (FACE TO-THEME) + +This means reset FACE to its value in TO-THEME. + +\(fn THEME &rest ARGS)" nil nil) + +(autoload (quote custom-reset-faces) "cus-face" "\ +Reset the value of the face to values previously saved. +This is the setting assosiated the `user' theme. + +ARGS is defined as for `custom-theme-reset-faces' + +\(fn &rest ARGS)" nil nil) + +;;;*** + +;;;### (autoloads (customize-create-theme) "cus-theme" "cus-theme.el" +;;;;;; (16211 27013)) +;;; Generated autoloads from cus-theme.el + +(autoload (quote customize-create-theme) "cus-theme" "\ +Create a custom theme. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (cvs-status-mode) "cvs-status" "cvs-status.el" +;;;;;; (16211 27013)) +;;; Generated autoloads from cvs-status.el + +(autoload (quote cvs-status-mode) "cvs-status" "\ +Mode used for cvs status output. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (global-cwarn-mode turn-on-cwarn-mode cwarn-mode) +;;;;;; "cwarn" "progmodes/cwarn.el" (16211 27039)) +;;; Generated autoloads from progmodes/cwarn.el + +(autoload (quote cwarn-mode) "cwarn" "\ +Minor mode that highlights suspicious C and C++ constructions. + +Note, in addition to enabling this minor mode, the major mode must +be included in the variable `cwarn-configuration'. By default C and +C++ modes are included. + +With ARG, turn CWarn mode on if and only if arg is positive. + +\(fn &optional ARG)" t nil) + +(autoload (quote turn-on-cwarn-mode) "cwarn" "\ +Turn on CWarn mode. + +This function is designed to be added to hooks, for example: + (add-hook 'c-mode-hook 'turn-on-cwarn-mode) + +\(fn)" nil nil) + +(defvar global-cwarn-mode nil "\ +Non-nil if Global-Cwarn mode is enabled. +See the command `global-cwarn-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `global-cwarn-mode'.") + +(custom-autoload (quote global-cwarn-mode) "cwarn") + +(autoload (quote global-cwarn-mode) "cwarn" "\ +Toggle Cwarn mode in every buffer. +With prefix ARG, turn Global-Cwarn mode on if and only if ARG is positive. +Cwarn mode is actually not turned on in every buffer but only in those +in which `turn-on-cwarn-mode-if-enabled' turns it on. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (standard-display-cyrillic-translit cyrillic-encode-alternativnyj-char +;;;;;; cyrillic-encode-koi8-r-char) "cyril-util" "language/cyril-util.el" +;;;;;; (16211 27033)) +;;; Generated autoloads from language/cyril-util.el + +(autoload (quote cyrillic-encode-koi8-r-char) "cyril-util" "\ +Return KOI8-R external character code of CHAR if appropriate. + +\(fn CHAR)" nil nil) + +(autoload (quote cyrillic-encode-alternativnyj-char) "cyril-util" "\ +Return ALTERNATIVNYJ external character code of CHAR if appropriate. + +\(fn CHAR)" nil nil) + +(autoload (quote standard-display-cyrillic-translit) "cyril-util" "\ +Display a cyrillic buffer using a transliteration. +For readability, the table is slightly +different from the one used for the input method `cyrillic-translit'. + +The argument is a string which specifies which language you are using; +that affects the choice of transliterations slightly. +Possible values are listed in `cyrillic-language-alist'. +If the argument is t, we use the default cyrillic transliteration. +If the argument is nil, we return the display table to its standard state. + +\(fn &optional CYRILLIC-LANGUAGE)" t nil) + +;;;*** + +;;;### (autoloads (dabbrev-expand dabbrev-completion) "dabbrev" "dabbrev.el" +;;;;;; (16211 27013)) +;;; Generated autoloads from dabbrev.el + (define-key esc-map "/" 'dabbrev-expand) + (define-key esc-map [?\C-/] 'dabbrev-completion) + +(autoload (quote dabbrev-completion) "dabbrev" "\ +Completion on current word. +Like \\[dabbrev-expand] but finds all expansions in the current buffer +and presents suggestions for completion. + +With a prefix argument, it searches all buffers accepted by the +function pointed out by `dabbrev-friend-buffer-function' to find the +completions. + +If the prefix argument is 16 (which comes from C-u C-u), +then it searches *all* buffers. + +With no prefix argument, it reuses an old completion list +if there is a suitable one already. + +\(fn &optional ARG)" t nil) + +(autoload (quote dabbrev-expand) "dabbrev" "\ +Expand previous word \"dynamically\". + +Expands to the most recent, preceding word for which this is a prefix. +If no suitable preceding word is found, words following point are +considered. If still no suitable word is found, then look in the +buffers accepted by the function pointed out by variable +`dabbrev-friend-buffer-function'. + +A positive prefix argument, N, says to take the Nth backward *distinct* +possibility. A negative argument says search forward. + +If the cursor has not moved from the end of the previous expansion and +no argument is given, replace the previously-made expansion +with the next possible expansion not yet tried. + +The variable `dabbrev-backward-only' may be used to limit the +direction of search to backward if set non-nil. + +See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (16211 +;;;;;; 27039)) +;;; Generated autoloads from progmodes/dcl-mode.el + +(autoload (quote dcl-mode) "dcl-mode" "\ +Major mode for editing DCL-files. + +This mode indents command lines in blocks. (A block is commands between +THEN-ELSE-ENDIF and between lines matching dcl-block-begin-regexp and +dcl-block-end-regexp.) + +Labels are indented to a fixed position unless they begin or end a block. +Whole-line comments (matching dcl-comment-line-regexp) are not indented. +Data lines are not indented. + +Key bindings: + +\\{dcl-mode-map} +Commands not usually bound to keys: + +\\[dcl-save-nondefault-options] Save changed options +\\[dcl-save-all-options] Save all options +\\[dcl-save-option] Save any option +\\[dcl-save-mode] Save buffer mode + +Variables controlling indentation style and extra features: + + dcl-basic-offset + Extra indentation within blocks. + + dcl-continuation-offset + Extra indentation for continued lines. + + dcl-margin-offset + Indentation for the first command line in a file or SUBROUTINE. + + dcl-margin-label-offset + Indentation for a label. + + dcl-comment-line-regexp + Lines matching this regexp will not be indented. + + dcl-block-begin-regexp + dcl-block-end-regexp + Regexps that match command lines that begin and end, respectively, + a block of commmand lines that will be given extra indentation. + Command lines between THEN-ELSE-ENDIF are always indented; these variables + make it possible to define other places to indent. + Set to nil to disable this feature. + + dcl-calc-command-indent-function + Can be set to a function that customizes indentation for command lines. + Two such functions are included in the package: + dcl-calc-command-indent-multiple + dcl-calc-command-indent-hang + + dcl-calc-cont-indent-function + Can be set to a function that customizes indentation for continued lines. + One such function is included in the package: + dcl-calc-cont-indent-relative (set by default) + + dcl-tab-always-indent + If t, pressing TAB always indents the current line. + If nil, pressing TAB indents the current line if point is at the left + margin. + + dcl-electric-characters + Non-nil causes lines to be indented at once when a label, ELSE or ENDIF is + typed. + + dcl-electric-reindent-regexps + Use this variable and function dcl-electric-character to customize + which words trigger electric indentation. + + dcl-tempo-comma + dcl-tempo-left-paren + dcl-tempo-right-paren + These variables control the look of expanded templates. + + dcl-imenu-generic-expression + Default value for imenu-generic-expression. The default includes + SUBROUTINE labels in the main listing and sub-listings for + other labels, CALL, GOTO and GOSUB statements. + + dcl-imenu-label-labels + dcl-imenu-label-goto + dcl-imenu-label-gosub + dcl-imenu-label-call + Change the text that is used as sub-listing labels in imenu. + +Loading this package calls the value of the variable +`dcl-mode-load-hook' with no args, if that value is non-nil. +Turning on DCL mode calls the value of the variable `dcl-mode-hook' +with no args, if that value is non-nil. + + +The following example uses the default values for all variables: + +$! This is a comment line that is not indented (it matches +$! dcl-comment-line-regexp) +$! Next follows the first command line. It is indented dcl-margin-offset. +$ i = 1 +$ ! Other comments are indented like command lines. +$ ! A margin label indented dcl-margin-label-offset: +$ label: +$ if i.eq.1 +$ then +$ ! Lines between THEN-ELSE and ELSE-ENDIF are +$ ! indented dcl-basic-offset +$ loop1: ! This matches dcl-block-begin-regexp... +$ ! ...so this line is indented dcl-basic-offset +$ text = \"This \" + - ! is a continued line + \"lined up with the command line\" +$ type sys$input +Data lines are not indented at all. +$ endloop1: ! This matches dcl-block-end-regexp +$ endif +$ + + +There is some minimal font-lock support (see vars +`dcl-font-lock-defaults' and `dcl-font-lock-keywords'). + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (cancel-debug-on-entry debug-on-entry debug) "debug" +;;;;;; "emacs-lisp/debug.el" (16211 27025)) +;;; Generated autoloads from emacs-lisp/debug.el + +(setq debugger (quote debug)) + +(autoload (quote debug) "debug" "\ +Enter debugger. To return, type \\`\\[debugger-continue]'. +Arguments are mainly for use when this is called from the internals +of the evaluator. + +You may call with no args, or you may pass nil as the first arg and +any other args you like. In that case, the list of args after the +first will be printed into the backtrace buffer. + +\(fn &rest DEBUGGER-ARGS)" t nil) + +(autoload (quote debug-on-entry) "debug" "\ +Request FUNCTION to invoke debugger each time it is called. +If you tell the debugger to continue, FUNCTION's execution proceeds. +This works by modifying the definition of FUNCTION, +which must be written in Lisp, not predefined. +Use \\[cancel-debug-on-entry] to cancel the effect of this command. +Redefining FUNCTION also cancels it. + +\(fn FUNCTION)" t nil) + +(autoload (quote cancel-debug-on-entry) "debug" "\ +Undo effect of \\[debug-on-entry] on FUNCTION. +If argument is nil or an empty string, cancel for all functions. + +\(fn &optional FUNCTION)" t nil) + +;;;*** + +;;;### (autoloads (decipher-mode decipher) "decipher" "play/decipher.el" +;;;;;; (16211 27038)) +;;; Generated autoloads from play/decipher.el + +(autoload (quote decipher) "decipher" "\ +Format a buffer of ciphertext for cryptanalysis and enter Decipher mode. + +\(fn)" t nil) + +(autoload (quote decipher-mode) "decipher" "\ +Major mode for decrypting monoalphabetic substitution ciphers. +Lower-case letters enter plaintext. +Upper-case letters are commands. + +The buffer is made read-only so that normal Emacs commands cannot +modify it. + +The most useful commands are: +\\ +\\[decipher-digram-list] Display a list of all digrams & their frequency +\\[decipher-frequency-count] Display the frequency of each ciphertext letter +\\[decipher-adjacency-list] Show adjacency list for current letter (lists letters appearing next to it) +\\[decipher-make-checkpoint] Save the current cipher alphabet (checkpoint) +\\[decipher-restore-checkpoint] Restore a saved cipher alphabet (checkpoint) + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (delimit-columns-rectangle delimit-columns-region +;;;;;; delimit-columns-customize) "delim-col" "delim-col.el" (16211 +;;;;;; 27013)) +;;; Generated autoloads from delim-col.el + +(autoload (quote delimit-columns-customize) "delim-col" "\ +Customization of `columns' group. + +\(fn)" t nil) + +(autoload (quote delimit-columns-region) "delim-col" "\ +Prettify all columns in a text region. + +START and END delimits the text region. + +\(fn START END)" t nil) + +(autoload (quote delimit-columns-rectangle) "delim-col" "\ +Prettify all columns in a text rectangle. + +START and END delimits the corners of text rectangle. + +\(fn START END)" t nil) + +;;;*** + +;;;### (autoloads (delphi-mode) "delphi" "progmodes/delphi.el" (16211 +;;;;;; 27039)) +;;; Generated autoloads from progmodes/delphi.el + +(autoload (quote delphi-mode) "delphi" "\ +Major mode for editing Delphi code. \\ +\\[delphi-tab] - Indents the current line for Delphi code. +\\[delphi-find-unit] - Search for a Delphi source file. +\\[delphi-fill-comment] - Fill the current comment. +\\[delphi-new-comment-line] - If in a // comment, do a new comment line. + +M-x indent-region also works for indenting a whole region. + +Customization: + + `delphi-indent-level' (default 3) + Indentation of Delphi statements with respect to containing block. + `delphi-compound-block-indent' (default 0) + Extra indentation for blocks in compound statements. + `delphi-case-label-indent' (default 0) + Extra indentation for case statement labels. + `delphi-tab-always-indents' (default t) + Non-nil means TAB in Delphi mode should always reindent the current line, + regardless of where in the line point is when the TAB command is used. + `delphi-newline-always-indents' (default t) + Non-nil means NEWLINE in Delphi mode should always reindent the current + line, insert a blank line and move to the default indent column of the + blank line. + `delphi-search-path' (default .) + Directories to search when finding external units. + `delphi-verbose' (default nil) + If true then delphi token processing progress is reported to the user. + +Coloring: + + `delphi-comment-face' (default font-lock-comment-face) + Face used to color delphi comments. + `delphi-string-face' (default font-lock-string-face) + Face used to color delphi strings. + `delphi-keyword-face' (default font-lock-keyword-face) + Face used to color delphi keywords. + `delphi-other-face' (default nil) + Face used to color everything else. + +Turning on Delphi mode calls the value of the variable delphi-mode-hook with +no args, if that value is non-nil. + +\(fn &optional SKIP-INITIAL-PARSING)" t nil) + +;;;*** + +;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (16211 +;;;;;; 27013)) +;;; Generated autoloads from delsel.el + +(defalias (quote pending-delete-mode) (quote delete-selection-mode)) + +(defvar delete-selection-mode nil "\ +Non-nil if Delete-Selection mode is enabled. +See the command `delete-selection-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `delete-selection-mode'.") + +(custom-autoload (quote delete-selection-mode) "delsel") + +(autoload (quote delete-selection-mode) "delsel" "\ +Toggle Delete Selection mode. +With prefix ARG, turn Delete Selection mode on if and only if ARG is +positive. + +When Delete Selection mode is enabled, Transient Mark mode is also +enabled and typed text replaces the selection if the selection is +active. Otherwise, typed text is just inserted at point regardless of +any selection. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (derived-mode-init-mode-variables define-derived-mode) +;;;;;; "derived" "emacs-lisp/derived.el" (16211 27025)) +;;; Generated autoloads from emacs-lisp/derived.el + +(autoload (quote define-derived-mode) "derived" "\ +Create a new mode as a variant of an existing mode. + +The arguments to this command are as follow: + +CHILD: the name of the command for the derived mode. +PARENT: the name of the command for the parent mode (e.g. `text-mode') + or nil if there is no parent. +NAME: a string which will appear in the status line (e.g. \"Hypertext\") +DOCSTRING: an optional documentation string--if you do not supply one, + the function will attempt to invent something useful. +BODY: forms to execute just before running the + hooks for the new mode. Do not use `interactive' here. + +BODY can start with a bunch of keyword arguments. The following keyword + arguments are currently understood: +:group GROUP + Declare the customization group that corresponds to this mode. +:syntax-table TABLE + Use TABLE instead of the default. + A nil value means to simply use the same syntax-table as the parent. +:abbrev-table TABLE + Use TABLE instead of the default. + A nil value means to simply use the same abbrev-table as the parent. + +Here is how you could define LaTeX-Thesis mode as a variant of LaTeX mode: + + (define-derived-mode LaTeX-thesis-mode LaTeX-mode \"LaTeX-Thesis\") + +You could then make new key bindings for `LaTeX-thesis-mode-map' +without changing regular LaTeX mode. In this example, BODY is empty, +and DOCSTRING is generated by default. + +On a more complicated level, the following command uses `sgml-mode' as +the parent, and then sets the variable `case-fold-search' to nil: + + (define-derived-mode article-mode sgml-mode \"Article\" + \"Major mode for editing technical articles.\" + (setq case-fold-search nil)) + +Note that if the documentation string had been left out, it would have +been generated automatically, with a reference to the keymap. + +The new mode runs the hook constructed by the function +`derived-mode-hook-name'. + +\(fn CHILD PARENT NAME &optional DOCSTRING &rest BODY)" nil (quote macro)) + +(autoload (quote derived-mode-init-mode-variables) "derived" "\ +Initialise variables for a new MODE. +Right now, if they don't already exist, set up a blank keymap, an +empty syntax table, and an empty abbrev table -- these will be merged +the first time the mode is used. + +\(fn MODE)" nil nil) + +;;;*** + +;;;### (autoloads (describe-char describe-text-properties) "descr-text" +;;;;;; "descr-text.el" (16302 39173)) +;;; Generated autoloads from descr-text.el + +(autoload (quote describe-text-properties) "descr-text" "\ +Describe widgets, buttons, overlays and text properties at POS. +Interactively, describe them for the character after point. +If optional second argument OUTPUT-BUFFER is non-nil, +insert the output into that buffer, and don't initialize or clear it +otherwise. + +\(fn POS &optional OUTPUT-BUFFER)" t nil) + +(autoload (quote describe-char) "descr-text" "\ +Describe the character after POS (interactively, the character after point). +The information includes character code, charset and code points in it, +syntax, category, how the character is encoded in a file, +character composition information (if relevant), +as well as widgets, buttons, overlays, and text properties. + +\(fn POS)" t nil) + +;;;*** + +;;;### (autoloads (desktop-revert desktop-save-in-desktop-dir desktop-change-dir +;;;;;; desktop-load-default desktop-read desktop-save-mode) "desktop" +;;;;;; "desktop.el" (16297 34365)) +;;; Generated autoloads from desktop.el + +(defvar desktop-save-mode nil "\ +Non-nil if Desktop-Save mode is enabled. +See the command `desktop-save-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `desktop-save-mode'.") + +(custom-autoload (quote desktop-save-mode) "desktop") + +(autoload (quote desktop-save-mode) "desktop" "\ +Toggle desktop saving mode. +With numeric ARG, turn desktop saving on if ARG is positive, off +otherwise. See variable `desktop-save' for a description of when the +desktop is saved. + +\(fn &optional ARG)" t nil) + +(autoload (quote desktop-read) "desktop" "\ +Read and process the desktop file in directory DIRNAME. +Look for a desktop file in DIRNAME, or if DIRNAME is omitted, look in +directories listed in `desktop-path'. If a desktop file is found, it +is processed and `desktop-after-read-hook' is run. If no desktop file +is found, clear the desktop and run `desktop-no-desktop-file-hook'. +This function is a no-op when Emacs is running in batch mode. +It returns t if a desktop file was loaded, nil otherwise. + +\(fn &optional DIRNAME)" t nil) + +(autoload (quote desktop-load-default) "desktop" "\ +Load the `default' start-up library manually. +Also inhibit further loading of it. + +\(fn)" nil nil) + +(autoload (quote desktop-change-dir) "desktop" "\ +Change to desktop saved in DIRNAME. +Kill the desktop as specified by variables `desktop-save-mode' and +`desktop-save', then clear the desktop and load the desktop file in +directory DIRNAME. + +\(fn DIRNAME)" t nil) + +(autoload (quote desktop-save-in-desktop-dir) "desktop" "\ +Save the desktop in directory `desktop-dirname'. + +\(fn)" t nil) + +(autoload (quote desktop-revert) "desktop" "\ +Revert to the last loaded desktop. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (devanagari-post-read-conversion) "devan-util" +;;;;;; "language/devan-util.el" (16232 544)) +;;; Generated autoloads from language/devan-util.el + +(defconst devanagari-consonant "[\x51ad5-\x51af9\x51b38-\x51b3f]") + +(autoload (quote devanagari-post-read-conversion) "devan-util" "\ +Not documented + +\(fn LEN)" nil nil) + +;;;*** + +;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib" +;;;;;; "calendar/diary-lib.el" (16212 54636)) +;;; Generated autoloads from calendar/diary-lib.el + +(autoload (quote diary) "diary-lib" "\ +Generate the diary window for ARG days starting with the current date. +If no argument is provided, the number of days of diary entries is governed +by the variable `number-of-diary-entries'. This function is suitable for +execution in a `.emacs' file. + +\(fn &optional ARG)" t nil) + +(autoload (quote diary-mail-entries) "diary-lib" "\ +Send a mail message showing diary entries for next NDAYS days. +If no prefix argument is given, NDAYS is set to `diary-mail-days'. +Mail is sent to the address specified by `diary-mail-addr'. + +You can call `diary-mail-entries' every night using an at/cron job. +For example, this script will run the program at 2am daily. Since +`emacs -batch' does not load your `.emacs' file, you must ensure that +all relevant variables are set, as done here. + +#!/bin/sh +# diary-rem.sh -- repeatedly run the Emacs diary-reminder +emacs -batch \\ +-eval \"(setq diary-mail-days 3 \\ + diary-file \\\"/path/to/diary.file\\\" \\ + european-calendar-style t \\ + diary-mail-addr \\\"user@host.name\\\" )\" \\ +-l diary-lib -f diary-mail-entries +at -f diary-rem.sh 0200 tomorrow + +You may have to tweak the syntax of the `at' command to suit your +system. Alternatively, you can specify a cron entry: +0 1 * * * diary-rem.sh +to run it every morning at 1am. + +\(fn &optional NDAYS)" t nil) + +(autoload (quote diary-mode) "diary-lib" "\ +Major mode for editing the diary file. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (diff-backup diff diff-command diff-switches) "diff" +;;;;;; "diff.el" (16277 42321)) +;;; Generated autoloads from diff.el + +(defvar diff-switches "-c" "\ +*A string or list of strings specifying switches to be be passed to diff.") + +(custom-autoload (quote diff-switches) "diff") + +(defvar diff-command "diff" "\ +*The command to use to run diff.") + +(custom-autoload (quote diff-command) "diff") + +(autoload (quote diff) "diff" "\ +Find and display the differences between OLD and NEW files. +Interactively the current buffer's file name is the default for NEW +and a backup file for NEW is the default for OLD. +With prefix arg, prompt for diff switches. +If NO-ASYNC is non-nil, call diff synchronously. + +\(fn OLD NEW &optional SWITCHES NO-ASYNC)" t nil) + +(autoload (quote diff-backup) "diff" "\ +Diff this file with its backup file or vice versa. +Uses the latest backup, if there are several numerical backups. +If this file is a backup, diff it with its original. +The backup file is the first file given to `diff'. + +\(fn FILE &optional SWITCHES)" t nil) + +;;;*** + +;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "diff-mode.el" +;;;;;; (16309 31935)) +;;; Generated autoloads from diff-mode.el + +(autoload (quote diff-mode) "diff-mode" "\ +Major mode for viewing/editing context diffs. +Supports unified and context diffs as well as (to a lesser extent) +normal diffs. +When the buffer is read-only, the ESC prefix is not necessary. +IF you edit the buffer manually, diff-mode will try to update the hunk +headers for you on-the-fly. + +You can also switch between context diff and unified diff with \\[diff-context->unified], +or vice versa with \\[diff-unified->context] and you can also revert the direction of +a diff with \\[diff-reverse-direction]. + +\(fn)" t nil) + +(autoload (quote diff-minor-mode) "diff-mode" "\ +Minor mode for viewing/editing context diffs. +\\{diff-minor-mode-map} + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (dired-noselect dired-other-frame dired-other-window +;;;;;; dired dired-copy-preserve-time dired-dwim-target dired-keep-marker-symlink +;;;;;; dired-keep-marker-hardlink dired-keep-marker-copy dired-keep-marker-rename +;;;;;; dired-trivial-filenames dired-ls-F-marks-symlinks dired-listing-switches) +;;;;;; "dired" "dired.el" (16292 22310)) +;;; Generated autoloads from dired.el + +(defvar dired-listing-switches "-al" "\ +*Switches passed to `ls' for dired. MUST contain the `l' option. +May contain all other options that don't contradict `-l'; +may contain even `F', `b', `i' and `s'. See also the variable +`dired-ls-F-marks-symlinks' concerning the `F' switch. +On systems such as MS-DOS and MS-Windows, which use `ls' emulation in Lisp, +some of the `ls' switches are not supported; see the doc string of +`insert-directory' on ls-lisp.el for more details.") + +(custom-autoload (quote dired-listing-switches) "dired") + +(defvar dired-chown-program (if (memq system-type (quote (hpux dgux usg-unix-v irix linux gnu/linux cygwin))) "chown" (if (file-exists-p "/usr/sbin/chown") "/usr/sbin/chown" "/etc/chown")) "\ +Name of chown command (usually `chown' or `/etc/chown').") + +(defvar dired-ls-F-marks-symlinks nil "\ +*Informs dired about how `ls -lF' marks symbolic links. +Set this to t if `ls' (or whatever program is specified by +`insert-directory-program') with `-lF' marks the symbolic link +itself with a trailing @ (usually the case under Ultrix). + +Example: if `ln -s foo bar; ls -F bar' gives `bar -> foo', set it to +nil (the default), if it gives `bar@ -> foo', set it to t. + +Dired checks if there is really a @ appended. Thus, if you have a +marking `ls' program on one host and a non-marking on another host, and +don't care about symbolic links which really end in a @, you can +always set this variable to t.") + +(custom-autoload (quote dired-ls-F-marks-symlinks) "dired") + +(defvar dired-trivial-filenames "^\\.\\.?$\\|^#" "\ +*Regexp of files to skip when finding first file of a directory. +A value of nil means move to the subdir line. +A value of t means move to first file.") + +(custom-autoload (quote dired-trivial-filenames) "dired") + +(defvar dired-keep-marker-rename t "\ +*Controls marking of renamed files. +If t, files keep their previous marks when they are renamed. +If a character, renamed files (whether previously marked or not) +are afterward marked with that character.") + +(custom-autoload (quote dired-keep-marker-rename) "dired") + +(defvar dired-keep-marker-copy 67 "\ +*Controls marking of copied files. +If t, copied files are marked if and as the corresponding original files were. +If a character, copied files are unconditionally marked with that character.") + +(custom-autoload (quote dired-keep-marker-copy) "dired") + +(defvar dired-keep-marker-hardlink 72 "\ +*Controls marking of newly made hard links. +If t, they are marked if and as the files linked to were marked. +If a character, new links are unconditionally marked with that character.") + +(custom-autoload (quote dired-keep-marker-hardlink) "dired") + +(defvar dired-keep-marker-symlink 89 "\ +*Controls marking of newly made symbolic links. +If t, they are marked if and as the files linked to were marked. +If a character, new links are unconditionally marked with that character.") + +(custom-autoload (quote dired-keep-marker-symlink) "dired") + +(defvar dired-dwim-target nil "\ +*If non-nil, dired tries to guess a default target directory. +This means: if there is a dired buffer displayed in the next window, +use its current subdir, instead of the current subdir of this dired buffer. + +The target is used in the prompt for file copy, rename etc.") + +(custom-autoload (quote dired-dwim-target) "dired") + +(defvar dired-copy-preserve-time t "\ +*If non-nil, Dired preserves the last-modified time in a file copy. +\(This works on only some systems.)") + +(custom-autoload (quote dired-copy-preserve-time) "dired") + +(defvar dired-directory nil "\ +The directory name or wildcard spec that this Dired directory lists. +Local to each dired buffer. May be a list, in which case the car is the +directory name and the cdr is the list of files to mention. +The directory name must be absolute, but need not be fully expanded.") + (define-key ctl-x-map "d" 'dired) + +(autoload (quote dired) "dired" "\ +\"Edit\" directory DIRNAME--delete, rename, print, etc. some files in it. +Optional second argument SWITCHES specifies the `ls' options used. +\(Interactively, use a prefix argument to be able to specify SWITCHES.) +Dired displays a list of files in DIRNAME (which may also have +shell wildcards appended to select certain files). If DIRNAME is a cons, +its first element is taken as the directory name and the rest as an explicit +list of files to make directory entries for. +\\You can move around in it with the usual commands. +You can flag files for deletion with \\[dired-flag-file-deletion] and then +delete them by typing \\[dired-do-flagged-delete]. +Type \\[describe-mode] after entering dired for more info. + +If DIRNAME is already in a dired buffer, that buffer is used without refresh. + +\(fn DIRNAME &optional SWITCHES)" t nil) + (define-key ctl-x-4-map "d" 'dired-other-window) + +(autoload (quote dired-other-window) "dired" "\ +\"Edit\" directory DIRNAME. Like `dired' but selects in another window. + +\(fn DIRNAME &optional SWITCHES)" t nil) + (define-key ctl-x-5-map "d" 'dired-other-frame) + +(autoload (quote dired-other-frame) "dired" "\ +\"Edit\" directory DIRNAME. Like `dired' but makes a new frame. + +\(fn DIRNAME &optional SWITCHES)" t nil) + +(autoload (quote dired-noselect) "dired" "\ +Like `dired' but returns the dired buffer as value, does not select it. + +\(fn DIR-OR-LIST &optional SWITCHES)" nil nil) + (put 'dired-find-alternate-file 'disabled t) + +;;;*** + +;;;### (autoloads (dired-show-file-type dired-do-query-replace-regexp +;;;;;; dired-do-search dired-hide-all dired-hide-subdir dired-tree-down +;;;;;; dired-tree-up dired-kill-subdir dired-mark-subdir-files dired-goto-subdir +;;;;;; dired-prev-subdir dired-insert-subdir dired-maybe-insert-subdir +;;;;;; dired-downcase dired-upcase dired-do-symlink-regexp dired-do-hardlink-regexp +;;;;;; dired-do-copy-regexp dired-do-rename-regexp dired-do-rename +;;;;;; dired-do-hardlink dired-do-symlink dired-do-copy dired-create-directory +;;;;;; dired-rename-file dired-copy-file dired-relist-file dired-remove-file +;;;;;; dired-add-file dired-do-redisplay dired-do-load dired-do-byte-compile +;;;;;; dired-do-compress dired-compress-file dired-do-kill-lines +;;;;;; dired-do-shell-command dired-do-print dired-do-chown dired-do-chgrp +;;;;;; dired-do-chmod dired-backup-diff dired-diff) "dired-aux" +;;;;;; "dired-aux.el" (16211 27013)) +;;; Generated autoloads from dired-aux.el + +(autoload (quote dired-diff) "dired-aux" "\ +Compare file at point with file FILE using `diff'. +FILE defaults to the file at the mark. (That's the mark set by +\\[set-mark-command], not by Dired's \\[dired-mark] command.) +The prompted-for file is the first file given to `diff'. +With prefix arg, prompt for second argument SWITCHES, + which is options for `diff'. + +\(fn FILE &optional SWITCHES)" t nil) + +(autoload (quote dired-backup-diff) "dired-aux" "\ +Diff this file with its backup file or vice versa. +Uses the latest backup, if there are several numerical backups. +If this file is a backup, diff it with its original. +The backup file is the first file given to `diff'. +With prefix arg, prompt for argument SWITCHES which is options for `diff'. + +\(fn &optional SWITCHES)" t nil) + +(autoload (quote dired-do-chmod) "dired-aux" "\ +Change the mode of the marked (or next ARG) files. +This calls chmod, thus symbolic modes like `g+w' are allowed. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-do-chgrp) "dired-aux" "\ +Change the group of the marked (or next ARG) files. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-do-chown) "dired-aux" "\ +Change the owner of the marked (or next ARG) files. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-do-print) "dired-aux" "\ +Print the marked (or next ARG) files. +Uses the shell command coming from variables `lpr-command' and +`lpr-switches' as default. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-do-shell-command) "dired-aux" "\ +Run a shell command COMMAND on the marked files. +If no files are marked or a specific numeric prefix arg is given, +the next ARG files are used. Just \\[universal-argument] means the current file. +The prompt mentions the file(s) or the marker, as appropriate. + +If there is a `*' in COMMAND, surrounded by whitespace, this runs +COMMAND just once with the entire file list substituted there. + +If there is no `*', but there is a `?' in COMMAND, surrounded by +whitespace, this runs COMMAND on each file individually with the +file name substituted for `?'. + +Otherwise, this runs COMMAND on each file individually with the +file name added at the end of COMMAND (separated by a space). + +`*' and `?' when not surrounded by whitespace have no special +significance for `dired-do-shell-command', and are passed through +normally to the shell, but you must confirm first. To pass `*' by +itself to the shell as a wildcard, type `*\"\"'. + +If COMMAND produces output, it goes to a separate buffer. + +This feature does not try to redisplay Dired buffers afterward, as +there's no telling what files COMMAND may have changed. +Type \\[dired-do-redisplay] to redisplay the marked files. + +When COMMAND runs, its working directory is the top-level directory of +the Dired buffer, so output files usually are created there instead of +in a subdir. + +In a noninteractive call (from Lisp code), you must specify +the list of file names explicitly with the FILE-LIST argument. + +\(fn COMMAND &optional ARG FILE-LIST)" t nil) + +(autoload (quote dired-do-kill-lines) "dired-aux" "\ +Kill all marked lines (not the files). +With a prefix argument, kill that many lines starting with the current line. +\(A negative argument kills lines before the current line.) +To kill an entire subdirectory, go to its directory header line +and use this command with a prefix argument (the value does not matter). + +\(fn &optional ARG FMT)" t nil) + +(autoload (quote dired-compress-file) "dired-aux" "\ +Not documented + +\(fn FILE)" nil nil) + +(autoload (quote dired-do-compress) "dired-aux" "\ +Compress or uncompress marked (or next ARG) files. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-do-byte-compile) "dired-aux" "\ +Byte compile marked (or next ARG) Emacs Lisp files. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-do-load) "dired-aux" "\ +Load the marked (or next ARG) Emacs Lisp files. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-do-redisplay) "dired-aux" "\ +Redisplay all marked (or next ARG) files. +If on a subdir line, redisplay that subdirectory. In that case, +a prefix arg lets you edit the `ls' switches used for the new listing. + +\(fn &optional ARG TEST-FOR-SUBDIR)" t nil) + +(autoload (quote dired-add-file) "dired-aux" "\ +Not documented + +\(fn FILENAME &optional MARKER-CHAR)" nil nil) + +(autoload (quote dired-remove-file) "dired-aux" "\ +Not documented + +\(fn FILE)" nil nil) + +(autoload (quote dired-relist-file) "dired-aux" "\ +Create or update the line for FILE in all Dired buffers it would belong in. + +\(fn FILE)" nil nil) + +(autoload (quote dired-copy-file) "dired-aux" "\ +Not documented + +\(fn FROM TO OK-FLAG)" nil nil) + +(autoload (quote dired-rename-file) "dired-aux" "\ +Not documented + +\(fn FILE NEWNAME OK-IF-ALREADY-EXISTS)" nil nil) + +(autoload (quote dired-create-directory) "dired-aux" "\ +Create a directory called DIRECTORY. + +\(fn DIRECTORY)" t nil) + +(autoload (quote dired-do-copy) "dired-aux" "\ +Copy all marked (or next ARG) files, or copy the current file. +This normally preserves the last-modified date when copying. +When operating on just the current file, you specify the new name. +When operating on multiple or marked files, you specify a directory, +and new copies of these files are made in that directory +with the same names that the files currently have. The default +suggested for the target directory depends on the value of +`dired-dwim-target', which see. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-do-symlink) "dired-aux" "\ +Make symbolic links to current file or all marked (or next ARG) files. +When operating on just the current file, you specify the new name. +When operating on multiple or marked files, you specify a directory +and new symbolic links are made in that directory +with the same names that the files currently have. The default +suggested for the target directory depends on the value of +`dired-dwim-target', which see. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-do-hardlink) "dired-aux" "\ +Add names (hard links) current file or all marked (or next ARG) files. +When operating on just the current file, you specify the new name. +When operating on multiple or marked files, you specify a directory +and new hard links are made in that directory +with the same names that the files currently have. The default +suggested for the target directory depends on the value of +`dired-dwim-target', which see. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-do-rename) "dired-aux" "\ +Rename current file or all marked (or next ARG) files. +When renaming just the current file, you specify the new name. +When renaming multiple or marked files, you specify a directory. +This command also renames any buffers that are visiting the files. +The default suggested for the target directory depends on the value +of `dired-dwim-target', which see. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-do-rename-regexp) "dired-aux" "\ +Rename selected files whose names match REGEXP to NEWNAME. + +With non-zero prefix argument ARG, the command operates on the next ARG +files. Otherwise, it operates on all the marked files, or the current +file if none are marked. + +As each match is found, the user must type a character saying + what to do with it. For directions, type \\[help-command] at that time. +NEWNAME may contain \\=\\ or \\& as in `query-replace-regexp'. +REGEXP defaults to the last regexp used. + +With a zero prefix arg, renaming by regexp affects the absolute file name. +Normally, only the non-directory part of the file name is used and changed. + +\(fn REGEXP NEWNAME &optional ARG WHOLE-NAME)" t nil) + +(autoload (quote dired-do-copy-regexp) "dired-aux" "\ +Copy selected files whose names match REGEXP to NEWNAME. +See function `dired-do-rename-regexp' for more info. + +\(fn REGEXP NEWNAME &optional ARG WHOLE-NAME)" t nil) + +(autoload (quote dired-do-hardlink-regexp) "dired-aux" "\ +Hardlink selected files whose names match REGEXP to NEWNAME. +See function `dired-do-rename-regexp' for more info. + +\(fn REGEXP NEWNAME &optional ARG WHOLE-NAME)" t nil) + +(autoload (quote dired-do-symlink-regexp) "dired-aux" "\ +Symlink selected files whose names match REGEXP to NEWNAME. +See function `dired-do-rename-regexp' for more info. + +\(fn REGEXP NEWNAME &optional ARG WHOLE-NAME)" t nil) + +(autoload (quote dired-upcase) "dired-aux" "\ +Rename all marked (or next ARG) files to upper case. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-downcase) "dired-aux" "\ +Rename all marked (or next ARG) files to lower case. + +\(fn &optional ARG)" t nil) + +(autoload (quote dired-maybe-insert-subdir) "dired-aux" "\ +Insert this subdirectory into the same dired buffer. +If it is already present, just move to it (type \\[dired-do-redisplay] to refresh), + else inserts it at its natural place (as `ls -lR' would have done). +With a prefix arg, you may edit the ls switches used for this listing. + You can add `R' to the switches to expand the whole tree starting at + this subdirectory. +This function takes some pains to conform to `ls -lR' output. + +\(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil) + +(autoload (quote dired-insert-subdir) "dired-aux" "\ +Insert this subdirectory into the same dired buffer. +If it is already present, overwrites previous entry, + else inserts it at its natural place (as `ls -lR' would have done). +With a prefix arg, you may edit the `ls' switches used for this listing. + You can add `R' to the switches to expand the whole tree starting at + this subdirectory. +This function takes some pains to conform to `ls -lR' output. + +\(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil) + +(autoload (quote dired-prev-subdir) "dired-aux" "\ +Go to previous subdirectory, regardless of level. +When called interactively and not on a subdir line, go to this subdir's line. + +\(fn ARG &optional NO-ERROR-IF-NOT-FOUND NO-SKIP)" t nil) + +(autoload (quote dired-goto-subdir) "dired-aux" "\ +Go to end of header line of DIR in this dired buffer. +Return value of point on success, otherwise return nil. +The next char is either \\n, or \\r if DIR is hidden. + +\(fn DIR)" t nil) + +(autoload (quote dired-mark-subdir-files) "dired-aux" "\ +Mark all files except `.' and `..' in current subdirectory. +If the Dired buffer shows multiple directories, this command +marks the files listed in the subdirectory that point is in. + +\(fn)" t nil) + +(autoload (quote dired-kill-subdir) "dired-aux" "\ +Remove all lines of current subdirectory. +Lower levels are unaffected. + +\(fn &optional REMEMBER-MARKS)" t nil) + +(autoload (quote dired-tree-up) "dired-aux" "\ +Go up ARG levels in the dired tree. + +\(fn ARG)" t nil) + +(autoload (quote dired-tree-down) "dired-aux" "\ +Go down in the dired tree. + +\(fn)" t nil) + +(autoload (quote dired-hide-subdir) "dired-aux" "\ +Hide or unhide the current subdirectory and move to next directory. +Optional prefix arg is a repeat factor. +Use \\[dired-hide-all] to (un)hide all directories. + +\(fn ARG)" t nil) + +(autoload (quote dired-hide-all) "dired-aux" "\ +Hide all subdirectories, leaving only their header lines. +If there is already something hidden, make everything visible again. +Use \\[dired-hide-subdir] to (un)hide a particular subdirectory. + +\(fn ARG)" t nil) + +(autoload (quote dired-do-search) "dired-aux" "\ +Search through all marked files for a match for REGEXP. +Stops when a match is found. +To continue searching for next match, use command \\[tags-loop-continue]. + +\(fn REGEXP)" t nil) + +(autoload (quote dired-do-query-replace-regexp) "dired-aux" "\ +Do `query-replace-regexp' of FROM with TO, on all marked files. +Third arg DELIMITED (prefix arg) means replace only word-delimited matches. +If you exit (\\[keyboard-quit], RET or q), you can resume the query replace +with the command \\[tags-loop-continue]. + +\(fn FROM TO &optional DELIMITED)" t nil) + +(autoload (quote dired-show-file-type) "dired-aux" "\ +Print the type of FILE, according to the `file' command. +If FILE is a symbolic link and the optional argument DEREF-SYMLINKS is +true then the type of the file linked to by FILE is printed instead. + +\(fn FILE &optional DEREF-SYMLINKS)" t nil) + +;;;*** + +;;;### (autoloads (dired-jump) "dired-x" "dired-x.el" (16246 41969)) +;;; Generated autoloads from dired-x.el + +(autoload (quote dired-jump) "dired-x" "\ +Jump to dired buffer corresponding to current buffer. +If in a file, dired the current directory and move to file's line. +If in dired already, pop up a level and goto old directory's line. +In case the proper dired file line cannot be found, refresh the dired +buffer and try again. + +\(fn &optional OTHER-WINDOW)" t nil) + +;;;*** + +;;;### (autoloads (dirtrack) "dirtrack" "dirtrack.el" (16211 27015)) +;;; Generated autoloads from dirtrack.el + +(autoload (quote dirtrack) "dirtrack" "\ +Determine the current directory by scanning the process output for a prompt. +The prompt to look for is the first item in `dirtrack-list'. + +You can toggle directory tracking by using the function `dirtrack-toggle'. + +If directory tracking does not seem to be working, you can use the +function `dirtrack-debug-toggle' to turn on debugging output. + +You can enable directory tracking by adding this function to +`comint-output-filter-functions'. + +\(fn INPUT)" nil nil) + +;;;*** + +;;;### (autoloads (disassemble) "disass" "emacs-lisp/disass.el" (16211 +;;;;;; 27025)) +;;; Generated autoloads from emacs-lisp/disass.el + +(autoload (quote disassemble) "disass" "\ +Print disassembled code for OBJECT in (optional) BUFFER. +OBJECT can be a symbol defined as a function, or a function itself +\(a lambda expression or a compiled-function object). +If OBJECT is not already compiled, we compile it, but do not +redefine OBJECT if it is a symbol. + +\(fn OBJECT &optional BUFFER INDENT INTERACTIVE-P)" t nil) + +;;;*** + +;;;### (autoloads (standard-display-european create-glyph standard-display-underline +;;;;;; standard-display-graphic standard-display-g1 standard-display-ascii +;;;;;; standard-display-default standard-display-8bit describe-current-display-table +;;;;;; describe-display-table set-display-table-slot display-table-slot +;;;;;; make-display-table) "disp-table" "disp-table.el" (16286 45076)) +;;; Generated autoloads from disp-table.el + +(autoload (quote make-display-table) "disp-table" "\ +Return a new, empty display table. + +\(fn)" nil nil) + +(autoload (quote display-table-slot) "disp-table" "\ +Return the value of the extra slot in DISPLAY-TABLE named SLOT. +SLOT may be a number from 0 to 5 inclusive, or a slot name (symbol). +Valid symbols are `truncation', `wrap', `escape', `control', +`selective-display', and `vertical-border'. + +\(fn DISPLAY-TABLE SLOT)" nil nil) + +(autoload (quote set-display-table-slot) "disp-table" "\ +Set the value of the extra slot in DISPLAY-TABLE named SLOT to VALUE. +SLOT may be a number from 0 to 5 inclusive, or a name (symbol). +Valid symbols are `truncation', `wrap', `escape', `control', +`selective-display', and `vertical-border'. + +\(fn DISPLAY-TABLE SLOT VALUE)" nil nil) + +(autoload (quote describe-display-table) "disp-table" "\ +Describe the display table DT in a help buffer. + +\(fn DT)" nil nil) + +(autoload (quote describe-current-display-table) "disp-table" "\ +Describe the display table in use in the selected window and buffer. + +\(fn)" t nil) + +(autoload (quote standard-display-8bit) "disp-table" "\ +Display characters in the range L to H literally. + +\(fn L H)" nil nil) + +(autoload (quote standard-display-default) "disp-table" "\ +Display characters in the range L to H using the default notation. + +\(fn L H)" nil nil) + +(autoload (quote standard-display-ascii) "disp-table" "\ +Display character C using printable string S. + +\(fn C S)" nil nil) + +(autoload (quote standard-display-g1) "disp-table" "\ +Display character C as character SC in the g1 character set. +This function assumes that your terminal uses the SO/SI characters; +it is meaningless for an X frame. + +\(fn C SC)" nil nil) + +(autoload (quote standard-display-graphic) "disp-table" "\ +Display character C as character GC in graphics character set. +This function assumes VT100-compatible escapes; it is meaningless for an +X frame. + +\(fn C GC)" nil nil) + +(autoload (quote standard-display-underline) "disp-table" "\ +Display character C as character UC plus underlining. + +\(fn C UC)" nil nil) + +(autoload (quote create-glyph) "disp-table" "\ +Allocate a glyph code to display by sending STRING to the terminal. + +\(fn STRING)" nil nil) + +(autoload (quote standard-display-european) "disp-table" "\ +Semi-obsolete way to toggle display of ISO 8859 European characters. + +This function is semi-obsolete; if you want to do your editing with +unibyte characters, it is better to `set-language-environment' coupled +with either the `--unibyte' option or the EMACS_UNIBYTE environment +variable, or else customize `enable-multibyte-characters'. + +With prefix argument, this command enables European character display +if arg is positive, disables it otherwise. Otherwise, it toggles +European character display. + +When this mode is enabled, characters in the range of 160 to 255 +display not as octal escapes, but as accented characters. Codes 146 +and 160 display as apostrophe and space, even though they are not the +ASCII codes for apostrophe and space. + +Enabling European character display with this command noninteractively +from Lisp code also selects Latin-1 as the language environment, and +selects unibyte mode for all Emacs buffers (both existing buffers and +those created subsequently). This provides increased compatibility +for users who call this function in `.emacs'. + +\(fn ARG)" nil nil) + +;;;*** + +;;;### (autoloads (dissociated-press) "dissociate" "play/dissociate.el" +;;;;;; (16211 27038)) +;;; Generated autoloads from play/dissociate.el + +(autoload (quote dissociated-press) "dissociate" "\ +Dissociate the text of the current buffer. +Output goes in buffer named *Dissociation*, +which is redisplayed each time text is added to it. +Every so often the user must say whether to continue. +If ARG is positive, require ARG chars of continuity. +If ARG is negative, require -ARG words of continuity. +Default is 2. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (doctor) "doctor" "play/doctor.el" (16211 27038)) +;;; Generated autoloads from play/doctor.el + +(autoload (quote doctor) "doctor" "\ +Switch to *doctor* buffer and start giving psychotherapy. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (double-mode double-mode) "double" "double.el" +;;;;;; (16211 27015)) +;;; Generated autoloads from double.el + +(defvar double-mode nil "\ +Toggle Double mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `double-mode'.") + +(custom-autoload (quote double-mode) "double") + +(autoload (quote double-mode) "double" "\ +Toggle Double mode. +With prefix arg, turn Double mode on iff arg is positive. + +When Double mode is on, some keys will insert different strings +when pressed twice. See variable `double-map' for details. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (16211 27038)) +;;; Generated autoloads from play/dunnet.el + +(autoload (quote dunnet) "dunnet" "\ +Switch to *dungeon* buffer and start game. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (gnus-earcon-display) "earcon" "gnus/earcon.el" +;;;;;; (16211 27027)) +;;; Generated autoloads from gnus/earcon.el + +(autoload (quote gnus-earcon-display) "earcon" "\ +Play sounds in message buffers. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (easy-mmode-defsyntax easy-mmode-defmap easy-mmode-define-keymap +;;;;;; easy-mmode-define-global-mode define-minor-mode) "easy-mmode" +;;;;;; "emacs-lisp/easy-mmode.el" (16309 31935)) +;;; Generated autoloads from emacs-lisp/easy-mmode.el + +(defalias (quote easy-mmode-define-minor-mode) (quote define-minor-mode)) + +(autoload (quote define-minor-mode) "easy-mmode" "\ +Define a new minor mode MODE. +This function defines the associated control variable MODE, keymap MODE-map, +toggle command MODE, and hook MODE-hook. + +DOC is the documentation for the mode toggle command. +Optional INIT-VALUE is the initial value of the mode's variable. +Optional LIGHTER is displayed in the modeline when the mode is on. +Optional KEYMAP is the default (defvar) keymap bound to the mode keymap. + If it is a list, it is passed to `easy-mmode-define-keymap' + in order to build a valid keymap. It's generally better to use + a separate MODE-map variable than to use this argument. +The above three arguments can be skipped if keyword arguments are +used (see below). + +BODY contains code that will be executed each time the mode is (dis)activated. + It will be executed after any toggling but before running the hooks. + 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): +:group GROUP Custom group name to use in all generated `defcustom' forms. +:global GLOBAL If non-nil specifies that the minor mode is not meant to be + buffer-local, so don't make the variable MODE buffer-local. + By default, the mode is buffer-local. +:init-value VAL Same as the INIT-VALUE argument. +:lighter SPEC Same as the LIGHTER argument. +:keymap MAP Same as the KEYMAP argument. +:require SYM Same as in `defcustom'. + +For example, you could write + (define-minor-mode foo-mode \"If enabled, foo on you!\" + :lighter \" Foo\" :require 'foo :global t :group 'hassle :version \"27.5\" + ...BODY CODE...) + +\(fn MODE DOC &optional INIT-VALUE LIGHTER KEYMAP &rest BODY)" nil (quote macro)) + +(autoload (quote easy-mmode-define-global-mode) "easy-mmode" "\ +Make GLOBAL-MODE out of the buffer-local minor MODE. +TURN-ON is a function that will be called with no args in every buffer + and that should try to turn MODE on if applicable for that buffer. +KEYS is a list of CL-style keyword arguments: +:group to specify the custom group. + +\(fn GLOBAL-MODE MODE TURN-ON &rest KEYS)" nil (quote macro)) + +(autoload (quote easy-mmode-define-keymap) "easy-mmode" "\ +Return a keymap built from bindings BS. +BS must be a list of (KEY . BINDING) where +KEY and BINDINGS are suitable for `define-key'. +Optional NAME is passed to `make-sparse-keymap'. +Optional map M can be used to modify an existing map. +ARGS is a list of additional keyword arguments. + +\(fn BS &optional NAME M ARGS)" nil nil) + +(autoload (quote easy-mmode-defmap) "easy-mmode" "\ +Not documented + +\(fn M BS DOC &rest ARGS)" nil (quote macro)) + +(autoload (quote easy-mmode-defsyntax) "easy-mmode" "\ +Define variable ST as a syntax-table. +CSS contains a list of syntax specifications of the form (CHAR . SYNTAX). + +\(fn ST CSS DOC &rest ARGS)" nil (quote macro)) + +;;;*** + +;;;### (autoloads (easy-menu-change easy-menu-create-menu easy-menu-do-define +;;;;;; easy-menu-define) "easymenu" "emacs-lisp/easymenu.el" (16211 +;;;;;; 27026)) +;;; Generated autoloads from emacs-lisp/easymenu.el + +(put (quote easy-menu-define) (quote lisp-indent-function) (quote defun)) + +(autoload (quote easy-menu-define) "easymenu" "\ +Define a menu bar submenu in maps MAPS, according to MENU. + +If SYMBOL is non-nil, store the menu keymap in the value of SYMBOL, +and define SYMBOL as a function to pop up the menu, with DOC as its doc string. +If SYMBOL is nil, just store the menu keymap into MAPS. + +The first element of MENU must be a string. It is the menu bar item name. +It may be followed by the following keyword argument pairs + + :filter FUNCTION + +FUNCTION is a function with one argument, the menu. It returns the actual +menu displayed. + + :visible INCLUDE + +INCLUDE is an expression; this menu is only visible if this +expression has a non-nil value. `:include' is an alias for `:visible'. + + :active ENABLE + +ENABLE is an expression; the menu is enabled for selection +whenever this expression's value is non-nil. + +The rest of the elements in MENU, are menu items. + +A menu item is usually a vector of three elements: [NAME CALLBACK ENABLE] + +NAME is a string--the menu item name. + +CALLBACK is a command to run when the item is chosen, +or a list to evaluate when the item is chosen. + +ENABLE is an expression; the item is enabled for selection +whenever this expression's value is non-nil. + +Alternatively, a menu item may have the form: + + [ NAME CALLBACK [ KEYWORD ARG ] ... ] + +Where KEYWORD is one of the symbols defined below. + + :keys KEYS + +KEYS is a string; a complex keyboard equivalent to this menu item. +This is normally not needed because keyboard equivalents are usually +computed automatically. +KEYS is expanded with `substitute-command-keys' before it is used. + + :key-sequence KEYS + +KEYS is nil, a string or a vector; nil or a keyboard equivalent to this +menu item. +This is a hint that will considerably speed up Emacs' first display of +a menu. Use `:key-sequence nil' when you know that this menu item has no +keyboard equivalent. + + :active ENABLE + +ENABLE is an expression; the item is enabled for selection +whenever this expression's value is non-nil. + + :included INCLUDE + +INCLUDE is an expression; this item is only visible if this +expression has a non-nil value. + + :suffix FORM + +FORM is an expression that will be dynamically evaluated and whose +value will be concatenated to the menu entry's NAME. + + :style STYLE + +STYLE is a symbol describing the type of menu item. The following are +defined: + +toggle: A checkbox. + Prepend the name with `(*) ' or `( ) ' depending on if selected or not. +radio: A radio button. + Prepend the name with `[X] ' or `[ ] ' depending on if selected or not. +button: Surround the name with `[' and `]'. Use this for an item in the + menu bar itself. +anything else means an ordinary menu item. + + :selected SELECTED + +SELECTED is an expression; the checkbox or radio button is selected +whenever this expression's value is non-nil. + + :help HELP + +HELP is a string, the help to display for the menu item. + +A menu item can be a string. Then that string appears in the menu as +unselectable text. A string consisting solely of hyphens is displayed +as a solid horizontal line. + +A menu item can be a list with the same format as MENU. This is a submenu. + +\(fn SYMBOL MAPS DOC MENU)" nil (quote macro)) + +(autoload (quote easy-menu-do-define) "easymenu" "\ +Not documented + +\(fn SYMBOL MAPS DOC MENU)" nil nil) + +(autoload (quote easy-menu-create-menu) "easymenu" "\ +Create a menu called MENU-NAME with items described in MENU-ITEMS. +MENU-NAME is a string, the name of the menu. MENU-ITEMS is a list of items +possibly preceded by keyword pairs as described in `easy-menu-define'. + +\(fn MENU-NAME MENU-ITEMS)" nil nil) + +(autoload (quote easy-menu-change) "easymenu" "\ +Change menu found at PATH as item NAME to contain ITEMS. +PATH is a list of strings for locating the menu that +should contain a submenu named NAME. +ITEMS is a list of menu items, as in `easy-menu-define'. +These items entirely replace the previous items in that submenu. + +If the menu located by PATH has no submenu named NAME, add one. +If the optional argument BEFORE is present, add it just before +the submenu named BEFORE, otherwise add it at the end of the menu. + +Either call this from `menu-bar-update-hook' or use a menu filter, +to implement dynamic menus. + +\(fn PATH NAME ITEMS &optional BEFORE)" nil nil) + +;;;*** + +;;;### (autoloads (ebnf-pop-style ebnf-push-style ebnf-reset-style +;;;;;; ebnf-apply-style ebnf-merge-style ebnf-insert-style ebnf-setup +;;;;;; ebnf-syntax-region ebnf-syntax-buffer ebnf-eps-region ebnf-eps-buffer +;;;;;; ebnf-spool-region ebnf-spool-buffer ebnf-print-region ebnf-print-buffer +;;;;;; ebnf-customize) "ebnf2ps" "progmodes/ebnf2ps.el" (16211 27039)) +;;; Generated autoloads from progmodes/ebnf2ps.el + +(autoload (quote ebnf-customize) "ebnf2ps" "\ +Customization for ebnf group. + +\(fn)" t nil) + +(autoload (quote ebnf-print-buffer) "ebnf2ps" "\ +Generate and print a PostScript syntactic chart image of the buffer. + +When called with a numeric prefix argument (C-u), prompts the user for +the name of a file to save the PostScript image in, instead of sending +it to the printer. + +More specifically, the FILENAME argument is treated as follows: if it +is nil, send the image to the printer. If FILENAME is a string, save +the PostScript image in a file with that name. If FILENAME is a +number, prompt the user for the name of the file to save in. + +\(fn &optional FILENAME)" t nil) + +(autoload (quote ebnf-print-region) "ebnf2ps" "\ +Generate and print a PostScript syntactic chart image of the region. +Like `ebnf-print-buffer', but prints just the current region. + +\(fn FROM TO &optional FILENAME)" t nil) + +(autoload (quote ebnf-spool-buffer) "ebnf2ps" "\ +Generate and spool a PostScript syntactic chart image of the buffer. +Like `ebnf-print-buffer' except that the PostScript image is saved in a +local buffer to be sent to the printer later. + +Use the command `ebnf-despool' to send the spooled images to the printer. + +\(fn)" t nil) + +(autoload (quote ebnf-spool-region) "ebnf2ps" "\ +Generate a PostScript syntactic chart image of the region and spool locally. +Like `ebnf-spool-buffer', but spools just the current region. + +Use the command `ebnf-despool' to send the spooled images to the printer. + +\(fn FROM TO)" t nil) + +(autoload (quote ebnf-eps-buffer) "ebnf2ps" "\ +Generate a PostScript syntactic chart image of the buffer in a EPS file. + +Indeed, for each production is generated a EPS file. +The EPS file name has the following form: + + .eps + + is given by variable `ebnf-eps-prefix'. + The default value is \"ebnf--\". + + is the production name. + The production name is mapped to form a valid file name. + For example, the production name \"A/B + C\" is mapped to + \"A_B_+_C\" and the EPS file name used is \"ebnf--A_B_+_C.eps\". + +WARNING: It's *NOT* asked any confirmation to override an existing file. + +\(fn)" t nil) + +(autoload (quote ebnf-eps-region) "ebnf2ps" "\ +Generate a PostScript syntactic chart image of the region in a EPS file. + +Indeed, for each production is generated a EPS file. +The EPS file name has the following form: + + .eps + + is given by variable `ebnf-eps-prefix'. + The default value is \"ebnf--\". + + is the production name. + The production name is mapped to form a valid file name. + For example, the production name \"A/B + C\" is mapped to + \"A_B_+_C\" and the EPS file name used is \"ebnf--A_B_+_C.eps\". + +WARNING: It's *NOT* asked any confirmation to override an existing file. + +\(fn FROM TO)" t nil) + +(defalias (quote ebnf-despool) (quote ps-despool)) + +(autoload (quote ebnf-syntax-buffer) "ebnf2ps" "\ +Does a syntactic analysis of the current buffer. + +\(fn)" t nil) + +(autoload (quote ebnf-syntax-region) "ebnf2ps" "\ +Does a syntactic analysis of a region. + +\(fn FROM TO)" t nil) + +(autoload (quote ebnf-setup) "ebnf2ps" "\ +Return the current ebnf2ps setup. + +\(fn)" nil nil) + +(autoload (quote ebnf-insert-style) "ebnf2ps" "\ +Insert a new style NAME with inheritance INHERITS and values VALUES. + +\(fn NAME INHERITS &rest VALUES)" t nil) + +(autoload (quote ebnf-merge-style) "ebnf2ps" "\ +Merge values of style NAME with style VALUES. + +\(fn NAME &rest VALUES)" t nil) + +(autoload (quote ebnf-apply-style) "ebnf2ps" "\ +Set STYLE to current style. + +It returns the old style symbol. + +\(fn STYLE)" t nil) + +(autoload (quote ebnf-reset-style) "ebnf2ps" "\ +Reset current style. + +It returns the old style symbol. + +\(fn &optional STYLE)" t nil) + +(autoload (quote ebnf-push-style) "ebnf2ps" "\ +Push the current style and set STYLE to current style. + +It returns the old style symbol. + +\(fn &optional STYLE)" t nil) + +(autoload (quote ebnf-pop-style) "ebnf2ps" "\ +Pop a style and set it to current style. + +It returns the old style symbol. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (ebrowse-statistics ebrowse-save-tree-as ebrowse-save-tree +;;;;;; ebrowse-electric-position-menu ebrowse-forward-in-position-stack +;;;;;; ebrowse-back-in-position-stack ebrowse-tags-search-member-use +;;;;;; ebrowse-tags-query-replace ebrowse-tags-search ebrowse-tags-loop-continue +;;;;;; ebrowse-tags-complete-symbol ebrowse-tags-find-definition-other-frame +;;;;;; ebrowse-tags-view-definition-other-frame ebrowse-tags-find-declaration-other-frame +;;;;;; ebrowse-tags-find-definition-other-window ebrowse-tags-view-definition-other-window +;;;;;; ebrowse-tags-find-declaration-other-window ebrowse-tags-find-definition +;;;;;; ebrowse-tags-view-definition ebrowse-tags-find-declaration +;;;;;; ebrowse-tags-view-declaration ebrowse-member-mode ebrowse-electric-choose-tree +;;;;;; ebrowse-tree-mode) "ebrowse" "progmodes/ebrowse.el" (16233 +;;;;;; 59013)) +;;; Generated autoloads from progmodes/ebrowse.el + +(autoload (quote ebrowse-tree-mode) "ebrowse" "\ +Major mode for Ebrowse class tree buffers. +Each line corresponds to a class in a class tree. +Letters do not insert themselves, they are commands. +File operations in the tree buffer work on class tree data structures. +E.g.\\[save-buffer] writes the tree to the file it was loaded from. + +Tree mode key bindings: +\\{ebrowse-tree-mode-map} + +\(fn)" t nil) + +(autoload (quote ebrowse-electric-choose-tree) "ebrowse" "\ +Return a buffer containing a tree or nil if no tree found or canceled. + +\(fn)" t nil) + +(autoload (quote ebrowse-member-mode) "ebrowse" "\ +Major mode for Ebrowse member buffers. + +\\{ebrowse-member-mode-map} + +\(fn)" nil nil) + +(autoload (quote ebrowse-tags-view-declaration) "ebrowse" "\ +View declaration of member at point. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-find-declaration) "ebrowse" "\ +Find declaration of member at point. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-view-definition) "ebrowse" "\ +View definition of member at point. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-find-definition) "ebrowse" "\ +Find definition of member at point. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-find-declaration-other-window) "ebrowse" "\ +Find declaration of member at point in other window. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-view-definition-other-window) "ebrowse" "\ +View definition of member at point in other window. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-find-definition-other-window) "ebrowse" "\ +Find definition of member at point in other window. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-find-declaration-other-frame) "ebrowse" "\ +Find definition of member at point in other frame. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-view-definition-other-frame) "ebrowse" "\ +View definition of member at point in other frame. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-find-definition-other-frame) "ebrowse" "\ +Find definition of member at point in other frame. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-complete-symbol) "ebrowse" "\ +Perform completion on the C++ symbol preceding point. +A second call of this function without changing point inserts the next match. +A call with prefix PREFIX reads the symbol to insert from the minibuffer with +completion. + +\(fn PREFIX)" t nil) + +(autoload (quote ebrowse-tags-loop-continue) "ebrowse" "\ +Repeat last operation on files in tree. +FIRST-TIME non-nil means this is not a repetition, but the first time. +TREE-BUFFER if indirectly specifies which files to loop over. + +\(fn &optional FIRST-TIME TREE-BUFFER)" t nil) + +(autoload (quote ebrowse-tags-search) "ebrowse" "\ +Search for REGEXP in all files in a tree. +If marked classes exist, process marked classes, only. +If regular expression is nil, repeat last search. + +\(fn REGEXP)" t nil) + +(autoload (quote ebrowse-tags-query-replace) "ebrowse" "\ +Query replace FROM with TO in all files of a class tree. +With prefix arg, process files of marked classes only. + +\(fn FROM TO)" t nil) + +(autoload (quote ebrowse-tags-search-member-use) "ebrowse" "\ +Search for call sites of a member. +If FIX-NAME is specified, search uses of that member. +Otherwise, read a member name from the minibuffer. +Searches in all files mentioned in a class tree for something that +looks like a function call to the member. + +\(fn &optional FIX-NAME)" t nil) + +(autoload (quote ebrowse-back-in-position-stack) "ebrowse" "\ +Move backward in the position stack. +Prefix arg ARG says how much. + +\(fn ARG)" t nil) + +(autoload (quote ebrowse-forward-in-position-stack) "ebrowse" "\ +Move forward in the position stack. +Prefix arg ARG says how much. + +\(fn ARG)" t nil) + +(autoload (quote ebrowse-electric-position-menu) "ebrowse" "\ +List positions in the position stack in an electric buffer. + +\(fn)" t nil) + +(autoload (quote ebrowse-save-tree) "ebrowse" "\ +Save current tree in same file it was loaded from. + +\(fn)" t nil) + +(autoload (quote ebrowse-save-tree-as) "ebrowse" "\ +Write the current tree data structure to a file. +Read the file name from the minibuffer if interactive. +Otherwise, FILE-NAME specifies the file to save the tree in. + +\(fn &optional FILE-NAME)" t nil) + +(autoload (quote ebrowse-statistics) "ebrowse" "\ +Display statistics for a class tree. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (electric-buffer-list) "ebuff-menu" "ebuff-menu.el" +;;;;;; (16211 27015)) +;;; Generated autoloads from ebuff-menu.el + +(autoload (quote electric-buffer-list) "ebuff-menu" "\ +Pops up a buffer describing the set of Emacs buffers. +Vaguely like ITS lunar select buffer; combining typeoutoid buffer +listing with menuoid buffer selection. + +If the very next character typed is a space then the buffer list +window disappears. Otherwise, one may move around in the buffer list +window, marking buffers to be selected, saved or deleted. + +To exit and select a new buffer, type a space when the cursor is on +the appropriate line of the buffer-list window. Other commands are +much like those of buffer-menu-mode. + +Calls value of `electric-buffer-menu-mode-hook' on entry if non-nil. + +\\{electric-buffer-menu-mode-map} + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (Electric-command-history-redo-expression) "echistory" +;;;;;; "echistory.el" (16211 27015)) +;;; Generated autoloads from echistory.el + +(autoload (quote Electric-command-history-redo-expression) "echistory" "\ +Edit current history line in minibuffer and execute result. +With prefix arg NOCONFIRM, execute current line as-is without editing. + +\(fn &optional NOCONFIRM)" t nil) + +;;;*** + +;;;### (autoloads (edebug-eval-top-level-form def-edebug-spec edebug-all-forms +;;;;;; edebug-all-defs) "edebug" "emacs-lisp/edebug.el" (16277 42320)) +;;; Generated autoloads from emacs-lisp/edebug.el + +(defvar edebug-all-defs nil "\ +*If non-nil, evaluation of any defining forms will instrument for Edebug. +This applies to `eval-defun', `eval-region', `eval-buffer', and +`eval-current-buffer'. `eval-region' is also called by +`eval-last-sexp', and `eval-print-last-sexp'. + +You can use the command `edebug-all-defs' to toggle the value of this +variable. You may wish to make it local to each buffer with +\(make-local-variable 'edebug-all-defs) in your +`emacs-lisp-mode-hook'.") + +(custom-autoload (quote edebug-all-defs) "edebug") + +(defvar edebug-all-forms nil "\ +*Non-nil evaluation of all forms will instrument for Edebug. +This doesn't apply to loading or evaluations in the minibuffer. +Use the command `edebug-all-forms' to toggle the value of this option.") + +(custom-autoload (quote edebug-all-forms) "edebug") + +(autoload (quote def-edebug-spec) "edebug" "\ +Set the `edebug-form-spec' property of SYMBOL according to SPEC. +Both SYMBOL and SPEC are unevaluated. The SPEC can be 0, t, a symbol +\(naming a function), or a list. + +\(fn SYMBOL SPEC)" nil (quote macro)) + +(defalias (quote edebug-defun) (quote edebug-eval-top-level-form)) + +(autoload (quote edebug-eval-top-level-form) "edebug" "\ +Evaluate the top level form point is in, stepping through with Edebug. +This is like `eval-defun' except that it steps the code for Edebug +before evaluating it. It displays the value in the echo area +using `eval-expression' (which see). + +If you do this on a function definition +such as a defun or defmacro, it defines the function and instruments +its definition for Edebug, so it will do Edebug stepping when called +later. It displays `Edebug: FUNCTION' in the echo area to indicate +that FUNCTION is now instrumented for Edebug. + +If the current defun is actually a call to `defvar' or `defcustom', +evaluating it this way resets the variable using its initial value +expression even if the variable already has some other value. +\(Normally `defvar' and `defcustom' do not alter the value if there +already is one.) + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (ediff-documentation ediff-version ediff-revision +;;;;;; ediff-patch-buffer ediff-patch-file run-ediff-from-cvs-buffer +;;;;;; ediff-merge-revisions-with-ancestor ediff-merge-revisions +;;;;;; ediff-merge-buffers-with-ancestor ediff-merge-buffers ediff-merge-files-with-ancestor +;;;;;; ediff-merge-files ediff-regions-linewise ediff-regions-wordwise +;;;;;; ediff-windows-linewise ediff-windows-wordwise ediff-merge-directory-revisions-with-ancestor +;;;;;; ediff-merge-directory-revisions ediff-merge-directories-with-ancestor +;;;;;; ediff-merge-directories ediff-directories3 ediff-directory-revisions +;;;;;; ediff-directories ediff-buffers3 ediff-buffers ediff-backup +;;;;;; ediff-files3 ediff-files) "ediff" "ediff.el" (16271 3439)) +;;; Generated autoloads from ediff.el + +(autoload (quote ediff-files) "ediff" "\ +Run Ediff on a pair of files, FILE-A and FILE-B. + +\(fn FILE-A FILE-B &optional STARTUP-HOOKS)" t nil) + +(autoload (quote ediff-files3) "ediff" "\ +Run Ediff on three files, FILE-A, FILE-B, and FILE-C. + +\(fn FILE-A FILE-B FILE-C &optional STARTUP-HOOKS)" t nil) + +(defalias (quote ediff3) (quote ediff-files3)) + +(defalias (quote ediff) (quote ediff-files)) + +(autoload (quote ediff-backup) "ediff" "\ +Run Ediff on FILE and its backup file. +Uses the latest backup, if there are several numerical backups. +If this file is a backup, `ediff' it with its original. + +\(fn FILE)" t nil) + +(autoload (quote ediff-buffers) "ediff" "\ +Run Ediff on a pair of buffers, BUFFER-A and BUFFER-B. + +\(fn BUFFER-A BUFFER-B &optional STARTUP-HOOKS JOB-NAME)" t nil) + +(defalias (quote ebuffers) (quote ediff-buffers)) + +(autoload (quote ediff-buffers3) "ediff" "\ +Run Ediff on three buffers, BUFFER-A, BUFFER-B, and BUFFER-C. + +\(fn BUFFER-A BUFFER-B BUFFER-C &optional STARTUP-HOOKS JOB-NAME)" t nil) + +(defalias (quote ebuffers3) (quote ediff-buffers3)) + +(autoload (quote ediff-directories) "ediff" "\ +Run Ediff on a pair of directories, DIR1 and DIR2, comparing files that have +the same name in both. The third argument, REGEXP, is nil or a regular +expression; only file names that match the regexp are considered. + +\(fn DIR1 DIR2 REGEXP)" t nil) + +(defalias (quote edirs) (quote ediff-directories)) + +(autoload (quote ediff-directory-revisions) "ediff" "\ +Run Ediff on a directory, DIR1, comparing its files with their revisions. +The second argument, REGEXP, is a regular expression that filters the file +names. Only the files that are under revision control are taken into account. + +\(fn DIR1 REGEXP)" t nil) + +(defalias (quote edir-revisions) (quote ediff-directory-revisions)) + +(autoload (quote ediff-directories3) "ediff" "\ +Run Ediff on three directories, DIR1, DIR2, and DIR3, comparing files that +have the same name in all three. The last argument, REGEXP, is nil or a +regular expression; only file names that match the regexp are considered. + +\(fn DIR1 DIR2 DIR3 REGEXP)" t nil) + +(defalias (quote edirs3) (quote ediff-directories3)) + +(autoload (quote ediff-merge-directories) "ediff" "\ +Run Ediff on a pair of directories, DIR1 and DIR2, merging files that have +the same name in both. The third argument, REGEXP, is nil or a regular +expression; only file names that match the regexp are considered. + +\(fn DIR1 DIR2 REGEXP &optional MERGE-AUTOSTORE-DIR)" t nil) + +(defalias (quote edirs-merge) (quote ediff-merge-directories)) + +(autoload (quote ediff-merge-directories-with-ancestor) "ediff" "\ +Merge files in directories DIR1 and DIR2 using files in ANCESTOR-DIR as ancestors. +Ediff merges files that have identical names in DIR1, DIR2. If a pair of files +in DIR1 and DIR2 doesn't have an ancestor in ANCESTOR-DIR, Ediff will merge +without ancestor. The fourth argument, REGEXP, is nil or a regular expression; +only file names that match the regexp are considered. + +\(fn DIR1 DIR2 ANCESTOR-DIR REGEXP &optional MERGE-AUTOSTORE-DIR)" t nil) + +(autoload (quote ediff-merge-directory-revisions) "ediff" "\ +Run Ediff on a directory, DIR1, merging its files with their revisions. +The second argument, REGEXP, is a regular expression that filters the file +names. Only the files that are under revision control are taken into account. + +\(fn DIR1 REGEXP &optional MERGE-AUTOSTORE-DIR)" t nil) + +(defalias (quote edir-merge-revisions) (quote ediff-merge-directory-revisions)) + +(autoload (quote ediff-merge-directory-revisions-with-ancestor) "ediff" "\ +Run Ediff on a directory, DIR1, merging its files with their revisions and ancestors. +The second argument, REGEXP, is a regular expression that filters the file +names. Only the files that are under revision control are taken into account. + +\(fn DIR1 REGEXP &optional MERGE-AUTOSTORE-DIR)" t nil) + +(defalias (quote edir-merge-revisions-with-ancestor) (quote ediff-merge-directory-revisions-with-ancestor)) + +(defalias (quote edirs-merge-with-ancestor) (quote ediff-merge-directories-with-ancestor)) + +(autoload (quote ediff-windows-wordwise) "ediff" "\ +Compare WIND-A and WIND-B, which are selected by clicking, wordwise. +With prefix argument, DUMB-MODE, or on a non-windowing display, works as +follows: +If WIND-A is nil, use selected window. +If WIND-B is nil, use window next to WIND-A. + +\(fn DUMB-MODE &optional WIND-A WIND-B STARTUP-HOOKS)" t nil) + +(autoload (quote ediff-windows-linewise) "ediff" "\ +Compare WIND-A and WIND-B, which are selected by clicking, linewise. +With prefix argument, DUMB-MODE, or on a non-windowing display, works as +follows: +If WIND-A is nil, use selected window. +If WIND-B is nil, use window next to WIND-A. + +\(fn DUMB-MODE &optional WIND-A WIND-B STARTUP-HOOKS)" t nil) + +(autoload (quote ediff-regions-wordwise) "ediff" "\ +Run Ediff on a pair of regions in specified buffers. +Regions (i.e., point and mark) are assumed to be set in advance except +for the second region in the case both regions are from the same buffer. +In such a case the user is asked to interactively establish the second +region. +This function is effective only for relatively small regions, up to 200 +lines. For large regions, use `ediff-regions-linewise'. + +\(fn BUFFER-A BUFFER-B &optional STARTUP-HOOKS)" t nil) + +(autoload (quote ediff-regions-linewise) "ediff" "\ +Run Ediff on a pair of regions in specified buffers. +Regions (i.e., point and mark) are assumed to be set in advance except +for the second region in the case both regions are from the same buffer. +In such a case the user is asked to interactively establish the second +region. +Each region is enlarged to contain full lines. +This function is effective for large regions, over 100-200 +lines. For small regions, use `ediff-regions-wordwise'. + +\(fn BUFFER-A BUFFER-B &optional STARTUP-HOOKS)" t nil) + +(defalias (quote ediff-merge) (quote ediff-merge-files)) + +(autoload (quote ediff-merge-files) "ediff" "\ +Merge two files without ancestor. + +\(fn FILE-A FILE-B &optional STARTUP-HOOKS MERGE-BUFFER-FILE)" t nil) + +(autoload (quote ediff-merge-files-with-ancestor) "ediff" "\ +Merge two files with ancestor. + +\(fn FILE-A FILE-B FILE-ANCESTOR &optional STARTUP-HOOKS MERGE-BUFFER-FILE)" t nil) + +(defalias (quote ediff-merge-with-ancestor) (quote ediff-merge-files-with-ancestor)) + +(autoload (quote ediff-merge-buffers) "ediff" "\ +Merge buffers without ancestor. + +\(fn BUFFER-A BUFFER-B &optional STARTUP-HOOKS JOB-NAME MERGE-BUFFER-FILE)" t nil) + +(autoload (quote ediff-merge-buffers-with-ancestor) "ediff" "\ +Merge buffers with ancestor. + +\(fn BUFFER-A BUFFER-B BUFFER-ANCESTOR &optional STARTUP-HOOKS JOB-NAME MERGE-BUFFER-FILE)" t nil) + +(autoload (quote ediff-merge-revisions) "ediff" "\ +Run Ediff by merging two revisions of a file. +The file is the optional FILE argument or the file visited by the current +buffer. + +\(fn &optional FILE STARTUP-HOOKS MERGE-BUFFER-FILE)" t nil) + +(autoload (quote ediff-merge-revisions-with-ancestor) "ediff" "\ +Run Ediff by merging two revisions of a file with a common ancestor. +The file is the optional FILE argument or the file visited by the current +buffer. + +\(fn &optional FILE STARTUP-HOOKS MERGE-BUFFER-FILE)" t nil) + +(autoload (quote run-ediff-from-cvs-buffer) "ediff" "\ +Run Ediff-merge on appropriate revisions of the selected file. +First run after `M-x cvs-update'. Then place the cursor on a line describing a +file and then run `run-ediff-from-cvs-buffer'. + +\(fn POS)" t nil) + +(autoload (quote ediff-patch-file) "ediff" "\ +Run Ediff by patching SOURCE-FILENAME. +If optional PATCH-BUF is given, use the patch in that buffer +and don't ask the user. +If prefix argument, then: if even argument, assume that the patch is in a +buffer. If odd -- assume it is in a file. + +\(fn &optional ARG PATCH-BUF)" t nil) + +(autoload (quote ediff-patch-buffer) "ediff" "\ +Run Ediff by patching BUFFER-NAME. +Without prefix argument: asks if the patch is in some buffer and prompts for +the buffer or a file, depending on the answer. +With prefix arg=1: assumes the patch is in a file and prompts for the file. +With prefix arg=2: assumes the patch is in a buffer and prompts for the buffer. + +\(fn &optional ARG PATCH-BUF)" t nil) + +(defalias (quote epatch) (quote ediff-patch-file)) + +(defalias (quote epatch-buffer) (quote ediff-patch-buffer)) + +(autoload (quote ediff-revision) "ediff" "\ +Run Ediff by comparing versions of a file. +The file is an optional FILE argument or the file entered at the prompt. +Default: the file visited by the current buffer. +Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'. + +\(fn &optional FILE STARTUP-HOOKS)" t nil) + +(defalias (quote erevision) (quote ediff-revision)) + +(autoload (quote ediff-version) "ediff" "\ +Return string describing the version of Ediff. +When called interactively, displays the version. + +\(fn)" t nil) + +(autoload (quote ediff-documentation) "ediff" "\ +Display Ediff's manual. +With optional NODE, goes to that node. + +\(fn &optional NODE)" t nil) + +;;;*** + +;;;### (autoloads (ediff-customize) "ediff-help" "ediff-help.el" +;;;;;; (16211 27015)) +;;; Generated autoloads from ediff-help.el + +(autoload (quote ediff-customize) "ediff-help" "\ +Not documented + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "ediff-hook" "ediff-hook.el" (16211 27015)) +;;; Generated autoloads from ediff-hook.el + +(defvar ediff-window-setup-function) + (defmacro ediff-cond-compile-for-xemacs-or-emacs (xemacs-form emacs-form) (if (string-match "XEmacs" emacs-version) xemacs-form emacs-form)) + +(ediff-cond-compile-for-xemacs-or-emacs (defun ediff-xemacs-init-menus nil (if (featurep (quote menubar)) (progn (add-submenu (quote ("Tools")) ediff-menu "OO-Browser...") (add-submenu (quote ("Tools")) ediff-merge-menu "OO-Browser...") (add-submenu (quote ("Tools")) epatch-menu "OO-Browser...") (add-submenu (quote ("Tools")) ediff-misc-menu "OO-Browser...") (add-menu-button (quote ("Tools")) "-------" "OO-Browser...")))) nil) + +(ediff-cond-compile-for-xemacs-or-emacs (progn (defvar ediff-menu (quote ("Compare" ["Two Files..." ediff-files t] ["Two Buffers..." ediff-buffers t] ["Three Files..." ediff-files3 t] ["Three Buffers..." ediff-buffers3 t] "---" ["Two Directories..." ediff-directories t] ["Three Directories..." ediff-directories3 t] "---" ["File with Revision..." ediff-revision t] ["Directory Revisions..." ediff-directory-revisions t] "---" ["Windows Word-by-word..." ediff-windows-wordwise t] ["Windows Line-by-line..." ediff-windows-linewise t] "---" ["Regions Word-by-word..." ediff-regions-wordwise t] ["Regions Line-by-line..." ediff-regions-linewise t]))) (defvar ediff-merge-menu (quote ("Merge" ["Files..." ediff-merge-files t] ["Files with Ancestor..." ediff-merge-files-with-ancestor t] ["Buffers..." ediff-merge-buffers t] ["Buffers with Ancestor..." ediff-merge-buffers-with-ancestor t] "---" ["Directories..." ediff-merge-directories t] ["Directories with Ancestor..." ediff-merge-directories-with-ancestor t] "---" ["Revisions..." ediff-merge-revisions t] ["Revisions with Ancestor..." ediff-merge-revisions-with-ancestor t] ["Directory Revisions..." ediff-merge-directory-revisions t] ["Directory Revisions with Ancestor..." ediff-merge-directory-revisions-with-ancestor t]))) (defvar epatch-menu (quote ("Apply Patch" ["To a file..." ediff-patch-file t] ["To a buffer..." ediff-patch-buffer t]))) (defvar ediff-misc-menu (quote ("Ediff Miscellanea" ["Ediff Manual..." ediff-documentation t] ["Customize Ediff..." ediff-customize t] ["List Ediff Sessions..." ediff-show-registry t] ["Use separate frame for Ediff control buffer..." ediff-toggle-multiframe :style toggle :selected (if (and (featurep (quote ediff-util)) (boundp (quote ediff-window-setup-function))) (eq ediff-window-setup-function (quote ediff-setup-windows-multiframe)))] ["Use a toolbar with Ediff control buffer" ediff-toggle-use-toolbar :style toggle :selected (if (featurep (quote ediff-tbar)) (ediff-use-toolbar-p))]))) (if (and (featurep (quote menubar)) (not (featurep (quote infodock))) (not (featurep (quote ediff-hook)))) (ediff-xemacs-init-menus))) (if (featurep (quote menu-bar)) (progn (defvar menu-bar-ediff-misc-menu (make-sparse-keymap "Ediff Miscellanea")) (fset (quote menu-bar-ediff-misc-menu) (symbol-value (quote menu-bar-ediff-misc-menu))) (defvar menu-bar-epatch-menu (make-sparse-keymap "Apply Patch")) (fset (quote menu-bar-epatch-menu) (symbol-value (quote menu-bar-epatch-menu))) (defvar menu-bar-ediff-merge-menu (make-sparse-keymap "Merge")) (fset (quote menu-bar-ediff-merge-menu) (symbol-value (quote menu-bar-ediff-merge-menu))) (defvar menu-bar-ediff-menu (make-sparse-keymap "Compare")) (fset (quote menu-bar-ediff-menu) (symbol-value (quote menu-bar-ediff-menu))) (define-key menu-bar-ediff-menu [window] (quote ("This Window and Next Window" . compare-windows))) (define-key menu-bar-ediff-menu [ediff-windows-linewise] (quote ("Windows Line-by-line..." . ediff-windows-linewise))) (define-key menu-bar-ediff-menu [ediff-windows-wordwise] (quote ("Windows Word-by-word..." . ediff-windows-wordwise))) (define-key menu-bar-ediff-menu [separator-ediff-windows] (quote ("--"))) (define-key menu-bar-ediff-menu [ediff-regions-linewise] (quote ("Regions Line-by-line..." . ediff-regions-linewise))) (define-key menu-bar-ediff-menu [ediff-regions-wordwise] (quote ("Regions Word-by-word..." . ediff-regions-wordwise))) (define-key menu-bar-ediff-menu [separator-ediff-regions] (quote ("--"))) (define-key menu-bar-ediff-menu [ediff-dir-revision] (quote ("Directory Revisions..." . ediff-directory-revisions))) (define-key menu-bar-ediff-menu [ediff-revision] (quote ("File with Revision..." . ediff-revision))) (define-key menu-bar-ediff-menu [separator-ediff-directories] (quote ("--"))) (define-key menu-bar-ediff-menu [ediff-directories3] (quote ("Three Directories..." . ediff-directories3))) (define-key menu-bar-ediff-menu [ediff-directories] (quote ("Two Directories..." . ediff-directories))) (define-key menu-bar-ediff-menu [separator-ediff-files] (quote ("--"))) (define-key menu-bar-ediff-menu [ediff-buffers3] (quote ("Three Buffers..." . ediff-buffers3))) (define-key menu-bar-ediff-menu [ediff-files3] (quote ("Three Files..." . ediff-files3))) (define-key menu-bar-ediff-menu [ediff-buffers] (quote ("Two Buffers..." . ediff-buffers))) (define-key menu-bar-ediff-menu [ediff-files] (quote ("Two Files..." . ediff-files))) (define-key menu-bar-ediff-merge-menu [ediff-merge-dir-revisions-with-ancestor] (quote ("Directory Revisions with Ancestor..." . ediff-merge-directory-revisions-with-ancestor))) (define-key menu-bar-ediff-merge-menu [ediff-merge-dir-revisions] (quote ("Directory Revisions..." . ediff-merge-directory-revisions))) (define-key menu-bar-ediff-merge-menu [ediff-merge-revisions-with-ancestor] (quote ("Revisions with Ancestor..." . ediff-merge-revisions-with-ancestor))) (define-key menu-bar-ediff-merge-menu [ediff-merge-revisions] (quote ("Revisions..." . ediff-merge-revisions))) (define-key menu-bar-ediff-merge-menu [separator-ediff-merge] (quote ("--"))) (define-key menu-bar-ediff-merge-menu [ediff-merge-directories-with-ancestor] (quote ("Directories with Ancestor..." . ediff-merge-directories-with-ancestor))) (define-key menu-bar-ediff-merge-menu [ediff-merge-directories] (quote ("Directories..." . ediff-merge-directories))) (define-key menu-bar-ediff-merge-menu [separator-ediff-merge-dirs] (quote ("--"))) (define-key menu-bar-ediff-merge-menu [ediff-merge-buffers-with-ancestor] (quote ("Buffers with Ancestor..." . ediff-merge-buffers-with-ancestor))) (define-key menu-bar-ediff-merge-menu [ediff-merge-buffers] (quote ("Buffers..." . ediff-merge-buffers))) (define-key menu-bar-ediff-merge-menu [ediff-merge-files-with-ancestor] (quote ("Files with Ancestor..." . ediff-merge-files-with-ancestor))) (define-key menu-bar-ediff-merge-menu [ediff-merge-files] (quote ("Files..." . ediff-merge-files))) (define-key menu-bar-epatch-menu [ediff-patch-buffer] (quote ("To a Buffer..." . ediff-patch-buffer))) (define-key menu-bar-epatch-menu [ediff-patch-file] (quote ("To a File..." . ediff-patch-file))) (define-key menu-bar-ediff-misc-menu [emultiframe] (quote ("Toggle use of separate control buffer frame..." . ediff-toggle-multiframe))) (define-key menu-bar-ediff-misc-menu [eregistry] (quote ("List Ediff Sessions..." . ediff-show-registry))) (define-key menu-bar-ediff-misc-menu [ediff-cust] (quote ("Customize Ediff..." . ediff-customize))) (define-key menu-bar-ediff-misc-menu [ediff-doc] (quote ("Ediff Manual..." . ediff-documentation)))))) + +;;;*** + +;;;### (autoloads (ediff-show-registry) "ediff-mult" "ediff-mult.el" +;;;;;; (16271 3441)) +;;; Generated autoloads from ediff-mult.el + +(autoload (quote ediff-show-registry) "ediff-mult" "\ +Display Ediff's registry. + +\(fn)" t nil) + +(defalias (quote eregistry) (quote ediff-show-registry)) + +;;;*** + +;;;### (autoloads (ediff-toggle-use-toolbar ediff-toggle-multiframe) +;;;;;; "ediff-util" "ediff-util.el" (16271 3439)) +;;; Generated autoloads from ediff-util.el + +(autoload (quote ediff-toggle-multiframe) "ediff-util" "\ +Switch from multiframe display to single-frame display and back. +To change the default, set the variable `ediff-window-setup-function', +which see. + +\(fn)" t nil) + +(autoload (quote ediff-toggle-use-toolbar) "ediff-util" "\ +Enable or disable Ediff toolbar. +Works only in versions of Emacs that support toolbars. +To change the default, set the variable `ediff-use-toolbar-p', which see. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (format-kbd-macro read-kbd-macro edit-named-kbd-macro +;;;;;; edit-last-kbd-macro edit-kbd-macro) "edmacro" "edmacro.el" +;;;;;; (16211 27015)) +;;; Generated autoloads from edmacro.el + +(defvar edmacro-eight-bits nil "\ +*Non-nil if edit-kbd-macro should leave 8-bit characters intact. +Default nil means to write characters above \\177 in octal notation.") + +(autoload (quote edit-kbd-macro) "edmacro" "\ +Edit a keyboard macro. +At the prompt, type any key sequence which is bound to a keyboard macro. +Or, type `C-x e' or RET to edit the last keyboard macro, `C-h l' to edit +the last 100 keystrokes as a keyboard macro, or `M-x' to edit a macro by +its command name. +With a prefix argument, format the macro in a more concise way. + +\(fn KEYS &optional PREFIX FINISH-HOOK STORE-HOOK)" t nil) + +(autoload (quote edit-last-kbd-macro) "edmacro" "\ +Edit the most recently defined keyboard macro. + +\(fn &optional PREFIX)" t nil) + +(autoload (quote edit-named-kbd-macro) "edmacro" "\ +Edit a keyboard macro which has been given a name by `name-last-kbd-macro'. + +\(fn &optional PREFIX)" t nil) + +(autoload (quote read-kbd-macro) "edmacro" "\ +Read the region as a keyboard macro definition. +The region is interpreted as spelled-out keystrokes, e.g., \"M-x abc RET\". +See documentation for `edmacro-mode' for details. +Leading/trailing \"C-x (\" and \"C-x )\" in the text are allowed and ignored. +The resulting macro is installed as the \"current\" keyboard macro. + +In Lisp, may also be called with a single STRING argument in which case +the result is returned rather than being installed as the current macro. +The result will be a string if possible, otherwise an event vector. +Second argument NEED-VECTOR means to return an event vector always. + +\(fn START &optional END)" t nil) + +(autoload (quote format-kbd-macro) "edmacro" "\ +Return the keyboard macro MACRO as a human-readable string. +This string is suitable for passing to `read-kbd-macro'. +Second argument VERBOSE means to put one command per line with comments. +If VERBOSE is `1', put everything on one line. If VERBOSE is omitted +or nil, use a compact 80-column format. + +\(fn &optional MACRO VERBOSE)" nil nil) + +;;;*** + +;;;### (autoloads (edt-emulation-on edt-set-scroll-margins) "edt" +;;;;;; "emulation/edt.el" (16211 27026)) +;;; Generated autoloads from emulation/edt.el + +(autoload (quote edt-set-scroll-margins) "edt" "\ +Set scroll margins. +Argument TOP is the top margin in number of lines or percent of window. +Argument BOTTOM is the bottom margin in number of lines or percent of window. + +\(fn TOP BOTTOM)" t nil) + +(autoload (quote edt-emulation-on) "edt" "\ +Turn on EDT Emulation. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (electric-helpify with-electric-help) "ehelp" "ehelp.el" +;;;;;; (16211 27015)) +;;; Generated autoloads from ehelp.el + +(autoload (quote with-electric-help) "ehelp" "\ +Pop up an \"electric\" help buffer. +The arguments are THUNK &optional BUFFER NOERASE MINHEIGHT. +THUNK is a function of no arguments which is called to initialize the +contents of BUFFER. BUFFER defaults to `*Help*'. BUFFER will be +erased before THUNK is called unless NOERASE is non-nil. THUNK will +be called while BUFFER is current and with `standard-output' bound to +the buffer specified by BUFFER. + +If THUNK returns nil, we display BUFFER starting at the top, and +shrink the window to fit. If THUNK returns non-nil, we don't do those things. + +After THUNK has been called, this function \"electrically\" pops up a window +in which BUFFER is displayed and allows the user to scroll through that buffer +in electric-help-mode. The window's height will be at least MINHEIGHT if +this value is non-nil. + +If THUNK returns nil, we display BUFFER starting at the top, and +shrink the window to fit if `electric-help-shrink-window' is non-nil. +If THUNK returns non-nil, we don't do those things. + +When the user exits (with `electric-help-exit', or otherwise), the help +buffer's window disappears (i.e., we use `save-window-excursion'), and +BUFFER is put into `default-major-mode' (or `fundamental-mode') when we exit. + +\(fn THUNK &optional BUFFER NOERASE MINHEIGHT)" nil nil) + +(autoload (quote electric-helpify) "ehelp" "\ +Not documented + +\(fn FUN &optional NAME)" nil nil) + +;;;*** + +;;;### (autoloads (turn-on-eldoc-mode eldoc-mode eldoc-minor-mode-string) +;;;;;; "eldoc" "emacs-lisp/eldoc.el" (16218 6703)) +;;; Generated autoloads from emacs-lisp/eldoc.el + +(defvar eldoc-minor-mode-string " ElDoc" "\ +*String to display in mode line when Eldoc Mode is enabled; nil for none.") + +(custom-autoload (quote eldoc-minor-mode-string) "eldoc") + +(autoload (quote eldoc-mode) "eldoc" "\ +Toggle ElDoc mode on or off. +Show the defined parameters for the elisp function near point. + +For the emacs lisp function at the beginning of the sexp which point is +within, show the defined parameters for the function in the echo area. +This information is extracted directly from the function or macro if it is +in pure lisp. If the emacs function is a subr, the parameters are obtained +from the documentation string if possible. + +If point is over a documented variable, print that variable's docstring +instead. + +With prefix ARG, turn ElDoc mode on if and only if ARG is positive. + +\(fn &optional ARG)" t nil) + +(autoload (quote turn-on-eldoc-mode) "eldoc" "\ +Unequivocally turn on eldoc-mode (see variable documentation). + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (elide-head) "elide-head" "elide-head.el" (16211 +;;;;;; 27015)) +;;; Generated autoloads from elide-head.el + +(autoload (quote elide-head) "elide-head" "\ +Hide header material in buffer according to `elide-head-headers-to-hide'. + +The header is made invisible with an overlay. With a prefix arg, show +an elided material again. + +This is suitable as an entry on `find-file-hook' or appropriate mode hooks. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (elint-initialize) "elint" "emacs-lisp/elint.el" +;;;;;; (16276 26334)) +;;; Generated autoloads from emacs-lisp/elint.el + +(autoload (quote elint-initialize) "elint" "\ +Initialize elint. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (elp-results elp-instrument-package elp-instrument-list +;;;;;; elp-instrument-function) "elp" "emacs-lisp/elp.el" (16211 +;;;;;; 27026)) +;;; Generated autoloads from emacs-lisp/elp.el + +(autoload (quote elp-instrument-function) "elp" "\ +Instrument FUNSYM for profiling. +FUNSYM must be a symbol of a defined function. + +\(fn FUNSYM)" t nil) + +(autoload (quote elp-instrument-list) "elp" "\ +Instrument for profiling, all functions in `elp-function-list'. +Use optional LIST if provided instead. + +\(fn &optional LIST)" t nil) + +(autoload (quote elp-instrument-package) "elp" "\ +Instrument for profiling, all functions which start with PREFIX. +For example, to instrument all ELP functions, do the following: + + \\[elp-instrument-package] RET elp- RET + +\(fn PREFIX)" t nil) + +(autoload (quote elp-results) "elp" "\ +Display current profiling results. +If `elp-reset-after-results' is non-nil, then current profiling +information for all instrumented functions are reset after results are +displayed. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (report-emacs-bug) "emacsbug" "mail/emacsbug.el" +;;;;;; (16256 53161)) +;;; Generated autoloads from mail/emacsbug.el + +(autoload (quote report-emacs-bug) "emacsbug" "\ +Report a bug in GNU Emacs. +Prompts for bug subject. Leaves you in a mail buffer. + +\(fn TOPIC &optional RECENT-KEYS)" t nil) + +;;;*** + +;;;### (autoloads (emerge-merge-directories emerge-revisions-with-ancestor +;;;;;; emerge-revisions emerge-files-with-ancestor-remote emerge-files-remote +;;;;;; emerge-files-with-ancestor-command emerge-files-command emerge-buffers-with-ancestor +;;;;;; emerge-buffers emerge-files-with-ancestor emerge-files) "emerge" +;;;;;; "emerge.el" (16211 27015)) +;;; Generated autoloads from emerge.el + +(defvar menu-bar-emerge-menu (make-sparse-keymap "Emerge")) + (fset 'menu-bar-emerge-menu (symbol-value 'menu-bar-emerge-menu)) + (define-key menu-bar-emerge-menu [emerge-merge-directories] + '("Merge Directories..." . emerge-merge-directories)) + (define-key menu-bar-emerge-menu [emerge-revisions-with-ancestor] + '("Revisions with Ancestor..." . emerge-revisions-with-ancestor)) + (define-key menu-bar-emerge-menu [emerge-revisions] + '("Revisions..." . emerge-revisions)) + (define-key menu-bar-emerge-menu [emerge-files-with-ancestor] + '("Files with Ancestor..." . emerge-files-with-ancestor)) + (define-key menu-bar-emerge-menu [emerge-files] + '("Files..." . emerge-files)) + (define-key menu-bar-emerge-menu [emerge-buffers-with-ancestor] + '("Buffers with Ancestor..." . emerge-buffers-with-ancestor)) + (define-key menu-bar-emerge-menu [emerge-buffers] + '("Buffers..." . emerge-buffers)) + +(autoload (quote emerge-files) "emerge" "\ +Run Emerge on two files. + +\(fn ARG FILE-A FILE-B FILE-OUT &optional STARTUP-HOOKS QUIT-HOOKS)" t nil) + +(autoload (quote emerge-files-with-ancestor) "emerge" "\ +Run Emerge on two files, giving another file as the ancestor. + +\(fn ARG FILE-A FILE-B FILE-ANCESTOR FILE-OUT &optional STARTUP-HOOKS QUIT-HOOKS)" t nil) + +(autoload (quote emerge-buffers) "emerge" "\ +Run Emerge on two buffers. + +\(fn BUFFER-A BUFFER-B &optional STARTUP-HOOKS QUIT-HOOKS)" t nil) + +(autoload (quote emerge-buffers-with-ancestor) "emerge" "\ +Run Emerge on two buffers, giving another buffer as the ancestor. + +\(fn BUFFER-A BUFFER-B BUFFER-ANCESTOR &optional STARTUP-HOOKS QUIT-HOOKS)" t nil) + +(autoload (quote emerge-files-command) "emerge" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote emerge-files-with-ancestor-command) "emerge" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote emerge-files-remote) "emerge" "\ +Not documented + +\(fn FILE-A FILE-B FILE-OUT)" nil nil) + +(autoload (quote emerge-files-with-ancestor-remote) "emerge" "\ +Not documented + +\(fn FILE-A FILE-B FILE-ANC FILE-OUT)" nil nil) + +(autoload (quote emerge-revisions) "emerge" "\ +Emerge two RCS revisions of a file. + +\(fn ARG FILE REVISION-A REVISION-B &optional STARTUP-HOOKS QUIT-HOOKS)" t nil) + +(autoload (quote emerge-revisions-with-ancestor) "emerge" "\ +Emerge two RCS revisions of a file, with another revision as ancestor. + +\(fn ARG FILE REVISION-A REVISION-B ANCESTOR &optional STARTUP-HOOKS QUIT-HOOKS)" t nil) + +(autoload (quote emerge-merge-directories) "emerge" "\ +Not documented + +\(fn A-DIR B-DIR ANCESTOR-DIR OUTPUT-DIR)" t nil) + +;;;*** + +;;;### (autoloads (encoded-kbd-mode) "encoded-kb" "international/encoded-kb.el" +;;;;;; (16211 27032)) +;;; Generated autoloads from international/encoded-kb.el + +(defvar encoded-kbd-mode nil "\ +Non-nil if Encoded-Kbd mode is enabled. +See the command `encoded-kbd-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `encoded-kbd-mode'.") + +(custom-autoload (quote encoded-kbd-mode) "encoded-kb") + +(autoload (quote encoded-kbd-mode) "encoded-kb" "\ +Toggle Encoded-kbd minor mode. +With arg, turn Encoded-kbd mode on if and only if arg is positive. + +You should not turn this mode on manually, instead use the command +\\[set-keyboard-coding-system] which turns on or off this mode +automatically. + +In Encoded-kbd mode, a text sent from keyboard is accepted +as a multilingual text encoded in a coding system set by +\\[set-keyboard-coding-system]. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (enriched-decode enriched-encode enriched-mode) +;;;;;; "enriched" "textmodes/enriched.el" (16211 27043)) +;;; Generated autoloads from textmodes/enriched.el + +(autoload (quote enriched-mode) "enriched" "\ +Minor mode for editing text/enriched files. +These are files with embedded formatting information in the MIME standard +text/enriched format. +Turning the mode on runs `enriched-mode-hook'. + +More information about Enriched mode is available in the file +etc/enriched.doc in the Emacs distribution directory. + +Commands: + +\\{enriched-mode-map} + +\(fn &optional ARG)" t nil) + +(autoload (quote enriched-encode) "enriched" "\ +Not documented + +\(fn FROM TO ORIG-BUF)" nil nil) + +(autoload (quote enriched-decode) "enriched" "\ +Not documented + +\(fn FROM TO)" nil nil) + +;;;*** + +;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (16211 +;;;;;; 27027)) +;;; Generated autoloads from eshell/esh-mode.el + +(autoload (quote eshell-mode) "esh-mode" "\ +Emacs shell interactive mode. + +\\{eshell-mode-map} + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (eshell-test) "esh-test" "eshell/esh-test.el" (16211 +;;;;;; 27027)) +;;; Generated autoloads from eshell/esh-test.el + +(autoload (quote eshell-test) "esh-test" "\ +Test Eshell to verify that it works as expected. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (eshell-report-bug eshell-command-result eshell-command +;;;;;; eshell) "eshell" "eshell/eshell.el" (16211 27027)) +;;; Generated autoloads from eshell/eshell.el + +(autoload (quote eshell) "eshell" "\ +Create an interactive Eshell buffer. +The buffer used for Eshell sessions is determined by the value of +`eshell-buffer-name'. If there is already an Eshell session active in +that buffer, Emacs will simply switch to it. Otherwise, a new session +will begin. A numeric prefix arg (as in `C-u 42 M-x eshell RET') +switches to the session with that number, creating it if necessary. A +nonnumeric prefix arg means to create a new session. Returns the +buffer selected (or created). + +\(fn &optional ARG)" t nil) + +(autoload (quote eshell-command) "eshell" "\ +Execute the Eshell command string COMMAND. +With prefix ARG, insert output into the current buffer at point. + +\(fn &optional COMMAND ARG)" t nil) + +(autoload (quote eshell-command-result) "eshell" "\ +Execute the given Eshell COMMAND, and return the result. +The result might be any Lisp object. +If STATUS-VAR is a symbol, it will be set to the exit status of the +command. This is the only way to determine whether the value returned +corresponding to a successful execution. + +\(fn COMMAND &optional STATUS-VAR)" nil nil) + +(autoload (quote eshell-report-bug) "eshell" "\ +Report a bug in Eshell. +Prompts for the TOPIC. Leaves you in a mail buffer. +Please include any configuration details that might be involved. + +\(fn TOPIC)" t nil) + +;;;*** + +;;;### (autoloads (complete-tag select-tags-table tags-apropos list-tags +;;;;;; tags-query-replace tags-search tags-loop-continue next-file +;;;;;; pop-tag-mark find-tag-regexp find-tag-other-frame find-tag-other-window +;;;;;; find-tag find-tag-noselect tags-table-files visit-tags-table-buffer +;;;;;; visit-tags-table find-tag-default-function find-tag-hook +;;;;;; tags-add-tables tags-compression-info-list tags-table-list +;;;;;; tags-case-fold-search) "etags" "progmodes/etags.el" (16211 +;;;;;; 27039)) +;;; Generated autoloads from progmodes/etags.el + +(defvar tags-file-name nil "\ +*File name of tags table. +To switch to a new tags table, setting this variable is sufficient. +If you set this variable, do not also set `tags-table-list'. +Use the `etags' program to make a tags table file.") + (put 'tags-file-name 'variable-interactive "fVisit tags table: ") + +(defvar tags-case-fold-search (quote default) "\ +*Whether tags operations should be case-sensitive. +A value of t means case-insensitive, a value of nil means case-sensitive. +Any other value means use the setting of `case-fold-search'.") + +(custom-autoload (quote tags-case-fold-search) "etags") + +(defvar tags-table-list nil "\ +*List of file names of tags tables to search. +An element that is a directory means the file \"TAGS\" in that directory. +To switch to a new list of tags tables, setting this variable is sufficient. +If you set this variable, do not also set `tags-file-name'. +Use the `etags' program to make a tags table file.") + +(custom-autoload (quote tags-table-list) "etags") + +(defvar tags-compression-info-list (quote ("" ".Z" ".bz2" ".gz" ".tgz")) "\ +*List of extensions tried by etags when jka-compr is used. +An empty string means search the non-compressed file. +These extensions will be tried only if jka-compr was activated +\(i.e. via customize of `auto-compression-mode' or by calling the function +`auto-compression-mode').") + +(custom-autoload (quote tags-compression-info-list) "etags") + +(defvar tags-add-tables (quote ask-user) "\ +*Control whether to add a new tags table to the current list. +t means do; nil means don't (always start a new list). +Any other value means ask the user whether to add a new tags table +to the current list (as opposed to starting a new list).") + +(custom-autoload (quote tags-add-tables) "etags") + +(defvar find-tag-hook nil "\ +*Hook to be run by \\[find-tag] after finding a tag. See `run-hooks'. +The value in the buffer in which \\[find-tag] is done is used, +not the value in the buffer \\[find-tag] goes to.") + +(custom-autoload (quote find-tag-hook) "etags") + +(defvar find-tag-default-function nil "\ +*A function of no arguments used by \\[find-tag] to pick a default tag. +If nil, and the symbol that is the value of `major-mode' +has a `find-tag-default-function' property (see `put'), that is used. +Otherwise, `find-tag-default' is used.") + +(custom-autoload (quote find-tag-default-function) "etags") + +(autoload (quote visit-tags-table) "etags" "\ +Tell tags commands to use tags table file FILE. +FILE should be the name of a file created with the `etags' program. +A directory name is ok too; it means file TAGS in that directory. + +Normally \\[visit-tags-table] sets the global value of `tags-file-name'. +With a prefix arg, set the buffer-local value instead. +When you find a tag with \\[find-tag], the buffer it finds the tag +in is given a local value of this variable which is the name of the tags +file the tag was in. + +\(fn FILE &optional LOCAL)" t nil) + +(autoload (quote visit-tags-table-buffer) "etags" "\ +Select the buffer containing the current tags table. +If optional arg is a string, visit that file as a tags table. +If optional arg is t, visit the next table in `tags-table-list'. +If optional arg is the atom `same', don't look for a new table; + just select the buffer visiting `tags-file-name'. +If arg is nil or absent, choose a first buffer from information in + `tags-file-name', `tags-table-list', `tags-table-list-pointer'. +Returns t if it visits a tags table, or nil if there are no more in the list. + +\(fn &optional CONT)" nil nil) + +(autoload (quote tags-table-files) "etags" "\ +Return a list of files in the current tags table. +Assumes the tags table is the current buffer. The file names are returned +as they appeared in the `etags' command that created the table, usually +without directory names. + +\(fn)" nil nil) + +(autoload (quote find-tag-noselect) "etags" "\ +Find tag (in current tags table) whose name contains TAGNAME. +Returns the buffer containing the tag's definition and moves its point there, +but does not select the buffer. +The default for TAGNAME is the expression in the buffer near point. + +If second arg NEXT-P is t (interactively, with prefix arg), search for +another tag that matches the last tagname or regexp used. When there are +multiple matches for a tag, more exact matches are found first. If NEXT-P +is the atom `-' (interactively, with prefix arg that is a negative number +or just \\[negative-argument]), pop back to the previous tag gone to. + +If third arg REGEXP-P is non-nil, treat TAGNAME as a regexp. + +A marker representing the point when this command is invoked is pushed +onto a ring and may be popped back to with \\[pop-tag-mark]. +Contrast this with the ring of marks gone to by the command. + +See documentation of variable `tags-file-name'. + +\(fn TAGNAME &optional NEXT-P REGEXP-P)" t nil) + +(autoload (quote find-tag) "etags" "\ +Find tag (in current tags table) whose name contains TAGNAME. +Select the buffer containing the tag's definition, and move point there. +The default for TAGNAME is the expression in the buffer around or before point. + +If second arg NEXT-P is t (interactively, with prefix arg), search for +another tag that matches the last tagname or regexp used. When there are +multiple matches for a tag, more exact matches are found first. If NEXT-P +is the atom `-' (interactively, with prefix arg that is a negative number +or just \\[negative-argument]), pop back to the previous tag gone to. + +If third arg REGEXP-P is non-nil, treat TAGNAME as a regexp. + +A marker representing the point when this command is invoked is pushed +onto a ring and may be popped back to with \\[pop-tag-mark]. +Contrast this with the ring of marks gone to by the command. + +See documentation of variable `tags-file-name'. + +\(fn TAGNAME &optional NEXT-P REGEXP-P)" t nil) + (define-key esc-map "." 'find-tag) + +(autoload (quote find-tag-other-window) "etags" "\ +Find tag (in current tags table) whose name contains TAGNAME. +Select the buffer containing the tag's definition in another window, and +move point there. The default for TAGNAME is the expression in the buffer +around or before point. + +If second arg NEXT-P is t (interactively, with prefix arg), search for +another tag that matches the last tagname or regexp used. When there are +multiple matches for a tag, more exact matches are found first. If NEXT-P +is negative (interactively, with prefix arg that is a negative number or +just \\[negative-argument]), pop back to the previous tag gone to. + +If third arg REGEXP-P is non-nil, treat TAGNAME as a regexp. + +A marker representing the point when this command is invoked is pushed +onto a ring and may be popped back to with \\[pop-tag-mark]. +Contrast this with the ring of marks gone to by the command. + +See documentation of variable `tags-file-name'. + +\(fn TAGNAME &optional NEXT-P REGEXP-P)" t nil) + (define-key ctl-x-4-map "." 'find-tag-other-window) + +(autoload (quote find-tag-other-frame) "etags" "\ +Find tag (in current tags table) whose name contains TAGNAME. +Select the buffer containing the tag's definition in another frame, and +move point there. The default for TAGNAME is the expression in the buffer +around or before point. + +If second arg NEXT-P is t (interactively, with prefix arg), search for +another tag that matches the last tagname or regexp used. When there are +multiple matches for a tag, more exact matches are found first. If NEXT-P +is negative (interactively, with prefix arg that is a negative number or +just \\[negative-argument]), pop back to the previous tag gone to. + +If third arg REGEXP-P is non-nil, treat TAGNAME as a regexp. + +A marker representing the point when this command is invoked is pushed +onto a ring and may be popped back to with \\[pop-tag-mark]. +Contrast this with the ring of marks gone to by the command. + +See documentation of variable `tags-file-name'. + +\(fn TAGNAME &optional NEXT-P)" t nil) + (define-key ctl-x-5-map "." 'find-tag-other-frame) + +(autoload (quote find-tag-regexp) "etags" "\ +Find tag (in current tags table) whose name matches REGEXP. +Select the buffer containing the tag's definition and move point there. + +If second arg NEXT-P is t (interactively, with prefix arg), search for +another tag that matches the last tagname or regexp used. When there are +multiple matches for a tag, more exact matches are found first. If NEXT-P +is negative (interactively, with prefix arg that is a negative number or +just \\[negative-argument]), pop back to the previous tag gone to. + +If third arg OTHER-WINDOW is non-nil, select the buffer in another window. + +A marker representing the point when this command is invoked is pushed +onto a ring and may be popped back to with \\[pop-tag-mark]. +Contrast this with the ring of marks gone to by the command. + +See documentation of variable `tags-file-name'. + +\(fn REGEXP &optional NEXT-P OTHER-WINDOW)" t nil) + (define-key esc-map [?\C-.] 'find-tag-regexp) + (define-key esc-map "*" 'pop-tag-mark) + +(autoload (quote pop-tag-mark) "etags" "\ +Pop back to where \\[find-tag] was last invoked. + +This is distinct from invoking \\[find-tag] with a negative argument +since that pops a stack of markers at which tags were found, not from +where they were found. + +\(fn)" t nil) + +(autoload (quote next-file) "etags" "\ +Select next file among files in current tags table. + +A first argument of t (prefix arg, if interactive) initializes to the +beginning of the list of files in the tags table. If the argument is +neither nil nor t, it is evalled to initialize the list of files. + +Non-nil second argument NOVISIT means use a temporary buffer + to save time and avoid uninteresting warnings. + +Value is nil if the file was already visited; +if the file was newly read in, the value is the filename. + +\(fn &optional INITIALIZE NOVISIT)" t nil) + +(autoload (quote tags-loop-continue) "etags" "\ +Continue last \\[tags-search] or \\[tags-query-replace] command. +Used noninteractively with non-nil argument to begin such a command (the +argument is passed to `next-file', which see). + +Two variables control the processing we do on each file: the value of +`tags-loop-scan' is a form to be executed on each file to see if it is +interesting (it returns non-nil if so) and `tags-loop-operate' is a form to +evaluate to operate on an interesting file. If the latter evaluates to +nil, we exit; otherwise we scan the next file. + +\(fn &optional FIRST-TIME)" t nil) + (define-key esc-map "," 'tags-loop-continue) + +(autoload (quote tags-search) "etags" "\ +Search through all files listed in tags table for match for REGEXP. +Stops when a match is found. +To continue searching for next match, use command \\[tags-loop-continue]. + +See documentation of variable `tags-file-name'. + +\(fn REGEXP &optional FILE-LIST-FORM)" t nil) + +(autoload (quote tags-query-replace) "etags" "\ +Do `query-replace-regexp' of FROM with TO on all files listed in tags table. +Third arg DELIMITED (prefix arg) means replace only word-delimited matches. +If you exit (\\[keyboard-quit], RET or q), you can resume the query replace +with the command \\[tags-loop-continue]. + +See documentation of variable `tags-file-name'. + +\(fn FROM TO &optional DELIMITED FILE-LIST-FORM START END)" t nil) + +(autoload (quote list-tags) "etags" "\ +Display list of tags in file FILE. +This searches only the first table in the list, and no included tables. +FILE should be as it appeared in the `etags' command, usually without a +directory specification. + +\(fn FILE &optional NEXT-MATCH)" t nil) + +(autoload (quote tags-apropos) "etags" "\ +Display list of all tags in tags table REGEXP matches. + +\(fn REGEXP)" t nil) + +(autoload (quote select-tags-table) "etags" "\ +Select a tags table file from a menu of those you have already used. +The list of tags tables to select from is stored in `tags-table-set-list'; +see the doc of that variable if you want to add names to the list. + +\(fn)" t nil) + +(autoload (quote complete-tag) "etags" "\ +Perform tags completion on the text around point. +Completes to the set of names listed in the current tags table. +The string to complete is chosen in the same way as the default +for \\[find-tag] (which see). + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (ethio-write-file ethio-find-file ethio-java-to-fidel-buffer +;;;;;; ethio-fidel-to-java-buffer ethio-tex-to-fidel-buffer ethio-fidel-to-tex-buffer +;;;;;; ethio-input-special-character ethio-replace-space ethio-modify-vowel +;;;;;; ethio-fidel-to-sera-marker ethio-fidel-to-sera-mail ethio-fidel-to-sera-mail-or-marker +;;;;;; ethio-fidel-to-sera-buffer ethio-fidel-to-sera-region ethio-sera-to-fidel-marker +;;;;;; ethio-sera-to-fidel-mail ethio-sera-to-fidel-mail-or-marker +;;;;;; ethio-sera-to-fidel-buffer ethio-sera-to-fidel-region setup-ethiopic-environment-internal) +;;;;;; "ethio-util" "language/ethio-util.el" (16211 27033)) +;;; Generated autoloads from language/ethio-util.el + +(autoload (quote setup-ethiopic-environment-internal) "ethio-util" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote ethio-sera-to-fidel-region) "ethio-util" "\ +Convert the characters in region from SERA to FIDEL. +The variable `ethio-primary-language' specifies the primary language +and `ethio-secondary-language' specifies the secondary. + +If the 3rd parameter SECONDARY is given and non-nil, assume the region +begins begins with the secondary language; otherwise with the primary +language. + +If the 4th parameter FORCE is given and non-nil, perform conversion +even if the buffer is read-only. + +See also the descriptions of the variables +`ethio-use-colon-for-colon' and +`ethio-use-three-dot-question'. + +\(fn BEG END &optional SECONDARY FORCE)" t nil) + +(autoload (quote ethio-sera-to-fidel-buffer) "ethio-util" "\ +Convert the current buffer from SERA to FIDEL. + +The variable `ethio-primary-language' specifies the primary +language and `ethio-secondary-language' specifies the secondary. + +If the 1st optional parameter SECONDARY is non-nil, assume the buffer +begins with the secondary language; otherwise with the primary +language. + +If the 2nd optional parametr FORCE is non-nil, perform conversion even if the +buffer is read-only. + +See also the descriptions of the variables +`ethio-use-colon-for-colon' and +`ethio-use-three-dot-question'. + +\(fn &optional SECONDARY FORCE)" t nil) + +(autoload (quote ethio-sera-to-fidel-mail-or-marker) "ethio-util" "\ +Execute ethio-sera-to-fidel-mail or ethio-sera-to-fidel-marker depending on the current major mode. +If in rmail-mode or in mail-mode, execute the former; otherwise latter. + +\(fn &optional ARG)" t nil) + +(autoload (quote ethio-sera-to-fidel-mail) "ethio-util" "\ +Convert SERA to FIDEL to read/write mail and news. + +If the buffer contains the markers \"\" and \"\", +convert the segments between them into FIDEL. + +If invoked interactively and there is no marker, convert the subject field +and the body into FIDEL using `ethio-sera-to-fidel-region'. + +\(fn &optional ARG)" t nil) + +(autoload (quote ethio-sera-to-fidel-marker) "ethio-util" "\ +Convert the regions surrounded by \"\" and \"\" from SERA to FIDEL. +Assume that each region begins with `ethio-primary-language'. +The markers \"\" and \"\" themselves are not deleted. + +\(fn &optional FORCE)" t nil) + +(autoload (quote ethio-fidel-to-sera-region) "ethio-util" "\ +Replace all the FIDEL characters in the region to the SERA format. +The variable `ethio-primary-language' specifies the primary +language and `ethio-secondary-language' specifies the secondary. + +If the 3dr parameter SECONDARY is given and non-nil, try to convert +the region so that it begins in the secondary language; otherwise with +the primary language. + +If the 4th parameter FORCE is given and non-nil, convert even if the +buffer is read-only. + +See also the descriptions of the variables +`ethio-use-colon-for-colon', `ethio-use-three-dot-question', +`ethio-quote-vowel-always' and `ethio-numeric-reduction'. + +\(fn BEGIN END &optional SECONDARY FORCE)" t nil) + +(autoload (quote ethio-fidel-to-sera-buffer) "ethio-util" "\ +Replace all the FIDEL characters in the current buffer to the SERA format. +The variable `ethio-primary-language' specifies the primary +language and `ethio-secondary-language' specifies the secondary. + +If the 1st optional parameter SECONDARY is non-nil, try to convert the +region so that it begins in the secondary language; otherwise with the +primary language. + +If the 2nd optional parameter FORCE is non-nil, convert even if the +buffer is read-only. + +See also the descriptions of the variables +`ethio-use-colon-for-colon', `ethio-use-three-dot-question', +`ethio-quote-vowel-always' and `ethio-numeric-reduction'. + +\(fn &optional SECONDARY FORCE)" t nil) + +(autoload (quote ethio-fidel-to-sera-mail-or-marker) "ethio-util" "\ +Execute ethio-fidel-to-sera-mail or ethio-fidel-to-sera-marker depending on the current major mode. +If in rmail-mode or in mail-mode, execute the former; otherwise latter. + +\(fn &optional ARG)" t nil) + +(autoload (quote ethio-fidel-to-sera-mail) "ethio-util" "\ +Convert FIDEL to SERA to read/write mail and news. + +If the body contains at least one Ethiopic character, + 1) insert the string \"\" at the beginning of the body, + 2) insert \"\" at the end of the body, and + 3) convert the body into SERA. + +The very same procedure applies to the subject field, too. + +\(fn)" t nil) + +(autoload (quote ethio-fidel-to-sera-marker) "ethio-util" "\ +Convert the regions surrounded by \"\" and \"\" from FIDEL to SERA. +The markers \"\" and \"\" themselves are not deleted. + +\(fn &optional FORCE)" t nil) + +(autoload (quote ethio-modify-vowel) "ethio-util" "\ +Modify the vowel of the FIDEL that is under the cursor. + +\(fn)" t nil) + +(autoload (quote ethio-replace-space) "ethio-util" "\ +Replace ASCII spaces with Ethiopic word separators in the region. + +In the specified region, replace word separators surrounded by two +Ethiopic characters, depending on the first parameter CH, which should +be 1, 2, or 3. + +If CH = 1, word separator will be replaced with an ASCII space. +If CH = 2, with two ASCII spaces. +If CH = 3, with the Ethiopic colon-like word separator. + +The second and third parameters BEGIN and END specify the region. + +\(fn CH BEGIN END)" t nil) + +(autoload (quote ethio-input-special-character) "ethio-util" "\ +Allow the user to input special characters. + +\(fn ARG)" t nil) + +(autoload (quote ethio-fidel-to-tex-buffer) "ethio-util" "\ +Convert each fidel characters in the current buffer into a fidel-tex command. +Each command is always surrounded by braces. + +\(fn)" t nil) + +(autoload (quote ethio-tex-to-fidel-buffer) "ethio-util" "\ +Convert fidel-tex commands in the current buffer into fidel chars. + +\(fn)" t nil) + +(autoload (quote ethio-fidel-to-java-buffer) "ethio-util" "\ +Convert Ethiopic characters into the Java escape sequences. + +Each escape sequence is of the form uXXXX, where XXXX is the +character's codepoint (in hex) in Unicode. + +If `ethio-java-save-lowercase' is non-nil, use [0-9a-f]. +Otherwise, [0-9A-F]. + +\(fn)" nil nil) + +(autoload (quote ethio-java-to-fidel-buffer) "ethio-util" "\ +Convert the Java escape sequences into corresponding Ethiopic characters. + +\(fn)" nil nil) + +(autoload (quote ethio-find-file) "ethio-util" "\ +Transcribe file content into Ethiopic dependig on filename suffix. + +\(fn)" nil nil) + +(autoload (quote ethio-write-file) "ethio-util" "\ +Transcribe Ethiopic characters in ASCII depending on the file extension. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (eudc-load-eudc eudc-query-form eudc-expand-inline +;;;;;; eudc-get-phone eudc-get-email eudc-set-server) "eudc" "net/eudc.el" +;;;;;; (16211 27037)) +;;; Generated autoloads from net/eudc.el + +(autoload (quote eudc-set-server) "eudc" "\ +Set the directory server to SERVER using PROTOCOL. +Unless NO-SAVE is non-nil, the server is saved as the default +server for future sessions. + +\(fn SERVER PROTOCOL &optional NO-SAVE)" t nil) + +(autoload (quote eudc-get-email) "eudc" "\ +Get the email field of NAME from the directory server. + +\(fn NAME)" t nil) + +(autoload (quote eudc-get-phone) "eudc" "\ +Get the phone field of NAME from the directory server. + +\(fn NAME)" t nil) + +(autoload (quote eudc-expand-inline) "eudc" "\ +Query the directory server, and expand the query string before point. +The query string consists of the buffer substring from the point back to +the preceding comma, colon or beginning of line. +The variable `eudc-inline-query-format' controls how to associate the +individual inline query words with directory attribute names. +After querying the server for the given string, the expansion specified by +`eudc-inline-expansion-format' is inserted in the buffer at point. +If REPLACE is non-nil, then this expansion replaces the name in the buffer. +`eudc-expansion-overwrites-query' being non-nil inverts the meaning of REPLACE. +Multiple servers can be tried with the same query until one finds a match, +see `eudc-inline-expansion-servers' + +\(fn &optional REPLACE)" t nil) + +(autoload (quote eudc-query-form) "eudc" "\ +Display a form to query the directory server. +If given a non-nil argument GET-FIELDS-FROM-SERVER, the function first +queries the server for the existing fields and displays a corresponding form. + +\(fn &optional GET-FIELDS-FROM-SERVER)" t nil) + +(autoload (quote eudc-load-eudc) "eudc" "\ +Load the Emacs Unified Directory Client. +This does nothing except loading eudc by autoload side-effect. + +\(fn)" t nil) + +(cond ((not (string-match "XEmacs" emacs-version)) (defvar eudc-tools-menu (make-sparse-keymap "Directory Search")) (fset (quote eudc-tools-menu) (symbol-value (quote eudc-tools-menu))) (define-key eudc-tools-menu [phone] (quote ("Get Phone" . eudc-get-phone))) (define-key eudc-tools-menu [email] (quote ("Get Email" . eudc-get-email))) (define-key eudc-tools-menu [separator-eudc-email] (quote ("--"))) (define-key eudc-tools-menu [expand-inline] (quote ("Expand Inline Query" . eudc-expand-inline))) (define-key eudc-tools-menu [query] (quote ("Query with Form" . eudc-query-form))) (define-key eudc-tools-menu [separator-eudc-query] (quote ("--"))) (define-key eudc-tools-menu [new] (quote ("New Server" . eudc-set-server))) (define-key eudc-tools-menu [load] (quote ("Load Hotlist of Servers" . eudc-load-eudc)))) (t (let ((menu (quote ("Directory Search" ["Load Hotlist of Servers" eudc-load-eudc t] ["New Server" eudc-set-server t] ["---" nil nil] ["Query with Form" eudc-query-form t] ["Expand Inline Query" eudc-expand-inline t] ["---" nil nil] ["Get Email" eudc-get-email t] ["Get Phone" eudc-get-phone t])))) (if (not (featurep (quote eudc-autoloads))) (if eudc-xemacs-p (if (and (featurep (quote menubar)) (not (featurep (quote infodock)))) (add-submenu (quote ("Tools")) menu)) (require (quote easymenu)) (cond ((fboundp (quote easy-menu-add-item)) (easy-menu-add-item nil (quote ("tools")) (easy-menu-create-menu (car menu) (cdr menu)))) ((fboundp (quote easy-menu-create-keymaps)) (define-key global-map [menu-bar tools eudc] (cons "Directory Search" (easy-menu-create-keymaps "Directory Search" (cdr menu))))))))))) + +;;;*** + +;;;### (autoloads (eudc-display-jpeg-as-button eudc-display-jpeg-inline +;;;;;; eudc-display-sound eudc-display-mail eudc-display-url eudc-display-generic-binary) +;;;;;; "eudc-bob" "net/eudc-bob.el" (16211 27037)) +;;; Generated autoloads from net/eudc-bob.el + +(autoload (quote eudc-display-generic-binary) "eudc-bob" "\ +Display a button for unidentified binary DATA. + +\(fn DATA)" nil nil) + +(autoload (quote eudc-display-url) "eudc-bob" "\ +Display URL and make it clickable. + +\(fn URL)" nil nil) + +(autoload (quote eudc-display-mail) "eudc-bob" "\ +Display e-mail address and make it clickable. + +\(fn MAIL)" nil nil) + +(autoload (quote eudc-display-sound) "eudc-bob" "\ +Display a button to play the sound DATA. + +\(fn DATA)" nil nil) + +(autoload (quote eudc-display-jpeg-inline) "eudc-bob" "\ +Display the JPEG DATA inline at point if possible. + +\(fn DATA)" nil nil) + +(autoload (quote eudc-display-jpeg-as-button) "eudc-bob" "\ +Display a button for the JPEG DATA. + +\(fn DATA)" nil nil) + +;;;*** + +;;;### (autoloads (eudc-try-bbdb-insert eudc-insert-record-at-point-into-bbdb) +;;;;;; "eudc-export" "net/eudc-export.el" (16211 27037)) +;;; Generated autoloads from net/eudc-export.el + +(autoload (quote eudc-insert-record-at-point-into-bbdb) "eudc-export" "\ +Insert record at point into the BBDB database. +This function can only be called from a directory query result buffer. + +\(fn)" t nil) + +(autoload (quote eudc-try-bbdb-insert) "eudc-export" "\ +Call `eudc-insert-record-at-point-into-bbdb' if on a record. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (eudc-edit-hotlist) "eudc-hotlist" "net/eudc-hotlist.el" +;;;;;; (16211 27037)) +;;; Generated autoloads from net/eudc-hotlist.el + +(autoload (quote eudc-edit-hotlist) "eudc-hotlist" "\ +Edit the hotlist of directory servers in a specialized buffer. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (executable-make-buffer-file-executable-if-script-p +;;;;;; executable-self-display executable-set-magic executable-find) +;;;;;; "executable" "progmodes/executable.el" (16211 27039)) +;;; Generated autoloads from progmodes/executable.el + +(autoload (quote executable-find) "executable" "\ +Search for COMMAND in `exec-path' and return the absolute file name. +Return nil if COMMAND is not found anywhere in `exec-path'. + +\(fn COMMAND)" nil nil) + +(autoload (quote executable-set-magic) "executable" "\ +Set this buffer's interpreter to INTERPRETER with optional ARGUMENT. +The variables `executable-magicless-file-regexp', `executable-prefix', +`executable-insert', `executable-query' and `executable-chmod' control +when and how magic numbers are inserted or replaced and scripts made +executable. + +\(fn INTERPRETER &optional ARGUMENT NO-QUERY-FLAG INSERT-FLAG)" t nil) + +(autoload (quote executable-self-display) "executable" "\ +Turn a text file into a self-displaying Un*x command. +The magic number of such a command displays all lines but itself. + +\(fn)" t nil) + +(autoload (quote executable-make-buffer-file-executable-if-script-p) "executable" "\ +Make file executable according to umask if not already executable. +If file already has any execute bits set at all, do not change existing +file modes. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (expand-jump-to-next-slot expand-jump-to-previous-slot +;;;;;; expand-add-abbrevs) "expand" "expand.el" (16211 27015)) +;;; Generated autoloads from expand.el + +(autoload (quote expand-add-abbrevs) "expand" "\ +Add a list of abbrev to abbrev table TABLE. +ABBREVS is a list of abbrev definitions; each abbrev description entry +has the form (ABBREV EXPANSION ARG). + +ABBREV is the abbreviation to replace. + +EXPANSION is the replacement string or a function which will make the +expansion. For example you, could use the DMacros or skeleton packages +to generate such functions. + +ARG is an optional argument which can be a number or a list of +numbers. If ARG is a number, point is placed ARG chars from the +beginning of the expanded text. + +If ARG is a list of numbers, point is placed according to the first +member of the list, but you can visit the other specified positions +cyclicaly with the functions `expand-jump-to-previous-slot' and +`expand-jump-to-next-slot'. + +If ARG is omitted, point is placed at the end of the expanded text. + +\(fn TABLE ABBREVS)" nil nil) + +(autoload (quote expand-jump-to-previous-slot) "expand" "\ +Move the cursor to the previous slot in the last abbrev expansion. +This is used only in conjunction with `expand-add-abbrevs'. + +\(fn)" t nil) + +(autoload (quote expand-jump-to-next-slot) "expand" "\ +Move the cursor to the next slot in the last abbrev expansion. +This is used only in conjunction with `expand-add-abbrevs'. + +\(fn)" t nil) + (define-key ctl-x-map "ap" 'expand-jump-to-previous-slot) + (define-key ctl-x-map "an" 'expand-jump-to-next-slot) + +;;;*** + +;;;### (autoloads (f90-mode) "f90" "progmodes/f90.el" (16211 27039)) +;;; Generated autoloads from progmodes/f90.el + +(autoload (quote f90-mode) "f90" "\ +Major mode for editing Fortran 90,95 code in free format. +For fixed format code, use `fortran-mode'. + +\\[f90-indent-line] indents the current line. +\\[f90-indent-new-line] indents current line and creates a new indented line. +\\[f90-indent-subprogram] indents the current subprogram. + +Type `? or `\\[help-command] to display a list of built-in abbrevs for F90 keywords. + +Key definitions: +\\{f90-mode-map} + +Variables controlling indentation style and extra features: + +`f90-do-indent' + Extra indentation within do blocks (default 3). +`f90-if-indent' + Extra indentation within if/select case/where/forall blocks (default 3). +`f90-type-indent' + Extra indentation within type/interface/block-data blocks (default 3). +`f90-program-indent' + Extra indentation within program/module/subroutine/function blocks + (default 2). +`f90-continuation-indent' + Extra indentation applied to continuation lines (default 5). +`f90-comment-region' + String inserted by function \\[f90-comment-region] at start of each + line in region (default \"!!!$\"). +`f90-indented-comment-re' + Regexp determining the type of comment to be intended like code + (default \"!\"). +`f90-directive-comment-re' + Regexp of comment-like directive like \"!HPF\\\\$\", not to be indented + (default \"!hpf\\\\$\"). +`f90-break-delimiters' + Regexp holding list of delimiters at which lines may be broken + (default \"[-+*/><=,% \\t]\"). +`f90-break-before-delimiters' + Non-nil causes `f90-do-auto-fill' to break lines before delimiters + (default t). +`f90-beginning-ampersand' + Automatic insertion of & at beginning of continuation lines (default t). +`f90-smart-end' + From an END statement, check and fill the end using matching block start. + Allowed values are 'blink, 'no-blink, and nil, which determine + whether to blink the matching beginning (default 'blink). +`f90-auto-keyword-case' + Automatic change of case of keywords (default nil). + The possibilities are 'downcase-word, 'upcase-word, 'capitalize-word. +`f90-leave-line-no' + Do not left-justify line numbers (default nil). +`f90-keywords-re' + List of keywords used for highlighting/upcase-keywords etc. + +Turning on F90 mode calls the value of the variable `f90-mode-hook' +with no args, if that value is non-nil. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (list-colors-display facemenu-read-color facemenu-remove-special +;;;;;; facemenu-remove-all facemenu-remove-face-props facemenu-set-read-only +;;;;;; facemenu-set-intangible facemenu-set-invisible facemenu-set-face-from-menu +;;;;;; facemenu-set-background facemenu-set-foreground facemenu-set-face) +;;;;;; "facemenu" "facemenu.el" (16211 27015)) +;;; Generated autoloads from facemenu.el + (define-key global-map "\M-g" 'facemenu-keymap) + (autoload 'facemenu-keymap "facemenu" "Keymap for face-changing commands." t 'keymap) + +(defvar facemenu-face-menu (let ((map (make-sparse-keymap "Face"))) (define-key map "o" (cons "Other..." (quote facemenu-set-face))) map) "\ +Menu keymap for faces.") + +(defalias (quote facemenu-face-menu) facemenu-face-menu) + +(defvar facemenu-foreground-menu (let ((map (make-sparse-keymap "Foreground Color"))) (define-key map "o" (cons "Other..." (quote facemenu-set-foreground))) map) "\ +Menu keymap for foreground colors.") + +(defalias (quote facemenu-foreground-menu) facemenu-foreground-menu) + +(defvar facemenu-background-menu (let ((map (make-sparse-keymap "Background Color"))) (define-key map "o" (cons "Other..." (quote facemenu-set-background))) map) "\ +Menu keymap for background colors.") + +(defalias (quote facemenu-background-menu) facemenu-background-menu) + +(defvar facemenu-special-menu (let ((map (make-sparse-keymap "Special"))) (define-key map [115] (cons (purecopy "Remove Special") (quote facemenu-remove-special))) (define-key map [116] (cons (purecopy "Intangible") (quote facemenu-set-intangible))) (define-key map [118] (cons (purecopy "Invisible") (quote facemenu-set-invisible))) (define-key map [114] (cons (purecopy "Read-Only") (quote facemenu-set-read-only))) map) "\ +Menu keymap for non-face text-properties.") + +(defalias (quote facemenu-special-menu) facemenu-special-menu) + +(defvar facemenu-justification-menu (let ((map (make-sparse-keymap "Justification"))) (define-key map [99] (cons (purecopy "Center") (quote set-justification-center))) (define-key map [98] (cons (purecopy "Full") (quote set-justification-full))) (define-key map [114] (cons (purecopy "Right") (quote set-justification-right))) (define-key map [108] (cons (purecopy "Left") (quote set-justification-left))) (define-key map [117] (cons (purecopy "Unfilled") (quote set-justification-none))) map) "\ +Submenu for text justification commands.") + +(defalias (quote facemenu-justification-menu) facemenu-justification-menu) + +(defvar facemenu-indentation-menu (let ((map (make-sparse-keymap "Indentation"))) (define-key map [decrease-right-margin] (cons (purecopy "Indent Right Less") (quote decrease-right-margin))) (define-key map [increase-right-margin] (cons (purecopy "Indent Right More") (quote increase-right-margin))) (define-key map [decrease-left-margin] (cons (purecopy "Indent Less") (quote decrease-left-margin))) (define-key map [increase-left-margin] (cons (purecopy "Indent More") (quote increase-left-margin))) map) "\ +Submenu for indentation commands.") + +(defalias (quote facemenu-indentation-menu) facemenu-indentation-menu) + +(defvar facemenu-menu nil "\ +Facemenu top-level menu keymap.") + +(setq facemenu-menu (make-sparse-keymap "Text Properties")) + +(let ((map facemenu-menu)) (define-key map [dc] (cons (purecopy "Display Colors") (quote list-colors-display))) (define-key map [df] (cons (purecopy "Display Faces") (quote list-faces-display))) (define-key map [dp] (cons (purecopy "Describe Properties") (quote describe-text-properties))) (define-key map [ra] (cons (purecopy "Remove Text Properties") (quote facemenu-remove-all))) (define-key map [rm] (cons (purecopy "Remove Face Properties") (quote facemenu-remove-face-props))) (define-key map [s1] (list (purecopy "--")))) + +(let ((map facemenu-menu)) (define-key map [in] (cons (purecopy "Indentation") (quote facemenu-indentation-menu))) (define-key map [ju] (cons (purecopy "Justification") (quote facemenu-justification-menu))) (define-key map [s2] (list (purecopy "--"))) (define-key map [sp] (cons (purecopy "Special Properties") (quote facemenu-special-menu))) (define-key map [bg] (cons (purecopy "Background Color") (quote facemenu-background-menu))) (define-key map [fg] (cons (purecopy "Foreground Color") (quote facemenu-foreground-menu))) (define-key map [fc] (cons (purecopy "Face") (quote facemenu-face-menu)))) + +(defalias (quote facemenu-menu) facemenu-menu) + +(autoload (quote facemenu-set-face) "facemenu" "\ +Add FACE to the region or next character typed. +This adds FACE to the top of the face list; any faces lower on the list that +will not show through at all will be removed. + +Interactively, reads the face name with the minibuffer. + +If the region is active (normally true except in Transient Mark mode) +and there is no prefix argument, this command sets the region to the +requested face. + +Otherwise, this command specifies the face for the next character +inserted. Moving point or switching buffers before +typing a character to insert cancels the specification. + +\(fn FACE &optional START END)" t nil) + +(autoload (quote facemenu-set-foreground) "facemenu" "\ +Set the foreground COLOR of the region or next character typed. +This command reads the color in the minibuffer. + +If the region is active (normally true except in Transient Mark mode) +and there is no prefix argument, this command sets the region to the +requested face. + +Otherwise, this command specifies the face for the next character +inserted. Moving point or switching buffers before +typing a character to insert cancels the specification. + +\(fn COLOR &optional START END)" t nil) + +(autoload (quote facemenu-set-background) "facemenu" "\ +Set the background COLOR of the region or next character typed. +This command reads the color in the minibuffer. + +If the region is active (normally true except in Transient Mark mode) +and there is no prefix argument, this command sets the region to the +requested face. + +Otherwise, this command specifies the face for the next character +inserted. Moving point or switching buffers before +typing a character to insert cancels the specification. + +\(fn COLOR &optional START END)" t nil) + +(autoload (quote facemenu-set-face-from-menu) "facemenu" "\ +Set the FACE of the region or next character typed. +This function is designed to be called from a menu; the face to use +is the menu item's name. + +If the region is active (normally true except in Transient Mark mode) +and there is no prefix argument, this command sets the region to the +requested face. + +Otherwise, this command specifies the face for the next character +inserted. Moving point or switching buffers before +typing a character to insert cancels the specification. + +\(fn FACE START END)" t nil) + +(autoload (quote facemenu-set-invisible) "facemenu" "\ +Make the region invisible. +This sets the `invisible' text property; it can be undone with +`facemenu-remove-special'. + +\(fn START END)" t nil) + +(autoload (quote facemenu-set-intangible) "facemenu" "\ +Make the region intangible: disallow moving into it. +This sets the `intangible' text property; it can be undone with +`facemenu-remove-special'. + +\(fn START END)" t nil) + +(autoload (quote facemenu-set-read-only) "facemenu" "\ +Make the region unmodifiable. +This sets the `read-only' text property; it can be undone with +`facemenu-remove-special'. + +\(fn START END)" t nil) + +(autoload (quote facemenu-remove-face-props) "facemenu" "\ +Remove `face' and `mouse-face' text properties. + +\(fn START END)" t nil) + +(autoload (quote facemenu-remove-all) "facemenu" "\ +Remove all text properties from the region. + +\(fn START END)" t nil) + +(autoload (quote facemenu-remove-special) "facemenu" "\ +Remove all the \"special\" text properties from the region. +These special properties include `invisible', `intangible' and `read-only'. + +\(fn START END)" t nil) + +(autoload (quote facemenu-read-color) "facemenu" "\ +Read a color using the minibuffer. + +\(fn &optional PROMPT)" nil nil) + +(autoload (quote list-colors-display) "facemenu" "\ +Display names of defined colors, and show what they look like. +If the optional argument LIST is non-nil, it should be a list of +colors to display. Otherwise, this command computes a list +of colors that the current display can handle. + +\(fn &optional LIST)" t nil) + +;;;*** + +;;;### (autoloads (turn-on-fast-lock fast-lock-mode) "fast-lock" +;;;;;; "fast-lock.el" (16211 27015)) +;;; Generated autoloads from fast-lock.el + +(autoload (quote fast-lock-mode) "fast-lock" "\ +Toggle Fast Lock mode. +With arg, turn Fast Lock mode on if and only if arg is positive and the buffer +is associated with a file. Enable it automatically in your `~/.emacs' by: + + (setq font-lock-support-mode 'fast-lock-mode) + +If Fast Lock mode is enabled, and the current buffer does not contain any text +properties, any associated Font Lock cache is used if its timestamp matches the +buffer's file, and its `font-lock-keywords' match those that you are using. + +Font Lock caches may be saved: +- When you save the file's buffer. +- When you kill an unmodified file's buffer. +- When you exit Emacs, for all unmodified or saved buffers. +Depending on the value of `fast-lock-save-events'. +See also the commands `fast-lock-read-cache' and `fast-lock-save-cache'. + +Use \\[font-lock-fontify-buffer] to fontify the buffer if the cache is bad. + +Various methods of control are provided for the Font Lock cache. In general, +see variable `fast-lock-cache-directories' and function `fast-lock-cache-name'. +For saving, see variables `fast-lock-minimum-size', `fast-lock-save-events', +`fast-lock-save-others' and `fast-lock-save-faces'. + +\(fn &optional ARG)" t nil) + +(autoload (quote turn-on-fast-lock) "fast-lock" "\ +Unconditionally turn on Fast Lock mode. + +\(fn)" nil nil) + +(when (fboundp (quote add-minor-mode)) (defvar fast-lock-mode nil) (add-minor-mode (quote fast-lock-mode) nil)) + +;;;*** + +;;;### (autoloads (feedmail-queue-reminder feedmail-run-the-queue +;;;;;; feedmail-run-the-queue-global-prompt feedmail-run-the-queue-no-prompts +;;;;;; feedmail-send-it) "feedmail" "mail/feedmail.el" (16211 27033)) +;;; Generated autoloads from mail/feedmail.el + +(autoload (quote feedmail-send-it) "feedmail" "\ +Send the current mail buffer using the Feedmail package. +This is a suitable value for `send-mail-function'. It can be used +with various lower-level mechanisms to provide features such as queueing. + +\(fn)" nil nil) + +(autoload (quote feedmail-run-the-queue-no-prompts) "feedmail" "\ +Like feedmail-run-the-queue, but suppress confirmation prompts. + +\(fn &optional ARG)" t nil) + +(autoload (quote feedmail-run-the-queue-global-prompt) "feedmail" "\ +Like feedmail-run-the-queue, but with a global confirmation prompt. +This is generally most useful if run non-interactively, since you can +bail out with an appropriate answer to the global confirmation prompt. + +\(fn &optional ARG)" t nil) + +(autoload (quote feedmail-run-the-queue) "feedmail" "\ +Visit each message in the feedmail queue directory and send it out. +Return value is a list of three things: number of messages sent, number of +messages skipped, and number of non-message things in the queue (commonly +backup file names and the like). + +\(fn &optional ARG)" t nil) + +(autoload (quote feedmail-queue-reminder) "feedmail" "\ +Perform some kind of reminder activity about queued and draft messages. +Called with an optional symbol argument which says what kind of event +is triggering the reminder activity. The default is 'on-demand, which +is what you typically would use if you were putting this in your emacs start-up +or mail hook code. Other recognized values for WHAT-EVENT (these are passed +internally by feedmail): + + after-immediate (a message has just been sent in immediate mode) + after-queue (a message has just been queued) + after-draft (a message has just been placed in the draft directory) + after-run (the queue has just been run, possibly sending messages) + +WHAT-EVENT is used as a key into the table feedmail-queue-reminder-alist. If +the associated value is a function, it is called without arguments and is expected +to perform the reminder activity. You can supply your own reminder functions +by redefining feedmail-queue-reminder-alist. If you don't want any reminders, +you can set feedmail-queue-reminder-alist to nil. + +\(fn &optional WHAT-EVENT)" t nil) + +;;;*** + +;;;### (autoloads (ffap-bindings dired-at-point ffap-at-mouse ffap-menu +;;;;;; find-file-at-point ffap-next) "ffap" "ffap.el" (16252 34051)) +;;; Generated autoloads from ffap.el + +(autoload (quote ffap-next) "ffap" "\ +Search buffer for next file or URL, and run ffap. +Optional argument BACK says to search backwards. +Optional argument WRAP says to try wrapping around if necessary. +Interactively: use a single prefix to search backwards, +double prefix to wrap forward, triple to wrap backwards. +Actual search is done by `ffap-next-guess'. + +\(fn &optional BACK WRAP)" t nil) + +(autoload (quote find-file-at-point) "ffap" "\ +Find FILENAME, guessing a default from text around point. +If `ffap-url-regexp' is not nil, the FILENAME may also be an URL. +With a prefix, this command behaves exactly like `ffap-file-finder'. +If `ffap-require-prefix' is set, the prefix meaning is reversed. +See also the variables `ffap-dired-wildcards', `ffap-newfile-prompt', +and the functions `ffap-file-at-point' and `ffap-url-at-point'. + +See for latest version. + +\(fn &optional FILENAME)" t nil) + +(defalias (quote ffap) (quote find-file-at-point)) + +(autoload (quote ffap-menu) "ffap" "\ +Put up a menu of files and urls mentioned in this buffer. +Then set mark, jump to choice, and try to fetch it. The menu is +cached in `ffap-menu-alist', and rebuilt by `ffap-menu-rescan'. +The optional RESCAN argument (a prefix, interactively) forces +a rebuild. Searches with `ffap-menu-regexp'. + +\(fn &optional RESCAN)" t nil) + +(autoload (quote ffap-at-mouse) "ffap" "\ +Find file or url guessed from text around mouse click. +Interactively, calls `ffap-at-mouse-fallback' if no guess is found. +Return value: + * if a guess string is found, return it (after finding it) + * if the fallback is called, return whatever it returns + * otherwise, nil + +\(fn E)" t nil) + +(autoload (quote dired-at-point) "ffap" "\ +Start Dired, defaulting to file at point. See `ffap'. + +\(fn &optional FILENAME)" t nil) + +(autoload (quote ffap-bindings) "ffap" "\ +Evaluate the forms in variable `ffap-bindings'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (file-cache-minibuffer-complete) "filecache" "filecache.el" +;;;;;; (16211 27016)) +;;; Generated autoloads from filecache.el + +(autoload (quote file-cache-minibuffer-complete) "filecache" "\ +Complete a filename in the minibuffer using a preloaded cache. +Filecache does two kinds of substitution: it completes on names in +the cache, and, once it has found a unique name, it cycles through +the directories that the name is available in. With a prefix argument, +the name is considered already unique; only the second substitution +\(directories) is done. + +\(fn ARG)" t nil) + (define-key minibuffer-local-completion-map [C-tab] 'file-cache-minibuffer-complete) + (define-key minibuffer-local-map [C-tab] 'file-cache-minibuffer-complete) + (define-key minibuffer-local-must-match-map [C-tab] 'file-cache-minibuffer-complete) + +;;;*** + +;;;### (autoloads (find-grep-dired find-name-dired find-dired find-grep-options +;;;;;; find-ls-option) "find-dired" "find-dired.el" (16211 27016)) +;;; Generated autoloads from find-dired.el + +(defvar find-ls-option (if (eq system-type (quote berkeley-unix)) (quote ("-ls" . "-gilsb")) (quote ("-exec ls -ld {} \\;" . "-ld"))) "\ +*Description of the option to `find' to produce an `ls -l'-type listing. +This is a cons of two strings (FIND-OPTION . LS-SWITCHES). FIND-OPTION +gives the option (or options) to `find' that produce the desired output. +LS-SWITCHES is a list of `ls' switches to tell dired how to parse the output.") + +(custom-autoload (quote find-ls-option) "find-dired") + +(defvar find-grep-options (if (or (eq system-type (quote berkeley-unix)) (string-match "solaris2" system-configuration) (string-match "irix" system-configuration)) "-s" "-q") "\ +*Option to grep to be as silent as possible. +On Berkeley systems, this is `-s'; on Posix, and with GNU grep, `-q' does it. +On other systems, the closest you can come is to use `-l'.") + +(custom-autoload (quote find-grep-options) "find-dired") + +(autoload (quote find-dired) "find-dired" "\ +Run `find' and go into Dired mode on a buffer of the output. +The command run (after changing into DIR) is + + find . \\( ARGS \\) -ls + +except that the variable `find-ls-option' specifies what to use +as the final argument. + +\(fn DIR ARGS)" t nil) + +(autoload (quote find-name-dired) "find-dired" "\ +Search DIR recursively for files matching the globbing pattern PATTERN, +and run dired on those files. +PATTERN is a shell wildcard (not an Emacs regexp) and need not be quoted. +The command run (after changing into DIR) is + + find . -name 'PATTERN' -ls + +\(fn DIR PATTERN)" t nil) + +(autoload (quote find-grep-dired) "find-dired" "\ +Find files in DIR containing a regexp REGEXP and start Dired on output. +The command run (after changing into DIR) is + + find . -exec grep -s -e REGEXP {} \\; -ls + +Thus ARG can also contain additional grep options. + +\(fn DIR REGEXP)" t nil) + +;;;*** + +;;;### (autoloads (ff-mouse-find-other-file-other-window ff-mouse-find-other-file +;;;;;; ff-find-other-file ff-get-other-file) "find-file" "find-file.el" +;;;;;; (16247 2100)) +;;; Generated autoloads from find-file.el + +(defvar ff-special-constructs (quote (("^#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]" lambda nil (setq fname (buffer-substring (match-beginning 2) (match-end 2)))))) "\ +*A list of regular expressions for `ff-find-file'. +Specifies how to recognise special constructs such as include files +etc. and an associated method for extracting the filename from that +construct.") + +(autoload (quote ff-get-other-file) "find-file" "\ +Find the header or source file corresponding to this file. +See also the documentation for `ff-find-other-file'. + +If optional IN-OTHER-WINDOW is non-nil, find the file in another window. + +\(fn &optional IN-OTHER-WINDOW)" t nil) + +(defalias (quote ff-find-related-file) (quote ff-find-other-file)) + +(autoload (quote ff-find-other-file) "find-file" "\ +Find the header or source file corresponding to this file. +Being on a `#include' line pulls in that file. + +If optional IN-OTHER-WINDOW is non-nil, find the file in the other window. +If optional IGNORE-INCLUDE is non-nil, ignore being on `#include' lines. + +Variables of interest include: + + - `ff-case-fold-search' + Non-nil means ignore cases in matches (see `case-fold-search'). + If you have extensions in different cases, you will want this to be nil. + + - `ff-always-in-other-window' + If non-nil, always open the other file in another window, unless an + argument is given to `ff-find-other-file'. + + - `ff-ignore-include' + If non-nil, ignores #include lines. + + - `ff-always-try-to-create' + If non-nil, always attempt to create the other file if it was not found. + + - `ff-quiet-mode' + If non-nil, traces which directories are being searched. + + - `ff-special-constructs' + A list of regular expressions specifying how to recognise special + constructs such as include files etc, and an associated method for + extracting the filename from that construct. + + - `ff-other-file-alist' + Alist of extensions to find given the current file's extension. + + - `ff-search-directories' + List of directories searched through with each extension specified in + `ff-other-file-alist' that matches this file's extension. + + - `ff-pre-find-hook' + List of functions to be called before the search for the file starts. + + - `ff-pre-load-hook' + List of functions to be called before the other file is loaded. + + - `ff-post-load-hook' + List of functions to be called after the other file is loaded. + + - `ff-not-found-hook' + List of functions to be called if the other file could not be found. + + - `ff-file-created-hook' + List of functions to be called if the other file has been created. + +\(fn &optional IN-OTHER-WINDOW IGNORE-INCLUDE)" t nil) + +(autoload (quote ff-mouse-find-other-file) "find-file" "\ +Visit the file you click on. + +\(fn EVENT)" t nil) + +(autoload (quote ff-mouse-find-other-file-other-window) "find-file" "\ +Visit the file you click on in another window. + +\(fn EVENT)" t nil) + +;;;*** + +;;;### (autoloads (find-function-setup-keys find-variable-at-point +;;;;;; find-function-at-point find-function-on-key find-variable-other-frame +;;;;;; find-variable-other-window find-variable find-variable-noselect +;;;;;; find-function-other-frame find-function-other-window find-function +;;;;;; find-function-noselect find-function-search-for-symbol find-library) +;;;;;; "find-func" "emacs-lisp/find-func.el" (16211 27026)) +;;; Generated autoloads from emacs-lisp/find-func.el + +(autoload (quote find-library) "find-func" "\ +Find the elisp source of LIBRARY. + +\(fn LIBRARY)" t nil) + +(autoload (quote find-function-search-for-symbol) "find-func" "\ +Search for SYMBOL. +If VARIABLE-P is nil, `find-function-regexp' is used, otherwise +`find-variable-regexp' is used. The search is done in library LIBRARY. + +\(fn SYMBOL VARIABLE-P LIBRARY)" nil nil) + +(autoload (quote find-function-noselect) "find-func" "\ +Return a pair (BUFFER . POINT) pointing to the definition of FUNCTION. + +Finds the Emacs Lisp library containing the definition of FUNCTION +in a buffer and the point of the definition. The buffer is +not selected. + +If the file where FUNCTION is defined is not known, then it is +searched for in `find-function-source-path' if non nil, otherwise +in `load-path'. + +\(fn FUNCTION)" nil nil) + +(autoload (quote find-function) "find-func" "\ +Find the definition of the FUNCTION near point. + +Finds the Emacs Lisp library containing the definition of the function +near point (selected by `function-at-point') in a buffer and +places point before the definition. Point is saved in the buffer if +it is one of the current buffers. + +The library where FUNCTION is defined is searched for in +`find-function-source-path', if non nil, otherwise in `load-path'. +See also `find-function-recenter-line' and `find-function-after-hook'. + +\(fn FUNCTION)" t nil) + +(autoload (quote find-function-other-window) "find-func" "\ +Find, in another window, the definition of FUNCTION near point. + +See `find-function' for more details. + +\(fn FUNCTION)" t nil) + +(autoload (quote find-function-other-frame) "find-func" "\ +Find, in ananother frame, the definition of FUNCTION near point. + +See `find-function' for more details. + +\(fn FUNCTION)" t nil) + +(autoload (quote find-variable-noselect) "find-func" "\ +Return a pair `(BUFFER . POINT)' pointing to the definition of SYMBOL. + +Finds the Emacs Lisp library containing the definition of SYMBOL +in a buffer and the point of the definition. The buffer is +not selected. + +The library where VARIABLE is defined is searched for in FILE or +`find-function-source-path', if non nil, otherwise in `load-path'. + +\(fn VARIABLE &optional FILE)" nil nil) + +(autoload (quote find-variable) "find-func" "\ +Find the definition of the VARIABLE near point. + +Finds the Emacs Lisp library containing the definition of the variable +near point (selected by `variable-at-point') in a buffer and +places point before the definition. Point is saved in the buffer if +it is one of the current buffers. + +The library where VARIABLE is defined is searched for in +`find-function-source-path', if non nil, otherwise in `load-path'. +See also `find-function-recenter-line' and `find-function-after-hook'. + +\(fn VARIABLE)" t nil) + +(autoload (quote find-variable-other-window) "find-func" "\ +Find, in another window, the definition of VARIABLE near point. + +See `find-variable' for more details. + +\(fn VARIABLE)" t nil) + +(autoload (quote find-variable-other-frame) "find-func" "\ +Find, in annother frame, the definition of VARIABLE near point. + +See `find-variable' for more details. + +\(fn VARIABLE)" t nil) + +(autoload (quote find-function-on-key) "find-func" "\ +Find the function that KEY invokes. KEY is a string. +Point is saved if FUNCTION is in the current buffer. + +\(fn KEY)" t nil) + +(autoload (quote find-function-at-point) "find-func" "\ +Find directly the function at point in the other window. + +\(fn)" t nil) + +(autoload (quote find-variable-at-point) "find-func" "\ +Find directly the function at point in the other window. + +\(fn)" t nil) + +(autoload (quote find-function-setup-keys) "find-func" "\ +Define some key bindings for the find-function family of functions. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (find-lisp-find-dired-filter find-lisp-find-dired-subdirectories +;;;;;; find-lisp-find-dired) "find-lisp" "find-lisp.el" (16211 27016)) +;;; Generated autoloads from find-lisp.el + +(autoload (quote find-lisp-find-dired) "find-lisp" "\ +Find files in DIR, matching REGEXP. + +\(fn DIR REGEXP)" t nil) + +(autoload (quote find-lisp-find-dired-subdirectories) "find-lisp" "\ +Find all subdirectories of DIR. + +\(fn DIR)" t nil) + +(autoload (quote find-lisp-find-dired-filter) "find-lisp" "\ +Change the filter on a find-lisp-find-dired buffer to REGEXP. + +\(fn REGEXP)" t nil) + +;;;*** + +;;;### (autoloads (finder-by-keyword finder-commentary finder-list-keywords) +;;;;;; "finder" "finder.el" (16235 4766)) +;;; Generated autoloads from finder.el + +(autoload (quote finder-list-keywords) "finder" "\ +Display descriptions of the keywords in the Finder buffer. + +\(fn)" t nil) + +(autoload (quote finder-commentary) "finder" "\ +Display FILE's commentary section. +FILE should be in a form suitable for passing to `locate-library'. + +\(fn FILE)" t nil) + +(autoload (quote finder-by-keyword) "finder" "\ +Find packages matching a given keyword. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (enable-flow-control-on enable-flow-control) "flow-ctrl" +;;;;;; "flow-ctrl.el" (16211 27016)) +;;; Generated autoloads from flow-ctrl.el + +(autoload (quote enable-flow-control) "flow-ctrl" "\ +Toggle flow control handling. +When handling is enabled, user can type C-s as C-\\, and C-q as C-^. +With arg, enable flow control mode if arg is positive, otherwise disable. + +\(fn &optional ARGUMENT)" t nil) + +(autoload (quote enable-flow-control-on) "flow-ctrl" "\ +Enable flow control if using one of a specified set of terminal types. +Use `(enable-flow-control-on \"vt100\" \"h19\")' to enable flow control +on VT-100 and H19 terminals. When flow control is enabled, +you must type C-\\ to get the effect of a C-s, and type C-^ +to get the effect of a C-q. + +\(fn &rest LOSING-TERMINAL-TYPES)" nil nil) + +;;;*** + +;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off +;;;;;; flyspell-version flyspell-mode flyspell-prog-mode flyspell-mode-line-string) +;;;;;; "flyspell" "textmodes/flyspell.el" (16211 27043)) +;;; Generated autoloads from textmodes/flyspell.el + +(defvar flyspell-mode-line-string " Fly" "\ +*String displayed on the modeline when flyspell is active. +Set this to nil if you don't want a modeline indicator.") + +(custom-autoload (quote flyspell-mode-line-string) "flyspell") + +(autoload (quote flyspell-prog-mode) "flyspell" "\ +Turn on `flyspell-mode' for comments and strings. + +\(fn)" t nil) + +(defvar flyspell-mode nil) + +(defvar flyspell-mode-map (make-sparse-keymap)) + +(autoload (quote flyspell-mode) "flyspell" "\ +Minor mode performing on-the-fly spelling checking. +Ispell is automatically spawned on background for each entered words. +The default flyspell behavior is to highlight incorrect words. +With no argument, this command toggles Flyspell mode. +With a prefix argument ARG, turn Flyspell minor mode on iff ARG is positive. + +Bindings: +\\[ispell-word]: correct words (using Ispell). +\\[flyspell-auto-correct-word]: automatically correct word. +\\[flyspell-correct-word] (or mouse-2): popup correct words. + +Hooks: +This runs `flyspell-mode-hook' after flyspell is entered. + +Remark: +`flyspell-mode' uses `ispell-mode'. Thus all Ispell options are +valid. For instance, a personal dictionary can be used by +invoking `ispell-change-dictionary'. + +Consider using the `ispell-parser' to check your text. For instance +consider adding: +\(add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 'tex)))) +in your .emacs file. + +\\[flyspell-region] checks all words inside a region. +\\[flyspell-buffer] checks the whole buffer. + +\(fn &optional ARG)" t nil) + +(add-minor-mode (quote flyspell-mode) (quote flyspell-mode-line-string) flyspell-mode-map nil (quote flyspell-mode)) + +(autoload (quote flyspell-version) "flyspell" "\ +The flyspell version + +\(fn)" t nil) + +(autoload (quote flyspell-mode-off) "flyspell" "\ +Turn Flyspell mode off. + +\(fn)" nil nil) + +(autoload (quote flyspell-region) "flyspell" "\ +Flyspell text between BEG and END. + +\(fn BEG END)" t nil) + +(autoload (quote flyspell-buffer) "flyspell" "\ +Flyspell whole buffer. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (follow-delete-other-windows-and-split follow-mode +;;;;;; turn-off-follow-mode turn-on-follow-mode) "follow" "follow.el" +;;;;;; (16211 27016)) +;;; Generated autoloads from follow.el + +(autoload (quote turn-on-follow-mode) "follow" "\ +Turn on Follow mode. Please see the function `follow-mode'. + +\(fn)" t nil) + +(autoload (quote turn-off-follow-mode) "follow" "\ +Turn off Follow mode. Please see the function `follow-mode'. + +\(fn)" t nil) + +(autoload (quote follow-mode) "follow" "\ +Minor mode that combines windows into one tall virtual window. + +The feeling of a \"virtual window\" has been accomplished by the use +of two major techniques: + +* The windows always displays adjacent sections of the buffer. + This means that whenever one window is moved, all the + others will follow. (Hence the name Follow Mode.) + +* Should the point (cursor) end up outside a window, another + window displaying that point is selected, if possible. This + makes it possible to walk between windows using normal cursor + movement commands. + +Follow mode comes to its prime when used on a large screen and two +side-by-side window are used. The user can, with the help of Follow +mode, use two full-height windows as though they would have been +one. Imagine yourself editing a large function, or section of text, +and being able to use 144 lines instead of the normal 72... (your +mileage may vary). + +To split one large window into two side-by-side windows, the commands +`\\[split-window-horizontally]' or `M-x follow-delete-other-windows-and-split' can be used. + +Only windows displayed in the same frame follow each-other. + +If the variable `follow-intercept-processes' is non-nil, Follow mode +will listen to the output of processes and redisplay accordingly. +\(This is the default.) + +When Follow mode is switched on, the hook `follow-mode-hook' +is called. When turned off, `follow-mode-off-hook' is called. + +Keys specific to Follow mode: +\\{follow-mode-map} + +\(fn ARG)" t nil) + +(autoload (quote follow-delete-other-windows-and-split) "follow" "\ +Create two side by side windows and enter Follow Mode. + +Execute this command to display as much as possible of the text +in the selected window. All other windows, in the current +frame, are deleted and the selected window is split in two +side-by-side windows. Follow Mode is activated, hence the +two windows always will display two successive pages. +\(If one window is moved, the other one will follow.) + +If ARG is positive, the leftmost window is selected. If it negative, +the rightmost is selected. If ARG is nil, the leftmost window is +selected if the original window is the first one in the frame. + +To bind this command to a hotkey, place the following line +in your `~/.emacs' file, replacing [f7] by your favourite key: + (global-set-key [f7] 'follow-delete-other-windows-and-split) + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (font-lock-fontify-buffer font-lock-remove-keywords +;;;;;; font-lock-add-keywords font-lock-mode-internal) "font-lock" +;;;;;; "font-lock.el" (16211 27016)) +;;; Generated autoloads from font-lock.el + +(autoload (quote font-lock-mode-internal) "font-lock" "\ +Not documented + +\(fn ARG)" nil nil) + +(autoload (quote font-lock-add-keywords) "font-lock" "\ +Add highlighting KEYWORDS for MODE. +MODE should be a symbol, the major mode command name, such as `c-mode' +or nil. If nil, highlighting keywords are added for the current buffer. +KEYWORDS should be a list; see the variable `font-lock-keywords'. +By default they are added at the beginning of the current highlighting list. +If optional argument APPEND is `set', they are used to replace the current +highlighting list. If APPEND is any other non-nil value, they are added at the +end of the current highlighting list. + +For example: + + (font-lock-add-keywords 'c-mode + '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend) + (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" . font-lock-keyword-face))) + +adds two fontification patterns for C mode, to fontify `FIXME:' words, even in +comments, and to fontify `and', `or' and `not' words as keywords. + +When used from an elisp package (such as a minor mode), it is recommended +to use nil for MODE (and place the call in a loop or on a hook) to avoid +subtle problems due to details of the implementation. + +Note that some modes have specialized support for additional patterns, e.g., +see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', +`objc-font-lock-extra-types' and `java-font-lock-extra-types'. + +\(fn MODE KEYWORDS &optional APPEND)" nil nil) + +(autoload (quote font-lock-remove-keywords) "font-lock" "\ +Remove highlighting KEYWORDS for MODE. + +MODE should be a symbol, the major mode command name, such as `c-mode' +or nil. If nil, highlighting keywords are removed for the current buffer. + +When used from an elisp package (such as a minor mode), it is recommended +to use nil for MODE (and place the call in a loop or on a hook) to avoid +subtle problems due to details of the implementation. + +\(fn MODE KEYWORDS)" nil nil) + +(autoload (quote font-lock-fontify-buffer) "font-lock" "\ +Fontify the current buffer the way the function `font-lock-mode' would. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (16211 +;;;;;; 27033)) +;;; Generated autoloads from mail/footnote.el + +(autoload (quote footnote-mode) "footnote" "\ +Toggle footnote minor mode. +\\ +key binding +--- ------- + +\\[Footnote-renumber-footnotes] Footnote-renumber-footnotes +\\[Footnote-goto-footnote] Footnote-goto-footnote +\\[Footnote-delete-footnote] Footnote-delete-footnote +\\[Footnote-cycle-style] Footnote-cycle-style +\\[Footnote-back-to-message] Footnote-back-to-message +\\[Footnote-add-footnote] Footnote-add-footnote + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (forms-find-file-other-window forms-find-file forms-mode) +;;;;;; "forms" "forms.el" (16211 27016)) +;;; Generated autoloads from forms.el + +(autoload (quote forms-mode) "forms" "\ +Major mode to visit files in a field-structured manner using a form. + +Commands: Equivalent keys in read-only mode: + TAB forms-next-field TAB + C-c TAB forms-next-field + C-c < forms-first-record < + C-c > forms-last-record > + C-c ? describe-mode ? + C-c C-k forms-delete-record + C-c C-q forms-toggle-read-only q + C-c C-o forms-insert-record + C-c C-l forms-jump-record l + C-c C-n forms-next-record n + C-c C-p forms-prev-record p + C-c C-r forms-search-reverse r + C-c C-s forms-search-forward s + C-c C-x forms-exit x + +\(fn &optional PRIMARY)" t nil) + +(autoload (quote forms-find-file) "forms" "\ +Visit a file in Forms mode. + +\(fn FN)" t nil) + +(autoload (quote forms-find-file-other-window) "forms" "\ +Visit a file in Forms mode in other window. + +\(fn FN)" t nil) + +;;;*** + +;;;### (autoloads (fortran-mode fortran-tab-mode-default) "fortran" +;;;;;; "progmodes/fortran.el" (16211 27039)) +;;; Generated autoloads from progmodes/fortran.el + +(defvar fortran-tab-mode-default nil "\ +*Default tabbing/carriage control style for empty files in Fortran mode. +A non-nil value specifies tab-digit style of continuation control. +A value of nil specifies that continuation lines are marked +with a character in column 6.") + +(custom-autoload (quote fortran-tab-mode-default) "fortran") + +(autoload (quote fortran-mode) "fortran" "\ +Major mode for editing Fortran code in fixed format. +For free format code, use `f90-mode'. + +\\[fortran-indent-line] indents the current Fortran line correctly. +Note that DO statements must not share a common CONTINUE. + +Type ;? or ;\\[help-command] to display a list of built-in abbrevs for Fortran keywords. + +Key definitions: +\\{fortran-mode-map} + +Variables controlling indentation style and extra features: + +`comment-start' + To use comments starting with `!', set this to the string \"!\". +`fortran-do-indent' + Extra indentation within DO blocks (default 3). +`fortran-if-indent' + Extra indentation within IF blocks (default 3). +`fortran-structure-indent' + Extra indentation within STRUCTURE, UNION, MAP and INTERFACE blocks. + (default 3) +`fortran-continuation-indent' + Extra indentation applied to continuation statements (default 5). +`fortran-comment-line-extra-indent' + Amount of extra indentation for text in full-line comments (default 0). +`fortran-comment-indent-style' + How to indent the text in full-line comments. Allowed values are: + nil don't change the indentation + fixed indent to `fortran-comment-line-extra-indent' beyond the + value of either + `fortran-minimum-statement-indent-fixed' (fixed format) or + `fortran-minimum-statement-indent-tab' (TAB format), + depending on the continuation format in use. + relative indent to `fortran-comment-line-extra-indent' beyond the + indentation for a line of code. + (default 'fixed) +`fortran-comment-indent-char' + Single-character string to be inserted instead of space for + full-line comment indentation (default \" \"). +`fortran-minimum-statement-indent-fixed' + Minimum indentation for statements in fixed format mode (default 6). +`fortran-minimum-statement-indent-tab' + Minimum indentation for statements in TAB format mode (default 9). +`fortran-line-number-indent' + Maximum indentation for line numbers (default 1). A line number will + get less than this much indentation if necessary to avoid reaching + column 5. +`fortran-check-all-num-for-matching-do' + Non-nil causes all numbered lines to be treated as possible \"continue\" + statements (default nil). +`fortran-blink-matching-if' + Non-nil causes \\[fortran-indent-line] on an ENDIF (or ENDDO) statement + to blink on the matching IF (or DO [WHILE]). (default nil) +`fortran-continuation-string' + Single-character string to be inserted in column 5 of a continuation + line (default \"$\"). +`fortran-comment-region' + String inserted by \\[fortran-comment-region] at start of each line in + the region (default \"c$$$\"). +`fortran-electric-line-number' + Non-nil causes line number digits to be moved to the correct column + as typed (default t). +`fortran-break-before-delimiters' + Non-nil causes lines to be broken before delimiters (default t). + +Turning on Fortran mode calls the value of the variable `fortran-mode-hook' +with no args, if that value is non-nil. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (fortune fortune-to-signature fortune-compile fortune-from-region +;;;;;; fortune-add-fortune) "fortune" "play/fortune.el" (16211 27038)) +;;; Generated autoloads from play/fortune.el + +(autoload (quote fortune-add-fortune) "fortune" "\ +Add STRING to a fortune file FILE. + +Interactively, if called with a prefix argument, +read the file name to use. Otherwise use the value of `fortune-file'. + +\(fn STRING FILE)" t nil) + +(autoload (quote fortune-from-region) "fortune" "\ +Append the current region to a local fortune-like data file. + +Interactively, if called with a prefix argument, +read the file name to use. Otherwise use the value of `fortune-file'. + +\(fn BEG END FILE)" t nil) + +(autoload (quote fortune-compile) "fortune" "\ +Compile fortune file. + +If called with a prefix asks for the FILE to compile, otherwise uses +the value of `fortune-file'. This currently cannot handle directories. + +\(fn &optional FILE)" t nil) + +(autoload (quote fortune-to-signature) "fortune" "\ +Create signature from output of the fortune program. + +If called with a prefix asks for the FILE to choose the fortune from, +otherwise uses the value of `fortune-file'. If you want to have fortune +choose from a set of files in a directory, call interactively with prefix +and choose the directory as the fortune-file. + +\(fn &optional FILE)" t nil) + +(autoload (quote fortune) "fortune" "\ +Display a fortune cookie. + +If called with a prefix asks for the FILE to choose the fortune from, +otherwise uses the value of `fortune-file'. If you want to have fortune +choose from a set of files in a directory, call interactively with prefix +and choose the directory as the fortune-file. + +\(fn &optional FILE)" t nil) + +;;;*** + +;;;### (autoloads (set-fringe-style fringe-mode fringe-mode) "fringe" +;;;;;; "fringe.el" (16271 3439)) +;;; Generated autoloads from fringe.el + +(defvar fringe-mode nil "\ +*Specify appearance of fringes on all frames. +This variable can be nil (the default) meaning the fringes should have +the default width (8 pixels), it can be an integer value specifying +the width of both left and right fringe (where 0 means no fringe), or +a cons cell where car indicates width of left fringe and cdr indicates +width of right fringe (where again 0 can be used to indicate no +fringe). +To set this variable in a Lisp program, use `set-fringe-mode' to make +it take real effect. +Setting the variable with a customization buffer also takes effect. +If you only want to modify the appearance of the fringe in one frame, +you can use the interactive function `toggle-fringe'") + +(custom-autoload (quote fringe-mode) "fringe") + +(autoload (quote fringe-mode) "fringe" "\ +Set the default appearance of fringes on all frames. + +When called interactively, query the user for MODE. Valid values +for MODE include `none', `default', `left-only', `right-only', +`minimal' and `half'. + +When used in a Lisp program, MODE can be a cons cell where the +integer in car specifies the left fringe width and the integer in +cdr specifies the right fringe width. MODE can also be a single +integer that specifies both the left and the right fringe width. +If a fringe width specification is nil, that means to use the +default width (8 pixels). This command may round up the left and +right width specifications to ensure that their sum is a multiple +of the character width of a frame. It never rounds up a fringe +width of 0. + +Fringe widths set by `set-window-fringes' override the default +fringe widths set by this command. This command applies to all +frames that exist and frames to be created in the future. If you +want to set the default appearance of fringes on the selected +frame only, see the command `set-fringe-style'. + +\(fn &optional MODE)" t nil) + +(autoload (quote set-fringe-style) "fringe" "\ +Set the default appearance of fringes on the selected frame. + +When called interactively, query the user for MODE. Valid values +for MODE include `none', `default', `left-only', `right-only', +`minimal' and `half'. + +When used in a Lisp program, MODE can be a cons cell where the +integer in car specifies the left fringe width and the integer in +cdr specifies the right fringe width. MODE can also be a single +integer that specifies both the left and the right fringe width. +If a fringe width specification is nil, that means to use the +default width (8 pixels). This command may round up the left and +right width specifications to ensure that their sum is a multiple +of the character width of a frame. It never rounds up a fringe +width of 0. + +Fringe widths set by `set-window-fringes' override the default +fringe widths set by this command. If you want to set the +default appearance of fringes on all frames, see the command +`fringe-mode'. + +\(fn &optional MODE)" t nil) + +;;;*** + +;;;### (autoloads (gdba) "gdb-ui" "gdb-ui.el" (16278 45828)) +;;; Generated autoloads from gdb-ui.el + +(autoload (quote gdba) "gdb-ui" "\ +Run gdb on program FILE in buffer *gud-FILE*. +The directory containing FILE becomes the initial working directory +and source-file directory for your debugger. + +If `gdb-many-windows' is nil (the default value) then gdb starts with +just two windows : the GUD and the source buffer. If it is t the +following layout will appear (keybindings given in relevant buffer) : + +--------------------------------------------------------------------- + GDB Toolbar +--------------------------------------------------------------------- +GUD buffer (I/O of GDB) | Locals buffer + | + | + | +--------------------------------------------------------------------- +Source buffer | Input/Output (of debuggee) buffer + | (comint-mode) + | + | + | + | + | + | +--------------------------------------------------------------------- +Stack buffer | Breakpoints buffer + RET gdb-frames-select | SPC gdb-toggle-breakpoint + | RET gdb-goto-breakpoint + | d gdb-delete-breakpoint +--------------------------------------------------------------------- + +All the buffers share the toolbar and source should always display in the same +window e.g after typing g on a breakpoint in the breakpoints buffer. Breakpoint +icons are displayed both by setting a break with gud-break and by typing break +in the GUD buffer. + +This works best (depending on the size of your monitor) using most of the +screen. + +Displayed expressions appear in separate frames. Arrays may be displayed +as slices and visualised using the graph program from plotutils if installed. +Pointers in structures may be followed in a tree-like fashion. + +The following interactive lisp functions help control operation : + +`gdb-many-windows' - Toggle the number of windows gdb uses. +`gdb-restore-windows' - To restore the window layout. + +\(fn COMMAND-LINE)" t nil) + +;;;*** + +;;;### (autoloads (generic-mode define-generic-mode) "generic" "generic.el" +;;;;;; (16211 27016)) +;;; Generated autoloads from generic.el + +(autoload (quote define-generic-mode) "generic" "\ +Create a new generic mode with NAME. + +Args: (NAME COMMENT-LIST KEYWORD-LIST FONT-LOCK-LIST AUTO-MODE-LIST + FUNCTION-LIST &optional DESCRIPTION) + +NAME should be a symbol; its string representation is used as the function +name. If DESCRIPTION is provided, it is used as the docstring for the new +function. + +COMMENT-LIST is a list, whose entries are either a single character, +a one or two character string or a cons pair. If the entry is a character +or a one-character string, it is added to the mode's syntax table with +`comment-start' syntax. If the entry is a cons pair, the elements of the +pair are considered to be `comment-start' and `comment-end' respectively. +Note that Emacs has limitations regarding comment characters. + +KEYWORD-LIST is a list of keywords to highlight with `font-lock-keyword-face'. +Each keyword should be a string. + +FONT-LOCK-LIST is a list of additional expressions to highlight. Each entry +in the list should have the same form as an entry in `font-lock-defaults-alist' + +AUTO-MODE-LIST is a list of regular expressions to add to `auto-mode-alist'. +These regexps are added to `auto-mode-alist' as soon as `define-generic-mode' +is called; any old regexps with the same name are removed. + +FUNCTION-LIST is a list of functions to call to do some additional setup. + +See the file generic-x.el for some examples of `define-generic-mode'. + +\(fn NAME COMMENT-LIST KEYWORD-LIST FONT-LOCK-LIST AUTO-MODE-LIST FUNCTION-LIST &optional DESCRIPTION)" nil nil) + +(autoload (quote generic-mode) "generic" "\ +Basic comment and font-lock functionality for `generic' files. +\(Files which are too small to warrant their own mode, but have +comment characters, keywords, and the like.) + +To define a generic-mode, use the function `define-generic-mode'. +Some generic modes are defined in `generic-x.el'. + +\(fn TYPE)" t nil) + +;;;*** + +;;;### (autoloads (glasses-mode) "glasses" "progmodes/glasses.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/glasses.el + +(autoload (quote glasses-mode) "glasses" "\ +Minor mode for making identifiers likeThis readable. +When this mode is active, it tries to add virtual separators (like underscores) +at places they belong to. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (gnus gnus-other-frame gnus-slave gnus-no-server +;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (16211 27028)) +;;; Generated autoloads from gnus/gnus.el + +(autoload (quote gnus-slave-no-server) "gnus" "\ +Read network news as a slave, without connecting to local server. + +\(fn &optional ARG)" t nil) + +(autoload (quote gnus-no-server) "gnus" "\ +Read network news. +If ARG is a positive number, Gnus will use that as the +startup level. If ARG is nil, Gnus will be started at level 2. +If ARG is non-nil and not a positive number, Gnus will +prompt the user for the name of an NNTP server to use. +As opposed to `gnus', this command will not connect to the local server. + +\(fn &optional ARG SLAVE)" t nil) + +(autoload (quote gnus-slave) "gnus" "\ +Read news as a slave. + +\(fn &optional ARG)" t nil) + +(autoload (quote gnus-other-frame) "gnus" "\ +Pop up a frame to read news. + +\(fn &optional ARG)" t nil) + +(autoload (quote gnus) "gnus" "\ +Read network news. +If ARG is non-nil and a positive number, Gnus will use that as the +startup level. If ARG is non-nil and not a positive number, Gnus will +prompt the user for the name of an NNTP server to use. + +\(fn &optional ARG DONT-CONNECT SLAVE)" t nil) + +;;;*** + +;;;### (autoloads (gnus-agent-batch gnus-agent-batch-fetch gnus-agentize +;;;;;; gnus-plugged gnus-unplugged) "gnus-agent" "gnus/gnus-agent.el" +;;;;;; (16211 27027)) +;;; Generated autoloads from gnus/gnus-agent.el + +(autoload (quote gnus-unplugged) "gnus-agent" "\ +Start Gnus unplugged. + +\(fn)" t nil) + +(autoload (quote gnus-plugged) "gnus-agent" "\ +Start Gnus plugged. + +\(fn)" t nil) + +(autoload (quote gnus-agentize) "gnus-agent" "\ +Allow Gnus to be an offline newsreader. +The normal usage of this command is to put the following as the +last form in your `.gnus.el' file: + +\(gnus-agentize) + +This will modify the `gnus-before-startup-hook', `gnus-post-method', +and `message-send-mail-function' variables, and install the Gnus +agent minor mode in all Gnus buffers. + +\(fn)" t nil) + +(autoload (quote gnus-agent-batch-fetch) "gnus-agent" "\ +Start Gnus and fetch session. + +\(fn)" t nil) + +(autoload (quote gnus-agent-batch) "gnus-agent" "\ +Not documented + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (gnus-article-prepare-display) "gnus-art" "gnus/gnus-art.el" +;;;;;; (16211 27027)) +;;; Generated autoloads from gnus/gnus-art.el + +(autoload (quote gnus-article-prepare-display) "gnus-art" "\ +Make the current buffer look like a nice article. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (gnus-audio-play) "gnus-audio" "gnus/gnus-audio.el" +;;;;;; (16211 27027)) +;;; Generated autoloads from gnus/gnus-audio.el + +(autoload (quote gnus-audio-play) "gnus-audio" "\ +Play a sound FILE through the speaker. + +\(fn FILE)" t nil) + +;;;*** + +;;;### (autoloads (gnus-cache-generate-nov-databases gnus-cache-generate-active +;;;;;; gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el" (16211 +;;;;;; 27028)) +;;; Generated autoloads from gnus/gnus-cache.el + +(autoload (quote gnus-jog-cache) "gnus-cache" "\ +Go through all groups and put the articles into the cache. + +Usage: +$ emacs -batch -l ~/.emacs -l gnus -f gnus-jog-cache + +\(fn)" t nil) + +(autoload (quote gnus-cache-generate-active) "gnus-cache" "\ +Generate the cache active file. + +\(fn &optional DIRECTORY)" t nil) + +(autoload (quote gnus-cache-generate-nov-databases) "gnus-cache" "\ +Generate NOV files recursively starting in DIR. + +\(fn DIR)" t nil) + +;;;*** + +;;;### (autoloads (gnus-fetch-group-other-frame gnus-fetch-group) +;;;;;; "gnus-group" "gnus/gnus-group.el" (16211 27028)) +;;; Generated autoloads from gnus/gnus-group.el + +(autoload (quote gnus-fetch-group) "gnus-group" "\ +Start Gnus if necessary and enter GROUP. +Returns whether the fetching was successful or not. + +\(fn GROUP)" t nil) + +(autoload (quote gnus-fetch-group-other-frame) "gnus-group" "\ +Pop up a frame and enter GROUP. + +\(fn GROUP)" t nil) + +;;;*** + +;;;### (autoloads (gnus-batch-score) "gnus-kill" "gnus/gnus-kill.el" +;;;;;; (16211 27028)) +;;; Generated autoloads from gnus/gnus-kill.el + +(defalias (quote gnus-batch-kill) (quote gnus-batch-score)) + +(autoload (quote gnus-batch-score) "gnus-kill" "\ +Run batched scoring. +Usage: emacs -batch -l ~/.emacs -l gnus -f gnus-batch-score + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (gnus-mailing-list-mode turn-on-gnus-mailing-list-mode) +;;;;;; "gnus-ml" "gnus/gnus-ml.el" (16211 27028)) +;;; Generated autoloads from gnus/gnus-ml.el + +(autoload (quote turn-on-gnus-mailing-list-mode) "gnus-ml" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote gnus-mailing-list-mode) "gnus-ml" "\ +Minor mode for providing mailing-list commands. + +\\{gnus-mailing-list-mode-map} + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (gnus-group-split-fancy gnus-group-split gnus-group-split-update +;;;;;; gnus-group-split-setup) "gnus-mlspl" "gnus/gnus-mlspl.el" +;;;;;; (16211 27028)) +;;; Generated autoloads from gnus/gnus-mlspl.el + +(autoload (quote gnus-group-split-setup) "gnus-mlspl" "\ +Set up the split for nnmail-split-fancy. +Sets things up so that nnmail-split-fancy is used for mail +splitting, and defines the variable nnmail-split-fancy according with +group parameters. + +If AUTO-UPDATE is non-nil (prefix argument accepted, if called +interactively), it makes sure nnmail-split-fancy is re-computed before +getting new mail, by adding gnus-group-split-update to +nnmail-pre-get-new-mail-hook. + +A non-nil CATCH-ALL replaces the current value of +gnus-group-split-default-catch-all-group. This variable is only used +by gnus-group-split-update, and only when its CATCH-ALL argument is +nil. This argument may contain any fancy split, that will be added as +the last split in a `|' split produced by gnus-group-split-fancy, +unless overridden by any group marked as a catch-all group. Typical +uses are as simple as the name of a default mail group, but more +elaborate fancy splits may also be useful to split mail that doesn't +match any of the group-specified splitting rules. See +gnus-group-split-fancy for details. + +\(fn &optional AUTO-UPDATE CATCH-ALL)" t nil) + +(autoload (quote gnus-group-split-update) "gnus-mlspl" "\ +Computes nnmail-split-fancy from group params and CATCH-ALL, by +calling (gnus-group-split-fancy nil nil CATCH-ALL). + +If CATCH-ALL is nil, gnus-group-split-default-catch-all-group is used +instead. This variable is set by gnus-group-split-setup. + +\(fn &optional CATCH-ALL)" t nil) + +(autoload (quote gnus-group-split) "gnus-mlspl" "\ +Uses information from group parameters in order to split mail. +See gnus-group-split-fancy for more information. + +gnus-group-split is a valid value for nnmail-split-methods. + +\(fn)" nil nil) + +(autoload (quote gnus-group-split-fancy) "gnus-mlspl" "\ +Uses information from group parameters in order to split mail. +It can be embedded into `nnmail-split-fancy' lists with the SPLIT + +\(: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL) + +GROUPS may be a regular expression or a list of group names, that will +be used to select candidate groups. If it is omitted or nil, all +existing groups are considered. + +if NO-CROSSPOST is omitted or nil, a & split will be returned, +otherwise, a | split, that does not allow crossposting, will be +returned. + +For each selected group, a SPLIT is composed like this: if SPLIT-SPEC +is specified, this split is returned as-is (unless it is nil: in this +case, the group is ignored). Otherwise, if TO-ADDRESS, TO-LIST and/or +EXTRA-ALIASES are specified, a regexp that matches any of them is +constructed (extra-aliases may be a list). Additionally, if +SPLIT-REGEXP is specified, the regexp will be extended so that it +matches this regexp too, and if SPLIT-EXCLUDE is specified, RESTRICT +clauses will be generated. + +If CATCH-ALL is nil, no catch-all handling is performed, regardless of +catch-all marks in group parameters. Otherwise, if there is no +selected group whose SPLIT-REGEXP matches the empty string, nor is +there a selected group whose SPLIT-SPEC is 'catch-all, this fancy +split (say, a group name) will be appended to the returned SPLIT list, +as the last element of a '| SPLIT. + +For example, given the following group parameters: + +nnml:mail.bar: +\((to-address . \"bar@femail.com\") + (split-regexp . \".*@femail\\\\.com\")) +nnml:mail.foo: +\((to-list . \"foo@nowhere.gov\") + (extra-aliases \"foo@localhost\" \"foo-redist@home\") + (split-exclude \"bugs-foo\" \"rambling-foo\") + (admin-address . \"foo-request@nowhere.gov\")) +nnml:mail.others: +\((split-spec . catch-all)) + +Calling (gnus-group-split-fancy nil nil \"mail.misc\") returns: + +\(| (& (any \"\\\\(bar@femail\\\\.com\\\\|.*@femail\\\\.com\\\\)\" + \"mail.bar\") + (any \"\\\\(foo@nowhere\\\\.gov\\\\|foo@localhost\\\\|foo-redist@home\\\\)\" + - \"bugs-foo\" - \"rambling-foo\" \"mail.foo\")) + \"mail.others\") + +\(fn &optional GROUPS NO-CROSSPOST CATCH-ALL)" nil nil) + +;;;*** + +;;;### (autoloads (gnus-change-server) "gnus-move" "gnus/gnus-move.el" +;;;;;; (16211 27028)) +;;; Generated autoloads from gnus/gnus-move.el + +(autoload (quote gnus-change-server) "gnus-move" "\ +Move from FROM-SERVER to TO-SERVER. +Update the .newsrc.eld file to reflect the change of nntp server. + +\(fn FROM-SERVER TO-SERVER)" t nil) + +;;;*** + +;;;### (autoloads (gnus-msg-mail) "gnus-msg" "gnus/gnus-msg.el" (16211 +;;;;;; 27028)) +;;; Generated autoloads from gnus/gnus-msg.el + +(autoload (quote gnus-msg-mail) "gnus-msg" "\ +Start editing a mail message to be sent. +Like `message-mail', but with Gnus paraphernalia, particularly the +Gcc: header for archiving purposes. + +\(fn &rest ARGS)" t nil) + +(define-mail-user-agent (quote gnus-user-agent) (quote gnus-msg-mail) (quote message-send-and-exit) (quote message-kill-buffer) (quote message-send-hook)) + +;;;*** + +;;;### (autoloads (gnus-mule-add-group) "gnus-mule" "gnus/gnus-mule.el" +;;;;;; (16211 27028)) +;;; Generated autoloads from gnus/gnus-mule.el + +(autoload (quote gnus-mule-add-group) "gnus-mule" "\ +Specify that articles of news group NAME are encoded in CODING-SYSTEM. +All news groups deeper than NAME are also the target. +If CODING-SYSTEM is a cons, the car part is used and the cdr +part is ignored. + +This function exists for backward compatibility with Emacs 20. It is +recommended to customize the variable `gnus-group-charset-alist' +rather than using this function. + +\(fn NAME CODING-SYSTEM)" nil nil) + +;;;*** + +;;;### (autoloads (gnus-batch-brew-soup) "gnus-soup" "gnus/gnus-soup.el" +;;;;;; (16211 27028)) +;;; Generated autoloads from gnus/gnus-soup.el + +(autoload (quote gnus-batch-brew-soup) "gnus-soup" "\ +Brew a SOUP packet from groups mention on the command line. +Will use the remaining command line arguments as regular expressions +for matching on group names. + +For instance, if you want to brew on all the nnml groups, as well as +groups with \"emacs\" in the name, you could say something like: + +$ emacs -batch -f gnus-batch-brew-soup ^nnml \".*emacs.*\" + +Note -- this function hasn't been implemented yet. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (gnus-update-format) "gnus-spec" "gnus/gnus-spec.el" +;;;;;; (16211 27028)) +;;; Generated autoloads from gnus/gnus-spec.el + +(autoload (quote gnus-update-format) "gnus-spec" "\ +Update the format specification near point. + +\(fn VAR)" t nil) + +;;;*** + +;;;### (autoloads (gnus-declare-backend gnus-unload) "gnus-start" +;;;;;; "gnus/gnus-start.el" (16211 27028)) +;;; Generated autoloads from gnus/gnus-start.el + +(autoload (quote gnus-unload) "gnus-start" "\ +Unload all Gnus features. +\(For some value of `all' or `Gnus'.) Currently, features whose names +have prefixes `gnus-', `nn', `mm-' or `rfc' are unloaded. Use +cautiously -- unloading may cause trouble. + +\(fn)" t nil) + +(autoload (quote gnus-declare-backend) "gnus-start" "\ +Declare backend NAME with ABILITIES as a Gnus backend. + +\(fn NAME &rest ABILITIES)" nil nil) + +;;;*** + +;;;### (autoloads (gnus-add-configuration) "gnus-win" "gnus/gnus-win.el" +;;;;;; (16211 27028)) +;;; Generated autoloads from gnus/gnus-win.el + +(autoload (quote gnus-add-configuration) "gnus-win" "\ +Add the window configuration CONF to `gnus-buffer-configuration'. + +\(fn CONF)" nil nil) + +;;;*** + +;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (16211 27038)) +;;; Generated autoloads from play/gomoku.el + +(autoload (quote gomoku) "gomoku" "\ +Start a Gomoku game between you and Emacs. + +If a game is in progress, this command allow you to resume it. +If optional arguments N and M are given, an N by M board is used. +If prefix arg is given for N, M is prompted for. + +You and Emacs play in turn by marking a free square. You mark it with X +and Emacs marks it with O. The winner is the first to get five contiguous +marks horizontally, vertically or in diagonal. + +You play by moving the cursor over the square you choose and hitting +\\\\[gomoku-human-plays]. + +This program actually plays a simplified or archaic version of the +Gomoku game, and ought to be upgraded to use the full modern rules. + +Use \\[describe-mode] for more info. + +\(fn &optional N M)" t nil) + +;;;*** + +;;;### (autoloads (goto-address goto-address-at-point goto-address-at-mouse) +;;;;;; "goto-addr" "net/goto-addr.el" (16211 27037)) +;;; Generated autoloads from net/goto-addr.el + +(autoload (quote goto-address-at-mouse) "goto-addr" "\ +Send to the e-mail address or load the URL clicked with the mouse. +Send mail to address at position of mouse click. See documentation for +`goto-address-find-address-at-point'. If no address is found +there, then load the URL at or before the position of the mouse click. + +\(fn EVENT)" t nil) + +(autoload (quote goto-address-at-point) "goto-addr" "\ +Send to the e-mail address or load the URL at point. +Send mail to address at point. See documentation for +`goto-address-find-address-at-point'. If no address is found +there, then load the URL at or before point. + +\(fn)" t nil) + +(autoload (quote goto-address) "goto-addr" "\ +Sets up goto-address functionality in the current buffer. +Allows user to use mouse/keyboard command to click to go to a URL +or to send e-mail. +By default, goto-address binds to mouse-2 and C-c RET. + +Also fontifies the buffer appropriately (see `goto-address-fontify-p' and +`goto-address-highlight-p' for more information). + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (gs-load-image) "gs" "gs.el" (16211 27016)) +;;; Generated autoloads from gs.el + +(autoload (quote gs-load-image) "gs" "\ +Load a PS image for display on FRAME. +SPEC is an image specification, IMG-HEIGHT and IMG-WIDTH are width +and height of the image in pixels. WINDOW-AND-PIXMAP-ID is a string of +the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful. + +\(fn FRAME SPEC IMG-WIDTH IMG-HEIGHT WINDOW-AND-PIXMAP-ID PIXEL-COLORS)" nil nil) + +;;;*** + +;;;### (autoloads (gdb-script-mode bashdb jdb pdb perldb xdb dbx +;;;;;; sdb gdb) "gud" "progmodes/gud.el" (16278 45828)) +;;; Generated autoloads from progmodes/gud.el + +(autoload (quote gdb) "gud" "\ +Run gdb on program FILE in buffer *gud-FILE*. +The directory containing FILE becomes the initial working directory +and source-file directory for your debugger. + +\(fn COMMAND-LINE)" t nil) + +(autoload (quote sdb) "gud" "\ +Run sdb on program FILE in buffer *gud-FILE*. +The directory containing FILE becomes the initial working directory +and source-file directory for your debugger. + +\(fn COMMAND-LINE)" t nil) + +(autoload (quote dbx) "gud" "\ +Run dbx on program FILE in buffer *gud-FILE*. +The directory containing FILE becomes the initial working directory +and source-file directory for your debugger. + +\(fn COMMAND-LINE)" t nil) + +(autoload (quote xdb) "gud" "\ +Run xdb on program FILE in buffer *gud-FILE*. +The directory containing FILE becomes the initial working directory +and source-file directory for your debugger. + +You can set the variable 'gud-xdb-directories' to a list of program source +directories if your program contains sources from more than one directory. + +\(fn COMMAND-LINE)" t nil) + +(autoload (quote perldb) "gud" "\ +Run perldb on program FILE in buffer *gud-FILE*. +The directory containing FILE becomes the initial working directory +and source-file directory for your debugger. + +\(fn COMMAND-LINE)" t nil) + +(autoload (quote pdb) "gud" "\ +Run pdb on program FILE in buffer `*gud-FILE*'. +The directory containing FILE becomes the initial working directory +and source-file directory for your debugger. + +\(fn COMMAND-LINE)" t nil) + +(autoload (quote jdb) "gud" "\ +Run jdb with command line COMMAND-LINE in a buffer. +The buffer is named \"*gud*\" if no initial class is given or +\"*gud-*\" if there is. If the \"-classpath\" +switch is given, omit all whitespace between it and its value. + +See `gud-jdb-use-classpath' and `gud-jdb-classpath' documentation for +information on how jdb accesses source files. Alternatively (if +`gud-jdb-use-classpath' is nil), see `gud-jdb-directories' for the +original source file access method. + +For general information about commands available to control jdb from +gud, see `gud-mode'. + +\(fn COMMAND-LINE)" t nil) + +(autoload (quote bashdb) "gud" "\ +Run bashdb on program FILE in buffer *gud-FILE*. +The directory containing FILE becomes the initial working directory +and source-file directory for your debugger. + +\(fn COMMAND-LINE)" t nil) + (add-hook 'same-window-regexps "\\*gud-.*\\*\\(\\|<[0-9]+>\\)") + +(add-to-list (quote auto-mode-alist) (quote ("/\\.gdbinit" . gdb-script-mode))) + +(autoload (quote gdb-script-mode) "gud" "\ +Major mode for editing GDB scripts + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (handwrite) "handwrite" "play/handwrite.el" (16211 +;;;;;; 27038)) +;;; Generated autoloads from play/handwrite.el + +(autoload (quote handwrite) "handwrite" "\ +Turns the buffer into a \"handwritten\" document. +The functions `handwrite-10pt', `handwrite-11pt', `handwrite-12pt' +and `handwrite-13pt' set up for various sizes of output. + +Variables: handwrite-linespace (default 12) + handwrite-fontsize (default 11) + handwrite-numlines (default 60) + handwrite-pagenumbering (default nil) + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (hanoi-unix-64 hanoi-unix hanoi) "hanoi" "play/hanoi.el" +;;;;;; (16211 27038)) +;;; Generated autoloads from play/hanoi.el + +(autoload (quote hanoi) "hanoi" "\ +Towers of Hanoi diversion. Use NRINGS rings. + +\(fn NRINGS)" t nil) + +(autoload (quote hanoi-unix) "hanoi" "\ +Towers of Hanoi, UNIX doomsday version. +Displays 32-ring towers that have been progressing at one move per +second since 1970-01-01 00:00:00 GMT. + +Repent before ring 31 moves. + +\(fn)" t nil) + +(autoload (quote hanoi-unix-64) "hanoi" "\ +Like hanoi-unix, but pretend to have a 64-bit clock. +This is, necessarily (as of emacs 20.3), a crock. When the +current-time interface is made s2G-compliant, hanoi.el will need +to be updated. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (describe-categories describe-syntax describe-variable +;;;;;; variable-at-point describe-function-1 describe-function locate-library +;;;;;; help-with-tutorial) "help-fns" "help-fns.el" (16211 27016)) +;;; Generated autoloads from help-fns.el + +(autoload (quote help-with-tutorial) "help-fns" "\ +Select the Emacs learn-by-doing tutorial. +If there is a tutorial version written in the language +of the selected language environment, that version is used. +If there's no tutorial in that language, `TUTORIAL' is selected. +With ARG, you are asked to choose which language. + +\(fn &optional ARG)" t nil) + +(autoload (quote locate-library) "help-fns" "\ +Show the precise file name of Emacs library LIBRARY. +This command searches the directories in `load-path' like `\\[load-library]' +to find the file that `\\[load-library] RET LIBRARY RET' would load. +Optional second arg NOSUFFIX non-nil means don't add suffixes `load-suffixes' +to the specified name LIBRARY. + +If the optional third arg PATH is specified, that list of directories +is used instead of `load-path'. + +When called from a program, the file name is normaly returned as a +string. When run interactively, the argument INTERACTIVE-CALL is t, +and the file name is displayed in the echo area. + +\(fn LIBRARY &optional NOSUFFIX PATH INTERACTIVE-CALL)" t nil) + +(autoload (quote describe-function) "help-fns" "\ +Display the full documentation of FUNCTION (a symbol). + +\(fn FUNCTION)" t nil) + +(autoload (quote describe-function-1) "help-fns" "\ +Not documented + +\(fn FUNCTION)" nil nil) + +(autoload (quote variable-at-point) "help-fns" "\ +Return the bound variable symbol found around point. +Return 0 if there is no such symbol. + +\(fn)" nil nil) + +(autoload (quote describe-variable) "help-fns" "\ +Display the full documentation of VARIABLE (a symbol). +Returns the documentation as a string, also. +If VARIABLE has a buffer-local value in BUFFER (default to the current buffer), +it is displayed along with the global value. + +\(fn VARIABLE &optional BUFFER)" t nil) + +(autoload (quote describe-syntax) "help-fns" "\ +Describe the syntax specifications in the syntax table of BUFFER. +The descriptions are inserted in a help buffer, which is then displayed. +BUFFER defaults to the current buffer. + +\(fn &optional BUFFER)" t nil) + +(autoload (quote describe-categories) "help-fns" "\ +Describe the category specifications in the current category table. +The descriptions are inserted in a buffer, which is then displayed. + +\(fn &optional BUFFER)" t nil) + +;;;*** + +;;;### (autoloads (three-step-help) "help-macro" "help-macro.el" +;;;;;; (16211 27016)) +;;; Generated autoloads from help-macro.el + +(defvar three-step-help nil "\ +*Non-nil means give more info about Help command in three steps. +The three steps are simple prompt, prompt with all options, +and window listing and describing the options. +A value of nil means skip the middle step, so that +\\[help-command] \\[help-command] gives the window that lists the options.") + +(custom-autoload (quote three-step-help) "help-macro") + +;;;*** + +;;;### (autoloads (help-xref-on-pp help-insert-xref-button help-xref-button +;;;;;; help-make-xrefs help-setup-xref help-mode-finish help-mode-setup +;;;;;; help-mode) "help-mode" "help-mode.el" (16276 26334)) +;;; Generated autoloads from help-mode.el + +(autoload (quote help-mode) "help-mode" "\ +Major mode for viewing help text and navigating references in it. +Entry to this mode runs the normal hook `help-mode-hook'. +Commands: +\\{help-mode-map} + +\(fn)" t nil) + +(autoload (quote help-mode-setup) "help-mode" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote help-mode-finish) "help-mode" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote help-setup-xref) "help-mode" "\ +Invoked from commands using the \"*Help*\" buffer to install some xref info. + +ITEM is a (FUNCTION . ARGS) pair appropriate for recreating the help +buffer after following a reference. INTERACTIVE-P is non-nil if the +calling command was invoked interactively. In this case the stack of +items for help buffer \"back\" buttons is cleared. + +This should be called very early, before the output buffer is cleared, +because we want to record the \"previous\" position of point so we can +restore it properly when going back. + +\(fn ITEM INTERACTIVE-P)" nil nil) + +(autoload (quote help-make-xrefs) "help-mode" "\ +Parse and hyperlink documentation cross-references in the given BUFFER. + +Find cross-reference information in a buffer and activate such cross +references for selection with `help-follow'. Cross-references have +the canonical form `...' and the type of reference may be +disambiguated by the preceding word(s) used in +`help-xref-symbol-regexp'. Faces only get cross-referenced if +preceded or followed by the word `face'. Variables without +variable documentation do not get cross-referenced, unless +preceded by the word `variable' or `option'. + +If the variable `help-xref-mule-regexp' is non-nil, find also +cross-reference information related to multilingual environment +\(e.g., coding-systems). This variable is also used to disambiguate +the type of reference as the same way as `help-xref-symbol-regexp'. + +A special reference `back' is made to return back through a stack of +help buffers. Variable `help-back-label' specifies the text for +that. + +\(fn &optional BUFFER)" t nil) + +(autoload (quote help-xref-button) "help-mode" "\ +Make a hyperlink for cross-reference text previously matched. +MATCH-NUMBER is the subexpression of interest in the last matched +regexp. TYPE is the type of button to use. Any remaining arguments are +passed to the button's help-function when it is invoked. +See `help-make-xrefs'. + +\(fn MATCH-NUMBER TYPE &rest ARGS)" nil nil) + +(autoload (quote help-insert-xref-button) "help-mode" "\ +Insert STRING and make a hyperlink from cross-reference text on it. +TYPE is the type of button to use. Any remaining arguments are passed +to the button's help-function when it is invoked. +See `help-make-xrefs'. + +\(fn STRING TYPE &rest ARGS)" nil nil) + +(autoload (quote help-xref-on-pp) "help-mode" "\ +Add xrefs for symbols in `pp's output between FROM and TO. + +\(fn FROM TO)" nil nil) + +;;;*** + +;;;### (autoloads (Helper-help Helper-describe-bindings) "helper" +;;;;;; "emacs-lisp/helper.el" (16211 27026)) +;;; Generated autoloads from emacs-lisp/helper.el + +(autoload (quote Helper-describe-bindings) "helper" "\ +Describe local key bindings of current mode. + +\(fn)" t nil) + +(autoload (quote Helper-help) "helper" "\ +Provide help for current mode. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (hexlify-buffer hexl-find-file hexl-mode) "hexl" +;;;;;; "hexl.el" (16211 27016)) +;;; Generated autoloads from hexl.el + +(autoload (quote hexl-mode) "hexl" "\ +\\A mode for editing binary files in hex dump format. +This is not an ordinary major mode; it alters some aspects +of the current mode's behavior, but not all; also, you can exit +Hexl mode and return to the previous mode using `hexl-mode-exit'. + +This function automatically converts a buffer into the hexl format +using the function `hexlify-buffer'. + +Each line in the buffer has an \"address\" (displayed in hexadecimal) +representing the offset into the file that the characters on this line +are at and 16 characters from the file (displayed as hexadecimal +values grouped every 16 bits) and as their ASCII values. + +If any of the characters (displayed as ASCII characters) are +unprintable (control or meta characters) they will be replaced as +periods. + +If `hexl-mode' is invoked with an argument the buffer is assumed to be +in hexl format. + +A sample format: + + HEX ADDR: 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f ASCII-TEXT + -------- ---- ---- ---- ---- ---- ---- ---- ---- ---------------- + 00000000: 5468 6973 2069 7320 6865 786c 2d6d 6f64 This is hexl-mod + 00000010: 652e 2020 4561 6368 206c 696e 6520 7265 e. Each line re + 00000020: 7072 6573 656e 7473 2031 3620 6279 7465 presents 16 byte + 00000030: 7320 6173 2068 6578 6164 6563 696d 616c s as hexadecimal + 00000040: 2041 5343 4949 0a61 6e64 2070 7269 6e74 ASCII.and print + 00000050: 6162 6c65 2041 5343 4949 2063 6861 7261 able ASCII chara + 00000060: 6374 6572 732e 2020 416e 7920 636f 6e74 cters. Any cont + 00000070: 726f 6c20 6f72 206e 6f6e 2d41 5343 4949 rol or non-ASCII + 00000080: 2063 6861 7261 6374 6572 730a 6172 6520 characters.are + 00000090: 6469 7370 6c61 7965 6420 6173 2070 6572 displayed as per + 000000a0: 696f 6473 2069 6e20 7468 6520 7072 696e iods in the prin + 000000b0: 7461 626c 6520 6368 6172 6163 7465 7220 table character + 000000c0: 7265 6769 6f6e 2e0a region.. + +Movement is as simple as movement in a normal emacs text buffer. Most +cursor movement bindings are the same (ie. Use \\[hexl-backward-char], \\[hexl-forward-char], \\[hexl-next-line], and \\[hexl-previous-line] +to move the cursor left, right, down, and up). + +Advanced cursor movement commands (ala \\[hexl-beginning-of-line], \\[hexl-end-of-line], \\[hexl-beginning-of-buffer], and \\[hexl-end-of-buffer]) are +also supported. + +There are several ways to change text in hexl mode: + +ASCII characters (character between space (0x20) and tilde (0x7E)) are +bound to self-insert so you can simply type the character and it will +insert itself (actually overstrike) into the buffer. + +\\[hexl-quoted-insert] followed by another keystroke allows you to insert the key even if +it isn't bound to self-insert. An octal number can be supplied in place +of another key to insert the octal number's ASCII representation. + +\\[hexl-insert-hex-char] will insert a given hexadecimal value (if it is between 0 and 0xFF) +into the buffer at the current point. + +\\[hexl-insert-octal-char] will insert a given octal value (if it is between 0 and 0377) +into the buffer at the current point. + +\\[hexl-insert-decimal-char] will insert a given decimal value (if it is between 0 and 255) +into the buffer at the current point. + +\\[hexl-mode-exit] will exit hexl-mode. + +Note: saving the file with any of the usual Emacs commands +will actually convert it back to binary format while saving. + +You can use \\[hexl-find-file] to visit a file in Hexl mode. + +\\[describe-bindings] for advanced commands. + +\(fn &optional ARG)" t nil) + +(autoload (quote hexl-find-file) "hexl" "\ +Edit file FILENAME in hexl-mode. +Switch to a buffer visiting file FILENAME, creating one in none exists. + +\(fn FILENAME)" t nil) + +(autoload (quote hexlify-buffer) "hexl" "\ +Convert a binary buffer to hexl format. +This discards the buffer's undo information. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (hi-lock-write-interactive-patterns hi-lock-unface-buffer +;;;;;; hi-lock-face-phrase-buffer hi-lock-face-buffer hi-lock-line-face-buffer +;;;;;; hi-lock-mode hi-lock-mode) "hi-lock" "hi-lock.el" (16211 +;;;;;; 27016)) +;;; Generated autoloads from hi-lock.el + +(defvar hi-lock-mode nil "\ +Toggle hi-lock, for interactively adding font-lock text-highlighting patterns.") + +(custom-autoload (quote hi-lock-mode) "hi-lock") + +(autoload (quote hi-lock-mode) "hi-lock" "\ +Toggle minor mode for interactively adding font-lock highlighting patterns. + +If ARG positive turn hi-lock on. Issuing a hi-lock command will also +turn hi-lock on. When hi-lock is turned on, a \"Regexp Highlighting\" +submenu is added to the \"Edit\" menu. The commands in the submenu, +which can be called interactively, are: + +\\[highlight-regexp] REGEXP FACE + Highlight matches of pattern REGEXP in current buffer with FACE. + +\\[highlight-phrase] PHRASE FACE + Highlight matches of phrase PHRASE in current buffer with FACE. + (PHRASE can be any REGEXP, but spaces will be replaced by matches + to whitespace and initial lower-case letters will become case insensitive.) + +\\[highlight-lines-matching-regexp] REGEXP FACE + Highlight lines containing matches of REGEXP in current buffer with FACE. + +\\[unhighlight-regexp] REGEXP + Remove highlighting on matches of REGEXP in current buffer. + +\\[hi-lock-write-interactive-patterns] + Write active REGEXPs into buffer as comments (if possible). They will + be read the next time file is loaded or when the \\[hi-lock-find-patterns] command + is issued. The inserted regexps are in the form of font lock keywords. + (See `font-lock-keywords') They may be edited and re-loaded with \\[hi-lock-find-patterns], + any valid `font-lock-keywords' form is acceptable. + +\\[hi-lock-find-patterns] + Re-read patterns stored in buffer (in the format produced by \\[hi-lock-write-interactive-patterns]). + +When hi-lock is started and if the mode is not excluded, the +beginning of the buffer is searched for lines of the form: + Hi-lock: FOO +where FOO is a list of patterns. These are added to the font lock keywords +already present. The patterns must start before position (number +of characters into buffer) `hi-lock-file-patterns-range'. Patterns +will be read until + Hi-lock: end +is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'. + +\(fn &optional ARG)" t nil) + +(defalias (quote highlight-lines-matching-regexp) (quote hi-lock-line-face-buffer)) + +(autoload (quote hi-lock-line-face-buffer) "hi-lock" "\ +Set face of all lines containing a match of REGEXP to FACE. + +Interactively, prompt for REGEXP then FACE. Buffer-local history +list maintained for regexps, global history maintained for faces. +\\Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item. +\(See info node `Minibuffer History') + +\(fn REGEXP &optional FACE)" t nil) + +(defalias (quote highlight-regexp) (quote hi-lock-face-buffer)) + +(autoload (quote hi-lock-face-buffer) "hi-lock" "\ +Set face of each match of REGEXP to FACE. + +Interactively, prompt for REGEXP then FACE. Buffer-local history +list maintained for regexps, global history maintained for faces. +\\Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item. +\(See info node `Minibuffer History') + +\(fn REGEXP &optional FACE)" t nil) + +(defalias (quote highlight-phrase) (quote hi-lock-face-phrase-buffer)) + +(autoload (quote hi-lock-face-phrase-buffer) "hi-lock" "\ +Set face of each match of phrase REGEXP to FACE. + +Whitespace in REGEXP converted to arbitrary whitespace and initial +lower-case letters made case insensitive. + +\(fn REGEXP &optional FACE)" t nil) + +(defalias (quote unhighlight-regexp) (quote hi-lock-unface-buffer)) + +(autoload (quote hi-lock-unface-buffer) "hi-lock" "\ +Remove highlighting of each match to REGEXP set by hi-lock. + +Interactively, prompt for REGEXP. Buffer-local history of inserted +regexp's maintained. Will accept only regexps inserted by hi-lock +interactive functions. (See `hi-lock-interactive-patterns'.) +\\Use \\[minibuffer-complete] to complete a partially typed regexp. +\(See info node `Minibuffer History'.) + +\(fn REGEXP)" t nil) + +(autoload (quote hi-lock-write-interactive-patterns) "hi-lock" "\ +Write interactively added patterns, if any, into buffer at point. + +Interactively added patterns are those normally specified using +`highlight-regexp' and `highlight-lines-matching-regexp'; they can +be found in variable `hi-lock-interactive-patterns'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (hide-ifdef-lines hide-ifdef-read-only hide-ifdef-initially +;;;;;; hide-ifdef-mode) "hideif" "progmodes/hideif.el" (16211 27039)) +;;; Generated autoloads from progmodes/hideif.el + +(autoload (quote hide-ifdef-mode) "hideif" "\ +Toggle Hide-Ifdef mode. This is a minor mode, albeit a large one. +With ARG, turn Hide-Ifdef mode on if arg is positive, off otherwise. +In Hide-Ifdef mode, code within #ifdef constructs that the C preprocessor +would eliminate may be hidden from view. Several variables affect +how the hiding is done: + +`hide-ifdef-env' + An association list of defined and undefined symbols for the + current buffer. Initially, the global value of `hide-ifdef-env' + is used. + +`hide-ifdef-define-alist' + An association list of defined symbol lists. + Use `hide-ifdef-set-define-alist' to save the current `hide-ifdef-env' + and `hide-ifdef-use-define-alist' to set the current `hide-ifdef-env' + from one of the lists in `hide-ifdef-define-alist'. + +`hide-ifdef-lines' + Set to non-nil to not show #if, #ifdef, #ifndef, #else, and + #endif lines when hiding. + +`hide-ifdef-initially' + Indicates whether `hide-ifdefs' should be called when Hide-Ifdef mode + is activated. + +`hide-ifdef-read-only' + Set to non-nil if you want to make buffers read only while hiding. + After `show-ifdefs', read-only status is restored to previous value. + +\\{hide-ifdef-mode-map} + +\(fn &optional ARG)" t nil) + +(defvar hide-ifdef-initially nil "\ +*Non-nil means call `hide-ifdefs' when Hide-Ifdef mode is first activated.") + +(custom-autoload (quote hide-ifdef-initially) "hideif") + +(defvar hide-ifdef-read-only nil "\ +*Set to non-nil if you want buffer to be read-only while hiding text.") + +(custom-autoload (quote hide-ifdef-read-only) "hideif") + +(defvar hide-ifdef-lines nil "\ +*Non-nil means hide the #ifX, #else, and #endif lines.") + +(custom-autoload (quote hide-ifdef-lines) "hideif") + +;;;*** + +;;;### (autoloads (hs-minor-mode hs-hide-comments-when-hiding-all) +;;;;;; "hideshow" "progmodes/hideshow.el" (16274 58117)) +;;; Generated autoloads from progmodes/hideshow.el + +(defvar hs-hide-comments-when-hiding-all t "\ +*Hide the comments too when you do an `hs-hide-all'.") + +(custom-autoload (quote hs-hide-comments-when-hiding-all) "hideshow") + +(defvar hs-special-modes-alist (quote ((c-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) (c++-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning) (bibtex-mode ("^@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil hs-c-like-adjust-block-beginning))) "\ +*Alist for initializing the hideshow variables for different modes. +Each element has the form + (MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC). + +If non-nil, hideshow will use these values as regexps to define blocks +and comments, respectively for major mode MODE. + +START, END and COMMENT-START are regular expressions. A block is +defined as text surrounded by START and END. + +As a special case, START may be a list of the form (COMPLEX-START +MDATA-SELECTOR), where COMPLEX-START is a regexp w/ multiple parts and +MDATA-SELECTOR an integer that specifies which sub-match is the proper +place to adjust point, before calling `hs-forward-sexp-func'. Point +is adjusted to the beginning of the specified match. For example, +see the `hs-special-modes-alist' entry for `bibtex-mode'. + +For some major modes, `forward-sexp' does not work properly. In those +cases, FORWARD-SEXP-FUNC specifies another function to use instead. + +See the documentation for `hs-adjust-block-beginning' to see what is the +use of ADJUST-BEG-FUNC. + +If any of the elements is left nil or omitted, hideshow tries to guess +appropriate values. The regexps should not contain leading or trailing +whitespace. Case does not matter.") + +(autoload (quote hs-minor-mode) "hideshow" "\ +Toggle hideshow minor mode. +With ARG, turn hideshow minor mode on if ARG is positive, off otherwise. +When hideshow minor mode is on, the menu bar is augmented with hideshow +commands and the hideshow commands are enabled. +The value '(hs . t) is added to `buffer-invisibility-spec'. + +The main commands are: `hs-hide-all', `hs-show-all', `hs-hide-block', +`hs-show-block', `hs-hide-level' and `hs-toggle-hiding'. There is also +`hs-hide-initial-comment-block' and `hs-mouse-toggle-hiding'. + +Turning hideshow minor mode off reverts the menu bar and the +variables to default values and disables the hideshow commands. + +Lastly, the normal hook `hs-minor-mode-hook' is run using `run-hooks'. + +Key bindings: +\\{hs-minor-mode-map} + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (global-highlight-changes highlight-compare-with-file +;;;;;; highlight-changes-rotate-faces highlight-changes-previous-change +;;;;;; highlight-changes-next-change highlight-changes-mode highlight-changes-remove-highlight) +;;;;;; "hilit-chg" "hilit-chg.el" (16211 27016)) +;;; Generated autoloads from hilit-chg.el + +(defvar highlight-changes-mode nil) + +(autoload (quote highlight-changes-remove-highlight) "hilit-chg" "\ +Remove the change face from the region between BEG and END. +This allows you to manually remove highlighting from uninteresting changes. + +\(fn BEG END)" t nil) + +(autoload (quote highlight-changes-mode) "hilit-chg" "\ +Toggle (or initially set) Highlight Changes mode. + +Without an argument: + If Highlight Changes mode is not enabled, then enable it (in either active + or passive state as determined by the variable + `highlight-changes-initial-state'); otherwise, toggle between active + and passive state. + +With an argument ARG: + If ARG is positive, set state to active; + If ARG is zero, set state to passive; + If ARG is negative, disable Highlight Changes mode completely. + +Active state - means changes are shown in a distinctive face. +Passive state - means changes are kept and new ones recorded but are + not displayed in a different face. + +Functions: +\\[highlight-changes-next-change] - move point to beginning of next change +\\[highlight-changes-previous-change] - move to beginning of previous change +\\[highlight-compare-with-file] - mark text as changed by comparing this + buffer with the contents of a file +\\[highlight-changes-remove-highlight] - remove the change face from the region +\\[highlight-changes-rotate-faces] - rotate different \"ages\" of changes through + various faces. + +Hook variables: +`highlight-changes-enable-hook' - when enabling Highlight Changes mode. +`highlight-changes-toggle-hook' - when entering active or passive state +`highlight-changes-disable-hook' - when turning off Highlight Changes mode. + +\(fn &optional ARG)" t nil) + +(autoload (quote highlight-changes-next-change) "hilit-chg" "\ +Move to the beginning of the next change, if in Highlight Changes mode. + +\(fn)" t nil) + +(autoload (quote highlight-changes-previous-change) "hilit-chg" "\ +Move to the beginning of the previous change, if in Highlight Changes mode. + +\(fn)" t nil) + +(autoload (quote highlight-changes-rotate-faces) "hilit-chg" "\ +Rotate the faces used by Highlight Changes mode. + +Current changes are displayed in the face described by the first element +of `highlight-changes-face-list', one level older changes are shown in +face described by the second element, and so on. Very old changes remain +shown in the last face in the list. + +You can automatically rotate colours when the buffer is saved +by adding the following to `local-write-file-hooks', by evaling it in the +buffer to be saved): + + (add-hook 'local-write-file-hooks 'highlight-changes-rotate-faces) + +\(fn)" t nil) + +(autoload (quote highlight-compare-with-file) "hilit-chg" "\ +Compare this buffer with a file, and highlight differences. + +The current buffer must be an unmodified buffer visiting a file, +and must not be read-only. + +If the buffer has a backup filename, it is used as the default when +this function is called interactively. + +If the current buffer is visiting the file being compared against, it +also will have its differences highlighted. Otherwise, the file is +read in temporarily but the buffer is deleted. + +If the buffer is read-only, differences will be highlighted but no property +changes are made, so \\[highlight-changes-next-change] and +\\[highlight-changes-previous-change] will not work. + +\(fn FILE-B)" t nil) + +(autoload (quote global-highlight-changes) "hilit-chg" "\ +Turn on or off global Highlight Changes mode. + +When called interactively: +- if no prefix, toggle global Highlight Changes mode on or off +- if called with a positive prefix (or just C-u) turn it on in active mode +- if called with a zero prefix turn it on in passive mode +- if called with a negative prefix turn it off + +When called from a program: +- if ARG is nil or omitted, turn it off +- if ARG is `active', turn it on in active mode +- if ARG is `passive', turn it on in passive mode +- otherwise just turn it on + +When global Highlight Changes mode is enabled, Highlight Changes mode is turned +on for future \"suitable\" buffers (and for \"suitable\" existing buffers if +variable `highlight-changes-global-changes-existing-buffers' is non-nil). +\"Suitability\" is determined by variable `highlight-changes-global-modes'. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (make-hippie-expand-function hippie-expand hippie-expand-only-buffers +;;;;;; hippie-expand-ignore-buffers hippie-expand-max-buffers hippie-expand-no-restriction +;;;;;; hippie-expand-dabbrev-as-symbol hippie-expand-dabbrev-skip-space +;;;;;; hippie-expand-verbose hippie-expand-try-functions-list) "hippie-exp" +;;;;;; "hippie-exp.el" (16211 27016)) +;;; Generated autoloads from hippie-exp.el + +(defvar hippie-expand-try-functions-list (quote (try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol)) "\ +The list of expansion functions tried in order by `hippie-expand'. +To change the behavior of `hippie-expand', remove, change the order of, +or insert functions in this list.") + +(custom-autoload (quote hippie-expand-try-functions-list) "hippie-exp") + +(defvar hippie-expand-verbose t "\ +*Non-nil makes `hippie-expand' output which function it is trying.") + +(custom-autoload (quote hippie-expand-verbose) "hippie-exp") + +(defvar hippie-expand-dabbrev-skip-space nil "\ +*Non-nil means tolerate trailing spaces in the abbreviation to expand.") + +(custom-autoload (quote hippie-expand-dabbrev-skip-space) "hippie-exp") + +(defvar hippie-expand-dabbrev-as-symbol t "\ +*Non-nil means expand as symbols, i.e. syntax `_' is considered a letter.") + +(custom-autoload (quote hippie-expand-dabbrev-as-symbol) "hippie-exp") + +(defvar hippie-expand-no-restriction t "\ +*Non-nil means that narrowed buffers are widened during search.") + +(custom-autoload (quote hippie-expand-no-restriction) "hippie-exp") + +(defvar hippie-expand-max-buffers nil "\ +*The maximum number of buffers (apart from the current) searched. +If nil, all buffers are searched.") + +(custom-autoload (quote hippie-expand-max-buffers) "hippie-exp") + +(defvar hippie-expand-ignore-buffers (quote ("^ \\*.*\\*$" dired-mode)) "\ +*A list specifying which buffers not to search (if not current). +Can contain both regexps matching buffer names (as strings) and major modes +\(as atoms)") + +(custom-autoload (quote hippie-expand-ignore-buffers) "hippie-exp") + +(defvar hippie-expand-only-buffers nil "\ +*A list specifying the only buffers to search (in addition to current). +Can contain both regexps matching buffer names (as strings) and major modes +\(as atoms). If non-nil, this variable overrides the variable +`hippie-expand-ignore-buffers'.") + +(custom-autoload (quote hippie-expand-only-buffers) "hippie-exp") + +(autoload (quote hippie-expand) "hippie-exp" "\ +Try to expand text before point, using multiple methods. +The expansion functions in `hippie-expand-try-functions-list' are +tried in order, until a possible expansion is found. Repeated +application of `hippie-expand' inserts successively possible +expansions. +With a positive numeric argument, jumps directly to the ARG next +function in this list. With a negative argument or just \\[universal-argument], +undoes the expansion. + +\(fn ARG)" t nil) + +(autoload (quote make-hippie-expand-function) "hippie-exp" "\ +Construct a function similar to `hippie-expand'. +Make it use the expansion functions in TRY-LIST. An optional second +argument VERBOSE non-nil makes the function verbose. + +\(fn TRY-LIST &optional VERBOSE)" nil (quote macro)) + +;;;*** + +;;;### (autoloads (global-hl-line-mode hl-line-mode) "hl-line" "hl-line.el" +;;;;;; (16271 3438)) +;;; Generated autoloads from hl-line.el + +(autoload (quote hl-line-mode) "hl-line" "\ +Buffer-local minor mode to highlight the line about point. +With ARG, turn Hl-Line mode on if ARG is positive, off otherwise. + +If `hl-line-sticky-flag' is non-nil, Hl-Line mode highlights the +line about the buffer's point in all windows. Caveat: the +buffer's point might be different from the point of a +non-selected window. Hl-Line mode uses the function +`hl-line-highlight' on `post-command-hook' in this case. + +When `hl-line-sticky-flag' is nil, Hl-Line mode highlights the +line about point in the selected window only. In this case, it +uses the function `hl-line-unhighlight' on `pre-command-hook' in +addition to `hl-line-highlight' on `post-command-hook'. + +\(fn &optional ARG)" t nil) + +(defvar global-hl-line-mode nil "\ +Non-nil if Global-Hl-Line mode is enabled. +See the command `global-hl-line-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `global-hl-line-mode'.") + +(custom-autoload (quote global-hl-line-mode) "hl-line") + +(autoload (quote global-hl-line-mode) "hl-line" "\ +Global minor mode to highlight the line about point in the current window. +With ARG, turn Global-Hl-Line mode on if ARG is positive, off otherwise. + +Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and +`global-hl-line-highlight' on `pre-command-hook' and `post-command-hook'. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (list-holidays holidays) "holidays" "calendar/holidays.el" +;;;;;; (16211 27023)) +;;; Generated autoloads from calendar/holidays.el + +(autoload (quote holidays) "holidays" "\ +Display the holidays for last month, this month, and next month. +If called with an optional prefix argument, prompts for month and year. + +This function is suitable for execution in a .emacs file. + +\(fn &optional ARG)" t nil) + +(autoload (quote list-holidays) "holidays" "\ +Display holidays for years Y1 to Y2 (inclusive). + +The optional list of holidays L defaults to `calendar-holidays'. See the +documentation for that variable for a description of holiday lists. + +The optional LABEL is used to label the buffer created. + +\(fn Y1 Y2 &optional L LABEL)" t nil) + +;;;*** + +;;;### (autoloads (hscroll-global-mode hscroll-mode turn-on-hscroll) +;;;;;; "hscroll" "obsolete/hscroll.el" (16211 27037)) +;;; Generated autoloads from obsolete/hscroll.el + +(autoload (quote turn-on-hscroll) "hscroll" "\ +This function is obsolete. +Emacs now does hscrolling automatically, if `truncate-lines' is non-nil. +Also see `automatic-hscrolling'. + +\(fn)" nil nil) + +(autoload (quote hscroll-mode) "hscroll" "\ +This function is obsolete. +Emacs now does hscrolling automatically, if `truncate-lines' is non-nil. +Also see `automatic-hscrolling'. + +\(fn &optional ARG)" t nil) + +(autoload (quote hscroll-global-mode) "hscroll" "\ +This function is obsolete. +Emacs now does hscrolling automatically, if `truncate-lines' is non-nil. +Also see `automatic-hscrolling'. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (ibuffer-do-occur ibuffer-mark-dired-buffers ibuffer-mark-read-only-buffers +;;;;;; ibuffer-mark-special-buffers ibuffer-mark-old-buffers ibuffer-mark-help-buffers +;;;;;; ibuffer-mark-dissociated-buffers ibuffer-mark-unsaved-buffers +;;;;;; ibuffer-mark-modified-buffers ibuffer-mark-by-mode ibuffer-mark-by-file-name-regexp +;;;;;; ibuffer-mark-by-mode-regexp ibuffer-mark-by-name-regexp ibuffer-copy-filename-as-kill +;;;;;; ibuffer-diff-with-file ibuffer-jump-to-buffer ibuffer-do-kill-lines +;;;;;; ibuffer-backwards-next-marked ibuffer-forward-next-marked +;;;;;; ibuffer-add-to-tmp-show ibuffer-add-to-tmp-hide ibuffer-bs-show +;;;;;; ibuffer-invert-sorting ibuffer-toggle-sorting-mode ibuffer-switch-to-saved-filters +;;;;;; ibuffer-add-saved-filters ibuffer-delete-saved-filters ibuffer-save-filters +;;;;;; ibuffer-or-filter ibuffer-negate-filter ibuffer-exchange-filters +;;;;;; ibuffer-decompose-filter ibuffer-pop-filter ibuffer-filter-disable +;;;;;; ibuffer-switch-to-saved-filter-groups ibuffer-delete-saved-filter-groups +;;;;;; ibuffer-save-filter-groups ibuffer-yank-filter-group ibuffer-yank +;;;;;; ibuffer-kill-line ibuffer-kill-filter-group ibuffer-jump-to-filter-group +;;;;;; ibuffer-clear-filter-groups ibuffer-decompose-filter-group +;;;;;; ibuffer-pop-filter-group ibuffer-set-filter-groups-by-mode +;;;;;; ibuffer-filters-to-filter-group ibuffer-included-in-filters-p +;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group +;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group +;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode +;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" (16211 27016)) +;;; Generated autoloads from ibuf-ext.el + +(autoload (quote ibuffer-auto-mode) "ibuf-ext" "\ +Toggle use of Ibuffer's auto-update facility. +With numeric ARG, enable auto-update if and only if ARG is positive. + +\(fn &optional ARG)" t nil) + +(autoload (quote ibuffer-mouse-filter-by-mode) "ibuf-ext" "\ +Enable or disable filtering by the major mode chosen via mouse. + +\(fn EVENT)" t nil) + +(autoload (quote ibuffer-interactive-filter-by-mode) "ibuf-ext" "\ +Enable or disable filtering by the major mode at point. + +\(fn EVENT-OR-POINT)" t nil) + +(autoload (quote ibuffer-mouse-toggle-filter-group) "ibuf-ext" "\ +Toggle the display status of the filter group chosen with the mouse. + +\(fn EVENT)" t nil) + +(autoload (quote ibuffer-toggle-filter-group) "ibuf-ext" "\ +Toggle the display status of the filter group on this line. + +\(fn)" t nil) + +(autoload (quote ibuffer-forward-filter-group) "ibuf-ext" "\ +Move point forwards by COUNT filtering groups. + +\(fn &optional COUNT)" t nil) + +(autoload (quote ibuffer-backward-filter-group) "ibuf-ext" "\ +Move point backwards by COUNT filtering groups. + +\(fn &optional COUNT)" t nil) + (autoload 'ibuffer-do-shell-command-pipe "ibuf-ext.el") + (autoload 'ibuffer-do-shell-command-pipe-replace "ibuf-ext.el") + (autoload 'ibuffer-do-shell-command-file "ibuf-ext.el") + (autoload 'ibuffer-do-eval "ibuf-ext.el") + (autoload 'ibuffer-do-view-and-eval "ibuf-ext.el") + (autoload 'ibuffer-do-rename-uniquely "ibuf-ext.el") + (autoload 'ibuffer-do-revert "ibuf-ext.el") + (autoload 'ibuffer-do-replace-regexp "ibuf-ext.el") + (autoload 'ibuffer-do-query-replace "ibuf-ext.el") + (autoload 'ibuffer-do-query-replace-regexp "ibuf-ext.el") + (autoload 'ibuffer-do-print "ibuf-ext.el") + +(autoload (quote ibuffer-included-in-filters-p) "ibuf-ext" "\ +Not documented + +\(fn BUF FILTERS)" nil nil) + +(autoload (quote ibuffer-filters-to-filter-group) "ibuf-ext" "\ +Make the current filters into a filtering group. + +\(fn NAME)" t nil) + +(autoload (quote ibuffer-set-filter-groups-by-mode) "ibuf-ext" "\ +Set the current filter groups to filter by mode. + +\(fn)" t nil) + +(autoload (quote ibuffer-pop-filter-group) "ibuf-ext" "\ +Remove the first filter group. + +\(fn)" t nil) + +(autoload (quote ibuffer-decompose-filter-group) "ibuf-ext" "\ +Decompose the filter group GROUP into active filters. + +\(fn GROUP)" t nil) + +(autoload (quote ibuffer-clear-filter-groups) "ibuf-ext" "\ +Remove all filter groups. + +\(fn)" t nil) + +(autoload (quote ibuffer-jump-to-filter-group) "ibuf-ext" "\ +Move point to the filter group whose name is NAME. + +\(fn NAME)" t nil) + +(autoload (quote ibuffer-kill-filter-group) "ibuf-ext" "\ +Kill the filter group named NAME. +The group will be added to `ibuffer-filter-group-kill-ring'. + +\(fn NAME)" t nil) + +(autoload (quote ibuffer-kill-line) "ibuf-ext" "\ +Kill the filter group at point. +See also `ibuffer-kill-filter-group'. + +\(fn &optional ARG)" t nil) + +(autoload (quote ibuffer-yank) "ibuf-ext" "\ +Yank the last killed filter group before group at point. + +\(fn)" t nil) + +(autoload (quote ibuffer-yank-filter-group) "ibuf-ext" "\ +Yank the last killed filter group before group named NAME. + +\(fn NAME)" t nil) + +(autoload (quote ibuffer-save-filter-groups) "ibuf-ext" "\ +Save all active filter groups GROUPS as NAME. +They are added to `ibuffer-saved-filter-groups'. Interactively, +prompt for NAME, and use the current filters. + +\(fn NAME GROUPS)" t nil) + +(autoload (quote ibuffer-delete-saved-filter-groups) "ibuf-ext" "\ +Delete saved filter groups with NAME. +They are removed from `ibuffer-saved-filter-groups'. + +\(fn NAME)" t nil) + +(autoload (quote ibuffer-switch-to-saved-filter-groups) "ibuf-ext" "\ +Set this buffer's filter groups to saved version with NAME. +The value from `ibuffer-saved-filters' is used. +If prefix argument ADD is non-nil, then add the saved filters instead +of replacing the current filters. + +\(fn NAME)" t nil) + +(autoload (quote ibuffer-filter-disable) "ibuf-ext" "\ +Disable all filters currently in effect in this buffer. + +\(fn)" t nil) + +(autoload (quote ibuffer-pop-filter) "ibuf-ext" "\ +Remove the top filter in this buffer. + +\(fn)" t nil) + +(autoload (quote ibuffer-decompose-filter) "ibuf-ext" "\ +Separate the top compound filter (OR, NOT, or SAVED) in this buffer. + +This means that the topmost filter on the filtering stack, which must +be a complex filter like (OR [name: foo] [mode: bar-mode]), will be +turned into two separate filters [name: foo] and [mode: bar-mode]. + +\(fn)" t nil) + +(autoload (quote ibuffer-exchange-filters) "ibuf-ext" "\ +Exchange the top two filters on the stack in this buffer. + +\(fn)" t nil) + +(autoload (quote ibuffer-negate-filter) "ibuf-ext" "\ +Negate the sense of the top filter in the current buffer. + +\(fn)" t nil) + +(autoload (quote ibuffer-or-filter) "ibuf-ext" "\ +Replace the top two filters in this buffer with their logical OR. +If optional argument REVERSE is non-nil, instead break the top OR +filter into parts. + +\(fn &optional REVERSE)" t nil) + +(autoload (quote ibuffer-save-filters) "ibuf-ext" "\ +Save FILTERS in this buffer with name NAME in `ibuffer-saved-filters'. +Interactively, prompt for NAME, and use the current filters. + +\(fn NAME FILTERS)" t nil) + +(autoload (quote ibuffer-delete-saved-filters) "ibuf-ext" "\ +Delete saved filters with NAME from `ibuffer-saved-filters'. + +\(fn NAME)" t nil) + +(autoload (quote ibuffer-add-saved-filters) "ibuf-ext" "\ +Add saved filters from `ibuffer-saved-filters' to this buffer's filters. + +\(fn NAME)" t nil) + +(autoload (quote ibuffer-switch-to-saved-filters) "ibuf-ext" "\ +Set this buffer's filters to filters with NAME from `ibuffer-saved-filters'. +If prefix argument ADD is non-nil, then add the saved filters instead +of replacing the current filters. + +\(fn NAME)" t nil) + (autoload 'ibuffer-filter-by-mode "ibuf-ext.el") + (autoload 'ibuffer-filter-by-used-mode "ibuf-ext.el") + (autoload 'ibuffer-filter-by-name "ibuf-ext.el") + (autoload 'ibuffer-filter-by-filename "ibuf-ext.el") + (autoload 'ibuffer-filter-by-size-gt "ibuf-ext.el") + (autoload 'ibuffer-filter-by-size-lt "ibuf-ext.el") + (autoload 'ibuffer-filter-by-content "ibuf-ext.el") + (autoload 'ibuffer-filter-by-predicate "ibuf-ext.el") + +(autoload (quote ibuffer-toggle-sorting-mode) "ibuf-ext" "\ +Toggle the current sorting mode. +Default sorting modes are: + Recency - the last time the buffer was viewed + Name - the name of the buffer + Major Mode - the name of the major mode of the buffer + Size - the size of the buffer + +\(fn)" t nil) + +(autoload (quote ibuffer-invert-sorting) "ibuf-ext" "\ +Toggle whether or not sorting is in reverse order. + +\(fn)" t nil) + (autoload 'ibuffer-do-sort-by-major-mode "ibuf-ext.el") + (autoload 'ibuffer-do-sort-by-mode-name "ibuf-ext.el") + (autoload 'ibuffer-do-sort-by-alphabetic "ibuf-ext.el") + (autoload 'ibuffer-do-sort-by-size "ibuf-ext.el") + +(autoload (quote ibuffer-bs-show) "ibuf-ext" "\ +Emulate `bs-show' from the bs.el package. + +\(fn)" t nil) + +(autoload (quote ibuffer-add-to-tmp-hide) "ibuf-ext" "\ +Add REGEXP to `ibuffer-tmp-hide-regexps'. +This means that buffers whose name matches REGEXP will not be shown +for this Ibuffer session. + +\(fn REGEXP)" t nil) + +(autoload (quote ibuffer-add-to-tmp-show) "ibuf-ext" "\ +Add REGEXP to `ibuffer-tmp-show-regexps'. +This means that buffers whose name matches REGEXP will always be shown +for this Ibuffer session. + +\(fn REGEXP)" t nil) + +(autoload (quote ibuffer-forward-next-marked) "ibuf-ext" "\ +Move forward by COUNT marked buffers (default 1). + +If MARK is non-nil, it should be a character denoting the type of mark +to move by. The default is `ibuffer-marked-char'. + +If DIRECTION is non-nil, it should be an integer; negative integers +mean move backwards, non-negative integers mean move forwards. + +\(fn &optional COUNT MARK DIRECTION)" t nil) + +(autoload (quote ibuffer-backwards-next-marked) "ibuf-ext" "\ +Move backwards by COUNT marked buffers (default 1). + +If MARK is non-nil, it should be a character denoting the type of mark +to move by. The default is `ibuffer-marked-char'. + +\(fn &optional COUNT MARK)" t nil) + +(autoload (quote ibuffer-do-kill-lines) "ibuf-ext" "\ +Hide all of the currently marked lines. + +\(fn)" t nil) + +(autoload (quote ibuffer-jump-to-buffer) "ibuf-ext" "\ +Move point to the buffer whose name is NAME. + +\(fn NAME)" t nil) + +(autoload (quote ibuffer-diff-with-file) "ibuf-ext" "\ +View the differences between this buffer and its associated file. +This requires the external program \"diff\" to be in your `exec-path'. + +\(fn)" t nil) + +(autoload (quote ibuffer-copy-filename-as-kill) "ibuf-ext" "\ +Copy filenames of marked buffers into the kill ring. + +The names are separated by a space. +If a buffer has no filename, it is ignored. + +With no prefix arg, use the filename sans its directory of each marked file. +With a zero prefix arg, use the complete filename of each marked file. +With \\[universal-argument], use the filename of each marked file relative +to `ibuffer-default-directory' iff non-nil, otherwise `default-directory'. + +You can then feed the file name(s) to other commands with \\[yank]. + +\(fn &optional ARG)" t nil) + +(autoload (quote ibuffer-mark-by-name-regexp) "ibuf-ext" "\ +Mark all buffers whose name matches REGEXP. + +\(fn REGEXP)" t nil) + +(autoload (quote ibuffer-mark-by-mode-regexp) "ibuf-ext" "\ +Mark all buffers whose major mode matches REGEXP. + +\(fn REGEXP)" t nil) + +(autoload (quote ibuffer-mark-by-file-name-regexp) "ibuf-ext" "\ +Mark all buffers whose file name matches REGEXP. + +\(fn REGEXP)" t nil) + +(autoload (quote ibuffer-mark-by-mode) "ibuf-ext" "\ +Mark all buffers whose major mode equals MODE. + +\(fn MODE)" t nil) + +(autoload (quote ibuffer-mark-modified-buffers) "ibuf-ext" "\ +Mark all modified buffers. + +\(fn)" t nil) + +(autoload (quote ibuffer-mark-unsaved-buffers) "ibuf-ext" "\ +Mark all modified buffers that have an associated file. + +\(fn)" t nil) + +(autoload (quote ibuffer-mark-dissociated-buffers) "ibuf-ext" "\ +Mark all buffers whose associated file does not exist. + +\(fn)" t nil) + +(autoload (quote ibuffer-mark-help-buffers) "ibuf-ext" "\ +Mark buffers like *Help*, *Apropos*, *Info*. + +\(fn)" t nil) + +(autoload (quote ibuffer-mark-old-buffers) "ibuf-ext" "\ +Mark buffers which have not been viewed in `ibuffer-old-time' days. + +\(fn)" t nil) + +(autoload (quote ibuffer-mark-special-buffers) "ibuf-ext" "\ +Mark all buffers whose name begins and ends with '*'. + +\(fn)" t nil) + +(autoload (quote ibuffer-mark-read-only-buffers) "ibuf-ext" "\ +Mark all read-only buffers. + +\(fn)" t nil) + +(autoload (quote ibuffer-mark-dired-buffers) "ibuf-ext" "\ +Mark all `dired' buffers. + +\(fn)" t nil) + +(autoload (quote ibuffer-do-occur) "ibuf-ext" "\ +View lines which match REGEXP in all marked buffers. +Optional argument NLINES says how many lines of context to display: it +defaults to one. + +\(fn REGEXP &optional NLINES)" t nil) + +;;;*** + +;;;### (autoloads (define-ibuffer-filter define-ibuffer-op define-ibuffer-sorter +;;;;;; define-ibuffer-column) "ibuf-macs" "ibuf-macs.el" (16211 +;;;;;; 27016)) +;;; Generated autoloads from ibuf-macs.el + +(autoload (quote define-ibuffer-column) "ibuf-macs" "\ +Define a column SYMBOL for use with `ibuffer-formats'. + +BODY will be called with `buffer' bound to the buffer object, and +`mark' bound to the current mark on the buffer. The original ibuffer +buffer will be bound to `ibuffer-buf'. + +If NAME is given, it will be used as a title for the column. +Otherwise, the title will default to a capitalized version of the +SYMBOL's name. PROPS is a plist of additional properties to add to +the text, such as `mouse-face'. And SUMMARIZER, if given, is a +function which will be passed a list of all the strings in its column; +it should return a string to display at the bottom. + +Note that this macro expands into a `defun' for a function named +ibuffer-make-column-NAME. If INLINE is non-nil, then the form will be +inlined into the compiled format versions. This means that if you +change its definition, you should explicitly call +`ibuffer-recompile-formats'. + +\(fn SYMBOL (&KEY name inline props summarizer) &rest BODY)" nil (quote macro)) + +(autoload (quote define-ibuffer-sorter) "ibuf-macs" "\ +Define a method of sorting named NAME. +DOCUMENTATION is the documentation of the function, which will be called +`ibuffer-do-sort-by-NAME'. +DESCRIPTION is a short string describing the sorting method. + +For sorting, the forms in BODY will be evaluated with `a' bound to one +buffer object, and `b' bound to another. BODY should return a non-nil +value if and only if `a' is \"less than\" `b'. + +\(fn NAME DOCUMENTATION (&KEY description) &rest BODY)" nil (quote macro)) + +(autoload (quote define-ibuffer-op) "ibuf-macs" "\ +Generate a function which operates on a buffer. +OP becomes the name of the function; if it doesn't begin with +`ibuffer-do-', then that is prepended to it. +When an operation is performed, this function will be called once for +each marked buffer, with that buffer current. + +ARGS becomes the formal parameters of the function. +DOCUMENTATION becomes the docstring of the function. +INTERACTIVE becomes the interactive specification of the function. +MARK describes which type of mark (:deletion, or nil) this operation +uses. :deletion means the function operates on buffers marked for +deletion, otherwise it acts on normally marked buffers. +MODIFIER-P describes how the function modifies buffers. This is used +to set the modification flag of the Ibuffer buffer itself. Valid +values are: + nil - the function never modifiers buffers + t - the function it always modifies buffers + :maybe - attempt to discover this information by comparing the + buffer's modification flag. +DANGEROUS is a boolean which should be set if the user should be +prompted before performing this operation. +OPSTRING is a string which will be displayed to the user after the +operation is complete, in the form: + \"Operation complete; OPSTRING x buffers\" +ACTIVE-OPSTRING is a string which will be displayed to the user in a +confirmation message, in the form: + \"Really ACTIVE-OPSTRING x buffers?\" +COMPLEX means this function is special; see the source code of this +macro for exactly what it does. + +\(fn OP ARGS DOCUMENTATION (&KEY interactive mark modifier-p dangerous (opstring operated on) (active-opstring Operate on) complex) &rest BODY)" nil (quote macro)) + +(autoload (quote define-ibuffer-filter) "ibuf-macs" "\ +Define a filter named NAME. +DOCUMENTATION is the documentation of the function. +READER is a form which should read a qualifier from the user. +DESCRIPTION is a short string describing the filter. + +BODY should contain forms which will be evaluated to test whether or +not a particular buffer should be displayed or not. The forms in BODY +will be evaluated with BUF bound to the buffer object, and QUALIFIER +bound to the current value of the filter. + +\(fn NAME DOCUMENTATION (&KEY reader description) &rest BODY)" nil (quote macro)) + +;;;*** + +;;;### (autoloads (ibuffer ibuffer-other-window ibuffer-list-buffers) +;;;;;; "ibuffer" "ibuffer.el" (16211 27016)) +;;; Generated autoloads from ibuffer.el + +(autoload (quote ibuffer-list-buffers) "ibuffer" "\ +Display a list of buffers, in another window. +If optional argument FILES-ONLY is non-nil, then add a filter for +buffers which are visiting a file. + +\(fn &optional FILES-ONLY)" t nil) + +(autoload (quote ibuffer-other-window) "ibuffer" "\ +Like `ibuffer', but displayed in another window by default. +If optional argument FILES-ONLY is non-nil, then add a filter for +buffers which are visiting a file. + +\(fn &optional FILES-ONLY)" t nil) + +(autoload (quote ibuffer) "ibuffer" "\ +Begin using `ibuffer' to edit a list of buffers. +Type 'h' after entering ibuffer for more information. + +Optional argument OTHER-WINDOW-P says to use another window. +Optional argument NAME specifies the name of the buffer; it defaults +to \"*Ibuffer*\". +Optional argument QUALIFIERS is an initial set of filtering qualifiers +to use; see `ibuffer-filtering-qualifiers'. +Optional argument NOSELECT means don't select the Ibuffer buffer. +Optional argument SHRINK means shrink the buffer to minimal size. The +special value `onewindow' means always use another window. +Optional argument FILTER-GROUPS is an initial set of filtering +groups to use; see `ibuffer-filter-groups'. +Optional argument FORMATS is the value to use for `ibuffer-formats'. +If specified, then the variable `ibuffer-formats' will have that value +locally in this buffer. + +\(fn &optional OTHER-WINDOW-P NAME QUALIFIERS NOSELECT SHRINK FILTER-GROUPS FORMATS)" t nil) + +;;;*** + +;;;### (autoloads (icomplete-minibuffer-setup icomplete-mode) "icomplete" +;;;;;; "icomplete.el" (16211 27017)) +;;; Generated autoloads from icomplete.el + +(autoload (quote icomplete-mode) "icomplete" "\ +Toggle incremental minibuffer completion for this Emacs session. +With a numeric argument, turn Icomplete mode on iff ARG is positive. + +\(fn &optional ARG)" t nil) + +(autoload (quote icomplete-minibuffer-setup) "icomplete" "\ +Run in minibuffer on activation to establish incremental completion. +Usually run by inclusion in `minibuffer-setup-hook'. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (icon-mode) "icon" "progmodes/icon.el" (16211 27039)) +;;; Generated autoloads from progmodes/icon.el + +(autoload (quote icon-mode) "icon" "\ +Major mode for editing Icon code. +Expression and list commands understand all Icon brackets. +Tab indents for Icon code. +Paragraphs are separated by blank lines only. +Delete converts tabs to spaces as it moves back. +\\{icon-mode-map} +Variables controlling indentation style: + icon-tab-always-indent + Non-nil means TAB in Icon mode should always reindent the current line, + regardless of where in the line point is when the TAB command is used. + icon-auto-newline + Non-nil means automatically newline before and after braces + inserted in Icon code. + icon-indent-level + Indentation of Icon statements within surrounding block. + The surrounding block's indentation is the indentation + of the line on which the open-brace appears. + icon-continued-statement-offset + Extra indentation given to a substatement, such as the + then-clause of an if or body of a while. + icon-continued-brace-offset + Extra indentation given to a brace that starts a substatement. + This is in addition to `icon-continued-statement-offset'. + icon-brace-offset + Extra indentation for line if it starts with an open brace. + icon-brace-imaginary-offset + An open brace following other text is treated as if it were + this far to the right of the start of its line. + +Turning on Icon mode calls the value of the variable `icon-mode-hook' +with no args, if that value is non-nil. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (idlwave-shell) "idlw-shell" "progmodes/idlw-shell.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/idlw-shell.el + +(autoload (quote idlwave-shell) "idlw-shell" "\ +Run an inferior IDL, with I/O through buffer `(idlwave-shell-buffer)'. +If buffer exists but shell process is not running, start new IDL. +If buffer exists and shell process is running, just switch to the buffer. + +When called with a prefix ARG, or when `idlwave-shell-use-dedicated-frame' +is non-nil, the shell buffer and the source buffers will be in +separate frames. + +The command to run comes from variable `idlwave-shell-explicit-file-name', +with options taken from `idlwave-shell-command-line-options'. + +The buffer is put in `idlwave-shell-mode', providing commands for sending +input and controlling the IDL job. See help on `idlwave-shell-mode'. +See also the variable `idlwave-shell-prompt-pattern'. + +\(Type \\[describe-mode] in the shell buffer for a list of commands.) + +\(fn &optional ARG QUICK)" t nil) + +;;;*** + +;;;### (autoloads (idlwave-mode) "idlwave" "progmodes/idlwave.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/idlwave.el + +(autoload (quote idlwave-mode) "idlwave" "\ +Major mode for editing IDL and WAVE CL .pro files. + +The main features of this mode are + +1. Indentation and Formatting + -------------------------- + Like other Emacs programming modes, C-j inserts a newline and indents. + TAB is used for explicit indentation of the current line. + + To start a continuation line, use \\[idlwave-split-line]. This + function can also be used in the middle of a line to split the line + at that point. When used inside a long constant string, the string + is split at that point with the `+' concatenation operator. + + Comments are indented as follows: + + `;;;' Indentation remains unchanged. + `;;' Indent like the surrounding code + `;' Indent to a minimum column. + + The indentation of comments starting in column 0 is never changed. + + Use \\[idlwave-fill-paragraph] to refill a paragraph inside a + comment. The indentation of the second line of the paragraph + relative to the first will be retained. Use + \\[idlwave-auto-fill-mode] to toggle auto-fill mode for these + comments. When the variable `idlwave-fill-comment-line-only' is + nil, code can also be auto-filled and auto-indented (not + recommended). + + To convert pre-existing IDL code to your formatting style, mark the + entire buffer with \\[mark-whole-buffer] and execute + \\[idlwave-expand-region-abbrevs]. Then mark the entire buffer + again followed by \\[indent-region] (`indent-region'). + +2. Routine Info + ------------ + IDLWAVE displays information about the calling sequence and the + accepted keyword parameters of a procedure or function with + \\[idlwave-routine-info]. \\[idlwave-find-module] jumps to the + source file of a module. These commands know about system + routines, all routines in idlwave-mode buffers and (when the + idlwave-shell is active) about all modules currently compiled under + this shell. Use \\[idlwave-update-routine-info] to update this + information, which is also used for completion (see item 4). + +3. Online IDL Help + --------------- + \\[idlwave-context-help] displays the IDL documentation relevant + for the system variable, keyword, or routine at point. A single key + stroke gets you directly to the right place in the docs. Two additional + files (an ASCII version of the IDL documentation and a topics file) must + be installed for this - check the IDLWAVE webpage for these files. + +4. Completion + ---------- + \\[idlwave-complete] completes the names of procedures, functions + class names and keyword parameters. It is context sensitive and + figures out what is expected at point (procedure/function/keyword). + Lower case strings are completed in lower case, other strings in + mixed or upper case. + +5. Code Templates and Abbreviations + -------------------------------- + Many Abbreviations are predefined to expand to code fragments and templates. + The abbreviations start generally with a `\\`. Some examples + + \\pr PROCEDURE template + \\fu FUNCTION template + \\c CASE statement template + \\sw SWITCH statement template + \\f FOR loop template + \\r REPEAT Loop template + \\w WHILE loop template + \\i IF statement template + \\elif IF-ELSE statement template + \\b BEGIN + + For a full list, use \\[idlwave-list-abbrevs]. Some templates also have + direct keybindings - see the list of keybindings below. + + \\[idlwave-doc-header] inserts a documentation header at the beginning of the + current program unit (pro, function or main). Change log entries + can be added to the current program unit with \\[idlwave-doc-modification]. + +6. Automatic Case Conversion + ------------------------- + The case of reserved words and some abbrevs is controlled by + `idlwave-reserved-word-upcase' and `idlwave-abbrev-change-case'. + +7. Automatic END completion + ------------------------ + If the variable `idlwave-expand-generic-end' is non-nil, each END typed + will be converted to the specific version, like ENDIF, ENDFOR, etc. + +8. Hooks + ----- + Loading idlwave.el runs `idlwave-load-hook'. + Turning on `idlwave-mode' runs `idlwave-mode-hook'. + +9. Documentation and Customization + ------------------------------- + Info documentation for this package is available. Use + \\[idlwave-info] to display (complain to your sysadmin if that does + not work). For Postscript, PDF, and HTML versions of the + documentation, check IDLWAVE's homepage at `http://idlwave.org'. + IDLWAVE has customize support - see the group `idlwave'. + +10.Keybindings + ----------- + Here is a list of all keybindings of this mode. + If some of the key bindings below show with ??, use \\[describe-key] + followed by the key sequence to see what the key sequence does. + +\\{idlwave-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (ido-read-directory-name ido-read-file-name ido-dired +;;;;;; ido-insert-file ido-write-file ido-find-file-other-frame +;;;;;; ido-display-file ido-find-file-read-only-other-frame ido-find-file-read-only-other-window +;;;;;; ido-find-file-read-only ido-find-alternate-file ido-find-file-other-window +;;;;;; ido-find-file ido-find-file-in-dir ido-switch-buffer-other-frame +;;;;;; ido-insert-buffer ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window +;;;;;; ido-switch-buffer ido-read-buffer ido-mode ido-mode) "ido" +;;;;;; "ido.el" (16211 27017)) +;;; Generated autoloads from ido.el + +(defvar ido-mode nil "\ +Determines for which functional group (buffer and files) ido behavior +should be enabled. The following values are possible: +- `buffer': Turn only on ido buffer behavior (switching, killing, + displaying...) +- `file': Turn only on ido file behavior (finding, writing, inserting...) +- `both': Turn on ido buffer and file behavior. +- `nil': Turn off any ido switching. + +Setting this variable directly does not take effect; +use either \\[customize] or the function `ido-mode'.") + +(custom-autoload (quote ido-mode) "ido") + +(autoload (quote ido-mode) "ido" "\ +Toggle ido speed-ups on or off. +With ARG, turn ido speed-up on if arg is positive, off otherwise. +Turning on ido-mode will remap (via a minor-mode keymap) the default +keybindings for the `find-file' and `switch-to-buffer' families of +commands to the ido versions of these functions. +However, if ARG arg equals 'files, remap only commands for files, or +if it equals 'buffers, remap only commands for buffer switching. +This function also adds a hook to the minibuffer. + +\(fn &optional ARG)" t nil) + +(autoload (quote ido-read-buffer) "ido" "\ +Replacement for the built-in `read-buffer'. +Return the name of a buffer selected. +PROMPT is the prompt to give to the user. DEFAULT if given is the default +buffer to be selected, which will go to the front of the list. +If REQUIRE-MATCH is non-nil, an existing-buffer must be selected. +If INITIAL is non-nil, it specifies the initial input string. + +\(fn PROMPT &optional DEFAULT REQUIRE-MATCH INITIAL)" nil nil) + +(autoload (quote ido-switch-buffer) "ido" "\ +Switch to another buffer. +The buffer is displayed according to `ido-default-buffer-method' -- the +default is to show it in the same window, unless it is already visible +in another frame. + +As you type in a string, all of the buffers matching the string are +displayed if substring-matching is used (default). Look at +`ido-enable-prefix' and `ido-toggle-prefix'. When you have found the +buffer you want, it can then be selected. As you type, most keys have their +normal keybindings, except for the following: \\ + +RET Select the buffer at the front of the list of matches. If the +list is empty, possibly prompt to create new buffer. + +\\[ido-select-text] Select the current prompt as the buffer. +If no buffer is found, prompt for a new one. + +\\[ido-next-match] Put the first element at the end of the list. +\\[ido-prev-match] Put the last element at the start of the list. +\\[ido-complete] Complete a common suffix to the current string that +matches all buffers. If there is only one match, select that buffer. +If there is no common suffix, show a list of all matching buffers +in a separate window. +\\[ido-edit-input] Edit input string. +\\[ido-fallback-command] Fallback to non-ido version of current command. +\\[ido-toggle-regexp] Toggle regexp searching. +\\[ido-toggle-prefix] Toggle between substring and prefix matching. +\\[ido-toggle-case] Toggle case-sensitive searching of buffer names. +\\[ido-completion-help] Show list of matching buffers in separate window. +\\[ido-enter-find-file] Drop into ido-find-file. +\\[ido-kill-buffer-at-head] Kill buffer at head of buffer list. +\\[ido-toggle-ignore] Toggle ignoring buffers listed in `ido-ignore-buffers'. + +\(fn)" t nil) + +(autoload (quote ido-switch-buffer-other-window) "ido" "\ +Switch to another buffer and show it in another window. +The buffer name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido'. + +\(fn)" t nil) + +(autoload (quote ido-display-buffer) "ido" "\ +Display a buffer in another window but don't select it. +The buffer name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido'. + +\(fn)" t nil) + +(autoload (quote ido-kill-buffer) "ido" "\ +Kill a buffer. +The buffer name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido'. + +\(fn)" t nil) + +(autoload (quote ido-insert-buffer) "ido" "\ +Insert contents of a buffer in current buffer after point. +The buffer name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido'. + +\(fn)" t nil) + +(autoload (quote ido-switch-buffer-other-frame) "ido" "\ +Switch to another buffer and show it in another frame. +The buffer name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido'. + +\(fn)" t nil) + +(autoload (quote ido-find-file-in-dir) "ido" "\ +Switch to another file starting from DIR. + +\(fn DIR)" t nil) + +(autoload (quote ido-find-file) "ido" "\ +Edit file with name obtained via minibuffer. +The file is displayed according to `ido-default-file-method' -- the +default is to show it in the same window, unless it is already +visible in another frame. + +The file name is selected interactively by typing a substring. As you type +in a string, all of the filenames matching the string are displayed if +substring-matching is used (default). Look at `ido-enable-prefix' and +`ido-toggle-prefix'. When you have found the filename you want, it can +then be selected. As you type, most keys have their normal keybindings, +except for the following: \\ + +RET Select the file at the front of the list of matches. If the +list is empty, possibly prompt to create new file. + +\\[ido-select-text] Select the current prompt as the buffer or file. +If no buffer or file is found, prompt for a new one. + +\\[ido-next-match] Put the first element at the end of the list. +\\[ido-prev-match] Put the last element at the start of the list. +\\[ido-complete] Complete a common suffix to the current string that +matches all files. If there is only one match, select that file. +If there is no common suffix, show a list of all matching files +in a separate window. +\\[ido-edit-input] Edit input string (including directory). +\\[ido-prev-work-directory] or \\[ido-next-work-directory] go to previous/next directory in work directory history. +\\[ido-merge-work-directories] search for file in the work directory history. +\\[ido-forget-work-directory] removes current directory from the work directory history. +\\[ido-prev-work-file] or \\[ido-next-work-file] cycle through the work file history. +\\[ido-wide-find-file] and \\[ido-wide-find-dir] prompts and uses find to locate files or directories. +\\[ido-make-directory] prompts for a directory to create in current directory. +\\[ido-fallback-command] Fallback to non-ido version of current command. +\\[ido-toggle-regexp] Toggle regexp searching. +\\[ido-toggle-prefix] Toggle between substring and prefix matching. +\\[ido-toggle-case] Toggle case-sensitive searching of file names. +\\[ido-toggle-vc] Toggle version control for this file. +\\[ido-toggle-literal] Toggle literal reading of this file. +\\[ido-completion-help] Show list of matching files in separate window. +\\[ido-toggle-ignore] Toggle ignoring files listed in `ido-ignore-files'. + +\(fn)" t nil) + +(autoload (quote ido-find-file-other-window) "ido" "\ +Switch to another file and show it in another window. +The file name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido-find-file'. + +\(fn)" t nil) + +(autoload (quote ido-find-alternate-file) "ido" "\ +Switch to another file and show it in another window. +The file name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido-find-file'. + +\(fn)" t nil) + +(autoload (quote ido-find-file-read-only) "ido" "\ +Edit file read-only with name obtained via minibuffer. +The file name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido-find-file'. + +\(fn)" t nil) + +(autoload (quote ido-find-file-read-only-other-window) "ido" "\ +Edit file read-only in other window with name obtained via minibuffer. +The file name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido-find-file'. + +\(fn)" t nil) + +(autoload (quote ido-find-file-read-only-other-frame) "ido" "\ +Edit file read-only in other frame with name obtained via minibuffer. +The file name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido-find-file'. + +\(fn)" t nil) + +(autoload (quote ido-display-file) "ido" "\ +Display a file in another window but don't select it. +The file name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido-find-file'. + +\(fn)" t nil) + +(autoload (quote ido-find-file-other-frame) "ido" "\ +Switch to another file and show it in another frame. +The file name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido-find-file'. + +\(fn)" t nil) + +(autoload (quote ido-write-file) "ido" "\ +Write current buffer to a file. +The file name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido-find-file'. + +\(fn)" t nil) + +(autoload (quote ido-insert-file) "ido" "\ +Insert contents of file in current buffer. +The file name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido-find-file'. + +\(fn)" t nil) + +(autoload (quote ido-dired) "ido" "\ +Call dired the ido way. +The directory is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] ido-find-file'. + +\(fn)" t nil) + +(autoload (quote ido-read-file-name) "ido" "\ +Read file name, prompting with PROMPT and completing in directory DIR. +See `read-file-name' for additional parameters. + +\(fn PROMPT &optional DIR DEFAULT-FILENAME MUSTMATCH INITIAL PREDICATE)" nil nil) + +(autoload (quote ido-read-directory-name) "ido" "\ +Read directory name, prompting with PROMPT and completing in directory DIR. +See `read-file-name' for additional parameters. + +\(fn PROMPT &optional DIR DEFAULT-DIRNAME MUSTMATCH INITIAL)" nil nil) + +;;;*** + +;;;### (autoloads (ielm) "ielm" "ielm.el" (16218 6767)) +;;; Generated autoloads from ielm.el + (add-hook 'same-window-buffer-names "*ielm*") + +(autoload (quote ielm) "ielm" "\ +Interactively evaluate Emacs Lisp expressions. +Switches to the buffer `*ielm*', or creates it if it does not exist. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (defimage find-image remove-images insert-image +;;;;;; put-image create-image image-type-available-p image-type-from-file-header +;;;;;; image-type-from-data) "image" "image.el" (16211 27017)) +;;; Generated autoloads from image.el + +(autoload (quote image-type-from-data) "image" "\ +Determine the image type from image data DATA. +Value is a symbol specifying the image type or nil if type cannot +be determined. + +\(fn DATA)" nil nil) + +(autoload (quote image-type-from-file-header) "image" "\ +Determine the type of image file FILE from its first few bytes. +Value is a symbol specifying the image type, or nil if type cannot +be determined. + +\(fn FILE)" nil nil) + +(autoload (quote image-type-available-p) "image" "\ +Value is non-nil if image type TYPE is available. +Image types are symbols like `xbm' or `jpeg'. + +\(fn TYPE)" nil nil) + +(autoload (quote create-image) "image" "\ +Create an image. +FILE-OR-DATA 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, +use its file extension as image type. +Optional DATA-P non-nil means FILE-OR-DATA is a string containing image data. +Optional PROPS are additional image attributes to assign to the image, +like, e.g. `:mask MASK'. +Value is the image created, or nil if images of type TYPE are not supported. + +\(fn FILE-OR-DATA &optional TYPE DATA-P &rest PROPS)" nil nil) + +(autoload (quote put-image) "image" "\ +Put image IMAGE in front of POS in the current buffer. +IMAGE must be an image created with `create-image' or `defimage'. +IMAGE is displayed by putting an overlay into the current buffer with a +`before-string' STRING that has a `display' property whose value is the +image. STRING is defaulted if you omit it. +POS may be an integer or marker. +AREA is where to display the image. AREA nil or omitted means +display it in the text area, a value of `left-margin' means +display it in the left marginal area, a value of `right-margin' +means display it in the right marginal area. + +\(fn IMAGE POS &optional STRING AREA)" nil nil) + +(autoload (quote insert-image) "image" "\ +Insert IMAGE into current buffer at point. +IMAGE is displayed by inserting STRING into the current buffer +with a `display' property whose value is the image. STRING is +defaulted if you omit it. +AREA is where to display the image. AREA nil or omitted means +display it in the text area, a value of `left-margin' means +display it in the left marginal area, a value of `right-margin' +means display it in the right marginal area. + +\(fn IMAGE &optional STRING AREA)" nil nil) + +(autoload (quote remove-images) "image" "\ +Remove images between START and END in BUFFER. +Remove only images that were put in BUFFER with calls to `put-image'. +BUFFER nil or omitted means use the current buffer. + +\(fn START END &optional BUFFER)" nil nil) + +(autoload (quote find-image) "image" "\ +Find an image, choosing one of a list of image specifications. + +SPECS is a list of image specifications. + +Each image specification in SPECS is a property list. The contents of +a specification are image type dependent. All specifications must at +least contain the properties `:type TYPE' and either `:file FILE' or +`:data DATA', where TYPE is a symbol specifying the image type, +e.g. `xbm', FILE is the file to load the image from, and DATA is a +string containing the actual image data. The specification whose TYPE +is supported, and FILE exists, is used to construct the image +specification to be returned. Return nil if no specification is +satisfied. + +The image is looked for first on `load-path' and then in `data-directory'. + +\(fn SPECS)" nil nil) + +(autoload (quote defimage) "image" "\ +Define SYMBOL as an image. + +SPECS is a list of image specifications. DOC is an optional +documentation string. + +Each image specification in SPECS is a property list. The contents of +a specification are image type dependent. All specifications must at +least contain the properties `:type TYPE' and either `:file FILE' or +`:data DATA', where TYPE is a symbol specifying the image type, +e.g. `xbm', FILE is the file to load the image from, and DATA is a +string containing the actual image data. The first image +specification whose TYPE is supported, and FILE exists, is used to +define SYMBOL. + +Example: + + (defimage test-image ((:type xpm :file \"~/test1.xpm\") + (:type xbm :file \"~/test1.xbm\"))) + +\(fn SYMBOL SPECS &optional DOC)" nil (quote macro)) + +;;;*** + +;;;### (autoloads (auto-image-file-mode insert-image-file image-file-name-regexp +;;;;;; image-file-name-regexps image-file-name-extensions) "image-file" +;;;;;; "image-file.el" (16211 27017)) +;;; Generated autoloads from image-file.el + +(defvar image-file-name-extensions (quote ("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm" "pnm")) "\ +*A list of image-file filename extensions. +Filenames having one of these extensions are considered image files, +in addition to those matching `image-file-name-regexps'. + +See `auto-image-file-mode'; if `auto-image-file-mode' is enabled, +setting this variable directly does not take effect unless +`auto-image-file-mode' is re-enabled; this happens automatically when +the variable is set using \\[customize].") + +(custom-autoload (quote image-file-name-extensions) "image-file") + +(defvar image-file-name-regexps nil "\ +*List of regexps matching image-file filenames. +Filenames matching one of these regexps are considered image files, +in addition to those with an extension in `image-file-name-extensions'. + +See function `auto-image-file-mode'; if `auto-image-file-mode' is +enabled, setting this variable directly does not take effect unless +`auto-image-file-mode' is re-enabled; this happens automatically when +the variable is set using \\[customize].") + +(custom-autoload (quote image-file-name-regexps) "image-file") + +(autoload (quote image-file-name-regexp) "image-file" "\ +Return a regular expression matching image-file filenames. + +\(fn)" nil nil) + +(autoload (quote insert-image-file) "image-file" "\ +Insert the image file FILE into the current buffer. +Optional arguments VISIT, BEG, END, and REPLACE are interpreted as for +the command `insert-file-contents'. + +\(fn FILE &optional VISIT BEG END REPLACE)" nil nil) + +(defvar auto-image-file-mode nil "\ +Non-nil if Auto-Image-File mode is enabled. +See the command `auto-image-file-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `auto-image-file-mode'.") + +(custom-autoload (quote auto-image-file-mode) "image-file") + +(autoload (quote auto-image-file-mode) "image-file" "\ +Toggle visiting of image files as images. +With prefix argument ARG, turn on if positive, otherwise off. +Returns non-nil if the new state is enabled. + +Image files are those whose name has an extension in +`image-file-name-extensions', or matches a regexp in +`image-file-name-regexps'. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (imenu imenu-add-menubar-index imenu-add-to-menubar +;;;;;; imenu-sort-function) "imenu" "imenu.el" (16252 34050)) +;;; Generated autoloads from imenu.el + +(defvar imenu-sort-function nil "\ +*The function to use for sorting the index mouse-menu. + +Affects only the mouse index menu. + +Set this to nil if you don't want any sorting (faster). +The items in the menu are then presented in the order they were found +in the buffer. + +Set it to `imenu--sort-by-name' if you want alphabetic sorting. + +The function should take two arguments and return t if the first +element should come before the second. The arguments are cons cells; +\(NAME . POSITION). Look at `imenu--sort-by-name' for an example.") + +(custom-autoload (quote imenu-sort-function) "imenu") + +(defvar imenu-generic-expression nil "\ +The regex pattern to use for creating a buffer index. + +If non-nil this pattern is passed to `imenu--generic-function' +to create a buffer index. + +The value should be an alist with elements that look like this: + (MENU-TITLE REGEXP INDEX) +or like this: + (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...) +with zero or more ARGUMENTS. The former format creates a simple element in +the index alist when it matches; the latter creates a special element +of the form (NAME POSITION-MARKER FUNCTION ARGUMENTS...) +with FUNCTION and ARGUMENTS copied from `imenu-generic-expression'. + +MENU-TITLE is a string used as the title for the submenu or nil if the +entries are not nested. + +REGEXP is a regexp that should match a construct in the buffer that is +to be displayed in the menu; i.e., function or variable definitions, +etc. It contains a substring which is the name to appear in the +menu. See the info section on Regexps for more information. + +INDEX points to the substring in REGEXP that contains the name (of the +function, variable or type) that is to appear in the menu. + +The variable is buffer-local. + +The variable `imenu-case-fold-search' determines whether or not the +regexp matches are case sensitive, and `imenu-syntax-alist' can be +used to alter the syntax table for the search. + +For example, see the value of `fortran-imenu-generic-expression' used by +`fortran-mode' with `imenu-syntax-alist' set locally to give the +characters which normally have \"symbol\" syntax \"word\" syntax +during matching.") + +(make-variable-buffer-local (quote imenu-generic-expression)) + +(defvar imenu-create-index-function (quote imenu-default-create-index-function) "\ +The function to use for creating a buffer index. + +It should be a function that takes no arguments and returns an index +of the current buffer as an alist. + +Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). +Special elements look like (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...). +A nested sub-alist element looks like (INDEX-NAME SUB-ALIST). +The function `imenu--subalist-p' tests an element and returns t +if it is a sub-alist. + +This function is called within a `save-excursion'. + +The variable is buffer-local.") + +(make-variable-buffer-local (quote imenu-create-index-function)) + +(defvar imenu-prev-index-position-function (quote beginning-of-defun) "\ +Function for finding the next index position. + +If `imenu-create-index-function' is set to +`imenu-default-create-index-function', then you must set this variable +to a function that will find the next index, looking backwards in the +file. + +The function should leave point at the place to be connected to the +index and it should return nil when it doesn't find another index. + +This variable is local in all buffers.") + +(make-variable-buffer-local (quote imenu-prev-index-position-function)) + +(defvar imenu-extract-index-name-function nil "\ +Function for extracting the index item name, given a position. + +This function is called after `imenu-prev-index-position-function' +finds a position for an index item, with point at that position. +It should return the name for that index item. + +This variable is local in all buffers.") + +(make-variable-buffer-local (quote imenu-extract-index-name-function)) + +(defvar imenu-name-lookup-function nil "\ +Function to compare string with index item. + +This function will be called with two strings, and should return +non-nil if they match. + +If nil, comparison is done with `string='. +Set this to some other function for more advanced comparisons, +such as \"begins with\" or \"name matches and number of +arguments match\". + +This variable is local in all buffers.") + +(make-variable-buffer-local (quote imenu-name-lookup-function)) + +(defvar imenu-default-goto-function (quote imenu-default-goto-function) "\ +The default function called when selecting an Imenu item. +The function in this variable is called when selecting a normal index-item.") + +(make-variable-buffer-local (quote imenu-default-goto-function)) + +(make-variable-buffer-local (quote imenu-syntax-alist)) + +(make-variable-buffer-local (quote imenu-case-fold-search)) + +(autoload (quote imenu-add-to-menubar) "imenu" "\ +Add an `imenu' entry to the menu bar for the current buffer. +NAME is a string used to name the menu bar item. +See the command `imenu' for more information. + +\(fn NAME)" t nil) + +(autoload (quote imenu-add-menubar-index) "imenu" "\ +Add an Imenu \"Index\" entry on the menu bar for the current buffer. + +A trivial interface to `imenu-add-to-menubar' suitable for use in a hook. + +\(fn)" t nil) + +(autoload (quote imenu) "imenu" "\ +Jump to a place in the buffer chosen using a buffer menu or mouse menu. +INDEX-ITEM specifies the position. See `imenu-choose-buffer-index' +for more information. + +\(fn INDEX-ITEM)" t nil) + +;;;*** + +;;;### (autoloads (indian-char-glyph indian-glyph-char in-is13194-pre-write-conversion +;;;;;; in-is13194-post-read-conversion indian-compose-string indian-compose-region) +;;;;;; "ind-util" "language/ind-util.el" (16301 42973)) +;;; Generated autoloads from language/ind-util.el + +(autoload (quote indian-compose-region) "ind-util" "\ +Compose the region according to `composition-function-table'. + +\(fn FROM TO)" t nil) + +(autoload (quote indian-compose-string) "ind-util" "\ +Not documented + +\(fn STRING)" nil nil) + +(autoload (quote in-is13194-post-read-conversion) "ind-util" "\ +Not documented + +\(fn LEN)" nil nil) + +(autoload (quote in-is13194-pre-write-conversion) "ind-util" "\ +Not documented + +\(fn FROM TO)" nil nil) + +(autoload (quote indian-glyph-char) "ind-util" "\ +Return character of charset `indian-glyph' made from glyph index INDEX. +The variable `indian-default-script' specifies the script of the glyph. +Optional argument SCRIPT, if non-nil, overrides `indian-default-script'. +See also the function `indian-char-glyph'. + +\(fn INDEX &optional SCRIPT)" nil nil) + +(autoload (quote indian-char-glyph) "ind-util" "\ +Return information about the glyph code for CHAR of `indian-glyph' charset. +The value is (INDEX . SCRIPT), where INDEX is the glyph index +in the font that Indian script name SCRIPT specifies. +See also the function `indian-glyph-char'. + +\(fn CHAR)" nil nil) + +;;;*** + +;;;### (autoloads (inferior-lisp) "inf-lisp" "progmodes/inf-lisp.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/inf-lisp.el + +(defvar inferior-lisp-filter-regexp "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'" "\ +*What not to save on inferior Lisp's input history. +Input matching this regexp is not saved on the input history in Inferior Lisp +mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword +\(as in :a, :c, etc.)") + +(defvar inferior-lisp-program "lisp" "\ +*Program name for invoking an inferior Lisp with for Inferior Lisp mode.") + +(defvar inferior-lisp-load-command "(load \"%s\")\n" "\ +*Format-string for building a Lisp expression to load a file. +This format string should use `%s' to substitute a file name +and should result in a Lisp expression that will command the inferior Lisp +to load that file. The default works acceptably on most Lisps. +The string \"(progn (load \\\"%s\\\" :verbose nil :print t) (values))\\n\" +produces cosmetically superior output for this application, +but it works only in Common Lisp.") + +(defvar inferior-lisp-prompt "^[^> \n]*>+:? *" "\ +Regexp to recognise prompts in the Inferior Lisp mode. +Defaults to \"^[^> \\n]*>+:? *\", which works pretty good for Lucid, kcl, +and franz. This variable is used to initialize `comint-prompt-regexp' in the +Inferior Lisp buffer. + +This variable is only used if the variable +`comint-use-prompt-regexp-instead-of-fields' is non-nil. + +More precise choices: +Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\" +franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\" +kcl: \"^>+ *\" + +This is a fine thing to set in your .emacs file.") + +(defvar inferior-lisp-mode-hook (quote nil) "\ +*Hook for customising Inferior Lisp mode.") + +(autoload (quote inferior-lisp) "inf-lisp" "\ +Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'. +If there is a process already running in `*inferior-lisp*', just switch +to that buffer. +With argument, allows you to edit the command line (default is value +of `inferior-lisp-program'). Runs the hooks from +`inferior-lisp-mode-hook' (after the `comint-mode-hook' is run). +\(Type \\[describe-mode] in the process buffer for a list of commands.) + +\(fn CMD)" t nil) + (add-hook 'same-window-buffer-names "*inferior-lisp*") + +(defalias (quote run-lisp) (quote inferior-lisp)) + +;;;*** + +;;;### (autoloads (Info-speedbar-browser Info-goto-emacs-key-command-node +;;;;;; Info-goto-emacs-command-node Info-index Info-directory info-standalone +;;;;;; info-emacs-manual info info-other-window) "info" "info.el" +;;;;;; (16258 10857)) +;;; Generated autoloads from info.el + +(autoload (quote info-other-window) "info" "\ +Like `info' but show the Info buffer in another window. + +\(fn &optional FILE)" t nil) + (add-hook 'same-window-buffer-names "*info*") + +(autoload (quote info) "info" "\ +Enter Info, the documentation browser. +Optional argument FILE specifies the file to examine; +the default is the top-level directory of Info. +Called from a program, FILE may specify an Info node of the form +`(FILENAME)NODENAME'. + +In interactive use, a prefix argument directs this command +to read a file name from the minibuffer. + +The search path for Info files is in the variable `Info-directory-list'. +The top-level Info directory is made by combining all the files named `dir' +in all the directories in that path. + +\(fn &optional FILE)" t nil) + +(autoload (quote info-emacs-manual) "info" "\ +Display the Emacs manual in Info mode. + +\(fn)" t nil) + +(autoload (quote info-standalone) "info" "\ +Run Emacs as a standalone Info reader. +Usage: emacs -f info-standalone [filename] +In standalone mode, \\\\[Info-exit] exits Emacs itself. + +\(fn)" nil nil) + +(autoload (quote Info-directory) "info" "\ +Go to the Info directory node. + +\(fn)" t nil) + +(autoload (quote Info-index) "info" "\ +Look up a string TOPIC in the index for this file. +The index is defined as the first node in the top level menu whose +name contains the word \"Index\", plus any immediately following +nodes whose names also contain the word \"Index\". +If there are no exact matches to the specified topic, this chooses +the first match which is a case-insensitive substring of a topic. +Use the `,' command to see the other matches. +Give a blank topic name to go to the Index node itself. + +\(fn TOPIC)" t nil) + +(autoload (quote Info-goto-emacs-command-node) "info" "\ +Go to the Info node in the Emacs manual for command COMMAND. +The command is found by looking up in Emacs manual's indices +or in another manual found via COMMAND's `info-file' property or +the variable `Info-file-list-for-emacs'. COMMAND must be a symbol +or string. + +\(fn COMMAND)" t nil) + +(autoload (quote Info-goto-emacs-key-command-node) "info" "\ +Go to the node in the Emacs manual which describes the command bound to KEY. +KEY is a string. +Interactively, if the binding is `execute-extended-command', a command is read. +The command is found by looking up in Emacs manual's indices +or in another manual found via COMMAND's `info-file' property or +the variable `Info-file-list-for-emacs'. + +\(fn KEY)" t nil) + +(autoload (quote Info-speedbar-browser) "info" "\ +Initialize speedbar to display an info node browser. +This will add a speedbar major display mode. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (info-complete-file info-complete-symbol info-lookup-file +;;;;;; info-lookup-symbol info-lookup-reset) "info-look" "info-look.el" +;;;;;; (16211 27017)) +;;; Generated autoloads from info-look.el + +(autoload (quote info-lookup-reset) "info-look" "\ +Throw away all cached data. +This command is useful if the user wants to start at the beginning without +quitting Emacs, for example, after some Info documents were updated on the +system. + +\(fn)" t nil) + +(autoload (quote info-lookup-symbol) "info-look" "\ +Display the definition of SYMBOL, as found in the relevant manual. +When this command is called interactively, it reads SYMBOL from the minibuffer. +In the minibuffer, use M-n to yank the default argument value +into the minibuffer so you can edit it. +The default symbol is the one found at point. + +With prefix arg a query for the symbol help mode is offered. + +\(fn SYMBOL &optional MODE)" t nil) + +(autoload (quote info-lookup-file) "info-look" "\ +Display the documentation of a file. +When this command is called interactively, it reads FILE from the minibuffer. +In the minibuffer, use M-n to yank the default file name +into the minibuffer so you can edit it. +The default file name is the one found at point. + +With prefix arg a query for the file help mode is offered. + +\(fn FILE &optional MODE)" t nil) + +(autoload (quote info-complete-symbol) "info-look" "\ +Perform completion on symbol preceding point. + +\(fn &optional MODE)" t nil) + +(autoload (quote info-complete-file) "info-look" "\ +Perform completion on file preceding point. + +\(fn &optional MODE)" t nil) + +;;;*** + +;;;### (autoloads (info-xref-check-all info-xref-check) "info-xref" +;;;;;; "info-xref.el" (16211 27017)) +;;; Generated autoloads from info-xref.el + +(autoload (quote info-xref-check) "info-xref" "\ +Check external references in FILENAME, an info document. + +\(fn FILENAME)" t nil) + +(autoload (quote info-xref-check-all) "info-xref" "\ +Check external references in all info documents in the usual path. +The usual path is `Info-directory-list' and `Info-additional-directory-list'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (batch-info-validate Info-validate Info-split Info-tagify) +;;;;;; "informat" "informat.el" (16211 27017)) +;;; Generated autoloads from informat.el + +(autoload (quote Info-tagify) "informat" "\ +Create or update Info file tag table in current buffer or in a region. + +\(fn &optional INPUT-BUFFER-NAME)" t nil) + +(autoload (quote Info-split) "informat" "\ +Split an info file into an indirect file plus bounded-size subfiles. +Each subfile will be up to 50,000 characters plus one node. + +To use this command, first visit a large Info file that has a tag +table. The buffer is modified into a (small) indirect info file which +should be saved in place of the original visited file. + +The subfiles are written in the same directory the original file is +in, with names generated by appending `-' and a number to the original +file name. The indirect file still functions as an Info file, but it +contains just the tag table and a directory of subfiles. + +\(fn)" t nil) + +(autoload (quote Info-validate) "informat" "\ +Check current buffer for validity as an Info file. +Check that every node pointer points to an existing node. + +\(fn)" t nil) + +(autoload (quote batch-info-validate) "informat" "\ +Runs `Info-validate' on the files remaining on the command line. +Must be used only with -batch, and kills Emacs on completion. +Each file will be processed even if an error occurred previously. +For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\" + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (isearch-process-search-multibyte-characters isearch-toggle-input-method +;;;;;; isearch-toggle-specified-input-method) "isearch-x" "international/isearch-x.el" +;;;;;; (16211 27032)) +;;; Generated autoloads from international/isearch-x.el + +(autoload (quote isearch-toggle-specified-input-method) "isearch-x" "\ +Select an input method and turn it on in interactive search. + +\(fn)" t nil) + +(autoload (quote isearch-toggle-input-method) "isearch-x" "\ +Toggle input method in interactive search. + +\(fn)" t nil) + +(autoload (quote isearch-process-search-multibyte-characters) "isearch-x" "\ +Not documented + +\(fn LAST-CHAR)" nil nil) + +;;;*** + +;;;### (autoloads (iso-accents-mode) "iso-acc" "international/iso-acc.el" +;;;;;; (16211 27032)) +;;; Generated autoloads from international/iso-acc.el + +(autoload (quote iso-accents-mode) "iso-acc" "\ +Toggle ISO Accents mode, in which accents modify the following letter. +This permits easy insertion of accented characters according to ISO-8859-1. +When Iso-accents mode is enabled, accent character keys +\(`, ', \", ^, / and ~) do not self-insert; instead, they modify the following +letter key so that it inserts an ISO accented letter. + +You can customize ISO Accents mode to a particular language +with the command `iso-accents-customize'. + +Special combinations: ~c gives a c with cedilla, +~d gives an Icelandic eth (d with dash). +~t gives an Icelandic thorn. +\"s gives German sharp s. +/a gives a with ring. +/e gives an a-e ligature. +~< and ~> give guillemots. +~! gives an inverted exclamation mark. +~? gives an inverted question mark. + +With an argument, a positive argument enables ISO Accents mode, +and a negative argument disables it. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (iso-cvt-define-menu iso-cvt-write-only iso-cvt-read-only +;;;;;; iso-sgml2iso iso-iso2sgml iso-iso2duden iso-iso2gtex iso-gtex2iso +;;;;;; iso-tex2iso iso-iso2tex iso-german iso-spanish) "iso-cvt" +;;;;;; "international/iso-cvt.el" (16211 27032)) +;;; Generated autoloads from international/iso-cvt.el + +(autoload (quote iso-spanish) "iso-cvt" "\ +Translate net conventions for Spanish to ISO 8859-1. +The region between FROM and TO is translated using the table TRANS-TAB. +Optional arg BUFFER is ignored (for use in `format-alist'). + +\(fn FROM TO &optional BUFFER)" t nil) + +(autoload (quote iso-german) "iso-cvt" "\ +Translate net conventions for German to ISO 8859-1. +The region between FROM and TO is translated using the table TRANS-TAB. +Optional arg BUFFER is ignored (for use in `format-alist'). + +\(fn FROM TO &optional BUFFER)" t nil) + +(autoload (quote iso-iso2tex) "iso-cvt" "\ +Translate ISO 8859-1 characters to TeX sequences. +The region between FROM and TO is translated using the table TRANS-TAB. +Optional arg BUFFER is ignored (for use in `format-alist'). + +\(fn FROM TO &optional BUFFER)" t nil) + +(autoload (quote iso-tex2iso) "iso-cvt" "\ +Translate TeX sequences to ISO 8859-1 characters. +The region between FROM and TO is translated using the table TRANS-TAB. +Optional arg BUFFER is ignored (for use in `format-alist'). + +\(fn FROM TO &optional BUFFER)" t nil) + +(autoload (quote iso-gtex2iso) "iso-cvt" "\ +Translate German TeX sequences to ISO 8859-1 characters. +The region between FROM and TO is translated using the table TRANS-TAB. +Optional arg BUFFER is ignored (for use in `format-alist'). + +\(fn FROM TO &optional BUFFER)" t nil) + +(autoload (quote iso-iso2gtex) "iso-cvt" "\ +Translate ISO 8859-1 characters to German TeX sequences. +The region between FROM and TO is translated using the table TRANS-TAB. +Optional arg BUFFER is ignored (for use in `format-alist'). + +\(fn FROM TO &optional BUFFER)" t nil) + +(autoload (quote iso-iso2duden) "iso-cvt" "\ +Translate ISO 8859-1 characters to German TeX sequences. +The region between FROM and TO is translated using the table TRANS-TAB. +Optional arg BUFFER is ignored (for use in `format-alist'). + +\(fn FROM TO &optional BUFFER)" t nil) + +(autoload (quote iso-iso2sgml) "iso-cvt" "\ +Translate ISO 8859-1 characters in the region to SGML entities. +The entities used are from \"ISO 8879:1986//ENTITIES Added Latin 1//EN\". +Optional arg BUFFER is ignored (for use in `format-alist'). + +\(fn FROM TO &optional BUFFER)" t nil) + +(autoload (quote iso-sgml2iso) "iso-cvt" "\ +Translate SGML entities in the region to ISO 8859-1 characters. +The entities used are from \"ISO 8879:1986//ENTITIES Added Latin 1//EN\". +Optional arg BUFFER is ignored (for use in `format-alist'). + +\(fn FROM TO &optional BUFFER)" t nil) + +(autoload (quote iso-cvt-read-only) "iso-cvt" "\ +Warn that format is read-only. + +\(fn)" t nil) + +(autoload (quote iso-cvt-write-only) "iso-cvt" "\ +Warn that format is write-only. + +\(fn)" t nil) + +(autoload (quote iso-cvt-define-menu) "iso-cvt" "\ +Add submenus to the Files menu, to convert to and from various formats. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "iso-transl" "international/iso-transl.el" +;;;;;; (16211 27032)) +;;; Generated autoloads from international/iso-transl.el + (or key-translation-map (setq key-translation-map (make-sparse-keymap))) + (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map) + (autoload 'iso-transl-ctl-x-8-map "iso-transl" "Keymap for C-x 8 prefix." t 'keymap) + +;;;*** + +;;;### (autoloads (ispell-message ispell-minor-mode ispell ispell-complete-word-interior-frag +;;;;;; ispell-complete-word ispell-continue ispell-buffer ispell-comments-and-strings +;;;;;; ispell-region ispell-change-dictionary ispell-kill-ispell +;;;;;; ispell-help ispell-pdict-save ispell-word ispell-dictionary-alist +;;;;;; ispell-local-dictionary-alist ispell-personal-dictionary) +;;;;;; "ispell" "textmodes/ispell.el" (16211 27044)) +;;; Generated autoloads from textmodes/ispell.el + +(defvar ispell-personal-dictionary nil "\ +*File name of your personal spelling dictionary, or nil. +If nil, the default personal dictionary, \"~/.ispell_DICTNAME\" is used, +where DICTNAME is the name of your default dictionary.") + +(custom-autoload (quote ispell-personal-dictionary) "ispell") + +(defvar ispell-local-dictionary-alist nil "\ +*Contains local or customized dictionary definitions. + +These will override the values in `ispell-dictionary-alist'. + +Customization changes made to `ispell-dictionary-alist' will not operate +over emacs sessions. To make permanent changes to your dictionary +definitions, you will need to make your changes in this variable, save, +and then re-start emacs.") + +(custom-autoload (quote ispell-local-dictionary-alist) "ispell") + +(setq ispell-dictionary-alist-1 (quote ((nil "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) ("american" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) ("brasileiro" "[A-Z\301\311\315\323\332\300\310\314\322\331\303\325\307\334\302\312\324a-z\341\351\355\363\372\340\350\354\362\371\343\365\347\374\342\352\364]" "[^A-Z\301\311\315\323\332\300\310\314\322\331\303\325\307\334\302\312\324a-z\341\351\355\363\372\340\350\354\362\371\343\365\347\374\342\352\364]" "[']" nil nil nil iso-8859-1) ("british" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) ("castellano" "[A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]" "[^A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]" "[-]" nil ("-B") "~tex" iso-8859-1) ("castellano8" "[A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]" "[^A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]" "[-]" nil ("-B" "-d" "castellano") "~latin1" iso-8859-1)))) + +(setq ispell-dictionary-alist-2 (quote (("czech" "[A-Za-z\301\311\314\315\323\332\331\335\256\251\310\330\317\253\322\341\351\354\355\363\372\371\375\276\271\350\370\357\273\362]" "[^A-Za-z\301\311\314\315\323\332\331\335\256\251\310\330\317\253\322\341\351\354\355\363\372\371\375\276\271\350\370\357\273\362]" "" nil ("-B") nil iso-8859-2) ("dansk" "[A-Z\306\330\305a-z\346\370\345]" "[^A-Z\306\330\305a-z\346\370\345]" "[']" nil ("-C") nil iso-8859-1) ("deutsch" "[a-zA-Z\"]" "[^a-zA-Z\"]" "[']" t ("-C") "~tex" iso-8859-1) ("deutsch8" "[a-zA-Z\304\326\334\344\366\337\374]" "[^a-zA-Z\304\326\334\344\366\337\374]" "[']" t ("-C" "-d" "deutsch") "~latin1" iso-8859-1) ("english" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)))) + +(setq ispell-dictionary-alist-3 (quote (("esperanto" "[A-Za-z\246\254\266\274\306\330\335\336\346\370\375\376]" "[^A-Za-z\246\254\266\274\306\330\335\336\346\370\375\376]" "[-']" t ("-C") "~latin3" iso-8859-1) ("esperanto-tex" "[A-Za-z^\\]" "[^A-Za-z^\\]" "[-'`\"]" t ("-C" "-d" "esperanto") "~tex" iso-8859-1) ("francais7" "[A-Za-z]" "[^A-Za-z]" "[`'^---]" t nil nil iso-8859-1) ("francais" "[A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374]" "[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374]" "[-']" t nil "~list" iso-8859-1) ("francais-tex" "[A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374\\]" "[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374\\]" "[-'^`\"]" t nil "~tex" iso-8859-1)))) + +(setq ispell-dictionary-alist-4 (quote (("german" "[a-zA-Z\"]" "[^a-zA-Z\"]" "[']" t ("-C") "~tex" iso-8859-1) ("german8" "[a-zA-Z\304\326\334\344\366\337\374]" "[^a-zA-Z\304\326\334\344\366\337\374]" "[']" t ("-C" "-d" "german") "~latin1" iso-8859-1) ("italiano" "[A-Z\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]" "[^A-Z\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]" "[-]" nil ("-B" "-d" "italian") "~tex" iso-8859-1) ("nederlands" "[A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" "[^A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" "[']" t ("-C") nil iso-8859-1) ("nederlands8" "[A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" "[^A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" "[']" t ("-C") nil iso-8859-1)))) + +(setq ispell-dictionary-alist-5 (quote (("norsk" "[A-Za-z\305\306\307\310\311\322\324\330\345\346\347\350\351\362\364\370]" "[^A-Za-z\305\306\307\310\311\322\324\330\345\346\347\350\351\362\364\370]" "[\"]" nil nil "~list" iso-8859-1) ("norsk7-tex" "[A-Za-z{}\\'^`]" "[^A-Za-z{}\\'^`]" "[\"]" nil ("-d" "norsk") "~plaintex" iso-8859-1) ("polish" "[A-Za-z\241\243\246\254\257\261\263\266\274\277\306\312\321\323\346\352\361\363]" "[^A-Za-z\241\243\246\254\257\261\263\266\274\277\306\312\321\323\346\352\361\363]" "" nil nil nil iso-8859-2) ("portugues" "[a-zA-Z\301\302\311\323\340\341\342\351\352\355\363\343\372]" "[^a-zA-Z\301\302\311\323\340\341\342\351\352\355\363\343\372]" "[']" t ("-C") "~latin1" iso-8859-1)))) + +(setq ispell-dictionary-alist-6 (quote (("russian" "[\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]" "[^\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]" "" nil nil nil koi8-r) ("slovak" "[A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]" "[^A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]" "" nil ("-B") nil iso-8859-2) ("svenska" "[A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" "[^A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" "[']" nil ("-C") "~list" iso-8859-1)))) + +(defvar ispell-dictionary-alist (append ispell-local-dictionary-alist ispell-dictionary-alist-1 ispell-dictionary-alist-2 ispell-dictionary-alist-3 ispell-dictionary-alist-4 ispell-dictionary-alist-5 ispell-dictionary-alist-6) "\ +An alist of dictionaries and their associated parameters. + +Each element of this list is also a list: + +\(DICTIONARY-NAME CASECHARS NOT-CASECHARS OTHERCHARS MANY-OTHERCHARS-P + ISPELL-ARGS EXTENDED-CHARACTER-MODE CHARACTER-SET) + +DICTIONARY-NAME is a possible string value of variable `ispell-dictionary', +nil means the default dictionary. + +CASECHARS is a regular expression of valid characters that comprise a +word. + +NOT-CASECHARS is the opposite regexp of CASECHARS. + +OTHERCHARS is a regexp of characters in the NOT-CASECHARS set but which can be +used to construct words in some special way. If OTHERCHARS characters follow +and precede characters from CASECHARS, they are parsed as part of a word, +otherwise they become word-breaks. As an example in English, assume the +regular expression \"[']\" for OTHERCHARS. Then \"they're\" and +\"Steven's\" are parsed as single words including the \"'\" character, but +\"Stevens'\" does not include the quote character as part of the word. +If you want OTHERCHARS to be empty, use the empty string. +Hint: regexp syntax requires the hyphen to be declared first here. + +MANY-OTHERCHARS-P is non-nil when multiple OTHERCHARS are allowed in a word. +Otherwise only a single OTHERCHARS character is allowed to be part of any +single word. + +ISPELL-ARGS is a list of additional arguments passed to the ispell +subprocess. + +EXTENDED-CHARACTER-MODE should be used when dictionaries are used which +have been configured in an Ispell affix file. (For example, umlauts +can be encoded as \\\"a, a\\\", \"a, ...) Defaults are ~tex and ~nroff +in English. This has the same effect as the command-line `-T' option. +The buffer Major Mode controls Ispell's parsing in tex or nroff mode, +but the dictionary can control the extended character mode. +Both defaults can be overruled in a buffer-local fashion. See +`ispell-parsing-keyword' for details on this. + +CHARACTER-SET used for languages with multibyte characters. + +Note that the CASECHARS and OTHERCHARS slots of the alist should +contain the same character set as casechars and otherchars in the +LANGUAGE.aff file (e.g., english.aff).") + +(custom-autoload (quote ispell-dictionary-alist) "ispell") + +(defvar ispell-menu-map nil "\ +Key map for ispell menu.") + +(defvar ispell-menu-xemacs nil "\ +Spelling menu for XEmacs. +If nil when package is loaded, a standard menu will be set, +and added as a submenu of the \"Edit\" menu.") + +(defvar ispell-menu-map-needed (and (not ispell-menu-map) (not (featurep (quote xemacs))) (quote reload))) + +(if ispell-menu-map-needed (let ((dicts (if (fboundp (quote ispell-valid-dictionary-list)) (ispell-valid-dictionary-list) (mapcar (lambda (x) (or (car x) "default")) ispell-dictionary-alist))) (dict-map (make-sparse-keymap "Dictionaries"))) (setq ispell-menu-map (make-sparse-keymap "Spell")) (if (not dicts) (define-key ispell-menu-map [default] (quote ("Select Default Dict" "Dictionary for which Ispell was configured" lambda nil (interactive) (ispell-change-dictionary "default"))))) (fset (quote ispell-dict-map) dict-map) (define-key ispell-menu-map [dictionaries] (\` (menu-item "Select Dict" ispell-dict-map))) (dolist (name dicts) (define-key dict-map (vector (intern name)) (cons (concat "Select " (capitalize name) " Dict") (\` (lambda nil (interactive) (ispell-change-dictionary (\, name))))))))) + +(if ispell-menu-map-needed (progn (define-key ispell-menu-map [ispell-change-dictionary] (quote (menu-item "Change Dictionary..." ispell-change-dictionary :help "Supply explicit dictionary file name"))) (define-key ispell-menu-map [ispell-kill-ispell] (quote (menu-item "Kill Process" ispell-kill-ispell :enable (and (boundp (quote ispell-process)) ispell-process (eq (ispell-process-status) (quote run))) :help "Terminate Ispell subprocess"))) (define-key ispell-menu-map [ispell-pdict-save] (quote (menu-item "Save Dictionary" (lambda nil (interactive) (ispell-pdict-save t t)) :help "Save personal dictionary"))) (define-key ispell-menu-map [ispell-customize] (quote (menu-item "Customize..." (lambda nil (interactive) (customize-group (quote ispell))) :help "Customize spell checking options"))) (define-key ispell-menu-map [ispell-help] (quote (menu-item "Help" (lambda nil (interactive) (describe-function (quote ispell-help))) :help "Show standard Ispell keybindings and commands"))) (define-key ispell-menu-map [flyspell-mode] (quote (menu-item "Automatic spell checking (Flyspell)" flyspell-mode :help "Check spelling while you edit the text" :button (:toggle . flyspell-mode)))) (define-key ispell-menu-map [ispell-complete-word] (quote (menu-item "Complete Word" ispell-complete-word :help "Complete word at cursor using dictionary"))) (define-key ispell-menu-map [ispell-complete-word-interior-frag] (quote (menu-item "Complete Word Fragment" ispell-complete-word-interior-frag :help "Complete word fragment at cursor"))))) + +(if ispell-menu-map-needed (progn (define-key ispell-menu-map [ispell-continue] (quote (menu-item "Continue Spell-Checking" ispell-continue :enable (and (boundp (quote ispell-region-end)) (marker-position ispell-region-end) (equal (marker-buffer ispell-region-end) (current-buffer))) :help "Continue spell checking last region"))) (define-key ispell-menu-map [ispell-word] (quote (menu-item "Spell-Check Word" ispell-word :help "Spell-check word at cursor"))) (define-key ispell-menu-map [ispell-comments-and-strings] (quote (menu-item "Spell-Check Comments" ispell-comments-and-strings :help "Spell-check only comments and strings"))))) + +(if ispell-menu-map-needed (progn (define-key ispell-menu-map [ispell-region] (quote (menu-item "Spell-Check Region" ispell-region :enable mark-active :help "Spell-check text in marked region"))) (define-key ispell-menu-map [ispell-message] (quote (menu-item "Spell-Check Message" ispell-message :help "Skip headers and included message text"))) (define-key ispell-menu-map [ispell-buffer] (quote (menu-item "Spell-Check Buffer" ispell-buffer :help "Check spelling of selected buffer"))) (fset (quote ispell-menu-map) (symbol-value (quote ispell-menu-map))))) + +(defvar ispell-skip-region-alist (quote ((ispell-words-keyword forward-line) (ispell-dictionary-keyword forward-line) (ispell-pdict-keyword forward-line) (ispell-parsing-keyword forward-line) ("^---*BEGIN PGP [A-Z ]*--*" . "^---*END PGP [A-Z ]*--*") ("^begin [0-9][0-9][0-9] [^ ]+$" . "\nend\n") ("^%!PS-Adobe-[123].0" . "\n%%EOF\n") ("^---* \\(Start of \\)?[Ff]orwarded [Mm]essage" . "^---* End of [Ff]orwarded [Mm]essage") ("\\(--+\\|\\(/\\w\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)"))) "\ +Alist expressing beginning and end of regions not to spell check. +The alist key must be a regular expression. +Valid forms include: + (KEY) - just skip the key. + (KEY . REGEXP) - skip to the end of REGEXP. REGEXP may be string or symbol. + (KEY REGEXP) - skip to end of REGEXP. REGEXP must be a string. + (KEY FUNCTION ARGS) - FUNCTION called with ARGS returns end of region.") + +(defvar ispell-tex-skip-alists (quote ((("\\\\addcontentsline" ispell-tex-arg-end 2) ("\\\\add\\(tocontents\\|vspace\\)" ispell-tex-arg-end) ("\\\\\\([aA]lph\\|arabic\\)" ispell-tex-arg-end) ("\\\\bibliographystyle" ispell-tex-arg-end) ("\\\\makebox" ispell-tex-arg-end 0) ("\\\\e?psfig" ispell-tex-arg-end) ("\\\\document\\(class\\|style\\)" . "\\\\begin[ \n]*{[ \n]*document[ \n]*}")) (("\\(figure\\|table\\)\\*?" ispell-tex-arg-end 0) ("list" ispell-tex-arg-end 2) ("program" . "\\\\end[ \n]*{[ \n]*program[ \n]*}") ("verbatim\\*?" . "\\\\end[ \n]*{[ \n]*verbatim\\*?[ \n]*}")))) "\ +*Lists of regions to be skipped in TeX mode. +First list is used raw. +Second list has key placed inside \\begin{}. + +Delete or add any regions you want to be automatically selected +for skipping in latex mode.") + +(defvar ispell-html-skip-alists (quote (("<[cC][oO][dD][eE]\\>[^>]*>" "") ("<[sS][cC][rR][iI][pP][tT]\\>[^>]*>" "") ("<[aA][pP][pP][lL][eE][tT]\\>[^>]*>" "") ("<[vV][eE][rR][bB]\\>[^>]*>" "<[vV][eE][rR][bB]\\>[^>]*>") ("<[tT][tT]/" "/") ("<[^ \n>]" ">") ("&[^ \n;]" "[; \n]"))) "\ +*Lists of start and end keys to skip in HTML buffers. +Same format as `ispell-skip-region-alist' +Note - substrings of other matches must come last + (e.g. \"<[tT][tT]/\" and \"<[^ +>]\").") + (define-key esc-map "$" 'ispell-word) + +(autoload (quote ispell-word) "ispell" "\ +Check spelling of word under or before the cursor. +If the word is not found in dictionary, display possible corrections +in a window allowing you to choose one. + +If optional argument FOLLOWING is non-nil or if `ispell-following-word' +is non-nil when called interactively, then the following word +\(rather than preceding) is checked when the cursor is not over a word. +When the optional argument QUIETLY is non-nil or `ispell-quietly' is non-nil +when called interactively, non-corrective messages are suppressed. + +With a prefix argument (or if CONTINUE is non-nil), +resume interrupted spell-checking of a buffer or region. + +Word syntax described by `ispell-dictionary-alist' (which see). + +This will check or reload the dictionary. Use \\[ispell-change-dictionary] +or \\[ispell-region] to update the Ispell process. + +return values: +nil word is correct or spelling is accepted. +0 word is inserted into buffer-local definitions. +\"word\" word corrected from word list. +\(\"word\" arg) word is hand entered. +quit spell session exited. + +\(fn &optional FOLLOWING QUIETLY CONTINUE)" t nil) + +(autoload (quote ispell-pdict-save) "ispell" "\ +Check to see if the personal dictionary has been modified. +If so, ask if it needs to be saved. + +\(fn &optional NO-QUERY FORCE-SAVE)" t nil) + +(autoload (quote ispell-help) "ispell" "\ +Display a list of the options available when a misspelling is encountered. + +Selections are: + +DIGIT: Replace the word with a digit offered in the *Choices* buffer. +SPC: Accept word this time. +`i': Accept word and insert into private dictionary. +`a': Accept word for this session. +`A': Accept word and place in `buffer-local dictionary'. +`r': Replace word with typed-in value. Rechecked. +`R': Replace word with typed-in value. Query-replaced in buffer. Rechecked. +`?': Show these commands. +`x': Exit spelling buffer. Move cursor to original point. +`X': Exit spelling buffer. Leaves cursor at the current point, and permits + the aborted check to be completed later. +`q': Quit spelling session (Kills ispell process). +`l': Look up typed-in replacement in alternate dictionary. Wildcards okay. +`u': Like `i', but the word is lower-cased first. +`m': Place typed-in value in personal dictionary, then recheck current word. +`C-l': redraws screen +`C-r': recursive edit +`C-z': suspend emacs or iconify frame + +\(fn)" nil nil) + +(autoload (quote ispell-kill-ispell) "ispell" "\ +Kill current Ispell process (so that you may start a fresh one). +With NO-ERROR, just return non-nil if there was no Ispell running. + +\(fn &optional NO-ERROR)" t nil) + +(autoload (quote ispell-change-dictionary) "ispell" "\ +Change `ispell-dictionary' (q.v.) to DICT and kill old Ispell process. +A new one will be started as soon as necessary. + +By just answering RET you can find out what the current dictionary is. + +With prefix argument, set the default dictionary. + +\(fn DICT &optional ARG)" t nil) + +(autoload (quote ispell-region) "ispell" "\ +Interactively check a region for spelling errors. +Return nil if spell session is quit, + otherwise returns shift offset amount for last line processed. + +\(fn REG-START REG-END &optional RECHECKP SHIFT)" t nil) + +(autoload (quote ispell-comments-and-strings) "ispell" "\ +Check comments and strings in the current buffer for spelling errors. + +\(fn)" t nil) + +(autoload (quote ispell-buffer) "ispell" "\ +Check the current buffer for spelling errors interactively. + +\(fn)" t nil) + +(autoload (quote ispell-continue) "ispell" "\ +Continue a halted spelling session beginning with the current word. + +\(fn)" t nil) + +(autoload (quote ispell-complete-word) "ispell" "\ +Try to complete the word before or under point (see `lookup-words'). +If optional INTERIOR-FRAG is non-nil then the word may be a character +sequence inside of a word. + +Standard ispell choices are then available. + +\(fn &optional INTERIOR-FRAG)" t nil) + +(autoload (quote ispell-complete-word-interior-frag) "ispell" "\ +Completes word matching character sequence inside a word. + +\(fn)" t nil) + +(autoload (quote ispell) "ispell" "\ +Interactively check a region or buffer for spelling errors. +If `transient-mark-mode' is on, and a region is active, spell-check +that region. Otherwise spell-check the buffer. + +Ispell dictionaries are not distributed with Emacs. If you are +looking for a dictionary, please see the distribution of the GNU ispell +program, or do an Internet search; there are various dictionaries +available on the net. + +\(fn)" t nil) + +(autoload (quote ispell-minor-mode) "ispell" "\ +Toggle Ispell minor mode. +With prefix arg, turn Ispell minor mode on iff arg is positive. + +In Ispell minor mode, pressing SPC or RET +warns you if the previous word is incorrectly spelled. + +All the buffer-local variables and dictionaries are ignored -- to read +them into the running ispell process, type \\[ispell-word] SPC. + +\(fn &optional ARG)" t nil) + +(autoload (quote ispell-message) "ispell" "\ +Check the spelling of a mail message or news post. +Don't check spelling of message headers except the Subject field. +Don't check included messages. + +To abort spell checking of a message region and send the message anyway, +use the `x' command. (Any subsequent regions will be checked.) +The `X' command aborts the message send so that you can edit the buffer. + +To spell-check whenever a message is sent, include the appropriate lines +in your .emacs file: + (add-hook 'message-send-hook 'ispell-message) ;; GNUS 5 + (add-hook 'news-inews-hook 'ispell-message) ;; GNUS 4 + (add-hook 'mail-send-hook 'ispell-message) + (add-hook 'mh-before-send-letter-hook 'ispell-message) + +You can bind this to the key C-c i in GNUS or mail by adding to +`news-reply-mode-hook' or `mail-mode-hook' the following lambda expression: + (function (lambda () (local-set-key \"\\C-ci\" 'ispell-message))) + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (iswitchb-mode iswitchb-buffer-other-frame iswitchb-display-buffer +;;;;;; iswitchb-buffer-other-window iswitchb-buffer iswitchb-default-keybindings +;;;;;; iswitchb-read-buffer) "iswitchb" "iswitchb.el" (16211 27017)) +;;; Generated autoloads from iswitchb.el + +(autoload (quote iswitchb-read-buffer) "iswitchb" "\ +Replacement for the built-in `read-buffer'. +Return the name of a buffer selected. +PROMPT is the prompt to give to the user. DEFAULT if given is the default +buffer to be selected, which will go to the front of the list. +If REQUIRE-MATCH is non-nil, an existing-buffer must be selected. + +\(fn PROMPT &optional DEFAULT REQUIRE-MATCH)" nil nil) + +(autoload (quote iswitchb-default-keybindings) "iswitchb" "\ +Set up default keybindings for `iswitchb-buffer'. +Call this function to override the normal bindings. This function also +adds a hook to the minibuffer. + +Obsolescent. Use `iswitchb-mode'. + +\(fn)" t nil) + +(autoload (quote iswitchb-buffer) "iswitchb" "\ +Switch to another buffer. + +The buffer name is selected interactively by typing a substring. The +buffer is displayed according to `iswitchb-default-method' -- the +default is to show it in the same window, unless it is already visible +in another frame. +For details of keybindings, do `\\[describe-function] iswitchb'. + +\(fn)" t nil) + +(autoload (quote iswitchb-buffer-other-window) "iswitchb" "\ +Switch to another buffer and show it in another window. +The buffer name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] iswitchb'. + +\(fn)" t nil) + +(autoload (quote iswitchb-display-buffer) "iswitchb" "\ +Display a buffer in another window but don't select it. +The buffer name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] iswitchb'. + +\(fn)" t nil) + +(autoload (quote iswitchb-buffer-other-frame) "iswitchb" "\ +Switch to another buffer and show it in another frame. +The buffer name is selected interactively by typing a substring. +For details of keybindings, do `\\[describe-function] iswitchb'. + +\(fn)" t nil) + +(defvar iswitchb-mode nil "\ +Non-nil if Iswitchb mode is enabled. +See the command `iswitchb-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `iswitchb-mode'.") + +(custom-autoload (quote iswitchb-mode) "iswitchb") + +(autoload (quote iswitchb-mode) "iswitchb" "\ +Toggle Iswitchb global minor mode. +With arg, turn Iswitchb mode on if and only iff ARG is positive. +This mode enables switching between buffers using substrings. See +`iswitchb' for details. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (read-hiragana-string japanese-zenkaku-region japanese-hankaku-region +;;;;;; japanese-hiragana-region japanese-katakana-region japanese-zenkaku +;;;;;; japanese-hankaku japanese-hiragana japanese-katakana setup-japanese-environment-internal) +;;;;;; "japan-util" "language/japan-util.el" (16211 27033)) +;;; Generated autoloads from language/japan-util.el + +(autoload (quote setup-japanese-environment-internal) "japan-util" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote japanese-katakana) "japan-util" "\ +Convert argument to Katakana and return that. +The argument may be a character or string. The result has the same type. +The argument object is not altered--the value is a copy. +Optional argument HANKAKU t means to convert to `hankaku' Katakana + (`japanese-jisx0201-kana'), in which case return value + may be a string even if OBJ is a character if two Katakanas are + necessary to represent OBJ. + +\(fn OBJ &optional HANKAKU)" nil nil) + +(autoload (quote japanese-hiragana) "japan-util" "\ +Convert argument to Hiragana and return that. +The argument may be a character or string. The result has the same type. +The argument object is not altered--the value is a copy. + +\(fn OBJ)" nil nil) + +(autoload (quote japanese-hankaku) "japan-util" "\ +Convert argument to `hankaku' and return that. +The argument may be a character or string. The result has the same type. +The argument object is not altered--the value is a copy. +Optional argument ASCII-ONLY non-nil means to return only ASCII character. + +\(fn OBJ &optional ASCII-ONLY)" nil nil) + +(autoload (quote japanese-zenkaku) "japan-util" "\ +Convert argument to `zenkaku' and return that. +The argument may be a character or string. The result has the same type. +The argument object is not altered--the value is a copy. + +\(fn OBJ)" nil nil) + +(autoload (quote japanese-katakana-region) "japan-util" "\ +Convert Japanese `hiragana' chars in the region to `katakana' chars. +Optional argument HANKAKU t means to convert to `hankaku katakana' character +of which charset is `japanese-jisx0201-kana'. + +\(fn FROM TO &optional HANKAKU)" t nil) + +(autoload (quote japanese-hiragana-region) "japan-util" "\ +Convert Japanese `katakana' chars in the region to `hiragana' chars. + +\(fn FROM TO)" t nil) + +(autoload (quote japanese-hankaku-region) "japan-util" "\ +Convert Japanese `zenkaku' chars in the region to `hankaku' chars. +`Zenkaku' chars belong to `japanese-jisx0208' +`Hankaku' chars belong to `ascii' or `japanese-jisx0201-kana'. +Optional argument ASCII-ONLY non-nil means to convert only to ASCII char. + +\(fn FROM TO &optional ASCII-ONLY)" t nil) + +(autoload (quote japanese-zenkaku-region) "japan-util" "\ +Convert hankaku' chars in the region to Japanese `zenkaku' chars. +`Zenkaku' chars belong to `japanese-jisx0208' +`Hankaku' chars belong to `ascii' or `japanese-jisx0201-kana'. +Optional argument KATAKANA-ONLY non-nil means to convert only KATAKANA char. + +\(fn FROM TO &optional KATAKANA-ONLY)" t nil) + +(autoload (quote read-hiragana-string) "japan-util" "\ +Read a Hiragana string from the minibuffer, prompting with string PROMPT. +If non-nil, second arg INITIAL-INPUT is a string to insert before reading. + +\(fn PROMPT &optional INITIAL-INPUT)" nil nil) + +;;;*** + +;;;### (autoloads (jit-lock-register) "jit-lock" "jit-lock.el" (16211 +;;;;;; 27017)) +;;; Generated autoloads from jit-lock.el + +(autoload (quote jit-lock-register) "jit-lock" "\ +Register FUN as a fontification function to be called in this buffer. +FUN will be called with two arguments START and END indicating the region +that needs to be (re)fontified. +If non-nil, CONTEXTUAL means that a contextual fontification would be useful. + +\(fn FUN &optional CONTEXTUAL)" nil nil) + +;;;*** + +;;;### (autoloads (with-auto-compression-mode auto-compression-mode) +;;;;;; "jka-compr" "jka-compr.el" (16211 27017)) +;;; Generated autoloads from jka-compr.el + +(defvar auto-compression-mode nil "\ +Non-nil if Auto-Compression mode is enabled. +See the command `auto-compression-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `auto-compression-mode'.") + +(custom-autoload (quote auto-compression-mode) "jka-compr") + +(autoload (quote auto-compression-mode) "jka-compr" "\ +Toggle automatic file compression and uncompression. +With prefix argument ARG, turn auto compression on if positive, else off. +Returns the new status of auto compression (non-nil means on). + +\(fn &optional ARG)" t nil) + +(autoload (quote with-auto-compression-mode) "jka-compr" "\ +Evalute BODY with automatic file compression and uncompression enabled. + +\(fn &rest BODY)" nil (quote macro)) + +;;;*** + +;;;### (autoloads (keypad-setup keypad-numlock-shifted-setup keypad-shifted-setup +;;;;;; keypad-numlock-setup keypad-setup) "keypad" "emulation/keypad.el" +;;;;;; (16211 27026)) +;;; Generated autoloads from emulation/keypad.el + +(defvar keypad-setup nil "\ +Specifies the keypad setup for unshifted keypad keys when NumLock is off. +When selecting the plain numeric keypad setup, the character returned by the +decimal key must be specified.") + +(custom-autoload (quote keypad-setup) "keypad") + +(defvar keypad-numlock-setup nil "\ +Specifies the keypad setup for unshifted keypad keys when NumLock is on. +When selecting the plain numeric keypad setup, the character returned by the +decimal key must be specified.") + +(custom-autoload (quote keypad-numlock-setup) "keypad") + +(defvar keypad-shifted-setup nil "\ +Specifies the keypad setup for shifted keypad keys when NumLock is off. +When selecting the plain numeric keypad setup, the character returned by the +decimal key must be specified.") + +(custom-autoload (quote keypad-shifted-setup) "keypad") + +(defvar keypad-numlock-shifted-setup nil "\ +Specifies the keypad setup for shifted keypad keys when NumLock is off. +When selecting the plain numeric keypad setup, the character returned by the +decimal key must be specified.") + +(custom-autoload (quote keypad-numlock-shifted-setup) "keypad") + +(autoload (quote keypad-setup) "keypad" "\ +Set keypad bindings in function-key-map according to SETUP. +If optional second argument NUMLOCK is non-nil, the NumLock On bindings +are changed. Otherwise, the NumLock Off bindings are changed. +If optional third argument SHIFT is non-nil, the shifted keypad +keys are bound. + + Setup Binding + ------------------------------------------------------------- + 'prefix Command prefix argument, i.e. M-0 .. M-9 and M-- + 'S-cursor Bind shifted keypad keys to the shifted cursor movement keys. + 'cursor Bind keypad keys to the cursor movement keys. + 'numeric Plain numeric keypad, i.e. 0 .. 9 and . (or DECIMAL arg) + 'none Removes all bindings for keypad keys in function-key-map; + this enables any user-defined bindings for the keypad keys + in the global and local keymaps. + +If SETUP is 'numeric and the optional fourth argument DECIMAL is non-nil, +the decimal key on the keypad is mapped to DECIMAL instead of `.' + +\(fn SETUP &optional NUMLOCK SHIFT DECIMAL)" nil nil) + +;;;*** + +;;;### (autoloads (kinsoku) "kinsoku" "international/kinsoku.el" +;;;;;; (16211 27032)) +;;; Generated autoloads from international/kinsoku.el + +(autoload (quote kinsoku) "kinsoku" "\ +Go to a line breaking position near point by doing `kinsoku' processing. +LINEBEG is a buffer position we can't break a line before. + +`Kinsoku' processing is to prohibit specific characters to be placed +at beginning of line or at end of line. Characters not to be placed +at beginning and end of line have character category `>' and `<' +respectively. This restriction is dissolved by making a line longer or +shorter. + +`Kinsoku' is a Japanese word which originally means ordering to stay +in one place, and is used for the text processing described above in +the context of text formatting. + +\(fn LINEBEG)" nil nil) + +;;;*** + +;;;### (autoloads (kkc-region) "kkc" "international/kkc.el" (16211 +;;;;;; 27032)) +;;; Generated autoloads from international/kkc.el + +(defvar kkc-after-update-conversion-functions nil "\ +Functions to run after a conversion is selected in `japanese' input method. +With this input method, a user can select a proper conversion from +candidate list. Each time he changes the selection, functions in this +list are called with two arguments; starting and ending buffer +positions that contains the current selection.") + +(autoload (quote kkc-region) "kkc" "\ +Convert Kana string in the current region to Kanji-Kana mixed string. +Users can select a desirable conversion interactively. +When called from a program, expects two arguments, +positions FROM and TO (integers or markers) specifying the target region. +When it returns, the point is at the tail of the selected conversion, +and the return value is the length of the conversion. + +\(fn FROM TO)" t nil) + +;;;*** + +;;;### (autoloads (kmacro-end-call-mouse kmacro-end-and-call-macro +;;;;;; kmacro-end-or-call-macro kmacro-start-macro-or-insert-counter +;;;;;; kmacro-call-macro kmacro-end-macro kmacro-start-macro) "kmacro" +;;;;;; "kmacro.el" (16211 27017)) +;;; Generated autoloads from kmacro.el + (global-set-key "\C-x(" 'kmacro-start-macro) + (global-set-key "\C-x)" 'kmacro-end-macro) + (global-set-key "\C-xe" 'kmacro-end-and-call-macro) + (global-set-key [f3] 'kmacro-start-macro-or-insert-counter) + (global-set-key [f4] 'kmacro-end-or-call-macro) + (global-set-key "\C-x\C-k" 'kmacro-keymap) + (autoload 'kmacro-keymap "kmacro" "Keymap for keyboard macro commands." t 'keymap) + +(autoload (quote kmacro-start-macro) "kmacro" "\ +Record subsequent keyboard input, defining a keyboard macro. +The commands are recorded even as they are executed. +Use \\[kmacro-end-macro] to finish recording and make the macro available. +Use \\[kmacro-end-and-call-macro] to execute the macro. +Use \\[name-last-kbd-macro] to give it a permanent name. +Non-nil arg (prefix arg) means append to last macro defined; + +With \\[universal-argument] prefix, append to last keyboard macro +defined. Depending on `kmacro-execute-before-append', this may begin +by re-executing the last macro as if you typed it again. + +Otherwise, it sets `kmacro-counter' to ARG or 0 if missing before +defining the macro. + +Use \\[kmacro-insert-counter] to insert (and increment) the macro counter. +The counter value can be set or modified via \\[kmacro-set-counter] and \\[kmacro-add-counter]. +The format of the counter can be modified via \\[kmacro-set-format]. + +\(fn ARG)" t nil) + +(autoload (quote kmacro-end-macro) "kmacro" "\ +Finish defining a keyboard macro. +The definition was started by \\[kmacro-start-macro]. +The macro is now available for use via \\[kmacro-call-macro], +or it can be given a name with \\[name-last-kbd-macro] and then invoked +under that name. + +With numeric arg, repeat macro now that many times, +counting the definition just completed as the first repetition. +An argument of zero means repeat until error. + +\(fn ARG)" t nil) + +(autoload (quote kmacro-call-macro) "kmacro" "\ +Call the last keyboard macro that you defined with \\[kmacro-start-macro]. +A prefix argument serves as a repeat count. Zero means repeat until error. + +When you call the macro, you can call the macro again by repeating +just the last key in the key sequence that you used to call this +command. See `kmacro-call-repeat-key' and `kmacro-call-repeat-with-arg' +for details on how to adjust or disable this behaviour. + +To make a macro permanent so you can call it even after defining +others, use M-x name-last-kbd-macro. + +\(fn ARG &optional NO-REPEAT END-MACRO)" t nil) + +(autoload (quote kmacro-start-macro-or-insert-counter) "kmacro" "\ +Record subsequent keyboard input, defining a keyboard macro. +The commands are recorded even as they are executed. + +Sets the `kmacro-counter' to ARG (or 0 if no prefix arg) before defining the +macro. + +With \\[universal-argument], appends to current keyboard macro (keeping +the current value of `kmacro-counter'). + +When defining/executing macro, inserts macro counter and increments +the counter with ARG or 1 if missing. With \\[universal-argument], +inserts previous kmacro-counter (but do not modify counter). + +The macro counter can be modified via \\[kmacro-set-counter] and \\[kmacro-add-counter]. +The format of the counter can be modified via \\[kmacro-set-format]. + +\(fn ARG)" t nil) + +(autoload (quote kmacro-end-or-call-macro) "kmacro" "\ +End kbd macro if currently being defined; else call last kbd macro. +With numeric prefix ARG, repeat macro that many times. +With \\[universal-argument], call second macro in macro ring. + +\(fn ARG &optional NO-REPEAT)" t nil) + +(autoload (quote kmacro-end-and-call-macro) "kmacro" "\ +Call last keyboard macro, ending it first if currently being defined. +With numeric prefix ARG, repeat macro that many times. +Zero argument means repeat until there is an error. + +To give a macro a permanent name, so you can call it +even after defining other macros, use \\[name-last-kbd-macro]. + +\(fn ARG &optional NO-REPEAT)" t nil) + +(autoload (quote kmacro-end-call-mouse) "kmacro" "\ +Move point to the position clicked with the mouse and call last kbd macro. +If kbd macro currently being defined end it before activating it. + +\(fn EVENT)" t nil) + +;;;*** + +;;;### (autoloads (kannada-post-read-conversion kannada-compose-string +;;;;;; kannada-compose-region) "knd-util" "language/knd-util.el" +;;;;;; (16303 32088)) +;;; Generated autoloads from language/knd-util.el + +(defconst kannada-consonant "[\x51f75-\x51fb9]") + +(autoload (quote kannada-compose-region) "knd-util" "\ +Not documented + +\(fn FROM TO)" t nil) + +(autoload (quote kannada-compose-string) "knd-util" "\ +Not documented + +\(fn STRING)" nil nil) + +(autoload (quote kannada-post-read-conversion) "knd-util" "\ +Not documented + +\(fn LEN)" nil nil) + +;;;*** + +;;;### (autoloads (setup-korean-environment-internal) "korea-util" +;;;;;; "language/korea-util.el" (16211 27033)) +;;; Generated autoloads from language/korea-util.el + +(defvar default-korean-keyboard (if (string-match "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) "3" "") "\ +*The kind of Korean keyboard for Korean input method. +\"\" for 2, \"3\" for 3.") + +(autoload (quote setup-korean-environment-internal) "korea-util" "\ +Not documented + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (lm lm-test-run) "landmark" "play/landmark.el" +;;;;;; (16211 27038)) +;;; Generated autoloads from play/landmark.el + +(defalias (quote landmark-repeat) (quote lm-test-run)) + +(autoload (quote lm-test-run) "landmark" "\ +Run 100 Lm games, each time saving the weights from the previous game. + +\(fn)" t nil) + +(defalias (quote landmark) (quote lm)) + +(autoload (quote lm) "landmark" "\ +Start or resume an Lm game. +If a game is in progress, this command allows you to resume it. +Here is the relation between prefix args and game options: + +prefix arg | robot is auto-started | weights are saved from last game +--------------------------------------------------------------------- +none / 1 | yes | no + 2 | yes | yes + 3 | no | yes + 4 | no | no + +You start by moving to a square and typing \\[lm-start-robot], +if you did not use a prefix arg to ask for automatic start. +Use \\[describe-mode] for more info. + +\(fn PARG)" t nil) + +;;;*** + +;;;### (autoloads (lao-compose-region lao-composition-function lao-post-read-conversion +;;;;;; lao-transcribe-roman-to-lao-string lao-transcribe-single-roman-syllable-to-lao +;;;;;; lao-compose-string) "lao-util" "language/lao-util.el" (16211 +;;;;;; 27033)) +;;; Generated autoloads from language/lao-util.el + +(autoload (quote lao-compose-string) "lao-util" "\ +Not documented + +\(fn STR)" nil nil) + +(autoload (quote lao-transcribe-single-roman-syllable-to-lao) "lao-util" "\ +Transcribe a Romanized Lao syllable in the region FROM and TO to Lao string. +Only the first syllable is transcribed. +The value has the form: (START END LAO-STRING), where +START and END are the beggining and end positions of the Roman Lao syllable, +LAO-STRING is the Lao character transcription of it. + +Optional 3rd arg STR, if non-nil, is a string to search for Roman Lao +syllable. In that case, FROM and TO are indexes to STR. + +\(fn FROM TO &optional STR)" nil nil) + +(autoload (quote lao-transcribe-roman-to-lao-string) "lao-util" "\ +Transcribe Romanized Lao string STR to Lao character string. + +\(fn STR)" nil nil) + +(autoload (quote lao-post-read-conversion) "lao-util" "\ +Not documented + +\(fn LEN)" nil nil) + +(autoload (quote lao-composition-function) "lao-util" "\ +Compose Lao text in the region FROM and TO. +The text matches the regular expression PATTERN. +Optional 4th argument STRING, if non-nil, is a string containing text +to compose. + +The return value is number of composed characters. + +\(fn FROM TO PATTERN &optional STRING)" nil nil) + +(autoload (quote lao-compose-region) "lao-util" "\ +Not documented + +\(fn FROM TO)" t nil) + +;;;*** + +;;;### (autoloads (latin1-display-ucs-per-lynx latin1-display latin1-display) +;;;;;; "latin1-disp" "international/latin1-disp.el" (16313 5697)) +;;; Generated autoloads from international/latin1-disp.el + +(defvar latin1-display nil "\ +Set up Latin-1/ASCII display for ISO8859 character sets. +This is done for each character set in the list `latin1-display-sets', +if no font is available to display it. Characters are displayed using +the corresponding Latin-1 characters where they match. Otherwise +ASCII sequences are used, mostly following the Latin prefix input +methods. Some different ASCII sequences are used if +`latin1-display-mnemonic' is non-nil. + +This option also treats some characters in the `mule-unicode-...' +charsets if you don't have a Unicode font with which to display them. + +Setting this variable directly does not take effect; +use either \\[customize] or the function `latin1-display'.") + +(custom-autoload (quote latin1-display) "latin1-disp") + +(autoload (quote latin1-display) "latin1-disp" "\ +Set up Latin-1/ASCII display for the arguments character SETS. +See option `latin1-display' for the method. The members of the list +must be in `latin1-display-sets'. With no arguments, reset the +display for all of `latin1-display-sets'. See also +`latin1-display-setup'. As well as iso-8859 characters, this treats +some characters in the `mule-unicode-...' charsets if you don't have +a Unicode font with which to display them. + +\(fn &rest SETS)" nil nil) + +(defvar latin1-display-ucs-per-lynx nil "\ +Set up Latin-1/ASCII display for Unicode characters. +This uses the transliterations of the Lynx browser. The display isn't +changed if the display can render Unicode characters. + +Setting this variable directly does not take effect; +use either \\[customize] or the function `latin1-display'.") + +(custom-autoload (quote latin1-display-ucs-per-lynx) "latin1-disp") + +;;;*** + +;;;### (autoloads (turn-on-lazy-lock lazy-lock-mode) "lazy-lock" +;;;;;; "lazy-lock.el" (16211 27017)) +;;; Generated autoloads from lazy-lock.el + +(autoload (quote lazy-lock-mode) "lazy-lock" "\ +Toggle Lazy Lock mode. +With arg, turn Lazy Lock mode on if and only if arg is positive. Enable it +automatically in your `~/.emacs' by: + + (setq font-lock-support-mode 'lazy-lock-mode) + +For a newer font-lock support mode with similar functionality, see +`jit-lock-mode'. Eventually, Lazy Lock mode will be deprecated in +JIT Lock's favor. + +When Lazy Lock mode is enabled, fontification can be lazy in a number of ways: + +- Demand-driven buffer fontification if `lazy-lock-minimum-size' is non-nil. + This means initial fontification does not occur if the buffer is greater than + `lazy-lock-minimum-size' characters in length. Instead, fontification occurs + when necessary, such as when scrolling through the buffer would otherwise + reveal unfontified areas. This is useful if buffer fontification is too slow + for large buffers. + +- Deferred scroll fontification if `lazy-lock-defer-on-scrolling' is non-nil. + This means demand-driven fontification does not occur as you scroll. + Instead, fontification is deferred until after `lazy-lock-defer-time' seconds + of Emacs idle time, while Emacs remains idle. This is useful if + fontification is too slow to keep up with scrolling. + +- Deferred on-the-fly fontification if `lazy-lock-defer-on-the-fly' is non-nil. + This means on-the-fly fontification does not occur as you type. Instead, + fontification is deferred until after `lazy-lock-defer-time' seconds of Emacs + idle time, while Emacs remains idle. This is useful if fontification is too + slow to keep up with your typing. + +- Deferred context fontification if `lazy-lock-defer-contextually' is non-nil. + This means fontification updates the buffer corresponding to true syntactic + context, after `lazy-lock-defer-time' seconds of Emacs idle time, while Emacs + remains idle. Otherwise, fontification occurs on modified lines only, and + subsequent lines can remain fontified corresponding to previous syntactic + contexts. This is useful where strings or comments span lines. + +- Stealthy buffer fontification if `lazy-lock-stealth-time' is non-nil. + This means remaining unfontified areas of buffers are fontified if Emacs has + been idle for `lazy-lock-stealth-time' seconds, while Emacs remains idle. + This is useful if any buffer has any deferred fontification. + +Basic Font Lock mode on-the-fly fontification behaviour fontifies modified +lines only. Thus, if `lazy-lock-defer-contextually' is non-nil, Lazy Lock mode +on-the-fly fontification may fontify differently, albeit correctly. In any +event, to refontify some lines you can use \\[font-lock-fontify-block]. + +Stealth fontification only occurs while the system remains unloaded. +If the system load rises above `lazy-lock-stealth-load' percent, stealth +fontification is suspended. Stealth fontification intensity is controlled via +the variable `lazy-lock-stealth-nice' and `lazy-lock-stealth-lines', and +verbosity is controlled via the variable `lazy-lock-stealth-verbose'. + +\(fn &optional ARG)" t nil) + +(autoload (quote turn-on-lazy-lock) "lazy-lock" "\ +Unconditionally turn on Lazy Lock mode. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (ld-script-mode) "ld-script" "progmodes/ld-script.el" +;;;;;; (16238 60560)) +;;; Generated autoloads from progmodes/ld-script.el + +(add-to-list (quote auto-mode-alist) (quote ("\\.lds" . ld-script-mode))) + +(autoload (quote ld-script-mode) "ld-script" "\ +A major mode to edit GNU ld script files + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (ledit-from-lisp-mode ledit-mode) "ledit" "ledit.el" +;;;;;; (16211 27017)) +;;; Generated autoloads from ledit.el + +(defconst ledit-save-files t "\ +*Non-nil means Ledit should save files before transferring to Lisp.") + +(defconst ledit-go-to-lisp-string "%?lisp" "\ +*Shell commands to execute to resume Lisp job.") + +(defconst ledit-go-to-liszt-string "%?liszt" "\ +*Shell commands to execute to resume Lisp compiler job.") + +(autoload (quote ledit-mode) "ledit" "\ +\\Major mode for editing text and stuffing it to a Lisp job. +Like Lisp mode, plus these special commands: + \\[ledit-save-defun] -- record defun at or after point + for later transmission to Lisp job. + \\[ledit-save-region] -- record region for later transmission to Lisp job. + \\[ledit-go-to-lisp] -- transfer to Lisp job and transmit saved text. + \\[ledit-go-to-liszt] -- transfer to Liszt (Lisp compiler) job + and transmit saved text. +\\{ledit-mode-map} +To make Lisp mode automatically change to Ledit mode, +do (setq lisp-mode-hook 'ledit-from-lisp-mode) + +\(fn)" t nil) + +(autoload (quote ledit-from-lisp-mode) "ledit" "\ +Not documented + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (life) "life" "play/life.el" (16211 27038)) +;;; Generated autoloads from play/life.el + +(autoload (quote life) "life" "\ +Run Conway's Life simulation. +The starting pattern is randomly selected. Prefix arg (optional first +arg non-nil from a program) is the number of seconds to sleep between +generations (this defaults to 1). + +\(fn &optional SLEEPTIME)" t nil) + +;;;*** + +;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (16256 +;;;;;; 53161)) +;;; Generated autoloads from loadhist.el + +(autoload (quote unload-feature) "loadhist" "\ +Unload the library that provided FEATURE, restoring all its autoloads. +If the feature is required by any other loaded code, and prefix arg FORCE +is nil, raise an error. + +\(fn FEATURE &optional FORCE)" t nil) + +;;;*** + +;;;### (autoloads (locate-with-filter locate) "locate" "locate.el" +;;;;;; (16211 27017)) +;;; Generated autoloads from locate.el + +(autoload (quote locate) "locate" "\ +Run the program `locate', putting results in `*Locate*' buffer. +With prefix arg, prompt for the locate command to run. + +\(fn SEARCH-STRING &optional FILTER)" t nil) + +(autoload (quote locate-with-filter) "locate" "\ +Run the locate command with a filter. + +The filter is a regular expression. Only results matching the filter are +shown; this is often useful to constrain a big search. + +\(fn SEARCH-STRING FILTER)" t nil) + +;;;*** + +;;;### (autoloads (log-edit) "log-edit" "log-edit.el" (16258 10857)) +;;; Generated autoloads from log-edit.el + +(autoload (quote log-edit) "log-edit" "\ +Setup a buffer to enter a log message. +\\The buffer will be put in `log-edit-mode'. +If SETUP is non-nil, the buffer is then erased and `log-edit-hook' is run. +Mark and point will be set around the entire contents of the +buffer so that it is easy to kill the contents of the buffer with \\[kill-region]. +Once you're done editing the message, pressing \\[log-edit-done] will call +`log-edit-done' which will end up calling CALLBACK to do the actual commit. +LISTFUN if non-nil is a function of no arguments returning the list of files + that are concerned by the current operation (using relative names). +If BUFFER is non-nil `log-edit' will jump to that buffer, use it to edit the + log message and go back to the current buffer when done. Otherwise, it + uses the current buffer. + +\(fn CALLBACK &optional SETUP LISTFUN BUFFER &rest IGNORE)" nil nil) + +;;;*** + +;;;### (autoloads (log-view-mode) "log-view" "log-view.el" (16211 +;;;;;; 27017)) +;;; Generated autoloads from log-view.el + +(autoload (quote log-view-mode) "log-view" "\ +Major mode for browsing CVS log output. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (print-region lpr-region print-buffer lpr-buffer +;;;;;; lpr-command lpr-switches printer-name) "lpr" "lpr.el" (16211 +;;;;;; 27017)) +;;; Generated autoloads from lpr.el + +(defvar lpr-windows-system (memq system-type (quote (emx win32 w32 mswindows ms-dos windows-nt)))) + +(defvar lpr-lp-system (memq system-type (quote (usg-unix-v dgux hpux irix)))) + +(defvar printer-name (and lpr-windows-system "PRN") "\ +*The name of a local printer to which data is sent for printing. +\(Note that PostScript files are sent to `ps-printer-name', which see.) + +On Unix-like systems, a string value should be a name understood by +lpr's -P option; otherwise the value should be nil. + +On MS-DOS and MS-Windows systems, a string value is taken as the name of +a printer device or port, provided `lpr-command' is set to \"\". +Typical non-default settings would be \"LPT1\" to \"LPT3\" for parallel +printers, or \"COM1\" to \"COM4\" or \"AUX\" for serial printers, or +\"//hostname/printer\" for a shared network printer. You can also set +it to the name of a file, in which case the output gets appended to that +file. If you want to discard the printed output, set this to \"NUL\".") + +(custom-autoload (quote printer-name) "lpr") + +(defvar lpr-switches nil "\ +*List of strings to pass as extra options for the printer program. +It is recommended to set `printer-name' instead of including an explicit +switch on this list. +See `lpr-command'.") + +(custom-autoload (quote lpr-switches) "lpr") + +(defvar lpr-command (cond (lpr-windows-system "") (lpr-lp-system "lp") (t "lpr")) "\ +*Name of program for printing a file. + +On MS-DOS and MS-Windows systems, if the value is an empty string then +Emacs will write directly to the printer port named by `printer-name'. +The programs `print' and `nprint' (the standard print programs on +Windows NT and Novell Netware respectively) are handled specially, using +`printer-name' as the destination for output; any other program is +treated like `lpr' except that an explicit filename is given as the last +argument.") + +(custom-autoload (quote lpr-command) "lpr") + +(autoload (quote lpr-buffer) "lpr" "\ +Print buffer contents without pagination or page headers. +See the variables `lpr-switches' and `lpr-command' +for customization of the printer command. + +\(fn)" t nil) + +(autoload (quote print-buffer) "lpr" "\ +Paginate and print buffer contents. + +The variable `lpr-headers-switches' controls how to paginate. +If it is nil (the default), we run the `pr' program (or whatever program +`lpr-page-header-program' specifies) to paginate. +`lpr-page-header-switches' specifies the switches for that program. + +Otherwise, the switches in `lpr-headers-switches' are used +in the print command itself; we expect them to request pagination. + +See the variables `lpr-switches' and `lpr-command' +for further customization of the printer command. + +\(fn)" t nil) + +(autoload (quote lpr-region) "lpr" "\ +Print region contents without pagination or page headers. +See the variables `lpr-switches' and `lpr-command' +for customization of the printer command. + +\(fn START END)" t nil) + +(autoload (quote print-region) "lpr" "\ +Paginate and print the region contents. + +The variable `lpr-headers-switches' controls how to paginate. +If it is nil (the default), we run the `pr' program (or whatever program +`lpr-page-header-program' specifies) to paginate. +`lpr-page-header-switches' specifies the switches for that program. + +Otherwise, the switches in `lpr-headers-switches' are used +in the print command itself; we expect them to request pagination. + +See the variables `lpr-switches' and `lpr-command' +for further customization of the printer command. + +\(fn START END)" t nil) + +;;;*** + +;;;### (autoloads (ls-lisp-support-shell-wildcards) "ls-lisp" "ls-lisp.el" +;;;;;; (16277 42321)) +;;; Generated autoloads from ls-lisp.el + +(defvar ls-lisp-support-shell-wildcards t "\ +*Non-nil means ls-lisp treats file patterns as shell wildcards. +Otherwise they are treated as Emacs regexps (for backward compatibility).") + +(custom-autoload (quote ls-lisp-support-shell-wildcards) "ls-lisp") + +;;;*** + +;;;### (autoloads (phases-of-moon) "lunar" "calendar/lunar.el" (16211 +;;;;;; 27023)) +;;; Generated autoloads from calendar/lunar.el + +(autoload (quote phases-of-moon) "lunar" "\ +Display the quarters of the moon for last month, this month, and next month. +If called with an optional prefix argument, prompts for month and year. + +This function is suitable for execution in a .emacs file. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (m4-mode) "m4-mode" "progmodes/m4-mode.el" (16211 +;;;;;; 27039)) +;;; Generated autoloads from progmodes/m4-mode.el + +(autoload (quote m4-mode) "m4-mode" "\ +A major mode to edit m4 macro files. +\\{m4-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (apply-macro-to-region-lines kbd-macro-query insert-kbd-macro +;;;;;; name-last-kbd-macro) "macros" "macros.el" (16211 27017)) +;;; Generated autoloads from macros.el + +(autoload (quote name-last-kbd-macro) "macros" "\ +Assign a name to the last keyboard macro defined. +Argument SYMBOL is the name to define. +The symbol's function definition becomes the keyboard macro string. +Such a \"function\" cannot be called from Lisp, but it is a valid editor command. + +\(fn SYMBOL)" t nil) + +(autoload (quote insert-kbd-macro) "macros" "\ +Insert in buffer the definition of kbd macro NAME, as Lisp code. +Optional second arg KEYS means also record the keys it is on +\(this is the prefix argument, when calling interactively). + +This Lisp code will, when executed, define the kbd macro with the same +definition it has now. If you say to record the keys, the Lisp code +will also rebind those keys to the macro. Only global key bindings +are recorded since executing this Lisp code always makes global +bindings. + +To save a kbd macro, visit a file of Lisp code such as your `~/.emacs', +use this command, and then save the file. + +\(fn MACRONAME &optional KEYS)" t nil) + +(autoload (quote kbd-macro-query) "macros" "\ +Query user during kbd macro execution. + With prefix argument, enters recursive edit, reading keyboard +commands even within a kbd macro. You can give different commands +each time the macro executes. + Without prefix argument, asks whether to continue running the macro. +Your options are: \\ +\\[act] Finish this iteration normally and continue with the next. +\\[skip] Skip the rest of this iteration, and start the next. +\\[exit] Stop the macro entirely right now. +\\[recenter] Redisplay the screen, then ask again. +\\[edit] Enter recursive edit; ask again when you exit from that. + +\(fn FLAG)" t nil) + +(autoload (quote apply-macro-to-region-lines) "macros" "\ +For each complete line between point and mark, move to the beginning +of the line, and run the last keyboard macro. + +When called from lisp, this function takes two arguments TOP and +BOTTOM, describing the current region. TOP must be before BOTTOM. +The optional third argument MACRO specifies a keyboard macro to +execute. + +This is useful for quoting or unquoting included text, adding and +removing comments, or producing tables where the entries are regular. + +For example, in Usenet articles, sections of text quoted from another +author are indented, or have each line start with `>'. To quote a +section of text, define a keyboard macro which inserts `>', put point +and mark at opposite ends of the quoted section, and use +`\\[apply-macro-to-region-lines]' to mark the entire section. + +Suppose you wanted to build a keyword table in C where each entry +looked like this: + + { \"foo\", foo_data, foo_function }, + { \"bar\", bar_data, bar_function }, + { \"baz\", baz_data, baz_function }, + +You could enter the names in this format: + + foo + bar + baz + +and write a macro to massage a word into a table entry: + + \\C-x ( + \\M-d { \"\\C-y\", \\C-y_data, \\C-y_function }, + \\C-x ) + +and then select the region of un-tablified names and use +`\\[apply-macro-to-region-lines]' to build the table from the names. + +\(fn TOP BOTTOM &optional MACRO)" t nil) + (define-key ctl-x-map "q" 'kbd-macro-query) + +;;;*** + +;;;### (autoloads (what-domain mail-extract-address-components) "mail-extr" +;;;;;; "mail/mail-extr.el" (16281 48394)) +;;; Generated autoloads from mail/mail-extr.el + +(autoload (quote mail-extract-address-components) "mail-extr" "\ +Given an RFC-822 address ADDRESS, extract full name and canonical address. +Returns a list of the form (FULL-NAME CANONICAL-ADDRESS). +If no name can be extracted, FULL-NAME will be nil. Also see +`mail-extr-ignore-single-names'. + +If the optional argument ALL is non-nil, then ADDRESS can contain zero +or more recipients, separated by commas, and we return a list of +the form ((FULL-NAME CANONICAL-ADDRESS) ...) with one element for +each recipient. If ALL is nil, then if ADDRESS contains more than +one recipients, all but the first is ignored. + +ADDRESS may be a string or a buffer. If it is a buffer, the visible +\(narrowed) portion of the buffer will be interpreted as the address. +\(This feature exists so that the clever caller might be able to avoid +consing a string.) + +\(fn ADDRESS &optional ALL)" nil nil) + +(autoload (quote what-domain) "mail-extr" "\ +Convert mail domain DOMAIN to the country it corresponds to. + +\(fn DOMAIN)" t nil) + +;;;*** + +;;;### (autoloads (mail-hist-put-headers-into-history mail-hist-keep-history +;;;;;; mail-hist-enable mail-hist-define-keys) "mail-hist" "mail/mail-hist.el" +;;;;;; (16211 27033)) +;;; Generated autoloads from mail/mail-hist.el + +(autoload (quote mail-hist-define-keys) "mail-hist" "\ +Define keys for accessing mail header history. For use in hooks. + +\(fn)" nil nil) + +(autoload (quote mail-hist-enable) "mail-hist" "\ +Not documented + +\(fn)" nil nil) + +(defvar mail-hist-keep-history t "\ +*Non-nil means keep a history for headers and text of outgoing mail.") + +(custom-autoload (quote mail-hist-keep-history) "mail-hist") + +(autoload (quote mail-hist-put-headers-into-history) "mail-hist" "\ +Put headers and contents of this message into mail header history. +Each header has its own independent history, as does the body of the +message. + +This function normally would be called when the message is sent. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (mail-fetch-field mail-unquote-printable-region +;;;;;; mail-unquote-printable mail-quote-printable mail-file-babyl-p +;;;;;; mail-use-rfc822) "mail-utils" "mail/mail-utils.el" (16211 +;;;;;; 27033)) +;;; Generated autoloads from mail/mail-utils.el + +(defvar mail-use-rfc822 nil "\ +*If non-nil, use a full, hairy RFC822 parser on mail addresses. +Otherwise, (the default) use a smaller, somewhat faster, and +often correct parser.") + +(custom-autoload (quote mail-use-rfc822) "mail-utils") + +(autoload (quote mail-file-babyl-p) "mail-utils" "\ +Not documented + +\(fn FILE)" nil nil) + +(autoload (quote mail-quote-printable) "mail-utils" "\ +Convert a string to the \"quoted printable\" Q encoding. +If the optional argument WRAPPER is non-nil, +we add the wrapper characters =?ISO-8859-1?Q?....?=. + +\(fn STRING &optional WRAPPER)" nil nil) + +(autoload (quote mail-unquote-printable) "mail-utils" "\ +Undo the \"quoted printable\" encoding. +If the optional argument WRAPPER is non-nil, +we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=. + +\(fn STRING &optional WRAPPER)" nil nil) + +(autoload (quote mail-unquote-printable-region) "mail-utils" "\ +Undo the \"quoted printable\" encoding in buffer from BEG to END. +If the optional argument WRAPPER is non-nil, +we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=. + +\(fn BEG END &optional WRAPPER)" t nil) + +(autoload (quote mail-fetch-field) "mail-utils" "\ +Return the value of the header field whose type is FIELD-NAME. +The buffer is expected to be narrowed to just the header of the message. +If second arg LAST is non-nil, use the last field of type FIELD-NAME. +If third arg ALL is non-nil, concatenate all such fields with commas between. +If 4th arg LIST is non-nil, return a list of all such fields. + +\(fn FIELD-NAME &optional LAST ALL LIST)" nil nil) + +;;;*** + +;;;### (autoloads (define-mail-abbrev build-mail-abbrevs mail-abbrevs-setup) +;;;;;; "mailabbrev" "mail/mailabbrev.el" (16249 31429)) +;;; Generated autoloads from mail/mailabbrev.el + +(autoload (quote mail-abbrevs-setup) "mailabbrev" "\ +Initialize use of the `mailabbrev' package. + +\(fn)" nil nil) + +(autoload (quote build-mail-abbrevs) "mailabbrev" "\ +Read mail aliases from personal mail alias file and set `mail-abbrevs'. +By default this is the file specified by `mail-personal-alias-file'. + +\(fn &optional FILE RECURSIVEP)" nil nil) + +(autoload (quote define-mail-abbrev) "mailabbrev" "\ +Define NAME as a mail alias abbrev that translates to DEFINITION. +If DEFINITION contains multiple addresses, separate them with commas. + +\(fn NAME DEFINITION &optional FROM-MAILRC-FILE)" t nil) + +;;;*** + +;;;### (autoloads (mail-complete define-mail-alias expand-mail-aliases +;;;;;; mail-complete-style) "mailalias" "mail/mailalias.el" (16211 +;;;;;; 27034)) +;;; Generated autoloads from mail/mailalias.el + +(defvar mail-complete-style (quote angles) "\ +*Specifies how \\[mail-complete] formats the full name when it completes. +If `nil', they contain just the return address like: + king@grassland.com +If `parens', they look like: + king@grassland.com (Elvis Parsley) +If `angles', they look like: + Elvis Parsley ") + +(custom-autoload (quote mail-complete-style) "mailalias") + +(autoload (quote expand-mail-aliases) "mailalias" "\ +Expand all mail aliases in suitable header fields found between BEG and END. +If interactive, expand in header fields. +Suitable header fields are `To', `From', `CC' and `BCC', `Reply-to', and +their `Resent-' variants. + +Optional second arg EXCLUDE may be a regular expression defining text to be +removed from alias expansions. + +\(fn BEG END &optional EXCLUDE)" t nil) + +(autoload (quote define-mail-alias) "mailalias" "\ +Define NAME as a mail alias that translates to DEFINITION. +This means that sending a message to NAME will actually send to DEFINITION. + +Normally, the addresses in DEFINITION must be separated by commas. +If FROM-MAILRC-FILE is non-nil, then addresses in DEFINITION +can be separated by spaces; an address can contain spaces +if it is quoted with double-quotes. + +\(fn NAME DEFINITION &optional FROM-MAILRC-FILE)" t nil) + +(autoload (quote mail-complete) "mailalias" "\ +Perform completion on header field or word preceding point. +Completable headers are according to `mail-complete-alist'. If none matches +current header, calls `mail-complete-function' and passes prefix arg if any. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (makefile-mode) "make-mode" "progmodes/make-mode.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/make-mode.el + +(autoload (quote makefile-mode) "make-mode" "\ +Major mode for editing Makefiles. +This function ends by invoking the function(s) `makefile-mode-hook'. + +\\{makefile-mode-map} + +In the browser, use the following keys: + +\\{makefile-browser-map} + +Makefile mode can be configured by modifying the following variables: + +`makefile-browser-buffer-name': + Name of the macro- and target browser buffer. + +`makefile-target-colon': + The string that gets appended to all target names + inserted by `makefile-insert-target'. + \":\" or \"::\" are quite common values. + +`makefile-macro-assign': + The string that gets appended to all macro names + inserted by `makefile-insert-macro'. + The normal value should be \" = \", since this is what + standard make expects. However, newer makes such as dmake + allow a larger variety of different macro assignments, so you + might prefer to use \" += \" or \" := \" . + +`makefile-tab-after-target-colon': + If you want a TAB (instead of a space) to be appended after the + target colon, then set this to a non-nil value. + +`makefile-browser-leftmost-column': + Number of blanks to the left of the browser selection mark. + +`makefile-browser-cursor-column': + Column in which the cursor is positioned when it moves + up or down in the browser. + +`makefile-browser-selected-mark': + String used to mark selected entries in the browser. + +`makefile-browser-unselected-mark': + String used to mark unselected entries in the browser. + +`makefile-browser-auto-advance-after-selection-p': + If this variable is set to a non-nil value the cursor + will automagically advance to the next line after an item + has been selected in the browser. + +`makefile-pickup-everything-picks-up-filenames-p': + If this variable is set to a non-nil value then + `makefile-pickup-everything' also picks up filenames as targets + (i.e. it calls `makefile-pickup-filenames-as-targets'), otherwise + filenames are omitted. + +`makefile-cleanup-continuations': + If this variable is set to a non-nil value then Makefile mode + will assure that no line in the file ends with a backslash + (the continuation character) followed by any whitespace. + This is done by silently removing the trailing whitespace, leaving + the backslash itself intact. + IMPORTANT: Please note that enabling this option causes Makefile mode + to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\". + +`makefile-browser-hook': + A function or list of functions to be called just before the + browser is entered. This is executed in the makefile buffer. + +`makefile-special-targets-list': + List of special targets. You will be offered to complete + on one of those in the minibuffer whenever you enter a `.'. + at the beginning of a line in Makefile mode. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (make-command-summary) "makesum" "makesum.el" (16211 +;;;;;; 27017)) +;;; Generated autoloads from makesum.el + +(autoload (quote make-command-summary) "makesum" "\ +Make a summary of current key bindings in the buffer *Summary*. +Previous contents of that buffer are killed first. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (man-follow man) "man" "man.el" (16246 39964)) +;;; Generated autoloads from man.el + +(defalias (quote manual-entry) (quote man)) + +(autoload (quote man) "man" "\ +Get a Un*x manual page and put it in a buffer. +This command is the top-level command in the man package. It runs a Un*x +command to retrieve and clean a manpage in the background and places the +results in a Man mode (manpage browsing) buffer. See variable +`Man-notify-method' for what happens when the buffer is ready. +If a buffer already exists for this man page, it will display immediately. + +To specify a man page from a certain section, type SUBJECT(SECTION) or +SECTION SUBJECT when prompted for a manual entry. To see manpages from +all sections related to a subject, put something appropriate into the +`Man-switches' variable, which see. + +\(fn MAN-ARGS)" t nil) + +(autoload (quote man-follow) "man" "\ +Get a Un*x manual page of the item under point and put it in a buffer. + +\(fn MAN-ARGS)" t nil) + +;;;*** + +;;;### (autoloads (master-mode) "master" "master.el" (16211 27017)) +;;; Generated autoloads from master.el + +(autoload (quote master-mode) "master" "\ +Toggle Master mode. +With no argument, this command toggles the mode. +Non-null prefix argument turns on the mode. +Null prefix argument turns off the mode. + +When Master mode is enabled, you can scroll the slave buffer using the +following commands: + +\\{master-mode-map} + +The slave buffer is stored in the buffer-local variable `master-of'. +You can set this variable using `master-set-slave'. You can show +yourself the value of `master-of' by calling `master-show-slave'. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (menu-bar-mode) "menu-bar" "menu-bar.el" (16211 +;;;;;; 37994)) +;;; Generated autoloads from menu-bar.el + +(put (quote menu-bar-mode) (quote standard-value) (quote (t))) + +(defvar menu-bar-mode nil "\ +Non-nil if Menu-Bar mode is enabled. +See the command `menu-bar-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `menu-bar-mode'.") + +(custom-autoload (quote menu-bar-mode) "menu-bar") + +(autoload (quote menu-bar-mode) "menu-bar" "\ +Toggle display of a menu bar on each frame. +This command applies to all frames that exist and frames to be +created in the future. +With a numeric argument, if the argument is positive, +turn on menu bars; otherwise, turn off menu bars. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (unbold-region bold-region message-news-other-frame +;;;;;; message-news-other-window message-mail-other-frame message-mail-other-window +;;;;;; message-bounce message-resend message-insinuate-rmail message-forward-rmail-make-body +;;;;;; message-forward-make-body message-forward message-recover +;;;;;; message-supersede message-cancel-news message-followup message-wide-reply +;;;;;; message-reply message-news message-mail message-mode message-signature-file +;;;;;; message-signature message-indent-citation-function message-cite-function +;;;;;; message-yank-prefix message-citation-line-function message-send-mail-function +;;;;;; message-user-organization-file message-signature-separator +;;;;;; message-from-style) "message" "gnus/message.el" (16211 27028)) +;;; Generated autoloads from gnus/message.el + +(defvar message-from-style (quote default) "\ +*Specifies how \"From\" headers look. + +If nil, they contain just the return address like: + king@grassland.com +If `parens', they look like: + king@grassland.com (Elvis Parsley) +If `angles', they look like: + Elvis Parsley + +Otherwise, most addresses look like `angles', but they look like +`parens' if `angles' would need quoting and `parens' would not.") + +(custom-autoload (quote message-from-style) "message") + +(defvar message-signature-separator "^-- *$" "\ +Regexp matching the signature separator.") + +(custom-autoload (quote message-signature-separator) "message") + +(defvar message-user-organization-file "/usr/lib/news/organization" "\ +*Local news organization file.") + +(custom-autoload (quote message-user-organization-file) "message") + +(defvar message-send-mail-function (quote message-send-mail-with-sendmail) "\ +Function to call to send the current buffer as mail. +The headers should be delimited by a line whose contents match the +variable `mail-header-separator'. + +Valid values include `message-send-mail-with-sendmail' (the default), +`message-send-mail-with-mh', `message-send-mail-with-qmail', +`smtpmail-send-it' and `feedmail-send-it'. + +See also `send-mail-function'.") + +(custom-autoload (quote message-send-mail-function) "message") + +(defvar message-citation-line-function (quote message-insert-citation-line) "\ +*Function called to insert the \"Whomever writes:\" line.") + +(custom-autoload (quote message-citation-line-function) "message") + +(defvar message-yank-prefix "> " "\ +*Prefix inserted on the lines of yanked messages.") + +(custom-autoload (quote message-yank-prefix) "message") + +(defvar message-cite-function (quote message-cite-original) "\ +*Function for citing an original message. +Predefined functions include `message-cite-original' and +`message-cite-original-without-signature'. +Note that `message-cite-original' uses `mail-citation-hook' if that is non-nil.") + +(custom-autoload (quote message-cite-function) "message") + +(defvar message-indent-citation-function (quote message-indent-citation) "\ +*Function for modifying a citation just inserted in the mail buffer. +This can also be a list of functions. Each function can find the +citation between (point) and (mark t). And each function should leave +point and mark around the citation text as modified.") + +(custom-autoload (quote message-indent-citation-function) "message") + +(defvar message-signature t "\ +*String to be inserted at the end of the message buffer. +If t, the `message-signature-file' file will be inserted instead. +If a function, the result from the function will be used instead. +If a form, the result from the form will be used instead.") + +(custom-autoload (quote message-signature) "message") + +(defvar message-signature-file "~/.signature" "\ +*Name of file containing the text inserted at end of message buffer. +Ignored if the named file doesn't exist. +If nil, don't insert a signature.") + +(custom-autoload (quote message-signature-file) "message") + +(define-mail-user-agent (quote message-user-agent) (quote message-mail) (quote message-send-and-exit) (quote message-kill-buffer) (quote message-send-hook)) + +(autoload (quote message-mode) "message" "\ +Major mode for editing mail and news to be sent. +Like Text Mode but with these additional commands:\\ +C-c C-s `message-send' (send the message) C-c C-c `message-send-and-exit' +C-c C-d Postpone sending the message C-c C-k Kill the message +C-c C-f move to a header field (and create it if there isn't): + C-c C-f C-t move to To C-c C-f C-s move to Subject + C-c C-f C-c move to Cc C-c C-f C-b move to Bcc + C-c C-f C-w move to Fcc C-c C-f C-r move to Reply-To + C-c C-f C-u move to Summary C-c C-f C-n move to Newsgroups + C-c C-f C-k move to Keywords C-c C-f C-d move to Distribution + C-c C-f C-f move to Followup-To +C-c C-t `message-insert-to' (add a To header to a news followup) +C-c C-n `message-insert-newsgroups' (add a Newsgroup header to a news reply) +C-c C-b `message-goto-body' (move to beginning of message text). +C-c C-i `message-goto-signature' (move to the beginning of the signature). +C-c C-w `message-insert-signature' (insert `message-signature-file' file). +C-c C-y `message-yank-original' (insert current message, if any). +C-c C-q `message-fill-yanked-message' (fill what was yanked). +C-c C-e `message-elide-region' (elide the text between point and mark). +C-c C-v `message-delete-not-region' (remove the text outside the region). +C-c C-z `message-kill-to-signature' (kill the text up to the signature). +C-c C-r `message-caesar-buffer-body' (rot13 the message body). +C-c C-a `mml-attach-file' (attach a file as MIME). +M-RET `message-newline-and-reformat' (break the line and reformat). + +\(fn)" t nil) + +(autoload (quote message-mail) "message" "\ +Start editing a mail message to be sent. +OTHER-HEADERS is an alist of header/value pairs. + +\(fn &optional TO SUBJECT OTHER-HEADERS CONTINUE SWITCH-FUNCTION YANK-ACTION SEND-ACTIONS)" t nil) + +(autoload (quote message-news) "message" "\ +Start editing a news article to be sent. + +\(fn &optional NEWSGROUPS SUBJECT)" t nil) + +(autoload (quote message-reply) "message" "\ +Start editing a reply to the article in the current buffer. + +\(fn &optional TO-ADDRESS WIDE)" t nil) + +(autoload (quote message-wide-reply) "message" "\ +Make a \"wide\" reply to the message in the current buffer. + +\(fn &optional TO-ADDRESS)" t nil) + +(autoload (quote message-followup) "message" "\ +Follow up to the message in the current buffer. +If TO-NEWSGROUPS, use that as the new Newsgroups line. + +\(fn &optional TO-NEWSGROUPS)" t nil) + +(autoload (quote message-cancel-news) "message" "\ +Cancel an article you posted. +If ARG, allow editing of the cancellation message. + +\(fn &optional ARG)" t nil) + +(autoload (quote message-supersede) "message" "\ +Start composing a message to supersede the current message. +This is done simply by taking the old article and adding a Supersedes +header line with the old Message-ID. + +\(fn)" t nil) + +(autoload (quote message-recover) "message" "\ +Reread contents of current buffer from its last auto-save file. + +\(fn)" t nil) + +(autoload (quote message-forward) "message" "\ +Forward the current message via mail. +Optional NEWS will use news to forward instead of mail. +Optional DIGEST will use digest to forward. + +\(fn &optional NEWS DIGEST)" t nil) + +(autoload (quote message-forward-make-body) "message" "\ +Not documented + +\(fn FORWARD-BUFFER &optional DIGEST)" nil nil) + +(autoload (quote message-forward-rmail-make-body) "message" "\ +Not documented + +\(fn FORWARD-BUFFER)" nil nil) + +(autoload (quote message-insinuate-rmail) "message" "\ +Let RMAIL uses message to forward. + +\(fn)" t nil) + +(autoload (quote message-resend) "message" "\ +Resend the current article to ADDRESS. + +\(fn ADDRESS)" t nil) + +(autoload (quote message-bounce) "message" "\ +Re-mail the current message. +This only makes sense if the current message is a bounce message that +contains some mail you have written which has been bounced back to +you. + +\(fn)" t nil) + +(autoload (quote message-mail-other-window) "message" "\ +Like `message-mail' command, but display mail buffer in another window. + +\(fn &optional TO SUBJECT)" t nil) + +(autoload (quote message-mail-other-frame) "message" "\ +Like `message-mail' command, but display mail buffer in another frame. + +\(fn &optional TO SUBJECT)" t nil) + +(autoload (quote message-news-other-window) "message" "\ +Start editing a news article to be sent. + +\(fn &optional NEWSGROUPS SUBJECT)" t nil) + +(autoload (quote message-news-other-frame) "message" "\ +Start editing a news article to be sent. + +\(fn &optional NEWSGROUPS SUBJECT)" t nil) + +(autoload (quote bold-region) "message" "\ +Bold all nonblank characters in the region. +Works by overstriking characters. +Called from program, takes two arguments START and END +which specify the range to operate on. + +\(fn START END)" t nil) + +(autoload (quote unbold-region) "message" "\ +Remove all boldness (overstruck characters) in the region. +Called from program, takes two arguments START and END +which specify the range to operate on. + +\(fn START END)" t nil) + +;;;*** + +;;;### (autoloads (metapost-mode metafont-mode) "meta-mode" "progmodes/meta-mode.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/meta-mode.el + +(autoload (quote metafont-mode) "meta-mode" "\ +Major mode for editing Metafont sources. +Special commands: +\\{meta-mode-map} + +Turning on Metafont mode calls the value of the variables +`meta-common-mode-hook' and `metafont-mode-hook'. + +\(fn)" t nil) + +(autoload (quote metapost-mode) "meta-mode" "\ +Major mode for editing MetaPost sources. +Special commands: +\\{meta-mode-map} + +Turning on MetaPost mode calls the value of the variable +`meta-common-mode-hook' and `metafont-mode-hook'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (metamail-region metamail-buffer metamail-interpret-body +;;;;;; metamail-interpret-header) "metamail" "mail/metamail.el" +;;;;;; (16211 27034)) +;;; Generated autoloads from mail/metamail.el + +(autoload (quote metamail-interpret-header) "metamail" "\ +Interpret a header part of a MIME message in current buffer. +Its body part is not interpreted at all. + +\(fn)" t nil) + +(autoload (quote metamail-interpret-body) "metamail" "\ +Interpret a body part of a MIME message in current buffer. +Optional argument VIEWMODE specifies the value of the +EMACS_VIEW_MODE environment variable (defaulted to 1). +Optional argument NODISPLAY non-nil means buffer is not +redisplayed as output is inserted. +Its header part is not interpreted at all. + +\(fn &optional VIEWMODE NODISPLAY)" t nil) + +(autoload (quote metamail-buffer) "metamail" "\ +Process current buffer through `metamail'. +Optional argument VIEWMODE specifies the value of the +EMACS_VIEW_MODE environment variable (defaulted to 1). +Optional argument BUFFER specifies a buffer to be filled (nil +means current). +Optional argument NODISPLAY non-nil means buffer is not +redisplayed as output is inserted. + +\(fn &optional VIEWMODE BUFFER NODISPLAY)" t nil) + +(autoload (quote metamail-region) "metamail" "\ +Process current region through 'metamail'. +Optional argument VIEWMODE specifies the value of the +EMACS_VIEW_MODE environment variable (defaulted to 1). +Optional argument BUFFER specifies a buffer to be filled (nil +means current). +Optional argument NODISPLAY non-nil means buffer is not +redisplayed as output is inserted. + +\(fn BEG END &optional VIEWMODE BUFFER NODISPLAY)" t nil) + +;;;*** + +;;;### (autoloads (mh-letter-mode mh-smail-other-window mh-user-agent-compose +;;;;;; mh-smail-batch mh-smail) "mh-comp" "mh-e/mh-comp.el" (16211 +;;;;;; 27036)) +;;; Generated autoloads from mh-e/mh-comp.el + +(autoload (quote mh-smail) "mh-comp" "\ +Compose and send mail with the MH mail system. +This function is an entry point to MH-E, the Emacs front end +to the MH mail system. + +See documentation of `\\[mh-send]' for more details on composing mail. + +\(fn)" t nil) + +(autoload (quote mh-smail-batch) "mh-comp" "\ +Set up a mail composition draft with the MH mail system. +This function is an entry point to MH-E, the Emacs front end +to the MH mail system. This function does not prompt the user +for any header fields, and thus is suitable for use by programs +that want to create a mail buffer. +Users should use `\\[mh-smail]' to compose mail. +Optional arguments for setting certain fields include TO, SUBJECT, and +OTHER-HEADERS. Additional arguments are IGNORED. + +\(fn &optional TO SUBJECT OTHER-HEADERS &rest IGNORED)" nil nil) + +(autoload (quote mh-user-agent-compose) "mh-comp" "\ +Set up mail composition draft with the MH mail system. +This is `mail-user-agent' entry point to MH-E. + +The optional arguments TO and SUBJECT specify recipients and the +initial Subject field, respectively. + +OTHER-HEADERS is an alist specifying additional +header fields. Elements look like (HEADER . VALUE) where both +HEADER and VALUE are strings. + +CONTINUE, SWITCH-FUNCTION, YANK-ACTION and SEND-ACTIONS are ignored. + +\(fn &optional TO SUBJECT OTHER-HEADERS CONTINUE SWITCH-FUNCTION YANK-ACTION SEND-ACTIONS)" nil nil) + +(autoload (quote mh-smail-other-window) "mh-comp" "\ +Compose and send mail in other window with the MH mail system. +This function is an entry point to MH-E, the Emacs front end +to the MH mail system. + +See documentation of `\\[mh-send]' for more details on composing mail. + +\(fn)" t nil) + +(autoload (quote mh-letter-mode) "mh-comp" "\ +Mode for composing letters in MH-E.\\ + +When you have finished composing, type \\[mh-send-letter] to send the message +using the MH mail handling system. + +There are two types of MIME directives used by MH-E: Gnus and MH. The option +`mh-compose-insertion' controls what type of directives are inserted by MH-E +commands. These directives can be converted to MIME body parts by running +\\[mh-edit-mhn] for mhn directives or \\[mh-mml-to-mime] for Gnus directives. +This step is mandatory if these directives are added manually. If the +directives are inserted with MH-E commands such as \\[mh-compose-insertion], +the directives are expanded automatically when the letter is sent. + +Options that control this mode can be changed with +\\[customize-group]; specify the \"mh-compose\" group. + +When a message is composed, the hooks `text-mode-hook' and +`mh-letter-mode-hook' are run. + +\\{mh-letter-mode-map} + +\(fn)" t nil) +(add-to-list 'auto-mode-alist '("/drafts/[0-9]+\\'" . mh-letter-mode)) + +;;;*** + +;;;### (autoloads (mh-version mh-nmail mh-rmail) "mh-e" "mh-e/mh-e.el" +;;;;;; (16211 27037)) +;;; Generated autoloads from mh-e/mh-e.el + +(autoload (quote mh-rmail) "mh-e" "\ +Inc(orporate) new mail with MH. +Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E, +the Emacs front end to the MH mail system. + +\(fn &optional ARG)" t nil) + +(autoload (quote mh-nmail) "mh-e" "\ +Check for new mail in inbox folder. +Scan an MH folder if ARG is non-nil. This function is an entry point to MH-E, +the Emacs front end to the MH mail system. + +\(fn &optional ARG)" t nil) + +(autoload (quote mh-version) "mh-e" "\ +Display version information about MH-E and the MH mail handling system. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "mh-utils" "mh-e/mh-utils.el" (16211 27037)) +;;; Generated autoloads from mh-e/mh-utils.el + +(put (quote mh-progs) (quote risky-local-variable) t) + +(put (quote mh-lib) (quote risky-local-variable) t) + +(put (quote mh-lib-progs) (quote risky-local-variable) t) + +(put (quote mh-nmh-flag) (quote risky-local-variable) t) + +;;;*** + +;;;### (autoloads (midnight-delay-set clean-buffer-list) "midnight" +;;;;;; "midnight.el" (16211 27017)) +;;; Generated autoloads from midnight.el + +(autoload (quote clean-buffer-list) "midnight" "\ +Kill old buffers that have not been displayed recently. +The relevant variables are `clean-buffer-list-delay-general', +`clean-buffer-list-delay-special', `clean-buffer-list-kill-buffer-names', +`clean-buffer-list-kill-never-buffer-names', +`clean-buffer-list-kill-regexps' and +`clean-buffer-list-kill-never-regexps'. +While processing buffers, this procedure displays messages containing +the current date/time, buffer name, how many seconds ago it was +displayed (can be nil if the buffer was never displayed) and its +lifetime, i.e., its \"age\" when it will be purged. + +\(fn)" t nil) + +(autoload (quote midnight-delay-set) "midnight" "\ +Modify `midnight-timer' according to `midnight-delay'. +Sets the first argument SYMB (which must be symbol `midnight-delay') +to its second argument TM. + +\(fn SYMB TM)" nil nil) + +;;;*** + +;;;### (autoloads (minibuffer-electric-default-mode) "minibuf-eldef" +;;;;;; "minibuf-eldef.el" (16211 27017)) +;;; Generated autoloads from minibuf-eldef.el + +(defvar minibuffer-electric-default-mode nil "\ +Non-nil if Minibuffer-Electric-Default mode is enabled. +See the command `minibuffer-electric-default-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `minibuffer-electric-default-mode'.") + +(custom-autoload (quote minibuffer-electric-default-mode) "minibuf-eldef") + +(autoload (quote minibuffer-electric-default-mode) "minibuf-eldef" "\ +Toggle Minibuffer Electric Default mode. +When active, minibuffer prompts that show a default value only show the +default when it's applicable -- that is, when hitting RET would yield +the default value. If the user modifies the input such that hitting RET +would enter a non-default value, the prompt is modified to remove the +default indication. + +With prefix argument ARG, turn on if positive, otherwise off. +Returns non-nil if the new state is enabled. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (mixal-mode) "mixal-mode" "progmodes/mixal-mode.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/mixal-mode.el + +(autoload (quote mixal-mode) "mixal-mode" "\ +Major mode for the mixal asm language. +\\{mixal-mode-map} + +\(fn)" t nil) + +(add-to-list (quote auto-mode-alist) (quote ("\\.mixal\\'" . mixal-mode))) + +;;;*** + +;;;### (autoloads (malayalam-composition-function malayalam-post-read-conversion +;;;;;; malayalam-compose-region) "mlm-util" "language/mlm-util.el" +;;;;;; (16232 560)) +;;; Generated autoloads from language/mlm-util.el + +(autoload (quote malayalam-compose-region) "mlm-util" "\ +Not documented + +\(fn FROM TO)" t nil) + +(autoload (quote malayalam-post-read-conversion) "mlm-util" "\ +Not documented + +\(fn LEN)" nil nil) + +(autoload (quote malayalam-composition-function) "mlm-util" "\ +Compose Malayalam characters in REGION, or STRING if specified. +Assume that the REGION or STRING must fully match the composable +PATTERN regexp. + +\(fn FROM TO PATTERN &optional STRING)" nil nil) + +;;;*** + +;;;### (autoloads (mm-inline-partial) "mm-partial" "gnus/mm-partial.el" +;;;;;; (16211 27028)) +;;; Generated autoloads from gnus/mm-partial.el + +(autoload (quote mm-inline-partial) "mm-partial" "\ +Show the partial part of HANDLE. +This function replaces the buffer of HANDLE with a buffer contains +the entire message. +If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing. + +\(fn HANDLE &optional NO-DISPLAY)" nil nil) + +;;;*** + +;;;### (autoloads (mm-uu-test mm-uu-dissect) "mm-uu" "gnus/mm-uu.el" +;;;;;; (16211 27028)) +;;; Generated autoloads from gnus/mm-uu.el + +(autoload (quote mm-uu-dissect) "mm-uu" "\ +Dissect the current buffer and return a list of uu handles. + +\(fn)" nil nil) + +(autoload (quote mm-uu-test) "mm-uu" "\ +Check whether the current buffer contains uu stuff. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (modula-2-mode) "modula2" "progmodes/modula2.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/modula2.el + +(autoload (quote modula-2-mode) "modula2" "\ +This is a mode intended to support program development in Modula-2. +All control constructs of Modula-2 can be reached by typing C-c +followed by the first character of the construct. +\\ + \\[m2-begin] begin \\[m2-case] case + \\[m2-definition] definition \\[m2-else] else + \\[m2-for] for \\[m2-header] header + \\[m2-if] if \\[m2-module] module + \\[m2-loop] loop \\[m2-or] or + \\[m2-procedure] procedure Control-c Control-w with + \\[m2-record] record \\[m2-stdio] stdio + \\[m2-type] type \\[m2-until] until + \\[m2-var] var \\[m2-while] while + \\[m2-export] export \\[m2-import] import + \\[m2-begin-comment] begin-comment \\[m2-end-comment] end-comment + \\[suspend-emacs] suspend Emacs \\[m2-toggle] toggle + \\[m2-compile] compile \\[m2-next-error] next-error + \\[m2-link] link + + `m2-indent' controls the number of spaces for each indentation. + `m2-compile-command' holds the command to compile a Modula-2 program. + `m2-link-command' holds the command to link a Modula-2 program. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (unmorse-region morse-region) "morse" "play/morse.el" +;;;;;; (16211 27038)) +;;; Generated autoloads from play/morse.el + +(autoload (quote morse-region) "morse" "\ +Convert all text in a given region to morse code. + +\(fn BEG END)" t nil) + +(autoload (quote unmorse-region) "morse" "\ +Convert morse coded text in region to ordinary ASCII text. + +\(fn BEG END)" t nil) + +;;;*** + +;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (16211 +;;;;;; 27017)) +;;; Generated autoloads from mouse-sel.el + +(defvar mouse-sel-mode nil "\ +Non-nil if Mouse-Sel mode is enabled. +See the command `mouse-sel-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `mouse-sel-mode'.") + +(custom-autoload (quote mouse-sel-mode) "mouse-sel") + +(autoload (quote mouse-sel-mode) "mouse-sel" "\ +Toggle Mouse Sel mode. +With prefix ARG, turn Mouse Sel mode on if and only if ARG is positive. +Returns the new status of Mouse Sel mode (non-nil means on). + +When Mouse Sel mode is enabled, mouse selection is enhanced in various ways: + +- Clicking mouse-1 starts (cancels) selection, dragging extends it. + +- Clicking or dragging mouse-3 extends the selection as well. + +- Double-clicking on word constituents selects words. +Double-clicking on symbol constituents selects symbols. +Double-clicking on quotes or parentheses selects sexps. +Double-clicking on whitespace selects whitespace. +Triple-clicking selects lines. +Quad-clicking selects paragraphs. + +- Selecting sets the region & X primary selection, but does NOT affect +the `kill-ring', nor do the kill-ring functions change the X selection. +Because the mouse handlers set the primary selection directly, +mouse-sel sets the variables `interprogram-cut-function' and +`interprogram-paste-function' to nil. + +- Clicking mouse-2 inserts the contents of the primary selection at +the mouse position (or point, if `mouse-yank-at-point' is non-nil). + +- Pressing mouse-2 while selecting or extending copies selection +to the kill ring. Pressing mouse-1 or mouse-3 kills it. + +- Double-clicking mouse-3 also kills selection. + +- M-mouse-1, M-mouse-2 & M-mouse-3 work similarly to mouse-1, mouse-2 +& mouse-3, but operate on the X secondary selection rather than the +primary selection and region. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (16211 27038)) +;;; Generated autoloads from play/mpuz.el + +(autoload (quote mpuz) "mpuz" "\ +Multiplication puzzle with GNU Emacs. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (msb-mode) "msb" "msb.el" (16211 27017)) +;;; Generated autoloads from msb.el + +(defvar msb-mode nil "\ +Non-nil if Msb mode is enabled. +See the command `msb-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `msb-mode'.") + +(custom-autoload (quote msb-mode) "msb") + +(autoload (quote msb-mode) "msb" "\ +Toggle Msb mode. +With arg, turn Msb mode on if and only if arg is positive. +This mode overrides the binding(s) of `mouse-buffer-menu' to provide a +different buffer menu using the function `msb'. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (mule-diag list-input-methods list-fontsets describe-fontset +;;;;;; describe-font list-coding-categories list-coding-systems +;;;;;; describe-current-coding-system describe-current-coding-system-briefly +;;;;;; describe-coding-system describe-character-set list-charset-chars +;;;;;; read-charset list-character-sets) "mule-diag" "international/mule-diag.el" +;;;;;; (16259 31301)) +;;; Generated autoloads from international/mule-diag.el + +(defvar non-iso-charset-alist (\` ((mac-roman (ascii latin-iso8859-1 mule-unicode-2500-33ff mule-unicode-0100-24ff mule-unicode-e000-ffff) mac-roman-decoder ((0 255))) (viscii (ascii vietnamese-viscii-lower vietnamese-viscii-upper) viet-viscii-nonascii-translation-table ((0 255))) (vietnamese-tcvn (ascii vietnamese-viscii-lower vietnamese-viscii-upper) viet-tcvn-nonascii-translation-table ((0 255))) (koi8-r (ascii cyrillic-iso8859-5) cyrillic-koi8-r-nonascii-translation-table ((32 255))) (alternativnyj (ascii cyrillic-iso8859-5) cyrillic-alternativnyj-nonascii-translation-table ((32 255))) (koi8-u (ascii cyrillic-iso8859-5 mule-unicode-0100-24ff) cyrillic-koi8-u-nonascii-translation-table ((32 255))) (big5 (ascii chinese-big5-1 chinese-big5-2) decode-big5-char ((32 127) ((161 254) 64 126 161 254))) (sjis (ascii katakana-jisx0201 japanese-jisx0208) decode-sjis-char ((32 127 161 223) ((129 159 224 239) 64 126 128 252))))) "\ +Alist of charset names vs the corresponding information. +This is mis-named for historical reasons. The charsets are actually +non-built-in ones. They correspond to Emacs coding systems, not Emacs +charsets, i.e. what Emacs can read (or write) by mapping to (or +from) Emacs internal charsets that typically correspond to a limited +set of ISO charsets. + +Each element has the following format: + (CHARSET CHARSET-LIST TRANSLATION-METHOD [ CODE-RANGE ]) + +CHARSET is the name (symbol) of the charset. + +CHARSET-LIST is a list of Emacs charsets into which characters of +CHARSET are mapped. + +TRANSLATION-METHOD is a translation table (symbol) to translate a +character code of CHARSET to the corresponding Emacs character +code. It can also be a function to call with one argument, a +character code in CHARSET. + +CODE-RANGE specifies the valid code ranges of CHARSET. +It is a list of RANGEs, where each RANGE is of the form: + (FROM1 TO1 FROM2 TO2 ...) +or + ((FROM1-1 TO1-1 FROM1-2 TO1-2 ...) . (FROM2-1 TO2-1 FROM2-2 TO2-2 ...)) +In the first form, valid codes are between FROM1 and TO1, or FROM2 and +TO2, or... +The second form is used for 2-byte codes. The car part is the ranges +of the first byte, and the cdr part is the ranges of the second byte.") + +(autoload (quote list-character-sets) "mule-diag" "\ +Display a list of all character sets. + +The ID-NUM column contains a charset identification number for +internal Emacs use. + +The MULTIBYTE-FORM column contains the format of the buffer and string +multibyte sequence of characters in the charset using one to four +hexadecimal digits. + `xx' stands for any byte in the range 0..127. + `XX' stands for any byte in the range 160..255. + +The D column contains the dimension of this character set. The CH +column contains the number of characters in a block of this character +set. The FINAL-CHAR column contains an ISO-2022 to use +for designating this character set in ISO-2022-based coding systems. + +With prefix arg, the output format gets more cryptic, +but still shows the full information. + +\(fn ARG)" t nil) + +(autoload (quote read-charset) "mule-diag" "\ +Read a character set from the minibuffer, prompting with string PROMPT. +It must be an Emacs character set listed in the variable `charset-list' +or a non-ISO character set listed in the variable +`non-iso-charset-alist'. + +Optional arguments are DEFAULT-VALUE and INITIAL-INPUT. +DEFAULT-VALUE, if non-nil, is the default value. +INITIAL-INPUT, if non-nil, is a string inserted in the minibuffer initially. +See the documentation of the function `completing-read' for the +detailed meanings of these arguments. + +\(fn PROMPT &optional DEFAULT-VALUE INITIAL-INPUT)" nil nil) + +(autoload (quote list-charset-chars) "mule-diag" "\ +Display a list of characters in the specified character set. +This can list both Emacs `official' (ISO standard) charsets and the +characters encoded by various Emacs coding systems which correspond to +PC `codepages' and other coded character sets. See `non-iso-charset-alist'. + +\(fn CHARSET)" t nil) + +(autoload (quote describe-character-set) "mule-diag" "\ +Display information about built-in character set CHARSET. + +\(fn CHARSET)" t nil) + +(autoload (quote describe-coding-system) "mule-diag" "\ +Display information about CODING-SYSTEM. + +\(fn CODING-SYSTEM)" t nil) + +(autoload (quote describe-current-coding-system-briefly) "mule-diag" "\ +Display coding systems currently used in a brief format in echo area. + +The format is \"F[..],K[..],T[..],P>[..],P<[..], default F[..],P<[..],P<[..]\", +where mnemonics of the following coding systems come in this order +in place of `..': + `buffer-file-coding-system' (of the current buffer) + eol-type of `buffer-file-coding-system' (of the current buffer) + Value returned by `keyboard-coding-system' + eol-type of `keyboard-coding-system' + Value returned by `terminal-coding-system'. + eol-type of `terminal-coding-system' + `process-coding-system' for read (of the current buffer, if any) + eol-type of `process-coding-system' for read (of the current buffer, if any) + `process-coding-system' for write (of the current buffer, if any) + eol-type of `process-coding-system' for write (of the current buffer, if any) + `default-buffer-file-coding-system' + eol-type of `default-buffer-file-coding-system' + `default-process-coding-system' for read + eol-type of `default-process-coding-system' for read + `default-process-coding-system' for write + eol-type of `default-process-coding-system' + +\(fn)" t nil) + +(autoload (quote describe-current-coding-system) "mule-diag" "\ +Display coding systems currently used, in detail. + +\(fn)" t nil) + +(autoload (quote list-coding-systems) "mule-diag" "\ +Display a list of all coding systems. +This shows the mnemonic letter, name, and description of each coding system. + +With prefix arg, the output format gets more cryptic, +but still contains full information about each coding system. + +\(fn &optional ARG)" t nil) + +(autoload (quote list-coding-categories) "mule-diag" "\ +Display a list of all coding categories. + +\(fn)" nil nil) + +(autoload (quote describe-font) "mule-diag" "\ +Display information about fonts which partially match FONTNAME. + +\(fn FONTNAME)" t nil) + +(autoload (quote describe-fontset) "mule-diag" "\ +Display information about FONTSET. +This shows which font is used for which character(s). + +\(fn FONTSET)" t nil) + +(autoload (quote list-fontsets) "mule-diag" "\ +Display a list of all fontsets. +This shows the name, size, and style of each fontset. +With prefix arg, also list the fonts contained in each fontset; +see the function `describe-fontset' for the format of the list. + +\(fn ARG)" t nil) + +(autoload (quote list-input-methods) "mule-diag" "\ +Display information about all input methods. + +\(fn)" t nil) + +(autoload (quote mule-diag) "mule-diag" "\ +Display diagnosis of the multilingual environment (Mule). + +This shows various information related to the current multilingual +environment, including lists of input methods, coding systems, +character sets, and fontsets (if Emacs is running under a window +system which uses fontsets). + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (char-displayable-p detect-coding-with-language-environment +;;;;;; detect-coding-with-priority coding-system-equal coding-system-translation-table-for-encode +;;;;;; coding-system-translation-table-for-decode coding-system-pre-write-conversion +;;;;;; coding-system-post-read-conversion lookup-nested-alist set-nested-alist +;;;;;; truncate-string-to-width store-substring string-to-sequence) +;;;;;; "mule-util" "international/mule-util.el" (16211 37839)) +;;; Generated autoloads from international/mule-util.el + +(autoload (quote string-to-sequence) "mule-util" "\ +Convert STRING to a sequence of TYPE which contains characters in STRING. +TYPE should be `list' or `vector'. + +\(fn STRING TYPE)" nil nil) + +(make-obsolete (quote string-to-sequence) "use `string-to-list' or `string-to-vector'." "21.4") + +(defsubst string-to-list (string) "\ +Return a list of characters in STRING." (append string nil)) + +(defsubst string-to-vector (string) "\ +Return a vector of characters in STRING." (vconcat string)) + +(autoload (quote store-substring) "mule-util" "\ +Embed OBJ (string or character) at index IDX of STRING. + +\(fn STRING IDX OBJ)" nil nil) + +(autoload (quote truncate-string-to-width) "mule-util" "\ +Truncate string STR to end at column END-COLUMN. +The optional 3rd arg START-COLUMN, if non-nil, specifies the starting +column; that means to return the characters occupying columns +START-COLUMN ... END-COLUMN of STR. Both END-COLUMN and START-COLUMN +are specified in terms of character display width in the current +buffer; see also `char-width'. + +The optional 4th arg PADDING, if non-nil, specifies a padding +character (which should have a display width of 1) to add at the end +of the result if STR doesn't reach column END-COLUMN, or if END-COLUMN +comes in the middle of a character in STR. PADDING is also added at +the beginning of the result if column START-COLUMN appears in the +middle of a character in STR. + +If PADDING is nil, no padding is added in these cases, so +the resulting string may be narrower than END-COLUMN. + +If ELLIPSIS is non-nil, it should be a string which will replace the +end of STR (including any padding) if it extends beyond END-COLUMN, +unless the display width of STR is equal to or less than the display +width of ELLIPSIS. If it is non-nil and not a string, then ELLIPSIS +defaults to \"...\". + +\(fn STR END-COLUMN &optional START-COLUMN PADDING ELLIPSIS)" nil nil) + +(defalias (quote truncate-string) (quote truncate-string-to-width)) + +(make-obsolete (quote truncate-string) (quote truncate-string-to-width) "20.1") + +(defsubst nested-alist-p (obj) "\ +Return t if OBJ is a nested alist. + +Nested alist is a list of the form (ENTRY . BRANCHES), where ENTRY is +any Lisp object, and BRANCHES is a list of cons cells of the form +\(KEY-ELEMENT . NESTED-ALIST). + +You can use a nested alist to store any Lisp object (ENTRY) for a key +sequence KEYSEQ, where KEYSEQ is a sequence of KEY-ELEMENT. KEYSEQ +can be a string, a vector, or a list." (and obj (listp obj) (listp (cdr obj)))) + +(autoload (quote set-nested-alist) "mule-util" "\ +Set ENTRY for KEYSEQ in a nested alist ALIST. +Optional 4th arg LEN non-nil means the first LEN elements in KEYSEQ + is considered. +Optional argument BRANCHES if non-nil is branches for a keyseq +longer than KEYSEQ. +See the documentation of `nested-alist-p' for more detail. + +\(fn KEYSEQ ENTRY ALIST &optional LEN BRANCHES)" nil nil) + +(autoload (quote lookup-nested-alist) "mule-util" "\ +Look up key sequence KEYSEQ in nested alist ALIST. Return the definition. +Optional 1st argument LEN specifies the length of KEYSEQ. +Optional 2nd argument START specifies index of the starting key. +The returned value is normally a nested alist of which +car part is the entry for KEYSEQ. +If ALIST is not deep enough for KEYSEQ, return number which is + how many key elements at the front of KEYSEQ it takes + to reach a leaf in ALIST. +Optional 3rd argument NIL-FOR-TOO-LONG non-nil means return nil + even if ALIST is not deep enough. + +\(fn KEYSEQ ALIST &optional LEN START NIL-FOR-TOO-LONG)" nil nil) + +(autoload (quote coding-system-post-read-conversion) "mule-util" "\ +Return the value of CODING-SYSTEM's `post-read-conversion' property. + +\(fn CODING-SYSTEM)" nil nil) + +(autoload (quote coding-system-pre-write-conversion) "mule-util" "\ +Return the value of CODING-SYSTEM's `pre-write-conversion' property. + +\(fn CODING-SYSTEM)" nil nil) + +(autoload (quote coding-system-translation-table-for-decode) "mule-util" "\ +Return the value of CODING-SYSTEM's `translation-table-for-decode' property. + +\(fn CODING-SYSTEM)" nil nil) + +(autoload (quote coding-system-translation-table-for-encode) "mule-util" "\ +Return the value of CODING-SYSTEM's `translation-table-for-encode' property. + +\(fn CODING-SYSTEM)" nil nil) + +(autoload (quote coding-system-equal) "mule-util" "\ +Return t if and only if CODING-SYSTEM-1 and CODING-SYSTEM-2 are identical. +Two coding systems are identical if two symbols are equal +or one is an alias of the other. + +\(fn CODING-SYSTEM-1 CODING-SYSTEM-2)" nil nil) + +(autoload (quote detect-coding-with-priority) "mule-util" "\ +Detect a coding system of the text between FROM and TO with PRIORITY-LIST. +PRIORITY-LIST is an alist of coding categories vs the corresponding +coding systems ordered by priority. + +\(fn FROM TO PRIORITY-LIST)" nil (quote macro)) + +(autoload (quote detect-coding-with-language-environment) "mule-util" "\ +Detect a coding system of the text between FROM and TO with LANG-ENV. +The detection takes into account the coding system priorities for the +language environment LANG-ENV. + +\(fn FROM TO LANG-ENV)" nil nil) + +(autoload (quote char-displayable-p) "mule-util" "\ +Return non-nil if we should be able to display CHAR. +On a multi-font display, the test is only whether there is an +appropriate font from the selected frame's fontset to display CHAR's +charset in general. Since fonts may be specified on a per-character +basis, this may not be accurate. + +\(fn CHAR)" nil nil) + +;;;*** + +;;;### (autoloads (mwheel-install mouse-wheel-mode) "mwheel" "mwheel.el" +;;;;;; (16211 27017)) +;;; Generated autoloads from mwheel.el + +(defvar mouse-wheel-mode nil "\ +Non-nil if Mouse-Wheel mode is enabled. +See the command `mouse-wheel-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `mouse-wheel-mode'.") + +(custom-autoload (quote mouse-wheel-mode) "mwheel") + +(autoload (quote mouse-wheel-mode) "mwheel" "\ +Toggle mouse wheel support. +With prefix argument ARG, turn on if positive, otherwise off. +Returns non-nil if the new state is enabled. + +\(fn &optional ARG)" t nil) + +(autoload (quote mwheel-install) "mwheel" "\ +Enable mouse wheel support. + +\(fn &optional UNINSTALL)" nil nil) + +;;;*** + +;;;### (autoloads (network-connection network-connection-to-service +;;;;;; whois-reverse-lookup whois finger ftp dig dns-lookup-host +;;;;;; nslookup nslookup-host route arp netstat ipconfig ping traceroute) +;;;;;; "net-utils" "net/net-utils.el" (16211 27037)) +;;; Generated autoloads from net/net-utils.el + +(autoload (quote traceroute) "net-utils" "\ +Run traceroute program for TARGET. + +\(fn TARGET)" t nil) + +(autoload (quote ping) "net-utils" "\ +Ping HOST. +If your system's ping continues until interrupted, you can try setting +`ping-program-options'. + +\(fn HOST)" t nil) + +(autoload (quote ipconfig) "net-utils" "\ +Run ipconfig program. + +\(fn)" t nil) + +(defalias (quote ifconfig) (quote ipconfig)) + +(autoload (quote netstat) "net-utils" "\ +Run netstat program. + +\(fn)" t nil) + +(autoload (quote arp) "net-utils" "\ +Run the arp program. + +\(fn)" t nil) + +(autoload (quote route) "net-utils" "\ +Run the route program. + +\(fn)" t nil) + +(autoload (quote nslookup-host) "net-utils" "\ +Lookup the DNS information for HOST. + +\(fn HOST)" t nil) + +(autoload (quote nslookup) "net-utils" "\ +Run nslookup program. + +\(fn)" t nil) + +(autoload (quote dns-lookup-host) "net-utils" "\ +Lookup the DNS information for HOST (name or IP address). + +\(fn HOST)" t nil) + +(autoload (quote dig) "net-utils" "\ +Run dig program. + +\(fn HOST)" t nil) + +(autoload (quote ftp) "net-utils" "\ +Run ftp program. + +\(fn HOST)" t nil) + +(autoload (quote finger) "net-utils" "\ +Finger USER on HOST. + +\(fn USER HOST)" t nil) + +(autoload (quote whois) "net-utils" "\ +Send SEARCH-STRING to server defined by the `whois-server-name' variable. +If `whois-guess-server' is non-nil, then try to deduce the correct server +from SEARCH-STRING. With argument, prompt for whois server. + +\(fn ARG SEARCH-STRING)" t nil) + +(autoload (quote whois-reverse-lookup) "net-utils" "\ +Not documented + +\(fn)" t nil) + +(autoload (quote network-connection-to-service) "net-utils" "\ +Open a network connection to SERVICE on HOST. + +\(fn HOST SERVICE)" t nil) + +(autoload (quote network-connection) "net-utils" "\ +Open a network connection to HOST on PORT. + +\(fn HOST PORT)" t nil) + +;;;*** + +;;;### (autoloads (comment-indent-new-line comment-dwim comment-or-uncomment-region +;;;;;; comment-region uncomment-region comment-kill comment-set-column +;;;;;; comment-indent comment-indent-default comment-normalize-vars +;;;;;; comment-multi-line comment-padding comment-style comment-column) +;;;;;; "newcomment" "newcomment.el" (16281 48394)) +;;; Generated autoloads from newcomment.el + +(defalias (quote indent-for-comment) (quote comment-indent)) + +(defalias (quote set-comment-column) (quote comment-set-column)) + +(defalias (quote kill-comment) (quote comment-kill)) + +(defalias (quote indent-new-comment-line) (quote comment-indent-new-line)) + +(defvar comment-use-syntax (quote undecided) "\ +Non-nil if syntax-tables can be used instead of regexps. +Can also be `undecided' which means that a somewhat expensive test will +be used to try to determine whether syntax-tables should be trusted +to understand comments or not in the given buffer. +Major modes should set this variable.") + +(defvar comment-column 32 "\ +*Column to indent right-margin comments to. +Each mode establishes a different default value for this variable; you +can set the value for a particular mode using that mode's hook. +Comments might be indented to a value smaller than this in order +not to go beyond `comment-fill-column'.") + +(custom-autoload (quote comment-column) "newcomment") + +(defvar comment-start nil "\ +*String to insert to start a new comment, or nil if no comment syntax.") + +(defvar comment-start-skip nil "\ +*Regexp to match the start of a comment plus everything up to its body. +If there are any \\(...\\) pairs, the comment delimiter text is held to begin +at the place matched by the close of the first pair.") + +(defvar comment-end-skip nil "\ +Regexp to match the end of a comment plus everything up to its body.") + +(defvar comment-end "" "\ +*String to insert to end a new comment. +Should be an empty string if comments are terminated by end-of-line.") + +(defvar comment-indent-function (quote comment-indent-default) "\ +Function to compute desired indentation for a comment. +This function is called with no args with point at the beginning of +the comment's starting delimiter and should return either the desired +column indentation or nil. +If nil is returned, indentation is delegated to `indent-according-to-mode'.") + +(defvar comment-style (quote plain) "\ +*Style to be used for `comment-region'. +See `comment-styles' for a list of available styles.") + +(custom-autoload (quote comment-style) "newcomment") + +(defvar comment-padding " " "\ +Padding string that `comment-region' puts between comment chars and text. +Can also be an integer which will be automatically turned into a string +of the corresponding number of spaces. + +Extra spacing between the comment characters and the comment text +makes the comment easier to read. Default is 1. nil means 0.") + +(custom-autoload (quote comment-padding) "newcomment") + +(defvar comment-multi-line nil "\ +*Non-nil means \\[comment-indent-new-line] continues comments, with no new terminator or starter. +This is obsolete because you might as well use \\[newline-and-indent].") + +(custom-autoload (quote comment-multi-line) "newcomment") + +(autoload (quote comment-normalize-vars) "newcomment" "\ +Check and setup the variables needed by other commenting functions. +Functions autoloaded from newcomment.el, being entry points, should call +this function before any other, so the rest of the code can assume that +the variables are properly set. + +\(fn &optional NOERROR)" nil nil) + +(autoload (quote comment-indent-default) "newcomment" "\ +Default for `comment-indent-function'. + +\(fn)" nil nil) + +(autoload (quote comment-indent) "newcomment" "\ +Indent this line's comment to comment column, or insert an empty comment. +If CONTINUE is non-nil, use the `comment-continue' markers if any. + +\(fn &optional CONTINUE)" t nil) + +(autoload (quote comment-set-column) "newcomment" "\ +Set the comment column based on point. +With no ARG, set the comment column to the current column. +With just minus as arg, kill any comment on this line. +With any other arg, set comment column to indentation of the previous comment + and then align or create a comment on this line at that column. + +\(fn ARG)" t nil) + +(autoload (quote comment-kill) "newcomment" "\ +Kill the comment on this line, if any. +With prefix ARG, kill comments on that many lines starting with this one. + +\(fn ARG)" t nil) + +(autoload (quote uncomment-region) "newcomment" "\ +Uncomment each line in the BEG .. END region. +The numeric prefix ARG can specify a number of chars to remove from the +comment markers. + +\(fn BEG END &optional ARG)" t nil) + +(autoload (quote comment-region) "newcomment" "\ +Comment or uncomment each line in the region. +With just \\[universal-argument] prefix arg, uncomment each line in region BEG .. END. +Numeric prefix arg ARG means use ARG comment characters. +If ARG is negative, delete that many comment characters instead. +By default, comments start at the left margin, are terminated on each line, +even for syntax in which newline does not end the comment and blank lines +do not get comments. This can be changed with `comment-style'. + +The strings used as comment starts are built from +`comment-start' without trailing spaces and `comment-padding'. + +\(fn BEG END &optional ARG)" t nil) + +(autoload (quote comment-or-uncomment-region) "newcomment" "\ +Call `comment-region', unless the region only consists of comments, +in which case call `uncomment-region'. If a prefix arg is given, it +is passed on to the respective function. + +\(fn BEG END &optional ARG)" t nil) + +(autoload (quote comment-dwim) "newcomment" "\ +Call the comment command you want (Do What I Mean). +If the region is active and `transient-mark-mode' is on, call + `comment-region' (unless it only consists of comments, in which + case it calls `uncomment-region'). +Else, if the current line is empty, insert a comment and indent it. +Else if a prefix ARG is specified, call `comment-kill'. +Else, call `comment-indent'. + +\(fn ARG)" t nil) + +(autoload (quote comment-indent-new-line) "newcomment" "\ +Break line at point and indent, continuing comment if within one. +This indents the body of the continued comment +under the previous comment line. + +This command is intended for styles where you write a comment per line, +starting a new comment (and terminating it if necessary) on each line. +If you want to continue one comment across several lines, use \\[newline-and-indent]. + +If a fill column is specified, it overrides the use of the comment column +or comment indentation. + +The inserted newline is marked hard if variable `use-hard-newlines' is true, +unless optional argument SOFT is non-nil. + +\(fn &optional SOFT)" t nil) + +;;;*** + +;;;### (autoloads (nndoc-add-type) "nndoc" "gnus/nndoc.el" (16211 +;;;;;; 27028)) +;;; Generated autoloads from gnus/nndoc.el + +(autoload (quote nndoc-add-type) "nndoc" "\ +Add document DEFINITION to the list of nndoc document definitions. +If POSITION is nil or `last', the definition will be added +as the last checked definition, if t or `first', add as the +first definition, and if any other symbol, add after that +symbol in the alist. + +\(fn DEFINITION &optional POSITION)" nil nil) + +;;;*** + +;;;### (autoloads (nnfolder-generate-active-file) "nnfolder" "gnus/nnfolder.el" +;;;;;; (16211 27028)) +;;; Generated autoloads from gnus/nnfolder.el + +(autoload (quote nnfolder-generate-active-file) "nnfolder" "\ +Look for mbox folders in the nnfolder directory and make them into groups. +This command does not work if you use short group names. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (nnkiboze-generate-groups) "nnkiboze" "gnus/nnkiboze.el" +;;;;;; (16211 27028)) +;;; Generated autoloads from gnus/nnkiboze.el + +(autoload (quote nnkiboze-generate-groups) "nnkiboze" "\ +\"Usage: emacs -batch -l nnkiboze -f nnkiboze-generate-groups\". +Finds out what articles are to be part of the nnkiboze groups. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (nnml-generate-nov-databases) "nnml" "gnus/nnml.el" +;;;;;; (16211 27028)) +;;; Generated autoloads from gnus/nnml.el + +(autoload (quote nnml-generate-nov-databases) "nnml" "\ +Generate NOV databases in all nnml directories. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (nnsoup-revert-variables nnsoup-set-variables nnsoup-pack-replies) +;;;;;; "nnsoup" "gnus/nnsoup.el" (16211 27029)) +;;; Generated autoloads from gnus/nnsoup.el + +(autoload (quote nnsoup-pack-replies) "nnsoup" "\ +Make an outbound package of SOUP replies. + +\(fn)" t nil) + +(autoload (quote nnsoup-set-variables) "nnsoup" "\ +Use the SOUP methods for posting news and mailing mail. + +\(fn)" t nil) + +(autoload (quote nnsoup-revert-variables) "nnsoup" "\ +Revert posting and mailing methods to the standard Emacs methods. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (disable-command enable-command disabled-command-hook) +;;;;;; "novice" "novice.el" (16211 27017)) +;;; Generated autoloads from novice.el + +(defvar disabled-command-hook (quote disabled-command-hook) "\ +Function to call to handle disabled commands. +If nil, the feature is disabled, i.e., all commands work normally.") + +(autoload (quote disabled-command-hook) "novice" "\ +Not documented + +\(fn &rest IGNORE)" nil nil) + +(autoload (quote enable-command) "novice" "\ +Allow COMMAND to be executed without special confirmation from now on. +The user's .emacs file is altered so that this will apply +to future sessions. + +\(fn COMMAND)" t nil) + +(autoload (quote disable-command) "novice" "\ +Require special confirmation to execute COMMAND from now on. +The user's .emacs file is altered so that this will apply +to future sessions. + +\(fn COMMAND)" t nil) + +;;;*** + +;;;### (autoloads (nroff-mode) "nroff-mode" "textmodes/nroff-mode.el" +;;;;;; (16211 27044)) +;;; Generated autoloads from textmodes/nroff-mode.el + +(autoload (quote nroff-mode) "nroff-mode" "\ +Major mode for editing text intended for nroff to format. +\\{nroff-mode-map} +Turning on Nroff mode runs `text-mode-hook', then `nroff-mode-hook'. +Also, try `nroff-electric-mode', for automatically inserting +closing requests for requests that are used in matched pairs. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (octave-help) "octave-hlp" "progmodes/octave-hlp.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/octave-hlp.el + +(autoload (quote octave-help) "octave-hlp" "\ +Get help on Octave symbols from the Octave info files. +Look up KEY in the function, operator and variable indices of the files +specified by `octave-help-files'. +If KEY is not a string, prompt for it with completion. + +\(fn KEY)" t nil) + +;;;*** + +;;;### (autoloads (inferior-octave) "octave-inf" "progmodes/octave-inf.el" +;;;;;; (16288 23099)) +;;; Generated autoloads from progmodes/octave-inf.el + +(autoload (quote inferior-octave) "octave-inf" "\ +Run an inferior Octave process, I/O via `inferior-octave-buffer'. +This buffer is put in Inferior Octave mode. See `inferior-octave-mode'. + +Unless ARG is non-nil, switches to this buffer. + +The elements of the list `inferior-octave-startup-args' are sent as +command line arguments to the inferior Octave process on startup. + +Additional commands to be executed on startup can be provided either in +the file specified by `inferior-octave-startup-file' or by the default +startup file, `~/.emacs-octave'. + +\(fn &optional ARG)" t nil) + +(defalias (quote run-octave) (quote inferior-octave)) + +;;;*** + +;;;### (autoloads (octave-mode) "octave-mod" "progmodes/octave-mod.el" +;;;;;; (16281 48394)) +;;; Generated autoloads from progmodes/octave-mod.el + +(autoload (quote octave-mode) "octave-mod" "\ +Major mode for editing Octave code. + +This mode makes it easier to write Octave code by helping with +indentation, doing some of the typing for you (with Abbrev mode) and by +showing keywords, comments, strings, etc. in different faces (with +Font Lock mode on terminals that support it). + +Octave itself is a high-level language, primarily intended for numerical +computations. It provides a convenient command line interface for +solving linear and nonlinear problems numerically. Function definitions +can also be stored in files, and it can be used in a batch mode (which +is why you need this mode!). + +The latest released version of Octave is always available via anonymous +ftp from bevo.che.wisc.edu in the directory `/pub/octave'. Complete +source and binaries for several popular systems are available. + +Type \\[list-abbrevs] to display the built-in abbrevs for Octave keywords. + +Keybindings +=========== + +\\{octave-mode-map} + +Variables you can use to customize Octave mode +============================================== + +octave-auto-indent + Non-nil means indent current line after a semicolon or space. + Default is nil. + +octave-auto-newline + Non-nil means auto-insert a newline and indent after a semicolon. + Default is nil. + +octave-blink-matching-block + Non-nil means show matching begin of block when inserting a space, + newline or semicolon after an else or end keyword. Default is t. + +octave-block-offset + Extra indentation applied to statements in block structures. + Default is 2. + +octave-continuation-offset + Extra indentation applied to Octave continuation lines. + Default is 4. + +octave-continuation-string + String used for Octave continuation lines. + Default is a backslash. + +octave-mode-startup-message + nil means do not display the Octave mode startup message. + Default is t. + +octave-send-echo-input + Non-nil means always display `inferior-octave-buffer' after sending a + command to the inferior Octave process. + +octave-send-line-auto-forward + Non-nil means always go to the next unsent line of Octave code after + sending a line to the inferior Octave process. + +octave-send-echo-input + Non-nil means echo input sent to the inferior Octave process. + +Turning on Octave mode runs the hook `octave-mode-hook'. + +To begin using this mode for all `.m' files that you edit, add the +following lines to your `.emacs' file: + + (autoload 'octave-mode \"octave-mod\" nil t) + (setq auto-mode-alist + (cons '(\"\\\\.m$\" . octave-mode) auto-mode-alist)) + +To automatically turn on the abbrev, auto-fill and font-lock features, +add the following lines to your `.emacs' file as well: + + (add-hook 'octave-mode-hook + (lambda () + (abbrev-mode 1) + (auto-fill-mode 1) + (if (eq window-system 'x) + (font-lock-mode 1)))) + +To submit a problem report, enter \\[octave-submit-bug-report] from an Octave mode buffer. +This automatically sets up a mail buffer with version information +already added. You just need to add a description of the problem, +including a reproducible test case and send the message. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (edit-options list-options) "options" "obsolete/options.el" +;;;;;; (16211 27037)) +;;; Generated autoloads from obsolete/options.el + +(autoload (quote list-options) "options" "\ +Display a list of Emacs user options, with values and documentation. +It is now better to use Customize instead. + +\(fn)" t nil) + +(autoload (quote edit-options) "options" "\ +Edit a list of Emacs user option values. +Selects a buffer containing such a list, +in which there are commands to set the option values. +Type \\[describe-mode] in that buffer for a list of commands. + +The Custom feature is intended to make this obsolete. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (outline-minor-mode outline-mode) "outline" "outline.el" +;;;;;; (16211 27017)) +;;; Generated autoloads from outline.el + +(autoload (quote outline-mode) "outline" "\ +Set major mode for editing outlines with selective display. +Headings are lines which start with asterisks: one for major headings, +two for subheadings, etc. Lines not starting with asterisks are body lines. + +Body text or subheadings under a heading can be made temporarily +invisible, or visible again. Invisible lines are attached to the end +of the heading, so they move with it, if the line is killed and yanked +back. A heading with text hidden under it is marked with an ellipsis (...). + +Commands:\\ +\\[outline-next-visible-heading] outline-next-visible-heading move by visible headings +\\[outline-previous-visible-heading] outline-previous-visible-heading +\\[outline-forward-same-level] outline-forward-same-level similar but skip subheadings +\\[outline-backward-same-level] outline-backward-same-level +\\[outline-up-heading] outline-up-heading move from subheading to heading + +\\[hide-body] make all text invisible (not headings). +\\[show-all] make everything in buffer visible. +\\[hide-sublevels] make only the first N levels of headers visible. + +The remaining commands are used when point is on a heading line. +They apply to some of the body or subheadings of that heading. +\\[hide-subtree] hide-subtree make body and subheadings invisible. +\\[show-subtree] show-subtree make body and subheadings visible. +\\[show-children] show-children make direct subheadings visible. + No effect on body, or subheadings 2 or more levels down. + With arg N, affects subheadings N levels down. +\\[hide-entry] make immediately following body invisible. +\\[show-entry] make it visible. +\\[hide-leaves] make body under heading and under its subheadings invisible. + The subheadings remain visible. +\\[show-branches] make all subheadings at all levels visible. + +The variable `outline-regexp' can be changed to control what is a heading. +A line is a heading if `outline-regexp' matches something at the +beginning of the line. The longer the match, the deeper the level. + +Turning on outline mode calls the value of `text-mode-hook' and then of +`outline-mode-hook', if they are non-nil. + +\(fn)" t nil) + +(autoload (quote outline-minor-mode) "outline" "\ +Toggle Outline minor mode. +With arg, turn Outline minor mode on if arg is positive, off otherwise. +See the command `outline-mode' for more information on this mode. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (show-paren-mode) "paren" "paren.el" (16211 27017)) +;;; Generated autoloads from paren.el + +(defvar show-paren-mode nil "\ +Non-nil if Show-Paren mode is enabled. +See the command `show-paren-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `show-paren-mode'.") + +(custom-autoload (quote show-paren-mode) "paren") + +(autoload (quote show-paren-mode) "paren" "\ +Toggle Show Paren mode. +With prefix ARG, turn Show Paren mode on if and only if ARG is positive. +Returns the new status of Show Paren mode (non-nil means on). + +When Show Paren mode is enabled, any matching parenthesis is highlighted +in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (parse-time-string) "parse-time" "calendar/parse-time.el" +;;;;;; (16243 59668)) +;;; Generated autoloads from calendar/parse-time.el + +(autoload (quote parse-time-string) "parse-time" "\ +Parse the time-string STRING into (SEC MIN HOUR DAY MON YEAR DOW DST TZ). +The values are identical to those of `decode-time', but any values that are +unknown are returned as nil. + +\(fn STRING)" nil nil) + +;;;*** + +;;;### (autoloads (pascal-mode) "pascal" "progmodes/pascal.el" (16211 +;;;;;; 27039)) +;;; Generated autoloads from progmodes/pascal.el + +(autoload (quote pascal-mode) "pascal" "\ +Major mode for editing Pascal code. \\ +TAB indents for Pascal code. Delete converts tabs to spaces as it moves back. + +\\[pascal-complete-word] completes the word around current point with respect to position in code +\\[pascal-show-completions] shows all possible completions at this point. + +Other useful functions are: + +\\[pascal-mark-defun] - Mark function. +\\[pascal-insert-block] - insert begin ... end; +\\[pascal-star-comment] - insert (* ... *) +\\[pascal-comment-area] - Put marked area in a comment, fixing nested comments. +\\[pascal-uncomment-area] - Uncomment an area commented with \\[pascal-comment-area]. +\\[pascal-beg-of-defun] - Move to beginning of current function. +\\[pascal-end-of-defun] - Move to end of current function. +\\[pascal-goto-defun] - Goto function prompted for in the minibuffer. +\\[pascal-outline] - Enter pascal-outline-mode (see also pascal-outline). + +Variables controlling indentation/edit style: + + pascal-indent-level (default 3) + Indentation of Pascal statements with respect to containing block. + pascal-case-indent (default 2) + Indentation for case statements. + pascal-auto-newline (default nil) + Non-nil means automatically newline after semicolons and the punctuation + mark after an end. + pascal-indent-nested-functions (default t) + Non-nil means nested functions are indented. + pascal-tab-always-indent (default t) + Non-nil means TAB in Pascal mode should always reindent the current line, + regardless of where in the line point is when the TAB command is used. + pascal-auto-endcomments (default t) + Non-nil means a comment { ... } is set after the ends which ends cases and + functions. The name of the function or case will be set between the braces. + pascal-auto-lineup (default t) + List of contexts where auto lineup of :'s or ='s should be done. + +See also the user variables pascal-type-keywords, pascal-start-keywords and +pascal-separator-keywords. + +Turning on Pascal mode calls the value of the variable pascal-mode-hook with +no args, if that value is non-nil. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (pc-bindings-mode) "pc-mode" "emulation/pc-mode.el" +;;;;;; (16211 27026)) +;;; Generated autoloads from emulation/pc-mode.el + +(autoload (quote pc-bindings-mode) "pc-mode" "\ +Set up certain key bindings for PC compatibility. +The keys affected are: +Delete (and its variants) delete forward instead of backward. +C-Backspace kills backward a word (as C-Delete normally would). +M-Backspace does undo. +Home and End move to beginning and end of line +C-Home and C-End move to beginning and end of buffer. +C-Escape does list-buffers. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (pc-selection-mode pc-selection-mode) "pc-select" +;;;;;; "emulation/pc-select.el" (16211 27026)) +;;; Generated autoloads from emulation/pc-select.el + +(defvar pc-selection-mode nil "\ +Non-nil if Pc-Selection mode is enabled. +See the command `pc-selection-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `pc-selection-mode'.") + +(custom-autoload (quote pc-selection-mode) "pc-select") + +(autoload (quote pc-selection-mode) "pc-select" "\ +Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style. + +This mode enables Delete Selection mode and Transient Mark mode. + +The arrow keys (and others) are bound to new functions +which modify the status of the mark. + +The ordinary arrow keys disable the mark. +The shift-arrow keys move, leaving the mark behind. + +C-LEFT and C-RIGHT move back or forward one word, disabling the mark. +S-C-LEFT and S-C-RIGHT move back or forward one word, leaving the mark behind. + +M-LEFT and M-RIGHT move back or forward one word or sexp, disabling the mark. +S-M-LEFT and S-M-RIGHT move back or forward one word or sexp, leaving the mark +behind. To control whether these keys move word-wise or sexp-wise set the +variable `pc-select-meta-moves-sexps' after loading pc-select.el but before +turning `pc-selection-mode' on. + +C-DOWN and C-UP move back or forward a paragraph, disabling the mark. +S-C-DOWN and S-C-UP move back or forward a paragraph, leaving the mark behind. + +HOME moves to beginning of line, disabling the mark. +S-HOME moves to beginning of line, leaving the mark behind. +With Ctrl or Meta, these keys move to beginning of buffer instead. + +END moves to end of line, disabling the mark. +S-END moves to end of line, leaving the mark behind. +With Ctrl or Meta, these keys move to end of buffer instead. + +PRIOR or PAGE-UP scrolls and disables the mark. +S-PRIOR or S-PAGE-UP scrolls and leaves the mark behind. + +S-DELETE kills the region (`kill-region'). +S-INSERT yanks text from the kill ring (`yank'). +C-INSERT copies the region into the kill ring (`copy-region-as-kill'). + +In addition, certain other PC bindings are imitated (to avoid this, set +the variable `pc-select-selection-keys-only' to t after loading pc-select.el +but before calling `pc-selection-mode'): + + F6 other-window + DELETE delete-char + C-DELETE kill-line + M-DELETE kill-word + C-M-DELETE kill-sexp + C-BACKSPACE backward-kill-word + M-BACKSPACE undo + +\(fn &optional ARG)" t nil) + +(defvar pc-selection-mode nil "\ +Toggle PC Selection mode. +Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style, +and cursor movement commands. +This mode enables Delete Selection mode and Transient Mark mode. +You must modify via \\[customize] for this variable to have an effect.") + +(custom-autoload (quote pc-selection-mode) "pc-select") + +;;;*** + +;;;### (autoloads (pcomplete/cvs) "pcmpl-cvs" "pcmpl-cvs.el" (16211 +;;;;;; 27017)) +;;; Generated autoloads from pcmpl-cvs.el + +(autoload (quote pcomplete/cvs) "pcmpl-cvs" "\ +Completion rules for the `cvs' command. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (pcomplete/tar pcomplete/make pcomplete/bzip2 pcomplete/gzip) +;;;;;; "pcmpl-gnu" "pcmpl-gnu.el" (16211 27017)) +;;; Generated autoloads from pcmpl-gnu.el + +(autoload (quote pcomplete/gzip) "pcmpl-gnu" "\ +Completion for `gzip'. + +\(fn)" nil nil) + +(autoload (quote pcomplete/bzip2) "pcmpl-gnu" "\ +Completion for `bzip2'. + +\(fn)" nil nil) + +(autoload (quote pcomplete/make) "pcmpl-gnu" "\ +Completion for GNU `make'. + +\(fn)" nil nil) + +(autoload (quote pcomplete/tar) "pcmpl-gnu" "\ +Completion for the GNU tar utility. + +\(fn)" nil nil) + +(defalias (quote pcomplete/gdb) (quote pcomplete/xargs)) + +;;;*** + +;;;### (autoloads (pcomplete/mount pcomplete/umount pcomplete/kill) +;;;;;; "pcmpl-linux" "pcmpl-linux.el" (16211 27017)) +;;; Generated autoloads from pcmpl-linux.el + +(autoload (quote pcomplete/kill) "pcmpl-linux" "\ +Completion for GNU/Linux `kill', using /proc filesystem. + +\(fn)" nil nil) + +(autoload (quote pcomplete/umount) "pcmpl-linux" "\ +Completion for GNU/Linux `umount'. + +\(fn)" nil nil) + +(autoload (quote pcomplete/mount) "pcmpl-linux" "\ +Completion for GNU/Linux `mount'. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (16211 +;;;;;; 27017)) +;;; Generated autoloads from pcmpl-rpm.el + +(autoload (quote pcomplete/rpm) "pcmpl-rpm" "\ +Completion for RedHat's `rpm' command. +These rules were taken from the output of `rpm --help' on a RedHat 6.1 +system. They follow my interpretation of what followed, but since I'm +not a major rpm user/builder, please send me any corrections you find. +You can use \\[eshell-report-bug] to do so. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (pcomplete/chgrp pcomplete/chown pcomplete/which +;;;;;; pcomplete/xargs pcomplete/rm pcomplete/rmdir pcomplete/cd) +;;;;;; "pcmpl-unix" "pcmpl-unix.el" (16211 27017)) +;;; Generated autoloads from pcmpl-unix.el + +(autoload (quote pcomplete/cd) "pcmpl-unix" "\ +Completion for `cd'. + +\(fn)" nil nil) + +(defalias (quote pcomplete/pushd) (quote pcomplete/cd)) + +(autoload (quote pcomplete/rmdir) "pcmpl-unix" "\ +Completion for `rmdir'. + +\(fn)" nil nil) + +(autoload (quote pcomplete/rm) "pcmpl-unix" "\ +Completion for `rm'. + +\(fn)" nil nil) + +(autoload (quote pcomplete/xargs) "pcmpl-unix" "\ +Completion for `xargs'. + +\(fn)" nil nil) + +(defalias (quote pcomplete/time) (quote pcomplete/xargs)) + +(autoload (quote pcomplete/which) "pcmpl-unix" "\ +Completion for `which'. + +\(fn)" nil nil) + +(autoload (quote pcomplete/chown) "pcmpl-unix" "\ +Completion for the `chown' command. + +\(fn)" nil nil) + +(autoload (quote pcomplete/chgrp) "pcmpl-unix" "\ +Completion for the `chgrp' command. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (pcomplete-shell-setup pcomplete-comint-setup pcomplete-list +;;;;;; pcomplete-help pcomplete-expand pcomplete-continue pcomplete-expand-and-complete +;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (16211 +;;;;;; 27017)) +;;; Generated autoloads from pcomplete.el + +(autoload (quote pcomplete) "pcomplete" "\ +Support extensible programmable completion. +To use this function, just bind the TAB key to it, or add it to your +completion functions list (it should occur fairly early in the list). + +\(fn)" t nil) + +(autoload (quote pcomplete-reverse) "pcomplete" "\ +If cycling completion is in use, cycle backwards. + +\(fn)" t nil) + +(autoload (quote pcomplete-expand-and-complete) "pcomplete" "\ +Expand the textual value of the current argument. +This will modify the current buffer. + +\(fn)" t nil) + +(autoload (quote pcomplete-continue) "pcomplete" "\ +Complete without reference to any cycling completions. + +\(fn)" t nil) + +(autoload (quote pcomplete-expand) "pcomplete" "\ +Expand the textual value of the current argument. +This will modify the current buffer. + +\(fn)" t nil) + +(autoload (quote pcomplete-help) "pcomplete" "\ +Display any help information relative to the current argument. + +\(fn)" t nil) + +(autoload (quote pcomplete-list) "pcomplete" "\ +Show the list of possible completions for the current argument. + +\(fn)" t nil) + +(autoload (quote pcomplete-comint-setup) "pcomplete" "\ +Setup a comint buffer to use pcomplete. +COMPLETEF-SYM should be the symbol where the +dynamic-complete-functions are kept. For comint mode itself, this is +`comint-dynamic-complete-functions'. + +\(fn COMPLETEF-SYM)" nil nil) + +(autoload (quote pcomplete-shell-setup) "pcomplete" "\ +Setup shell-mode to use pcomplete. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (cvs-dired-use-hook cvs-dired-action cvs-status +;;;;;; cvs-update cvs-examine cvs-quickdir cvs-checkout) "pcvs" +;;;;;; "pcvs.el" (16248 17500)) +;;; Generated autoloads from pcvs.el + +(autoload (quote cvs-checkout) "pcvs" "\ +Run a 'cvs checkout MODULES' in DIR. +Feed the output to a *cvs* buffer, display it in the current window, +and run `cvs-mode' on it. + +With a prefix argument, prompt for cvs FLAGS to use. + +\(fn MODULES DIR FLAGS)" t nil) + +(autoload (quote cvs-quickdir) "pcvs" "\ +Open a *cvs* buffer on DIR without running cvs. +With a prefix argument, prompt for a directory to use. +A prefix arg >8 (ex: \\[universal-argument] \\[universal-argument]), + prevents reuse of an existing *cvs* buffer. +Optional argument NOSHOW if non-nil means not to display the buffer. +FLAGS is ignored. + +\(fn DIR &optional FLAGS NOSHOW)" t nil) + +(autoload (quote cvs-examine) "pcvs" "\ +Run a `cvs -n update' in the specified DIRECTORY. +That is, check what needs to be done, but don't change the disc. +Feed the output to a *cvs* buffer and run `cvs-mode' on it. +With a prefix argument, prompt for a directory and cvs FLAGS to use. +A prefix arg >8 (ex: \\[universal-argument] \\[universal-argument]), + prevents reuse of an existing *cvs* buffer. +Optional argument NOSHOW if non-nil means not to display the buffer. + +\(fn DIRECTORY FLAGS &optional NOSHOW)" t nil) + +(autoload (quote cvs-update) "pcvs" "\ +Run a `cvs update' in the current working DIRECTORY. +Feed the output to a *cvs* buffer and run `cvs-mode' on it. +With a \\[universal-argument] prefix argument, prompt for a directory to use. +A prefix arg >8 (ex: \\[universal-argument] \\[universal-argument]), + prevents reuse of an existing *cvs* buffer. +The prefix is also passed to `cvs-flags-query' to select the FLAGS + passed to cvs. + +\(fn DIRECTORY FLAGS)" t nil) + +(autoload (quote cvs-status) "pcvs" "\ +Run a `cvs status' in the current working DIRECTORY. +Feed the output to a *cvs* buffer and run `cvs-mode' on it. +With a prefix argument, prompt for a directory and cvs FLAGS to use. +A prefix arg >8 (ex: \\[universal-argument] \\[universal-argument]), + prevents reuse of an existing *cvs* buffer. +Optional argument NOSHOW if non-nil means not to display the buffer. + +\(fn DIRECTORY FLAGS &optional NOSHOW)" t nil) + +(add-to-list (quote completion-ignored-extensions) "CVS/") + +(defvar cvs-dired-action (quote cvs-quickdir) "\ +The action to be performed when opening a CVS directory. +Sensible values are `cvs-examine', `cvs-status' and `cvs-quickdir'.") + +(custom-autoload (quote cvs-dired-action) "pcvs") + +(defvar cvs-dired-use-hook (quote (4)) "\ +Whether or not opening a CVS directory should run PCL-CVS. +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.") + +(custom-autoload (quote cvs-dired-use-hook) "pcvs") + +(defun cvs-dired-noselect (dir) "\ +Run `cvs-examine' if DIR is a CVS administrative directory. +The exact behavior is determined also by `cvs-dired-use-hook'." (when (stringp dir) (setq dir (directory-file-name dir)) (when (and (string= "CVS" (file-name-nondirectory dir)) (file-readable-p (expand-file-name "Entries" dir)) cvs-dired-use-hook (if (eq cvs-dired-use-hook (quote always)) (not current-prefix-arg) (equal current-prefix-arg cvs-dired-use-hook))) (save-excursion (funcall cvs-dired-action (file-name-directory dir) t t))))) + +;;;*** + +;;;### (autoloads nil "pcvs-defs" "pcvs-defs.el" (16211 27018)) +;;; Generated autoloads from pcvs-defs.el + +(defvar cvs-global-menu (let ((m (make-sparse-keymap "PCL-CVS"))) (define-key m [status] (quote (menu-item "Directory Status" cvs-status :help "A more verbose status of a workarea"))) (define-key m [checkout] (quote (menu-item "Checkout Module" cvs-checkout :help "Check out a module from the repository"))) (define-key m [update] (quote (menu-item "Update Directory" cvs-update :help "Fetch updates from the repository"))) (define-key m [examine] (quote (menu-item "Examine Directory" cvs-examine :help "Examine the current state of a workarea"))) (fset (quote cvs-global-menu) m))) + +;;;*** + +;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/perl-mode.el + +(autoload (quote perl-mode) "perl-mode" "\ +Major mode for editing Perl code. +Expression and list commands understand all Perl brackets. +Tab indents for Perl code. +Comments are delimited with # ... \\n. +Paragraphs are separated by blank lines only. +Delete converts tabs to spaces as it moves back. +\\{perl-mode-map} +Variables controlling indentation style: + `perl-tab-always-indent' + Non-nil means TAB in Perl mode should always indent the current line, + regardless of where in the line point is when the TAB command is used. + `perl-tab-to-comment' + Non-nil means that for lines which don't need indenting, TAB will + either delete an empty comment, indent an existing comment, move + to end-of-line, or if at end-of-line already, create a new comment. + `perl-nochange' + Lines starting with this regular expression are not auto-indented. + `perl-indent-level' + Indentation of Perl statements within surrounding block. + The surrounding block's indentation is the indentation + of the line on which the open-brace appears. + `perl-continued-statement-offset' + Extra indentation given to a substatement, such as the + then-clause of an if or body of a while. + `perl-continued-brace-offset' + Extra indentation given to a brace that starts a substatement. + This is in addition to `perl-continued-statement-offset'. + `perl-brace-offset' + Extra indentation for line if it starts with an open brace. + `perl-brace-imaginary-offset' + An open brace following other text is treated as if it were + this far to the right of the start of its line. + `perl-label-offset' + Extra indentation for line that is a label. + `perl-indent-continued-arguments' + Offset of argument lines relative to usual indentation. + +Various indentation styles: K&R BSD BLK GNU LW + perl-indent-level 5 8 0 2 4 + perl-continued-statement-offset 5 8 4 2 4 + perl-continued-brace-offset 0 0 0 0 -4 + perl-brace-offset -5 -8 0 0 0 + perl-brace-imaginary-offset 0 0 4 0 0 + perl-label-offset -5 -8 -2 -2 -2 + +Turning on Perl mode runs the normal hook `perl-mode-hook'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (picture-mode) "picture" "textmodes/picture.el" +;;;;;; (16211 27044)) +;;; Generated autoloads from textmodes/picture.el + +(autoload (quote picture-mode) "picture" "\ +Switch to Picture mode, in which a quarter-plane screen model is used. +Printing characters replace instead of inserting themselves with motion +afterwards settable by these commands: + C-c < Move left after insertion. + C-c > Move right after insertion. + C-c ^ Move up after insertion. + C-c . Move down after insertion. + C-c ` Move northwest (nw) after insertion. + C-c ' Move northeast (ne) after insertion. + C-c / Move southwest (sw) after insertion. + C-c \\ Move southeast (se) after insertion. + C-u C-c ` Move westnorthwest (wnw) after insertion. + C-u C-c ' Move eastnortheast (ene) after insertion. + C-u C-c / Move westsouthwest (wsw) after insertion. + C-u C-c \\ Move eastsoutheast (ese) after insertion. +The current direction is displayed in the mode line. The initial +direction is right. Whitespace is inserted and tabs are changed to +spaces when required by movement. You can move around in the buffer +with these commands: + \\[picture-move-down] Move vertically to SAME column in previous line. + \\[picture-move-up] Move vertically to SAME column in next line. + \\[picture-end-of-line] Move to column following last non-whitespace character. + \\[picture-forward-column] Move right inserting spaces if required. + \\[picture-backward-column] Move left changing tabs to spaces if required. + C-c C-f Move in direction of current picture motion. + C-c C-b Move in opposite direction of current picture motion. + Return Move to beginning of next line. +You can edit tabular text with these commands: + M-Tab Move to column beneath (or at) next interesting character. + `Indents' relative to a previous line. + Tab Move to next stop in tab stop list. + C-c Tab Set tab stops according to context of this line. + With ARG resets tab stops to default (global) value. + See also documentation of variable picture-tab-chars + which defines \"interesting character\". You can manually + change the tab stop list with command \\[edit-tab-stops]. +You can manipulate text with these commands: + C-d Clear (replace) ARG columns after point without moving. + C-c C-d Delete char at point - the command normally assigned to C-d. + \\[picture-backward-clear-column] Clear (replace) ARG columns before point, moving back over them. + \\[picture-clear-line] Clear ARG lines, advancing over them. The cleared + text is saved in the kill ring. + \\[picture-open-line] Open blank line(s) beneath current line. +You can manipulate rectangles with these commands: + C-c C-k Clear (or kill) a rectangle and save it. + C-c C-w Like C-c C-k except rectangle is saved in named register. + C-c C-y Overlay (or insert) currently saved rectangle at point. + C-c C-x Like C-c C-y except rectangle is taken from named register. + C-c C-r Draw a rectangular box around mark and point. + \\[copy-rectangle-to-register] Copies a rectangle to a register. + \\[advertised-undo] Can undo effects of rectangle overlay commands + commands if invoked soon enough. +You can return to the previous mode with: + C-c C-c Which also strips trailing whitespace from every line. + Stripping is suppressed by supplying an argument. + +Entry to this mode calls the value of `picture-mode-hook' if non-nil. + +Note that Picture mode commands will work outside of Picture mode, but +they are not defaultly assigned to keys. + +\(fn)" t nil) + +(defalias (quote edit-picture) (quote picture-mode)) + +;;;*** + +;;;### (autoloads (po-find-file-coding-system) "po" "textmodes/po.el" +;;;;;; (16211 27044)) +;;; Generated autoloads from textmodes/po.el + +(autoload (quote po-find-file-coding-system) "po" "\ +Return a (DECODING . ENCODING) pair, according to PO file's charset. +Called through `file-coding-system-alist', before the file is visited for real. + +\(fn ARG-LIST)" nil nil) + +;;;*** + +;;;### (autoloads (pong) "pong" "play/pong.el" (16211 27038)) +;;; Generated autoloads from play/pong.el + +(autoload (quote pong) "pong" "\ +Play pong and waste time. +This is an implementation of the classical game pong. +Move left and right bats and try to bounce the ball to your opponent. + +pong-mode keybindings:\\ + +\\{pong-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (pp-eval-last-sexp pp-eval-expression pp pp-to-string) +;;;;;; "pp" "emacs-lisp/pp.el" (16211 27026)) +;;; Generated autoloads from emacs-lisp/pp.el + +(autoload (quote pp-to-string) "pp" "\ +Return a string containing the pretty-printed representation of OBJECT. +OBJECT can be any Lisp object. Quoting characters are used as needed +to make output that `read' can handle, whenever this is possible. + +\(fn OBJECT)" nil nil) + +(autoload (quote pp) "pp" "\ +Output the pretty-printed representation of OBJECT, any Lisp object. +Quoting characters are printed as needed to make output that `read' +can handle, whenever this is possible. +Output stream is STREAM, or value of `standard-output' (which see). + +\(fn OBJECT &optional STREAM)" nil nil) + +(autoload (quote pp-eval-expression) "pp" "\ +Evaluate EXPRESSION and pretty-print value into a new display buffer. +If the pretty-printed value fits on one line, the message line is used +instead. The value is also consed onto the front of the list +in the variable `values'. + +\(fn EXPRESSION)" t nil) + +(autoload (quote pp-eval-last-sexp) "pp" "\ +Run `pp-eval-expression' on sexp before point (which see). +With argument, pretty-print output into current buffer. +Ignores leading comment characters. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (pr-txt-fast-fire pr-ps-fast-fire pr-show-lpr-setup +;;;;;; pr-show-pr-setup pr-show-ps-setup pr-ps-utility pr-txt-name +;;;;;; pr-ps-name pr-help lpr-customize pr-customize pr-toggle-mode +;;;;;; pr-toggle-region pr-toggle-lock pr-toggle-header-frame pr-toggle-header +;;;;;; pr-toggle-zebra pr-toggle-line pr-toggle-upside-down pr-toggle-landscape +;;;;;; pr-toggle-tumble pr-toggle-duplex pr-toggle-spool pr-toggle-faces +;;;;;; pr-toggle-ghostscript pr-toggle-file-landscape pr-toggle-file-tumble +;;;;;; pr-toggle-file-duplex pr-ps-file-up-ps-print pr-ps-file-ps-print +;;;;;; pr-ps-file-print pr-ps-file-using-ghostscript pr-ps-file-up-preview +;;;;;; pr-ps-file-preview pr-despool-ps-print pr-despool-print pr-despool-using-ghostscript +;;;;;; pr-despool-preview pr-txt-mode pr-txt-region pr-txt-buffer +;;;;;; pr-txt-directory pr-printify-region pr-printify-buffer pr-printify-directory +;;;;;; pr-ps-mode-ps-print pr-ps-mode-print pr-ps-mode-using-ghostscript +;;;;;; pr-ps-mode-preview pr-ps-region-ps-print pr-ps-region-print +;;;;;; pr-ps-region-using-ghostscript pr-ps-region-preview pr-ps-buffer-ps-print +;;;;;; pr-ps-buffer-print pr-ps-buffer-using-ghostscript pr-ps-buffer-preview +;;;;;; pr-ps-directory-ps-print pr-ps-directory-print pr-ps-directory-using-ghostscript +;;;;;; pr-ps-directory-preview pr-interface) "printing" "printing.el" +;;;;;; (16211 27018)) +;;; Generated autoloads from printing.el + +(autoload (quote pr-interface) "printing" "\ +Activate the printing interface buffer. + +If BUFFER is nil, it uses the current buffer for printing. + +For more informations, type \\[pr-interface-help]. + +\(fn &optional BUFFER)" t nil) + +(autoload (quote pr-ps-directory-preview) "printing" "\ +Preview directory using ghostview. + +Interactively, the command prompts for N-UP printing number, a directory, a +file name regexp for matching and, when you use a prefix argument (C-u), the +command prompts the user for a file name, and saves the PostScript image in +that file instead of saving it in a temporary file. + +Noninteractively, if N-UP is nil, prompts for N-UP printing number. If DIR is +nil, prompts for DIRectory. If FILE-REGEXP is nil, prompts for +FILE(name)-REGEXP. The argument FILENAME is treated as follows: if it's nil, +save the image in a temporary file. If FILENAME is a string, save the +PostScript image in a file with that name. If FILENAME is t, prompts for a +file name. + +See also documentation for `pr-list-directory'. + +\(fn N-UP DIR FILE-REGEXP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-directory-using-ghostscript) "printing" "\ +Print directory using PostScript through ghostscript. + +Interactively, the command prompts for N-UP printing number, a directory, a +file name regexp for matching and, when you use a prefix argument (C-u), the +command prompts the user for a file name, and saves the PostScript image in +that file instead of saving it in a temporary file. + +Noninteractively, if N-UP is nil, prompts for N-UP printing number. If DIR is +nil, prompts for DIRectory. If FILE-REGEXP is nil, prompts for +FILE(name)-REGEXP. The argument FILENAME is treated as follows: if it's nil, +save the image in a temporary file. If FILENAME is a string, save the +PostScript image in a file with that name. If FILENAME is t, prompts for a +file name. + +See also documentation for `pr-list-directory'. + +\(fn N-UP DIR FILE-REGEXP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-directory-print) "printing" "\ +Print directory using PostScript printer. + +Interactively, the command prompts for N-UP printing number, a directory, a +file name regexp for matching and, when you use a prefix argument (C-u), the +command prompts the user for a file name, and saves the PostScript image in +that file instead of saving it in a temporary file. + +Noninteractively, if N-UP is nil, prompts for N-UP printing number. If DIR is +nil, prompts for DIRectory. If FILE-REGEXP is nil, prompts for +FILE(name)-REGEXP. The argument FILENAME is treated as follows: if it's nil, +save the image in a temporary file. If FILENAME is a string, save the +PostScript image in a file with that name. If FILENAME is t, prompts for a +file name. + +See also documentation for `pr-list-directory'. + +\(fn N-UP DIR FILE-REGEXP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-directory-ps-print) "printing" "\ +Print directory using PostScript printer or through ghostscript. + +It depends on `pr-print-using-ghostscript'. + +Interactively, the command prompts for N-UP printing number, a directory, a +file name regexp for matching and, when you use a prefix argument (C-u), the +command prompts the user for a file name, and saves the PostScript image in +that file instead of saving it in a temporary file. + +Noninteractively, if N-UP is nil, prompts for N-UP printing number. If DIR is +nil, prompts for DIRectory. If FILE-REGEXP is nil, prompts for +FILE(name)-REGEXP. The argument FILENAME is treated as follows: if it's nil, +save the image in a temporary file. If FILENAME is a string, save the +PostScript image in a file with that name. If FILENAME is t, prompts for a +file name. + +See also documentation for `pr-list-directory'. + +\(fn N-UP DIR FILE-REGEXP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-buffer-preview) "printing" "\ +Preview buffer using ghostview. + +Interactively, the command prompts for N-UP printing number and, when you use a +prefix argument (C-u), the command prompts the user for a file name, and saves +the PostScript image in that file instead of saving it in a temporary file. + +Noninteractively, if N-UP is nil, prompts for N-UP printing number. The +argument FILENAME is treated as follows: if it's nil, save the image in a +temporary file. If FILENAME is a string, save the PostScript image in a file +with that name. If FILENAME is t, prompts for a file name. + +\(fn N-UP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-buffer-using-ghostscript) "printing" "\ +Print buffer using PostScript through ghostscript. + +Interactively, the command prompts for N-UP printing number and, when you use a +prefix argument (C-u), the command prompts the user for a file name, and saves +the PostScript image in that file instead of sending it to the printer. + +Noninteractively, if N-UP is nil, prompts for N-UP printing number. The +argument FILENAME is treated as follows: if it's nil, send the image to the +printer. If FILENAME is a string, save the PostScript image in a file with +that name. If FILENAME is t, prompts for a file name. + +\(fn N-UP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-buffer-print) "printing" "\ +Print buffer using PostScript printer. + +Interactively, the command prompts for N-UP printing number and, when you use a +prefix argument (C-u), the command prompts the user for a file name, and saves +the PostScript image in that file instead of sending it to the printer. + +Noninteractively, if N-UP is nil, prompts for N-UP printing number. The +argument FILENAME is treated as follows: if it's nil, send the image to the +printer. If FILENAME is a string, save the PostScript image in a file with +that name. If FILENAME is t, prompts for a file name. + +\(fn N-UP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-buffer-ps-print) "printing" "\ +Print buffer using PostScript printer or through ghostscript. + +It depends on `pr-print-using-ghostscript'. + +Interactively, the command prompts for N-UP printing number and, when you use a +prefix argument (C-u), the command prompts the user for a file name, and saves +the PostScript image in that file instead of sending it to the printer. + +Noninteractively, if N-UP is nil, prompts for N-UP printing number. The +argument FILENAME is treated as follows: if it's nil, send the image to the +printer. If FILENAME is a string, save the PostScript image in a file with +that name. If FILENAME is t, prompts for a file name. + +\(fn N-UP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-region-preview) "printing" "\ +Preview region using ghostview. + +See also `pr-ps-buffer-preview'. + +\(fn N-UP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-region-using-ghostscript) "printing" "\ +Print region using PostScript through ghostscript. + +See also `pr-ps-buffer-using-ghostscript'. + +\(fn N-UP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-region-print) "printing" "\ +Print region using PostScript printer. + +See also `pr-ps-buffer-print'. + +\(fn N-UP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-region-ps-print) "printing" "\ +Print region using PostScript printer or through ghostscript. + +See also `pr-ps-buffer-ps-print'. + +\(fn N-UP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-mode-preview) "printing" "\ +Preview major mode using ghostview. + +See also `pr-ps-buffer-preview'. + +\(fn N-UP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-mode-using-ghostscript) "printing" "\ +Print major mode using PostScript through ghostscript. + +See also `pr-ps-buffer-using-ghostscript'. + +\(fn N-UP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-mode-print) "printing" "\ +Print major mode using PostScript printer. + +See also `pr-ps-buffer-print'. + +\(fn N-UP &optional FILENAME)" t nil) + +(autoload (quote pr-ps-mode-ps-print) "printing" "\ +Print major mode using PostScript or through ghostscript. + +See also `pr-ps-buffer-ps-print'. + +\(fn N-UP &optional FILENAME)" t nil) + +(autoload (quote pr-printify-directory) "printing" "\ +Replace nonprinting characters in directory with printable representations. +The printable representations use ^ (for ASCII control characters) or hex. +The characters tab, linefeed, space, return and formfeed are not affected. + +Interactively, the command prompts for a directory and a file name regexp for +matching. + +Noninteractively, if DIR is nil, prompts for DIRectory. If FILE-REGEXP is nil, +prompts for FILE(name)-REGEXP. + +See also documentation for `pr-list-directory'. + +\(fn &optional DIR FILE-REGEXP)" t nil) + +(autoload (quote pr-printify-buffer) "printing" "\ +Replace nonprinting characters in buffer with printable representations. +The printable representations use ^ (for ASCII control characters) or hex. +The characters tab, linefeed, space, return and formfeed are not affected. + +\(fn)" t nil) + +(autoload (quote pr-printify-region) "printing" "\ +Replace nonprinting characters in region with printable representations. +The printable representations use ^ (for ASCII control characters) or hex. +The characters tab, linefeed, space, return and formfeed are not affected. + +\(fn)" t nil) + +(autoload (quote pr-txt-directory) "printing" "\ +Print directory using text printer. + +Interactively, the command prompts for a directory and a file name regexp for +matching. + +Noninteractively, if DIR is nil, prompts for DIRectory. If FILE-REGEXP is nil, +prompts for FILE(name)-REGEXP. + +See also documentation for `pr-list-directory'. + +\(fn &optional DIR FILE-REGEXP)" t nil) + +(autoload (quote pr-txt-buffer) "printing" "\ +Print buffer using text printer. + +\(fn)" t nil) + +(autoload (quote pr-txt-region) "printing" "\ +Print region using text printer. + +\(fn)" t nil) + +(autoload (quote pr-txt-mode) "printing" "\ +Print major mode using text printer. + +\(fn)" t nil) + +(autoload (quote pr-despool-preview) "printing" "\ +Preview spooled PostScript. + +Interactively, when you use a prefix argument (C-u), the command prompts the +user for a file name, and saves the spooled PostScript image in that file +instead of saving it in a temporary file. + +Noninteractively, the argument FILENAME is treated as follows: if it is nil, +save the image in a temporary file. If FILENAME is a string, save the +PostScript image in a file with that name. + +\(fn &optional FILENAME)" t nil) + +(autoload (quote pr-despool-using-ghostscript) "printing" "\ +Print spooled PostScript using ghostscript. + +Interactively, when you use a prefix argument (C-u), the command prompts the +user for a file name, and saves the spooled PostScript image in that file +instead of sending it to the printer. + +Noninteractively, the argument FILENAME is treated as follows: if it is nil, +send the image to the printer. If FILENAME is a string, save the PostScript +image in a file with that name. + +\(fn &optional FILENAME)" t nil) + +(autoload (quote pr-despool-print) "printing" "\ +Send the spooled PostScript to the printer. + +Interactively, when you use a prefix argument (C-u), the command prompts the +user for a file name, and saves the spooled PostScript image in that file +instead of sending it to the printer. + +Noninteractively, the argument FILENAME is treated as follows: if it is nil, +send the image to the printer. If FILENAME is a string, save the PostScript +image in a file with that name. + +\(fn &optional FILENAME)" t nil) + +(autoload (quote pr-despool-ps-print) "printing" "\ +Send the spooled PostScript to the printer or use ghostscript to print it. + +Interactively, when you use a prefix argument (C-u), the command prompts the +user for a file name, and saves the spooled PostScript image in that file +instead of sending it to the printer. + +Noninteractively, the argument FILENAME is treated as follows: if it is nil, +send the image to the printer. If FILENAME is a string, save the PostScript +image in a file with that name. + +\(fn &optional FILENAME)" t nil) + +(autoload (quote pr-ps-file-preview) "printing" "\ +Preview PostScript file FILENAME. + +\(fn FILENAME)" t nil) + +(autoload (quote pr-ps-file-up-preview) "printing" "\ +Preview PostScript file FILENAME. + +\(fn N-UP IFILENAME &optional OFILENAME)" t nil) + +(autoload (quote pr-ps-file-using-ghostscript) "printing" "\ +Print PostScript file FILENAME using ghostscript. + +\(fn FILENAME)" t nil) + +(autoload (quote pr-ps-file-print) "printing" "\ +Print PostScript file FILENAME. + +\(fn FILENAME)" t nil) + +(autoload (quote pr-ps-file-ps-print) "printing" "\ +Send PostScript file FILENAME to printer or use ghostscript to print it. + +\(fn FILENAME)" t nil) + +(autoload (quote pr-ps-file-up-ps-print) "printing" "\ +Process a PostScript file IFILENAME and send it to printer. + +Interactively, the command prompts for N-UP printing number, for an input +PostScript file IFILENAME and, when you use a prefix argument (C-u), the +command prompts the user for an output PostScript file name OFILENAME, and +saves the PostScript image in that file instead of sending it to the printer. + +Noninteractively, if N-UP is nil, prompts for N-UP printing number. The +argument IFILENAME is treated as follows: if it's t, prompts for an input +PostScript file name; otherwise, it *must* be a string that it's an input +PostScript file name. The argument OFILENAME is treated as follows: if it's +nil, send the image to the printer. If OFILENAME is a string, save the +PostScript image in a file with that name. If OFILENAME is t, prompts for a +file name. + +\(fn N-UP IFILENAME &optional OFILENAME)" t nil) + +(autoload (quote pr-toggle-file-duplex) "printing" "\ +Toggle duplex for PostScript file. + +\(fn)" t nil) + +(autoload (quote pr-toggle-file-tumble) "printing" "\ +Toggle tumble for PostScript file. + +If tumble is off, produces a printing suitable for binding on the left or +right. +If tumble is on, produces a printing suitable for binding at the top or +bottom. + +\(fn)" t nil) + +(autoload (quote pr-toggle-file-landscape) "printing" "\ +Toggle landscape for PostScript file. + +\(fn)" t nil) + +(autoload (quote pr-toggle-ghostscript) "printing" "\ +Toggle printing using ghostscript. + +\(fn)" t nil) + +(autoload (quote pr-toggle-faces) "printing" "\ +Toggle printing with faces. + +\(fn)" t nil) + +(autoload (quote pr-toggle-spool) "printing" "\ +Toggle spooling. + +\(fn)" t nil) + +(autoload (quote pr-toggle-duplex) "printing" "\ +Toggle duplex. + +\(fn)" t nil) + +(autoload (quote pr-toggle-tumble) "printing" "\ +Toggle tumble. + +If tumble is off, produces a printing suitable for binding on the left or +right. +If tumble is on, produces a printing suitable for binding at the top or +bottom. + +\(fn)" t nil) + +(autoload (quote pr-toggle-landscape) "printing" "\ +Toggle landscape. + +\(fn)" t nil) + +(autoload (quote pr-toggle-upside-down) "printing" "\ +Toggle upside-down. + +\(fn)" t nil) + +(autoload (quote pr-toggle-line) "printing" "\ +Toggle line number. + +\(fn)" t nil) + +(autoload (quote pr-toggle-zebra) "printing" "\ +Toggle zebra stripes. + +\(fn)" t nil) + +(autoload (quote pr-toggle-header) "printing" "\ +Toggle printing header. + +\(fn)" t nil) + +(autoload (quote pr-toggle-header-frame) "printing" "\ +Toggle printing header frame. + +\(fn)" t nil) + +(autoload (quote pr-toggle-lock) "printing" "\ +Toggle menu lock. + +\(fn)" t nil) + +(autoload (quote pr-toggle-region) "printing" "\ +Toggle auto region. + +\(fn)" t nil) + +(autoload (quote pr-toggle-mode) "printing" "\ +Toggle auto mode. + +\(fn)" t nil) + +(autoload (quote pr-customize) "printing" "\ +Customization of `printing' group. + +\(fn &rest IGNORE)" t nil) + +(autoload (quote lpr-customize) "printing" "\ +Customization of `lpr' group. + +\(fn &rest IGNORE)" t nil) + +(autoload (quote pr-help) "printing" "\ +Help for printing package. + +\(fn &rest IGNORE)" t nil) + +(autoload (quote pr-ps-name) "printing" "\ +Select interactively a PostScript printer. + +\(fn)" t nil) + +(autoload (quote pr-txt-name) "printing" "\ +Select interactively a text printer. + +\(fn)" t nil) + +(autoload (quote pr-ps-utility) "printing" "\ +Select interactively a PostScript utility. + +\(fn)" t nil) + +(autoload (quote pr-show-ps-setup) "printing" "\ +Show current ps-print settings. + +\(fn &rest IGNORE)" t nil) + +(autoload (quote pr-show-pr-setup) "printing" "\ +Show current printing settings. + +\(fn &rest IGNORE)" t nil) + +(autoload (quote pr-show-lpr-setup) "printing" "\ +Show current lpr settings. + +\(fn &rest IGNORE)" t nil) + +(autoload (quote pr-ps-fast-fire) "printing" "\ +Fast fire function for PostScript printing. + +If a region is active, the region will be printed instead of the whole buffer. +Also if the current major-mode is defined in `pr-mode-alist', the settings in +`pr-mode-alist' will be used, that is, the current buffer or region will be +printed using `pr-ps-mode-ps-print'. + + +Interactively, you have the following situations: + + M-x pr-ps-fast-fire RET + The command prompts the user for a N-UP value and printing will + immediatelly be done using the current active printer. + + C-u M-x pr-ps-fast-fire RET + C-u 0 M-x pr-ps-fast-fire RET + The command prompts the user for a N-UP value and also for a current + PostScript printer, then printing will immediatelly be done using the new + current active printer. + + C-u 1 M-x pr-ps-fast-fire RET + The command prompts the user for a N-UP value and also for a file name, + and saves the PostScript image in that file instead of sending it to the + printer. + + C-u 2 M-x pr-ps-fast-fire RET + The command prompts the user for a N-UP value, then for a current + PostScript printer and, finally, for a file name. Then change the active + printer to that choosen by user and saves the PostScript image in + that file instead of sending it to the printer. + + +Noninteractively, the argument N-UP should be a positive integer greater than +zero and the argument SELECT is treated as follows: + + If it's nil, send the image to the printer. + + If it's a list or an integer lesser or equal to zero, the command prompts + the user for a current PostScript printer, then printing will immediatelly + be done using the new current active printer. + + If it's an integer equal to 1, the command prompts the user for a file name + and saves the PostScript image in that file instead of sending it to the + printer. + + If it's an integer greater or equal to 2, the command prompts the user for a + current PostScript printer and for a file name. Then change the active + printer to that choosen by user and saves the PostScript image in that file + instead of sending it to the printer. + + If it's a symbol which it's defined in `pr-ps-printer-alist', it's the new + active printer and printing will immediatelly be done using the new active + printer. + + Otherwise, send the image to the printer. + + +Note that this command always behaves as if `pr-auto-region' and `pr-auto-mode' +are both set to t. + +\(fn N-UP &optional SELECT)" t nil) + +(autoload (quote pr-txt-fast-fire) "printing" "\ +Fast fire function for text printing. + +If a region is active, the region will be printed instead of the whole buffer. +Also if the current major-mode is defined in `pr-mode-alist', the settings in +`pr-mode-alist' will be used, that is, the current buffer or region will be +printed using `pr-txt-mode'. + +Interactively, when you use a prefix argument (C-u), the command prompts the +user for a new active text printer. + +Noninteractively, the argument SELECT-PRINTER is treated as follows: + + If it's nil, the printing is sent to the current active text printer. + + If it's a symbol which it's defined in `pr-txt-printer-alist', it's the new + active printer and printing will immediatelly be done using the new active + printer. + + If it's non-nil, the command prompts the user for a new active text printer. + +Note that this command always behaves as if `pr-auto-region' and `pr-auto-mode' +are both set to t. + +\(fn &optional SELECT-PRINTER)" t nil) + +;;;*** + +;;;### (autoloads (run-prolog prolog-mode) "prolog" "progmodes/prolog.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/prolog.el + +(autoload (quote prolog-mode) "prolog" "\ +Major mode for editing Prolog code for Prologs. +Blank lines and `%%...' separate paragraphs. `%'s start comments. +Commands: +\\{prolog-mode-map} +Entry to this mode calls the value of `prolog-mode-hook' +if that value is non-nil. + +\(fn)" t nil) + +(autoload (quote run-prolog) "prolog" "\ +Run an inferior Prolog process, input and output via buffer *prolog*. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil "ps-bdf" "ps-bdf.el" (16211 27018)) +;;; Generated autoloads from ps-bdf.el + +(defvar bdf-directory-list (if (memq system-type (quote (ms-dos windows-nt))) (list (expand-file-name "fonts/bdf" installation-directory)) (quote ("/usr/local/share/emacs/fonts/bdf"))) "\ +*List of directories to search for `BDF' font files. +The default value is '(\"/usr/local/share/emacs/fonts/bdf\").") + +;;;*** + +;;;### (autoloads (ps-mode) "ps-mode" "progmodes/ps-mode.el" (16211 +;;;;;; 27039)) +;;; Generated autoloads from progmodes/ps-mode.el + +(autoload (quote ps-mode) "ps-mode" "\ +Major mode for editing PostScript with GNU Emacs. + +Entry to this mode calls `ps-mode-hook'. + +The following variables hold user options, and can +be set through the `customize' command: + + `ps-mode-auto-indent' + `ps-mode-tab' + `ps-mode-paper-size' + `ps-mode-print-function' + `ps-run-prompt' + `ps-run-font-lock-keywords-2' + `ps-run-x' + `ps-run-dumb' + `ps-run-init' + `ps-run-error-line-numbers' + `ps-run-tmp-dir' + +Type \\[describe-variable] for documentation on these options. + + +\\{ps-mode-map} + + +When starting an interactive PostScript process with \\[ps-run-start], +a second window will be displayed, and `ps-run-mode-hook' will be called. +The keymap for this second window is: + +\\{ps-run-mode-map} + + +When Ghostscript encounters an error it displays an error message +with a file position. Clicking mouse-2 on this number will bring +point to the corresponding spot in the PostScript window, if input +to the interpreter was sent from that window. +Typing \\\\[ps-run-goto-error] when the cursor is at the number has the same effect. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (ps-mule-begin-page ps-mule-begin-job ps-mule-header-string-charsets +;;;;;; ps-mule-encode-header-string ps-mule-initialize ps-mule-plot-composition +;;;;;; ps-mule-plot-string ps-mule-set-ascii-font ps-mule-prepare-ascii-font +;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" (16211 27018)) +;;; Generated autoloads from ps-mule.el + +(defvar ps-multibyte-buffer nil "\ +*Specifies the multi-byte buffer handling. + +Valid values are: + + nil This is the value to use the default settings which + is by default for printing buffer with only ASCII + and Latin characters. The default setting can be + changed by setting the variable + `ps-mule-font-info-database-default' differently. + The initial value of this variable is + `ps-mule-font-info-database-latin' (see + documentation). + + `non-latin-printer' This is the value to use when you have a Japanese + or Korean PostScript printer and want to print + buffer with ASCII, Latin-1, Japanese (JISX0208 and + JISX0201-Kana) and Korean characters. At present, + it was not tested the Korean characters printing. + If you have a korean PostScript printer, please, + test it. + + `bdf-font' This is the value to use when you want to print + buffer with BDF fonts. BDF fonts include both latin + and non-latin fonts. BDF (Bitmap Distribution + Format) is a format used for distributing X's font + source file. BDF fonts are included in + `intlfonts-1.2' which is a collection of X11 fonts + for all characters supported by Emacs. In order to + use this value, be sure to have installed + `intlfonts-1.2' and set the variable + `bdf-directory-list' appropriately (see ps-bdf.el for + documentation of this variable). + + `bdf-font-except-latin' This is like `bdf-font' except that it is used + PostScript default fonts to print ASCII and Latin-1 + characters. This is convenient when you want or + need to use both latin and non-latin characters on + the same buffer. See `ps-font-family', + `ps-header-font-family' and `ps-font-info-database'. + +Any other value is treated as nil.") + +(custom-autoload (quote ps-multibyte-buffer) "ps-mule") + +(autoload (quote ps-mule-prepare-ascii-font) "ps-mule" "\ +Setup special ASCII font for STRING. +STRING should contain only ASCII characters. + +\(fn STRING)" nil nil) + +(autoload (quote ps-mule-set-ascii-font) "ps-mule" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote ps-mule-plot-string) "ps-mule" "\ +Generate PostScript code for plotting characters in the region FROM and TO. + +It is assumed that all characters in this region belong to the same charset. + +Optional argument BG-COLOR specifies background color. + +Returns the value: + + (ENDPOS . RUN-WIDTH) + +Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of +the sequence. + +\(fn FROM TO &optional BG-COLOR)" nil nil) + +(autoload (quote ps-mule-plot-composition) "ps-mule" "\ +Generate PostScript code for plotting composition in the region FROM and TO. + +It is assumed that all characters in this region belong to the same +composition. + +Optional argument BG-COLOR specifies background color. + +Returns the value: + + (ENDPOS . RUN-WIDTH) + +Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of +the sequence. + +\(fn FROM TO &optional BG-COLOR)" nil nil) + +(autoload (quote ps-mule-initialize) "ps-mule" "\ +Initialize global data for printing multi-byte characters. + +\(fn)" nil nil) + +(autoload (quote ps-mule-encode-header-string) "ps-mule" "\ +Generate PostScript code for ploting STRING by font FONTTAG. +FONTTAG should be a string \"/h0\" or \"/h1\". + +\(fn STRING FONTTAG)" nil nil) + +(autoload (quote ps-mule-header-string-charsets) "ps-mule" "\ +Return a list of character sets that appears in header strings. + +\(fn)" nil nil) + +(autoload (quote ps-mule-begin-job) "ps-mule" "\ +Start printing job for multi-byte chars between FROM and TO. +This checks if all multi-byte characters in the region are printable or not. + +\(fn FROM TO)" nil nil) + +(autoload (quote ps-mule-begin-page) "ps-mule" "\ +Not documented + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (ps-extend-face ps-extend-face-list ps-setup ps-nb-pages-region +;;;;;; ps-nb-pages-buffer ps-line-lengths ps-despool ps-spool-region-with-faces +;;;;;; ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer +;;;;;; ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces +;;;;;; ps-print-buffer ps-print-customize ps-print-color-p ps-paper-type +;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (16211 +;;;;;; 27018)) +;;; Generated autoloads from ps-print.el + +(defvar ps-page-dimensions-database (list (list (quote a4) (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list (quote a3) (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list (quote letter) (* 72 8.5) (* 72 11.0) "Letter") (list (quote legal) (* 72 8.5) (* 72 14.0) "Legal") (list (quote letter-small) (* 72 7.68) (* 72 10.16) "LetterSmall") (list (quote tabloid) (* 72 11.0) (* 72 17.0) "Tabloid") (list (quote ledger) (* 72 17.0) (* 72 11.0) "Ledger") (list (quote statement) (* 72 5.5) (* 72 8.5) "Statement") (list (quote executive) (* 72 7.5) (* 72 10.0) "Executive") (list (quote a4small) (* 72 7.47) (* 72 10.85) "A4Small") (list (quote b4) (* 72 10.125) (* 72 14.33) "B4") (list (quote b5) (* 72 7.16) (* 72 10.125) "B5")) "\ +*List associating a symbolic paper type to its width, height and doc media. +See `ps-paper-type'.") + +(custom-autoload (quote ps-page-dimensions-database) "ps-print") + +(defvar ps-paper-type (quote letter) "\ +*Specify the size of paper to format for. +Should be one of the paper types defined in `ps-page-dimensions-database', for +example `letter', `legal' or `a4'.") + +(custom-autoload (quote ps-paper-type) "ps-print") + +(defvar ps-print-color-p (or (fboundp (quote x-color-values)) (fboundp (quote color-instance-rgb-components))) "\ +*Specify how buffer's text color is printed. + +Valid values are: + + nil Do not print colors. + + t Print colors. + + black-white Print colors on black/white printer. + See also `ps-black-white-faces'. + +Any other value is treated as t.") + +(custom-autoload (quote ps-print-color-p) "ps-print") + +(autoload (quote ps-print-customize) "ps-print" "\ +Customization of ps-print group. + +\(fn)" t nil) + +(autoload (quote ps-print-buffer) "ps-print" "\ +Generate and print a PostScript image of the buffer. + +Interactively, when you use a prefix argument (\\[universal-argument]), the command prompts the +user for a file name, and saves the PostScript image in that file instead of +sending it to the printer. + +Noninteractively, the argument FILENAME is treated as follows: if it is nil, +send the image to the printer. If FILENAME is a string, save the PostScript +image in a file with that name. + +\(fn &optional FILENAME)" t nil) + +(autoload (quote ps-print-buffer-with-faces) "ps-print" "\ +Generate and print a PostScript image of the buffer. +Like `ps-print-buffer', but includes font, color, and underline information in +the generated image. This command works only if you are using a window system, +so it has a way to determine color values. + +\(fn &optional FILENAME)" t nil) + +(autoload (quote ps-print-region) "ps-print" "\ +Generate and print a PostScript image of the region. +Like `ps-print-buffer', but prints just the current region. + +\(fn FROM TO &optional FILENAME)" t nil) + +(autoload (quote ps-print-region-with-faces) "ps-print" "\ +Generate and print a PostScript image of the region. +Like `ps-print-region', but includes font, color, and underline information in +the generated image. This command works only if you are using a window system, +so it has a way to determine color values. + +\(fn FROM TO &optional FILENAME)" t nil) + +(autoload (quote ps-spool-buffer) "ps-print" "\ +Generate and spool a PostScript image of the buffer. +Like `ps-print-buffer' except that the PostScript image is saved in a local +buffer to be sent to the printer later. + +Use the command `ps-despool' to send the spooled images to the printer. + +\(fn)" t nil) + +(autoload (quote ps-spool-buffer-with-faces) "ps-print" "\ +Generate and spool a PostScript image of the buffer. +Like `ps-spool-buffer', but includes font, color, and underline information in +the generated image. This command works only if you are using a window system, +so it has a way to determine color values. + +Use the command `ps-despool' to send the spooled images to the printer. + +\(fn)" t nil) + +(autoload (quote ps-spool-region) "ps-print" "\ +Generate a PostScript image of the region and spool locally. +Like `ps-spool-buffer', but spools just the current region. + +Use the command `ps-despool' to send the spooled images to the printer. + +\(fn FROM TO)" t nil) + +(autoload (quote ps-spool-region-with-faces) "ps-print" "\ +Generate a PostScript image of the region and spool locally. +Like `ps-spool-region', but includes font, color, and underline information in +the generated image. This command works only if you are using a window system, +so it has a way to determine color values. + +Use the command `ps-despool' to send the spooled images to the printer. + +\(fn FROM TO)" t nil) + +(autoload (quote ps-despool) "ps-print" "\ +Send the spooled PostScript to the printer. + +Interactively, when you use a prefix argument (\\[universal-argument]), the command prompts the +user for a file name, and saves the spooled PostScript image in that file +instead of sending it to the printer. + +Noninteractively, the argument FILENAME is treated as follows: if it is nil, +send the image to the printer. If FILENAME is a string, save the PostScript +image in a file with that name. + +\(fn &optional FILENAME)" t nil) + +(autoload (quote ps-line-lengths) "ps-print" "\ +Display the correspondence between a line length and a font size. +Done using the current ps-print setup. +Try: pr -t file | awk '{printf \"%3d %s +\", length($0), $0}' | sort -r | head + +\(fn)" t nil) + +(autoload (quote ps-nb-pages-buffer) "ps-print" "\ +Display number of pages to print this buffer, for various font heights. +The table depends on the current ps-print setup. + +\(fn NB-LINES)" t nil) + +(autoload (quote ps-nb-pages-region) "ps-print" "\ +Display number of pages to print the region, for various font heights. +The table depends on the current ps-print setup. + +\(fn NB-LINES)" t nil) + +(autoload (quote ps-setup) "ps-print" "\ +Return the current PostScript-generation setup. + +\(fn)" nil nil) + +(autoload (quote ps-extend-face-list) "ps-print" "\ +Extend face in ALIST-SYM. + +If optional MERGE-P is non-nil, extensions in FACE-EXTENSION-LIST are merged +with face extension in ALIST-SYM; otherwise, overrides. + +If optional ALIST-SYM is nil, it's used `ps-print-face-extension-alist'; +otherwise, it should be an alist symbol. + +The elements in FACE-EXTENSION-LIST is like those for `ps-extend-face'. + +See `ps-extend-face' for documentation. + +\(fn FACE-EXTENSION-LIST &optional MERGE-P ALIST-SYM)" nil nil) + +(autoload (quote ps-extend-face) "ps-print" "\ +Extend face in ALIST-SYM. + +If optional MERGE-P is non-nil, extensions in FACE-EXTENSION list are merged +with face extensions in ALIST-SYM; otherwise, overrides. + +If optional ALIST-SYM is nil, it's used `ps-print-face-extension-alist'; +otherwise, it should be an alist symbol. + +The elements of FACE-EXTENSION list have the form: + + (FACE-NAME FOREGROUND BACKGROUND EXTENSION...) + +FACE-NAME is a face name symbol. + +FOREGROUND and BACKGROUND may be nil or a string that denotes the +foreground and background colors respectively. + +EXTENSION is one of the following symbols: + bold - use bold font. + italic - use italic font. + underline - put a line under text. + strikeout - like underline, but the line is in middle of text. + overline - like underline, but the line is over the text. + shadow - text will have a shadow. + box - text will be surrounded by a box. + outline - print characters as hollow outlines. + +If EXTENSION is any other symbol, it is ignored. + +\(fn FACE-EXTENSION &optional MERGE-P ALIST-SYM)" nil nil) + +;;;*** + +;;;### (autoloads (quail-update-leim-list-file quail-defrule-internal +;;;;;; quail-defrule quail-install-decode-map quail-install-map +;;;;;; quail-define-rules quail-show-keyboard-layout quail-set-keyboard-layout +;;;;;; quail-define-package quail-use-package quail-title) "quail" +;;;;;; "international/quail.el" (16303 32090)) +;;; Generated autoloads from international/quail.el + +(autoload (quote quail-title) "quail" "\ +Return the title of the current Quail package. + +\(fn)" nil nil) + +(autoload (quote quail-use-package) "quail" "\ +Start using Quail package PACKAGE-NAME. +The remaining arguments are libraries to be loaded before using the package. + +This activates input method defined by PACKAGE-NAME by running +`quail-activate', which see. + +\(fn PACKAGE-NAME &rest LIBRARIES)" nil nil) + +(autoload (quote quail-define-package) "quail" "\ +Define NAME as a new Quail package for input LANGUAGE. +TITLE is a string to be displayed at mode-line to indicate this package. +Optional arguments are GUIDANCE, DOCSTRING, TRANSLATION-KEYS, + FORGET-LAST-SELECTION, DETERMINISTIC, KBD-TRANSLATE, SHOW-LAYOUT, + CREATE-DECODE-MAP, MAXIMUM-SHORTEST, OVERLAY-PLIST, + UPDATE-TRANSLATION-FUNCTION, CONVERSION-KEYS and SIMPLE. + +GUIDANCE specifies how a guidance string is shown in echo area. +If it is t, list of all possible translations for the current key is shown + with the currently selected translation being highlighted. +If it is an alist, the element has the form (CHAR . STRING). Each character + in the current key is searched in the list and the corresponding string is + shown. +If it is nil, the current key is shown. + +DOCSTRING is the documentation string of this package. The command +`describe-input-method' shows this string while replacing the form +\\=\\ in the string by the value of VAR. That value should be a +string. For instance, the form \\=\\ is +replaced by a description about how to select a translation from a +list of candidates. + +TRANSLATION-KEYS specifies additional key bindings used while translation +region is active. It is an alist of single key character vs. corresponding +command to be called. + +FORGET-LAST-SELECTION non-nil means a selected translation is not kept +for the future to translate the same key. If this flag is nil, a +translation selected for a key is remembered so that it can be the +first candidate when the same key is entered later. + +DETERMINISTIC non-nil means the first candidate of translation is +selected automatically without allowing users to select another +translation for a key. In this case, unselected translations are of +no use for an interactive use of Quail but can be used by some other +programs. If this flag is non-nil, FORGET-LAST-SELECTION is also set +to t. + +KBD-TRANSLATE non-nil means input characters are translated from a +user's keyboard layout to the standard keyboard layout. See the +documentation of `quail-keyboard-layout' and +`quail-keyboard-layout-standard' for more detail. + +SHOW-LAYOUT non-nil means the `quail-help' command should show +the user's keyboard layout visually with translated characters. +If KBD-TRANSLATE is set, it is desirable to set also this flag unless +this package defines no translations for single character keys. + +CREATE-DECODE-MAP non-nil means decode map is also created. A decode +map is an alist of translations and corresponding original keys. +Although this map is not used by Quail itself, it can be used by some +other programs. For instance, Vietnamese supporting needs this map to +convert Vietnamese text to VIQR format which uses only ASCII +characters to represent Vietnamese characters. + +MAXIMUM-SHORTEST non-nil means break key sequence to get maximum +length of the shortest sequence. When we don't have a translation of +key \"..ABCD\" but have translations of \"..AB\" and \"CD..\", break +the key at \"..AB\" and start translation of \"CD..\". Hangul +packages, for instance, use this facility. If this flag is nil, we +break the key just at \"..ABC\" and start translation of \"D..\". + +OVERLAY-PLIST if non-nil is a property list put on an overlay which +covers Quail translation region. + +UPDATE-TRANSLATION-FUNCTION if non-nil is a function to call to update +the current translation region according to a new translation data. By +default, a translated text or a user's key sequence (if no translation +for it) is inserted. + +CONVERSION-KEYS specifies additional key bindings used while +conversion region is active. It is an alist of single key character +vs. corresponding command to be called. + +If SIMPLE is non-nil, then we do not alter the meanings of +commands such as C-f, C-b, C-n, C-p and TAB; they are treated as +non-Quail commands. + +\(fn NAME LANGUAGE TITLE &optional GUIDANCE DOCSTRING TRANSLATION-KEYS FORGET-LAST-SELECTION DETERMINISTIC KBD-TRANSLATE SHOW-LAYOUT CREATE-DECODE-MAP MAXIMUM-SHORTEST OVERLAY-PLIST UPDATE-TRANSLATION-FUNCTION CONVERSION-KEYS SIMPLE)" nil nil) + +(autoload (quote quail-set-keyboard-layout) "quail" "\ +Set the current keyboard layout to the same as keyboard KBD-TYPE. + +Since some Quail packages depends on a physical layout of keys (not +characters generated by them), those are created by assuming the +standard layout defined in `quail-keyboard-layout-standard'. This +function tells Quail system the layout of your keyboard so that what +you type is correctly handled. + +\(fn KBD-TYPE)" t nil) + +(autoload (quote quail-show-keyboard-layout) "quail" "\ +Show the physical layout of the keyboard type KEYBOARD-TYPE. + +The variable `quail-keyboard-layout-type' holds the currently selected +keyboard type. + +\(fn &optional KEYBOARD-TYPE)" t nil) + +(autoload (quote quail-define-rules) "quail" "\ +Define translation rules of the current Quail package. +Each argument is a list of KEY and TRANSLATION. +KEY is a string meaning a sequence of keystrokes to be translated. +TRANSLATION is a character, a string, a vector, a Quail map, or a function. +If it is a character, it is the sole translation of KEY. +If it is a string, each character is a candidate for the translation. +If it is a vector, each element (string or character) is a candidate + for the translation. +In these cases, a key specific Quail map is generated and assigned to KEY. + +If TRANSLATION is a Quail map or a function symbol which returns a Quail map, + it is used to handle KEY. + +The first argument may be an alist of annotations for the following +rules. Each element has the form (ANNOTATION . VALUE), where +ANNOTATION is a symbol indicating the annotation type. Currently +the following annotation types are supported. + + append -- the value non-nil means that the following rules should + be appended to the rules of the current Quail package. + + face -- the value is a face to use for displaying TRANSLATIONs in + candidate list. + + advice -- the value is a function to call after one of RULES is + selected. The function is called with one argument, the + selected TRANSLATION string, after the TRANSLATION is + inserted. + + no-decode-map --- the value non-nil means that decoding map is not + generated for the following translations. + +\(fn &rest RULES)" nil (quote macro)) + +(autoload (quote quail-install-map) "quail" "\ +Install the Quail map MAP in the current Quail package. + +Optional 2nd arg NAME, if non-nil, is a name of Quail package for +which to install MAP. + +The installed map can be referred by the function `quail-map'. + +\(fn MAP &optional NAME)" nil nil) + +(autoload (quote quail-install-decode-map) "quail" "\ +Install the Quail decode map DECODE-MAP in the current Quail package. + +Optional 2nd arg NAME, if non-nil, is a name of Quail package for +which to install MAP. + +The installed decode map can be referred by the function `quail-decode-map'. + +\(fn DECODE-MAP &optional NAME)" nil nil) + +(autoload (quote quail-defrule) "quail" "\ +Add one translation rule, KEY to TRANSLATION, in the current Quail package. +KEY is a string meaning a sequence of keystrokes to be translated. +TRANSLATION is a character, a string, a vector, a Quail map, + a function, or a cons. +It it is a character, it is the sole translation of KEY. +If it is a string, each character is a candidate for the translation. +If it is a vector, each element (string or character) is a candidate + for the translation. +If it is a cons, the car is one of the above and the cdr is a function + to call when translating KEY (the return value is assigned to the + variable `quail-current-data'). If the cdr part is not a function, + the value itself is assigned to `quail-current-data'. +In these cases, a key specific Quail map is generated and assigned to KEY. + +If TRANSLATION is a Quail map or a function symbol which returns a Quail map, + it is used to handle KEY. + +Optional 3rd argument NAME, if specified, says which Quail package +to define this translation rule in. The default is to define it in the +current Quail package. + +Optional 4th argument APPEND, if non-nil, appends TRANSLATION +to the current translations for KEY instead of replacing them. + +\(fn KEY TRANSLATION &optional NAME APPEND)" nil nil) + +(autoload (quote quail-defrule-internal) "quail" "\ +Define KEY as TRANS in a Quail map MAP. + +If Optional 4th arg APPEND is non-nil, TRANS is appended to the +current translations for KEY instead of replacing them. + +Optional 5th arg DECODE-MAP is a Quail decode map. + +Optional 6th arg PROPS is a property list annotating TRANS. See the +function `quail-define-rules' for the detail. + +\(fn KEY TRANS MAP &optional APPEND DECODE-MAP PROPS)" nil nil) + +(autoload (quote quail-update-leim-list-file) "quail" "\ +Update entries for Quail packages in `LEIM' list file in directory DIRNAME. +DIRNAME is a directory containing Emacs input methods; +normally, it should specify the `leim' subdirectory +of the Emacs source tree. + +It searches for Quail packages under `quail' subdirectory of DIRNAME, +and update the file \"leim-list.el\" in DIRNAME. + +When called from a program, the remaining arguments are additional +directory names to search for Quail packages under `quail' subdirectory +of each directory. + +\(fn DIRNAME &rest DIRNAMES)" t nil) + +;;;*** + +;;;### (autoloads (quickurl-list quickurl-list-mode quickurl-edit-urls +;;;;;; quickurl-browse-url-ask quickurl-browse-url quickurl-add-url +;;;;;; quickurl-ask quickurl) "quickurl" "net/quickurl.el" (16211 +;;;;;; 27037)) +;;; Generated autoloads from net/quickurl.el + +(defconst quickurl-reread-hook-postfix "\n;; Local Variables:\n;; eval: (progn (require 'quickurl) (add-hook 'local-write-file-hooks (lambda () (quickurl-read) nil)))\n;; End:\n" "\ +Example `quickurl-postfix' text that adds a local variable to the +`quickurl-url-file' so that if you edit it by hand it will ensure that +`quickurl-urls' is updated with the new URL list. + +To make use of this do something like: + + (setq quickurl-postfix quickurl-reread-hook-postfix) + +in your ~/.emacs (after loading/requiring quickurl).") + +(autoload (quote quickurl) "quickurl" "\ +Insert an URL based on LOOKUP. + +If not supplied LOOKUP is taken to be the word at point in the current +buffer, this default action can be modifed via +`quickurl-grab-lookup-function'. + +\(fn &optional (LOOKUP (funcall quickurl-grab-lookup-function)))" t nil) + +(autoload (quote quickurl-ask) "quickurl" "\ +Insert an URL, with `completing-read' prompt, based on LOOKUP. + +\(fn LOOKUP)" t nil) + +(autoload (quote quickurl-add-url) "quickurl" "\ +Allow the user to interactively add a new URL associated with WORD. + +See `quickurl-grab-url' for details on how the default word/url combination +is decided. + +\(fn WORD URL COMMENT)" t nil) + +(autoload (quote quickurl-browse-url) "quickurl" "\ +Browse the URL associated with LOOKUP. + +If not supplied LOOKUP is taken to be the word at point in the +current buffer, this default action can be modifed via +`quickurl-grab-lookup-function'. + +\(fn &optional (LOOKUP (funcall quickurl-grab-lookup-function)))" t nil) + +(autoload (quote quickurl-browse-url-ask) "quickurl" "\ +Browse the URL, with `completing-read' prompt, associated with LOOKUP. + +\(fn LOOKUP)" t nil) + +(autoload (quote quickurl-edit-urls) "quickurl" "\ +Pull `quickurl-url-file' into a buffer for hand editing. + +\(fn)" t nil) + +(autoload (quote quickurl-list-mode) "quickurl" "\ +A mode for browsing the quickurl URL list. + +The key bindings for `quickurl-list-mode' are: + +\\{quickurl-list-mode-map} + +\(fn)" t nil) + +(autoload (quote quickurl-list) "quickurl" "\ +Display `quickurl-list' as a formatted list using `quickurl-list-mode'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (remote-compile) "rcompile" "net/rcompile.el" (16211 +;;;;;; 27037)) +;;; Generated autoloads from net/rcompile.el + +(autoload (quote remote-compile) "rcompile" "\ +Compile the current buffer's directory on HOST. Log in as USER. +See \\[compile]. + +\(fn HOST USER COMMAND)" t nil) + +;;;*** + +;;;### (autoloads (re-builder) "re-builder" "emacs-lisp/re-builder.el" +;;;;;; (16211 27026)) +;;; Generated autoloads from emacs-lisp/re-builder.el + +(autoload (quote re-builder) "re-builder" "\ +Call up the RE Builder for the current window. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (recentf-mode) "recentf" "recentf.el" (16246 40636)) +;;; Generated autoloads from recentf.el + +(defvar recentf-mode nil "\ +Non-nil if Recentf mode is enabled. +See the command `recentf-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `recentf-mode'.") + +(custom-autoload (quote recentf-mode) "recentf") + +(autoload (quote recentf-mode) "recentf" "\ +Toggle recentf mode. +With prefix argument ARG, turn on if positive, otherwise off. +Returns non-nil if the new state is enabled. + +When recentf mode is enabled, it maintains a menu for visiting files +that were operated on recently. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (clear-rectangle string-insert-rectangle string-rectangle +;;;;;; delete-whitespace-rectangle open-rectangle insert-rectangle +;;;;;; yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle +;;;;;; delete-rectangle move-to-column-force) "rect" "rect.el" (16211 +;;;;;; 27018)) +;;; Generated autoloads from rect.el + +(autoload (quote move-to-column-force) "rect" "\ +If COLUMN is within a multi-column character, replace it by spaces and tab. +As for `move-to-column', passing anything but nil or t in FLAG will move to +the desired column only if the line is long enough. + +\(fn COLUMN &optional FLAG)" nil nil) + +(make-obsolete (quote move-to-column-force) (quote move-to-column) "21.2") + +(autoload (quote delete-rectangle) "rect" "\ +Delete (don't save) text in the region-rectangle. +The same range of columns is deleted in each line starting with the +line where the region begins and ending with the line where the region +ends. + +When called from a program the rectangle's corners are START and END. +With a prefix (or a FILL) argument, also fill lines where nothing has +to be deleted. + +\(fn START END &optional FILL)" t nil) + +(autoload (quote delete-extract-rectangle) "rect" "\ +Delete the contents of the rectangle with corners at START and END. +Return it as a list of strings, one for each line of the rectangle. + +When called from a program the rectangle's corners are START and END. +With an optional FILL argument, also fill lines where nothing has to be +deleted. + +\(fn START END &optional FILL)" nil nil) + +(autoload (quote extract-rectangle) "rect" "\ +Return the contents of the rectangle with corners at START and END. +Return it as a list of strings, one for each line of the rectangle. + +\(fn START END)" nil nil) + +(autoload (quote kill-rectangle) "rect" "\ +Delete the region-rectangle and save it as the last killed one. + +When called from a program the rectangle's corners are START and END. +You might prefer to use `delete-extract-rectangle' from a program. + +With a prefix (or a FILL) argument, also fill lines where nothing has to be +deleted. + +\(fn START END &optional FILL)" t nil) + +(autoload (quote yank-rectangle) "rect" "\ +Yank the last killed rectangle with upper left corner at point. + +\(fn)" t nil) + +(autoload (quote insert-rectangle) "rect" "\ +Insert text of RECTANGLE with upper left corner at point. +RECTANGLE's first line is inserted at point, its second +line is inserted at a point vertically under point, etc. +RECTANGLE should be a list of strings. +After this command, the mark is at the upper left corner +and point is at the lower right corner. + +\(fn RECTANGLE)" nil nil) + +(autoload (quote open-rectangle) "rect" "\ +Blank out the region-rectangle, shifting text right. + +The text previously in the region is not overwritten by the blanks, +but instead winds up to the right of the rectangle. + +When called from a program the rectangle's corners are START and END. +With a prefix (or a FILL) argument, fill with blanks even if there is no text +on the right side of the rectangle. + +\(fn START END &optional FILL)" t nil) + +(defalias (quote close-rectangle) (quote delete-whitespace-rectangle)) + +(autoload (quote delete-whitespace-rectangle) "rect" "\ +Delete all whitespace following a specified column in each line. +The left edge of the rectangle specifies the position in each line +at which whitespace deletion should begin. On each line in the +rectangle, all continuous whitespace starting at that column is deleted. + +When called from a program the rectangle's corners are START and END. +With a prefix (or a FILL) argument, also fill too short lines. + +\(fn START END &optional FILL)" t nil) + +(autoload (quote string-rectangle) "rect" "\ +Replace rectangle contents with STRING on each line. +The length of STRING need not be the same as the rectangle width. + +Called from a program, takes three args; START, END and STRING. + +\(fn START END STRING)" t nil) + +(defalias (quote replace-rectangle) (quote string-rectangle)) + +(autoload (quote string-insert-rectangle) "rect" "\ +Insert STRING on each line of region-rectangle, shifting text right. + +When called from a program, the rectangle's corners are START and END. +The left edge of the rectangle specifies the column for insertion. +This command does not delete or overwrite any existing text. + +\(fn START END STRING)" t nil) + +(autoload (quote clear-rectangle) "rect" "\ +Blank out the region-rectangle. +The text previously in the region is overwritten with blanks. + +When called from a program the rectangle's corners are START and END. +With a prefix (or a FILL) argument, also fill with blanks the parts of the +rectangle which were empty. + +\(fn START END &optional FILL)" t nil) + +;;;*** + +;;;### (autoloads (refill-mode) "refill" "textmodes/refill.el" (16211 +;;;;;; 27044)) +;;; Generated autoloads from textmodes/refill.el + +(autoload (quote refill-mode) "refill" "\ +Toggle Refill minor mode. +With prefix arg, turn Refill mode on iff arg is positive. + +When Refill mode is on, the current paragraph will be formatted when +changes are made within it. Self-inserting characters only cause +refilling if they would cause auto-filling. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (reftex-reset-scanning-information reftex-mode +;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (16211 27044)) +;;; Generated autoloads from textmodes/reftex.el + +(autoload (quote turn-on-reftex) "reftex" "\ +Turn on RefTeX mode. + +\(fn)" nil nil) + +(autoload (quote reftex-mode) "reftex" "\ +Minor mode with distinct support for \\label, \\ref and \\cite in LaTeX. + +\\A Table of Contents of the entire (multifile) document with browsing +capabilities is available with `\\[reftex-toc]'. + +Labels can be created with `\\[reftex-label]' and referenced with `\\[reftex-reference]'. +When referencing, you get a menu with all labels of a given type and +context of the label definition. The selected label is inserted as a +\\ref macro. + +Citations can be made with `\\[reftex-citation]' which will use a regular expression +to pull out a *formatted* list of articles from your BibTeX +database. The selected citation is inserted as a \\cite macro. + +Index entries can be made with `\\[reftex-index-selection-or-word]' which indexes the word at point +or the current selection. More general index entries are created with +`\\[reftex-index]'. `\\[reftex-display-index]' displays the compiled index. + +Most command have help available on the fly. This help is accessed by +pressing `?' to any prompt mentioning this feature. + +Extensive documentation about RefTeX is available in Info format. +You can view this information with `\\[reftex-info]'. + +\\{reftex-mode-map} +Under X, these and other functions will also be available as `Ref' menu +on the menu bar. + +------------------------------------------------------------------------------ + +\(fn &optional ARG)" t nil) + +(autoload (quote reftex-reset-scanning-information) "reftex" "\ +Reset the symbols containing information from buffer scanning. +This enforces rescanning the buffer on next use. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (reftex-citation) "reftex-cite" "textmodes/reftex-cite.el" +;;;;;; (16211 27044)) +;;; Generated autoloads from textmodes/reftex-cite.el + +(autoload (quote reftex-citation) "reftex-cite" "\ +Make a citation using BibTeX database files. +After prompting for a regular expression, scans the buffers with +bibtex entries (taken from the \\bibliography command) and offers the +matching entries for selection. The selected entry is formatted according +to `reftex-cite-format' and inserted into the buffer. + +If NO-INSERT is non-nil, nothing is inserted, only the selected key returned. + +FORAT-KEY can be used to pre-select a citation format. + +When called with one or two `C-u' prefixes, first rescans the document. +When called with a numeric prefix, make that many citations. When +called with point inside the braces of a `\\cite' command, it will +add another key, ignoring the value of `reftex-cite-format'. + +The regular expression uses an expanded syntax: && is interpreted as `and'. +Thus, `aaaa&&bbb' matches entries which contain both `aaaa' and `bbb'. +While entering the regexp, completion on knows citation keys is possible. +`=' is a good regular expression to match all entries in all files. + +\(fn &optional NO-INSERT FORMAT-KEY)" t nil) + +;;;*** + +;;;### (autoloads (reftex-index-phrases-mode) "reftex-index" "textmodes/reftex-index.el" +;;;;;; (16211 27044)) +;;; Generated autoloads from textmodes/reftex-index.el + +(autoload (quote reftex-index-phrases-mode) "reftex-index" "\ +Major mode for managing the Index phrases of a LaTeX document. +This buffer was created with RefTeX. + +To insert new phrases, use + - `C-c \\' in the LaTeX document to copy selection or word + - `\\[reftex-index-new-phrase]' in the phrases buffer. + +To index phrases use one of: + +\\[reftex-index-this-phrase] index current phrase +\\[reftex-index-next-phrase] index next phrase (or N with prefix arg) +\\[reftex-index-all-phrases] index all phrases +\\[reftex-index-remaining-phrases] index current and following phrases +\\[reftex-index-region-phrases] index the phrases in the region + +You can sort the phrases in this buffer with \\[reftex-index-sort-phrases]. +To display information about the phrase at point, use \\[reftex-index-phrases-info]. + +For more information see the RefTeX User Manual. + +Here are all local bindings. + +\\{reftex-index-phrases-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (reftex-all-document-files) "reftex-parse" "textmodes/reftex-parse.el" +;;;;;; (16211 27044)) +;;; Generated autoloads from textmodes/reftex-parse.el + +(autoload (quote reftex-all-document-files) "reftex-parse" "\ +Return a list of all files belonging to the current document. +When RELATIVE is non-nil, give file names relative to directory +of master file. + +\(fn &optional RELATIVE)" nil nil) + +;;;*** + +;;;### (autoloads (regexp-opt-depth regexp-opt) "regexp-opt" "emacs-lisp/regexp-opt.el" +;;;;;; (16211 27026)) +;;; Generated autoloads from emacs-lisp/regexp-opt.el + +(autoload (quote regexp-opt) "regexp-opt" "\ +Return a regexp to match a string in STRINGS. +Each string should be unique in STRINGS and should not contain any regexps, +quoted or not. If optional PAREN is non-nil, ensure that the returned regexp +is enclosed by at least one regexp grouping construct. +The returned regexp is typically more efficient than the equivalent regexp: + + (let ((open (if PAREN \"\\\\(\" \"\")) (close (if PAREN \"\\\\)\" \"\"))) + (concat open (mapconcat 'regexp-quote STRINGS \"\\\\|\") close)) + +If PAREN is `words', then the resulting regexp is additionally surrounded +by \\=\\< and \\>. + +\(fn STRINGS &optional PAREN)" nil nil) + +(autoload (quote regexp-opt-depth) "regexp-opt" "\ +Return the depth of REGEXP. +This means the number of regexp grouping constructs (parenthesised expressions) +in REGEXP. + +\(fn REGEXP)" nil nil) + +;;;*** + +;;;### (autoloads (repeat) "repeat" "repeat.el" (16211 27018)) +;;; Generated autoloads from repeat.el + +(autoload (quote repeat) "repeat" "\ +Repeat most recently executed command. +With prefix arg, apply new prefix arg to that command; otherwise, use +the prefix arg that was used before (if any). +This command is like the `.' command in the vi editor. + +If this command is invoked by a multi-character key sequence, it can then +be repeated by repeating the final character of that sequence. This behavior +can be modified by the global variable `repeat-on-final-keystroke'. + +\(fn REPEAT-ARG)" t nil) + +;;;*** + +;;;### (autoloads (reporter-submit-bug-report) "reporter" "mail/reporter.el" +;;;;;; (16211 27034)) +;;; Generated autoloads from mail/reporter.el + +(autoload (quote reporter-submit-bug-report) "reporter" "\ +Begin submitting a bug report via email. + +ADDRESS is the email address for the package's maintainer. PKGNAME is +the name of the package (if you want to include version numbers, +you must put them into PKGNAME before calling this function). +Optional PRE-HOOKS and POST-HOOKS are passed to `reporter-dump-state'. +Optional SALUTATION is inserted at the top of the mail buffer, +and point is left after the salutation. + +VARLIST is the list of variables to dump (see `reporter-dump-state' +for details). The optional argument PRE-HOOKS and POST-HOOKS are +passed to `reporter-dump-state'. Optional argument SALUTATION is text +to be inserted at the top of the mail buffer; in that case, point is +left after that text. + +This function prompts for a summary if `reporter-prompt-for-summary-p' +is non-nil. + +This function does not send a message; it uses the given information +to initialize a message, which the user can then edit and finally send +\(or decline to send). The variable `mail-user-agent' controls which +mail-sending package is used for editing and sending the message. + +\(fn ADDRESS PKGNAME VARLIST &optional PRE-HOOKS POST-HOOKS SALUTATION)" nil nil) + +;;;*** + +;;;### (autoloads (reposition-window) "reposition" "reposition.el" +;;;;;; (16211 27018)) +;;; Generated autoloads from reposition.el + +(autoload (quote reposition-window) "reposition" "\ +Make the current definition and/or comment visible. +Further invocations move it to the top of the window or toggle the +visibility of comments that precede it. + Point is left unchanged unless prefix ARG is supplied. + If the definition is fully onscreen, it is moved to the top of the +window. If it is partly offscreen, the window is scrolled to get the +definition (or as much as will fit) onscreen, unless point is in a comment +which is also partly offscreen, in which case the scrolling attempts to get +as much of the comment onscreen as possible. + Initially `reposition-window' attempts to make both the definition and +preceding comments visible. Further invocations toggle the visibility of +the comment lines. + If ARG is non-nil, point may move in order to make the whole defun +visible (if only part could otherwise be made so), to make the defun line +visible (if point is in code and it could not be made so, or if only +comments, including the first comment line, are visible), or to make the +first comment line visible (if point is in a comment). + +\(fn &optional ARG)" t nil) + (define-key esc-map "\C-l" 'reposition-window) + +;;;*** + +;;;### (autoloads (resume-suspend-hook) "resume" "resume.el" (16211 +;;;;;; 27018)) +;;; Generated autoloads from resume.el + +(autoload (quote resume-suspend-hook) "resume" "\ +Clear out the file used for transmitting args when Emacs resumes. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (global-reveal-mode reveal-mode) "reveal" "reveal.el" +;;;;;; (16211 27018)) +;;; Generated autoloads from reveal.el + +(autoload (quote reveal-mode) "reveal" "\ +Toggle Reveal mode on or off. +Reveal mode renders invisible text around point visible again. + +Interactively, with no prefix argument, toggle the mode. +With universal prefix ARG (or if ARG is nil) turn mode on. +With zero or negative ARG turn mode off. + +\(fn &optional ARG)" t nil) + +(defvar global-reveal-mode nil "\ +Non-nil if Global-Reveal mode is enabled. +See the command `global-reveal-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `global-reveal-mode'.") + +(custom-autoload (quote global-reveal-mode) "reveal") + +(autoload (quote global-reveal-mode) "reveal" "\ +Toggle Reveal mode in all buffers on or off. +Reveal mode renders invisible text around point visible again. + +Interactively, with no prefix argument, toggle the mode. +With universal prefix ARG (or if ARG is nil) turn mode on. +With zero or negative ARG turn mode off. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (file-name-shadow-mode file-name-shadow-tty-properties +;;;;;; file-name-shadow-properties) "rfn-eshadow" "rfn-eshadow.el" +;;;;;; (16211 27018)) +;;; Generated autoloads from rfn-eshadow.el + +(defvar file-name-shadow-properties (quote (face file-name-shadow field shadow)) "\ +Properties given to the `shadowed' part of a filename in the minibuffer. +Only used when `file-name-shadow-mode' is active. +If emacs is not running under a window system, +`file-name-shadow-tty-properties' is used instead.") + +(custom-autoload (quote file-name-shadow-properties) "rfn-eshadow") + +(defvar file-name-shadow-tty-properties (quote (before-string "{" after-string "} " field shadow)) "\ +Properties given to the `shadowed' part of a filename in the minibuffer. +Only used when `file-name-shadow-mode' is active and emacs +is not running under a window-system; if emacs is running under a window +system, `file-name-shadow-properties' is used instead.") + +(custom-autoload (quote file-name-shadow-tty-properties) "rfn-eshadow") + +(defvar file-name-shadow-mode nil "\ +Non-nil if File-Name-Shadow mode is enabled. +See the command `file-name-shadow-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `file-name-shadow-mode'.") + +(custom-autoload (quote file-name-shadow-mode) "rfn-eshadow") + +(autoload (quote file-name-shadow-mode) "rfn-eshadow" "\ +Toggle File-Name Shadow mode. +When active, any part of a filename being read in the minibuffer +that would be ignored (because the result is passed through +`substitute-in-file-name') is given the properties in +`file-name-shadow-properties', which can be used to make +that portion dim, invisible, or otherwise less visually noticeable. + +With prefix argument ARG, turn on if positive, otherwise off. +Returns non-nil if the new state is enabled. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (make-ring ring-p) "ring" "emacs-lisp/ring.el" +;;;;;; (16211 27026)) +;;; Generated autoloads from emacs-lisp/ring.el + +(autoload (quote ring-p) "ring" "\ +Return t if X is a ring; nil otherwise. + +\(fn X)" nil nil) + +(autoload (quote make-ring) "ring" "\ +Make a ring that can contain SIZE elements. + +\(fn SIZE)" nil nil) + +;;;*** + +;;;### (autoloads (rlogin) "rlogin" "net/rlogin.el" (16211 27037)) +;;; Generated autoloads from net/rlogin.el + (add-hook 'same-window-regexps "^\\*rlogin-.*\\*\\(\\|<[0-9]+>\\)") + +(autoload (quote rlogin) "rlogin" "\ +Open a network login connection via `rlogin' with args INPUT-ARGS. +INPUT-ARGS should start with a host name; it may also contain +other arguments for `rlogin'. + +Input is sent line-at-a-time to the remote connection. + +Communication with the remote host is recorded in a buffer `*rlogin-HOST*' +\(or `*rlogin-USER@HOST*' if the remote username differs). +If a prefix argument is given and the buffer `*rlogin-HOST*' already exists, +a new buffer with a different connection will be made. + +When called from a program, if the optional second argument BUFFER is +a string or buffer, it specifies the buffer to use. + +The variable `rlogin-program' contains the name of the actual program to +run. It can be a relative or absolute path. + +The variable `rlogin-explicit-args' is a list of arguments to give to +the rlogin when starting. They are added after any arguments given in +INPUT-ARGS. + +If the default value of `rlogin-directory-tracking-mode' is t, then the +default directory in that buffer is set to a remote (FTP) file name to +access your home directory on the remote machine. Occasionally this causes +an error, if you cannot access the home directory on that machine. This +error is harmless as long as you don't try to use that default directory. + +If `rlogin-directory-tracking-mode' is neither t nor nil, then the default +directory is initially set up to your (local) home directory. +This is useful if the remote machine and your local machine +share the same files via NFS. This is the default. + +If you wish to change directory tracking styles during a session, use the +function `rlogin-directory-tracking-mode' rather than simply setting the +variable. + +\(fn INPUT-ARGS &optional BUFFER)" t nil) + +;;;*** + +;;;### (autoloads (rmail-set-pop-password rmail-input rmail-mode +;;;;;; rmail rmail-enable-mime rmail-show-message-hook rmail-confirm-expunge +;;;;;; rmail-secondary-file-regexp rmail-secondary-file-directory +;;;;;; rmail-mail-new-frame rmail-primary-inbox-list rmail-delete-after-output +;;;;;; rmail-highlight-face rmail-highlighted-headers rmail-retry-ignored-headers +;;;;;; rmail-displayed-headers rmail-ignored-headers rmail-dont-reply-to-names) +;;;;;; "rmail" "mail/rmail.el" (16296 8718)) +;;; Generated autoloads from mail/rmail.el + +(defvar rmail-dont-reply-to-names nil "\ +*A regexp specifying addresses to prune from a reply message. +A value of nil means exclude your own email address as an address +plus whatever is specified by `rmail-default-dont-reply-to-names'.") + +(custom-autoload (quote rmail-dont-reply-to-names) "rmail") + +(defvar rmail-default-dont-reply-to-names "info-" "\ +A regular expression specifying part of the value of the default value of +the variable `rmail-dont-reply-to-names', for when the user does not set +`rmail-dont-reply-to-names' explicitly. (The other part of the default +value is the user's email address and name.) +It is useful to set this variable in the site customization file.") + +(defvar rmail-ignored-headers (concat "^via:\\|^mail-from:\\|^origin:\\|^references:" "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:" "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:" "\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:" "\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:\\|^face:" "\\|^x-mailer:\\|^delivered-to:\\|^lines:\\|^mime-version:" "\\|^content-transfer-encoding:\\|^x-coding-system:" "\\|^return-path:\\|^errors-to:\\|^return-receipt-to:" "\\|^x-sign:\\|^x-beenthere:\\|^x-mailman-version:" "\\|^precedence:\\|^list-help:\\|^list-post:\\|^list-subscribe:" "\\|^list-id:\\|^list-unsubscribe:\\|^list-archive:" "\\|^content-type:\\|^content-length:" "\\|^x-attribution:\\|^x-disclaimer:\\|^x-trace:" "\\|^x-complaints-to:\\|^nntp-posting-date:\\|^user-agent" "\\|^importance:\\|^envelope-to:\\|^delivery-date" "\\|^x.*-priority:\\|^x-mimeole:") "\ +*Regexp to match header fields that Rmail should normally hide. +This variable is used for reformatting the message header, +which normally happens once for each message, +when you view the message for the first time in Rmail. +To make a change in this variable take effect +for a message that you have already viewed, +go to that message and type \\[rmail-toggle-header] twice.") + +(custom-autoload (quote rmail-ignored-headers) "rmail") + +(defvar rmail-displayed-headers nil "\ +*Regexp to match Header fields that Rmail should display. +If nil, display all header fields except those matched by +`rmail-ignored-headers'.") + +(custom-autoload (quote rmail-displayed-headers) "rmail") + +(defvar rmail-retry-ignored-headers "^x-authentication-warning:" "\ +*Headers that should be stripped when retrying a failed message.") + +(custom-autoload (quote rmail-retry-ignored-headers) "rmail") + +(defvar rmail-highlighted-headers "^From:\\|^Subject:" "\ +*Regexp to match Header fields that Rmail should normally highlight. +A value of nil means don't highlight. +See also `rmail-highlight-face'.") + +(custom-autoload (quote rmail-highlighted-headers) "rmail") + +(defvar rmail-highlight-face nil "\ +*Face used by Rmail for highlighting headers.") + +(custom-autoload (quote rmail-highlight-face) "rmail") + +(defvar rmail-delete-after-output nil "\ +*Non-nil means automatically delete a message that is copied to a file.") + +(custom-autoload (quote rmail-delete-after-output) "rmail") + +(defvar rmail-primary-inbox-list nil "\ +*List of files which are inboxes for user's primary mail file `~/RMAIL'. +nil means the default, which is (\"/usr/spool/mail/$USER\") +\(the name varies depending on the operating system, +and the value of the environment variable MAIL overrides it).") + +(custom-autoload (quote rmail-primary-inbox-list) "rmail") + +(defvar rmail-mail-new-frame nil "\ +*Non-nil means Rmail makes a new frame for composing outgoing mail.") + +(custom-autoload (quote rmail-mail-new-frame) "rmail") + +(defvar rmail-secondary-file-directory "~/" "\ +*Directory for additional secondary Rmail files.") + +(custom-autoload (quote rmail-secondary-file-directory) "rmail") + +(defvar rmail-secondary-file-regexp "\\.xmail$" "\ +*Regexp for which files are secondary Rmail files.") + +(custom-autoload (quote rmail-secondary-file-regexp) "rmail") + +(defvar rmail-confirm-expunge (quote y-or-n-p) "\ +*Whether and how to ask for confirmation before expunging deleted messages.") + +(custom-autoload (quote rmail-confirm-expunge) "rmail") + +(defvar rmail-mode-hook nil "\ +List of functions to call when Rmail is invoked.") + +(defvar rmail-get-new-mail-hook nil "\ +List of functions to call when Rmail has retrieved new mail.") + +(defvar rmail-show-message-hook nil "\ +List of functions to call when Rmail displays a message.") + +(custom-autoload (quote rmail-show-message-hook) "rmail") + +(defvar rmail-quit-hook nil "\ +List of functions to call when quitting out of Rmail.") + +(defvar rmail-delete-message-hook nil "\ +List of functions to call when Rmail deletes a message. +When the hooks are called, the message has been marked deleted but is +still the current message in the Rmail buffer.") + +(defvar rmail-file-coding-system nil "\ +Coding system used in RMAIL file. + +This is set to nil by default.") + +(defvar rmail-enable-mime nil "\ +*If non-nil, RMAIL uses MIME feature. +If the value is t, RMAIL automatically shows MIME decoded message. +If the value is neither t nor nil, RMAIL does not show MIME decoded message +until a user explicitly requires it.") + +(custom-autoload (quote rmail-enable-mime) "rmail") + +(defvar rmail-show-mime-function nil "\ +Function to show MIME decoded message of RMAIL file. +This function is called when `rmail-enable-mime' is non-nil. +It is called with no argument.") + +(defvar rmail-insert-mime-forwarded-message-function nil "\ +Function to insert a message in MIME format so it can be forwarded. +This function is called if `rmail-enable-mime' or +`rmail-enable-mime-composing' is non-nil. +It is called with one argument FORWARD-BUFFER, which is a +buffer containing the message to forward. The current buffer +is the outgoing mail buffer.") + +(defvar rmail-insert-mime-resent-message-function nil "\ +Function to insert a message in MIME format so it can be resent. +This function is called if `rmail-enable-mime' is non-nil. +It is called with one argument FORWARD-BUFFER, which is a +buffer containing the message to forward. The current buffer +is the outgoing mail buffer.") + +(defvar rmail-search-mime-message-function nil "\ +Function to check if a regexp matches a MIME message. +This function is called if `rmail-enable-mime' is non-nil. +It is called with two arguments MSG and REGEXP, where +MSG is the message number, REGEXP is the regular expression.") + +(defvar rmail-search-mime-header-function nil "\ +Function to check if a regexp matches a header of MIME message. +This function is called if `rmail-enable-mime' is non-nil. +It is called with three arguments MSG, REGEXP, and LIMIT, where +MSG is the message number, +REGEXP is the regular expression, +LIMIT is the position specifying the end of header.") + +(defvar rmail-mime-feature (quote rmail-mime) "\ +Feature to require to load MIME support in Rmail. +When starting Rmail, if `rmail-enable-mime' is non-nil, +this feature is required with `require'.") + +(defvar rmail-decode-mime-charset t "\ +*Non-nil means a message is decoded by MIME's charset specification. +If this variable is nil, or the message has not MIME specification, +the message is decoded as normal way. + +If the variable `rmail-enable-mime' is non-nil, this variables is +ignored, and all the decoding work is done by a feature specified by +the variable `rmail-mime-feature'.") + +(defvar rmail-mime-charset-pattern "^content-type:[ ]*text/plain;[ \n]*charset=\"?\\([^ \n\"]+\\)\"?" "\ +Regexp to match MIME-charset specification in a header of message. +The first parenthesized expression should match the MIME-charset name.") + +(autoload (quote rmail) "rmail" "\ +Read and edit incoming mail. +Moves messages into file named by `rmail-file-name' (a babyl format file) + and edits that file in RMAIL Mode. +Type \\[describe-mode] once editing that file, for a list of RMAIL commands. + +May be called with file name as argument; then performs rmail editing on +that file, but does not copy any new mail into the file. +Interactively, if you supply a prefix argument, then you +have a chance to specify a file name with the minibuffer. + +If `rmail-display-summary' is non-nil, make a summary for this RMAIL file. + +\(fn &optional FILE-NAME-ARG)" t nil) + +(autoload (quote rmail-mode) "rmail" "\ +Rmail Mode is used by \\\\[rmail] for editing Rmail files. +All normal editing commands are turned off. +Instead, these commands are available: + +\\[rmail-beginning-of-message] Move point to front of this message (same as \\[beginning-of-buffer]). +\\[scroll-up] Scroll to next screen of this message. +\\[scroll-down] Scroll to previous screen of this message. +\\[rmail-next-undeleted-message] Move to Next non-deleted message. +\\[rmail-previous-undeleted-message] Move to Previous non-deleted message. +\\[rmail-next-message] Move to Next message whether deleted or not. +\\[rmail-previous-message] Move to Previous message whether deleted or not. +\\[rmail-first-message] Move to the first message in Rmail file. +\\[rmail-last-message] Move to the last message in Rmail file. +\\[rmail-show-message] Jump to message specified by numeric position in file. +\\[rmail-search] Search for string and show message it is found in. +\\[rmail-delete-forward] Delete this message, move to next nondeleted. +\\[rmail-delete-backward] Delete this message, move to previous nondeleted. +\\[rmail-undelete-previous-message] Undelete message. Tries current message, then earlier messages + till a deleted message is found. +\\[rmail-edit-current-message] Edit the current message. \\[rmail-cease-edit] to return to Rmail. +\\[rmail-expunge] Expunge deleted messages. +\\[rmail-expunge-and-save] Expunge and save the file. +\\[rmail-quit] Quit Rmail: expunge, save, then switch to another buffer. +\\[save-buffer] Save without expunging. +\\[rmail-get-new-mail] Move new mail from system spool directory into this file. +\\[rmail-mail] Mail a message (same as \\[mail-other-window]). +\\[rmail-continue] Continue composing outgoing message started before. +\\[rmail-reply] Reply to this message. Like \\[rmail-mail] but initializes some fields. +\\[rmail-retry-failure] Send this message again. Used on a mailer failure message. +\\[rmail-forward] Forward this message to another user. +\\[rmail-output-to-rmail-file] Output this message to an Rmail file (append it). +\\[rmail-output] Output this message to a Unix-format mail file (append it). +\\[rmail-output-body-to-file] Save message body to a file. Default filename comes from Subject line. +\\[rmail-input] Input Rmail file. Run Rmail on that file. +\\[rmail-add-label] Add label to message. It will be displayed in the mode line. +\\[rmail-kill-label] Kill label. Remove a label from current message. +\\[rmail-next-labeled-message] Move to Next message with specified label + (label defaults to last one specified). + Standard labels: filed, unseen, answered, forwarded, deleted. + Any other label is present only if you add it with \\[rmail-add-label]. +\\[rmail-previous-labeled-message] Move to Previous message with specified label +\\[rmail-summary] Show headers buffer, with a one line summary of each message. +\\[rmail-summary-by-labels] Summarize only messages with particular label(s). +\\[rmail-summary-by-recipients] Summarize only messages with particular recipient(s). +\\[rmail-summary-by-regexp] Summarize only messages with particular regexp(s). +\\[rmail-summary-by-topic] Summarize only messages with subject line regexp(s). +\\[rmail-toggle-header] Toggle display of complete header. + +\(fn)" t nil) + +(autoload (quote rmail-input) "rmail" "\ +Run Rmail on file FILENAME. + +\(fn FILENAME)" t nil) + +(autoload (quote rmail-set-pop-password) "rmail" "\ +Set PASSWORD to be used for retrieving mail from a POP server. + +\(fn PASSWORD)" t nil) + +;;;*** + +;;;### (autoloads (rmail-edit-current-message) "rmailedit" "mail/rmailedit.el" +;;;;;; (16211 27034)) +;;; Generated autoloads from mail/rmailedit.el + +(autoload (quote rmail-edit-current-message) "rmailedit" "\ +Edit the contents of this message. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (rmail-next-labeled-message rmail-previous-labeled-message +;;;;;; rmail-read-label rmail-kill-label rmail-add-label) "rmailkwd" +;;;;;; "mail/rmailkwd.el" (16211 27034)) +;;; Generated autoloads from mail/rmailkwd.el + +(autoload (quote rmail-add-label) "rmailkwd" "\ +Add LABEL to labels associated with current RMAIL message. +Completion is performed over known labels when reading. + +\(fn STRING)" t nil) + +(autoload (quote rmail-kill-label) "rmailkwd" "\ +Remove LABEL from labels associated with current RMAIL message. +Completion is performed over known labels when reading. + +\(fn STRING)" t nil) + +(autoload (quote rmail-read-label) "rmailkwd" "\ +Not documented + +\(fn PROMPT)" nil nil) + +(autoload (quote rmail-previous-labeled-message) "rmailkwd" "\ +Show previous message with one of the labels LABELS. +LABELS should be a comma-separated list of label names. +If LABELS is empty, the last set of labels specified is used. +With prefix argument N moves backward N messages with these labels. + +\(fn N LABELS)" t nil) + +(autoload (quote rmail-next-labeled-message) "rmailkwd" "\ +Show next message with one of the labels LABELS. +LABELS should be a comma-separated list of label names. +If LABELS is empty, the last set of labels specified is used. +With prefix argument N moves forward N messages with these labels. + +\(fn N LABELS)" t nil) + +;;;*** + +;;;### (autoloads (set-rmail-inbox-list) "rmailmsc" "mail/rmailmsc.el" +;;;;;; (16211 27035)) +;;; Generated autoloads from mail/rmailmsc.el + +(autoload (quote set-rmail-inbox-list) "rmailmsc" "\ +Set the inbox list of the current RMAIL file to FILE-NAME. +You can specify one file name, or several names separated by commas. +If FILE-NAME is empty, remove any existing inbox list. + +\(fn FILE-NAME)" t nil) + +;;;*** + +;;;### (autoloads (rmail-output-body-to-file rmail-output rmail-fields-not-to-output +;;;;;; rmail-output-to-rmail-file rmail-output-file-alist) "rmailout" +;;;;;; "mail/rmailout.el" (16211 27035)) +;;; Generated autoloads from mail/rmailout.el + +(defvar rmail-output-file-alist nil "\ +*Alist matching regexps to suggested output Rmail files. +This is a list of elements of the form (REGEXP . NAME-EXP). +The suggestion is taken if REGEXP matches anywhere in the message buffer. +NAME-EXP may be a string constant giving the file name to use, +or more generally it may be any kind of expression that returns +a file name as a string.") + +(custom-autoload (quote rmail-output-file-alist) "rmailout") + +(autoload (quote rmail-output-to-rmail-file) "rmailout" "\ +Append the current message to an Rmail file named FILE-NAME. +If the file does not exist, ask if it should be created. +If file is being visited, the message is appended to the Emacs +buffer visiting that file. +If the file exists and is not an Rmail file, the message is +appended in inbox format, the same way `rmail-output' does it. + +The default file name comes from `rmail-default-rmail-file', +which is updated to the name you use in this command. + +A prefix argument N says to output N consecutive messages +starting with the current one. Deleted messages are skipped and don't count. + +If optional argument STAY is non-nil, then leave the last filed +mesasge up instead of moving forward to the next non-deleted message. + +\(fn FILE-NAME &optional COUNT STAY)" t nil) + +(defvar rmail-fields-not-to-output nil "\ +*Regexp describing fields to exclude when outputting a message to a file.") + +(custom-autoload (quote rmail-fields-not-to-output) "rmailout") + +(autoload (quote rmail-output) "rmailout" "\ +Append this message to system-inbox-format mail file named FILE-NAME. +A prefix argument N says to output N consecutive messages +starting with the current one. Deleted messages are skipped and don't count. +When called from lisp code, N may be omitted. + +If the pruned message header is shown on the current message, then +messages will be appended with pruned headers; otherwise, messages +will be appended with their original headers. + +The default file name comes from `rmail-default-file', +which is updated to the name you use in this command. + +The optional third argument NOATTRIBUTE, if non-nil, says not +to set the `filed' attribute, and not to display a message. + +The optional fourth argument FROM-GNUS is set when called from GNUS. + +\(fn FILE-NAME &optional COUNT NOATTRIBUTE FROM-GNUS)" t nil) + +(autoload (quote rmail-output-body-to-file) "rmailout" "\ +Write this message body to the file FILE-NAME. +FILE-NAME defaults, interactively, from the Subject field of the message. + +\(fn FILE-NAME)" t nil) + +;;;*** + +;;;### (autoloads (rmail-sort-by-labels rmail-sort-by-lines rmail-sort-by-correspondent +;;;;;; rmail-sort-by-recipient rmail-sort-by-author rmail-sort-by-subject +;;;;;; rmail-sort-by-date) "rmailsort" "mail/rmailsort.el" (16211 +;;;;;; 27036)) +;;; Generated autoloads from mail/rmailsort.el + +(autoload (quote rmail-sort-by-date) "rmailsort" "\ +Sort messages of current Rmail file by date. +If prefix argument REVERSE is non-nil, sort them in reverse order. + +\(fn REVERSE)" t nil) + +(autoload (quote rmail-sort-by-subject) "rmailsort" "\ +Sort messages of current Rmail file by subject. +If prefix argument REVERSE is non-nil, sort them in reverse order. + +\(fn REVERSE)" t nil) + +(autoload (quote rmail-sort-by-author) "rmailsort" "\ +Sort messages of current Rmail file by author. +If prefix argument REVERSE is non-nil, sort them in reverse order. + +\(fn REVERSE)" t nil) + +(autoload (quote rmail-sort-by-recipient) "rmailsort" "\ +Sort messages of current Rmail file by recipient. +If prefix argument REVERSE is non-nil, sort them in reverse order. + +\(fn REVERSE)" t nil) + +(autoload (quote rmail-sort-by-correspondent) "rmailsort" "\ +Sort messages of current Rmail file by other correspondent. +If prefix argument REVERSE is non-nil, sort them in reverse order. + +\(fn REVERSE)" t nil) + +(autoload (quote rmail-sort-by-lines) "rmailsort" "\ +Sort messages of current Rmail file by number of lines. +If prefix argument REVERSE is non-nil, sort them in reverse order. + +\(fn REVERSE)" t nil) + +(autoload (quote rmail-sort-by-labels) "rmailsort" "\ +Sort messages of current Rmail file by labels. +If prefix argument REVERSE is non-nil, sort them in reverse order. +KEYWORDS is a comma-separated list of labels. + +\(fn REVERSE LABELS)" t nil) + +;;;*** + +;;;### (autoloads (rmail-user-mail-address-regexp rmail-summary-line-decoder +;;;;;; rmail-summary-by-senders rmail-summary-by-topic rmail-summary-by-regexp +;;;;;; rmail-summary-by-recipients rmail-summary-by-labels rmail-summary +;;;;;; rmail-summary-line-count-flag rmail-summary-scroll-between-messages) +;;;;;; "rmailsum" "mail/rmailsum.el" (16292 22309)) +;;; Generated autoloads from mail/rmailsum.el + +(defvar rmail-summary-scroll-between-messages t "\ +*Non-nil means Rmail summary scroll commands move between messages.") + +(custom-autoload (quote rmail-summary-scroll-between-messages) "rmailsum") + +(defvar rmail-summary-line-count-flag t "\ +*Non-nil means Rmail summary should show the number of lines in each message.") + +(custom-autoload (quote rmail-summary-line-count-flag) "rmailsum") + +(autoload (quote rmail-summary) "rmailsum" "\ +Display a summary of all messages, one line per message. + +\(fn)" t nil) + +(autoload (quote rmail-summary-by-labels) "rmailsum" "\ +Display a summary of all messages with one or more LABELS. +LABELS should be a string containing the desired labels, separated by commas. + +\(fn LABELS)" t nil) + +(autoload (quote rmail-summary-by-recipients) "rmailsum" "\ +Display a summary of all messages with the given RECIPIENTS. +Normally checks the To, From and Cc fields of headers; +but if PRIMARY-ONLY is non-nil (prefix arg given), + only look in the To and From fields. +RECIPIENTS is a string of regexps separated by commas. + +\(fn RECIPIENTS &optional PRIMARY-ONLY)" t nil) + +(autoload (quote rmail-summary-by-regexp) "rmailsum" "\ +Display a summary of all messages according to regexp REGEXP. +If the regular expression is found in the header of the message +\(including in the date and other lines, as well as the subject line), +Emacs will list the header line in the RMAIL-summary. + +\(fn REGEXP)" t nil) + +(autoload (quote rmail-summary-by-topic) "rmailsum" "\ +Display a summary of all messages with the given SUBJECT. +Normally checks the Subject field of headers; +but if WHOLE-MESSAGE is non-nil (prefix arg given), + look in the whole message. +SUBJECT is a string of regexps separated by commas. + +\(fn SUBJECT &optional WHOLE-MESSAGE)" t nil) + +(autoload (quote rmail-summary-by-senders) "rmailsum" "\ +Display a summary of all messages with the given SENDERS. +SENDERS is a string of names separated by commas. + +\(fn SENDERS)" t nil) + +(defvar rmail-summary-line-decoder (function identity) "\ +*Function to decode summary-line. + +By default, `identity' is set.") + +(custom-autoload (quote rmail-summary-line-decoder) "rmailsum") + +(defvar rmail-user-mail-address-regexp nil "\ +*Regexp matching user mail addresses. +If non-nil, this variable is used to identify the correspondent +when receiving new mail. If it matches the address of the sender, +the recipient is taken as correspondent of a mail. +If nil (default value), your `user-login-name' and `user-mail-address' +are used to exclude yourself as correspondent. + +Usually you don't have to set this variable, except if you collect mails +sent by you under different user names. +Then it should be a regexp matching your mail addresses. + +Setting this variable has an effect only before reading a mail.") + +(custom-autoload (quote rmail-user-mail-address-regexp) "rmailsum") + +;;;*** + +;;;### (autoloads (news-post-news) "rnewspost" "obsolete/rnewspost.el" +;;;;;; (16211 27037)) +;;; Generated autoloads from obsolete/rnewspost.el + +(autoload (quote news-post-news) "rnewspost" "\ +Begin editing a new USENET news article to be posted. +Type \\[describe-mode] once editing the article to get a list of commands. +If NOQUERY is non-nil, we do not query before doing the work. + +\(fn &optional NOQUERY)" t nil) + +;;;*** + +;;;### (autoloads (toggle-rot13-mode rot13-other-window rot13-region +;;;;;; rot13-string rot13) "rot13" "rot13.el" (16211 27018)) +;;; Generated autoloads from rot13.el + +(autoload (quote rot13) "rot13" "\ +Return Rot13 encryption of OBJECT, a buffer or string. + +\(fn OBJECT &optional START END)" nil nil) + +(autoload (quote rot13-string) "rot13" "\ +Return Rot13 encryption of STRING. + +\(fn STRING)" nil nil) + +(autoload (quote rot13-region) "rot13" "\ +Rot13 encrypt the region between START and END in current buffer. + +\(fn START END)" t nil) + +(autoload (quote rot13-other-window) "rot13" "\ +Display current buffer in rot 13 in another window. +The text itself is not modified, only the way it is displayed is affected. + +To terminate the rot13 display, delete that window. As long as that window +is not deleted, any buffer displayed in it will become instantly encoded +in rot 13. + +See also `toggle-rot13-mode'. + +\(fn)" t nil) + +(autoload (quote toggle-rot13-mode) "rot13" "\ +Toggle the use of rot 13 encoding for the current window. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (resize-minibuffer-mode resize-minibuffer-frame-exactly +;;;;;; resize-minibuffer-frame-max-height resize-minibuffer-frame +;;;;;; resize-minibuffer-window-exactly resize-minibuffer-window-max-height +;;;;;; resize-minibuffer-mode) "rsz-mini" "obsolete/rsz-mini.el" +;;;;;; (16211 27037)) +;;; Generated autoloads from obsolete/rsz-mini.el + +(defvar resize-minibuffer-mode nil "\ +*This variable is obsolete.") + +(custom-autoload (quote resize-minibuffer-mode) "rsz-mini") + +(defvar resize-minibuffer-window-max-height nil "\ +*This variable is obsolete.") + +(custom-autoload (quote resize-minibuffer-window-max-height) "rsz-mini") + +(defvar resize-minibuffer-window-exactly t "\ +*This variable is obsolete.") + +(custom-autoload (quote resize-minibuffer-window-exactly) "rsz-mini") + +(defvar resize-minibuffer-frame nil "\ +*This variable is obsolete.") + +(custom-autoload (quote resize-minibuffer-frame) "rsz-mini") + +(defvar resize-minibuffer-frame-max-height nil "\ +*This variable is obsolete.") + +(custom-autoload (quote resize-minibuffer-frame-max-height) "rsz-mini") + +(defvar resize-minibuffer-frame-exactly t "\ +*This variable is obsolete.") + +(custom-autoload (quote resize-minibuffer-frame-exactly) "rsz-mini") + +(autoload (quote resize-minibuffer-mode) "rsz-mini" "\ +This function is obsolete. + +\(fn &optional PREFIX)" t nil) + +;;;*** + +;;;### (autoloads (ruler-mode) "ruler-mode" "ruler-mode.el" (16277 +;;;;;; 42321)) +;;; Generated autoloads from ruler-mode.el + +(autoload (quote ruler-mode) "ruler-mode" "\ +Display a ruler in the header line if ARG > 0. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (16292 +;;;;;; 22309)) +;;; Generated autoloads from emacs-lisp/rx.el + +(autoload (quote rx-to-string) "rx" "\ +Parse and produce code for regular expression FORM. +FORM is a regular expression in sexp form. +NO-GROUP non-nil means don't put shy groups around the result. + +\(fn FORM &optional NO-GROUP)" nil nil) + +(autoload (quote rx) "rx" "\ +Translate a regular expression REGEXP in sexp form to a regexp string. +See also `rx-to-string' for how to do such a translation at run-time. + +The following are valid subforms of regular expressions in sexp +notation. + +STRING + matches string STRING literally. + +CHAR + matches character CHAR literally. + +`not-newline' + matches any character except a newline. + . +`anything' + matches any character + +`(any SET)' + matches any character in SET. SET may be a character or string. + Ranges of characters can be specified as `A-Z' in strings. + +'(in SET)' + like `any'. + +`(not (any SET))' + matches any character not in SET + +`line-start' + matches the empty string, but only at the beginning of a line + in the text being matched + +`line-end' + is similar to `line-start' but matches only at the end of a line + +`string-start' + matches the empty string, but only at the beginning of the + string being matched against. + +`string-end' + matches the empty string, but only at the end of the + string being matched against. + +`buffer-start' + matches the empty string, but only at the beginning of the + buffer being matched against. + +`buffer-end' + matches the empty string, but only at the end of the + buffer being matched against. + +`point' + matches the empty string, but only at point. + +`word-start' + matches the empty string, but only at the beginning or end of a + word. + +`word-end' + matches the empty string, but only at the end of a word. + +`word-boundary' + matches the empty string, but only at the beginning or end of a + word. + +`(not word-boundary)' + matches the empty string, but not at the beginning or end of a + word. + +`digit' + matches 0 through 9. + +`control' + matches ASCII control characters. + +`hex-digit' + matches 0 through 9, a through f and A through F. + +`blank' + matches space and tab only. + +`graphic' + matches graphic characters--everything except ASCII control chars, + space, and DEL. + +`printing' + matches printing characters--everything except ASCII control chars + and DEL. + +`alphanumeric' + matches letters and digits. (But at present, for multibyte characters, + it matches anything that has word syntax.) + +`letter' + matches letters. (But at present, for multibyte characters, + it matches anything that has word syntax.) + +`ascii' + matches ASCII (unibyte) characters. + +`nonascii' + matches non-ASCII (multibyte) characters. + +`lower' + matches anything lower-case. + +`upper' + matches anything upper-case. + +`punctuation' + matches punctuation. (But at present, for multibyte characters, + it matches anything that has non-word syntax.) + +`space' + matches anything that has whitespace syntax. + +`word' + matches anything that has word syntax. + +`(syntax SYNTAX)' + matches a character with syntax SYNTAX. SYNTAX must be one + of the following symbols. + + `whitespace' (\\s- in string notation) + `punctuation' (\\s.) + `word' (\\sw) + `symbol' (\\s_) + `open-parenthesis' (\\s() + `close-parenthesis' (\\s)) + `expression-prefix' (\\s') + `string-quote' (\\s\") + `paired-delimiter' (\\s$) + `escape' (\\s\\) + `character-quote' (\\s/) + `comment-start' (\\s<) + `comment-end' (\\s>) + +`(not (syntax SYNTAX))' + matches a character that has not syntax SYNTAX. + +`(category CATEGORY)' + matches a character with category CATEGORY. CATEGORY must be + either a character to use for C, or one of the following symbols. + + `consonant' (\\c0 in string notation) + `base-vowel' (\\c1) + `upper-diacritical-mark' (\\c2) + `lower-diacritical-mark' (\\c3) + `tone-mark' (\\c4) + `symbol' (\\c5) + `digit' (\\c6) + `vowel-modifying-diacritical-mark' (\\c7) + `vowel-sign' (\\c8) + `semivowel-lower' (\\c9) + `not-at-end-of-line' (\\c<) + `not-at-beginning-of-line' (\\c>) + `alpha-numeric-two-byte' (\\cA) + `chinse-two-byte' (\\cC) + `greek-two-byte' (\\cG) + `japanese-hiragana-two-byte' (\\cH) + `indian-tow-byte' (\\cI) + `japanese-katakana-two-byte' (\\cK) + `korean-hangul-two-byte' (\\cN) + `cyrillic-two-byte' (\\cY) + `ascii' (\\ca) + `arabic' (\\cb) + `chinese' (\\cc) + `ethiopic' (\\ce) + `greek' (\\cg) + `korean' (\\ch) + `indian' (\\ci) + `japanese' (\\cj) + `japanese-katakana' (\\ck) + `latin' (\\cl) + `lao' (\\co) + `tibetan' (\\cq) + `japanese-roman' (\\cr) + `thai' (\\ct) + `vietnamese' (\\cv) + `hebrew' (\\cw) + `cyrillic' (\\cy) + `can-break' (\\c|) + +`(not (category CATEGORY))' + matches a character that has not category CATEGORY. + +`(and SEXP1 SEXP2 ...)' + matches what SEXP1 matches, followed by what SEXP2 matches, etc. + +`(submatch SEXP1 SEXP2 ...)' + like `and', but makes the match accessible with `match-end', + `match-beginning', and `match-string'. + +`(group SEXP1 SEXP2 ...)' + another name for `submatch'. + +`(or SEXP1 SEXP2 ...)' + matches anything that matches SEXP1 or SEXP2, etc. If all + args are strings, use `regexp-opt' to optimize the resulting + regular expression. + +`(minimal-match SEXP)' + produce a non-greedy regexp for SEXP. Normally, regexps matching + zero or more occurrances of something are \"greedy\" in that they + match as much as they can, as long as the overall regexp can + still match. A non-greedy regexp matches as little as possible. + +`(maximal-match SEXP)' + produce a greedy regexp for SEXP. This is the default. + +`(zero-or-more SEXP)' + matches zero or more occurrences of what SEXP matches. + +`(0+ SEXP)' + like `zero-or-more'. + +`(* SEXP)' + like `zero-or-more', but always produces a greedy regexp. + +`(*? SEXP)' + like `zero-or-more', but always produces a non-greedy regexp. + +`(one-or-more SEXP)' + matches one or more occurrences of A. + +`(1+ SEXP)' + like `one-or-more'. + +`(+ SEXP)' + like `one-or-more', but always produces a greedy regexp. + +`(+? SEXP)' + like `one-or-more', but always produces a non-greedy regexp. + +`(zero-or-one SEXP)' + matches zero or one occurrences of A. + +`(optional SEXP)' + like `zero-or-one'. + +`(? SEXP)' + like `zero-or-one', but always produces a greedy regexp. + +`(?? SEXP)' + like `zero-or-one', but always produces a non-greedy regexp. + +`(repeat N SEXP)' + matches N occurrences of what SEXP matches. + +`(repeat N M SEXP)' + matches N to M occurrences of what SEXP matches. + +`(eval FORM)' + evaluate FORM and insert result. If result is a string, + `regexp-quote' it. + +`(regexp REGEXP)' + include REGEXP in string notation in the result. + +\(fn REGEXP)" nil (quote macro)) + +;;;*** + +;;;### (autoloads (dsssl-mode scheme-mode) "scheme" "progmodes/scheme.el" +;;;;;; (16249 27909)) +;;; Generated autoloads from progmodes/scheme.el + +(autoload (quote scheme-mode) "scheme" "\ +Major mode for editing Scheme code. +Editing commands are similar to those of `lisp-mode'. + +In addition, if an inferior Scheme process is running, some additional +commands will be defined, for evaluating expressions and controlling +the interpreter, and the state of the process will be displayed in the +modeline of all Scheme buffers. The names of commands that interact +with the Scheme process start with \"xscheme-\" if you use the MIT +Scheme-specific `xscheme' package; for more information see the +documentation for `xscheme-interaction-mode'. Use \\[run-scheme] to +start an inferior Scheme using the more general `cmuscheme' package. + +Commands: +Delete converts tabs to spaces as it moves back. +Blank lines separate paragraphs. Semicolons start comments. +\\{scheme-mode-map} +Entry to this mode calls the value of `scheme-mode-hook' +if that value is non-nil. + +\(fn)" t nil) + +(autoload (quote dsssl-mode) "scheme" "\ +Major mode for editing DSSSL code. +Editing commands are similar to those of `lisp-mode'. + +Commands: +Delete converts tabs to spaces as it moves back. +Blank lines separate paragraphs. Semicolons start comments. +\\{scheme-mode-map} +Entering this mode runs the hooks `scheme-mode-hook' and then +`dsssl-mode-hook' and inserts the value of `dsssl-sgml-declaration' if +that variable's value is a string. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (gnus-score-mode) "score-mode" "gnus/score-mode.el" +;;;;;; (16211 27031)) +;;; Generated autoloads from gnus/score-mode.el + +(autoload (quote gnus-score-mode) "score-mode" "\ +Mode for editing Gnus score files. +This mode is an extended emacs-lisp mode. + +\\{gnus-score-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (scribe-mode) "scribe" "obsolete/scribe.el" (16211 +;;;;;; 27037)) +;;; Generated autoloads from obsolete/scribe.el + +(autoload (quote scribe-mode) "scribe" "\ +Major mode for editing files of Scribe (a text formatter) source. +Scribe-mode is similar to text-mode, with a few extra commands added. +\\{scribe-mode-map} + +Interesting variables: + +`scribe-fancy-paragraphs' + Non-nil makes Scribe mode use a different style of paragraph separation. + +`scribe-electric-quote' + Non-nil makes insert of double quote use `` or '' depending on context. + +`scribe-electric-parenthesis' + Non-nil makes an open-parenthesis char (one of `([<{') + automatically insert its close if typed after an @Command form. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (scroll-all-mode) "scroll-all" "scroll-all.el" +;;;;;; (16211 27018)) +;;; Generated autoloads from scroll-all.el + +(defvar scroll-all-mode nil "\ +Non-nil if Scroll-All mode is enabled. +See the command `scroll-all-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `scroll-all-mode'.") + +(custom-autoload (quote scroll-all-mode) "scroll-all") + +(autoload (quote scroll-all-mode) "scroll-all" "\ +Toggle Scroll-All minor mode. +With ARG, turn Scroll-All minor mode on if ARG is positive, off otherwise. +When Scroll-All mode is on, scrolling commands entered in one window +apply to all visible windows in the same frame. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (mail-other-frame mail-other-window mail mail-mode +;;;;;; mail-default-directory mail-signature mail-personal-alias-file +;;;;;; mail-alias-file mail-default-reply-to mail-archive-file-name +;;;;;; mail-header-separator send-mail-function mail-yank-ignored-headers +;;;;;; mail-interactive mail-self-blind mail-specify-envelope-from +;;;;;; mail-from-style) "sendmail" "mail/sendmail.el" (16249 31404)) +;;; Generated autoloads from mail/sendmail.el + +(defvar mail-from-style (quote angles) "\ +*Specifies how \"From:\" fields look. + +If `nil', they contain just the return address like: + king@grassland.com +If `parens', they look like: + king@grassland.com (Elvis Parsley) +If `angles', they look like: + Elvis Parsley +If `system-default', allows the mailer to insert its default From field +derived from the envelope-from address. + +In old versions of Emacs, the `system-default' setting also caused +Emacs to pass the proper email address from `user-mail-address' +to the mailer to specify the envelope-from address. But that is now +controlled by a separate variable, `mail-specify-envelope-from'.") + +(custom-autoload (quote mail-from-style) "sendmail") + +(defvar mail-specify-envelope-from nil "\ +*If non-nil, specify the envelope-from address when sending mail. +The value used to specify it is whatever is found in +the variable `mail-envelope-from', with `user-mail-address' as fallback. + +On most systems, specifying the envelope-from address is a +privileged operation. This variable affects sendmail and +smtpmail -- if you use feedmail to send mail, see instead the +variable `feedmail-deduce-envelope-from'.") + +(custom-autoload (quote mail-specify-envelope-from) "sendmail") + +(defvar mail-self-blind nil "\ +*Non-nil means insert BCC to self in messages to be sent. +This is done when the message is initialized, +so you can remove or alter the BCC field to override the default.") + +(custom-autoload (quote mail-self-blind) "sendmail") + +(defvar mail-interactive nil "\ +*Non-nil means when sending a message wait for and display errors. +nil means let mailer mail back a message to report errors.") + +(custom-autoload (quote mail-interactive) "sendmail") + +(defvar mail-yank-ignored-headers "^via:\\|^mail-from:\\|^origin:\\|^status:\\|^remailed\\|^received:\\|^message-id:\\|^summary-line:\\|^to:\\|^subject:\\|^in-reply-to:\\|^return-path:" "\ +*Delete these headers from old message when it's inserted in a reply.") + +(custom-autoload (quote mail-yank-ignored-headers) "sendmail") + +(defvar send-mail-function (quote sendmail-send-it) "\ +Function to call to send the current buffer as mail. +The headers should be delimited by a line which is +not a valid RFC822 header or continuation line, +that matches the variable `mail-header-separator'. +This is used by the default mail-sending commands. See also +`message-send-mail-function' for use with the Message package.") + +(custom-autoload (quote send-mail-function) "sendmail") + +(defvar mail-header-separator "--text follows this line--" "\ +*Line used to separate headers from text in messages being composed.") + +(custom-autoload (quote mail-header-separator) "sendmail") + +(defvar mail-archive-file-name nil "\ +*Name of file to write all outgoing messages in, or nil for none. +This can be an inbox file or an Rmail file.") + +(custom-autoload (quote mail-archive-file-name) "sendmail") + +(defvar mail-default-reply-to nil "\ +*Address to insert as default Reply-to field of outgoing messages. +If nil, it will be initialized from the REPLYTO environment variable +when you first send mail.") + +(custom-autoload (quote mail-default-reply-to) "sendmail") + +(defvar mail-alias-file nil "\ +*If non-nil, the name of a file to use instead of `/usr/lib/aliases'. +This file defines aliases to be expanded by the mailer; this is a different +feature from that of defining aliases in `.mailrc' to be expanded in Emacs. +This variable has no effect unless your system uses sendmail as its mailer.") + +(custom-autoload (quote mail-alias-file) "sendmail") + +(defvar mail-personal-alias-file "~/.mailrc" "\ +*If non-nil, the name of the user's personal mail alias file. +This file typically should be in same format as the `.mailrc' file used by +the `Mail' or `mailx' program. +This file need not actually exist.") + +(custom-autoload (quote mail-personal-alias-file) "sendmail") + +(defvar mail-signature nil "\ +*Text inserted at end of mail buffer when a message is initialized. +If t, it means to insert the contents of the file `mail-signature-file'. +If a string, that string is inserted. + (To make a proper signature, the string should begin with \\n\\n-- \\n, + which is the standard way to delimit a signature in a message.) +Otherwise, it should be an expression; it is evaluated +and should insert whatever you want to insert.") + +(custom-autoload (quote mail-signature) "sendmail") + +(defvar mail-default-directory "~/" "\ +*Directory for mail buffers. +Value of `default-directory' for mail buffers. +This directory is used for auto-save files of mail buffers.") + +(custom-autoload (quote mail-default-directory) "sendmail") + +(autoload (quote mail-mode) "sendmail" "\ +Major mode for editing mail to be sent. +Like Text Mode but with these additional commands: +\\[mail-send] mail-send (send the message) \\[mail-send-and-exit] mail-send-and-exit +Here are commands that move to a header field (and create it if there isn't): + \\[mail-to] move to To: \\[mail-subject] move to Subject: + \\[mail-cc] move to CC: \\[mail-bcc] move to BCC: + \\[mail-fcc] move to FCC: \\[mail-reply-to] move to Reply-To: +\\[mail-text] mail-text (move to beginning of message text). +\\[mail-signature] mail-signature (insert `mail-signature-file' file). +\\[mail-yank-original] mail-yank-original (insert current message, in Rmail). +\\[mail-fill-yanked-message] mail-fill-yanked-message (fill what was yanked). +\\[mail-sent-via] mail-sent-via (add a Sent-via field for each To or CC). +Turning on Mail mode runs the normal hooks `text-mode-hook' and +`mail-mode-hook' (in that order). + +\(fn)" t nil) + +(defvar sendmail-coding-system nil "\ +*Coding system for encoding the outgoing mail. +This has higher priority than `default-buffer-file-coding-system' +and `default-sendmail-coding-system', +but lower priority than the local value of `buffer-file-coding-system'. +See also the function `select-message-coding-system'.") + +(defvar default-sendmail-coding-system (quote iso-latin-1) "\ +Default coding system for encoding the outgoing mail. +This variable is used only when `sendmail-coding-system' is nil. + +This variable is set/changed by the command set-language-environment. +User should not set this variable manually, +instead use sendmail-coding-system to get a constant encoding +of outgoing mails regardless of the current language environment. +See also the function `select-message-coding-system'.") + (add-hook 'same-window-buffer-names "*mail*") + +(autoload (quote mail) "sendmail" "\ +Edit a message to be sent. Prefix arg means resume editing (don't erase). +When this function returns, the buffer `*mail*' is selected. +The value is t if the message was newly initialized; otherwise, nil. + +Optionally, the signature file `mail-signature-file' can be inserted at the +end; see the variable `mail-signature'. + +\\ +While editing message, type \\[mail-send-and-exit] to send the message and exit. + +Various special commands starting with C-c are available in sendmail mode +to move to message header fields: +\\{mail-mode-map} + +If `mail-self-blind' is non-nil, a BCC to yourself is inserted +when the message is initialized. + +If `mail-default-reply-to' is non-nil, it should be an address (a string); +a Reply-to: field with that address is inserted. + +If `mail-archive-file-name' is non-nil, an FCC field with that file name +is inserted. + +The normal hook `mail-setup-hook' is run after the message is +initialized. It can add more default fields to the message. + +When calling from a program, the first argument if non-nil says +not to erase the existing contents of the `*mail*' buffer. + +The second through fifth arguments, + TO, SUBJECT, IN-REPLY-TO and CC, specify if non-nil + the initial contents of those header fields. + These arguments should not have final newlines. +The sixth argument REPLYBUFFER is a buffer which contains an + original message being replied to, or else an action + of the form (FUNCTION . ARGS) which says how to insert the original. + Or it can be nil, if not replying to anything. +The seventh argument ACTIONS is a list of actions to take + if/when the message is sent. Each action looks like (FUNCTION . ARGS); + when the message is sent, we apply FUNCTION to ARGS. + This is how Rmail arranges to mark messages `answered'. + +\(fn &optional NOERASE TO SUBJECT IN-REPLY-TO CC REPLYBUFFER ACTIONS)" t nil) + +(autoload (quote mail-other-window) "sendmail" "\ +Like `mail' command, but display mail buffer in another window. + +\(fn &optional NOERASE TO SUBJECT IN-REPLY-TO CC REPLYBUFFER SENDACTIONS)" t nil) + +(autoload (quote mail-other-frame) "sendmail" "\ +Like `mail' command, but display mail buffer in another frame. + +\(fn &optional NOERASE TO SUBJECT IN-REPLY-TO CC REPLYBUFFER SENDACTIONS)" t nil) + +;;;*** + +;;;### (autoloads (server-mode server-start) "server" "server.el" +;;;;;; (16211 27018)) +;;; Generated autoloads from server.el + +(autoload (quote server-start) "server" "\ +Allow this Emacs process to be a server for client processes. +This starts a server communications subprocess through which +client \"editors\" can send your editing commands to this Emacs job. +To use the server, set up the program `emacsclient' in the +Emacs distribution as your standard \"editor\". + +Prefix arg means just kill any existing server communications subprocess. + +\(fn &optional LEAVE-DEAD)" t nil) + +(defvar server-mode nil "\ +Non-nil if Server mode is enabled. +See the command `server-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `server-mode'.") + +(custom-autoload (quote server-mode) "server") + +(autoload (quote server-mode) "server" "\ +Toggle Server mode. +With ARG, turn Server mode on if ARG is positive, off otherwise. +Server mode runs a process that accepts commands from the +`emacsclient' program. See `server-start' and Info node `Emacs server'. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (ses-mode) "ses" "ses.el" (16211 27018)) +;;; Generated autoloads from ses.el + +(autoload (quote ses-mode) "ses" "\ +Major mode for Simple Emacs Spreadsheet. See \"ses-readme.txt\" for more info. + +Key definitions: +\\{ses-mode-map} +These key definitions are active only in the print area (the visible part): +\\{ses-mode-print-map} +These are active only in the minibuffer, when entering or editing a formula: +\\{ses-mode-edit-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (html-mode sgml-mode) "sgml-mode" "textmodes/sgml-mode.el" +;;;;;; (16211 27044)) +;;; Generated autoloads from textmodes/sgml-mode.el + +(autoload (quote sgml-mode) "sgml-mode" "\ +Major mode for editing SGML documents. +Makes > match <. +Keys <, &, SPC within <>, \", / and ' can be electric depending on +`sgml-quick-keys'. + +An argument of N to a tag-inserting command means to wrap it around +the next N words. In Transient Mark mode, when the mark is active, +N defaults to -1, which means to wrap it around the current region. + +If you like upcased tags, put (setq sgml-transformation 'upcase) in +your `.emacs' file. + +Use \\[sgml-validate] to validate your document with an SGML parser. + +Do \\[describe-variable] sgml- SPC to see available variables. +Do \\[describe-key] on the following bindings to discover what they do. +\\{sgml-mode-map} + +\(fn)" t nil) + +(defalias (quote xml-mode) (quote sgml-mode)) + +(autoload (quote html-mode) "sgml-mode" "\ +Major mode based on SGML mode for editing HTML documents. +This allows inserting skeleton constructs used in hypertext documents with +completion. See below for an introduction to HTML. Use +\\[browse-url-of-buffer] to see how this comes out. See also `sgml-mode' on +which this is based. + +Do \\[describe-variable] html- SPC and \\[describe-variable] sgml- SPC to see available variables. + +To write fairly well formatted pages you only need to know few things. Most +browsers have a function to read the source code of the page being seen, so +you can imitate various tricks. Here's a very short HTML primer which you +can also view with a browser to see what happens: + +A Title Describing Contents should be on every page. Pages can +have

Very Major Headlines

through
Very Minor Headlines
+
Parts can be separated with horizontal rules. + +

Paragraphs only need an opening tag. Line breaks and multiple spaces are +ignored unless the text is

preformatted.
Text can be marked as +bold, italic or underlined using the normal M-g or +Edit/Text Properties/Face commands. + +Pages can have named points and can link other points +to them with see also somename. In the same way see also URL where URL is a filename relative to current +directory, or absolute as in `http://www.cs.indiana.edu/elisp/w3/docs.html'. + +Images in many formats can be inlined with . + +If you mainly create your own documents, `sgml-specials' might be +interesting. But note that some HTML 2 browsers can't handle `''. +To work around that, do: + (eval-after-load \"sgml-mode\" '(aset sgml-char-names ?' nil)) + +\\{html-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (sh-mode) "sh-script" "progmodes/sh-script.el" +;;;;;; (16256 53160)) +;;; Generated autoloads from progmodes/sh-script.el + +(autoload (quote sh-mode) "sh-script" "\ +Major mode for editing shell scripts. +This mode works for many shells, since they all have roughly the same syntax, +as far as commands, arguments, variables, pipes, comments etc. are concerned. +Unless the file's magic number indicates the shell, your usual shell is +assumed. Since filenames rarely give a clue, they are not further analyzed. + +This mode adapts to the variations between shells (see `sh-set-shell') by +means of an inheritance based feature lookup (see `sh-feature'). This +mechanism applies to all variables (including skeletons) that pertain to +shell-specific features. + +The default style of this mode is that of Rosenblatt's Korn shell book. +The syntax of the statements varies with the shell being used. The +following commands are available, based on the current shell's syntax: + +\\[sh-case] case statement +\\[sh-for] for loop +\\[sh-function] function definition +\\[sh-if] if statement +\\[sh-indexed-loop] indexed loop from 1 to n +\\[sh-while-getopts] while getopts loop +\\[sh-repeat] repeat loop +\\[sh-select] select loop +\\[sh-until] until loop +\\[sh-while] while loop + +For sh and rc shells indentation commands are: +\\[sh-show-indent] Show the variable controlling this line's indentation. +\\[sh-set-indent] Set then variable controlling this line's indentation. +\\[sh-learn-line-indent] Change the indentation variable so this line +would indent to the way it currently is. +\\[sh-learn-buffer-indent] Set the indentation variables so the +buffer indents as it currently is indented. + + +\\[backward-delete-char-untabify] Delete backward one position, even if it was a tab. +\\[sh-newline-and-indent] Delete unquoted space and indent new line same as this one. +\\[sh-end-of-command] Go to end of successive commands. +\\[sh-beginning-of-command] Go to beginning of successive commands. +\\[sh-set-shell] Set this buffer's shell, and maybe its magic number. +\\[sh-execute-region] Have optional header and region be executed in a subshell. + +\\[sh-maybe-here-document] Without prefix, following an unquoted < inserts here document. +{, (, [, ', \", ` + Unless quoted with \\, insert the pairs {}, (), [], or '', \"\", ``. + +If you generally program a shell different from your login shell you can +set `sh-shell-file' accordingly. If your shell's file name doesn't correctly +indicate what shell it is use `sh-alias-alist' to translate. + +If your shell gives error messages with line numbers, you can use \\[executable-interpret] +with your script for an edit-interpret-debug cycle. + +\(fn)" t nil) + +(defalias (quote shell-script-mode) (quote sh-mode)) + +;;;*** + +;;;### (autoloads (list-load-path-shadows) "shadow" "emacs-lisp/shadow.el" +;;;;;; (16211 27026)) +;;; Generated autoloads from emacs-lisp/shadow.el + +(autoload (quote list-load-path-shadows) "shadow" "\ +Display a list of Emacs Lisp files that shadow other files. + +This function lists potential load-path problems. Directories in the +`load-path' variable are searched, in order, for Emacs Lisp +files. When a previously encountered file name is found again, a +message is displayed indicating that the later file is \"hidden\" by +the earlier. + +For example, suppose `load-path' is set to + +\(\"/usr/gnu/emacs/site-lisp\" \"/usr/gnu/emacs/share/emacs/19.30/lisp\") + +and that each of these directories contains a file called XXX.el. Then +XXX.el in the site-lisp directory is referred to by all of: +\(require 'XXX), (autoload .... \"XXX\"), (load-library \"XXX\") etc. + +The first XXX.el file prevents emacs from seeing the second (unless +the second is loaded explicitly via load-file). + +When not intended, such shadowings can be the source of subtle +problems. For example, the above situation may have arisen because the +XXX package was not distributed with versions of emacs prior to +19.30. An emacs maintainer downloaded XXX from elsewhere and installed +it. Later, XXX was updated and included in the emacs distribution. +Unless the emacs maintainer checks for this, the new version of XXX +will be hidden behind the old (which may no longer work with the new +emacs version). + +This function performs these checks and flags all possible +shadowings. Because a .el file may exist without a corresponding .elc +\(or vice-versa), these suffixes are essentially ignored. A file +XXX.elc in an early directory (that does not contain XXX.el) is +considered to shadow a later file XXX.el, and vice-versa. + +When run interactively, the shadowings (if any) are displayed in a +buffer called `*Shadows*'. Shadowings are located by calling the +\(non-interactive) companion function, `find-emacs-lisp-shadows'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (shadow-initialize shadow-define-regexp-group shadow-define-literal-group +;;;;;; shadow-define-cluster) "shadowfile" "shadowfile.el" (16211 +;;;;;; 27018)) +;;; Generated autoloads from shadowfile.el + +(autoload (quote shadow-define-cluster) "shadowfile" "\ +Edit (or create) the definition of a cluster NAME. +This is a group of hosts that share directories, so that copying to or from +one of them is sufficient to update the file on all of them. Clusters are +defined by a name, the network address of a primary host (the one we copy +files to), and a regular expression that matches the hostnames of all the sites +in the cluster. + +\(fn NAME)" t nil) + +(autoload (quote shadow-define-literal-group) "shadowfile" "\ +Declare a single file to be shared between sites. +It may have different filenames on each site. When this file is edited, the +new version will be copied to each of the other locations. Sites can be +specific hostnames, or names of clusters (see `shadow-define-cluster'). + +\(fn)" t nil) + +(autoload (quote shadow-define-regexp-group) "shadowfile" "\ +Make each of a group of files be shared between hosts. +Prompts for regular expression; files matching this are shared between a list +of sites, which are also prompted for. The filenames must be identical on all +hosts (if they aren't, use shadow-define-group instead of this function). +Each site can be either a hostname or the name of a cluster (see +`shadow-define-cluster'). + +\(fn)" t nil) + +(autoload (quote shadow-initialize) "shadowfile" "\ +Set up file shadowing. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (shell shell-dumb-shell-regexp) "shell" "shell.el" +;;;;;; (16211 27018)) +;;; Generated autoloads from shell.el + +(defvar shell-dumb-shell-regexp "cmd\\(proxy\\)?\\.exe" "\ +Regexp to match shells that don't save their command history, and +don't handle the backslash as a quote character. For shells that +match this regexp, Emacs will write out the command history when the +shell finishes, and won't remove backslashes when it unquotes shell +arguments.") + +(custom-autoload (quote shell-dumb-shell-regexp) "shell") + +(autoload (quote shell) "shell" "\ +Run an inferior shell, with I/O through BUFFER (which defaults to `*shell*'). +Interactively, a prefix arg means to prompt for BUFFER. +If BUFFER exists but shell process is not running, make new shell. +If BUFFER exists and shell process is running, just switch to BUFFER. +Program used comes from variable `explicit-shell-file-name', + or (if that is nil) from the ESHELL environment variable, + or else from SHELL if there is no ESHELL. +If a file `~/.emacs_SHELLNAME' exists, it is given as initial input + (Note that this may lose due to a timing error if the shell + discards input when it starts up.) +The buffer is put in Shell mode, giving commands for sending input +and controlling the subjobs of the shell. See `shell-mode'. +See also the variable `shell-prompt-pattern'. + +To specify a coding system for converting non-ASCII characters +in the input and output to the shell, use \\[universal-coding-system-argument] +before \\[shell]. You can also specify this with \\[set-buffer-process-coding-system] +in the shell buffer, after you start the shell. +The default comes from `process-coding-system-alist' and +`default-process-coding-system'. + +The shell file name (sans directories) is used to make a symbol name +such as `explicit-csh-args'. If that symbol is a variable, +its value is used as a list of arguments when invoking the shell. +Otherwise, one argument `-i' is passed to the shell. + +\(Type \\[describe-mode] in the shell buffer for a list of commands.) + +\(fn &optional BUFFER)" t nil) + (add-hook 'same-window-buffer-names "*shell*") + +;;;*** + +;;;### (autoloads (simula-mode) "simula" "progmodes/simula.el" (16211 +;;;;;; 27039)) +;;; Generated autoloads from progmodes/simula.el + +(autoload (quote simula-mode) "simula" "\ +Major mode for editing SIMULA code. +\\{simula-mode-map} +Variables controlling indentation style: + `simula-tab-always-indent' + Non-nil means TAB in SIMULA mode should always reindent the current line, + regardless of where in the line point is when the TAB command is used. + `simula-indent-level' + Indentation of SIMULA statements with respect to containing block. + `simula-substatement-offset' + Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE. + `simula-continued-statement-offset' 3 + Extra indentation for lines not starting a statement or substatement, + e.g. a nested FOR-loop. If value is a list, each line in a multiple- + line continued statement will have the car of the list extra indentation + with respect to the previous line of the statement. + `simula-label-offset' -4711 + Offset of SIMULA label lines relative to usual indentation. + `simula-if-indent' '(0 . 0) + Extra indentation of THEN and ELSE with respect to the starting IF. + Value is a cons cell, the car is extra THEN indentation and the cdr + extra ELSE indentation. IF after ELSE is indented as the starting IF. + `simula-inspect-indent' '(0 . 0) + Extra indentation of WHEN and OTHERWISE with respect to the + corresponding INSPECT. Value is a cons cell, the car is + extra WHEN indentation and the cdr extra OTHERWISE indentation. + `simula-electric-indent' nil + If this variable is non-nil, `simula-indent-line' + will check the previous line to see if it has to be reindented. + `simula-abbrev-keyword' 'upcase + Determine how SIMULA keywords will be expanded. Value is one of + the symbols `upcase', `downcase', `capitalize', (as in) `abbrev-table', + or nil if they should not be changed. + `simula-abbrev-stdproc' 'abbrev-table + Determine how standard SIMULA procedure and class names will be + expanded. Value is one of the symbols `upcase', `downcase', `capitalize', + (as in) `abbrev-table', or nil if they should not be changed. + +Turning on SIMULA mode calls the value of the variable simula-mode-hook +with no arguments, if that value is non-nil. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (skeleton-pair-insert-maybe skeleton-insert skeleton-proxy-new +;;;;;; define-skeleton) "skeleton" "skeleton.el" (16211 27018)) +;;; Generated autoloads from skeleton.el + +(defvar skeleton-filter (quote identity) "\ +Function for transforming a skeleton proxy's aliases' variable value.") + +(autoload (quote define-skeleton) "skeleton" "\ +Define a user-configurable COMMAND that enters a statement skeleton. +DOCUMENTATION is that of the command. +SKELETON is as defined under `skeleton-insert'. + +\(fn COMMAND DOCUMENTATION &rest SKELETON)" nil (quote macro)) + +(autoload (quote skeleton-proxy-new) "skeleton" "\ +Insert SKELETON. +Prefix ARG allows wrapping around words or regions (see `skeleton-insert'). +If no ARG was given, but the region is visible, ARG defaults to -1 depending +on `skeleton-autowrap'. An ARG of M-0 will prevent this just for once. +This command can also be an abbrev expansion (3rd and 4th columns in +\\[edit-abbrevs] buffer: \"\" command-name). + +Optional first argument STR may also be a string which will be the value +of `str' whereas the skeleton's interactor is then ignored. + +\(fn SKELETON &optional STR ARG)" nil nil) + +(autoload (quote skeleton-insert) "skeleton" "\ +Insert the complex statement skeleton SKELETON describes very concisely. + +With optional second argument REGIONS, wrap first interesting point +\(`_') in skeleton around next REGIONS words, if REGIONS is positive. +If REGIONS is negative, wrap REGIONS preceding interregions into first +REGIONS interesting positions (successive `_'s) in skeleton. + +An interregion is the stretch of text between two contiguous marked +points. If you marked A B C [] (where [] is the cursor) in +alphabetical order, the 3 interregions are simply the last 3 regions. +But if you marked B A [] C, the interregions are B-A, A-[], []-C. + +The optional third argument STR, if specified, is the value for the +variable `str' within the skeleton. When this is non-nil, the +interactor gets ignored, and this should be a valid skeleton element. + +SKELETON is made up as (INTERACTOR ELEMENT ...). INTERACTOR may be nil if +not needed, a prompt-string or an expression for complex read functions. + +If ELEMENT is a string or a character it gets inserted (see also +`skeleton-transformation'). Other possibilities are: + + \\n go to next line and indent according to mode + _ interesting point, interregion here + - interesting point, no interregion interaction, overrides + interesting point set by _ + > indent line (or interregion if > _) according to major mode + @ add position to `skeleton-positions' + & do next ELEMENT iff previous moved point + | do next ELEMENT iff previous didn't move point + -num delete num preceding characters (see `skeleton-untabify') + resume: skipped, continue here if quit is signaled + nil skipped + +After termination, point will be positioned at the last occurrence of - +or at the first occurrence of _ or at the end of the inserted text. + +Further elements can be defined via `skeleton-further-elements'. ELEMENT may +itself be a SKELETON with an INTERACTOR. The user is prompted repeatedly for +different inputs. The SKELETON is processed as often as the user enters a +non-empty string. \\[keyboard-quit] terminates skeleton insertion, but +continues after `resume:' and positions at `_' if any. If INTERACTOR in such +a subskeleton is a prompt-string which contains a \".. %s ..\" it is +formatted with `skeleton-subprompt'. Such an INTERACTOR may also be a list of +strings with the subskeleton being repeated once for each string. + +Quoted Lisp expressions are evaluated for their side-effects. +Other Lisp expressions are evaluated and the value treated as above. +Note that expressions may not return t since this implies an +endless loop. Modes can define other symbols by locally setting them +to any valid skeleton element. The following local variables are +available: + + str first time: read a string according to INTERACTOR + then: insert previously read string once more + help help-form during interaction with the user or nil + input initial input (string or cons with index) while reading str + v1, v2 local variables for memorizing anything you want + +When done with skeleton, but before going back to `_'-point call +`skeleton-end-hook' if that is non-nil. + +\(fn SKELETON &optional REGIONS STR)" nil nil) + +(autoload (quote skeleton-pair-insert-maybe) "skeleton" "\ +Insert the character you type ARG times. + +With no ARG, if `skeleton-pair' is non-nil, pairing can occur. If the region +is visible the pair is wrapped around it depending on `skeleton-autowrap'. +Else, if `skeleton-pair-on-word' is non-nil or we are not before or inside a +word, and if `skeleton-pair-filter' returns nil, pairing is performed. +Pairing is also prohibited if we are right after a quoting character +such as backslash. + +If a match is found in `skeleton-pair-alist', that is inserted, else +the defaults are used. These are (), [], {}, <> and `' for the +symmetrical ones, and the same character twice for the others. + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (smerge-mode smerge-ediff) "smerge-mode" "smerge-mode.el" +;;;;;; (16258 10857)) +;;; Generated autoloads from smerge-mode.el + +(autoload (quote smerge-ediff) "smerge-mode" "\ +Invoke ediff to resolve the conflicts. +NAME-MINE, NAME-OTHER, and NAME-BASE, if non-nil, are used for the +buffer names. + +\(fn &optional NAME-MINE NAME-OTHER NAME-BASE)" t nil) + +(autoload (quote smerge-mode) "smerge-mode" "\ +Minor mode to simplify editing output from the diff3 program. +\\{smerge-mode-map} + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (smiley-region) "smiley-ems" "gnus/smiley-ems.el" +;;;;;; (16211 27031)) +;;; Generated autoloads from gnus/smiley-ems.el + +(autoload (quote smiley-region) "smiley-ems" "\ +Display textual smileys as images. +START and END specify the region; interactively, use the values +of point and mark. The value of `smiley-regexp-alist' determines +which smileys to operate on and which images to use for them. + +\(fn START END)" t nil) + +;;;*** + +;;;### (autoloads (smtpmail-send-queued-mail smtpmail-send-it) "smtpmail" +;;;;;; "mail/smtpmail.el" (16246 41418)) +;;; Generated autoloads from mail/smtpmail.el + +(autoload (quote smtpmail-send-it) "smtpmail" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote smtpmail-send-queued-mail) "smtpmail" "\ +Send mail that was queued as a result of setting `smtpmail-queue-mail'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (snake) "snake" "play/snake.el" (16211 27038)) +;;; Generated autoloads from play/snake.el + +(autoload (quote snake) "snake" "\ +Play the Snake game. +Move the snake around without colliding with its tail or with the border. + +Eating dots causes the snake to get longer. + +Snake mode keybindings: + \\ +\\[snake-start-game] Starts a new game of Snake +\\[snake-end-game] Terminates the current game +\\[snake-pause-game] Pauses (or resumes) the current game +\\[snake-move-left] Makes the snake move left +\\[snake-move-right] Makes the snake move right +\\[snake-move-up] Makes the snake move up +\\[snake-move-down] Makes the snake move down + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (snmpv2-mode snmp-mode) "snmp-mode" "net/snmp-mode.el" +;;;;;; (16211 27037)) +;;; Generated autoloads from net/snmp-mode.el + +(autoload (quote snmp-mode) "snmp-mode" "\ +Major mode for editing SNMP MIBs. +Expression and list commands understand all C brackets. +Tab indents for C code. +Comments start with -- and end with newline or another --. +Delete converts tabs to spaces as it moves back. +\\{snmp-mode-map} +Turning on snmp-mode runs the hooks in `snmp-common-mode-hook', then +`snmp-mode-hook'. + +\(fn)" t nil) + +(autoload (quote snmpv2-mode) "snmp-mode" "\ +Major mode for editing SNMPv2 MIBs. +Expression and list commands understand all C brackets. +Tab indents for C code. +Comments start with -- and end with newline or another --. +Delete converts tabs to spaces as it moves back. +\\{snmp-mode-map} +Turning on snmp-mode runs the hooks in `snmp-common-mode-hook', +then `snmpv2-mode-hook'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (solar-equinoxes-solstices sunrise-sunset calendar-location-name +;;;;;; calendar-longitude calendar-latitude calendar-time-display-form) +;;;;;; "solar" "calendar/solar.el" (16211 27023)) +;;; Generated autoloads from calendar/solar.el + +(defvar calendar-time-display-form (quote (12-hours ":" minutes am-pm (if time-zone " (") time-zone (if time-zone ")"))) "\ +*The pseudo-pattern that governs the way a time of day is formatted. + +A pseudo-pattern is a list of expressions that can involve the keywords +`12-hours', `24-hours', and `minutes', all numbers in string form, +and `am-pm' and `time-zone', both alphabetic strings. + +For example, the form + + '(24-hours \":\" minutes + (if time-zone \" (\") time-zone (if time-zone \")\")) + +would give military-style times like `21:07 (UTC)'.") + +(custom-autoload (quote calendar-time-display-form) "solar") + +(defvar calendar-latitude nil "\ +*Latitude of `calendar-location-name' in degrees. + +The value can be either a decimal fraction (one place of accuracy is +sufficient), + north, - south, such as 40.7 for New York City, or the value +can be a vector [degrees minutes north/south] such as [40 50 north] for New +York City. + +This variable should be set in `site-start'.el.") + +(custom-autoload (quote calendar-latitude) "solar") + +(defvar calendar-longitude nil "\ +*Longitude of `calendar-location-name' in degrees. + +The value can be either a decimal fraction (one place of accuracy is +sufficient), + east, - west, such as -73.9 for New York City, or the value +can be a vector [degrees minutes east/west] such as [73 55 west] for New +York City. + +This variable should be set in `site-start'.el.") + +(custom-autoload (quote calendar-longitude) "solar") + +(defvar calendar-location-name (quote (let ((float-output-format "%.1f")) (format "%s%s, %s%s" (if (numberp calendar-latitude) (abs calendar-latitude) (+ (aref calendar-latitude 0) (/ (aref calendar-latitude 1) 60.0))) (if (numberp calendar-latitude) (if (> calendar-latitude 0) "N" "S") (if (equal (aref calendar-latitude 2) (quote north)) "N" "S")) (if (numberp calendar-longitude) (abs calendar-longitude) (+ (aref calendar-longitude 0) (/ (aref calendar-longitude 1) 60.0))) (if (numberp calendar-longitude) (if (> calendar-longitude 0) "E" "W") (if (equal (aref calendar-longitude 2) (quote east)) "E" "W"))))) "\ +*Expression evaluating to name of `calendar-longitude', `calendar-latitude'. +For example, \"New York City\". Default value is just the latitude, longitude +pair. + +This variable should be set in `site-start'.el.") + +(custom-autoload (quote calendar-location-name) "solar") + +(autoload (quote sunrise-sunset) "solar" "\ +Local time of sunrise and sunset for today. Accurate to a few seconds. +If called with an optional prefix argument, prompt for date. + +If called with an optional double prefix argument, prompt for longitude, +latitude, time zone, and date, and always use standard time. + +This function is suitable for execution in a .emacs file. + +\(fn &optional ARG)" t nil) + +(autoload (quote solar-equinoxes-solstices) "solar" "\ +*local* date and time of equinoxes and solstices, if visible in the calendar window. +Requires floating point. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (solitaire) "solitaire" "play/solitaire.el" (16211 +;;;;;; 27038)) +;;; Generated autoloads from play/solitaire.el + +(autoload (quote solitaire) "solitaire" "\ +Play Solitaire. + +To play Solitaire, type \\[solitaire]. +\\ +Move around the board using the cursor keys. +Move stones using \\[solitaire-move] followed by a direction key. +Undo moves using \\[solitaire-undo]. +Check for possible moves using \\[solitaire-do-check]. +\(The variable `solitaire-auto-eval' controls whether to automatically +check after each move or undo) + +What is Solitaire? + +I don't know who invented this game, but it seems to be rather old and +its origin seems to be northern Africa. Here's how to play: +Initially, the board will look similar to this: + + Le Solitaire + ============ + + o o o + + o o o + + o o o o o o o + + o o o . o o o + + o o o o o o o + + o o o + + o o o + +Let's call the o's stones and the .'s holes. One stone fits into one +hole. As you can see, all holes but one are occupied by stones. The +aim of the game is to get rid of all but one stone, leaving that last +one in the middle of the board if you're cool. + +A stone can be moved if there is another stone next to it, and a hole +after that one. Thus there must be three fields in a row, either +horizontally or vertically, up, down, left or right, which look like +this: o o . + +Then the first stone is moved to the hole, jumping over the second, +which therefore is taken away. The above thus `evaluates' to: . . o + +That's all. Here's the board after two moves: + + o o o + + . o o + + o o . o o o o + + o . o o o o o + + o o o o o o o + + o o o + + o o o + +Pick your favourite shortcuts: + +\\{solitaire-mode-map} + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (reverse-region sort-columns sort-regexp-fields +;;;;;; sort-fields sort-numeric-fields sort-pages sort-paragraphs +;;;;;; sort-lines sort-subr) "sort" "sort.el" (16211 27018)) +;;; Generated autoloads from sort.el + +(autoload (quote sort-subr) "sort" "\ +General text sorting routine to divide buffer into records and sort them. + +We divide the accessible portion of the buffer into disjoint pieces +called sort records. A portion of each sort record (perhaps all of +it) is designated as the sort key. The records are rearranged in the +buffer in order by their sort keys. The records may or may not be +contiguous. + +Usually the records are rearranged in order of ascending sort key. +If REVERSE is non-nil, they are rearranged in order of descending sort key. +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order. + +The next four arguments are functions to be called to move point +across a sort record. They will be called many times from within sort-subr. + +NEXTRECFUN is called with point at the end of the previous record. +It moves point to the start of the next record. +It should move point to the end of the buffer if there are no more records. +The first record is assumed to start at the position of point when sort-subr +is called. + +ENDRECFUN is called with point within the record. +It should move point to the end of the record. + +STARTKEYFUN moves from the start of the record to the start of the key. +It may return either a non-nil value to be used as the key, or +else the key is the substring between the values of point after +STARTKEYFUN and ENDKEYFUN are called. If STARTKEYFUN is nil, the key +starts at the beginning of the record. + +ENDKEYFUN moves from the start of the sort key to the end of the sort key. +ENDKEYFUN may be nil if STARTKEYFUN returns a value or if it would be the +same as ENDRECFUN. + +PREDICATE is the function to use to compare keys. If keys are numbers, +it defaults to `<', otherwise it defaults to `string<'. + +\(fn REVERSE NEXTRECFUN ENDRECFUN &optional STARTKEYFUN ENDKEYFUN PREDICATE)" nil nil) + +(autoload (quote sort-lines) "sort" "\ +Sort lines in region alphabetically; argument means descending order. +Called from a program, there are three arguments: +REVERSE (non-nil means reverse order), BEG and END (region to sort). +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order. + +\(fn REVERSE BEG END)" t nil) + +(autoload (quote sort-paragraphs) "sort" "\ +Sort paragraphs in region alphabetically; argument means descending order. +Called from a program, there are three arguments: +REVERSE (non-nil means reverse order), BEG and END (region to sort). +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order. + +\(fn REVERSE BEG END)" t nil) + +(autoload (quote sort-pages) "sort" "\ +Sort pages in region alphabetically; argument means descending order. +Called from a program, there are three arguments: +REVERSE (non-nil means reverse order), BEG and END (region to sort). +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order. + +\(fn REVERSE BEG END)" t nil) + +(autoload (quote sort-numeric-fields) "sort" "\ +Sort lines in region numerically by the ARGth field of each line. +Fields are separated by whitespace and numbered from 1 up. +Specified field must contain a number in each line of the region, +which may begin with \"0x\" or \"0\" for hexadecimal and octal values. +Otherwise, the number is interpreted according to sort-numeric-base. +With a negative arg, sorts by the ARGth field counted from the right. +Called from a program, there are three arguments: +FIELD, BEG and END. BEG and END specify region to sort. + +\(fn FIELD BEG END)" t nil) + +(autoload (quote sort-fields) "sort" "\ +Sort lines in region lexicographically by the ARGth field of each line. +Fields are separated by whitespace and numbered from 1 up. +With a negative arg, sorts by the ARGth field counted from the right. +Called from a program, there are three arguments: +FIELD, BEG and END. BEG and END specify region to sort. +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order. + +\(fn FIELD BEG END)" t nil) + +(autoload (quote sort-regexp-fields) "sort" "\ +Sort the region lexicographically as specified by RECORD-REGEXP and KEY. +RECORD-REGEXP specifies the textual units which should be sorted. + For example, to sort lines RECORD-REGEXP would be \"^.*$\" +KEY specifies the part of each record (ie each match for RECORD-REGEXP) + is to be used for sorting. + If it is \"\\\\digit\" then the digit'th \"\\\\(...\\\\)\" match field from + RECORD-REGEXP is used. + If it is \"\\\\&\" then the whole record is used. + Otherwise, it is a regular-expression for which to search within the record. +If a match for KEY is not found within a record then that record is ignored. + +With a negative prefix arg sorts in reverse order. + +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order. + +For example: to sort lines in the region by the first word on each line + starting with the letter \"f\", + RECORD-REGEXP would be \"^.*$\" and KEY would be \"\\\\=\\\" + +\(fn REVERSE RECORD-REGEXP KEY-REGEXP BEG END)" t nil) + +(autoload (quote sort-columns) "sort" "\ +Sort lines in region alphabetically by a certain range of columns. +For the purpose of this command, the region BEG...END includes +the entire line that point is in and the entire line the mark is in. +The column positions of point and mark bound the range of columns to sort on. +A prefix argument means sort into REVERSE order. +The variable `sort-fold-case' determines whether alphabetic case affects +the sort order. + +Note that `sort-columns' rejects text that contains tabs, +because tabs could be split across the specified columns +and it doesn't know how to handle that. Also, when possible, +it uses the `sort' utility program, which doesn't understand tabs. +Use \\[untabify] to convert tabs to spaces before sorting. + +\(fn REVERSE &optional BEG END)" t nil) + +(autoload (quote reverse-region) "sort" "\ +Reverse the order of lines in a region. +From a program takes two point or marker arguments, BEG and END. + +\(fn BEG END)" t nil) + +;;;*** + +;;;### (autoloads (speedbar-get-focus speedbar-frame-mode) "speedbar" +;;;;;; "speedbar.el" (16211 27019)) +;;; Generated autoloads from speedbar.el + +(defalias (quote speedbar) (quote speedbar-frame-mode)) + +(autoload (quote speedbar-frame-mode) "speedbar" "\ +Enable or disable speedbar. Positive ARG means turn on, negative turn off. +nil means toggle. Once the speedbar frame is activated, a buffer in +`speedbar-mode' will be displayed. Currently, only one speedbar is +supported at a time. +`speedbar-before-popup-hook' is called before popping up the speedbar frame. +`speedbar-before-delete-hook' is called before the frame is deleted. + +\(fn &optional ARG)" t nil) + +(autoload (quote speedbar-get-focus) "speedbar" "\ +Change frame focus to or from the speedbar frame. +If the selected frame is not speedbar, then speedbar frame is +selected. If the speedbar frame is active, then select the attached frame. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (spell-string spell-region spell-word spell-buffer) +;;;;;; "spell" "textmodes/spell.el" (16211 27044)) +;;; Generated autoloads from textmodes/spell.el + +(put (quote spell-filter) (quote risky-local-variable) t) + +(autoload (quote spell-buffer) "spell" "\ +Check spelling of every word in the buffer. +For each incorrect word, you are asked for the correct spelling +and then put into a query-replace to fix some or all occurrences. +If you do not want to change a word, just give the same word +as its \"correct\" spelling; then the query replace is skipped. + +\(fn)" t nil) + +(autoload (quote spell-word) "spell" "\ +Check spelling of word at or before point. +If it is not correct, ask user for the correct spelling +and `query-replace' the entire buffer to substitute it. + +\(fn)" t nil) + +(autoload (quote spell-region) "spell" "\ +Like `spell-buffer' but applies only to region. +Used in a program, applies from START to END. +DESCRIPTION is an optional string naming the unit being checked: +for example, \"word\". + +\(fn START END &optional DESCRIPTION)" t nil) + +(autoload (quote spell-string) "spell" "\ +Check spelling of string supplied as argument. + +\(fn STRING)" t nil) + +;;;*** + +;;;### (autoloads (snarf-spooks spook) "spook" "play/spook.el" (16211 +;;;;;; 27038)) +;;; Generated autoloads from play/spook.el + +(autoload (quote spook) "spook" "\ +Adds that special touch of class to your outgoing mail. + +\(fn)" t nil) + +(autoload (quote snarf-spooks) "spook" "\ +Return a vector containing the lines from `spook-phrases-file'. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (sql-linter sql-db2 sql-interbase sql-postgres +;;;;;; sql-ms sql-ingres sql-solid sql-mysql sql-sqlite sql-informix +;;;;;; sql-sybase sql-oracle sql-product-interactive sql-mode sql-help +;;;;;; sql-add-product-keywords) "sql" "progmodes/sql.el" (16225 +;;;;;; 6527)) +;;; Generated autoloads from progmodes/sql.el + +(autoload (quote sql-add-product-keywords) "sql" "\ +Append a `font-lock-keywords' entry to the existing entries defined + for the specified `product'. + +\(fn PRODUCT KEYWORDS)" nil nil) + +(autoload (quote sql-help) "sql" "\ +Show short help for the SQL modes. + +Use an entry function to open an interactive SQL buffer. This buffer is +usually named `*SQL*'. The name of the major mode is SQLi. + +Use the following commands to start a specific SQL interpreter: + + PostGres: \\[sql-postgres] + MySQL: \\[sql-mysql] + SQLite: \\[sql-sqlite] + +Other non-free SQL implementations are also supported: + + Solid: \\[sql-solid] + Oracle: \\[sql-oracle] + Informix: \\[sql-informix] + Sybase: \\[sql-sybase] + Ingres: \\[sql-ingres] + Microsoft: \\[sql-ms] + DB2: \\[sql-db2] + Interbase: \\[sql-interbase] + Linter: \\[sql-linter] + +But we urge you to choose a free implementation instead of these. + +Once you have the SQLi buffer, you can enter SQL statements in the +buffer. The output generated is appended to the buffer and a new prompt +is generated. See the In/Out menu in the SQLi buffer for some functions +that help you navigate through the buffer, the input history, etc. + +If you have a really complex SQL statement or if you are writing a +procedure, you can do this in a separate buffer. Put the new buffer in +`sql-mode' by calling \\[sql-mode]. The name of this buffer can be +anything. The name of the major mode is SQL. + +In this SQL buffer (SQL mode), you can send the region or the entire +buffer to the interactive SQL buffer (SQLi mode). The results are +appended to the SQLi buffer without disturbing your SQL buffer. + +\(fn)" t nil) + +(autoload (quote sql-mode) "sql" "\ +Major mode to edit SQL. + +You can send SQL statements to the SQLi buffer using +\\[sql-send-region]. Such a buffer must exist before you can do this. +See `sql-help' on how to create SQLi buffers. + +\\{sql-mode-map} +Customization: Entry to this mode runs the `sql-mode-hook'. + +When you put a buffer in SQL mode, the buffer stores the last SQLi +buffer created as its destination in the variable `sql-buffer'. This +will be the buffer \\[sql-send-region] sends the region to. If this +SQLi buffer is killed, \\[sql-send-region] is no longer able to +determine where the strings should be sent to. You can set the +value of `sql-buffer' using \\[sql-set-sqli-buffer]. + +For information on how to create multiple SQLi buffers, see +`sql-interactive-mode'. + +Note that SQL doesn't have an escape character unless you specify +one. If you specify backslash as escape character in SQL, +you must tell Emacs. Here's how to do that in your `~/.emacs' file: + +\(add-hook 'sql-mode-hook + (lambda () + (modify-syntax-entry ?\\\\ \".\" sql-mode-syntax-table))) + +\(fn)" t nil) + +(autoload (quote sql-product-interactive) "sql" "\ +Run product interpreter as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn &optional PRODUCT)" t nil) + +(autoload (quote sql-oracle) "sql" "\ +Run sqlplus by Oracle as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +Interpreter used comes from variable `sql-oracle-program'. Login uses +the variables `sql-user', `sql-password', and `sql-database' as +defaults, if set. Additional command line parameters can be stored in +the list `sql-oracle-options'. + +The buffer is put in sql-interactive-mode, giving commands for sending +input. See `sql-interactive-mode'. + +To specify a coding system for converting non-ASCII characters +in the input and output to the process, use \\[universal-coding-system-argument] +before \\[sql-oracle]. You can also specify this with \\[set-buffer-process-coding-system] +in the SQL buffer, after you start the process. +The default comes from `process-coding-system-alist' and +`default-process-coding-system'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn)" t nil) + +(autoload (quote sql-sybase) "sql" "\ +Run isql by SyBase as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +Interpreter used comes from variable `sql-sybase-program'. Login uses +the variables `sql-server', `sql-user', `sql-password', and +`sql-database' as defaults, if set. Additional command line parameters +can be stored in the list `sql-sybase-options'. + +The buffer is put in sql-interactive-mode, giving commands for sending +input. See `sql-interactive-mode'. + +To specify a coding system for converting non-ASCII characters +in the input and output to the process, use \\[universal-coding-system-argument] +before \\[sql-sybase]. You can also specify this with \\[set-buffer-process-coding-system] +in the SQL buffer, after you start the process. +The default comes from `process-coding-system-alist' and +`default-process-coding-system'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn)" t nil) + +(autoload (quote sql-informix) "sql" "\ +Run dbaccess by Informix as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +Interpreter used comes from variable `sql-informix-program'. Login uses +the variable `sql-database' as default, if set. + +The buffer is put in sql-interactive-mode, giving commands for sending +input. See `sql-interactive-mode'. + +To specify a coding system for converting non-ASCII characters +in the input and output to the process, use \\[universal-coding-system-argument] +before \\[sql-informix]. You can also specify this with \\[set-buffer-process-coding-system] +in the SQL buffer, after you start the process. +The default comes from `process-coding-system-alist' and +`default-process-coding-system'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn)" t nil) + +(autoload (quote sql-sqlite) "sql" "\ +Run sqlite as an inferior process. + +SQLite is free software. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +Interpreter used comes from variable `sql-sqlite-program'. Login uses +the variables `sql-user', `sql-password', `sql-database', and +`sql-server' as defaults, if set. Additional command line parameters +can be stored in the list `sql-sqlite-options'. + +The buffer is put in sql-interactive-mode, giving commands for sending +input. See `sql-interactive-mode'. + +To specify a coding system for converting non-ASCII characters +in the input and output to the process, use \\[universal-coding-system-argument] +before \\[sql-sqlite]. You can also specify this with \\[set-buffer-process-coding-system] +in the SQL buffer, after you start the process. +The default comes from `process-coding-system-alist' and +`default-process-coding-system'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn)" t nil) + +(autoload (quote sql-mysql) "sql" "\ +Run mysql by TcX as an inferior process. + +Mysql versions 3.23 and up are free software. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +Interpreter used comes from variable `sql-mysql-program'. Login uses +the variables `sql-user', `sql-password', `sql-database', and +`sql-server' as defaults, if set. Additional command line parameters +can be stored in the list `sql-mysql-options'. + +The buffer is put in sql-interactive-mode, giving commands for sending +input. See `sql-interactive-mode'. + +To specify a coding system for converting non-ASCII characters +in the input and output to the process, use \\[universal-coding-system-argument] +before \\[sql-mysql]. You can also specify this with \\[set-buffer-process-coding-system] +in the SQL buffer, after you start the process. +The default comes from `process-coding-system-alist' and +`default-process-coding-system'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn)" t nil) + +(autoload (quote sql-solid) "sql" "\ +Run solsql by Solid as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +Interpreter used comes from variable `sql-solid-program'. Login uses +the variables `sql-user', `sql-password', and `sql-server' as +defaults, if set. + +The buffer is put in sql-interactive-mode, giving commands for sending +input. See `sql-interactive-mode'. + +To specify a coding system for converting non-ASCII characters +in the input and output to the process, use \\[universal-coding-system-argument] +before \\[sql-solid]. You can also specify this with \\[set-buffer-process-coding-system] +in the SQL buffer, after you start the process. +The default comes from `process-coding-system-alist' and +`default-process-coding-system'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn)" t nil) + +(autoload (quote sql-ingres) "sql" "\ +Run sql by Ingres as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +Interpreter used comes from variable `sql-ingres-program'. Login uses +the variable `sql-database' as default, if set. + +The buffer is put in sql-interactive-mode, giving commands for sending +input. See `sql-interactive-mode'. + +To specify a coding system for converting non-ASCII characters +in the input and output to the process, use \\[universal-coding-system-argument] +before \\[sql-ingres]. You can also specify this with \\[set-buffer-process-coding-system] +in the SQL buffer, after you start the process. +The default comes from `process-coding-system-alist' and +`default-process-coding-system'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn)" t nil) + +(autoload (quote sql-ms) "sql" "\ +Run osql by Microsoft as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +Interpreter used comes from variable `sql-ms-program'. Login uses the +variables `sql-user', `sql-password', `sql-database', and `sql-server' +as defaults, if set. Additional command line parameters can be stored +in the list `sql-ms-options'. + +The buffer is put in sql-interactive-mode, giving commands for sending +input. See `sql-interactive-mode'. + +To specify a coding system for converting non-ASCII characters +in the input and output to the process, use \\[universal-coding-system-argument] +before \\[sql-ms]. You can also specify this with \\[set-buffer-process-coding-system] +in the SQL buffer, after you start the process. +The default comes from `process-coding-system-alist' and +`default-process-coding-system'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn)" t nil) + +(autoload (quote sql-postgres) "sql" "\ +Run psql by Postgres as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +Interpreter used comes from variable `sql-postgres-program'. Login uses +the variables `sql-database' and `sql-server' as default, if set. +Additional command line parameters can be stored in the list +`sql-postgres-options'. + +The buffer is put in sql-interactive-mode, giving commands for sending +input. See `sql-interactive-mode'. + +To specify a coding system for converting non-ASCII characters +in the input and output to the process, use \\[universal-coding-system-argument] +before \\[sql-postgres]. You can also specify this with \\[set-buffer-process-coding-system] +in the SQL buffer, after you start the process. +The default comes from `process-coding-system-alist' and +`default-process-coding-system'. If your output lines end with ^M, +your might try undecided-dos as a coding system. If this doesn't help, +Try to set `comint-output-filter-functions' like this: + +\(setq comint-output-filter-functions (append comint-output-filter-functions + '(comint-strip-ctrl-m))) + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn)" t nil) + +(autoload (quote sql-interbase) "sql" "\ +Run isql by Interbase as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +Interpreter used comes from variable `sql-interbase-program'. Login +uses the variables `sql-user', `sql-password', and `sql-database' as +defaults, if set. + +The buffer is put in sql-interactive-mode, giving commands for sending +input. See `sql-interactive-mode'. + +To specify a coding system for converting non-ASCII characters +in the input and output to the process, use \\[universal-coding-system-argument] +before \\[sql-interbase]. You can also specify this with \\[set-buffer-process-coding-system] +in the SQL buffer, after you start the process. +The default comes from `process-coding-system-alist' and +`default-process-coding-system'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn)" t nil) + +(autoload (quote sql-db2) "sql" "\ +Run db2 by IBM as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +Interpreter used comes from variable `sql-db2-program'. There is not +automatic login. + +The buffer is put in sql-interactive-mode, giving commands for sending +input. See `sql-interactive-mode'. + +If you use \\[sql-accumulate-and-indent] to send multiline commands to +db2, newlines will be escaped if necessary. If you don't want that, set +`comint-input-sender' back to `comint-simple-send' by writing an after +advice. See the elisp manual for more information. + +To specify a coding system for converting non-ASCII characters +in the input and output to the process, use \\[universal-coding-system-argument] +before \\[sql-db2]. You can also specify this with \\[set-buffer-process-coding-system] +in the SQL buffer, after you start the process. +The default comes from `process-coding-system-alist' and +`default-process-coding-system'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn)" t nil) + +(autoload (quote sql-linter) "sql" "\ +Run inl by RELEX as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +Interpreter used comes from variable `sql-linter-program' - usually `inl'. +Login uses the variables `sql-user', `sql-password', `sql-database' and +`sql-server' as defaults, if set. Additional command line parameters +can be stored in the list `sql-linter-options'. Run inl -h to get help on +parameters. + +`sql-database' is used to set the LINTER_MBX environment variable for +local connections, `sql-server' refers to the server name from the +`nodetab' file for the network connection (dbc_tcp or friends must run +for this to work). If `sql-password' is an empty string, inl will use +an empty password. + +The buffer is put in sql-interactive-mode, giving commands for sending +input. See `sql-interactive-mode'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (strokes-compose-complex-stroke strokes-decode-buffer +;;;;;; strokes-mode strokes-list-strokes strokes-load-user-strokes +;;;;;; strokes-help strokes-describe-stroke strokes-do-complex-stroke +;;;;;; strokes-do-stroke strokes-read-complex-stroke strokes-read-stroke +;;;;;; strokes-global-set-stroke) "strokes" "strokes.el" (16258 +;;;;;; 10857)) +;;; Generated autoloads from strokes.el + +(autoload (quote strokes-global-set-stroke) "strokes" "\ +Interactively give STROKE the global binding as COMMAND. +Operated just like `global-set-key', except for strokes. +COMMAND is a symbol naming an interactively-callable function. STROKE +is a list of sampled positions on the stroke grid as described in the +documentation for the `strokes-define-stroke' function. + +\(fn STROKE COMMAND)" t nil) + +(autoload (quote strokes-read-stroke) "strokes" "\ +Read a simple stroke (interactively) and return the stroke. +Optional PROMPT in minibuffer displays before and during stroke reading. +This function will display the stroke interactively as it is being +entered in the strokes buffer if the variable +`strokes-use-strokes-buffer' is non-nil. +Optional EVENT is acceptable as the starting event of the stroke + +\(fn &optional PROMPT EVENT)" nil nil) + +(autoload (quote strokes-read-complex-stroke) "strokes" "\ +Read a complex stroke (interactively) and return the stroke. +Optional PROMPT in minibuffer displays before and during stroke reading. +Note that a complex stroke allows the user to pen-up and pen-down. This +is implemented by allowing the user to paint with button 1 or button 2 and +then complete the stroke with button 3. +Optional EVENT is acceptable as the starting event of the stroke + +\(fn &optional PROMPT EVENT)" nil nil) + +(autoload (quote strokes-do-stroke) "strokes" "\ +Read a simple stroke from the user and then execute its command. +This must be bound to a mouse event. + +\(fn EVENT)" t nil) + +(autoload (quote strokes-do-complex-stroke) "strokes" "\ +Read a complex stroke from the user and then execute its command. +This must be bound to a mouse event. + +\(fn EVENT)" t nil) + +(autoload (quote strokes-describe-stroke) "strokes" "\ +Displays the command which STROKE maps to, reading STROKE interactively. + +\(fn STROKE)" t nil) + +(autoload (quote strokes-help) "strokes" "\ +Get instruction on using the `strokes' package. + +\(fn)" t nil) + +(autoload (quote strokes-load-user-strokes) "strokes" "\ +Load user-defined strokes from file named by `strokes-file'. + +\(fn)" t nil) + +(autoload (quote strokes-list-strokes) "strokes" "\ +Pop up a buffer containing an alphabetical listing of strokes in STROKES-MAP. +With CHRONOLOGICAL prefix arg (\\[universal-argument]) list strokes +chronologically by command name. +If STROKES-MAP is not given, `strokes-global-map' will be used instead. + +\(fn &optional CHRONOLOGICAL STROKES-MAP)" t nil) + +(defvar strokes-mode nil "\ +Non-nil if Strokes mode is enabled. +See the command `strokes-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `strokes-mode'.") + +(custom-autoload (quote strokes-mode) "strokes") + +(autoload (quote strokes-mode) "strokes" "\ +Toggle Strokes global minor mode.\\ +With ARG, turn strokes on if and only if ARG is positive. +Strokes are pictographic mouse gestures which invoke commands. +Strokes are invoked with \\[strokes-do-stroke]. You can define +new strokes with \\[strokes-global-set-stroke]. See also +\\[strokes-do-complex-stroke] for `complex' strokes. + +To use strokes for pictographic editing, such as Chinese/Japanese, use +\\[strokes-compose-complex-stroke], which draws strokes and inserts them. +Encode/decode your strokes with \\[strokes-encode-buffer], +\\[strokes-decode-buffer]. + +\\{strokes-mode-map} + +\(fn &optional ARG)" t nil) + +(autoload (quote strokes-decode-buffer) "strokes" "\ +Decode stroke strings in BUFFER and display their corresponding glyphs. +Optional BUFFER defaults to the current buffer. +Optional FORCE non-nil will ignore the buffer's read-only status. + +\(fn &optional BUFFER FORCE)" t nil) + +(autoload (quote strokes-compose-complex-stroke) "strokes" "\ +Read a complex stroke and insert its glyph into the current buffer. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (studlify-buffer studlify-word studlify-region) +;;;;;; "studly" "play/studly.el" (16211 27038)) +;;; Generated autoloads from play/studly.el + +(autoload (quote studlify-region) "studly" "\ +Studlify-case the region. + +\(fn BEGIN END)" t nil) + +(autoload (quote studlify-word) "studly" "\ +Studlify-case the current word, or COUNT words if given an argument. + +\(fn COUNT)" t nil) + +(autoload (quote studlify-buffer) "studly" "\ +Studlify-case the current buffer. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (sc-cite-original) "supercite" "mail/supercite.el" +;;;;;; (16211 27036)) +;;; Generated autoloads from mail/supercite.el + +(autoload (quote sc-cite-original) "supercite" "\ +Workhorse citing function which performs the initial citation. +This is callable from the various mail and news readers' reply +function according to the agreed upon standard. See the associated +info node `(SC)Top' for more details. +`sc-cite-original' does not do any yanking of the +original message but it does require a few things: + + 1) The reply buffer is the current buffer. + + 2) The original message has been yanked and inserted into the + reply buffer. + + 3) Verbose mail headers from the original message have been + inserted into the reply buffer directly before the text of the + original message. + + 4) Point is at the beginning of the verbose headers. + + 5) Mark is at the end of the body of text to be cited. + +For Emacs 19's, the region need not be active (and typically isn't +when this function is called. Also, the hook `sc-pre-hook' is run +before, and `sc-post-hook' is run after the guts of this function. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (syntax-ppss) "syntax" "emacs-lisp/syntax.el" (16211 +;;;;;; 27026)) +;;; Generated autoloads from emacs-lisp/syntax.el + +(autoload (quote syntax-ppss) "syntax" "\ +Parse-Partial-Sexp State at POS. +The returned value is the same as `parse-partial-sexp' except that +the 2nd and 6th values of the returned state cannot be relied upon. +Point is at POS when this function returns. + +\(fn &optional POS)" nil nil) + +;;;*** + +;;;### (autoloads (tabify untabify) "tabify" "tabify.el" (16211 27021)) +;;; Generated autoloads from tabify.el + +(autoload (quote untabify) "tabify" "\ +Convert all tabs in region to multiple spaces, preserving columns. +Called non-interactively, the region is specified by arguments +START and END, rather than by the position of point and mark. +The variable `tab-width' controls the spacing of tab stops. + +\(fn START END)" t nil) + +(autoload (quote tabify) "tabify" "\ +Convert multiple spaces in region to tabs when possible. +A group of spaces is partially replaced by tabs +when this can be done without changing the column they end at. +Called non-interactively, the region is specified by arguments +START and END, rather than by the position of point and mark. +The variable `tab-width' controls the spacing of tab stops. + +\(fn START END)" t nil) + +;;;*** + +;;;### (autoloads (table-release table-capture table-delete-column +;;;;;; table-delete-row table-insert-sequence table-generate-source +;;;;;; table-query-dimension table-fixed-width-mode table-justify-column +;;;;;; table-justify-row table-justify-cell table-justify table-split-cell +;;;;;; table-split-cell-horizontally table-split-cell-vertically +;;;;;; table-span-cell table-backward-cell table-forward-cell table-narrow-cell +;;;;;; table-widen-cell table-shorten-cell table-heighten-cell table-unrecognize-cell +;;;;;; table-recognize-cell table-unrecognize-table table-recognize-table +;;;;;; table-unrecognize-region table-recognize-region table-unrecognize +;;;;;; table-recognize table-insert-row-column table-insert-column +;;;;;; table-insert-row table-insert table-point-left-cell-hook +;;;;;; table-point-entered-cell-hook table-load-hook table-cell-map-hook) +;;;;;; "table" "textmodes/table.el" (16211 27044)) +;;; Generated autoloads from textmodes/table.el + +(defvar table-cell-map-hook nil "\ +*Normal hooks run when finishing construction of `table-cell-map'. +User can modify `table-cell-map' by adding custom functions here.") + +(custom-autoload (quote table-cell-map-hook) "table") + +(defvar table-load-hook nil "\ +*List of functions to be called after the table is first loaded.") + +(custom-autoload (quote table-load-hook) "table") + +(defvar table-point-entered-cell-hook nil "\ +*List of functions to be called after point entered a table cell.") + +(custom-autoload (quote table-point-entered-cell-hook) "table") + +(defvar table-point-left-cell-hook nil "\ +*List of functions to be called after point left a table cell.") + +(custom-autoload (quote table-point-left-cell-hook) "table") + +(autoload (quote table-insert) "table" "\ +Insert an editable text table. +Insert a table of specified number of COLUMNS and ROWS. Optional +parameter CELL-WIDTH and CELL-HEIGHT can specify the size of each +cell. The cell size is uniform across the table if the specified size +is a number. They can be a list of numbers to specify different size +for each cell. When called interactively, the list of number is +entered by simply listing all the numbers with space characters +delimiting them. + +Examples: + +\\[table-insert] inserts a table at the current point location. + +Suppose we have the following situation where `-!-' indicates the +location of point. + + -!- + +Type \\[table-insert] and hit ENTER key. As it asks table +specification, provide 3 for number of columns, 1 for number of rows, +5 for cell width and 1 for cell height. Now you shall see the next +table and the point is automatically moved to the beginning of the +first cell. + + +-----+-----+-----+ + |-!- | | | + +-----+-----+-----+ + +Inside a table cell, there are special key bindings. \\ + +M-9 \\[table-widen-cell] (or \\[universal-argument] 9 \\[table-widen-cell]) widens the first cell by 9 character +width, which results as + + +--------------+-----+-----+ + |-!- | | | + +--------------+-----+-----+ + +Type TAB \\[table-widen-cell] then type TAB M-2 M-7 \\[table-widen-cell] (or \\[universal-argument] 2 7 \\[table-widen-cell]). Typing +TAB moves the point forward by a cell. The result now looks like this: + + +--------------+------+--------------------------------+ + | | |-!- | + +--------------+------+--------------------------------+ + +If you knew each width of the columns prior to the table creation, +what you could have done better was to have had given the complete +width information to `table-insert'. + +Cell width(s): 14 6 32 + +instead of + +Cell width(s): 5 + +This would have eliminated the previously mentioned width adjustment +work all together. + +If the point is in the last cell type S-TAB S-TAB to move it to the +first cell. Now type \\[table-heighten-cell] which heighten the row by a line. + + +--------------+------+--------------------------------+ + |-!- | | | + | | | | + +--------------+------+--------------------------------+ + +Type \\[table-insert-row-column] and tell it to insert a row. + + +--------------+------+--------------------------------+ + |-!- | | | + | | | | + +--------------+------+--------------------------------+ + | | | | + | | | | + +--------------+------+--------------------------------+ + +Move the point under the table as shown below. + + +--------------+------+--------------------------------+ + | | | | + | | | | + +--------------+------+--------------------------------+ + | | | | + | | | | + +--------------+------+--------------------------------+ + -!- + +Type M-x table-insert-row instead of \\[table-insert-row-column]. \\[table-insert-row-column] does not work +when the point is outside of the table. This insertion at +outside of the table effectively appends a row at the end. + + +--------------+------+--------------------------------+ + | | | | + | | | | + +--------------+------+--------------------------------+ + | | | | + | | | | + +--------------+------+--------------------------------+ + |-!- | | | + | | | | + +--------------+------+--------------------------------+ + +Text editing inside the table cell produces reasonably expected +results. + + +--------------+------+--------------------------------+ + | | | | + | | | | + +--------------+------+--------------------------------+ + | | |Text editing inside the table | + | | |cell produces reasonably | + | | |expected results.-!- | + +--------------+------+--------------------------------+ + | | | | + | | | | + +--------------+------+--------------------------------+ + +Inside a table cell has a special keymap. + +\\{table-cell-map} + +\(fn COLUMNS ROWS &optional CELL-WIDTH CELL-HEIGHT)" t nil) + +(autoload (quote table-insert-row) "table" "\ +Insert N table row(s). +When point is in a table the newly inserted row(s) are placed above +the current row. When point is outside of the table it must be below +the table within the table width range, then the newly created row(s) +are appended at the bottom of the table. + +\(fn N)" t nil) + +(autoload (quote table-insert-column) "table" "\ +Insert N table column(s). +When point is in a table the newly inserted column(s) are placed left +of the current column. When point is outside of the table it must be +right side of the table within the table height range, then the newly +created column(s) are appended at the right of the table. + +\(fn N)" t nil) + +(autoload (quote table-insert-row-column) "table" "\ +Insert row(s) or column(s). +See `table-insert-row' and `table-insert-column'. + +\(fn ROW-COLUMN N)" t nil) + +(autoload (quote table-recognize) "table" "\ +Recognize all tables within the current buffer and activate them. +Scans the entire buffer and recognizes valid table cells. If the +optional numeric prefix argument ARG is negative the tables in the +buffer become inactive, meaning the tables become plain text and loses +all the table specific features. + +\(fn &optional ARG)" t nil) + +(autoload (quote table-unrecognize) "table" "\ +Not documented + +\(fn)" t nil) + +(autoload (quote table-recognize-region) "table" "\ +Recognize all tables within region. +BEG and END specify the region to work on. If the optional numeric +prefix argument ARG is negative the tables in the region become +inactive, meaning the tables become plain text and lose all the table +specific features. + +\(fn BEG END &optional ARG)" t nil) + +(autoload (quote table-unrecognize-region) "table" "\ +Not documented + +\(fn BEG END)" t nil) + +(autoload (quote table-recognize-table) "table" "\ +Recognize a table at point. +If the optional numeric prefix argument ARG is negative the table +becomes inactive, meaning the table becomes plain text and loses all +the table specific features. + +\(fn &optional ARG)" t nil) + +(autoload (quote table-unrecognize-table) "table" "\ +Not documented + +\(fn)" t nil) + +(autoload (quote table-recognize-cell) "table" "\ +Recognize a table cell that contains current point. +Probe the cell dimension and prepare the cell information. The +optional two arguments FORCE and NO-COPY are for internal use only and +must not be specified. When the optional numeric prefix argument ARG +is negative the cell becomes inactive, meaning that the cell becomes +plain text and loses all the table specific features. + +\(fn &optional FORCE NO-COPY ARG)" t nil) + +(autoload (quote table-unrecognize-cell) "table" "\ +Not documented + +\(fn)" t nil) + +(autoload (quote table-heighten-cell) "table" "\ +Heighten the current cell by N lines by expanding the cell vertically. +Heightening is done by adding blank lines at the bottom of the current +cell. Other cells aligned horizontally with the current one are also +heightened in order to keep the rectangular table structure. The +optional argument NO-COPY is internal use only and must not be +specified. + +\(fn N &optional NO-COPY NO-UPDATE)" t nil) + +(autoload (quote table-shorten-cell) "table" "\ +Shorten the current cell by N lines by shrinking the cell vertically. +Shortening is done by removing blank lines from the bottom of the cell +and possibly from the top of the cell as well. Therefor, the cell +must have some bottom/top blank lines to be shorten effectively. This +is applicable to all the cells aligned horizontally with the current +one because they are also shortened in order to keep the rectangular +table structure. + +\(fn N)" t nil) + +(autoload (quote table-widen-cell) "table" "\ +Widen the current cell by N columns and expand the cell horizontally. +Some other cells in the same table are widen as well to keep the +table's rectangle structure. + +\(fn N &optional NO-COPY NO-UPDATE)" t nil) + +(autoload (quote table-narrow-cell) "table" "\ +Narrow the current cell by N columns and shrink the cell horizontally. +Some other cells in the same table are narrowed as well to keep the +table's rectangle structure. + +\(fn N)" t nil) + +(autoload (quote table-forward-cell) "table" "\ +Move point forward to the beginning of the next cell. +With argument ARG, do it ARG times; +a negative argument ARG = -N means move backward N cells. +Do not specify NO-RECOGNIZE and UNRECOGNIZE. They are for internal use only. + +Sample Cell Traveling Order (In Irregular Table Cases) + +You can actually try how it works in this buffer. Press +\\[table-recognize] and go to cells in the following tables and press +\\[table-forward-cell] or TAB key. + ++-----+--+ +--+-----+ +--+--+--+ +--+--+--+ +---------+ +--+---+--+ +|0 |1 | |0 |1 | |0 |1 |2 | |0 |1 |2 | |0 | |0 |1 |2 | ++--+--+ | | +--+--+ +--+ | | | | +--+ +----+----+ +--+-+-+--+ +|2 |3 | | | |2 |3 | |3 +--+ | | +--+3 | |1 |2 | |3 |4 | +| +--+--+ +--+--+ | +--+4 | | | |4 +--+ +--+-+-+--+ +----+----+ +| |4 | |4 | | |5 | | | | | |5 | |3 |4 |5 | |5 | ++--+-----+ +-----+--+ +--+--+--+ +--+--+--+ +--+---+--+ +---------+ + ++--+--+--+ +--+--+--+ +--+--+--+ +--+--+--+ +|0 |1 |2 | |0 |1 |2 | |0 |1 |2 | |0 |1 |2 | +| | | | | +--+ | | | | | +--+ +--+ ++--+ +--+ +--+3 +--+ | +--+ | |3 +--+4 | +|3 | |4 | |4 +--+5 | | |3 | | +--+5 +--+ +| | | | | |6 | | | | | | |6 | |7 | ++--+--+--+ +--+--+--+ +--+--+--+ +--+--+--+ + ++--+--+--+ +--+--+--+ +--+--+--+--+ +--+-----+--+ +--+--+--+--+ +|0 |1 |2 | |0 |1 |2 | |0 |1 |2 |3 | |0 |1 |2 | |0 |1 |2 |3 | +| +--+ | | +--+ | | +--+--+ | | | | | | +--+--+ | +| |3 +--+ +--+3 | | +--+4 +--+ +--+ +--+ +--+4 +--+ ++--+ |4 | |4 | +--+ |5 +--+--+6 | |3 +--+--+4 | |5 | |6 | +|5 +--+ | | +--+5 | | |7 |8 | | | |5 |6 | | | | | | +| |6 | | | |6 | | +--+--+--+--+ +--+--+--+--+ +--+-----+--+ ++--+--+--+ +--+--+--+ + +\(fn &optional ARG NO-RECOGNIZE UNRECOGNIZE)" t nil) + +(autoload (quote table-backward-cell) "table" "\ +Move backward to the beginning of the previous cell. +With argument ARG, do it ARG times; +a negative argument ARG = -N means move forward N cells. + +\(fn &optional ARG)" t nil) + +(autoload (quote table-span-cell) "table" "\ +Span current cell into adjacent cell in DIRECTION. +DIRECTION is one of symbols; right, left, above or below. + +\(fn DIRECTION)" t nil) + +(autoload (quote table-split-cell-vertically) "table" "\ +Split current cell vertically. +Creates a cell above and a cell below the current point location. + +\(fn)" t nil) + +(autoload (quote table-split-cell-horizontally) "table" "\ +Split current cell horizontally. +Creates a cell on the left and a cell on the right of the current point location. + +\(fn)" t nil) + +(autoload (quote table-split-cell) "table" "\ +Split current cell in ORIENTATION. +ORIENTATION is a symbol either horizontally or vertically. + +\(fn ORIENTATION)" t nil) + +(autoload (quote table-justify) "table" "\ +Justify contents of a cell, a row of cells or a column of cells. +WHAT is a symbol 'cell, 'row or 'column. JUSTIFY is a symbol 'left, +'center, 'right, 'top, 'middle, 'bottom or 'none. + +\(fn WHAT JUSTIFY)" t nil) + +(autoload (quote table-justify-cell) "table" "\ +Justify cell contents. +JUSTIFY is a symbol 'left, 'center or 'right for horizontal, or 'top, +'middle, 'bottom or 'none for vertical. When optional PARAGRAPH is +non-nil the justify operation is limited to the current paragraph, +otherwise the entire cell contents is justified. + +\(fn JUSTIFY &optional PARAGRAPH)" t nil) + +(autoload (quote table-justify-row) "table" "\ +Justify cells of a row. +JUSTIFY is a symbol 'left, 'center or 'right for horizontal, or top, +'middle, 'bottom or 'none for vertical. + +\(fn JUSTIFY)" t nil) + +(autoload (quote table-justify-column) "table" "\ +Justify cells of a column. +JUSTIFY is a symbol 'left, 'center or 'right for horizontal, or top, +'middle, 'bottom or 'none for vertical. + +\(fn JUSTIFY)" t nil) + +(autoload (quote table-fixed-width-mode) "table" "\ +Toggle fixing width mode. +In the fixed width mode, typing inside a cell never changes the cell +width where in the normal mode the cell width expands automatically in +order to prevent a word being folded into multiple lines. + +\(fn &optional ARG)" t nil) + +(autoload (quote table-query-dimension) "table" "\ +Return the dimension of the current cell and the current table. +The result is a list (cw ch tw th c r cells) where cw is the cell +width, ch is the cell height, tw is the table width, th is the table +height, c is the number of columns, r is the number of rows and cells +is the total number of cells. The cell dimension excludes the cell +frame while the table dimension includes the table frame. The columns +and the rows are counted by the number of cell boundaries. Therefore +the number tends to be larger than it appears for the tables with +non-uniform cell structure (heavily spanned and split). When optional +WHERE is provided the cell and table at that location is reported. + +\(fn &optional WHERE)" t nil) + +(autoload (quote table-generate-source) "table" "\ +Generate source of the current table in the specified language. +LANGUAGE is a symbol that specifies the language to describe the +structure of the table. It must be either 'html, 'latex or 'cals. +The resulted source text is inserted into DEST-BUFFER and the buffer +object is returned. When DEST-BUFFER is omitted or nil the default +buffer specified in `table-dest-buffer-name' is used. In this case +the content of the default buffer is erased prior to the generation. +When DEST-BUFFER is non-nil it is expected to be either a destination +buffer or a name of the destination buffer. In this case the +generated result is inserted at the current point in the destination +buffer and the previously existing contents in the buffer are +untouched. + +References used for this implementation: + +HTML: + http://www.w3.org + +LaTeX: + http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Tables.html + +CALS (DocBook DTD): + http://www.oasis-open.org/html/a502.htm + http://www.oreilly.com/catalog/docbook/chapter/book/table.html#AEN114751 + +\(fn LANGUAGE &optional DEST-BUFFER CAPTION)" t nil) + +(autoload (quote table-insert-sequence) "table" "\ +Travel cells forward while inserting a specified sequence string in each cell. +STR is the base string from which the sequence starts. When STR is an +empty string then each cell content is erased. When STR ends with +numerical characters (they may optionally be surrounded by a pair of +parentheses) they are incremented as a decimal number. Otherwise the +last character in STR is incremented in ASCII code order. N is the +number of sequence elements to insert. When N is negative the cell +traveling direction is backward. When N is zero it travels forward +entire table. INCREMENT is the increment between adjacent sequence +elements and can be a negative number for effectively decrementing. +INTERVAL is the number of cells to travel between sequence element +insertion which is normally 1. When zero or less is given for +INTERVAL it is interpreted as number of cells per row so that sequence +is placed straight down vertically as long as the table's cell +structure is uniform. JUSTIFY is one of the symbol 'left, 'center or +'right, that specifies justification of the inserted string. + +Example: + + (progn + (table-insert 16 3 5 1) + (table-forward-cell 15) + (table-insert-sequence \"D0\" -16 1 1 'center) + (table-forward-cell 16) + (table-insert-sequence \"A[0]\" -16 1 1 'center) + (table-forward-cell 1) + (table-insert-sequence \"-\" 16 0 1 'center)) + + (progn + (table-insert 16 8 5 1) + (table-insert-sequence \"@\" 0 1 2 'right) + (table-forward-cell 1) + (table-insert-sequence \"64\" 0 1 2 'left)) + +\(fn STR N INCREMENT INTERVAL JUSTIFY)" t nil) + +(autoload (quote table-delete-row) "table" "\ +Delete N row(s) of cells. +Delete N rows of cells from current row. The current row is the row +contains the current cell where point is located. Each row must +consists from cells of same height. + +\(fn N)" t nil) + +(autoload (quote table-delete-column) "table" "\ +Delete N column(s) of cells. +Delete N columns of cells from current column. The current column is +the column contains the current cell where point is located. Each +column must consists from cells of same width. + +\(fn N)" t nil) + +(autoload (quote table-capture) "table" "\ +Convert plain text into a table by capturing the text in the region. +Create a table with the text in region as cell contents. BEG and END +specify the region. The text in the region is replaced with a table. +The removed text is inserted in the table. When optional +COL-DELIM-REGEXP and ROW-DELIM-REGEXP are provided the region contents +is parsed and separated into individual cell contents by using the +delimiter regular expressions. This parsing determines the number of +columns and rows of the table automatically. If COL-DELIM-REGEXP and +ROW-DELIM-REGEXP are omitted the result table has only one cell and +the entire region contents is placed in that cell. Optional JUSTIFY +is one of 'left, 'center or 'right, which specifies the cell +justification. Optional MIN-CELL-WIDTH specifies the minimum cell +width. Optional COLUMNS specify the number of columns when +ROW-DELIM-REGEXP is not specified. + + +Example 1: + +1, 2, 3, 4 +5, 6, 7, 8 +, 9, 10 + +Running `table-capture' on above 3 line region with COL-DELIM-REGEXP +\",\" and ROW-DELIM-REGEXP \"\\n\" creates the following table. In +this example the cells are centered and minimum cell width is +specified as 5. + ++-----+-----+-----+-----+ +| 1 | 2 | 3 | 4 | ++-----+-----+-----+-----+ +| 5 | 6 | 7 | 8 | ++-----+-----+-----+-----+ +| | 9 | 10 | | ++-----+-----+-----+-----+ + +Note: + +In case the function is called interactively user must use \\[quoted-insert] `quoted-insert' +in order to enter \"\\n\" successfully. COL-DELIM-REGEXP at the end +of each row is optional. + + +Example 2: + +This example shows how a table can be used for text layout editing. +Let `table-capture' capture the following region starting from +-!- and ending at -*-, that contains three paragraphs and two item +name headers. This time specify empty string for both +COL-DELIM-REGEXP and ROW-DELIM-REGEXP. + +-!-`table-capture' is a powerful command however mastering its power +requires some practice. Here is a list of items what it can do. + +Parse Cell Items By using column delimiter regular + expression and raw delimiter regular + expression, it parses the specified text + area and extracts cell items from + non-table text and then forms a table out + of them. + +Capture Text Area When no delimiters are specified it + creates a single cell table. The text in + the specified region is placed in that + cell.-*- + +Now the entire content is captured in a cell which is itself a table +like this. + ++-----------------------------------------------------------------+ +|`table-capture' is a powerful command however mastering its power| +|requires some practice. Here is a list of items what it can do. | +| | +|Parse Cell Items By using column delimiter regular | +| expression and raw delimiter regular | +| expression, it parses the specified text | +| area and extracts cell items from | +| non-table text and then forms a table out | +| of them. | +| | +|Capture Text Area When no delimiters are specified it | +| creates a single cell table. The text in | +| the specified region is placed in that | +| cell. | ++-----------------------------------------------------------------+ + +By splitting the cell appropriately we now have a table consisting of +paragraphs occupying its own cell. Each cell can now be edited +independently. + ++-----------------------------------------------------------------+ +|`table-capture' is a powerful command however mastering its power| +|requires some practice. Here is a list of items what it can do. | ++---------------------+-------------------------------------------+ +|Parse Cell Items |By using column delimiter regular | +| |expression and raw delimiter regular | +| |expression, it parses the specified text | +| |area and extracts cell items from | +| |non-table text and then forms a table out | +| |of them. | ++---------------------+-------------------------------------------+ +|Capture Text Area |When no delimiters are specified it | +| |creates a single cell table. The text in | +| |the specified region is placed in that | +| |cell. | ++---------------------+-------------------------------------------+ + +By applying `table-release', which does the opposite process, the +contents become once again plain text. `table-release' works as +companion command to `table-capture' this way. + +\(fn BEG END &optional COL-DELIM-REGEXP ROW-DELIM-REGEXP JUSTIFY MIN-CELL-WIDTH COLUMNS)" t nil) + +(autoload (quote table-release) "table" "\ +Convert a table into plain text by removing the frame from a table. +Remove the frame from a table and inactivate the table. This command +converts a table into plain text without frames. It is a companion to +`table-capture' which does the opposite process. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (talk-connect) "talk" "talk.el" (16211 27021)) +;;; Generated autoloads from talk.el + +(autoload (quote talk-connect) "talk" "\ +Connect to display DISPLAY for the Emacs talk group. + +\(fn DISPLAY)" t nil) + +;;;*** + +;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (16211 27021)) +;;; Generated autoloads from tar-mode.el + +(autoload (quote tar-mode) "tar-mode" "\ +Major mode for viewing a tar file as a dired-like listing of its contents. +You can move around using the usual cursor motion commands. +Letters no longer insert themselves. +Type `e' to pull a file out of the tar file and into its own buffer; +or click mouse-2 on the file's line in the Tar mode buffer. +Type `c' to copy an entry from the tar file into another file on disk. + +If you edit a sub-file of this archive (as with the `e' command) and +save it with Control-x Control-s, the contents of that buffer will be +saved back into the tar-file buffer; in this way you can edit a file +inside of a tar archive without extracting it and re-archiving it. + +See also: variables `tar-update-datestamp' and `tar-anal-blocksize'. +\\{tar-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (tcl-help-on-word inferior-tcl tcl-mode) "tcl" +;;;;;; "progmodes/tcl.el" (16211 27039)) +;;; Generated autoloads from progmodes/tcl.el + +(autoload (quote tcl-mode) "tcl" "\ +Major mode for editing Tcl code. +Expression and list commands understand all Tcl brackets. +Tab indents for Tcl code. +Paragraphs are separated by blank lines only. +Delete converts tabs to spaces as it moves back. + +Variables controlling indentation style: + `tcl-indent-level' + Indentation of Tcl statements within surrounding block. + `tcl-continued-indent-level' + Indentation of continuation line relative to first line of command. + +Variables controlling user interaction with mode (see variable +documentation for details): + `tcl-tab-always-indent' + Controls action of TAB key. + `tcl-auto-newline' + Non-nil means automatically newline before and after braces, brackets, + and semicolons inserted in Tcl code. + `tcl-use-smart-word-finder' + If not nil, use a smarter, Tcl-specific way to find the current + word when looking up help on a Tcl command. + +Turning on Tcl mode runs `tcl-mode-hook'. Read the documentation for +`tcl-mode-hook' to see what kinds of interesting hook functions +already exist. + +Commands: +\\{tcl-mode-map} + +\(fn)" t nil) + +(autoload (quote inferior-tcl) "tcl" "\ +Run inferior Tcl process. +Prefix arg means enter program name interactively. +See documentation for function `inferior-tcl-mode' for more information. + +\(fn CMD)" t nil) + +(autoload (quote tcl-help-on-word) "tcl" "\ +Get help on Tcl command. Default is word at point. +Prefix argument means invert sense of `tcl-use-smart-word-finder'. + +\(fn COMMAND &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (rsh telnet) "telnet" "net/telnet.el" (16211 27037)) +;;; Generated autoloads from net/telnet.el + (add-hook 'same-window-regexps "\\*telnet-.*\\*\\(\\|<[0-9]+>\\)") + +(autoload (quote telnet) "telnet" "\ +Open a network login connection to host named HOST (a string). +Communication with HOST is recorded in a buffer `*PROGRAM-HOST*' +where PROGRAM is the telnet program being used. This program +is controlled by the contents of the global variable `telnet-host-properties', +falling back on the value of the global variable `telnet-program'. +Normally input is edited in Emacs and sent a line at a time. + +\(fn HOST)" t nil) + (add-hook 'same-window-regexps "\\*rsh-[^-]*\\*\\(\\|<[0-9]*>\\)") + +(autoload (quote rsh) "telnet" "\ +Open a network login connection to host named HOST (a string). +Communication with HOST is recorded in a buffer `*rsh-HOST*'. +Normally input is edited in Emacs and sent a line at a time. + +\(fn HOST)" t nil) + +;;;*** + +;;;### (autoloads (ansi-term term make-term) "term" "term.el" (16211 +;;;;;; 27021)) +;;; Generated autoloads from term.el + +(autoload (quote make-term) "term" "\ +Make a term process NAME in a buffer, running PROGRAM. +The name of the buffer is made by surrounding NAME with `*'s. +If there is already a running process in that buffer, it is not restarted. +Optional third arg STARTFILE is the name of a file to send the contents of to +the process. Any more args are arguments to PROGRAM. + +\(fn NAME PROGRAM &optional STARTFILE &rest SWITCHES)" nil nil) + +(autoload (quote term) "term" "\ +Start a terminal-emulator in a new buffer. +The buffer is in Term mode; see `term-mode' for the +commands to use in that buffer. + +\\Type \\[switch-to-buffer] to switch to another buffer. + +\(fn PROGRAM)" t nil) + +(autoload (quote ansi-term) "term" "\ +Start a terminal-emulator in a new buffer. + +\(fn PROGRAM &optional NEW-BUFFER-NAME)" t nil) + +;;;*** + +;;;### (autoloads (terminal-emulator) "terminal" "terminal.el" (16211 +;;;;;; 27021)) +;;; Generated autoloads from terminal.el + +(autoload (quote terminal-emulator) "terminal" "\ +Under a display-terminal emulator in BUFFER, run PROGRAM on arguments ARGS. +ARGS is a list of argument-strings. Remaining arguments are WIDTH and HEIGHT. +BUFFER's contents are made an image of the display generated by that program, +and any input typed when BUFFER is the current Emacs buffer is sent to that +program as keyboard input. + +Interactively, BUFFER defaults to \"*terminal*\" and PROGRAM and ARGS +are parsed from an input-string using your usual shell. +WIDTH and HEIGHT are determined from the size of the current window +-- WIDTH will be one less than the window's width, HEIGHT will be its height. + +To switch buffers and leave the emulator, or to give commands +to the emulator itself (as opposed to the program running under it), +type Control-^. The following character is an emulator command. +Type Control-^ twice to send it to the subprogram. +This escape character may be changed using the variable `terminal-escape-char'. + +`Meta' characters may not currently be sent through the terminal emulator. + +Here is a list of some of the variables which control the behaviour +of the emulator -- see their documentation for more information: +terminal-escape-char, terminal-scrolling, terminal-more-processing, +terminal-redisplay-interval. + +This function calls the value of terminal-mode-hook if that exists +and is non-nil after the terminal buffer has been set up and the +subprocess started. + +\(fn BUFFER PROGRAM ARGS &optional WIDTH HEIGHT)" t nil) + +;;;*** + +;;;### (autoloads (testcover-this-defun testcover-start) "testcover" +;;;;;; "emacs-lisp/testcover.el" (16211 27026)) +;;; Generated autoloads from emacs-lisp/testcover.el + +(autoload (quote testcover-start) "testcover" "\ +Uses edebug to instrument all macros and functions in FILENAME, then +changes the instrumentation from edebug to testcover--much faster, no +problems with type-ahead or post-command-hook, etc. If BYTE-COMPILE is +non-nil, byte-compiles each function after instrumenting. + +\(fn FILENAME &optional BYTE-COMPILE)" t nil) + +(autoload (quote testcover-this-defun) "testcover" "\ +Start coverage on function under point. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (tetris) "tetris" "play/tetris.el" (16211 27038)) +;;; Generated autoloads from play/tetris.el + +(autoload (quote tetris) "tetris" "\ +Play the Tetris game. +Shapes drop from the top of the screen, and the user has to move and +rotate the shape to fit in with those at the bottom of the screen so +as to form complete rows. + +tetris-mode keybindings: + \\ +\\[tetris-start-game] Starts a new game of Tetris +\\[tetris-end-game] Terminates the current game +\\[tetris-pause-game] Pauses (or resumes) the current game +\\[tetris-move-left] Moves the shape one square to the left +\\[tetris-move-right] Moves the shape one square to the right +\\[tetris-rotate-prev] Rotates the shape clockwise +\\[tetris-rotate-next] Rotates the shape anticlockwise +\\[tetris-move-bottom] Drops the shape to the bottom of the playing area + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (doctex-mode tex-start-shell slitex-mode latex-mode +;;;;;; plain-tex-mode tex-mode tex-close-quote tex-open-quote tex-default-mode +;;;;;; tex-show-queue-command tex-dvi-view-command tex-alt-dvi-print-command +;;;;;; tex-dvi-print-command tex-bibtex-command latex-block-names +;;;;;; tex-start-commands tex-start-options slitex-run-command latex-run-command +;;;;;; tex-run-command tex-offer-save tex-main-file tex-first-line-header-regexp +;;;;;; tex-directory tex-shell-file-name) "tex-mode" "textmodes/tex-mode.el" +;;;;;; (16291 51938)) +;;; Generated autoloads from textmodes/tex-mode.el + +(defvar tex-shell-file-name nil "\ +*If non-nil, the shell file name to run in the subshell used to run TeX.") + +(custom-autoload (quote tex-shell-file-name) "tex-mode") + +(defvar tex-directory "." "\ +*Directory in which temporary files are written. +You can make this `/tmp' if your TEXINPUTS has no relative directories in it +and you don't try to apply \\[tex-region] or \\[tex-buffer] when there are +`\\input' commands with relative directories.") + +(custom-autoload (quote tex-directory) "tex-mode") + +(defvar tex-first-line-header-regexp nil "\ +Regexp for matching a first line which `tex-region' should include. +If this is non-nil, it should be a regular expression string; +if it matches the first line of the file, +`tex-region' always includes the first line in the TeX run.") + +(custom-autoload (quote tex-first-line-header-regexp) "tex-mode") + +(defvar tex-main-file nil "\ +*The main TeX source file which includes this buffer's file. +The command `tex-file' runs TeX on the file specified by `tex-main-file' +if the variable is non-nil.") + +(custom-autoload (quote tex-main-file) "tex-mode") + +(defvar tex-offer-save t "\ +*If non-nil, ask about saving modified buffers before \\[tex-file] is run.") + +(custom-autoload (quote tex-offer-save) "tex-mode") + +(defvar tex-run-command "tex" "\ +*Command used to run TeX subjob. +TeX Mode sets `tex-command' to this string. +See the documentation of that variable.") + +(custom-autoload (quote tex-run-command) "tex-mode") + +(defvar latex-run-command "latex" "\ +*Command used to run LaTeX subjob. +LaTeX Mode sets `tex-command' to this string. +See the documentation of that variable.") + +(custom-autoload (quote latex-run-command) "tex-mode") + +(defvar slitex-run-command "slitex" "\ +*Command used to run SliTeX subjob. +SliTeX Mode sets `tex-command' to this string. +See the documentation of that variable.") + +(custom-autoload (quote slitex-run-command) "tex-mode") + +(defvar tex-start-options "" "\ +*TeX options to use when starting TeX. +These immediately precede the commands in `tex-start-commands' +and the input file name, with no separating space and are not shell-quoted. +If nil, TeX runs with no options. See the documentation of `tex-command'.") + +(custom-autoload (quote tex-start-options) "tex-mode") + +(defvar tex-start-commands "\\nonstopmode\\input" "\ +*TeX commands to use when starting TeX. +They are shell-quoted and precede the input file name, with a separating space. +If nil, no commands are used. See the documentation of `tex-command'.") + +(custom-autoload (quote tex-start-commands) "tex-mode") + +(defvar latex-block-names nil "\ +*User defined LaTeX block names. +Combined with `latex-standard-block-names' for minibuffer completion.") + +(custom-autoload (quote latex-block-names) "tex-mode") + +(defvar tex-bibtex-command "bibtex" "\ +*Command used by `tex-bibtex-file' to gather bibliographic data. +If this string contains an asterisk (`*'), that is replaced by the file name; +otherwise, the file name, preceded by blank, is added at the end.") + +(custom-autoload (quote tex-bibtex-command) "tex-mode") + +(defvar tex-dvi-print-command "lpr -d" "\ +*Command used by \\[tex-print] to print a .dvi file. +If this string contains an asterisk (`*'), that is replaced by the file name; +otherwise, the file name, preceded by blank, is added at the end.") + +(custom-autoload (quote tex-dvi-print-command) "tex-mode") + +(defvar tex-alt-dvi-print-command "lpr -d" "\ +*Command used by \\[tex-print] with a prefix arg to print a .dvi file. +If this string contains an asterisk (`*'), that is replaced by the file name; +otherwise, the file name, preceded by blank, is added at the end. + +If two printers are not enough of a choice, you can set the variable +`tex-alt-dvi-print-command' to an expression that asks what you want; +for example, + + (setq tex-alt-dvi-print-command + '(format \"lpr -P%s\" (read-string \"Use printer: \"))) + +would tell \\[tex-print] with a prefix argument to ask you which printer to +use.") + +(custom-autoload (quote tex-alt-dvi-print-command) "tex-mode") + +(defvar tex-dvi-view-command (quote (if (eq window-system (quote x)) "xdvi" "dvi2tty * | cat -s")) "\ +*Command used by \\[tex-view] to display a `.dvi' file. +If it is a string, that specifies the command directly. +If this string contains an asterisk (`*'), that is replaced by the file name; +otherwise, the file name, preceded by a space, is added at the end. + +If the value is a form, it is evaluated to get the command to use.") + +(custom-autoload (quote tex-dvi-view-command) "tex-mode") + +(defvar tex-show-queue-command "lpq" "\ +*Command used by \\[tex-show-print-queue] to show the print queue. +Should show the queue(s) that \\[tex-print] puts jobs on.") + +(custom-autoload (quote tex-show-queue-command) "tex-mode") + +(defvar tex-default-mode (quote latex-mode) "\ +*Mode to enter for a new file that might be either TeX or LaTeX. +This variable is used when it can't be determined whether the file +is plain TeX or LaTeX or what because the file contains no commands. +Normally set to either `plain-tex-mode' or `latex-mode'.") + +(custom-autoload (quote tex-default-mode) "tex-mode") + +(defvar tex-open-quote "``" "\ +*String inserted by typing \\[tex-insert-quote] to open a quotation.") + +(custom-autoload (quote tex-open-quote) "tex-mode") + +(defvar tex-close-quote "''" "\ +*String inserted by typing \\[tex-insert-quote] to close a quotation.") + +(custom-autoload (quote tex-close-quote) "tex-mode") + +(autoload (quote tex-mode) "tex-mode" "\ +Major mode for editing files of input for TeX, LaTeX, or SliTeX. +Tries to determine (by looking at the beginning of the file) whether +this file is for plain TeX, LaTeX, or SliTeX and calls `plain-tex-mode', +`latex-mode', or `slitex-mode', respectively. If it cannot be determined, +such as if there are no commands in the file, the value of `tex-default-mode' +says which mode to use. + +\(fn)" t nil) + +(defalias (quote TeX-mode) (quote tex-mode)) + +(defalias (quote plain-TeX-mode) (quote plain-tex-mode)) + +(defalias (quote LaTeX-mode) (quote latex-mode)) + +(autoload (quote plain-tex-mode) "tex-mode" "\ +Major mode for editing files of input for plain TeX. +Makes $ and } display the characters they match. +Makes \" insert `` when it seems to be the beginning of a quotation, +and '' when it appears to be the end; it inserts \" only after a \\. + +Use \\[tex-region] to run TeX on the current region, plus a \"header\" +copied from the top of the file (containing macro definitions, etc.), +running TeX under a special subshell. \\[tex-buffer] does the whole buffer. +\\[tex-file] saves the buffer and then processes the file. +\\[tex-print] prints the .dvi file made by any of these. +\\[tex-view] previews the .dvi file made by any of these. +\\[tex-bibtex-file] runs bibtex on the file of the current buffer. + +Use \\[tex-validate-buffer] to check buffer for paragraphs containing +mismatched $'s or braces. + +Special commands: +\\{plain-tex-mode-map} + +Mode variables: +tex-run-command + Command string used by \\[tex-region] or \\[tex-buffer]. +tex-directory + Directory in which to create temporary files for TeX jobs + run by \\[tex-region] or \\[tex-buffer]. +tex-dvi-print-command + Command string used by \\[tex-print] to print a .dvi file. +tex-alt-dvi-print-command + Alternative command string used by \\[tex-print] (when given a prefix + argument) to print a .dvi file. +tex-dvi-view-command + Command string used by \\[tex-view] to preview a .dvi file. +tex-show-queue-command + Command string used by \\[tex-show-print-queue] to show the print + queue that \\[tex-print] put your job on. + +Entering Plain-tex mode runs the hook `text-mode-hook', then the hook +`tex-mode-hook', and finally the hook `plain-tex-mode-hook'. When the +special subshell is initiated, the hook `tex-shell-hook' is run. + +\(fn)" t nil) + +(autoload (quote latex-mode) "tex-mode" "\ +Major mode for editing files of input for LaTeX. +Makes $ and } display the characters they match. +Makes \" insert `` when it seems to be the beginning of a quotation, +and '' when it appears to be the end; it inserts \" only after a \\. + +Use \\[tex-region] to run LaTeX on the current region, plus the preamble +copied from the top of the file (containing \\documentstyle, etc.), +running LaTeX under a special subshell. \\[tex-buffer] does the whole buffer. +\\[tex-file] saves the buffer and then processes the file. +\\[tex-print] prints the .dvi file made by any of these. +\\[tex-view] previews the .dvi file made by any of these. +\\[tex-bibtex-file] runs bibtex on the file of the current buffer. + +Use \\[tex-validate-buffer] to check buffer for paragraphs containing +mismatched $'s or braces. + +Special commands: +\\{latex-mode-map} + +Mode variables: +latex-run-command + Command string used by \\[tex-region] or \\[tex-buffer]. +tex-directory + Directory in which to create temporary files for LaTeX jobs + run by \\[tex-region] or \\[tex-buffer]. +tex-dvi-print-command + Command string used by \\[tex-print] to print a .dvi file. +tex-alt-dvi-print-command + Alternative command string used by \\[tex-print] (when given a prefix + argument) to print a .dvi file. +tex-dvi-view-command + Command string used by \\[tex-view] to preview a .dvi file. +tex-show-queue-command + Command string used by \\[tex-show-print-queue] to show the print + queue that \\[tex-print] put your job on. + +Entering Latex mode runs the hook `text-mode-hook', then +`tex-mode-hook', and finally `latex-mode-hook'. When the special +subshell is initiated, `tex-shell-hook' is run. + +\(fn)" t nil) + +(autoload (quote slitex-mode) "tex-mode" "\ +Major mode for editing files of input for SliTeX. +Makes $ and } display the characters they match. +Makes \" insert `` when it seems to be the beginning of a quotation, +and '' when it appears to be the end; it inserts \" only after a \\. + +Use \\[tex-region] to run SliTeX on the current region, plus the preamble +copied from the top of the file (containing \\documentstyle, etc.), +running SliTeX under a special subshell. \\[tex-buffer] does the whole buffer. +\\[tex-file] saves the buffer and then processes the file. +\\[tex-print] prints the .dvi file made by any of these. +\\[tex-view] previews the .dvi file made by any of these. +\\[tex-bibtex-file] runs bibtex on the file of the current buffer. + +Use \\[tex-validate-buffer] to check buffer for paragraphs containing +mismatched $'s or braces. + +Special commands: +\\{slitex-mode-map} + +Mode variables: +slitex-run-command + Command string used by \\[tex-region] or \\[tex-buffer]. +tex-directory + Directory in which to create temporary files for SliTeX jobs + run by \\[tex-region] or \\[tex-buffer]. +tex-dvi-print-command + Command string used by \\[tex-print] to print a .dvi file. +tex-alt-dvi-print-command + Alternative command string used by \\[tex-print] (when given a prefix + argument) to print a .dvi file. +tex-dvi-view-command + Command string used by \\[tex-view] to preview a .dvi file. +tex-show-queue-command + Command string used by \\[tex-show-print-queue] to show the print + queue that \\[tex-print] put your job on. + +Entering SliTeX mode runs the hook `text-mode-hook', then the hook +`tex-mode-hook', then the hook `latex-mode-hook', and finally the hook +`slitex-mode-hook'. When the special subshell is initiated, the hook +`tex-shell-hook' is run. + +\(fn)" t nil) + +(autoload (quote tex-start-shell) "tex-mode" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote doctex-mode) "tex-mode" "\ +Major mode to edit DocTeX files. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (texi2info texinfo-format-region texinfo-format-buffer) +;;;;;; "texinfmt" "textmodes/texinfmt.el" (16292 22308)) +;;; Generated autoloads from textmodes/texinfmt.el + +(autoload (quote texinfo-format-buffer) "texinfmt" "\ +Process the current buffer as texinfo code, into an Info file. +The Info file output is generated in a buffer visiting the Info file +name specified in the @setfilename command. + +Non-nil argument (prefix, if interactive) means don't make tag table +and don't split the file if large. You can use Info-tagify and +Info-split to do these manually. + +\(fn &optional NOSPLIT)" t nil) + +(autoload (quote texinfo-format-region) "texinfmt" "\ +Convert the current region of the Texinfo file to Info format. +This lets you see what that part of the file will look like in Info. +The command is bound to \\[texinfo-format-region]. The text that is +converted to Info is stored in a temporary buffer. + +\(fn REGION-BEGINNING REGION-END)" t nil) + +(autoload (quote texi2info) "texinfmt" "\ +Convert the current buffer (written in Texinfo code) into an Info file. +The Info file output is generated in a buffer visiting the Info file +names specified in the @setfilename command. + +This function automatically updates all node pointers and menus, and +creates a master menu. This work is done on a temporary buffer that +is automatically removed when the Info file is created. The original +Texinfo source buffer is not changed. + +Non-nil argument (prefix, if interactive) means don't split the file +if large. You can use Info-split to do this manually. + +\(fn &optional NOSPLIT)" t nil) + +;;;*** + +;;;### (autoloads (texinfo-mode texinfo-close-quote texinfo-open-quote) +;;;;;; "texinfo" "textmodes/texinfo.el" (16211 27044)) +;;; Generated autoloads from textmodes/texinfo.el + +(defvar texinfo-open-quote "``" "\ +*String inserted by typing \\[texinfo-insert-quote] to open a quotation.") + +(custom-autoload (quote texinfo-open-quote) "texinfo") + +(defvar texinfo-close-quote "''" "\ +*String inserted by typing \\[texinfo-insert-quote] to close a quotation.") + +(custom-autoload (quote texinfo-close-quote) "texinfo") + +(autoload (quote texinfo-mode) "texinfo" "\ +Major mode for editing Texinfo files. + + It has these extra commands: +\\{texinfo-mode-map} + + These are files that are used as input for TeX to make printed manuals +and also to be turned into Info files with \\[makeinfo-buffer] or +the `makeinfo' program. These files must be written in a very restricted and +modified version of TeX input format. + + Editing commands are like text-mode except that the syntax table is +set up so expression commands skip Texinfo bracket groups. To see +what the Info version of a region of the Texinfo file will look like, +use \\[makeinfo-region], which runs `makeinfo' on the current region. + + You can show the structure of a Texinfo file with \\[texinfo-show-structure]. +This command shows the structure of a Texinfo file by listing the +lines with the @-sign commands for @chapter, @section, and the like. +These lines are displayed in another window called the *Occur* window. +In that window, you can position the cursor over one of the lines and +use \\[occur-mode-goto-occurrence], to jump to the corresponding spot +in the Texinfo file. + + In addition, Texinfo mode provides commands that insert various +frequently used @-sign commands into the buffer. You can use these +commands to save keystrokes. And you can insert balanced braces with +\\[texinfo-insert-braces] and later use the command \\[up-list] to +move forward past the closing brace. + +Also, Texinfo mode provides functions for automatically creating or +updating menus and node pointers. These functions + + * insert the `Next', `Previous' and `Up' pointers of a node, + * insert or update the menu for a section, and + * create a master menu for a Texinfo source file. + +Here are the functions: + + texinfo-update-node \\[texinfo-update-node] + texinfo-every-node-update \\[texinfo-every-node-update] + texinfo-sequential-node-update + + texinfo-make-menu \\[texinfo-make-menu] + texinfo-all-menus-update \\[texinfo-all-menus-update] + texinfo-master-menu + + texinfo-indent-menu-description (column &optional region-p) + +The `texinfo-column-for-description' variable specifies the column to +which menu descriptions are indented. + +Passed an argument (a prefix argument, if interactive), the +`texinfo-update-node' and `texinfo-make-menu' functions do their jobs +in the region. + +To use the updating commands, you must structure your Texinfo file +hierarchically, such that each `@node' line, with the exception of the +Top node, is accompanied by some kind of section line, such as an +`@chapter' or `@section' line. + +If the file has a `top' node, it must be called `top' or `Top' and +be the first node in the file. + +Entering Texinfo mode calls the value of `text-mode-hook', and then the +value of `texinfo-mode-hook'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (thai-composition-function thai-post-read-conversion +;;;;;; thai-compose-buffer thai-compose-string thai-compose-region) +;;;;;; "thai-util" "language/thai-util.el" (16211 27033)) +;;; Generated autoloads from language/thai-util.el + +(autoload (quote thai-compose-region) "thai-util" "\ +Compose Thai characters in the region. +When called from a program, expects two arguments, +positions (integers or markers) specifying the region. + +\(fn BEG END)" t nil) + +(autoload (quote thai-compose-string) "thai-util" "\ +Compose Thai characters in STRING and return the resulting string. + +\(fn STRING)" nil nil) + +(autoload (quote thai-compose-buffer) "thai-util" "\ +Compose Thai characters in the current buffer. + +\(fn)" t nil) + +(autoload (quote thai-post-read-conversion) "thai-util" "\ +Not documented + +\(fn LEN)" nil nil) + +(autoload (quote thai-composition-function) "thai-util" "\ +Compose Thai text in the region FROM and TO. +The text matches the regular expression PATTERN. +Optional 4th argument STRING, if non-nil, is a string containing text +to compose. + +The return value is number of composed characters. + +\(fn FROM TO PATTERN &optional STRING)" nil nil) + +;;;*** + +;;;### (autoloads (list-at-point number-at-point symbol-at-point +;;;;;; sexp-at-point thing-at-point bounds-of-thing-at-point forward-thing) +;;;;;; "thingatpt" "thingatpt.el" (16211 27021)) +;;; Generated autoloads from thingatpt.el + +(autoload (quote forward-thing) "thingatpt" "\ +Move forward to the end of the next THING. + +\(fn THING &optional N)" nil nil) + +(autoload (quote bounds-of-thing-at-point) "thingatpt" "\ +Determine the start and end buffer locations for the THING at point. +THING is a symbol which specifies the kind of syntactic entity you want. +Possibilities include `symbol', `list', `sexp', `defun', `filename', `url', +`word', `sentence', `whitespace', `line', `page' and others. + +See the file `thingatpt.el' for documentation on how to define +a symbol as a valid THING. + +The value is a cons cell (START . END) giving the start and end positions +of the textual entity that was found. + +\(fn THING)" nil nil) + +(autoload (quote thing-at-point) "thingatpt" "\ +Return the THING at point. +THING is a symbol which specifies the kind of syntactic entity you want. +Possibilities include `symbol', `list', `sexp', `defun', `filename', `url', +`word', `sentence', `whitespace', `line', `page' and others. + +See the file `thingatpt.el' for documentation on how to define +a symbol as a valid THING. + +\(fn THING)" nil nil) + +(autoload (quote sexp-at-point) "thingatpt" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote symbol-at-point) "thingatpt" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote number-at-point) "thingatpt" "\ +Not documented + +\(fn)" nil nil) + +(autoload (quote list-at-point) "thingatpt" "\ +Not documented + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (tibetan-pre-write-canonicalize-for-unicode tibetan-pre-write-conversion +;;;;;; tibetan-post-read-conversion tibetan-compose-buffer tibetan-decompose-buffer +;;;;;; tibetan-composition-function tibetan-decompose-string tibetan-decompose-region +;;;;;; tibetan-compose-region tibetan-compose-string tibetan-transcription-to-tibetan +;;;;;; tibetan-tibetan-to-transcription tibetan-char-p) "tibet-util" +;;;;;; "language/tibet-util.el" (16211 27033)) +;;; Generated autoloads from language/tibet-util.el + +(autoload (quote tibetan-char-p) "tibet-util" "\ +Check if char CH is Tibetan character. +Returns non-nil if CH is Tibetan. Otherwise, returns nil. + +\(fn CH)" nil nil) + +(autoload (quote tibetan-tibetan-to-transcription) "tibet-util" "\ +Transcribe Tibetan string STR and return the corresponding Roman string. + +\(fn STR)" nil nil) + +(autoload (quote tibetan-transcription-to-tibetan) "tibet-util" "\ +Convert Tibetan Roman string STR to Tibetan character string. +The returned string has no composition information. + +\(fn STR)" nil nil) + +(autoload (quote tibetan-compose-string) "tibet-util" "\ +Compose Tibetan string STR. + +\(fn STR)" nil nil) + +(autoload (quote tibetan-compose-region) "tibet-util" "\ +Compose Tibetan text the region BEG and END. + +\(fn BEG END)" t nil) + +(autoload (quote tibetan-decompose-region) "tibet-util" "\ +Decompose Tibetan text in the region FROM and TO. +This is different from decompose-region because precomposed Tibetan characters +are decomposed into normal Tibetan character sequences. + +\(fn FROM TO)" t nil) + +(autoload (quote tibetan-decompose-string) "tibet-util" "\ +Decompose Tibetan string STR. +This is different from decompose-string because precomposed Tibetan characters +are decomposed into normal Tibetan character sequences. + +\(fn STR)" nil nil) + +(autoload (quote tibetan-composition-function) "tibet-util" "\ +Not documented + +\(fn FROM TO PATTERN &optional STRING)" nil nil) + +(autoload (quote tibetan-decompose-buffer) "tibet-util" "\ +Decomposes Tibetan characters in the buffer into their components. +See also the documentation of the function `tibetan-decompose-region'. + +\(fn)" t nil) + +(autoload (quote tibetan-compose-buffer) "tibet-util" "\ +Composes Tibetan character components in the buffer. +See also docstring of the function tibetan-compose-region. + +\(fn)" t nil) + +(autoload (quote tibetan-post-read-conversion) "tibet-util" "\ +Not documented + +\(fn LEN)" nil nil) + +(autoload (quote tibetan-pre-write-conversion) "tibet-util" "\ +Not documented + +\(fn FROM TO)" nil nil) + +(autoload (quote tibetan-pre-write-canonicalize-for-unicode) "tibet-util" "\ +Not documented + +\(fn FROM TO)" nil nil) + +;;;*** + +;;;### (autoloads (tildify-buffer tildify-region) "tildify" "textmodes/tildify.el" +;;;;;; (16211 27044)) +;;; Generated autoloads from textmodes/tildify.el + +(autoload (quote tildify-region) "tildify" "\ +Add hard spaces in the region between BEG and END. +See variables `tildify-pattern-alist', `tildify-string-alist', and +`tildify-ignored-environments-alist' for information about configuration +parameters. +This function performs no refilling of the changed text. + +\(fn BEG END)" t nil) + +(autoload (quote tildify-buffer) "tildify" "\ +Add hard spaces in the current buffer. +See variables `tildify-pattern-alist', `tildify-string-alist', and +`tildify-ignored-environments-alist' for information about configuration +parameters. +This function performs no refilling of the changed text. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (display-time-mode display-time display-time-day-and-date) +;;;;;; "time" "time.el" (16211 27021)) +;;; Generated autoloads from time.el + +(defvar display-time-day-and-date nil "\ +*Non-nil means \\[display-time] should display day and date as well as time.") + +(custom-autoload (quote display-time-day-and-date) "time") + +(autoload (quote display-time) "time" "\ +Enable display of time, load level, and mail flag in mode lines. +This display updates automatically every minute. +If `display-time-day-and-date' is non-nil, the current day and date +are displayed as well. +This runs the normal hook `display-time-hook' after each update. + +\(fn)" t nil) + +(defvar display-time-mode nil "\ +Non-nil if Display-Time mode is enabled. +See the command `display-time-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `display-time-mode'.") + +(custom-autoload (quote display-time-mode) "time") + +(autoload (quote display-time-mode) "time" "\ +Toggle display of time, load level, and mail flag in mode lines. +With a numeric arg, enable this display if arg is positive. + +When this display is enabled, it updates automatically every minute. +If `display-time-day-and-date' is non-nil, the current day and date +are displayed as well. +This runs the normal hook `display-time-hook' after each update. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (safe-date-to-time time-to-days time-to-day-in-year +;;;;;; date-leap-year-p days-between date-to-day time-add time-subtract +;;;;;; time-since days-to-time time-less-p seconds-to-time date-to-time) +;;;;;; "time-date" "calendar/time-date.el" (16211 27023)) +;;; Generated autoloads from calendar/time-date.el + +(autoload (quote date-to-time) "time-date" "\ +Parse a string that represents a date-time and return a time value. + +\(fn DATE)" nil nil) + +(autoload (quote seconds-to-time) "time-date" "\ +Convert SECONDS (a floating point number) to a time value. + +\(fn SECONDS)" nil nil) + +(autoload (quote time-less-p) "time-date" "\ +Say whether time value T1 is less than time value T2. + +\(fn T1 T2)" nil nil) + +(autoload (quote days-to-time) "time-date" "\ +Convert DAYS into a time value. + +\(fn DAYS)" nil nil) + +(autoload (quote time-since) "time-date" "\ +Return the time elapsed since TIME. +TIME should be either a time value or a date-time string. + +\(fn TIME)" nil nil) + +(defalias (quote subtract-time) (quote time-subtract)) + +(autoload (quote time-subtract) "time-date" "\ +Subtract two time values. +Return the difference in the format of a time value. + +\(fn T1 T2)" nil nil) + +(autoload (quote time-add) "time-date" "\ +Add two time values. One should represent a time difference. + +\(fn T1 T2)" nil nil) + +(autoload (quote date-to-day) "time-date" "\ +Return the number of days between year 1 and DATE. +DATE should be a date-time string. + +\(fn DATE)" nil nil) + +(autoload (quote days-between) "time-date" "\ +Return the number of days between DATE1 and DATE2. +DATE1 and DATE2 should be date-time strings. + +\(fn DATE1 DATE2)" nil nil) + +(autoload (quote date-leap-year-p) "time-date" "\ +Return t if YEAR is a leap year. + +\(fn YEAR)" nil nil) + +(autoload (quote time-to-day-in-year) "time-date" "\ +Return the day number within the year of the date month/day/year. + +\(fn TIME)" nil nil) + +(autoload (quote time-to-days) "time-date" "\ +The number of days between the Gregorian date 0001-12-31bce and TIME. +TIME should be a time value. +The Gregorian date Sunday, December 31, 1bce is imaginary. + +\(fn TIME)" nil nil) + +(autoload (quote safe-date-to-time) "time-date" "\ +Parse a string that represents a date-time and return a time value. +If DATE is malformed, return a time value of zeros. + +\(fn DATE)" nil nil) + +;;;*** + +;;;### (autoloads (time-stamp-toggle-active time-stamp) "time-stamp" +;;;;;; "time-stamp.el" (16211 27021)) +;;; Generated autoloads from time-stamp.el + +(autoload (quote time-stamp) "time-stamp" "\ +Update the time stamp string(s) in the buffer. +A template in a file can be automatically updated with a new time stamp +every time you save the file. Add this line to your .emacs file: + (add-hook 'write-file-hooks 'time-stamp) +Normally the template must appear in the first 8 lines of a file and +look like one of the following: + Time-stamp: <> + Time-stamp: \" \" +The time stamp is written between the brackets or quotes: + Time-stamp: <2001-02-18 10:20:51 gildea> +The time stamp is updated only if the variable `time-stamp-active' is non-nil. +The format of the time stamp is set by the variable `time-stamp-format'. +The variables `time-stamp-line-limit', `time-stamp-start', `time-stamp-end', +`time-stamp-count', and `time-stamp-inserts-lines' control finding the +template. + +\(fn)" t nil) + +(autoload (quote time-stamp-toggle-active) "time-stamp" "\ +Toggle `time-stamp-active', setting whether \\[time-stamp] updates a buffer. +With ARG, turn time stamping on if and only if arg is positive. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (timeclock-when-to-leave-string timeclock-workday-elapsed-string +;;;;;; timeclock-workday-remaining-string timeclock-reread-log timeclock-query-out +;;;;;; timeclock-change timeclock-status-string timeclock-out timeclock-in +;;;;;; timeclock-modeline-display) "timeclock" "calendar/timeclock.el" +;;;;;; (16211 27023)) +;;; Generated autoloads from calendar/timeclock.el + +(autoload (quote timeclock-modeline-display) "timeclock" "\ +Toggle display of the amount of time left today in the modeline. +If `timeclock-use-display-time' is non-nil (the default), then +the function `display-time-mode' must be active, and the modeline +will be updated whenever the time display is updated. Otherwise, +the timeclock will use its own sixty second timer to do its +updating. With prefix ARG, turn modeline display on if and only +if ARG is positive. Returns the new status of timeclock modeline +display (non-nil means on). + +\(fn &optional ARG)" t nil) + +(autoload (quote timeclock-in) "timeclock" "\ +Clock in, recording the current time moment in the timelog. +With a numeric prefix ARG, record the fact that today has only that +many hours in it to be worked. If arg is a non-numeric prefix arg +\(non-nil, but not a number), 0 is assumed (working on a holiday or +weekend). *If not called interactively, ARG should be the number of +_seconds_ worked today*. This feature only has effect the first time +this function is called within a day. + +PROJECT as the project being clocked into. If PROJECT is nil, and +FIND-PROJECT is non-nil -- or the user calls `timeclock-in' +interactively -- call the function `timeclock-get-project-function' to +discover the name of the project. + +\(fn &optional ARG PROJECT FIND-PROJECT)" t nil) + +(autoload (quote timeclock-out) "timeclock" "\ +Clock out, recording the current time moment in the timelog. +If a prefix ARG is given, the user has completed the project that was +begun during the last time segment. + +REASON is the user's reason for clocking out. If REASON is nil, and +FIND-REASON is non-nil -- or the user calls `timeclock-out' +interactively -- call the function `timeclock-get-reason-function' to +discover the reason. + +\(fn &optional ARG REASON FIND-REASON)" t nil) + +(autoload (quote timeclock-status-string) "timeclock" "\ +Report the overall timeclock status at the present moment. +If SHOW-SECONDS is non-nil, display second resolution. +If TODAY-ONLY is non-nil, the display will be relative only to time +worked today, ignoring the time worked on previous days. + +\(fn &optional SHOW-SECONDS TODAY-ONLY)" t nil) + +(autoload (quote timeclock-change) "timeclock" "\ +Change to working on a different project, by clocking in then out. +With a prefix ARG, consider the previous project as having been +finished at the time of changeover. PROJECT is the name of the last +project you were working on. + +\(fn &optional ARG PROJECT)" t nil) + +(autoload (quote timeclock-query-out) "timeclock" "\ +Ask the user before clocking out. +This is a useful function for adding to `kill-emacs-query-functions'. + +\(fn)" nil nil) + +(autoload (quote timeclock-reread-log) "timeclock" "\ +Re-read the timeclock, to account for external changes. +Returns the new value of `timeclock-discrepancy'. + +\(fn)" t nil) + +(autoload (quote timeclock-workday-remaining-string) "timeclock" "\ +Return a string representing the amount of time left today. +Display second resolution if SHOW-SECONDS is non-nil. If TODAY-ONLY +is non-nil, the display will be relative only to time worked today. +See `timeclock-relative' for more information about the meaning of +\"relative to today\". + +\(fn &optional SHOW-SECONDS TODAY-ONLY)" t nil) + +(autoload (quote timeclock-workday-elapsed-string) "timeclock" "\ +Return a string representing the amount of time worked today. +Display seconds resolution if SHOW-SECONDS is non-nil. If RELATIVE is +non-nil, the amount returned will be relative to past time worked. + +\(fn &optional SHOW-SECONDS)" t nil) + +(autoload (quote timeclock-when-to-leave-string) "timeclock" "\ +Return a string representing at what time the workday ends today. +This string is relative to the value of `timeclock-workday'. If +SHOW-SECONDS is non-nil, the value printed/returned will include +seconds. If TODAY-ONLY is non-nil, the value returned will be +relative only to the time worked today, and not to past time. + +\(fn &optional SHOW-SECONDS TODAY-ONLY)" t nil) + +;;;*** + +;;;### (autoloads (with-timeout run-with-idle-timer add-timeout run-with-timer +;;;;;; run-at-time cancel-function-timers cancel-timer) "timer" +;;;;;; "emacs-lisp/timer.el" (16211 27026)) +;;; Generated autoloads from emacs-lisp/timer.el + +(defalias (quote disable-timeout) (quote cancel-timer)) + +(autoload (quote cancel-timer) "timer" "\ +Remove TIMER from the list of active timers. + +\(fn TIMER)" nil nil) + +(autoload (quote cancel-function-timers) "timer" "\ +Cancel all timers scheduled by `run-at-time' which would run FUNCTION. + +\(fn FUNCTION)" t nil) + +(autoload (quote run-at-time) "timer" "\ +Perform an action at time TIME. +Repeat the action every REPEAT seconds, if REPEAT is non-nil. +TIME should be a string like \"11:23pm\", nil meaning now, a number of seconds +from now, a value from `current-time', or t (with non-nil REPEAT) +meaning the next integral multiple of REPEAT. +REPEAT may be an integer or floating point number. +The action is to call FUNCTION with arguments ARGS. + +This function returns a timer object which you can use in `cancel-timer'. + +\(fn TIME REPEAT FUNCTION &rest ARGS)" t nil) + +(autoload (quote run-with-timer) "timer" "\ +Perform an action after a delay of SECS seconds. +Repeat the action every REPEAT seconds, if REPEAT is non-nil. +SECS and REPEAT may be integers or floating point numbers. +The action is to call FUNCTION with arguments ARGS. + +This function returns a timer object which you can use in `cancel-timer'. + +\(fn SECS REPEAT FUNCTION &rest ARGS)" t nil) + +(autoload (quote add-timeout) "timer" "\ +Add a timer to run SECS seconds from now, to call FUNCTION on OBJECT. +If REPEAT is non-nil, repeat the timer every REPEAT seconds. +This function is for compatibility; see also `run-with-timer'. + +\(fn SECS FUNCTION OBJECT &optional REPEAT)" nil nil) + +(autoload (quote run-with-idle-timer) "timer" "\ +Perform an action the next time Emacs is idle for SECS seconds. +The action is to call FUNCTION with arguments ARGS. +SECS may be an integer or a floating point number. + +If REPEAT is non-nil, do the action each time Emacs has been idle for +exactly SECS seconds (that is, only once for each time Emacs becomes idle). + +This function returns a timer object which you can use in `cancel-timer'. + +\(fn SECS REPEAT FUNCTION &rest ARGS)" t nil) + (put 'with-timeout 'lisp-indent-function 1) + +(autoload (quote with-timeout) "timer" "\ +Run BODY, but if it doesn't finish in SECONDS seconds, give up. +If we give up, we run the TIMEOUT-FORMS and return the value of the last one. +The call should look like: + (with-timeout (SECONDS TIMEOUT-FORMS...) BODY...) +The timeout is checked whenever Emacs waits for some kind of external +event (such as keyboard input, input from subprocesses, or a certain time); +if the program loops without waiting in any way, the timeout will not +be detected. + +\(fn LIST &rest BODY)" nil (quote macro)) + +;;;*** + +;;;### (autoloads (batch-titdic-convert titdic-convert) "titdic-cnv" +;;;;;; "international/titdic-cnv.el" (16213 6000)) +;;; Generated autoloads from international/titdic-cnv.el + +(autoload (quote titdic-convert) "titdic-cnv" "\ +Convert a TIT dictionary of FILENAME into a Quail package. +Optional argument DIRNAME if specified is the directory name under which +the generated Quail package is saved. + +\(fn FILENAME &optional DIRNAME)" t nil) + +(autoload (quote batch-titdic-convert) "titdic-cnv" "\ +Run `titdic-convert' on the files remaining on the command line. +Use this from the command line, with `-batch'; +it won't work in an interactive Emacs. +For example, invoke \"emacs -batch -f batch-titdic-convert XXX.tit\" to + generate Quail package file \"xxx.el\" from TIT dictionary file \"XXX.tit\". +To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\". + +\(fn &optional FORCE)" nil nil) + +;;;*** + +;;;### (autoloads (tamil-composition-function tamil-post-read-conversion +;;;;;; tamil-compose-region) "tml-util" "language/tml-util.el" (16232 +;;;;;; 585)) +;;; Generated autoloads from language/tml-util.el + +(autoload (quote tamil-compose-region) "tml-util" "\ +Not documented + +\(fn FROM TO)" t nil) + +(autoload (quote tamil-post-read-conversion) "tml-util" "\ +Not documented + +\(fn LEN)" nil nil) + +(autoload (quote tamil-composition-function) "tml-util" "\ +Compose Tamil characters in REGION, or STRING if specified. +Assume that the REGION or STRING must fully match the composable +PATTERN regexp. + +\(fn FROM TO PATTERN &optional STRING)" nil nil) + +;;;*** + +;;;### (autoloads (tmm-prompt tmm-menubar-mouse tmm-menubar) "tmm" +;;;;;; "tmm.el" (16211 27021)) +;;; Generated autoloads from tmm.el + (define-key global-map "\M-`" 'tmm-menubar) + (define-key global-map [f10] 'tmm-menubar) + (define-key global-map [menu-bar mouse-1] 'tmm-menubar-mouse) + +(autoload (quote tmm-menubar) "tmm" "\ +Text-mode emulation of looking and choosing from a menubar. +See the documentation for `tmm-prompt'. +X-POSITION, if non-nil, specifies a horizontal position within the menu bar; +we make that menu bar item (the one at that position) the default choice. + +\(fn &optional X-POSITION)" t nil) + +(autoload (quote tmm-menubar-mouse) "tmm" "\ +Text-mode emulation of looking and choosing from a menubar. +This command is used when you click the mouse in the menubar +on a console which has no window system but does have a mouse. +See the documentation for `tmm-prompt'. + +\(fn EVENT)" t nil) + +(autoload (quote tmm-prompt) "tmm" "\ +Text-mode emulation of calling the bindings in keymap. +Creates a text-mode menu of possible choices. You can access the elements +in the menu in two ways: + *) via history mechanism from minibuffer; + *) Or via completion-buffer that is automatically shown. +The last alternative is currently a hack, you cannot use mouse reliably. + +MENU is like the MENU argument to `x-popup-menu': either a +keymap or an alist of alists. +DEFAULT-ITEM, if non-nil, specifies an initial default choice. +Its value should be an event that has a binding in MENU. + +\(fn MENU &optional IN-POPUP DEFAULT-ITEM)" nil nil) + +;;;*** + +;;;### (autoloads (todo-show todo-cp todo-mode todo-print todo-top-priorities +;;;;;; todo-insert-item todo-add-item-non-interactively todo-add-category) +;;;;;; "todo-mode" "calendar/todo-mode.el" (16211 27023)) +;;; Generated autoloads from calendar/todo-mode.el + +(autoload (quote todo-add-category) "todo-mode" "\ +Add new category CAT to the TODO list. + +\(fn CAT)" t nil) + +(autoload (quote todo-add-item-non-interactively) "todo-mode" "\ +Insert NEW-ITEM in TODO list as a new entry in CATEGORY. + +\(fn NEW-ITEM CATEGORY)" nil nil) + +(autoload (quote todo-insert-item) "todo-mode" "\ +Insert new TODO list entry. +With a prefix argument solicit the category, otherwise use the current +category. + +\(fn ARG)" t nil) + +(autoload (quote todo-top-priorities) "todo-mode" "\ +List top priorities for each category. + +Number of entries for each category is given by NOF-PRIORITIES which +defaults to 'todo-show-priorities'. + +If CATEGORY-PR-PAGE is non-nil, a page separator '^L' is inserted +between each category. + +\(fn &optional NOF-PRIORITIES CATEGORY-PR-PAGE)" t nil) + +(autoload (quote todo-print) "todo-mode" "\ +Print todo summary using `todo-print-function'. +If CATEGORY-PR-PAGE is non-nil, a page separator `^L' is inserted +between each category. + +Number of entries for each category is given by `todo-print-priorities'. + +\(fn &optional CATEGORY-PR-PAGE)" t nil) + +(autoload (quote todo-mode) "todo-mode" "\ +Major mode for editing TODO lists. + +\\{todo-mode-map} + +\(fn)" t nil) + +(autoload (quote todo-cp) "todo-mode" "\ +Make a diary entry appear only in the current date's diary. + +\(fn)" nil nil) + +(autoload (quote todo-show) "todo-mode" "\ +Show TODO list. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (tool-bar-local-item-from-menu tool-bar-add-item-from-menu +;;;;;; tool-bar-local-item tool-bar-add-item tool-bar-mode) "tool-bar" +;;;;;; "toolbar/tool-bar.el" (16211 27044)) +;;; Generated autoloads from toolbar/tool-bar.el + +(defvar tool-bar-mode nil "\ +Non-nil if Tool-Bar mode is enabled. +See the command `tool-bar-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `tool-bar-mode'.") + +(custom-autoload (quote tool-bar-mode) "tool-bar") + +(autoload (quote tool-bar-mode) "tool-bar" "\ +Toggle use of the tool bar. +With numeric ARG, display the tool bar if and only if ARG is positive. + +See `tool-bar-add-item' and `tool-bar-add-item-from-menu' for +conveniently adding tool bar items. + +\(fn &optional ARG)" t nil) + +(put (quote tool-bar-mode) (quote standard-value) (quote (t))) + +(autoload (quote tool-bar-add-item) "tool-bar" "\ +Add an item to the tool bar. +ICON names the image, DEF is the key definition and KEY is a symbol +for the fake function key in the menu keymap. Remaining arguments +PROPS are additional items to add to the menu item specification. See +Info node `(elisp)Tool Bar'. Items are added from left to right. + +ICON is the base name of a file containing the image to use. The +function will first try to use ICON.xpm, then ICON.pbm, and finally +ICON.xbm, using `find-image'. + +Use this function only to make bindings in the global value of `tool-bar-map'. +To define items in any other map, use `tool-bar-local-item'. + +\(fn ICON DEF KEY &rest PROPS)" nil nil) + +(autoload (quote tool-bar-local-item) "tool-bar" "\ +Add an item to the tool bar in map MAP. +ICON names the image, DEF is the key definition and KEY is a symbol +for the fake function key in the menu keymap. Remaining arguments +PROPS are additional items to add to the menu item specification. See +Info node `(elisp)Tool Bar'. Items are added from left to right. + +ICON is the base name of a file containing the image to use. The +function will first try to use ICON.xpm, then ICON.pbm, and finally +ICON.xbm, using `find-image'. + +\(fn ICON DEF KEY MAP &rest PROPS)" nil nil) + +(autoload (quote tool-bar-add-item-from-menu) "tool-bar" "\ +Define tool bar binding for COMMAND using the given ICON in keymap MAP. +This makes a binding for COMMAND in `tool-bar-map', copying its +binding from the menu bar in MAP (which defaults to `global-map'), but +modifies the binding by adding an image specification for ICON. It +finds ICON just like `tool-bar-add-item'. PROPS are additional +properties to add to the binding. + +MAP must contain appropriate binding for `[menu-bar]' which holds a keymap. + +Use this function only to make bindings in the global value of `tool-bar-map'. +To define items in any other map, use `tool-bar-local-item'. + +\(fn COMMAND ICON &optional MAP &rest PROPS)" nil nil) + +(autoload (quote tool-bar-local-item-from-menu) "tool-bar" "\ +Define tool bar binding for COMMAND using the given ICON in keymap MAP. +This makes a binding for COMMAND in IN-MAP, copying its binding from +the menu bar in FROM-MAP (which defaults to `global-map'), but +modifies the binding by adding an image specification for ICON. It +finds ICON just like `tool-bar-add-item'. PROPS are additional +properties to add to the binding. + +MAP must contain appropriate binding for `[menu-bar]' which holds a keymap. + +\(fn COMMAND ICON IN-MAP &optional FROM-MAP &rest PROPS)" nil nil) + +;;;*** + +;;;### (autoloads (tooltip-mode tooltip-mode) "tooltip" "tooltip.el" +;;;;;; (16211 27021)) +;;; Generated autoloads from tooltip.el + +(autoload (quote tooltip-mode) "tooltip" "\ +Mode for tooltip display. +With ARG, turn tooltip mode on if and only if ARG is positive. + +\(fn &optional ARG)" t nil) + +(defvar tooltip-mode nil "\ +Toggle tooltip-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `tooltip-mode'.") + +(custom-autoload (quote tooltip-mode) "tooltip") + +;;;*** + +;;;### (autoloads (tpu-edt-on) "tpu-edt" "emulation/tpu-edt.el" (16211 +;;;;;; 27026)) +;;; Generated autoloads from emulation/tpu-edt.el + +(defalias (quote tpu-edt-mode) (quote tpu-edt-on)) + +(defalias (quote tpu-edt) (quote tpu-edt-on)) + +(autoload (quote tpu-edt-on) "tpu-edt" "\ +Turn on TPU/edt emulation. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins) +;;;;;; "tpu-extras" "emulation/tpu-extras.el" (16211 27026)) +;;; Generated autoloads from emulation/tpu-extras.el + +(autoload (quote tpu-set-scroll-margins) "tpu-extras" "\ +Set scroll margins. + +\(fn TOP BOTTOM)" t nil) + +(autoload (quote tpu-set-cursor-free) "tpu-extras" "\ +Allow the cursor to move freely about the screen. + +\(fn)" t nil) + +(autoload (quote tpu-set-cursor-bound) "tpu-extras" "\ +Constrain the cursor to the flow of the text. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (tq-create) "tq" "emacs-lisp/tq.el" (16225 60547)) +;;; Generated autoloads from emacs-lisp/tq.el + +(autoload (quote tq-create) "tq" "\ +Create and return a transaction queue communicating with PROCESS. +PROCESS should be a subprocess capable of sending and receiving +streams of bytes. It may be a local process, or it may be connected +to a tcp server on another machine. + +\(fn PROCESS)" nil nil) + +;;;*** + +;;;### (autoloads (trace-function-background trace-function trace-buffer) +;;;;;; "trace" "emacs-lisp/trace.el" (16211 27026)) +;;; Generated autoloads from emacs-lisp/trace.el + +(defvar trace-buffer "*trace-output*" "\ +*Trace output will by default go to that buffer.") + +(custom-autoload (quote trace-buffer) "trace") + +(autoload (quote trace-function) "trace" "\ +Traces FUNCTION with trace output going to BUFFER. +For every call of FUNCTION Lisp-style trace messages that display argument +and return values will be inserted into BUFFER. This function generates the +trace advice for FUNCTION and activates it together with any other advice +there might be!! The trace BUFFER will popup whenever FUNCTION is called. +Do not use this to trace functions that switch buffers or do any other +display oriented stuff, use `trace-function-background' instead. + +\(fn FUNCTION &optional BUFFER)" t nil) + +(autoload (quote trace-function-background) "trace" "\ +Traces FUNCTION with trace output going quietly to BUFFER. +For every call of FUNCTION Lisp-style trace messages that display argument +and return values will be inserted into BUFFER. This function generates the +trace advice for FUNCTION and activates it together with any other advice +there might be!! Trace output will quietly go to BUFFER without changing +the window or buffer configuration at all. + +\(fn FUNCTION &optional BUFFER)" t nil) + +;;;*** + +;;;### (autoloads (tramp-completion-file-name-handler tramp-file-name-handler +;;;;;; tramp-completion-file-name-regexp tramp-file-name-regexp) +;;;;;; "tramp" "net/tramp.el" (16211 27037)) +;;; Generated autoloads from net/tramp.el + +(defvar tramp-unified-filenames (not (featurep (quote xemacs))) "\ +Non-nil means to use unified Ange-FTP/Tramp filename syntax. +Nil means to use a separate filename syntax for Tramp.") + +(defconst tramp-file-name-regexp-unified "\\`/[^/:]+:" "\ +Value for `tramp-file-name-regexp' for unified remoting. +Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and +Tramp. See `tramp-file-name-structure-unified' for more explanations.") + +(defconst tramp-file-name-regexp-separate "\\`/\\[.*\\]" "\ +Value for `tramp-file-name-regexp' for separate remoting. +XEmacs uses a separate filename syntax for Tramp and EFS. +See `tramp-file-name-structure-separate' for more explanations.") + +(defvar tramp-file-name-regexp (if tramp-unified-filenames tramp-file-name-regexp-unified tramp-file-name-regexp-separate) "\ +*Regular expression matching file names handled by tramp. +This regexp should match tramp file names but no other file names. +\(When tramp.el is loaded, this regular expression is prepended to +`file-name-handler-alist', and that is searched sequentially. Thus, +if the tramp entry appears rather early in the `file-name-handler-alist' +and is a bit too general, then some files might be considered tramp +files which are not really tramp files. + +Please note that the entry in `file-name-handler-alist' is made when +this file (tramp.el) is loaded. This means that this variable must be set +before loading tramp.el. Alternatively, `file-name-handler-alist' can be +updated after changing this variable. + +Also see `tramp-file-name-structure'.") + +(custom-autoload (quote tramp-file-name-regexp) "tramp") + +(defconst tramp-completion-file-name-regexp-unified "^/[^/]*$" "\ +Value for `tramp-completion-file-name-regexp' for unified remoting. +Emacs (not XEmacs) uses a unified filename syntax for Ange-FTP and +Tramp. See `tramp-file-name-structure-unified' for more explanations.") + +(defconst tramp-completion-file-name-regexp-separate "^/\\([[][^]]*\\)?$" "\ +Value for `tramp-completion-file-name-regexp' for separate remoting. +XEmacs uses a separate filename syntax for Tramp and EFS. +See `tramp-file-name-structure-separate' for more explanations.") + +(defvar tramp-completion-file-name-regexp (if tramp-unified-filenames tramp-completion-file-name-regexp-unified tramp-completion-file-name-regexp-separate) "\ +*Regular expression matching file names handled by tramp completion. +This regexp should match partial tramp file names only. + +Please note that the entry in `file-name-handler-alist' is made when +this file (tramp.el) is loaded. This means that this variable must be set +before loading tramp.el. Alternatively, `file-name-handler-alist' can be +updated after changing this variable. + +Also see `tramp-file-name-structure'.") + +(custom-autoload (quote tramp-completion-file-name-regexp) "tramp") + +(autoload (quote tramp-file-name-handler) "tramp" "\ +Invoke Tramp file name handler. +Falls back to normal file name handler if no tramp file name handler exists. + +\(fn OPERATION &rest ARGS)" nil nil) + +(put (quote tramp-file-name-handler) (quote file-remote-p) t) + +(autoload (quote tramp-completion-file-name-handler) "tramp" "\ +Invoke tramp file name completion handler. +Falls back to normal file name handler if no tramp file name handler exists. + +\(fn OPERATION &rest ARGS)" nil nil) + +(put (quote tramp-completion-file-name-handler) (quote safe-magic) t) + +(add-to-list (quote file-name-handler-alist) (cons tramp-file-name-regexp (quote tramp-file-name-handler))) + +;;;*** + +;;;### (autoloads (2C-split 2C-associate-buffer 2C-two-columns) "two-column" +;;;;;; "textmodes/two-column.el" (16211 27044)) +;;; Generated autoloads from textmodes/two-column.el + (autoload '2C-command "two-column" () t 'keymap) + (global-set-key "\C-x6" '2C-command) + (global-set-key [f2] '2C-command) + +(autoload (quote 2C-two-columns) "two-column" "\ +Split current window vertically for two-column editing. +When called the first time, associates a buffer with the current +buffer in two-column minor mode (see \\[describe-mode] ). +Runs `2C-other-buffer-hook' in the new buffer. +When called again, restores the screen layout with the current buffer +first and the associated buffer to its right. + +\(fn &optional BUFFER)" t nil) + +(autoload (quote 2C-associate-buffer) "two-column" "\ +Associate another buffer with this one in two-column minor mode. +Can also be used to associate a just previously visited file, by +accepting the proposed default buffer. + +\(See \\[describe-mode] .) + +\(fn)" t nil) + +(autoload (quote 2C-split) "two-column" "\ +Split a two-column text at point, into two buffers in two-column minor mode. +Point becomes the local value of `2C-window-width'. Only lines that +have the ARG same preceding characters at that column get split. The +ARG preceding characters without any leading whitespace become the local +value for `2C-separator'. This way lines that continue across both +columns remain untouched in the first buffer. + +This function can be used with a prototype line, to set up things. You +write the first line of each column and then split that line. E.g.: + +First column's text sSs Second column's text + \\___/\\ + / \\ + 5 character Separator You type M-5 \\[2C-split] with the point here. + +\(See \\[describe-mode] .) + +\(fn ARG)" t nil) + +;;;*** + +;;;### (autoloads (type-break-guesstimate-keystroke-threshold type-break-statistics +;;;;;; type-break type-break-mode type-break-keystroke-threshold +;;;;;; type-break-good-rest-interval type-break-interval type-break-mode) +;;;;;; "type-break" "type-break.el" (16211 27021)) +;;; Generated autoloads from type-break.el + +(defvar type-break-mode nil "\ +Toggle typing break mode. +See the docstring for the `type-break-mode' command for more information. +Setting this variable directly does not take effect; +use either \\[customize] or the function `type-break-mode'.") + +(custom-autoload (quote type-break-mode) "type-break") + +(defvar type-break-interval (* 60 60) "\ +*Number of seconds between scheduled typing breaks.") + +(custom-autoload (quote type-break-interval) "type-break") + +(defvar type-break-good-rest-interval (/ type-break-interval 6) "\ +*Number of seconds of idle time considered to be an adequate typing rest. + +When this variable is non-nil, emacs checks the idle time between +keystrokes. If this idle time is long enough to be considered a \"good\" +rest from typing, then the next typing break is simply rescheduled for later. + +If a break is interrupted before this much time elapses, the user will be +asked whether or not really to interrupt the break.") + +(custom-autoload (quote type-break-good-rest-interval) "type-break") + +(defvar type-break-keystroke-threshold (let* ((wpm 35) (avg-word-length 5) (upper (* wpm avg-word-length (/ type-break-interval 60))) (lower (/ upper 5))) (cons lower upper)) "\ +*Upper and lower bound on number of keystrokes for considering typing break. +This structure is a pair of numbers (MIN . MAX). + +The first number is the minimum number of keystrokes that must have been +entered since the last typing break before considering another one, even if +the scheduled time has elapsed; the break is simply rescheduled until later +if the minimum threshold hasn't been reached. If this first value is nil, +then there is no minimum threshold; as soon as the scheduled time has +elapsed, the user will always be queried. + +The second number is the maximum number of keystrokes that can be entered +before a typing break is requested immediately, pre-empting the originally +scheduled break. If this second value is nil, then no pre-emptive breaks +will occur; only scheduled ones will. + +Keys with bucky bits (shift, control, meta, etc) are counted as only one +keystroke even though they really require multiple keys to generate them. + +The command `type-break-guesstimate-keystroke-threshold' can be used to +guess a reasonably good pair of values for this variable.") + +(custom-autoload (quote type-break-keystroke-threshold) "type-break") + +(autoload (quote type-break-mode) "type-break" "\ +Enable or disable typing-break mode. +This is a minor mode, but it is global to all buffers by default. + +When this mode is enabled, the user is encouraged to take typing breaks at +appropriate intervals; either after a specified amount of time or when the +user has exceeded a keystroke threshold. When the time arrives, the user +is asked to take a break. If the user refuses at that time, emacs will ask +again in a short period of time. The idea is to give the user enough time +to find a good breaking point in his or her work, but be sufficiently +annoying to discourage putting typing breaks off indefinitely. + +A negative prefix argument disables this mode. +No argument or any non-negative argument enables it. + +The user may enable or disable this mode by setting the variable of the +same name, though setting it in that way doesn't reschedule a break or +reset the keystroke counter. + +If the mode was previously disabled and is enabled as a consequence of +calling this function, it schedules a break with `type-break-schedule' to +make sure one occurs (the user can call that command to reschedule the +break at any time). It also initializes the keystroke counter. + +The variable `type-break-interval' specifies the number of seconds to +schedule between regular typing breaks. This variable doesn't directly +affect the time schedule; it simply provides a default for the +`type-break-schedule' command. + +If set, the variable `type-break-good-rest-interval' specifies the minimum +amount of time which is considered a reasonable typing break. Whenever +that time has elapsed, typing breaks are automatically rescheduled for +later even if emacs didn't prompt you to take one first. Also, if a break +is ended before this much time has elapsed, the user will be asked whether +or not to continue. + +The variable `type-break-keystroke-threshold' is used to determine the +thresholds at which typing breaks should be considered. You can use +the command `type-break-guesstimate-keystroke-threshold' to try to +approximate good values for this. + +There are several variables that affect how or when warning messages about +imminent typing breaks are displayed. They include: + + `type-break-mode-line-message-mode' + `type-break-time-warning-intervals' + `type-break-keystroke-warning-intervals' + `type-break-warning-repeat' + `type-break-warning-countdown-string' + `type-break-warning-countdown-string-type' + +There are several variables that affect if, how, and when queries to begin +a typing break occur. They include: + + `type-break-query-mode' + `type-break-query-function' + `type-break-query-interval' + +Finally, the command `type-break-statistics' prints interesting things. + +\(fn &optional PREFIX)" t nil) + +(autoload (quote type-break) "type-break" "\ +Take a typing break. + +During the break, a demo selected from the functions listed in +`type-break-demo-functions' is run. + +After the typing break is finished, the next break is scheduled +as per the function `type-break-schedule'. + +\(fn)" t nil) + +(autoload (quote type-break-statistics) "type-break" "\ +Print statistics about typing breaks in a temporary buffer. +This includes the last time a typing break was taken, when the next one is +scheduled, the keystroke thresholds and the current keystroke count, etc. + +\(fn)" t nil) + +(autoload (quote type-break-guesstimate-keystroke-threshold) "type-break" "\ +Guess values for the minimum/maximum keystroke threshold for typing breaks. + +If called interactively, the user is prompted for their guess as to how +many words per minute they usually type. This value should not be your +maximum WPM, but your average. Of course, this is harder to gauge since it +can vary considerably depending on what you are doing. For example, one +tends to type less when debugging a program as opposed to writing +documentation. (Perhaps a separate program should be written to estimate +average typing speed.) + +From that, this command sets the values in `type-break-keystroke-threshold' +based on a fairly simple algorithm involving assumptions about the average +length of words (5). For the minimum threshold, it uses about a fifth of +the computed maximum threshold. + +When called from lisp programs, the optional args WORDLEN and FRAC can be +used to override the default assumption about average word length and the +fraction of the maximum threshold to which to set the minimum threshold. +FRAC should be the inverse of the fractional value; for example, a value of +2 would mean to use one half, a value of 4 would mean to use one quarter, etc. + +\(fn WPM &optional WORDLEN FRAC)" t nil) + +;;;*** + +;;;### (autoloads (ununderline-region underline-region) "underline" +;;;;;; "textmodes/underline.el" (16211 27044)) +;;; Generated autoloads from textmodes/underline.el + +(autoload (quote underline-region) "underline" "\ +Underline all nonblank characters in the region. +Works by overstriking underscores. +Called from program, takes two arguments START and END +which specify the range to operate on. + +\(fn START END)" t nil) + +(autoload (quote ununderline-region) "underline" "\ +Remove all underlining (overstruck underscores) in the region. +Called from program, takes two arguments START and END +which specify the range to operate on. + +\(fn START END)" t nil) + +;;;*** + +;;;### (autoloads (unforward-rmail-message undigestify-rmail-message) +;;;;;; "undigest" "mail/undigest.el" (16211 27036)) +;;; Generated autoloads from mail/undigest.el + +(autoload (quote undigestify-rmail-message) "undigest" "\ +Break up a digest message into its constituent messages. +Leaves original message, deleted, before the undigestified messages. + +\(fn)" t nil) + +(autoload (quote unforward-rmail-message) "undigest" "\ +Extract a forwarded message from the containing message. +This puts the forwarded message into a separate rmail message +following the containing message. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (unrmail batch-unrmail) "unrmail" "mail/unrmail.el" +;;;;;; (16211 27036)) +;;; Generated autoloads from mail/unrmail.el + +(autoload (quote batch-unrmail) "unrmail" "\ +Convert Rmail files to system inbox format. +Specify the input Rmail file names as command line arguments. +For each Rmail file, the corresponding output file name +is made by adding `.mail' at the end. +For example, invoke `emacs -batch -f batch-unrmail RMAIL'. + +\(fn)" nil nil) + +(autoload (quote unrmail) "unrmail" "\ +Convert Rmail file FILE to system inbox format file TO-FILE. + +\(fn FILE TO-FILE)" t nil) + +;;;*** + +;;;### (autoloads (unsafep) "unsafep" "emacs-lisp/unsafep.el" (16211 +;;;;;; 27026)) +;;; Generated autoloads from emacs-lisp/unsafep.el + +(autoload (quote unsafep) "unsafep" "\ +Return nil if evaluating FORM couldn't possibly do any harm; +otherwise result is a reason why FORM is unsafe. UNSAFEP-VARS is a list +of symbols with local bindings. + +\(fn FORM &optional UNSAFEP-VARS)" nil nil) + +;;;*** + +;;;### (autoloads (ask-user-about-supersession-threat ask-user-about-lock) +;;;;;; "userlock" "userlock.el" (16211 27021)) +;;; Generated autoloads from userlock.el + +(autoload (quote ask-user-about-lock) "userlock" "\ +Ask user what to do when he wants to edit FILE but it is locked by OPPONENT. +This function has a choice of three things to do: + do (signal 'file-locked (list FILE OPPONENT)) + to refrain from editing the file + return t (grab the lock on the file) + return nil (edit the file even though it is locked). +You can redefine this function to choose among those three alternatives +in any way you like. + +\(fn FILE OPPONENT)" nil nil) + +(autoload (quote ask-user-about-supersession-threat) "userlock" "\ +Ask a user who is about to modify an obsolete buffer what to do. +This function has two choices: it can return, in which case the modification +of the buffer will proceed, or it can (signal 'file-supersession (file)), +in which case the proposed buffer modification will not be made. + +You can rewrite this to use any criterion you like to choose which one to do. +The buffer in question is current when this function is called. + +\(fn FN)" nil nil) + +;;;*** + +;;;### (autoloads (uudecode-decode-region uudecode-decode-region-external) +;;;;;; "uudecode" "gnus/uudecode.el" (16211 27032)) +;;; Generated autoloads from gnus/uudecode.el + +(autoload (quote uudecode-decode-region-external) "uudecode" "\ +Uudecode region between START and END using external program. +If FILE-NAME is non-nil, save the result to FILE-NAME. The program +used is specified by `uudecode-decoder-program'. + +\(fn START END &optional FILE-NAME)" t nil) + +(autoload (quote uudecode-decode-region) "uudecode" "\ +Uudecode region between START and END without using an external program. +If FILE-NAME is non-nil, save the result to FILE-NAME. + +\(fn START END &optional FILE-NAME)" t nil) + +;;;*** + +;;;### (autoloads (vc-annotate vc-update-change-log vc-rename-file +;;;;;; vc-transfer-file vc-switch-backend vc-cancel-version vc-update +;;;;;; vc-revert-buffer vc-print-log vc-retrieve-snapshot vc-create-snapshot +;;;;;; vc-directory vc-merge vc-insert-headers vc-version-other-window +;;;;;; vc-diff vc-register vc-next-action vc-do-command edit-vc-file +;;;;;; with-vc-file vc-branch-part vc-before-checkin-hook vc-checkin-hook +;;;;;; vc-checkout-hook) "vc" "vc.el" (16211 27021)) +;;; Generated autoloads from vc.el + +(defvar vc-checkout-hook nil "\ +*Normal hook (list of functions) run after checking out a file. +See `run-hooks'.") + +(custom-autoload (quote vc-checkout-hook) "vc") + +(defvar vc-checkin-hook nil "\ +*Normal hook (list of functions) run after a checkin is done. +See also `log-edit-done-hook'.") + +(custom-autoload (quote vc-checkin-hook) "vc") + +(defvar vc-before-checkin-hook nil "\ +*Normal hook (list of functions) run before a file is checked in. +See `run-hooks'.") + +(custom-autoload (quote vc-before-checkin-hook) "vc") + +(autoload (quote vc-branch-part) "vc" "\ +Return the branch part of a revision number REV. + +\(fn REV)" nil nil) + +(autoload (quote with-vc-file) "vc" "\ +Check out a writable copy of FILE if necessary, then execute BODY. +Check in FILE with COMMENT (a string) after BODY has been executed. +FILE is passed through `expand-file-name'; BODY executed within +`save-excursion'. If FILE is not under version control, or locked by +somebody else, signal error. + +\(fn FILE COMMENT &rest BODY)" nil (quote macro)) + +(autoload (quote edit-vc-file) "vc" "\ +Edit FILE under version control, executing body. +Checkin with COMMENT after executing BODY. +This macro uses `with-vc-file', passing args to it. +However, before executing BODY, find FILE, and after BODY, save buffer. + +\(fn FILE COMMENT &rest BODY)" nil (quote macro)) + +(autoload (quote vc-do-command) "vc" "\ +Execute a VC command, notifying user and checking for errors. +Output from COMMAND goes to BUFFER, or *vc* if BUFFER is nil or the +current buffer if BUFFER is t. If the destination buffer is not +already current, set it up properly and erase it. The command is +considered successful if its exit status does not exceed OKSTATUS (if +OKSTATUS is nil, that means to ignore errors, if it is 'async, that +means not to wait for termination of the subprocess). FILE is the +name of the working file (may also be nil, to execute commands that +don't expect a file name). If an optional list of FLAGS is present, +that is inserted into the command line before the filename. + +\(fn BUFFER OKSTATUS COMMAND FILE &rest FLAGS)" nil nil) + +(autoload (quote vc-next-action) "vc" "\ +Do the next logical version control operation on the current file. + +If you call this from within a VC dired buffer with no files marked, +it will operate on the file in the current line. + +If you call this from within a VC dired buffer, and one or more +files are marked, it will accept a log message and then operate on +each one. The log message will be used as a comment for any register +or checkin operations, but ignored when doing checkouts. Attempted +lock steals will raise an error. + +A prefix argument lets you specify the version number to use. + +For RCS and SCCS files: + If the file is not already registered, this registers it for version +control. + If the file is registered and not locked by anyone, this checks out +a writable and locked file ready for editing. + If the file is checked out and locked by the calling user, this +first checks to see if the file has changed since checkout. If not, +it performs a revert. + If the file has been changed, this pops up a buffer for entry +of a log message; when the message has been entered, it checks in the +resulting changes along with the log message as change commentary. If +the variable `vc-keep-workfiles' is non-nil (which is its default), a +read-only copy of the changed file is left in place afterwards. + If the file is registered and locked by someone else, you are given +the option to steal the lock. + +For CVS files: + If the file is not already registered, this registers it for version +control. This does a \"cvs add\", but no \"cvs commit\". + If the file is added but not committed, it is committed. + If your working file is changed, but the repository file is +unchanged, this pops up a buffer for entry of a log message; when the +message has been entered, it checks in the resulting changes along +with the logmessage as change commentary. A writable file is retained. + If the repository file is changed, you are asked if you want to +merge in the changes into your working copy. + +\(fn VERBOSE)" t nil) + +(autoload (quote vc-register) "vc" "\ +Register the current file into a version control system. +With prefix argument SET-VERSION, allow user to specify initial version +level. If COMMENT is present, use that as an initial comment. + +The version control system to use is found by cycling through the list +`vc-handled-backends'. The first backend in that list which declares +itself responsible for the file (usually because other files in that +directory are already registered under that backend) will be used to +register the file. If no backend declares itself responsible, the +first backend that could register the file is used. + +\(fn &optional SET-VERSION COMMENT)" t nil) + +(autoload (quote vc-diff) "vc" "\ +Display diffs between file versions. +Normally this compares the current file and buffer with the most +recent checked in version of that file. This uses no arguments. With +a prefix argument HISTORIC, it reads the file name to use and two +version designators specifying which versions to compare. The +optional argument NOT-URGENT non-nil means it is ok to say no to +saving the buffer. + +\(fn HISTORIC &optional NOT-URGENT)" t nil) + +(autoload (quote vc-version-other-window) "vc" "\ +Visit version REV of the current file in another window. +If the current file is named `F', the version is named `F.~REV~'. +If `F.~REV~' already exists, use it instead of checking it out again. + +\(fn REV)" t nil) + +(autoload (quote vc-insert-headers) "vc" "\ +Insert headers into a file for use with a version control system. +Headers desired are inserted at point, and are pulled from +the variable `vc-BACKEND-header'. + +\(fn)" t nil) + +(autoload (quote vc-merge) "vc" "\ +Merge changes between two versions into the current buffer's file. +This asks for two versions to merge from in the minibuffer. If the +first version is a branch number, then merge all changes from that +branch. If the first version is empty, merge news, i.e. recent changes +from the current branch. + +See Info node `Merging'. + +\(fn)" t nil) + +(defalias (quote vc-resolve-conflicts) (quote smerge-ediff)) + +(autoload (quote vc-directory) "vc" "\ +Create a buffer in VC Dired Mode for directory DIR. + +See Info node `VC Dired Mode'. + +With prefix arg READ-SWITCHES, specify a value to override +`dired-listing-switches' when generating the listing. + +\(fn DIR READ-SWITCHES)" t nil) + +(autoload (quote vc-create-snapshot) "vc" "\ +Descending recursively from DIR, make a snapshot called NAME. +For each registered file, the version level of its latest version +becomes part of the named configuration. If the prefix argument +BRANCHP is given, the snapshot is made as a new branch and the files +are checked out in that new branch. + +\(fn DIR NAME BRANCHP)" t nil) + +(autoload (quote vc-retrieve-snapshot) "vc" "\ +Descending recursively from DIR, retrieve the snapshot called NAME. +If NAME is empty, it refers to the latest versions. +If locking is used for the files in DIR, then there must not be any +locked files at or below DIR (but if NAME is empty, locked files are +allowed and simply skipped). + +\(fn DIR NAME)" t nil) + +(autoload (quote vc-print-log) "vc" "\ +List the change log of the current buffer in a window. + +\(fn)" t nil) + +(autoload (quote vc-revert-buffer) "vc" "\ +Revert the current buffer's file to the version it was based on. +This asks for confirmation if the buffer contents are not identical +to that version. This function does not automatically pick up newer +changes found in the master file; use \\[universal-argument] \\[vc-next-action] to do so. + +\(fn)" t nil) + +(autoload (quote vc-update) "vc" "\ +Update the current buffer's file to the latest version on its branch. +If the file contains no changes, and is not locked, then this simply replaces +the working file with the latest version on its branch. If the file contains +changes, and the backend supports merging news, then any recent changes from +the current branch are merged into the working file. + +\(fn)" t nil) + +(autoload (quote vc-cancel-version) "vc" "\ +Get rid of most recently checked in version of this file. +A prefix argument NOREVERT means do not revert the buffer afterwards. + +\(fn NOREVERT)" t nil) + +(autoload (quote vc-switch-backend) "vc" "\ +Make BACKEND the current version control system for FILE. +FILE must already be registered in BACKEND. The change is not +permanent, only for the current session. This function only changes +VC's perspective on FILE, it does not register or unregister it. +By default, this command cycles through the registered backends. +To get a prompt, use a prefix argument. + +\(fn FILE BACKEND)" t nil) + +(autoload (quote vc-transfer-file) "vc" "\ +Transfer FILE to another version control system NEW-BACKEND. +If NEW-BACKEND has a higher precedence than FILE's current backend +\(i.e. it comes earlier in `vc-handled-backends'), then register FILE in +NEW-BACKEND, using the version number from the current backend as the +base level. If NEW-BACKEND has a lower precedence than the current +backend, then commit all changes that were made under the current +backend to NEW-BACKEND, and unregister FILE from the current backend. +\(If FILE is not yet registered under NEW-BACKEND, register it.) + +\(fn FILE NEW-BACKEND)" nil nil) + +(autoload (quote vc-rename-file) "vc" "\ +Rename file OLD to NEW, and rename its master file likewise. + +\(fn OLD NEW)" t nil) + +(autoload (quote vc-update-change-log) "vc" "\ +Find change log file and add entries from recent version control logs. +Normally, find log entries for all registered files in the default +directory. + +With prefix arg of \\[universal-argument], only find log entries for the current buffer's file. + +With any numeric prefix arg, find log entries for all currently visited +files that are under version control. This puts all the entries in the +log for the default directory, which may not be appropriate. + +From a program, any ARGS are assumed to be filenames for which +log entries should be gathered. + +\(fn &rest ARGS)" t nil) + +(autoload (quote vc-annotate) "vc" "\ +Display the edit history of the current file using colours. + +This command creates a buffer that shows, for each line of the current +file, when it was last edited and by whom. Additionally, colours are +used to show the age of each line--blue means oldest, red means +youngest, and intermediate colours indicate intermediate ages. By +default, the time scale stretches back one year into the past; +everything that is older than that is shown in blue. + +With a prefix argument, this command asks two questions in the +minibuffer. First, you may enter a version number; then the buffer +displays and annotates that version instead of the current version +\(type RET in the minibuffer to leave that default unchanged). Then, +you are prompted for the time span in days which the color range +should cover. For example, a time span of 20 days means that changes +over the past 20 days are shown in red to blue, according to their +age, and everything that is older than that is shown in blue. + +Customization variables: + +`vc-annotate-menu-elements' customizes the menu elements of the +mode-specific menu. `vc-annotate-color-map' and +`vc-annotate-very-old-color' defines the mapping of time to +colors. `vc-annotate-background' specifies the background color. + +\(fn PREFIX)" t nil) + +;;;*** + +;;;### (autoloads nil "vc-cvs" "vc-cvs.el" (16250 54573)) +;;; Generated autoloads from vc-cvs.el + (defun vc-cvs-registered (f) + (when (file-readable-p (expand-file-name + "CVS/Entries" (file-name-directory f))) + (load "vc-cvs") + (vc-cvs-registered f))) + +;;;*** + +;;;### (autoloads nil "vc-mcvs" "vc-mcvs.el" (16211 27021)) +;;; Generated autoloads from vc-mcvs.el + (defun vc-mcvs-registered (file) + (let ((dir file)) + (while (and (stringp dir) + (not (equal + dir (setq dir (file-name-directory dir)))) + dir) + (setq dir (if (file-directory-p + (expand-file-name "MCVS/CVS" dir)) + t (directory-file-name dir)))) + (if (eq dir t) + (progn + (load "vc-mcvs") + (vc-mcvs-registered file))))) + +;;;*** + +;;;### (autoloads (vc-rcs-master-templates) "vc-rcs" "vc-rcs.el" +;;;;;; (16211 27021)) +;;; Generated autoloads from vc-rcs.el + +(defvar vc-rcs-master-templates (quote ("%sRCS/%s,v" "%s%s,v" "%sRCS/%s")) "\ +*Where to look for RCS master files. +For a description of possible values, see `vc-check-master-templates'.") + +(custom-autoload (quote vc-rcs-master-templates) "vc-rcs") + (defun vc-rcs-registered (f) (vc-default-registered 'RCS f)) + +;;;*** + +;;;### (autoloads (vc-sccs-master-templates) "vc-sccs" "vc-sccs.el" +;;;;;; (16211 27021)) +;;; Generated autoloads from vc-sccs.el + +(defvar vc-sccs-master-templates (quote ("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir)) "\ +*Where to look for SCCS master files. +For a description of possible values, see `vc-check-master-templates'.") + +(custom-autoload (quote vc-sccs-master-templates) "vc-sccs") + (defun vc-sccs-registered(f) (vc-default-registered 'SCCS f)) + +(defun vc-sccs-search-project-dir (dirname basename) "\ +Return the name of a master file in the SCCS project directory. +Does not check whether the file exists but returns nil if it does not +find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir) (when project-dir (if (file-name-absolute-p project-dir) (setq dirs (quote ("SCCS" ""))) (setq dirs (quote ("src/SCCS" "src" "source/SCCS" "source"))) (setq project-dir (expand-file-name (concat "~" project-dir)))) (while (and (not dir) dirs) (setq dir (expand-file-name (car dirs) project-dir)) (unless (file-directory-p dir) (setq dir nil) (setq dirs (cdr dirs)))) (and dir (expand-file-name (concat "s." basename) dir))))) + +;;;*** + +;;;### (autoloads nil "vc-svn" "vc-svn.el" (16211 27021)) +;;; Generated autoloads from vc-svn.el + (defun vc-svn-registered (f) + (when (file-readable-p (expand-file-name + ".svn/entries" (file-name-directory f))) + (load "vc-svn") + (vc-svn-registered f))) + +(add-to-list (quote completion-ignored-extensions) ".svn/") + +;;;*** + +;;;### (autoloads (vhdl-mode) "vhdl-mode" "progmodes/vhdl-mode.el" +;;;;;; (16211 27039)) +;;; Generated autoloads from progmodes/vhdl-mode.el + +(autoload (quote vhdl-mode) "vhdl-mode" "\ +Major mode for editing VHDL code. + +Usage: +------ + + TEMPLATE INSERTION (electrification): + After typing a VHDL keyword and entering `SPC', you are prompted for + arguments while a template is generated for that VHDL construct. Typing + `RET' or `C-g' at the first (mandatory) prompt aborts the current + template generation. Optional arguments are indicated by square + brackets and removed if the queried string is left empty. Prompts for + mandatory arguments remain in the code if the queried string is left + empty. They can be queried again by `C-c C-t C-q'. Enabled + electrification is indicated by `/e' in the modeline. + + Typing `M-SPC' after a keyword inserts a space without calling the + template generator. Automatic template generation (i.e. + electrification) can be disabled (enabled) by typing `C-c C-m C-e' or by + setting option `vhdl-electric-mode' (see OPTIONS). + + Template generators can be invoked from the VHDL menu, by key + bindings, by typing `C-c C-i C-c' and choosing a construct, or by typing + the keyword (i.e. first word of menu entry not in parenthesis) and + `SPC'. The following abbreviations can also be used: arch, attr, cond, + conf, comp, cons, func, inst, pack, sig, var. + + Template styles can be customized in customization group + `vhdl-template' (see OPTIONS). + + + HEADER INSERTION: + A file header can be inserted by `C-c C-t C-h'. A file footer + (template at the end of the file) can be inserted by `C-c C-t C-f'. + See customization group `vhdl-header'. + + + STUTTERING: + Double striking of some keys inserts cumbersome VHDL syntax elements. + Stuttering can be disabled (enabled) by typing `C-c C-m C-s' or by + option `vhdl-stutter-mode'. Enabled stuttering is indicated by `/s' in + the modeline. The stuttering keys and their effects are: + + ;; --> \" : \" [ --> ( -- --> comment + ;;; --> \" := \" [[ --> [ --CR --> comment-out code + .. --> \" => \" ] --> ) --- --> horizontal line + ,, --> \" <= \" ]] --> ] ---- --> display comment + == --> \" == \" '' --> \\\" + + + WORD COMPLETION: + Typing `TAB' after a (not completed) word looks for a VHDL keyword or a + word in the buffer that starts alike, inserts it and adjusts case. + Re-typing `TAB' toggles through alternative word completions. This also + works in the minibuffer (i.e. in template generator prompts). + + Typing `TAB' after `(' looks for and inserts complete parenthesized + expressions (e.g. for array index ranges). All keywords as well as + standard types and subprograms of VHDL have predefined abbreviations + (e.g. type \"std\" and `TAB' will toggle through all standard types + beginning with \"std\"). + + Typing `TAB' after a non-word character indents the line if at the + beginning of a line (i.e. no preceding non-blank characters), and + inserts a tabulator stop otherwise. `M-TAB' always inserts a tabulator + stop. + + + COMMENTS: + `--' puts a single comment. + `---' draws a horizontal line for separating code segments. + `----' inserts a display comment, i.e. two horizontal lines + with a comment in between. + `--CR' comments out code on that line. Re-hitting CR comments + out following lines. + `C-c c' comments out a region if not commented out, + uncomments a region if already commented out. + + You are prompted for comments after object definitions (i.e. signals, + variables, constants, ports) and after subprogram and process + specifications if option `vhdl-prompt-for-comments' is non-nil. + Comments are automatically inserted as additional labels (e.g. after + begin statements) and as help comments if `vhdl-self-insert-comments' is + non-nil. + + Inline comments (i.e. comments after a piece of code on the same line) + are indented at least to `vhdl-inline-comment-column'. Comments go at + maximum to `vhdl-end-comment-column'. `RET' after a space in a comment + will open a new comment line. Typing beyond `vhdl-end-comment-column' + in a comment automatically opens a new comment line. `M-q' re-fills + multi-line comments. + + + INDENTATION: + `TAB' indents a line if at the beginning of the line. The amount of + indentation is specified by option `vhdl-basic-offset'. `C-c C-i C-l' + always indents the current line (is bound to `TAB' if option + `vhdl-intelligent-tab' is nil). + + Indentation can be done for a group of lines (`C-c C-i C-g'), a region + (`M-C-\\') or the entire buffer (menu). Argument and port lists are + indented normally (nil) or relative to the opening parenthesis (non-nil) + according to option `vhdl-argument-list-indent'. + + If option `vhdl-indent-tabs-mode' is nil, spaces are used instead of + tabs. `M-x tabify' and `M-x untabify' allow to convert spaces to tabs + and vice versa. + + Syntax-based indentation can be very slow in large files. Option + `vhdl-indent-syntax-based' allows to use faster but simpler indentation. + + + ALIGNMENT: + The alignment functions align operators, keywords, and inline comments + to beautify the code. `C-c C-a C-a' aligns a group of consecutive lines + separated by blank lines, `C-c C-a C-i' a block of lines with same + indent. `C-c C-a C-l' aligns all lines belonging to a list enclosed by + a pair of parentheses (e.g. port clause/map, argument list), and `C-c + C-a C-d' all lines within the declarative part of a design unit. `C-c + C-a M-a' aligns an entire region. `C-c C-a C-c' aligns inline comments + for a group of lines, and `C-c C-a M-c' for a region. + + If option `vhdl-align-groups' is non-nil, groups of code lines + separated by special lines (see option `vhdl-align-group-separate') are + aligned individually. If option `vhdl-align-same-indent' is non-nil, + blocks of lines with same indent are aligned separately. Some templates + are automatically aligned after generation if option `vhdl-auto-align' + is non-nil. + + Alignment tries to align inline comments at + `vhdl-inline-comment-column' and tries inline comment not to exceed + `vhdl-end-comment-column'. + + `C-c C-x M-w' fixes up whitespace in a region. That is, operator + symbols are surrounded by one space, and multiple spaces are eliminated. + + +| CODE FILLING: +| Code filling allows to condens code (e.g. sensitivity lists or port +| maps) by removing comments and newlines and re-wrapping so that all +| lines are maximally filled (block filling). `C-c C-f C-f' fills a list +| enclosed by parenthesis, `C-c C-f C-g' a group of lines separated by +| blank lines, `C-c C-f C-i' a block of lines with same indent, and +| `C-c C-f M-f' an entire region. + + + CODE BEAUTIFICATION: + `C-c M-b' and `C-c C-b' beautify the code of a region or of the entire + buffer respectively. This inludes indentation, alignment, and case + fixing. Code beautification can also be run non-interactively using the + command: + + emacs -batch -l ~/.emacs filename.vhd -f vhdl-beautify-buffer + + + PORT TRANSLATION: + Generic and port clauses from entity or component declarations can be + copied (`C-c C-p C-w') and pasted as entity and component declarations, + as component instantiations and corresponding internal constants and + signals, as a generic map with constants as actual generics, and as + internal signal initializations (menu). + + To include formals in component instantiations, see option + `vhdl-association-list-with-formals'. To include comments in pasting, + see options `vhdl-include-...-comments'. + + A clause with several generic/port names on the same line can be + flattened (`C-c C-p C-f') so that only one name per line exists. The +| direction of ports can be reversed (`C-c C-p C-r'), i.e., inputs become +| outputs and vice versa, which can be useful in testbenches. (This +| reversion is done on the internal data structure and is only reflected +| in subsequent paste operations.) + + Names for actual ports, instances, testbenches, and + design-under-test instances can be derived from existing names according + to options `vhdl-...-name'. See customization group `vhdl-port'. + + +| SUBPROGRAM TRANSLATION: +| Similar functionality exists for copying/pasting the interface of +| subprograms (function/procedure). A subprogram interface can be copied +| and then pasted as a subprogram declaration, body or call (uses +| association list with formals). + + + TESTBENCH GENERATION: + A copied port can also be pasted as a testbench. The generated + testbench includes an entity, an architecture, and an optional + configuration. The architecture contains the component declaration and + instantiation of the DUT as well as internal constant and signal + declarations. Additional user-defined templates can be inserted. The + names used for entity/architecture/configuration/DUT as well as the file + structure to be generated can be customized. See customization group + `vhdl-testbench'. + + + KEY BINDINGS: + Key bindings (`C-c ...') exist for most commands (see in menu). + + + VHDL MENU: + All commands can be found in the VHDL menu including their key bindings. + + + FILE BROWSER: + The speedbar allows browsing of directories and file contents. It can + be accessed from the VHDL menu and is automatically opened if option + `vhdl-speedbar-auto-open' is non-nil. + + In speedbar, open files and directories with `mouse-2' on the name and + browse/rescan their contents with `mouse-2'/`S-mouse-2' on the `+'. + + + DESIGN HIERARCHY BROWSER: + The speedbar can also be used for browsing the hierarchy of design units + contained in the source files of the current directory or the specified + projects (see option `vhdl-project-alist'). + + The speedbar can be switched between file, directory hierarchy and + project hierarchy browsing mode in the speedbar menu or by typing `f', + `h' or `H' in speedbar. + + In speedbar, open design units with `mouse-2' on the name and browse + their hierarchy with `mouse-2' on the `+'. Ports can directly be copied + from entities and components (in packages). Individual design units and + complete designs can directly be compiled (\"Make\" menu entry). + + The hierarchy is automatically updated upon saving a modified source + file when option `vhdl-speedbar-update-on-saving' is non-nil. The + hierarchy is only updated for projects that have been opened once in the + speedbar. The hierarchy is cached between Emacs sessions in a file (see + options in group `vhdl-speedbar'). + + Simple design consistency checks are done during scanning, such as + multiple declarations of the same unit or missing primary units that are + required by secondary units. + + +| STRUCTURAL COMPOSITION: +| Enables simple structural composition. `C-c C-c C-n' creates a skeleton +| for a new component. Subcomponents (i.e. component declaration and +| instantiation) can be automatically placed from a previously read port +| (`C-c C-c C-p') or directly from the hierarchy browser (`P'). Finally, +| all subcomponents can be automatically connected using internal signals +| and ports (`C-c C-c C-w') following these rules: +| - subcomponent actual ports with same name are considered to be +| connected by a signal (internal signal or port) +| - signals that are only inputs to subcomponents are considered as +| inputs to this component -> input port created +| - signals that are only outputs from subcomponents are considered as +| outputs from this component -> output port created +| - signals that are inputs to AND outputs from subcomponents are +| considered as internal connections -> internal signal created +| +| Component declarations can be placed in a components package (option +| `vhdl-use-components-package') which can be automatically generated for +| an entire directory or project (`C-c C-c M-p'). The VHDL'93 direct +| component instantiation is also supported (option +| `vhdl-use-direct-instantiation'). +| +| Purpose: With appropriate naming conventions it is possible to +| create higher design levels with only a few mouse clicks or key +| strokes. A new design level can be created by simply generating a new +| component, placing the required subcomponents from the hierarchy +| browser, and wiring everything automatically. +| +| Note: Automatic wiring only works reliably on templates of new +| components and component instantiations that were created by VHDL mode. +| +| See the options group `vhdl-compose' for all relevant user options. + + + SOURCE FILE COMPILATION: + The syntax of the current buffer can be analyzed by calling a VHDL + compiler (menu, `C-c C-k'). The compiler to be used is specified by + option `vhdl-compiler'. The available compilers are listed in option + `vhdl-compiler-alist' including all required compilation command, + command options, compilation directory, and error message syntax + information. New compilers can be added. + + All the source files of an entire design can be compiled by the `make' + command (menu, `C-c M-C-k') if an appropriate Makefile exists. + + + MAKEFILE GENERATION: + Makefiles can be generated automatically by an internal generation + routine (`C-c M-k'). The library unit dependency information is + obtained from the hierarchy browser. Makefile generation can be + customized for each compiler in option `vhdl-compiler-alist'. + + Makefile generation can also be run non-interactively using the + command: + + emacs -batch -l ~/.emacs -l vhdl-mode + [-compiler compilername] [-project projectname] + -f vhdl-generate-makefile + + The Makefile's default target \"all\" compiles the entire design, the + target \"clean\" removes it and the target \"library\" creates the + library directory if not existent. The Makefile also includes a target + for each primary library unit which allows selective compilation of this + unit, its secondary units and its subhierarchy (example: compilation of + a design specified by a configuration). User specific parts can be + inserted into a Makefile with option `vhdl-makefile-generation-hook'. + + Limitations: + - Only library units and dependencies within the current library are + considered. Makefiles for designs that span multiple libraries are + not (yet) supported. + - Only one-level configurations are supported (also hierarchical), + but configurations that go down several levels are not. + - The \"others\" keyword in configurations is not supported. + + + PROJECTS: + Projects can be defined in option `vhdl-project-alist' and a current + project be selected using option `vhdl-project' (permanently) or from + the menu or speedbar (temporarily). For each project, title and + description strings (for the file headers), source files/directories + (for the hierarchy browser and Makefile generation), library name, and + compiler-dependent options, exceptions and compilation directory can be + specified. Compilation settings overwrite the settings of option + `vhdl-compiler-alist'. + + Project setups can be exported (i.e. written to a file) and imported. + Imported setups are not automatically saved in `vhdl-project-alist' but + can be saved afterwards in its customization buffer. When starting + Emacs with VHDL Mode (i.e. load a VHDL file or use \"emacs -l + vhdl-mode\") in a directory with an existing project setup file, it is + automatically loaded and its project activated if option + `vhdl-project-auto-load' is non-nil. Names/paths of the project setup + files can be specified in option `vhdl-project-file-name'. Multiple + project setups can be automatically loaded from global directories. + This is an alternative to specifying project setups with option + `vhdl-project-alist'. + + + SPECIAL MENUES: + As an alternative to the speedbar, an index menu can be added (set + option `vhdl-index-menu' to non-nil) or made accessible as a mouse menu + (e.g. add \"(global-set-key '[S-down-mouse-3] 'imenu)\" to your start-up + file) for browsing the file contents (is not populated if buffer is + larger than `font-lock-maximum-size'). Also, a source file menu can be + added (set option `vhdl-source-file-menu' to non-nil) for browsing the + current directory for VHDL source files. + + + VHDL STANDARDS: + The VHDL standards to be used are specified in option `vhdl-standard'. + Available standards are: VHDL'87/'93, VHDL-AMS, and Math Packages. + + + KEYWORD CASE: + Lower and upper case for keywords and standardized types, attributes, + and enumeration values is supported. If the option + `vhdl-upper-case-keywords' is set to non-nil, keywords can be typed in + lower case and are converted into upper case automatically (not for + types, attributes, and enumeration values). The case of keywords, + types, attributes,and enumeration values can be fixed for an entire + region (menu) or buffer (`C-c C-x C-c') according to the options + `vhdl-upper-case-{keywords,types,attributes,enum-values}'. + + + HIGHLIGHTING (fontification): + Keywords and standardized types, attributes, enumeration values, and + function names (controlled by option `vhdl-highlight-keywords'), as well + as comments, strings, and template prompts are highlighted using + different colors. Unit, subprogram, signal, variable, constant, + parameter and generic/port names in declarations as well as labels are + highlighted if option `vhdl-highlight-names' is non-nil. + + Additional reserved words or words with a forbidden syntax (e.g. words + that should be avoided) can be specified in option + `vhdl-forbidden-words' or `vhdl-forbidden-syntax' and be highlighted in + a warning color (option `vhdl-highlight-forbidden-words'). Verilog + keywords are highlighted as forbidden words if option + `vhdl-highlight-verilog-keywords' is non-nil. + + Words with special syntax can be highlighted by specifying their + syntax and color in option `vhdl-special-syntax-alist' and by setting + option `vhdl-highlight-special-words' to non-nil. This allows to + establish some naming conventions (e.g. to distinguish different kinds + of signals or other objects by using name suffices) and to support them + visually. + + Option `vhdl-highlight-case-sensitive' can be set to non-nil in order + to support case-sensitive highlighting. However, keywords are then only + highlighted if written in lower case. + + Code between \"translate_off\" and \"translate_on\" pragmas is + highlighted using a different background color if option + `vhdl-highlight-translate-off' is non-nil. + + For documentation and customization of the used colors see + customization group `vhdl-highlight-faces' (`M-x customize-group'). For + highlighting of matching parenthesis, see customization group + `paren-showing'. Automatic buffer highlighting is turned on/off by + option `global-font-lock-mode' (`font-lock-auto-fontify' in XEmacs). + + + USER MODELS: + VHDL models (templates) can be specified by the user and made accessible + in the menu, through key bindings (`C-c C-m ...'), or by keyword + electrification. See option `vhdl-model-alist'. + + + HIDE/SHOW: + The code of blocks, processes, subprograms, component declarations and + instantiations, generic/port clauses, and configuration declarations can + be hidden using the `Hide/Show' menu or by pressing `S-mouse-2' within + the code (see customization group `vhdl-menu'). XEmacs: limited + functionality due to old `hideshow.el' package. + + + CODE UPDATING: + - Sensitivity List: `C-c C-u C-s' updates the sensitivity list of the + current process, `C-c C-u M-s' of all processes in the current buffer. + Limitations: + - Only declared local signals (ports, signals declared in + architecture and blocks) are automatically inserted. + - Global signals declared in packages are not automatically inserted. + Insert them once manually (will be kept afterwards). + - Out parameters of procedures are considered to be read. + Use option `vhdl-entity-file-name' to specify the entity file name + (used to obtain the port names). + + + CODE FIXING: + `C-c C-x C-p' fixes the closing parenthesis of a generic/port clause + (e.g. if the closing parenthesis is on the wrong line or is missing). + + + PRINTING: + Postscript printing with different faces (an optimized set of faces is + used if `vhdl-print-customize-faces' is non-nil) or colors (if + `ps-print-color-p' is non-nil) is possible using the standard Emacs + postscript printing commands. Option `vhdl-print-two-column' defines + appropriate default settings for nice landscape two-column printing. + The paper format can be set by option `ps-paper-type'. Do not forget to + switch `ps-print-color-p' to nil for printing on black-and-white + printers. + + + OPTIONS: + User options allow customization of VHDL Mode. All options are + accessible from the \"Options\" menu entry. Simple options (switches + and choices) can directly be changed, while for complex options a + customization buffer is opened. Changed options can be saved for future + sessions using the \"Save Options\" menu entry. + + Options and their detailed descriptions can also be accessed by using + the \"Customize\" menu entry or the command `M-x customize-option' (`M-x + customize-group' for groups). Some customizations only take effect + after some action (read the NOTE in the option documentation). + Customization can also be done globally (i.e. site-wide, read the + INSTALL file). + + Not all options are described in this documentation, so go and see + what other useful user options there are (`M-x vhdl-customize' or menu)! + + + FILE EXTENSIONS: + As default, files with extensions \".vhd\" and \".vhdl\" are + automatically recognized as VHDL source files. To add an extension + \".xxx\", add the following line to your Emacs start-up file (`.emacs'): + + (setq auto-mode-alist (cons '(\"\\\\.xxx\\\\'\" . vhdl-mode) auto-mode-alist)) + + + HINTS: + - To start Emacs with open VHDL hierarchy browser without having to load + a VHDL file first, use the command: + + emacs -l vhdl-mode -f speedbar-frame-mode + + - Type `C-g C-g' to interrupt long operations or if Emacs hangs. + + - Some features only work on properly indented code. + + + RELEASE NOTES: + See also the release notes (menu) for added features in new releases. + + +Maintenance: +------------ + +To submit a bug report, enter `M-x vhdl-submit-bug-report' within VHDL Mode. +Add a description of the problem and include a reproducible test case. + +Questions and enhancement requests can be sent to . + +The `vhdl-mode-announce' mailing list informs about new VHDL Mode releases. +The `vhdl-mode-victims' mailing list informs about new VHDL Mode beta +releases. You are kindly invited to participate in beta testing. Subscribe +to above mailing lists by sending an email to . + +VHDL Mode is officially distributed at +http://opensource.ethz.ch/emacs/vhdl-mode.html +where the latest version can be found. + + +Known problems: +--------------- + +- Indentation bug in simultaneous if- and case-statements (VHDL-AMS). +- XEmacs: Incorrect start-up when automatically opening speedbar. +- XEmacs: Indentation in XEmacs 21.4 (and higher). + + + The VHDL Mode Authors + Reto Zimmermann and Rod Whitby + +Key bindings: +------------- + +\\{vhdl-mode-map} + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (vi-mode) "vi" "emulation/vi.el" (16211 27026)) +;;; Generated autoloads from emulation/vi.el + +(autoload (quote vi-mode) "vi" "\ +Major mode that acts like the `vi' editor. +The purpose of this mode is to provide you the combined power of vi (namely, +the \"cross product\" effect of commands and repeat last changes) and Emacs. + +This command redefines nearly all keys to look like vi commands. +It records the previous major mode, and any vi command for input +\(`i', `a', `s', etc.) switches back to that mode. +Thus, ordinary Emacs (in whatever major mode you had been using) +is \"input\" mode as far as vi is concerned. + +To get back into vi from \"input\" mode, you must issue this command again. +Therefore, it is recommended that you assign it to a key. + +Major differences between this mode and real vi : + +* Limitations and unsupported features + - Search patterns with line offset (e.g. /pat/+3 or /pat/z.) are + not supported. + - Ex commands are not implemented; try ':' to get some hints. + - No line undo (i.e. the 'U' command), but multi-undo is a standard feature. + +* Modifications + - The stopping positions for some point motion commands (word boundary, + pattern search) are slightly different from standard 'vi'. + Also, no automatic wrap around at end of buffer for pattern searching. + - Since changes are done in two steps (deletion then insertion), you need + to undo twice to completely undo a change command. But this is not needed + for undoing a repeated change command. + - No need to set/unset 'magic', to search for a string with regular expr + in it just put a prefix arg for the search commands. Replace cmds too. + - ^R is bound to incremental backward search, so use ^L to redraw screen. + +* Extensions + - Some standard (or modified) Emacs commands were integrated, such as + incremental search, query replace, transpose objects, and keyboard macros. + - In command state, ^X links to the 'ctl-x-map', and ESC can be linked to + esc-map or set undefined. These can give you the full power of Emacs. + - See vi-com-map for those keys that are extensions to standard vi, e.g. + `vi-name-last-change-or-macro', `vi-verify-spelling', `vi-locate-def', + `vi-mark-region', and 'vi-quote-words'. Some of them are quite handy. + - Use \\[vi-switch-mode] to switch among different modes quickly. + +Syntax table and abbrevs while in vi mode remain as they were in Emacs. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (viqr-pre-write-conversion viqr-post-read-conversion +;;;;;; viet-encode-viqr-buffer viet-encode-viqr-region viet-decode-viqr-buffer +;;;;;; viet-decode-viqr-region viet-encode-viscii-char) "viet-util" +;;;;;; "language/viet-util.el" (16211 27033)) +;;; Generated autoloads from language/viet-util.el + +(autoload (quote viet-encode-viscii-char) "viet-util" "\ +Return VISCII character code of CHAR if appropriate. + +\(fn CHAR)" nil nil) + +(autoload (quote viet-decode-viqr-region) "viet-util" "\ +Convert `VIQR' mnemonics of the current region to Vietnamese characters. +When called from a program, expects two arguments, +positions (integers or markers) specifying the stretch of the region. + +\(fn FROM TO)" t nil) + +(autoload (quote viet-decode-viqr-buffer) "viet-util" "\ +Convert `VIQR' mnemonics of the current buffer to Vietnamese characters. + +\(fn)" t nil) + +(autoload (quote viet-encode-viqr-region) "viet-util" "\ +Convert Vietnamese characters of the current region to `VIQR' mnemonics. +When called from a program, expects two arguments, +positions (integers or markers) specifying the stretch of the region. + +\(fn FROM TO)" t nil) + +(autoload (quote viet-encode-viqr-buffer) "viet-util" "\ +Convert Vietnamese characters of the current buffer to `VIQR' mnemonics. + +\(fn)" t nil) + +(autoload (quote viqr-post-read-conversion) "viet-util" "\ +Not documented + +\(fn LEN)" nil nil) + +(autoload (quote viqr-pre-write-conversion) "viet-util" "\ +Not documented + +\(fn FROM TO)" nil nil) + +;;;*** + +;;;### (autoloads (View-exit-and-edit view-mode-enter view-mode view-buffer-other-frame +;;;;;; view-buffer-other-window view-buffer view-file-other-frame +;;;;;; view-file-other-window view-file) "view" "view.el" (16211 +;;;;;; 27021)) +;;; Generated autoloads from view.el + +(defvar view-mode nil "\ +Non-nil if View mode is enabled. +Don't change this variable directly, you must change it by one of the +functions that enable or disable view mode.") + +(make-variable-buffer-local (quote view-mode)) + +(autoload (quote view-file) "view" "\ +View FILE in View mode, returning to previous buffer when done. +Emacs commands editing the buffer contents are not available; instead, +a special set of commands (mostly letters and punctuation) +are defined for moving around in the buffer. +Space scrolls forward, Delete scrolls backward. +For list of all View commands, type H or h while viewing. + +This command runs the normal hook `view-mode-hook'. + +\(fn FILE)" t nil) + +(autoload (quote view-file-other-window) "view" "\ +View FILE in View mode in another window. +Return that window to its previous buffer when done. +Emacs commands editing the buffer contents are not available; instead, +a special set of commands (mostly letters and punctuation) +are defined for moving around in the buffer. +Space scrolls forward, Delete scrolls backward. +For list of all View commands, type H or h while viewing. + +This command runs the normal hook `view-mode-hook'. + +\(fn FILE)" t nil) + +(autoload (quote view-file-other-frame) "view" "\ +View FILE in View mode in another frame. +Maybe delete other frame and/or return to previous buffer when done. +Emacs commands editing the buffer contents are not available; instead, +a special set of commands (mostly letters and punctuation) +are defined for moving around in the buffer. +Space scrolls forward, Delete scrolls backward. +For list of all View commands, type H or h while viewing. + +This command runs the normal hook `view-mode-hook'. + +\(fn FILE)" t nil) + +(autoload (quote view-buffer) "view" "\ +View BUFFER in View mode, returning to previous buffer when done. +Emacs commands editing the buffer contents are not available; instead, +a special set of commands (mostly letters and punctuation) +are defined for moving around in the buffer. +Space scrolls forward, Delete scrolls backward. +For list of all View commands, type H or h while viewing. + +This command runs the normal hook `view-mode-hook'. + +Optional argument EXIT-ACTION is either nil or a function with buffer as +argument. This function is called when finished viewing buffer. +Use this argument instead of explicitly setting `view-exit-action'. + +\(fn BUFFER &optional EXIT-ACTION)" t nil) + +(autoload (quote view-buffer-other-window) "view" "\ +View BUFFER in View mode in another window. +Return to previous buffer when done, unless optional NOT-RETURN is non-nil. +Emacs commands editing the buffer contents are not available; instead, +a special set of commands (mostly letters and punctuation) +are defined for moving around in the buffer. +Space scrolls forward, Delete scrolls backward. +For list of all View commands, type H or h while viewing. + +This command runs the normal hook `view-mode-hook'. + +Optional argument EXIT-ACTION is either nil or a function with buffer as +argument. This function is called when finished viewing buffer. +Use this argument instead of explicitly setting `view-exit-action'. + +\(fn BUFFER &optional NOT-RETURN EXIT-ACTION)" t nil) + +(autoload (quote view-buffer-other-frame) "view" "\ +View BUFFER in View mode in another frame. +Return to previous buffer when done, unless optional NOT-RETURN is non-nil. +Emacs commands editing the buffer contents are not available; instead, +a special set of commands (mostly letters and punctuation) +are defined for moving around in the buffer. +Space scrolls forward, Delete scrolls backward. +For list of all View commands, type H or h while viewing. + +This command runs the normal hook `view-mode-hook'. + +Optional argument EXIT-ACTION is either nil or a function with buffer as +argument. This function is called when finished viewing buffer. +Use this argument instead of explicitly setting `view-exit-action'. + +\(fn BUFFER &optional NOT-RETURN EXIT-ACTION)" t nil) + +(autoload (quote view-mode) "view" "\ +Toggle View mode, a minor mode for viewing text but not editing it. +With ARG, turn View mode on iff ARG is positive. + +Emacs commands that do not change the buffer contents are available as usual. +Kill commands insert text in kill buffers but do not delete. Other commands +\(among them most letters and punctuation) beep and tell that the buffer is +read-only. +\\ +The following additional commands are provided. Most commands take prefix +arguments. Page commands default to \"page size\" lines which is almost a whole +window full, or number of lines set by \\[View-scroll-page-forward-set-page-size] or \\[View-scroll-page-backward-set-page-size]. Half page commands default to +and set \"half page size\" lines which initially is half a window full. Search +commands default to a repeat count of one. + +H, h, ? This message. +Digits provide prefix arguments. +\\[negative-argument] negative prefix argument. +\\[beginning-of-buffer] move to the beginning of buffer. +> move to the end of buffer. +\\[View-scroll-to-buffer-end] scroll so that buffer end is at last line of window. +SPC scroll forward \"page size\" lines. + With prefix scroll forward prefix lines. +DEL scroll backward \"page size\" lines. + With prefix scroll backward prefix lines. +\\[View-scroll-page-forward-set-page-size] like \\[View-scroll-page-forward] but with prefix sets \"page size\" to prefix. +\\[View-scroll-page-backward-set-page-size] like \\[View-scroll-page-backward] but with prefix sets \"page size\" to prefix. +\\[View-scroll-half-page-forward] scroll forward \"half page size\" lines. With prefix, sets + \"half page size\" to prefix lines and scrolls forward that much. +\\[View-scroll-half-page-backward] scroll backward \"half page size\" lines. With prefix, sets + \"half page size\" to prefix lines and scrolls backward that much. +RET, LFD scroll forward one line. With prefix scroll forward prefix line(s). +y scroll backward one line. With prefix scroll backward prefix line(s). +\\[View-revert-buffer-scroll-page-forward] revert-buffer if necessary and scroll forward. + Use this to view a changing file. +\\[what-line] prints the current line number. +\\[View-goto-percent] goes prefix argument (default 100) percent into buffer. +\\[View-goto-line] goes to line given by prefix argument (default first line). +. set the mark. +x exchanges point and mark. +\\[View-back-to-mark] return to mark and pops mark ring. + Mark ring is pushed at start of every successful search and when + jump to line occurs. The mark is set on jump to buffer start or end. +\\[point-to-register] save current position in character register. +' go to position saved in character register. +s do forward incremental search. +r do reverse incremental search. +\\[View-search-regexp-forward] searches forward for regular expression, starting after current page. + ! and @ have a special meaning at the beginning of the regexp. + ! means search for a line with no match for regexp. @ means start + search at beginning (end for backward search) of buffer. +\\ searches backward for regular expression, starting before current page. +\\[View-search-last-regexp-forward] searches forward for last regular expression. +p searches backward for last regular expression. +\\[View-quit] quit View mode, restoring this window and buffer to previous state. + \\[View-quit] is the normal way to leave view mode. +\\[View-exit] exit View mode but stay in current buffer. Use this if you started + viewing a buffer (file) and find out you want to edit it. + This command restores the previous read-only status of the buffer. +\\[View-exit-and-edit] exit View mode, and make the current buffer editable + even if it was not editable before entry to View mode. +\\[View-quit-all] quit View mode, restoring all windows to previous state. +\\[View-leave] quit View mode and maybe switch buffers, but don't kill this buffer. +\\[View-kill-and-leave] quit View mode, kill current buffer and go back to other buffer. + +The effect of \\[View-leave] , \\[View-quit] and \\[View-kill-and-leave] depends on how view-mode was entered. If it was +entered by view-file, view-file-other-window or view-file-other-frame +\(\\[view-file], \\[view-file-other-window], \\[view-file-other-frame] or the dired mode v command), then \\[View-quit] will +try to kill the current buffer. If view-mode was entered from another buffer +as is done by View-buffer, View-buffer-other-window, View-buffer-other frame, +View-file, View-file-other-window or View-file-other-frame then \\[View-leave] , \\[View-quit] and \\[View-kill-and-leave] +will return to that buffer. + +Entry to view-mode runs the normal hook `view-mode-hook'. + +\(fn &optional ARG)" t nil) + +(autoload (quote view-mode-enter) "view" "\ +Enter View mode and set up exit from view mode depending on optional arguments. +If RETURN-TO is non-nil it is added as an element to the buffer local alist +`view-return-to-alist'. +Save EXIT-ACTION in buffer local variable `view-exit-action'. +It should be either nil or a function that takes a buffer as argument. +This function will be called by `view-mode-exit'. + +RETURN-TO is either nil, meaning do nothing when exiting view mode, or +it has the format (WINDOW OLD-WINDOW . OLD-BUF-INFO). +WINDOW is a window used for viewing. +OLD-WINDOW is nil or the window to select after viewing. +OLD-BUF-INFO tells what to do with WINDOW when exiting. It is one of: +1) nil Do nothing. +2) t Delete WINDOW or, if it is the only window, its frame. +3) (OLD-BUFF START POINT) Display buffer OLD-BUFF with displayed text + starting at START and point at POINT in WINDOW. +4) quit-window Do `quit-window' in WINDOW. + +For list of all View commands, type H or h while viewing. + +This function runs the normal hook `view-mode-hook'. + +\(fn &optional RETURN-TO EXIT-ACTION)" nil nil) + +(autoload (quote View-exit-and-edit) "view" "\ +Exit View mode and make the current buffer editable. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (16211 +;;;;;; 27026)) +;;; Generated autoloads from emulation/vip.el + +(autoload (quote vip-setup) "vip" "\ +Set up bindings for C-x 7 and C-z that are useful for VIP users. + +\(fn)" nil nil) + +(autoload (quote vip-mode) "vip" "\ +Turn on VIP emulation of VI. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (viper-mode toggle-viper-mode) "viper" "emulation/viper.el" +;;;;;; (16211 27027)) +;;; Generated autoloads from emulation/viper.el + +(autoload (quote toggle-viper-mode) "viper" "\ +Toggle Viper on/off. +If Viper is enabled, turn it off. Otherwise, turn it on. + +\(fn)" t nil) + +(autoload (quote viper-mode) "viper" "\ +Turn on Viper emulation of Vi. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (warn lwarn display-warning) "warnings" "emacs-lisp/warnings.el" +;;;;;; (16211 27026)) +;;; Generated autoloads from emacs-lisp/warnings.el + +(defvar warning-prefix-function nil "\ +Function to generate warning prefixes. +This function, if non-nil, is called with two arguments, +the severity level and its entry in `warning-levels', +and should return the entry that should actually be used. +The warnings buffer is current when this function is called +and the function can insert text in it. This text becomes +the beginning of the warning.") + +(defvar warning-series nil "\ +Non-nil means treat multiple `display-warning' calls as a series. +A marker indicates a position in the warnings buffer +which is the start of the current series; it means that +additional warnings in the same buffer should not move point. +t means the next warning begins a series (and stores a marker here). +A symbol with a function definition is like t, except +also call that function before the next warning.") + +(defvar warning-fill-prefix nil "\ +Non-nil means fill each warning text using this string as `fill-prefix'.") + +(defvar warning-type-format " (%s)" "\ +Format for displaying the warning type in the warning message. +The result of formatting the type this way gets included in the +message under the control of the string in `warning-levels'.") + +(autoload (quote display-warning) "warnings" "\ +Display a warning message, MESSAGE. +TYPE is the warning type: either a custom group name (a symbol), +or a list of symbols whose first element is a custom group name. +\(The rest of the symbols represent subcategories, for warning purposes +only, and you can use whatever symbols you like.) + +LEVEL should be either :warning, :error, or :emergency. +:emergency -- a problem that will seriously impair Emacs operation soon + if you do not attend to it promptly. +:error -- data or circumstances that are inherently wrong. +:warning -- data or circumstances that are not inherently wrong, + but raise suspicion of a possible problem. +:debug -- info for debugging only. + +BUFFER-NAME, if specified, is the name of the buffer for logging the +warning. By default, it is `*Warnings*'. + +See the `warnings' custom group for user customization features. + +See also `warning-series', `warning-prefix-function' and +`warning-fill-prefix' for additional programming features. + +\(fn TYPE MESSAGE &optional LEVEL BUFFER-NAME)" nil nil) + +(autoload (quote lwarn) "warnings" "\ +Display a warning message made from (format MESSAGE ARGS...). +Aside from generating the message with `format', +this is equivalent to `display-warning'. + +TYPE is the warning type: either a custom group name (a symbol). +or a list of symbols whose first element is a custom group name. +\(The rest of the symbols represent subcategories and +can be whatever you like.) + +LEVEL should be either :warning, :error, or :emergency. +:emergency -- a problem that will seriously impair Emacs operation soon + if you do not attend to it promptly. +:error -- invalid data or circumstances. +:warning -- suspicious data or circumstances. + +\(fn TYPE LEVEL MESSAGE &rest ARGS)" nil nil) + +(autoload (quote warn) "warnings" "\ +Display a warning message made from (format MESSAGE ARGS...). +Aside from generating the message with `format', +this is equivalent to `display-warning', using +`emacs' as the type and `:warning' as the level. + +\(fn MESSAGE &rest ARGS)" nil nil) + +;;;*** + +;;;### (autoloads (webjump) "webjump" "net/webjump.el" (16211 27037)) +;;; Generated autoloads from net/webjump.el + +(autoload (quote webjump) "webjump" "\ +Jumps to a Web site from a programmable hotlist. + +See the documentation for the `webjump-sites' variable for how to customize the +hotlist. + +Please submit bug reports and other feedback to the author, Neil W. Van Dyke +. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (which-function-mode) "which-func" "progmodes/which-func.el" +;;;;;; (16249 31942)) +;;; Generated autoloads from progmodes/which-func.el + (put 'which-func-format 'risky-local-variable t) + (put 'which-func-current 'risky-local-variable t) + +(defalias (quote which-func-mode) (quote which-function-mode)) + +(defvar which-function-mode nil "\ +Non-nil if Which-Function mode is enabled. +See the command `which-function-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `which-function-mode'.") + +(custom-autoload (quote which-function-mode) "which-func") + +(autoload (quote which-function-mode) "which-func" "\ +Toggle Which Function mode, globally. +When Which Function mode is enabled, the current function name is +continuously displayed in the mode line, in certain major modes. + +With prefix ARG, turn Which Function mode on iff arg is positive, +and off otherwise. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (whitespace-write-file-hook whitespace-global-mode +;;;;;; whitespace-cleanup-region whitespace-cleanup whitespace-region +;;;;;; whitespace-buffer whitespace-toggle-ateol-check whitespace-toggle-spacetab-check +;;;;;; whitespace-toggle-indent-check whitespace-toggle-trailing-check +;;;;;; whitespace-toggle-leading-check) "whitespace" "whitespace.el" +;;;;;; (16248 29803)) +;;; Generated autoloads from whitespace.el + +(autoload (quote whitespace-toggle-leading-check) "whitespace" "\ +Toggle the check for leading space in the local buffer. + +\(fn)" t nil) + +(autoload (quote whitespace-toggle-trailing-check) "whitespace" "\ +Toggle the check for trailing space in the local buffer. + +\(fn)" t nil) + +(autoload (quote whitespace-toggle-indent-check) "whitespace" "\ +Toggle the check for indentation space in the local buffer. + +\(fn)" t nil) + +(autoload (quote whitespace-toggle-spacetab-check) "whitespace" "\ +Toggle the check for space-followed-by-TABs in the local buffer. + +\(fn)" t nil) + +(autoload (quote whitespace-toggle-ateol-check) "whitespace" "\ +Toggle the check for end-of-line space in the local buffer. + +\(fn)" t nil) + +(autoload (quote whitespace-buffer) "whitespace" "\ +Find five different types of white spaces in buffer. +These are: +1. Leading space (empty lines at the top of a file). +2. Trailing space (empty lines at the end of a file). +3. Indentation space (8 or more spaces, that should be replaced with TABS). +4. Spaces followed by a TAB. (Almost always, we never want that). +5. Spaces or TABS at the end of a line. + +Check for whitespace only if this buffer really contains a non-empty file +and: +1. the major mode is one of the whitespace-modes, or +2. `whitespace-buffer' was explicitly called with a prefix argument. + +\(fn &optional QUIET)" t nil) + +(autoload (quote whitespace-region) "whitespace" "\ +Check the region for whitespace errors. + +\(fn S E)" t nil) + +(autoload (quote whitespace-cleanup) "whitespace" "\ +Cleanup the five different kinds of whitespace problems. + +Use \\[describe-function] whitespace-describe to read a summary of the +whitespace problems. + +\(fn)" t nil) + +(autoload (quote whitespace-cleanup-region) "whitespace" "\ +Whitespace cleanup on the region. + +\(fn S E)" t nil) + +(defvar whitespace-global-mode nil "\ +Non-nil if Whitespace-Global mode is enabled. +See the command `whitespace-global-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `whitespace-global-mode'.") + +(custom-autoload (quote whitespace-global-mode) "whitespace") + +(autoload (quote whitespace-global-mode) "whitespace" "\ +Toggle using Whitespace mode in new buffers. +With ARG, turn the mode on iff ARG is positive. + +When this mode is active, `whitespace-buffer' is added to +`find-file-hook' and `kill-buffer-hook'. + +\(fn &optional ARG)" t nil) + +(autoload (quote whitespace-write-file-hook) "whitespace" "\ +Hook function to be called on the buffer when whitespace check is enabled. +This is meant to be added buffer-locally to `write-file-functions'. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse +;;;;;; widget-browse-at) "wid-browse" "wid-browse.el" (16211 27022)) +;;; Generated autoloads from wid-browse.el + +(autoload (quote widget-browse-at) "wid-browse" "\ +Browse the widget under point. + +\(fn POS)" t nil) + +(autoload (quote widget-browse) "wid-browse" "\ +Create a widget browser for WIDGET. + +\(fn WIDGET)" t nil) + +(autoload (quote widget-browse-other-window) "wid-browse" "\ +Show widget browser for WIDGET in other window. + +\(fn &optional WIDGET)" t nil) + +(autoload (quote widget-minor-mode) "wid-browse" "\ +Togle minor mode for traversing widgets. +With arg, turn widget mode on if and only if arg is positive. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (widget-setup widget-insert widget-delete widget-create +;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (16284 +;;;;;; 32617)) +;;; Generated autoloads from wid-edit.el + +(autoload (quote widgetp) "wid-edit" "\ +Return non-nil iff WIDGET is a widget. + +\(fn WIDGET)" nil nil) + +(autoload (quote widget-prompt-value) "wid-edit" "\ +Prompt for a value matching WIDGET, using PROMPT. +The current value is assumed to be VALUE, unless UNBOUND is non-nil. + +\(fn WIDGET PROMPT &optional VALUE UNBOUND)" nil nil) + +(autoload (quote widget-create) "wid-edit" "\ +Create widget of TYPE. +The optional ARGS are additional keyword arguments. + +\(fn TYPE &rest ARGS)" nil nil) + +(autoload (quote widget-delete) "wid-edit" "\ +Delete WIDGET. + +\(fn WIDGET)" nil nil) + +(autoload (quote widget-insert) "wid-edit" "\ +Call `insert' with ARGS even if surrounding text is read only. + +\(fn &rest ARGS)" nil nil) + +(defvar widget-keymap (let ((map (make-sparse-keymap))) (define-key map " " (quote widget-forward)) (define-key map [(shift tab)] (quote widget-backward)) (define-key map [backtab] (quote widget-backward)) (define-key map [down-mouse-2] (quote widget-button-click)) (define-key map " " (quote widget-button-press)) map) "\ +Keymap containing useful binding for buffers containing widgets. +Recommended as a parent keymap for modes using widgets.") + +(autoload (quote widget-setup) "wid-edit" "\ +Setup current buffer so editing string widgets works. + +\(fn)" nil nil) + +;;;*** + +;;;### (autoloads (windmove-default-keybindings windmove-down windmove-right +;;;;;; windmove-up windmove-left) "windmove" "windmove.el" (16211 +;;;;;; 27022)) +;;; Generated autoloads from windmove.el + +(autoload (quote windmove-left) "windmove" "\ +Select the window to the left of the current one. +With no prefix argument, or with prefix argument equal to zero, +\"left\" is relative to the position of point in the window; otherwise +it is relative to the top edge (for positive ARG) or the bottom edge +\(for negative ARG) of the current window. +If no window is at the desired location, an error is signaled. + +\(fn &optional ARG)" t nil) + +(autoload (quote windmove-up) "windmove" "\ +Select the window above the current one. +With no prefix argument, or with prefix argument equal to zero, \"up\" +is relative to the position of point in the window; otherwise it is +relative to the left edge (for positive ARG) or the right edge (for +negative ARG) of the current window. +If no window is at the desired location, an error is signaled. + +\(fn &optional ARG)" t nil) + +(autoload (quote windmove-right) "windmove" "\ +Select the window to the right of the current one. +With no prefix argument, or with prefix argument equal to zero, +\"right\" is relative to the position of point in the window; +otherwise it is relative to the top edge (for positive ARG) or the +bottom edge (for negative ARG) of the current window. +If no window is at the desired location, an error is signaled. + +\(fn &optional ARG)" t nil) + +(autoload (quote windmove-down) "windmove" "\ +Select the window below the current one. +With no prefix argument, or with prefix argument equal to zero, +\"down\" is relative to the position of point in the window; otherwise +it is relative to the left edge (for positive ARG) or the right edge +\(for negative ARG) of the current window. +If no window is at the desired location, an error is signaled. + +\(fn &optional ARG)" t nil) + +(autoload (quote windmove-default-keybindings) "windmove" "\ +Set up keybindings for `windmove'. +Keybindings are of the form MODIFIER-{left,right,up,down}. +Default MODIFIER is 'shift. + +\(fn &optional MODIFIER)" t nil) + +;;;*** + +;;;### (autoloads (winner-mode winner-mode) "winner" "winner.el" +;;;;;; (16211 27022)) +;;; Generated autoloads from winner.el + +(defvar winner-mode nil "\ +Toggle winner-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `winner-mode'.") + +(custom-autoload (quote winner-mode) "winner") + +(autoload (quote winner-mode) "winner" "\ +Toggle Winner mode. +With arg, turn Winner mode on if and only if arg is positive. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (woman-find-file woman-dired-find-file woman) "woman" +;;;;;; "woman.el" (16239 4622)) +;;; Generated autoloads from woman.el + +(autoload (quote woman) "woman" "\ +Browse UN*X man page for TOPIC (Without using external Man program). +The major browsing mode used is essentially the standard Man mode. +Choose the filename for the man page using completion, based on the +topic selected from the directories specified in `woman-manpath' and +`woman-path'. The directory expansions and topics are cached for +speed, but a non-nil interactive argument forces the caches to be +updated (e.g. to re-interpret the current directory). + +Used non-interactively, arguments are optional: if given then TOPIC +should be a topic string and non-nil RE-CACHE forces re-caching. + +\(fn &optional TOPIC RE-CACHE)" t nil) + +(autoload (quote woman-dired-find-file) "woman" "\ +In dired, run the WoMan man-page browser on this file. + +\(fn)" t nil) + +(autoload (quote woman-find-file) "woman" "\ +Find, decode and browse a specific UN*X man-page source file FILE-NAME. +Use existing buffer if possible; reformat only if prefix arg given. +When called interactively, optional argument REFORMAT forces reformatting +of an existing WoMan buffer formatted earlier. +No external programs are used, except that `gunzip' will be used to +decompress the file if appropriate. See the documentation for the +`woman' command for further details. + +\(fn FILE-NAME &optional REFORMAT)" t nil) + +;;;*** + +;;;### (autoloads (wordstar-mode) "ws-mode" "emulation/ws-mode.el" +;;;;;; (16211 27027)) +;;; Generated autoloads from emulation/ws-mode.el + +(autoload (quote wordstar-mode) "ws-mode" "\ +Major mode with WordStar-like key bindings. + +BUGS: + - Help menus with WordStar commands (C-j just calls help-for-help) + are not implemented + - Options for search and replace + - Show markers (C-k h) is somewhat strange + - Search and replace (C-q a) is only available in forward direction + +No key bindings beginning with ESC are installed, they will work +Emacs-like. + +The key bindings are: + + C-a backward-word + C-b fill-paragraph + C-c scroll-up-line + C-d forward-char + C-e previous-line + C-f forward-word + C-g delete-char + C-h backward-char + C-i indent-for-tab-command + C-j help-for-help + C-k ordstar-C-k-map + C-l ws-repeat-search + C-n open-line + C-p quoted-insert + C-r scroll-down-line + C-s backward-char + C-t kill-word + C-u keyboard-quit + C-v overwrite-mode + C-w scroll-down + C-x next-line + C-y kill-complete-line + C-z scroll-up + + C-k 0 ws-set-marker-0 + C-k 1 ws-set-marker-1 + C-k 2 ws-set-marker-2 + C-k 3 ws-set-marker-3 + C-k 4 ws-set-marker-4 + C-k 5 ws-set-marker-5 + C-k 6 ws-set-marker-6 + C-k 7 ws-set-marker-7 + C-k 8 ws-set-marker-8 + C-k 9 ws-set-marker-9 + C-k b ws-begin-block + C-k c ws-copy-block + C-k d save-buffers-kill-emacs + C-k f find-file + C-k h ws-show-markers + C-k i ws-indent-block + C-k k ws-end-block + C-k p ws-print-block + C-k q kill-emacs + C-k r insert-file + C-k s save-some-buffers + C-k t ws-mark-word + C-k u ws-exdent-block + C-k C-u keyboard-quit + C-k v ws-move-block + C-k w ws-write-block + C-k x kill-emacs + C-k y ws-delete-block + + C-o c wordstar-center-line + C-o b switch-to-buffer + C-o j justify-current-line + C-o k kill-buffer + C-o l list-buffers + C-o m auto-fill-mode + C-o r set-fill-column + C-o C-u keyboard-quit + C-o wd delete-other-windows + C-o wh split-window-horizontally + C-o wo other-window + C-o wv split-window-vertically + + C-q 0 ws-find-marker-0 + C-q 1 ws-find-marker-1 + C-q 2 ws-find-marker-2 + C-q 3 ws-find-marker-3 + C-q 4 ws-find-marker-4 + C-q 5 ws-find-marker-5 + C-q 6 ws-find-marker-6 + C-q 7 ws-find-marker-7 + C-q 8 ws-find-marker-8 + C-q 9 ws-find-marker-9 + C-q a ws-query-replace + C-q b ws-to-block-begin + C-q c end-of-buffer + C-q d end-of-line + C-q f ws-search + C-q k ws-to-block-end + C-q l ws-undo + C-q p ws-last-cursorp + C-q r beginning-of-buffer + C-q C-u keyboard-quit + C-q w ws-last-error + C-q y ws-kill-eol + C-q DEL ws-kill-bol + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (xml-parse-region xml-parse-file) "xml" "xml.el" +;;;;;; (16301 42974)) +;;; Generated autoloads from xml.el + +(autoload (quote xml-parse-file) "xml" "\ +Parse the well-formed XML file FILE. +If FILE is already visited, use its buffer and don't kill it. +Returns the top node with all its children. +If PARSE-DTD is non-nil, the DTD is parsed rather than skipped. +If PARSE-NS is non-nil, then QNAMES are expanded. + +\(fn FILE &optional PARSE-DTD PARSE-NS)" nil nil) + +(autoload (quote xml-parse-region) "xml" "\ +Parse the region from BEG to END in BUFFER. +If BUFFER is nil, it defaults to the current buffer. +Returns the XML list for the region, or raises an error if the region +is not well-formed XML. +If PARSE-DTD is non-nil, the DTD is parsed rather than skipped, +and returned as the first element of the list. +If PARSE-NS is non-nil, then QNAMES are expanded. + +\(fn BEG END &optional BUFFER PARSE-DTD PARSE-NS)" nil nil) + +;;;*** + +;;;### (autoloads (xterm-mouse-mode) "xt-mouse" "xt-mouse.el" (16211 +;;;;;; 27022)) +;;; Generated autoloads from xt-mouse.el + +(defvar xterm-mouse-mode nil "\ +Non-nil if Xterm-Mouse mode is enabled. +See the command `xterm-mouse-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `xterm-mouse-mode'.") + +(custom-autoload (quote xterm-mouse-mode) "xt-mouse") + +(autoload (quote xterm-mouse-mode) "xt-mouse" "\ +Toggle XTerm mouse mode. +With prefix arg, turn XTerm mouse mode on iff arg is positive. + +Turn it on to use emacs mouse commands, and off to use xterm mouse commands. + +\(fn &optional ARG)" t nil) + +;;;*** + +;;;### (autoloads (psychoanalyze-pinhead apropos-zippy insert-zippyism +;;;;;; yow) "yow" "play/yow.el" (16211 27038)) +;;; Generated autoloads from play/yow.el + +(autoload (quote yow) "yow" "\ +Return or display a random Zippy quotation. With prefix arg, insert it. + +\(fn &optional INSERT DISPLAY)" t nil) + +(autoload (quote insert-zippyism) "yow" "\ +Prompt with completion for a known Zippy quotation, and insert it at point. + +\(fn &optional ZIPPYISM)" t nil) + +(autoload (quote apropos-zippy) "yow" "\ +Return a list of all Zippy quotes matching REGEXP. +If called interactively, display a list of matches. + +\(fn REGEXP)" t nil) + +(autoload (quote psychoanalyze-pinhead) "yow" "\ +Zippy goes to the analyst. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (zone) "zone" "play/zone.el" (16211 27038)) +;;; Generated autoloads from play/zone.el + +(autoload (quote zone) "zone" "\ +Zone out, completely. + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads (zone-mode zone-mode-update-serial-hook) "zone-mode" +;;;;;; "net/zone-mode.el" (16211 27037)) +;;; Generated autoloads from net/zone-mode.el + +(autoload (quote zone-mode-update-serial-hook) "zone-mode" "\ +Update the serial number in a zone if the file was modified. + +\(fn)" t nil) + +(autoload (quote zone-mode) "zone-mode" "\ +A mode for editing DNS zone files. + +Zone-mode does two things: + + - automatically update the serial number for a zone + when saving the file + + - fontification + +\(fn)" t nil) + +;;;*** + +;;;### (autoloads nil nil ("abbrev.el" "abbrevlist.el" "bindings.el" +;;;;;; "buff-menu.el" "calc/calc-aent.el" "calc/calc-alg.el" "calc/calc-arith.el" +;;;;;; "calc/calc-bin.el" "calc/calc-comb.el" "calc/calc-cplx.el" +;;;;;; "calc/calc-embed.el" "calc/calc-fin.el" "calc/calc-forms.el" +;;;;;; "calc/calc-frac.el" "calc/calc-funcs.el" "calc/calc-graph.el" +;;;;;; "calc/calc-help.el" "calc/calc-incom.el" "calc/calc-keypd.el" +;;;;;; "calc/calc-lang.el" "calc/calc-macs.el" "calc/calc-maint.el" +;;;;;; "calc/calc-map.el" "calc/calc-math.el" "calc/calc-misc.el" +;;;;;; "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-poly.el" +;;;;;; "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el" +;;;;;; "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el" +;;;;;; "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-undo.el" +;;;;;; "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el" +;;;;;; "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el" +;;;;;; "calc/calcsel2.el" "calendar/cal-china.el" "calendar/cal-coptic.el" +;;;;;; "calendar/cal-french.el" "calendar/cal-islam.el" "calendar/cal-iso.el" +;;;;;; "calendar/cal-julian.el" "calendar/cal-mayan.el" "calendar/cal-menu.el" +;;;;;; "calendar/cal-move.el" "calendar/cal-persia.el" "calendar/cal-tex.el" +;;;;;; "calendar/cal-x.el" "case-table.el" "cdl.el" "cus-dep.el" +;;;;;; "cus-load.el" "cus-start.el" "custom.el" "dos-fns.el" "dos-vars.el" +;;;;;; "dos-w32.el" "ediff-diff.el" "ediff-init.el" "ediff-merg.el" +;;;;;; "ediff-ptch.el" "ediff-vers.el" "ediff-wind.el" "electric.el" +;;;;;; "emacs-lisp/assoc.el" "emacs-lisp/authors.el" "emacs-lisp/bindat.el" +;;;;;; "emacs-lisp/byte-opt.el" "emacs-lisp/byte-run.el" "emacs-lisp/cl-compat.el" +;;;;;; "emacs-lisp/cl-extra.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" +;;;;;; "emacs-lisp/cl-specs.el" "emacs-lisp/cust-print.el" "emacs-lisp/ewoc.el" +;;;;;; "emacs-lisp/find-gc.el" "emacs-lisp/float-sup.el" "emacs-lisp/gulp.el" +;;;;;; "emacs-lisp/levents.el" "emacs-lisp/lisp-mnt.el" "emacs-lisp/lisp-mode.el" +;;;;;; "emacs-lisp/lisp.el" "emacs-lisp/lmenu.el" "emacs-lisp/lselect.el" +;;;;;; "emacs-lisp/lucid.el" "emacs-lisp/map-ynp.el" "emacs-lisp/regi.el" +;;;;;; "emacs-lisp/sregex.el" "emacs-lisp/testcover-ses.el" "emacs-lisp/testcover-unsafep.el" +;;;;;; "emacs-lock.el" "emulation/cua-gmrk.el" "emulation/cua-rect.el" +;;;;;; "emulation/edt-lk201.el" "emulation/edt-mapper.el" "emulation/edt-pc.el" +;;;;;; "emulation/edt-vt100.el" "emulation/tpu-mapper.el" "emulation/viper-cmd.el" +;;;;;; "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el" +;;;;;; "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el" +;;;;;; "env.el" "eshell/em-alias.el" "eshell/em-banner.el" "eshell/em-basic.el" +;;;;;; "eshell/em-cmpl.el" "eshell/em-dirs.el" "eshell/em-glob.el" +;;;;;; "eshell/em-hist.el" "eshell/em-ls.el" "eshell/em-pred.el" +;;;;;; "eshell/em-prompt.el" "eshell/em-rebind.el" "eshell/em-script.el" +;;;;;; "eshell/em-smart.el" "eshell/em-term.el" "eshell/em-unix.el" +;;;;;; "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el" +;;;;;; "eshell/esh-ext.el" "eshell/esh-groups.el" "eshell/esh-io.el" +;;;;;; "eshell/esh-maint.el" "eshell/esh-module.el" "eshell/esh-opt.el" +;;;;;; "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el" +;;;;;; "faces.el" "files.el" "filesets.el" "finder-inf.el" "foldout.el" +;;;;;; "font-core.el" "format.el" "forms-d2.el" "forms-pass.el" +;;;;;; "frame.el" "generic-x.el" "gnus/flow-fill.el" "gnus/format-spec.el" +;;;;;; "gnus/gnus-async.el" "gnus/gnus-bcklg.el" "gnus/gnus-cite.el" +;;;;;; "gnus/gnus-cus.el" "gnus/gnus-demon.el" "gnus/gnus-draft.el" +;;;;;; "gnus/gnus-dup.el" "gnus/gnus-eform.el" "gnus/gnus-ems.el" +;;;;;; "gnus/gnus-gl.el" "gnus/gnus-int.el" "gnus/gnus-logic.el" +;;;;;; "gnus/gnus-mh.el" "gnus/gnus-nocem.el" "gnus/gnus-range.el" +;;;;;; "gnus/gnus-salt.el" "gnus/gnus-score.el" "gnus/gnus-setup.el" +;;;;;; "gnus/gnus-srvr.el" "gnus/gnus-sum.el" "gnus/gnus-topic.el" +;;;;;; "gnus/gnus-undo.el" "gnus/gnus-util.el" "gnus/gnus-uu.el" +;;;;;; "gnus/gnus-vm.el" "gnus/ietf-drums.el" "gnus/imap.el" "gnus/mail-parse.el" +;;;;;; "gnus/mail-prsvr.el" "gnus/mail-source.el" "gnus/mailcap.el" +;;;;;; "gnus/messcompat.el" "gnus/mm-bodies.el" "gnus/mm-decode.el" +;;;;;; "gnus/mm-encode.el" "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml.el" +;;;;;; "gnus/nnagent.el" "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el" +;;;;;; "gnus/nneething.el" "gnus/nngateway.el" "gnus/nnheader.el" +;;;;;; "gnus/nnimap.el" "gnus/nnlistserv.el" "gnus/nnmail.el" "gnus/nnmbox.el" +;;;;;; "gnus/nnmh.el" "gnus/nnoo.el" "gnus/nnslashdot.el" "gnus/nnspool.el" +;;;;;; "gnus/nntp.el" "gnus/nnultimate.el" "gnus/nnvirtual.el" "gnus/nnwarchive.el" +;;;;;; "gnus/nnweb.el" "gnus/pop3.el" "gnus/qp.el" "gnus/rfc1843.el" +;;;;;; "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2104.el" "gnus/rfc2231.el" +;;;;;; "gnus/starttls.el" "gnus/utf7.el" "gnus/webmail.el" "help.el" +;;;;;; "indent.el" "international/characters.el" "international/fontset.el" +;;;;;; "international/iso-ascii.el" "international/iso-insert.el" +;;;;;; "international/iso-swed.el" "international/ja-dic-cnv.el" +;;;;;; "international/ja-dic-utl.el" "international/latin-1.el" +;;;;;; "international/latin-2.el" "international/latin-3.el" "international/latin-4.el" +;;;;;; "international/latin-5.el" "international/latin-8.el" "international/latin-9.el" +;;;;;; "international/mule-cmds.el" "international/mule-conf.el" +;;;;;; "international/mule.el" "international/ogonek.el" "international/subst-big5.el" +;;;;;; "international/subst-gb2312.el" "international/subst-jis.el" +;;;;;; "international/subst-ksc.el" "international/swedish.el" "international/ucs-tables.el" +;;;;;; "international/utf-16.el" "international/utf-7.el" "international/utf-8.el" +;;;;;; "isearch.el" "kermit.el" "language/chinese.el" "language/cyrillic.el" +;;;;;; "language/czech.el" "language/devanagari.el" "language/english.el" +;;;;;; "language/ethiopic.el" "language/european.el" "language/georgian.el" +;;;;;; "language/greek.el" "language/hebrew.el" "language/indian.el" +;;;;;; "language/japanese.el" "language/kannada.el" "language/korean.el" +;;;;;; "language/lao.el" "language/malayalam.el" "language/misc-lang.el" +;;;;;; "language/romanian.el" "language/slovak.el" "language/tamil.el" +;;;;;; "language/thai.el" "language/tibetan.el" "language/utf-8-lang.el" +;;;;;; "language/vietnamese.el" "ldefs-boot.el" "loadup.el" "mail/blessmail.el" +;;;;;; "mail/mailheader.el" "mail/mailpost.el" "mail/mspools.el" +;;;;;; "mail/rfc2368.el" "mail/rfc822.el" "mail/rmail-spam-filter.el" +;;;;;; "mail/uce.el" "mail/vms-pmail.el" "mh-e/mh-alias.el" "mh-e/mh-customize.el" +;;;;;; "mh-e/mh-funcs.el" "mh-e/mh-identity.el" "mh-e/mh-inc.el" +;;;;;; "mh-e/mh-index.el" "mh-e/mh-junk.el" "mh-e/mh-loaddefs.el" +;;;;;; "mh-e/mh-mime.el" "mh-e/mh-pick.el" "mh-e/mh-seq.el" "mh-e/mh-speed.el" +;;;;;; "mh-e/mh-xemacs-compat.el" "mh-e/mh-xemacs-icons.el" "misc.el" +;;;;;; "mouse-copy.el" "mouse-drag.el" "mouse.el" "net/eudc-vars.el" +;;;;;; "net/eudcb-bbdb.el" "net/eudcb-ldap.el" "net/eudcb-ph.el" +;;;;;; "net/ldap.el" "net/netrc.el" "net/tls.el" "net/tramp-ftp.el" +;;;;;; "net/tramp-smb.el" "net/tramp-util.el" "net/tramp-uu.el" +;;;;;; "net/tramp-vc.el" "net/trampver.el" "obsolete/awk-mode.el" +;;;;;; "obsolete/float.el" "obsolete/hilit19.el" "obsolete/mlsupport.el" +;;;;;; "obsolete/ooutline.el" "obsolete/profile.el" "obsolete/rnews.el" +;;;;;; "obsolete/sc.el" "obsolete/sun-curs.el" "obsolete/sun-fns.el" +;;;;;; "obsolete/uncompress.el" "obsolete/x-apollo.el" "obsolete/x-menu.el" +;;;;;; "patcomp.el" "paths.el" "pcvs-info.el" "pcvs-parse.el" "pcvs-util.el" +;;;;;; "play/gamegrid.el" "play/gametree.el" "play/meese.el" "progmodes/ada-prj.el" +;;;;;; "progmodes/cc-align.el" "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el" +;;;;;; "progmodes/cc-cmds.el" "progmodes/cc-compat.el" "progmodes/cc-defs.el" +;;;;;; "progmodes/cc-engine.el" "progmodes/cc-fonts.el" "progmodes/cc-langs.el" +;;;;;; "progmodes/cc-menus.el" "progmodes/cc-vars.el" "progmodes/ebnf-bnf.el" +;;;;;; "progmodes/ebnf-iso.el" "progmodes/ebnf-otz.el" "progmodes/ebnf-yac.el" +;;;;;; "progmodes/idlw-rinfo.el" "progmodes/idlw-toolbar.el" "progmodes/mantemp.el" +;;;;;; "progmodes/xscheme.el" "register.el" "replace.el" "s-region.el" +;;;;;; "saveplace.el" "scroll-bar.el" "select.el" "simple.el" "soundex.el" +;;;;;; "startup.el" "subdirs.el" "subr.el" "tempo.el" "term/AT386.el" +;;;;;; "term/apollo.el" "term/bg-mouse.el" "term/bobcat.el" "term/internal.el" +;;;;;; "term/iris-ansi.el" "term/keyswap.el" "term/linux.el" "term/lk201.el" +;;;;;; "term/mac-win.el" "term/news.el" "term/pc-win.el" "term/rxvt.el" +;;;;;; "term/sun-mouse.el" "term/sun.el" "term/sup-mouse.el" "term/tty-colors.el" +;;;;;; "term/tvi970.el" "term/vt100.el" "term/vt102.el" "term/vt125.el" +;;;;;; "term/vt200.el" "term/vt201.el" "term/vt220.el" "term/vt240.el" +;;;;;; "term/vt300.el" "term/vt320.el" "term/vt400.el" "term/vt420.el" +;;;;;; "term/w32-win.el" "term/wyse50.el" "term/x-win.el" "term/xterm.el" +;;;;;; "textmodes/bib-mode.el" "textmodes/fill.el" "textmodes/makeinfo.el" +;;;;;; "textmodes/page-ext.el" "textmodes/page.el" "textmodes/paragraphs.el" +;;;;;; "textmodes/refbib.el" "textmodes/refer.el" "textmodes/reftex-auc.el" +;;;;;; "textmodes/reftex-dcr.el" "textmodes/reftex-global.el" "textmodes/reftex-ref.el" +;;;;;; "textmodes/reftex-sel.el" "textmodes/reftex-toc.el" "textmodes/reftex-vars.el" +;;;;;; "textmodes/texnfo-upd.el" "textmodes/text-mode.el" "timezone.el" +;;;;;; "uniquify.el" "vc-hooks.el" "vcursor.el" "version.el" "vms-patch.el" +;;;;;; "vmsproc.el" "vt-control.el" "vt100-led.el" "w32-fns.el" +;;;;;; "w32-vars.el" "widget.el" "window.el") (16313 5919 739767)) + +;;;*** + +;;; Local Variables: +;;; version-control: never +;;; no-byte-compile: t +;;; no-update-autoloads: t +;;; End: +;;; loaddefs.el ends here diff --git a/lisp/ledit.el b/lisp/ledit.el index 0094d515de..8568740fd0 100644 --- a/lisp/ledit.el +++ b/lisp/ledit.el @@ -156,4 +156,5 @@ do (setq lisp-mode-hook 'ledit-from-lisp-mode)" (provide 'ledit) +;;; arch-tag: f0f1ca13-8d31-478c-ae1b-b448c55a8faf ;;; ledit.el ends here diff --git a/lisp/loaddefs.el b/lisp/loaddefs.el index 305dd8ffd6..5e02ac5c59 100644 --- a/lisp/loaddefs.el +++ b/lisp/loaddefs.el @@ -4,7 +4,7 @@ ;;;### (autoloads (5x5-crack 5x5-crack-xor-mutate 5x5-crack-mutating-best ;;;;;; 5x5-crack-mutating-current 5x5-crack-randomly 5x5) "5x5" -;;;;;; "play/5x5.el" (15941 42963)) +;;;;;; "play/5x5.el" (16511 32591)) ;;; Generated autoloads from play/5x5.el (autoload (quote 5x5) "5x5" "\ @@ -64,7 +64,7 @@ should return a grid vector array that is the new solution. ;;;*** ;;;### (autoloads (ada-mode ada-add-extensions) "ada-mode" "progmodes/ada-mode.el" -;;;;;; (16070 35808)) +;;;;;; (16511 35592)) ;;; Generated autoloads from progmodes/ada-mode.el (autoload (quote ada-add-extensions) "ada-mode" "\ @@ -78,7 +78,6 @@ name (autoload (quote ada-mode) "ada-mode" "\ Ada mode is the major mode for editing Ada code. -This version was built on $Date: 2003/05/13 20:48:15 $. Bindings are as follows: (Note: 'LFD' is control-j.) \\{ada-mode-map} @@ -126,7 +125,7 @@ If you use ada-xref.el: ;;;*** ;;;### (autoloads (ada-header) "ada-stmt" "progmodes/ada-stmt.el" -;;;;;; (16055 8591)) +;;;;;; (16511 35617)) ;;; Generated autoloads from progmodes/ada-stmt.el (autoload (quote ada-header) "ada-stmt" "\ @@ -137,7 +136,7 @@ Insert a descriptive header at the top of the file. ;;;*** ;;;### (autoloads (ada-find-file) "ada-xref" "progmodes/ada-xref.el" -;;;;;; (16070 35808)) +;;;;;; (16511 32597)) ;;; Generated autoloads from progmodes/ada-xref.el (autoload (quote ada-find-file) "ada-xref" "\ @@ -152,7 +151,7 @@ Completion is available. ;;;;;; change-log-mode add-change-log-entry-other-window add-change-log-entry ;;;;;; find-change-log prompt-for-change-log-name add-log-mailing-address ;;;;;; add-log-full-name add-log-current-defun-function) "add-log" -;;;;;; "add-log.el" (16111 41824)) +;;;;;; "add-log.el" (16511 32420)) ;;; Generated autoloads from add-log.el (defvar add-log-current-defun-function nil "\ @@ -289,8 +288,8 @@ Fix any old-style date entries in the current log file to default format. ;;;*** ;;;### (autoloads (defadvice ad-add-advice ad-default-compilation-action -;;;;;; ad-redefinition-action) "advice" "emacs-lisp/advice.el" (16066 -;;;;;; 53440)) +;;;;;; ad-redefinition-action) "advice" "emacs-lisp/advice.el" (16511 +;;;;;; 32533)) ;;; Generated autoloads from emacs-lisp/advice.el (defvar ad-redefinition-action (quote warn) "\ @@ -389,7 +388,7 @@ See Info node `(elisp)Advising Functions' for comprehensive documentation. ;;;### (autoloads (align-newline-and-indent align-unhighlight-rule ;;;;;; align-highlight-rule align-current align-entire align-regexp -;;;;;; align) "align" "align.el" (16111 41824)) +;;;;;; align) "align" "align.el" (16511 32421)) ;;; Generated autoloads from align.el (autoload (quote align) "align" "\ @@ -478,7 +477,7 @@ A replacement function for `newline-and-indent', aligning as it goes. ;;;*** -;;;### (autoloads (allout-init) "allout" "allout.el" (16066 53439)) +;;;### (autoloads (allout-init) "allout" "allout.el" (16511 36149)) ;;; Generated autoloads from allout.el (autoload (quote allout-init) "allout" "\ @@ -514,7 +513,7 @@ the following two lines in your emacs init file: ;;;*** ;;;### (autoloads (ange-ftp-hook-function ange-ftp-reread-dir) "ange-ftp" -;;;;;; "net/ange-ftp.el" (16139 21086)) +;;;;;; "net/ange-ftp.el" (16511 32584)) ;;; Generated autoloads from net/ange-ftp.el (defalias (quote ange-ftp-re-read-dir) (quote ange-ftp-reread-dir)) @@ -538,7 +537,7 @@ Not documented ;;;*** ;;;### (autoloads (animate-birthday-present animate-sequence animate-string) -;;;;;; "animate" "play/animate.el" (15941 42963)) +;;;;;; "animate" "play/animate.el" (16511 32591)) ;;; Generated autoloads from play/animate.el (autoload (quote animate-string) "animate" "\ @@ -558,14 +557,15 @@ Strings will be separated from each other by SPACE lines. \(fn LIST-OF-STRINGS SPACE)" nil nil) (autoload (quote animate-birthday-present) "animate" "\ -Display Sarah's birthday present in a new buffer. +Display one's birthday present in a new buffer. +You can specify the one's name by NAME; the default value is \"Sarah\". -\(fn)" t nil) +\(fn &optional NAME)" t nil) ;;;*** ;;;### (autoloads (ansi-color-process-output ansi-color-for-comint-mode-on) -;;;;;; "ansi-color" "ansi-color.el" (16111 41824)) +;;;;;; "ansi-color" "ansi-color.el" (16511 32422)) ;;; Generated autoloads from ansi-color.el (autoload (quote ansi-color-for-comint-mode-on) "ansi-color" "\ @@ -591,7 +591,7 @@ This is a good function to put in `comint-output-filter-functions'. ;;;*** ;;;### (autoloads (antlr-set-tabs antlr-mode antlr-show-makefile-rules) -;;;;;; "antlr-mode" "progmodes/antlr-mode.el" (15941 42963)) +;;;;;; "antlr-mode" "progmodes/antlr-mode.el" (16511 32598)) ;;; Generated autoloads from progmodes/antlr-mode.el (autoload (quote antlr-show-makefile-rules) "antlr-mode" "\ @@ -627,16 +627,16 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'. ;;;*** -;;;### (autoloads (appt-make-list appt-delete appt-add appt-display-diary -;;;;;; appt-display-duration appt-msg-window appt-display-mode-line -;;;;;; appt-visible appt-audible appt-message-warning-time appt-issue-message) -;;;;;; "appt" "calendar/appt.el" (15941 42957)) +;;;### (autoloads (appt-activate appt-make-list appt-delete appt-add +;;;;;; appt-display-diary appt-display-duration appt-display-mode-line +;;;;;; appt-msg-window appt-visible appt-audible appt-message-warning-time +;;;;;; appt-issue-message) "appt" "calendar/appt.el" (16511 32527)) ;;; Generated autoloads from calendar/appt.el (defvar appt-issue-message t "\ *Non-nil means check for appointments in the diary buffer. -To be detected, the diary entry must have the time -as the first thing on a line.") +To be detected, the diary entry must have the format described in the +documentation of the function `appt-check'.") (custom-autoload (quote appt-issue-message) "appt") @@ -651,27 +651,31 @@ as the first thing on a line.") (custom-autoload (quote appt-audible) "appt") (defvar appt-visible t "\ -*Non-nil means display appointment message in echo area.") +*Non-nil means display appointment message in echo area. +This variable is only relevant if `appt-msg-window' is nil.") (custom-autoload (quote appt-visible) "appt") -(defvar appt-display-mode-line t "\ -*Non-nil means display minutes to appointment and time on the mode line.") - -(custom-autoload (quote appt-display-mode-line) "appt") - (defvar appt-msg-window t "\ -*Non-nil means display appointment message in another window.") +*Non-nil means display appointment message in another window. +If non-nil, this variable overrides `appt-visible'.") (custom-autoload (quote appt-msg-window) "appt") +(defvar appt-display-mode-line t "\ +*Non-nil means display minutes to appointment and time on the mode line. +This is in addition to any other display of appointment messages.") + +(custom-autoload (quote appt-display-mode-line) "appt") + (defvar appt-display-duration 10 "\ -*The number of seconds an appointment message is displayed.") +*The number of seconds an appointment message is displayed. +Only relevant if reminders are to be displayed in their own window.") (custom-autoload (quote appt-display-duration) "appt") (defvar appt-display-diary t "\ -*Non-nil means to display the next days diary on the screen. +*Non-nil displays the diary when the appointment list is first initialized. This will occur at midnight when the appointment list is updated.") (custom-autoload (quote appt-display-diary) "appt") @@ -688,33 +692,29 @@ Delete an appointment from the list of appointments. \(fn)" t nil) (autoload (quote appt-make-list) "appt" "\ -Create the appointments list from todays diary buffer. +Create the appointments list from today's diary buffer. The time must be at the beginning of a line for it to be -put in the appointments list. - 02/23/89 - 12:00pm lunch - Wednesday - 10:00am group meeting -We assume that the variables DATE and NUMBER -hold the arguments that `list-diary-entries' received. +put in the appointments list (see examples in documentation of +the function `appt-check'). We assume that the variables DATE and +NUMBER hold the arguments that `list-diary-entries' received. They specify the range of dates that the diary is being processed for. \(fn)" nil nil) +(autoload (quote appt-activate) "appt" "\ +Toggle checking of appointments. +With optional numeric argument ARG, turn appointment checking on if +ARG is positive, otherwise off. + +\(fn &optional ARG)" t nil) + ;;;*** ;;;### (autoloads (apropos-documentation apropos-value apropos apropos-documentation-property -;;;;;; apropos-command apropos-variable apropos-mode) "apropos" -;;;;;; "apropos.el" (16174 61084)) +;;;;;; apropos-command apropos-variable) "apropos" "apropos.el" +;;;;;; (16511 32422)) ;;; Generated autoloads from apropos.el -(autoload (quote apropos-mode) "apropos" "\ -Major mode for following hyperlinks in output of apropos commands. - -\\{apropos-mode-map} - -\(fn)" t nil) - (autoload (quote apropos-variable) "apropos" "\ Show user variables that match REGEXP. With optional prefix DO-ALL or if `apropos-do-all' is non-nil, also show @@ -766,8 +766,8 @@ Returns list of symbols and documentation found. ;;;*** -;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (16205 -;;;;;; 24895)) +;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (16511 +;;;;;; 32423)) ;;; Generated autoloads from arc-mode.el (autoload (quote archive-mode) "arc-mode" "\ @@ -787,7 +787,7 @@ archive. ;;;*** -;;;### (autoloads (array-mode) "array" "array.el" (15941 42951)) +;;;### (autoloads (array-mode) "array" "array.el" (16511 32423)) ;;; Generated autoloads from array.el (autoload (quote array-mode) "array" "\ @@ -858,8 +858,8 @@ Entering array mode calls the function `array-mode-hook'. ;;;*** -;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (16162 -;;;;;; 11943)) +;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (16511 +;;;;;; 32636)) ;;; Generated autoloads from textmodes/artist.el (autoload (quote artist-mode) "artist" "\ @@ -1064,8 +1064,8 @@ Keymap summary ;;;*** -;;;### (autoloads (asm-mode) "asm-mode" "progmodes/asm-mode.el" (16131 -;;;;;; 19792)) +;;;### (autoloads (asm-mode) "asm-mode" "progmodes/asm-mode.el" (16511 +;;;;;; 32602)) ;;; Generated autoloads from progmodes/asm-mode.el (autoload (quote asm-mode) "asm-mode" "\ @@ -1093,7 +1093,7 @@ Special commands: ;;;*** ;;;### (autoloads (auto-show-mode auto-show-mode) "auto-show" "obsolete/auto-show.el" -;;;;;; (15941 42963)) +;;;;;; (16511 32589)) ;;; Generated autoloads from obsolete/auto-show.el (defvar auto-show-mode nil "\ @@ -1109,7 +1109,7 @@ This command is obsolete. ;;;*** ;;;### (autoloads (autoarg-kp-mode autoarg-mode) "autoarg" "autoarg.el" -;;;;;; (15856 53268)) +;;;;;; (16511 32423)) ;;; Generated autoloads from autoarg.el (defvar autoarg-mode nil "\ @@ -1164,7 +1164,7 @@ This is similar to \\[autoarg-mode] but rebinds the keypad keys `kp-1' ;;;*** ;;;### (autoloads (autoconf-mode) "autoconf" "progmodes/autoconf.el" -;;;;;; (16070 35808)) +;;;;;; (16511 35631)) ;;; Generated autoloads from progmodes/autoconf.el (autoload (quote autoconf-mode) "autoconf" "\ @@ -1175,7 +1175,7 @@ Major mode for editing Autoconf configure.in files. ;;;*** ;;;### (autoloads (auto-insert-mode define-auto-insert auto-insert) -;;;;;; "autoinsert" "autoinsert.el" (15941 42951)) +;;;;;; "autoinsert" "autoinsert.el" (16511 32423)) ;;; Generated autoloads from autoinsert.el (autoload (quote auto-insert) "autoinsert" "\ @@ -1213,7 +1213,7 @@ insert a template for the file depending on the mode of the buffer. ;;;### (autoloads (batch-update-autoloads update-directory-autoloads ;;;;;; update-file-autoloads) "autoload" "emacs-lisp/autoload.el" -;;;;;; (16072 11522)) +;;;;;; (16511 32533)) ;;; Generated autoloads from emacs-lisp/autoload.el (autoload (quote update-file-autoloads) "autoload" "\ @@ -1244,7 +1244,7 @@ Calls `update-directory-autoloads' on the command line arguments. ;;;*** ;;;### (autoloads (global-auto-revert-mode turn-on-auto-revert-mode -;;;;;; auto-revert-mode) "autorevert" "autorevert.el" (15538 43199)) +;;;;;; auto-revert-mode) "autorevert" "autorevert.el" (16511 32423)) ;;; Generated autoloads from autorevert.el (defvar auto-revert-mode nil "\ @@ -1277,7 +1277,7 @@ use either \\[customize] or the function `global-auto-revert-mode'.") (custom-autoload (quote global-auto-revert-mode) "autorevert") (autoload (quote global-auto-revert-mode) "autorevert" "\ -Revert any buffer when file on disk change. +Revert any buffer when file on disk changes. With arg, turn Auto Revert mode on globally if and only if arg is positive. This is a minor mode that affects all buffers. @@ -1288,7 +1288,7 @@ Use `auto-revert-mode' to revert a particular buffer. ;;;*** ;;;### (autoloads (mouse-avoidance-mode mouse-avoidance-mode) "avoid" -;;;;;; "avoid.el" (15198 32214)) +;;;;;; "avoid.el" (16511 32423)) ;;; Generated autoloads from avoid.el (defvar mouse-avoidance-mode nil "\ @@ -1329,7 +1329,7 @@ definition of \"random distance\".) ;;;*** ;;;### (autoloads (backquote) "backquote" "emacs-lisp/backquote.el" -;;;;;; (15941 42958)) +;;;;;; (16511 32533)) ;;; Generated autoloads from emacs-lisp/backquote.el (autoload (quote backquote) "backquote" "\ @@ -1354,7 +1354,7 @@ Vectors work just like lists. Nested backquotes are permitted. ;;;*** ;;;### (autoloads (display-battery battery) "battery" "battery.el" -;;;;;; (15380 36786)) +;;;;;; (16511 32423)) ;;; Generated autoloads from battery.el (autoload (quote battery) "battery" "\ @@ -1376,7 +1376,7 @@ seconds. ;;;*** ;;;### (autoloads (benchmark benchmark-run-compiled benchmark-run) -;;;;;; "benchmark" "emacs-lisp/benchmark.el" (15934 33472)) +;;;;;; "benchmark" "emacs-lisp/benchmark.el" (16511 32533)) ;;; Generated autoloads from emacs-lisp/benchmark.el (autoload (quote benchmark-run) "benchmark" "\ @@ -1408,8 +1408,8 @@ non-interactive use see also `benchmark-run' and ;;;*** -;;;### (autoloads (bibtex-mode) "bibtex" "textmodes/bibtex.el" (16136 -;;;;;; 53059)) +;;;### (autoloads (bibtex-mode) "bibtex" "textmodes/bibtex.el" (16511 +;;;;;; 32637)) ;;; Generated autoloads from textmodes/bibtex.el (autoload (quote bibtex-mode) "bibtex" "\ @@ -1505,15 +1505,15 @@ non-nil. ;;;*** -;;;### (autoloads nil "binhex" "gnus/binhex.el" (15856 53273)) +;;;### (autoloads nil "binhex" "gnus/binhex.el" (16464 65072)) ;;; Generated autoloads from gnus/binhex.el (defconst binhex-begin-line "^:...............................................................$") ;;;*** -;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (15941 -;;;;;; 42963)) +;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (16511 +;;;;;; 32591)) ;;; Generated autoloads from play/blackbox.el (autoload (quote blackbox) "blackbox" "\ @@ -1632,12 +1632,10 @@ a reflection. ;;;*** -;;;### (autoloads (bookmark-menu-delete bookmark-menu-rename bookmark-menu-locate -;;;;;; bookmark-menu-jump bookmark-menu-insert bookmark-bmenu-list -;;;;;; bookmark-load bookmark-save bookmark-write bookmark-delete -;;;;;; bookmark-insert bookmark-rename bookmark-insert-location -;;;;;; bookmark-relocate bookmark-jump bookmark-set) "bookmark" -;;;;;; "bookmark.el" (16174 61084)) +;;;### (autoloads (bookmark-bmenu-list bookmark-load bookmark-save +;;;;;; bookmark-write bookmark-delete bookmark-insert bookmark-rename +;;;;;; bookmark-insert-location bookmark-relocate bookmark-jump +;;;;;; bookmark-set) "bookmark" "bookmark.el" (16511 32424)) ;;; Generated autoloads from bookmark.el (define-key ctl-x-map "rb" 'bookmark-jump) (define-key ctl-x-map "rm" 'bookmark-set) @@ -1812,97 +1810,9 @@ deletion, or > if it is flagged for displaying. (defalias (quote edit-bookmarks) (quote bookmark-bmenu-list)) -(autoload (quote bookmark-menu-insert) "bookmark" "\ -Insert the text of the file pointed to by bookmark BOOKMARK. -You may have a problem using this function if the value of variable -`bookmark-alist' is nil. If that happens, you need to load in some -bookmarks. See help on function `bookmark-load' for more about -this. - -Warning: this function only takes an EVENT as argument. Use the -corresponding bookmark function from Lisp (the one without the -\"-menu-\" in its name). - -\(fn EVENT)" t nil) - -(autoload (quote bookmark-menu-jump) "bookmark" "\ -Jump to bookmark BOOKMARK (a point in some file). -You may have a problem using this function if the value of variable -`bookmark-alist' is nil. If that happens, you need to load in some -bookmarks. See help on function `bookmark-load' for more about -this. +(defvar menu-bar-bookmark-map (let ((map (make-sparse-keymap "Bookmark functions"))) (define-key map [load] (quote ("Load a Bookmark File..." . bookmark-load))) (define-key map [write] (quote ("Save Bookmarks As..." . bookmark-write))) (define-key map [save] (quote ("Save Bookmarks" . bookmark-save))) (define-key map [edit] (quote ("Edit Bookmark List" . bookmark-bmenu-list))) (define-key map [delete] (quote ("Delete Bookmark" . bookmark-delete))) (define-key map [rename] (quote ("Rename Bookmark" . bookmark-rename))) (define-key map [locate] (quote ("Insert Location" . bookmark-locate))) (define-key map [insert] (quote ("Insert Contents" . bookmark-insert))) (define-key map [set] (quote ("Set Bookmark" . bookmark-set))) (define-key map [jump] (quote ("Jump to Bookmark" . bookmark-jump))) map)) -Warning: this function only takes an EVENT as argument. Use the -corresponding bookmark function from Lisp (the one without the -\"-menu-\" in its name). - -\(fn EVENT)" t nil) - -(autoload (quote bookmark-menu-locate) "bookmark" "\ -Insert the name of the file associated with BOOKMARK. -\(This is not the same as the contents of that file). - -Warning: this function only takes an EVENT as argument. Use the -corresponding bookmark function from Lisp (the one without the -\"-menu-\" in its name). - -\(fn EVENT)" t nil) - -(autoload (quote bookmark-menu-rename) "bookmark" "\ -Change the name of OLD-BOOKMARK to NEWNAME. -If called from keyboard, prompts for OLD-BOOKMARK and NEWNAME. -If called from menubar, OLD-BOOKMARK is selected from a menu, and -prompts for NEWNAME. -If called from Lisp, prompts for NEWNAME if only OLD-BOOKMARK was -passed as an argument. If called with two strings, then no prompting -is done. You must pass at least OLD-BOOKMARK when calling from Lisp. - -While you are entering the new name, consecutive C-w's insert -consecutive words from the text of the buffer into the new bookmark -name. - -Warning: this function only takes an EVENT as argument. Use the -corresponding bookmark function from Lisp (the one without the -\"-menu-\" in its name). - -\(fn EVENT)" t nil) - -(autoload (quote bookmark-menu-delete) "bookmark" "\ -Delete the bookmark named NAME from the bookmark list. -Removes only the first instance of a bookmark with that name. If -there are one or more other bookmarks with the same name, they will -not be deleted. Defaults to the \"current\" bookmark (that is, the -one most recently used in this file, if any). - -Warning: this function only takes an EVENT as argument. Use the -corresponding bookmark function from Lisp (the one without the -\"-menu-\" in its name). - -\(fn EVENT)" t nil) - -(defvar menu-bar-bookmark-map (make-sparse-keymap "Bookmark functions")) - -(defalias (quote menu-bar-bookmark-map) (symbol-value (quote menu-bar-bookmark-map))) - (define-key menu-bar-bookmark-map [load] - '("Load a Bookmark File..." . bookmark-load)) - (define-key menu-bar-bookmark-map [write] - '("Save Bookmarks As..." . bookmark-write)) - (define-key menu-bar-bookmark-map [save] - '("Save Bookmarks" . bookmark-save)) - (define-key menu-bar-bookmark-map [edit] - '("Edit Bookmark List" . bookmark-bmenu-list)) - (define-key menu-bar-bookmark-map [delete] - '("Delete Bookmark" . bookmark-menu-delete)) - (define-key menu-bar-bookmark-map [rename] - '("Rename Bookmark" . bookmark-menu-rename)) - (define-key menu-bar-bookmark-map [locate] - '("Insert Location" . bookmark-menu-locate)) - (define-key menu-bar-bookmark-map [insert] - '("Insert Contents" . bookmark-menu-insert)) - (define-key menu-bar-bookmark-map [set] - '("Set Bookmark" . bookmark-set)) - (define-key menu-bar-bookmark-map [jump] - '("Jump to Bookmark" . bookmark-menu-jump)) +(defalias (quote menu-bar-bookmark-map) menu-bar-bookmark-map) ;;;*** @@ -1914,7 +1824,7 @@ corresponding bookmark function from Lisp (the one without the ;;;;;; browse-url-default-browser browse-url-at-mouse browse-url-at-point ;;;;;; browse-url browse-url-of-region browse-url-of-dired-file ;;;;;; browse-url-of-buffer browse-url-of-file browse-url-browser-function) -;;;;;; "browse-url" "net/browse-url.el" (16174 61085)) +;;;;;; "browse-url" "net/browse-url.el" (16511 32585)) ;;; Generated autoloads from net/browse-url.el (defvar browse-url-browser-function (cond ((memq system-type (quote (windows-nt ms-dos cygwin))) (quote browse-url-default-windows-browser)) ((memq system-type (quote (darwin))) (quote browse-url-default-macosx-browser)) (t (quote browse-url-default-browser))) "\ @@ -2164,7 +2074,7 @@ Default to the URL around or before point. \(fn URL &optional NEW-WINDOW)" t nil) (autoload (quote browse-url-mail) "browse-url" "\ -Open a new mail message buffer within Emacs. +Open a new mail message buffer within Emacs for the RFC 2368 URL. Default to using the mailto: URL around or before point as the recipient's address. Supplying a non-nil interactive prefix argument will cause the mail to be composed in another window rather than the @@ -2197,8 +2107,8 @@ Default to the URL around or before point. ;;;*** -;;;### (autoloads (snarf-bruces bruce) "bruce" "play/bruce.el" (15830 -;;;;;; 37093)) +;;;### (autoloads (snarf-bruces bruce) "bruce" "play/bruce.el" (16511 +;;;;;; 32591)) ;;; Generated autoloads from play/bruce.el (autoload (quote bruce) "bruce" "\ @@ -2214,7 +2124,7 @@ Return a vector containing the lines from `bruce-phrases-file'. ;;;*** ;;;### (autoloads (bs-show bs-customize bs-cycle-previous bs-cycle-next) -;;;;;; "bs" "bs.el" (15731 5408)) +;;;;;; "bs" "bs.el" (16511 32424)) ;;; Generated autoloads from bs.el (autoload (quote bs-cycle-next) "bs" "\ @@ -2255,8 +2165,8 @@ name of buffer configuration. ;;;*** ;;;### (autoloads (insert-text-button make-text-button insert-button -;;;;;; make-button define-button-type) "button" "button.el" (15924 -;;;;;; 18767)) +;;;;;; make-button define-button-type) "button" "button.el" (16511 +;;;;;; 32425)) ;;; Generated autoloads from button.el (defvar button-map (let ((map (make-sparse-keymap))) (define-key map " " (quote push-button)) (define-key map [mouse-2] (quote push-button)) map) "\ @@ -2344,7 +2254,7 @@ Also see `make-text-button'. ;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile ;;;;;; compile-defun byte-compile-file byte-recompile-directory ;;;;;; byte-force-recompile) "bytecomp" "emacs-lisp/bytecomp.el" -;;;;;; (16179 16173)) +;;;;;; (16511 35244)) ;;; Generated autoloads from emacs-lisp/bytecomp.el (autoload (quote byte-force-recompile) "bytecomp" "\ @@ -2381,7 +2291,7 @@ The value is non-nil if there were no errors, nil if errors. (autoload (quote compile-defun) "bytecomp" "\ Compile and evaluate the current top-level form. -Print the result in the minibuffer. +Print the result in the echo area. With argument, insert value in current buffer after the form. \(fn &optional ARG)" t nil) @@ -2436,7 +2346,7 @@ For example, invoke `emacs -batch -f batch-byte-recompile-directory .'. ;;;*** -;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (15941 42957)) +;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (16511 32527)) ;;; Generated autoloads from calendar/cal-dst.el (put (quote calendar-daylight-savings-starts) (quote risky-local-variable) t) @@ -2446,7 +2356,7 @@ For example, invoke `emacs -batch -f batch-byte-recompile-directory .'. ;;;*** ;;;### (autoloads (list-yahrzeit-dates) "cal-hebrew" "calendar/cal-hebrew.el" -;;;;;; (16174 61085)) +;;;;;; (16511 32528)) ;;; Generated autoloads from calendar/cal-hebrew.el (autoload (quote list-yahrzeit-dates) "cal-hebrew" "\ @@ -2460,8 +2370,8 @@ from the cursor position. ;;;### (autoloads (defmath calc-embedded-activate calc-embedded calc-grab-rectangle ;;;;;; calc-grab-region full-calc-keypad calc-keypad calc-eval quick-calc -;;;;;; full-calc calc calc-dispatch) "calc" "calc/calc.el" (15941 -;;;;;; 42957)) +;;;;;; full-calc calc calc-dispatch) "calc" "calc/calc.el" (16511 +;;;;;; 32526)) ;;; Generated autoloads from calc/calc.el (defvar calc-info-filename "calc.info" "\ @@ -2555,8 +2465,19 @@ Not documented ;;;*** +;;;### (autoloads (calc-do-embedded-activate) "calc-embed" "calc/calc-embed.el" +;;;;;; (16511 32514)) +;;; Generated autoloads from calc/calc-embed.el + +(autoload (quote calc-do-embedded-activate) "calc-embed" "\ +Not documented + +\(fn ARG CBUF)" nil nil) + +;;;*** + ;;;### (autoloads (calc-extensions) "calc-ext" "calc/calc-ext.el" -;;;;;; (15941 42957)) +;;;;;; (16511 32514)) ;;; Generated autoloads from calc/calc-ext.el (autoload (quote calc-extensions) "calc-ext" "\ @@ -2566,8 +2487,8 @@ This function is part of the autoload linkage for parts of Calc. ;;;*** -;;;### (autoloads (calculator) "calculator" "calculator.el" (15941 -;;;;;; 42951)) +;;;### (autoloads (calculator) "calculator" "calculator.el" (16511 +;;;;;; 32425)) ;;; Generated autoloads from calculator.el (autoload (quote calculator) "calculator" "\ @@ -2578,11 +2499,12 @@ See the documentation for `calculator-mode' for more information. ;;;*** -;;;### (autoloads (calendar solar-holidays islamic-holidays christian-holidays -;;;;;; hebrew-holidays other-holidays local-holidays oriental-holidays -;;;;;; general-holidays holidays-in-diary-buffer diary-list-include-blanks -;;;;;; nongregorian-diary-marking-hook mark-diary-entries-hook nongregorian-diary-listing-hook -;;;;;; diary-display-hook diary-hook list-diary-entries-hook print-diary-entries-hook +;;;### (autoloads (calendar calendar-setup solar-holidays islamic-holidays +;;;;;; christian-holidays hebrew-holidays other-holidays local-holidays +;;;;;; oriental-holidays general-holidays holidays-in-diary-buffer +;;;;;; diary-list-include-blanks nongregorian-diary-marking-hook +;;;;;; mark-diary-entries-hook nongregorian-diary-listing-hook diary-display-hook +;;;;;; diary-hook list-diary-entries-hook print-diary-entries-hook ;;;;;; american-calendar-display-form european-calendar-display-form ;;;;;; european-date-diary-pattern american-date-diary-pattern european-calendar-style ;;;;;; abbreviated-calendar-year sexp-diary-entry-symbol diary-include-string @@ -2594,7 +2516,7 @@ See the documentation for `calculator-mode' for more information. ;;;;;; calendar-remove-frame-by-deleting mark-diary-entries-in-calendar ;;;;;; number-of-diary-entries view-diary-entries-initially calendar-offset ;;;;;; calendar-week-start-day) "calendar" "calendar/calendar.el" -;;;;;; (16174 61085)) +;;;;;; (16511 32530)) ;;; Generated autoloads from calendar/calendar.el (defvar calendar-week-start-day 0 "\ @@ -2612,10 +2534,11 @@ the screen.") (custom-autoload (quote calendar-offset) "calendar") (defvar view-diary-entries-initially nil "\ -*Non-nil means display current date's diary entries on entry. +*Non-nil means display current date's diary entries on entry to calendar. The diary is displayed in another window when the calendar is first displayed, if the current date is visible. The number of days of diary entries displayed -is governed by the variable `number-of-diary-entries'.") +is governed by the variable `number-of-diary-entries'. This variable can +be overridden by the value of `calendar-setup'.") (custom-autoload (quote view-diary-entries-initially) "calendar") @@ -2900,7 +2823,10 @@ are Names can be capitalized or not, written in full (as specified by the variable `calendar-day-name-array'), or abbreviated (as specified by -`calendar-day-abbrev-array') with or without a period.") +`calendar-day-abbrev-array') with or without a period. To take effect, +this variable should be set before the calendar package and its associates +are loaded. Otherwise, use one of the functions `european-calendar' or +`american-calendar' to force the appropriate update.") (custom-autoload (quote european-calendar-style) "calendar") @@ -3128,11 +3054,14 @@ See the documentation for `calendar-holidays' for details.") (put (quote calendar-holidays) (quote risky-local-variable) t) (defvar calendar-setup nil "\ -The frame set up of the calendar. -The choices are `one-frame' (calendar and diary together in one separate, -dedicated frame), `two-frames' (calendar and diary in separate, dedicated -frames), `calendar-only' (calendar in a separate, dedicated frame); with -any other value the current frame is used.") +The frame setup of the calendar. +The choices are: `one-frame' (calendar and diary together in one separate, +dedicated frame); `two-frames' (calendar and diary in separate, dedicated +frames); `calendar-only' (calendar in a separate, dedicated frame); with +any other value the current frame is used. Using any of the first +three options overrides the value of `view-diary-entries-initially'.") + +(custom-autoload (quote calendar-setup) "calendar") (autoload (quote calendar) "calendar" "\ Choose between the one frame, two frame, or basic calendar displays. @@ -3145,9 +3074,45 @@ See the documentation of that function for more information. ;;;*** +;;;### (autoloads (capitalized-words-mode) "cap-words" "progmodes/cap-words.el" +;;;;;; (16224 16317)) +;;; Generated autoloads from progmodes/cap-words.el + +(autoload (quote capitalized-words-mode) "cap-words" "\ +Toggle Capitalized- Words mode. + +In this minor mode, a word boundary occurs immediately before an +uppercase letter in a symbol. This is in addition to all the normal +boundaries given by the syntax and category tables. There is no +restriction to ASCII. + +E.g. the beginning of words in the following identifier are as marked: + + capitalizedWorDD + ^ ^ ^^ + +Note that these word boundaries only apply for word motion and +marking commands such as \\[forward-word]. This mode does not affect word +boundaries in found by regexp matching (`\\>', `\\w' &c). + +This style of identifiers is common in environments like Java ones, +where underscores aren't trendy enough. Capitalization rules are +sometimes part of the language, e.g. Haskell, which may thus encourage +such a style. It is appropriate to add `capitalized-words-mode' to +the mode hook for programming langauge modes in which you encounter +variables like this, e.g. `java-mode-hook'. It's unlikely to cause +trouble if such identifiers aren't used. + +See also `glasses-mode' and `studlify-word'. +Obsoletes `c-forward-into-nomenclature'. + +\(fn &optional ARG)" t nil) + +;;;*** + ;;;### (autoloads (pike-mode idl-mode java-mode objc-mode c++-mode ;;;;;; c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el" -;;;;;; (16174 61085)) +;;;;;; (16511 32608)) ;;; Generated autoloads from progmodes/cc-mode.el (autoload (quote c-initialize-cc-mode) "cc-mode" "\ @@ -3305,7 +3270,7 @@ Key bindings: ;;;*** ;;;### (autoloads (c-set-offset c-add-style c-set-style) "cc-styles" -;;;;;; "progmodes/cc-styles.el" (16139 20775)) +;;;;;; "progmodes/cc-styles.el" (16511 32608)) ;;; Generated autoloads from progmodes/cc-styles.el (autoload (quote c-set-style) "cc-styles" "\ @@ -3362,7 +3327,7 @@ and exists only for compatibility reasons. ;;;### (autoloads (ccl-execute-with-args check-ccl-program define-ccl-program ;;;;;; declare-ccl-program ccl-dump ccl-compile) "ccl" "international/ccl.el" -;;;;;; (16179 23394)) +;;;;;; (16511 30641)) ;;; Generated autoloads from international/ccl.el (autoload (quote ccl-compile) "ccl" "\ @@ -3618,6 +3583,21 @@ See the documentation of `define-ccl-program' for the detail of CCL program. ;;;*** +;;;### (autoloads (cfengine-mode) "cfengine" "progmodes/cfengine.el" +;;;;;; (16511 32608)) +;;; Generated autoloads from progmodes/cfengine.el + +(autoload (quote cfengine-mode) "cfengine" "\ +Major mode for editing cfengine input. +There are no special keybindings by default. + +Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves +to the action header. + +\(fn)" t nil) + +;;;*** + ;;;### (autoloads (checkdoc-minor-mode checkdoc-ispell-defun checkdoc-ispell-comments ;;;;;; checkdoc-ispell-continue checkdoc-ispell-start checkdoc-ispell-message-text ;;;;;; checkdoc-ispell-message-interactive checkdoc-ispell-interactive @@ -3626,7 +3606,7 @@ See the documentation of `define-ccl-program' for the detail of CCL program. ;;;;;; checkdoc-comments checkdoc-continue checkdoc-start checkdoc-current-buffer ;;;;;; checkdoc-eval-current-buffer checkdoc-message-interactive ;;;;;; checkdoc-interactive checkdoc) "checkdoc" "emacs-lisp/checkdoc.el" -;;;;;; (16111 41827)) +;;;;;; (16511 32535)) ;;; Generated autoloads from emacs-lisp/checkdoc.el (autoload (quote checkdoc) "checkdoc" "\ @@ -3810,7 +3790,7 @@ checking of documentation strings. ;;;### (autoloads (pre-write-encode-hz post-read-decode-hz encode-hz-buffer ;;;;;; encode-hz-region decode-hz-buffer decode-hz-region) "china-util" -;;;;;; "language/china-util.el" (16183 29903)) +;;;;;; "language/china-util.el" (16511 25842)) ;;; Generated autoloads from language/china-util.el (autoload (quote decode-hz-region) "china-util" "\ @@ -3848,7 +3828,7 @@ Not documented ;;;*** ;;;### (autoloads (command-history list-command-history repeat-matching-complex-command) -;;;;;; "chistory" "chistory.el" (15878 5274)) +;;;;;; "chistory" "chistory.el" (16511 32425)) ;;; Generated autoloads from chistory.el (autoload (quote repeat-matching-complex-command) "chistory" "\ @@ -3887,7 +3867,7 @@ and runs the normal hook `command-history-hook'. ;;;*** -;;;### (autoloads nil "cl" "emacs-lisp/cl.el" (15856 53273)) +;;;### (autoloads nil "cl" "emacs-lisp/cl.el" (16511 32537)) ;;; Generated autoloads from emacs-lisp/cl.el (defvar custom-print-functions nil "\ @@ -3903,7 +3883,7 @@ a future Emacs interpreter will be able to use it.") ;;;*** ;;;### (autoloads (common-lisp-indent-function) "cl-indent" "emacs-lisp/cl-indent.el" -;;;;;; (16054 60749)) +;;;;;; (16511 32535)) ;;; Generated autoloads from emacs-lisp/cl-indent.el (autoload (quote common-lisp-indent-function) "cl-indent" "\ @@ -3914,7 +3894,7 @@ Not documented ;;;*** ;;;### (autoloads (c-macro-expand) "cmacexp" "progmodes/cmacexp.el" -;;;;;; (15251 46612)) +;;;;;; (16511 32608)) ;;; Generated autoloads from progmodes/cmacexp.el (autoload (quote c-macro-expand) "cmacexp" "\ @@ -3933,8 +3913,8 @@ For use inside Lisp programs, see also `c-macro-expansion'. ;;;*** -;;;### (autoloads (run-scheme) "cmuscheme" "cmuscheme.el" (15941 -;;;;;; 42951)) +;;;### (autoloads (run-scheme) "cmuscheme" "cmuscheme.el" (16511 +;;;;;; 32425)) ;;; Generated autoloads from cmuscheme.el (autoload (quote run-scheme) "cmuscheme" "\ @@ -3951,7 +3931,7 @@ of `scheme-program-name'). Runs the hooks `inferior-scheme-mode-hook' ;;;*** ;;;### (autoloads (codepage-setup) "codepage" "international/codepage.el" -;;;;;; (16179 34039)) +;;;;;; (16511 28888)) ;;; Generated autoloads from international/codepage.el (autoload (quote codepage-setup) "codepage" "\ @@ -3964,11 +3944,11 @@ Obsolete. All coding systems are set up initially. ;;;### (autoloads (comint-redirect-results-list-from-process comint-redirect-results-list ;;;;;; comint-redirect-send-command-to-process comint-redirect-send-command ;;;;;; comint-run make-comint make-comint-in-buffer) "comint" "comint.el" -;;;;;; (16168 11508)) +;;;;;; (16511 32426)) ;;; Generated autoloads from comint.el (autoload (quote make-comint-in-buffer) "comint" "\ -Make a comint process NAME in BUFFER, running PROGRAM. +Make a Comint process NAME in BUFFER, running PROGRAM. If BUFFER is nil, it defaults to NAME surrounded by `*'s. PROGRAM should be either a string denoting an executable program to create via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP @@ -3981,20 +3961,20 @@ If PROGRAM is a string, any more args are arguments to PROGRAM. \(fn NAME BUFFER PROGRAM &optional STARTFILE &rest SWITCHES)" nil nil) (autoload (quote make-comint) "comint" "\ -Make a comint process NAME in a buffer, running PROGRAM. +Make a Comint process NAME in a buffer, running PROGRAM. The name of the buffer is made by surrounding NAME with `*'s. PROGRAM should be either a string denoting an executable program to create via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP connection to be opened via `open-network-stream'. If there is already a running process in that buffer, it is not restarted. Optional third arg -STARTFILE is the name of a file to send the contents of to the process. +STARTFILE is the name of a file to send the contents of the process to. If PROGRAM is a string, any more args are arguments to PROGRAM. \(fn NAME PROGRAM &optional STARTFILE &rest SWITCHES)" nil nil) (autoload (quote comint-run) "comint" "\ -Run PROGRAM in a comint buffer and switch to it. +Run PROGRAM in a Comint buffer and switch to it. The buffer name is made by surrounding the file name of PROGRAM with `*'s. The file name is used to make a symbol name, such as `comint-sh-hook', and any hooks on this symbol are run in the buffer. @@ -4004,7 +3984,7 @@ See `make-comint' and `comint-exec'. (autoload (quote comint-redirect-send-command) "comint" "\ Send COMMAND to process in current buffer, with output to OUTPUT-BUFFER. -With prefix arg, echo output in process buffer. +With prefix arg ECHO, echo output in process buffer. If NO-DISPLAY is non-nil, do not show the output buffer. @@ -4034,8 +4014,8 @@ REGEXP-GROUP is the regular expression group in REGEXP to use. ;;;*** -;;;### (autoloads (compare-windows) "compare-w" "compare-w.el" (15678 -;;;;;; 51462)) +;;;### (autoloads (compare-windows) "compare-w" "compare-w.el" (16511 +;;;;;; 32426)) ;;; Generated autoloads from compare-w.el (autoload (quote compare-windows) "compare-w" "\ @@ -4049,18 +4029,29 @@ If both windows display the same buffer, the mark is pushed twice in that buffer: first in the other window, then in the selected window. -A prefix arg means ignore changes in whitespace. -The variable `compare-windows-whitespace' controls how whitespace is skipped. -If `compare-ignore-case' is non-nil, changes in case are also ignored. +A prefix arg means reverse the value of variable +`compare-ignore-whitespace'. If `compare-ignore-whitespace' is +nil, then a prefix arg means ignore changes in whitespace. If +`compare-ignore-whitespace' is non-nil, then a prefix arg means +don't ignore changes in whitespace. The variable +`compare-windows-whitespace' controls how whitespace is skipped. +If `compare-ignore-case' is non-nil, changes in case are also +ignored. + +If `compare-windows-sync' is non-nil, then successive calls of +this command work in interlaced mode: +on first call it advances points to the next difference, +on second call it synchronizes points by skipping the difference, +on third call it again advances points to the next difference and so on. \(fn IGNORE-WHITESPACE)" t nil) ;;;*** ;;;### (autoloads (next-error compilation-minor-mode compilation-shell-minor-mode -;;;;;; compilation-mode grep-tree grep-find grep compile compilation-search-path -;;;;;; compilation-ask-about-save compilation-window-height compilation-mode-hook) -;;;;;; "compile" "progmodes/compile.el" (16167 21090)) +;;;;;; compilation-mode compile compilation-search-path compilation-ask-about-save +;;;;;; compilation-window-height compilation-mode-hook) "compile" +;;;;;; "progmodes/compile.el" (16511 32609)) ;;; Generated autoloads from progmodes/compile.el (defvar compilation-mode-hook nil "\ @@ -4077,7 +4068,9 @@ If `compare-ignore-case' is non-nil, changes in case are also ignored. *Function to call to customize the compilation process. This functions is called immediately before the compilation process is started. It can be used to set any variables or functions that are used -while processing the output of the compilation process.") +while processing the output of the compilation process. The function +is called with variables `compilation-buffer' and `compilation-window' +bound to the compilation buffer and window, respectively.") (defvar compilation-buffer-name-function nil "\ Function to compute the name of a compilation buffer. @@ -4113,6 +4106,9 @@ Compile the program including the current buffer. Default: run `make'. Runs COMMAND, a shell command, in a separate process asynchronously with output going to the buffer `*compilation*'. +If optional second arg COMINT is t the buffer will be in comint mode with +`compilation-shell-minor-mode'. + You can then use the command \\[next-error] to find the next error message and move to the source code that caused it. @@ -4129,54 +4125,7 @@ The name used for the buffer is actually whatever is returned by the function in `compilation-buffer-name-function', so you can set that to a function that generates a unique name. -\(fn COMMAND)" t nil) - -(autoload (quote grep) "compile" "\ -Run grep, with user-specified args, and collect output in a buffer. -While grep runs asynchronously, you can use \\[next-error] (M-x next-error), -or \\\\[compile-goto-error] in the grep output buffer, to go to the lines -where grep found matches. - -This command uses a special history list for its COMMAND-ARGS, so you can -easily repeat a grep command. - -A prefix argument says to default the argument based upon the current -tag the cursor is over, substituting it into the last grep command -in the grep command history (or into `grep-command' -if that history list is empty). - -\(fn COMMAND-ARGS)" t nil) - -(autoload (quote grep-find) "compile" "\ -Run grep via find, with user-specified args COMMAND-ARGS. -Collect output in a buffer. -While find runs asynchronously, you can use the \\[next-error] command -to find the text that grep hits refer to. - -This command uses a special history list for its arguments, so you can -easily repeat a find command. - -\(fn COMMAND-ARGS)" t nil) - -(autoload (quote grep-tree) "compile" "\ -Grep for REGEXP in FILES in directory tree rooted at DIR. -Collect output in a buffer. -Interactively, prompt separately for each search parameter. -With prefix arg, reuse previous REGEXP. -The search is limited to file names matching shell pattern FILES. -FILES may use abbreviations defined in `grep-tree-files-aliases', e.g. -entering `ch' is equivalent to `*.[ch]'. - -While find runs asynchronously, you can use the \\[next-error] command -to find the text that grep hits refer to. - -This command uses a special history list for its arguments, so you can -easily repeat a find command. - -When used non-interactively, optional arg SUBDIRS limits the search to -those sub directories of DIR. - -\(fn REGEXP FILES DIR &optional SUBDIRS)" t nil) +\(fn COMMAND &optional COMINT)" t nil) (autoload (quote compilation-mode) "compile" "\ Major mode for compilation log buffers. @@ -4186,7 +4135,7 @@ To kill the compilation, type \\[kill-compilation]. Runs `compilation-mode-hook' with `run-hooks' (which see). -\(fn &optional NAME-OF-MODE)" t nil) +\(fn)" t nil) (autoload (quote compilation-shell-minor-mode) "compile" "\ Toggle compilation shell minor mode. @@ -4209,14 +4158,8 @@ Turning the mode on runs the normal hook `compilation-minor-mode-hook'. (autoload (quote next-error) "compile" "\ Visit next compilation error message and corresponding source code. - -If all the error messages parsed so far have been processed already, -the message buffer is checked for new ones. - -A prefix ARGP specifies how many error messages to move; -negative means move back to previous error messages. -Just \\[universal-argument] as a prefix means reparse the error message buffer -and start at the first error. +Prefix arg N says how many error messages to move forwards (or +backwards, if negative). \\[next-error] normally uses the most recently started compilation or grep buffer. However, it can operate on any buffer with output from @@ -4229,16 +4172,15 @@ Once \\[next-error] has chosen the buffer for error messages, it stays with that buffer until you use it in some other buffer which uses Compilation mode or Compilation Minor mode. -See variables `compilation-parse-errors-function' and -`compilation-error-regexp-alist' for customization ideas. +See variable `compilation-error-regexp-alist' for customization ideas. -\(fn &optional ARGP)" t nil) +\(fn &optional N)" t nil) (define-key ctl-x-map "`" 'next-error) ;;;*** ;;;### (autoloads (partial-completion-mode) "complete" "complete.el" -;;;;;; (15856 53268)) +;;;;;; (16511 32427)) ;;; Generated autoloads from complete.el (defvar partial-completion-mode nil "\ @@ -4273,7 +4215,7 @@ See also the variable `PC-include-file-path'. ;;;*** ;;;### (autoloads (dynamic-completion-mode) "completion" "completion.el" -;;;;;; (15941 42951)) +;;;;;; (16511 32427)) ;;; Generated autoloads from completion.el (autoload (quote dynamic-completion-mode) "completion" "\ @@ -4284,7 +4226,7 @@ Enable dynamic word-completion. ;;;*** ;;;### (autoloads (shuffle-vector cookie-snarf cookie-insert cookie) -;;;;;; "cookie1" "play/cookie1.el" (15366 772)) +;;;;;; "cookie1" "play/cookie1.el" (16511 32591)) ;;; Generated autoloads from play/cookie1.el (autoload (quote cookie) "cookie1" "\ @@ -4316,7 +4258,7 @@ Randomly permute the elements of VECTOR (all permutations equally likely). ;;;*** ;;;### (autoloads (copyright copyright-update) "copyright" "emacs-lisp/copyright.el" -;;;;;; (16179 16691)) +;;;;;; (16511 35414)) ;;; Generated autoloads from emacs-lisp/copyright.el (autoload (quote copyright-update) "copyright" "\ @@ -4338,7 +4280,7 @@ Insert a copyright by $ORGANIZATION notice at cursor. ;;;*** ;;;### (autoloads (cperl-mode) "cperl-mode" "progmodes/cperl-mode.el" -;;;;;; (16066 53440)) +;;;;;; (16511 32611)) ;;; Generated autoloads from progmodes/cperl-mode.el (autoload (quote cperl-mode) "cperl-mode" "\ @@ -4511,7 +4453,7 @@ or as help on variables `cperl-tips', `cperl-problems', ;;;*** ;;;### (autoloads (cpp-parse-edit cpp-highlight-buffer) "cpp" "progmodes/cpp.el" -;;;;;; (16070 35808)) +;;;;;; (16511 32611)) ;;; Generated autoloads from progmodes/cpp.el (autoload (quote cpp-highlight-buffer) "cpp" "\ @@ -4530,7 +4472,7 @@ Edit display information for cpp conditionals. ;;;*** ;;;### (autoloads (crisp-mode crisp-mode) "crisp" "emulation/crisp.el" -;;;;;; (16012 41367)) +;;;;;; (16511 32547)) ;;; Generated autoloads from emulation/crisp.el (defvar crisp-mode nil "\ @@ -4554,7 +4496,7 @@ With ARG, turn CRiSP mode on if ARG is positive, off otherwise. ;;;*** ;;;### (autoloads (completing-read-multiple) "crm" "emacs-lisp/crm.el" -;;;;;; (15941 42958)) +;;;;;; (16511 32537)) ;;; Generated autoloads from emacs-lisp/crm.el (autoload (quote completing-read-multiple) "crm" "\ @@ -4589,8 +4531,8 @@ INHERIT-INPUT-METHOD. ;;;*** -;;;### (autoloads (cua-mode) "cua-base" "emulation/cua-base.el" (16111 -;;;;;; 41830)) +;;;### (autoloads (cua-mode) "cua-base" "emulation/cua-base.el" (16511 +;;;;;; 32547)) ;;; Generated autoloads from emulation/cua-base.el (defvar cua-mode nil "\ @@ -4628,7 +4570,7 @@ paste (in addition to the normal emacs bindings). ;;;;;; customize-face customize-changed-options customize-option-other-window ;;;;;; customize-option customize-group-other-window customize-group ;;;;;; customize-mode customize customize-save-variable customize-set-variable -;;;;;; customize-set-value) "cus-edit" "cus-edit.el" (16111 41824)) +;;;;;; customize-set-value) "cus-edit" "cus-edit.el" (16511 32428)) ;;; Generated autoloads from cus-edit.el (add-hook 'same-window-regexps "\\`\\*Customiz.*\\*\\'") @@ -4859,7 +4801,7 @@ The format is suitable for use with `easy-menu-define'. ;;;### (autoloads (custom-reset-faces custom-theme-reset-faces custom-theme-face-value ;;;;;; custom-set-faces custom-declare-face) "cus-face" "cus-face.el" -;;;;;; (15941 42951)) +;;;;;; (16511 32428)) ;;; Generated autoloads from cus-face.el (autoload (quote custom-declare-face) "cus-face" "\ @@ -4917,7 +4859,7 @@ ARGS is defined as for `custom-theme-reset-faces' ;;;*** ;;;### (autoloads (customize-create-theme) "cus-theme" "cus-theme.el" -;;;;;; (16136 53053)) +;;;;;; (16511 32428)) ;;; Generated autoloads from cus-theme.el (autoload (quote customize-create-theme) "cus-theme" "\ @@ -4928,7 +4870,7 @@ Create a custom theme. ;;;*** ;;;### (autoloads (cvs-status-mode) "cvs-status" "cvs-status.el" -;;;;;; (15941 42951)) +;;;;;; (16511 32429)) ;;; Generated autoloads from cvs-status.el (autoload (quote cvs-status-mode) "cvs-status" "\ @@ -4939,7 +4881,7 @@ Mode used for cvs status output. ;;;*** ;;;### (autoloads (global-cwarn-mode turn-on-cwarn-mode cwarn-mode) -;;;;;; "cwarn" "progmodes/cwarn.el" (15538 43263)) +;;;;;; "cwarn" "progmodes/cwarn.el" (16511 32611)) ;;; Generated autoloads from progmodes/cwarn.el (autoload (quote cwarn-mode) "cwarn" "\ @@ -4981,7 +4923,7 @@ in which `turn-on-cwarn-mode-if-enabled' turns it on. ;;;### (autoloads (standard-display-cyrillic-translit cyrillic-encode-alternativnyj-char ;;;;;; cyrillic-encode-koi8-r-char) "cyril-util" "language/cyril-util.el" -;;;;;; (16183 31287)) +;;;;;; (16511 25842)) ;;; Generated autoloads from language/cyril-util.el (autoload (quote cyrillic-encode-koi8-r-char) "cyril-util" "\ @@ -5010,7 +4952,7 @@ If the argument is nil, we return the display table to its standard state. ;;;*** ;;;### (autoloads (dabbrev-expand dabbrev-completion) "dabbrev" "dabbrev.el" -;;;;;; (16174 61084)) +;;;;;; (16511 32429)) ;;; Generated autoloads from dabbrev.el (define-key esc-map "/" 'dabbrev-expand) (define-key esc-map [?\C-/] 'dabbrev-completion) @@ -5057,8 +4999,8 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]. ;;;*** -;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (15997 -;;;;;; 672)) +;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (16511 +;;;;;; 32611)) ;;; Generated autoloads from progmodes/dcl-mode.el (autoload (quote dcl-mode) "dcl-mode" "\ @@ -5185,7 +5127,7 @@ There is some minimal font-lock support (see vars ;;;*** ;;;### (autoloads (cancel-debug-on-entry debug-on-entry debug) "debug" -;;;;;; "emacs-lisp/debug.el" (16139 21085)) +;;;;;; "emacs-lisp/debug.el" (16511 32537)) ;;; Generated autoloads from emacs-lisp/debug.el (setq debugger (quote debug)) @@ -5220,7 +5162,7 @@ If argument is nil or an empty string, cancel for all functions. ;;;*** ;;;### (autoloads (decipher-mode decipher) "decipher" "play/decipher.el" -;;;;;; (16066 53440)) +;;;;;; (16511 32592)) ;;; Generated autoloads from play/decipher.el (autoload (quote decipher) "decipher" "\ @@ -5249,8 +5191,8 @@ The most useful commands are: ;;;*** ;;;### (autoloads (delimit-columns-rectangle delimit-columns-region -;;;;;; delimit-columns-customize) "delim-col" "delim-col.el" (15310 -;;;;;; 56703)) +;;;;;; delimit-columns-customize) "delim-col" "delim-col.el" (16511 +;;;;;; 32429)) ;;; Generated autoloads from delim-col.el (autoload (quote delimit-columns-customize) "delim-col" "\ @@ -5274,8 +5216,8 @@ START and END delimits the corners of text rectangle. ;;;*** -;;;### (autoloads (delphi-mode) "delphi" "progmodes/delphi.el" (16111 -;;;;;; 41832)) +;;;### (autoloads (delphi-mode) "delphi" "progmodes/delphi.el" (16511 +;;;;;; 35649)) ;;; Generated autoloads from progmodes/delphi.el (autoload (quote delphi-mode) "delphi" "\ @@ -5325,8 +5267,8 @@ no args, if that value is non-nil. ;;;*** -;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (16016 -;;;;;; 56429)) +;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (16511 +;;;;;; 32429)) ;;; Generated autoloads from delsel.el (defalias (quote pending-delete-mode) (quote delete-selection-mode)) @@ -5354,7 +5296,7 @@ any selection. ;;;*** ;;;### (autoloads (derived-mode-init-mode-variables define-derived-mode) -;;;;;; "derived" "emacs-lisp/derived.el" (16162 11942)) +;;;;;; "derived" "emacs-lisp/derived.el" (16511 32537)) ;;; Generated autoloads from emacs-lisp/derived.el (autoload (quote define-derived-mode) "derived" "\ @@ -5416,7 +5358,7 @@ the first time the mode is used. ;;;*** ;;;### (autoloads (describe-char describe-text-properties) "descr-text" -;;;;;; "descr-text.el" (16182 59079)) +;;;;;; "descr-text.el" (16508 54970)) ;;; Generated autoloads from descr-text.el (autoload (quote describe-text-properties) "descr-text" "\ @@ -5439,36 +5381,54 @@ as well as widgets, buttons, overlays, and text properties. ;;;*** -;;;### (autoloads (desktop-revert desktop-save-in-load-dir desktop-change-dir -;;;;;; desktop-load-default desktop-read) "desktop" "desktop.el" -;;;;;; (16179 10603)) +;;;### (autoloads (desktop-revert desktop-save-in-desktop-dir desktop-change-dir +;;;;;; desktop-load-default desktop-read desktop-save-mode) "desktop" +;;;;;; "desktop.el" (16511 32430)) ;;; Generated autoloads from desktop.el +(defvar desktop-save-mode nil "\ +Non-nil if Desktop-Save mode is enabled. +See the command `desktop-save-mode' for a description of this minor-mode. +Setting this variable directly does not take effect; +use either \\[customize] or the function `desktop-save-mode'.") + +(custom-autoload (quote desktop-save-mode) "desktop") + +(autoload (quote desktop-save-mode) "desktop" "\ +Toggle desktop saving mode. +With numeric ARG, turn desktop saving on if ARG is positive, off +otherwise. See variable `desktop-save' for a description of when the +desktop is saved. + +\(fn &optional ARG)" t nil) + (autoload (quote desktop-read) "desktop" "\ -Read the Desktop file and the files it specifies. -This is a no-op when Emacs is running in batch mode. -Look for the desktop file according to the variables `desktop-base-file-name' -and `desktop-path'. If no desktop file is found, clear the desktop. -Returns t if it has read a desktop file, nil otherwise. +Read and process the desktop file in directory DIRNAME. +Look for a desktop file in DIRNAME, or if DIRNAME is omitted, look in +directories listed in `desktop-path'. If a desktop file is found, it +is processed and `desktop-after-read-hook' is run. If no desktop file +is found, clear the desktop and run `desktop-no-desktop-file-hook'. +This function is a no-op when Emacs is running in batch mode. +It returns t if a desktop file was loaded, nil otherwise. -\(fn)" t nil) +\(fn &optional DIRNAME)" t nil) (autoload (quote desktop-load-default) "desktop" "\ Load the `default' start-up library manually. -Also inhibit further loading of it. Call this from your `.emacs' file -to provide correct modes for autoloaded files. +Also inhibit further loading of it. \(fn)" nil nil) (autoload (quote desktop-change-dir) "desktop" "\ -Save and clear the desktop, then load the desktop from directory DIR. -However, if `desktop-enable' was nil at call, don't save the old desktop. -This function always sets `desktop-enable' to t. +Change to desktop saved in DIRNAME. +Kill the desktop as specified by variables `desktop-save-mode' and +`desktop-save', then clear the desktop and load the desktop file in +directory DIRNAME. -\(fn DIR)" t nil) +\(fn DIRNAME)" t nil) -(autoload (quote desktop-save-in-load-dir) "desktop" "\ -Save desktop in directory from which it was loaded. +(autoload (quote desktop-save-in-desktop-dir) "desktop" "\ +Save the desktop in directory `desktop-dirname'. \(fn)" t nil) @@ -5479,8 +5439,9 @@ Revert to the last loaded desktop. ;;;*** -;;;### (autoloads (devanagari-composition-function devanagari-compose-region) -;;;;;; "devan-util" "language/devan-util.el" (16194 62590)) +;;;### (autoloads (devanagari-composition-function devanagari-post-read-conversion +;;;;;; devanagari-compose-region) "devan-util" "language/devan-util.el" +;;;;;; (16511 27350)) ;;; Generated autoloads from language/devan-util.el (autoload (quote devanagari-compose-region) "devan-util" "\ @@ -5488,6 +5449,11 @@ Not documented \(fn FROM TO)" t nil) +(autoload (quote devanagari-post-read-conversion) "devan-util" "\ +Not documented + +\(fn LEN)" nil nil) + (autoload (quote devanagari-composition-function) "devan-util" "\ Compose Devanagari characters after the position POS. If STRING is not nil, it is a string, and POS is an index to the string. @@ -5498,14 +5464,14 @@ In this case, compose characters after POS of the string. ;;;*** ;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib" -;;;;;; "calendar/diary-lib.el" (16174 61085)) +;;;;;; "calendar/diary-lib.el" (16511 32530)) ;;; Generated autoloads from calendar/diary-lib.el (autoload (quote diary) "diary-lib" "\ Generate the diary window for ARG days starting with the current date. If no argument is provided, the number of days of diary entries is governed -by the variable `number-of-diary-entries'. This function is suitable for -execution in a `.emacs' file. +by the variable `number-of-diary-entries'. A value of ARG less than 1 +does nothing. This function is suitable for execution in a `.emacs' file. \(fn &optional ARG)" t nil) @@ -5544,7 +5510,7 @@ Major mode for editing the diary file. ;;;*** ;;;### (autoloads (diff-backup diff diff-command diff-switches) "diff" -;;;;;; "diff.el" (15763 44949)) +;;;;;; "diff.el" (16511 32431)) ;;; Generated autoloads from diff.el (defvar diff-switches "-c" "\ @@ -5561,8 +5527,8 @@ Major mode for editing the diary file. Find and display the differences between OLD and NEW files. Interactively the current buffer's file name is the default for NEW and a backup file for NEW is the default for OLD. -With prefix arg, prompt for diff switches. If NO-ASYNC is non-nil, call diff synchronously. +With prefix arg, prompt for diff switches. \(fn OLD NEW &optional SWITCHES NO-ASYNC)" t nil) @@ -5571,13 +5537,14 @@ Diff this file with its backup file or vice versa. Uses the latest backup, if there are several numerical backups. If this file is a backup, diff it with its original. The backup file is the first file given to `diff'. +With prefix arg, prompt for diff switches. \(fn FILE &optional SWITCHES)" t nil) ;;;*** ;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "diff-mode.el" -;;;;;; (15941 42951)) +;;;;;; (16511 32430)) ;;; Generated autoloads from diff-mode.el (autoload (quote diff-mode) "diff-mode" "\ @@ -5606,7 +5573,7 @@ Minor mode for viewing/editing context diffs. ;;;;;; dired dired-copy-preserve-time dired-dwim-target dired-keep-marker-symlink ;;;;;; dired-keep-marker-hardlink dired-keep-marker-copy dired-keep-marker-rename ;;;;;; dired-trivial-filenames dired-ls-F-marks-symlinks dired-listing-switches) -;;;;;; "dired" "dired.el" (16159 27802)) +;;;;;; "dired" "dired.el" (16511 32432)) ;;; Generated autoloads from dired.el (defvar dired-listing-switches "-al" "\ @@ -5746,7 +5713,7 @@ Like `dired' but returns the dired buffer as value, does not select it. ;;;;;; dired-do-compress dired-compress-file dired-do-kill-lines ;;;;;; dired-do-shell-command dired-do-print dired-do-chown dired-do-chgrp ;;;;;; dired-do-chmod dired-backup-diff dired-diff) "dired-aux" -;;;;;; "dired-aux.el" (15961 24150)) +;;;;;; "dired-aux.el" (16511 32431)) ;;; Generated autoloads from dired-aux.el (autoload (quote dired-diff) "dired-aux" "\ @@ -6078,7 +6045,7 @@ true then the type of the file linked to by FILE is printed instead. ;;;*** -;;;### (autoloads (dired-jump) "dired-x" "dired-x.el" (15997 670)) +;;;### (autoloads (dired-jump) "dired-x" "dired-x.el" (16511 32432)) ;;; Generated autoloads from dired-x.el (autoload (quote dired-jump) "dired-x" "\ @@ -6092,7 +6059,7 @@ buffer and try again. ;;;*** -;;;### (autoloads (dirtrack) "dirtrack" "dirtrack.el" (15997 5127)) +;;;### (autoloads (dirtrack) "dirtrack" "dirtrack.el" (16511 32432)) ;;; Generated autoloads from dirtrack.el (autoload (quote dirtrack) "dirtrack" "\ @@ -6111,8 +6078,8 @@ You can enable directory tracking by adding this function to ;;;*** -;;;### (autoloads (disassemble) "disass" "emacs-lisp/disass.el" (16111 -;;;;;; 41828)) +;;;### (autoloads (disassemble) "disass" "emacs-lisp/disass.el" (16511 +;;;;;; 32537)) ;;; Generated autoloads from emacs-lisp/disass.el (autoload (quote disassemble) "disass" "\ @@ -6130,7 +6097,7 @@ redefine OBJECT if it is a symbol. ;;;;;; standard-display-graphic standard-display-g1 standard-display-ascii ;;;;;; standard-display-default standard-display-8bit describe-current-display-table ;;;;;; describe-display-table set-display-table-slot display-table-slot -;;;;;; make-display-table) "disp-table" "disp-table.el" (15941 42951)) +;;;;;; make-display-table) "disp-table" "disp-table.el" (16511 32433)) ;;; Generated autoloads from disp-table.el (autoload (quote make-display-table) "disp-table" "\ @@ -6231,7 +6198,7 @@ for users who call this function in `.emacs'. ;;;*** ;;;### (autoloads (dissociated-press) "dissociate" "play/dissociate.el" -;;;;;; (15186 43694)) +;;;;;; (16511 32592)) ;;; Generated autoloads from play/dissociate.el (autoload (quote dissociated-press) "dissociate" "\ @@ -6247,7 +6214,7 @@ Default is 2. ;;;*** -;;;### (autoloads (doctor) "doctor" "play/doctor.el" (15941 42963)) +;;;### (autoloads (doctor) "doctor" "play/doctor.el" (16511 32592)) ;;; Generated autoloads from play/doctor.el (autoload (quote doctor) "doctor" "\ @@ -6258,7 +6225,7 @@ Switch to *doctor* buffer and start giving psychotherapy. ;;;*** ;;;### (autoloads (double-mode double-mode) "double" "double.el" -;;;;;; (15941 42951)) +;;;;;; (16511 32433)) ;;; Generated autoloads from double.el (defvar double-mode nil "\ @@ -6279,7 +6246,7 @@ when pressed twice. See variable `double-map' for details. ;;;*** -;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (15941 42963)) +;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (16511 32593)) ;;; Generated autoloads from play/dunnet.el (autoload (quote dunnet) "dunnet" "\ @@ -6290,7 +6257,7 @@ Switch to *dungeon* buffer and start game. ;;;*** ;;;### (autoloads (gnus-earcon-display) "earcon" "gnus/earcon.el" -;;;;;; (15235 28667)) +;;;;;; (16464 65072)) ;;; Generated autoloads from gnus/earcon.el (autoload (quote gnus-earcon-display) "earcon" "\ @@ -6302,7 +6269,7 @@ Play sounds in message buffers. ;;;### (autoloads (easy-mmode-defsyntax easy-mmode-defmap easy-mmode-define-keymap ;;;;;; easy-mmode-define-global-mode define-minor-mode) "easy-mmode" -;;;;;; "emacs-lisp/easy-mmode.el" (16131 19792)) +;;;;;; "emacs-lisp/easy-mmode.el" (16511 32537)) ;;; Generated autoloads from emacs-lisp/easy-mmode.el (defalias (quote easy-mmode-define-minor-mode) (quote define-minor-mode)) @@ -6377,8 +6344,8 @@ CSS contains a list of syntax specifications of the form (CHAR . SYNTAX). ;;;*** ;;;### (autoloads (easy-menu-change easy-menu-create-menu easy-menu-do-define -;;;;;; easy-menu-define) "easymenu" "emacs-lisp/easymenu.el" (16054 -;;;;;; 60749)) +;;;;;; easy-menu-define) "easymenu" "emacs-lisp/easymenu.el" (16511 +;;;;;; 32538)) ;;; Generated autoloads from emacs-lisp/easymenu.el (put (quote easy-menu-define) (quote lisp-indent-function) (quote defun)) @@ -6395,8 +6362,8 @@ It may be followed by the following keyword argument pairs :filter FUNCTION -FUNCTION is a function with one argument, the menu. It returns the actual -menu displayed. +FUNCTION is a function with one argument, the rest of menu items. +It returns the remaining items of the displayed menu. :visible INCLUDE @@ -6517,10 +6484,13 @@ to implement dynamic menus. ;;;*** ;;;### (autoloads (ebnf-pop-style ebnf-push-style ebnf-reset-style -;;;;;; ebnf-apply-style ebnf-merge-style ebnf-insert-style ebnf-setup -;;;;;; ebnf-syntax-region ebnf-syntax-buffer ebnf-eps-region ebnf-eps-buffer -;;;;;; ebnf-spool-region ebnf-spool-buffer ebnf-print-region ebnf-print-buffer -;;;;;; ebnf-customize) "ebnf2ps" "progmodes/ebnf2ps.el" (15961 24154)) +;;;;;; ebnf-apply-style ebnf-merge-style ebnf-delete-style ebnf-insert-style +;;;;;; ebnf-setup ebnf-syntax-region ebnf-syntax-buffer ebnf-syntax-file +;;;;;; ebnf-syntax-directory ebnf-eps-region ebnf-eps-buffer ebnf-eps-file +;;;;;; ebnf-eps-directory ebnf-spool-region ebnf-spool-buffer ebnf-spool-file +;;;;;; ebnf-spool-directory ebnf-print-region ebnf-print-buffer +;;;;;; ebnf-print-file ebnf-print-directory ebnf-customize) "ebnf2ps" +;;;;;; "progmodes/ebnf2ps.el" (16511 32614)) ;;; Generated autoloads from progmodes/ebnf2ps.el (autoload (quote ebnf-customize) "ebnf2ps" "\ @@ -6528,6 +6498,28 @@ Customization for ebnf group. \(fn)" t nil) +(autoload (quote ebnf-print-directory) "ebnf2ps" "\ +Generate and print a PostScript syntactic chart image of DIRECTORY. + +If DIRECTORY is nil, it's used `default-directory'. + +The files in DIRECTORY that matches `ebnf-file-suffix-regexp' (which see) are +processed. + +See also `ebnf-print-buffer'. + +\(fn &optional DIRECTORY)" t nil) + +(autoload (quote ebnf-print-file) "ebnf2ps" "\ +Generate and print a PostScript syntactic chart image of the file FILE. + +If optional arg DO-NOT-KILL-BUFFER-WHEN-DONE is non-nil, the buffer isn't +killed after process termination. + +See also `ebnf-print-buffer'. + +\(fn FILE &optional DO-NOT-KILL-BUFFER-WHEN-DONE)" t nil) + (autoload (quote ebnf-print-buffer) "ebnf2ps" "\ Generate and print a PostScript syntactic chart image of the buffer. @@ -6548,6 +6540,28 @@ Like `ebnf-print-buffer', but prints just the current region. \(fn FROM TO &optional FILENAME)" t nil) +(autoload (quote ebnf-spool-directory) "ebnf2ps" "\ +Generate and spool a PostScript syntactic chart image of DIRECTORY. + +If DIRECTORY is nil, it's used `default-directory'. + +The files in DIRECTORY that matches `ebnf-file-suffix-regexp' (which see) are +processed. + +See also `ebnf-spool-buffer'. + +\(fn &optional DIRECTORY)" t nil) + +(autoload (quote ebnf-spool-file) "ebnf2ps" "\ +Generate and spool a PostScript syntactic chart image of the file FILE. + +If optional arg DO-NOT-KILL-BUFFER-WHEN-DONE is non-nil, the buffer isn't +killed after process termination. + +See also `ebnf-spool-buffer'. + +\(fn FILE &optional DO-NOT-KILL-BUFFER-WHEN-DONE)" t nil) + (autoload (quote ebnf-spool-buffer) "ebnf2ps" "\ Generate and spool a PostScript syntactic chart image of the buffer. Like `ebnf-print-buffer' except that the PostScript image is saved in a @@ -6565,6 +6579,28 @@ Use the command `ebnf-despool' to send the spooled images to the printer. \(fn FROM TO)" t nil) +(autoload (quote ebnf-eps-directory) "ebnf2ps" "\ +Generate EPS files from EBNF files in DIRECTORY. + +If DIRECTORY is nil, it's used `default-directory'. + +The files in DIRECTORY that matches `ebnf-file-suffix-regexp' (which see) are +processed. + +See also `ebnf-eps-buffer'. + +\(fn &optional DIRECTORY)" t nil) + +(autoload (quote ebnf-eps-file) "ebnf2ps" "\ +Generate an EPS file from EBNF file FILE. + +If optional arg DO-NOT-KILL-BUFFER-WHEN-DONE is non-nil, the buffer isn't +killed after EPS generation. + +See also `ebnf-eps-buffer'. + +\(fn FILE &optional DO-NOT-KILL-BUFFER-WHEN-DONE)" t nil) + (autoload (quote ebnf-eps-buffer) "ebnf2ps" "\ Generate a PostScript syntactic chart image of the buffer in a EPS file. @@ -6607,6 +6643,28 @@ WARNING: It's *NOT* asked any confirmation to override an existing file. (defalias (quote ebnf-despool) (quote ps-despool)) +(autoload (quote ebnf-syntax-directory) "ebnf2ps" "\ +Does a syntactic analysis of the files in DIRECTORY. + +If DIRECTORY is nil, it's used `default-directory'. + +The files in DIRECTORY that matches `ebnf-file-suffix-regexp' (which see) are +processed. + +See also `ebnf-syntax-buffer'. + +\(fn &optional DIRECTORY)" t nil) + +(autoload (quote ebnf-syntax-file) "ebnf2ps" "\ +Does a syntactic analysis of the FILE. + +If optional arg DO-NOT-KILL-BUFFER-WHEN-DONE is non-nil, the buffer isn't +killed after syntax checking. + +See also `ebnf-syntax-buffer'. + +\(fn FILE &optional DO-NOT-KILL-BUFFER-WHEN-DONE)" t nil) + (autoload (quote ebnf-syntax-buffer) "ebnf2ps" "\ Does a syntactic analysis of the current buffer. @@ -6625,18 +6683,31 @@ Return the current ebnf2ps setup. (autoload (quote ebnf-insert-style) "ebnf2ps" "\ Insert a new style NAME with inheritance INHERITS and values VALUES. +See `ebnf-style-database' documentation. + \(fn NAME INHERITS &rest VALUES)" t nil) +(autoload (quote ebnf-delete-style) "ebnf2ps" "\ +Delete style NAME. + +See `ebnf-style-database' documentation. + +\(fn NAME)" t nil) + (autoload (quote ebnf-merge-style) "ebnf2ps" "\ Merge values of style NAME with style VALUES. +See `ebnf-style-database' documentation. + \(fn NAME &rest VALUES)" t nil) (autoload (quote ebnf-apply-style) "ebnf2ps" "\ -Set STYLE to current style. +Set STYLE as the current style. It returns the old style symbol. +See `ebnf-style-database' documentation. + \(fn STYLE)" t nil) (autoload (quote ebnf-reset-style) "ebnf2ps" "\ @@ -6644,20 +6715,26 @@ Reset current style. It returns the old style symbol. +See `ebnf-style-database' documentation. + \(fn &optional STYLE)" t nil) (autoload (quote ebnf-push-style) "ebnf2ps" "\ -Push the current style and set STYLE to current style. +Push the current style and set STYLE as the current style. It returns the old style symbol. +See `ebnf-style-database' documentation. + \(fn &optional STYLE)" t nil) (autoload (quote ebnf-pop-style) "ebnf2ps" "\ -Pop a style and set it to current style. +Pop a style and set it as the current style. It returns the old style symbol. +See `ebnf-style-database' documentation. + \(fn)" t nil) ;;;*** @@ -6665,9 +6742,15 @@ It returns the old style symbol. ;;;### (autoloads (ebrowse-statistics ebrowse-save-tree-as ebrowse-save-tree ;;;;;; ebrowse-electric-position-menu ebrowse-forward-in-position-stack ;;;;;; ebrowse-back-in-position-stack ebrowse-tags-search-member-use -;;;;;; ebrowse-tags-query-replace ebrowse-tags-loop-continue ebrowse-tags-complete-symbol -;;;;;; ebrowse-electric-choose-tree ebrowse-tree-mode) "ebrowse" -;;;;;; "progmodes/ebrowse.el" (15961 24154)) +;;;;;; ebrowse-tags-query-replace ebrowse-tags-search ebrowse-tags-loop-continue +;;;;;; ebrowse-tags-complete-symbol ebrowse-tags-find-definition-other-frame +;;;;;; ebrowse-tags-view-definition-other-frame ebrowse-tags-find-declaration-other-frame +;;;;;; ebrowse-tags-find-definition-other-window ebrowse-tags-view-definition-other-window +;;;;;; ebrowse-tags-find-declaration-other-window ebrowse-tags-find-definition +;;;;;; ebrowse-tags-view-definition ebrowse-tags-find-declaration +;;;;;; ebrowse-tags-view-declaration ebrowse-member-mode ebrowse-electric-choose-tree +;;;;;; ebrowse-tree-mode) "ebrowse" "progmodes/ebrowse.el" (16511 +;;;;;; 32615)) ;;; Generated autoloads from progmodes/ebrowse.el (autoload (quote ebrowse-tree-mode) "ebrowse" "\ @@ -6687,6 +6770,63 @@ Return a buffer containing a tree or nil if no tree found or canceled. \(fn)" t nil) +(autoload (quote ebrowse-member-mode) "ebrowse" "\ +Major mode for Ebrowse member buffers. + +\\{ebrowse-member-mode-map} + +\(fn)" nil nil) + +(autoload (quote ebrowse-tags-view-declaration) "ebrowse" "\ +View declaration of member at point. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-find-declaration) "ebrowse" "\ +Find declaration of member at point. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-view-definition) "ebrowse" "\ +View definition of member at point. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-find-definition) "ebrowse" "\ +Find definition of member at point. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-find-declaration-other-window) "ebrowse" "\ +Find declaration of member at point in other window. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-view-definition-other-window) "ebrowse" "\ +View definition of member at point in other window. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-find-definition-other-window) "ebrowse" "\ +Find definition of member at point in other window. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-find-declaration-other-frame) "ebrowse" "\ +Find definition of member at point in other frame. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-view-definition-other-frame) "ebrowse" "\ +View definition of member at point in other frame. + +\(fn)" t nil) + +(autoload (quote ebrowse-tags-find-definition-other-frame) "ebrowse" "\ +Find definition of member at point in other frame. + +\(fn)" t nil) + (autoload (quote ebrowse-tags-complete-symbol) "ebrowse" "\ Perform completion on the C++ symbol preceding point. A second call of this function without changing point inserts the next match. @@ -6702,6 +6842,13 @@ TREE-BUFFER if indirectly specifies which files to loop over. \(fn &optional FIRST-TIME TREE-BUFFER)" t nil) +(autoload (quote ebrowse-tags-search) "ebrowse" "\ +Search for REGEXP in all files in a tree. +If marked classes exist, process marked classes, only. +If regular expression is nil, repeat last search. + +\(fn REGEXP)" t nil) + (autoload (quote ebrowse-tags-query-replace) "ebrowse" "\ Query replace FROM with TO in all files of a class tree. With prefix arg, process files of marked classes only. @@ -6754,7 +6901,7 @@ Display statistics for a class tree. ;;;*** ;;;### (autoloads (electric-buffer-list) "ebuff-menu" "ebuff-menu.el" -;;;;;; (15997 671)) +;;;;;; (16511 32433)) ;;; Generated autoloads from ebuff-menu.el (autoload (quote electric-buffer-list) "ebuff-menu" "\ @@ -6779,7 +6926,7 @@ Calls value of `electric-buffer-menu-mode-hook' on entry if non-nil. ;;;*** ;;;### (autoloads (Electric-command-history-redo-expression) "echistory" -;;;;;; "echistory.el" (15941 42951)) +;;;;;; "echistory.el" (16511 32433)) ;;; Generated autoloads from echistory.el (autoload (quote Electric-command-history-redo-expression) "echistory" "\ @@ -6791,7 +6938,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing. ;;;*** ;;;### (autoloads (edebug-eval-top-level-form def-edebug-spec edebug-all-forms -;;;;;; edebug-all-defs) "edebug" "emacs-lisp/edebug.el" (16111 41828)) +;;;;;; edebug-all-defs) "edebug" "emacs-lisp/edebug.el" (16511 32539)) ;;; Generated autoloads from emacs-lisp/edebug.el (defvar edebug-all-defs nil "\ @@ -6854,7 +7001,7 @@ already is one.) ;;;;;; ediff-merge-directory-revisions ediff-merge-directories-with-ancestor ;;;;;; ediff-merge-directories ediff-directories3 ediff-directory-revisions ;;;;;; ediff-directories ediff-buffers3 ediff-buffers ediff-backup -;;;;;; ediff-files3 ediff-files) "ediff" "ediff.el" (16111 41824)) +;;;;;; ediff-files3 ediff-files) "ediff" "ediff.el" (16511 32438)) ;;; Generated autoloads from ediff.el (autoload (quote ediff-files) "ediff" "\ @@ -7090,7 +7237,7 @@ With optional NODE, goes to that node. ;;;*** ;;;### (autoloads (ediff-customize) "ediff-help" "ediff-help.el" -;;;;;; (15941 42951)) +;;;;;; (16511 32434)) ;;; Generated autoloads from ediff-help.el (autoload (quote ediff-customize) "ediff-help" "\ @@ -7100,7 +7247,7 @@ Not documented ;;;*** -;;;### (autoloads nil "ediff-hook" "ediff-hook.el" (15941 42951)) +;;;### (autoloads nil "ediff-hook" "ediff-hook.el" (16511 32434)) ;;; Generated autoloads from ediff-hook.el (defvar ediff-window-setup-function) @@ -7113,7 +7260,7 @@ Not documented ;;;*** ;;;### (autoloads (ediff-show-registry) "ediff-mult" "ediff-mult.el" -;;;;;; (16111 41824)) +;;;;;; (16511 32435)) ;;; Generated autoloads from ediff-mult.el (autoload (quote ediff-show-registry) "ediff-mult" "\ @@ -7126,7 +7273,7 @@ Display Ediff's registry. ;;;*** ;;;### (autoloads (ediff-toggle-use-toolbar ediff-toggle-multiframe) -;;;;;; "ediff-util" "ediff-util.el" (16111 41824)) +;;;;;; "ediff-util" "ediff-util.el" (16511 32436)) ;;; Generated autoloads from ediff-util.el (autoload (quote ediff-toggle-multiframe) "ediff-util" "\ @@ -7147,7 +7294,7 @@ To change the default, set the variable `ediff-use-toolbar-p', which see. ;;;### (autoloads (format-kbd-macro read-kbd-macro edit-named-kbd-macro ;;;;;; edit-last-kbd-macro edit-kbd-macro) "edmacro" "edmacro.el" -;;;;;; (15941 42952)) +;;;;;; (16511 32438)) ;;; Generated autoloads from edmacro.el (defvar edmacro-eight-bits nil "\ @@ -7200,7 +7347,7 @@ or nil, use a compact 80-column format. ;;;*** ;;;### (autoloads (edt-emulation-on edt-set-scroll-margins) "edt" -;;;;;; "emulation/edt.el" (15941 42958)) +;;;;;; "emulation/edt.el" (16511 32549)) ;;; Generated autoloads from emulation/edt.el (autoload (quote edt-set-scroll-margins) "edt" "\ @@ -7218,7 +7365,7 @@ Turn on EDT Emulation. ;;;*** ;;;### (autoloads (electric-helpify with-electric-help) "ehelp" "ehelp.el" -;;;;;; (16139 21083)) +;;;;;; (16511 32438)) ;;; Generated autoloads from ehelp.el (autoload (quote with-electric-help) "ehelp" "\ @@ -7256,7 +7403,7 @@ Not documented ;;;*** ;;;### (autoloads (turn-on-eldoc-mode eldoc-mode eldoc-minor-mode-string) -;;;;;; "eldoc" "emacs-lisp/eldoc.el" (16066 53440)) +;;;;;; "eldoc" "emacs-lisp/eldoc.el" (16511 35436)) ;;; Generated autoloads from emacs-lisp/eldoc.el (defvar eldoc-minor-mode-string " ElDoc" "\ @@ -7288,8 +7435,8 @@ Unequivocally turn on eldoc-mode (see variable documentation). ;;;*** -;;;### (autoloads (elide-head) "elide-head" "elide-head.el" (15829 -;;;;;; 28907)) +;;;### (autoloads (elide-head) "elide-head" "elide-head.el" (16511 +;;;;;; 32438)) ;;; Generated autoloads from elide-head.el (autoload (quote elide-head) "elide-head" "\ @@ -7305,7 +7452,7 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks. ;;;*** ;;;### (autoloads (elint-initialize) "elint" "emacs-lisp/elint.el" -;;;;;; (15829 28908)) +;;;;;; (16511 32539)) ;;; Generated autoloads from emacs-lisp/elint.el (autoload (quote elint-initialize) "elint" "\ @@ -7316,8 +7463,8 @@ Initialize elint. ;;;*** ;;;### (autoloads (elp-results elp-instrument-package elp-instrument-list -;;;;;; elp-instrument-function) "elp" "emacs-lisp/elp.el" (15407 -;;;;;; 8858)) +;;;;;; elp-instrument-function) "elp" "emacs-lisp/elp.el" (16511 +;;;;;; 32539)) ;;; Generated autoloads from emacs-lisp/elp.el (autoload (quote elp-instrument-function) "elp" "\ @@ -7351,7 +7498,7 @@ displayed. ;;;*** ;;;### (autoloads (report-emacs-bug) "emacsbug" "mail/emacsbug.el" -;;;;;; (15678 51470)) +;;;;;; (16511 32569)) ;;; Generated autoloads from mail/emacsbug.el (autoload (quote report-emacs-bug) "emacsbug" "\ @@ -7366,7 +7513,7 @@ Prompts for bug subject. Leaves you in a mail buffer. ;;;;;; emerge-revisions emerge-files-with-ancestor-remote emerge-files-remote ;;;;;; emerge-files-with-ancestor-command emerge-files-command emerge-buffers-with-ancestor ;;;;;; emerge-buffers emerge-files-with-ancestor emerge-files) "emerge" -;;;;;; "emerge.el" (16174 61084)) +;;;;;; "emerge.el" (16511 32440)) ;;; Generated autoloads from emerge.el (defvar menu-bar-emerge-menu (make-sparse-keymap "Emerge")) @@ -7444,7 +7591,7 @@ Not documented ;;;*** ;;;### (autoloads (encoded-kbd-mode) "encoded-kb" "international/encoded-kb.el" -;;;;;; (16179 34394)) +;;;;;; (16511 30641)) ;;; Generated autoloads from international/encoded-kb.el (defvar encoded-kbd-mode nil "\ @@ -7472,7 +7619,7 @@ as a multilingual text encoded in a coding system set by ;;;*** ;;;### (autoloads (enriched-decode enriched-encode enriched-mode) -;;;;;; "enriched" "textmodes/enriched.el" (16162 11943)) +;;;;;; "enriched" "textmodes/enriched.el" (16511 32637)) ;;; Generated autoloads from textmodes/enriched.el (autoload (quote enriched-mode) "enriched" "\ @@ -7502,8 +7649,8 @@ Not documented ;;;*** -;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (16179 -;;;;;; 16825)) +;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (16511 +;;;;;; 32563)) ;;; Generated autoloads from eshell/esh-mode.el (autoload (quote eshell-mode) "esh-mode" "\ @@ -7515,8 +7662,8 @@ Emacs shell interactive mode. ;;;*** -;;;### (autoloads (eshell-test) "esh-test" "eshell/esh-test.el" (15472 -;;;;;; 50922)) +;;;### (autoloads (eshell-test) "esh-test" "eshell/esh-test.el" (16511 +;;;;;; 32564)) ;;; Generated autoloads from eshell/esh-test.el (autoload (quote eshell-test) "esh-test" "\ @@ -7527,7 +7674,7 @@ Test Eshell to verify that it works as expected. ;;;*** ;;;### (autoloads (eshell-report-bug eshell-command-result eshell-command -;;;;;; eshell) "eshell" "eshell/eshell.el" (16070 35808)) +;;;;;; eshell) "eshell" "eshell/eshell.el" (16511 32564)) ;;; Generated autoloads from eshell/eshell.el (autoload (quote eshell) "eshell" "\ @@ -7572,8 +7719,8 @@ Please include any configuration details that might be involved. ;;;;;; find-tag find-tag-noselect tags-table-files visit-tags-table-buffer ;;;;;; visit-tags-table find-tag-default-function find-tag-hook ;;;;;; tags-add-tables tags-compression-info-list tags-table-list -;;;;;; tags-case-fold-search) "etags" "progmodes/etags.el" (16148 -;;;;;; 4633)) +;;;;;; tags-case-fold-search) "etags" "progmodes/etags.el" (16511 +;;;;;; 32615)) ;;; Generated autoloads from progmodes/etags.el (defvar tags-file-name nil "\ @@ -7870,7 +8017,7 @@ for \\[find-tag] (which see). ;;;;;; ethio-fidel-to-sera-buffer ethio-fidel-to-sera-region ethio-sera-to-fidel-marker ;;;;;; ethio-sera-to-fidel-mail ethio-sera-to-fidel-mail-or-marker ;;;;;; ethio-sera-to-fidel-buffer ethio-sera-to-fidel-region setup-ethiopic-environment-internal) -;;;;;; "ethio-util" "language/ethio-util.el" (16118 44435)) +;;;;;; "ethio-util" "language/ethio-util.el" (16511 25845)) ;;; Generated autoloads from language/ethio-util.el (autoload (quote setup-ethiopic-environment-internal) "ethio-util" "\ @@ -8052,7 +8199,7 @@ Convert the Java escape sequences into corresponding Ethiopic characters. \(fn)" nil nil) (autoload (quote ethio-find-file) "ethio-util" "\ -Transcribe file content into Ethiopic dependig on filename suffix. +Transcribe file content into Ethiopic depending on filename suffix. \(fn)" nil nil) @@ -8065,7 +8212,7 @@ Transcribe Ethiopic characters in ASCII depending on the file extension. ;;;### (autoloads (eudc-load-eudc eudc-query-form eudc-expand-inline ;;;;;; eudc-get-phone eudc-get-email eudc-set-server) "eudc" "net/eudc.el" -;;;;;; (15829 28909)) +;;;;;; (16511 32585)) ;;; Generated autoloads from net/eudc.el (autoload (quote eudc-set-server) "eudc" "\ @@ -8119,7 +8266,7 @@ This does nothing except loading eudc by autoload side-effect. ;;;### (autoloads (eudc-display-jpeg-as-button eudc-display-jpeg-inline ;;;;;; eudc-display-sound eudc-display-mail eudc-display-url eudc-display-generic-binary) -;;;;;; "eudc-bob" "net/eudc-bob.el" (15429 17608)) +;;;;;; "eudc-bob" "net/eudc-bob.el" (16511 32585)) ;;; Generated autoloads from net/eudc-bob.el (autoload (quote eudc-display-generic-binary) "eudc-bob" "\ @@ -8155,7 +8302,7 @@ Display a button for the JPEG DATA. ;;;*** ;;;### (autoloads (eudc-try-bbdb-insert eudc-insert-record-at-point-into-bbdb) -;;;;;; "eudc-export" "net/eudc-export.el" (15429 17608)) +;;;;;; "eudc-export" "net/eudc-export.el" (16511 32585)) ;;; Generated autoloads from net/eudc-export.el (autoload (quote eudc-insert-record-at-point-into-bbdb) "eudc-export" "\ @@ -8172,7 +8319,7 @@ Call `eudc-insert-record-at-point-into-bbdb' if on a record. ;;;*** ;;;### (autoloads (eudc-edit-hotlist) "eudc-hotlist" "net/eudc-hotlist.el" -;;;;;; (15429 17608)) +;;;;;; (16511 32585)) ;;; Generated autoloads from net/eudc-hotlist.el (autoload (quote eudc-edit-hotlist) "eudc-hotlist" "\ @@ -8183,10 +8330,17 @@ Edit the hotlist of directory servers in a specialized buffer. ;;;*** ;;;### (autoloads (executable-make-buffer-file-executable-if-script-p -;;;;;; executable-self-display executable-set-magic executable-find) -;;;;;; "executable" "progmodes/executable.el" (16111 41832)) +;;;;;; executable-self-display executable-set-magic executable-find +;;;;;; executable-command-find-posix-p) "executable" "progmodes/executable.el" +;;;;;; (16511 32615)) ;;; Generated autoloads from progmodes/executable.el +(autoload (quote executable-command-find-posix-p) "executable" "\ +Check if PROGRAM handles arguments Posix-style. +If PROGRAM is non-nil, use that instead of \"find\". + +\(fn &optional PROGRAM)" nil nil) + (autoload (quote executable-find) "executable" "\ Search for COMMAND in `exec-path' and return the absolute file name. Return nil if COMMAND is not found anywhere in `exec-path'. @@ -8218,7 +8372,7 @@ file modes. ;;;*** ;;;### (autoloads (expand-jump-to-next-slot expand-jump-to-previous-slot -;;;;;; expand-add-abbrevs) "expand" "expand.el" (15364 46020)) +;;;;;; expand-add-abbrevs) "expand" "expand.el" (16511 32440)) ;;; Generated autoloads from expand.el (autoload (quote expand-add-abbrevs) "expand" "\ @@ -8261,7 +8415,7 @@ This is used only in conjunction with `expand-add-abbrevs'. ;;;*** -;;;### (autoloads (f90-mode) "f90" "progmodes/f90.el" (16054 60750)) +;;;### (autoloads (f90-mode) "f90" "progmodes/f90.el" (16511 32616)) ;;; Generated autoloads from progmodes/f90.el (autoload (quote f90-mode) "f90" "\ @@ -8330,7 +8484,7 @@ with no args, if that value is non-nil. ;;;;;; facemenu-remove-all facemenu-remove-face-props facemenu-set-read-only ;;;;;; facemenu-set-intangible facemenu-set-invisible facemenu-set-face-from-menu ;;;;;; facemenu-set-background facemenu-set-foreground facemenu-set-face) -;;;;;; "facemenu" "facemenu.el" (15941 42952)) +;;;;;; "facemenu" "facemenu.el" (16511 32441)) ;;; Generated autoloads from facemenu.el (define-key global-map "\M-g" 'facemenu-keymap) (autoload 'facemenu-keymap "facemenu" "Keymap for face-changing commands." t 'keymap) @@ -8489,7 +8643,7 @@ of colors that the current display can handle. ;;;*** ;;;### (autoloads (turn-on-fast-lock fast-lock-mode) "fast-lock" -;;;;;; "fast-lock.el" (15941 42952)) +;;;;;; "fast-lock.el" (16511 32442)) ;;; Generated autoloads from fast-lock.el (autoload (quote fast-lock-mode) "fast-lock" "\ @@ -8530,7 +8684,7 @@ Unconditionally turn on Fast Lock mode. ;;;### (autoloads (feedmail-queue-reminder feedmail-run-the-queue ;;;;;; feedmail-run-the-queue-global-prompt feedmail-run-the-queue-no-prompts -;;;;;; feedmail-send-it) "feedmail" "mail/feedmail.el" (15856 53274)) +;;;;;; feedmail-send-it) "feedmail" "mail/feedmail.el" (16511 32570)) ;;; Generated autoloads from mail/feedmail.el (autoload (quote feedmail-send-it) "feedmail" "\ @@ -8584,7 +8738,7 @@ you can set feedmail-queue-reminder-alist to nil. ;;;*** ;;;### (autoloads (ffap-bindings dired-at-point ffap-at-mouse ffap-menu -;;;;;; find-file-at-point ffap-next) "ffap" "ffap.el" (15997 671)) +;;;;;; find-file-at-point ffap-next) "ffap" "ffap.el" (16511 32443)) ;;; Generated autoloads from ffap.el (autoload (quote ffap-next) "ffap" "\ @@ -8643,7 +8797,7 @@ Evaluate the forms in variable `ffap-bindings'. ;;;*** ;;;### (autoloads (file-cache-minibuffer-complete) "filecache" "filecache.el" -;;;;;; (15997 5128)) +;;;;;; (16511 32452)) ;;; Generated autoloads from filecache.el (autoload (quote file-cache-minibuffer-complete) "filecache" "\ @@ -8662,7 +8816,7 @@ the name is considered already unique; only the second substitution ;;;*** ;;;### (autoloads (find-grep-dired find-name-dired find-dired find-grep-options -;;;;;; find-ls-option) "find-dired" "find-dired.el" (15941 42952)) +;;;;;; find-ls-option) "find-dired" "find-dired.el" (16511 32455)) ;;; Generated autoloads from find-dired.el (defvar find-ls-option (if (eq system-type (quote berkeley-unix)) (quote ("-ls" . "-gilsb")) (quote ("-exec ls -ld {} \\;" . "-ld"))) "\ @@ -8715,9 +8869,15 @@ Thus ARG can also contain additional grep options. ;;;### (autoloads (ff-mouse-find-other-file-other-window ff-mouse-find-other-file ;;;;;; ff-find-other-file ff-get-other-file) "find-file" "find-file.el" -;;;;;; (16111 41825)) +;;;;;; (16511 32455)) ;;; Generated autoloads from find-file.el +(defvar ff-special-constructs (quote (("^#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]" lambda nil (setq fname (buffer-substring (match-beginning 2) (match-end 2)))))) "\ +*A list of regular expressions for `ff-find-file'. +Specifies how to recognise special constructs such as include files +etc. and an associated method for extracting the filename from that +construct.") + (autoload (quote ff-get-other-file) "find-file" "\ Find the header or source file corresponding to this file. See also the documentation for `ff-find-other-file'. @@ -8800,7 +8960,7 @@ Visit the file you click on in another window. ;;;;;; find-variable-other-window find-variable find-variable-noselect ;;;;;; find-function-other-frame find-function-other-window find-function ;;;;;; find-function-noselect find-function-search-for-symbol find-library) -;;;;;; "find-func" "emacs-lisp/find-func.el" (16111 41828)) +;;;;;; "find-func" "emacs-lisp/find-func.el" (16511 32539)) ;;; Generated autoloads from emacs-lisp/find-func.el (autoload (quote find-library) "find-func" "\ @@ -8920,7 +9080,7 @@ Define some key bindings for the find-function family of functions. ;;;*** ;;;### (autoloads (find-lisp-find-dired-filter find-lisp-find-dired-subdirectories -;;;;;; find-lisp-find-dired) "find-lisp" "find-lisp.el" (15188 556)) +;;;;;; find-lisp-find-dired) "find-lisp" "find-lisp.el" (16511 32455)) ;;; Generated autoloads from find-lisp.el (autoload (quote find-lisp-find-dired) "find-lisp" "\ @@ -8941,7 +9101,7 @@ Change the filter on a find-lisp-find-dired buffer to REGEXP. ;;;*** ;;;### (autoloads (finder-by-keyword finder-commentary finder-list-keywords) -;;;;;; "finder" "finder.el" (15924 18767)) +;;;;;; "finder" "finder.el" (16511 32455)) ;;; Generated autoloads from finder.el (autoload (quote finder-list-keywords) "finder" "\ @@ -8963,7 +9123,7 @@ Find packages matching a given keyword. ;;;*** ;;;### (autoloads (enable-flow-control-on enable-flow-control) "flow-ctrl" -;;;;;; "flow-ctrl.el" (15941 42952)) +;;;;;; "flow-ctrl.el" (16511 32456)) ;;; Generated autoloads from flow-ctrl.el (autoload (quote enable-flow-control) "flow-ctrl" "\ @@ -8986,7 +9146,7 @@ to get the effect of a C-q. ;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off ;;;;;; flyspell-version flyspell-mode flyspell-prog-mode flyspell-mode-line-string) -;;;;;; "flyspell" "textmodes/flyspell.el" (15589 6175)) +;;;;;; "flyspell" "textmodes/flyspell.el" (16511 32638)) ;;; Generated autoloads from textmodes/flyspell.el (defvar flyspell-mode-line-string " Fly" "\ @@ -9060,7 +9220,7 @@ Flyspell whole buffer. ;;;### (autoloads (follow-delete-other-windows-and-split follow-mode ;;;;;; turn-off-follow-mode turn-on-follow-mode) "follow" "follow.el" -;;;;;; (15856 53268)) +;;;;;; (16511 32457)) ;;; Generated autoloads from follow.el (autoload (quote turn-on-follow-mode) "follow" "\ @@ -9136,7 +9296,7 @@ in your `~/.emacs' file, replacing [f7] by your favourite key: ;;;### (autoloads (font-lock-fontify-buffer font-lock-remove-keywords ;;;;;; font-lock-add-keywords font-lock-mode-internal) "font-lock" -;;;;;; "font-lock.el" (16179 10735)) +;;;;;; "font-lock.el" (16511 32458)) ;;; Generated autoloads from font-lock.el (autoload (quote font-lock-mode-internal) "font-lock" "\ @@ -9192,8 +9352,8 @@ Fontify the current buffer the way the function `font-lock-mode' would. ;;;*** -;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (15941 -;;;;;; 42961)) +;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (16511 +;;;;;; 32570)) ;;; Generated autoloads from mail/footnote.el (autoload (quote footnote-mode) "footnote" "\ @@ -9214,7 +9374,7 @@ key binding ;;;*** ;;;### (autoloads (forms-find-file-other-window forms-find-file forms-mode) -;;;;;; "forms" "forms.el" (16111 41825)) +;;;;;; "forms" "forms.el" (16511 32935)) ;;; Generated autoloads from forms.el (autoload (quote forms-mode) "forms" "\ @@ -9251,7 +9411,7 @@ Visit a file in Forms mode in other window. ;;;*** ;;;### (autoloads (fortran-mode fortran-tab-mode-default) "fortran" -;;;;;; "progmodes/fortran.el" (16131 19793)) +;;;;;; "progmodes/fortran.el" (16511 32616)) ;;; Generated autoloads from progmodes/fortran.el (defvar fortran-tab-mode-default nil "\ @@ -9337,7 +9497,7 @@ with no args, if that value is non-nil. ;;;*** ;;;### (autoloads (fortune fortune-to-signature fortune-compile fortune-from-region -;;;;;; fortune-add-fortune) "fortune" "play/fortune.el" (15941 42963)) +;;;;;; fortune-add-fortune) "fortune" "play/fortune.el" (16511 32593)) ;;; Generated autoloads from play/fortune.el (autoload (quote fortune-add-fortune) "fortune" "\ @@ -9387,7 +9547,7 @@ and choose the directory as the fortune-file. ;;;*** ;;;### (autoloads (set-fringe-style fringe-mode fringe-mode) "fringe" -;;;;;; "fringe.el" (15997 671)) +;;;;;; "fringe.el" (16511 32459)) ;;; Generated autoloads from fringe.el (defvar fringe-mode nil "\ @@ -9407,43 +9567,74 @@ you can use the interactive function `toggle-fringe'") (custom-autoload (quote fringe-mode) "fringe") (autoload (quote fringe-mode) "fringe" "\ -Toggle appearance of fringes on all frames. -Valid values for MODE include `none', `default', `left-only', -`right-only', `minimal' and `half'. MODE can also be a cons cell -where the integer in car will be used as left fringe width and the -integer in cdr will be used as right fringe width. If MODE is not -specified, the user is queried. -It applies to all frames that exist and frames to be created in the -future. -If you want to set appearance of fringes on the selected frame only, -see `set-fringe-style'. +Set the default appearance of fringes on all frames. + +When called interactively, query the user for MODE. Valid values +for MODE include `none', `default', `left-only', `right-only', +`minimal' and `half'. + +When used in a Lisp program, MODE can be a cons cell where the +integer in car specifies the left fringe width and the integer in +cdr specifies the right fringe width. MODE can also be a single +integer that specifies both the left and the right fringe width. +If a fringe width specification is nil, that means to use the +default width (8 pixels). This command may round up the left and +right width specifications to ensure that their sum is a multiple +of the character width of a frame. It never rounds up a fringe +width of 0. + +Fringe widths set by `set-window-fringes' override the default +fringe widths set by this command. This command applies to all +frames that exist and frames to be created in the future. If you +want to set the default appearance of fringes on the selected +frame only, see the command `set-fringe-style'. \(fn &optional MODE)" t nil) (autoload (quote set-fringe-style) "fringe" "\ -Set appearance of fringes on selected frame. -Valid values for MODE include `none', `default', `left-only', -`right-only', `minimal' and `half'. MODE can also be a cons cell -where the integer in car will be used as left fringe width and the -integer in cdr will be used as right fringe width. If MODE is not -specified, the user is queried. -If you want to set appearance of fringes on all frames, see `fringe-mode'. +Set the default appearance of fringes on the selected frame. + +When called interactively, query the user for MODE. Valid values +for MODE include `none', `default', `left-only', `right-only', +`minimal' and `half'. + +When used in a Lisp program, MODE can be a cons cell where the +integer in car specifies the left fringe width and the integer in +cdr specifies the right fringe width. MODE can also be a single +integer that specifies both the left and the right fringe width. +If a fringe width specification is nil, that means to use the +default width (8 pixels). This command may round up the left and +right width specifications to ensure that their sum is a multiple +of the character width of a frame. It never rounds up a fringe +width of 0. + +Fringe widths set by `set-window-fringes' override the default +fringe widths set by this command. If you want to set the +default appearance of fringes on all frames, see the command +`fringe-mode'. \(fn &optional MODE)" t nil) ;;;*** -;;;### (autoloads (gdba) "gdb-ui" "gdb-ui.el" (16167 21090)) -;;; Generated autoloads from gdb-ui.el +;;;### (autoloads (gdba) "gdb-ui" "progmodes/gdb-ui.el" (16511 32617)) +;;; Generated autoloads from progmodes/gdb-ui.el (autoload (quote gdba) "gdb-ui" "\ Run gdb on program FILE in buffer *gud-FILE*. The directory containing FILE becomes the initial working directory and source-file directory for your debugger. -If `gdb-many-windows' is nil (the default value) then gdb starts with -just two windows : the GUD and the source buffer. If it is t the -following layout will appear (keybindings given in relevant buffer) : +If `gdb-many-windows' is nil (the default value) then gdb just +pops up the GUD buffer unless `gdb-show-main' is t. In this case +it starts with two windows: one displaying the GUD buffer and the +other with the source file with the main routine of the debugee. + +If `gdb-many-windows' is t the layout below will appear +regardless of the value of `gdb-show-main' unless +`gdb-use-inferior-io-buffer' is nil when the source buffer +occupies the full width of the frame. Keybindings are given in +relevant buffer. --------------------------------------------------------------------- GDB Toolbar @@ -9453,7 +9644,7 @@ GUD buffer (I/O of GDB) | Locals buffer | | --------------------------------------------------------------------- -Source buffer | Input/Output (of debuggee) buffer +Source buffer | Input/Output (of debugee) buffer | (comint-mode) | | @@ -9484,15 +9675,13 @@ The following interactive lisp functions help control operation : `gdb-many-windows' - Toggle the number of windows gdb uses. `gdb-restore-windows' - To restore the window layout. -`gdb-quit' - To delete (most) of the buffers used by GDB-UI and - reset variables. \(fn COMMAND-LINE)" t nil) ;;;*** ;;;### (autoloads (generic-mode define-generic-mode) "generic" "generic.el" -;;;;;; (15188 557)) +;;;;;; (16511 32460)) ;;; Generated autoloads from generic.el (autoload (quote define-generic-mode) "generic" "\ @@ -9516,7 +9705,7 @@ KEYWORD-LIST is a list of keywords to highlight with `font-lock-keyword-face'. Each keyword should be a string. FONT-LOCK-LIST is a list of additional expressions to highlight. Each entry -in the list should have the same form as an entry in `font-lock-defaults-alist' +in the list should have the same form as an entry in `font-lock-keywords'. AUTO-MODE-LIST is a list of regular expressions to add to `auto-mode-alist'. These regexps are added to `auto-mode-alist' as soon as `define-generic-mode' @@ -9541,7 +9730,7 @@ Some generic modes are defined in `generic-x.el'. ;;;*** ;;;### (autoloads (glasses-mode) "glasses" "progmodes/glasses.el" -;;;;;; (15251 46612)) +;;;;;; (16511 32617)) ;;; Generated autoloads from progmodes/glasses.el (autoload (quote glasses-mode) "glasses" "\ @@ -9554,7 +9743,7 @@ at places they belong to. ;;;*** ;;;### (autoloads (gnus gnus-other-frame gnus-slave gnus-no-server -;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (15941 42960)) +;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (16464 65074)) ;;; Generated autoloads from gnus/gnus.el (autoload (quote gnus-slave-no-server) "gnus" "\ @@ -9594,7 +9783,7 @@ prompt the user for the name of an NNTP server to use. ;;;### (autoloads (gnus-agent-batch gnus-agent-batch-fetch gnus-agentize ;;;;;; gnus-plugged gnus-unplugged) "gnus-agent" "gnus/gnus-agent.el" -;;;;;; (15941 42960)) +;;;;;; (16464 65072)) ;;; Generated autoloads from gnus/gnus-agent.el (autoload (quote gnus-unplugged) "gnus-agent" "\ @@ -9633,7 +9822,7 @@ Not documented ;;;*** ;;;### (autoloads (gnus-article-prepare-display) "gnus-art" "gnus/gnus-art.el" -;;;;;; (16066 53440)) +;;;;;; (16511 32568)) ;;; Generated autoloads from gnus/gnus-art.el (autoload (quote gnus-article-prepare-display) "gnus-art" "\ @@ -9644,7 +9833,7 @@ Make the current buffer look like a nice article. ;;;*** ;;;### (autoloads (gnus-audio-play) "gnus-audio" "gnus/gnus-audio.el" -;;;;;; (15186 43688)) +;;;;;; (16464 65072)) ;;; Generated autoloads from gnus/gnus-audio.el (autoload (quote gnus-audio-play) "gnus-audio" "\ @@ -9655,8 +9844,8 @@ Play a sound FILE through the speaker. ;;;*** ;;;### (autoloads (gnus-cache-generate-nov-databases gnus-cache-generate-active -;;;;;; gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el" (15941 -;;;;;; 42960)) +;;;;;; gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el" (16464 +;;;;;; 65072)) ;;; Generated autoloads from gnus/gnus-cache.el (autoload (quote gnus-jog-cache) "gnus-cache" "\ @@ -9680,7 +9869,7 @@ Generate NOV files recursively starting in DIR. ;;;*** ;;;### (autoloads (gnus-fetch-group-other-frame gnus-fetch-group) -;;;;;; "gnus-group" "gnus/gnus-group.el" (16131 19792)) +;;;;;; "gnus-group" "gnus/gnus-group.el" (16464 65073)) ;;; Generated autoloads from gnus/gnus-group.el (autoload (quote gnus-fetch-group) "gnus-group" "\ @@ -9697,7 +9886,7 @@ Pop up a frame and enter GROUP. ;;;*** ;;;### (autoloads (gnus-batch-score) "gnus-kill" "gnus/gnus-kill.el" -;;;;;; (14813 33717)) +;;;;;; (16464 65073)) ;;; Generated autoloads from gnus/gnus-kill.el (defalias (quote gnus-batch-kill) (quote gnus-batch-score)) @@ -9711,7 +9900,7 @@ Usage: emacs -batch -l ~/.emacs -l gnus -f gnus-batch-score ;;;*** ;;;### (autoloads (gnus-mailing-list-mode turn-on-gnus-mailing-list-mode) -;;;;;; "gnus-ml" "gnus/gnus-ml.el" (15941 42960)) +;;;;;; "gnus-ml" "gnus/gnus-ml.el" (16464 65073)) ;;; Generated autoloads from gnus/gnus-ml.el (autoload (quote turn-on-gnus-mailing-list-mode) "gnus-ml" "\ @@ -9730,7 +9919,7 @@ Minor mode for providing mailing-list commands. ;;;### (autoloads (gnus-group-split-fancy gnus-group-split gnus-group-split-update ;;;;;; gnus-group-split-setup) "gnus-mlspl" "gnus/gnus-mlspl.el" -;;;;;; (15856 53273)) +;;;;;; (16464 65073)) ;;; Generated autoloads from gnus/gnus-mlspl.el (autoload (quote gnus-group-split-setup) "gnus-mlspl" "\ @@ -9830,7 +10019,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.misc\") returns: ;;;*** ;;;### (autoloads (gnus-change-server) "gnus-move" "gnus/gnus-move.el" -;;;;;; (14792 28984)) +;;;;;; (16464 65073)) ;;; Generated autoloads from gnus/gnus-move.el (autoload (quote gnus-change-server) "gnus-move" "\ @@ -9841,8 +10030,8 @@ Update the .newsrc.eld file to reflect the change of nntp server. ;;;*** -;;;### (autoloads (gnus-msg-mail) "gnus-msg" "gnus/gnus-msg.el" (15941 -;;;;;; 42960)) +;;;### (autoloads (gnus-msg-mail) "gnus-msg" "gnus/gnus-msg.el" (16464 +;;;;;; 65073)) ;;; Generated autoloads from gnus/gnus-msg.el (autoload (quote gnus-msg-mail) "gnus-msg" "\ @@ -9857,7 +10046,7 @@ Gcc: header for archiving purposes. ;;;*** ;;;### (autoloads (gnus-mule-add-group) "gnus-mule" "gnus/gnus-mule.el" -;;;;;; (15856 53273)) +;;;;;; (16464 65073)) ;;; Generated autoloads from gnus/gnus-mule.el (autoload (quote gnus-mule-add-group) "gnus-mule" "\ @@ -9875,7 +10064,7 @@ rather than using this function. ;;;*** ;;;### (autoloads (gnus-batch-brew-soup) "gnus-soup" "gnus/gnus-soup.el" -;;;;;; (14792 28985)) +;;;;;; (16464 65074)) ;;; Generated autoloads from gnus/gnus-soup.el (autoload (quote gnus-batch-brew-soup) "gnus-soup" "\ @@ -9895,7 +10084,7 @@ Note -- this function hasn't been implemented yet. ;;;*** ;;;### (autoloads (gnus-update-format) "gnus-spec" "gnus/gnus-spec.el" -;;;;;; (14870 42286)) +;;;;;; (16464 65074)) ;;; Generated autoloads from gnus/gnus-spec.el (autoload (quote gnus-update-format) "gnus-spec" "\ @@ -9906,7 +10095,7 @@ Update the format specification near point. ;;;*** ;;;### (autoloads (gnus-declare-backend gnus-unload) "gnus-start" -;;;;;; "gnus/gnus-start.el" (16179 17130)) +;;;;;; "gnus/gnus-start.el" (16464 65074)) ;;; Generated autoloads from gnus/gnus-start.el (autoload (quote gnus-unload) "gnus-start" "\ @@ -9925,7 +10114,7 @@ Declare backend NAME with ABILITIES as a Gnus backend. ;;;*** ;;;### (autoloads (gnus-add-configuration) "gnus-win" "gnus/gnus-win.el" -;;;;;; (15856 53274)) +;;;;;; (16464 65074)) ;;; Generated autoloads from gnus/gnus-win.el (autoload (quote gnus-add-configuration) "gnus-win" "\ @@ -9935,7 +10124,7 @@ Add the window configuration CONF to `gnus-buffer-configuration'. ;;;*** -;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (16027 27252)) +;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (16511 32593)) ;;; Generated autoloads from play/gomoku.el (autoload (quote gomoku) "gomoku" "\ @@ -9962,7 +10151,7 @@ Use \\[describe-mode] for more info. ;;;*** ;;;### (autoloads (goto-address goto-address-at-point goto-address-at-mouse) -;;;;;; "goto-addr" "net/goto-addr.el" (16111 41831)) +;;;;;; "goto-addr" "net/goto-addr.el" (16511 32585)) ;;; Generated autoloads from net/goto-addr.el (autoload (quote goto-address-at-mouse) "goto-addr" "\ @@ -9994,7 +10183,74 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and ;;;*** -;;;### (autoloads (gs-load-image) "gs" "gs.el" (15289 33013)) +;;;### (autoloads (grep-tree grep-find grep grep-setup-hook grep-window-height) +;;;;;; "grep" "progmodes/grep.el" (16511 32617)) +;;; Generated autoloads from progmodes/grep.el + +(defvar grep-window-height nil "\ +*Number of lines in a grep window. If nil, use `compilation-window-height'.") + +(custom-autoload (quote grep-window-height) "grep") + +(defvar grep-setup-hook nil "\ +List of hook functions run by `grep-process-setup' (see `run-hooks').") + +(custom-autoload (quote grep-setup-hook) "grep") + +(autoload (quote grep) "grep" "\ +Run grep, with user-specified args, and collect output in a buffer. +While grep runs asynchronously, you can use \\[next-error] (M-x next-error), +or \\\\[compile-goto-error] in the grep output buffer, to go to the lines +where grep found matches. + +This command uses a special history list for its COMMAND-ARGS, so you can +easily repeat a grep command. + +A prefix argument says to default the argument based upon the current +tag the cursor is over, substituting it into the last grep command +in the grep command history (or into `grep-command' +if that history list is empty). + +If specified, optional second arg HIGHLIGHT-REGEXP is the regexp to +temporarily highlight in visited source lines. + +\(fn COMMAND-ARGS &optional HIGHLIGHT-REGEXP)" t nil) + (autoload 'grep-mode "grep" nil t) + +(autoload (quote grep-find) "grep" "\ +Run grep via find, with user-specified args COMMAND-ARGS. +Collect output in a buffer. +While find runs asynchronously, you can use the \\[next-error] command +to find the text that grep hits refer to. + +This command uses a special history list for its arguments, so you can +easily repeat a find command. + +\(fn COMMAND-ARGS)" t nil) + +(autoload (quote grep-tree) "grep" "\ +Grep for REGEXP in FILES in directory tree rooted at DIR. +Collect output in a buffer. +Interactively, prompt separately for each search parameter. +With prefix arg, reuse previous REGEXP. +The search is limited to file names matching shell pattern FILES. +FILES may use abbreviations defined in `grep-tree-files-aliases', e.g. +entering `ch' is equivalent to `*.[ch]'. + +While find runs asynchronously, you can use the \\[next-error] command +to find the text that grep hits refer to. + +This command uses a special history list for its arguments, so you can +easily repeat a find command. + +When used non-interactively, optional arg SUBDIRS limits the search to +those sub directories of DIR. + +\(fn REGEXP FILES DIR &optional SUBDIRS)" t nil) + +;;;*** + +;;;### (autoloads (gs-load-image) "gs" "gs.el" (16511 32460)) ;;; Generated autoloads from gs.el (autoload (quote gs-load-image) "gs" "\ @@ -10008,7 +10264,7 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful. ;;;*** ;;;### (autoloads (gdb-script-mode bashdb jdb pdb perldb xdb dbx -;;;;;; sdb gdb) "gud" "progmodes/gud.el" (16165 36290)) +;;;;;; sdb gdb) "gud" "progmodes/gud.el" (16511 32618)) ;;; Generated autoloads from progmodes/gud.el (autoload (quote gdb) "gud" "\ @@ -10089,8 +10345,8 @@ Major mode for editing GDB scripts ;;;*** -;;;### (autoloads (handwrite) "handwrite" "play/handwrite.el" (15941 -;;;;;; 42963)) +;;;### (autoloads (handwrite) "handwrite" "play/handwrite.el" (16511 +;;;;;; 32594)) ;;; Generated autoloads from play/handwrite.el (autoload (quote handwrite) "handwrite" "\ @@ -10108,7 +10364,7 @@ Variables: handwrite-linespace (default 12) ;;;*** ;;;### (autoloads (hanoi-unix-64 hanoi-unix hanoi) "hanoi" "play/hanoi.el" -;;;;;; (15941 42963)) +;;;;;; (16511 32594)) ;;; Generated autoloads from play/hanoi.el (autoload (quote hanoi) "hanoi" "\ @@ -10135,9 +10391,139 @@ to be updated. ;;;*** +;;;### (autoloads (scan-buf-previous-region scan-buf-next-region +;;;;;; scan-buf-move-to-region help-at-pt-display-when-idle help-at-pt-set-timer +;;;;;; help-at-pt-cancel-timer display-local-help help-at-pt-kbd-string +;;;;;; help-at-pt-string) "help-at-pt" "help-at-pt.el" (16511 32460)) +;;; Generated autoloads from help-at-pt.el + +(autoload (quote help-at-pt-string) "help-at-pt" "\ +Return the help-echo string at point. +Normally, the string produced by the `help-echo' text or overlay +property, or nil, is returned. +If KBD is non-nil, `kbd-help' is used instead, and any +`help-echo' property is ignored. In this case, the return value +can also be t, if that is the value of the `kbd-help' property. + +\(fn &optional KBD)" nil nil) + +(autoload (quote help-at-pt-kbd-string) "help-at-pt" "\ +Return the keyboard help string at point. +If the `kbd-help' text or overlay property at point produces a +string, return it. Otherwise, use the `help-echo' property. If +this produces no string either, return nil. + +\(fn)" nil nil) + +(autoload (quote display-local-help) "help-at-pt" "\ +Display local help in the echo area. +This displays a short help message, namely the string produced by +the `kbd-help' property at point. If `kbd-help' does not produce +a string, but the `help-echo' property does, then that string is +printed instead. + +A numeric argument ARG prevents display of a message in case +there is no help. While ARG can be used interactively, it is +mainly meant for use from Lisp. + +\(fn &optional ARG)" t nil) + +(autoload (quote help-at-pt-cancel-timer) "help-at-pt" "\ +Cancel any timer set by `help-at-pt-set-timer'. +This disables `help-at-pt-display-when-idle'. + +\(fn)" t nil) + +(autoload (quote help-at-pt-set-timer) "help-at-pt" "\ +Enable `help-at-pt-display-when-idle'. +This is done by setting a timer, if none is currently active. + +\(fn)" t nil) + +(defvar help-at-pt-display-when-idle (quote never) "\ +*Automatically show local help on point-over. +If the value is t, the string obtained from any `kbd-help' or +`help-echo' property at point is automatically printed in the +echo area, if nothing else is already displayed there, or after a +quit. If both `kbd-help' and `help-echo' produce help strings, +`kbd-help' is used. If the value is a list, the help only gets +printed if there is a text or overlay property at point that is +included in this list. Suggested properties are `keymap', +`local-map', `button' and `kbd-help'. Any value other than t or +a non-empty list disables the feature. + +This variable only takes effect after a call to +`help-at-pt-set-timer'. The help gets printed after Emacs has +been idle for `help-at-pt-timer-delay' seconds. You can call +`help-at-pt-cancel-timer' to cancel the timer set by, and the +effect of, `help-at-pt-set-timer'. + +When this variable is set through Custom, `help-at-pt-set-timer' +is called automatically, unless the value is `never', in which +case `help-at-pt-cancel-timer' is called. Specifying an empty +list of properties through Custom will set the timer, thus +enabling buffer local values. It sets the actual value to nil. +Thus, Custom distinguishes between a nil value and other values +that disable the feature, which Custom identifies with `never'. +The default is `never'.") + +(custom-autoload (quote help-at-pt-display-when-idle) "help-at-pt") + +(autoload (quote scan-buf-move-to-region) "help-at-pt" "\ +Go to the start of the next region with non-nil PROP property. +Then run HOOK, which should be a quoted symbol that is a normal +hook.variable, or an expression evaluating to such a symbol. +Adjacent areas with different non-nil PROP properties are +considered different regions. + +With numeric argument ARG, move to the start of the ARGth next +such region, then run HOOK. If ARG is negative, move backward. +If point is already in a region, then that region does not count +toward ARG. If ARG is 0 and point is inside a region, move to +the start of that region. If ARG is 0 and point is not in a +region, print a message to that effect, but do not move point and +do not run HOOK. If there are not enough regions to move over, +an error results and the number of available regions is mentioned +in the error message. Point is not moved and HOOK is not run. + +\(fn PROP &optional ARG HOOK)" nil nil) + +(autoload (quote scan-buf-next-region) "help-at-pt" "\ +Go to the start of the next region with non-nil help-echo. +Print the help found there using `display-local-help'. Adjacent +areas with different non-nil help-echo properties are considered +different regions. + +With numeric argument ARG, move to the start of the ARGth next +help-echo region. If ARG is negative, move backward. If point +is already in a help-echo region, then that region does not count +toward ARG. If ARG is 0 and point is inside a help-echo region, +move to the start of that region. If ARG is 0 and point is not +in such a region, just print a message to that effect. If there +are not enough regions to move over, an error results and the +number of available regions is mentioned in the error message. + +A potentially confusing subtlety is that point can be in a +help-echo region without any local help being available. This is +because `help-echo' can be a function evaluating to nil. This +rarely happens in practice. + +\(fn &optional ARG)" t nil) + +(autoload (quote scan-buf-previous-region) "help-at-pt" "\ +Go to the start of the previous region with non-nil help-echo. +Print the help found there using `display-local-help'. Adjacent +areas with different non-nil help-echo properties are considered +different regions. With numeric argument ARG, behaves like +`scan-buf-next-region' with argument -ARG.. + +\(fn &optional ARG)" t nil) + +;;;*** + ;;;### (autoloads (describe-categories describe-syntax describe-variable ;;;;;; variable-at-point describe-function-1 describe-function locate-library -;;;;;; help-with-tutorial) "help-fns" "help-fns.el" (16070 35806)) +;;;;;; help-with-tutorial) "help-fns" "help-fns.el" (16511 32460)) ;;; Generated autoloads from help-fns.el (autoload (quote help-with-tutorial) "help-fns" "\ @@ -10199,13 +10585,15 @@ BUFFER defaults to the current buffer. (autoload (quote describe-categories) "help-fns" "\ Describe the category specifications in the current category table. The descriptions are inserted in a buffer, which is then displayed. +If BUFFER is non-nil, then describe BUFFER's category table instead. +BUFFER should be a buffer or a buffer name. \(fn &optional BUFFER)" t nil) ;;;*** ;;;### (autoloads (three-step-help) "help-macro" "help-macro.el" -;;;;;; (15961 24150)) +;;;;;; (16511 32460)) ;;; Generated autoloads from help-macro.el (defvar three-step-help nil "\ @@ -10221,7 +10609,7 @@ A value of nil means skip the middle step, so that ;;;### (autoloads (help-xref-on-pp help-insert-xref-button help-xref-button ;;;;;; help-make-xrefs help-setup-xref help-mode-finish help-mode-setup -;;;;;; help-mode) "help-mode" "help-mode.el" (16054 60746)) +;;;;;; help-mode) "help-mode" "help-mode.el" (16511 32460)) ;;; Generated autoloads from help-mode.el (autoload (quote help-mode) "help-mode" "\ @@ -10263,7 +10651,10 @@ Find cross-reference information in a buffer and activate such cross references for selection with `help-follow'. Cross-references have the canonical form `...' and the type of reference may be disambiguated by the preceding word(s) used in -`help-xref-symbol-regexp'. +`help-xref-symbol-regexp'. Faces only get cross-referenced if +preceded or followed by the word `face'. Variables without +variable documentation do not get cross-referenced, unless +preceded by the word `variable' or `option'. If the variable `help-xref-mule-regexp' is non-nil, find also cross-reference information related to multilingual environment @@ -10301,7 +10692,7 @@ Add xrefs for symbols in `pp's output between FROM and TO. ;;;*** ;;;### (autoloads (Helper-help Helper-describe-bindings) "helper" -;;;;;; "emacs-lisp/helper.el" (15961 24152)) +;;;;;; "emacs-lisp/helper.el" (16511 32543)) ;;; Generated autoloads from emacs-lisp/helper.el (autoload (quote Helper-describe-bindings) "helper" "\ @@ -10317,7 +10708,7 @@ Provide help for current mode. ;;;*** ;;;### (autoloads (hexlify-buffer hexl-find-file hexl-mode) "hexl" -;;;;;; "hexl.el" (16054 60746)) +;;;;;; "hexl.el" (16511 32461)) ;;; Generated autoloads from hexl.el (autoload (quote hexl-mode) "hexl" "\ @@ -10412,8 +10803,8 @@ This discards the buffer's undo information. ;;;### (autoloads (hi-lock-write-interactive-patterns hi-lock-unface-buffer ;;;;;; hi-lock-face-phrase-buffer hi-lock-face-buffer hi-lock-line-face-buffer -;;;;;; hi-lock-mode hi-lock-mode) "hi-lock" "hi-lock.el" (15941 -;;;;;; 42952)) +;;;;;; hi-lock-mode hi-lock-mode) "hi-lock" "hi-lock.el" (16511 +;;;;;; 32461)) ;;; Generated autoloads from hi-lock.el (defvar hi-lock-mode nil "\ @@ -10524,7 +10915,7 @@ be found in variable `hi-lock-interactive-patterns'. ;;;*** ;;;### (autoloads (hide-ifdef-lines hide-ifdef-read-only hide-ifdef-initially -;;;;;; hide-ifdef-mode) "hideif" "progmodes/hideif.el" (15941 42965)) +;;;;;; hide-ifdef-mode) "hideif" "progmodes/hideif.el" (16511 32618)) ;;; Generated autoloads from progmodes/hideif.el (autoload (quote hide-ifdef-mode) "hideif" "\ @@ -10579,7 +10970,7 @@ how the hiding is done: ;;;*** ;;;### (autoloads (hs-minor-mode hs-hide-comments-when-hiding-all) -;;;;;; "hideshow" "progmodes/hideshow.el" (16162 11943)) +;;;;;; "hideshow" "progmodes/hideshow.el" (16511 32618)) ;;; Generated autoloads from progmodes/hideshow.el (defvar hs-hide-comments-when-hiding-all t "\ @@ -10639,9 +11030,10 @@ Key bindings: ;;;*** ;;;### (autoloads (global-highlight-changes highlight-compare-with-file -;;;;;; highlight-changes-rotate-faces highlight-changes-previous-change -;;;;;; highlight-changes-next-change highlight-changes-mode highlight-changes-remove-highlight) -;;;;;; "hilit-chg" "hilit-chg.el" (15941 42952)) +;;;;;; highlight-compare-buffers highlight-changes-rotate-faces +;;;;;; highlight-changes-previous-change highlight-changes-next-change +;;;;;; highlight-changes-mode highlight-changes-remove-highlight) +;;;;;; "hilit-chg" "hilit-chg.el" (16511 32461)) ;;; Generated autoloads from hilit-chg.el (defvar highlight-changes-mode nil) @@ -10712,12 +11104,26 @@ buffer to be saved): \(fn)" t nil) +(autoload (quote highlight-compare-buffers) "hilit-chg" "\ +Compare two buffers and highlight the differences. + +The default is the current buffer and the one in the next window. + +If either buffer is modified and is visiting a file, you are prompted +to save the file. + +Unless the buffer is unmodified and visiting a file, the buffer is +written to a temporary file for comparison. + +If a buffer is read-only, differences will be highlighted but no property +changes are made, so \\[highlight-changes-next-change] and +\\[highlight-changes-previous-change] will not work. + +\(fn BUF-A BUF-B)" t nil) + (autoload (quote highlight-compare-with-file) "hilit-chg" "\ Compare this buffer with a file, and highlight differences. -The current buffer must be an unmodified buffer visiting a file, -and must not be read-only. - If the buffer has a backup filename, it is used as the default when this function is called interactively. @@ -10759,7 +11165,7 @@ variable `highlight-changes-global-changes-existing-buffers' is non-nil). ;;;;;; hippie-expand-ignore-buffers hippie-expand-max-buffers hippie-expand-no-restriction ;;;;;; hippie-expand-dabbrev-as-symbol hippie-expand-dabbrev-skip-space ;;;;;; hippie-expand-verbose hippie-expand-try-functions-list) "hippie-exp" -;;;;;; "hippie-exp.el" (15941 42952)) +;;;;;; "hippie-exp.el" (16511 32462)) ;;; Generated autoloads from hippie-exp.el (defvar hippie-expand-try-functions-list (quote (try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol)) "\ @@ -10832,7 +11238,7 @@ argument VERBOSE non-nil makes the function verbose. ;;;*** ;;;### (autoloads (global-hl-line-mode hl-line-mode) "hl-line" "hl-line.el" -;;;;;; (16072 11522)) +;;;;;; (16511 32462)) ;;; Generated autoloads from hl-line.el (autoload (quote hl-line-mode) "hl-line" "\ @@ -10872,7 +11278,7 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and ;;;*** ;;;### (autoloads (list-holidays holidays) "holidays" "calendar/holidays.el" -;;;;;; (16174 61085)) +;;;;;; (16511 32530)) ;;; Generated autoloads from calendar/holidays.el (autoload (quote holidays) "holidays" "\ @@ -10896,7 +11302,7 @@ The optional LABEL is used to label the buffer created. ;;;*** ;;;### (autoloads (hscroll-global-mode hscroll-mode turn-on-hscroll) -;;;;;; "hscroll" "obsolete/hscroll.el" (15941 42963)) +;;;;;; "hscroll" "obsolete/hscroll.el" (16511 32590)) ;;; Generated autoloads from obsolete/hscroll.el (autoload (quote turn-on-hscroll) "hscroll" "\ @@ -10943,7 +11349,7 @@ Also see `automatic-hscrolling'. ;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group ;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group ;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode -;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" (16136 53054)) +;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" (16511 32462)) ;;; Generated autoloads from ibuf-ext.el (autoload (quote ibuffer-auto-mode) "ibuf-ext" "\ @@ -11296,8 +11702,8 @@ defaults to one. ;;;*** ;;;### (autoloads (define-ibuffer-filter define-ibuffer-op define-ibuffer-sorter -;;;;;; define-ibuffer-column) "ibuf-macs" "ibuf-macs.el" (16111 -;;;;;; 41826)) +;;;;;; define-ibuffer-column) "ibuf-macs" "ibuf-macs.el" (16511 +;;;;;; 32462)) ;;; Generated autoloads from ibuf-macs.el (autoload (quote define-ibuffer-column) "ibuf-macs" "\ @@ -11383,7 +11789,7 @@ bound to the current value of the filter. ;;;*** ;;;### (autoloads (ibuffer ibuffer-other-window ibuffer-list-buffers) -;;;;;; "ibuffer" "ibuffer.el" (16136 53054)) +;;;;;; "ibuffer" "ibuffer.el" (16511 32463)) ;;; Generated autoloads from ibuffer.el (autoload (quote ibuffer-list-buffers) "ibuffer" "\ @@ -11423,7 +11829,7 @@ locally in this buffer. ;;;*** ;;;### (autoloads (icomplete-minibuffer-setup icomplete-mode) "icomplete" -;;;;;; "icomplete.el" (15941 42953)) +;;;;;; "icomplete.el" (16511 32463)) ;;; Generated autoloads from icomplete.el (autoload (quote icomplete-mode) "icomplete" "\ @@ -11440,7 +11846,7 @@ Usually run by inclusion in `minibuffer-setup-hook'. ;;;*** -;;;### (autoloads (icon-mode) "icon" "progmodes/icon.el" (15941 42965)) +;;;### (autoloads (icon-mode) "icon" "progmodes/icon.el" (16511 32618)) ;;; Generated autoloads from progmodes/icon.el (autoload (quote icon-mode) "icon" "\ @@ -11481,7 +11887,7 @@ with no args, if that value is non-nil. ;;;*** ;;;### (autoloads (idlwave-shell) "idlw-shell" "progmodes/idlw-shell.el" -;;;;;; (15829 28909)) +;;;;;; (16511 35668)) ;;; Generated autoloads from progmodes/idlw-shell.el (autoload (quote idlwave-shell) "idlw-shell" "\ @@ -11507,7 +11913,7 @@ See also the variable `idlwave-shell-prompt-pattern'. ;;;*** ;;;### (autoloads (idlwave-mode) "idlwave" "progmodes/idlwave.el" -;;;;;; (16162 11943)) +;;;;;; (16511 35693)) ;;; Generated autoloads from progmodes/idlwave.el (autoload (quote idlwave-mode) "idlwave" "\ @@ -11638,7 +12044,7 @@ The main features of this mode are ;;;;;; ido-find-file ido-find-file-in-dir ido-switch-buffer-other-frame ;;;;;; ido-insert-buffer ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window ;;;;;; ido-switch-buffer ido-read-buffer ido-mode ido-mode) "ido" -;;;;;; "ido.el" (15997 5129)) +;;;;;; "ido.el" (16511 32464)) ;;; Generated autoloads from ido.el (defvar ido-mode nil "\ @@ -11880,7 +12286,7 @@ See `read-file-name' for additional parameters. ;;;*** -;;;### (autoloads (ielm) "ielm" "ielm.el" (15941 42953)) +;;;### (autoloads (ielm) "ielm" "ielm.el" (16511 32464)) ;;; Generated autoloads from ielm.el (add-hook 'same-window-buffer-names "*ielm*") @@ -11894,7 +12300,7 @@ Switches to the buffer `*ielm*', or creates it if it does not exist. ;;;### (autoloads (defimage find-image remove-images insert-image ;;;;;; put-image create-image image-type-available-p image-type-from-file-header -;;;;;; image-type-from-data) "image" "image.el" (15941 42953)) +;;;;;; image-type-from-data) "image" "image.el" (16511 32464)) ;;; Generated autoloads from image.el (autoload (quote image-type-from-data) "image" "\ @@ -12009,7 +12415,7 @@ Example: ;;;### (autoloads (auto-image-file-mode insert-image-file image-file-name-regexp ;;;;;; image-file-name-regexps image-file-name-extensions) "image-file" -;;;;;; "image-file.el" (15829 28907)) +;;;;;; "image-file.el" (16511 32464)) ;;; Generated autoloads from image-file.el (defvar image-file-name-extensions (quote ("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm" "pnm")) "\ @@ -12070,7 +12476,7 @@ Image files are those whose name has an extension in ;;;*** ;;;### (autoloads (imenu imenu-add-menubar-index imenu-add-to-menubar -;;;;;; imenu-sort-function) "imenu" "imenu.el" (16072 11522)) +;;;;;; imenu-sort-function) "imenu" "imenu.el" (16511 32465)) ;;; Generated autoloads from imenu.el (defvar imenu-sort-function nil "\ @@ -12223,7 +12629,7 @@ for more information. ;;;### (autoloads (indian-2-column-to-ucs-region in-is13194-pre-write-conversion ;;;;;; in-is13194-post-read-conversion indian-compose-string indian-compose-region) -;;;;;; "ind-util" "language/ind-util.el" (16183 40136)) +;;;;;; "ind-util" "language/ind-util.el" (16511 27936)) ;;; Generated autoloads from language/ind-util.el (autoload (quote indian-compose-region) "ind-util" "\ @@ -12254,7 +12660,7 @@ Convert old Emacs Devanagari characters to UCS. ;;;*** ;;;### (autoloads (inferior-lisp) "inf-lisp" "progmodes/inf-lisp.el" -;;;;;; (15678 51473)) +;;;;;; (16511 32623)) ;;; Generated autoloads from progmodes/inf-lisp.el (defvar inferior-lisp-filter-regexp "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'" "\ @@ -12311,9 +12717,9 @@ of `inferior-lisp-program'). Runs the hooks from ;;;*** ;;;### (autoloads (Info-speedbar-browser Info-goto-emacs-key-command-node -;;;;;; Info-goto-emacs-command-node Info-index Info-directory info-standalone -;;;;;; info-emacs-manual info info-other-window) "info" "info.el" -;;;;;; (16162 11942)) +;;;;;; Info-goto-emacs-command-node info-apropos Info-index Info-directory +;;;;;; info-standalone info-emacs-manual info info-other-window) +;;;;;; "info" "info.el" (16511 32466)) ;;; Generated autoloads from info.el (autoload (quote info-other-window) "info" "\ @@ -12354,6 +12760,8 @@ In standalone mode, \\\\[Info-exit] exits Emacs itself. Go to the Info directory node. \(fn)" t nil) + (add-hook 'same-window-buffer-names "*info-history*") + (add-hook 'same-window-buffer-names "*info-toc*") (autoload (quote Info-index) "info" "\ Look up a string TOPIC in the index for this file. @@ -12367,12 +12775,18 @@ Give a blank topic name to go to the Index node itself. \(fn TOPIC)" t nil) +(autoload (quote info-apropos) "info" "\ +Grovel indices of all known Info files on your system for STRING. +Build a menu of the possible matches. + +\(fn STRING)" t nil) + (autoload (quote Info-goto-emacs-command-node) "info" "\ Go to the Info node in the Emacs manual for command COMMAND. The command is found by looking up in Emacs manual's indices or in another manual found via COMMAND's `info-file' property or -the variable `Info-file-list-for-emacs'. COMMAND must be a symbol -or string. +the variable `Info-file-list-for-emacs'. +COMMAND must be a symbol or string. \(fn COMMAND)" t nil) @@ -12396,7 +12810,7 @@ This will add a speedbar major display mode. ;;;### (autoloads (info-complete-file info-complete-symbol info-lookup-file ;;;;;; info-lookup-symbol info-lookup-reset) "info-look" "info-look.el" -;;;;;; (16111 41826)) +;;;;;; (16511 32465)) ;;; Generated autoloads from info-look.el (autoload (quote info-lookup-reset) "info-look" "\ @@ -12441,8 +12855,8 @@ Perform completion on file preceding point. ;;;*** -;;;### (autoloads (info-xref-check-all info-xref-check) "info-xref" -;;;;;; "info-xref.el" (15952 18239)) +;;;### (autoloads (info-xref-check-all-custom info-xref-check-all +;;;;;; info-xref-check) "info-xref" "info-xref.el" (16511 32465)) ;;; Generated autoloads from info-xref.el (autoload (quote info-xref-check) "info-xref" "\ @@ -12456,10 +12870,20 @@ The usual path is `Info-directory-list' and `Info-additional-directory-list'. \(fn)" t nil) +(autoload (quote info-xref-check-all-custom) "info-xref" "\ +Check info references in all customize groups and variables. +`custom-manual' and `info-link' entries in the `custom-links' list are checked. + +`custom-load' autoloads for all symbols are loaded in order to get all the +link information. This will be a lot of lisp packages loaded, and can take +quite a while. + +\(fn)" t nil) + ;;;*** ;;;### (autoloads (batch-info-validate Info-validate Info-split Info-tagify) -;;;;;; "informat" "informat.el" (15941 42953)) +;;;;;; "informat" "informat.el" (16511 32466)) ;;; Generated autoloads from informat.el (autoload (quote Info-tagify) "informat" "\ @@ -12500,7 +12924,7 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\" ;;;### (autoloads (isearch-process-search-multibyte-characters isearch-toggle-input-method ;;;;;; isearch-toggle-specified-input-method) "isearch-x" "international/isearch-x.el" -;;;;;; (15251 46612)) +;;;;;; (16511 30641)) ;;; Generated autoloads from international/isearch-x.el (autoload (quote isearch-toggle-specified-input-method) "isearch-x" "\ @@ -12521,7 +12945,7 @@ Not documented ;;;*** ;;;### (autoloads (iso-accents-mode) "iso-acc" "international/iso-acc.el" -;;;;;; (15941 42961)) +;;;;;; (16511 30641)) ;;; Generated autoloads from international/iso-acc.el (autoload (quote iso-accents-mode) "iso-acc" "\ @@ -12554,7 +12978,7 @@ and a negative argument disables it. ;;;### (autoloads (iso-cvt-define-menu iso-cvt-write-only iso-cvt-read-only ;;;;;; iso-sgml2iso iso-iso2sgml iso-iso2duden iso-iso2gtex iso-gtex2iso ;;;;;; iso-tex2iso iso-iso2tex iso-german iso-spanish) "iso-cvt" -;;;;;; "international/iso-cvt.el" (15941 42961)) +;;;;;; "international/iso-cvt.el" (16511 30642)) ;;; Generated autoloads from international/iso-cvt.el (autoload (quote iso-spanish) "iso-cvt" "\ @@ -12638,7 +13062,7 @@ Add submenus to the Files menu, to convert to and from various formats. ;;;*** ;;;### (autoloads nil "iso-transl" "international/iso-transl.el" -;;;;;; (15941 42961)) +;;;;;; (16511 30642)) ;;; Generated autoloads from international/iso-transl.el (or key-translation-map (setq key-translation-map (make-sparse-keymap))) (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map) @@ -12651,7 +13075,7 @@ Add submenus to the Files menu, to convert to and from various formats. ;;;;;; ispell-region ispell-change-dictionary ispell-kill-ispell ;;;;;; ispell-help ispell-pdict-save ispell-word ispell-dictionary-alist ;;;;;; ispell-local-dictionary-alist ispell-personal-dictionary) -;;;;;; "ispell" "textmodes/ispell.el" (16174 61085)) +;;;;;; "ispell" "textmodes/ispell.el" (16511 32639)) ;;; Generated autoloads from textmodes/ispell.el (defvar ispell-personal-dictionary nil "\ @@ -12940,7 +13364,7 @@ You can bind this to the key C-c i in GNUS or mail by adding to ;;;### (autoloads (iswitchb-mode iswitchb-buffer-other-frame iswitchb-display-buffer ;;;;;; iswitchb-buffer-other-window iswitchb-buffer iswitchb-default-keybindings -;;;;;; iswitchb-read-buffer) "iswitchb" "iswitchb.el" (16131 19788)) +;;;;;; iswitchb-read-buffer) "iswitchb" "iswitchb.el" (16511 32467)) ;;; Generated autoloads from iswitchb.el (autoload (quote iswitchb-read-buffer) "iswitchb" "\ @@ -13014,7 +13438,7 @@ This mode enables switching between buffers using substrings. See ;;;### (autoloads (read-hiragana-string japanese-zenkaku-region japanese-hankaku-region ;;;;;; japanese-hiragana-region japanese-katakana-region japanese-zenkaku ;;;;;; japanese-hankaku japanese-hiragana japanese-katakana setup-japanese-environment-internal) -;;;;;; "japan-util" "language/japan-util.el" (16118 44435)) +;;;;;; "japan-util" "language/japan-util.el" (16511 25860)) ;;; Generated autoloads from language/japan-util.el (autoload (quote setup-japanese-environment-internal) "japan-util" "\ @@ -13091,8 +13515,8 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading. ;;;*** -;;;### (autoloads (jit-lock-register) "jit-lock" "jit-lock.el" (15941 -;;;;;; 42953)) +;;;### (autoloads (jit-lock-register) "jit-lock" "jit-lock.el" (16511 +;;;;;; 32467)) ;;; Generated autoloads from jit-lock.el (autoload (quote jit-lock-register) "jit-lock" "\ @@ -13106,7 +13530,7 @@ If non-nil, CONTEXTUAL means that a contextual fontification would be useful. ;;;*** ;;;### (autoloads (with-auto-compression-mode auto-compression-mode) -;;;;;; "jka-compr" "jka-compr.el" (16111 41826)) +;;;;;; "jka-compr" "jka-compr.el" (16511 32467)) ;;; Generated autoloads from jka-compr.el (defvar auto-compression-mode nil "\ @@ -13133,7 +13557,7 @@ Evalute BODY with automatic file compression and uncompression enabled. ;;;### (autoloads (keypad-setup keypad-numlock-shifted-setup keypad-shifted-setup ;;;;;; keypad-numlock-setup keypad-setup) "keypad" "emulation/keypad.el" -;;;;;; (15941 42958)) +;;;;;; (16511 32550)) ;;; Generated autoloads from emulation/keypad.el (defvar keypad-setup nil "\ @@ -13189,7 +13613,7 @@ the decimal key on the keypad is mapped to DECIMAL instead of `.' ;;;*** ;;;### (autoloads (kinsoku) "kinsoku" "international/kinsoku.el" -;;;;;; (15941 42961)) +;;;;;; (16511 30642)) ;;; Generated autoloads from international/kinsoku.el (autoload (quote kinsoku) "kinsoku" "\ @@ -13210,8 +13634,8 @@ the context of text formatting. ;;;*** -;;;### (autoloads (kkc-region) "kkc" "international/kkc.el" (16153 -;;;;;; 36586)) +;;;### (autoloads (kkc-region) "kkc" "international/kkc.el" (16511 +;;;;;; 30642)) ;;; Generated autoloads from international/kkc.el (defvar kkc-after-update-conversion-functions nil "\ @@ -13236,7 +13660,7 @@ and the return value is the length of the conversion. ;;;### (autoloads (kmacro-end-call-mouse kmacro-end-and-call-macro ;;;;;; kmacro-end-or-call-macro kmacro-start-macro-or-insert-counter ;;;;;; kmacro-call-macro kmacro-end-macro kmacro-start-macro) "kmacro" -;;;;;; "kmacro.el" (16016 56429)) +;;;;;; "kmacro.el" (16511 32468)) ;;; Generated autoloads from kmacro.el (global-set-key "\C-x(" 'kmacro-start-macro) (global-set-key "\C-x)" 'kmacro-end-macro) @@ -13290,7 +13714,7 @@ command. See `kmacro-call-repeat-key' and `kmacro-call-repeat-with-arg' for details on how to adjust or disable this behaviour. To make a macro permanent so you can call it even after defining -others, use M-x name-last-kbd-macro. +others, use \\[name-last-kbd-macro]. \(fn ARG &optional NO-REPEAT END-MACRO)" t nil) @@ -13338,8 +13762,39 @@ If kbd macro currently being defined end it before activating it. ;;;*** +;;;### (autoloads (kannada-composition-function kannada-post-read-conversion +;;;;;; kannada-compose-string kannada-compose-region) "knd-util" +;;;;;; "language/knd-util.el" (16511 53420)) +;;; Generated autoloads from language/knd-util.el + +(defconst kannada-consonant "[\x0c95-\x0cb9]") + +(autoload (quote kannada-compose-region) "knd-util" "\ +Not documented + +\(fn FROM TO)" t nil) + +(autoload (quote kannada-compose-string) "knd-util" "\ +Not documented + +\(fn STRING)" nil nil) + +(autoload (quote kannada-post-read-conversion) "knd-util" "\ +Not documented + +\(fn LEN)" nil nil) + +(autoload (quote kannada-composition-function) "knd-util" "\ +Compose Kannada characters after the position POS. +If STRING is not nil, it is a string, and POS is an index to the string. +In this case, compose characters after POS of the string. + +\(fn POS &optional STRING)" nil nil) + +;;;*** + ;;;### (autoloads (setup-korean-environment-internal) "korea-util" -;;;;;; "language/korea-util.el" (16118 44435)) +;;;;;; "language/korea-util.el" (16511 25861)) ;;; Generated autoloads from language/korea-util.el (defvar default-korean-keyboard (if (string-match "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) "3" "") "\ @@ -13354,7 +13809,7 @@ Not documented ;;;*** ;;;### (autoloads (lm lm-test-run) "landmark" "play/landmark.el" -;;;;;; (15924 18775)) +;;;;;; (16511 32594)) ;;; Generated autoloads from play/landmark.el (defalias (quote landmark-repeat) (quote lm-test-run)) @@ -13388,7 +13843,7 @@ Use \\[describe-mode] for more info. ;;;### (autoloads (lao-compose-region lao-composition-function lao-transcribe-roman-to-lao-string ;;;;;; lao-transcribe-single-roman-syllable-to-lao lao-compose-string) -;;;;;; "lao-util" "language/lao-util.el" (16183 37779)) +;;;;;; "lao-util" "language/lao-util.el" (16511 25862)) ;;; Generated autoloads from language/lao-util.el (autoload (quote lao-compose-string) "lao-util" "\ @@ -13426,7 +13881,7 @@ Not documented ;;;*** ;;;### (autoloads (latin1-display-ucs-per-lynx latin1-display latin1-display) -;;;;;; "latin1-disp" "international/latin1-disp.el" (15997 672)) +;;;;;; "latin1-disp" "international/latin1-disp.el" (16511 30643)) ;;; Generated autoloads from international/latin1-disp.el (defvar latin1-display nil "\ @@ -13442,7 +13897,7 @@ This option also treats some characters in the `mule-unicode-...' charsets if you don't have a Unicode font with which to display them. Setting this variable directly does not take effect; -use either M-x customize of the function `latin1-display'.") +use either \\[customize] or the function `latin1-display'.") (custom-autoload (quote latin1-display) "latin1-disp") @@ -13459,18 +13914,18 @@ a Unicode font with which to display them. (defvar latin1-display-ucs-per-lynx nil "\ Set up Latin-1/ASCII display for Unicode characters. -This uses the transliterations of the Lynx browser. The display is't +This uses the transliterations of the Lynx browser. The display isn't changed if the display can render Unicode characters. Setting this variable directly does not take effect; -use either M-x customize of the function `latin1-display'.") +use either \\[customize] or the function `latin1-display'.") (custom-autoload (quote latin1-display-ucs-per-lynx) "latin1-disp") ;;;*** ;;;### (autoloads (turn-on-lazy-lock lazy-lock-mode) "lazy-lock" -;;;;;; "lazy-lock.el" (15941 42953)) +;;;;;; "lazy-lock.el" (16511 32468)) ;;; Generated autoloads from lazy-lock.el (autoload (quote lazy-lock-mode) "lazy-lock" "\ @@ -13537,8 +13992,21 @@ Unconditionally turn on Lazy Lock mode. ;;;*** +;;;### (autoloads (ld-script-mode) "ld-script" "progmodes/ld-script.el" +;;;;;; (16511 32623)) +;;; Generated autoloads from progmodes/ld-script.el + +(add-to-list (quote auto-mode-alist) (quote ("\\.lds" . ld-script-mode))) + +(autoload (quote ld-script-mode) "ld-script" "\ +A major mode to edit GNU ld script files + +\(fn)" t nil) + +;;;*** + ;;;### (autoloads (ledit-from-lisp-mode ledit-mode) "ledit" "ledit.el" -;;;;;; (15186 43677)) +;;;;;; (16511 32474)) ;;; Generated autoloads from ledit.el (defconst ledit-save-files t "\ @@ -13572,7 +14040,7 @@ Not documented ;;;*** -;;;### (autoloads (life) "life" "play/life.el" (15941 42963)) +;;;### (autoloads (life) "life" "play/life.el" (16511 32594)) ;;; Generated autoloads from play/life.el (autoload (quote life) "life" "\ @@ -13585,8 +14053,8 @@ generations (this defaults to 1). ;;;*** -;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (15781 -;;;;;; 48896)) +;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (16511 +;;;;;; 32474)) ;;; Generated autoloads from loadhist.el (autoload (quote unload-feature) "loadhist" "\ @@ -13594,12 +14062,22 @@ Unload the library that provided FEATURE, restoring all its autoloads. If the feature is required by any other loaded code, and prefix arg FORCE is nil, raise an error. +This function tries to undo modifications made by the package to +hooks. Packages may define a hook FEATURE-unload-hook that is called +instead of the normal heuristics for doing this. Such a hook should +undo all the relevant global state changes that may have been made by +loading the package or executing functions in it. It has access to +the package's feature list (before anything is unbound) in the +variable `unload-hook-features-list' and could remove features from it +in the event that the package has done something normally-ill-advised, +such as redefining an Emacs function. + \(fn FEATURE &optional FORCE)" t nil) ;;;*** ;;;### (autoloads (locate-with-filter locate) "locate" "locate.el" -;;;;;; (15941 42956)) +;;;;;; (16511 32477)) ;;; Generated autoloads from locate.el (autoload (quote locate) "locate" "\ @@ -13618,7 +14096,7 @@ shown; this is often useful to constrain a big search. ;;;*** -;;;### (autoloads (log-edit) "log-edit" "log-edit.el" (16111 41826)) +;;;### (autoloads (log-edit) "log-edit" "log-edit.el" (16511 32477)) ;;; Generated autoloads from log-edit.el (autoload (quote log-edit) "log-edit" "\ @@ -13639,8 +14117,8 @@ If BUFFER is non-nil `log-edit' will jump to that buffer, use it to edit the ;;;*** -;;;### (autoloads (log-view-mode) "log-view" "log-view.el" (16070 -;;;;;; 35806)) +;;;### (autoloads (log-view-mode) "log-view" "log-view.el" (16511 +;;;;;; 32477)) ;;; Generated autoloads from log-view.el (autoload (quote log-view-mode) "log-view" "\ @@ -13651,8 +14129,8 @@ Major mode for browsing CVS log output. ;;;*** ;;;### (autoloads (print-region lpr-region print-buffer lpr-buffer -;;;;;; lpr-command lpr-switches printer-name) "lpr" "lpr.el" (16174 -;;;;;; 61085)) +;;;;;; lpr-command lpr-switches printer-name) "lpr" "lpr.el" (16511 +;;;;;; 32477)) ;;; Generated autoloads from lpr.el (defvar lpr-windows-system (memq system-type (quote (emx win32 w32 mswindows ms-dos windows-nt)))) @@ -13746,7 +14224,7 @@ for further customization of the printer command. ;;;*** ;;;### (autoloads (ls-lisp-support-shell-wildcards) "ls-lisp" "ls-lisp.el" -;;;;;; (16070 35806)) +;;;;;; (16511 32478)) ;;; Generated autoloads from ls-lisp.el (defvar ls-lisp-support-shell-wildcards t "\ @@ -13757,8 +14235,8 @@ Otherwise they are treated as Emacs regexps (for backward compatibility).") ;;;*** -;;;### (autoloads (phases-of-moon) "lunar" "calendar/lunar.el" (16174 -;;;;;; 61085)) +;;;### (autoloads (phases-of-moon) "lunar" "calendar/lunar.el" (16511 +;;;;;; 32530)) ;;; Generated autoloads from calendar/lunar.el (autoload (quote phases-of-moon) "lunar" "\ @@ -13771,8 +14249,8 @@ This function is suitable for execution in a .emacs file. ;;;*** -;;;### (autoloads (m4-mode) "m4-mode" "progmodes/m4-mode.el" (15941 -;;;;;; 42965)) +;;;### (autoloads (m4-mode) "m4-mode" "progmodes/m4-mode.el" (16511 +;;;;;; 32623)) ;;; Generated autoloads from progmodes/m4-mode.el (autoload (quote m4-mode) "m4-mode" "\ @@ -13783,8 +14261,22 @@ A major mode to edit m4 macro files. ;;;*** +;;;### (autoloads (macroexpand-all) "macroexp" "emacs-lisp/macroexp.el" +;;;;;; (16511 32544)) +;;; Generated autoloads from emacs-lisp/macroexp.el + +(autoload (quote macroexpand-all) "macroexp" "\ +Return result of expanding macros at all levels in FORM. +If no macros are expanded, FORM is returned unchanged. +The second optional arg ENVIRONMENT specifies an environment of macro +definitions to shadow the loaded ones for use in file byte-compilation. + +\(fn FORM &optional ENVIRONMENT)" nil nil) + +;;;*** + ;;;### (autoloads (apply-macro-to-region-lines kbd-macro-query insert-kbd-macro -;;;;;; name-last-kbd-macro) "macros" "macros.el" (16162 11942)) +;;;;;; name-last-kbd-macro) "macros" "macros.el" (16511 32478)) ;;; Generated autoloads from macros.el (autoload (quote name-last-kbd-macro) "macros" "\ @@ -13872,7 +14364,7 @@ and then select the region of un-tablified names and use ;;;*** ;;;### (autoloads (what-domain mail-extract-address-components) "mail-extr" -;;;;;; "mail/mail-extr.el" (16111 41831)) +;;;;;; "mail/mail-extr.el" (16511 32571)) ;;; Generated autoloads from mail/mail-extr.el (autoload (quote mail-extract-address-components) "mail-extr" "\ @@ -13903,7 +14395,7 @@ Convert mail domain DOMAIN to the country it corresponds to. ;;;### (autoloads (mail-hist-put-headers-into-history mail-hist-keep-history ;;;;;; mail-hist-enable mail-hist-define-keys) "mail-hist" "mail/mail-hist.el" -;;;;;; (15941 42961)) +;;;;;; (16511 32571)) ;;; Generated autoloads from mail/mail-hist.el (autoload (quote mail-hist-define-keys) "mail-hist" "\ @@ -13934,8 +14426,8 @@ This function normally would be called when the message is sent. ;;;### (autoloads (mail-fetch-field mail-unquote-printable-region ;;;;;; mail-unquote-printable mail-quote-printable mail-file-babyl-p -;;;;;; mail-use-rfc822) "mail-utils" "mail/mail-utils.el" (15941 -;;;;;; 42961)) +;;;;;; mail-use-rfc822) "mail-utils" "mail/mail-utils.el" (16511 +;;;;;; 32571)) ;;; Generated autoloads from mail/mail-utils.el (defvar mail-use-rfc822 nil "\ @@ -13968,8 +14460,12 @@ we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=. Undo the \"quoted printable\" encoding in buffer from BEG to END. If the optional argument WRAPPER is non-nil, we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=. +If NOERROR is non-nil, return t if successful. +If UNIBYTE is non-nil, insert converted characters as unibyte. +That is useful if you are going to character code decoding afterward, +as Rmail does. -\(fn BEG END &optional WRAPPER)" t nil) +\(fn BEG END &optional WRAPPER NOERROR UNIBYTE)" t nil) (autoload (quote mail-fetch-field) "mail-utils" "\ Return the value of the header field whose type is FIELD-NAME. @@ -13983,7 +14479,7 @@ If 4th arg LIST is non-nil, return a list of all such fields. ;;;*** ;;;### (autoloads (define-mail-abbrev build-mail-abbrevs mail-abbrevs-setup) -;;;;;; "mailabbrev" "mail/mailabbrev.el" (15924 18773)) +;;;;;; "mailabbrev" "mail/mailabbrev.el" (16511 32571)) ;;; Generated autoloads from mail/mailabbrev.el (autoload (quote mail-abbrevs-setup) "mailabbrev" "\ @@ -14006,8 +14502,8 @@ If DEFINITION contains multiple addresses, separate them with commas. ;;;*** ;;;### (autoloads (mail-complete define-mail-alias expand-mail-aliases -;;;;;; mail-complete-style) "mailalias" "mail/mailalias.el" (16066 -;;;;;; 53440)) +;;;;;; mail-complete-style) "mailalias" "mail/mailalias.el" (16511 +;;;;;; 32571)) ;;; Generated autoloads from mail/mailalias.el (defvar mail-complete-style (quote angles) "\ @@ -14053,7 +14549,7 @@ current header, calls `mail-complete-function' and passes prefix arg if any. ;;;*** ;;;### (autoloads (makefile-mode) "make-mode" "progmodes/make-mode.el" -;;;;;; (15997 672)) +;;;;;; (16511 32623)) ;;; Generated autoloads from progmodes/make-mode.el (autoload (quote makefile-mode) "make-mode" "\ @@ -14134,8 +14630,8 @@ Makefile mode can be configured by modifying the following variables: ;;;*** -;;;### (autoloads (make-command-summary) "makesum" "makesum.el" (13229 -;;;;;; 28917)) +;;;### (autoloads (make-command-summary) "makesum" "makesum.el" (16511 +;;;;;; 32479)) ;;; Generated autoloads from makesum.el (autoload (quote make-command-summary) "makesum" "\ @@ -14146,7 +14642,7 @@ Previous contents of that buffer are killed first. ;;;*** -;;;### (autoloads (man-follow man) "man" "man.el" (16148 4632)) +;;;### (autoloads (man-follow man) "man" "man.el" (16511 32479)) ;;; Generated autoloads from man.el (defalias (quote manual-entry) (quote man)) @@ -14173,7 +14669,7 @@ Get a Un*x manual page of the item under point and put it in a buffer. ;;;*** -;;;### (autoloads (master-mode) "master" "master.el" (15941 42956)) +;;;### (autoloads (master-mode) "master" "master.el" (16511 32479)) ;;; Generated autoloads from master.el (autoload (quote master-mode) "master" "\ @@ -14195,8 +14691,8 @@ yourself the value of `master-of' by calling `master-show-slave'. ;;;*** -;;;### (autoloads (menu-bar-mode) "menu-bar" "menu-bar.el" (16162 -;;;;;; 11942)) +;;;### (autoloads (menu-bar-mode) "menu-bar" "menu-bar.el" (16511 +;;;;;; 32480)) ;;; Generated autoloads from menu-bar.el (put (quote menu-bar-mode) (quote standard-value) (quote (t))) @@ -14229,7 +14725,7 @@ turn on menu bars; otherwise, turn off menu bars. ;;;;;; message-signature message-indent-citation-function message-cite-function ;;;;;; message-yank-prefix message-citation-line-function message-send-mail-function ;;;;;; message-user-organization-file message-signature-separator -;;;;;; message-from-style) "message" "gnus/message.el" (16070 35808)) +;;;;;; message-from-style) "message" "gnus/message.el" (16464 65074)) ;;; Generated autoloads from gnus/message.el (defvar message-from-style (quote default) "\ @@ -14459,7 +14955,7 @@ which specify the range to operate on. ;;;*** ;;;### (autoloads (metapost-mode metafont-mode) "meta-mode" "progmodes/meta-mode.el" -;;;;;; (15961 24155)) +;;;;;; (16511 32624)) ;;; Generated autoloads from progmodes/meta-mode.el (autoload (quote metafont-mode) "meta-mode" "\ @@ -14486,7 +14982,7 @@ Turning on MetaPost mode calls the value of the variable ;;;### (autoloads (metamail-region metamail-buffer metamail-interpret-body ;;;;;; metamail-interpret-header) "metamail" "mail/metamail.el" -;;;;;; (15941 42961)) +;;;;;; (16511 35537)) ;;; Generated autoloads from mail/metamail.el (autoload (quote metamail-interpret-header) "metamail" "\ @@ -14530,8 +15026,8 @@ redisplayed as output is inserted. ;;;*** ;;;### (autoloads (mh-letter-mode mh-smail-other-window mh-user-agent-compose -;;;;;; mh-smail-batch mh-smail) "mh-comp" "mh-e/mh-comp.el" (16054 -;;;;;; 60750)) +;;;;;; mh-smail-batch mh-smail) "mh-comp" "mh-e/mh-comp.el" (16511 +;;;;;; 32577)) ;;; Generated autoloads from mh-e/mh-comp.el (autoload (quote mh-smail) "mh-comp" "\ @@ -14607,7 +15103,7 @@ When a message is composed, the hooks `text-mode-hook' and ;;;*** ;;;### (autoloads (mh-version mh-nmail mh-rmail) "mh-e" "mh-e/mh-e.el" -;;;;;; (16054 60750)) +;;;;;; (16511 32578)) ;;; Generated autoloads from mh-e/mh-e.el (autoload (quote mh-rmail) "mh-e" "\ @@ -14631,7 +15127,7 @@ Display version information about MH-E and the MH mail handling system. ;;;*** -;;;### (autoloads nil "mh-utils" "mh-e/mh-utils.el" (16054 60750)) +;;;### (autoloads nil "mh-utils" "mh-e/mh-utils.el" (16511 32581)) ;;; Generated autoloads from mh-e/mh-utils.el (put (quote mh-progs) (quote risky-local-variable) t) @@ -14645,7 +15141,7 @@ Display version information about MH-E and the MH mail handling system. ;;;*** ;;;### (autoloads (midnight-delay-set clean-buffer-list) "midnight" -;;;;;; "midnight.el" (15186 43679)) +;;;;;; "midnight.el" (16511 32481)) ;;; Generated autoloads from midnight.el (autoload (quote clean-buffer-list) "midnight" "\ @@ -14672,7 +15168,7 @@ to its second argument TM. ;;;*** ;;;### (autoloads (minibuffer-electric-default-mode) "minibuf-eldef" -;;;;;; "minibuf-eldef.el" (15941 42956)) +;;;;;; "minibuf-eldef.el" (16511 32481)) ;;; Generated autoloads from minibuf-eldef.el (defvar minibuffer-electric-default-mode nil "\ @@ -14699,7 +15195,7 @@ Returns non-nil if the new state is enabled. ;;;*** ;;;### (autoloads (mixal-mode) "mixal-mode" "progmodes/mixal-mode.el" -;;;;;; (16110 13979)) +;;;;;; (16511 32624)) ;;; Generated autoloads from progmodes/mixal-mode.el (autoload (quote mixal-mode) "mixal-mode" "\ @@ -14712,8 +15208,9 @@ Major mode for the mixal asm language. ;;;*** -;;;### (autoloads (malayalam-composition-function malayalam-compose-region) -;;;;;; "mlm-util" "language/mlm-util.el" (16194 57623)) +;;;### (autoloads (malayalam-composition-function malayalam-post-read-conversion +;;;;;; malayalam-compose-region) "mlm-util" "language/mlm-util.el" +;;;;;; (16511 25863)) ;;; Generated autoloads from language/mlm-util.el (autoload (quote malayalam-compose-region) "mlm-util" "\ @@ -14721,6 +15218,11 @@ Not documented \(fn FROM TO)" t nil) +(autoload (quote malayalam-post-read-conversion) "mlm-util" "\ +Not documented + +\(fn LEN)" nil nil) + (autoload (quote malayalam-composition-function) "mlm-util" "\ Compose Malayalam characters after the position POS. If STRING is not nil, it is a string, and POS is an index to the string. @@ -14731,7 +15233,7 @@ In this case, compose characters after POS of the string. ;;;*** ;;;### (autoloads (mm-inline-partial) "mm-partial" "gnus/mm-partial.el" -;;;;;; (15941 42960)) +;;;;;; (16464 65075)) ;;; Generated autoloads from gnus/mm-partial.el (autoload (quote mm-inline-partial) "mm-partial" "\ @@ -14745,7 +15247,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing. ;;;*** ;;;### (autoloads (mm-uu-test mm-uu-dissect) "mm-uu" "gnus/mm-uu.el" -;;;;;; (15961 24153)) +;;;;;; (16464 65075)) ;;; Generated autoloads from gnus/mm-uu.el (autoload (quote mm-uu-dissect) "mm-uu" "\ @@ -14761,7 +15263,7 @@ Check whether the current buffer contains uu stuff. ;;;*** ;;;### (autoloads (modula-2-mode) "modula2" "progmodes/modula2.el" -;;;;;; (15941 42965)) +;;;;;; (16511 32624)) ;;; Generated autoloads from progmodes/modula2.el (autoload (quote modula-2-mode) "modula2" "\ @@ -14793,7 +15295,7 @@ followed by the first character of the construct. ;;;*** ;;;### (autoloads (unmorse-region morse-region) "morse" "play/morse.el" -;;;;;; (15856 53275)) +;;;;;; (16511 32594)) ;;; Generated autoloads from play/morse.el (autoload (quote morse-region) "morse" "\ @@ -14808,8 +15310,8 @@ Convert morse coded text in region to ordinary ASCII text. ;;;*** -;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (16162 -;;;;;; 11942)) +;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (16511 +;;;;;; 32481)) ;;; Generated autoloads from mouse-sel.el (defvar mouse-sel-mode nil "\ @@ -14860,7 +15362,7 @@ primary selection and region. ;;;*** -;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (16066 53440)) +;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (16511 32594)) ;;; Generated autoloads from play/mpuz.el (autoload (quote mpuz) "mpuz" "\ @@ -14870,7 +15372,7 @@ Multiplication puzzle with GNU Emacs. ;;;*** -;;;### (autoloads (msb-mode) "msb" "msb.el" (15941 42956)) +;;;### (autoloads (msb-mode) "msb" "msb.el" (16511 32482)) ;;; Generated autoloads from msb.el (defvar msb-mode nil "\ @@ -14896,7 +15398,7 @@ different buffer menu using the function `msb'. ;;;;;; list-coding-systems describe-current-coding-system describe-current-coding-system-briefly ;;;;;; describe-coding-system describe-character-set list-charset-chars ;;;;;; read-charset list-character-sets) "mule-diag" "international/mule-diag.el" -;;;;;; (16194 5746)) +;;;;;; (16508 53932)) ;;; Generated autoloads from international/mule-diag.el (autoload (quote list-character-sets) "mule-diag" "\ @@ -15034,12 +15536,13 @@ The list is null if CHAR isn't found in `unicodedata-file'. ;;;*** -;;;### (autoloads (detect-coding-with-language-environment detect-coding-with-priority -;;;;;; with-coding-priority coding-system-equal coding-system-translation-table-for-encode -;;;;;; coding-system-translation-table-for-decode coding-system-pre-write-conversion -;;;;;; coding-system-post-read-conversion lookup-nested-alist set-nested-alist -;;;;;; truncate-string-to-width store-substring string-to-sequence) -;;;;;; "mule-util" "international/mule-util.el" (16182 61069)) +;;;### (autoloads (char-displayable-p detect-coding-with-language-environment +;;;;;; detect-coding-with-priority with-coding-priority coding-system-equal +;;;;;; coding-system-translation-table-for-encode coding-system-translation-table-for-decode +;;;;;; coding-system-pre-write-conversion coding-system-post-read-conversion +;;;;;; lookup-nested-alist set-nested-alist truncate-string-to-width +;;;;;; store-substring string-to-sequence) "mule-util" "international/mule-util.el" +;;;;;; (16511 31724)) ;;; Generated autoloads from international/mule-util.el (autoload (quote string-to-sequence) "mule-util" "\ @@ -15169,16 +15672,25 @@ coding systems ordered by priority. \(fn FROM TO PRIORITY-LIST)" nil (quote macro)) (autoload (quote detect-coding-with-language-environment) "mule-util" "\ -Detect a coding system of the text between FROM and TO with LANG-ENV. +Detect a coding system for the text between FROM and TO with LANG-ENV. The detection takes into account the coding system priorities for the language environment LANG-ENV. \(fn FROM TO LANG-ENV)" nil nil) +(autoload (quote char-displayable-p) "mule-util" "\ +Return non-nil if we should be able to display CHAR. +On a multi-font display, the test is only whether there is an +appropriate font from the selected frame's fontset to display CHAR's +charset in general. Since fonts may be specified on a per-character +basis, this may not be accurate. + +\(fn CHAR)" nil nil) + ;;;*** ;;;### (autoloads (mwheel-install mouse-wheel-mode) "mwheel" "mwheel.el" -;;;;;; (16111 41826)) +;;;;;; (16511 32482)) ;;; Generated autoloads from mwheel.el (defvar mouse-wheel-mode nil "\ @@ -15206,7 +15718,7 @@ Enable mouse wheel support. ;;;### (autoloads (network-connection network-connection-to-service ;;;;;; whois-reverse-lookup whois finger ftp dig dns-lookup-host ;;;;;; nslookup nslookup-host route arp netstat ipconfig ping traceroute) -;;;;;; "net-utils" "net/net-utils.el" (16011 28193)) +;;;;;; "net-utils" "net/net-utils.el" (16511 32586)) ;;; Generated autoloads from net/net-utils.el (autoload (quote traceroute) "net-utils" "\ @@ -15301,7 +15813,7 @@ Open a network connection to HOST on PORT. ;;;;;; comment-region uncomment-region comment-kill comment-set-column ;;;;;; comment-indent comment-indent-default comment-normalize-vars ;;;;;; comment-multi-line comment-padding comment-style comment-column) -;;;;;; "newcomment" "newcomment.el" (16136 53054)) +;;;;;; "newcomment" "newcomment.el" (16511 32482)) ;;; Generated autoloads from newcomment.el (defalias (quote indent-for-comment) (quote comment-indent)) @@ -15350,6 +15862,13 @@ the comment's starting delimiter and should return either the desired column indentation or nil. If nil is returned, indentation is delegated to `indent-according-to-mode'.") +(defvar comment-insert-comment-function nil "\ +Function to insert a comment when a line doesn't contain one. +The function has no args. + +Applicable at least in modes for languages like fixed-format Fortran where +comments always start in column zero.") + (defvar comment-style (quote plain) "\ *Style to be used for `comment-region'. See `comment-styles' for a list of available styles.") @@ -15386,7 +15905,7 @@ Default for `comment-indent-function'. \(fn)" nil nil) (autoload (quote comment-indent) "newcomment" "\ -Indent this line's comment to comment column, or insert an empty comment. +Indent this line's comment to `comment-column', or insert an empty comment. If CONTINUE is non-nil, use the `comment-continue' markers if any. \(fn &optional CONTINUE)" t nil) @@ -15464,8 +15983,8 @@ unless optional argument SOFT is non-nil. ;;;*** -;;;### (autoloads (nndoc-add-type) "nndoc" "gnus/nndoc.el" (15941 -;;;;;; 42960)) +;;;### (autoloads (nndoc-add-type) "nndoc" "gnus/nndoc.el" (16464 +;;;;;; 65087)) ;;; Generated autoloads from gnus/nndoc.el (autoload (quote nndoc-add-type) "nndoc" "\ @@ -15480,7 +15999,7 @@ symbol in the alist. ;;;*** ;;;### (autoloads (nnfolder-generate-active-file) "nnfolder" "gnus/nnfolder.el" -;;;;;; (15997 671)) +;;;;;; (16464 65087)) ;;; Generated autoloads from gnus/nnfolder.el (autoload (quote nnfolder-generate-active-file) "nnfolder" "\ @@ -15492,7 +16011,7 @@ This command does not work if you use short group names. ;;;*** ;;;### (autoloads (nnkiboze-generate-groups) "nnkiboze" "gnus/nnkiboze.el" -;;;;;; (15941 42960)) +;;;;;; (16464 65087)) ;;; Generated autoloads from gnus/nnkiboze.el (autoload (quote nnkiboze-generate-groups) "nnkiboze" "\ @@ -15504,7 +16023,7 @@ Finds out what articles are to be part of the nnkiboze groups. ;;;*** ;;;### (autoloads (nnml-generate-nov-databases) "nnml" "gnus/nnml.el" -;;;;;; (15941 42960)) +;;;;;; (16464 65087)) ;;; Generated autoloads from gnus/nnml.el (autoload (quote nnml-generate-nov-databases) "nnml" "\ @@ -15515,7 +16034,7 @@ Generate NOV databases in all nnml directories. ;;;*** ;;;### (autoloads (nnsoup-revert-variables nnsoup-set-variables nnsoup-pack-replies) -;;;;;; "nnsoup" "gnus/nnsoup.el" (15941 42960)) +;;;;;; "nnsoup" "gnus/nnsoup.el" (16464 65087)) ;;; Generated autoloads from gnus/nnsoup.el (autoload (quote nnsoup-pack-replies) "nnsoup" "\ @@ -15536,7 +16055,7 @@ Revert posting and mailing methods to the standard Emacs methods. ;;;*** ;;;### (autoloads (disable-command enable-command disabled-command-hook) -;;;;;; "novice" "novice.el" (15513 43128)) +;;;;;; "novice" "novice.el" (16511 32482)) ;;; Generated autoloads from novice.el (defvar disabled-command-hook (quote disabled-command-hook) "\ @@ -15565,7 +16084,7 @@ to future sessions. ;;;*** ;;;### (autoloads (nroff-mode) "nroff-mode" "textmodes/nroff-mode.el" -;;;;;; (15924 18776)) +;;;;;; (16511 32639)) ;;; Generated autoloads from textmodes/nroff-mode.el (autoload (quote nroff-mode) "nroff-mode" "\ @@ -15580,7 +16099,7 @@ closing requests for requests that are used in matched pairs. ;;;*** ;;;### (autoloads (octave-help) "octave-hlp" "progmodes/octave-hlp.el" -;;;;;; (15941 42965)) +;;;;;; (16511 32624)) ;;; Generated autoloads from progmodes/octave-hlp.el (autoload (quote octave-help) "octave-hlp" "\ @@ -15594,7 +16113,7 @@ If KEY is not a string, prompt for it with completion. ;;;*** ;;;### (autoloads (inferior-octave) "octave-inf" "progmodes/octave-inf.el" -;;;;;; (15941 42965)) +;;;;;; (16511 32624)) ;;; Generated autoloads from progmodes/octave-inf.el (autoload (quote inferior-octave) "octave-inf" "\ @@ -15617,7 +16136,7 @@ startup file, `~/.emacs-octave'. ;;;*** ;;;### (autoloads (octave-mode) "octave-mod" "progmodes/octave-mod.el" -;;;;;; (15941 42965)) +;;;;;; (16511 32624)) ;;; Generated autoloads from progmodes/octave-mod.el (autoload (quote octave-mode) "octave-mod" "\ @@ -15716,7 +16235,7 @@ including a reproducible test case and send the message. ;;;*** ;;;### (autoloads (edit-options list-options) "options" "obsolete/options.el" -;;;;;; (16087 59373)) +;;;;;; (16511 32590)) ;;; Generated autoloads from obsolete/options.el (autoload (quote list-options) "options" "\ @@ -15738,7 +16257,7 @@ The Custom feature is intended to make this obsolete. ;;;*** ;;;### (autoloads (outline-minor-mode outline-mode) "outline" "outline.el" -;;;;;; (16168 11508)) +;;;;;; (16511 32482)) ;;; Generated autoloads from outline.el (autoload (quote outline-mode) "outline" "\ @@ -15793,7 +16312,7 @@ See the command `outline-mode' for more information on this mode. ;;;*** -;;;### (autoloads (show-paren-mode) "paren" "paren.el" (15941 42956)) +;;;### (autoloads (show-paren-mode) "paren" "paren.el" (16511 32482)) ;;; Generated autoloads from paren.el (defvar show-paren-mode nil "\ @@ -15816,8 +16335,21 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time. ;;;*** -;;;### (autoloads (pascal-mode) "pascal" "progmodes/pascal.el" (15941 -;;;;;; 42965)) +;;;### (autoloads (parse-time-string) "parse-time" "calendar/parse-time.el" +;;;;;; (16511 32531)) +;;; Generated autoloads from calendar/parse-time.el + +(autoload (quote parse-time-string) "parse-time" "\ +Parse the time-string STRING into (SEC MIN HOUR DAY MON YEAR DOW DST TZ). +The values are identical to those of `decode-time', but any values that are +unknown are returned as nil. + +\(fn STRING)" nil nil) + +;;;*** + +;;;### (autoloads (pascal-mode) "pascal" "progmodes/pascal.el" (16511 +;;;;;; 32625)) ;;; Generated autoloads from progmodes/pascal.el (autoload (quote pascal-mode) "pascal" "\ @@ -15870,7 +16402,7 @@ no args, if that value is non-nil. ;;;*** ;;;### (autoloads (pc-bindings-mode) "pc-mode" "emulation/pc-mode.el" -;;;;;; (15223 38063)) +;;;;;; (16511 32550)) ;;; Generated autoloads from emulation/pc-mode.el (autoload (quote pc-bindings-mode) "pc-mode" "\ @@ -15888,7 +16420,7 @@ C-Escape does list-buffers. ;;;*** ;;;### (autoloads (pc-selection-mode pc-selection-mode) "pc-select" -;;;;;; "emulation/pc-select.el" (15941 42958)) +;;;;;; "emulation/pc-select.el" (16511 32550)) ;;; Generated autoloads from emulation/pc-select.el (defvar pc-selection-mode nil "\ @@ -15962,8 +16494,8 @@ You must modify via \\[customize] for this variable to have an effect.") ;;;*** -;;;### (autoloads (pcomplete/cvs) "pcmpl-cvs" "pcmpl-cvs.el" (15678 -;;;;;; 51468)) +;;;### (autoloads (pcomplete/cvs) "pcmpl-cvs" "pcmpl-cvs.el" (16511 +;;;;;; 32483)) ;;; Generated autoloads from pcmpl-cvs.el (autoload (quote pcomplete/cvs) "pcmpl-cvs" "\ @@ -15974,7 +16506,7 @@ Completion rules for the `cvs' command. ;;;*** ;;;### (autoloads (pcomplete/tar pcomplete/make pcomplete/bzip2 pcomplete/gzip) -;;;;;; "pcmpl-gnu" "pcmpl-gnu.el" (15186 43679)) +;;;;;; "pcmpl-gnu" "pcmpl-gnu.el" (16511 32483)) ;;; Generated autoloads from pcmpl-gnu.el (autoload (quote pcomplete/gzip) "pcmpl-gnu" "\ @@ -16002,7 +16534,7 @@ Completion for the GNU tar utility. ;;;*** ;;;### (autoloads (pcomplete/mount pcomplete/umount pcomplete/kill) -;;;;;; "pcmpl-linux" "pcmpl-linux.el" (15186 43679)) +;;;;;; "pcmpl-linux" "pcmpl-linux.el" (16511 32483)) ;;; Generated autoloads from pcmpl-linux.el (autoload (quote pcomplete/kill) "pcmpl-linux" "\ @@ -16022,8 +16554,8 @@ Completion for GNU/Linux `mount'. ;;;*** -;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (15186 -;;;;;; 43679)) +;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (16511 +;;;;;; 32483)) ;;; Generated autoloads from pcmpl-rpm.el (autoload (quote pcomplete/rpm) "pcmpl-rpm" "\ @@ -16039,7 +16571,7 @@ You can use \\[eshell-report-bug] to do so. ;;;### (autoloads (pcomplete/chgrp pcomplete/chown pcomplete/which ;;;;;; pcomplete/xargs pcomplete/rm pcomplete/rmdir pcomplete/cd) -;;;;;; "pcmpl-unix" "pcmpl-unix.el" (15186 43679)) +;;;;;; "pcmpl-unix" "pcmpl-unix.el" (16511 32483)) ;;; Generated autoloads from pcmpl-unix.el (autoload (quote pcomplete/cd) "pcmpl-unix" "\ @@ -16085,8 +16617,8 @@ Completion for the `chgrp' command. ;;;### (autoloads (pcomplete-shell-setup pcomplete-comint-setup pcomplete-list ;;;;;; pcomplete-help pcomplete-expand pcomplete-continue pcomplete-expand-and-complete -;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (15941 -;;;;;; 42956)) +;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (16511 +;;;;;; 32484)) ;;; Generated autoloads from pcomplete.el (autoload (quote pcomplete) "pcomplete" "\ @@ -16145,7 +16677,7 @@ Setup shell-mode to use pcomplete. ;;;### (autoloads (cvs-dired-use-hook cvs-dired-action cvs-status ;;;;;; cvs-update cvs-examine cvs-quickdir cvs-checkout) "pcvs" -;;;;;; "pcvs.el" (16111 41826)) +;;;;;; "pcvs.el" (16511 32485)) ;;; Generated autoloads from pcvs.el (autoload (quote cvs-checkout) "pcvs" "\ @@ -16222,7 +16754,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (when (stringp d ;;;*** -;;;### (autoloads nil "pcvs-defs" "pcvs-defs.el" (16111 41826)) +;;;### (autoloads nil "pcvs-defs" "pcvs-defs.el" (16511 32484)) ;;; Generated autoloads from pcvs-defs.el (defvar cvs-global-menu (let ((m (make-sparse-keymap "PCL-CVS"))) (define-key m [status] (quote (menu-item "Directory Status" cvs-status :help "A more verbose status of a workarea"))) (define-key m [checkout] (quote (menu-item "Checkout Module" cvs-checkout :help "Check out a module from the repository"))) (define-key m [update] (quote (menu-item "Update Directory" cvs-update :help "Fetch updates from the repository"))) (define-key m [examine] (quote (menu-item "Examine Directory" cvs-examine :help "Examine the current state of a workarea"))) (fset (quote cvs-global-menu) m))) @@ -16230,7 +16762,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (when (stringp d ;;;*** ;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el" -;;;;;; (16111 41834)) +;;;;;; (16511 32625)) ;;; Generated autoloads from progmodes/perl-mode.el (autoload (quote perl-mode) "perl-mode" "\ @@ -16286,7 +16818,7 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'. ;;;*** ;;;### (autoloads (picture-mode) "picture" "textmodes/picture.el" -;;;;;; (15924 18776)) +;;;;;; (16511 32639)) ;;; Generated autoloads from textmodes/picture.el (autoload (quote picture-mode) "picture" "\ @@ -16358,7 +16890,7 @@ they are not defaultly assigned to keys. ;;;*** ;;;### (autoloads (po-find-file-coding-system) "po" "textmodes/po.el" -;;;;;; (16148 4633)) +;;;;;; (16511 32639)) ;;; Generated autoloads from textmodes/po.el (autoload (quote po-find-file-coding-system) "po" "\ @@ -16369,7 +16901,7 @@ Called through `file-coding-system-alist', before the file is visited for real. ;;;*** -;;;### (autoloads (pong) "pong" "play/pong.el" (15941 42963)) +;;;### (autoloads (pong) "pong" "play/pong.el" (16511 32594)) ;;; Generated autoloads from play/pong.el (autoload (quote pong) "pong" "\ @@ -16386,7 +16918,7 @@ pong-mode keybindings:\\ ;;;*** ;;;### (autoloads (pp-eval-last-sexp pp-eval-expression pp pp-to-string) -;;;;;; "pp" "emacs-lisp/pp.el" (15941 42958)) +;;;;;; "pp" "emacs-lisp/pp.el" (16511 32545)) ;;; Generated autoloads from emacs-lisp/pp.el (autoload (quote pp-to-string) "pp" "\ @@ -16439,15 +16971,15 @@ Ignores leading comment characters. ;;;;;; pr-ps-buffer-print pr-ps-buffer-using-ghostscript pr-ps-buffer-preview ;;;;;; pr-ps-directory-ps-print pr-ps-directory-print pr-ps-directory-using-ghostscript ;;;;;; pr-ps-directory-preview pr-interface) "printing" "printing.el" -;;;;;; (15997 671)) +;;;;;; (16511 32487)) ;;; Generated autoloads from printing.el (autoload (quote pr-interface) "printing" "\ Activate the printing interface buffer. -If BUFFER is nil, it uses the current buffer for printing. +If BUFFER is nil, the current buffer is used for printing. -For more informations, type \\[pr-interface-help]. +For more information, type \\[pr-interface-help]. \(fn &optional BUFFER)" t nil) @@ -16891,32 +17423,32 @@ Toggle auto mode. \(fn)" t nil) (autoload (quote pr-customize) "printing" "\ -Customization of `printing' group. +Customization of the `printing' group. \(fn &rest IGNORE)" t nil) (autoload (quote lpr-customize) "printing" "\ -Customization of `lpr' group. +Customization of the `lpr' group. \(fn &rest IGNORE)" t nil) (autoload (quote pr-help) "printing" "\ -Help for printing package. +Help for the printing package. \(fn &rest IGNORE)" t nil) (autoload (quote pr-ps-name) "printing" "\ -Select interactively a PostScript printer. +Interactively select a PostScript printer. \(fn)" t nil) (autoload (quote pr-txt-name) "printing" "\ -Select interactively a text printer. +Interactively select a text printer. \(fn)" t nil) (autoload (quote pr-ps-utility) "printing" "\ -Select interactively a PostScript utility. +Interactively select a PostScript utility. \(fn)" t nil) @@ -17027,7 +17559,7 @@ are both set to t. ;;;*** ;;;### (autoloads (run-prolog prolog-mode) "prolog" "progmodes/prolog.el" -;;;;;; (15611 12634)) +;;;;;; (16511 32625)) ;;; Generated autoloads from progmodes/prolog.el (autoload (quote prolog-mode) "prolog" "\ @@ -17047,7 +17579,7 @@ Run an inferior Prolog process, input and output via buffer *prolog*. ;;;*** -;;;### (autoloads nil "ps-bdf" "ps-bdf.el" (16148 4633)) +;;;### (autoloads nil "ps-bdf" "ps-bdf.el" (16511 32487)) ;;; Generated autoloads from ps-bdf.el (defvar bdf-directory-list (if (memq system-type (quote (ms-dos windows-nt))) (list (expand-file-name "fonts/bdf" installation-directory)) (quote ("/usr/local/share/emacs/fonts/bdf"))) "\ @@ -17056,8 +17588,8 @@ The default value is '(\"/usr/local/share/emacs/fonts/bdf\").") ;;;*** -;;;### (autoloads (ps-mode) "ps-mode" "progmodes/ps-mode.el" (16111 -;;;;;; 41834)) +;;;### (autoloads (ps-mode) "ps-mode" "progmodes/ps-mode.el" (16511 +;;;;;; 32625)) ;;; Generated autoloads from progmodes/ps-mode.el (autoload (quote ps-mode) "ps-mode" "\ @@ -17103,10 +17635,8 @@ Typing \\\\[ps-run-goto-error] when the cursor is at the number ;;;*** -;;;### (autoloads (ps-mule-begin-page ps-mule-begin-job ps-mule-header-string-charsets -;;;;;; ps-mule-encode-header-string ps-mule-initialize ps-mule-plot-composition -;;;;;; ps-mule-plot-string ps-mule-set-ascii-font ps-mule-prepare-ascii-font -;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" (16085 62843)) +;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize +;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" (16511 32487)) ;;; Generated autoloads from ps-mule.el (defvar ps-multibyte-buffer nil "\ @@ -17154,74 +17684,19 @@ Any other value is treated as nil.") (custom-autoload (quote ps-multibyte-buffer) "ps-mule") -(autoload (quote ps-mule-prepare-ascii-font) "ps-mule" "\ -Setup special ASCII font for STRING. -STRING should contain only ASCII characters. - -\(fn STRING)" nil nil) - -(autoload (quote ps-mule-set-ascii-font) "ps-mule" "\ -Not documented - -\(fn)" nil nil) - -(autoload (quote ps-mule-plot-string) "ps-mule" "\ -Generate PostScript code for plotting characters in the region FROM and TO. - -It is assumed that all characters in this region belong to the same charset. - -Optional argument BG-COLOR specifies background color. - -Returns the value: - - (ENDPOS . RUN-WIDTH) - -Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of -the sequence. - -\(fn FROM TO &optional BG-COLOR)" nil nil) - -(autoload (quote ps-mule-plot-composition) "ps-mule" "\ -Generate PostScript code for plotting composition in the region FROM and TO. - -It is assumed that all characters in this region belong to the same -composition. - -Optional argument BG-COLOR specifies background color. - -Returns the value: - - (ENDPOS . RUN-WIDTH) - -Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of -the sequence. - -\(fn FROM TO &optional BG-COLOR)" nil nil) - (autoload (quote ps-mule-initialize) "ps-mule" "\ Initialize global data for printing multi-byte characters. \(fn)" nil nil) -(autoload (quote ps-mule-encode-header-string) "ps-mule" "\ -Generate PostScript code for ploting STRING by font FONTTAG. -FONTTAG should be a string \"/h0\" or \"/h1\". - -\(fn STRING FONTTAG)" nil nil) - -(autoload (quote ps-mule-header-string-charsets) "ps-mule" "\ -Return a list of character sets that appears in header strings. - -\(fn)" nil nil) - (autoload (quote ps-mule-begin-job) "ps-mule" "\ Start printing job for multi-byte chars between FROM and TO. This checks if all multi-byte characters in the region are printable or not. \(fn FROM TO)" nil nil) -(autoload (quote ps-mule-begin-page) "ps-mule" "\ -Not documented +(autoload (quote ps-mule-end-job) "ps-mule" "\ +Finish printing job for multi-byte chars. \(fn)" nil nil) @@ -17232,8 +17707,8 @@ Not documented ;;;;;; ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer ;;;;;; ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces ;;;;;; ps-print-buffer ps-print-customize ps-print-color-p ps-paper-type -;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (16148 -;;;;;; 4633)) +;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (16511 +;;;;;; 32489)) ;;; Generated autoloads from ps-print.el (defvar ps-page-dimensions-database (list (list (quote a4) (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list (quote a3) (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list (quote letter) (* 72 8.5) (* 72 11.0) "Letter") (list (quote legal) (* 72 8.5) (* 72 14.0) "Legal") (list (quote letter-small) (* 72 7.68) (* 72 10.16) "LetterSmall") (list (quote tabloid) (* 72 11.0) (* 72 17.0) "Tabloid") (list (quote ledger) (* 72 17.0) (* 72 11.0) "Ledger") (list (quote statement) (* 72 5.5) (* 72 8.5) "Statement") (list (quote executive) (* 72 7.5) (* 72 10.0) "Executive") (list (quote a4small) (* 72 7.47) (* 72 10.85) "A4Small") (list (quote b4) (* 72 10.125) (* 72 14.33) "B4") (list (quote b5) (* 72 7.16) (* 72 10.125) "B5")) "\ @@ -17429,11 +17904,75 @@ If EXTENSION is any other symbol, it is ignored. ;;;*** +;;;### (autoloads (jython-mode python-mode run-python) "python" "progmodes/python.el" +;;;;;; (16511 32626)) +;;; Generated autoloads from progmodes/python.el + +(add-to-list (quote interpreter-mode-alist) (quote ("jython" . jython-mode))) + +(add-to-list (quote interpreter-mode-alist) (quote ("python" . python-mode))) + +(add-to-list (quote auto-mode-alist) (quote ("\\.py\\'" . python-mode))) + +(autoload (quote run-python) "python" "\ +Run an inferior Python process, input and output via buffer *Python*. +CMD is the Python command to run. NOSHOW non-nil means don't show the +buffer automatically. +If there is a process already running in `*Python*', switch to +that buffer. Interactively a prefix arg, allows you to edit the initial +command line (default is the value of `python-command'); `-i' etc. args +will be added to this as appropriate. Runs the hooks +`inferior-python-mode-hook' (after the `comint-mode-hook' is run). +\(Type \\[describe-mode] in the process buffer for a list of commands.) + +\(fn &optional CMD NOSHOW)" t nil) + +(autoload (quote python-mode) "python" "\ +Major mode for editing Python files. +Turns on Font Lock mode unconditionally since it is required for correct +parsing of the source. +See also `jython-mode', which is actually invoked if the buffer appears to +contain Jython code. See also `run-python' and associated Python mode +commands for running Python under Emacs. + +The Emacs commands which work with `defun's, e.g. \\[beginning-of-defun], deal +with nested `def' and `class' blocks. They take the innermost one as +current without distinguishing method and class definitions. Used multiple +times, they move over others at the same indentation level until they reach +the end of definitions at that level, when they move up a level. +\\ +Colon is electric: it outdents the line if appropriate, e.g. for +an else statement. \\[python-backspace] at the beginning of an indented statement +deletes a level of indentation to close the current block; otherwise it +deletes a charcter backward. TAB indents the current line relative to +the preceding code. Successive TABs, with no intervening command, cycle +through the possibilities for indentation on the basis of enclosing blocks. + +\\[fill-paragraph] fills comments and multiline strings appropriately, but has no +effect outside them. + +Supports Eldoc mode (only for functions, using a Python process), +Info-Look and Imenu. In Outline minor mode, `class' and `def' +lines count as headers. + +\\{python-mode-map} + +\(fn)" t nil) + +(autoload (quote jython-mode) "python" "\ +Major mode for editing Jython files. +Like `python-mode', but sets up parameters for Jython subprocesses. +Runs `jython-mode-hook' after `python-mode-hook'. + +\(fn)" t nil) + +;;;*** + ;;;### (autoloads (quail-update-leim-list-file quail-defrule-internal ;;;;;; quail-defrule quail-install-decode-map quail-install-map ;;;;;; quail-define-rules quail-show-keyboard-layout quail-set-keyboard-layout ;;;;;; quail-define-package quail-use-package quail-title) "quail" -;;;;;; "international/quail.el" (16183 19626)) +;;;;;; "international/quail.el" (16511 30645)) ;;; Generated autoloads from international/quail.el (autoload (quote quail-title) "quail" "\ @@ -17664,8 +18203,8 @@ of each directory. ;;;### (autoloads (quickurl-list quickurl-list-mode quickurl-edit-urls ;;;;;; quickurl-browse-url-ask quickurl-browse-url quickurl-add-url -;;;;;; quickurl-ask quickurl) "quickurl" "net/quickurl.el" (15941 -;;;;;; 42963)) +;;;;;; quickurl-ask quickurl) "quickurl" "net/quickurl.el" (16511 +;;;;;; 32586)) ;;; Generated autoloads from net/quickurl.el (defconst quickurl-reread-hook-postfix "\n;; Local Variables:\n;; eval: (progn (require 'quickurl) (add-hook 'local-write-file-hooks (lambda () (quickurl-read) nil)))\n;; End:\n" "\ @@ -17736,8 +18275,8 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'. ;;;*** -;;;### (autoloads (remote-compile) "rcompile" "net/rcompile.el" (15941 -;;;;;; 42963)) +;;;### (autoloads (remote-compile) "rcompile" "net/rcompile.el" (16511 +;;;;;; 32586)) ;;; Generated autoloads from net/rcompile.el (autoload (quote remote-compile) "rcompile" "\ @@ -17749,7 +18288,7 @@ See \\[compile]. ;;;*** ;;;### (autoloads (re-builder) "re-builder" "emacs-lisp/re-builder.el" -;;;;;; (15941 42958)) +;;;;;; (16511 32545)) ;;; Generated autoloads from emacs-lisp/re-builder.el (autoload (quote re-builder) "re-builder" "\ @@ -17759,7 +18298,7 @@ Call up the RE Builder for the current window. ;;;*** -;;;### (autoloads (recentf-mode) "recentf" "recentf.el" (16055 8591)) +;;;### (autoloads (recentf-mode) "recentf" "recentf.el" (16511 33042)) ;;; Generated autoloads from recentf.el (defvar recentf-mode nil "\ @@ -17785,8 +18324,8 @@ that were operated on recently. ;;;### (autoloads (clear-rectangle string-insert-rectangle string-rectangle ;;;;;; delete-whitespace-rectangle open-rectangle insert-rectangle ;;;;;; yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle -;;;;;; delete-rectangle move-to-column-force) "rect" "rect.el" (15941 -;;;;;; 42956)) +;;;;;; delete-rectangle move-to-column-force) "rect" "rect.el" (16511 +;;;;;; 32489)) ;;; Generated autoloads from rect.el (autoload (quote move-to-column-force) "rect" "\ @@ -17908,8 +18447,8 @@ rectangle which were empty. ;;;*** -;;;### (autoloads (refill-mode) "refill" "textmodes/refill.el" (16111 -;;;;;; 41838)) +;;;### (autoloads (refill-mode) "refill" "textmodes/refill.el" (16511 +;;;;;; 32640)) ;;; Generated autoloads from textmodes/refill.el (autoload (quote refill-mode) "refill" "\ @@ -17924,8 +18463,8 @@ refilling if they would cause auto-filling. ;;;*** -;;;### (autoloads (reftex-scanning-info-available-p reftex-mode turn-on-reftex) -;;;;;; "reftex" "textmodes/reftex.el" (16142 9352)) +;;;### (autoloads (reftex-reset-scanning-information reftex-mode +;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (16511 32643)) ;;; Generated autoloads from textmodes/reftex.el (autoload (quote turn-on-reftex) "reftex" "\ @@ -17966,15 +18505,16 @@ on the menu bar. \(fn &optional ARG)" t nil) -(autoload (quote reftex-scanning-info-available-p) "reftex" "\ -Is the scanning info about the current document available? +(autoload (quote reftex-reset-scanning-information) "reftex" "\ +Reset the symbols containing information from buffer scanning. +This enforces rescanning the buffer on next use. \(fn)" nil nil) ;;;*** ;;;### (autoloads (reftex-citation) "reftex-cite" "textmodes/reftex-cite.el" -;;;;;; (16070 35808)) +;;;;;; (16511 32640)) ;;; Generated autoloads from textmodes/reftex-cite.el (autoload (quote reftex-citation) "reftex-cite" "\ @@ -18003,7 +18543,7 @@ While entering the regexp, completion on knows citation keys is possible. ;;;*** ;;;### (autoloads (reftex-index-phrases-mode) "reftex-index" "textmodes/reftex-index.el" -;;;;;; (15941 42966)) +;;;;;; (16511 32641)) ;;; Generated autoloads from textmodes/reftex-index.el (autoload (quote reftex-index-phrases-mode) "reftex-index" "\ @@ -18036,7 +18576,7 @@ Here are all local bindings. ;;;*** ;;;### (autoloads (reftex-all-document-files) "reftex-parse" "textmodes/reftex-parse.el" -;;;;;; (16142 9352)) +;;;;;; (16511 32641)) ;;; Generated autoloads from textmodes/reftex-parse.el (autoload (quote reftex-all-document-files) "reftex-parse" "\ @@ -18049,7 +18589,7 @@ of master file. ;;;*** ;;;### (autoloads (regexp-opt-depth regexp-opt) "regexp-opt" "emacs-lisp/regexp-opt.el" -;;;;;; (16179 16744)) +;;;;;; (16511 32545)) ;;; Generated autoloads from emacs-lisp/regexp-opt.el (autoload (quote regexp-opt) "regexp-opt" "\ @@ -18076,7 +18616,7 @@ in REGEXP. ;;;*** -;;;### (autoloads (repeat) "repeat" "repeat.el" (15941 42956)) +;;;### (autoloads (repeat) "repeat" "repeat.el" (16511 32489)) ;;; Generated autoloads from repeat.el (autoload (quote repeat) "repeat" "\ @@ -18094,7 +18634,7 @@ can be modified by the global variable `repeat-on-final-keystroke'. ;;;*** ;;;### (autoloads (reporter-submit-bug-report) "reporter" "mail/reporter.el" -;;;;;; (15356 55960)) +;;;;;; (16511 32572)) ;;; Generated autoloads from mail/reporter.el (autoload (quote reporter-submit-bug-report) "reporter" "\ @@ -18126,7 +18666,7 @@ mail-sending package is used for editing and sending the message. ;;;*** ;;;### (autoloads (reposition-window) "reposition" "reposition.el" -;;;;;; (15364 46020)) +;;;;;; (16511 32490)) ;;; Generated autoloads from reposition.el (autoload (quote reposition-window) "reposition" "\ @@ -18153,8 +18693,8 @@ first comment line visible (if point is in a comment). ;;;*** -;;;### (autoloads (resume-suspend-hook) "resume" "resume.el" (15941 -;;;;;; 42956)) +;;;### (autoloads (resume-suspend-hook) "resume" "resume.el" (16511 +;;;;;; 32490)) ;;; Generated autoloads from resume.el (autoload (quote resume-suspend-hook) "resume" "\ @@ -18165,7 +18705,7 @@ Clear out the file used for transmitting args when Emacs resumes. ;;;*** ;;;### (autoloads (global-reveal-mode reveal-mode) "reveal" "reveal.el" -;;;;;; (16054 60749)) +;;;;;; (16511 32490)) ;;; Generated autoloads from reveal.el (autoload (quote reveal-mode) "reveal" "\ @@ -18200,7 +18740,7 @@ With zero or negative ARG turn mode off. ;;;### (autoloads (file-name-shadow-mode file-name-shadow-tty-properties ;;;;;; file-name-shadow-properties) "rfn-eshadow" "rfn-eshadow.el" -;;;;;; (15728 55520)) +;;;;;; (16511 32490)) ;;; Generated autoloads from rfn-eshadow.el (defvar file-name-shadow-properties (quote (face file-name-shadow field shadow)) "\ @@ -18243,7 +18783,7 @@ Returns non-nil if the new state is enabled. ;;;*** ;;;### (autoloads (make-ring ring-p) "ring" "emacs-lisp/ring.el" -;;;;;; (16148 4633)) +;;;;;; (16511 32545)) ;;; Generated autoloads from emacs-lisp/ring.el (autoload (quote ring-p) "ring" "\ @@ -18258,7 +18798,7 @@ Make a ring that can contain SIZE elements. ;;;*** -;;;### (autoloads (rlogin) "rlogin" "net/rlogin.el" (16066 53440)) +;;;### (autoloads (rlogin) "rlogin" "net/rlogin.el" (16511 35558)) ;;; Generated autoloads from net/rlogin.el (add-hook 'same-window-regexps "^\\*rlogin-.*\\*\\(\\|<[0-9]+>\\)") @@ -18309,7 +18849,7 @@ variable. ;;;;;; rmail-mail-new-frame rmail-primary-inbox-list rmail-delete-after-output ;;;;;; rmail-highlight-face rmail-highlighted-headers rmail-retry-ignored-headers ;;;;;; rmail-displayed-headers rmail-ignored-headers rmail-dont-reply-to-names) -;;;;;; "rmail" "mail/rmail.el" (16072 11522)) +;;;;;; "rmail" "mail/rmail.el" (16511 32573)) ;;; Generated autoloads from mail/rmail.el (defvar rmail-dont-reply-to-names nil "\ @@ -18319,9 +18859,9 @@ plus whatever is specified by `rmail-default-dont-reply-to-names'.") (custom-autoload (quote rmail-dont-reply-to-names) "rmail") -(defvar rmail-default-dont-reply-to-names "info-" "\ -A regular expression specifying part of the value of the default value of -the variable `rmail-dont-reply-to-names', for when the user does not set +(defvar rmail-default-dont-reply-to-names "\\`info-" "\ +A regular expression specifying part of the default value of the +variable `rmail-dont-reply-to-names', for when the user does not set `rmail-dont-reply-to-names' explicitly. (The other part of the default value is the user's email address and name.) It is useful to set this variable in the site customization file.") @@ -18557,7 +19097,7 @@ Set PASSWORD to be used for retrieving mail from a POP server. ;;;*** ;;;### (autoloads (rmail-edit-current-message) "rmailedit" "mail/rmailedit.el" -;;;;;; (15830 37093)) +;;;;;; (16511 32573)) ;;; Generated autoloads from mail/rmailedit.el (autoload (quote rmail-edit-current-message) "rmailedit" "\ @@ -18569,7 +19109,7 @@ Edit the contents of this message. ;;;### (autoloads (rmail-next-labeled-message rmail-previous-labeled-message ;;;;;; rmail-read-label rmail-kill-label rmail-add-label) "rmailkwd" -;;;;;; "mail/rmailkwd.el" (15186 43692)) +;;;;;; "mail/rmailkwd.el" (16511 32573)) ;;; Generated autoloads from mail/rmailkwd.el (autoload (quote rmail-add-label) "rmailkwd" "\ @@ -18608,7 +19148,7 @@ With prefix argument N moves forward N messages with these labels. ;;;*** ;;;### (autoloads (set-rmail-inbox-list) "rmailmsc" "mail/rmailmsc.el" -;;;;;; (15186 43692)) +;;;;;; (16511 32573)) ;;; Generated autoloads from mail/rmailmsc.el (autoload (quote set-rmail-inbox-list) "rmailmsc" "\ @@ -18622,7 +19162,7 @@ If FILE-NAME is empty, remove any existing inbox list. ;;;### (autoloads (rmail-output-body-to-file rmail-output rmail-fields-not-to-output ;;;;;; rmail-output-to-rmail-file rmail-output-file-alist) "rmailout" -;;;;;; "mail/rmailout.el" (15941 42961)) +;;;;;; "mail/rmailout.el" (16511 32573)) ;;; Generated autoloads from mail/rmailout.el (defvar rmail-output-file-alist nil "\ @@ -18689,8 +19229,8 @@ FILE-NAME defaults, interactively, from the Subject field of the message. ;;;### (autoloads (rmail-sort-by-labels rmail-sort-by-lines rmail-sort-by-correspondent ;;;;;; rmail-sort-by-recipient rmail-sort-by-author rmail-sort-by-subject -;;;;;; rmail-sort-by-date) "rmailsort" "mail/rmailsort.el" (15941 -;;;;;; 42961)) +;;;;;; rmail-sort-by-date) "rmailsort" "mail/rmailsort.el" (16511 +;;;;;; 32573)) ;;; Generated autoloads from mail/rmailsort.el (autoload (quote rmail-sort-by-date) "rmailsort" "\ @@ -18742,7 +19282,7 @@ KEYWORDS is a comma-separated list of labels. ;;;;;; rmail-summary-by-senders rmail-summary-by-topic rmail-summary-by-regexp ;;;;;; rmail-summary-by-recipients rmail-summary-by-labels rmail-summary ;;;;;; rmail-summary-line-count-flag rmail-summary-scroll-between-messages) -;;;;;; "rmailsum" "mail/rmailsum.el" (16025 36884)) +;;;;;; "rmailsum" "mail/rmailsum.el" (16511 32573)) ;;; Generated autoloads from mail/rmailsum.el (defvar rmail-summary-scroll-between-messages t "\ @@ -18824,7 +19364,7 @@ Setting this variable has an effect only before reading a mail.") ;;;*** ;;;### (autoloads (news-post-news) "rnewspost" "obsolete/rnewspost.el" -;;;;;; (15941 42963)) +;;;;;; (16511 32591)) ;;; Generated autoloads from obsolete/rnewspost.el (autoload (quote news-post-news) "rnewspost" "\ @@ -18837,7 +19377,7 @@ If NOQUERY is non-nil, we do not query before doing the work. ;;;*** ;;;### (autoloads (toggle-rot13-mode rot13-other-window rot13-region -;;;;;; rot13-string rot13) "rot13" "rot13.el" (15941 42956)) +;;;;;; rot13-string rot13) "rot13" "rot13.el" (16511 32490)) ;;; Generated autoloads from rot13.el (autoload (quote rot13) "rot13" "\ @@ -18878,7 +19418,7 @@ Toggle the use of rot 13 encoding for the current window. ;;;;;; resize-minibuffer-frame-max-height resize-minibuffer-frame ;;;;;; resize-minibuffer-window-exactly resize-minibuffer-window-max-height ;;;;;; resize-minibuffer-mode) "rsz-mini" "obsolete/rsz-mini.el" -;;;;;; (15245 60238)) +;;;;;; (16511 35573)) ;;; Generated autoloads from obsolete/rsz-mini.el (defvar resize-minibuffer-mode nil "\ @@ -18918,8 +19458,8 @@ This function is obsolete. ;;;*** -;;;### (autoloads (ruler-mode) "ruler-mode" "ruler-mode.el" (16179 -;;;;;; 11153)) +;;;### (autoloads (ruler-mode) "ruler-mode" "ruler-mode.el" (16511 +;;;;;; 32490)) ;;; Generated autoloads from ruler-mode.el (autoload (quote ruler-mode) "ruler-mode" "\ @@ -18929,8 +19469,8 @@ Display a ruler in the header line if ARG > 0. ;;;*** -;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (15941 -;;;;;; 42958)) +;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (16511 +;;;;;; 32546)) ;;; Generated autoloads from emacs-lisp/rx.el (autoload (quote rx-to-string) "rx" "\ @@ -19077,6 +19617,8 @@ CHAR `character-quote' (\\s/) `comment-start' (\\s<) `comment-end' (\\s>) + `string-delimiter' (\\s|) + `comment-delimiter' (\\s!) `(not (syntax SYNTAX))' matches a character that has not syntax SYNTAX. @@ -19105,6 +19647,7 @@ CHAR `japanese-katakana-two-byte' (\\cK) `korean-hangul-two-byte' (\\cN) `cyrillic-two-byte' (\\cY) + `combining-diacritic' (\\c^) `ascii' (\\ca) `arabic' (\\cb) `chinese' (\\cc) @@ -19144,7 +19687,7 @@ CHAR `(minimal-match SEXP)' produce a non-greedy regexp for SEXP. Normally, regexps matching - zero or more occurrances of something are \"greedy\" in that they + zero or more occurrences of something are \"greedy\" in that they match as much as they can, as long as the overall regexp can still match. A non-greedy regexp matches as little as possible. @@ -19193,19 +19736,25 @@ CHAR `(repeat N M SEXP)' matches N to M occurrences of what SEXP matches. +`(backref N)' + matches what was matched previously by submatch N. + +`(backref N)' + matches what was matched previously by submatch N. + `(eval FORM)' - evaluate FORM and insert result. If result is a string, - `regexp-quote' it. + evaluate FORM and insert result. If result is a string, + `regexp-quote' it. `(regexp REGEXP)' - include REGEXP in string notation in the result. + include REGEXP in string notation in the result. \(fn REGEXP)" nil (quote macro)) ;;;*** ;;;### (autoloads (dsssl-mode scheme-mode) "scheme" "progmodes/scheme.el" -;;;;;; (16054 60750)) +;;;;;; (16511 32626)) ;;; Generated autoloads from progmodes/scheme.el (autoload (quote scheme-mode) "scheme" "\ @@ -19247,7 +19796,7 @@ that variable's value is a string. ;;;*** ;;;### (autoloads (gnus-score-mode) "score-mode" "gnus/score-mode.el" -;;;;;; (14792 28989)) +;;;;;; (16464 65088)) ;;; Generated autoloads from gnus/score-mode.el (autoload (quote gnus-score-mode) "score-mode" "\ @@ -19260,8 +19809,8 @@ This mode is an extended emacs-lisp mode. ;;;*** -;;;### (autoloads (scribe-mode) "scribe" "obsolete/scribe.el" (16087 -;;;;;; 59373)) +;;;### (autoloads (scribe-mode) "scribe" "obsolete/scribe.el" (16511 +;;;;;; 32591)) ;;; Generated autoloads from obsolete/scribe.el (autoload (quote scribe-mode) "scribe" "\ @@ -19286,7 +19835,7 @@ Interesting variables: ;;;*** ;;;### (autoloads (scroll-all-mode) "scroll-all" "scroll-all.el" -;;;;;; (15941 42956)) +;;;;;; (16511 32490)) ;;; Generated autoloads from scroll-all.el (defvar scroll-all-mode nil "\ @@ -19312,7 +19861,7 @@ apply to all visible windows in the same frame. ;;;;;; mail-alias-file mail-default-reply-to mail-archive-file-name ;;;;;; mail-header-separator send-mail-function mail-yank-ignored-headers ;;;;;; mail-interactive mail-self-blind mail-specify-envelope-from -;;;;;; mail-from-style) "sendmail" "mail/sendmail.el" (16183 39073)) +;;;;;; mail-from-style) "sendmail" "mail/sendmail.el" (16511 32574)) ;;; Generated autoloads from mail/sendmail.el (defvar mail-from-style (quote angles) "\ @@ -19337,11 +19886,12 @@ controlled by a separate variable, `mail-specify-envelope-from'.") (defvar mail-specify-envelope-from nil "\ *If non-nil, specify the envelope-from address when sending mail. The value used to specify it is whatever is found in -`mail-envelope-from', with `user-mail-address' as fallback. +the variable `mail-envelope-from', with `user-mail-address' as fallback. On most systems, specifying the envelope-from address is a -privileged operation. This variable is only used if -`send-mail-function' is set to `sendmail-send-it'.") +privileged operation. This variable affects sendmail and +smtpmail -- if you use feedmail to send mail, see instead the +variable `feedmail-deduce-envelope-from'.") (custom-autoload (quote mail-specify-envelope-from) "sendmail") @@ -19519,7 +20069,7 @@ Like `mail' command, but display mail buffer in another frame. ;;;*** ;;;### (autoloads (server-mode server-start) "server" "server.el" -;;;;;; (16162 11942)) +;;;;;; (16511 32490)) ;;; Generated autoloads from server.el (autoload (quote server-start) "server" "\ @@ -19551,11 +20101,12 @@ Server mode runs a process that accepts commands from the ;;;*** -;;;### (autoloads (ses-mode) "ses" "ses.el" (16162 11942)) +;;;### (autoloads (ses-mode) "ses" "ses.el" (16511 32491)) ;;; Generated autoloads from ses.el (autoload (quote ses-mode) "ses" "\ -Major mode for Simple Emacs Spreadsheet. See \"ses-readme.txt\" for more info. +Major mode for Simple Emacs Spreadsheet. +See \"ses-example.ses\" (in the etc data directory) for more info. Key definitions: \\{ses-mode-map} @@ -19569,7 +20120,7 @@ These are active only in the minibuffer, when entering or editing a formula: ;;;*** ;;;### (autoloads (html-mode sgml-mode) "sgml-mode" "textmodes/sgml-mode.el" -;;;;;; (16183 39901)) +;;;;;; (16511 32643)) ;;; Generated autoloads from textmodes/sgml-mode.el (autoload (quote sgml-mode) "sgml-mode" "\ @@ -19637,7 +20188,7 @@ To work around that, do: ;;;*** ;;;### (autoloads (sh-mode) "sh-script" "progmodes/sh-script.el" -;;;;;; (16174 61085)) +;;;;;; (16511 32627)) ;;; Generated autoloads from progmodes/sh-script.el (autoload (quote sh-mode) "sh-script" "\ @@ -19701,7 +20252,7 @@ with your script for an edit-interpret-debug cycle. ;;;*** ;;;### (autoloads (list-load-path-shadows) "shadow" "emacs-lisp/shadow.el" -;;;;;; (15941 42958)) +;;;;;; (16511 32546)) ;;; Generated autoloads from emacs-lisp/shadow.el (autoload (quote list-load-path-shadows) "shadow" "\ @@ -19748,8 +20299,8 @@ buffer called `*Shadows*'. Shadowings are located by calling the ;;;*** ;;;### (autoloads (shadow-initialize shadow-define-regexp-group shadow-define-literal-group -;;;;;; shadow-define-cluster) "shadowfile" "shadowfile.el" (16016 -;;;;;; 56429)) +;;;;;; shadow-define-cluster) "shadowfile" "shadowfile.el" (16511 +;;;;;; 32491)) ;;; Generated autoloads from shadowfile.el (autoload (quote shadow-define-cluster) "shadowfile" "\ @@ -19788,7 +20339,7 @@ Set up file shadowing. ;;;*** ;;;### (autoloads (shell shell-dumb-shell-regexp) "shell" "shell.el" -;;;;;; (16111 41826)) +;;;;;; (16511 32492)) ;;; Generated autoloads from shell.el (defvar shell-dumb-shell-regexp "cmd\\(proxy\\)?\\.exe" "\ @@ -19834,8 +20385,8 @@ Otherwise, one argument `-i' is passed to the shell. ;;;*** -;;;### (autoloads (simula-mode) "simula" "progmodes/simula.el" (15997 -;;;;;; 672)) +;;;### (autoloads (simula-mode) "simula" "progmodes/simula.el" (16511 +;;;;;; 32627)) ;;; Generated autoloads from progmodes/simula.el (autoload (quote simula-mode) "simula" "\ @@ -19884,7 +20435,7 @@ with no arguments, if that value is non-nil. ;;;*** ;;;### (autoloads (skeleton-pair-insert-maybe skeleton-insert skeleton-proxy-new -;;;;;; define-skeleton) "skeleton" "skeleton.el" (16111 41826)) +;;;;;; define-skeleton) "skeleton" "skeleton.el" (16511 32493)) ;;; Generated autoloads from skeleton.el (defvar skeleton-filter (quote identity) "\ @@ -19994,7 +20545,7 @@ symmetrical ones, and the same character twice for the others. ;;;*** ;;;### (autoloads (smerge-mode smerge-ediff) "smerge-mode" "smerge-mode.el" -;;;;;; (15941 42957)) +;;;;;; (16511 33063)) ;;; Generated autoloads from smerge-mode.el (autoload (quote smerge-ediff) "smerge-mode" "\ @@ -20013,7 +20564,7 @@ Minor mode to simplify editing output from the diff3 program. ;;;*** ;;;### (autoloads (smiley-region) "smiley-ems" "gnus/smiley-ems.el" -;;;;;; (15856 53274)) +;;;;;; (16464 65088)) ;;; Generated autoloads from gnus/smiley-ems.el (autoload (quote smiley-region) "smiley-ems" "\ @@ -20027,7 +20578,7 @@ which smileys to operate on and which images to use for them. ;;;*** ;;;### (autoloads (smtpmail-send-queued-mail smtpmail-send-it) "smtpmail" -;;;;;; "mail/smtpmail.el" (16148 4633)) +;;;;;; "mail/smtpmail.el" (16511 32574)) ;;; Generated autoloads from mail/smtpmail.el (autoload (quote smtpmail-send-it) "smtpmail" "\ @@ -20042,7 +20593,7 @@ Send mail that was queued as a result of setting `smtpmail-queue-mail'. ;;;*** -;;;### (autoloads (snake) "snake" "play/snake.el" (15763 44954)) +;;;### (autoloads (snake) "snake" "play/snake.el" (16511 32595)) ;;; Generated autoloads from play/snake.el (autoload (quote snake) "snake" "\ @@ -20066,7 +20617,7 @@ Snake mode keybindings: ;;;*** ;;;### (autoloads (snmpv2-mode snmp-mode) "snmp-mode" "net/snmp-mode.el" -;;;;;; (15491 28594)) +;;;;;; (16511 32586)) ;;; Generated autoloads from net/snmp-mode.el (autoload (quote snmp-mode) "snmp-mode" "\ @@ -20097,7 +20648,7 @@ then `snmpv2-mode-hook'. ;;;### (autoloads (solar-equinoxes-solstices sunrise-sunset calendar-location-name ;;;;;; calendar-longitude calendar-latitude calendar-time-display-form) -;;;;;; "solar" "calendar/solar.el" (16174 61085)) +;;;;;; "solar" "calendar/solar.el" (16511 32531)) ;;; Generated autoloads from calendar/solar.el (defvar calendar-time-display-form (quote (12-hours ":" minutes am-pm (if time-zone " (") time-zone (if time-zone ")"))) "\ @@ -20168,8 +20719,8 @@ Requires floating point. ;;;*** -;;;### (autoloads (solitaire) "solitaire" "play/solitaire.el" (15941 -;;;;;; 42963)) +;;;### (autoloads (solitaire) "solitaire" "play/solitaire.el" (16511 +;;;;;; 32595)) ;;; Generated autoloads from play/solitaire.el (autoload (quote solitaire) "solitaire" "\ @@ -20246,7 +20797,7 @@ Pick your favourite shortcuts: ;;;### (autoloads (reverse-region sort-columns sort-regexp-fields ;;;;;; sort-fields sort-numeric-fields sort-pages sort-paragraphs -;;;;;; sort-lines sort-subr) "sort" "sort.el" (16111 41826)) +;;;;;; sort-lines sort-subr) "sort" "sort.el" (16511 32493)) ;;; Generated autoloads from sort.el (autoload (quote sort-subr) "sort" "\ @@ -20389,7 +20940,7 @@ From a program takes two point or marker arguments, BEG and END. ;;;*** ;;;### (autoloads (speedbar-get-focus speedbar-frame-mode) "speedbar" -;;;;;; "speedbar.el" (15941 42957)) +;;;;;; "speedbar.el" (16511 32494)) ;;; Generated autoloads from speedbar.el (defalias (quote speedbar) (quote speedbar-frame-mode)) @@ -20414,7 +20965,7 @@ selected. If the speedbar frame is active, then select the attached frame. ;;;*** ;;;### (autoloads (spell-string spell-region spell-word spell-buffer) -;;;;;; "spell" "textmodes/spell.el" (15186 43697)) +;;;;;; "spell" "textmodes/spell.el" (16511 32643)) ;;; Generated autoloads from textmodes/spell.el (put (quote spell-filter) (quote risky-local-variable) t) @@ -20450,8 +21001,8 @@ Check spelling of string supplied as argument. ;;;*** -;;;### (autoloads (snarf-spooks spook) "spook" "play/spook.el" (14817 -;;;;;; 31868)) +;;;### (autoloads (snarf-spooks spook) "spook" "play/spook.el" (16511 +;;;;;; 32595)) ;;; Generated autoloads from play/spook.el (autoload (quote spook) "spook" "\ @@ -20468,10 +21019,17 @@ Return a vector containing the lines from `spook-phrases-file'. ;;;### (autoloads (sql-linter sql-db2 sql-interbase sql-postgres ;;;;;; sql-ms sql-ingres sql-solid sql-mysql sql-sqlite sql-informix -;;;;;; sql-sybase sql-oracle sql-mode sql-help) "sql" "progmodes/sql.el" -;;;;;; (16148 4633)) +;;;;;; sql-sybase sql-oracle sql-product-interactive sql-mode sql-help +;;;;;; sql-add-product-keywords) "sql" "progmodes/sql.el" (16511 +;;;;;; 32628)) ;;; Generated autoloads from progmodes/sql.el +(autoload (quote sql-add-product-keywords) "sql" "\ +Append a `font-lock-keywords' entry to the existing entries defined + for the specified `product'. + +\(fn PRODUCT KEYWORDS)" nil nil) + (autoload (quote sql-help) "sql" "\ Show short help for the SQL modes. @@ -20492,6 +21050,7 @@ Other non-free SQL implementations are also supported: Sybase: \\[sql-sybase] Ingres: \\[sql-ingres] Microsoft: \\[sql-ms] + DB2: \\[sql-db2] Interbase: \\[sql-interbase] Linter: \\[sql-linter] @@ -20543,6 +21102,17 @@ you must tell Emacs. Here's how to do that in your `~/.emacs' file: \(fn)" t nil) +(autoload (quote sql-product-interactive) "sql" "\ +Run product interpreter as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.) + +\(fn &optional PRODUCT)" t nil) + (autoload (quote sql-oracle) "sql" "\ Run sqlplus by Oracle as an inferior process. @@ -20725,7 +21295,7 @@ The default comes from `process-coding-system-alist' and \(fn)" t nil) (autoload (quote sql-ms) "sql" "\ -Run isql by Microsoft as an inferior process. +Run osql by Microsoft as an inferior process. If buffer `*SQL*' exists but no process is running, make a new process. If buffer exists and a process is running, just switch to buffer @@ -20857,9 +21427,6 @@ an empty password. The buffer is put in sql-interactive-mode, giving commands for sending input. See `sql-interactive-mode'. -To use LINTER font locking by default, put this line into your .emacs : - (setq sql-mode-font-lock-keywords sql-mode-linter-font-lock-keywords) - \(Type \\[describe-mode] in the SQL buffer for a list of commands.) \(fn)" t nil) @@ -20870,8 +21437,8 @@ To use LINTER font locking by default, put this line into your .emacs : ;;;;;; strokes-mode strokes-list-strokes strokes-load-user-strokes ;;;;;; strokes-help strokes-describe-stroke strokes-do-complex-stroke ;;;;;; strokes-do-stroke strokes-read-complex-stroke strokes-read-stroke -;;;;;; strokes-global-set-stroke) "strokes" "strokes.el" (15961 -;;;;;; 24151)) +;;;;;; strokes-global-set-stroke) "strokes" "strokes.el" (16511 +;;;;;; 32495)) ;;; Generated autoloads from strokes.el (autoload (quote strokes-global-set-stroke) "strokes" "\ @@ -20881,6 +21448,8 @@ COMMAND is a symbol naming an interactively-callable function. STROKE is a list of sampled positions on the stroke grid as described in the documentation for the `strokes-define-stroke' function. +See also `strokes-global-set-stroke-string'. + \(fn STROKE COMMAND)" t nil) (autoload (quote strokes-read-stroke) "strokes" "\ @@ -20978,7 +21547,7 @@ Read a complex stroke and insert its glyph into the current buffer. ;;;*** ;;;### (autoloads (studlify-buffer studlify-word studlify-region) -;;;;;; "studly" "play/studly.el" (15366 772)) +;;;;;; "studly" "play/studly.el" (16511 32595)) ;;; Generated autoloads from play/studly.el (autoload (quote studlify-region) "studly" "\ @@ -20999,7 +21568,7 @@ Studlify-case the current buffer. ;;;*** ;;;### (autoloads (sc-cite-original) "supercite" "mail/supercite.el" -;;;;;; (16111 41831)) +;;;;;; (16511 32574)) ;;; Generated autoloads from mail/supercite.el (autoload (quote sc-cite-original) "supercite" "\ @@ -21031,8 +21600,8 @@ before, and `sc-post-hook' is run after the guts of this function. ;;;*** -;;;### (autoloads (syntax-ppss) "syntax" "emacs-lisp/syntax.el" (16162 -;;;;;; 11942)) +;;;### (autoloads (syntax-ppss) "syntax" "emacs-lisp/syntax.el" (16511 +;;;;;; 32546)) ;;; Generated autoloads from emacs-lisp/syntax.el (autoload (quote syntax-ppss) "syntax" "\ @@ -21045,7 +21614,7 @@ Point is at POS when this function returns. ;;;*** -;;;### (autoloads (tabify untabify) "tabify" "tabify.el" (13227 8639)) +;;;### (autoloads (tabify untabify) "tabify" "tabify.el" (16511 32501)) ;;; Generated autoloads from tabify.el (autoload (quote untabify) "tabify" "\ @@ -21080,7 +21649,7 @@ The variable `tab-width' controls the spacing of tab stops. ;;;;;; table-recognize table-insert-row-column table-insert-column ;;;;;; table-insert-row table-insert table-point-left-cell-hook ;;;;;; table-point-entered-cell-hook table-load-hook table-cell-map-hook) -;;;;;; "table" "textmodes/table.el" (16111 41838)) +;;;;;; "table" "textmodes/table.el" (16511 32645)) ;;; Generated autoloads from textmodes/table.el (defvar table-cell-map-hook nil "\ @@ -21668,7 +22237,7 @@ converts a table into plain text without frames. It is a companion to ;;;*** -;;;### (autoloads (talk-connect) "talk" "talk.el" (15589 6165)) +;;;### (autoloads (talk-connect) "talk" "talk.el" (16511 32502)) ;;; Generated autoloads from talk.el (autoload (quote talk-connect) "talk" "\ @@ -21678,7 +22247,7 @@ Connect to display DISPLAY for the Emacs talk group. ;;;*** -;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (16205 24332)) +;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (16511 35097)) ;;; Generated autoloads from tar-mode.el (autoload (quote tar-mode) "tar-mode" "\ @@ -21702,7 +22271,7 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'. ;;;*** ;;;### (autoloads (tcl-help-on-word inferior-tcl tcl-mode) "tcl" -;;;;;; "progmodes/tcl.el" (16111 41834)) +;;;;;; "progmodes/tcl.el" (16511 35714)) ;;; Generated autoloads from progmodes/tcl.el (autoload (quote tcl-mode) "tcl" "\ @@ -21753,7 +22322,7 @@ Prefix argument means invert sense of `tcl-use-smart-word-finder'. ;;;*** -;;;### (autoloads (rsh telnet) "telnet" "net/telnet.el" (15941 42963)) +;;;### (autoloads (rsh telnet) "telnet" "net/telnet.el" (16511 32586)) ;;; Generated autoloads from net/telnet.el (add-hook 'same-window-regexps "\\*telnet-.*\\*\\(\\|<[0-9]+>\\)") @@ -21777,8 +22346,8 @@ Normally input is edited in Emacs and sent a line at a time. ;;;*** -;;;### (autoloads (ansi-term term make-term) "term" "term.el" (16179 -;;;;;; 13250)) +;;;### (autoloads (ansi-term term make-term) "term" "term.el" (16511 +;;;;;; 32504)) ;;; Generated autoloads from term.el (autoload (quote make-term) "term" "\ @@ -21806,8 +22375,8 @@ Start a terminal-emulator in a new buffer. ;;;*** -;;;### (autoloads (terminal-emulator) "terminal" "terminal.el" (15491 -;;;;;; 28591)) +;;;### (autoloads (terminal-emulator) "terminal" "terminal.el" (16511 +;;;;;; 32505)) ;;; Generated autoloads from terminal.el (autoload (quote terminal-emulator) "terminal" "\ @@ -21843,18 +22412,10 @@ subprocess started. ;;;*** -;;;### (autoloads (testcover-this-defun testcover-start) "testcover" -;;;;;; "emacs-lisp/testcover.el" (16162 11942)) +;;;### (autoloads (testcover-this-defun) "testcover" "emacs-lisp/testcover.el" +;;;;;; (16511 32546)) ;;; Generated autoloads from emacs-lisp/testcover.el -(autoload (quote testcover-start) "testcover" "\ -Uses edebug to instrument all macros and functions in FILENAME, then -changes the instrumentation from edebug to testcover--much faster, no -problems with type-ahead or post-command-hook, etc. If BYTE-COMPILE is -non-nil, byte-compiles each function after instrumenting. - -\(fn FILENAME &optional BYTE-COMPILE)" t nil) - (autoload (quote testcover-this-defun) "testcover" "\ Start coverage on function under point. @@ -21862,7 +22423,7 @@ Start coverage on function under point. ;;;*** -;;;### (autoloads (tetris) "tetris" "play/tetris.el" (15763 44954)) +;;;### (autoloads (tetris) "tetris" "play/tetris.el" (16511 32595)) ;;; Generated autoloads from play/tetris.el (autoload (quote tetris) "tetris" "\ @@ -21893,7 +22454,7 @@ tetris-mode keybindings: ;;;;;; tex-start-commands tex-start-options slitex-run-command latex-run-command ;;;;;; tex-run-command tex-offer-save tex-main-file tex-first-line-header-regexp ;;;;;; tex-directory tex-shell-file-name) "tex-mode" "textmodes/tex-mode.el" -;;;;;; (16139 21086)) +;;;;;; (16511 32645)) ;;; Generated autoloads from textmodes/tex-mode.el (defvar tex-shell-file-name nil "\ @@ -22002,7 +22563,7 @@ use.") (custom-autoload (quote tex-alt-dvi-print-command) "tex-mode") -(defvar tex-dvi-view-command (quote (if (eq window-system (quote x)) \"xdvi\" \"dvi2tty * | cat -s\")) "\ +(defvar tex-dvi-view-command (quote (if (eq window-system (quote x)) "xdvi" "dvi2tty * | cat -s")) "\ *Command used by \\[tex-view] to display a `.dvi' file. If it is a string, that specifies the command directly. If this string contains an asterisk (`*'), that is replaced by the file name; @@ -22195,7 +22756,7 @@ Major mode to edit DocTeX files. ;;;*** ;;;### (autoloads (texi2info texinfo-format-region texinfo-format-buffer) -;;;;;; "texinfmt" "textmodes/texinfmt.el" (16111 41838)) +;;;;;; "texinfmt" "textmodes/texinfmt.el" (16511 32646)) ;;; Generated autoloads from textmodes/texinfmt.el (autoload (quote texinfo-format-buffer) "texinfmt" "\ @@ -22235,7 +22796,7 @@ if large. You can use Info-split to do this manually. ;;;*** ;;;### (autoloads (texinfo-mode texinfo-close-quote texinfo-open-quote) -;;;;;; "texinfo" "textmodes/texinfo.el" (16148 4633)) +;;;;;; "texinfo" "textmodes/texinfo.el" (16511 32647)) ;;; Generated autoloads from textmodes/texinfo.el (defvar texinfo-open-quote "``" "\ @@ -22321,7 +22882,7 @@ value of `texinfo-mode-hook'. ;;;### (autoloads (thai-composition-function thai-compose-buffer ;;;;;; thai-compose-string thai-compose-region) "thai-util" "language/thai-util.el" -;;;;;; (16185 55426)) +;;;;;; (16511 25865)) ;;; Generated autoloads from language/thai-util.el (autoload (quote thai-compose-region) "thai-util" "\ @@ -22350,7 +22911,7 @@ Not documented ;;;### (autoloads (list-at-point number-at-point symbol-at-point ;;;;;; sexp-at-point thing-at-point bounds-of-thing-at-point forward-thing) -;;;;;; "thingatpt" "thingatpt.el" (15941 42957)) +;;;;;; "thingatpt" "thingatpt.el" (16511 32505)) ;;; Generated autoloads from thingatpt.el (autoload (quote forward-thing) "thingatpt" "\ @@ -22405,12 +22966,48 @@ Not documented ;;;*** +;;;### (autoloads (thumbs-dired-setroot thumbs-dired-show-all thumbs-dired-show-marked +;;;;;; thumbs-show-all-from-dir thumbs-find-thumb) "thumbs" "thumbs.el" +;;;;;; (16511 32505)) +;;; Generated autoloads from thumbs.el + +(autoload (quote thumbs-find-thumb) "thumbs" "\ +Display the thumbnail for IMG. + +\(fn IMG)" t nil) + +(autoload (quote thumbs-show-all-from-dir) "thumbs" "\ +Make a preview buffer for all images in DIR. +Optional argument REG to select file matching a regexp, +and SAME-WINDOW to show thumbs in the same window. + +\(fn DIR &optional REG SAME-WINDOW)" t nil) + +(autoload (quote thumbs-dired-show-marked) "thumbs" "\ +In Dired, make a thumbs buffer with all marked files. + +\(fn)" t nil) + +(autoload (quote thumbs-dired-show-all) "thumbs" "\ +In dired, make a thumbs buffer with all files in current directory. + +\(fn)" t nil) + +(defalias (quote thumbs) (quote thumbs-show-all-from-dir)) + +(autoload (quote thumbs-dired-setroot) "thumbs" "\ +In dired, Call the setroot program on the image at point. + +\(fn)" t nil) + +;;;*** + ;;;### (autoloads (tibetan-pre-write-canonicalize-for-unicode tibetan-pre-write-conversion ;;;;;; tibetan-post-read-conversion tibetan-compose-buffer tibetan-decompose-buffer ;;;;;; tibetan-composition-function tibetan-decompose-string tibetan-decompose-region ;;;;;; tibetan-compose-region tibetan-compose-string tibetan-transcription-to-tibetan ;;;;;; tibetan-tibetan-to-transcription tibetan-char-p) "tibet-util" -;;;;;; "language/tibet-util.el" (16195 2278)) +;;;;;; "language/tibet-util.el" (16511 25865)) ;;; Generated autoloads from language/tibet-util.el (autoload (quote tibetan-char-p) "tibet-util" "\ @@ -22489,7 +23086,7 @@ Not documented ;;;*** ;;;### (autoloads (tildify-buffer tildify-region) "tildify" "textmodes/tildify.el" -;;;;;; (15941 42966)) +;;;;;; (16511 32647)) ;;; Generated autoloads from textmodes/tildify.el (autoload (quote tildify-region) "tildify" "\ @@ -22513,7 +23110,7 @@ This function performs no refilling of the changed text. ;;;*** ;;;### (autoloads (display-time-mode display-time display-time-day-and-date) -;;;;;; "time" "time.el" (16011 37576)) +;;;;;; "time" "time.el" (16511 32505)) ;;; Generated autoloads from time.el (defvar display-time-day-and-date nil "\ @@ -22554,7 +23151,7 @@ This runs the normal hook `display-time-hook' after each update. ;;;### (autoloads (safe-date-to-time time-to-days time-to-day-in-year ;;;;;; date-leap-year-p days-between date-to-day time-add time-subtract ;;;;;; time-since days-to-time time-less-p seconds-to-time date-to-time) -;;;;;; "time-date" "calendar/time-date.el" (15450 56230)) +;;;;;; "time-date" "calendar/time-date.el" (16511 32531)) ;;; Generated autoloads from calendar/time-date.el (autoload (quote date-to-time) "time-date" "\ @@ -22634,7 +23231,7 @@ If DATE is malformed, return a time value of zeros. ;;;*** ;;;### (autoloads (time-stamp-toggle-active time-stamp) "time-stamp" -;;;;;; "time-stamp.el" (15941 42957)) +;;;;;; "time-stamp.el" (16511 32505)) ;;; Generated autoloads from time-stamp.el (autoload (quote time-stamp) "time-stamp" "\ @@ -22668,7 +23265,7 @@ With ARG, turn time stamping on if and only if arg is positive. ;;;;;; timeclock-workday-remaining-string timeclock-reread-log timeclock-query-out ;;;;;; timeclock-change timeclock-status-string timeclock-out timeclock-in ;;;;;; timeclock-modeline-display) "timeclock" "calendar/timeclock.el" -;;;;;; (16148 4633)) +;;;;;; (16511 32531)) ;;; Generated autoloads from calendar/timeclock.el (autoload (quote timeclock-modeline-display) "timeclock" "\ @@ -22692,7 +23289,7 @@ weekend). *If not called interactively, ARG should be the number of _seconds_ worked today*. This feature only has effect the first time this function is called within a day. -PROJECT as the project being clocked into. If PROJECT is nil, and +PROJECT is the project being clocked into. If PROJECT is nil, and FIND-PROJECT is non-nil -- or the user calls `timeclock-in' interactively -- call the function `timeclock-get-project-function' to discover the name of the project. @@ -22720,15 +23317,16 @@ worked today, ignoring the time worked on previous days. \(fn &optional SHOW-SECONDS TODAY-ONLY)" t nil) (autoload (quote timeclock-change) "timeclock" "\ -Change to working on a different project, by clocking in then out. -With a prefix ARG, consider the previous project as having been -finished at the time of changeover. PROJECT is the name of the last -project you were working on. +Change to working on a different project. +This clocks out of the current project, then clocks in on a new one. +With a prefix ARG, consider the previous project as finished at the +time of changeover. PROJECT is the name of the last project you were +working on. \(fn &optional ARG PROJECT)" t nil) (autoload (quote timeclock-query-out) "timeclock" "\ -Ask the user before clocking out. +Ask the user whether to clock out. This is a useful function for adding to `kill-emacs-query-functions'. \(fn)" nil nil) @@ -22756,7 +23354,7 @@ non-nil, the amount returned will be relative to past time worked. \(fn &optional SHOW-SECONDS)" t nil) (autoload (quote timeclock-when-to-leave-string) "timeclock" "\ -Return a string representing at what time the workday ends today. +Return a string representing the end of today's workday. This string is relative to the value of `timeclock-workday'. If SHOW-SECONDS is non-nil, the value printed/returned will include seconds. If TODAY-ONLY is non-nil, the value returned will be @@ -22768,7 +23366,7 @@ relative only to the time worked today, and not to past time. ;;;### (autoloads (with-timeout run-with-idle-timer add-timeout run-with-timer ;;;;;; run-at-time cancel-function-timers cancel-timer) "timer" -;;;;;; "emacs-lisp/timer.el" (16087 59607)) +;;;;;; "emacs-lisp/timer.el" (16511 32546)) ;;; Generated autoloads from emacs-lisp/timer.el (defalias (quote disable-timeout) (quote cancel-timer)) @@ -22841,7 +23439,7 @@ be detected. ;;;*** ;;;### (autoloads (batch-titdic-convert titdic-convert) "titdic-cnv" -;;;;;; "international/titdic-cnv.el" (16183 29727)) +;;;;;; "international/titdic-cnv.el" (16511 30646)) ;;; Generated autoloads from international/titdic-cnv.el (autoload (quote titdic-convert) "titdic-cnv" "\ @@ -22863,8 +23461,9 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\". ;;;*** -;;;### (autoloads (tamil-composition-function tamil-compose-region) -;;;;;; "tml-util" "language/tml-util.el" (16194 56852)) +;;;### (autoloads (tamil-composition-function tamil-post-read-conversion +;;;;;; tamil-compose-region) "tml-util" "language/tml-util.el" (16511 +;;;;;; 25866)) ;;; Generated autoloads from language/tml-util.el (autoload (quote tamil-compose-region) "tml-util" "\ @@ -22872,6 +23471,11 @@ Not documented \(fn FROM TO)" t nil) +(autoload (quote tamil-post-read-conversion) "tml-util" "\ +Not documented + +\(fn LEN)" nil nil) + (autoload (quote tamil-composition-function) "tml-util" "\ Compose Tamil characters after the position POS. If STRING is not nil, it is a string, and POS is an index to the string. @@ -22882,7 +23486,7 @@ In this case, compose characters after POS of the string. ;;;*** ;;;### (autoloads (tmm-prompt tmm-menubar-mouse tmm-menubar) "tmm" -;;;;;; "tmm.el" (15557 10300)) +;;;;;; "tmm.el" (16511 32505)) ;;; Generated autoloads from tmm.el (define-key global-map "\M-`" 'tmm-menubar) (define-key global-map [f10] 'tmm-menubar) @@ -22923,7 +23527,7 @@ Its value should be an event that has a binding in MENU. ;;;### (autoloads (todo-show todo-cp todo-mode todo-print todo-top-priorities ;;;;;; todo-insert-item todo-add-item-non-interactively todo-add-category) -;;;;;; "todo-mode" "calendar/todo-mode.el" (15381 53844)) +;;;;;; "todo-mode" "calendar/todo-mode.el" (16511 35215)) ;;; Generated autoloads from calendar/todo-mode.el (autoload (quote todo-add-category) "todo-mode" "\ @@ -22984,7 +23588,7 @@ Show TODO list. ;;;### (autoloads (tool-bar-local-item-from-menu tool-bar-add-item-from-menu ;;;;;; tool-bar-local-item tool-bar-add-item tool-bar-mode) "tool-bar" -;;;;;; "toolbar/tool-bar.el" (15678 51473)) +;;;;;; "toolbar/tool-bar.el" (16511 32647)) ;;; Generated autoloads from toolbar/tool-bar.el (defvar tool-bar-mode nil "\ @@ -23065,7 +23669,7 @@ MAP must contain appropriate binding for `[menu-bar]' which holds a keymap. ;;;*** ;;;### (autoloads (tooltip-mode tooltip-mode) "tooltip" "tooltip.el" -;;;;;; (16162 11942)) +;;;;;; (16511 32505)) ;;; Generated autoloads from tooltip.el (autoload (quote tooltip-mode) "tooltip" "\ @@ -23083,8 +23687,8 @@ use either \\[customize] or the function `tooltip-mode'.") ;;;*** -;;;### (autoloads (tpu-edt-on) "tpu-edt" "emulation/tpu-edt.el" (15678 -;;;;;; 51469)) +;;;### (autoloads (tpu-edt-on) "tpu-edt" "emulation/tpu-edt.el" (16511 +;;;;;; 32550)) ;;; Generated autoloads from emulation/tpu-edt.el (defalias (quote tpu-edt-mode) (quote tpu-edt-on)) @@ -23099,7 +23703,7 @@ Turn on TPU/edt emulation. ;;;*** ;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins) -;;;;;; "tpu-extras" "emulation/tpu-extras.el" (15188 565)) +;;;;;; "tpu-extras" "emulation/tpu-extras.el" (16511 32551)) ;;; Generated autoloads from emulation/tpu-extras.el (autoload (quote tpu-set-scroll-margins) "tpu-extras" "\ @@ -23119,7 +23723,7 @@ Constrain the cursor to the flow of the text. ;;;*** -;;;### (autoloads (tq-create) "tq" "emacs-lisp/tq.el" (15961 24152)) +;;;### (autoloads (tq-create) "tq" "emacs-lisp/tq.el" (16511 32547)) ;;; Generated autoloads from emacs-lisp/tq.el (autoload (quote tq-create) "tq" "\ @@ -23133,7 +23737,7 @@ to a tcp server on another machine. ;;;*** ;;;### (autoloads (trace-function-background trace-function trace-buffer) -;;;;;; "trace" "emacs-lisp/trace.el" (15763 44953)) +;;;;;; "trace" "emacs-lisp/trace.el" (16511 32547)) ;;; Generated autoloads from emacs-lisp/trace.el (defvar trace-buffer "*trace-output*" "\ @@ -23166,7 +23770,7 @@ the window or buffer configuration at all. ;;;### (autoloads (tramp-completion-file-name-handler tramp-file-name-handler ;;;;;; tramp-completion-file-name-regexp tramp-file-name-regexp) -;;;;;; "tramp" "net/tramp.el" (16162 11943)) +;;;;;; "tramp" "net/tramp.el" (16511 32589)) ;;; Generated autoloads from net/tramp.el (defvar tramp-unified-filenames (not (featurep (quote xemacs))) "\ @@ -23245,7 +23849,7 @@ Falls back to normal file name handler if no tramp file name handler exists. ;;;*** ;;;### (autoloads (2C-split 2C-associate-buffer 2C-two-columns) "two-column" -;;;;;; "textmodes/two-column.el" (16162 11944)) +;;;;;; "textmodes/two-column.el" (16511 32647)) ;;; Generated autoloads from textmodes/two-column.el (autoload '2C-command "two-column" () t 'keymap) (global-set-key "\C-x6" '2C-command) @@ -23295,7 +23899,7 @@ First column's text sSs Second column's text ;;;### (autoloads (type-break-guesstimate-keystroke-threshold type-break-statistics ;;;;;; type-break type-break-mode type-break-keystroke-threshold ;;;;;; type-break-good-rest-interval type-break-interval type-break-mode) -;;;;;; "type-break" "type-break.el" (16111 41826)) +;;;;;; "type-break" "type-break.el" (16511 35111)) ;;; Generated autoloads from type-break.el (defvar type-break-mode nil "\ @@ -23454,7 +24058,7 @@ FRAC should be the inverse of the fractional value; for example, a value of ;;;*** ;;;### (autoloads (ununderline-region underline-region) "underline" -;;;;;; "textmodes/underline.el" (15186 43697)) +;;;;;; "textmodes/underline.el" (16511 32647)) ;;; Generated autoloads from textmodes/underline.el (autoload (quote underline-region) "underline" "\ @@ -23475,7 +24079,7 @@ which specify the range to operate on. ;;;*** ;;;### (autoloads (unforward-rmail-message undigestify-rmail-message) -;;;;;; "undigest" "mail/undigest.el" (15961 24154)) +;;;;;; "undigest" "mail/undigest.el" (16511 32575)) ;;; Generated autoloads from mail/undigest.el (autoload (quote undigestify-rmail-message) "undigest" "\ @@ -23494,7 +24098,7 @@ following the containing message. ;;;*** ;;;### (autoloads (unrmail batch-unrmail) "unrmail" "mail/unrmail.el" -;;;;;; (15764 7537)) +;;;;;; (16511 32575)) ;;; Generated autoloads from mail/unrmail.el (autoload (quote batch-unrmail) "unrmail" "\ @@ -23513,8 +24117,8 @@ Convert Rmail file FILE to system inbox format file TO-FILE. ;;;*** -;;;### (autoloads (unsafep) "unsafep" "emacs-lisp/unsafep.el" (16162 -;;;;;; 11942)) +;;;### (autoloads (unsafep) "unsafep" "emacs-lisp/unsafep.el" (16511 +;;;;;; 32547)) ;;; Generated autoloads from emacs-lisp/unsafep.el (autoload (quote unsafep) "unsafep" "\ @@ -23527,7 +24131,7 @@ of symbols with local bindings. ;;;*** ;;;### (autoloads (ask-user-about-supersession-threat ask-user-about-lock) -;;;;;; "userlock" "userlock.el" (15781 48897)) +;;;;;; "userlock" "userlock.el" (16511 32506)) ;;; Generated autoloads from userlock.el (autoload (quote ask-user-about-lock) "userlock" "\ @@ -23556,7 +24160,7 @@ The buffer in question is current when this function is called. ;;;*** ;;;### (autoloads (uudecode-decode-region uudecode-decode-region-external) -;;;;;; "uudecode" "gnus/uudecode.el" (15186 43690)) +;;;;;; "uudecode" "gnus/uudecode.el" (16464 65088)) ;;; Generated autoloads from gnus/uudecode.el (autoload (quote uudecode-decode-region-external) "uudecode" "\ @@ -23580,7 +24184,7 @@ If FILE-NAME is non-nil, save the result to FILE-NAME. ;;;;;; vc-directory vc-merge vc-insert-headers vc-version-other-window ;;;;;; vc-diff vc-register vc-next-action vc-do-command edit-vc-file ;;;;;; with-vc-file vc-branch-part vc-before-checkin-hook vc-checkin-hook -;;;;;; vc-checkout-hook) "vc" "vc.el" (16139 21084)) +;;;;;; vc-checkout-hook) "vc" "vc.el" (16511 35175)) ;;; Generated autoloads from vc.el (defvar vc-checkout-hook nil "\ @@ -23762,8 +24366,9 @@ allowed and simply skipped). (autoload (quote vc-print-log) "vc" "\ List the change log of the current buffer in a window. +If FOCUS-REV is non-nil, leave the point at that revision. -\(fn)" t nil) +\(fn &optional FOCUS-REV)" t nil) (autoload (quote vc-revert-buffer) "vc" "\ Revert the current buffer's file to the version it was based on. @@ -23857,11 +24462,29 @@ mode-specific menu. `vc-annotate-color-map' and `vc-annotate-very-old-color' defines the mapping of time to colors. `vc-annotate-background' specifies the background color. -\(fn PREFIX)" t nil) +\(fn PREFIX &optional REVISION DISPLAY-MODE)" t nil) + +;;;*** + +;;;### (autoloads nil "vc-arch" "vc-arch.el" (16511 32506)) +;;; Generated autoloads from vc-arch.el + (defun vc-arch-registered (file) + (let ((dir file)) + (while (and (stringp dir) + (not (equal + dir (setq dir (file-name-directory dir)))) + dir) + (setq dir (if (file-directory-p + (expand-file-name "{arch}" dir)) + t (directory-file-name dir)))) + (if (eq dir t) + (progn + (load "vc-arch") + (vc-arch-registered file))))) ;;;*** -;;;### (autoloads nil "vc-cvs" "vc-cvs.el" (16136 53054)) +;;;### (autoloads nil "vc-cvs" "vc-cvs.el" (16511 35131)) ;;; Generated autoloads from vc-cvs.el (defun vc-cvs-registered (f) (when (file-readable-p (expand-file-name @@ -23871,7 +24494,7 @@ colors. `vc-annotate-background' specifies the background color. ;;;*** -;;;### (autoloads nil "vc-mcvs" "vc-mcvs.el" (16070 35807)) +;;;### (autoloads nil "vc-mcvs" "vc-mcvs.el" (16511 32507)) ;;; Generated autoloads from vc-mcvs.el (defun vc-mcvs-registered (file) (let ((dir file)) @@ -23890,7 +24513,7 @@ colors. `vc-annotate-background' specifies the background color. ;;;*** ;;;### (autoloads (vc-rcs-master-templates) "vc-rcs" "vc-rcs.el" -;;;;;; (16070 35807)) +;;;;;; (16511 35154)) ;;; Generated autoloads from vc-rcs.el (defvar vc-rcs-master-templates (quote ("%sRCS/%s,v" "%s%s,v" "%sRCS/%s")) "\ @@ -23903,7 +24526,7 @@ For a description of possible values, see `vc-check-master-templates'.") ;;;*** ;;;### (autoloads (vc-sccs-master-templates) "vc-sccs" "vc-sccs.el" -;;;;;; (16070 35807)) +;;;;;; (16511 35166)) ;;; Generated autoloads from vc-sccs.el (defvar vc-sccs-master-templates (quote ("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir)) "\ @@ -23920,7 +24543,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir) ;;;*** -;;;### (autoloads nil "vc-svn" "vc-svn.el" (16162 11942)) +;;;### (autoloads nil "vc-svn" "vc-svn.el" (16511 32507)) ;;; Generated autoloads from vc-svn.el (defun vc-svn-registered (f) (when (file-readable-p (expand-file-name @@ -23933,7 +24556,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir) ;;;*** ;;;### (autoloads (vhdl-mode) "vhdl-mode" "progmodes/vhdl-mode.el" -;;;;;; (15997 673)) +;;;;;; (16511 35726)) ;;; Generated autoloads from progmodes/vhdl-mode.el (autoload (quote vhdl-mode) "vhdl-mode" "\ @@ -24458,7 +25081,7 @@ Key bindings: ;;;*** -;;;### (autoloads (vi-mode) "vi" "emulation/vi.el" (15941 42958)) +;;;### (autoloads (vi-mode) "vi" "emulation/vi.el" (16511 32551)) ;;; Generated autoloads from emulation/vi.el (autoload (quote vi-mode) "vi" "\ @@ -24513,7 +25136,7 @@ Syntax table and abbrevs while in vi mode remain as they were in Emacs. ;;;### (autoloads (viqr-pre-write-conversion viqr-post-read-conversion ;;;;;; viet-encode-viqr-buffer viet-encode-viqr-region viet-decode-viqr-buffer ;;;;;; viet-decode-viqr-region viet-encode-viscii-char) "viet-util" -;;;;;; "language/viet-util.el" (16183 38637)) +;;;;;; "language/viet-util.el" (16511 25867)) ;;; Generated autoloads from language/viet-util.el (autoload (quote viet-encode-viscii-char) "viet-util" "\ @@ -24559,8 +25182,8 @@ Not documented ;;;### (autoloads (View-exit-and-edit view-mode-enter view-mode view-buffer-other-frame ;;;;;; view-buffer-other-window view-buffer view-file-other-frame -;;;;;; view-file-other-window view-file) "view" "view.el" (16142 -;;;;;; 9350)) +;;;;;; view-file-other-window view-file) "view" "view.el" (16511 +;;;;;; 32509)) ;;; Generated autoloads from view.el (defvar view-mode nil "\ @@ -24767,8 +25390,8 @@ Exit View mode and make the current buffer editable. ;;;*** -;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (16111 -;;;;;; 41830)) +;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (16511 +;;;;;; 32552)) ;;; Generated autoloads from emulation/vip.el (autoload (quote vip-setup) "vip" "\ @@ -24784,7 +25407,7 @@ Turn on VIP emulation of VI. ;;;*** ;;;### (autoloads (viper-mode toggle-viper-mode) "viper" "emulation/viper.el" -;;;;;; (15941 42958)) +;;;;;; (16511 32555)) ;;; Generated autoloads from emulation/viper.el (autoload (quote toggle-viper-mode) "viper" "\ @@ -24801,7 +25424,7 @@ Turn on Viper emulation of Vi. ;;;*** ;;;### (autoloads (warn lwarn display-warning) "warnings" "emacs-lisp/warnings.el" -;;;;;; (16087 59607)) +;;;;;; (16511 32547)) ;;; Generated autoloads from emacs-lisp/warnings.el (defvar warning-prefix-function nil "\ @@ -24825,15 +25448,15 @@ also call that function before the next warning.") (defvar warning-fill-prefix nil "\ Non-nil means fill each warning text using this string as `fill-prefix'.") -(defvar warning-group-format " (%s)" "\ -Format for displaying the warning group in the warning message. -The result of formatting the group this way gets included in the +(defvar warning-type-format " (%s)" "\ +Format for displaying the warning type in the warning message. +The result of formatting the type this way gets included in the message under the control of the string in `warning-levels'.") (autoload (quote display-warning) "warnings" "\ Display a warning message, MESSAGE. -GROUP should be a custom group name (a symbol), -or else a list of symbols whose first element is a custom group name. +TYPE is the warning type: either a custom group name (a symbol), +or a list of symbols whose first element is a custom group name. \(The rest of the symbols represent subcategories, for warning purposes only, and you can use whatever symbols you like.) @@ -24853,15 +25476,15 @@ See the `warnings' custom group for user customization features. See also `warning-series', `warning-prefix-function' and `warning-fill-prefix' for additional programming features. -\(fn GROUP MESSAGE &optional LEVEL BUFFER-NAME)" nil nil) +\(fn TYPE MESSAGE &optional LEVEL BUFFER-NAME)" nil nil) (autoload (quote lwarn) "warnings" "\ Display a warning message made from (format MESSAGE ARGS...). Aside from generating the message with `format', this is equivalent to `display-warning'. -GROUP should be a custom group name (a symbol). -or else a list of symbols whose first element is a custom group name. +TYPE is the warning type: either a custom group name (a symbol). +or a list of symbols whose first element is a custom group name. \(The rest of the symbols represent subcategories and can be whatever you like.) @@ -24871,19 +25494,19 @@ LEVEL should be either :warning, :error, or :emergency. :error -- invalid data or circumstances. :warning -- suspicious data or circumstances. -\(fn GROUP LEVEL MESSAGE &rest ARGS)" nil nil) +\(fn TYPE LEVEL MESSAGE &rest ARGS)" nil nil) (autoload (quote warn) "warnings" "\ Display a warning message made from (format MESSAGE ARGS...). Aside from generating the message with `format', this is equivalent to `display-warning', using -`emacs' as the group and `:warning' as the level. +`emacs' as the type and `:warning' as the level. \(fn MESSAGE &rest ARGS)" nil nil) ;;;*** -;;;### (autoloads (webjump) "webjump" "net/webjump.el" (15941 42963)) +;;;### (autoloads (webjump) "webjump" "net/webjump.el" (16511 32589)) ;;; Generated autoloads from net/webjump.el (autoload (quote webjump) "webjump" "\ @@ -24900,7 +25523,7 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke ;;;*** ;;;### (autoloads (which-function-mode) "which-func" "progmodes/which-func.el" -;;;;;; (16087 59843)) +;;;;;; (16511 32632)) ;;; Generated autoloads from progmodes/which-func.el (put 'which-func-format 'risky-local-variable t) (put 'which-func-current 'risky-local-variable t) @@ -24932,7 +25555,7 @@ and off otherwise. ;;;;;; whitespace-buffer whitespace-toggle-ateol-check whitespace-toggle-spacetab-check ;;;;;; whitespace-toggle-indent-check whitespace-toggle-trailing-check ;;;;;; whitespace-toggle-leading-check) "whitespace" "whitespace.el" -;;;;;; (16111 41826)) +;;;;;; (16511 35189)) ;;; Generated autoloads from whitespace.el (autoload (quote whitespace-toggle-leading-check) "whitespace" "\ @@ -25004,7 +25627,7 @@ use either \\[customize] or the function `whitespace-global-mode'.") (autoload (quote whitespace-global-mode) "whitespace" "\ Toggle using Whitespace mode in new buffers. -With ARG, turn the mode on if and only iff ARG is positive. +With ARG, turn the mode on iff ARG is positive. When this mode is active, `whitespace-buffer' is added to `find-file-hook' and `kill-buffer-hook'. @@ -25020,7 +25643,7 @@ This is meant to be added buffer-locally to `write-file-functions'. ;;;*** ;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse -;;;;;; widget-browse-at) "wid-browse" "wid-browse.el" (15941 42957)) +;;;;;; widget-browse-at) "wid-browse" "wid-browse.el" (16511 32509)) ;;; Generated autoloads from wid-browse.el (autoload (quote widget-browse-at) "wid-browse" "\ @@ -25047,8 +25670,8 @@ With arg, turn widget mode on if and only if arg is positive. ;;;*** ;;;### (autoloads (widget-setup widget-insert widget-delete widget-create -;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (16179 -;;;;;; 14095)) +;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (16511 +;;;;;; 32510)) ;;; Generated autoloads from wid-edit.el (autoload (quote widgetp) "wid-edit" "\ @@ -25090,8 +25713,8 @@ Setup current buffer so editing string widgets works. ;;;*** ;;;### (autoloads (windmove-default-keybindings windmove-down windmove-right -;;;;;; windmove-up windmove-left) "windmove" "windmove.el" (16111 -;;;;;; 41826)) +;;;;;; windmove-up windmove-left) "windmove" "windmove.el" (16511 +;;;;;; 32510)) ;;; Generated autoloads from windmove.el (autoload (quote windmove-left) "windmove" "\ @@ -25144,7 +25767,7 @@ Default MODIFIER is 'shift. ;;;*** ;;;### (autoloads (winner-mode winner-mode) "winner" "winner.el" -;;;;;; (15941 42957)) +;;;;;; (16511 32510)) ;;; Generated autoloads from winner.el (defvar winner-mode nil "\ @@ -25163,7 +25786,7 @@ With arg, turn Winner mode on if and only if arg is positive. ;;;*** ;;;### (autoloads (woman-find-file woman-dired-find-file woman) "woman" -;;;;;; "woman.el" (16012 41365)) +;;;;;; "woman.el" (16511 32511)) ;;; Generated autoloads from woman.el (autoload (quote woman) "woman" "\ @@ -25199,7 +25822,7 @@ decompress the file if appropriate. See the documentation for the ;;;*** ;;;### (autoloads (wordstar-mode) "ws-mode" "emulation/ws-mode.el" -;;;;;; (15941 42958)) +;;;;;; (16511 32555)) ;;; Generated autoloads from emulation/ws-mode.el (autoload (quote wordstar-mode) "ws-mode" "\ @@ -25312,7 +25935,7 @@ The key bindings are: ;;;*** ;;;### (autoloads (xml-parse-region xml-parse-file) "xml" "xml.el" -;;;;;; (16148 4633)) +;;;;;; (16511 32512)) ;;; Generated autoloads from xml.el (autoload (quote xml-parse-file) "xml" "\ @@ -25337,8 +25960,8 @@ If PARSE-NS is non-nil, then QNAMES are expanded. ;;;*** -;;;### (autoloads (xterm-mouse-mode) "xt-mouse" "xt-mouse.el" (16025 -;;;;;; 36883)) +;;;### (autoloads (xterm-mouse-mode) "xt-mouse" "xt-mouse.el" (16511 +;;;;;; 32512)) ;;; Generated autoloads from xt-mouse.el (defvar xterm-mouse-mode nil "\ @@ -25360,7 +25983,7 @@ Turn it on to use emacs mouse commands, and off to use xterm mouse commands. ;;;*** ;;;### (autoloads (psychoanalyze-pinhead apropos-zippy insert-zippyism -;;;;;; yow) "yow" "play/yow.el" (15407 8860)) +;;;;;; yow) "yow" "play/yow.el" (16511 32595)) ;;; Generated autoloads from play/yow.el (autoload (quote yow) "yow" "\ @@ -25386,7 +26009,7 @@ Zippy goes to the analyst. ;;;*** -;;;### (autoloads (zone) "zone" "play/zone.el" (15678 51471)) +;;;### (autoloads (zone) "zone" "play/zone.el" (16511 32595)) ;;; Generated autoloads from play/zone.el (autoload (quote zone) "zone" "\ @@ -25397,7 +26020,7 @@ Zone out, completely. ;;;*** ;;;### (autoloads (zone-mode zone-mode-update-serial-hook) "zone-mode" -;;;;;; "net/zone-mode.el" (15941 42963)) +;;;;;; "net/zone-mode.el" (16511 32589)) ;;; Generated autoloads from net/zone-mode.el (autoload (quote zone-mode-update-serial-hook) "zone-mode" "\ @@ -25422,50 +26045,50 @@ Zone-mode does two things: ;;;### (autoloads nil nil ("abbrev.el" "abbrevlist.el" "bindings.el" ;;;;;; "buff-menu.el" "calc/calc-aent.el" "calc/calc-alg.el" "calc/calc-arith.el" ;;;;;; "calc/calc-bin.el" "calc/calc-comb.el" "calc/calc-cplx.el" -;;;;;; "calc/calc-embed.el" "calc/calc-fin.el" "calc/calc-forms.el" -;;;;;; "calc/calc-frac.el" "calc/calc-funcs.el" "calc/calc-graph.el" -;;;;;; "calc/calc-help.el" "calc/calc-incom.el" "calc/calc-keypd.el" -;;;;;; "calc/calc-lang.el" "calc/calc-macs.el" "calc/calc-maint.el" -;;;;;; "calc/calc-map.el" "calc/calc-math.el" "calc/calc-misc.el" -;;;;;; "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-poly.el" -;;;;;; "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el" -;;;;;; "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el" -;;;;;; "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-undo.el" -;;;;;; "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el" -;;;;;; "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el" -;;;;;; "calc/calcsel2.el" "calendar/cal-china.el" "calendar/cal-coptic.el" -;;;;;; "calendar/cal-french.el" "calendar/cal-islam.el" "calendar/cal-iso.el" -;;;;;; "calendar/cal-julian.el" "calendar/cal-mayan.el" "calendar/cal-menu.el" -;;;;;; "calendar/cal-move.el" "calendar/cal-persia.el" "calendar/cal-tex.el" -;;;;;; "calendar/cal-x.el" "calendar/parse-time.el" "case-table.el" -;;;;;; "cdl.el" "composite.el" "cus-dep.el" "cus-load.el" "cus-start.el" -;;;;;; "custom.el" "dos-fns.el" "dos-vars.el" "dos-w32.el" "ediff-diff.el" -;;;;;; "ediff-init.el" "ediff-merg.el" "ediff-ptch.el" "ediff-vers.el" -;;;;;; "ediff-wind.el" "electric.el" "emacs-lisp/assoc.el" "emacs-lisp/authors.el" -;;;;;; "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" "emacs-lisp/byte-run.el" -;;;;;; "emacs-lisp/cl-compat.el" "emacs-lisp/cl-extra.el" "emacs-lisp/cl-macs.el" -;;;;;; "emacs-lisp/cl-seq.el" "emacs-lisp/cl-specs.el" "emacs-lisp/cust-print.el" -;;;;;; "emacs-lisp/ewoc.el" "emacs-lisp/find-gc.el" "emacs-lisp/float-sup.el" -;;;;;; "emacs-lisp/gulp.el" "emacs-lisp/levents.el" "emacs-lisp/lisp-mnt.el" -;;;;;; "emacs-lisp/lisp-mode.el" "emacs-lisp/lisp.el" "emacs-lisp/lmenu.el" -;;;;;; "emacs-lisp/lselect.el" "emacs-lisp/lucid.el" "emacs-lisp/map-ynp.el" -;;;;;; "emacs-lisp/regi.el" "emacs-lisp/sregex.el" "emacs-lisp/testcover-ses.el" -;;;;;; "emacs-lisp/testcover-unsafep.el" "emacs-lock.el" "emulation/cua-gmrk.el" -;;;;;; "emulation/cua-rect.el" "emulation/edt-lk201.el" "emulation/edt-mapper.el" -;;;;;; "emulation/edt-pc.el" "emulation/edt-vt100.el" "emulation/tpu-mapper.el" -;;;;;; "emulation/viper-cmd.el" "emulation/viper-ex.el" "emulation/viper-init.el" -;;;;;; "emulation/viper-keym.el" "emulation/viper-macs.el" "emulation/viper-mous.el" -;;;;;; "emulation/viper-util.el" "env.el" "eshell/em-alias.el" "eshell/em-banner.el" -;;;;;; "eshell/em-basic.el" "eshell/em-cmpl.el" "eshell/em-dirs.el" -;;;;;; "eshell/em-glob.el" "eshell/em-hist.el" "eshell/em-ls.el" -;;;;;; "eshell/em-pred.el" "eshell/em-prompt.el" "eshell/em-rebind.el" -;;;;;; "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el" -;;;;;; "eshell/em-unix.el" "eshell/em-xtra.el" "eshell/esh-arg.el" -;;;;;; "eshell/esh-cmd.el" "eshell/esh-ext.el" "eshell/esh-groups.el" -;;;;;; "eshell/esh-io.el" "eshell/esh-maint.el" "eshell/esh-module.el" -;;;;;; "eshell/esh-opt.el" "eshell/esh-proc.el" "eshell/esh-util.el" -;;;;;; "eshell/esh-var.el" "faces.el" "files.el" "filesets.el" "finder-inf.el" -;;;;;; "foldout.el" "font-core.el" "format.el" "forms-d2.el" "forms-pass.el" +;;;;;; "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el" +;;;;;; "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el" +;;;;;; "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el" +;;;;;; "calc/calc-macs.el" "calc/calc-maint.el" "calc/calc-map.el" +;;;;;; "calc/calc-math.el" "calc/calc-misc.el" "calc/calc-mode.el" +;;;;;; "calc/calc-mtx.el" "calc/calc-poly.el" "calc/calc-prog.el" +;;;;;; "calc/calc-rewr.el" "calc/calc-rules.el" "calc/calc-sel.el" +;;;;;; "calc/calc-stat.el" "calc/calc-store.el" "calc/calc-stuff.el" +;;;;;; "calc/calc-trail.el" "calc/calc-undo.el" "calc/calc-units.el" +;;;;;; "calc/calc-vec.el" "calc/calc-yank.el" "calc/calcalg2.el" +;;;;;; "calc/calcalg3.el" "calc/calccomp.el" "calc/calcsel2.el" +;;;;;; "calendar/cal-china.el" "calendar/cal-coptic.el" "calendar/cal-french.el" +;;;;;; "calendar/cal-islam.el" "calendar/cal-iso.el" "calendar/cal-julian.el" +;;;;;; "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el" +;;;;;; "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el" +;;;;;; "case-table.el" "cdl.el" "composite.el" "cus-dep.el" "cus-load.el" +;;;;;; "cus-start.el" "custom.el" "dos-fns.el" "dos-vars.el" "dos-w32.el" +;;;;;; "ediff-diff.el" "ediff-init.el" "ediff-merg.el" "ediff-ptch.el" +;;;;;; "ediff-vers.el" "ediff-wind.el" "electric.el" "emacs-lisp/assoc.el" +;;;;;; "emacs-lisp/authors.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el" +;;;;;; "emacs-lisp/byte-run.el" "emacs-lisp/cl-compat.el" "emacs-lisp/cl-extra.el" +;;;;;; "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" "emacs-lisp/cl-specs.el" +;;;;;; "emacs-lisp/cust-print.el" "emacs-lisp/ewoc.el" "emacs-lisp/find-gc.el" +;;;;;; "emacs-lisp/float-sup.el" "emacs-lisp/gulp.el" "emacs-lisp/levents.el" +;;;;;; "emacs-lisp/lisp-mnt.el" "emacs-lisp/lisp-mode.el" "emacs-lisp/lisp.el" +;;;;;; "emacs-lisp/lmenu.el" "emacs-lisp/lselect.el" "emacs-lisp/lucid.el" +;;;;;; "emacs-lisp/map-ynp.el" "emacs-lisp/regi.el" "emacs-lisp/sregex.el" +;;;;;; "emacs-lisp/tcover-ses.el" "emacs-lisp/tcover-unsafep.el" +;;;;;; "emacs-lock.el" "emulation/cua-gmrk.el" "emulation/cua-rect.el" +;;;;;; "emulation/edt-lk201.el" "emulation/edt-mapper.el" "emulation/edt-pc.el" +;;;;;; "emulation/edt-vt100.el" "emulation/tpu-mapper.el" "emulation/viper-cmd.el" +;;;;;; "emulation/viper-ex.el" "emulation/viper-init.el" "emulation/viper-keym.el" +;;;;;; "emulation/viper-macs.el" "emulation/viper-mous.el" "emulation/viper-util.el" +;;;;;; "env.el" "eshell/em-alias.el" "eshell/em-banner.el" "eshell/em-basic.el" +;;;;;; "eshell/em-cmpl.el" "eshell/em-dirs.el" "eshell/em-glob.el" +;;;;;; "eshell/em-hist.el" "eshell/em-ls.el" "eshell/em-pred.el" +;;;;;; "eshell/em-prompt.el" "eshell/em-rebind.el" "eshell/em-script.el" +;;;;;; "eshell/em-smart.el" "eshell/em-term.el" "eshell/em-unix.el" +;;;;;; "eshell/em-xtra.el" "eshell/esh-arg.el" "eshell/esh-cmd.el" +;;;;;; "eshell/esh-ext.el" "eshell/esh-groups.el" "eshell/esh-io.el" +;;;;;; "eshell/esh-maint.el" "eshell/esh-module.el" "eshell/esh-opt.el" +;;;;;; "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el" +;;;;;; "faces.el" "files.el" "filesets.el" "finder-inf.el" "foldout.el" +;;;;;; "font-core.el" "format.el" "forms-d2.el" "forms-pass.el" ;;;;;; "frame.el" "generic-x.el" "gnus/flow-fill.el" "gnus/format-spec.el" ;;;;;; "gnus/gnus-async.el" "gnus/gnus-bcklg.el" "gnus/gnus-cite.el" ;;;;;; "gnus/gnus-cus.el" "gnus/gnus-demon.el" "gnus/gnus-draft.el" @@ -25487,20 +26110,21 @@ Zone-mode does two things: ;;;;;; "gnus/nnweb.el" "gnus/pop3.el" "gnus/qp.el" "gnus/rfc1843.el" ;;;;;; "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2104.el" "gnus/rfc2231.el" ;;;;;; "gnus/starttls.el" "gnus/utf7.el" "gnus/webmail.el" "help.el" -;;;;;; "indent.el" "international/characters.el" "international/fontset.el" -;;;;;; "international/iso-ascii.el" "international/iso-insert.el" -;;;;;; "international/iso-swed.el" "international/ja-dic-cnv.el" -;;;;;; "international/ja-dic-utl.el" "international/mule-cmds.el" -;;;;;; "international/mule-conf.el" "international/mule.el" "international/ogonek.el" -;;;;;; "international/swedish.el" "international/utf-7.el" "isearch.el" -;;;;;; "kermit.el" "language/chinese.el" "language/cyrillic.el" -;;;;;; "language/czech.el" "language/devanagari.el" "language/english.el" -;;;;;; "language/ethiopic.el" "language/european.el" "language/georgian.el" -;;;;;; "language/greek.el" "language/hebrew.el" "language/indian.el" -;;;;;; "language/japanese.el" "language/korean.el" "language/lao.el" -;;;;;; "language/malayalam.el" "language/misc-lang.el" "language/romanian.el" -;;;;;; "language/slovak.el" "language/tamil.el" "language/thai.el" -;;;;;; "language/tibetan.el" "language/utf-8-lang.el" "language/vietnamese.el" +;;;;;; "indent.el" "international/characters.el" "international/cp51932.el" +;;;;;; "international/eucjp-ms.el" "international/fontset.el" "international/iso-ascii.el" +;;;;;; "international/iso-insert.el" "international/iso-swed.el" +;;;;;; "international/ja-dic-cnv.el" "international/ja-dic-utl.el" +;;;;;; "international/mule-cmds.el" "international/mule-conf.el" +;;;;;; "international/mule.el" "international/ogonek.el" "international/swedish.el" +;;;;;; "international/utf-7.el" "isearch.el" "kermit.el" "language/chinese.el" +;;;;;; "language/cyrillic.el" "language/czech.el" "language/devanagari.el" +;;;;;; "language/english.el" "language/ethiopic.el" "language/european.el" +;;;;;; "language/georgian.el" "language/greek.el" "language/hebrew.el" +;;;;;; "language/indian.el" "language/japanese.el" "language/kannada.el" +;;;;;; "language/korean.el" "language/lao.el" "language/malayalam.el" +;;;;;; "language/misc-lang.el" "language/romanian.el" "language/slovak.el" +;;;;;; "language/tamil.el" "language/thai.el" "language/tibetan.el" +;;;;;; "language/utf-8-lang.el" "language/vietnamese.el" "ldefs-boot.el" ;;;;;; "loadup.el" "mail/blessmail.el" "mail/mailheader.el" "mail/mailpost.el" ;;;;;; "mail/mspools.el" "mail/rfc2368.el" "mail/rfc822.el" "mail/rmail-spam-filter.el" ;;;;;; "mail/uce.el" "mail/vms-pmail.el" "mh-e/mh-alias.el" "mh-e/mh-customize.el" @@ -25519,33 +26143,34 @@ Zone-mode does two things: ;;;;;; "obsolete/uncompress.el" "obsolete/x-apollo.el" "obsolete/x-menu.el" ;;;;;; "patcomp.el" "paths.el" "pcvs-info.el" "pcvs-parse.el" "pcvs-util.el" ;;;;;; "play/gamegrid.el" "play/gametree.el" "play/meese.el" "progmodes/ada-prj.el" -;;;;;; "progmodes/cap-words.el" "progmodes/cc-align.el" "progmodes/cc-awk.el" -;;;;;; "progmodes/cc-bytecomp.el" "progmodes/cc-cmds.el" "progmodes/cc-compat.el" -;;;;;; "progmodes/cc-defs.el" "progmodes/cc-engine.el" "progmodes/cc-fonts.el" -;;;;;; "progmodes/cc-langs.el" "progmodes/cc-menus.el" "progmodes/cc-vars.el" -;;;;;; "progmodes/ebnf-bnf.el" "progmodes/ebnf-iso.el" "progmodes/ebnf-otz.el" -;;;;;; "progmodes/ebnf-yac.el" "progmodes/idlw-rinfo.el" "progmodes/idlw-toolbar.el" -;;;;;; "progmodes/mantemp.el" "progmodes/xscheme.el" "register.el" -;;;;;; "replace.el" "s-region.el" "saveplace.el" "scroll-bar.el" -;;;;;; "select.el" "simple.el" "soundex.el" "startup.el" "subdirs.el" -;;;;;; "subr.el" "tempo.el" "term/AT386.el" "term/apollo.el" "term/bg-mouse.el" -;;;;;; "term/bobcat.el" "term/internal.el" "term/iris-ansi.el" "term/keyswap.el" -;;;;;; "term/linux.el" "term/lk201.el" "term/mac-win.el" "term/news.el" -;;;;;; "term/pc-win.el" "term/rxvt.el" "term/sun-mouse.el" "term/sun.el" -;;;;;; "term/sup-mouse.el" "term/tty-colors.el" "term/tvi970.el" -;;;;;; "term/vt100.el" "term/vt102.el" "term/vt125.el" "term/vt200.el" -;;;;;; "term/vt201.el" "term/vt220.el" "term/vt240.el" "term/vt300.el" -;;;;;; "term/vt320.el" "term/vt400.el" "term/vt420.el" "term/w32-win.el" -;;;;;; "term/wyse50.el" "term/x-win.el" "term/xterm.el" "textmodes/bib-mode.el" -;;;;;; "textmodes/fill.el" "textmodes/makeinfo.el" "textmodes/page-ext.el" -;;;;;; "textmodes/page.el" "textmodes/paragraphs.el" "textmodes/refbib.el" -;;;;;; "textmodes/refer.el" "textmodes/reftex-auc.el" "textmodes/reftex-dcr.el" -;;;;;; "textmodes/reftex-global.el" "textmodes/reftex-ref.el" "textmodes/reftex-sel.el" -;;;;;; "textmodes/reftex-toc.el" "textmodes/reftex-vars.el" "textmodes/texnfo-upd.el" -;;;;;; "textmodes/text-mode.el" "timezone.el" "uniquify.el" "vc-hooks.el" -;;;;;; "vcursor.el" "version.el" "vms-patch.el" "vmsproc.el" "vt-control.el" -;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "widget.el" "window.el") -;;;;;; (16205 43209 430396)) +;;;;;; "progmodes/cc-align.el" "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el" +;;;;;; "progmodes/cc-cmds.el" "progmodes/cc-compat.el" "progmodes/cc-defs.el" +;;;;;; "progmodes/cc-engine.el" "progmodes/cc-fonts.el" "progmodes/cc-langs.el" +;;;;;; "progmodes/cc-menus.el" "progmodes/cc-vars.el" "progmodes/ebnf-abn.el" +;;;;;; "progmodes/ebnf-bnf.el" "progmodes/ebnf-dtd.el" "progmodes/ebnf-ebx.el" +;;;;;; "progmodes/ebnf-iso.el" "progmodes/ebnf-otz.el" "progmodes/ebnf-yac.el" +;;;;;; "progmodes/idlw-rinfo.el" "progmodes/idlw-toolbar.el" "progmodes/mantemp.el" +;;;;;; "progmodes/xscheme.el" "register.el" "replace.el" "s-region.el" +;;;;;; "saveplace.el" "scroll-bar.el" "select.el" "simple.el" "soundex.el" +;;;;;; "startup.el" "subdirs.el" "subr.el" "tempo.el" "term/AT386.el" +;;;;;; "term/apollo.el" "term/bg-mouse.el" "term/bobcat.el" "term/internal.el" +;;;;;; "term/iris-ansi.el" "term/keyswap.el" "term/linux.el" "term/lk201.el" +;;;;;; "term/mac-win.el" "term/news.el" "term/pc-win.el" "term/rxvt.el" +;;;;;; "term/sun-mouse.el" "term/sun.el" "term/sup-mouse.el" "term/tty-colors.el" +;;;;;; "term/tvi970.el" "term/vt100.el" "term/vt102.el" "term/vt125.el" +;;;;;; "term/vt200.el" "term/vt201.el" "term/vt220.el" "term/vt240.el" +;;;;;; "term/vt300.el" "term/vt320.el" "term/vt400.el" "term/vt420.el" +;;;;;; "term/w32-win.el" "term/wyse50.el" "term/x-win.el" "term/xterm.el" +;;;;;; "textmodes/bib-mode.el" "textmodes/fill.el" "textmodes/makeinfo.el" +;;;;;; "textmodes/page-ext.el" "textmodes/page.el" "textmodes/paragraphs.el" +;;;;;; "textmodes/refbib.el" "textmodes/refer.el" "textmodes/reftex-auc.el" +;;;;;; "textmodes/reftex-dcr.el" "textmodes/reftex-global.el" "textmodes/reftex-ref.el" +;;;;;; "textmodes/reftex-sel.el" "textmodes/reftex-toc.el" "textmodes/reftex-vars.el" +;;;;;; "textmodes/texnfo-upd.el" "textmodes/text-mode.el" "timezone.el" +;;;;;; "uniquify.el" "vc-hooks.el" "vcursor.el" "version.el" "vms-patch.el" +;;;;;; "vmsproc.el" "vt-control.el" "vt100-led.el" "w32-fns.el" +;;;;;; "w32-vars.el" "widget.el" "window.el" "x-dnd.el") (16511 +;;;;;; 51891 823190)) ;;;*** diff --git a/lisp/loadhist.el b/lisp/loadhist.el index e609596e4a..8cbe1d80cd 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -98,7 +98,8 @@ return the feature \(symbol\)." features) nil t))) -(defvar loadhist-hook-functions +(defvaralias 'loadhist-hook-functions 'unload-feature-special-hooks) +(defvar unload-feature-special-hooks '(after-change-functions after-insert-file-functions auto-fill-function before-change-functions blink-paren-function @@ -115,11 +116,27 @@ These are symbols with hook-type values whose names don't end in `-hook' or `-hooks', from which `unload-feature' tries to remove pertinent symbols.") +(defvar unload-hook-features-list nil + "List of features of the package being unloaded. + +This is meant to be used by FEATURE-unload-hook hooks, see the +documentation of `unload-feature' for details.") + ;;;###autoload (defun unload-feature (feature &optional force) "Unload the library that provided FEATURE, restoring all its autoloads. If the feature is required by any other loaded code, and prefix arg FORCE -is nil, raise an error." +is nil, raise an error. + +This function tries to undo modifications made by the package to +hooks. Packages may define a hook FEATURE-unload-hook that is called +instead of the normal heuristics for doing this. Such a hook should +undo all the relevant global state changes that may have been made by +loading the package or executing functions in it. It has access to +the package's feature list (before anything is unbound) in the +variable `unload-hook-features-list' and could remove features from it +in the event that the package has done something normally-ill-advised, +such as redefining an Emacs function." (interactive (list (read-feature "Feature: ") current-prefix-arg)) (if (not (featurep feature)) (error "%s is not a currently loaded feature" (symbol-name feature))) @@ -129,15 +146,15 @@ is nil, raise an error." (if dependents (error "Loaded libraries %s depend on %s" (prin1-to-string dependents) file)))) - (let* ((flist (feature-symbols feature)) - (file (car flist)) + (let* ((unload-hook-features-list (feature-symbols feature)) + (file (car unload-hook-features-list)) (unload-hook (intern-soft (concat (symbol-name feature) "-unload-hook")))) ;; Try to avoid losing badly when hooks installed in critical ;; places go away. (Some packages install things on ;; `kill-buffer-hook', `activate-menubar-hook' and the like.) - ;; First off, provide a clean way for package `foo' to arrange - ;; this by defining `foo-unload-hook'. + ;; First off, provide a clean way for package FOO to arrange + ;; this by adding hooks on the variable `FOO-unload-hook'. (if unload-hook (run-hooks unload-hook) ;; Otherwise, do our best. Look through the obarray for symbols @@ -153,11 +170,11 @@ is nil, raise an error." (consp (symbol-value x)) (string-match "-hooks?\\'" (symbol-name x))) (and (boundp x) ; Known abnormal hooks etc. - (memq x loadhist-hook-functions))) - (dolist (y (cdr flist)) + (memq x unload-feature-special-hooks))) + (dolist (y (cdr unload-hook-features-list)) (remove-hook x y)))))) (if (fboundp 'elp-restore-function) ; remove ELP stuff first - (dolist (elt (cdr flist)) + (dolist (elt (cdr unload-hook-features-list)) (if (symbolp elt) (elp-restore-function elt)))) (mapc @@ -182,11 +199,12 @@ is nil, raise an error." (fmakunbound x) (let ((aload (get x 'autoload))) (if aload (fset x (cons 'autoload aload)))))))) - (cdr flist)) + (cdr unload-hook-features-list)) ;; Delete the load-history element for this file. (let ((elt (assoc file load-history))) (setq load-history (delq elt load-history))))) (provide 'loadhist) +;;; arch-tag: 70bb846a-c413-4f01-bf88-78dba4ac0798 ;;; loadhist.el ends here diff --git a/lisp/loadup.el b/lisp/loadup.el index a11aa1ae14..7c1a5f438e 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -93,6 +93,7 @@ (load "language/devanagari") ; This should be loaded after indian. (load "language/malayalam") ; This should be loaded after indian. (load "language/tamil") ; This should be loaded after indian. +(load "language/kannada") ; This should be loaded after indian. (load "language/english") (load "language/ethiopic") (load "language/european") @@ -317,7 +318,7 @@ (dump-emacs "emacs" "temacs") (message "%d pure bytes used" pure-bytes-used) ;; Recompute NAME now, so that it isn't set when we dump. - (if (not (memq system-type '(ms-dos windows-nt))) + (if (not (memq system-type '(ms-dos windows-nt cygwin))) (let ((name (concat "emacs-" emacs-version))) (while (string-match "[^-+_.a-zA-Z0-9]+" name) (setq name (concat (downcase (substring name 0 (match-beginning 0))) @@ -344,4 +345,6 @@ ;;; no-byte-compile: t ;;; no-update-autoloads: t ;;; End: + +;;; arch-tag: 121e1dd4-36e1-45ac-860e-239f577a6335 ;;; loadup.el ends here diff --git a/lisp/locate.el b/lisp/locate.el index 40e8ddc65c..eb8074c9f6 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -516,4 +516,5 @@ Database is updated using the shell command in `locate-update-command'." (provide 'locate) +;;; arch-tag: 60c4d098-b5d5-4b3c-a3e0-51a2e9f43898 ;;; locate.el ends here diff --git a/lisp/log-edit.el b/lisp/log-edit.el index 9526a39123..9a4521bbde 100644 --- a/lisp/log-edit.el +++ b/lisp/log-edit.el @@ -1,6 +1,6 @@ ;;; log-edit.el --- Major mode for editing CVS commit messages -;; Copyright (C) 1999,2000,2003 Free Software Foundation, Inc. +;; Copyright (C) 1999,2000,2003,2004 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: pcl-cvs cvs commit log @@ -299,6 +299,11 @@ automatically." ;;; Actual code ;;; +(defvar log-edit-font-lock-keywords + '(("\\`\\(Summary:\\)\\(.*\\)" + (1 font-lock-keyword-face) + (2 font-lock-function-name-face)))) + ;;;###autoload (defun log-edit (callback &optional setup listfun buffer &rest ignore) "Setup a buffer to enter a log message. @@ -337,6 +342,8 @@ the package from which this is used might also provide additional commands (under C-x v for VC, for example). \\{log-edit-mode-map}" + (set (make-local-variable 'font-lock-defaults) + '(log-edit-font-lock-keywords t)) (make-local-variable 'log-edit-comment-ring-index)) (defun log-edit-hide-buf (&optional buf where) @@ -564,12 +571,21 @@ where LOGBUFFER is the name of the ChangeLog buffer, and each (save-excursion (let ((changelog-file-name (let ((default-directory - (file-name-directory (expand-file-name file)))) - ;; `find-change-log' uses `change-log-default-name' if set - ;; and sets it before exiting, so we need to work around - ;; that memoizing which is undesired here - (setq change-log-default-name nil) - (find-change-log)))) + (file-name-directory (expand-file-name file))) + (visiting-buffer (find-buffer-visiting file))) + ;; If there is a buffer visiting FILE, and it has a local + ;; value for `change-log-default-name', use that. + (if (and visiting-buffer + (local-variable-p 'change-log-default-name + visiting-buffer)) + (save-excursion + (set-buffer visiting-buffer) + change-log-default-name) + ;; `find-change-log' uses `change-log-default-name' if set + ;; and sets it before exiting, so we need to work around + ;; that memoizing which is undesired here + (setq change-log-default-name nil) + (find-change-log))))) (set-buffer (find-file-noselect changelog-file-name)) (unless (eq major-mode 'change-log-mode) (change-log-mode)) (goto-char (point-min)) @@ -630,4 +646,5 @@ Sort REGIONS front-to-back first." (provide 'log-edit) +;;; arch-tag: 8089b39c-983b-4e83-93cd-ed0a64c7fdcc ;;; log-edit.el ends here diff --git a/lisp/log-view.el b/lisp/log-view.el index 8885354bdc..a6f736d16f 100644 --- a/lisp/log-view.el +++ b/lisp/log-view.el @@ -204,4 +204,5 @@ Otherwise, get the diff between the revisions (provide 'log-view) +;;; arch-tag: 0d64220b-ce7e-4f62-9c2a-6b04c2f81f4f ;;; log-view.el ends here diff --git a/lisp/lpr.el b/lisp/lpr.el index 7b827704ca..0eac7b7ba3 100644 --- a/lisp/lpr.el +++ b/lisp/lpr.el @@ -326,4 +326,5 @@ The characters tab, linefeed, space, return and formfeed are not affected." (provide 'lpr) +;;; arch-tag: 21c3f821-ebec-4ca9-ac67-a81e4b75c62a ;;; lpr.el ends here diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index b6621b0856..521729b764 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -212,7 +212,8 @@ that work are: A a c i r S s t u U X g G B C R and F partly." file switches wildcard full-directory-p) ;; We need the directory in order to find the right handler. (let ((handler (find-file-name-handler (expand-file-name file) - 'insert-directory))) + 'insert-directory)) + wildcard-regexp) (if handler (funcall handler 'insert-directory file switches wildcard full-directory-p) @@ -221,16 +222,25 @@ that work are: A a c i r S s t u U X g G B C R and F partly." (setq switches (replace-match "" nil nil switches))) ;; Convert SWITCHES to a list of characters. (setq switches (delete ?- (append switches nil))) + ;; Sometimes we get ".../foo*/" as FILE. While the shell and + ;; `ls' don't mind, we certainly do, because it makes us think + ;; there is no wildcard, only a directory name. + (if (and ls-lisp-support-shell-wildcards + (string-match "[[?*]" file)) + (progn + (or (not (eq (aref file (1- (length file))) ?/)) + (setq file (substring file 0 (1- (length file))))) + (setq wildcard t))) (if wildcard - (setq wildcard + (setq wildcard-regexp (if ls-lisp-support-shell-wildcards (wildcard-to-regexp (file-name-nondirectory file)) (file-name-nondirectory file)) file (file-name-directory file)) - (if (memq ?B switches) (setq wildcard "[^~]\\'"))) + (if (memq ?B switches) (setq wildcard-regexp "[^~]\\'"))) (ls-lisp-insert-directory file switches (ls-lisp-time-index switches) - wildcard full-directory-p) + wildcard-regexp full-directory-p) ;; Try to insert the amount of free space. (save-excursion (goto-char (point-min)) @@ -244,29 +254,20 @@ that work are: A a c i r S s t u U X g G B C R and F partly." (insert " available " available))))))))) (defun ls-lisp-insert-directory - (file switches time-index wildcard full-directory-p) + (file switches time-index wildcard-regexp full-directory-p) "Insert directory listing for FILE, formatted according to SWITCHES. Leaves point after the inserted text. This is an internal function optionally called by the `ls-lisp.el' version of `insert-directory'. It is called recursively if the -R switch is used. SWITCHES is a *list* of characters. TIME-INDEX is the time index into -file-attributes according to SWITCHES. WILDCARD is nil or an *Emacs +file-attributes according to SWITCHES. WILDCARD-REGEXP is nil or an *Emacs regexp*. FULL-DIRECTORY-P means file is a directory and SWITCHES does not contain `d', so that a full listing is expected." - ;; Sometimes we get ".../foo*/" as FILE. While the shell and - ;; `ls' don't mind, we certainly do, because it makes us think - ;; there is no wildcard, only a directory name. - (if (and ls-lisp-support-shell-wildcards - (string-match "[[?*]" file)) - (progn - (or (not (eq (aref file (1- (length file))) ?/)) - (setq file (substring file 0 (1- (length file))))) - (setq wildcard t))) - (if (or wildcard full-directory-p) + (if (or wildcard-regexp full-directory-p) (let* ((dir (file-name-as-directory file)) (default-directory dir) ; so that file-attributes works (file-alist - (directory-files-and-attributes dir nil wildcard t)) + (directory-files-and-attributes dir nil wildcard-regexp t 'string)) (now (current-time)) (sum 0) ;; do all bindings here for speed @@ -322,13 +323,13 @@ not contain `d', so that a full listing is expected." (setq elt (expand-file-name (car elt) dir)) (insert "\n" elt ":\n") (ls-lisp-insert-directory - elt switches time-index wildcard full-directory-p))))) + elt switches time-index wildcard-regexp full-directory-p))))) ;; If not full-directory-p, FILE *must not* end in /, as ;; file-attributes will not recognize a symlink to a directory, ;; so must make it a relative filename as ls does: (if (eq (aref file (1- (length file))) ?/) (setq file (substring file 0 -1))) - (let ((fattr (file-attributes file))) + (let ((fattr (file-attributes file 'string))) (if fattr (insert (ls-lisp-format file fattr (nth 7 fattr) switches time-index (current-time))) @@ -521,23 +522,14 @@ SWITCHES, TIME-INDEX and NOW give the full switch list and time data." ;; They tend to be bogus on non-UNIX platforms anyway so ;; optionally hide them. (if (memq 'uid ls-lisp-verbosity) - ;; (user-login-name uid) works on Windows NT but not - ;; on 9x and maybe not on some other platforms, so... + ;; uid can be a sting or an integer (let ((uid (nth 2 file-attr))) - (if (= uid (user-uid)) - (format " %-8s" (user-login-name)) - (format " %-8d" uid)))) + (format (if (stringp uid) " %-8s" " %-8d") uid))) (if (not (memq ?G switches)) ; GNU ls -- shows group by default (if (or (memq ?g switches) ; UNIX ls -- no group by default (memq 'gid ls-lisp-verbosity)) - (if (memq system-type '(macos windows-nt ms-dos)) - ;; No useful concept of group... - " root" - (let* ((gid (nth 3 file-attr)) - (group (user-login-name gid))) - (if group - (format " %-8s" group) - (format " %-8d" gid)))))) + (let ((gid (nth 3 file-attr))) + (format (if (stringp gid) " %-8s" " %-8d") gid)))) (ls-lisp-format-file-size file-size (memq ?h switches)) " " (ls-lisp-format-time file-attr time-index now) @@ -603,4 +595,5 @@ All ls time options, namely c, t and u, are handled." (provide 'ls-lisp) +;;; arch-tag: e55f399b-05ec-425c-a6d5-f5e349c35ab4 ;;; ls-lisp.el ends here diff --git a/lisp/macros.el b/lisp/macros.el index b708683bdf..72ba3f1172 100644 --- a/lisp/macros.el +++ b/lisp/macros.el @@ -310,4 +310,5 @@ and then select the region of un-tablified names and use (provide 'macros) +;;; arch-tag: 346ed1a5-1220-4bc8-b533-961ee704361f ;;; macros.el ends here diff --git a/lisp/mail/blessmail.el b/lisp/mail/blessmail.el index d87f1f3232..70438811dc 100644 --- a/lisp/mail/blessmail.el +++ b/lisp/mail/blessmail.el @@ -66,4 +66,5 @@ (write-region (point-min) (point-max) "blessmail") (kill-emacs) +;;; arch-tag: c3329fe2-f945-41a9-8b00-b4b038ff182f ;;; blessmail.el ends here diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index c86c182726..e93f76c304 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -79,6 +79,7 @@ Prompts for bug subject. Leaves you in a mail buffer." ;; If there are four numbers in emacs-version, this is a pretest ;; version. (let ((pretest-p (string-match "\\..*\\..*\\." emacs-version)) + (from-buffer (current-buffer)) user-point prompt-beg-point message-end-point) (setq message-end-point (with-current-buffer (get-buffer-create "*Messages*") @@ -141,6 +142,15 @@ usually do not have translators to read other languages for them.\n\n") (insert (format " default-enable-multibyte-characters: %s\n" default-enable-multibyte-characters)) (insert "\n") + (insert (format "Major mode: %s\n" + (buffer-local-value 'mode-name from-buffer))) + (insert "\n") + (insert "Minor modes in effect:\n") + (dolist (mode minor-mode-list) + (and (boundp mode) (buffer-local-value mode from-buffer) + (insert (format " %s: %s\n" mode + (buffer-local-value mode from-buffer))))) + (insert "\n") (insert "Recent input:\n") (let ((before-keys (point))) (insert (mapconcat (lambda (key) @@ -255,4 +265,5 @@ and send the mail again using \\[mail-send-and-exit]."))) (provide 'emacsbug) +;;; arch-tag: 248b6523-c3b5-4fec-9a3f-0411fafa7d49 ;;; emacsbug.el ends here diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 735bcd3635..3d1b195142 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -2670,4 +2670,5 @@ been weeded out." (provide 'feedmail) +;;; arch-tag: ec27b380-11c0-4dfd-8436-f636cf2bb992 ;;; feedmail.el ends here diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index b4e8d20c4e..4644d36ad2 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el @@ -752,4 +752,5 @@ key binding (provide 'footnote) +;;; arch-tag: 9bcfb6d7-2161-4caf-8793-700f62400398 ;;; footnote.el ends here diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el index 8bcc4c72d3..faa7ca1bb7 100644 --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el @@ -231,6 +231,7 @@ we will assume that \"John Q. Smith\" is the fellow's name." If true, then when we see an address like \"Idiot \" we will act as though we couldn't find a full name in the address." :type 'boolean + :version "21.4" :group 'mail-extr) ;; Matches a leading title that is not part of the name (does not @@ -273,27 +274,6 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"." ;; Constant definitions. ;; -;; Codes in -;; Names in ISO 8859-1 Name -;; ISO 10XXX ISO 8859-2 in -;; ISO 6937 ISO 10646 RFC Swedish -;; etc. Hex Oct 1345 TeX Split ASCII Description -;; --------- ---------- ---- --- ----- ----- ------------------------------- -;; %a E4 344 a: \"a ae { latin small a + diaeresis d -;; %o F6 366 o: \"o oe | latin small o + diaeresis v -;; @a E5 345 aa \oa aa } latin small a + ring above e -;; %u FC 374 u: \"u ue ~ latin small u + diaeresis | -;; /e E9 351 e' \'e ` latin small e + acute i -;; %A C4 304 A: \"A AE [ latin capital a + diaeresis D -;; %O D6 326 O: \"O OE \ latin capital o + diaeresis V -;; @A C5 305 AA \oA AA ] latin capital a + ring above E -;; %U DC 334 U: \"U UE ^ latin capital u + diaeresis \ -;; /E C9 311 E' \'E @ latin capital e + acute I - -;; NOTE: @a and @A are not in ISO 8859-2 (the codes mentioned above invoke -;; /l and /L). Some of this data was retrieved from -;; listserv@jhuvm.hcf.jhu.edu. - ;; Any character that can occur in a name, not counting characters that ;; separate parts of a multipart name (hyphen and period). ;; Yes, there are weird people with digits in their names. @@ -530,8 +510,6 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"." (?\040 " ") ;SPC (?! ?~ "w") ;printable characters (?\177 "w") ;DEL - (?\200 ?\377 "w") ;high-bit-on characters - (?\240 " ") ;nobreakspace (?\t " ") (?\r " ") (?\n " ") @@ -614,6 +592,10 @@ by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\"." ;; Utility functions and macros. ;; +;; Fixme: There are Latin-1 nbsp below. If such characters should be +;; included, this is the wrong thing to do -- it should use syntax (or +;; regexp char classes). + (defsubst mail-extr-skip-whitespace-forward () ;; v19 fn skip-syntax-forward is more tasteful, but not byte-coded. (skip-chars-forward " \t\n\r ")) @@ -1727,19 +1709,19 @@ consing a string.)" (and (>= word-count 2) (not lower-case-flag) (or - ;; A trailing 4-or-more letter lowercase words preceded by + ;; Trailing 4-or-more letter lowercase words preceded by ;; mixed case or uppercase words will be dropped. - (looking-at "[a-z][a-z][a-z][a-z]+[ \t]*\\'") + (looking-at "[[:lower:]]\\{4,\\}[ \t]*\\'") ;; Drop a trailing word which is terminated with a period. (eq ?. (char-after (1- name-end)))) (setq drop-this-word-if-trailing-flag t)) ;; Set the flags that indicate whether we have seen a lowercase ;; word, a mixed case word, and an uppercase word. - (if (re-search-forward "[a-z]" name-end t) + (if (re-search-forward "[[:lower:]]" name-end t) (if (progn (goto-char name-beg) - (re-search-forward "[A-Z]" name-end t)) + (re-search-forward "[[:upper:]]" name-end t)) (setq mixed-case-flag t) (setq lower-case-flag t)) ;; (setq upper-case-flag t) @@ -2144,4 +2126,5 @@ consing a string.)" (provide 'mail-extr) +;;; arch-tag: 7785fade-1073-4ed6-b4f6-28db34a7982d ;;; mail-extr.el ends here diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el index da27b726ef..ba66ca079f 100644 --- a/lisp/mail/mail-hist.el +++ b/lisp/mail/mail-hist.el @@ -293,4 +293,5 @@ received mail." (provide 'mail-hist) +;;; arch-tag: 9ff9a07c-9dca-482d-ba87-54f42778559d ;;; mail-hist.el ends here diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index 42be6b5704..aecc87cf17 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el @@ -79,6 +79,7 @@ we add the wrapper characters =?ISO-8859-1?Q?....?=." (concat result (substring string i)))))) (defun mail-unquote-printable-hexdigit (char) + (setq char (upcase char)) (if (>= char ?A) (+ (- char ?A) 10) (- char ?0))) @@ -107,31 +108,48 @@ we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=." (apply 'concat (nreverse (cons (substring string i) strings)))))) ;;;###autoload -(defun mail-unquote-printable-region (beg end &optional wrapper) +(defun mail-unquote-printable-region (beg end &optional wrapper noerror + unibyte) "Undo the \"quoted printable\" encoding in buffer from BEG to END. If the optional argument WRAPPER is non-nil, -we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=." +we expect to find and remove the wrapper characters =?ISO-8859-1?Q?....?=. +If NOERROR is non-nil, return t if successful. +If UNIBYTE is non-nil, insert converted characters as unibyte. +That is useful if you are going to character code decoding afterward, +as Rmail does." (interactive "r\nP") - (save-match-data - (save-excursion - (save-restriction - (narrow-to-region beg end) - (goto-char (point-min)) - (when (and wrapper - (looking-at "\\`=\\?ISO-8859-1\\?Q\\?\\([^?]*\\)\\?")) - (delete-region (match-end 1) end) - (delete-region (point) (match-beginning 1))) - (while (re-search-forward "=\\(..\\|\n\\)" nil t) - (goto-char (match-end 0)) - (replace-match - (if (= (char-after (match-beginning 1)) ?\n) - "" - (make-string 1 - (+ (* 16 (mail-unquote-printable-hexdigit - (char-after (match-beginning 1)))) - (mail-unquote-printable-hexdigit - (char-after (1+ (match-beginning 1))))))) - t t)))))) + (let (failed) + (save-match-data + (save-excursion + (save-restriction + (narrow-to-region beg end) + (goto-char (point-min)) + (when (and wrapper + (looking-at "\\`=\\?ISO-8859-1\\?Q\\?\\([^?]*\\)\\?")) + (delete-region (match-end 1) end) + (delete-region (point) (match-beginning 1))) + (while (re-search-forward "=\\(\\([0-9A-F][0-9A-F]\\)\\|[=\n]\\|..\\)" nil t) + (goto-char (match-end 0)) + (cond ((= (char-after (match-beginning 1)) ?\n) + (replace-match "")) + ((= (char-after (match-beginning 1)) ?=) + (replace-match "=")) + ((match-beginning 2) + (let ((char (+ (* 16 (mail-unquote-printable-hexdigit + (char-after (match-beginning 2)))) + (mail-unquote-printable-hexdigit + (char-after (1+ (match-beginning 2))))))) + (if unibyte + (progn + (replace-match "") + ;; insert-char will insert this as unibyte, + (insert-char char 1)) + (replace-match (make-string 1 char) t t)))) + (noerror + (setq failed t)) + (t + (error "Malformed MIME quoted-printable message")))) + (not failed)))))) (eval-when-compile (require 'rfc822)) @@ -216,9 +234,15 @@ the comma-separated list. The pruned list is returned." "") (if (and user-mail-address (not (equal user-mail-address user-login-name))) - (concat (regexp-quote user-mail-address) "\\|") + ;; Anchor the login name and email address so + ;; that we don't match substrings: if the + ;; login name is "foo", we shouldn't match + ;; "barfoo@baz.com". + (concat "\\`" + (regexp-quote user-mail-address) + "\\'\\|") "") - (concat (regexp-quote user-login-name) "\\>")))) + (concat "\\`" (regexp-quote user-login-name) "@")))) ;; Split up DESTINATIONS and match each element separately. (let ((start-pos 0) (cur-pos 0) (case-fold-search t)) @@ -346,4 +370,5 @@ If 4th arg LIST is non-nil, return a list of all such fields." (provide 'mail-utils) +;;; arch-tag: b24aec2f-fd65-4ceb-9e39-3cc2827036fd ;;; mail-utils.el ends here diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index b2edf77786..1b94f179f9 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el @@ -30,7 +30,7 @@ ;; This file ensures that, when the point is in a To:, CC:, BCC:, or From: ;; field, word-abbrevs are defined for each of your mail aliases. These ;; aliases will be defined from your .mailrc file (or the file specified by -;; the MAILRC environment variable) if it exists. Your mail aliases will +;; `mail-personal-alias-file') if it exists. Your mail aliases will ;; expand any time you type a word-delimiter at the end of an abbreviation. ;; ;; What you see is what you get: if mailabbrev is in use when you type @@ -161,12 +161,13 @@ no aliases, which is represented by this being a table with no entries.)") "The modification time of your mail alias file when it was last examined.") (defun mail-abbrevs-sync-aliases () - (if (file-exists-p mail-personal-alias-file) - (let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) - (if (not (equal mail-abbrev-modtime modtime)) - (progn - (setq mail-abbrev-modtime modtime) - (build-mail-abbrevs)))))) + (when mail-personal-alias-file + (if (file-exists-p mail-personal-alias-file) + (let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) + (if (not (equal mail-abbrev-modtime modtime)) + (progn + (setq mail-abbrev-modtime modtime) + (build-mail-abbrevs))))))) ;;;###autoload (defun mail-abbrevs-setup () @@ -625,4 +626,5 @@ Don't use this command in Lisp programs! (if mail-abbrevs-mode (mail-abbrevs-enable)) +;;; arch-tag: 5aa2d901-73f8-4ad7-b73c-4802282ad2ff ;;; mailabbrev.el ends here diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el index 6d0c2e1212..18f52e6434 100644 --- a/lisp/mail/mailalias.el +++ b/lisp/mail/mailalias.el @@ -540,4 +540,5 @@ See `mail-directory-stream'." (provide 'mailalias) +;;; arch-tag: 1d6a0f87-eb34-4d45-8816-60c1b952cf46 ;;; mailalias.el ends here diff --git a/lisp/mail/mailheader.el b/lisp/mail/mailheader.el index 163b2ecd5e..1eac0dfa3a 100644 --- a/lisp/mail/mailheader.el +++ b/lisp/mail/mailheader.el @@ -191,4 +191,5 @@ A key of nil has as its value a list of defaulted headers to ignore." (provide 'mailheader) +;;; arch-tag: 6e7aa221-80b5-4b3d-b46f-fd66ab567be0 ;;; mailheader.el ends here diff --git a/lisp/mail/mailpost.el b/lisp/mail/mailpost.el index f8198c9e97..8d57de6ede 100644 --- a/lisp/mail/mailpost.el +++ b/lisp/mail/mailpost.el @@ -105,4 +105,5 @@ site-init." (provide 'mailpost) +;;; arch-tag: 1f8ca085-60a6-4eac-8efb-69ffec2fa124 ;;; mailpost.el ends here diff --git a/lisp/mail/metamail.el b/lisp/mail/metamail.el index 7cfc4312a7..1ecedf515f 100644 --- a/lisp/mail/metamail.el +++ b/lisp/mail/metamail.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1993, 1996 Free Software Foundation, Inc. ;; Author: Masanobu UMEDA -;; Version: $Id: metamail.el,v 1.14 2000/11/12 00:22:02 fx Exp $ ;; Keywords: mail, news, mime, multimedia ;; This file is part of GNU Emacs. @@ -190,4 +189,5 @@ redisplayed as output is inserted." (provide 'metamail) +;;; arch-tag: 52c0cb6f-d800-4776-9789-f0275cb5490e ;;; metamail.el ends here diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el index 1f8651727e..8dc165dcc5 100644 --- a/lisp/mail/mspools.el +++ b/lisp/mail/mspools.el @@ -404,4 +404,5 @@ nil." (provide 'mspools) +;;; arch-tag: 8990b3ee-68c8-4892-98f1-51a735c8bac6 ;;; mspools.el ends here diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el index c1d5839bab..6e609a1f36 100644 --- a/lisp/mail/reporter.el +++ b/lisp/mail/reporter.el @@ -407,4 +407,6 @@ mail-sending package is used for editing and sending the message." (provide 'reporter) + +;;; arch-tag: 33612ff4-fbbc-4be2-b183-560ce9e0199b ;;; reporter.el ends here diff --git a/lisp/mail/rfc2368.el b/lisp/mail/rfc2368.el index 2545652365..07ea44cef0 100644 --- a/lisp/mail/rfc2368.el +++ b/lisp/mail/rfc2368.el @@ -76,39 +76,13 @@ (defconst rfc2368-mailto-query-index 4 "Describes the portion of the url after '?'.") -;; for dealing w/ unhexifying strings, my preferred approach is to use -;; a 'string-replace-match-using-function' which can perform a -;; string-replace-match and compute the replacement text based on a -;; passed function -- however, emacs doesn't seem to have such a -;; function yet :-( - -;; for the moment a rip-off of url-unhex (w3/url.el) -(defun rfc2368-unhexify-char (char) - "Unhexify CHAR -- e.g. %20 -> ." - (if (> char ?9) - (if (>= char ?a) - (+ 10 (- char ?a)) - (+ 10 (- char ?A))) - (- char ?0))) - -;; for the moment a rip-off of url-unhex-string (w3/url.el) (slightly modified) (defun rfc2368-unhexify-string (string) "Unhexify STRING -- e.g. 'hello%20there' -> 'hello there'." - (let ((case-fold-search t) - (result "")) - (while (string-match "%[0-9a-f][0-9a-f]" string) - (let* ((start (match-beginning 0)) - (hex-code (+ (* 16 - (rfc2368-unhexify-char (elt string (+ start 1)))) - (rfc2368-unhexify-char (elt string (+ start 2)))))) - (setq result (concat - result (substring string 0 start) - (char-to-string hex-code)) - string (substring string (match-end 0))))) - ;; it seems clearer to do things this way than to just return: - ;; (concat result string) - (setq result (concat result string)) - result)) + (replace-regexp-in-string "%[[:xdigit:]]\\{2\\}" + (lambda (match) + (string (string-to-number (substring match 1) + 16))) + string t t)) (defun rfc2368-parse-mailto-url (mailto-url) "Parse MAILTO-URL, and return an alist of header-name, header-value pairs. @@ -162,4 +136,5 @@ calling this function." (provide 'rfc2368) +;;; arch-tag: ea804934-ad96-4f69-957b-857a76e4fd95 ;;; rfc2368.el ends here diff --git a/lisp/mail/rfc822.el b/lisp/mail/rfc822.el index 989f43cd5a..1a5dfad67f 100644 --- a/lisp/mail/rfc822.el +++ b/lisp/mail/rfc822.el @@ -30,11 +30,13 @@ ;;; Code: -;; uses address-start free, throws to address +(defvar rfc822-address-start) + +;; uses rfc822-address-start free, throws to address (defun rfc822-bad-address (reason) (save-restriction (insert "_^_") - (narrow-to-region address-start + (narrow-to-region rfc822-address-start (if (re-search-forward "[,;]" nil t) (max (point-min) (1- (point))) (point-max))) @@ -52,7 +54,7 @@ ": \"") (goto-char (point-max)) (insert "\")")) (rfc822-nuke-whitespace) - (throw 'address (buffer-substring address-start (point)))) + (throw 'address (buffer-substring rfc822-address-start (point)))) (defun rfc822-nuke-whitespace (&optional leave-space) (let (ch) @@ -179,7 +181,7 @@ ;; domain-literal is "[" *(dtext | quoted-pair) "]" ;; dtext is "[^][\\n" ;; domain-ref is atom - (let ((address-start (point)) + (let ((rfc822-address-start (point)) (n 0)) (catch 'address ;; optimize common cases: @@ -198,14 +200,14 @@ (or (bobp) (/= (preceding-char) ?\ ) (delete-char -1)) ;; relying on the fact that rfc822-looking-at ;; doesn't mung match-data - (throw 'address (buffer-substring address-start (match-end 0))))) - (goto-char address-start) + (throw 'address (buffer-substring rfc822-address-start (match-end 0))))) + (goto-char rfc822-address-start) (while t (cond ((and (= n 1) (rfc822-looking-at ?@)) ;; local-part@domain (rfc822-snarf-domain) (throw 'address - (buffer-substring address-start (point)))) + (buffer-substring rfc822-address-start (point)))) ((rfc822-looking-at ?:) (cond ((not allow-groups) (rfc822-bad-address "A group name may not appear here")) @@ -261,7 +263,7 @@ (throw 'address nil)) ((= n 1) ; allow "foo" (losing unix seems to do this) (throw 'address - (buffer-substring address-start (point)))) + (buffer-substring rfc822-address-start (point)))) ((> n 1) (rfc822-bad-address "Missing comma between addresses or badly-formatted address")) ((or (eobp) (= (following-char) ?,)) @@ -289,12 +291,12 @@ (replace-match "\\1 " t)) (goto-char (point-min)) - (rfc822-nuke-whitespace) (let ((list ()) tem - address-start); this is for rfc822-bad-address + rfc822-address-start); this is for rfc822-bad-address + (rfc822-nuke-whitespace) (while (not (eobp)) - (setq address-start (point)) + (setq rfc822-address-start (point)) (setq tem (catch 'address ; this is for rfc822-bad-address (cond ((rfc822-looking-at ?\,) @@ -316,4 +318,5 @@ (provide 'rfc822) +;;; arch-tag: 5d388a24-e173-40fb-9b8e-85269de44b37 ;;; rfc822.el ends here diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el index 0ae87fe517..43177b7c99 100644 --- a/lisp/mail/rmail-spam-filter.el +++ b/lisp/mail/rmail-spam-filter.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2002 ;; Free Software Foundation, Inc. ;; Keywords: email, spam, filter, rmail -;; Author: Eli Tziperman +;; Author: Eli Tziperman ;; This file is part of GNU Emacs. @@ -41,7 +41,7 @@ ;;; (*) turn on the variable rmail-use-spam-filter, -;;; (*) specify in variable rmail-spam-definitions-alist what sender, +;;; (*) specify in variable rsf-definitions-alist what sender, ;;; subject and contents make an email be considered spam. ;;; in addition, you may: @@ -49,36 +49,47 @@ ;;; (*) Block future mail with the subject or sender of a message ;;; while reading it in RMAIL: just click on the "Spam" item on the ;;; menubar, and add the subject or sender to the list of spam -;;; definitions using the mouse and the appropriate menu item. Â  You +;;; definitions using the mouse and the appropriate menu item. You ;;; need to later also save the list of spam definitions using the ;;; same menu item, or alternatively, see variable -;;; `rmail-spam-filter-autosave-newly-added-spam-definitions'. +;;; `rsf-autosave-newly-added-definitions'. ;;; (*) specify if blind-cc'ed mail (no "To:" header field) is to be -;;; treated as spam (variable rmail-spam-no-blind-cc; Thanks to Ethan +;;; treated as spam (variable rsf-no-blind-cc; Thanks to Ethan ;;; Brown for this). ;;; (*) specify if rmail-spam-filter should ignore case of spam -;;; definitions (variable rmail-spam-filter-ignore-case; Thanks to +;;; definitions (variable rsf-ignore-case; Thanks to ;;; Ethan Brown for the suggestion). ;;; (*) Specify a "white-list" of trusted senders. If any -;;; rmail-spam-white-list string matches a substring of the "From" +;;; rsf-white-list string matches a substring of the "From" ;;; header, the message is flagged as a valid, non-spam message (Ethan ;;; Brown ). +;;; (*) rmail-spam-filter is best used with a general purpose spam +;;; filter such as the procmail-based http://www.spambouncer.org/. +;;; Spambouncer is set to only mark messages as spam/blocked/bulk/OK +;;; via special headers, and these headers may then be defined in +;;; rmail-spam-filter such that the spam is rejected by +;;; rmail-spam-filter itself. + ;;; (*) rmail spam filter also works with bbdb to prevent spam senders ;;; from entering into the .bbdb file. See variable -;;; "rmail-spam-filter-auto-delete-spam-bbdb-entries". This is done +;;; "rsf-auto-delete-spam-bbdb-entries". This is done ;;; in two ways: (a) bbdb is made not to auto-create entries for ;;; messages that are deleted by the rmail-spam-filter, (b) when a ;;; message is deleted in rmail, the user is offered to delete the ;;; sender's bbdb entry as well _if_ it was created at the same day. (require 'rmail) +(if (> emacs-major-version 20) + (require 'rmailsum) + (if (not (fboundp 'rmail-make-summary-line)) (load-library "rmailsum"))) -;; For find-if and other cool common lisp functions we may want to use. (EDB) -(require 'cl) +;; For find-if and other cool common lisp functions we may want to use. +(eval-when-compile + (require 'cl)) (defgroup rmail-spam-filter nil "Spam filter for RMAIL, the mail reader for Emacs." @@ -86,41 +97,51 @@ (defcustom rmail-use-spam-filter nil "*Non-nil to activate the rmail spam filter. -Specify `rmail-spam-definitions-alist' to define what you consider spam +Specify `rsf-definitions-alist' to define what you consider spam emails." :type 'boolean :group 'rmail-spam-filter ) -(defcustom rmail-spam-file "~/XRMAIL-SPAM" +(defcustom rsf-file "~/XRMAIL-SPAM" "*Name of rmail file for optionally saving some of the spam. Spam may be either just deleted, or saved in a separate spam file to be looked at at a later time. Whether the spam is just deleted or also saved in a separete spam file is specified for each definition of -spam, as one of the fields of `rmail-spam-definitions-alist'" +spam, as one of the fields of `rsf-definitions-alist'" :type 'string :group 'rmail-spam-filter ) -(defcustom rmail-spam-no-blind-cc nil +(defcustom rsf-no-blind-cc nil "*Non-nil to treat blind CC (no To: header) as spam." :type 'boolean :group 'rmail-spam-filter ) -(defcustom rmail-spam-filter-ignore-case nil - "*Non-nil to ignore case in `rmail-spam-definitions-alist'." +(defcustom rsf-ignore-case nil + "*Non-nil to ignore case in `rsf-definitions-alist'." :type 'boolean :group 'rmail-spam-filter ) -(defcustom rmail-spam-filter-beep nil +(defcustom rsf-beep nil "*Non-nil to beep if spam is found." :type 'boolean :group 'rmail-spam-filter ) -(defcustom rmail-spam-sleep-after-message 2.0 +(defcustom rsf-sleep-after-message 2.0 "*Seconds to wait after display of message that spam was found." :type 'number :group 'rmail-spam-filter ) - -(defcustom rmail-spam-filter-auto-delete-spam-bbdb-entries nil + +(defcustom rsf-min-region-to-spam-list 7 + "*User may highlight a region in an incomming message and use + the menubar to add this region to the spam definitions. This + variable specifies the minimum size of region that may be added + to spam list, to avoid accidentally adding a too short region + which would result in false positive identification of spam + messages." + :type 'integer + :group 'rmail-spam-filter ) + +(defcustom rsf-auto-delete-spam-bbdb-entries nil "*Non-nil to make sure no entries are made in bbdb for spam emails. This is done in two ways: (1) bbdb is made not to auto-create entries for messages that are deleted by the `rmail-spam-filter', (2) when a @@ -131,7 +152,7 @@ take an effect." :type 'boolean :group 'rmail-spam-filter ) -(defcustom rmail-spam-filter-autosave-newly-added-spam-definitions nil +(defcustom rsf-autosave-newly-added-definitions nil "*Non-nil to auto save new spam entries. New entries entered via the spam menu bar item are then saved to customization file immediately after being added via the menu bar, and @@ -140,17 +161,17 @@ entries." :type 'boolean :group 'rmail-spam-filter ) -(defcustom rmail-spam-white-list nil +(defcustom rsf-white-list nil "*List of strings to identify valid senders. -If any rmail-spam-white-list string matches a substring of the 'From' +If any rsf-white-list string matches a substring of the 'From' header, the message is flagged as a valid, non-spam message. Example: If your domain is emacs.com then including 'emacs.com' in your -rmail-spam-white-list would flag all mail from your colleagues as +rsf-white-list would flag all mail from your colleagues as valid." :type '(repeat string) :group 'rmail-spam-filter ) -(defcustom rmail-spam-definitions-alist nil +(defcustom rsf-definitions-alist nil "*Alist matching strings defining what messages are considered spam. Each definition may contain specifications of one or more of the elements {subject, sender, recipients or contents}, as well as a @@ -159,7 +180,9 @@ is defined as one that fits all of the specified elements of any one of the spam definitions. The strings that specify spam subject, sender, etc, may be regexp. For example, to specify that the subject may be either 'this is spam' or 'another spam', use the regexp: 'this -is spam\|another spam' (without the single quotes)." +is spam\\|another spam' (without the single quotes). To specify that +if the contents contain both this and that the message is spam, +specify 'this\\&that' in the appropriate spam definition field." :type '(repeat (list :format "%v" (cons :format "%v" :value (from . "") @@ -171,6 +194,9 @@ is spam\|another spam' (without the single quotes)." (cons :format "%v" :value (subject . "") (const :format "" subject) (string :tag "Subject" "")) + (cons :format "%v" :value (content-type . "") + (const :format "" content-type) + (string :tag "Content-Type" "")) (cons :format "%v" :value (contents . "") (const :format "" contents) (string :tag "Contents" "")) @@ -183,13 +209,38 @@ is spam\|another spam' (without the single quotes)." )) :group 'rmail-spam-filter) -(defvar rmail-spam-filter-scanning-messages-now nil +(defvar rsf-scanning-messages-now nil "Non nil when rmail-spam-filter scans messages, -for interaction with `rmail-bbdb-auto-delete-spam-entries'") +for interaction with `rsf-bbdb-auto-delete-spam-entries'") + +;; the advantage over the automatic filter definitions is the AND conjunction +;; of in-one-definition-elements +(defun check-field (field-symbol message-data definition result) + "Check if field-symbol is in `rsf-definitions-alist'. +Capture maybe-spam and this-is-a-spam-email in a cons in result, +where maybe-spam is in first and this-is-a-spam-email is in rest. +The values are returned by destructively changing result. +If FIELD-SYMBOL field does not exist AND is not specified, +this may still be spam due to another element... +if (first result) is nil, we already have a contradiction in another +field" + (let ((definition-field (cdr (assoc field-symbol definition)))) + (if (and (first result) (> (length definition-field) 0)) + ;; only in this case can maybe-spam change from t to nil + ;; ... else, if FIELD-SYMBOL field does appear in the message, + ;; and it also appears in spam definition list, this + ;; is potentially a spam: + (if (and message-data + (string-match definition-field message-data)) + ;; if we do not get a contradiction from another field, this is + ;; spam + (setf (rest result) t) + ;; the message data contradicts the specification, this is no spam + (setf (first result) nil))))) (defun rmail-spam-filter (msg) - "Return nil if msg is spam based on rmail-spam-definitions-alist. -If spam, optionally output msg to a file `rmail-spam-file' and delete + "Return nil if msg is spam based on rsf-definitions-alist. +If spam, optionally output msg to a file `rsf-file' and delete it from rmail file. Called for each new message retrieved by `rmail-get-new-mail'." @@ -200,22 +251,23 @@ it from rmail file. Called for each new message retrieved by (message-sender) (message-recipients) (message-subject) + (message-content-type) (num-spam-definition-elements) (num-element 0) (exit-while-loop nil) (saved-case-fold-search case-fold-search) (save-current-msg) - (rmail-spam-filter-saved-bbdb/mail_auto_create_p nil) + (rsf-saved-bbdb/mail_auto_create_p nil) ) ;; make sure bbdb does not create entries for messages while spam ;; filter is scanning the rmail file: - (setq rmail-spam-filter-saved-bbdb/mail_auto_create_p 'bbdb/mail_auto_create_p) + (setq rsf-saved-bbdb/mail_auto_create_p 'bbdb/mail_auto_create_p) (setq bbdb/mail_auto_create_p nil) - ;; let `rmail-bbdb-auto-delete-spam-entries' know that rmail spam + ;; let `rsf-bbdb-auto-delete-spam-entries' know that rmail spam ;; filter is running, so that deletion of rmail messages should be ;; ignored for now: - (setq rmail-spam-filter-scanning-messages-now t) + (setq rsf-scanning-messages-now t) (save-excursion (save-restriction (setq this-is-a-spam-email nil) @@ -225,166 +277,111 @@ it from rmail file. Called for each new message retrieved by (goto-char (rmail-msgbeg msg)) (narrow-to-region (point) (progn (search-forward "\n\n") (point))) (setq message-sender (mail-fetch-field "From")) - (setq message-recipients (mail-fetch-field "To")) + (setq message-recipients + (concat (mail-fetch-field "To") + (if (mail-fetch-field "Cc") + (concat ", " (mail-fetch-field "Cc"))))) (setq message-subject (mail-fetch-field "Subject")) + (setq message-content-type (mail-fetch-field "Content-Type")) ) ;; Find number of spam-definition elements in the list - ;; rmail-spam-definitions-alist specified by user: + ;; rsf-definitions-alist specified by user: (setq num-spam-definition-elements (safe-length - rmail-spam-definitions-alist)) + rsf-definitions-alist)) ;;; do we want to ignore case in spam definitions: - (setq case-fold-search rmail-spam-filter-ignore-case) + (setq case-fold-search rsf-ignore-case) ;; Check for blind CC condition. Set vars such that while - ;; loop will be bypassed and spam condition will trigger (EDB) - (if (and rmail-spam-no-blind-cc + ;; loop will be bypassed and spam condition will trigger + (if (and rsf-no-blind-cc (null message-recipients)) - (progn - (setq exit-while-loop t) - (setq maybe-spam t) - (setq this-is-a-spam-email t))) - - ;; Check white list, and likewise cause while loop - ;; bypass. (EDB) - (if (find-if '(lambda (white-str) - (string-match white-str message-sender)) - rmail-spam-white-list) - (progn - (setq exit-while-loop t) - (setq maybe-spam nil) - (setq this-is-a-spam-email nil))) - - ;; scan all elements of the list rmail-spam-definitions-alist + (setq exit-while-loop t + maybe-spam t + this-is-a-spam-email t)) + + ;; Check white list, and likewise cause while loop + ;; bypass. + (if (let ((white-list rsf-white-list) + (found nil)) + (while (and (not found) white-list) + (if (string-match (car white-list) message-sender) + (setq found t) + (setq white-list (cdr white-list)))) + found) + (setq exit-while-loop t + maybe-spam nil + this-is-a-spam-email nil)) + + ;; maybe-spam is in first, this-is-a-spam-email in rest, this + ;; simplifies the call to check-field + (setq maybe-spam (cons maybe-spam this-is-a-spam-email)) + + ;; scan all elements of the list rsf-definitions-alist (while (and (< num-element num-spam-definition-elements) (not exit-while-loop)) - (progn + (let ((definition (nth num-element rsf-definitions-alist))) ;; Initialize maybe-spam which is set to t in one of two ;; cases: (1) unspecified definition-elements are found in - ;; rmail-spam-definitions-alist, (2) empty field is found + ;; rsf-definitions-alist, (2) empty field is found ;; in the message being scanned (e.g. empty subject, ;; sender, recipients, etc). The variable is set to nil ;; if a non empty field of the scanned message does not ;; match a specified field in - ;; rmail-spam-definitions-alist. - (setq maybe-spam t) + ;; rsf-definitions-alist. + ;; initialize this-is-a-spam-email to nil. This variable ;; is set to t if one of the spam definitions matches a ;; field in the scanned message. - (setq this-is-a-spam-email nil) + (setq maybe-spam (cons t nil)) ;; start scanning incoming message: ;;--------------------------------- - ;; if sender field is not specified in message being + ;; Maybe the different fields should also be done in a + ;; loop to make the whole thing more flexible + ;; if sender field is not specified in message being ;; scanned, AND if "from" field does not appear in spam ;; definitions for this element, this may still be spam ;; due to another element... - (if (and (not message-sender) - (string-match - (cdr (assoc 'from (nth num-element - rmail-spam-definitions-alist))) "")) - (setq maybe-spam t) - ;; ... else, if message-sender does appear in the - ;; message, and it also appears in the spam definition - ;; list, it is potentially spam: - (if (and message-sender - (string-match - (cdr (assoc 'from (nth num-element - rmail-spam-definitions-alist))) - message-sender) - ) - (setq this-is-a-spam-email t) - (setq maybe-spam nil) - ) - ) - ;; next, if spam was not ruled out already, check recipients: - (if maybe-spam - ;; if To field does not exist AND is not specified, - ;; this may still be spam due to another element... - (if (and (not message-recipients) - (string-match - (cdr (assoc 'to - (nth num-element - rmail-spam-definitions-alist))) "")) - (setq maybe-spam t) - ;; ... else, if To field does appear in the message, - ;; and it also appears in spam definition list, this - ;; is potentially a spam: - (if (and message-recipients - (string-match - (cdr (assoc 'to (nth num-element - rmail-spam-definitions-alist))) - message-recipients) - ) - (setq this-is-a-spam-email t) - (setq maybe-spam nil) - ) - ) - ) - ;; next, if spam was not ruled out already, check subject: - (if maybe-spam - ;; if subject field does not exist AND is not - ;; specified, this may still be spam due to another - ;; element... - (if (and (not message-subject) - (string-match - (cdr (assoc 'subject - (nth num-element - rmail-spam-definitions-alist))) - "")) - (setq maybe-spam t) - ;; ... else, if subject field does appear in the - ;; message, and it also appears in the spam - ;; definition list, this is potentially a spam: - (if (and message-subject - (string-match - (cdr (assoc 'subject (nth num-element - rmail-spam-definitions-alist))) - message-subject) - ) - (setq this-is-a-spam-email t) - (setq maybe-spam nil) - ) - ) - ) + (check-field 'from message-sender definition maybe-spam) + ;; next, if spam was not ruled out already, check recipients: + (check-field 'to message-recipients definition maybe-spam) + ;; next, if spam was not ruled out already, check subject: + (check-field 'subject message-subject definition maybe-spam) + ;; next, if spam was not ruled out already, check content-type: + (check-field 'content-type message-content-type + definition maybe-spam) ;; next, if spam was not ruled out already, check ;; contents: if contents field is not specified, this may ;; still be spam due to another element... - (if maybe-spam - (if (string-match - (cdr (assoc 'contents - (nth num-element - rmail-spam-definitions-alist))) "") - (setq maybe-spam t) - ;; ... else, check to see if it appears in spam - ;; definition: - (if (string-match - (cdr (assoc 'contents - (nth num-element - rmail-spam-definitions-alist))) - (buffer-substring - (rmail-msgbeg msg) (rmail-msgend msg))) - (setq this-is-a-spam-email t) - (setq maybe-spam nil))) - ) - ;; if the search in rmail-spam-definitions-alist found + (check-field 'contents + (buffer-substring + (rmail-msgbeg msg) (rmail-msgend msg)) + definition maybe-spam) + + ;; if the search in rsf-definitions-alist found ;; that this email is spam, output the email to the spam ;; rmail file, mark the email for deletion, leave the ;; while loop and return nil so that an rmail summary line ;; wont be displayed for this message: - (if (and this-is-a-spam-email maybe-spam) + (if (and (first maybe-spam) (rest maybe-spam)) ;; found that this is spam, no need to look at the - ;; rest of the rmail-spam-definitions-alist, exit + ;; rest of the rsf-definitions-alist, exit ;; loop: (setq exit-while-loop t) ;; else, spam was not yet found, increment number of - ;; element in rmail-spam-definitions-alist and proceed + ;; element in rsf-definitions-alist and proceed ;; to next element: (setq num-element (+ num-element 1))) ) - ) + ) + + ;; (BK) re-set originally used variables + (setq this-is-a-spam-email (rest maybe-spam) + maybe-spam (first maybe-spam)) + (if (and this-is-a-spam-email maybe-spam) (progn ;;(message "Found spam!") @@ -394,39 +391,42 @@ it from rmail file. Called for each new message retrieved by ;; output and delete the spam msg if needed: (setq save-current-msg rmail-current-message) (setq rmail-current-message msg) - ;; check action item and rmail-spam-definitions-alist + ;; check action item and rsf-definitions-alist ;; and do it: (cond ((equal (cdr (assoc 'action - (nth num-element rmail-spam-definitions-alist))) + (nth num-element rsf-definitions-alist))) 'output-and-delete) (progn - (rmail-output-to-rmail-file rmail-spam-file) - (rmail-delete-message) + (rmail-output-to-rmail-file rsf-file 1 t) + ;; Don't delete if automatic deletion after output + ;; is turned on + (unless rmail-delete-after-output (rmail-delete-message)) )) ((equal (cdr (assoc 'action - (nth num-element rmail-spam-definitions-alist))) + (nth num-element rsf-definitions-alist))) 'delete-spam) (progn (rmail-delete-message) )) ) (setq rmail-current-message save-current-msg) - (setq bbdb/mail_auto_create_p 'rmail-spam-filter-saved-bbdb/mail_auto_create_p) + (setq bbdb/mail_auto_create_p + 'rsf-saved-bbdb/mail_auto_create_p) ;; set return value. These lines must be last in the ;; function, so that they will determine the value ;; returned by rmail-spam-filter: (setq return-value nil)) (setq return-value t)))) (setq case-fold-search saved-case-fold-search) - (setq rmail-spam-filter-scanning-messages-now nil) + (setq rsf-scanning-messages-now nil) return-value)) ;; define functions for interactively adding sender/subject of a ;; specific message to the spam definitions while reading it, using ;; the menubar: -(defun rmail-spam-filter-add-subject-to-spam-list () +(defun rsf-add-subject-to-spam-list () (interactive) (set-buffer rmail-buffer) (let ((message-subject)) @@ -434,15 +434,16 @@ it from rmail file. Called for each new message retrieved by ;; note the use of a backquote and comma on the subject line here, ;; to make sure message-subject is actually evaluated and its value ;; substituted: - (add-to-list 'rmail-spam-definitions-alist + (add-to-list 'rsf-definitions-alist (list '(from . "") '(to . "") `(subject . ,message-subject) + '(content-type . "") '(contents . "") '(action . output-and-delete)) t) - (customize-mark-to-save 'rmail-spam-definitions-alist) - (if rmail-spam-filter-autosave-newly-added-spam-definitions + (customize-mark-to-save 'rsf-definitions-alist) + (if rsf-autosave-newly-added-definitions (progn (custom-save-all) (message (concat "added subject \n <<< \n" message-subject @@ -450,10 +451,11 @@ it from rmail file. Called for each new message retrieved by "and saved the spam definitions to file."))) (message (concat "added subject \n <<< \n" message-subject " \n >>> \n to list of spam definitions. \n" - "Don't forget to save the spam definitions to file using the spam menu")) + "Don't forget to save the spam definitions to file using the spam + menu")) ))) -(defun rmail-spam-filter-add-sender-to-spam-list () +(defun rsf-add-sender-to-spam-list () (interactive) (set-buffer rmail-buffer) (let ((message-sender)) @@ -461,15 +463,16 @@ it from rmail file. Called for each new message retrieved by ;; note the use of a backquote and comma on the "from" line here, ;; to make sure message-sender is actually evaluated and its value ;; substituted: - (add-to-list 'rmail-spam-definitions-alist + (add-to-list 'rsf-definitions-alist (list `(from . ,message-sender) '(to . "") '(subject . "") + '(content-type . "") '(contents . "") '(action . output-and-delete)) t) - (customize-mark-to-save 'rmail-spam-definitions-alist) - (if rmail-spam-filter-autosave-newly-added-spam-definitions + (customize-mark-to-save 'rsf-definitions-alist) + (if rsf-autosave-newly-added-definitions (progn (custom-save-all) (message (concat "added sender \n <<< \n" message-sender @@ -477,13 +480,14 @@ it from rmail file. Called for each new message retrieved by "and saved the spam definitions to file."))) (message (concat "added sender \n <<< \n " message-sender " \n >>> \n to list of spam definitions." - "Don't forget to save the spam definitions to file using the spam menu")) + "Don't forget to save the spam definitions to file using the spam + menu")) ))) -(defun rmail-spam-filter-add-region-to-spam-list () - "Add the region makred by user in the rmail buffer to the list of - spam definitions as a contents field." +(defun rsf-add-region-to-spam-list () + "Add the region makred by user in the rmail buffer to spam list. +Added to spam definitions as a contents field." (interactive) (set-buffer rmail-buffer) (let ((region-to-spam-list)) @@ -491,41 +495,48 @@ it from rmail file. Called for each new message retrieved by (if (not (and mark-active (not (= (region-beginning) (region-end))))) ;; if inactive, print error message: (message "you need to first highlight some text in the rmail buffer") - ;; if active, add to list of spam definisions: - (progn - (setq region-to-spam-list (buffer-substring (region-beginning) (region-end))) - ;; note the use of a backquote and comma on the "from" line here, - ;; to make sure message-sender is actually evaluated and its value - ;; substituted: - (add-to-list 'rmail-spam-definitions-alist - (list '(from . "") - '(to . "") - '(subject . "") - `(contents . ,region-to-spam-list) - '(action . output-and-delete)) - t) - (customize-mark-to-save 'rmail-spam-definitions-alist) - (if rmail-spam-filter-autosave-newly-added-spam-definitions - (progn - (custom-save-all) - (message (concat "added highlighted text \n <<< \n" region-to-spam-list - " \n >>> \n to list of spam definitions. \n" - "and saved the spam definitions to file."))) - (message (concat "added highlighted text \n <<< \n " region-to-spam-list - " \n >>> \n to list of spam definitions." - "Don't forget to save the spam definitions to file using the spam menu")) - ))))) - - -(defun rmail-spam-filter-customize-spam-definitions () + (if (< (- (region-end) (region-beginning)) rsf-min-region-to-spam-list) + (message + (concat "highlighted region is too small; min length set by variable \n" + "rsf-min-region-to-spam-list" + " is " (number-to-string rsf-min-region-to-spam-list))) + ;; if region active and long enough, add to list of spam definisions: + (progn + (setq region-to-spam-list (buffer-substring (region-beginning) (region-end))) + ;; note the use of a backquote and comma on the "from" line here, + ;; to make sure message-sender is actually evaluated and its value + ;; substituted: + (add-to-list 'rsf-definitions-alist + (list '(from . "") + '(to . "") + '(subject . "") + '(content-type . "") + `(contents . ,region-to-spam-list) + '(action . output-and-delete)) + t) + (customize-mark-to-save 'rsf-definitions-alist) + (if rsf-autosave-newly-added-definitions + (progn + (custom-save-all) + (message (concat "added highlighted text \n <<< \n" region-to-spam-list + " \n >>> \n to list of spam definitions. \n" + "and saved the spam definitions to file."))) + (message (concat "added highlighted text \n <<< \n " region-to-spam-list + " \n >>> \n to list of spam definitions." + "Don't forget to save the spam definitions to file using the + spam menu")) + )))))) + + +(defun rsf-customize-spam-definitions () (interactive) - (customize-variable (quote rmail-spam-definitions-alist))) + (customize-variable (quote rsf-definitions-alist))) -(defun rmail-spam-filter-customize-group () +(defun rsf-customize-group () (interactive) (customize-group (quote rmail-spam-filter))) -(defun rmail-spam-custom-save-all () +(defun rsf-custom-save-all () (interactive) (custom-save-all)) @@ -537,96 +548,89 @@ it from rmail file. Called for each new message retrieved by (cons "Spam" (make-sparse-keymap "Spam"))) (define-key rmail-summary-mode-map [menu-bar spam customize-group] - '("Browse customizations of rmail spam filter" . rmail-spam-filter-customize-group)) + '("Browse customizations of rmail spam filter" . rsf-customize-group)) (define-key rmail-mode-map [menu-bar spam customize-group] - '("Browse customizations of rmail spam filter" . rmail-spam-filter-customize-group)) -(define-key rmail-summary-mode-map "\C-cSg" 'rmail-spam-filter-customize-group) -(define-key rmail-mode-map "\C-cSg" 'rmail-spam-filter-customize-group) + '("Browse customizations of rmail spam filter" . rsf-customize-group)) +(define-key rmail-summary-mode-map "\C-cSg" 'rsf-customize-group) +(define-key rmail-mode-map "\C-cSg" 'rsf-customize-group) (define-key rmail-summary-mode-map [menu-bar spam customize-spam-list] - '("Customize list of spam definitions" . rmail-spam-filter-customize-spam-definitions)) + '("Customize list of spam definitions" . rsf-customize-spam-definitions)) (define-key rmail-mode-map [menu-bar spam customize-spam-list] - '("Customize list of spam definitions" . rmail-spam-filter-customize-spam-definitions)) -(define-key rmail-summary-mode-map "\C-cSd" 'rmail-spam-filter-customize-spam-definitions) -(define-key rmail-mode-map "\C-cSd" 'rmail-spam-filter-customize-spam-definitions) + '("Customize list of spam definitions" . rsf-customize-spam-definitions)) +(define-key rmail-summary-mode-map "\C-cSd" 'rsf-customize-spam-definitions) +(define-key rmail-mode-map "\C-cSd" 'rsf-customize-spam-definitions) (define-key rmail-summary-mode-map [menu-bar spam lambda] '("----")) (define-key rmail-mode-map [menu-bar spam lambda] '("----")) (define-key rmail-summary-mode-map [menu-bar spam my-custom-save-all] - '("save newly added spam definitions to customization file" . rmail-spam-custom-save-all)) + '("save newly added spam definitions to customization file" . rsf-custom-save-all)) (define-key rmail-mode-map [menu-bar spam my-custom-save-all] - '("save newly added spam definitions to customization file" . rmail-spam-custom-save-all)) -(define-key rmail-summary-mode-map "\C-cSa" 'rmail-spam-custom-save-all) -(define-key rmail-mode-map "\C-cSa" 'rmail-spam-custom-save-all) + '("save newly added spam definitions to customization file" . rsf-custom-save-all)) +(define-key rmail-summary-mode-map "\C-cSa" 'rsf-custom-save-all) +(define-key rmail-mode-map "\C-cSa" 'rsf-custom-save-all) (define-key rmail-summary-mode-map [menu-bar spam add-region-to-spam-list] - '("add region to spam list" . rmail-spam-filter-add-region-to-spam-list)) + '("add region to spam list" . rsf-add-region-to-spam-list)) (define-key rmail-mode-map [menu-bar spam add-region-to-spam-list] - '("add region to spam list" . rmail-spam-filter-add-region-to-spam-list)) -(define-key rmail-summary-mode-map "\C-cSn" 'rmail-spam-filter-add-region-to-spam-list) -(define-key rmail-mode-map "\C-cSn" 'rmail-spam-filter-add-region-to-spam-list) + '("add region to spam list" . rsf-add-region-to-spam-list)) +(define-key rmail-summary-mode-map "\C-cSn" 'rsf-add-region-to-spam-list) +(define-key rmail-mode-map "\C-cSn" 'rsf-add-region-to-spam-list) (define-key rmail-summary-mode-map [menu-bar spam add-sender-to-spam-list] - '("add sender to spam list" . rmail-spam-filter-add-sender-to-spam-list)) + '("add sender to spam list" . rsf-add-sender-to-spam-list)) (define-key rmail-mode-map [menu-bar spam add-sender-to-spam-list] - '("add sender to spam list" . rmail-spam-filter-add-sender-to-spam-list)) -(define-key rmail-summary-mode-map "\C-cSr" 'rmail-spam-filter-add-sender-to-spam-list) -(define-key rmail-mode-map "\C-cSr" 'rmail-spam-filter-add-sender-to-spam-list) + '("add sender to spam list" . rsf-add-sender-to-spam-list)) +(define-key rmail-summary-mode-map "\C-cSr" 'rsf-add-sender-to-spam-list) +(define-key rmail-mode-map "\C-cSr" 'rsf-add-sender-to-spam-list) (define-key rmail-summary-mode-map [menu-bar spam add-subject-to-spam-list] - '("add subject to spam list" . rmail-spam-filter-add-subject-to-spam-list)) + '("add subject to spam list" . rsf-add-subject-to-spam-list)) (define-key rmail-mode-map [menu-bar spam add-subject-to-spam-list] - '("add subject to spam list" . rmail-spam-filter-add-subject-to-spam-list)) -(define-key rmail-summary-mode-map "\C-cSt" 'rmail-spam-filter-add-subject-to-spam-list) -(define-key rmail-mode-map "\C-cSt" 'rmail-spam-filter-add-subject-to-spam-list) - - -(defun rmail-bbdb-auto-delete-spam-entries () - "When deleting a message in RMAIL, check to see if the bbdb entry -was created today, and if it was, prompt to delete it too. This function -needs to be called via the `rmail-delete-message-hook' like this: -\(add-hook 'rmail-delete-message-hook 'rmail-bbdb-auto-delete-spam-entries)" - (interactive) - (require 'bbdb-hooks) - (if (not rmail-spam-filter-scanning-messages-now) - (if (get-buffer "*BBDB*") - (save-excursion - (set-buffer (get-buffer "*BBDB*")) - (if (bbdb-current-record) - (if (equal - (format-time-string bbdb-time-internal-format (current-time)) - (bbdb-record-getprop (bbdb-current-record) 'creation-date)) - (bbdb-delete-current-record (bbdb-current-record)))))))) - -(defun rmail-spam-filter-bbdb-dont-create-entries-for-spam () - "Make sure senderes of rmail messages marked as deleted are not added to bbdb. -Need to add this as a hook like this: -\(setq bbdb/mail-auto-create-p 'rmail-spam-filter-bbdb-dont-create-entries-for-spam) -and this is also used in conjunction with rmail-bbdb-auto-delete-spam-entries. -More doc: rmail-bbdb-auto-delete-spam-entries will delete newly created bbdb -entries of mail that is deleted. However, if one scrolls back to the deleted -messages, then the sender is again added to the bbdb. This function -prevents this. Also, don't create entries for messages in the `rmail-spam-file'." + '("add subject to spam list" . rsf-add-subject-to-spam-list)) +(define-key rmail-summary-mode-map "\C-cSt" 'rsf-add-subject-to-spam-list) +(define-key rmail-mode-map "\C-cSt" 'rsf-add-subject-to-spam-list) + +(defun rsf-add-content-type-field () + "Maintain backward compatibility with previous versions of rmail-spam-filter. +The most recent version of rmai-spam-filter checks the contents +field of the incoming mail to see if it spam. The format of +`rsf-definitions-alist' has therefore changed. This function +checks to see if old format is used, and if it is, it converts +`rsf-definitions-alist' to the new format. Invoked +automatically, no user input is required." (interactive) - (not - ;; don't create a bbdb entry if one of the following conditions is satisfied: - (or - ;; 1) looking at a deleted message: - (rmail-message-deleted-p rmail-current-message) - ;; 2) looking at messages in rmail-spam-file: - (string-match - (expand-file-name rmail-spam-file) - (expand-file-name (buffer-file-name rmail-buffer))) - ))) - -;; activate bbdb-anti-spam measures: -(if rmail-spam-filter-auto-delete-spam-bbdb-entries - (progn - (add-hook 'rmail-delete-message-hook 'rmail-bbdb-auto-delete-spam-entries) - (setq bbdb/mail-auto-create-p 'rmail-spam-filter-bbdb-dont-create-entries-for-spam) - )) + (if (and rsf-definitions-alist + (not (assoc 'content-type (car rsf-definitions-alist)))) + (let ((result nil) + (current nil) + (definitions rsf-definitions-alist)) + (while definitions + (setq current (car definitions)) + (setq definitions (cdr definitions)) + (setq result + (append result + (list + (list (assoc 'from current) + (assoc 'to current) + (assoc 'subject current) + (cons 'content-type "") + (assoc 'contents current) + (assoc 'action current)))))) + (setq rsf-definitions-alist result) + (customize-mark-to-save 'rsf-definitions-alist) + (if rsf-autosave-newly-added-definitions + (progn + (custom-save-all) + (message (concat "converted spam definitions to new format\n" + "and saved the spam definitions to file."))) + (message (concat "converted spam definitions to new format\n" + "Don't forget to save the spam definitions to file using the + spam menu")) + )))) (provide 'rmail-spam-filter) -;;; rmail-spam-filter ends here +;;; arch-tag: 03e1d45d-b72f-4dd7-8f04-e7fd78249746 +;;; rmail-spam-fitler ends here diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index d84c7ebf02..5ab38370e5 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -1733,7 +1733,7 @@ It returns t if it got any new messages." (if quoted-printable-header-field-end (save-excursion (unless - (mail-unquote-printable-region header-end (point) nil t) + (mail-unquote-printable-region header-end (point) nil t t) (message "Malformed MIME quoted-printable message")) ;; Change "quoted-printable" to "8bit", ;; to reflect the decoding we just did. @@ -1880,8 +1880,7 @@ It returns t if it got any new messages." (if quoted-printable-header-field-end (save-excursion (unless - (mail-unquote-printable-region header-end (point) nil t) - + (mail-unquote-printable-region header-end (point) nil t t) (message "Malformed MIME quoted-printable message")) ;; Change "quoted-printable" to "8bit", ;; to reflect the decoding we just did. @@ -1917,7 +1916,10 @@ It returns t if it got any new messages." (goto-char (point-min)) (while (search-forward "\n\^_" nil t); single char (replace-match "\n^_")))); 2 chars: "^" and "_" - (or (bolp) (newline)) ; in case we lost the final newline. + ;; This is for malformed messages that don't end in newline. + ;; There shouldn't be any, but some users say occasionally + ;; there are some. + (or (bolp) (newline)) (insert ?\^_) (setq last-coding-system-used nil) (or rmail-enable-mime diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index 3835070b34..a057c019b8 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el @@ -156,4 +156,5 @@ This functions runs the normal hook `rmail-edit-mode-hook'. (provide 'rmailedit) +;;; arch-tag: 93c22709-a14a-46c1-ab91-52c3f5a0ec12 ;;; rmailedit.el ends here diff --git a/lisp/mail/rmailkwd.el b/lisp/mail/rmailkwd.el index 693fbc6842..6772817637 100644 --- a/lisp/mail/rmailkwd.el +++ b/lisp/mail/rmailkwd.el @@ -271,4 +271,5 @@ With prefix argument N moves forward N messages with these labels." (- (buffer-size) omax))))) keyword)) +;;; arch-tag: b26b3392-99ca-4e1d-933a-dab59b04e9a8 ;;; rmailkwd.el ends here diff --git a/lisp/mail/rmailmsc.el b/lisp/mail/rmailmsc.el index 7a0871f141..ea0a9d0cf8 100644 --- a/lisp/mail/rmailmsc.el +++ b/lisp/mail/rmailmsc.el @@ -58,4 +58,5 @@ If FILE-NAME is empty, remove any existing inbox list." (setq rmail-inbox-list (rmail-parse-file-inboxes)) (rmail-show-message rmail-current-message)) +;;; arch-tag: 74ed1d50-2c25-4cbd-b5ae-d29ed8aba6e4 ;;; rmailmsc.el ends here diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index e23f73a9db..0dd23d71d3 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el @@ -413,4 +413,5 @@ FILE-NAME defaults, interactively, from the Subject field of the message." (if rmail-delete-after-output (rmail-delete-forward))) +;;; arch-tag: 447117c6-1a9a-4b88-aa43-3101b043e3a4 ;;; rmailout.el ends here diff --git a/lisp/mail/rmailsort.el b/lisp/mail/rmailsort.el index c4e95c8054..3194358451 100644 --- a/lisp/mail/rmailsort.el +++ b/lisp/mail/rmailsort.el @@ -246,4 +246,5 @@ Arguments are MSG and FIELD." (provide 'rmailsort) +;;; arch-tag: 0d90896b-0c35-46ac-b240-38be5ada2360 ;;; rmailsort.el ends here diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index cb14d6a7c4..a49b47453d 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -51,7 +51,7 @@ ("^.....-.*" . font-lock-type-face) ; Unread. ;; Neither of the below will be highlighted if either of the above are: ("^.....[^D-] \\(......\\)" 1 font-lock-keyword-face) ; Date. - ("{ \\([^\n}]+\\),}" 1 font-lock-comment-face)) ; Labels. + ("{ \\([^\n}]+\\) }" 1 font-lock-comment-face)) ; Labels. "Additional expressions to highlight in Rmail Summary mode.") ;; Entry points for making a summary buffer. @@ -300,8 +300,12 @@ By default, `identity' is set." "" (concat "{" (buffer-substring (point) - (progn (end-of-line) (point))) - "} "))))) + (progn (end-of-line) + (backward-char) + (if (looking-at ",") + (point) + (1+ (point))))) + " } "))))) (line (progn (forward-line 1) @@ -1070,7 +1074,8 @@ If SKIP-RMAIL, don't do anything to the Rmail buffer." (if (< n 1) (progn (message "No preceding message") (setq n 1))) - (if (> n total) + (if (and (> n total) + (> total 0)) (progn (message "No following message") (goto-char (point-max)) (rmail-summary-goto-msg nil nowarn skip-rmail))) @@ -1650,4 +1655,5 @@ KEYWORDS is a comma-separated list of labels." (provide 'rmailsum) +;;; arch-tag: 556079ee-75c1-47f5-9884-2e0a0bc6c5a1 ;;; rmailsum.el ends here diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 3d5d01c658..9ef7e575be 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -1,6 +1,6 @@ ;;; sendmail.el --- mail sending commands for Emacs. -*- byte-compile-dynamic: t -*- -;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 98, 2000, 2001, 2002, 2003 +;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 98, 2000, 2001, 2002, 03, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -68,11 +68,12 @@ controlled by a separate variable, `mail-specify-envelope-from'." (defcustom mail-specify-envelope-from nil "*If non-nil, specify the envelope-from address when sending mail. The value used to specify it is whatever is found in -`mail-envelope-from', with `user-mail-address' as fallback. +the variable `mail-envelope-from', with `user-mail-address' as fallback. On most systems, specifying the envelope-from address is a -privileged operation. This variable is only used if -`send-mail-function' is set to `sendmail-send-it'." +privileged operation. This variable affects sendmail and +smtpmail -- if you use feedmail to send mail, see instead the +variable `feedmail-deduce-envelope-from'." :version "21.1" :type 'boolean :group 'sendmail) @@ -184,8 +185,8 @@ The function `mail-setup' runs this hook." (defvar mail-aliases t "Alist of mail address aliases, or t meaning should be initialized from your mail aliases file. -\(The file's name is normally `~/.mailrc', but your MAILRC environment -variable can override that name.) +\(The file's name is normally `~/.mailrc', but `mail-personal-alias-file' +can specify a different file name.) The alias definitions in the file have this form: alias ALIAS MEANING") @@ -386,10 +387,11 @@ actually occur.") (defun sendmail-sync-aliases () - (let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) - (or (equal mail-alias-modtime modtime) - (setq mail-alias-modtime modtime - mail-aliases t)))) + (when mail-personal-alias-file + (let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) + (or (equal mail-alias-modtime modtime) + (setq mail-alias-modtime modtime + mail-aliases t))))) (defun mail-setup (to subject in-reply-to cc replybuffer actions) (or mail-default-reply-to @@ -398,8 +400,9 @@ actually occur.") (if (eq mail-aliases t) (progn (setq mail-aliases nil) - (if (file-exists-p mail-personal-alias-file) - (build-mail-aliases)))) + (when mail-personal-alias-file + (if (file-exists-p mail-personal-alias-file) + (build-mail-aliases))))) ;; Don't leave this around from a previous message. (kill-local-variable 'buffer-file-coding-system) ;; This doesn't work for enable-multibyte-characters. @@ -509,6 +512,9 @@ Turning on Mail mode runs the normal hooks `text-mode-hook' and ;; Allow using comment commands to add/remove quoting (this only does ;; anything if mail-yank-prefix is set to a non-nil value). (set (make-local-variable 'comment-start) mail-yank-prefix) + (if mail-yank-prefix + (set (make-local-variable 'comment-start-skip) + (concat "^" (regexp-quote mail-yank-prefix) "[ \t]*"))) (make-local-variable 'adaptive-fill-regexp) (setq adaptive-fill-regexp (concat "[ \t]*[-[:alnum:]]+>+[ \t]*\\|" @@ -1026,7 +1032,7 @@ external program defined by `sendmail-program'." ) ) (exit-value (apply 'call-process-region args))) - (or (null exit-value) (zerop exit-value) + (or (null exit-value) (eq 0 exit-value) (error "Sending...failed with exit value %d" exit-value))) (or fcc-was-found (error "No recipients"))) @@ -1724,4 +1730,5 @@ you can move to one of them and type C-c C-c to recover that one." (provide 'sendmail) +;;; arch-tag: 48bc1025-d993-4d31-8d81-2a29491f0626 ;;; sendmail.el ends here diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index e24f20b869..60831b259d 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -1,6 +1,7 @@ ;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail -;; Copyright (C) 1995, 1996, 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004 +;; Free Software Foundation, Inc. ;; Author: Tomoji Kagatani ;; Maintainer: Simon Josefsson @@ -44,6 +45,8 @@ ;; '(("YOUR SMTP HOST" 25 "username" "password"))) ;;(setq smtpmail-starttls-credentials ;; '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert"))) +;; Where the 25 equals the value of `smtpmail-smtp-service', it can be an +;; integer or a string, just as long as they match (eq). ;; To queue mail, set smtpmail-queue-mail to t and use ;; smtpmail-send-queued-mail to send. @@ -212,7 +215,7 @@ This is relative to `smtpmail-queue-dir'.") ;;; (defvar smtpmail-mail-address nil - "Value of `user-mail-address' in ambient buffer.") + "Value to use for envelope-from address for mail from ambient buffer.") ;;;###autoload (defun smtpmail-send-it () @@ -223,7 +226,11 @@ This is relative to `smtpmail-queue-dir'.") (case-fold-search nil) delimline (mailbuf (current-buffer)) - (smtpmail-mail-address user-mail-address) + ;; Examine this variable now, so that + ;; local binding in the mail buffer will take effect. + (smtpmail-mail-address + (or (and mail-specify-envelope-from (mail-envelope-from)) + user-mail-address)) (smtpmail-code-conv-from (if enable-multibyte-characters (let ((sendmail-coding-system smtpmail-code-conv-from)) @@ -399,11 +406,14 @@ This is relative to `smtpmail-queue-dir'.") (with-temp-buffer (let ((coding-system-for-read 'no-conversion)) (insert-file-contents file-msg)) - (if (not (null smtpmail-recipient-address-list)) - (if (not (smtpmail-via-smtp smtpmail-recipient-address-list - (current-buffer))) - (error "Sending failed; SMTP protocol error")) - (error "Sending failed; no recipients"))) + (let ((smtpmail-mail-address + (or (and mail-specify-envelope-from (mail-envelope-from)) + user-mail-address))) + (if (not (null smtpmail-recipient-address-list)) + (if (not (smtpmail-via-smtp smtpmail-recipient-address-list + (current-buffer))) + (error "Sending failed; SMTP protocol error")) + (error "Sending failed; no recipients")))) (delete-file file-msg) (delete-file (concat file-msg ".el")) (delete-region (point-at-bol) (point-at-bol 2))) @@ -481,9 +491,9 @@ This is relative to `smtpmail-queue-dir'.") (mech (car (smtpmail-intersection smtpmail-auth-supported mechs))) (cred (if (stringp smtpmail-auth-credentials) (let* ((netrc (netrc-parse smtpmail-auth-credentials)) - (hostentry (netrc-machine - netrc host (format "%s" (or port "smtp")) - "smtp"))) + (port-name (format "%s" (or port "smtp"))) + (hostentry (netrc-machine netrc host port-name + port-name))) (when hostentry (list host port (netrc-get hostentry "login") @@ -497,7 +507,7 @@ This is relative to `smtpmail-queue-dir'.") (smtpmail-cred-server cred) (smtpmail-cred-port cred)))))) ret) - (when cred + (when (and cred mech) (cond ((eq mech 'cram-md5) (smtpmail-send-command process (format "AUTH %s" mech)) @@ -545,9 +555,12 @@ This is relative to `smtpmail-queue-dir'.") (host (or smtpmail-smtp-server (error "`smtpmail-smtp-server' not defined"))) (port smtpmail-smtp-service) - (envelope-from (or (mail-envelope-from) - smtpmail-mail-address - user-mail-address)) + ;; smtpmail-mail-address should be set to the appropriate + ;; buffer-local value by the caller, but in case not: + (envelope-from (or smtpmail-mail-address + (and mail-specify-envelope-from + (mail-envelope-from)) + user-mail-address)) response-code greeting process-buffer @@ -661,7 +674,7 @@ This is relative to `smtpmail-queue-dir'.") (>= (car response-code) 400)) (throw 'done nil)))) - ;; MAIL FROM: + ;; MAIL FROM: (let ((size-part (if (or (member 'size supported-extensions) (assoc 'size supported-extensions)) @@ -670,13 +683,8 @@ This is relative to `smtpmail-queue-dir'.") ;; size estimate: (+ (- (point-max) (point-min)) ;; Add one byte for each change-of-line - ;; because or CR-LF representation: - (count-lines (point-min) (point-max)) - ;; For some reason, an empty line is - ;; added to the message. Maybe this - ;; is a bug, but it can't hurt to add - ;; those two bytes anyway: - 2))) + ;; because of CR-LF representation: + (count-lines (point-min) (point-max))))) "")) (body-part (if (member '8bitmime supported-extensions) @@ -696,8 +704,8 @@ This is relative to `smtpmail-queue-dir'.") "") ""))) ; (smtpmail-send-command process (format "MAIL FROM:%s@%s" (user-login-name) (smtpmail-fqdn))) - (smtpmail-send-command process (format "MAIL FROM: <%s>%s%s" - envelope-from + (smtpmail-send-command process (format "MAIL FROM:<%s>%s%s" + envelope-from size-part body-part)) @@ -707,10 +715,10 @@ This is relative to `smtpmail-queue-dir'.") (throw 'done nil) )) - ;; RCPT TO: + ;; RCPT TO: (let ((n 0)) (while (not (null (nth n recipient))) - (smtpmail-send-command process (format "RCPT TO: <%s>" (smtpmail-maybe-append-domain (nth n recipient)))) + (smtpmail-send-command process (format "RCPT TO:<%s>" (smtpmail-maybe-append-domain (nth n recipient)))) (setq n (1+ n)) (setq response-code (smtpmail-read-response process)) @@ -773,49 +781,49 @@ This is relative to `smtpmail-queue-dir'.") (response-continue t) (return-value '(nil ())) match-end) - - (while response-continue - (goto-char smtpmail-read-point) - (while (not (search-forward "\r\n" nil t)) - (accept-process-output process) - (goto-char smtpmail-read-point)) - - (setq match-end (point)) - (setq response-strings - (cons (buffer-substring smtpmail-read-point (- match-end 2)) - response-strings)) - - (goto-char smtpmail-read-point) - (if (looking-at "[0-9]+ ") - (let ((begin (match-beginning 0)) - (end (match-end 0))) - (if smtpmail-debug-info - (message "%s" (car response-strings))) - - (setq smtpmail-read-point match-end) - - ;; ignore lines that start with "0" - (if (looking-at "0[0-9]+ ") - nil + (catch 'done + (while response-continue + (goto-char smtpmail-read-point) + (while (not (search-forward "\r\n" nil t)) + (unless (memq (process-status process) '(open run)) + (throw 'done nil)) + (accept-process-output process) + (goto-char smtpmail-read-point)) + + (setq match-end (point)) + (setq response-strings + (cons (buffer-substring smtpmail-read-point (- match-end 2)) + response-strings)) + + (goto-char smtpmail-read-point) + (if (looking-at "[0-9]+ ") + (let ((begin (match-beginning 0)) + (end (match-end 0))) + (if smtpmail-debug-info + (message "%s" (car response-strings))) + + (setq smtpmail-read-point match-end) + + ;; ignore lines that start with "0" + (if (looking-at "0[0-9]+ ") + nil + (setq response-continue nil) + (setq return-value + (cons (string-to-int + (buffer-substring begin end)) + (nreverse response-strings))))) + + (if (looking-at "[0-9]+-") + (progn (if smtpmail-debug-info + (message "%s" (car response-strings))) + (setq smtpmail-read-point match-end) + (setq response-continue t)) + (progn + (setq smtpmail-read-point match-end) (setq response-continue nil) (setq return-value - (cons (string-to-int - (buffer-substring begin end)) - (nreverse response-strings))))) - - (if (looking-at "[0-9]+-") - (progn (if smtpmail-debug-info - (message "%s" (car response-strings))) - (setq smtpmail-read-point match-end) - (setq response-continue t)) - (progn - (setq smtpmail-read-point match-end) - (setq response-continue nil) - (setq return-value - (cons nil (nreverse response-strings))) - ) - ))) - (setq smtpmail-read-point match-end) + (cons nil (nreverse response-strings))))))) + (setq smtpmail-read-point match-end)) return-value)) @@ -848,31 +856,15 @@ This is relative to `smtpmail-queue-dir'.") ) (defun smtpmail-send-data (process buffer) - (let - ((data-continue t) - (sending-data nil) - this-line - this-line-end) - + (let ((data-continue t) sending-data) (with-current-buffer buffer (goto-char (point-min))) - (while data-continue (with-current-buffer buffer - (beginning-of-line) - (setq this-line (point)) - (end-of-line) - (setq this-line-end (point)) - (setq sending-data nil) - (setq sending-data (buffer-substring this-line this-line-end)) - (if (/= (forward-line 1) 0) - (setq data-continue nil))) - - (smtpmail-send-data-1 process sending-data) - ) - ) - ) - + (setq sending-data (buffer-substring (point-at-bol) (point-at-eol))) + (end-of-line 2) + (setq data-continue (not (eobp)))) + (smtpmail-send-data-1 process sending-data)))) (defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start header-end) "Get address list suitable for smtp RCPT TO:
." @@ -950,4 +942,5 @@ many continuation lines." (provide 'smtpmail) +;;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466 ;;; smtpmail.el ends here diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index 558b9f9e38..40c43af582 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -2045,4 +2045,5 @@ more information. Info node `(SC)Top'." (provide 'supercite) (run-hooks 'sc-load-hook) +;;; arch-tag: a5d5bfa6-3bd5-4414-8c65-0afc83e45cd3 ;;; supercite.el ends here diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el index 93b3e430e7..08f76359ab 100644 --- a/lisp/mail/uce.el +++ b/lisp/mail/uce.el @@ -392,4 +392,5 @@ address, and postmaster of the mail relay used." (provide 'uce) +;;; arch-tag: 44b68c87-9b29-47bd-822c-3feee3883221 ;;; uce.el ends here diff --git a/lisp/mail/undigest.el b/lisp/mail/undigest.el index 1890353c33..2c44706564 100644 --- a/lisp/mail/undigest.el +++ b/lisp/mail/undigest.el @@ -307,4 +307,5 @@ following the containing message." (provide 'undigest) +;;; arch-tag: 3a28b9fb-c1f5-43ef-9278-285f3e4b874d ;;; undigest.el ends here diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el index f0e4bbf38b..55f611b53a 100644 --- a/lisp/mail/unrmail.el +++ b/lisp/mail/unrmail.el @@ -173,3 +173,4 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." ;;; unrmail.el ends here +;;; arch-tag: 14c6290d-60b2-456f-8909-5c2387de6acb diff --git a/lisp/mail/vms-pmail.el b/lisp/mail/vms-pmail.el index 7fe7771d35..675d9112c7 100644 --- a/lisp/mail/vms-pmail.el +++ b/lisp/mail/vms-pmail.el @@ -119,4 +119,5 @@ If neither file exists, fails quietly." (provide 'vms-pmail) +;;; arch-tag: 336850fc-7812-4663-8e4d-b9c13f47dce1 ;;; vms-pmail.el ends here diff --git a/lisp/makefile.nt b/lisp/makefile.nt index 2b6b435a26..069ef96ac9 100644 --- a/lisp/makefile.nt +++ b/lisp/makefile.nt @@ -280,3 +280,5 @@ clean: - $(DEL) term\*.orig term\*.rej term\*.crlf - $(DEL) textmodes\*.orig textmodes\*.rej textmodes\*.crlf - $(DEL_TREE) deleted + +# arch-tag: 01ddeb44-fb4c-4366-8478-4a6c21a68fb3 diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index df80232853..6791cb0aea 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in @@ -69,6 +69,7 @@ DONTCOMPILE = \ $(lisp)/international/mule-conf.el \ $(lisp)/language/czech.el \ $(lisp)/language/devanagari.el \ + $(lisp)/language/kannada.el \ $(lisp)/language/malayalam.el \ $(lisp)/language/tamil.el \ $(lisp)/language/english.el \ @@ -88,6 +89,7 @@ DONTCOMPILE = \ $(lisp)/language/chinese.el \ $(lisp)/language/indian.el \ $(lisp)/loaddefs.el \ + $(lisp)/ldefs-boot.el \ $(lisp)/loadup.el \ $(lisp)/mail/blessmail.el \ $(lisp)/patcomp.el \ @@ -353,22 +355,33 @@ compile-after-backup: backup-compiled-files compile-always recompile: doit $(emacs) -f batch-byte-recompile-directory $(lisp) -# Prepare a bootstrap in the lisp subdirectory. Build loaddefs.el, -# because it's not sure it's up-to-date, and if it's not, that might -# lead to errors during the bootstrap because something fails to -# autoload as expected. Remove compiled Lisp files so that -# bootstrap-emacs will be built from sources only. +# Prepare a bootstrap in the lisp subdirectory. +# +# Build loaddefs.el, because it's not sure it's up-to-date, and if it's not, +# that might lead to errors during the bootstrap because something fails to +# autoload as expected. However, if there is no emacs binary, then we can't +# build autoloads yet, so just make sure there's some loaddefs.el file, as +# it's necessary for generating the binary (because loaddefs.el is an +# automatically generated file, we don't want to store it in the source +# repository). +# +# Remove compiled Lisp files so that bootstrap-emacs will be built from +# sources only. # Need separate version for sh and native cmd.exe bootstrap-clean: bootstrap-clean-$(SHELLTYPE) loaddefs.el bootstrap-clean-CMD: # if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads + if not exist $(lisp)\loaddefs.el cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el -for %f in (. $(WINS)) do for %g in (%f\*.elc) do @$(DEL) %g bootstrap-clean-SH: # if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi # -rm -f $(lisp)/*.elc $(lisp)/*/*.elc + if ! test -r $(lisp)/loaddefs.el; then \ + cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el; \ + fi -for dir in . $(WINS); do rm -f $$dir/*.elc; done # Generate/update files for the bootstrap process. @@ -407,3 +420,5 @@ install: # clean: - $(DEL) *~ + +# arch-tag: bd03b562-c58d-4403-99db-c7bccd8c49a0 diff --git a/lisp/makesum.el b/lisp/makesum.el index 262f14e63b..21a69d5f54 100644 --- a/lisp/makesum.el +++ b/lisp/makesum.el @@ -113,4 +113,5 @@ Previous contents of that buffer are killed first." (provide 'makesum) +;;; arch-tag: c2383336-fc89-46ad-8110-ded42bffaee3 ;;; makesum.el ends here diff --git a/lisp/man.el b/lisp/man.el index a2ff8ad3d5..7222c1bad1 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -1,6 +1,6 @@ ;;; man.el --- browse UNIX manual pages -*- coding: iso-8859-1 -*- -;; Copyright (C) 1993, 1994, 1996, 1997, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1994, 1996, 1997, 2001, 2003, 2004 Free Software Foundation, Inc. ;; Author: Barry A. Warsaw ;; Maintainer: FSF @@ -175,6 +175,17 @@ Any other value of `Man-notify-method' is equivalent to `meek'." (const polite) (const quiet) (const meek)) :group 'man) +(defcustom Man-width nil + "*Number of columns for which manual pages should be formatted. +If nil, the width of the window selected at the moment of man +invocation is used. If non-nil, the width of the frame selected +at the moment of man invocation is used. The value also can be a +positive integer." + :type '(choice (const :tag "Window width" nil) + (const :tag "Frame width" t) + (integer :tag "Specific width" :value 65)) + :group 'man) + (defcustom Man-frame-parameters nil "*Frame parameter list for creating a new frame for a manual page." :type 'sexp @@ -317,6 +328,12 @@ make -a one of the switches, if your `man' program supports it.") "") "Option that indicates a specified a manual section name.") +(defvar Man-support-local-filenames 'auto-detect + "Internal cache for the value of the function `Man-support-local-filenames'. +`auto-detect' means the value is not yet determined. +Otherwise, the value is whatever the function +`Man-support-local-filenames' should return.") + ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ;; end user variables @@ -425,9 +442,9 @@ This is necessary if one wants to dump man.el with Emacs." (cond (Man-fontify-manpage-flag nil) - ((= 0 (call-process Man-sed-command nil nil nil Man-sysv-sed-script)) + ((eq 0 (call-process Man-sed-command nil nil nil Man-sysv-sed-script)) Man-sysv-sed-script) - ((= 0 (call-process Man-sed-command nil nil nil Man-berkeley-sed-script)) + ((eq 0 (call-process Man-sed-command nil nil nil Man-berkeley-sed-script)) Man-berkeley-sed-script) (t nil)))) @@ -486,13 +503,15 @@ This is necessary if one wants to dump man.el with Emacs." (defsubst Man-build-man-command () "Builds the entire background manpage and cleaning command." (let ((command (concat manual-program " " Man-switches - ; Stock MS-DOS shells cannot redirect stderr; - ; `call-process' below sends it to /dev/null, - ; so we don't need `2>' even with DOS shells - ; which do support stderr redirection. - (if (not (fboundp 'start-process)) - " %s" - (concat " %s 2>" null-device)))) + (cond + ;; Already has %s + ((string-match "%s" manual-program) "") + ;; Stock MS-DOS shells cannot redirect stderr; + ;; `call-process' below sends it to /dev/null, + ;; so we don't need `2>' even with DOS shells + ;; which do support stderr redirection. + ((not (fboundp 'start-process)) " %s") + ((concat " %s 2>" null-device))))) (flist Man-filter-list)) (while (and flist (car flist)) (let ((pcom (car (car flist))) @@ -555,6 +574,31 @@ and the Man-section-translations-alist variables)." slist nil)))) (concat Man-specified-section-option section " " name)))) +(defun Man-support-local-filenames () + "Check the availability of `-l' option of the man command. +This option allows `man' to interpret command line arguments +as local filenames. +Return the value of the variable `Man-support-local-filenames' +if it was set to nil or t before the call of this function. +If t, the man command supports `-l' option. If nil, it don't. +Otherwise, if the value of `Man-support-local-filenames' +is neither t nor nil, then determine a new value, set it +to the variable `Man-support-local-filenames' and return +a new value." + (if (or (not Man-support-local-filenames) + (eq Man-support-local-filenames t)) + Man-support-local-filenames + (setq Man-support-local-filenames + (with-temp-buffer + (and (equal (condition-case nil + (call-process manual-program nil t nil "--help") + (error nil)) + 0) + (progn + (goto-char (point-min)) + (search-forward "--local-file" nil t)) + t))))) + ;; ====================================================================== ;; default man entry: get word under point @@ -569,19 +613,18 @@ This guess is based on the text surrounding the cursor." (skip-chars-backward "-a-zA-Z0-9._+:") (let ((start (point))) (skip-chars-forward "-a-zA-Z0-9._+:") - (setq word (buffer-substring start (point)))) + (setq word (buffer-substring-no-properties start (point)))) (if (string-match "[._]+$" word) (setq word (substring word 0 (match-beginning 0)))) + ;; If looking at something like *strcat(... , remove the '*' + (if (string-match "^*" word) + (setq word (substring word 1))) ;; If looking at something like ioctl(2) or brc(1M), include the ;; section number in the returned value. Remove text properties. - (forward-word 1) - ;; Use `format' here to clear any text props from `word'. - (format "%s%s" - word + (concat word (if (looking-at (concat "[ \t]*([ \t]*\\(" Man-section-regexp "\\)[ \t]*)")) - (format "(%s)" (match-string 1)) - ""))))) + (format "(%s)" (match-string-no-properties 1))))))) ;; ====================================================================== @@ -680,7 +723,12 @@ all sections related to a subject, put something appropriate into the ;; This isn't strictly correct, since we don't know how ;; the page will actually be displayed, but it seems ;; reasonable. - (setenv "COLUMNS" (number-to-string (frame-width))))) + (setenv "COLUMNS" (number-to-string + (cond + ((and (integerp Man-width) (> Man-width 0)) + Man-width) + (Man-width (frame-width)) + ((window-width))))))) (setenv "GROFF_NO_SGR" "1") (if (fboundp 'start-process) (set-process-sentinel @@ -758,7 +806,7 @@ See the variable `Man-notify-method' for the different notification behaviors." "Convert overstriking and underlining to the correct fonts. Same for the ANSI bold and normal escape sequences." (interactive) - (message "Please wait: making up the %s man page..." Man-arguments) + (message "Please wait: formatting the %s man page..." Man-arguments) (goto-char (point-min)) (while (search-forward "\e[1m" nil t) (delete-backward-char 4) @@ -802,7 +850,12 @@ Same for the ANSI bold and normal escape sequences." ;; Try to recognize common forms of cross references. (Man-highlight-references) (Man-softhyphen-to-minus) - (message "%s man page made up" Man-arguments)) + (goto-char (point-min)) + (while (re-search-forward Man-heading-regexp nil t) + (put-text-property (match-beginning 0) + (match-end 0) + 'face Man-overstrike-face)) + (message "%s man page formatted" Man-arguments)) (defun Man-highlight-references () "Highlight the references on mouse-over. @@ -972,6 +1025,9 @@ The following key bindings are currently in effect in the buffer: (auto-fill-mode -1) (use-local-map Man-mode-map) (set-syntax-table man-mode-syntax-table) + (setq imenu-generic-expression (list (list nil Man-heading-regexp 0))) + (set (make-local-variable 'outline-regexp) Man-heading-regexp) + (set (make-local-variable 'outline-level) (lambda () 1)) (Man-build-page-list) (Man-strip-page-headers) (Man-unindent) @@ -1308,4 +1364,5 @@ Specify which REFERENCE to use; default is based on word at point." (provide 'man) +;;; arch-tag: 587cda76-8e23-4594-b1f3-89b6b09a0d47 ;;; man.el ends here diff --git a/lisp/master.el b/lisp/master.el index 2ef728cdcd..ce4144f087 100644 --- a/lisp/master.el +++ b/lisp/master.el @@ -160,4 +160,5 @@ See `recenter'." (provide 'master) +;;; arch-tag: dca08daa-8127-45ae-b77e-b135160dce98 ;;; master.el ends here diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index da5def6751..7db5f96e6d 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -526,10 +526,12 @@ Do the same for the keys of the same name." (cons "Cut" (cons "Delete text in region and copy it to the clipboard" 'clipboard-kill-region))) + ;; These are Sun server keysyms for the Cut, Copy and Paste keys + ;; (also for XFree86 on Sun keyboard): (define-key global-map [f20] 'clipboard-kill-region) (define-key global-map [f16] 'clipboard-kill-ring-save) (define-key global-map [f18] 'clipboard-yank) - ;; X11R6 versions + ;; X11R6 versions: (define-key global-map [cut] 'clipboard-kill-region) (define-key global-map [copy] 'clipboard-kill-ring-save) (define-key global-map [paste] 'clipboard-yank)) @@ -665,12 +667,12 @@ PROPS are additional properties." (define-key menu-bar-showhide-menu [column-number-mode] (menu-bar-make-mm-toggle column-number-mode - "Show Column Numbers" + "Column Numbers" "Show the current column number in the mode line")) (define-key menu-bar-showhide-menu [line-number-mode] (menu-bar-make-mm-toggle line-number-mode - "Show Line Numbers" + "Line Numbers" "Show the current line number in the mode line")) (define-key menu-bar-showhide-menu [linecolumn-separator] @@ -685,8 +687,8 @@ PROPS are additional properties." (customize-mark-as-set 'display-time-mode)) (define-key menu-bar-showhide-menu [showhide-date-time] - '(menu-item "Date and Time" showhide-date-time - :help "Display date and time in the mode line" + '(menu-item "Date, Time and Mail" showhide-date-time + :help "Display date, time, mail status in mode line" :button (:toggle . display-time-mode))) (define-key menu-bar-showhide-menu [datetime-separator] @@ -870,7 +872,12 @@ PROPS are additional properties." (menu-bar-make-toggle toggle-save-place-globally save-place "Save Place in Files between Sessions" "Saving place in files %s" - "Visit files of previous session when restarting Emacs")) + "Visit files of previous session when restarting Emacs" + (require 'saveplace) + ;; Do it by name, to avoid a free-variable + ;; warning during byte compilation. + (set-default + 'save-place (not (symbol-value 'save-place))))) (define-key menu-bar-options-menu [uniquify] (menu-bar-make-toggle toggle-uniquify-buffer-names uniquify-buffer-name-style @@ -1643,4 +1650,5 @@ turn on menu bars; otherwise, turn off menu bars." (provide 'menu-bar) +;;; arch-tag: 6e6a3c22-4ec4-4d3d-8190-583f8ef94ced ;;; menu-bar.el ends here diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index c41a253255..92c2600560 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -7582,3 +7582,5 @@ Copyright (C) 2003 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. + +;;; arch-tag: 87324964-69b6-4925-a3c2-9c1df53d7d51 diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index 7978fbdc32..09c689de84 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el @@ -624,4 +624,5 @@ already has an alias." ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: 49879e46-5aa3-4569-bece-e5a58731d690 ;;; mh-alias.el ends here diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index b3b588e72a..1d6cef7a83 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -1582,4 +1582,5 @@ passing the prefix ARG if any." ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: 62865511-e610-4923-b0b5-f45a8ab70a34 ;;; mh-comp.el ends here diff --git a/lisp/mh-e/mh-customize.el b/lisp/mh-e/mh-customize.el index 12f024eefe..bcbfaf0586 100644 --- a/lisp/mh-e/mh-customize.el +++ b/lisp/mh-e/mh-customize.el @@ -1922,4 +1922,5 @@ The background and foreground is used in the image." ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: 778d2a20-82e2-4276-be9d-309386776a68 ;;; mh-customize.el ends here diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index ea3a202fe6..c4b027f382 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -2448,4 +2448,5 @@ well.") ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: cce884de-bd37-4104-9963-e4439d5ed22b ;;; mh-e.el ends here diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el index d6928a28e8..15534b02a0 100644 --- a/lisp/mh-e/mh-funcs.el +++ b/lisp/mh-e/mh-funcs.el @@ -442,4 +442,5 @@ Default directory is the last directory used, or initially the value of ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: 1936c4f1-4843-438e-bc4b-a63bb75a7762 ;;; mh-funcs.el ends here diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el index 9b9a879407..982a743a22 100644 --- a/lisp/mh-e/mh-identity.el +++ b/lisp/mh-e/mh-identity.el @@ -210,4 +210,5 @@ Edit the `mh-identity-list' variable to define identity." ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: 07d66ef6-8726-4ac6-9ecf-e566cd5bfb45 ;;; mh-identity.el ends here diff --git a/lisp/mh-e/mh-inc.el b/lisp/mh-e/mh-inc.el index e1b35f3106..1c052b140b 100644 --- a/lisp/mh-e/mh-inc.el +++ b/lisp/mh-e/mh-inc.el @@ -101,4 +101,5 @@ This is called after 'customize is used to alter `mh-inc-spool-list'." ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: 3713cf2a-6082-4cb4-8ce2-99d9acaba835 ;;; mh-inc.el ends here diff --git a/lisp/mh-e/mh-index.el b/lisp/mh-e/mh-index.el index 1d136469ec..ef08c6e890 100644 --- a/lisp/mh-e/mh-index.el +++ b/lisp/mh-e/mh-index.el @@ -1410,4 +1410,5 @@ system." ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: 607762ad-0dff-4fe1-a27e-6c0dde0dcc47 ;;; mh-index ends here diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el index 30840c5032..2b839408b6 100644 --- a/lisp/mh-e/mh-junk.el +++ b/lisp/mh-e/mh-junk.el @@ -413,4 +413,5 @@ such as: ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: 603335f1-77ff-4306-8828-5d3dad51abe1 ;;; mh-junk.el ends here diff --git a/lisp/mh-e/mh-loaddefs.el b/lisp/mh-e/mh-loaddefs.el index 006dff15c6..dfee534147 100644 --- a/lisp/mh-e/mh-loaddefs.el +++ b/lisp/mh-e/mh-loaddefs.el @@ -1079,4 +1079,6 @@ Insert an alias for email address under point." t nil) ;;; no-byte-compile: t ;;; no-update-autoloads: t ;;; End: + +;;; arch-tag: bc36a104-1edb-45d5-8aad-a85b45648378 ;;; mh-loaddefs.el ends here diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 76bda78b70..2cd950550b 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -1354,4 +1354,5 @@ message multiple times." ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: 0dd36518-1b64-4a84-8f4e-59f422d3f002 ;;; mh-mime.el ends here diff --git a/lisp/mh-e/mh-pick.el b/lisp/mh-e/mh-pick.el index f9a30e75bc..a888f02154 100644 --- a/lisp/mh-e/mh-pick.el +++ b/lisp/mh-e/mh-pick.el @@ -304,4 +304,5 @@ COMPONENT is the component to search." ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: aef2b271-7768-42bd-a782-9a14ba9f83f7 ;;; mh-pick.el ends here diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el index f535650925..e441466a7b 100644 --- a/lisp/mh-e/mh-seq.el +++ b/lisp/mh-e/mh-seq.el @@ -1485,4 +1485,5 @@ Use \\\\[mh-widen] to undo this command." ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: 8e952711-01a2-485b-bf21-c9e3ad4de942 ;;; mh-seq.el ends here diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el index ebde825195..fd3e984bc3 100644 --- a/lisp/mh-e/mh-speed.el +++ b/lisp/mh-e/mh-speed.el @@ -538,4 +538,5 @@ The function invalidates the latest ancestor that is present." ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: d38ddcd4-3c00-4e37-99bf-8b89dda7b32c ;;; mh-speed.el ends here diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index 3e83988a49..3e9c87f5eb 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -2290,4 +2290,5 @@ Put the output into buffer after point. Set mark after inserted text." ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: 1af39fdf-f66f-4b06-9b48-18a7656c8e36 ;;; mh-utils.el ends here diff --git a/lisp/mh-e/mh-xemacs-compat.el b/lisp/mh-e/mh-xemacs-compat.el index e16a9fe012..5d4bf63a45 100644 --- a/lisp/mh-e/mh-xemacs-compat.el +++ b/lisp/mh-e/mh-xemacs-compat.el @@ -95,4 +95,5 @@ static char * file[] = { ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: f531e3cc-98ba-4f9f-b6a1-e282173a6aa9 ;;; mh-xemacs-compat.el ends here diff --git a/lisp/mh-e/mh-xemacs-icons.el b/lisp/mh-e/mh-xemacs-icons.el index bb3651d572..7c4947df2f 100644 --- a/lisp/mh-e/mh-xemacs-icons.el +++ b/lisp/mh-e/mh-xemacs-icons.el @@ -1303,4 +1303,5 @@ static char * widen_xpm[] = { ;;; sentence-end-double-space: nil ;;; End: +;;; arch-tag: 5b06d860-a468-4a0f-a61b-255a148985e4 ;;; mh-xemacs-icons.el ends here diff --git a/lisp/midnight.el b/lisp/midnight.el index fe89a9d7bd..37bdf065f5 100644 --- a/lisp/midnight.el +++ b/lisp/midnight.el @@ -1,6 +1,6 @@ ;;; midnight.el --- run something every midnight, e.g., kill old buffers -;;; Copyright (C) 1998 Free Software Foundation, Inc. +;;; Copyright (C) 1998, 2004 Free Software Foundation, Inc. ;; Author: Sam Steingold ;; Maintainer: Sam Steingold @@ -215,7 +215,7 @@ the time when it is run.") Sets the first argument SYMB (which must be symbol `midnight-delay') to its second argument TM." (assert (eq symb 'midnight-delay) t - "Illegal argument to `midnight-delay-set': `%s'" symb) + "Illegal argument to `midnight-delay-set': `%s'") (set symb tm) (when (timerp midnight-timer) (cancel-timer midnight-timer)) (setq midnight-timer @@ -234,4 +234,5 @@ first argument to `run-at-time'." (provide 'midnight) +;;; arch-tag: a5979be9-2890-46a3-ba84-791f0a4a6e80 ;;; midnight.el ends here diff --git a/lisp/minibuf-eldef.el b/lisp/minibuf-eldef.el index a9fa32d127..10bf38f945 100644 --- a/lisp/minibuf-eldef.el +++ b/lisp/minibuf-eldef.el @@ -157,4 +157,5 @@ Returns non-nil if the new state is enabled." (provide 'minibuf-eldef) +;;; arch-tag: 7e421fae-c275-4729-b0da-7836af377d3d ;;; minibuf-eldef.el ends here diff --git a/lisp/misc.el b/lisp/misc.el index a477fec5b0..31a35affad 100644 --- a/lisp/misc.el +++ b/lisp/misc.el @@ -1,6 +1,6 @@ ;;; misc.el --- some nonstandard basic editing commands for Emacs -;; Copyright (C) 1989 Free Software Foundation, Inc. +;; Copyright (C) 1989, 2003 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: convenience @@ -58,6 +58,23 @@ The characters copied are inserted in the buffer before point." (+ n (point))))))) (insert string))) +;; Variation of `zap-to-char'. + +(defun zap-up-to-char (arg char) + "Kill up to, but not including ARG'th occurrence of CHAR. +Case is ignored if `case-fold-search' is non-nil in the current buffer. +Goes backward if ARG is negative; error if CHAR not found. +Ignores CHAR at point." + (interactive "p\ncZap up to char: ") + (let ((direction (if (>= arg 0) 1 -1))) + (kill-region (point) + (progn + (forward-char direction) + (unwind-protect + (search-forward (char-to-string char) nil nil arg) + (backward-char direction)) + (point))))) + ;; These were added with an eye to making possible a more CCA-compatible ;; command set; but that turned out not to be interesting. @@ -72,7 +89,7 @@ The characters copied are inserted in the buffer before point." (push-mark (point-max))) (defun upcase-char (arg) - "Uppercasify ARG chars starting from point. Point doesn't move" + "Uppercasify ARG chars starting from point. Point doesn't move." (interactive "p") (save-excursion (upcase-region (point) (progn (forward-char arg) (point))))) @@ -92,4 +109,5 @@ With argument, do this that many times." (provide 'misc) +;;; arch-tag: 908f7884-c19e-4388-920c-9cfa425e449b ;;; misc.el ends here diff --git a/lisp/mouse-copy.el b/lisp/mouse-copy.el index 259eb62956..528cfb8d82 100644 --- a/lisp/mouse-copy.el +++ b/lisp/mouse-copy.el @@ -224,4 +224,5 @@ by johnh@ficus.cs.ucla.edu." (provide 'mouse-copy) +;;; arch-tag: 3d50293b-c089-4273-b412-4fc96a5f26ff ;;; mouse-copy.el ends here diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el index 50b248a9ec..9906114ca3 100644 --- a/lisp/mouse-drag.el +++ b/lisp/mouse-drag.el @@ -341,4 +341,5 @@ To test this function, evaluate: (provide 'mouse-drag) +;;; arch-tag: e47354ff-82f5-42c4-b3dc-88dd9c04b770 ;;; mouse-drag.el ends here diff --git a/lisp/mouse-sel.el b/lisp/mouse-sel.el index bbbb1e5459..f9b90fbfc6 100644 --- a/lisp/mouse-sel.el +++ b/lisp/mouse-sel.el @@ -196,6 +196,9 @@ If nil, point will always be placed at the beginning of the region." ;;=== User Command ======================================================== +(defvar mouse-sel-has-been-enabled nil + "Non-nil if Mouse Sel mode has been enabled at least once.") + (defvar mouse-sel-original-bindings nil) (defvar mouse-sel-original-interprogram-cut-function nil) (defvar mouse-sel-original-interprogram-paste-function nil) @@ -252,7 +255,8 @@ primary selection and region." (setq mouse-sel-original-interprogram-cut-function interprogram-cut-function mouse-sel-original-interprogram-paste-function - interprogram-paste-function) + interprogram-paste-function + mouse-sel-has-been-enabled t) (unless (eq mouse-sel-default-bindings 'interprogram-cut-paste) (setq interprogram-cut-function nil interprogram-paste-function nil)))) @@ -261,10 +265,13 @@ primary selection and region." (remove-hook 'x-lost-selection-hooks 'mouse-sel-lost-selection-hook) (dolist (binding mouse-sel-original-bindings) (global-set-key (car binding) (cdr binding))) - (setq interprogram-cut-function - mouse-sel-original-interprogram-cut-function - interprogram-paste-function - mouse-sel-original-interprogram-paste-function))) + ;; Restore the old values of these variables, + ;; only if they were actually saved previously. + (if mouse-sel-has-been-enabled + (setq interprogram-cut-function + mouse-sel-original-interprogram-cut-function + interprogram-paste-function + mouse-sel-original-interprogram-paste-function)))) ;;=== Internal Variables/Constants ======================================== @@ -704,4 +711,5 @@ If `mouse-yank-at-point' is non-nil, insert at point instead." (provide 'mouse-sel) +;;; arch-tag: 86e6c73f-deaa-48d3-a24e-c565fda1f7d7 ;;; mouse-sel.el ends here diff --git a/lisp/mouse.el b/lisp/mouse.el index 70fee40b53..faa10e842d 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1,6 +1,6 @@ ;;; mouse.el --- window system-independent mouse support -;; Copyright (C) 1993, 1994, 1995, 1999, 2000, 2001 +;; Copyright (C) 1993, 94, 95, 1999, 2000, 01, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -166,7 +166,7 @@ Default to the Edit menu if the major mode doesn't define a menu." (lookup-key menubar (vector (car submap))))))) (defun mouse-popup-menubar (event prefix) - "Pops up a menu equivalent to the menu bar a keyboard EVENT with PREFIX. + "Pop up a menu equivalent to the menu bar for keyboard EVENT with PREFIX. The contents are the items that would be in the menu bar whether or not it is actually displayed." (interactive "@e \nP") @@ -577,12 +577,7 @@ This should be bound to a mouse click event type." (mouse-minibuffer-check event) ;; Use event-end in case called from mouse-drag-region. ;; If EVENT is a click, event-end and event-start give same value. - (let ((posn (event-end event))) - (if (not (windowp (posn-window posn))) - (error "Cursor not in text area of window")) - (select-window (posn-window posn)) - (if (numberp (posn-point posn)) - (goto-char (posn-point posn))))) + (posn-set-point (event-end event))) (defvar mouse-last-region-beg nil) (defvar mouse-last-region-end nil) @@ -895,12 +890,12 @@ If DIR is positive skip forward; if negative, skip backward." (while (and (not (eobp)) (= (following-char) char)) (forward-char 1)))))) -;; Return a list of region bounds based on START and END according to MODE. -;; If MODE is 0 then set point to (min START END), mark to (max START END). -;; If MODE is 1 then set point to start of word at (min START END), -;; mark to end of word at (max START END). -;; If MODE is 2 then do the same for lines. (defun mouse-start-end (start end mode) +"Return a list of region bounds based on START and END according to MODE. +If MODE is 0 then set point to (min START END), mark to (max START END). +If MODE is 1 then set point to start of word at (min START END), +mark to end of word at (max START END). +If MODE is 2 then do the same for lines." (if (> start end) (let ((temp start)) (setq start end @@ -2204,6 +2199,10 @@ and selects that window." (global-set-key [double-mouse-1] 'mouse-set-point) (global-set-key [triple-mouse-1] 'mouse-set-point) +;; Clicking on the fringes causes hscrolling: +(global-set-key [left-fringe mouse-1] 'mouse-set-point) +(global-set-key [right-fringe mouse-1] 'mouse-set-point) + (global-set-key [mouse-2] 'mouse-yank-at-click) (global-set-key [mouse-3] 'mouse-save-then-kill) @@ -2245,4 +2244,5 @@ and selects that window." (make-obsolete 'mldrag-drag-vertical-line 'mouse-drag-vertical-line "21.1") (provide 'mldrag) +;;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3 ;;; mouse.el ends here diff --git a/lisp/msb.el b/lisp/msb.el index 453dcb7199..e352150a57 100644 --- a/lisp/msb.el +++ b/lisp/msb.el @@ -1157,4 +1157,5 @@ different buffer menu using the function `msb'." (provide 'msb) (eval-after-load "msb" '(run-hooks 'msb-after-load-hook 'msb-after-load-hooks)) +;;; arch-tag: 403f9e82-b92e-4e7a-a797-5d6d9b76da36 ;;; msb.el ends here diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 47ec9a0eaf..0194160bcf 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -58,7 +58,7 @@ 'mouse-wheel-down-event) (defcustom mouse-wheel-down-event ;; In the latest versions of XEmacs, we could just use mouse-%s as well. - (if (memq system-type '(windows-nt macos darwin)) + (if (memq window-system '(w32 mac)) 'wheel-up (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s") mouse-wheel-down-button))) @@ -72,7 +72,7 @@ 'mouse-wheel-up-event) (defcustom mouse-wheel-up-event ;; In the latest versions of XEmacs, we could just use mouse-%s as well. - (if (memq system-type '(windows-nt macos darwin)) + (if (memq window-system '(w32 mac)) 'wheel-down (intern (format (if (featurep 'xemacs) "button%s" "mouse-%s") mouse-wheel-up-button))) @@ -250,4 +250,5 @@ Returns non-nil if the new state is enabled." (provide 'mwheel) +;;; arch-tag: 50ed00e7-3686-4b7a-8037-fb31aa5c237f ;;; mwheel.el ends here diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index a315482fd1..8e1068a5be 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -686,7 +686,7 @@ :prefix "ange-ftp-") (defcustom ange-ftp-name-format - '("^/\\(\\([^@/:]*\\)@\\)?\\([^@/:]*[^@/:.]\\):\\(.*\\)" . (3 2 4)) + '("^/\\(\\([^/:]*\\)@\\)?\\([^@/:]*[^@/:.]\\):\\(.*\\)" . (3 2 4)) "*Format of a fully expanded remote file name. This is a list of the form \(REGEXP HOST USER NAME\), @@ -694,7 +694,7 @@ where REGEXP is a regular expression matching the full remote name, and HOST, USER, and NAME are the numbers of parenthesized expressions in REGEXP for the components (in that order)." :group 'ange-ftp - :type '(list regexp + :type '(list (regexp :tag "Name regexp") (integer :tag "Host group") (integer :tag "User group") (integer :tag "Name group"))) @@ -1469,14 +1469,15 @@ only return the directory part of FILE." ;; Display the last chunk of output from the ftp process for the given HOST ;; USER pair, and signal an error including MSG in the text. (defun ange-ftp-error (host user msg) - (let ((cur (selected-window)) - (pop-up-windows t)) - (pop-to-buffer - (get-buffer-create - (ange-ftp-ftp-process-buffer host user))) - (goto-char (point-max)) - (select-window cur)) - (signal 'ftp-error (list (format "FTP Error: %s" msg)))) + (save-excursion ;; Prevent pop-to-buffer from changing current buffer. + (let ((cur (selected-window)) + (pop-up-windows t)) + (pop-to-buffer + (get-buffer-create + (ange-ftp-ftp-process-buffer host user))) + (goto-char (point-max)) + (select-window cur)) + (signal 'ftp-error (list (format "FTP Error: %s" msg))))) (defun ange-ftp-set-buffer-mode () "Set correct modes for the current buffer if visiting a remote file." @@ -1917,7 +1918,8 @@ on the gateway machine to do the ftp instead." ;; but that doesn't work: ftp never responds. ;; Can anyone find a fix for that? (let ((process-connection-type t) - (process-environment process-environment) + ;; Copy this so we don't alter it permanently. + (process-environment (copy-tree process-environment)) (buffer (get-buffer-create name))) (save-excursion (set-buffer buffer) @@ -3433,7 +3435,7 @@ system TYPE.") (nreverse files))) (apply 'ange-ftp-real-directory-files directory full match v19-args))) -(defun ange-ftp-file-attributes (file) +(defun ange-ftp-file-attributes (file &optional id-format) (setq file (expand-file-name file)) (let ((parsed (ange-ftp-ftp-name file))) (if parsed @@ -3466,7 +3468,9 @@ system TYPE.") inode ;10 "inode number". -1 ;11 device number [v19 only] )))) - (ange-ftp-real-file-attributes file)))) + (if id-format + (ange-ftp-real-file-attributes file id-format) + (ange-ftp-real-file-attributes file))))) (defun ange-ftp-file-newer-than-file-p (f1 f2) (let ((f1-parsed (ange-ftp-ftp-name f1)) @@ -6048,4 +6052,5 @@ be recognized automatically (they are all valid BS2000 hosts too)." (provide 'ange-ftp) +;;; arch-tag: 2987ef88-cb56-4ec1-87a9-79132572e316 ;;; ange-ftp.el ends here diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index b97eda6472..a70e08028d 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -1,6 +1,6 @@ ;;; browse-url.el --- pass a URL to a WWW browser -;; Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 +;; Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001, 2004 ;; Free Software Foundation, Inc. ;; Author: Denis Howe @@ -818,8 +818,8 @@ When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." (interactive (browse-url-interactive-arg "URL: ")) ;; URL encode any `confusing' characters in the URL. This needs to - ;; include at least commas; presumably also close parens. - (while (string-match "[,)]" url) + ;; include at least commas; presumably also close parens and dollars. + (while (string-match "[,)$]" url) (setq url (replace-match (format "%%%x" (string-to-char (match-string 0 url))) t t url))) (let* ((process-environment (browse-url-process-environment)) @@ -889,8 +889,8 @@ When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." (interactive (browse-url-interactive-arg "URL: ")) ;; URL encode any `confusing' characters in the URL. This needs to - ;; include at least commas; presumably also close parens. - (while (string-match "[,)]" url) + ;; include at least commas; presumably also close parens and dollars. + (while (string-match "[,)$]" url) (setq url (replace-match (format "%%%x" (string-to-char (match-string 0 url))) t t url))) (let* ((process-environment (browse-url-process-environment)) @@ -942,8 +942,8 @@ When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." (interactive (browse-url-interactive-arg "URL: ")) ;; URL encode any `confusing' characters in the URL. This needs to - ;; include at least commas; presumably also close parens. - (while (string-match "[,)]" url) + ;; include at least commas; presumably also close parens and dollars. + (while (string-match "[,)$]" url) (setq url (replace-match (format "%%%x" (string-to-char (match-string 0 url))) t t url))) (let* ((process-environment (browse-url-process-environment)) @@ -991,8 +991,8 @@ When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." (interactive (browse-url-interactive-arg "URL: ")) ;; URL encode any `confusing' characters in the URL. This needs to - ;; include at least commas; presumably also close parens. - (while (string-match "[,)]" url) + ;; include at least commas; presumably also close parens and dollars. + (while (string-match "[,)$]" url) (setq url (replace-match (format "%%%x" (string-to-char (match-string 0 url))) t t url))) (let* ((process-environment (browse-url-process-environment)) @@ -1301,9 +1301,11 @@ Default to the URL around or before point." ;; --- mailto --- +(autoload 'rfc2368-parse-mailto-url "rfc2368") + ;;;###autoload (defun browse-url-mail (url &optional new-window) - "Open a new mail message buffer within Emacs. + "Open a new mail message buffer within Emacs for the RFC 2368 URL. Default to using the mailto: URL around or before point as the recipient's address. Supplying a non-nil interactive prefix argument will cause the mail to be composed in another window rather than the @@ -1318,14 +1320,24 @@ When called non-interactively, optional second argument NEW-WINDOW is used instead of `browse-url-new-window-flag'." (interactive (browse-url-interactive-arg "Mailto URL: ")) (save-excursion - (let ((to (if (string-match "^mailto:" url) - (substring url 7) - url))) + (let* ((alist (rfc2368-parse-mailto-url url)) + (to (assoc "To" alist)) + (subject (assoc "Subject" alist)) + (body (assoc "Body" alist)) + (rest (delete to (delete subject (delete body alist)))) + (to (cdr to)) + (subject (cdr subject)) + (body (cdr body)) + (mail-citation-hook (unless body mail-citation-hook))) (if (browse-url-maybe-new-window new-window) - (compose-mail-other-window to nil nil nil - (list 'insert-buffer (current-buffer))) - (compose-mail to nil nil nil nil - (list 'insert-buffer (current-buffer))))))) + (compose-mail-other-window to subject rest nil + (if body + (list 'insert body) + (list 'insert-buffer (current-buffer)))) + (compose-mail to subject rest nil nil + (if body + (list 'insert body) + (list 'insert-buffer (current-buffer)))))))) ;; --- Random browser --- @@ -1340,8 +1352,8 @@ don't offer a form of remote control." (interactive (browse-url-interactive-arg "URL: ")) (if (not browse-url-generic-program) (error "No browser defined (`browse-url-generic-program')")) - (apply 'start-process (concat browse-url-generic-program url) nil - browse-url-generic-program + (apply 'call-process browse-url-generic-program nil + 0 nil (append browse-url-generic-args (list url)))) ;;;###autoload @@ -1355,4 +1367,5 @@ Default to the URL around or before point." (provide 'browse-url) +;;; arch-tag: d2079573-5c06-4097-9598-f550fba19430 ;;; browse-url.el ends here diff --git a/lisp/net/eudc-bob.el b/lisp/net/eudc-bob.el index 78593fe5c1..df20007cfb 100644 --- a/lisp/net/eudc-bob.el +++ b/lisp/net/eudc-bob.el @@ -365,4 +365,5 @@ display a button." "Display a button for the JPEG DATA." (eudc-bob-display-jpeg data nil)) +;;; arch-tag: 8f1853df-c9b6-4c5a-bdb1-d94dbd651fb3 ;;; eudc-bob.el ends here diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el index 9bd3ad7ca7..704792f6b6 100644 --- a/lisp/net/eudc-export.el +++ b/lisp/net/eudc-export.el @@ -215,4 +215,5 @@ This function can only be called from a directory query result buffer." (overlay-get (car (overlays-at (point))) 'eudc-record) (eudc-insert-record-at-point-into-bbdb))) +;;; arch-tag: 8cbda7dc-3163-47e6-921c-6ec5083df2d7 ;;; eudc-export.el ends here diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el index c03cf0219f..9dc81ce2bc 100644 --- a/lisp/net/eudc-hotlist.el +++ b/lisp/net/eudc-hotlist.el @@ -194,4 +194,5 @@ These are the special commands of this mode: "" eudc-hotlist-menu)) +;;; arch-tag: 9b633ab3-6a6e-4b46-b12e-d96739a7e0e8 ;;; eudc-hotlist.el ends here diff --git a/lisp/net/eudc-vars.el b/lisp/net/eudc-vars.el index b44f7f7460..1b9da92da6 100644 --- a/lisp/net/eudc-vars.el +++ b/lisp/net/eudc-vars.el @@ -406,4 +406,5 @@ Otherwise records must match queries exactly." (provide 'eudc-vars) +;;; arch-tag: 80050575-b838-4246-8ebc-b2d7c5a2e482 ;;; eudc-vars.el ends here diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index 9d3e4aa9d3..6d12d5e636 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -1284,4 +1284,5 @@ This does nothing except loading eudc by autoload side-effect." (provide 'eudc) +;;; arch-tag: e18872b6-db83-400b-869d-be54e9a4160c ;;; eudc.el ends here diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el index 1c20c7cc18..745d6e289a 100644 --- a/lisp/net/eudcb-bbdb.el +++ b/lisp/net/eudcb-bbdb.el @@ -231,4 +231,5 @@ RETURN-ATTRS is a list of attributes to return, defaulting to (provide 'eudcb-bbdb) +;;; arch-tag: 38276208-75de-4dbc-ba6f-8db684c32e0a ;;; eudcb-bbdb.el ends here diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el index fb97bc754e..a206578b77 100644 --- a/lisp/net/eudcb-ldap.el +++ b/lisp/net/eudcb-ldap.el @@ -208,4 +208,5 @@ attribute names are returned. Default to `person'" (provide 'eudcb-ldap) +;;; arch-tag: 0f254dc0-7378-4fd4-ae26-18666184e96b ;;; eudcb-ldap.el ends here diff --git a/lisp/net/eudcb-ph.el b/lisp/net/eudcb-ph.el index 68d03979f4..efd89beaaa 100644 --- a/lisp/net/eudcb-ph.el +++ b/lisp/net/eudcb-ph.el @@ -244,4 +244,5 @@ depending on RETURN-RESPONSE." (provide 'eudcb-ph) +;;; arch-tag: 4365bbf5-af20-453e-b5b6-2e7118ebfcdb ;;; eudcb-ph.el ends here diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index 1449c9bcc3..b77be84deb 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -248,4 +248,5 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and (provide 'goto-addr) +;;; arch-tag: ca47c505-5661-425d-a471-62bc6e75cf0a ;;; goto-addr.el ends here diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index d539164e9f..55af47e6a8 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -1,6 +1,6 @@ ;;; ldap.el --- client interface to LDAP for Emacs -;; Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 02, 2004 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo ;; Maintainer: Pavel Janík @@ -36,6 +36,7 @@ ;;; Code: (require 'custom) +(eval-when-compile (require 'cl)) (defgroup ldap nil "Lightweight Directory Access Protocol." @@ -464,17 +465,16 @@ Additional search parameters can be specified through (error "No LDAP host specified")) (let ((host-plist (cdr (assoc host ldap-host-parameters-alist))) result) - (setq result (ldap-search-internal (append host-plist - (list 'host host - 'filter filter - 'attributes attributes - 'attrsonly attrsonly - 'withdn withdn)))) + (setq result (ldap-search-internal (list* 'host host + 'filter filter + 'attributes attributes + 'attrsonly attrsonly + 'withdn withdn + host-plist))) (if ldap-ignore-attribute-codings result - (mapcar (function - (lambda (record) - (mapcar 'ldap-decode-attribute record))) + (mapcar (lambda (record) + (mapcar 'ldap-decode-attribute record)) result)))) @@ -582,6 +582,11 @@ an alist of attribute/value pairs." (while (looking-at "^\\(\\w*\\)[=:\t ]+\\(<[\t ]*file://\\)?\\(.*\\)$") (setq name (match-string 1) value (match-string 3)) + ;; Need to handle file:///D:/... as generated by OpenLDAP + ;; on DOS/Windows as local files. + (if (and (memq system-type '(windows-nt ms-dos)) + (eq (string-match "/\\(.:.*\\)$" value) 0)) + (setq value (match-string 1 value))) ;; Do not try to open non-existent files (if (equal value "") (setq value " ") @@ -607,4 +612,5 @@ an alist of attribute/value pairs." (provide 'ldap) +;;; arch-tag: 47913a76-6155-42e6-ac58-6d28b5d50eb0 ;;; ldap.el ends here diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el index 982923ed55..202dac361e 100644 --- a/lisp/net/net-utils.el +++ b/lisp/net/net-utils.el @@ -828,4 +828,5 @@ from SEARCH-STRING. With argument, prompt for whois server." (provide 'net-utils) +;;; arch-tag: 97119e91-9edb-4376-838b-bf7058fa1314 ;;; net-utils.el ends here diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el index 8062b4292d..713c036ce7 100644 --- a/lisp/net/netrc.el +++ b/lisp/net/netrc.el @@ -125,4 +125,5 @@ Entries without port tokens default to DEFAULTPORT." (provide 'netrc) +;;; arch-tag: af9929cc-2d12-482f-936e-eb4366f9fa55 ;;; netrc.el ends here diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index 22794a4107..fd13b3a0f5 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -549,4 +549,5 @@ TYPE dictates what will be inserted, options are: (provide 'quickurl) +;;; arch-tag: a8183ea5-80c2-4082-a7d1-b0fdf2da467e ;;; quickurl.el ends here diff --git a/lisp/net/rcompile.el b/lisp/net/rcompile.el index 8105593c75..c9078ac2d7 100644 --- a/lisp/net/rcompile.el +++ b/lisp/net/rcompile.el @@ -175,4 +175,5 @@ See \\[compile]." (set (make-local-variable 'comint-file-name-prefix) (concat "/" host ":"))))) +;;; arch-tag: 2866a132-ece4-4ce9-9f91-ec147f803f73 ;;; rcompile.el ends here diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el index cc2defdf16..fa7e0d1950 100644 --- a/lisp/net/rlogin.el +++ b/lisp/net/rlogin.el @@ -6,8 +6,6 @@ ;; Maintainer: Noah Friedman ;; Keywords: unix, comm -;; $Id: rlogin.el,v 1.3 2002/03/14 11:51:47 miles Exp $ - ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify @@ -329,4 +327,5 @@ Delete ARG characters forward, or send a C-d to process if at end of buffer." (provide 'rlogin) +;;; arch-tag: 6e20eabf-feda-40fa-ab40-0d156db447e4 ;;; rlogin.el ends here diff --git a/lisp/net/snmp-mode.el b/lisp/net/snmp-mode.el index cde6fb7c60..7fed47f6bf 100644 --- a/lisp/net/snmp-mode.el +++ b/lisp/net/snmp-mode.el @@ -720,4 +720,5 @@ controls whether case is significant." (provide 'snmp-mode) +;;; arch-tag: eb6cc0f9-1e47-4023-8625-bc9aae6c3527 ;;; snmp-mode.el ends here diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el index b75ff47220..dac6f228cd 100644 --- a/lisp/net/telnet.el +++ b/lisp/net/telnet.el @@ -89,8 +89,8 @@ Should be set to the number of terminal writes telnet will make rejecting one login and prompting again for a username and password.") (defun telnet-interrupt-subjob () - (interactive) "Interrupt the program running through telnet on the remote host." + (interactive) (send-string nil telnet-interrupt-string)) (defun telnet-c-z () @@ -262,4 +262,5 @@ Normally input is edited in Emacs and sent a line at a time." (provide 'telnet) +;;; arch-tag: 98218821-d04a-48b6-9058-57d0d4677a56 ;;; telnet.el ends here diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 70270773a3..dd161032d9 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -124,4 +124,5 @@ specifying a port number to connect to." (provide 'tls) +;;; arch-tag: 5596d1c4-facc-4bc4-94a9-9863b928d7ac ;;; tls.el ends here diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el index 07a756c352..3be891a49f 100644 --- a/lisp/net/tramp-ftp.el +++ b/lisp/net/tramp-ftp.el @@ -1,6 +1,6 @@ ;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP and EFS -*- coding: iso-8859-1; -*- -;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Michael Albinus ;; Keywords: comm, processes @@ -24,8 +24,8 @@ ;;; Commentary: -;; Convenience functions for calling Ange-FTP (and maybe EFS, later on) -;; from Tramp. Most of them are displaced from tramp.el. +;; Convenience functions for calling Ange-FTP from Tramp. +;; Most of them are displaced from tramp.el. ;;; Code: @@ -98,9 +98,16 @@ pass to the OPERATION." (list (nth 0 tramp-file-name-structure) (nth 3 tramp-file-name-structure) (nth 2 tramp-file-name-structure) - (nth 4 tramp-file-name-structure)))) + (nth 4 tramp-file-name-structure))) + ;; ange-ftp uses `ange-ftp-ftp-name-arg' and `ange-ftp-ftp-name-res' + ;; for optimization in `ange-ftp-ftp-name'. If Tramp wasn't active, + ;; there could be incorrect values from previous calls in case the + ;; "ftp" method is used in the Tramp file name. So we unset + ;; those values. + (ange-ftp-ftp-name-arg "") + (ange-ftp-ftp-name-res nil)) (cond - ;; If argument is a symlink, 'file-directory-p` and 'file-exists-p` + ;; If argument is a symlink, `file-directory-p' and `file-exists-p' ;; call the traversed file recursively. So we cannot disable the ;; file-name-handler this case. ((memq operation '(file-directory-p file-exists-p)) @@ -137,5 +144,8 @@ pass to the OPERATION." ;; pretended in `tramp-file-name-handler' otherwise. ;; Furthermore, there are no backup files on FTP hosts. ;; Worth further investigations. +;; * Map /multi:ssh:out@gate:ftp:kai@real.host:/path/to.file +;; on Ange-FTP gateways. +;;; arch-tag: 759fb338-5c63-4b99-bd36-b4d59db91cff ;;; tramp-ftp.el ends here diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 8474b7a88a..ab6ad3310c 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -1,6 +1,6 @@ ;;; tramp-smb.el --- Tramp access functions for SMB servers -*- coding: iso-8859-1; -*- -;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Michael Albinus ;; Keywords: comm, processes @@ -50,7 +50,7 @@ ;; Add a default for `tramp-default-method-alist'. Rule: If there is ;; a domain in USER, it must be the SMB method. (add-to-list 'tramp-default-method-alist - (list "%" "" tramp-smb-method)) + (list "" "%" tramp-smb-method)) ;; Add completion function for SMB method. (tramp-set-completion-function @@ -62,7 +62,7 @@ :group 'tramp :type 'string) -(defconst tramp-smb-prompt "^smb: \\S-+> " +(defconst tramp-smb-prompt "^smb: \\S-+> \\|^\\s-+Server\\s-+Comment$" "Regexp used as prompt in smbclient.") (defconst tramp-smb-errors @@ -71,8 +71,8 @@ '(; Connection error "Connection to \\S-+ failed" ; Samba - "ERRSRV" "ERRDOS" + "ERRSRV" "ERRbadfile" "ERRbadpw" "ERRfilexists" @@ -81,13 +81,16 @@ "ERRnosuchshare" ; Windows NT 4.0, Windows 5.0 (Windows 2000), Windows 5.1 (Windows XP) "NT_STATUS_ACCESS_DENIED" + "NT_STATUS_ACCOUNT_LOCKED_OUT" "NT_STATUS_BAD_NETWORK_NAME" "NT_STATUS_CANNOT_DELETE" "NT_STATUS_LOGON_FAILURE" + "NT_STATUS_NETWORK_ACCESS_DENIED" "NT_STATUS_NO_SUCH_FILE" "NT_STATUS_OBJECT_NAME_INVALID" "NT_STATUS_OBJECT_NAME_NOT_FOUND" - "NT_STATUS_SHARING_VIOLATION") + "NT_STATUS_SHARING_VIOLATION" + "NT_STATUS_WRONG_PASSWORD") "\\|") "Regexp for possible error strings of SMB servers. Used instead of analyzing error codes of commands.") @@ -102,12 +105,6 @@ This variable is local to each buffer.") This variable is local to each buffer.") (make-variable-buffer-local 'tramp-smb-share-cache) -(defvar tramp-smb-process-running nil - "Flag whether a corresponding process is still running. -Will be changed by corresponding `process-sentinel'. -This variable is local to each buffer.") -(make-variable-buffer-local 'tramp-smb-process-running) - (defvar tramp-smb-inodes nil "Keeps virtual inodes numbers for SMB files.") @@ -290,7 +287,7 @@ KEEP-DATE is not handled in case NEWNAME resides on an SMB server." (tramp-smb-send-command user host (format "cd \\")) ;; Error (tramp-smb-send-command user host (format "cd \\")) - (error "Cannot delete file `%s'" directory)))))) + (error "Cannot delete file `%s'" filename)))))) (defun tramp-smb-handle-directory-files (directory &optional full match nosort) @@ -324,18 +321,18 @@ KEEP-DATE is not handled in case NEWNAME resides on an SMB server." entries)))) (defun tramp-smb-handle-directory-files-and-attributes - (directory &optional full match nosort) + (directory &optional full match nosort id-format) "Like `directory-files-and-attributes' for tramp files." (mapcar (lambda (x) - (cons x (file-attributes - (if full x (concat (file-name-as-directory directory) x))))) + ;; We cannot call `file-attributes' for backward compatibility reasons. + ;; Its optional parameter ID-FORMAT is introduced with Emacs 21.4. + (cons x (tramp-smb-handle-file-attributes + (if full x (concat (file-name-as-directory directory) x)) id-format))) (directory-files directory full match nosort))) -(defun tramp-smb-handle-file-attributes (filename &optional nonnumeric) - "Like `file-attributes' for tramp files. -Optional argument NONNUMERIC means return user and group name -rather than as numbers." +(defun tramp-smb-handle-file-attributes (filename &optional id-format) + "Like `file-attributes' for tramp files." ; (with-parsed-tramp-file-name filename nil (let (user host localname) (with-parsed-tramp-file-name filename l @@ -346,6 +343,8 @@ rather than as numbers." (entries (tramp-smb-get-file-entries user host share file)) (entry (and entries (assoc (file-name-nondirectory file) entries))) + (uid (if (and id-format (equal id-format 'string)) "nobody" -1)) + (gid (if (and id-format (equal id-format 'string)) "nogroup" -1)) (inode (tramp-smb-get-inode share file)) (device (tramp-get-device nil tramp-smb-method user host))) @@ -354,8 +353,8 @@ rather than as numbers." (list (and (string-match "d" (nth 1 entry)) t) ;0 file type -1 ;1 link count - -1 ;2 uid - -1 ;3 gid + uid ;2 uid + gid ;3 gid '(0 0) ;4 atime (nth 3 entry) ;5 mtime '(0 0) ;6 ctime @@ -450,19 +449,23 @@ rather than as numbers." (defun tramp-smb-handle-file-writable-p (filename) "Like `file-writable-p' for tramp files." -; (with-parsed-tramp-file-name filename nil - (let (user host localname) - (with-parsed-tramp-file-name filename l - (setq user l-user host l-host localname l-localname)) - (save-excursion - (let* ((share (tramp-smb-get-share localname)) - (file (tramp-smb-get-localname localname nil)) - (entries (tramp-smb-get-file-entries user host share file)) - (entry (and entries - (assoc (file-name-nondirectory file) entries)))) - (and entry - (string-match "w" (nth 1 entry)) - t))))) + (if (not (file-exists-p filename)) + (let ((dir (file-name-directory filename))) + (and (file-exists-p dir) + (file-writable-p dir))) +; (with-parsed-tramp-file-name filename nil + (let (user host localname) + (with-parsed-tramp-file-name filename l + (setq user l-user host l-host localname l-localname)) + (save-excursion + (let* ((share (tramp-smb-get-share localname)) + (file (tramp-smb-get-localname localname nil)) + (entries (tramp-smb-get-file-entries user host share file)) + (entry (and entries + (assoc (file-name-nondirectory file) entries)))) + (and share entry + (string-match "w" (nth 1 entry)) + t)))))) (defun tramp-smb-handle-insert-directory (filename switches &optional wildcard full-directory-p) @@ -546,7 +549,7 @@ WILDCARD and FULL-DIRECTORY-P are not handled." "Like `make-directory-internal' for tramp files." (setq directory (directory-file-name (expand-file-name directory))) (unless (file-name-absolute-p directory) - (setq ldir (concat default-directory directory))) + (setq directory (concat default-directory directory))) ; (with-parsed-tramp-file-name directory nil (let (user host localname) (with-parsed-tramp-file-name directory l @@ -731,9 +734,12 @@ Result is a list of (LOCALNAME MODE SIZE MONTH DAY TIME YEAR)." ;; Cache share entries (setq tramp-smb-share-cache res))) - ;; Add directory itself - (add-to-list 'res '("" "dr-xr-xr-x" 0 (0 0))) + (add-to-list 'res '("" "drwxrwxrwx" 0 (0 0))) + + ;; There's a very strange error (debugged with XEmacs 21.4.14) + ;; If there's no short delay, it returns nil. No idea about + (when (featurep 'xemacs) (sleep-for 0.01)) ;; Check for matching entries (delq nil (mapcar @@ -911,7 +917,8 @@ there has been an error message from smbclient." "Maybe open a connection to HOST, logging in as USER, using `tramp-smb-program'. Does not do anything if a connection is already open, but re-opens the connection if a previous connection has died for some reason." - (let ((p (get-buffer-process + (let ((process-connection-type tramp-process-connection-type) + (p (get-buffer-process (tramp-get-buffer nil tramp-smb-method user host)))) (save-excursion (set-buffer (tramp-get-buffer nil tramp-smb-method user host)) @@ -985,11 +992,7 @@ Domain names in USER and port numbers in HOST are acknowledged." (tramp-message 9 "Started process %s" (process-command p)) (process-kill-without-query p) (set-buffer buffer) - (set-process-sentinel - p (lambda (proc str) (setq tramp-smb-process-running nil))) - ; If no share is given, the process will terminate - (setq tramp-smb-process-running share - tramp-smb-share share) + (setq tramp-smb-share share) ; send password (when real-user @@ -998,54 +1001,44 @@ Domain names in USER and port numbers in HOST are acknowledged." (tramp-enter-password p pw-prompt))) (unless (tramp-smb-wait-for-output user host) + (tramp-clear-passwd user host) (error "Cannot open connection //%s@%s/%s" user host (or share ""))))))) ;; We don't use timeouts. If needed, the caller shall wrap around. (defun tramp-smb-wait-for-output (user host) "Wait for output from smbclient command. -Sets position to begin of buffer. Returns nil if an error message has appeared." - (save-excursion - (let ((proc (get-buffer-process (current-buffer))) - (found (progn (goto-char (point-max)) - (beginning-of-line) - (looking-at tramp-smb-prompt))) - err) - (save-match-data - ;; Algorithm: get waiting output. See if last line contains - ;; tramp-smb-prompt sentinel, or process has exited. - ;; If not, wait a bit and again get waiting output. - (while (and (not found) tramp-smb-process-running) - (accept-process-output proc) - (goto-char (point-max)) - (beginning-of-line) - (setq found (looking-at tramp-smb-prompt))) - - ;; There might be pending output. If tramp-smb-prompt sentinel - ;; hasn't been found, the process has died already. We should - ;; give it a chance. - (when (not found) (accept-process-output nil 1)) - - ;; Search for errors. - (goto-char (point-min)) - (setq err (re-search-forward tramp-smb-errors nil t))) - - ;; Add output to debug buffer if appropriate. - (when tramp-debug-buffer - (append-to-buffer - (tramp-get-debug-buffer nil tramp-smb-method user host) - (point-min) (point-max)) - (when (and (not found) tramp-smb-process-running) - (save-excursion - (set-buffer - (tramp-get-debug-buffer nil tramp-smb-method user host)) - (goto-char (point-max)) - (insert (format "[[Remote prompt `%s' not found]]\n" - tramp-smb-prompt))))) + (let ((proc (get-buffer-process (current-buffer))) + (found (progn (goto-char (point-min)) + (re-search-forward tramp-smb-prompt nil t))) + (err (progn (goto-char (point-min)) + (re-search-forward tramp-smb-errors nil t)))) + + ;; Algorithm: get waiting output. See if last line contains + ;; tramp-smb-prompt sentinel or tramp-smb-errors strings. + ;; If not, wait a bit and again get waiting output. + (while (and (not found) (not err)) + + ;; Accept pending output. + (accept-process-output proc) + + ;; Search for prompt. (goto-char (point-min)) - ;; Return value is whether no error message has appeared. - (not err)))) + (setq found (re-search-forward tramp-smb-prompt nil t)) + + ;; Search for errors. + (goto-char (point-min)) + (setq err (re-search-forward tramp-smb-errors nil t))) + + ;; Add output to debug buffer if appropriate. + (when tramp-debug-buffer + (append-to-buffer + (tramp-get-debug-buffer nil tramp-smb-method user host) + (point-min) (point-max))) + + ;; Return value is whether no error message has appeared. + (not err))) ;; Snarfed code from time-date.el and parse-time.el @@ -1123,8 +1116,6 @@ Return the difference in the format of a time value." ;; * Provide a local smb.conf. The default one might not be readable. ;; * Error handling in case password is wrong. ;; * Read password from "~/.netrc". -;; * Use different buffers for different shares. By this, the password -;; won't be requested again when changing shares on the same host. ;; * Return more comprehensive file permission string. Think whether it is ;; possible to implement `set-file-modes'. ;; * Handle WILDCARD and FULL-DIRECTORY-P in @@ -1139,4 +1130,5 @@ Return the difference in the format of a time value." ;; * (RMS) Use unwind-protect to clean up the state so as to make the state ;; regular again. +;;; arch-tag: fcc9dbec-7503-4d73-b638-3c8aa59575f5 ;;; tramp-smb.el ends here diff --git a/lisp/net/tramp-util.el b/lisp/net/tramp-util.el index 44a24ca3ab..2d828d27c5 100644 --- a/lisp/net/tramp-util.el +++ b/lisp/net/tramp-util.el @@ -52,4 +52,6 @@ (compilation-minor-mode 1)) (provide 'tramp-util) + +;;; arch-tag: 500f9992-a44e-46d0-83a7-980799251808 ;;; tramp-util.el ends here diff --git a/lisp/net/tramp-uu.el b/lisp/net/tramp-uu.el index e307febc6f..1047e62a3c 100644 --- a/lisp/net/tramp-uu.el +++ b/lisp/net/tramp-uu.el @@ -87,4 +87,6 @@ (insert "begin 600 xxx\n")))) (provide 'tramp-uu) + +;;; arch-tag: 7153f2c6-8be5-4cd2-8c06-0fbcf5190ef6 ;;; tramp-uu.el ends here diff --git a/lisp/net/tramp-vc.el b/lisp/net/tramp-vc.el index cee13308d3..ded30f4b09 100644 --- a/lisp/net/tramp-vc.el +++ b/lisp/net/tramp-vc.el @@ -391,8 +391,15 @@ filename we are thinking about..." ;; Pacify byte-compiler; this symbol is bound in the calling ;; function. CCC: Maybe it would be better to move the ;; boundness-checking into this function? - (let ((file (symbol-value 'file))) - (if (and uid (/= uid (nth 2 (file-attributes file)))) + (let ((file (symbol-value 'file)) + (remote-uid + ;; With Emacs 21.4, `file-attributes' has got an optional parameter + ;; ID-FORMAT. Handle this case backwards compatible. + (if (and (functionp 'subr-arity) + (= 2 (cdr (subr-arity (symbol-function 'file-attributes))))) + (nth 2 (file-attributes file 'integer)) + (nth 2 (file-attributes file))))) + (if (and uid (/= uid remote-uid)) (error "tramp-handle-vc-user-login-name cannot map a uid to a name") (let* ((v (tramp-dissect-file-name (tramp-handle-expand-file-name file))) (u (tramp-file-name-user v))) @@ -486,4 +493,5 @@ This makes remote VC work correctly at the cost of some processing time." ;; No need to load this again if anyone asks. (provide 'tramp-vc) +;;; arch-tag: 27cc42ce-da19-468d-ad5c-a2690558db60 ;;; tramp-vc.el ends here diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 966d93b719..cd6ed33792 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1,7 +1,7 @@ ;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; -*- ;;; tramp.el --- Transparent Remote Access, Multiple Protocol -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: kai.grossjohann@gmx.net ;; Keywords: comm, processes @@ -72,6 +72,12 @@ (require 'timer) (require 'format-spec) ;from Gnus 5.8, also in tar ball +;; As long as password.el is not part of (X)Emacs, it shouldn't +;; be mandatory +(if (featurep 'xemacs) + (load "password" 'noerror) + (require 'password nil 'noerror)) ;from No Gnus, also in tar ball + ;; The explicit check is not necessary in Emacs, which provides the ;; feature even if implemented in C, but it appears to be necessary ;; in XEmacs. @@ -569,6 +575,7 @@ variable `tramp-methods'." ("rsh" tramp-multi-connect-rlogin "rsh %h -l %u%n") ("remsh" tramp-multi-connect-rlogin "remsh %h -l %u%n") ("ssh" tramp-multi-connect-rlogin "ssh %h -l %u%n") + ("ssht" tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n") ("su" tramp-multi-connect-su "su - %u%n") ("sudo" tramp-multi-connect-su "sudo -u %u -s -p Password:%n")) "*List of connection functions for multi-hop methods. @@ -627,14 +634,18 @@ See `tramp-methods' for a list of possibilities for METHOD." ;; Default values for non-Unices seeked (defconst tramp-completion-function-alist-ssh (unless (memq system-type '(windows-nt)) - '((tramp-parse-rhosts "/etc/hosts.equiv") - (tramp-parse-rhosts "/etc/shosts.equiv") - (tramp-parse-shosts "/etc/ssh_known_hosts") - (tramp-parse-sconfig "/etc/ssh_config") - (tramp-parse-rhosts "~/.rhosts") - (tramp-parse-rhosts "~/.shosts") - (tramp-parse-shosts "~/.ssh/known_hosts") - (tramp-parse-sconfig "~/.ssh/config"))) + '((tramp-parse-rhosts "/etc/hosts.equiv") + (tramp-parse-rhosts "/etc/shosts.equiv") + (tramp-parse-shosts "/etc/ssh_known_hosts") + (tramp-parse-sconfig "/etc/ssh_config") + (tramp-parse-shostkeys "/etc/ssh2/hostkeys") + (tramp-parse-sknownhosts "/etc/ssh2/knownhosts") + (tramp-parse-rhosts "~/.rhosts") + (tramp-parse-rhosts "~/.shosts") + (tramp-parse-shosts "~/.ssh/known_hosts") + (tramp-parse-sconfig "~/.ssh/config") + (tramp-parse-shostkeys "~/.ssh2/hostkeys") + (tramp-parse-sknownhosts "~/.ssh2/knownhosts"))) "Default list of (FUNCTION FILE) pairs to be examined for ssh methods.") ;; Default values for non-Unices seeked @@ -649,53 +660,79 @@ See `tramp-methods' for a list of possibilities for METHOD." '((tramp-parse-passwd "/etc/passwd"))) "Default list of (FUNCTION FILE) pairs to be examined for su methods.") -(defcustom tramp-completion-function-alist - (list (cons "rcp" tramp-completion-function-alist-rsh) - (cons "scp" tramp-completion-function-alist-ssh) - (cons "scp1" tramp-completion-function-alist-ssh) - (cons "scp2" tramp-completion-function-alist-ssh) - (cons "scp1_old" tramp-completion-function-alist-ssh) - (cons "scp2_old" tramp-completion-function-alist-ssh) - (cons "rsync" tramp-completion-function-alist-rsh) - (cons "remcp" tramp-completion-function-alist-rsh) - (cons "rsh" tramp-completion-function-alist-rsh) - (cons "ssh" tramp-completion-function-alist-ssh) - (cons "ssh1" tramp-completion-function-alist-ssh) - (cons "ssh2" tramp-completion-function-alist-ssh) - (cons "ssh1_old" tramp-completion-function-alist-ssh) - (cons "ssh2_old" tramp-completion-function-alist-ssh) - (cons "remsh" tramp-completion-function-alist-rsh) - (cons "telnet" tramp-completion-function-alist-telnet) - (cons "su" tramp-completion-function-alist-su) - (cons "sudo" tramp-completion-function-alist-su) - (cons "multi" nil) - (cons "scpx" tramp-completion-function-alist-ssh) - (cons "sshx" tramp-completion-function-alist-ssh) - (cons "krlogin" tramp-completion-function-alist-rsh) - (cons "plink" tramp-completion-function-alist-ssh) - (cons "plink1" tramp-completion-function-alist-ssh) - (cons "pscp" tramp-completion-function-alist-ssh) - (cons "fcp" tramp-completion-function-alist-ssh) - ) +(defvar tramp-completion-function-alist nil "*Alist of methods for remote files. This is a list of entries of the form (NAME PAIR1 PAIR2 ...). Each NAME stands for a remote access method. Each PAIR is of the form \(FUNCTION FILE). FUNCTION is responsible to extract user names and host names from FILE for completion. The following predefined FUNCTIONs exists: - * `tramp-parse-rhosts' for \"~/.rhosts\" like files, - * `tramp-parse-shosts' for \"~/.ssh/known_hosts\" like files, - * `tramp-parse-sconfig' for \"~/.ssh/config\" like files, - * `tramp-parse-hosts' for \"/etc/hosts\" like files, and - * `tramp-parse-passwd' for \"/etc/passwd\" like files. - * `tramp-parse-netrc' for \"~/.netrc\" like files. - -FUNCTION can also see a customer defined function. For more details see -the info pages." - :group 'tramp - :type '(repeat - (cons string - (choice (const nil) (repeat (list function file)))))) + * `tramp-parse-rhosts' for \"~/.rhosts\" like files, + * `tramp-parse-shosts' for \"~/.ssh/known_hosts\" like files, + * `tramp-parse-sconfig' for \"~/.ssh/config\" like files, + * `tramp-parse-shostkeys' for \"~/.ssh2/hostkeys/*\" like files, + * `tramp-parse-sknownhosts' for \"~/.ssh2/knownhosts/*\" like files, + * `tramp-parse-hosts' for \"/etc/hosts\" like files, + * `tramp-parse-passwd' for \"/etc/passwd\" like files. + * `tramp-parse-netrc' for \"~/.netrc\" like files. + +FUNCTION can also be a customer defined function. For more details see +the info pages.") + +(eval-after-load "tramp" + '(progn + (tramp-set-completion-function + "rcp" tramp-completion-function-alist-rsh) + (tramp-set-completion-function + "scp" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "scp1" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "scp2" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "scp1_old" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "scp2_old" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "rsync" tramp-completion-function-alist-rsh) + (tramp-set-completion-function + "remcp" tramp-completion-function-alist-rsh) + (tramp-set-completion-function + "rsh" tramp-completion-function-alist-rsh) + (tramp-set-completion-function + "ssh" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "ssh1" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "ssh2" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "ssh1_old" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "ssh2_old" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "remsh" tramp-completion-function-alist-rsh) + (tramp-set-completion-function + "telnet" tramp-completion-function-alist-telnet) + (tramp-set-completion-function + "su" tramp-completion-function-alist-su) + (tramp-set-completion-function + "sudo" tramp-completion-function-alist-su) + (tramp-set-completion-function + "multi" nil) + (tramp-set-completion-function + "scpx" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "sshx" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "krlogin" tramp-completion-function-alist-rsh) + (tramp-set-completion-function + "plink" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "plink1" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "pscp" tramp-completion-function-alist-ssh) + (tramp-set-completion-function + "fcp" tramp-completion-function-alist-ssh))) (defcustom tramp-rsh-end-of-line "\n" "*String used for end of line in rsh connections. @@ -1250,11 +1287,33 @@ checked via the following code: (re-search-forward \"\\\\w+\") (message \"Bytes sent: %s\\tBytes received: %s\" bytes (match-string 0)))) +In the Emacs normally running Tramp, evaluate the above code. +You can do this, for example, by pasting it into the `*scratch*' +buffer and then hitting C-j with the cursor after the last +closing parenthesis. + +If your Emacs is buggy, the sent and received numbers will be +different. In that case, you'll want to set this variable to +some number. For those people who have needed it, the value 500 +seems to have worked well. There is no way to predict what value +you need; maybe you could just experiment a bit. + Please raise a bug report via \"M-x tramp-bug\" if your system needs this variable to be set as well." :group 'tramp :type '(choice (const nil) integer)) +;; Logging in to a remote host normally requires obtaining a pty. But +;; Emacs on MacOS X has process-connection-type set to nil by default, +;; so on those systems Tramp doesn't obtain a pty. Here, we allow +;; for an override of the system default. +(defcustom tramp-process-connection-type t + "Overrides `process-connection-type' for connections from Tramp. +Tramp binds process-connection-type to the value given here before +opening a connection to a remote host." + :group 'tramp + :type '(choice (const nil) (const t) (const pty))) + ;;; Internal Variables: (defvar tramp-buffer-file-attributes nil @@ -1405,13 +1464,15 @@ some systems don't, and for them we have this shell function.") ;; The device number is returned as "-1", because there will be a virtual ;; device number set in `tramp-handle-file-attributes' (defconst tramp-perl-file-attributes "\ -$f = $ARGV[0]; +($f, $n) = @ARGV; @s = lstat($f); if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = \"\\\"$l\\\"\"; } elsif (($s[2] & 0170000) == 040000) { $l = \"t\"; } else { $l = \"nil\" }; -printf(\"(%s %u %d %d (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) -1)\\n\", -$l, $s[3], $s[4], $s[5], $s[8] >> 16 & 0xffff, $s[8] & 0xffff, +$u = ($n eq \"nil\") ? $s[4] : getpwuid($s[4]); +$g = ($n eq \"nil\") ? $s[5] : getgrgid($s[5]); +printf(\"(%s %u %s %s (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) -1)\\n\", +$l, $s[3], $u, $g, $s[8] >> 16 & 0xffff, $s[8] & 0xffff, $s[9] >> 16 & 0xffff, $s[9] & 0xffff, $s[10] >> 16 & 0xffff, $s[10] & 0xffff, $s[7], $s[2], $s[1] >> 16 & 0xffff, $s[1] & 0xffff);" "Perl script to produce output suitable for use with `file-attributes' @@ -1624,6 +1685,7 @@ on the FILENAME argument, even if VISIT was a string.") (insert-file-contents . tramp-handle-insert-file-contents) (write-region . tramp-handle-write-region) (unhandled-file-name-directory . tramp-handle-unhandled-file-name-directory) + (dired-compress-file . tramp-handle-dired-compress-file) (dired-call-process . tramp-handle-dired-call-process) (dired-recursive-delete-directory . tramp-handle-dired-recursive-delete-directory) @@ -1747,15 +1809,30 @@ Example: '((tramp-parse-sconfig \"/etc/ssh_config\") (tramp-parse-sconfig \"~/.ssh/config\")))" - (let ((v (cdr (assoc method tramp-completion-function-alist)))) - (if v (setcdr v function-list) + (let ((r function-list) + (v function-list)) + (setq tramp-completion-function-alist + (delete (assoc method tramp-completion-function-alist) + tramp-completion-function-alist)) + + (while v + ;; Remove double entries + (when (member (car v) (cdr v)) + (setcdr v (delete (car v) (cdr v)))) + ;; Check for function and file + (unless (and (functionp (nth 0 (car v))) + (file-exists-p (nth 1 (car v)))) + (setq r (delete (car v) r))) + (setq v (cdr v))) + + (when r (add-to-list 'tramp-completion-function-alist - (cons method function-list))))) + (cons method r))))) (defun tramp-get-completion-function (method) "Returns list of completion functions for METHOD. For definition of that list see `tramp-set-completion-function'." - (cdr (assoc method tramp-completion-function-alist))) + (cdr (assoc method tramp-completion-function-alist))) ;;; File Name Handler Functions: @@ -1900,7 +1977,7 @@ target of the symlink differ." (append '("") (reverse result) (list thisstep)) "/")) (setq symlink-target - (nth 0 (tramp-handle-file-attributes + (nth 0 (file-attributes (tramp-make-tramp-file-name multi-method method user host (mapconcat 'identity @@ -1979,11 +2056,10 @@ target of the symlink differ." ;; CCC: This should check for an error condition and signal failure ;; when something goes wrong. ;; Daniel Pittman -(defun tramp-handle-file-attributes (filename &optional nonnumeric) - "Like `file-attributes' for tramp files. -Optional argument NONNUMERIC means return user and group name -rather than as numbers." - (let (result) +(defun tramp-handle-file-attributes (filename &optional id-format) + "Like `file-attributes' for tramp files." + (let ((nonnumeric (and id-format (equal id-format 'string))) + result) (with-parsed-tramp-file-name filename nil (when (tramp-handle-file-exists-p filename) ;; file exists, find out stuff @@ -2097,8 +2173,8 @@ is initially created and is kept cached by the remote shell." multi-method method user host localname)) (tramp-send-command multi-method method user host - (format "tramp_file_attributes %s" - (tramp-shell-quote-argument localname))) + (format "tramp_file_attributes %s %s" + (tramp-shell-quote-argument localname) nonnumeric)) (tramp-wait-for-output) (let ((result (read (current-buffer)))) (setcar (nthcdr 8 result) @@ -2310,7 +2386,7 @@ if the remote host can't provide the modtime." (defun tramp-handle-file-symlink-p (filename) "Like `file-symlink-p' for tramp files." (with-parsed-tramp-file-name filename nil - (let ((x (car (tramp-handle-file-attributes filename)))) + (let ((x (car (file-attributes filename)))) (when (stringp x) ;; When Tramp is running on VMS, then `file-name-absolute-p' ;; might do weird things. @@ -2573,44 +2649,86 @@ and `rename'. FILENAME and NEWNAME must be absolute file names." (signal 'file-already-exists (list newname)))) (let ((t1 (tramp-tramp-file-p filename)) - (t2 (tramp-tramp-file-p newname))) + (t2 (tramp-tramp-file-p newname)) + v1-multi-method v1-method v1-user v1-host v1-localname + v2-multi-method v2-method v2-user v2-host v2-localname) + ;; Check which ones of source and target are Tramp files. + ;; We cannot invoke `with-parsed-tramp-file-name'; + ;; it fails if the file isn't a Tramp file name. + (if t1 + (with-parsed-tramp-file-name filename l + (setq v1-multi-method l-multi-method + v1-method l-method + v1-user l-user + v1-host l-host + v1-localname l-localname)) + (setq v1-localname filename)) + (if t2 + (with-parsed-tramp-file-name newname l + (setq v2-multi-method l-multi-method + v2-method l-method + v2-user l-user + v2-host l-host + v2-localname l-localname)) + (setq v2-localname newname)) + (cond + ;; Both are Tramp files. ((and t1 t2) - ;; Both are Tramp files. - (with-parsed-tramp-file-name filename v1 - (with-parsed-tramp-file-name newname v2 - ;; Check if we can use a shortcut. - (if (and (equal v1-multi-method v2-multi-method) - (equal v1-method v2-method) - (equal v1-host v2-host) - (equal v1-user v2-user)) - ;; Shortcut: if method, host, user are the same for both - ;; files, we invoke `cp' or `mv' on the remote host - ;; directly. - (tramp-do-copy-or-rename-file-directly - op v1-multi-method v1-method v1-user v1-host - v1-localname v2-localname keep-date) - ;; The shortcut was not possible. So we copy the - ;; file first. If the operation was `rename', we go - ;; back and delete the original file (if the copy was - ;; successful). The approach is simple-minded: we - ;; create a new buffer, insert the contents of the - ;; source file into it, then write out the buffer to - ;; the target file. The advantage is that it doesn't - ;; matter which filename handlers are used for the - ;; source and target file. - - ;; CCC: If both source and target are Tramp files, - ;; and both are using the same copy-program, then we - ;; can invoke rcp directly. Note that - ;; default-directory should point to a local - ;; directory if we want to invoke rcp. - (tramp-do-copy-or-rename-via-buffer - op filename newname keep-date))))) + (cond + ;; Shortcut: if method, host, user are the same for both + ;; files, we invoke `cp' or `mv' on the remote host + ;; directly. + ((and (equal v1-multi-method v2-multi-method) + (equal v1-method v2-method) + (equal v1-user v2-user) + (equal v1-host v2-host)) + (tramp-do-copy-or-rename-file-directly + op v1-multi-method v1-method v1-user v1-host + v1-localname v2-localname keep-date)) + ;; If both source and target are Tramp files, + ;; both are using the same copy-program, then we + ;; can invoke rcp directly. Note that + ;; default-directory should point to a local + ;; directory if we want to invoke rcp. + ((and (not v1-multi-method) + (not v2-multi-method) + (equal v1-method v2-method) + (tramp-method-out-of-band-p + v1-multi-method v1-method v1-user v1-host) + (not (string-match "\\([^#]*\\)#\\(.*\\)" v1-host)) + (not (string-match "\\([^#]*\\)#\\(.*\\)" v2-host))) + (tramp-do-copy-or-rename-file-out-of-band + op filename newname keep-date)) + ;; No shortcut was possible. So we copy the + ;; file first. If the operation was `rename', we go + ;; back and delete the original file (if the copy was + ;; successful). The approach is simple-minded: we + ;; create a new buffer, insert the contents of the + ;; source file into it, then write out the buffer to + ;; the target file. The advantage is that it doesn't + ;; matter which filename handlers are used for the + ;; source and target file. + (t + (tramp-do-copy-or-rename-via-buffer + op filename newname keep-date)))) + + ;; One file is a Tramp file, the other one is local. ((or t1 t2) - ;; Use the generic method via a Tramp buffer. - (tramp-do-copy-or-rename-via-buffer op filename newname keep-date)) + ;; If the Tramp file has an out-of-band method, the corresponding + ;; copy-program can be invoked. + (if (and (not v1-multi-method) + (not v2-multi-method) + (or (tramp-method-out-of-band-p + v1-multi-method v1-method v1-user v1-host) + (tramp-method-out-of-band-p + v2-multi-method v2-method v2-user v2-host))) + (tramp-do-copy-or-rename-file-out-of-band + op filename newname keep-date) + ;; Use the generic method via a Tramp buffer. + (tramp-do-copy-or-rename-via-buffer op filename newname keep-date))) + (t ;; One of them must be a Tramp file. (error "Tramp implementation says this cannot happen"))))) @@ -2621,8 +2739,9 @@ and `rename'. FILENAME and NEWNAME must be absolute file names." First arg OP is either `copy' or `rename' and indicates the operation. FILENAME is the source file, NEWNAME the target file. KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME." - (let ((trampbuf (get-buffer-create "*tramp output*"))) - (when keep-date + (let ((trampbuf (get-buffer-create "*tramp output*")) + (modtime (nth 5 (file-attributes filename)))) + (when (and keep-date (or (null modtime) (equal modtime '(0 0)))) (tramp-message 1 (concat "Warning: cannot preserve file time stamp" " with inline copying across machines"))) @@ -2633,7 +2752,12 @@ KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME." ;; `jka-compr-inhibit' to t. (let ((coding-system-for-write 'binary) (jka-compr-inhibit t)) - (write-region (point-min) (point-max) newname))) + (write-region (point-min) (point-max) newname)) + ;; KEEP-DATE handling. + (when (and keep-date + (not (null modtime)) + (not (equal modtime '(0 0)))) + (tramp-touch newname modtime))) ;; If the operation was `rename', delete the original file. (unless (eq op 'copy) (delete-file filename)))) @@ -2663,13 +2787,112 @@ If KEEP-DATE is non-nil, preserve the time stamp when copying." "Copying directly failed, see buffer `%s' for details." (buffer-name))))) -(defun tramp-do-copy-or-rename-file-one-local - (op filename newname keep-date) +(defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date) "Invoke rcp program to copy. One of FILENAME and NEWNAME must be a Tramp name, the other must be a local filename. The method used must be an out-of-band method." - ;; CCC - ) + (let ((trampbuf (get-buffer-create "*tramp output*")) + (t1 (tramp-tramp-file-p filename)) + (t2 (tramp-tramp-file-p newname)) + v1-multi-method v1-method v1-user v1-host v1-localname + v2-multi-method v2-method v2-user v2-host v2-localname + method copy-program copy-args source target) + + ;; Check which ones of source and target are Tramp files. + ;; We cannot invoke `with-parsed-tramp-file-name'; + ;; it fails if the file isn't a Tramp file name. + (if t1 + (with-parsed-tramp-file-name filename l + (setq v1-multi-method l-multi-method + v1-method l-method + v1-user l-user + v1-host l-host + v1-localname l-localname + method (tramp-find-method + v1-multi-method v1-method v1-user v1-host) + copy-program (tramp-get-method-parameter + v1-multi-method method + v1-user v1-host 'tramp-copy-program) + copy-args (tramp-get-method-parameter + v1-multi-method method + v1-user v1-host 'tramp-copy-args))) + (setq v1-localname filename)) + + (if t2 + (with-parsed-tramp-file-name newname l + (setq v2-multi-method l-multi-method + v2-method l-method + v2-user l-user + v2-host l-host + v2-localname l-localname + method (tramp-find-method + v2-multi-method v2-method v2-user v2-host) + copy-program (tramp-get-method-parameter + v2-multi-method method + v2-user v2-host 'tramp-copy-program) + copy-args (tramp-get-method-parameter + v2-multi-method method + v2-user v2-host 'tramp-copy-args))) + (setq v2-localname newname)) + + ;; The following should be changed. We need a more general + ;; mechanism to parse extra host args. + (if (not t1) + (setq source v1-localname) + (when (string-match "\\([^#]*\\)#\\(.*\\)" v1-host) + (setq copy-args (cons "-P" (cons (match-string 2 v1-host) copy-args))) + (setq v1-host (match-string 1 v1-host))) + (setq source + (tramp-make-copy-program-file-name + v1-user v1-host + (tramp-shell-quote-argument v1-localname)))) + + (if (not t2) + (setq target v2-localname) + (when (string-match "\\([^#]*\\)#\\(.*\\)" v2-host) + (setq copy-args (cons "-P" (cons (match-string 2 v2-host) copy-args))) + (setq v2-host (match-string 1 v2-host))) + (setq target + (tramp-make-copy-program-file-name + v2-user v2-host + (tramp-shell-quote-argument v2-localname)))) + + ;; Handle keep-date argument + (when keep-date + (if t1 + (setq copy-args + (cons (tramp-get-method-parameter + v1-multi-method method + v1-user v1-host 'tramp-copy-keep-date-arg) + copy-args)) + (setq copy-args + (cons (tramp-get-method-parameter + v2-multi-method method + v2-user v2-host 'tramp-copy-keep-date-arg) + copy-args)))) + + (setq copy-args (append copy-args (list source target))) + + ;; Use rcp-like program for file transfer. + (tramp-message + 5 "Transferring %s to file %s..." filename newname) + (save-excursion (set-buffer trampbuf) (erase-buffer)) + (unless (equal + 0 + (apply #'call-process copy-program + nil trampbuf nil copy-args)) + (pop-to-buffer trampbuf) + (error + (concat + "tramp-do-copy-or-rename-file-out-of-band: `%s' didn't work, " + "see buffer `%s' for details") + copy-program trampbuf)) + (tramp-message + 5 "Transferring %s to file %s...done" filename newname) + + ;; If the operation was `rename', delete the original file. + (unless (eq op 'copy) + (delete-file filename)))) ;; mkdir (defun tramp-handle-make-directory (dir &optional parents) @@ -2732,7 +2955,6 @@ This is like `dired-recursive-delete-directory' for tramp files." (and (tramp-handle-file-exists-p filename) (error "Failed to recusively delete %s" filename)))) - (defun tramp-handle-dired-call-process (program discard &rest arguments) "Like `dired-call-process' for tramp files." (with-parsed-tramp-file-name default-directory nil @@ -2754,6 +2976,59 @@ This is like `dired-recursive-delete-directory' for tramp files." (tramp-send-command-and-check multi-method method user host nil) (tramp-send-command multi-method method user host "cd") (tramp-wait-for-output))))) + +(defun tramp-handle-dired-compress-file (file &rest ok-flag) + "Like `dired-compress-file' for tramp files." + ;; OK-FLAG is valid for XEmacs only, but not implemented. + ;; Code stolen mainly from dired-aux.el. + (with-parsed-tramp-file-name file nil + (save-excursion + (let ((suffixes + (if (not (featurep 'xemacs)) + ;; Emacs case + (symbol-value 'dired-compress-file-suffixes) + ;; XEmacs has `dired-compression-method-alist', which is + ;; transformed into `dired-compress-file-suffixes' structure. + (mapcar + '(lambda (x) + (list (concat (regexp-quote (nth 1 x)) "\\'") + nil + (mapconcat 'identity (nth 3 x) " "))) + (symbol-value 'dired-compression-method-alist)))) + suffix) + ;; See if any suffix rule matches this file name. + (while suffixes + (let (case-fold-search) + (if (string-match (car (car suffixes)) localname) + (setq suffix (car suffixes) suffixes nil)) + (setq suffixes (cdr suffixes)))) + + (cond ((file-symlink-p file) + nil) + ((and suffix (nth 2 suffix)) + ;; We found an uncompression rule. + (message "Uncompressing %s..." file) + (when (zerop (tramp-send-command-and-check + multi-method method user host + (concat (nth 2 suffix) " " localname))) + (message "Uncompressing %s...done" file) + (dired-remove-file file) + (string-match (car suffix) file) + (concat (substring file 0 (match-beginning 0))))) + (t + ;; We don't recognize the file as compressed, so compress it. + ;; Try gzip. + (message "Compressing %s..." file) + (when (zerop (tramp-send-command-and-check + multi-method method user host + (concat "gzip -f " localname))) + (message "Compressing %s...done" file) + (dired-remove-file file) + (cond ((file-exists-p (concat file ".gz")) + (concat file ".gz")) + ((file-exists-p (concat file ".z")) + (concat file ".z")) + (t nil))))))))) ;; Pacify byte-compiler. The function is needed on XEmacs only. I'm ;; not sure at all that this is the right way to do it, but let's hope @@ -2948,17 +3223,40 @@ the result will be a local, non-Tramp, filename." ;; Remote commands. +(defvar tramp-async-proc nil + "Global variable keeping asyncronous process object. +Used in `tramp-handle-shell-command'") + (defun tramp-handle-shell-command (command &optional output-buffer error-buffer) "Like `shell-command' for tramp files. This will break if COMMAND prints a newline, followed by the value of `tramp-end-of-output', followed by another newline." + ;; Asynchronous processes are far from being perfect. But it works at least + ;; for `find-grep-dired' and `find-name-dired' in Emacs 21.4. (if (tramp-tramp-file-p default-directory) (with-parsed-tramp-file-name default-directory nil - (let (status) - (when (string-match "&[ \t]*\\'" command) - (error "Tramp doesn't grok asynchronous shell commands, yet")) -;; (when error-buffer -;; (error "Tramp doesn't grok optional third arg ERROR-BUFFER, yet")) + (let ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command)) + status) + (unless output-buffer + (setq output-buffer + (get-buffer-create + (if asynchronous + "*Async Shell Command*" + "*Shell Command Output*"))) + (set-buffer output-buffer) + (erase-buffer)) + (unless (bufferp output-buffer) + (setq output-buffer (current-buffer))) + (set-buffer output-buffer) + ;; Tramp doesn't handle the asynchronous case by an asynchronous + ;; process. Instead of, another asynchronous process is opened + ;; which gets the output of the (synchronous) Tramp process + ;; via process-filter. ERROR-BUFFER is disabled. + (when asynchronous + (setq command (substring command 0 (match-beginning 0)) + error-buffer nil + tramp-async-proc (start-process (buffer-name output-buffer) + output-buffer "cat"))) (save-excursion (tramp-barf-unless-okay multi-method method user host @@ -2966,23 +3264,39 @@ This will break if COMMAND prints a newline, followed by the value of nil 'file-error "tramp-handle-shell-command: Couldn't `cd %s'" (tramp-shell-quote-argument localname)) + ;; Define the process filter + (when asynchronous + (set-process-filter + (get-buffer-process + (tramp-get-buffer multi-method method user host)) + '(lambda (process string) + ;; Write the output into the Tramp Process + (save-current-buffer + (set-buffer (process-buffer process)) + (goto-char (point-max)) + (insert string)) + ;; Hand-over output to asynchronous process. + (let ((end + (string-match + (regexp-quote tramp-end-of-output) string))) + (when end + (setq string + (substring string 0 (1- (match-beginning 0))))) + (process-send-string tramp-async-proc string) + (when end + (set-process-filter process nil) + (process-send-eof tramp-async-proc)))))) + ;; Send the command (tramp-send-command multi-method method user host (if error-buffer (format "( %s ) 2>/tmp/tramp.$$.err; tramp_old_status=$?" command) - (format "%s ;tramp_old_status=$?" command))) - ;; This will break if the shell command prints "/////" - ;; somewhere. Let's just hope for the best... - (tramp-wait-for-output)) - (unless output-buffer - (setq output-buffer (get-buffer-create "*Shell Command Output*")) - (set-buffer output-buffer) - (erase-buffer)) - (unless (bufferp output-buffer) - (setq output-buffer (current-buffer))) - (set-buffer output-buffer) - (insert-buffer (tramp-get-buffer multi-method method user host)) + (format "%s; tramp_old_status=$?" command))) + (unless asynchronous + (tramp-wait-for-output))) + (unless asynchronous + (insert-buffer (tramp-get-buffer multi-method method user host))) (when error-buffer (save-excursion (unless (bufferp error-buffer) @@ -2997,17 +3311,19 @@ This will break if COMMAND prints a newline, followed by the value of multi-method method user host "rm -f /tmp/tramp.$$.err"))) (save-excursion (tramp-send-command multi-method method user host "cd") - (tramp-wait-for-output) + (unless asynchronous + (tramp-wait-for-output)) (tramp-send-command multi-method method user host (concat "tramp_set_exit_status $tramp_old_status;" " echo tramp_exit_status $?")) - (tramp-wait-for-output) - (goto-char (point-max)) - (unless (search-backward "tramp_exit_status " nil t) - (error "Couldn't find exit status of `%s'" command)) - (skip-chars-forward "^ ") - (setq status (read (current-buffer)))) + (unless asynchronous + (tramp-wait-for-output) + (goto-char (point-max)) + (unless (search-backward "tramp_exit_status " nil t) + (error "Couldn't find exit status of `%s'" command)) + (skip-chars-forward "^ ") + (setq status (read (current-buffer))))) (unless (zerop (buffer-size)) (display-buffer output-buffer)) status)) @@ -3028,16 +3344,7 @@ This will break if COMMAND prints a newline, followed by the value of (defun tramp-handle-file-local-copy (filename) "Like `file-local-copy' for tramp files." (with-parsed-tramp-file-name filename nil - (let ((output-buf (get-buffer-create "*tramp output*")) - (tramp-buf (tramp-get-buffer multi-method method user host)) - (copy-program (tramp-get-copy-program - multi-method - (tramp-find-method multi-method method user host) - user host)) - (copy-args (tramp-get-copy-args - multi-method - (tramp-find-method multi-method method user host) - user host)) + (let ((tramp-buf (tramp-get-buffer multi-method method user host)) ;; We used to bind the following as late as possible. ;; loc-enc and loc-dec were bound directly before the if ;; statement that checks them. But the functions @@ -3053,37 +3360,12 @@ This will break if COMMAND prints a newline, followed by the value of (error "Cannot make local copy of non-existing file `%s'" filename)) (setq tmpfil (tramp-make-temp-file)) - (cond (copy-program - ;; The following should be changed. We need a more general - ;; mechanism to parse extra host args. - (when (string-match "\\([^#]*\\)#\\(.*\\)" host) - (setq copy-args (cons "-p" (cons (match-string 2 host) - rsh-args))) - (setq host (match-string 1 host))) - ;; Use rcp-like program for file transfer. - (tramp-message-for-buffer - multi-method method user host - 5 "Fetching %s to tmp file %s..." filename tmpfil) - (save-excursion (set-buffer output-buf) (erase-buffer)) - (unless (equal - 0 - (apply #'call-process - copy-program - nil output-buf nil - (append copy-args - (list - (tramp-make-copy-program-file-name - user host - (tramp-shell-quote-argument localname)) - tmpfil)))) - (pop-to-buffer output-buf) - (error - (concat "tramp-handle-file-local-copy: `%s' didn't work, " - "see buffer `%s' for details") - copy-program output-buf)) - (tramp-message-for-buffer - multi-method method user host - 5 "Fetching %s to tmp file %s...done" filename tmpfil)) + + + (cond ((tramp-method-out-of-band-p multi-method method user host) + ;; `copy-file' handles out-of-band methods + (copy-file filename tmpfil t t)) + ((and rem-enc rem-dec) ;; Use inline encoding for file transfer. (save-excursion @@ -3212,14 +3494,6 @@ This will break if COMMAND prints a newline, followed by the value of (error "File not overwritten"))) (with-parsed-tramp-file-name filename nil (let ((curbuf (current-buffer)) - (copy-program (tramp-get-copy-program - multi-method - (tramp-find-method multi-method method user host) - user host)) - (copy-args (tramp-get-copy-args - multi-method - (tramp-find-method multi-method method user host) - user host)) (rem-enc (tramp-get-remote-encoding multi-method method user host)) (rem-dec (tramp-get-remote-decoding multi-method method user host)) (loc-enc (tramp-get-local-encoding multi-method method user host)) @@ -3254,44 +3528,10 @@ This will break if COMMAND prints a newline, followed by the value of ;; decoding command must be specified. However, if the method ;; _also_ specifies an encoding function, then that is used for ;; encoding the contents of the tmp file. - (cond (copy-program - ;; The following should be changed. We need a more general - ;; mechanism to parse extra host args. - (when (string-match "\\([^#]*\\)#\\(.*\\)" host) - (setq copy-args (cons "-p" (cons (match-string 2 host) - rsh-args))) - (setq host (match-string 1 host))) - - ;; use rcp-like program for file transfer - (let ((argl (append copy-args - (list - tmpfil - (tramp-make-copy-program-file-name - user host - (tramp-shell-quote-argument localname)))))) - (tramp-message-for-buffer - multi-method method user host - 6 "Writing tmp file using `%s'..." copy-program) - (save-excursion (set-buffer trampbuf) (erase-buffer)) - (when tramp-debug-buffer - (save-excursion - (set-buffer (tramp-get-debug-buffer multi-method - method user host)) - (goto-char (point-max)) - (tramp-insert-with-face - 'bold (format "$ %s %s\n" copy-program - (mapconcat 'identity argl " "))))) - (unless (equal 0 - (apply #'call-process - copy-program nil trampbuf nil argl)) - (pop-to-buffer trampbuf) - (error - "Cannot write region to file `%s', command `%s' failed" - filename copy-program)) - (tramp-message-for-buffer - multi-method method user host - 6 "Transferring file using `%s'...done" - copy-program))) + (cond ((tramp-method-out-of-band-p multi-method method user host) + ;; `copy-file' handles out-of-band methods + (copy-file tmpfil filename t t)) + ((and rem-enc rem-dec) ;; Use inline file transfer (let ((tmpbuf (get-buffer-create " *tramp file transfer*"))) @@ -3306,7 +3546,8 @@ This will break if COMMAND prints a newline, followed by the value of (progn (tramp-message-for-buffer multi-method method user host - 6 "Encoding region using function...") + 6 "Encoding region using function `%s'..." + (symbol-name loc-enc)) (insert-file-contents-literally tmpfil) ;; CCC. The following `let' is a workaround for ;; the base64.el that comes with pgnus-0.84. If @@ -3672,11 +3913,12 @@ necessary anymore." ;; shouldn't have partial tramp file name syntax. Maybe another variable should ;; be introduced overwriting this check in such cases. Or we change tramp ;; file name syntax in order to avoid ambiguities, like in XEmacs ... -;; In case of XEmacs it can be always true (and wouldn't be necessary). +;; In case of non unified file names it can be always true (and wouldn't be +;; necessary, because there are different regexp). (defun tramp-completion-mode (file) "Checks whether method / user name / host name completion is active." (cond - ((featurep 'xemacs) t) + ((not tramp-unified-filenames) t) ((string-match "^/.*:.*:$" file) nil) ((string-match (concat tramp-prefix-regexp @@ -3684,11 +3926,21 @@ necessary anymore." file) (member (match-string 1 file) (mapcar 'car tramp-methods))) ((or (equal last-input-event 'tab) + ;; Emacs (and (integerp last-input-event) (not (event-modifiers last-input-event)) (or (char-equal last-input-event ?\?) (char-equal last-input-event ?\t) ; handled by 'tab already? - (char-equal last-input-event ?\ )))) + (char-equal last-input-event ?\ ))) + ;; XEmacs + (and (featurep 'xemacs) + (not (event-modifiers last-input-event)) + (or (char-equal + (funcall 'event-to-character last-input-event) ?\?) + (char-equal + (funcall 'event-to-character last-input-event) ?\t) + (char-equal + (funcall 'event-to-character last-input-event) ?\ )))) t))) (defun tramp-completion-handle-file-exists-p (filename) @@ -4037,6 +4289,35 @@ User is always nil." (forward-line 1)) result)) +(defun tramp-parse-shostkeys (dirname) + "Return a list of (user host) tuples allowed to access. +User is always nil." + + (let ((regexp (concat "^key_[0-9]+_\\(" tramp-host-regexp "\\)\\.pub$")) + (files (when (file-directory-p dirname) (directory-files dirname))) + result) + + (while files + (when (string-match regexp (car files)) + (push (list nil (match-string 1 (car files))) result)) + (setq files (cdr files))) + result)) + +(defun tramp-parse-sknownhosts (dirname) + "Return a list of (user host) tuples allowed to access. +User is always nil." + + (let ((regexp (concat "^\\(" tramp-host-regexp + "\\)\\.ssh-\\(dss\\|rsa\\)\\.pub$")) + (files (when (file-directory-p dirname) (directory-files dirname))) + result) + + (while files + (when (string-match regexp (car files)) + (push (list nil (match-string 1 (car files))) result)) + (setq files (cdr files))) + result)) + (defun tramp-parse-hosts (filename) "Return a list of (user host) tuples allowed to access. User is always nil." @@ -4193,14 +4474,29 @@ hosts, or files, disagree." (or switch "") (tramp-shell-quote-argument localname2)))))) +(defun tramp-touch (file time) + "Set the last-modified timestamp of the given file. +TIME is an Emacs internal time value as returned by `current-time'." + (let ((touch-time (format-time-string "%Y%m%d%H%M.%S" time))) + (with-parsed-tramp-file-name file nil + (let ((buf (tramp-get-buffer multi-method method user host))) + (unless (zerop (tramp-send-command-and-check + multi-method method user host + (format "touch -t %s %s" + touch-time + localname))) + (pop-to-buffer buf) + (error "tramp-touch: touch failed, see buffer `%s' for details" + buf)))))) + (defun tramp-buffer-name (multi-method method user host) "A name for the connection buffer for USER at HOST using METHOD." (if multi-method (tramp-buffer-name-multi-method "tramp" multi-method method user host) (let ((method (tramp-find-method multi-method method user host))) (if user - (format "*tramp/%s %s@%s*" method user host)) - (format "*tramp/%s %s*" method host)))) + (format "*tramp/%s %s@%s*" method user host) + (format "*tramp/%s %s*" method host))))) (defun tramp-buffer-name-multi-method (prefix multi-method method user host) "A name for the multi method connection buffer. @@ -4402,7 +4698,8 @@ file exists and nonzero exit status otherwise." 9 "Setting remote shell prompt...done") ) (t (tramp-message 5 "Remote `%s' groks tilde expansion, good" - (tramp-get-remote-sh multi-method method user host)))))) + (tramp-get-method-parameter + multi-method method user host 'tramp-remote-sh)))))) (defun tramp-check-ls-command (multi-method method user host cmd) "Checks whether the given `ls' executable groks `-n'. @@ -4468,11 +4765,6 @@ Returns nil if none was found, else the command is returned." (defun tramp-action-password (p multi-method method user host) "Query the user for a password." (let ((pw-prompt (match-string 0))) - (when (tramp-method-out-of-band-p multi-method method user host) - (kill-process (get-buffer-process (current-buffer))) - (error (concat "Out of band method `%s' not applicable " - "for remote shell asking for a password") - method)) (tramp-message 9 "Sending password") (tramp-enter-password p pw-prompt))) @@ -4583,6 +4875,7 @@ The terminal type can be configured with `tramp-terminal-type'." p multi-method method user host actions) nil))) (unless (eq exit 'ok) + (tramp-clear-passwd user host) (error "Login failed")))) ;; For multi-actions. @@ -4618,6 +4911,7 @@ The terminal type can be configured with `tramp-terminal-type'." (tramp-process-one-multi-action p method user host actions) nil))) (unless (eq exit 'ok) + (tramp-clear-passwd user host) (error "Login failed")))) ;; Functions to execute when we have seen the remote shell prompt but @@ -4686,15 +4980,15 @@ Maybe the different regular expressions need to be tuned. (p (apply 'start-process (tramp-buffer-name multi-method method user host) (tramp-get-buffer multi-method method user host) - (tramp-get-login-program + (tramp-get-method-parameter multi-method (tramp-find-method multi-method method user host) - user host) + user host 'tramp-login-program) host - (tramp-get-login-args + (tramp-get-method-parameter multi-method (tramp-find-method multi-method method user host) - user host))) + user host 'tramp-login-args))) (found nil) (pw nil)) (process-kill-without-query p) @@ -4743,18 +5037,18 @@ arguments, and xx will be used as the host name to connect to. (let ((process-environment (copy-sequence process-environment)) (bufnam (tramp-buffer-name multi-method method user host)) (buf (tramp-get-buffer multi-method method user host)) - (login-program (tramp-get-login-program + (login-program (tramp-get-method-parameter multi-method (tramp-find-method multi-method method user host) - user host)) - (login-args (tramp-get-login-args + user host 'tramp-login-program)) + (login-args (tramp-get-method-parameter multi-method (tramp-find-method multi-method method user host) - user host))) + user host 'tramp-login-args))) ;; The following should be changed. We need a more general ;; mechanism to parse extra host args. (when (string-match "\\([^#]*\\)#\\(.*\\)" host) - (setq login-args (cons "-p" (cons (match-string 2 host) rsh-args))) + (setq login-args (cons "-p" (cons (match-string 2 host) login-args))) (setq host (match-string 1 host))) (setenv "TERM" tramp-terminal-type) (let* ((default-directory (tramp-temporary-file-directory)) @@ -4818,17 +5112,17 @@ prompt than you do, so it is not at all unlikely that the variable (p (apply 'start-process (tramp-buffer-name multi-method method user host) (tramp-get-buffer multi-method method user host) - (tramp-get-login-program + (tramp-get-method-parameter multi-method (tramp-find-method multi-method method user host) - user host) + user host 'tramp-login-program) (mapcar (lambda (x) (format-spec x `((?u . ,(or user "root"))))) - (tramp-get-login-args + (tramp-get-method-parameter multi-method (tramp-find-method multi-method method user host) - user host)))) + user host 'tramp-login-args)))) (found nil) (pw nil)) (process-kill-without-query p) @@ -5054,11 +5348,13 @@ Uses PROMPT as a prompt and sends the password to process P." (erase-buffer) (process-send-string p (concat pw - (tramp-get-password-end-of-line - tramp-current-multi-method - tramp-current-method - tramp-current-user - tramp-current-host))))) + (or (tramp-get-method-parameter + tramp-current-multi-method + tramp-current-method + tramp-current-user + tramp-current-host + 'tramp-password-end-of-line) + tramp-default-password-end-of-line))))) ;; HHH: Not Changed. This might handle the case where USER is not ;; given in the "File name" very poorly. Then, the local @@ -5101,13 +5397,15 @@ to set up. METHOD, USER and HOST specify the connection." (tramp-send-command-internal multi-method method user host (format "exec env 'ENV=' 'PS1=$ ' %s" - (tramp-get-remote-sh multi-method method user host)) + (tramp-get-method-parameter + multi-method method user host 'tramp-remote-sh)) (format "remote `%s' to come up" - (tramp-get-remote-sh multi-method method user host))) + (tramp-get-method-parameter + multi-method method user host 'tramp-remote-sh))) (tramp-barf-if-no-shell-prompt p 30 "Remote `%s' didn't come up. See buffer `%s' for details" - (tramp-get-remote-sh multi-method method user host) + (tramp-get-method-parameter multi-method method user host 'tramp-remote-sh) (buffer-name)) (tramp-message 8 "Setting up remote shell environment") (tramp-discard-garbage-erase-buffer p multi-method method user host) @@ -5287,13 +5585,10 @@ locale to C and sets up the remote shell search path." multi-method method user host (concat "tramp_file_attributes () {\n" tramp-remote-perl - " -e '" tramp-perl-file-attributes "' $1 2>/dev/null\n" + " -e '" tramp-perl-file-attributes "' $1 $2 2>/dev/null\n" "}")) (tramp-wait-for-output) - (unless (tramp-get-copy-program - multi-method - (tramp-find-method multi-method method user host) - user host) + (unless (tramp-method-out-of-band-p multi-method method user host) (tramp-message 5 "Sending the Perl `mime-encode' implementations.") (tramp-send-string multi-method method user host @@ -5332,10 +5627,7 @@ locale to C and sets up the remote shell search path." (tramp-set-connection-property "ln" ln multi-method method user host))) (erase-buffer) ;; Find the right encoding/decoding commands to use. - (unless (tramp-get-copy-program - multi-method - (tramp-find-method multi-method method user host) - user host) + (unless (tramp-method-out-of-band-p multi-method method user host) (tramp-find-inline-encoding multi-method method user host)) ;; If encoding/decoding command are given, test to see if they work. ;; CCC: Maybe it would be useful to run the encoder both locally and @@ -5548,11 +5840,12 @@ connection if a previous connection has died for some reason." (unless (and p (processp p) (memq (process-status p) '(run open))) (when (and p (processp p)) (delete-process p)) - (funcall (tramp-get-connection-function - multi-method - (tramp-find-method multi-method method user host) - user host) - multi-method method user host)))) + (let ((process-connection-type tramp-process-connection-type)) + (funcall (tramp-get-method-parameter + multi-method + (tramp-find-method multi-method method user host) + user host 'tramp-connection-function) + multi-method method user host))))) (defun tramp-send-command (multi-method method user host command &optional noerase neveropen) @@ -6035,10 +6328,10 @@ If both MULTI-METHOD and METHOD are nil, do a lookup in "Return t if this is an out-of-band method, nil otherwise. It is important to check for this condition, since it is not possible to enter a password for the `tramp-copy-program'." - (tramp-get-copy-program + (tramp-get-method-parameter multi-method (tramp-find-method multi-method method user host) - user host)) + user host 'tramp-copy-program)) ;; Variables local to connection. @@ -6117,65 +6410,19 @@ If the value is not set for the connection, return `default'" (tramp-get-connection-property "local-decoding" nil multi-method method user host)) - - -(defun tramp-get-connection-function (multi-method method user host) - (second (or (assoc 'tramp-connection-function - (assoc (tramp-find-method multi-method method user host) - tramp-methods)) - (error "Method `%s' didn't specify a connection function" - (or multi-method method))))) - -(defun tramp-get-remote-sh (multi-method method user host) - (second (or (assoc 'tramp-remote-sh - (assoc (tramp-find-method multi-method method user host) - tramp-methods)) - (error "Method `%s' didn't specify a remote shell" - (or multi-method method))))) - -(defun tramp-get-login-program (multi-method method user host) - (second (or (assoc 'tramp-login-program - (assoc (tramp-find-method multi-method method user host) - tramp-methods)) - (error "Method `%s' didn't specify a login program" - (or multi-method method))))) - -(defun tramp-get-login-args (multi-method method user host) - (second (or (assoc 'tramp-login-args - (assoc (tramp-find-method multi-method method user host) - tramp-methods)) - (error "Method `%s' didn't specify login args" - (or multi-method method))))) - -(defun tramp-get-copy-program (multi-method method user host) - (second (or (assoc 'tramp-copy-program - (assoc (tramp-find-method multi-method method user host) - tramp-methods)) - (error "Method `%s' didn't specify a copy program" - (or multi-method method))))) - -(defun tramp-get-copy-args (multi-method method user host) - (second (or (assoc 'tramp-copy-args - (assoc (tramp-find-method multi-method method user host) - tramp-methods)) - (error "Method `%s' didn't specify copy args" - (or multi-method method))))) - -(defun tramp-get-copy-keep-date-arg (multi-method method user host) - (second (or (assoc 'tramp-copy-keep-date-arg - (assoc (tramp-find-method multi-method method user host) - tramp-methods)) - (error "Method `%s' didn't specify `keep-date' arg for tramp" - (or multi-method method))))) - -(defun tramp-get-password-end-of-line (multi-method method user host) - (let ((entry (assoc 'tramp-password-end-of-line +(defun tramp-get-method-parameter (multi-method method user host param) + "Return the method parameter PARAM. +If the `tramp-methods' entry does not exist, use the variable PARAM +as default." + (unless (boundp param) + (error "Non-existing method parameter `%s'" param)) + (let ((entry (assoc param (assoc (tramp-find-method multi-method method user host) tramp-methods)))) - (unless entry - (error "Method `%s' didn't specify `password-end-of-line' arg for tramp" - (or multi-method method))) - (or (second entry) tramp-default-password-end-of-line))) + (if entry + (second entry) + (symbol-value param)))) + ;; Auto saving to a special directory. @@ -6251,10 +6498,28 @@ this is the function `temp-directory'." (defun tramp-read-passwd (prompt) "Read a password from user (compat function). -Invokes `read-passwd' if that is defined, else `ange-ftp-read-passwd'." - (apply - (if (fboundp 'read-passwd) #'read-passwd #'ange-ftp-read-passwd) - (list prompt))) +Invokes `password-read' if available, `read-passwd' else." + (if (functionp 'password-read) + (let* ((user (or tramp-current-user (user-login-name))) + (host (or tramp-current-host (system-name))) + (key (concat user "@" host)) + (password (apply #'password-read (list prompt key)))) + (apply #'password-cache-add (list key password)) + password) + (read-passwd prompt))) + +(defun tramp-clear-passwd (&optional user host) + "Clear password cache for connection related to current-buffer." + (interactive) + (let ((filename (or buffer-file-name list-buffers-directory ""))) + (when (and (functionp 'password-cache-remove) + (or (and user host) (tramp-tramp-file-p filename))) + (let* ((v (when (tramp-tramp-file-p filename) + (tramp-dissect-file-name filename))) + (luser (or user (tramp-file-name-user v) (user-login-name))) + (lhost (or host (tramp-file-name-host v) (system-name))) + (key (concat luser "@" lhost))) + (apply #'password-cache-remove (list key)))))) (defun tramp-time-diff (t1 t2) "Return the difference between the two times, in seconds. @@ -6626,6 +6891,7 @@ report. ;; ** Enhance variables for debug. ;; ** Implement "/multi:" completion. ;; ** Add a learning mode for completion. Make results persistent. +;; * Allow out-of-band methods as _last_ multi-hop. ;; Functions for file-name-handler-alist: ;; diff-latest-backup-file -- in diff.el @@ -6642,4 +6908,5 @@ report. ;; unhandled-file-name-directory ;; vc-registered +;;; arch-tag: 3a21a994-182b-48fa-b0cd-c1d9fede424a ;;; tramp.el ends here diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index f741da8275..b3223d7a46 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -30,7 +30,7 @@ ;; are auto-frobbed from configure.ac, so you should edit that file and run ;; "autoconf && ./configure" to change them. -(defconst tramp-version "2.0.36" +(defconst tramp-version "2.0.39" "This version of Tramp.") (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" @@ -38,4 +38,5 @@ (provide 'trampver) +;;; arch-tag: 443576ca-f8f1-4bb1-addc-5c70861e93b1 ;;; trampver.el ends here diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el index 4c701b48ac..3f004b8864 100644 --- a/lisp/net/webjump.el +++ b/lisp/net/webjump.el @@ -1,6 +1,6 @@ ;;; webjump.el --- programmable Web hotlist -;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1997, 2004 Free Software Foundation, Inc. ;; Author: Neil W. Van Dyke ;; Created: 09-Aug-1996 @@ -300,7 +300,8 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke ((eq builtin 'mirrors) (if (= (length expr) 1) (error - "WebJump URL builtin \"mirrors\" for \"%s\" needs at least 1 arg")) + "WebJump URL builtin \"mirrors\" for \"%s\" needs at least 1 arg" + name)) (webjump-choose-mirror name (cdr (append expr nil)))) ((eq builtin 'name) name) @@ -400,4 +401,5 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke (provide 'webjump) +;;; arch-tag: f1d20156-0a6f-488b-bd91-f69ee8b6d5cc ;;; webjump.el ends here diff --git a/lisp/net/zone-mode.el b/lisp/net/zone-mode.el index a58bc2dd54..6b4d22f9b1 100644 --- a/lisp/net/zone-mode.el +++ b/lisp/net/zone-mode.el @@ -92,7 +92,7 @@ Zone-mode does two things: - fontification" - (add-hook 'write-file-hooks 'zone-mode-update-serial-hook nil t) + (add-hook 'write-file-functions 'zone-mode-update-serial-hook nil t) (if (null zone-mode-syntax-table) (zone-mode-load-time-setup)) ;; should have been run at load-time @@ -115,4 +115,5 @@ Zone-mode does two things: (provide 'zone-mode) +;;; arch-tag: 6a2940ef-fd4f-4de7-b979-b027b09821fe ;;; zone-mode.el ends here diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 91943503f5..924cf0ed8c 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -1,6 +1,6 @@ ;;; newcomment.el --- (un)comment regions of buffers -;; Copyright (C) 1999,2000,2003 Free Software Foundation Inc. +;; Copyright (C) 1999,2000,2003,2004 Free Software Foundation Inc. ;; Author: code extracted from Emacs-20's simple.el ;; Maintainer: Stefan Monnier @@ -251,8 +251,10 @@ this function before any other, so the rest of the code can assume that the variables are properly set." (unless (and (not comment-start) noerror) (unless comment-start - (set (make-local-variable 'comment-start) - (read-string "No comment syntax is defined. Use: "))) + (let ((cs (read-string "No comment syntax is defined. Use: "))) + (if (zerop (length cs)) + (error "No comment syntax defined") + (set (make-local-variable 'comment-start) cs)))) ;; comment-use-syntax (when (eq comment-use-syntax 'undecided) (set (make-local-variable 'comment-use-syntax) @@ -343,6 +345,13 @@ If UNP is non-nil, unquote nested comment markers." ;;;; Navigation ;;;; +(defvar comment-use-global-state nil + "Non-nil means that the global syntactic context is used. +More specifically, it means that `syntax-ppss' is used to find out whether +point is within a string or not. Major modes whose syntax is faithfully +described by the syntax-tables can set this to non-nil so comment markers +in strings will not confuse Emacs.") + (defun comment-search-forward (limit &optional noerror) "Find a comment start between point and LIMIT. Moves point to inside the comment and returns the position of the @@ -355,8 +364,10 @@ and raises an error or returns nil of NOERROR is non-nil." (unless noerror (error "No comment"))) (let* ((pt (point)) ;; Assume (at first) that pt is outside of any string. - (s (parse-partial-sexp pt (or limit (point-max)) nil nil nil t))) - (when (and (nth 8 s) (nth 3 s)) + (s (parse-partial-sexp pt (or limit (point-max)) nil nil + (if comment-use-global-state (syntax-ppss pt)) + t))) + (when (and (nth 8 s) (nth 3 s) (not comment-use-global-state)) ;; The search ended inside a string. Try to see if it ;; works better when we assume that pt is inside a string. (setq s (parse-partial-sexp @@ -716,35 +727,9 @@ comment markers." ;; Find the end of the comment. (ept (progn (goto-char spt) - (unless - (or - (comment-forward) - ;; Allow eob as comment-end instead of \n. - (and - (eobp) - (let ((s1 (aref (syntax-table) (char-after spt))) - (s2 (aref (syntax-table) - (or (char-after (1+ spt)) 0))) - (sn (aref (syntax-table) ?\n)) - (flag->b (car (string-to-syntax "> b"))) - (flag-1b (car (string-to-syntax " 1b"))) - (flag-2b (car (string-to-syntax " 2b")))) - (cond - ;; One-character comment-start terminated by - ;; \n. - ((and - (equal sn (string-to-syntax ">")) - (equal s1 (string-to-syntax "<"))) - (insert-char ?\n 1) - t) - ;; Two-character type b comment-start - ;; terminated by \n. - ((and - (= (logand (car sn) flag->b) flag->b) - (= (logand (car s1) flag-1b) flag-1b) - (= (logand (car s2) flag-2b) flag-2b)) - (insert-char ?\n 1) - t))))) + (unless (or (comment-forward) + ;; Allow non-terminated comments. + (eobp)) (error "Can't find the comment end")) (point))) (box nil) diff --git a/lisp/novice.el b/lisp/novice.el index 32dfae3a20..159c9a9678 100644 --- a/lisp/novice.el +++ b/lisp/novice.el @@ -177,4 +177,5 @@ to future sessions." (provide 'novice) +;;; arch-tag: f83c0f96-497e-4db6-a430-8703716c6dd9 ;;; novice.el ends here diff --git a/lisp/obsolete/auto-show.el b/lisp/obsolete/auto-show.el index 342a349940..fcd8480404 100644 --- a/lisp/obsolete/auto-show.el +++ b/lisp/obsolete/auto-show.el @@ -48,4 +48,5 @@ to auto-show from your init file and code." (provide 'auto-show) +;;; arch-tag: 49587cbf-95cc-4061-b564-274aaec37469 ;;; auto-show.el ends here diff --git a/lisp/obsolete/awk-mode.el b/lisp/obsolete/awk-mode.el index e101e304c2..d0ac24f3c6 100644 --- a/lisp/obsolete/awk-mode.el +++ b/lisp/obsolete/awk-mode.el @@ -121,4 +121,5 @@ Turning on AWK mode runs `awk-mode-hook'." (provide 'awk-mode) +;;; arch-tag: 14ebc02a-b3c5-4e76-8034-6ca9ac0af0e6 ;;; awk-mode.el ends here diff --git a/lisp/obsolete/float.el b/lisp/obsolete/float.el index e5d71abb69..4b327cdb90 100644 --- a/lisp/obsolete/float.el +++ b/lisp/obsolete/float.el @@ -455,4 +455,5 @@ are recognized." (provide 'float) +;;; arch-tag: cc0c89c6-5718-49af-978e-585f6b14e347 ;;; float.el ends here diff --git a/lisp/obsolete/hilit19.el b/lisp/obsolete/hilit19.el index d81955ff8c..4d8af4b5a2 100644 --- a/lisp/obsolete/hilit19.el +++ b/lisp/obsolete/hilit19.el @@ -1510,4 +1510,5 @@ number of backslashes." (provide 'hilit19) +;;; arch-tag: db99739a-4837-41ee-ad02-3baced8ae71d ;;; hilit19.el ends here diff --git a/lisp/obsolete/hscroll.el b/lisp/obsolete/hscroll.el index 07a5f52572..543ce3640c 100644 --- a/lisp/obsolete/hscroll.el +++ b/lisp/obsolete/hscroll.el @@ -100,4 +100,5 @@ Also see `automatic-hscrolling'." (provide 'hscroll) +;;; arch-tag: 48377520-e5ca-401d-b360-3881b2d5a05a ;;; hscroll.el ends here diff --git a/lisp/obsolete/mlsupport.el b/lisp/obsolete/mlsupport.el index 25f32bcb2c..127e5e7fce 100644 --- a/lisp/obsolete/mlsupport.el +++ b/lisp/obsolete/mlsupport.el @@ -432,4 +432,5 @@ (provide 'mlsupport) +;;; arch-tag: b0ad09bc-8cb2-4be0-8888-2e874839bcbc ;;; mlsupport.el ends here diff --git a/lisp/obsolete/ooutline.el b/lisp/obsolete/ooutline.el index 55d6dafbdb..6b595b8629 100644 --- a/lisp/obsolete/ooutline.el +++ b/lisp/obsolete/ooutline.el @@ -582,4 +582,5 @@ Stop at the first and last subheadings of a superior heading." (provide 'outline) +;;; arch-tag: 14ed00e1-bd40-4db8-86e5-3b82ce326e45 ;;; ooutline.el ends here diff --git a/lisp/obsolete/options.el b/lisp/obsolete/options.el index 53a67516b2..34d7e532d1 100644 --- a/lisp/obsolete/options.el +++ b/lisp/obsolete/options.el @@ -144,4 +144,5 @@ For convenience, the characters \\[backward-paragraph] and \\[forward-paragraph] (provide 'options) +;;; arch-tag: d18211a1-f3fb-48c9-a449-d5acde406a3c ;;; options.el ends here diff --git a/lisp/obsolete/profile.el b/lisp/obsolete/profile.el index 1ceb44ccb0..d080419622 100644 --- a/lisp/obsolete/profile.el +++ b/lisp/obsolete/profile.el @@ -289,4 +289,5 @@ DEF is (symbol-function FUN)." (provide 'profile) +;;; arch-tag: 816f97e8-efff-4da2-9a95-7bc392f58b19 ;;; profile.el ends here diff --git a/lisp/obsolete/rnews.el b/lisp/obsolete/rnews.el index 46b3f8c730..45d4f768a0 100644 --- a/lisp/obsolete/rnews.el +++ b/lisp/obsolete/rnews.el @@ -984,4 +984,5 @@ Mail and USENET news headers are not rotated." (provide 'rnews) +;;; arch-tag: c032a20b-cafb-466c-b3fa-5be404a18f8c ;;; rnews.el ends here diff --git a/lisp/obsolete/rnewspost.el b/lisp/obsolete/rnewspost.el index 9907f6df05..1b7623f78a 100644 --- a/lisp/obsolete/rnewspost.el +++ b/lisp/obsolete/rnewspost.el @@ -440,4 +440,5 @@ original message into it." (provide 'rnewspost) +;;; arch-tag: 18f7b2af-cf9a-49e4-878b-71eb49913e00 ;;; rnewspost.el ends here diff --git a/lisp/obsolete/rsz-mini.el b/lisp/obsolete/rsz-mini.el index 615ed1ccbb..d44a88df80 100644 --- a/lisp/obsolete/rsz-mini.el +++ b/lisp/obsolete/rsz-mini.el @@ -7,8 +7,6 @@ ;; Maintainer: Noah Friedman ;; Keywords: minibuffer, window, frame, display -;; $Id: rsz-mini.el,v 1.29 2001/07/16 12:22:59 pj Exp $ - ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify @@ -81,4 +79,5 @@ (provide 'rsz-mini) +;;; arch-tag: 3cb85d51-ab33-4e46-8362-dd87a5d06c99 ;;; rsz-mini.el ends here diff --git a/lisp/obsolete/sc.el b/lisp/obsolete/sc.el index 4c42fdce10..26486577aa 100644 --- a/lisp/obsolete/sc.el +++ b/lisp/obsolete/sc.el @@ -11,4 +11,7 @@ (require 'supercite) (provide 'sc) +(message "The name `sc' works but is obsolete; please use `supercite' instead") + +;;; arch-tag: 31e8ae19-689e-4b7d-9161-6d7dd60c6ece ;;; sc.el ends here diff --git a/lisp/obsolete/scribe.el b/lisp/obsolete/scribe.el index 16067d1963..15f33660d7 100644 --- a/lisp/obsolete/scribe.el +++ b/lisp/obsolete/scribe.el @@ -321,4 +321,5 @@ preceding text is of the form @Command." (provide 'scribe) +;;; arch-tag: 64f454c4-7544-4ea2-9d14-f0b668f2cdc6 ;;; scribe.el ends here diff --git a/lisp/obsolete/sun-curs.el b/lisp/obsolete/sun-curs.el index 2e9a4b220b..6437adaf60 100644 --- a/lisp/obsolete/sun-curs.el +++ b/lisp/obsolete/sun-curs.el @@ -218,4 +218,5 @@ Otherwise, ICON should be a vector or the name of a vector of [x y 32-chars]" (provide 'sun-curs) +;;; arch-tag: 7cc861e5-e2d9-4191-b211-2baaaab54e78 ;;; sun-curs.el ends here diff --git a/lisp/obsolete/sun-fns.el b/lisp/obsolete/sun-fns.el index df59656344..50edce8e57 100644 --- a/lisp/obsolete/sun-fns.el +++ b/lisp/obsolete/sun-fns.el @@ -640,4 +640,5 @@ To unmark a buffer marked for deletion, select it with LEFT." (provide 'sun-fns) +;;; arch-tag: 1c4c1192-f71d-4d5f-b883-ae659c28e132 ;;; sun-fns.el ends here diff --git a/lisp/obsolete/uncompress.el b/lisp/obsolete/uncompress.el index 6790534d05..ac567be67b 100644 --- a/lisp/obsolete/uncompress.el +++ b/lisp/obsolete/uncompress.el @@ -114,4 +114,5 @@ It then selects a major mode from the uncompressed file name and contents." (provide 'uncompress) +;;; arch-tag: 626658d4-fcce-499a-990d-d165f2ed7da3 ;;; uncompress.el ends here diff --git a/lisp/obsolete/x-apollo.el b/lisp/obsolete/x-apollo.el index 4aec15d913..c17fb06d26 100644 --- a/lisp/obsolete/x-apollo.el +++ b/lisp/obsolete/x-apollo.el @@ -93,4 +93,5 @@ (provide 'x-apollo) +;;; arch-tag: 4f3e86f4-557c-44b3-978e-144fc4dc812e ;;; x-apollo.el ends here diff --git a/lisp/obsolete/x-menu.el b/lisp/obsolete/x-menu.el index 9a3edba771..c2302e82e3 100644 --- a/lisp/obsolete/x-menu.el +++ b/lisp/obsolete/x-menu.el @@ -146,4 +146,5 @@ available to the user. This also creates the menu itself." (provide 'x-menu) +;;; arch-tag: 889f6d49-c01b-49e7-aaef-b0c6966c2961 ;;; x-menu.el ends here diff --git a/lisp/outline.el b/lisp/outline.el index fb76271eb6..59aeb233fd 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -1,6 +1,6 @@ ;;; outline.el --- outline mode commands for Emacs -;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 2001 +;; Copyright (C) 1986, 93, 94, 95, 97, 2000, 01, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -410,7 +410,8 @@ If INVISIBLE-OK is non-nil, an invisible heading line is ok too." (or (caar outline-heading-alist) "") (match-string 0))))) (unless (or (string-match "[ \t]\\'" head) - (not (string-match outline-regexp (concat head " ")))) + (not (string-match (concat "\\`\\(?:" outline-regexp "\\)") + (concat head " ")))) (setq head (concat head " "))) (unless (bolp) (end-of-line) (newline)) (insert head) @@ -486,7 +487,8 @@ in the region." ;; Bummer!! There is no lower heading in the buffer. ;; Let's try to invent one by repeating the first char. (let ((new-head (concat (substring head 0 1) head))) - (if (string-match (concat "\\`" outline-regexp) new-head) + (if (string-match (concat "\\`\\(?:" outline-regexp "\\)") + new-head) ;; Why bother checking that it is indeed lower level ? new-head ;; Didn't work: keep it as is so it's still a heading. @@ -557,7 +559,7 @@ the match data is set appropriately." (defun outline-move-subtree-down (&optional arg) "Move the currrent subtree down past ARG headlines of the same level." (interactive "p") - (let ((re (concat "^" outline-regexp)) + (let ((re (concat "^\\(?:" outline-regexp "\\)")) (movfunc (if (> arg 0) 'outline-get-next-sibling 'outline-get-last-sibling)) (ins-point (make-marker)) @@ -987,4 +989,5 @@ convenient way to make a table of contents of the buffer." (provide 'outline) (provide 'noutline) +;;; arch-tag: 1724410e-7d4d-4f46-b801-49e18171e874 ;;; outline.el ends here diff --git a/lisp/paren.el b/lisp/paren.el index 60c9aef0f3..ab3efe10ba 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -243,4 +243,5 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time." (provide 'paren) +;;; arch-tag: d0969b88-7ac0-4bd0-bd53-e73b892b86a9 ;;; paren.el ends here diff --git a/lisp/patcomp.el b/lisp/patcomp.el index c1965a763c..41c0a9eade 100644 --- a/lisp/patcomp.el +++ b/lisp/patcomp.el @@ -19,4 +19,5 @@ It uses the command line arguments to specify the files to compile." (let ((load-path (list (expand-file-name "lisp")))) (batch-byte-compile))) +;;; arch-tag: cb299b78-1d6c-4c02-945b-12fa2e856d6f ;;; patcomp.el ends here diff --git a/lisp/paths.el b/lisp/paths.el index f0d5a8d5cd..925dbb06e9 100644 --- a/lisp/paths.el +++ b/lisp/paths.el @@ -199,4 +199,5 @@ the terminal-initialization file to be loaded.") (convert-standard-filename "~/.abbrev_defs")) "*Default name of file to read abbrevs from.") +;;; arch-tag: bae27ffb-9944-4c87-b569-30d4635a99e1 ;;; paths.el ends here diff --git a/lisp/pcmpl-cvs.el b/lisp/pcmpl-cvs.el index f005509192..d5003d5de0 100644 --- a/lisp/pcmpl-cvs.el +++ b/lisp/pcmpl-cvs.el @@ -185,4 +185,5 @@ operation character applies, as displayed by 'cvs -n update'." (setq pcomplete-stub nondir) (pcomplete-uniqify-list entries))) +;;; arch-tag: d2aeac43-4bf5-4509-a496-74b863c6642b ;;; pcmpl-cvs.el ends here diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el index 9153bf73e5..32810d7dba 100644 --- a/lisp/pcmpl-gnu.el +++ b/lisp/pcmpl-gnu.el @@ -307,4 +307,5 @@ ;;;###autoload (defalias 'pcomplete/gdb 'pcomplete/xargs) +;;; arch-tag: 06d2b429-dcb1-4a57-84e1-f70d87781183 ;;; pcmpl-gnu.el ends here diff --git a/lisp/pcmpl-linux.el b/lisp/pcmpl-linux.el index 83e4330d97..1822b514c4 100644 --- a/lisp/pcmpl-linux.el +++ b/lisp/pcmpl-linux.el @@ -105,4 +105,5 @@ (pcomplete-uniqify-list points) (cons "swap" (pcmpl-linux-mounted-directories)))))) +;;; arch-tag: bb0961a6-a623-463d-92c6-497c317293b1 ;;; pcmpl-linux.el ends here diff --git a/lisp/pcmpl-rpm.el b/lisp/pcmpl-rpm.el index f51208dbfa..683819b54f 100644 --- a/lisp/pcmpl-rpm.el +++ b/lisp/pcmpl-rpm.el @@ -326,4 +326,5 @@ You can use \\[eshell-report-bug] to do so." (t (error "You must select a mode: -q, -i, -U, --verify, etc")))))) +;;; arch-tag: 4e64b490-fecf-430e-b2b9-70a8ad64b8c1 ;;; pcmpl-rpm.el ends here diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el index e4ed4cbf16..fe26b089f7 100644 --- a/lisp/pcmpl-unix.el +++ b/lisp/pcmpl-unix.el @@ -122,4 +122,5 @@ (pcomplete-here* (pcmpl-unix-group-names))) (while (pcomplete-here (pcomplete-entries)))) +;;; arch-tag: 3f9eb5af-7e0e-449d-b586-381cbbf8fc5c ;;; pcmpl-unix.el ends here diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index cc4b876477..213b68a400 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -1206,4 +1206,5 @@ Returns the resultant list." ; (defalias 'pc-match-beginning 'pcomplete-match-beginning) ; (defalias 'pc-match-end 'pcomplete-match-end) +;;; arch-tag: ae32ef2d-dbed-4244-8b0f-cf5a2a3b07a4 ;;; pcomplete.el ends here diff --git a/lisp/pcvs-defs.el b/lisp/pcvs-defs.el index 2cbb8a7207..dadb194abb 100644 --- a/lisp/pcvs-defs.el +++ b/lisp/pcvs-defs.el @@ -1,6 +1,6 @@ ;;; pcvs-defs.el --- variable definitions for PCL-CVS -;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2003 +;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 03, 2004 ;; Free Software Foundation, Inc. ;; Author: Stefan Monnier @@ -413,6 +413,7 @@ This variable is buffer local and only used in the *cvs* buffer.") ["Update" cvs-mode-update (cvs-enabledp 'update)] ["Re-examine" cvs-mode-examine t] ["Commit" cvs-mode-commit-setup (cvs-enabledp 'commit)] + ["Tag" cvs-mode-tag (cvs-enabledp (when cvs-force-dir-tag 'tag))] ["Undo changes" cvs-mode-undo (cvs-enabledp 'undo)] ["Add" cvs-mode-add (cvs-enabledp 'add)] ["Remove" cvs-mode-remove (cvs-enabledp 'remove)] @@ -507,4 +508,5 @@ message and replace it with a message tell you to change this variable.") ;; (provide 'pcvs-defs) +;;; arch-tag: c7c701d0-d1d4-4aa9-a302-007bb03aca5e ;;; pcvs-defs.el ends here diff --git a/lisp/pcvs-info.el b/lisp/pcvs-info.el index 79cee63303..a26b99445c 100644 --- a/lisp/pcvs-info.el +++ b/lisp/pcvs-info.el @@ -1,6 +1,7 @@ ;;; pcvs-info.el --- internal representation of a fileinfo entry -;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2004 +;; Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: pcl-cvs @@ -129,7 +130,7 @@ to confuse some users sometimes." "The prefix that CVS prepends to files when rcsmerge'ing.") (easy-mmode-defmap cvs-status-map - '(([(mouse-2)] . cvs-mouse-toggle-mark)) + '(([(mouse-2)] . cvs-mode-toggle-mark)) "Local keymap for text properties of status") ;; Constructor: @@ -219,8 +220,8 @@ to confuse some users sometimes." (file (cvs-fileinfo->file fileinfo)) (default-directory (file-name-as-directory (expand-file-name dir))) (files (directory-files "." nil - (concat "^" (regexp-quote cvs-bakprefix) - (regexp-quote file) "\\."))) + (concat "\\`" (regexp-quote cvs-bakprefix) + (regexp-quote file) "\\(\\.[0-9]+\\.[0-9]+\\)+\\'"))) bf) (dolist (f files bf) (when (and (file-readable-p f) @@ -470,4 +471,5 @@ DIR can also be a file." (provide 'pcvs-info) +;;; arch-tag: d85dde07-bdc2-400a-882f-92f398c7b0ba ;;; pcvs-info.el ends here diff --git a/lisp/pcvs-parse.el b/lisp/pcvs-parse.el index 9ba3814c91..c1726ee84c 100644 --- a/lisp/pcvs-parse.el +++ b/lisp/pcvs-parse.el @@ -525,4 +525,5 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'." (provide 'pcvs-parse) +;;; arch-tag: 35418375-1a23-40a0-957d-96b0262f91d6 ;;; pcvs-parse.el ends here diff --git a/lisp/pcvs-util.el b/lisp/pcvs-util.el index 8c188c5321..86fafea37e 100644 --- a/lisp/pcvs-util.el +++ b/lisp/pcvs-util.el @@ -409,4 +409,5 @@ and reset it unless READ-ONLY is non-nil." (provide 'pcvs-util) +;;; arch-tag: 3b2588bb-2ae3-4f1f-bf5b-dea91b1f8a59 ;;; pcvs-util.el ends here diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 1fd4d90d60..21e34fbc7e 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el @@ -1,6 +1,6 @@ ;;; pcvs.el --- a front-end to CVS -;; Copyright (C) 1991,92,93,94,95,95,97,98,99,2000,02,2003 +;; Copyright (C) 1991,92,93,94,95,95,97,98,99,2000,02,03,2004 ;; Free Software Foundation, Inc. ;; Author: (The PCL-CVS Trust) pcl-cvs@cyclic.com @@ -12,7 +12,7 @@ ;; (Stefan Monnier) monnier@cs.yale.edu ;; (Greg Klanderman) greg@alphatech.com ;; (Jari Aalto+mail.emacs) jari.aalto@poboxes.com -;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu +;; Maintainer: (Stefan Monnier) monnier@gnu.org ;; Keywords: CVS, version control, release management ;; This file is part of GNU Emacs. @@ -669,6 +669,14 @@ DCD is the `dont-change-disc' flag to use when parsing that output. SUBDIR is the subdirectory (if any) where this command was run. OLD-FIS is the list of fileinfos on which the cvs command was applied and which should be considered up-to-date if they are missing from the output." + (when (eq system-type 'darwin) + ;; Fixup the ^D^H^H inserted at beginning of buffer sometimes on MacOSX + ;; because of the call to `process-send-eof'. + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "^\\^D+" nil t) + (let ((inhibit-read-only t)) + (delete-region (match-beginning 0) (match-end 0)))))) (let* ((fileinfos (cvs-parse-buffer 'cvs-parse-table dcd subdir)) last) (with-current-buffer cvs-buffer @@ -1186,11 +1194,12 @@ marked instead. A directory can never be marked." (ewoc-invalidate cvs-cookies tin) (cvs-mode-next-line 1)))) -(defun cvs-mouse-toggle-mark (e) - "Toggle the mark of the entry under the mouse." - (interactive "e") +(defalias 'cvs-mouse-toggle-mark 'cvs-mode-toggle-mark) +(defun cvs-mode-toggle-mark (e) + "Toggle the mark of the entry at point." + (interactive (list last-input-event)) (save-excursion - (mouse-set-point e) + (posn-set-point (event-end e)) (cvs-mode-mark 'toggle))) (defun-cvs-mode cvs-mode-unmark () @@ -1256,7 +1265,8 @@ they should always be unmarked." (let ((tin (ewoc-goto-prev cvs-cookies 1))) (when tin (setf (cvs-fileinfo->marked (ewoc-data tin)) nil) - (ewoc-invalidate cvs-cookies tin)))) + (ewoc-invalidate cvs-cookies tin))) + (cvs-move-to-goal-column)) (defconst cvs-ignore-marks-alternatives '(("toggle-marks" . "/TM") @@ -1921,7 +1931,7 @@ to hear about anymore." With a prefix, opens the buffer in an OTHER window." (interactive (list last-input-event current-prefix-arg)) ;; If the event moves point, check that it moves it to a valid location. - (when (and (/= (point) (progn (ignore-errors (mouse-set-point e)) (point))) + (when (and (/= (point) (progn (posn-set-point (event-end e)) (point))) (not (memq (get-text-property (1- (line-end-position)) 'font-lock-face) '(cvs-header-face cvs-filename-face)))) @@ -2043,7 +2053,16 @@ Returns a list of FIS that should be `cvs remove'd." (shrink-window-if-larger-than-buffer)))) (if (not (or silent (unwind-protect - (yes-or-no-p (format "Delete %d files? " (length files))) + (yes-or-no-p + (let ((nfiles (length files)) + (verb (if (eq filter 'undo) "Undo" "Delete"))) + (if (= 1 nfiles) + (format "%s file: \"%s\" ? " + verb + (cvs-fileinfo->file (car files))) + (format "%s %d files? " + verb + nfiles)))) (cvs-bury-buffer tmpbuf cvs-buffer)))) (progn (message "Aborting") nil) (dolist (fi files) @@ -2105,8 +2124,8 @@ With prefix argument, prompt for cvs flags." "Add a ChangeLog entry in the ChangeLog of the current directory." (interactive) (dolist (fi (cvs-mode-marked nil nil)) - (let ((default-directory (cvs-expand-dir-name (cvs-fileinfo->dir fi))) - (buffer-file-name (expand-file-name (cvs-fileinfo->file fi)))) + (let* ((default-directory (cvs-expand-dir-name (cvs-fileinfo->dir fi))) + (buffer-file-name (expand-file-name (cvs-fileinfo->file fi)))) (kill-local-variable 'change-log-default-name) (save-excursion (add-change-log-entry-other-window))))) @@ -2311,4 +2330,5 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (provide 'pcvs) +;;; arch-tag: 8e3a7494-0453-4389-9ab3-a557ce9fab61 ;;; pcvs.el ends here diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index bcac5fa257..886e53a6af 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el @@ -521,4 +521,5 @@ progress because it is an animated attempt." (provide '5x5) +;;; arch-tag: ec4dabd5-572d-41ea-b48c-ec5ce0d68fa9 ;;; 5x5.el ends here diff --git a/lisp/play/animate.el b/lisp/play/animate.el index 3e72247320..23e7939f47 100644 --- a/lisp/play/animate.el +++ b/lisp/play/animate.el @@ -151,11 +151,13 @@ Strings will be separated from each other by SPACE lines." (setq list-of-strings (cdr list-of-strings))))) ;;;###autoload -(defun animate-birthday-present () - "Display Sarah's birthday present in a new buffer." - (interactive) +(defun animate-birthday-present (&optional name) + "Display one's birthday present in a new buffer. +You can specify the one's name by NAME; the default value is \"Sarah\"." + (interactive (list (read-string "Name (default \"Sarah\"): " + nil nil "Sarah"))) ;; Make a suitable buffer to display the birthday present in. - (switch-to-buffer (get-buffer-create "*Sarah*")) + (switch-to-buffer (get-buffer-create (format "*%s*" name))) (erase-buffer) ;; Display the empty buffer. (sit-for 0) @@ -164,7 +166,7 @@ Strings will be separated from each other by SPACE lines." (setq indent-tabs-mode nil) (animate-string "Happy Birthday," 6) - (animate-string "Sarah" 7) + (animate-string (format "%s" name) 7) (sit-for 1) @@ -184,4 +186,5 @@ Strings will be separated from each other by SPACE lines." (animate-string "my sunshine" 18 34) (animate-string "to stay!" 19 34)) +;;; arch-tag: 275289a3-6ac4-41da-b527-a1147045392f ;;; animate.el ends here diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el index 9e6fd59e98..f3933e7ccd 100644 --- a/lisp/play/blackbox.el +++ b/lisp/play/blackbox.el @@ -429,4 +429,5 @@ a reflection." (provide 'blackbox) +;;; arch-tag: 6c474c62-5617-4b10-9b44-ac430168c0e2 ;;; blackbox.el ends here diff --git a/lisp/play/bruce.el b/lisp/play/bruce.el index ff1a0753a5..57db4cff8c 100644 --- a/lisp/play/bruce.el +++ b/lisp/play/bruce.el @@ -147,4 +147,5 @@ (provide 'bruce) +;;; arch-tag: b83ded51-4ccb-41ef-8bd6-3b521e81dd9b ;;; bruce.el ends here diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el index cd3c715bc9..24cde55373 100644 --- a/lisp/play/cookie1.el +++ b/lisp/play/cookie1.el @@ -168,4 +168,5 @@ Optional fifth arg REQUIRE-MATCH non-nil forces a matching cookie." (provide 'cookie1) +;;; arch-tag: 4a8a8712-df6a-4f34-b030-108a1b47f9f2 ;;; cookie1.el ends here diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el index 23634be1a5..7c08856da8 100644 --- a/lisp/play/decipher.el +++ b/lisp/play/decipher.el @@ -1068,4 +1068,5 @@ if it can't, it signals an error." ;;; (delete-backward-char 1) ;;; (insert ")\n")))))) +;;; arch-tag: 8f094d88-ffe1-4f99-afe3-a5e81dd939d9 ;;; decipher.el ends here diff --git a/lisp/play/dissociate.el b/lisp/play/dissociate.el index b8458f63fa..63bc7b7d2d 100644 --- a/lisp/play/dissociate.el +++ b/lisp/play/dissociate.el @@ -100,4 +100,5 @@ Default is 2." (provide 'dissociate) +;;; arch-tag: 90d197d1-409b-45c5-a0b5-fbfb2e06334f ;;; dissociate.el ends here diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index 478c2af8ec..3cbb16fc2d 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -1634,4 +1634,5 @@ Hack on previous word, setting global variable OWNER to correct result." (provide 'doctor) +;;; arch-tag: 579380f6-4902-4ea5-bccb-6339e30e1257 ;;; doctor.el ends here diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index 402a3d9676..50b8bce5f7 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el @@ -3369,4 +3369,5 @@ File not found"))) (provide 'dunnet) +;;; arch-tag: 4cc8e47c-d9e1-4ef4-936b-578e7f529558 ;;; dunnet.el ends here diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index 0fad1df104..306cf7daac 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el @@ -327,4 +327,5 @@ and choose the directory as the fortune-file." ;;; Provide ourselves. (provide 'fortune) +;;; arch-tag: a1e4cb8a-3792-40e7-86a7-fc75ce094bcc ;;; fortune.el ends here diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index 540498d097..54a8f361c9 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el @@ -566,7 +566,7 @@ FILE is created there." ((boundp 'user-mail-address) user-mail-address) (t "")))) - (sort-numeric-fields 1 (point-min) (point-max)) + (sort-fields 1 (point-min) (point-max)) (reverse-region (point-min) (point-max)) (goto-line (1+ gamegrid-score-file-length)) (delete-region (point) (point-max)) @@ -578,4 +578,5 @@ FILE is created there." (provide 'gamegrid) +;;; arch-tag: a96c2ff4-1c12-427e-bd3d-faeaf174cd46 ;;; gamegrid.el ends here diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el index 407f218fe0..0ccb16be94 100644 --- a/lisp/play/gametree.el +++ b/lisp/play/gametree.el @@ -618,4 +618,5 @@ shogi, etc.) players, it is a slightly modified version of Outline mode. (provide 'gametree) +;;; arch-tag: aaa30943-9ae4-4cc1-813d-a46f96b7e4f1 ;;; gametree.el ends here diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index 7340f4d9d6..b640c1bbbd 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el @@ -1212,4 +1212,5 @@ If the game is finished, this command requests for another game." (provide 'gomoku) +;;; arch-tag: b1b8205e-77fc-4597-b373-3ea2c04311eb ;;; gomoku.el ends here diff --git a/lisp/play/handwrite.el b/lisp/play/handwrite.el index 9167bc536b..1149944492 100644 --- a/lisp/play/handwrite.el +++ b/lisp/play/handwrite.el @@ -159,8 +159,7 @@ Variables: handwrite-linespace (default 12) (setq next-line-add-newlines t) (switch-to-buffer ps-buf-name) (handwrite-insert-header buf-name) - (insert "\n(\\nCreated by GNU Emacs' handwrite version " - emacs-version "\\n\\n)=print flush\n") + (insert "%%Creator: GNU Emacs' handwrite version " emacs-version "\n") (handwrite-insert-preamble) (handwrite-insert-info) (handwrite-insert-font) @@ -1417,4 +1416,5 @@ end (provide 'handwrite) +;;; arch-tag: f2285ae9-e41b-4c96-8343-87dce41e44b7 ;;; handwrite.el ends here diff --git a/lisp/play/hanoi.el b/lisp/play/hanoi.el index d3bf2bd336..296ca82b64 100644 --- a/lisp/play/hanoi.el +++ b/lisp/play/hanoi.el @@ -447,4 +447,5 @@ BITS must be of length nrings. Start at START-TIME." (provide 'hanoi) +;;; arch-tag: 7a901659-4346-495c-8883-14cbf540610c ;;; hanoi.el ends here diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el index b4779a4e8a..4b5e8f68c2 100644 --- a/lisp/play/landmark.el +++ b/lisp/play/landmark.el @@ -4,7 +4,7 @@ ;; Author: Terrence Brannon (was: ) ;; Created: December 16, 1996 - first release to usenet -;; Keywords: gomoku neural network adaptive search chemotaxis +;; Keywords: gomoku, neural network, adaptive search, chemotaxis ;;;_* Usage ;;; Just type @@ -1703,4 +1703,5 @@ Use \\[describe-mode] for more info." (provide 'landmark) +;;; arch-tag: ae5031be-96e6-459e-a3df-1df53117d3f2 ;;; landmark.el ends here diff --git a/lisp/play/life.el b/lisp/play/life.el index c3bc0b38f8..c7df1a8d01 100644 --- a/lisp/play/life.el +++ b/lisp/play/life.el @@ -279,4 +279,5 @@ generations (this defaults to 1)." (provide 'life) +;;; arch-tag: e9373544-755e-42f5-a9a1-4d4c422bb97a ;;; life.el ends here diff --git a/lisp/play/meese.el b/lisp/play/meese.el index d811dacb9b..de27f567ce 100644 --- a/lisp/play/meese.el +++ b/lisp/play/meese.el @@ -34,4 +34,5 @@ (add-hook 'find-file-hook 'protect-innocence-hook) (provide 'meese) +;;; arch-tag: 47af12d2-6a7d-4e2e-a1ea-eae75a77e3f0 ;;; meese.el ends here diff --git a/lisp/play/morse.el b/lisp/play/morse.el index 40fc4de1d9..ce4e4877e5 100644 --- a/lisp/play/morse.el +++ b/lisp/play/morse.el @@ -1,6 +1,6 @@ ;;; morse.el --- convert text to morse code and back -*- coding: utf-8 -*- -;; Copyright (C) 1995, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2002, 2004 Free Software Foundation, Inc. ;; Author: Rick Farnbach ;; Keywords: games @@ -24,7 +24,7 @@ ;;; Commentary: -;; Converts text to Morse code and back with M-x morese-region and +;; Converts text to Morse code and back with M-x morse-region and ;; M-x unmorse-region (though Morse code is no longer official :-(). ;;; Code: @@ -88,7 +88,9 @@ ("Ñ" . "--.--") ("Ö" . "---.") ("Ø" . "---.") - ("Ü" . "..--")) + ("Ü" . "..--") + ;; Recently standardized + ("@" . ".--.-.")) "Morse code character set.") ;;;###autoload @@ -138,4 +140,5 @@ (provide 'morse) +;;; arch-tag: 3331e6c1-9a9e-453f-abfd-163a9c3f93a6 ;;; morse.el ends here diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el index 954b3cb338..1a667606da 100644 --- a/lisp/play/mpuz.el +++ b/lisp/play/mpuz.el @@ -515,4 +515,5 @@ You may abort a game by typing \\\\[mpuz-offer-abort]." (provide 'mpuz) +;;; arch-tag: 2781d6ba-89e7-43b5-85c7-5d3a2e73feb1 ;;; mpuz.el ends here diff --git a/lisp/play/pong.el b/lisp/play/pong.el index 8d4f087129..05e9e488e3 100644 --- a/lisp/play/pong.el +++ b/lisp/play/pong.el @@ -459,4 +459,5 @@ pong-mode keybindings:\\ (provide 'pong) +;;; arch-tag: 1fdf0fc5-13e2-4de4-aae4-09bdd5af99f3 ;;; pong.el ends here diff --git a/lisp/play/snake.el b/lisp/play/snake.el index f2af0bb649..d21b25f598 100644 --- a/lisp/play/snake.el +++ b/lisp/play/snake.el @@ -412,4 +412,5 @@ Snake mode keybindings: (provide 'snake) +;;; arch-tag: 512ffc92-cfac-4287-9a4e-92890701a5c8 ;;; snake.el ends here diff --git a/lisp/play/solitaire.el b/lisp/play/solitaire.el index 127db243d3..1dc57b61c6 100644 --- a/lisp/play/solitaire.el +++ b/lisp/play/solitaire.el @@ -456,4 +456,5 @@ Seen in info on text lines." (provide 'solitaire) +;;; arch-tag: 1b18ee1c-1e79-4a5b-8658-9560b82e63dd ;;; solitaire.el ends here diff --git a/lisp/play/spook.el b/lisp/play/spook.el index d917861397..d76960fc03 100644 --- a/lisp/play/spook.el +++ b/lisp/play/spook.el @@ -77,4 +77,5 @@ (provide 'spook) +;;; arch-tag: c682b61f-92b6-4492-9c0d-2367e562449c ;;; spook.el ends here diff --git a/lisp/play/studly.el b/lisp/play/studly.el index 474f969ae0..2bb4cb5384 100644 --- a/lisp/play/studly.el +++ b/lisp/play/studly.el @@ -68,4 +68,5 @@ (provide 'studly) +;;; arch-tag: 0dbf5a60-d2e6-48c2-86ae-77fc8575ac67 ;;; studly.el ends here diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el index 04c88392ae..ddf647d6a8 100644 --- a/lisp/play/tetris.el +++ b/lisp/play/tetris.el @@ -646,4 +646,5 @@ tetris-mode keybindings: (provide 'tetris) +;;; arch-tag: fb780d53-3ff0-49f0-8e19-f7f13cf2d49e ;;; tetris.el ends here diff --git a/lisp/play/yow.el b/lisp/play/yow.el index 90708d4897..3be9a99bf7 100644 --- a/lisp/play/yow.el +++ b/lisp/play/yow.el @@ -126,4 +126,5 @@ If called interactively, display a list of matches." (provide 'yow) +;;; arch-tag: d13db89b-84f1-4141-a5ce-261d1733a65c ;;; yow.el ends here diff --git a/lisp/play/zone.el b/lisp/play/zone.el index 0f17a34f5f..abe9657a9d 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el @@ -1,6 +1,6 @@ ;;; zone.el --- idle display hacks -;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2004 Free Software Foundation, Inc. ;; Author: Victor Zandy ;; Maintainer: Thien-Thi Nguyen @@ -125,7 +125,7 @@ If the element is a function or a list of a function and a number, (functionp (car elem)) (numberp (cadr elem))) (apply 'zone-call elem)) - (t (error "bad `zone-call' elem:" elem)))) + (t (error "bad `zone-call' elem: %S" elem)))) program)))) ;;;###autoload @@ -620,4 +620,5 @@ If the element is a function or a list of a function and a number, ;;;;;;;;;;;;;;; (provide 'zone) +;;; arch-tag: 7092503d-74a9-4325-a55c-a026ede58cea ;;; zone.el ends here diff --git a/lisp/printing.el b/lisp/printing.el index f9c95a1644..57dd0691f9 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -1,17 +1,17 @@ ;;; printing.el --- printing utilities -;; Copyright (C) 2000, 2001, 2002, 2003 +;; Copyright (C) 2000, 2001, 2002, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre ;; Maintainer: Vinicius Jose Latorre +;; Time-stamp: <2004/04/05 23:41:49 vinicius> ;; Keywords: wp, print, PostScript -;; Time-stamp: <2002/09/11 16:59:00 vinicius> -;; Version: 6.7.1 +;; Version: 6.7.4 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ -(defconst pr-version "6.7.1" - "printing.el, v 6.7.1 <2002/09/11 vinicius> +(defconst pr-version "6.7.4" + "printing.el, v 6.7.4 <2004/03/31 vinicius> Please send all bug fixes and enhancements to Vinicius Jose Latorre @@ -166,6 +166,38 @@ Please send all bug fixes and enhancements to ;; printer doesn't have duplex feature; otherwise, it's ok, your ;; printer does have duplex feature. ;; +;; NOTE 4: See Tips section. +;; +;; +;; Tips +;; ---- +;; +;; 1. If your have a local printer, that is, a printer which is connected +;; directly to your computer, don't forget to connect the printer to your +;; computer before printing. +;; +;; 2. If you try to print a file and it seems that the file was printed, but +;; there is no paper in the printer, then try to set `pr-delete-temp-file' +;; to nil. Probably `printing' is deleting the temporary file before your +;; local system can get it to send to the printer. +;; +;; 3. Don't try to print a dynamic buffer, that is, a buffer which is +;; modifying while `printing' tries to print. Eventually you got an error +;; message. Instead, save the dynamic buffer to a file or copy it in +;; another buffer and, then, print the file or the new static buffer. +;; An example of dynamic buffer is the *Messages* buffer. +;; +;; 4. When running Emacs on Windows with cygwin, check if the +;; `pr-shell-file-name' variable is set to the proper shell. This shell +;; will execute the commands to preview/print the buffer, file or directory. +;; Also check the setting of `pr-path-style' variable. +;; Probably, you should use: +;; +;; (setq pr-shell-file-name "bash") +;; (setq pr-path-style 'unix) +;; +;; And use / instead of \ when specifying a directory. +;; ;; ;; Using `printing' ;; ---------------- @@ -255,9 +287,9 @@ Please send all bug fixes and enhancements to ;; PREFIX: ;; `pr-interface' buffer interface for printing package. ;; `pr-help' help for printing package. -;; `pr-ps-name' select interactively a PostScript printer. -;; `pr-txt-name' select interactively a text printer. -;; `pr-ps-utility' select interactively a PostScript utility. +;; `pr-ps-name' interactively select a PostScript printer. +;; `pr-txt-name' interactively select a text printer. +;; `pr-ps-utility' interactively select a PostScript utility. ;; `pr-show-*-setup' show current settings. ;; `pr-ps-*' deal with PostScript code generation. ;; `pr-txt-*' deal with text generation. @@ -381,9 +413,11 @@ Please send all bug fixes and enhancements to ;; ;; `pr-ps-temp-file' Specify PostScript temporary file name. ;; -;; `pr-gv-command' Specify path and name of gsview program. +;; `pr-gv-command' Specify path and name of the gsview/gv +;; utility. ;; -;; `pr-gs-command' Specify path and name of ghostscript program. +;; `pr-gs-command' Specify path and name of the ghostscript +;; utility. ;; ;; `pr-gs-switches' Specify ghostscript switches. ;; @@ -408,8 +442,8 @@ Please send all bug fixes and enhancements to ;; ;; `pr-auto-region' Non-nil means region is automagically detected. ;; -;; `pr-auto-mode' Non-nil means major-mode printing is prefered -;; over normal printing. +;; `pr-auto-mode' Non-nil means major-mode specific printing is +;; prefered over normal printing. ;; ;; `pr-mode-alist' Specify an alist for a major-mode and printing ;; function. @@ -515,7 +549,7 @@ Please send all bug fixes and enhancements to ;; 5 | Print >|---\ | |Despool... | | ;; 6 | Text Printer: name >|-\ | | +-----------+ | ;; +-----------------------------+ | | | +---------+ +------------+ -;; III 7 |[ ]Landscape | | | \-|Directory| | As Is... | Ia +;; III 7 |[ ]Landscape | | | \-|Directory| | No Prep... | Ia ;; 8 |[ ]Print Header | | | |Buffer | +------------+ Ib ;; 9 |[ ]Print Header Frame | | | |Region | | name >|- C ;; 10 |[ ]Line Number | | | +---------+ +------------+ @@ -526,8 +560,8 @@ Please send all bug fixes and enhancements to ;; 15 | Print All Pages >|--\ | |Mode | +------------+ ;; +-----------------------------+ | | +---------+ |[ ]Landscape| Id ;; IV 16 |[ ]Spool Buffer | | | +-C-------+ |[ ]Duplex | Ie -;; 17 |[ ]Print with-faces | | \--|( )name A| |[ ]Tumble | If -;; 18 |[ ]Print Using Ghostscript | | |( )name B| +------------+ +;; 17 |[ ]Print with faces | | \--|( )name A| |[ ]Tumble | If +;; 18 |[ ]Print via Ghostscript | | |( )name B| +------------+ ;; +-----------------------------+ | |... | ;; V 19 |[ ]Auto Region | | |(*)name | ;; 20 |[ ]Auto Mode | | |... | @@ -579,8 +613,8 @@ Please send all bug fixes and enhancements to ;; ;; NOTE 2: There are the following options for PostScript file ;; processing: -;; Ia. Print the file *as is*, that is, send it directly to -;; PostScript printer. +;; Ia. Print the file *No Preprocessing*, that is, send it +;; directly to PostScript printer. ;; Ib. PostScript utility processing selection. ;; See `pr-ps-utility-alist' and `pr-setting-database' for ;; documentation. @@ -690,7 +724,7 @@ Please send all bug fixes and enhancements to ;; declared in `pr-mode-alist', the `*-buffer*' and `*-region*' commands ;; behave like `*-mode*' commands. ;; -;; 21. If you want that Printing menu stays poped up while you are setting +;; 21. If you want that Printing menu stays open while you are setting ;; toggle options, turn on this option. The variables ;; `pr-menu-char-height' and `pr-menu-char-width' are used to guess the ;; menu position, so don't forget to adjust these variables if menu @@ -838,8 +872,8 @@ Please send all bug fixes and enhancements to ;; Acknowledgments ;; --------------- ;; -;; Thanks to Drew Adams for directory processing and `pr-path-alist' -;; suggestions. +;; Thanks to Drew Adams for directory processing and +;; `pr-path-alist' suggestions. ;; ;; Thanks to Fred Labrosse for XEmacs tests. ;; @@ -1157,9 +1191,9 @@ SYMBOL It's a symbol to identify a text printer. It's for 'prt_06a 'my_printer -COMMAND Name of program for printing a text file. On MS-DOS and - MS-Windows systems, if the value is an empty string then Emacs - will write directly to the printer port named by NAME (see text +COMMAND Name of the program for printing a text file. On MS-DOS and + MS-Windows systems, if the value is an empty string, then Emacs + will write directly to the printer port given by NAME (see text below), that is, the NAME should be something like \"PRN\" or \"LPT1:\". If NAME is something like \"\\\\\\\\host\\\\share-name\" then @@ -1287,11 +1321,11 @@ SYMBOL It's a symbol to identify a PostScript printer. It's for 'prt_06a 'my_printer -COMMAND Name of program for printing a PostScript file. On MS-DOS and - MS-Windows systems, if the value is an empty string then Emacs - will write directly to the printer port named by NAME (see text - below), that is, the NAME should be something like \"PRN\" or - \"LPT1:\". +COMMAND Name of the program for printing a PostScript file. On MS-DOS + and MS-Windows systems, if the value is an empty string then + Emacs will write directly to the printer port given by NAME + (see text below), that is, the NAME should be something like + \"PRN\" or \"LPT1:\". If NAME is something like \"\\\\\\\\host\\\\share-name\" then COMMAND shouldn't be an empty string. The programs `print' and `nprint' (the standard print programs @@ -1472,10 +1506,10 @@ Examples: (if ps-windows-system "gsview32.exe" "gv") - "*Specify path and name of gsview program. + "*Specify path and name of the gsview/gv utility. See also `pr-path-alist'." - :type '(string :tag "Ghostview Program") + :type '(string :tag "Ghostview Utility") :group 'printing) @@ -1483,10 +1517,10 @@ See also `pr-path-alist'." (if ps-windows-system "gswin32.exe" "gs") - "*Specify path and name of ghostscript program. + "*Specify path and name of the ghostscript utility. See also `pr-path-alist'." - :type '(string :tag "Ghostscript Program") + :type '(string :tag "Ghostscript Utility") :group 'printing) @@ -1524,7 +1558,7 @@ To see ghostscript documentation for more information: (if ps-windows-system "mswinpr2" "uniprint") - "*Specify ghostscript device switch value (-sDEVICE=). + "*Specify the ghostscript device switch value (-sDEVICE=). A note on the gs switches: @@ -1609,7 +1643,7 @@ marked instead of all buffer." (defcustom pr-auto-mode t - "*Non-nil means major-mode printing is prefered over normal printing. + "*Non-nil means major-mode specific printing is prefered over normal printing. That is, if current major-mode is declared in `pr-mode-alist', the `*-buffer*' and `*-region*' commands will behave like `*-mode*' commands; otherwise, @@ -1876,9 +1910,9 @@ UTILITY Name of utility for processing a PostScript file. . for Windows system: \"c:/psutils/psnup -q\" -MUST-SWITCHES List of sexp's to pass as options for PostScript utility +MUST-SWITCHES List of sexp's to pass as options to the PostScript utility program. These options are necessary to process the utility - program and must be place before any other switches. + program and must be placed before any other switches. Example: . for psnup: '(\"-q\") @@ -1921,7 +1955,7 @@ OUTPUT It's a string to specify how to generate an output file. Some . for mpage \">\" ; mpage ... input > output -SWITCHES List of sexp's to pass as extra options for PostScript utility +SWITCHES List of sexp's to pass as extra options to the PostScript utility program. Example: . for psnup @@ -2202,8 +2236,8 @@ Valid values with the corresponding menu parts are: | Print All Pages >| +------------------------------+ `postscript-process' |[ ] Spool Buffer | - |[ ] Print with-faces | - |[ ] Print Using Ghostscript | + |[ ] Print with faces | + |[ ] Print via Ghostscript | +------------------------------+ `printing' |[ ] Auto Region | |[ ] Auto Mode | @@ -2281,7 +2315,8 @@ It's used by `pr-interface'." (defcustom pr-shell-file-name - (if (eq pr-path-style 'windows) + (if (and (not pr-cygwin-system) + ps-windows-system) "cmdproxy.exe" shell-file-name) "*Specify file name to load inferior shells from." @@ -2299,7 +2334,7 @@ See `pr-txt-printer-alist'.") (defvar pr-txt-switches nil - "List of sexp's to pass as extra options for text printer program. + "List of sexp's to pass as extra options to the text printer program. See `pr-txt-printer-alist'.") @@ -2314,7 +2349,7 @@ See `pr-ps-printer-alist'.") (defvar pr-ps-switches nil - "List of sexp's to pass as extra options for PostScript printer program. + "List of sexp's to pass as extra options to the PostScript printer program. See `pr-ps-printer-alist'.") @@ -2413,7 +2448,7 @@ See `pr-ps-printer-alist'.") ["Other..." (pr-ps-mode-preview nil t) :keys "\\[pr-ps-mode-preview]"]) ("File" - ["As Is..." (call-interactively 'pr-ps-file-preview) + ["No Preprocessing..." (call-interactively 'pr-ps-file-preview) :keys "\\[pr-ps-file-preview]" :help "Preview PostScript file"] "--" @@ -2468,7 +2503,7 @@ See `pr-ps-printer-alist'.") ["Other..." (pr-ps-mode-ps-print nil t) :keys "\\[pr-ps-mode-ps-print]"]) ("File" - ["As Is..." (call-interactively 'pr-ps-file-ps-print) + ["No Preprocessing..." (call-interactively 'pr-ps-file-ps-print) :keys "\\[pr-ps-file-ps-print]" :help "Send PostScript file to printer"] "--" @@ -2556,11 +2591,11 @@ See `pr-ps-printer-alist'.") :style toggle :selected pr-spool-p :included (pr-visible-p 'postscript-process) :help "Toggle PostScript spooling"] - ["Print with-faces" pr-toggle-faces + ["Print with faces" pr-toggle-faces :style toggle :selected pr-faces-p :included (pr-visible-p 'postscript-process) :help "Toggle PostScript printing with faces"] - ["Print Using Ghostscript" pr-toggle-ghostscript + ["Print via Ghostscript" pr-toggle-ghostscript :style toggle :selected pr-print-using-ghostscript :included (pr-visible-p 'postscript-process) :help "Toggle PostScript generation using ghostscript"] @@ -2622,7 +2657,7 @@ See `pr-ps-printer-alist'.") ["Other..." (pr-ps-mode-preview nil t) :keys "\\[pr-ps-mode-preview]"]) ("File" - ["As Is..." (call-interactively 'pr-ps-file-preview) + ["No Preprocessing..." (call-interactively 'pr-ps-file-preview) :keys "\\[pr-ps-file-preview]"] "--" ["PostScript Utility" pr-update-menus :active pr-ps-utility-alist] @@ -2670,7 +2705,7 @@ See `pr-ps-printer-alist'.") ["Other..." (pr-ps-mode-ps-print nil t) :keys "\\[pr-ps-mode-ps-print]"]) ("File" - ["As Is..." (call-interactively 'pr-ps-file-ps-print) + ["No Preprocessing..." (call-interactively 'pr-ps-file-ps-print) :keys "\\[pr-ps-file-ps-print]"] "--" ["PostScript Utility" pr-update-menus :active pr-ps-utility-alist] @@ -2746,10 +2781,10 @@ See `pr-ps-printer-alist'.") ["Spool Buffer" pr-toggle-spool :style toggle :selected pr-spool-p :included (pr-visible-p 'postscript-process)] - ["Print with-faces" pr-toggle-faces + ["Print with faces" pr-toggle-faces :style toggle :selected pr-faces-p :included (pr-visible-p 'postscript-process)] - ["Print Using Ghostscript" pr-toggle-ghostscript + ["Print via Ghostscript" pr-toggle-ghostscript :style toggle :selected pr-print-using-ghostscript :included (pr-visible-p 'postscript-process)] "--" @@ -2859,7 +2894,7 @@ II 4 | Printify >|-----\\ |File >|--\\ +--------+ 5 | Print >|---\\ | |Despool... | | 6 | Text Printer: name >|-\\ | | +-----------+ | +-----------------------------+ | | | +---------+ +------------+ -III 7 |[ ]Landscape | | | \\-|Directory| | As Is... | Ia +III 7 |[ ]Landscape | | | \\-|Directory| | No Prep... | Ia 8 |[ ]Print Header | | | |Buffer | +------------+ Ib 9 |[ ]Print Header Frame | | | |Region | | name >|- C 10 |[ ]Line Number | | | +---------+ +------------+ @@ -2870,8 +2905,8 @@ III 7 |[ ]Landscape | | | \\-|Directory| | As Is... | Ia 15 | Print All Pages >|--\\ | |Mode | +------------+ +-----------------------------+ | | +---------+ |[ ]Landscape| Id IV 16 |[ ]Spool Buffer | | | +-C-------+ |[ ]Duplex | Ie - 17 |[ ]Print with-faces | | \\--|( )name A| |[ ]Tumble | If - 18 |[ ]Print Using Ghostscript | | |( )name B| +------------+ + 17 |[ ]Print with faces | | \\--|( )name A| |[ ]Tumble | If + 18 |[ ]Print via Ghostscript | | |( )name B| +------------+ +-----------------------------+ | |... | V 19 |[ ]Auto Region | | |(*)name | 20 |[ ]Auto Mode | | |... | @@ -2921,8 +2956,8 @@ I. PostScript printing: switch from gnus *Summary* buffer first. NOTE 2: There are the following options for PostScript file processing: - Ia. Print the file *as is*, that is, send it directly to - PostScript printer. + Ia. Print the file *No Preprocessing*, that is, send it + directly to PostScript printer. Ib. PostScript utility processing selection. See `pr-ps-utility-alist' and `pr-setting-database' for documentation. @@ -2945,9 +2980,9 @@ I. PostScript printing: save temporarily the PostScript code generated in a buffer and print it later. The option `Despool...' despools the PostScript spooling buffer directly on a printer. If you type C-u before choosing this option, - the PostScript code generated is saved in a file instead of sending to - printer. To spool the PostScript code generated you need to turn on - the option 16. This option is enabled if spooling is on (option 16). + the PostScript code generated is saved in a file instead of sending it to + the printer. To spool the PostScript code generated you need to turn on + option 16. This option is enabled if spooling is on (option 16). See also the NOTE 1, NOTE 2 and NOTE 3 on option 1. 3. You can select a new PostScript printer to send PostScript code @@ -3032,7 +3067,7 @@ V. Printing customization: declared in `pr-mode-alist', the `*-buffer*' and `*-region*' commands behave like `*-mode*' commands. - 21. If you want that Printing menu stays poped while you are setting + 21. If you want that Printing menu stays open while you are setting toggle options, turn on this option. The variables `pr-menu-char-height' and `pr-menu-char-width' are used to guess the menu position, so don't forget to adjust these variables if menu @@ -3128,7 +3163,7 @@ The printing interface buffer has the following sections: NOTE 2: Don't forget to download and install the utilities declared on `pr-ps-utility-alist'. - * Use It AS-IS : + * No Preprocessing: If it's turned on, don't use the PostScript utility to preprocess the PostScript file before printing/previewing. @@ -3237,7 +3272,7 @@ The printing interface buffer has the following sections: behave like `*-mode*' commands. * Menu Lock: - If you want that Printing menu stays poped while you are setting + If you want that Printing menu stays open while you are setting toggle options, turn on this option. The variables `pr-menu-char-height' and `pr-menu-char-width' are used to guess the menu position, so don't forget to adjust these variables if menu @@ -3247,13 +3282,13 @@ The printing interface buffer has the following sections: To spool the PostScript code generated. You can despool later by setting Despool option on PostScript printer section. - * Print with-faces: + * Print with faces: If you use colors in your buffers and want to see these colors on your PostScript code generated, turn on this option. If you have a black/white PostScript printer, these colors are displayed in gray scale by PostScript printer interpreter. - * Print Using Ghostscript: + * Print via Ghostscript: If you don't have a PostScript printer to send PostScript files, turn on this option. When this option is on, the ghostscript is used to print PostScript files. In GNU or Unix system, if ghostscript is set @@ -3294,9 +3329,9 @@ The printing interface buffer has the following sections: (defun pr-interface (&optional buffer) "Activate the printing interface buffer. -If BUFFER is nil, it uses the current buffer for printing. +If BUFFER is nil, the current buffer is used for printing. -For more informations, type \\[pr-interface-help]." +For more information, type \\[pr-interface-help]." (interactive) (save-excursion (set-buffer (or buffer (current-buffer))) @@ -3799,7 +3834,7 @@ image in a file with that name." (and (stringp filename) (file-exists-p filename) ;; printing (let ((file (pr-expand-file-name filename))) - (if (string-equal pr-ps-command "") + (if (string= pr-ps-command "") (let ((ps-spool-buffer (get-buffer-create ps-spool-buffer-name))) (save-excursion (set-buffer ps-spool-buffer) @@ -3901,7 +3936,7 @@ bottom." (defun pr-toggle-faces () "Toggle printing with faces." (interactive) - (pr-toggle 'pr-faces-p "Printing with-faces" + (pr-toggle 'pr-faces-p "Printing with faces" 'postscript-process 1 12 'toggle)) @@ -4008,28 +4043,28 @@ bottom." ;;;###autoload (defun pr-customize (&rest ignore) - "Customization of `printing' group." + "Customization of the `printing' group." (interactive) (customize-group 'printing)) ;;;###autoload (defun lpr-customize (&rest ignore) - "Customization of `lpr' group." + "Customization of the `lpr' group." (interactive) (customize-group 'lpr)) ;;;###autoload (defun pr-help (&rest ignore) - "Help for printing package." + "Help for the printing package." (interactive) (pr-show-setup pr-help-message "*Printing Help*")) ;;;###autoload (defun pr-ps-name () - "Select interactively a PostScript printer." + "Interactively select a PostScript printer." (interactive) (pr-menu-set-ps-title (pr-complete-alist "PostScript printer" pr-ps-printer-alist pr-ps-name))) @@ -4037,7 +4072,7 @@ bottom." ;;;###autoload (defun pr-txt-name () - "Select interactively a text printer." + "Interactively select a text printer." (interactive) (pr-menu-set-txt-title (pr-complete-alist "Text printer" pr-txt-printer-alist pr-txt-name))) @@ -4045,7 +4080,7 @@ bottom." ;;;###autoload (defun pr-ps-utility () - "Select interactively a PostScript utility." + "Interactively select a PostScript utility." (interactive) (pr-menu-set-utility-title (pr-complete-alist "Postscript utility" pr-ps-utility-alist pr-ps-utility))) @@ -4527,6 +4562,10 @@ See `pr-visible-entry-alist'.") (+ index 2)) +(defvar pr-menu-position nil) +(defvar pr-menu-state nil) + + (eval-and-compile (cond ((eq ps-print-emacs-type 'xemacs) @@ -4545,8 +4584,8 @@ See `pr-visible-entry-alist'.") (defun pr-menu-position (entry index horizontal) (let ((pos (cdr (pr-e-mouse-pixel-position)))) (list - (list (car pos) ; X - (- (cdr pos) ; Y + (list (or (car pos) 0) ; X + (- (or (cdr pos) 0) ; Y (* (pr-menu-index entry index) pr-menu-char-height))) (selected-frame)))) ; frame ) @@ -4555,65 +4594,60 @@ See `pr-visible-entry-alist'.") (defun pr-menu-position (entry index horizontal) (let ((pos (cdr (pr-e-mouse-pixel-position)))) (list - (list (- (car pos) ; X + (list (- (or (car pos) 0) ; X (* horizontal pr-menu-char-width)) - (- (cdr pos) ; Y + (- (or (cdr pos) 0) ; Y (* (pr-menu-index entry index) pr-menu-char-height))) (selected-frame)))) ; frame - ))) + )) + (cond + ((eq ps-print-emacs-type 'emacs) + ;; GNU Emacs + (defun pr-menu-lookup (path) + (let ((ipath pr-menu-bar)) + (lookup-key global-map + (if path + (vconcat ipath + (mapcar 'pr-get-symbol + (if (listp path) + path + (list path)))) + ipath)))) -(defvar pr-menu-position nil) -(defvar pr-menu-state nil) - + ;; GNU Emacs + (defun pr-menu-lock (entry index horizontal state path) + (when (and (not (interactive-p)) pr-menu-lock) + (or (and pr-menu-position (eq state pr-menu-state)) + (setq pr-menu-position (pr-menu-position entry index horizontal) + pr-menu-state state)) + (let* ((menu (pr-menu-lookup path)) + (result (x-popup-menu pr-menu-position menu))) + (and result + (let ((command (lookup-key menu (vconcat result)))) + (if (fboundp command) + (funcall command) + (eval command))))) + (setq pr-menu-position nil)))) -(cond - ((eq ps-print-emacs-type 'emacs) - ;; GNU Emacs - (defun pr-menu-lock (entry index horizontal state path) - (when (and (not (interactive-p)) pr-menu-lock) - (or (and pr-menu-position (eq state pr-menu-state)) - (setq pr-menu-position (pr-menu-position entry index horizontal) - pr-menu-state state)) - (let* ((menu (pr-menu-lookup path)) - (result (x-popup-menu pr-menu-position menu))) - (and result - (let ((command (lookup-key menu (vconcat result)))) - (if (fboundp command) - (funcall command) - (eval command))))) - (setq pr-menu-position nil))) - ;; GNU Emacs - (defun pr-menu-lookup (path) - (let ((ipath pr-menu-bar)) - (lookup-key global-map - (if path - (vconcat ipath - (mapcar 'pr-get-symbol - (if (listp path) - path - (list path)))) - ipath))))) - - - ((eq ps-print-emacs-type 'xemacs) - ;; XEmacs - (defun pr-menu-lock (entry index horizontal state path) - (when (and (not (interactive-p)) pr-menu-lock) - (or (and pr-menu-position (eq state pr-menu-state)) - (setq pr-menu-position (pr-menu-position entry index horizontal) - pr-menu-state state)) - (let* ((menu (pr-menu-lookup path)) - (result (pr-x-get-popup-menu-response menu pr-menu-position))) - (and (pr-x-misc-user-event-p result) - (funcall (pr-x-event-function result) - (pr-x-event-object result)))) - (setq pr-menu-position nil))) + ((eq ps-print-emacs-type 'xemacs) + ;; XEmacs + (defun pr-menu-lookup (path) + (car (pr-x-find-menu-item current-menubar (cons "Printing" path)))) - ;; XEmacs - (defun pr-menu-lookup (path) - (car (pr-x-find-menu-item current-menubar (cons "Printing" path)))))) + ;; XEmacs + (defun pr-menu-lock (entry index horizontal state path) + (when (and (not (interactive-p)) pr-menu-lock) + (or (and pr-menu-position (eq state pr-menu-state)) + (setq pr-menu-position (pr-menu-position entry index horizontal) + pr-menu-state state)) + (let* ((menu (pr-menu-lookup path)) + (result (pr-x-get-popup-menu-response menu pr-menu-position))) + (and (pr-x-misc-user-event-p result) + (funcall (pr-x-event-function result) + (pr-x-event-object result)))) + (setq pr-menu-position nil)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -4634,7 +4668,7 @@ otherwise, update PostScript printer menu iff `pr-ps-printer-menu-modified' is non-nil, update text printer menu iff `pr-txt-printer-menu-modified' is non-nil, and update PostScript File menus iff `pr-ps-utility-menu-modified' is non-nil." - (interactive) + (interactive "P") (pr-update-var 'pr-ps-name pr-ps-printer-alist) (pr-update-var 'pr-txt-name pr-txt-printer-alist) (pr-update-var 'pr-ps-utility pr-ps-utility-alist) @@ -4642,19 +4676,19 @@ non-nil." (defvar pr-ps-printer-menu-modified t - "Non-nil means `pr-ps-printer-alist' was modified and need to update menu.") + "Non-nil means `pr-ps-printer-alist' was modified and we need to update menu.") (defvar pr-txt-printer-menu-modified t - "Non-nil means `pr-txt-printer-alist' was modified and need to update menu.") + "Non-nil means `pr-txt-printer-alist' was modified and we need to update menu.") (defvar pr-ps-utility-menu-modified t - "Non-nil means `pr-ps-utility-alist' was modified and need to update menu.") + "Non-nil means `pr-ps-utility-alist' was modified and we need to update menu.") (defconst pr-even-or-odd-alist - '((nil . "Print All Pages") - (even-page . "Print Even Pages") - (odd-page . "Print Odd Pages") + '((nil . "Print All Pages") + (even-page . "Print Even Pages") + (odd-page . "Print Odd Pages") (even-sheet . "Print Even Sheets") - (odd-sheet . "Print Odd Sheets"))) + (odd-sheet . "Print Odd Sheets"))) (defun pr-menu-create (name alist var-sym fun entry index) @@ -4881,12 +4915,12 @@ non-nil." newname) (set var-sym newname))) - +;; GNU Emacs (defun pr-menu-set-item-name (item name) (and item (setcar (nthcdr 2 item) name))) ; ITEM-NAME - +;; GNU Emacs (defun pr-menu-get-item (name-list) ;; NAME-LIST is a string or a list of strings. (let ((ipath pr-menu-bar) @@ -5471,6 +5505,8 @@ non-nil." (defun pr-command (command) "Return absolute file name specification for COMMAND. +If COMMAND is an empty string, return it. + If COMMAND is already an absolute file name specification, return it. Else it uses `pr-path-alist' to find COMMAND, if find it then return it; otherwise, gives an error. @@ -5480,14 +5516,17 @@ When using `pr-path-alist' to find COMMAND, the entries `cygwin', `windows' and If Emacs is running on Windows 95/98/NT/2000, tries to find COMMAND, COMMAND.exe, COMMAND.bat and COMMAND.com in this order." - (pr-dosify-path - (or (pr-find-command command) - (pr-path-command (cond (pr-cygwin-system 'cygwin) - (ps-windows-system 'windows) - (t 'unix)) - (file-name-nondirectory command) - nil) - (error "Command not found: %s" (file-name-nondirectory command))))) + (if (string= command "") + command + (pr-dosify-path + (or (pr-find-command command) + (pr-path-command (cond (pr-cygwin-system 'cygwin) + (ps-windows-system 'windows) + (t 'unix)) + (file-name-nondirectory command) + nil) + (error "Command not found: %s" + (file-name-nondirectory command)))))) (defun pr-path-command (symbol command sym-list) @@ -5715,7 +5754,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (if (pr-interface-directory widget) (pr-widget-field-action widget event) (ding) - (message "It should be a readable directory"))) + (message "Please specify a readable directory"))) pr-i-directory) ;; 1b. Directory: File Regexp (widget-create 'regexp @@ -5739,16 +5778,15 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (if (pr-interface-infile widget) (pr-widget-field-action widget event) (ding) - (message "It should be a readable PostScript file"))) + (message "Please specify a readable PostScript file"))) pr-i-ps-file) ;; 1c. PostScript File: PostScript Utility (pr-insert-menu "PostScript Utility" 'pr-ps-utility (pr-choice-alist pr-ps-utility-alist) "\n PostScript Utility : " " ") - ;; 1c. PostScript File: Use It AS-IS - (pr-insert-toggle 'pr-i-ps-as-is " Use It ") - (pr-insert-italic "AS-IS")) + ;; 1c. PostScript File: No Preprocessing + (pr-insert-toggle 'pr-i-ps-as-is " No Preprocessing")) (defun pr-insert-section-2 () @@ -5766,7 +5804,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (if pr-spool-p (setq pr-i-despool (not pr-i-despool)) (ding) - (message "It despool only when it's spooling") + (message "Can despool only when spooling is actually selected") (setq pr-i-despool nil)) (widget-value-set widget pr-i-despool) (widget-setup)) ; MUST be called after widget-value-set @@ -5792,7 +5830,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (y-or-n-p "File exists; overwrite? ")))) (pr-widget-field-action widget event) (ding) - (message "It should be a writable PostScript file"))) + (message "Please specify a writable PostScript file"))) pr-i-out-file) ;; 2. PostScript Printer: N-Up (widget-create @@ -5809,7 +5847,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (message " ") (setq pr-i-n-up value)) (ding) - (message "It should be an integer between 1 and 100")))) + (message "Please specify an integer between 1 and 100")))) pr-i-n-up)) @@ -5857,26 +5895,27 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (pr-update-checkbox 'pr-i-despool))) " Spool Buffer") - ;; 4. Settings: Duplex Print with-faces + ;; 4. Settings: Duplex Print with faces (pr-insert-checkbox "\n " 'ps-spool-duplex #'(lambda (&rest ignore) (setq ps-spool-duplex (not ps-spool-duplex) pr-file-duplex ps-spool-duplex)) " Duplex ") - (pr-insert-toggle 'pr-faces-p " Print with-faces") + (pr-insert-toggle 'pr-faces-p " Print with faces") - ;; 4. Settings: Tumble Print Using Ghostscript + ;; 4. Settings: Tumble Print via Ghostscript (pr-insert-checkbox "\n " 'ps-spool-tumble #'(lambda (&rest ignore) (setq ps-spool-tumble (not ps-spool-tumble) pr-file-tumble ps-spool-tumble)) " Tumble ") - (pr-insert-toggle 'pr-print-using-ghostscript " Print Using Ghostscript\n ") + (pr-insert-toggle 'pr-print-using-ghostscript " Print via Ghostscript\n ") ;; 4. Settings: Upside-Down Page Parity - (pr-insert-toggle 'ps-print-upside-down " Upside-Down ") + (pr-insert-toggle 'ps-print-upside-down " Upside-Down") + (pr-insert-italic "\n\nSelect Pages : " 2 14) (pr-insert-menu "Page Parity" 'ps-even-or-odd-pages (mapcar #'(lambda (alist) (list 'quote @@ -5962,7 +6001,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (pr-txt-buffer))) ))) ((eq pr-i-process 'file) - (error "It should be a text file")) + (error "Please specify a text file")) (t (error "Internal error: `pr-i-process' = %S" pr-i-process)) ) @@ -5987,7 +6026,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (pr-printify-region) (pr-printify-buffer)))) ((eq pr-i-process 'file) - (error "It can't printify a PostScript file")) + (error "Cannot printify a PostScript file")) (t (error "Internal error: `pr-i-process' = %S" pr-i-process)) ) @@ -6034,7 +6073,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." ((eq pr-i-process 'file) (cond ((or (file-directory-p pr-i-ps-file) (not (file-readable-p pr-i-ps-file))) - (error "It should be a readable PostScript file")) + (error "Please specify a readable PostScript file")) (pr-i-ps-as-is (pr-interface-save (funcall ps-file pr-i-ps-file))) @@ -6070,7 +6109,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (error "Internal error: `pr-i-ps-send' = %S" pr-i-ps-send)) ((or (file-directory-p pr-i-out-file) (not (file-writable-p pr-i-out-file))) - (error "It should be a writable PostScript file")) + (error "Please specify a writable PostScript file")) ((or (not (file-exists-p pr-i-out-file)) pr-i-answer-yes (setq pr-i-answer-yes @@ -6084,12 +6123,12 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (defun pr-i-directory () (or (and (file-directory-p pr-i-directory) (file-readable-p pr-i-directory)) - (error "It should be a readable directory"))) + (error "Please specify be a readable directory"))) (defun pr-interface-directory (widget &rest ignore) (and pr-buffer-verbose - (message "Type M-TAB or ESC TAB for file completion")) + (message "You can use M-TAB or ESC TAB for file completion")) (let ((dir (widget-value widget))) (and (file-directory-p dir) (file-readable-p dir) @@ -6098,7 +6137,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (defun pr-interface-infile (widget &rest ignore) (and pr-buffer-verbose - (message "Type M-TAB or ESC TAB for file completion")) + (message "You can use M-TAB or ESC TAB for file completion")) (let ((file (widget-value widget))) (and (not (file-directory-p file)) (file-readable-p file) @@ -6108,7 +6147,7 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (defun pr-interface-outfile (widget &rest ignore) (setq pr-i-answer-yes nil) (and pr-buffer-verbose - (message "Type M-TAB or ESC TAB for file completion")) + (message "You can use M-TAB or ESC TAB for file completion")) (let ((file (widget-value widget))) (and (not (file-directory-p file)) (file-writable-p file) @@ -6228,4 +6267,5 @@ COMMAND.exe, COMMAND.bat and COMMAND.com in this order." (provide 'printing) +;;; arch-tag: 9ce9ac3f-0f60-4370-900b-1943215d9d18 ;;; printing.el ends here diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 1e81b22d41..abc8db6d2c 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -1,6 +1,6 @@ ;;; ada-mode.el --- major-mode for editing Ada sources -;; Copyright (C) 1994, 95, 97, 98, 99, 2000, 2001, 2002, 2003 +;; Copyright (C) 1994, 95, 97, 98, 99, 2000, 2001, 2002, 03, 2004 ;; Free Software Foundation, Inc. ;; Author: Rolf Ebert @@ -1071,7 +1071,6 @@ name" ;;;###autoload (defun ada-mode () "Ada mode is the major mode for editing Ada code. -This version was built on $Date: 2003/05/04 19:52:34 $. Bindings are as follows: (Note: 'LFD' is control-j.) \\{ada-mode-map} @@ -1342,22 +1341,8 @@ If you use ada-xref.el: ;; Fix is: redefine a new function ada-which-function, and call it when the ;; major-mode is ada-mode. - (unless (featurep 'xemacs) - ;; This function do not require that we load which-func now. - ;; This can be done by the user if he decides to use which-func-mode - - (defadvice which-function (around ada-which-function activate) - "In Ada buffers, should work with overloaded subprograms, and does not -use imenu." - (if (equal major-mode 'ada-mode) - (set 'ad-return-value (ada-which-function)) - ad-do-it)) - - ;; So that we can activate which-func-modes for Ada mode - (if (and (boundp 'which-func-modes) - (listp which-func-modes)) - (add-to-list 'which-func-modes 'ada-mode)) - ) + (make-local-variable 'which-func-functions) + (setq which-func-functions '(ada-which-function)) ;; Support for indent-new-comment-line (Especially for XEmacs) (setq comment-multi-line nil) @@ -4747,7 +4732,6 @@ Moves to 'begin' if in a declarative part." ))) (easy-menu-define ada-mode-menu ada-mode-map "Menu keymap for Ada mode" m) - (easy-menu-add ada-mode-menu ada-mode-map) (if (featurep 'xemacs) (progn (define-key ada-mode-map [menu-bar] ada-mode-menu) @@ -5504,4 +5488,5 @@ This function typically is to be hooked into `ff-file-created-hooks'." ;;; provide ourselves (provide 'ada-mode) +;;; arch-tag: 1b7d45ec-1698-43b5-8d4a-e479ea023270 ;;; ada-mode.el ends here diff --git a/lisp/progmodes/ada-prj.el b/lisp/progmodes/ada-prj.el index 6962ecb439..de37da142c 100644 --- a/lisp/progmodes/ada-prj.el +++ b/lisp/progmodes/ada-prj.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1998, 99, 2000-2003 Free Software Foundation, Inc. ;; Author: Emmanuel Briot -;; Ada Core Technologies's version: $Revision: 1.61 $ ;; Keywords: languages, ada, project file ;; This file is part of GNU Emacs. @@ -681,4 +680,5 @@ AFTER-TEXT is inserted just after the widget." (provide 'ada-prj) +;;; arch-tag: 65978c77-816e-49c6-896e-6905605d1b4c ;;; ada-prj.el ends here diff --git a/lisp/progmodes/ada-stmt.el b/lisp/progmodes/ada-stmt.el index bb6d54a49c..3262f41bb5 100644 --- a/lisp/progmodes/ada-stmt.el +++ b/lisp/progmodes/ada-stmt.el @@ -3,8 +3,6 @@ ;; Copyright(C) 1987, 93, 94, 96, 97, 98, 99, 2000 ;; Free Software Foundation, Inc. -;; Ada Core Technologies's version: $Revision: 1.23 $ - ;; This file is part of GNU Emacs. ;; Authors: Daniel Pfeiffer, Markus Heritsch, Rolf Ebert @@ -486,4 +484,5 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'." (provide 'ada-stmt) +;;; arch-tag: 94f51555-cc0e-44e5-8865-8788aae8ecd3 ;;; ada-stmt.el ends here diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index b99ccf6959..c7b5717a1b 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -2262,4 +2262,5 @@ find-file...." (provide 'ada-xref) +;;; arch-tag: 415a39fe-577b-4676-b3b1-6ff6db7ca24e ;;; ada-xref.el ends here diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 1bdc86260a..b7bf99efa2 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ;; ;; Author: Christoph.Wedler@sap.com -;; Keywords: languages +;; Keywords: languages, ANTLR, code generator ;; Version: (see `antlr-version' below) ;; X-URL: http://antlr-mode.sourceforge.net/ @@ -55,6 +55,9 @@ ;; * Probably. Show rules/dependencies for ANT like for Makefile (does ANT ;; support vocabularies and grammar inheritance?), I have to look at ;; jde-ant.el: http://jakarta.apache.org/ant/manual/OptionalTasks/antlr.html +;; * Probably. Make `indent-region' faster, especially in actions. ELP +;; profiling in a class init action shows half the time is spent in +;; `antlr-next-rule', the other half in `c-guess-basic-syntax'. ;; * Unlikely. Sather as generated language with syntax highlighting etc/. ;; Questions/problems: is sather-mode.el the standard mode for sather, is it ;; still supported, what is its relationship to eiffel3.el? Requirement: @@ -158,7 +161,7 @@ ;; More compile-time-macros (eval-when-compile (defmacro save-buffer-state-x (&rest body) ; similar to EMACS/lazy-lock.el - (let ((modified (gensym "save-buffer-state-x-modified-"))) + (let ((modified (with-no-warnings (gensym "save-buffer-state-x-modified-")))) `(let ((,modified (buffer-modified-p))) (unwind-protect (let ((buffer-undo-list t) (inhibit-read-only t) @@ -173,12 +176,23 @@ ;; get rid of byte-compile warnings (eval-when-compile ; required and optional libraries - (ignore-errors (require 'cc-mode)) + (require 'cc-mode) (ignore-errors (require 'font-lock)) (ignore-errors (require 'compile)) + ;;(ignore-errors (defun c-init-language-vars))) dangerous on Emacs! + ;;(ignore-errors (defun c-init-c-language-vars))) dangerous on Emacs! + ;;(ignore-errors (defun c-basic-common-init)) dangerous on Emacs! (defvar outline-level) (defvar imenu-use-markers) - (defvar imenu-create-index-function) - (ignore-errors (defun c-init-language-vars))) + (defvar imenu-create-index-function)) + +;; We cannot use `c-forward-syntactic-ws' directly since it is a macro since +;; cc-mode-5.30 => antlr-mode compiled with older cc-mode would fail (macro +;; call) when used with newer cc-mode. Also, antlr-mode compiled with newer +;; cc-mode would fail (undefined `c-forward-sws') when used with older cc-mode. +;; Additional to the `defalias' below, we must set `antlr-c-forward-sws' to +;; `c-forward-syntactic-ws' when `c-forward-sws' is not defined after requiring +;; cc-mode. +(defalias 'antlr-c-forward-sws 'c-forward-sws) ;;;;########################################################################## @@ -193,7 +207,7 @@ :link '(url-link "http://antlr-mode.sourceforge.net/") :prefix "antlr-") -(defconst antlr-version "2.2b" +(defconst antlr-version "2.2c" "ANTLR major mode version number. Check for the newest.") @@ -1190,7 +1204,7 @@ strings and actions/semantic predicates." Return position before the comments after the last expression." (goto-char (or (ignore-errors-x (scan-sexps (point) count)) (point-max))) (prog1 (point) - (c-forward-syntactic-ws))) + (antlr-c-forward-sws))) ;;;=========================================================================== @@ -1272,7 +1286,7 @@ header. If SKIP-COMMENT is non-nil, also skip the comment after that part." (let ((pos (point)) (class nil)) - (c-forward-syntactic-ws) + (antlr-c-forward-sws) (while (looking-at "options\\>\\|tokens\\>") (setq class t) (setq pos (antlr-skip-sexps 2))) @@ -1298,7 +1312,7 @@ Hack: if SKIP-COMMENT is `header-only' only skip header and return position before the comment after the header." (let* ((pos (point)) (pos0 pos)) - (c-forward-syntactic-ws) + (antlr-c-forward-sws) (if skip-comment (setq pos0 (point))) (while (looking-at "header\\>[ \t]*\\(\"\\)?") (setq pos (antlr-skip-sexps (if (match-beginning 1) 3 2)))) @@ -1360,7 +1374,7 @@ Move to the beginning of the current rule if point is inside a rule." (let ((pos (point))) (antlr-next-rule -1 nil) (let ((between (or (bobp) (< (point) pos)))) - (c-forward-syntactic-ws) + (antlr-c-forward-sws) (and between (> (point) pos) (goto-char pos))))) @@ -1420,7 +1434,7 @@ prefix arg MSG, move to `:'." (or (antlr-search-forward ":") (point-max)))) (goto-char orig) (error msg)) - (c-forward-syntactic-ws)))))) + (antlr-c-forward-sws)))))) (defunx antlr-beginning-of-body () "Move to the first element after the `:' of the current rule." @@ -1598,7 +1612,7 @@ This command might also set the mark like \\[set-mark-command] does, see (defun antlr-insert-option-interactive (arg) "Interactive specification for `antlr-insert-option'. -Use prefix argument ARG to return \(LEVEL OPTION LOCATION)." +Return \(LEVEL OPTION LOCATION)." (barf-if-buffer-read-only) (if arg (setq arg (prefix-numeric-value arg))) (unless (memq arg '(nil 1 2 3 4)) @@ -1627,7 +1641,7 @@ Use prefix argument ARG to return \(LEVEL OPTION LOCATION)." :active active)) (sort (mapcar 'car (elt antlr-options-alists (1- level))) 'string-lessp)))) - + ;;;=========================================================================== ;;; Insert option: determine section-kind @@ -1653,7 +1667,7 @@ like \(AREA \. PLACE), see `antlr-option-location'." (setq pos (antlr-skip-file-prelude 'header-only))) ((not (eq level 3)) ; grammar or subrule options (setq pos (point)) - (c-forward-syntactic-ws)) + (antlr-c-forward-sws)) ((looking-at "^\\(private[ \t\n]\\|public[ \t\n]\\|protected[ \t\n]\\)?[ \t\n]*\\(\\(\\sw\\|\\s_\\)+\\)[ \t\n]*\\(!\\)?[ \t\n]*\\(\\[\\)?") ;; rule options, with complete rule header (goto-char (or (match-end 4) (match-end 3))) @@ -1904,7 +1918,7 @@ For OLD, see `antlr-insert-option-do'." ;; stuff (no =, {, } or /) at point is not followed by ";" (insert ";") (backward-char))) - + (defun antlr-insert-option-space (area old) "Find appropriate place to insert option, insert newlines/spaces. For AREA and OLD, see `antlr-insert-option-do'." @@ -1924,7 +1938,7 @@ For AREA and OLD, see `antlr-insert-option-do'." (setq orig (point)) (goto-char orig))) (skip-chars-forward " \t") - + (if (looking-at "$\\|//") ;; just comment after point => skip (+ lines w/ same col comment) (let ((same (if (> (match-end 0) (match-beginning 0)) @@ -1959,7 +1973,7 @@ Used by `antlr-insert-option-do'." (when (and antlr-options-auto-colon (memq level '(3 4)) (save-excursion - (c-forward-syntactic-ws) + (antlr-c-forward-sws) (if (eq (char-after (point)) ?\{) (antlr-skip-sexps 1)) (not (eq (char-after (point)) ?\:)))) (insert "\n:") @@ -2079,12 +2093,12 @@ its export vocabulary is used as an import vocabulary." (evocab (or default-vocab class)) (ivocab nil)) (goto-char (match-end 0)) - (c-forward-syntactic-ws) + (antlr-c-forward-sws) (while (looking-at "options\\>\\|\\(tokens\\)\\>") (if (match-beginning 1) (antlr-skip-sexps 2) (goto-char (match-end 0)) - (c-forward-syntactic-ws) + (antlr-c-forward-sws) ;; parse grammar option sections ------------------------------- (when (eq (char-after (point)) ?\{) (let* ((beg (1+ (point))) @@ -2341,7 +2355,7 @@ commentary with value `antlr-help-unknown-file-text' is added. The (defun antlr-indent-line () "Indent the current line as ANTLR grammar code. -The indentation of non-comment lines are calculated by `c-basic-offset', +The indentation of grammar lines are calculated by `c-basic-offset', multiplied by: - the level of the paren/brace/bracket depth, - plus 0/2/1, depending on the position inside the rule: header, body, @@ -2484,20 +2498,46 @@ ANTLR's syntax and influences the auto indentation, see ;;; Mode entry ;;;=========================================================================== +(defun antlr-c-init-language-vars () + "Like `c-init-language-vars-for' when using cc-mode before v5.29." + (let ((settings ; (cdr '(setq...)) will be optimized + (if (eq antlr-language 'c++-mode) + (cdr '(setq ;' from `c++-mode' v5.20, v5.28 + c-keywords (c-identifier-re c-C++-keywords) + c-conditional-key c-C++-conditional-key + c-comment-start-regexp c-C++-comment-start-regexp + c-class-key c-C++-class-key + c-extra-toplevel-key c-C++-extra-toplevel-key + c-access-key c-C++-access-key + c-recognize-knr-p nil + c-bitfield-key c-C-bitfield-key ; v5.28 + )) + (cdr '(setq ; from `java-mode' v5.20, v5.28 + c-keywords (c-identifier-re c-Java-keywords) + c-conditional-key c-Java-conditional-key + c-comment-start-regexp c-Java-comment-start-regexp + c-class-key c-Java-class-key + c-method-key nil + c-baseclass-key nil + c-recognize-knr-p nil + c-access-key c-Java-access-key ; v5.20 + c-inexpr-class-key c-Java-inexpr-class-key ; v5.28 + ))))) + (while settings + (when (boundp (car settings)) + (ignore-errors + (set (car settings) (eval (cadr settings))))) + (setq settings (cddr settings))))) + (defun antlr-c-common-init () - "Like `c-common-init' except menu, auto-hungry and c-style stuff." + "Like `c-basic-common-init' when using cc-mode before v5.30." ;; X/Emacs 20 only (make-local-variable 'paragraph-start) (make-local-variable 'paragraph-separate) (make-local-variable 'paragraph-ignore-fill-prefix) (make-local-variable 'require-final-newline) (make-local-variable 'parse-sexp-ignore-comments) - (make-local-variable 'indent-line-function) - (make-local-variable 'indent-region-function) (make-local-variable 'comment-start) - (make-local-variable 'comment-end) - (make-local-variable 'comment-column) - (make-local-variable 'comment-start-skip) (make-local-variable 'comment-multi-line) (make-local-variable 'outline-regexp) (make-local-variable 'outline-level) @@ -2515,14 +2555,8 @@ ANTLR's syntax and influences the auto indentation, see (setq paragraph-start (concat page-delimiter "\\|$") paragraph-separate paragraph-start paragraph-ignore-fill-prefix t - require-final-newline t parse-sexp-ignore-comments t - indent-line-function 'c-indent-line - indent-region-function 'c-indent-region - outline-regexp "[^#\n\^M]" - outline-level 'c-outline-level comment-column 32 - comment-start-skip "/\\*+ *\\|// *" comment-multi-line nil comment-line-break-function 'c-comment-line-break-function adaptive-fill-regexp nil @@ -2563,14 +2597,15 @@ the default language." (setq r nil))) ; no result yet (car r))) - ;;;###autoload (defun antlr-mode () "Major mode for editing ANTLR grammar files. \\{antlr-mode-map}" (interactive) - (c-initialize-cc-mode) ; required when depending on cc-mode (kill-all-local-variables) + (c-initialize-cc-mode) ; cc-mode is required + (unless (fboundp 'c-forward-sws) ; see above + (fset 'antlr-c-forward-sws 'c-forward-syntactic-ws)) ;; ANTLR specific ---------------------------------------------------------- (setq major-mode 'antlr-mode mode-name "Antlr") @@ -2597,42 +2632,34 @@ the default language." (concat "Antlr." (cadr (assq antlr-language antlr-language-alist))))) ;; indentation, for the C engine ------------------------------------------- - (antlr-c-common-init) + (setq c-buffer-is-cc-mode antlr-language) + (cond ((fboundp 'c-init-language-vars-for) ; cc-mode 5.30.5+ + (c-init-language-vars-for antlr-language)) + ((fboundp 'c-init-c-language-vars) ; cc-mode 5.30 to 5.30.4 + (c-init-c-language-vars) ; not perfect, but OK + (setq c-recognize-knr-p nil)) + ((fboundp 'c-init-language-vars) ; cc-mode 5.29 + (let ((init-fn 'c-init-language-vars)) + (funcall init-fn))) ; is a function in v5.29 + (t ; cc-mode upto 5.28 + (antlr-c-init-language-vars))) ; do it myself + (cond ((fboundp 'c-basic-common-init) ; cc-mode 5.30+ + (c-basic-common-init antlr-language (or antlr-indent-style "gnu"))) + (t + (antlr-c-common-init))) + (make-local-variable 'outline-regexp) + (make-local-variable 'outline-level) + (make-local-variable 'require-final-newline) + (make-local-variable 'indent-line-function) + (make-local-variable 'indent-region-function) + (setq outline-regexp "[^#\n\^M]" + outline-level 'c-outline-level) ; TODO: define own + (setq require-final-newline t) (setq indent-line-function 'antlr-indent-line indent-region-function nil) ; too lazy - (setq c-buffer-is-cc-mode antlr-language) - (if (fboundp 'c-init-language-vars) - (c-init-language-vars) ; cc-mode >= v5.29 - (let ((settings ; (cdr '(setq...)) will be optimized - (if (eq antlr-language 'c++-mode) - (cdr '(setq ;' from `c++-mode' v5.20, v5.28 - c-keywords (c-identifier-re c-C++-keywords) - c-conditional-key c-C++-conditional-key - c-comment-start-regexp c-C++-comment-start-regexp - c-class-key c-C++-class-key - c-extra-toplevel-key c-C++-extra-toplevel-key - c-access-key c-C++-access-key - c-recognize-knr-p nil - c-bitfield-key c-C-bitfield-key ; v5.28 - )) - (cdr '(setq ; from `java-mode' v5.20, v5.28 - c-keywords (c-identifier-re c-Java-keywords) - c-conditional-key c-Java-conditional-key - c-comment-start-regexp c-Java-comment-start-regexp - c-class-key c-Java-class-key - c-method-key nil - c-baseclass-key nil - c-recognize-knr-p nil - c-access-key c-Java-access-key ; v5.20 - c-inexpr-class-key c-Java-inexpr-class-key ; v5.28 - ))))) - (while settings - (when (boundp (car settings)) - (ignore-errors - (set (car settings) (eval (cadr settings))))) - (setq settings (cddr settings))))) (setq comment-start "// " - comment-end "") + comment-end "" + comment-start-skip "/\\*+ *\\|// *") ;; various ----------------------------------------------------------------- (make-local-variable 'font-lock-defaults) (setq font-lock-defaults antlr-font-lock-defaults) @@ -2669,4 +2696,6 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'." alist nil)))))) ;;; Local IspellPersDict: .ispell_antlr + +;;; arch-tag: 5de2be79-3d13-4560-8fbc-f7d0234dcb5c ;;; antlr-mode.el ends here diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el index a3134e3514..76d12aa6f6 100644 --- a/lisp/progmodes/asm-mode.el +++ b/lisp/progmodes/asm-mode.el @@ -238,4 +238,5 @@ repeatedly until you are satisfied with the kind of comment." (provide 'asm-mode) +;;; arch-tag: 210e695f-f338-4376-8913-a4c5c72ac848 ;;; asm-mode.el ends here diff --git a/lisp/progmodes/autoconf.el b/lisp/progmodes/autoconf.el index a2a2b63a85..5bdb1fb25e 100644 --- a/lisp/progmodes/autoconf.el +++ b/lisp/progmodes/autoconf.el @@ -1,10 +1,9 @@ ;;; autoconf.el --- mode for editing Autoconf configure.in files -;; Copyright (C) 2000 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2003 Free Software Foundation, Inc. ;; Author: Dave Love ;; Keywords: languages -;; $Revision: 1.3 $ ;; This file is part of GNU Emacs. @@ -50,7 +49,7 @@ "AC_\\(SUBST\\|DEFINE\\(_UNQUOTED\\)?\\)(\\(\\sw+\\)") (defvar autoconf-font-lock-keywords - `(("A[CM]_\\sw+" . font-lock-keyword-face) + `(("A[CHM]_\\sw+" . font-lock-keyword-face) (,autoconf-definition-regexp 3 font-lock-function-name-face) ;; Are any other M4 keywords really appropriate for configure.in, @@ -108,4 +107,5 @@ searching backwards at another AC_... command." (provide 'autoconf-mode) +;;; arch-tag: 4f44778f-2ab3-49a1-a103-f0acb9df2de4 ;;; autoconf.el ends here diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el index 2f1625854a..b51a304c53 100644 --- a/lisp/progmodes/cc-align.el +++ b/lisp/progmodes/cc-align.el @@ -708,18 +708,20 @@ arglist-cont-nonempty." (save-excursion (beginning-of-line) (when (c-syntactic-re-search-forward - ;; This regexp avoids matches on ==. - "\\(\\=\\|[^=]\\)=\\([^=]\\|$\\)" - (c-point 'eol) t t) - (setq equalp (- (match-beginning 2) (c-point 'boi)))))) + c-assignment-op-regexp + (c-point 'eol) t t t) + (setq equalp (- (or (match-beginning 1) + (match-end 0)) + (c-point 'boi)))))) (save-excursion (goto-char startpos) (if (or (if (c-syntactic-re-search-forward - "\\(\\=\\|[^=]\\)=\\([^=]\\|$\\)" - (min endpos (c-point 'eol)) t t) + c-assignment-op-regexp + (min endpos (c-point 'eol)) t t t) (progn - (goto-char (match-beginning 2)) + (goto-char (or (match-beginning 1) + (match-end 0))) nil) t) (save-excursion @@ -1119,35 +1121,20 @@ ACTION associated with `block-close' syntax." '(before after))))) (defun c-gnu-impose-minimum () - "Imposes a minimum indentation for lines inside a top-level construct. + "Imposes a minimum indentation for lines inside code blocks. The variable `c-label-minimum-indentation' specifies the minimum indentation amount." - ;; Don't adjust macro or comment-only lines. - (unless (or (assq 'cpp-macro c-syntactic-context) - (assq 'comment-intro c-syntactic-context)) - - (let ((paren-state (save-excursion - ;; Get the parenthesis state, but skip past - ;; an initial closing paren on the line since - ;; the close brace of a block shouldn't be - ;; considered to be inside the block. - (back-to-indentation) - (when (looking-at "\\s\)") - (forward-char)) - (c-parse-state)))) - - ;; Search for an enclosing brace on paren-state. - (while (and paren-state - (not (and (integer-or-marker-p (car paren-state)) - (eq (char-after (car paren-state)) ?{)))) - (setq paren-state (cdr paren-state))) - - (when paren-state - (save-excursion - (back-to-indentation) - (if (zerop (current-column)) - (insert-char ?\ c-label-minimum-indentation t))))))) + (when (and (not + ;; Don't adjust macro or comment-only lines. + (or (assq 'cpp-macro c-syntactic-context) + (assq 'comment-intro c-syntactic-context))) + (c-intersect-lists c-inside-block-syms c-syntactic-context) + (save-excursion + (back-to-indentation) + (< (current-column) c-label-minimum-indentation))) + (c-shift-line-indentation (- c-label-minimum-indentation + (current-indentation))))) ;; Useful for c-hanging-semi&comma-criteria @@ -1206,4 +1193,5 @@ For other semicolon contexts, no determination is made." (cc-provide 'cc-align) +;;; arch-tag: 4d71ed28-bf51-4509-a148-f39669669a2e ;;; cc-align.el ends here diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index 529d6a7da1..dbcfa9d991 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el @@ -902,4 +902,6 @@ no explicit action; see function `c-awk-beginning-of-defun'." (goto-char (min start-point end-point))))))) (cc-provide 'cc-awk) ; Changed from 'awk-mode, ACM 2002/5/21 + +;;; arch-tag: c4836289-3aa4-4a59-9934-9ccc2bacccf3 ;;; awk-mode.el ends here diff --git a/lisp/progmodes/cc-bytecomp.el b/lisp/progmodes/cc-bytecomp.el index efaf2ea79c..e0072723d6 100644 --- a/lisp/progmodes/cc-bytecomp.el +++ b/lisp/progmodes/cc-bytecomp.el @@ -435,4 +435,5 @@ exclude any functions that have been bound during compilation with (provide 'cc-bytecomp) +;;; arch-tag: 2d71b3ad-57b0-4b13-abd3-ab836e08f975 ;;; cc-bytecomp.el ends here diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index f254cf6b06..c6f60d3dcc 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -54,37 +54,6 @@ (defvar c-fix-backslashes t) -(defun c-shift-line-indentation (shift-amt) - ;; This function does not do any hidden buffer changes. - (let ((pos (- (point-max) (point))) - (c-macro-start c-macro-start) - tmp-char-inserted) - (if (zerop shift-amt) - nil - (when (and (c-query-and-set-macro-start) - (looking-at "[ \t]*\\\\$") - (save-excursion - (skip-chars-backward " \t") - (bolp))) - (insert ?x) - (backward-char) - (setq tmp-char-inserted t)) - (unwind-protect - (let ((col (current-indentation))) - (delete-region (c-point 'bol) (c-point 'boi)) - (beginning-of-line) - (indent-to (+ col shift-amt))) - (when tmp-char-inserted - (delete-char 1)))) - ;; If initial point was within line's indentation and we're not on - ;; a line with a line continuation in a macro, position after the - ;; indentation. Else stay at same point in text. - (if (and (< (point) (c-point 'boi)) - (not tmp-char-inserted)) - (back-to-indentation) - (if (> (- (point-max) pos) (point)) - (goto-char (- (point-max) pos)))))) - (defun c-indent-line (&optional syntax quiet ignore-point-pos) "Indent the current line according to the syntactic context, if `c-syntactic-indentation' is non-nil. Optional SYNTAX is the @@ -498,10 +467,21 @@ This function does various newline cleanups based on the value of (when (save-excursion (skip-chars-backward " \t") (not (bolp))) - (setq delete-temp-newline - (list (point-marker))) (c-newline-and-indent) - (setcdr delete-temp-newline (point-marker))) + ;; Set markers around the newline and indention inserted + ;; above. We insert the start marker here and not before + ;; the call to kludge around a misfeature in expand-abbrev: + ;; If the line contains e.g. "else" then expand-abbrev will + ;; be called when c-newline-and-indent inserts the newline. + ;; That function first removes the abbrev "else" and then + ;; inserts the expansion, which is an identical "else" in + ;; this case. So the marker that we put after "else" would + ;; end up before it. + (setq delete-temp-newline + (cons (save-excursion + (c-backward-syntactic-ws) + (copy-marker (point) t)) + (point-marker)))) (unwind-protect (progn (if (eq last-command-char ?{) @@ -2662,7 +2642,7 @@ command to conveniently insert and align the necessary backslashes." ;; There's no nonempty prefix on the line after the ;; comment opener. If the line is empty, or if the - ;; text on has less or equal indentation than the + ;; text on it has less or equal indentation than the ;; comment starter we assume it's an unclosed ;; comment starter, i.e. that ;; `c-block-comment-prefix' should be used. @@ -3505,4 +3485,5 @@ normally bound to C-o. See `c-context-line-break' for the details." (cc-provide 'cc-cmds) +;;; arch-tag: bf0611dc-d1f4-449e-9e45-4ec7c6936677 ;;; cc-cmds.el ends here diff --git a/lisp/progmodes/cc-compat.el b/lisp/progmodes/cc-compat.el index 3d0756c5ed..9ddfe3a6a1 100644 --- a/lisp/progmodes/cc-compat.el +++ b/lisp/progmodes/cc-compat.el @@ -160,4 +160,6 @@ This is in addition to c-continued-statement-offset.") (cc-provide 'cc-compat) + +;;; arch-tag: 564dab2f-e6ad-499c-a4a3-fedec3ecc192 ;;; cc-compat.el ends here diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index ebb5047e05..ad8b8a92bf 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -100,12 +100,12 @@ font-lock-keywords))) (cc-load "cc-fix"))) -(cc-external-require 'cl) +(eval-when-compile (require 'cl)) ;;; Variables also used at compile time. -(defconst c-version "5.30.5" +(defconst c-version "5.30.8" "CC Mode version number.") (defconst c-version-sym (intern c-version)) @@ -115,10 +115,10 @@ "Non-nil for all buffers with a major mode derived from CC Mode. Otherwise, this variable is nil. I.e. this variable is non-nil for `c-mode', `c++-mode', `objc-mode', `java-mode', `idl-mode', -`pike-mode', and any other non-CC Mode mode that calls -`c-initialize-cc-mode' (e.g. `awk-mode'). The value is the mode -symbol itself (i.e. `c-mode' etc) of the original CC Mode mode, or -just t if it's not known.") +`pike-mode', `awk-mode', and any other non-CC Mode mode that calls +`c-initialize-cc-mode'. The value is the mode symbol itself +\(i.e. `c-mode' etc) of the original CC Mode mode, or just t if it's +not known.") (make-variable-buffer-local 'c-buffer-is-cc-mode) ;; Have to make `c-buffer-is-cc-mode' permanently local so that it @@ -1001,8 +1001,8 @@ This function does not do any hidden buffer changes." (defun c-make-keywords-re (adorn list &optional mode) "Make a regexp that matches all the strings the list. -Duplicates in the list are removed. The regexp may contain zero or -more submatch expressions. +Duplicates in the list are removed. The resulting regexp may contain +zero or more submatch expressions. If ADORN is non-nil there will be at least one submatch and the first matches the whole keyword, and the regexp will also not match a prefix @@ -1010,6 +1010,7 @@ of any identifier. Adorned regexps cannot be appended. The language variable `c-nonsymbol-key' is used to make the adornment. The optional MODE specifies the language to get it in. The default is the current language (taken from `c-buffer-is-cc-mode')." + (let (unique) (dolist (elt list) (unless (member elt unique) @@ -1017,6 +1018,27 @@ current language (taken from `c-buffer-is-cc-mode')." (setq list unique)) (if list (let ((re (c-regexp-opt list))) + + ;; Emacs < 21 and XEmacs (all versions so far) has a buggy + ;; regexp-opt that doesn't always cope with strings containing + ;; newlines. This kludge doesn't handle shy parens correctly + ;; so we can't advice regexp-opt directly with it. + (let (fail-list) + (while list + (and (string-match "\n" (car list)) ; To speed it up a little. + (not (string-match (concat "\\`\\(" re "\\)\\'") + (car list))) + (setq fail-list (cons (car list) fail-list))) + (setq list (cdr list))) + (when fail-list + (setq re (concat re + "\\|" + (mapconcat 'regexp-quote + (sort fail-list + (lambda (a b) + (> (length a) (length b)))) + "\\|"))))) + ;; Add our own grouping parenthesis around re instead of ;; passing adorn to `regexp-opt', since in XEmacs it makes the ;; top level grouping "shy". @@ -1026,10 +1048,12 @@ current language (taken from `c-buffer-is-cc-mode')." (c-get-lang-constant 'c-nonsymbol-key nil mode) "\\|$\\)") re)) + ;; Produce a regexp that matches nothing. (if adorn "\\(\\<\\>\\)" "\\<\\>"))) + (put 'c-make-keywords-re 'lisp-indent-function 1) @@ -1564,4 +1588,5 @@ This macro does not do any hidden buffer changes." (cc-provide 'cc-defs) +;;; arch-tag: 3bb2629d-dd84-4ff0-ad39-584be0fe3cda ;;; cc-defs.el ends here diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 15acecfa2a..2e90758930 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -197,6 +197,75 @@ (make-variable-buffer-local 'c-type-decl-end-used) +;; Basic handling of preprocessor directives. + +;; This is a dynamically bound cache used together with +;; `c-query-macro-start' and `c-query-and-set-macro-start'. It only +;; works as long as point doesn't cross a macro boundary. +(defvar c-macro-start 'unknown) + +(defsubst c-query-and-set-macro-start () + ;; This function does not do any hidden buffer changes. + (if (symbolp c-macro-start) + (setq c-macro-start (save-excursion + (and (c-beginning-of-macro) + (point)))) + c-macro-start)) + +(defsubst c-query-macro-start () + ;; This function does not do any hidden buffer changes. + (if (symbolp c-macro-start) + (save-excursion + (and (c-beginning-of-macro) + (point))) + c-macro-start)) + +(defun c-beginning-of-macro (&optional lim) + "Go to the beginning of a preprocessor directive. +Leave point at the beginning of the directive and return t if in one, +otherwise return nil and leave point unchanged. + +This function does not do any hidden buffer changes." + (when c-opt-cpp-prefix + (let ((here (point))) + (save-restriction + (if lim (narrow-to-region lim (point-max))) + (beginning-of-line) + (while (eq (char-before (1- (point))) ?\\) + (forward-line -1)) + (back-to-indentation) + (if (and (<= (point) here) + (looking-at c-opt-cpp-start)) + t + (goto-char here) + nil))))) + +(defun c-end-of-macro () + "Go to the end of a preprocessor directive. +More accurately, move point to the end of the closest following line +that doesn't end with a line continuation backslash. + +This function does not do any hidden buffer changes." + (while (progn + (end-of-line) + (when (and (eq (char-before) ?\\) + (not (eobp))) + (forward-char) + t)))) + +(defun c-forward-to-cpp-define-body () + ;; Assuming point is at the "#" that introduces a preprocessor + ;; directive, it's moved forward to the start of the definition body + ;; if it's a "#define". Non-nil is returned in this case, in all + ;; other cases nil is returned and point isn't moved. + (when (and (looking-at + (concat "#[ \t]*" + "define[ \t]+\\(\\sw\\|_\\)+\\(\([^\)]*\)\\)?" + "\\([ \t]\\|\\\\\n\\)*")) + (not (= (match-end 0) (c-point 'eol)))) + (goto-char (match-end 0)))) + + ;;; Basic utility functions. (defun c-syntactic-content (from to) @@ -268,6 +337,37 @@ (defvar c-literal-faces '(font-lock-comment-face font-lock-string-face)) +(defun c-shift-line-indentation (shift-amt) + ;; This function does not do any hidden buffer changes. + (let ((pos (- (point-max) (point))) + (c-macro-start c-macro-start) + tmp-char-inserted) + (if (zerop shift-amt) + nil + (when (and (c-query-and-set-macro-start) + (looking-at "[ \t]*\\\\$") + (save-excursion + (skip-chars-backward " \t") + (bolp))) + (insert ?x) + (backward-char) + (setq tmp-char-inserted t)) + (unwind-protect + (let ((col (current-indentation))) + (delete-region (c-point 'bol) (c-point 'boi)) + (beginning-of-line) + (indent-to (+ col shift-amt))) + (when tmp-char-inserted + (delete-char 1)))) + ;; If initial point was within line's indentation and we're not on + ;; a line with a line continuation in a macro, position after the + ;; indentation. Else stay at same point in text. + (if (and (< (point) (c-point 'boi)) + (not tmp-char-inserted)) + (back-to-indentation) + (if (> (- (point-max) pos) (point)) + (goto-char (- (point-max) pos)))))) + ;; Some debug tools to visualize various special positions. This ;; debug code isn't as portable as the rest of CC Mode. @@ -592,7 +692,7 @@ COMMA-DELIM is non-nil then ',' is treated likewise." ;; The PDA state handling. ;; - ;; Refer to the description of the PDA in the openining + ;; Refer to the description of the PDA in the opening ;; comments. In the following OR form, the first leaf ;; attempts to handles one of the specific actions detailed ;; (e.g., finding token "if" whilst in state `else-boundary'). @@ -769,7 +869,9 @@ COMMA-DELIM is non-nil then ',' is treated likewise." sym 'boundary) (throw 'loop t))) ; like a C "continue". Analyze the next sexp. - (when (and (numberp c-maybe-labelp) (not ignore-labels)) + (when (and (numberp c-maybe-labelp) + (not ignore-labels) + (not (looking-at "\\s\("))) ;; c-crosses-statement-barrier-p has found a colon, so ;; we might be in a label now. (if (not after-labels-pos) @@ -1012,75 +1114,6 @@ This function does not do any hidden buffer changes." t)))))) -;; Basic handling of preprocessor directives. - -;; This is a dynamically bound cache used together with -;; `c-query-macro-start' and `c-query-and-set-macro-start'. It only -;; works as long as point doesn't cross a macro boundary. -(defvar c-macro-start 'unknown) - -(defsubst c-query-and-set-macro-start () - ;; This function does not do any hidden buffer changes. - (if (symbolp c-macro-start) - (setq c-macro-start (save-excursion - (and (c-beginning-of-macro) - (point)))) - c-macro-start)) - -(defsubst c-query-macro-start () - ;; This function does not do any hidden buffer changes. - (if (symbolp c-macro-start) - (save-excursion - (and (c-beginning-of-macro) - (point))) - c-macro-start)) - -(defun c-beginning-of-macro (&optional lim) - "Go to the beginning of a preprocessor directive. -Leave point at the beginning of the directive and return t if in one, -otherwise return nil and leave point unchanged. - -This function does not do any hidden buffer changes." - (when c-opt-cpp-prefix - (let ((here (point))) - (save-restriction - (if lim (narrow-to-region lim (point-max))) - (beginning-of-line) - (while (eq (char-before (1- (point))) ?\\) - (forward-line -1)) - (back-to-indentation) - (if (and (<= (point) here) - (looking-at c-opt-cpp-start)) - t - (goto-char here) - nil))))) - -(defun c-end-of-macro () - "Go to the end of a preprocessor directive. -More accurately, move point to the end of the closest following line -that doesn't end with a line continuation backslash. - -This function does not do any hidden buffer changes." - (while (progn - (end-of-line) - (when (and (eq (char-before) ?\\) - (not (eobp))) - (forward-char) - t)))) - -(defun c-forward-to-cpp-define-body () - ;; Assuming point is at the "#" that introduces a preprocessor - ;; directive, it's moved forward to the start of the definition body - ;; if it's a "#define". Non-nil is returned in this case, in all - ;; other cases nil is returned and point isn't moved. - (when (and (looking-at - (concat "#[ \t]*" - "define[ \t]+\\(\\sw\\|_\\)+\\(\([^\)]*\)\\)?" - "\\([ \t]\\|\\\\\n\\)*")) - (not (= (match-end 0) (c-point 'eol)))) - (goto-char (match-end 0)))) - - ;; Tools for skipping over syntactic whitespace. ;; The following functions use text properties to cache searches over @@ -1740,10 +1773,10 @@ This function does not do any hidden buffer changes." ;; If point-min has moved forward then we just need to cut ;; off a bit of the tail. (let ((ptr (cons nil c-state-cache)) elem) - (while (and (setq elem (cdr ptr)) + (while (and (setq elem (car-safe (cdr ptr))) (>= (if (consp elem) (car elem) elem) (point-min))) - (setq ptr elem)) + (setq ptr (cdr ptr))) (when (consp ptr) (if (eq (cdr ptr) c-state-cache) (setq c-state-cache nil) @@ -2451,7 +2484,8 @@ syntactic whitespace." (< check-pos (save-excursion (goto-char check-pos) - (c-end-of-current-token last-token-end-pos) + (save-match-data + (c-end-of-current-token last-token-end-pos)) (setq last-token-end-pos (point)))))) ;; Match inside a token. (cond ((<= (point) bound) @@ -2516,9 +2550,7 @@ syntactic whitespace." i.e. don't stop at positions inside syntactic whitespace or string literals. Preprocessor directives are also ignored, with the exception of the one that the point starts within, if any. If LIMIT is given, -it's assumed to be at a syntactically relevant position. - -This function does not do any hidden buffer changes." +it's assumed to be at a syntactically relevant position." (let ((start (point)) ;; A list of syntactically relevant positions in descending @@ -3351,9 +3383,20 @@ This function does not do any hidden buffer changes." (defvar c-promote-possible-types nil) ;; Dynamically bound variable that instructs `c-forward-<>-arglist' to -;; not accept arglists that contain more than one argument. It's used -;; to handle ambiguous cases like "foo (a < b, c > d)" better. -(defvar c-disallow-comma-in-<>-arglists nil) +;; not accept arglists that contain binary operators. +;; +;; This is primarily used to handle C++ template arglists. C++ +;; disambiguates them by checking whether the preceding name is a +;; template or not. We can't do that, so we assume it is a template +;; if it can be parsed as one. That usually works well since +;; comparison expressions on the forms "a < b > c" or "a < b, c > d" +;; in almost all cases would be pointless. +;; +;; However, in function arglists, e.g. in "foo (a < b, c > d)", we +;; should let the comma separate the function arguments instead. And +;; in a context where the value of the expression is taken, e.g. in +;; "if (a < b || c > d)", it's probably not a template. +(defvar c-restricted-<>-arglists nil) ;; Dynamically bound variables that instructs `c-forward-name', ;; `c-forward-type' and `c-forward-<>-arglist' to record the ranges of @@ -3494,13 +3537,13 @@ This function does not do any hidden buffer changes." (eq (char-after) ?<) (c-forward-<>-arglist (c-keyword-member kwd-sym 'c-<>-type-kwds) (or c-record-type-identifiers - c-disallow-comma-in-<>-arglists))) + c-restricted-<>-arglists))) (c-forward-syntactic-ws) (setq safe-pos (point))) ((and (c-keyword-member kwd-sym 'c-nonsymbol-sexp-kwds) - (not (looking-at c-symbol-start))) - (c-forward-sexp) + (not (looking-at c-symbol-start)) + (c-safe (c-forward-sexp) t)) (c-forward-syntactic-ws) (setq safe-pos (point)))) @@ -3543,16 +3586,7 @@ This function does not do any hidden buffer changes." ;; necessary if the various side effects, e.g. recording of type ;; ranges, are important. Setting REPARSE to t only applies ;; recursively to nested angle bracket arglists if - ;; `c-disallow-comma-in-<>-arglists' is set. - ;; - ;; This is primarily used in C++ to mark up template arglists. C++ - ;; disambiguates them by checking whether the preceding name is a - ;; template or not. We can't do that, so we assume it is a template - ;; if it can be parsed as one. This usually works well since - ;; comparison expressions on the forms "a < b > c" or "a < b, c > d" - ;; in almost all cases would be pointless. Cases like function - ;; calls on the form "foo (a < b, c > d)" needs to be handled - ;; specially through the `c-disallow-comma-in-<>-arglists' variable. + ;; `c-restricted-<>-arglists' is set. (let ((start (point)) ;; If `c-record-type-identifiers' is set then activate @@ -3683,11 +3717,18 @@ This function does not do any hidden buffer changes." (forward-char) t) - ;; Note: This regexp exploits the match order in - ;; \| so that "<>" is matched by "<" rather than - ;; "[^>:-]>". + ;; Note: These regexps exploit the match order in \| so + ;; that "<>" is matched by "<" rather than "[^>:-]>". (c-syntactic-re-search-forward - "[<;{},]\\|\\([^>:-]>\\)" nil 'move t t 1) + (if c-restricted-<>-arglists + ;; Stop on ',', '|', '&', '+' and '-' to catch + ;; common binary operators that could be between + ;; two comparison expressions "ad". + "[<;{},|&+-]\\|\\([^>:-]>\\)" + ;; Otherwise we still stop on ',' to find the + ;; argument start positions. + "[<;{},]\\|\\([^>:-]>\\)") + nil 'move t t 1) ;; If the arglist starter has lost its open paren ;; syntax but not the closer, we won't find the @@ -3776,7 +3817,7 @@ This function does not do any hidden buffer changes." (c-keyword-sym (match-string 1)) 'c-<>-type-kwds)) (and reparse - c-disallow-comma-in-<>-arglists)))) + c-restricted-<>-arglists)))) ))) ;; It was not an angle bracket arglist. @@ -3812,7 +3853,7 @@ This function does not do any hidden buffer changes." t) ((and (eq (char-before) ?,) - (not c-disallow-comma-in-<>-arglists)) + (not c-restricted-<>-arglists)) ;; Just another argument. Record the position. The ;; type check stuff that made us stop at it is at ;; the top of the loop. @@ -3959,7 +4000,7 @@ This function does not do any hidden buffer changes." (when (let ((c-record-type-identifiers nil) (c-record-found-types nil)) (c-forward-<>-arglist - nil c-disallow-comma-in-<>-arglists)) + nil c-restricted-<>-arglists)) (c-forward-syntactic-ws) (setq pos (point)) (if (and c-opt-identifier-concat-key @@ -4202,7 +4243,7 @@ This function does not do any hidden buffer changes." (c-with-syntax-table c++-template-syntax-table (c-backward-token-2 0 t lim) (while (and (or (looking-at c-symbol-start) - (looking-at "[<,]")) + (looking-at "[<,]\\|::")) (zerop (c-backward-token-2 1 t lim)))) (skip-chars-forward "^:")))) @@ -4251,7 +4292,7 @@ brace." (c-search-uplist-for-classkey paren-state)))) (defun c-just-after-func-arglist-p (&optional lim) - ;; Return t if we are between a function's argument list closing + ;; Return non-nil if we are between a function's argument list closing ;; paren and its opening brace. Note that the list close brace ;; could be followed by a "const" specifier or a member init hanging ;; colon. LIM is used as bound for some backward buffer searches; @@ -4272,14 +4313,16 @@ brace." ;; otherwise, we could be looking at a hanging member init ;; colon (goto-char checkpoint) - (while (eq (char-before) ?,) - ;; this will catch member inits with multiple - ;; line arglists - (forward-char -1) - (c-backward-syntactic-ws (c-point 'bol)) - (if (eq (char-before) ?\)) - (c-backward-sexp 2) - (c-backward-sexp 1)) + (while (and + (eq (char-before) ?,) + ;; this will catch member inits with multiple + ;; line arglists + (progn + (forward-char -1) + (c-backward-syntactic-ws (c-point 'bol)) + (c-safe (c-backward-sexp 1) t)) + (or (not (looking-at "\\s\(")) + (c-safe (c-backward-sexp 1) t))) (c-backward-syntactic-ws lim)) (if (and (eq (char-before) ?:) (progn @@ -4297,20 +4340,25 @@ brace." (or (not (c-beginning-of-macro)) (and (c-forward-to-cpp-define-body) (< (point) checkpoint))) - ;; check if we are looking at an ObjC method def - (or (not c-opt-method-key) - (progn - (goto-char checkpoint) - (c-forward-sexp -1) - (forward-char -1) - (c-backward-syntactic-ws lim) - (not (or (memq (char-before) '(?- ?+)) - ;; or a class category - (progn - (c-forward-sexp -2) - (looking-at c-class-key)) - ))))) - ))) + ;; Check if we are looking at an ObjC method def or a class + ;; category. + (not (and c-opt-method-key + (progn + (goto-char checkpoint) + (c-safe (c-backward-sexp) t)) + (progn + (c-backward-syntactic-ws lim) + (or (memq (char-before) '(?- ?+)) + (and (c-safe (c-forward-sexp -2) t) + (looking-at c-class-key)))))) + ;; Pike has compound types that include parens, + ;; e.g. "array(string)". Check that we aren't after one. + (not (and (c-major-mode-is 'pike-mode) + (progn + (goto-char checkpoint) + (c-safe (c-backward-sexp 2) t)) + (looking-at c-primitive-type-key))) + )))) (defun c-in-knr-argdecl (&optional lim) ;; Return the position of the first argument declaration if point is @@ -4319,8 +4367,7 @@ brace." ;; position that bounds the backward search for the argument list. ;; ;; Note: A declaration level context is assumed; the test can return - ;; false positives for statements. This test is even more easily - ;; fooled than `c-just-after-func-arglist-p'. + ;; false positives for statements. (save-excursion (save-restriction @@ -4330,13 +4377,12 @@ brace." ;; check that it's followed by some symbol before the next ';' ;; or '{'. If it does, it's the header of the K&R argdecl we're ;; in. - (if lim (narrow-to-region lim (point))) + (if lim (narrow-to-region lim (c-point 'eol))) (let ((outside-macro (not (c-query-macro-start))) paren-end) (catch 'done - (while (if (and (c-safe (setq paren-end - (c-down-list-backward (point)))) + (while (if (and (setq paren-end (c-down-list-backward (point))) (eq (char-after paren-end) ?\))) (progn (goto-char (1+ paren-end)) @@ -4347,7 +4393,26 @@ brace." (and (progn (c-forward-syntactic-ws) (looking-at "\\w\\|\\s_")) - (c-safe (c-up-list-backward paren-end)) + + (save-excursion + ;; The function header in a K&R declaration should only + ;; contain identifiers separated by comma. It should + ;; also contain at least one identifier since there + ;; wouldn't be anything to declare in the K&R region + ;; otherwise. + (when (c-go-up-list-backward paren-end) + (forward-char) + (catch 'knr-ok + (while t + (c-forward-syntactic-ws) + (if (or (looking-at c-known-type-key) + (looking-at c-keywords-regexp)) + (throw 'knr-ok nil)) + (c-forward-token-2) + (if (eq (char-after) ?,) + (forward-char) + (throw 'knr-ok (and (eq (char-after) ?\)) + (= (point) paren-end)))))))) (save-excursion ;; If it's a K&R declaration then we're now at the @@ -4398,24 +4463,12 @@ brace." (if start (goto-char start))))) -(defun c-backward-to-decl-anchor (&optional lim) +(defsubst c-backward-to-decl-anchor (&optional lim) ;; Assuming point is at a brace that opens the block of a top level ;; declaration of some kind, move to the proper anchor point for ;; that block. (unless (= (point) (c-point 'boi)) - ;; What we have below is actually an extremely stripped variant of - ;; c-beginning-of-statement-1. - (let ((pos (point)) c-maybe-labelp) - ;; Switch syntax table to avoid stopping at line continuations. - (save-restriction - (if lim (narrow-to-region lim (point-max))) - (while (and (progn - (c-backward-syntactic-ws) - (c-safe (goto-char (scan-sexps (point) -1)) t)) - (not (c-crosses-statement-barrier-p (point) pos)) - (not c-maybe-labelp)) - (setq pos (point))) - (goto-char pos))))) + (c-beginning-of-statement-1 lim))) (defun c-search-decl-header-end () ;; Search forward for the end of the "header" of the current @@ -4612,7 +4665,7 @@ brace." nil))) (defun c-beginning-of-member-init-list (&optional limit) - ;; Goes to the beginning of a member init list (i.e. just after the + ;; Go to the beginning of a member init list (i.e. just after the ;; ':') if inside one. Returns t in that case, nil otherwise. (or limit (setq limit (point-min))) @@ -5189,7 +5242,7 @@ brace." (eq step-type 'label) (/= savepos boi)) - (progn + (let ((save-step-type step-type)) ;; Current position might not be good enough; ;; skip backward another statement. (setq step-type (c-beginning-of-statement-1 @@ -5221,14 +5274,20 @@ brace." (c-add-syntax 'substatement nil)) (setq boi (c-point 'boi)) - (/= (point) savepos))))) + (if (= (point) savepos) + (progn + (setq step-type save-step-type) + nil) + t))))) (setq savepos (point) at-comment nil)) (setq at-comment nil) - (when (and (eq step-type 'same) - containing-sexp) + (when (and containing-sexp + (if (memq step-type '(nil same)) + (/= (point) boi) + (eq step-type 'label))) (goto-char containing-sexp) ;; Don't stop in the middle of a special brace list opener @@ -5388,21 +5447,32 @@ brace." ;; CASE B.3: The body of a function declared inside a normal ;; block. Can occur e.g. in Pike and when using gcc - ;; extensions. Might also trigger it with some macros followed - ;; by blocks, and this gives sane indentation then too. + ;; extensions, but watch out for macros followed by blocks. ;; C.f. cases E, 16F and 17G. ((and (not (c-looking-at-bos)) (eq (c-beginning-of-statement-1 containing-sexp nil nil t) - 'same)) + 'same) + (save-excursion + ;; Look for a type followed by a symbol, i.e. the start of a + ;; function declaration. Doesn't work for declarations like + ;; "int *foo() ..."; we'd need to refactor the more competent + ;; analysis in `c-font-lock-declarations' for that. + (and (c-forward-type) + (progn + (c-forward-syntactic-ws) + (looking-at c-symbol-start))))) (c-add-stmt-syntax 'defun-open nil t nil containing-sexp paren-state)) - ;; CASE B.4: Continued statement with block open. + ;; CASE B.4: Continued statement with block open. The most + ;; accurate analysis is perhaps `statement-cont' together with + ;; `block-open' but we play DWIM and use `substatement-open' + ;; instead. The rationaly is that this typically is a macro + ;; followed by a block which makes it very similar to a + ;; statement with a substatement block. (t - (goto-char beg-of-same-or-containing-stmt) - (c-add-stmt-syntax 'statement-cont nil nil nil - containing-sexp paren-state) - (c-add-syntax 'block-open)) + (c-add-stmt-syntax 'substatement-open nil nil nil + containing-sexp paren-state)) )) ;; CASE C: iostream insertion or extraction operator @@ -5421,8 +5491,8 @@ brace." ((and (save-excursion ;; Check that the next token is a '{'. This works as ;; long as no language that allows nested function - ;; definitions doesn't allow stuff like member init - ;; lists, K&R declarations or throws clauses there. + ;; definitions allows stuff like member init lists, K&R + ;; declarations or throws clauses there. ;; ;; Note that we do a forward search for something ahead ;; of the indentation line here. That's not good since @@ -5433,7 +5503,16 @@ brace." (eq (char-after) ?{)) (not (c-looking-at-bos)) (eq (c-beginning-of-statement-1 containing-sexp nil nil t) - 'same)) + 'same) + (save-excursion + ;; Look for a type followed by a symbol, i.e. the start of a + ;; function declaration. Doesn't work for declarations like "int + ;; *foo() ..."; we'd need to refactor the more competent analysis + ;; in `c-font-lock-declarations' for that. + (and (c-forward-type) + (progn + (c-forward-syntactic-ws) + (looking-at c-symbol-start))))) (c-add-stmt-syntax 'func-decl-cont nil t nil containing-sexp paren-state)) @@ -5845,7 +5924,8 @@ This function does not do any hidden buffer changes." ;; should be relative to the ctor's indentation ) ;; CASE 5B.2: K&R arg decl intro - (c-recognize-knr-p + ((and c-recognize-knr-p + (c-in-knr-argdecl lim)) (c-beginning-of-statement-1 lim) (c-add-syntax 'knr-argdecl-intro (c-point 'boi)) (if inclass-p @@ -6486,16 +6566,24 @@ This function does not do any hidden buffer changes." (c-add-syntax 'inline-close (point)))) ;; CASE 16F: Can be a defun-close of a function declared ;; in a statement block, e.g. in Pike or when using gcc - ;; extensions. Might also trigger it with some macros - ;; followed by blocks, and this gives sane indentation - ;; then too. Let it through to be handled below. + ;; extensions, but watch out for macros followed by + ;; blocks. Let it through to be handled below. ;; C.f. cases B.3 and 17G. ((and (not inenclosing-p) lim (save-excursion (and (not (c-looking-at-bos)) (eq (c-beginning-of-statement-1 lim nil nil t) 'same) - (setq placeholder (point))))) + (setq placeholder (point)) + ;; Look for a type or identifier followed by a + ;; symbol, i.e. the start of a function declaration. + ;; Doesn't work for declarations like "int *foo() + ;; ..."; we'd need to refactor the more competent + ;; analysis in `c-font-lock-declarations' for that. + (c-forward-type) + (progn + (c-forward-syntactic-ws) + (looking-at c-symbol-start))))) (back-to-indentation) (if (/= (point) containing-sexp) (goto-char placeholder)) @@ -6620,13 +6708,21 @@ This function does not do any hidden buffer changes." (c-add-syntax 'defun-block-intro (point))) ;; CASE 17G: First statement in a function declared inside ;; a normal block. This can occur in Pike and with - ;; e.g. the gcc extensions. Might also trigger it with - ;; some macros followed by blocks, and this gives sane - ;; indentation then too. C.f. cases B.3 and 16F. + ;; e.g. the gcc extensions, but watch out for macros + ;; followed by blocks. C.f. cases B.3 and 16F. ((save-excursion (and (not (c-looking-at-bos)) (eq (c-beginning-of-statement-1 lim nil nil t) 'same) - (setq placeholder (point)))) + (setq placeholder (point)) + ;; Look for a type or identifier followed by a + ;; symbol, i.e. the start of a function declaration. + ;; Doesn't work for declarations like "int *foo() + ;; ..."; we'd need to refactor the more competent + ;; analysis in `c-font-lock-declarations' for that. + (c-forward-type) + (progn + (c-forward-syntactic-ws) + (looking-at c-symbol-start)))) (back-to-indentation) (if (/= (point) containing-sexp) (goto-char placeholder)) @@ -6820,4 +6916,5 @@ This function does not do any hidden buffer changes." (cc-provide 'cc-engine) +;;; arch-tag: 149add18-4673-4da5-ac47-6805e4eae089 ;;; cc-engine.el ends here diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index bab838a22d..27c604b3f3 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -514,26 +514,21 @@ stuff. Used on level 1 and higher." (defun c-font-lock-invalid-string () ;; Assuming the point is after the opening character of a string, ;; fontify that char with `c-invalid-face-name' if the string - ;; decidedly isn't terminated properly. Assumes the string already - ;; is syntactically fontified. - (let ((end (1+ (c-point 'eol)))) - (and (eq (get-text-property (point) 'face) 'font-lock-string-face) - (= (next-single-property-change (point) 'face nil end) end) - ;; We're at eol inside a string. The first check above is - ;; necessary in XEmacs since it doesn't fontify the string - ;; delimiters themselves. Thus an empty string won't have - ;; the string face anywhere. - (if (c-major-mode-is '(c-mode c++-mode objc-mode pike-mode)) - ;; There's no \ before the newline. - (not (eq (char-before (1- end)) ?\\)) - ;; Quoted newlines aren't supported. - t) - (if (c-major-mode-is 'pike-mode) - ;; There's no # before the string, so newlines - ;; aren't allowed. - (not (eq (char-before (1- (point))) ?#)) - t) - (c-put-font-lock-face (1- (point)) (point) c-invalid-face-name)))) + ;; decidedly isn't terminated properly. + (let ((start (1- (point)))) + (save-excursion + (and (nth 3 (parse-partial-sexp start (c-point 'eol))) + (if (c-major-mode-is '(c-mode c++-mode objc-mode pike-mode)) + ;; There's no \ before the newline. + (not (eq (char-before (point)) ?\\)) + ;; Quoted newlines aren't supported. + t) + (if (c-major-mode-is 'pike-mode) + ;; There's no # before the string, so newlines + ;; aren't allowed. + (not (eq (char-before start) ?#)) + t) + (c-put-font-lock-face start (1+ start) c-invalid-face-name))))) (c-lang-defconst c-basic-matchers-before "Font lock matchers for basic keywords, labels, references and various @@ -899,7 +894,7 @@ casts and declarations are fontified. Used on level 2 and higher." (save-restriction (let (start-pos - c-disallow-comma-in-<>-arglists + c-restricted-<>-arglists ;; Nonzero if the `c-decl-prefix-re' match is in an arglist context, ;; as opposed to a statement-level context. The major difference is ;; that "," works as declaration delimiter in an arglist context, @@ -1055,11 +1050,11 @@ casts and declarations are fontified. Used on level 2 and higher." ;; If we're in a normal arglist context we don't want to ;; recognize commas in nested angle bracket arglists since ;; those commas could be part of our own arglist. - c-disallow-comma-in-<>-arglists + c-restricted-<>-arglists (and c-recognize-<>-arglists (eq arglist-type 'other))) - (when (and c-disallow-comma-in-<>-arglists + (when (and c-restricted-<>-arglists (/= arglist-match ?,)) ;; We're standing at the start of a normal arglist so remove any ;; angle bracket arglists containing commas that's been @@ -1497,15 +1492,21 @@ casts and declarations are fontified. Used on level 2 and higher." ;; identifier as a type and then backed up again in ;; this case. identifier-type - (or (eq identifier-type 'found) + (or (memq identifier-type '(found known)) (and (eq (char-after identifier-start) ?~) ;; `at-type' probably won't be 'found for ;; destructors since the "~" is then part ;; of the type name being checked against ;; the list of known types, so do a check ;; without that operator. - (c-check-type (1+ identifier-start) - identifier-end)))) + (or (save-excursion + (goto-char (1+ identifier-start)) + (c-forward-syntactic-ws) + (c-with-syntax-table + c-identifier-syntax-table + (looking-at c-known-type-key))) + (c-check-type (1+ identifier-start) + identifier-end))))) (throw 'at-decl-or-cast t)) (if got-identifier @@ -2877,4 +2878,5 @@ std\\(err\\|in\\|out\\)\\|user\\)\\)\\>\ (cc-provide 'cc-fonts) +;;; arch-tag: 2f65f405-735f-4da5-8d4b-b957844c5203 ;;; cc-fonts.el ends here diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 0a55be956b..19555b3752 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -544,6 +544,15 @@ submatch surrounds the directive name." '("defined")) pike '("defined" "efun" "constant")) +(c-lang-defconst c-assignment-operators + "List of all assignment operators." + t '("=" "*=" "/=" "%=" "+=" "-=" ">>=" "<<=" "&=" "^=" "|=") + java (append (c-lang-const c-assignment-operators) + '(">>>=")) + c++ (append (c-lang-const c-assignment-operators) + '("and_eq" "or_eq" "xor_eq")) + idl nil) + (c-lang-defconst c-operators "List describing all operators, along with their precedence and associativity. The order in the list corresponds to the precedence of @@ -686,11 +695,7 @@ since CC Mode treats every identifier as an expression." (right-assoc-sequence "?" ":") ;; Assignment. - (right-assoc "=" "*=" "/=" "%=" "+=" "-=" ">>=" "<<=" "&=" "^=" "|=" - ,@(when (c-major-mode-is 'java-mode) - '(">>>=")) - ,@(when (c-major-mode-is 'c++-mode) - '("and_eq" "or_eq" "xor_eq"))) + (right-assoc ,@(c-lang-const c-assignment-operators)) ;; Exception. ,@(when (c-major-mode-is 'c++-mode) @@ -788,6 +793,23 @@ operators." (c-lang-defvar c-nonsymbol-token-regexp (c-lang-const c-nonsymbol-token-regexp)) +(c-lang-defconst c-assignment-op-regexp + ;; Regexp matching all assignment operators and only them. The + ;; beginning of the first submatch is used to detect the end of the + ;; token, along with the end of the whole match. + t (if (c-lang-const c-assignment-operators) + (concat + ;; Need special case for "=" since it's a prefix of "==". + "=\\([^=]\\|$\\)" + "\\|" + (c-make-keywords-re nil + (set-difference (c-lang-const c-assignment-operators) + '("=") + :test 'string-equal))) + "\\<\\>")) +(c-lang-defvar c-assignment-op-regexp + (c-lang-const c-assignment-op-regexp)) + (c-lang-defconst c-<-op-cont-regexp ;; Regexp matching the second and subsequent characters of all ;; multicharacter tokens that begin with "<". @@ -1340,7 +1362,8 @@ too. Note: Use `c-typeless-decl-kwds' for keywords followed by a function or variable identifier (that's being defined)." t '("struct" "union" "enum") - (c c++ awk) nil + (c awk) nil + c++ '("operator") objc (append '("@class" "@interface" "@implementation" "@protocol") (c-lang-const c-type-list-kwds)) java '("class" "import" "interface" "new" "extends" "implements" "throws") @@ -1441,7 +1464,7 @@ assumed to be set if this isn't nil." (c-lang-defconst c-opt-<>-sexp-key ;; Adorned regexp matching keywords that can be followed by an angle - ;; bracket sexp. + ;; bracket sexp. Always set when `c-recognize-<>-arglists' is. t (if (c-lang-const c-recognize-<>-arglists) (c-make-keywords-re t (c-lang-const c-<>-sexp-kwds)))) (c-lang-defvar c-opt-<>-sexp-key (c-lang-const c-opt-<>-sexp-key)) @@ -2304,4 +2327,5 @@ This macro does not do any hidden buffer changes." (cc-provide 'cc-langs) +;;; arch-tag: 1ab57482-cfc2-4c5b-b628-3539c3098822 ;;; cc-langs.el ends here diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index 85fee9978d..b116db482c 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el @@ -424,4 +424,5 @@ Example: (cc-provide 'cc-menus) +;;; arch-tag: f6b60933-91f0-4145-ab44-70ca6d1b919b ;;; cc-menus.el ends here diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 67ec33defb..7c2ef9f93b 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1175,4 +1175,6 @@ Key bindings: (cc-provide 'cc-mode) + +;;; arch-tag: 7825e5c4-fd09-439f-a04d-4c13208ba3d7 ;;; cc-mode.el ends here diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index 4fb3656b6c..13ffd310fc 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el @@ -484,13 +484,17 @@ variables." ;; ;; This function does not do any hidden buffer changes. + (interactive) + (setq c-current-comment-prefix (if (listp c-comment-prefix-regexp) (cdr-safe (or (assoc major-mode c-comment-prefix-regexp) (assoc 'other c-comment-prefix-regexp))) c-comment-prefix-regexp)) + (let ((comment-line-prefix (concat "[ \t]*\\(" c-current-comment-prefix "\\)[ \t]*"))) + (setq paragraph-start (concat comment-line-prefix c-paragraph-start "\\|" @@ -508,6 +512,7 @@ variables." (default-value 'adaptive-fill-regexp) "\\)") ""))) + (when (boundp 'adaptive-fill-first-line-regexp) ;; XEmacs (20.x) adaptive fill mode doesn't have this. (make-local-variable 'adaptive-fill-first-line-regexp) @@ -618,4 +623,5 @@ any reason to call this function directly." (cc-provide 'cc-styles) +;;; arch-tag: c764f61a-96ba-484a-a68f-101c0e9d5d2c ;;; cc-styles.el ends here diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index e60854f3f5..f21531c2f2 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -493,13 +493,13 @@ Note that CC Mode uses this variable to set many other variables that handle the paragraph filling. That's done at mode initialization or when you switch to a style which sets this variable. Thus, if you change it in some other way, e.g. interactively in a CC Mode buffer, -you will need to do \\[c-mode] (or whatever mode you're currently -using) to reinitialize. +you will need to do \\[c-setup-paragraph-variables] afterwards so that +the other variables are updated with the new value. -Note also that when CC Mode starts up, the other variables are -modified before the mode hooks are run. If you change this variable -in a mode hook, you can call `c-setup-paragraph-variables' afterwards -to redo it." +Note also that when CC Mode starts up, all variables are initialized +before the mode hooks are run. It's therefore necessary to make a +call to `c-setup-paragraph-variables' explicitly if you change this +variable in a mode hook." :type '(radio (regexp :tag "Regexp for all modes") (list @@ -878,12 +878,11 @@ This hook gets called after a line is indented by the mode." :group 'c) (defcustom-c-stylevar c-label-minimum-indentation 1 - "*Minimum indentation for lines inside of top-level constructs. + "*Minimum indentation for lines inside code blocks. This variable typically only affects code using the `gnu' style, which -mandates a minimum of one space in front of every line inside -top-level constructs. Specifically, the function -`c-gnu-impose-minimum' on your `c-special-indent-hook' is what -enforces this." +mandates a minimum of one space in front of every line inside code +blocks. Specifically, the function `c-gnu-impose-minimum' on your +`c-special-indent-hook' is what enforces this." :type 'integer :group 'c) @@ -1271,6 +1270,14 @@ Here is the current list of valid syntactic element symbols: (get 'c-offsets-alist 'c-stylevar-fallback))) :group 'c) +;; The syntactic symbols that can occur inside code blocks. Used by +;; `c-gnu-impose-minimum'. +(defconst c-inside-block-syms + '(defun-block-intro block-open block-close statement statement-cont + statement-block-intro statement-case-intro statement-case-open + substatement substatement-open substatement-label case-label label + do-while-closure else-clause catch-clause inlambda)) + (defcustom c-style-variables-are-local-p t "*Whether style variables should be buffer local by default. If non-nil, then all indentation style related variables will be made @@ -1371,7 +1378,7 @@ state. Set this variable only if your configuration has stopped working due to this change.") (define-widget 'c-extra-types-widget 'radio - ;; Widget for a list of regexps for the extra types. + "Internal CC Mode widget for the `*-font-lock-extra-types' variables." :args '((const :tag "none" nil) (repeat :tag "types" regexp))) @@ -1402,7 +1409,7 @@ also elsewhere in CC Mode to tell types from other identifiers."))) ;; in older versions in Emacs, so depending on the load order we might ;; not install the values below. There's no kludge to cope with this ;; (as opposed to the *-font-lock-keywords-* variables) since the old -;; values works fairly well anyway. +;; values work fairly well anyway. (defcustom c-font-lock-extra-types '("FILE" "\\sw+_t" @@ -1575,7 +1582,7 @@ Set from `c-comment-prefix-regexp' at mode initialization.") '1-bit) list))) - (let ((buf (generate-new-buffer "test")) + (let ((buf (generate-new-buffer " test")) parse-sexp-lookup-properties parse-sexp-ignore-comments lookup-syntax-properties) @@ -1675,4 +1682,5 @@ might be present: (cc-provide 'cc-vars) +;;; arch-tag: d62e9a55-c9fe-409b-b5b6-050b6aa202c9 ;;; cc-vars.el ends here diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el new file mode 100644 index 0000000000..62633fe294 --- /dev/null +++ b/lisp/progmodes/cfengine.el @@ -0,0 +1,251 @@ +;;; cfengine.el --- mode for editing Cfengine files + +;; Copyright (C) 2003 Free Software Foundation, Inc. + +;; Author: Dave Love +;; Keywords: languages + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; Provides support for editing GNU Cfengine files, including +;; font-locking, Imenu and indention, but with no special keybindings. + +;; Possible customization for auto-mode selection: +;; (push '(("^cfagent.conf\\'" . cfengine-mode)) auto-mode-alist) +;; (push '(("^cf\\." . cfengine-mode)) auto-mode-alist) + +;; This is not the same as the mode written by Rolf Ebert +;; , distributed with cfengine-2.0.5. It does +;; better fontification and indentation, inter alia. + +;;; Code: + +(defgroup cfengine () + "Editing Cfengine files." + :group 'languages) + +(defcustom cfengine-indent 2 + "*Size of a Cfengine indentation step in columns." + :group 'cfengine + :type 'integer) + +(defcustom cfengine-mode-abbrevs nil + "Abbrevs for Cfengine mode." + :group 'cfengine + :type '(repeat (list (string :tag "Name") + (string :tag "Expansion") + (choice :tag "Hook" (const nil) function)))) + +;; Taken from the doc for pre-release 2.1. +(eval-and-compile + (defconst cfengine-actions + '("acl" "alerts" "binservers" "broadcast" "control" "classes" "copy" + "defaultroute" "disks" "directories" "disable" "editfiles" "files" + "filters" "groups" "homeservers" "ignore" "import" "interfaces" + "links" "mailserver" "methods" "miscmounts" "mountables" + "processes" "packages" "rename" "required" "resolve" + "shellcommands" "tidy" "unmount" + ;; cfservd + "admit" "grant" "deny") + "List of the action keywords supported by Cfengine. +This includes those for cfservd as well as cfagent.")) + +(defvar cfengine-font-lock-keywords + `(;; Actions. + ;; List the allowed actions explicitly, so that errors are more obvious. + (,(concat "^[ \t]*" (eval-when-compile + (regexp-opt cfengine-actions t)) + ":") + 1 font-lock-keyword-face) + ;; Classes. + ("^[ \t]*\\([[:alnum:]_().|!]+\\)::" 1 font-lock-function-name-face) + ;; Variables. + ("$(\\([[:alnum:]_]+\\))" 1 font-lock-variable-name-face) + ("${\\([[:alnum:]_]+\\)}" 1 font-lock-variable-name-face) + ;; Variable definitions. + ("\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1 font-lock-variable-name-face) + ;; File, acl &c in group: { token ... } + ("{[ \t]*\\([^ \t\n]+\\)" 1 font-lock-constant-face))) + +(defvar cfengine-imenu-expression + `((nil ,(concat "^[ \t]*" (eval-when-compile + (regexp-opt cfengine-actions t)) + ":[^:]") + 1) + ("Variables/classes" "\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1) + ("Variables/classes" "\\[ \t]+\\([[:alnum:]_]+\\)" 1)) + "`imenu-generic-expression' for Cfengine mode.") + +(defun cfengine-outline-level () + "`outline-level' function for Cfengine mode." + (if (looking-at "[^:]+\\(?:[:]+\\)$") + (length (match-string 1)))) + +(defun cfengine-beginning-of-defun () + "`beginning-of-defun' function for Cfengine mode. +Treats actions as defuns." + (end-of-line) + (if (re-search-backward "^[[:alpha:]]+: *$" nil t) + (beginning-of-line) + (goto-char (point-min))) + t) + +(defun cfengine-end-of-defun () + "`end-of-defun' function for Cfengine mode. +Treats actions as defuns." + (end-of-line) + (if (re-search-forward "^[[:alpha:]]+: *$" nil t) + (progn (forward-line -1) (end-of-line)) + (goto-char (point-max))) + t) + +;; Fixme: Should get an extra indent step in editfiles BeginGroup...s. + +(defun cfengine-indent-line () + "Indent a line in Cfengine mode. +Intended as the value of `indent-line-function'." + (let ((pos (- (point-max) (point)))) + (save-restriction + (narrow-to-defun) + (back-to-indentation) + (cond + ;; Action selectors aren't indented; class selectors are + ;; indented one step. + ((looking-at "[[:alnum:]_().|!]+:\\(:\\)?") + (if (match-string 1) + (indent-line-to cfengine-indent) + (indent-line-to 0))) + ;; Outdent leading close brackets one step. + ((or (eq ?\} (char-after)) + (eq ?\) (char-after))) + (condition-case () + (indent-line-to (save-excursion + (forward-char) + (backward-sexp) + (current-column))) + (error nil))) + ;; Inside brackets/parens: indent to start column of non-comment + ;; token on line following open bracket or by one step from open + ;; bracket's column. + ((condition-case () + (progn (indent-line-to (save-excursion + (backward-up-list) + (forward-char) + (skip-chars-forward " \t") + (if (looking-at "[^\n#]") + (current-column) + (skip-chars-backward " \t") + (+ (current-column) -1 + cfengine-indent)))) + t) + (error nil))) + ;; Indent by two steps after a class selector. + ((save-excursion + (re-search-backward "^[ \t]*[[:alnum:]_().|!]+::" nil t)) + (indent-line-to (* 2 cfengine-indent))) + ;; Indent by one step if we're after an action header. + ((save-excursion + (goto-char (point-min)) + (looking-at "[[:alpha:]]+:[ \t]*$")) + (indent-line-to cfengine-indent)) + ;; Else don't indent. + (t + (indent-line-to 0)))) + ;; If initial point was within line's indentation, + ;; position after the indentation. Else stay at same point in text. + (if (> (- (point-max) pos) (point)) + (goto-char (- (point-max) pos))))) + +;; This doesn't work too well in Emacs 21.2. See 21.4 development +;; code. +(defun cfengine-fill-paragraph (&optional justify) + "Fill `paragraphs' in Cfengine code." + (interactive "P") + (or (if (fboundp 'fill-comment-paragraph) + (fill-comment-paragraph justify) ; post Emacs 21.3 + ;; else do nothing in a comment + (nth 4 (parse-partial-sexp (save-excursion + (beginning-of-defun) + (point)) + (point)))) + (let ((paragraph-start + ;; Include start of parenthesized block. + "\f\\|[ \t]*$\\|.*\(") + (paragraph-separate + ;; Include action and class lines, start and end of + ;; bracketed blocks and end of parenthesized blocks to + ;; avoid including these in fill. This isn't ideal. + "[ \t\f]*$\\|.*#\\|.*[\){}]\\|\\s-*[[:alpha:]_().|!]+:") + fill-paragraph-function) + (fill-paragraph justify)) + t)) + +;;;###autoload +(define-derived-mode cfengine-mode fundamental-mode "Cfengine" + "Major mode for editing cfengine input. +There are no special keybindings by default. + +Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves +to the action header." + (modify-syntax-entry ?# "<" cfengine-mode-syntax-table) + (modify-syntax-entry ?\n ">#" cfengine-mode-syntax-table) + ;; Shell commands can be quoted by single, double or back quotes. + ;; It's debatable whether we should define string syntax, but it + ;; should avoid potential confusion in some cases. + (modify-syntax-entry ?\" "\"" cfengine-mode-syntax-table) + (modify-syntax-entry ?\' "\"" cfengine-mode-syntax-table) + (modify-syntax-entry ?\` "\"" cfengine-mode-syntax-table) + ;; variable substitution: + (modify-syntax-entry ?$ "." cfengine-mode-syntax-table) + ;; Doze path separators: + (modify-syntax-entry ?\\ "_" cfengine-mode-syntax-table) + ;; Otherwise, syntax defaults seem OK to give reasonable word + ;; movement. + + (set (make-local-variable 'parens-require-spaces) nil) + (set (make-local-variable 'require-final-newline) t) + (set (make-local-variable 'comment-start) "# ") + (set (make-local-variable 'comment-start-skip) + "\\(\\(?:^\\|[^\\\\\n]\\)\\(?:\\\\\\\\\\)*\\)#+[ \t]*") + (set (make-local-variable 'indent-line-function) #'cfengine-indent-line) + (set (make-local-variable 'outline-regexp) "[ \t]*\\(\\sw\\|\\s_\\)+:+") + (set (make-local-variable 'outline-level) #'cfengine-outline-level) + (set (make-local-variable 'fill-paragraph-function) + #'cfengine-fill-paragraph) + (define-abbrev-table 'cfengine-mode-abbrev-table cfengine-mode-abbrevs) + ;; Fixme: Use `font-lock-syntactic-keywords' to set the args of + ;; functions in evaluated classes to string syntax, and then obey + ;; syntax properties. + (setq font-lock-defaults + '(cfengine-font-lock-keywords nil nil nil beginning-of-line)) + (setq imenu-generic-expression cfengine-imenu-expression) + (set (make-local-variable 'beginning-of-defun-function) + #'cfengine-beginning-of-defun) + (set (make-local-variable 'end-of-defun-function) #'cfengine-end-of-defun) + ;; Like Lisp mode. Without this, we lose with, say, + ;; `backward-up-list' when there's an unbalanced quote in a + ;; preceding comment. + (set (make-local-variable 'parse-sexp-ignore-comments) t)) + +(provide 'cfengine) + +;;; arch-tag: 6b931be2-1505-4124-afa6-9675971e26d4 +;;; cfengine.el ends here diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el index a42df869df..27fe81e451 100644 --- a/lisp/progmodes/cmacexp.el +++ b/lisp/progmodes/cmacexp.el @@ -387,4 +387,5 @@ Optional arg DISPLAY non-nil means show messages in the echo area." ;; Cleanup. (kill-buffer outbuf)))) +;;; arch-tag: 4f20253c-71ef-4e6d-a774-19087060910e ;;; cmacexp.el ends here diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el dissimilarity index 74% index a65e04eb1d..ff4256192c 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1,2375 +1,1762 @@ -;;; compile.el --- run compiler as inferior of Emacs, parse error messages - -;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001, 2003 -;; Free Software Foundation, Inc. - -;; Author: Roland McGrath -;; Maintainer: FSF -;; Keywords: tools, processes - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Commentary: - -;; This package provides the compile and grep facilities documented in -;; the Emacs user's manual. - -;;; Code: - -(defgroup compilation nil - "Run compiler as inferior of Emacs, parse error messages." - :group 'tools - :group 'processes) - - -;;;###autoload -(defcustom compilation-mode-hook nil - "*List of hook functions run by `compilation-mode' (see `run-hooks')." - :type 'hook - :group 'compilation) - -;;;###autoload -(defcustom compilation-window-height nil - "*Number of lines in a compilation window. If nil, use Emacs default." - :type '(choice (const :tag "Default" nil) - integer) - :group 'compilation) - -(defcustom compile-auto-highlight t - "*Specify how many compiler errors to highlight (and parse) initially. -\(Highlighting applies to an error message when the mouse is over it.) -If this is a number N, all compiler error messages in the first N lines -are highlighted and parsed as soon as they arrive in Emacs. -If t, highlight and parse the whole compilation output as soon as it arrives. -If nil, don't highlight or parse any of the buffer until you try to -move to the error messages. - -Those messages which are not parsed and highlighted initially -will be parsed and highlighted as soon as you try to move to them." - :type '(choice (const :tag "All" t) - (const :tag "None" nil) - (integer :tag "First N lines")) - :group 'compilation) - -(defcustom grep-command nil - "The default grep command for \\[grep]. -If the grep program used supports an option to always include file names -in its output (such as the `-H' option to GNU grep), it's a good idea to -include it when specifying `grep-command'. - -The default value of this variable is set up by `grep-compute-defaults'; -call that function before using this variable in your program." - :type '(choice string - (const :tag "Not Set" nil)) - :group 'compilation) - -(defcustom grep-use-null-device 'auto-detect - "If t, append the value of `null-device' to `grep' commands. -This is done to ensure that the output of grep includes the filename of -any match in the case where only a single file is searched, and is not -necessary if the grep program used supports the `-H' option. - -The default value of this variable is set up by `grep-compute-defaults'; -call that function before using this variable in your program." - :type 'boolean - :type '(choice (const :tag "Do Not Append Null Device" nil) - (const :tag "Append Null Device" t) - (other :tag "Not Set" auto-detect)) - :group 'compilation) - -(defcustom grep-find-command nil - "The default find command for \\[grep-find]. -The default value of this variable is set up by `grep-compute-defaults'; -call that function before using this variable in your program." - :type '(choice string - (const :tag "Not Set" nil)) - :group 'compilation) - -(defcustom grep-tree-command nil - "The default find command for \\[grep-tree]. -The default value of this variable is set up by `grep-compute-defaults'; -call that function before using this variable in your program. -The following place holders should be present in the string: - - base directory for find - - find options to restrict or expand the directory list - - find options to limit the files matched - - place to put -i if case insensitive grep - - the regular expression searched for." - :type '(choice string - (const :tag "Not Set" nil)) - :version "21.4" - :group 'compilation) - -(defcustom grep-tree-files-aliases '( - ("ch" . "*.[ch]") - ("c" . "*.c") - ("h" . "*.h") - ("m" . "[Mm]akefile*") - ("asm" . "*.[sS]") - ("all" . "*") - ("el" . "*.el") - ) - "*Alist of aliases for the FILES argument to `grep-tree'." - :type 'alist - :group 'compilation) - -(defcustom grep-tree-ignore-case t - "*If non-nil, `grep-tree' ignores case in matches." - :type 'boolean - :group 'compilation) - -(defcustom grep-tree-ignore-CVS-directories t - "*If non-nil, `grep-tree' does no recurse into CVS directories." - :type 'boolean - :group 'compilation) - -(defvar compilation-error-list nil - "List of error message descriptors for visiting erring functions. -Each error descriptor is a cons (or nil). Its car is a marker pointing to -an error message. If its cdr is a marker, it points to the text of the -line the message is about. If its cdr is a cons, it is a list -\(\(DIRECTORY . FILE\) LINE [COLUMN]\). Or its cdr may be nil if that -error is not interesting. - -The value may be t instead of a list; this means that the buffer of -error messages should be reparsed the next time the list of errors is wanted. - -Some other commands (like `diff') use this list to control the error -message tracking facilities; if you change its structure, you should make -sure you also change those packages. Perhaps it is better not to change -it at all.") - -(defvar compilation-old-error-list nil - "Value of `compilation-error-list' after errors were parsed.") - -(defvar compilation-parse-errors-function 'compilation-parse-errors - "Function to call to parse error messages from a compilation. -It takes args LIMIT-SEARCH and FIND-AT-LEAST. -If LIMIT-SEARCH is non-nil, don't bother parsing past that location. -If FIND-AT-LEAST is non-nil, don't bother parsing after finding that -many new errors. -It should read in the source files which have errors and set -`compilation-error-list' to a list with an element for each error message -found. See that variable for more info.") - -(defvar compilation-parse-errors-filename-function nil - "Function to call to post-process filenames while parsing error messages. -It takes one arg FILENAME which is the name of a file as found -in the compilation output, and should return a transformed file name.") - -;;;###autoload -(defvar compilation-process-setup-function nil - "*Function to call to customize the compilation process. -This functions is called immediately before the compilation process is -started. It can be used to set any variables or functions that are used -while processing the output of the compilation process.") - -;;;###autoload -(defvar compilation-buffer-name-function nil - "Function to compute the name of a compilation buffer. -The function receives one argument, the name of the major mode of the -compilation buffer. It should return a string. -nil means compute the name with `(concat \"*\" (downcase major-mode) \"*\")'.") - -;;;###autoload -(defvar compilation-finish-function nil - "Function to call when a compilation process finishes. -It is called with two arguments: the compilation buffer, and a string -describing how the process finished.") - -;;;###autoload -(defvar compilation-finish-functions nil - "Functions to call when a compilation process finishes. -Each function is called with two arguments: the compilation buffer, -and a string describing how the process finished.") - -(defvar compilation-last-buffer nil - "The most recent compilation buffer. -A buffer becomes most recent when its compilation is started -or when it is used with \\[next-error] or \\[compile-goto-error].") - -(defvar compilation-in-progress nil - "List of compilation processes now running.") -(or (assq 'compilation-in-progress minor-mode-alist) - (setq minor-mode-alist (cons '(compilation-in-progress " Compiling") - minor-mode-alist))) - -(defvar compilation-parsing-end nil - "Marker position of end of buffer when last error messages were parsed.") - -(defvar compilation-error-message "No more errors" - "Message to print when no more matches are found.") - -(defvar compilation-arguments nil - "Arguments that were given to `compile-internal'.") - -(defvar compilation-num-errors-found) - -(defvar compilation-error-regexp-alist - '( - ;; NOTE! See also grep-regexp-alist, below. - - ;; 4.3BSD grep, cc, lint pass 1: - ;; /usr/src/foo/foo.c(8): warning: w may be used before set - ;; or GNU utilities: - ;; foo.c:8: error message - ;; or HP-UX 7.0 fc: - ;; foo.f :16 some horrible error message - ;; or GNU utilities with column (GNAT 1.82): - ;; foo.adb:2:1: Unit name does not match file name - ;; or with column and program name: - ;; jade:dbcommon.dsl:133:17:E: missing argument for function call - ;; - ;; We'll insist that the number be followed by a colon or closing - ;; paren, because otherwise this matches just about anything - ;; containing a number with spaces around it. - - ;; We insist on a non-digit in the file name - ;; so that we don't mistake the file name for a command name - ;; and take the line number as the file name. - ("\\([a-zA-Z][-a-zA-Z._0-9]+: ?\\)?\ -\\([a-zA-Z]?:?[^:( \t\n]*[^:( \t\n0-9][^:( \t\n]*\\)[:(][ \t]*\\([0-9]+\\)\ -\\([) \t]\\|:\\(\\([0-9]+:\\)\\|[0-9]*[^:0-9]\\)\\)" 2 3 6) - - ;; GNU utilities with precise locations (line and columns), - ;; possibly ranges: - ;; foo.c:8.23-9.1: error message - ("\\([a-zA-Z][-a-zA-Z._0-9]+\\): ?\ -\\([0-9]+\\)\\.\\([0-9]+\\)\ --\\([0-9]+\\)\\.\\([0-9]+\\)\ -:" 1 2 3) ;; When ending points are supported, add line = 4 and col = 5. - ;; foo.c:8.23-45: error message - ("\\([a-zA-Z][-a-zA-Z._0-9]+\\): ?\ -\\([0-9]+\\)\\.\\([0-9]+\\)\ --\\([0-9]+\\)\ -:" 1 2 3) ;; When ending points are supported, add line = 2 and col = 4. - ;; foo.c:8-45.3: error message - ("\\([a-zA-Z][-a-zA-Z._0-9]+\\): ?\ -\\([0-9]+\\)\ --\\([0-9]+\\)\\.\\([0-9]+\\)\ -:" 1 2 nil) ;; When ending points are supported, add line = 2 and col = 4. - ;; foo.c:8.23: error message - ("\\([a-zA-Z][-a-zA-Z._0-9]+\\): ?\ -\\([0-9]+\\)\\.\\([0-9]+\\)\ -:" 1 2 3) - ;; foo.c:8-23: error message - ("\\([a-zA-Z][-a-zA-Z._0-9]+\\): ?\ -\\([0-9]+\\)\ --\\([0-9]+\\)\ -:" 1 2 nil);; When ending points are supported, add line = 3. - - ;; Microsoft C/C++: - ;; keyboard.c(537) : warning C4005: 'min' : macro redefinition - ;; d:\tmp\test.c(23) : error C2143: syntax error : missing ';' before 'if' - ;; This used to be less selective and allow characters other than - ;; parens around the line number, but that caused confusion for - ;; GNU-style error messages. - ;; This used to reject spaces and dashes in file names, - ;; but they are valid now; so I made it more strict about the error - ;; message that follows. - ("\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) \ -: \\(error\\|warning\\) C[0-9]+:" 1 3) - - ;; Borland C++, C++Builder: - ;; Error ping.c 15: Unable to open include file 'sys/types.h' - ;; Warning ping.c 68: Call to function 'func' with no prototype - ;; Error E2010 ping.c 15: Unable to open include file 'sys/types.h' - ;; Warning W1022 ping.c 68: Call to function 'func' with no prototype - ("\\(Error\\|Warning\\) \\(\\([FEW][0-9]+\\) \\)?\ -\\([a-zA-Z]?:?[^:( \t\n]+\\)\ - \\([0-9]+\\)\\([) \t]\\|:[^0-9\n]\\)" 4 5) - - ;; Valgrind (memory debugger for x86 GNU/Linux): - ;; ==1332== at 0x8008621: main (vtest.c:180) - ;; Currently this regexp only matches the first error. - ;; Thanks to Hans Petter Jansson for his regexp wisdom. - ("^==[0-9]+==[^(]+\(([^:]+):([0-9]+)" 1 2) - - ;; 4.3BSD lint pass 2 - ;; strcmp: variable # of args. llib-lc(359) :: /usr/src/foo/foo.c(8) - (".*[ \t:]\\([a-zA-Z]?:?[^:( \t\n]+\\)[:(](+[ \t]*\\([0-9]+\\))[:) \t]*$" - 1 2) - - ;; 4.3BSD lint pass 3 - ;; bloofle defined( /users/wolfgang/foo.c(4) ), but never used - ;; This used to be - ;; ("[ \t(]+\\([a-zA-Z]?:?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]+" 1 2) - ;; which is regexp Impressionism - it matches almost anything! - (".*([ \t]*\\([a-zA-Z]?:?[^:( \t\n]+\\)[:(][ \t]*\\([0-9]+\\))" 1 2) - - ;; MIPS lint pass; looks good for SunPro lint also - ;; TrimMask (255) in solomon.c may be indistinguishable from TrimMasks (93) in solomon.c due to truncation - ("[^\n ]+ (\\([0-9]+\\)) in \\([^ \n]+\\)" 2 1) - ;; name defined but never used: LinInt in cmap_calc.c(199) - (".*in \\([^(\n]+\\)(\\([0-9]+\\))$" 1 2) - - ;; Ultrix 3.0 f77: - ;; fort: Severe: addstf.f, line 82: Missing operator or delimiter symbol - ;; Some SGI cc version: - ;; cfe: Warning 835: foo.c, line 2: something - ("\\(cfe\\|fort\\): [^:\n]*: \\([^ \n]*\\), line \\([0-9]+\\):" 2 3) - ;; Error on line 3 of t.f: Execution error unclassifiable statement - ;; Unknown who does this: - ;; Line 45 of "foo.c": bloofle undefined - ;; Absoft FORTRAN 77 Compiler 3.1.3 - ;; error on line 19 of fplot.f: spelling error? - ;; warning on line 17 of fplot.f: data type is undefined for variable d - ("\\(.* on \\)?[Ll]ine[ \t]+\\([0-9]+\\)[ \t]+\ -of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2) - - ;; Apollo cc, 4.3BSD fc: - ;; "foo.f", line 3: Error: syntax error near end of statement - ;; IBM RS6000: - ;; "vvouch.c", line 19.5: 1506-046 (S) Syntax error. - ;; Microtec mcc68k: - ;; "foo.c", line 32 pos 1; (E) syntax error; unexpected symbol: "lossage" - ;; GNAT (as of July 94): - ;; "foo.adb", line 2(11): warning: file name does not match ... - ;; IBM AIX xlc compiler: - ;; "src/swapping.c", line 30.34: 1506-342 (W) "/*" detected in comment. - (".*\"\\([^,\" \n\t]+\\)\", lines? \ -\\([0-9]+\\)\\([\(.]\\([0-9]+\\)\)?\\)?[:., (-]" 1 2 4) - - ;; Python: - ;; File "foobar.py", line 5, blah blah - ("^File \"\\([^,\" \n\t]+\\)\", line \\([0-9]+\\)," 1 2) - - ;; Caml compiler: - ;; File "foobar.ml", lines 5-8, characters 20-155: blah blah - ("^File \"\\([^,\" \n\t]+\\)\", lines? \\([0-9]+\\)[-0-9]*, characters? \\([0-9]+\\)" 1 2 3) - - ;; MIPS RISC CC - the one distributed with Ultrix: - ;; ccom: Error: foo.c, line 2: syntax error - ;; DEC AXP OSF/1 cc - ;; /usr/lib/cmplrs/cc/cfe: Error: foo.c: 1: blah blah - ("[a-z0-9/]+: \\([eE]rror\\|[wW]arning\\): \\([^,\" \n\t]+\\)[,:] \\(line \\)?\\([0-9]+\\):" 2 4) - - ;; IBM AIX PS/2 C version 1.1: - ;; ****** Error number 140 in line 8 of file errors.c ****** - (".*in line \\([0-9]+\\) of file \\([^ \n]+[^. \n]\\)\\.? " 2 1) - ;; IBM AIX lint is too painful to do right this way. File name - ;; prefixes entire sections rather than being on each line. - - ;; SPARCcompiler Pascal: - ;; 20 linjer : array[1..4] of linje; - ;; e 18480-----------^--- Inserted ';' - ;; and - ;; E 18520 line 61 - 0 is undefined - ;; These messages don't contain a file name. Instead the compiler gives - ;; a message whenever the file being compiled is changed. - (" +\\([0-9]+\\) +.*\n[ew] [0-9]+-+" nil 1) - ("[Ew] +[0-9]+ line \\([0-9]+\\) - " nil 1) - - ;; Lucid Compiler, lcc 3.x - ;; E, file.cc(35,52) Illegal operation on pointers - ("[EW], \\([^(\n]*\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" 1 2 3) - - ;; This seems to be superfluous because the first pattern matches it. - ;; ;; GNU messages with program name and optional column number. - ;; ("[a-zA-Z]?:?[^0-9 \n\t:]+[^ \n\t:]*:[ \t]*\\([^ \n\t:]+\\):\ - ;;\\([0-9]+\\):\\(\\([0-9]+\\)[: \t]\\)?" 1 2 4) - - ;; Cray C compiler error messages - ("\\(cc\\| cft\\)-[0-9]+ c\\(c\\|f77\\): ERROR \\([^,\n]+, \\)* File = \ -\\([^,\n]+\\), Line = \\([0-9]+\\)" 4 5) - - ;; IBM C/C++ Tools 2.01: - ;; foo.c(2:0) : informational EDC0804: Function foo is not referenced. - ;; foo.c(3:8) : warning EDC0833: Implicit return statement encountered. - ;; foo.c(5:5) : error EDC0350: Syntax error. - ("\\([^( \n\t]+\\)(\\([0-9]+\\):\\([0-9]+\\)) : " 1 2 3) - - ;; IAR Systems C Compiler: - ;; "foo.c",3 Error[32]: Error message - ;; "foo.c",3 Warning[32]: Error message - ("\"\\(.*\\)\",\\([0-9]+\\)\\s-+\\(Error\\|Warning\\)\\[[0-9]+\\]:" 1 2) - - ;; Sun ada (VADS, Solaris): - ;; /home3/xdhar/rcds_rc/main.a, line 361, char 6:syntax error: "," inserted - ("\\([^, \n\t]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., \(-]" 1 2 3) - - ;; Perl -w: - ;; syntax error at automake line 922, near "':'" - ;; Perl debugging traces - ;; store::odrecall('File_A', 'x2') called at store.pm line 90 - (".* at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" 1 2) - - ;; Oracle pro*c: - ;; Semantic error at line 528, column 5, file erosacqdb.pc: - ("Semantic error at line \\([0-9]+\\), column \\([0-9]+\\), file \\(.*\\):" - 3 1 2) - - ;; EPC F90 compiler: - ;; Error 24 at (2:progran.f90) : syntax error - ("Error [0-9]+ at (\\([0-9]*\\):\\([^)\n]+\\))" 2 1) - - ;; SGI IRIX MipsPro 7.3 compilers: - ;; cc-1070 cc: ERROR File = linkl.c, Line = 38 - (".*: ERROR File = \\(.+\\), Line = \\([0-9]+\\)" 1 2) - (".*: WARNING File = \\(.+\\), Line = \\([0-9]+\\)" 1 2) - - ;; Sun F90 error messages: - ;; cf90-113 f90comp: ERROR NSE, File = Hoved.f90, Line = 16, Column = 3 - (".* ERROR [a-zA-Z0-9 ]+, File = \\(.+\\), Line = \\([0-9]+\\), Column = \\([0-9]+\\)" - 1 2 3) - - ;; RXP - GPL XML validator at http://www.cogsci.ed.ac.uk/~richard/rxp.html: - ;; Error: Mismatched end tag: expected , got - ;; in unnamed entity at line 71 char 8 of file:///home/reto/test/group.xml - ("Error:.*\n.* line \\([0-9]+\\) char \\([0-9]+\\) of file://\\(.+\\)" - 3 1 2) - ;; Warning: Start tag for undeclared element geroup - ;; in unnamed entity at line 4 char 8 of file:///home/reto/test/group.xml - ("Warning:.*\n.* line \\([0-9]+\\) char \\([0-9]+\\) of file://\\(.+\\)" - 3 1 2) - ) - - "Alist that specifies how to match errors in compiler output. -Each elt has the form (REGEXP FILE-IDX LINE-IDX [COLUMN-IDX FILE-FORMAT...]) -If REGEXP matches, the FILE-IDX'th subexpression gives the file name, and -the LINE-IDX'th subexpression gives the line number. If COLUMN-IDX is -given, the COLUMN-IDX'th subexpression gives the column number on that line. -If any FILE-FORMAT is given, each is a format string to produce a file name to -try; %s in the string is replaced by the text matching the FILE-IDX'th -subexpression.") - -(defvar compilation-enter-directory-regexp-alist - '( - ;; Matches lines printed by the `-w' option of GNU Make. - (".*: Entering directory `\\(.*\\)'$" 1) - ;; Matches lines made by Emacs byte compiler. - ("^Entering directory `\\(.*\\)'$" 1) - ) - "Alist specifying how to match lines that indicate a new current directory. -Note that the match is done at the beginning of lines. -Each elt has the form (REGEXP IDX). -If REGEXP matches, the IDX'th subexpression gives the directory name. - -The default value matches lines printed by the `-w' option of GNU Make.") - -(defvar compilation-leave-directory-regexp-alist - '( - ;; Matches lines printed by the `-w' option of GNU Make. - (".*: Leaving directory `\\(.*\\)'$" 1) - ;; Matches lines made by Emacs byte compiler. - ("^Leaving directory `\\(.*\\)'$" 1) - ) -"Alist specifying how to match lines that indicate restoring current directory. -Note that the match is done at the beginning of lines. -Each elt has the form (REGEXP IDX). -If REGEXP matches, the IDX'th subexpression gives the name of the directory -being moved from. If IDX is nil, the last directory entered \(by a line -matching `compilation-enter-directory-regexp-alist'\) is assumed. - -The default value matches lines printed by the `-w' option of GNU Make.") - -(defvar compilation-file-regexp-alist - '( - ;; This matches entries with date time year file-name: like - ;; Thu May 14 10:46:12 1992 mom3.p: - ("\\w\\w\\w \\w\\w\\w +[0-9]+ [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9] \\(.*\\):$" 1) - ) - "Alist specifying how to match lines that indicate a new current file. -Note that the match is done at the beginning of lines. -Each elt has the form (REGEXP IDX). -If REGEXP matches, the IDX'th subexpression gives the file name. This is -used with compilers that don't indicate file name in every error message.") - -;; There is no generally useful regexp that will match non messages, but -;; in special cases there might be one. The lines that are not matched by -;; a regexp take much longer time than the ones that are recognized so if -;; you have same regexeps here, parsing is faster. -(defvar compilation-nomessage-regexp-alist - '( - ) - "Alist specifying how to match lines that have no message. -Note that the match is done at the beginning of lines. -Each elt has the form (REGEXP). This alist is by default empty, but if -you have some good regexps here, the parsing of messages will be faster.") - -(defcustom compilation-error-screen-columns t - "*If non-nil, column numbers in error messages are screen columns. -Otherwise they are interpreted as character positions, with -each character occupying one column. -The default is to use screen columns, which requires that the compilation -program and Emacs agree about the display width of the characters, -especially the TAB character." - :type 'boolean - :group 'compilation - :version "20.4") - -(defcustom compilation-read-command t - "*Non-nil means \\[compile] reads the compilation command to use. -Otherwise, \\[compile] just uses the value of `compile-command'." - :type 'boolean - :group 'compilation) - -;;;###autoload -(defcustom compilation-ask-about-save t - "*Non-nil means \\[compile] asks which buffers to save before compiling. -Otherwise, it saves all modified buffers without asking." - :type 'boolean - :group 'compilation) - -;; Note: the character class after the optional drive letter does not -;; include a space to support file names with blanks. -(defvar grep-regexp-alist - '(("\\([a-zA-Z]?:?[^:(\t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)) - "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") - -(defvar grep-program - ;; Currently zgrep has trouble. It runs egrep instead of grep, - ;; and it doesn't pass along long options right. - "grep" - ;; (if (equal (condition-case nil ; in case "zgrep" isn't in exec-path - ;; (call-process "zgrep" nil nil nil - ;; "foo" null-device) - ;; (error nil)) - ;; 1) - ;; "zgrep" - ;; "grep") - "The default grep program for `grep-command' and `grep-find-command'. -This variable's value takes effect when `grep-compute-defaults' is called.") - -(defvar find-program "find" - "The default find program for `grep-find-command'. -This variable's value takes effect when `grep-compute-defaults' is called.") - -(defvar grep-find-use-xargs nil - "Whether \\[grep-find] uses the `xargs' utility by default. - -If nil, it uses `find -exec'; if `gnu', it uses `find -print0' and `xargs -0'; -if not nil and not `gnu', it uses `find -print' and `xargs'. - -This variable's value takes effect when `grep-compute-defaults' is called.") - -;;;###autoload -(defcustom compilation-search-path '(nil) - "*List of directories to search for source files named in error messages. -Elements should be directory names, not file names of directories. -nil as an element means to try the default directory." - :type '(repeat (choice (const :tag "Default" nil) - (string :tag "Directory"))) - :group 'compilation) - -(defcustom compile-command "make -k " - "*Last shell command used to do a compilation; default for next compilation. - -Sometimes it is useful for files to supply local values for this variable. -You might also use mode hooks to specify it in certain modes, like this: - - (add-hook 'c-mode-hook - (lambda () - (unless (or (file-exists-p \"makefile\") - (file-exists-p \"Makefile\")) - (set (make-local-variable 'compile-command) - (concat \"make -k \" - (file-name-sans-extension buffer-file-name))))))" - :type 'string - :group 'compilation) - -(defvar compilation-directory-stack nil - "Stack of previous directories for `compilation-leave-directory-regexp'. -The last element is the directory the compilation was started in.") - -(defvar compilation-exit-message-function nil "\ -If non-nil, called when a compilation process dies to return a status message. -This should be a function of three arguments: process status, exit status, -and exit message; it returns a cons (MESSAGE . MODELINE) of the strings to -write into the compilation buffer, and to put in its mode line.") - -(defvar compilation-environment nil - "*List of environment variables for compilation to inherit. -Each element should be a string of the form ENVVARNAME=VALUE. -This list is temporarily prepended to `process-environment' prior to -starting the compilation process.") - -;; History of compile commands. -(defvar compile-history nil) -;; History of grep commands. -(defvar grep-history nil) -(defvar grep-find-history nil) - -(defun compilation-mode-font-lock-keywords () - "Return expressions to highlight in Compilation mode." - (nconc - ;; - ;; Compiler warning/error lines. - (mapcar (function - (lambda (item) - ;; Prepend "^", adjusting FILE-IDX and LINE-IDX accordingly. - (let ((file-idx (nth 1 item)) - (line-idx (nth 2 item)) - (col-idx (nth 3 item)) - keyword) - (when (numberp col-idx) - (setq keyword - (cons (list (1+ col-idx) 'font-lock-type-face nil t) - keyword))) - (when (numberp line-idx) - (setq keyword - (cons (list (1+ line-idx) 'font-lock-variable-name-face) - keyword))) - (when (numberp file-idx) - (setq keyword - (cons (list (1+ file-idx) 'font-lock-warning-face) - keyword))) - (cons (concat "^\\(" (nth 0 item) "\\)") keyword)))) - compilation-error-regexp-alist) - (list - ;; - ;; Compiler output lines. Recognize `make[n]:' lines too. - '("^\\([A-Za-z_0-9/\.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" - (1 font-lock-function-name-face) (3 font-lock-comment-face nil t))) - )) - -;;;###autoload -(defun compile (command) - "Compile the program including the current buffer. Default: run `make'. -Runs COMMAND, a shell command, in a separate process asynchronously -with output going to the buffer `*compilation*'. - -You can then use the command \\[next-error] to find the next error message -and move to the source code that caused it. - -Interactively, prompts for the command if `compilation-read-command' is -non-nil; otherwise uses `compile-command'. With prefix arg, always prompts. - -To run more than one compilation at once, start one and rename -the \`*compilation*' buffer to some other name with -\\[rename-buffer]. Then start the next one. On most systems, -termination of the main compilation process kills its -subprocesses. - -The name used for the buffer is actually whatever is returned by -the function in `compilation-buffer-name-function', so you can set that -to a function that generates a unique name." - (interactive - (if (or compilation-read-command current-prefix-arg) - (list (read-from-minibuffer "Compile command: " - (eval compile-command) nil nil - '(compile-history . 1))) - (list (eval compile-command)))) - (unless (equal command (eval compile-command)) - (setq compile-command command)) - (save-some-buffers (not compilation-ask-about-save) nil) - (compile-internal command "No more errors")) - -;; run compile with the default command line -(defun recompile () - "Re-compile the program including the current buffer. -If this is run in a compilation-mode buffer, re-use the arguments from the -original use. Otherwise, it recompiles using `compile-command'." - (interactive) - (save-some-buffers (not compilation-ask-about-save) nil) - (apply 'compile-internal (or compilation-arguments - `(,(eval compile-command) "No more errors")))) - -(defun grep-process-setup () - "Set up `compilation-exit-message-function' for `grep'." - (set (make-local-variable 'compilation-exit-message-function) - (lambda (status code msg) - (if (eq status 'exit) - (cond ((zerop code) - '("finished (matches found)\n" . "matched")) - ((= code 1) - '("finished with no matches found\n" . "no match")) - (t - (cons msg code))) - (cons msg code))))) - -(defun grep-compute-defaults () - (unless (or (not grep-use-null-device) (eq grep-use-null-device t)) - (setq grep-use-null-device - (with-temp-buffer - (let ((hello-file (expand-file-name "HELLO" data-directory))) - (not - (and (equal (condition-case nil - (if grep-command - ;; `grep-command' is already set, so - ;; use that for testing. - (call-process-shell-command - grep-command nil t nil - "^English" hello-file) - ;; otherwise use `grep-program' - (call-process grep-program nil t nil - "-nH" "^English" hello-file)) - (error nil)) - 0) - (progn - (goto-char (point-min)) - (looking-at - (concat (regexp-quote hello-file) - ":[0-9]+:English"))))))))) - (unless grep-command - (setq grep-command - (let ((required-options (if grep-use-null-device "-n" "-nH"))) - (if (equal (condition-case nil ; in case "grep" isn't in exec-path - (call-process grep-program nil nil nil - "-e" "foo" null-device) - (error nil)) - 1) - (format "%s %s -e " grep-program required-options) - (format "%s %s " grep-program required-options))))) - (unless grep-find-use-xargs - (setq grep-find-use-xargs - (if (and - (equal (call-process "find" nil nil nil - null-device "-print0") - 0) - (equal (call-process "xargs" nil nil nil - "-0" "-e" "echo") - 0)) - 'gnu))) - (unless grep-find-command - (setq grep-find-command - (cond ((eq grep-find-use-xargs 'gnu) - (format "%s . -type f -print0 | xargs -0 -e %s" - find-program grep-command)) - (grep-find-use-xargs - (format "%s . -type f -print | xargs %s" - find-program grep-command)) - (t (cons (format "%s . -type f -exec %s {} %s \\;" - find-program grep-command null-device) - (+ 22 (length grep-command))))))) - (unless grep-tree-command - (setq grep-tree-command - (let* ((glen (length grep-program)) - (gcmd (concat grep-program " " (substring grep-command glen)))) - (cond ((eq grep-find-use-xargs 'gnu) - (format "%s -type f -print0 | xargs -0 -e %s " - find-program gcmd)) - (grep-find-use-xargs - (format "%s -type f -print | xargs %s " - find-program gcmd)) - (t (format "%s -type f -exec %s {} %s \\;" - find-program gcmd null-device))))))) - -(defun grep-default-command () - (let ((tag-default - (funcall (or find-tag-default-function - (get major-mode 'find-tag-default-function) - ;; We use grep-tag-default instead of - ;; find-tag-default, to avoid loading etags. - 'grep-tag-default))) - (sh-arg-re "\\(\\(?:\"\\(?:[^\"]\\|\\\\\"\\)+\"\\|'[^']+'\\|[^\"' \t\n]\\)+\\)") - (grep-default (or (car grep-history) grep-command))) - ;; Replace the thing matching for with that around cursor. - (when (or (string-match - (concat "[^ ]+\\s +\\(?:-[^ ]+\\s +\\)*" - sh-arg-re "\\(\\s +\\(\\S +\\)\\)?") - grep-default) - ;; If the string is not yet complete. - (string-match "\\(\\)\\'" grep-default)) - (unless (or (not (stringp buffer-file-name)) - (when (match-beginning 2) - (save-match-data - (string-match - (wildcard-to-regexp - (file-name-nondirectory - (match-string 3 grep-default))) - (file-name-nondirectory buffer-file-name))))) - (setq grep-default (concat (substring grep-default - 0 (match-beginning 2)) - " *." - (file-name-extension buffer-file-name)))) - (replace-match (or tag-default "") t t grep-default 1)))) - -;;;###autoload -(defun grep (command-args) - "Run grep, with user-specified args, and collect output in a buffer. -While grep runs asynchronously, you can use \\[next-error] (M-x next-error), -or \\\\[compile-goto-error] in the grep \ -output buffer, to go to the lines -where grep found matches. - -This command uses a special history list for its COMMAND-ARGS, so you can -easily repeat a grep command. - -A prefix argument says to default the argument based upon the current -tag the cursor is over, substituting it into the last grep command -in the grep command history (or into `grep-command' -if that history list is empty)." - (interactive - (progn - (unless (and grep-command - (or (not grep-use-null-device) (eq grep-use-null-device t))) - (grep-compute-defaults)) - (let ((default (grep-default-command))) - (list (read-from-minibuffer "Run grep (like this): " - (if current-prefix-arg - default grep-command) - nil nil 'grep-history - (if current-prefix-arg nil default)))))) - - ;; Setting process-setup-function makes exit-message-function work - ;; even when async processes aren't supported. - (let* ((compilation-process-setup-function 'grep-process-setup) - (buf (compile-internal (if (and grep-use-null-device null-device) - (concat command-args " " null-device) - command-args) - "No more grep hits" "grep" - ;; Give it a simpler regexp to match. - nil grep-regexp-alist))))) - -;; This is a copy of find-tag-default from etags.el. -(defun grep-tag-default () - (save-excursion - (while (looking-at "\\sw\\|\\s_") - (forward-char 1)) - (when (or (re-search-backward "\\sw\\|\\s_" - (save-excursion (beginning-of-line) (point)) - t) - (re-search-forward "\\(\\sw\\|\\s_\\)+" - (save-excursion (end-of-line) (point)) - t)) - (goto-char (match-end 0)) - (buffer-substring (point) - (progn (forward-sexp -1) - (while (looking-at "\\s'") - (forward-char 1)) - (point)))))) - -;;;###autoload -(defun grep-find (command-args) - "Run grep via find, with user-specified args COMMAND-ARGS. -Collect output in a buffer. -While find runs asynchronously, you can use the \\[next-error] command -to find the text that grep hits refer to. - -This command uses a special history list for its arguments, so you can -easily repeat a find command." - (interactive - (progn - (unless grep-find-command - (grep-compute-defaults)) - (list (read-from-minibuffer "Run find (like this): " - grep-find-command nil nil - 'grep-find-history)))) - (let ((null-device nil)) ; see grep - (grep command-args))) - -(defun grep-expand-command-macros (command &optional regexp files dir excl case-fold) - "Patch grep COMMAND replacing , etc." - (setq command - (replace-regexp-in-string "" - (or dir ".") command t t)) - (setq command - (replace-regexp-in-string "" - (or excl "") command t t)) - (setq command - (replace-regexp-in-string "" - (or files "") command t t)) - (setq command - (replace-regexp-in-string "" - (if case-fold "-i" "") command t t)) - (setq command - (replace-regexp-in-string "" - (or regexp "") command t t)) - command) - -(defvar grep-tree-last-regexp "") -(defvar grep-tree-last-files (car (car grep-tree-files-aliases))) - -;;;###autoload -(defun grep-tree (regexp files dir &optional subdirs) - "Grep for REGEXP in FILES in directory tree rooted at DIR. -Collect output in a buffer. -Interactively, prompt separately for each search parameter. -With prefix arg, reuse previous REGEXP. -The search is limited to file names matching shell pattern FILES. -FILES may use abbreviations defined in `grep-tree-files-aliases', e.g. -entering `ch' is equivalent to `*.[ch]'. - -While find runs asynchronously, you can use the \\[next-error] command -to find the text that grep hits refer to. - -This command uses a special history list for its arguments, so you can -easily repeat a find command. - -When used non-interactively, optional arg SUBDIRS limits the search to -those sub directories of DIR." - (interactive - (let* ((regexp - (if current-prefix-arg - grep-tree-last-regexp - (let* ((default (current-word)) - (spec (read-string - (concat "Search for" - (if (and default (> (length default) 0)) - (format " (default %s): " default) ": "))))) - (if (equal spec "") default spec)))) - (files - (read-string (concat "Search for \"" regexp "\" in files (default " grep-tree-last-files "): "))) - (dir - (read-directory-name "Base directory: " nil default-directory t))) - (list regexp files dir))) - (unless grep-tree-command - (grep-compute-defaults)) - (unless (and (stringp files) (> (length files) 0)) - (setq files grep-tree-last-files)) - (when files - (setq grep-tree-last-files files) - (let ((mf (assoc files grep-tree-files-aliases))) - (if mf - (setq files (cdr mf))))) - (let ((command-args (grep-expand-command-macros - grep-tree-command - (setq grep-tree-last-regexp regexp) - (and files (concat "-name '" files "'")) - (if subdirs - (if (stringp subdirs) - subdirs - (mapconcat 'identity subdirs " ")) - nil) ;; we change default-directory to dir - (and grep-tree-ignore-CVS-directories "-path '*/CVS' -prune -o ") - grep-tree-ignore-case)) - (default-directory dir) - (null-device nil)) ; see grep - (grep command-args))) - -(defcustom compilation-scroll-output nil - "*Non-nil to scroll the *compilation* buffer window as output appears. - -Setting it causes the compilation-mode commands to put point at the -end of their output window so that the end of the output is always -visible rather than the begining." - :type 'boolean - :version "20.3" - :group 'compilation) - - -(defun compilation-buffer-name (mode-name name-function) - "Return the name of a compilation buffer to use. -If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME -to determine the buffer name. -Likewise if `compilation-buffer-name-function' is non-nil. -If current buffer is in Compilation mode for the same mode name -return the name of the current buffer, so that it gets reused. -Otherwise, construct a buffer name from MODE-NAME." - (cond (name-function - (funcall name-function mode-name)) - (compilation-buffer-name-function - (funcall compilation-buffer-name-function mode-name)) - ((and (eq major-mode 'compilation-mode) - (equal mode-name (nth 2 compilation-arguments))) - (buffer-name)) - (t - (concat "*" (downcase mode-name) "*")))) - - -(defun compile-internal (command error-message - &optional name-of-mode parser - error-regexp-alist name-function - enter-regexp-alist leave-regexp-alist - file-regexp-alist nomessage-regexp-alist - no-async) - "Run compilation command COMMAND (low level interface). -ERROR-MESSAGE is a string to print if the user asks to see another error -and there are no more errors. The rest of the arguments, 3-10 are optional. -For them nil means use the default. -NAME-OF-MODE is the name to display as the major mode in the compilation -buffer. PARSER is the error parser function. ERROR-REGEXP-ALIST is the error -message regexp alist to use. NAME-FUNCTION is a function called to name the -buffer. ENTER-REGEXP-ALIST is the enter directory message regexp alist to use. -LEAVE-REGEXP-ALIST is the leave directory message regexp alist to use. -FILE-REGEXP-ALIST is the change current file message regexp alist to use. -NOMESSAGE-REGEXP-ALIST is the nomessage regexp alist to use. - The defaults for these variables are the global values of -\`compilation-parse-errors-function', `compilation-error-regexp-alist', -\`compilation-buffer-name-function', `compilation-enter-directory-regexp-alist', -\`compilation-leave-directory-regexp-alist', `compilation-file-regexp-alist', -\ and `compilation-nomessage-regexp-alist', respectively. -For arg 7-10 a value t means an empty alist. - -If NO-ASYNC is non-nil, start the compilation process synchronously. - -Returns the compilation buffer created." - (unless no-async - (setq no-async (not (fboundp 'start-process)))) - (let (outbuf) - (save-excursion - (or name-of-mode - (setq name-of-mode "Compilation")) - (setq outbuf - (get-buffer-create (compilation-buffer-name name-of-mode - name-function))) - (set-buffer outbuf) - (let ((comp-proc (get-buffer-process (current-buffer)))) - (if comp-proc - (if (or (not (eq (process-status comp-proc) 'run)) - (yes-or-no-p - (format "A %s process is running; kill it? " - name-of-mode))) - (condition-case () - (progn - (interrupt-process comp-proc) - (sit-for 1) - (delete-process comp-proc)) - (error nil)) - (error "Cannot have two processes in `%s' at once" - (buffer-name)) - ))) - ;; In case the compilation buffer is current, make sure we get the global - ;; values of compilation-error-regexp-alist, etc. - (kill-all-local-variables)) - (or error-regexp-alist - (setq error-regexp-alist compilation-error-regexp-alist)) - (or enter-regexp-alist - (setq enter-regexp-alist compilation-enter-directory-regexp-alist)) - (or leave-regexp-alist - (setq leave-regexp-alist compilation-leave-directory-regexp-alist)) - (or file-regexp-alist - (setq file-regexp-alist compilation-file-regexp-alist)) - (or nomessage-regexp-alist - (setq nomessage-regexp-alist compilation-nomessage-regexp-alist)) - (or parser (setq parser compilation-parse-errors-function)) - (let ((thisdir default-directory) - outwin) - (save-excursion - ;; Clear out the compilation buffer and make it writable. - ;; Change its default-directory to the directory where the compilation - ;; will happen, and insert a `cd' command to indicate this. - (set-buffer outbuf) - (setq buffer-read-only nil) - (buffer-disable-undo (current-buffer)) - (erase-buffer) - (buffer-enable-undo (current-buffer)) - (setq default-directory thisdir) - (insert "cd " thisdir "\n" command "\n") - (set-buffer-modified-p nil)) - ;; If we're already in the compilation buffer, go to the end - ;; of the buffer, so point will track the compilation output. - (if (eq outbuf (current-buffer)) - (goto-char (point-max))) - ;; Pop up the compilation buffer. - (setq outwin (display-buffer outbuf nil t)) - (with-current-buffer outbuf - (compilation-mode name-of-mode) - ;; In what way is it non-ergonomic ? -stef - ;; (toggle-read-only 1) ;;; Non-ergonomic. - (set (make-local-variable 'compilation-parse-errors-function) parser) - (set (make-local-variable 'compilation-error-message) error-message) - (set (make-local-variable 'compilation-error-regexp-alist) - error-regexp-alist) - (set (make-local-variable 'compilation-enter-directory-regexp-alist) - enter-regexp-alist) - (set (make-local-variable 'compilation-leave-directory-regexp-alist) - leave-regexp-alist) - (set (make-local-variable 'compilation-file-regexp-alist) - file-regexp-alist) - (set (make-local-variable 'compilation-nomessage-regexp-alist) - nomessage-regexp-alist) - (set (make-local-variable 'compilation-arguments) - (list command error-message - name-of-mode parser - error-regexp-alist name-function - enter-regexp-alist leave-regexp-alist - file-regexp-alist nomessage-regexp-alist)) - ;; This proves a good idea if the buffer's going to scroll - ;; with lazy-lock on. - (set (make-local-variable 'lazy-lock-defer-on-scrolling) t) - (setq default-directory thisdir - compilation-directory-stack (list default-directory)) - (set-window-start outwin (point-min)) - (or (eq outwin (selected-window)) - (set-window-point outwin (point-min))) - (compilation-set-window-height outwin) - (if compilation-process-setup-function - (funcall compilation-process-setup-function)) - ;; Start the compilation. - (if (not no-async) - (let* ((process-environment - (append - compilation-environment - (if (and (boundp 'system-uses-terminfo) - system-uses-terminfo) - (list "TERM=dumb" "TERMCAP=" - (format "COLUMNS=%d" (window-width))) - (list "TERM=emacs" - (format "TERMCAP=emacs:co#%d:tc=unknown:" - (window-width)))) - ;; Set the EMACS variable, but - ;; don't override users' setting of $EMACS. - (if (getenv "EMACS") - process-environment - (cons "EMACS=t" process-environment)))) - (proc (start-process-shell-command (downcase mode-name) - outbuf - command))) - (set-process-sentinel proc 'compilation-sentinel) - (set-process-filter proc 'compilation-filter) - (set-marker (process-mark proc) (point) outbuf) - (setq compilation-in-progress - (cons proc compilation-in-progress))) - ;; No asynchronous processes available. - (message "Executing `%s'..." command) - ;; Fake modeline display as if `start-process' were run. - (setq mode-line-process ":run") - (force-mode-line-update) - (sit-for 0) ; Force redisplay - (let ((status (call-process shell-file-name nil outbuf nil "-c" - command))) - (cond ((numberp status) - (compilation-handle-exit 'exit status - (if (zerop status) - "finished\n" - (format "\ -exited abnormally with code %d\n" - status)))) - ((stringp status) - (compilation-handle-exit 'signal status - (concat status "\n"))) - (t - (compilation-handle-exit 'bizarre status status)))) - (message "Executing `%s'...done" command))) - (if compilation-scroll-output - (save-selected-window - (select-window outwin) - (goto-char (point-max))))) - ;; Make it so the next C-x ` will use this buffer. - (setq compilation-last-buffer outbuf))) - -(defun compilation-set-window-height (window) - "Set the height of WINDOW according to `compilation-window-height'." - (and compilation-window-height - (= (window-width window) (frame-width (window-frame window))) - ;; If window is alone in its frame, aside from a minibuffer, - ;; don't change its height. - (not (eq window (frame-root-window (window-frame window)))) - ;; This save-current-buffer prevents us from changing the current - ;; buffer, which might not be the same as the selected window's buffer. - (save-current-buffer - (save-selected-window - (select-window window) - (enlarge-window (- compilation-window-height - (window-height))))))) - -(defvar compilation-menu-map - (let ((map (make-sparse-keymap "Errors"))) - (define-key map [stop-subjob] - '("Stop Compilation" . kill-compilation)) - (define-key map [compilation-mode-separator2] - '("----" . nil)) - (define-key map [compilation-mode-first-error] - '("First Error" . first-error)) - (define-key map [compilation-mode-previous-error] - '("Previous Error" . previous-error)) - (define-key map [compilation-mode-next-error] - '("Next Error" . next-error)) - map)) - -(defvar compilation-minor-mode-map - (let ((map (make-sparse-keymap))) - (define-key map [mouse-2] 'compile-mouse-goto-error) - (define-key map "\C-c\C-c" 'compile-goto-error) - (define-key map "\C-m" 'compile-goto-error) - (define-key map "\C-c\C-k" 'kill-compilation) - (define-key map "\M-n" 'compilation-next-error) - (define-key map "\M-p" 'compilation-previous-error) - (define-key map "\M-{" 'compilation-previous-file) - (define-key map "\M-}" 'compilation-next-file) - ;; Set up the menu-bar - (define-key map [menu-bar compilation] - (cons "Errors" compilation-menu-map)) - map) - "Keymap for `compilation-minor-mode'.") - -(defvar compilation-shell-minor-mode-map - (let ((map (make-sparse-keymap))) - (define-key map [mouse-2] 'compile-mouse-goto-error) - (define-key map "\M-\C-m" 'compile-goto-error) - (define-key map "\M-\C-n" 'compilation-next-error) - (define-key map "\M-\C-p" 'compilation-previous-error) - (define-key map "\M-{" 'compilation-previous-file) - (define-key map "\M-}" 'compilation-next-file) - ;; Set up the menu-bar - (define-key map [menu-bar compilation] - (cons "Errors" compilation-menu-map)) - map) - "Keymap for `compilation-shell-minor-mode'.") - -(defvar compilation-mode-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map compilation-minor-mode-map) - (define-key map " " 'scroll-up) - (define-key map "\^?" 'scroll-down) - ;; Set up the menu-bar - (define-key map [menu-bar compilation] - (cons "Compile" (make-sparse-keymap "Compile"))) - (define-key map [menu-bar compilation compilation-separator2] - '("----" . nil)) - (define-key map [menu-bar compilation compilation-mode-grep] - '("Search Files (grep)" . grep)) - (define-key map [menu-bar compilation compilation-mode-recompile] - '("Recompile" . recompile)) - (define-key map [menu-bar compilation compilation-mode-compile] - '("Compile..." . compile)) - map) - "Keymap for compilation log buffers. -`compilation-minor-mode-map' is a parent of this.") - -(put 'compilation-mode 'mode-class 'special) - -;;;###autoload -(defun compilation-mode (&optional name-of-mode) - "Major mode for compilation log buffers. -\\To visit the source for a line-numbered error, -move point to the error message line and type \\[compile-goto-error]. -To kill the compilation, type \\[kill-compilation]. - -Runs `compilation-mode-hook' with `run-hooks' (which see)." - (interactive) - (kill-all-local-variables) - (use-local-map compilation-mode-map) - (setq major-mode 'compilation-mode - mode-name (or name-of-mode "Compilation")) - (compilation-setup) - (set (make-local-variable 'font-lock-defaults) - '(compilation-mode-font-lock-keywords t)) - (set (make-local-variable 'revert-buffer-function) - 'compilation-revert-buffer) - (run-hooks 'compilation-mode-hook)) - -(defun compilation-revert-buffer (ignore-auto noconfirm) - (if buffer-file-name - (let (revert-buffer-function) - (revert-buffer ignore-auto noconfirm preserve-modes)) - (if (or noconfirm (yes-or-no-p (format "Restart compilation? "))) - (apply 'compile-internal compilation-arguments)))) - -(defun compilation-setup () - "Prepare the buffer for the compilation parsing commands to work." - ;; Make the buffer's mode line show process state. - (setq mode-line-process '(":%s")) - (set (make-local-variable 'compilation-error-list) nil) - (set (make-local-variable 'compilation-old-error-list) nil) - (set (make-local-variable 'compilation-parsing-end) (copy-marker 1)) - (set (make-local-variable 'compilation-directory-stack) - (list default-directory)) - (make-local-variable 'compilation-error-screen-columns) - (setq compilation-last-buffer (current-buffer))) - -;;;###autoload -(define-minor-mode compilation-shell-minor-mode - "Toggle compilation shell minor mode. -With arg, turn compilation mode on if and only if arg is positive. -In this minor mode, all the error-parsing commands of the -Compilation major mode are available but bound to keys that don't -collide with Shell mode. See `compilation-mode'. -Turning the mode on runs the normal hook `compilation-shell-minor-mode-hook'." - nil " Shell-Compile" nil - :group 'compilation - (let (mode-line-process) - (compilation-setup))) - -;;;###autoload -(define-minor-mode compilation-minor-mode - "Toggle compilation minor mode. -With arg, turn compilation mode on if and only if arg is positive. -In this minor mode, all the error-parsing commands of the -Compilation major mode are available. See `compilation-mode'. -Turning the mode on runs the normal hook `compilation-minor-mode-hook'." - nil " Compilation" nil - :group 'compilation - (let ((mode-line-process)) - (compilation-setup))) - -(defun compilation-handle-exit (process-status exit-status msg) - "Write msg in the current buffer and hack its mode-line-process." - (let ((buffer-read-only nil) - (status (if compilation-exit-message-function - (funcall compilation-exit-message-function - process-status exit-status msg) - (cons msg exit-status))) - (omax (point-max)) - (opoint (point))) - ;; Record where we put the message, so we can ignore it - ;; later on. - (goto-char omax) - (insert ?\n mode-name " " (car status)) - (if (and (numberp compilation-window-height) - (zerop compilation-window-height)) - (message "%s" (cdr status))) - (if (bolp) - (forward-char -1)) - (insert " at " (substring (current-time-string) 0 19)) - (goto-char (point-max)) - ;; Prevent that message from being recognized as a compilation error. - (add-text-properties omax (point) - (append '(compilation-handle-exit t) nil)) - (setq mode-line-process (format ":%s [%s]" process-status (cdr status))) - ;; Force mode line redisplay soon. - (force-mode-line-update) - (if (and opoint (< opoint omax)) - (goto-char opoint)) - ;; Automatically parse (and mouse-highlight) error messages: - (cond ((eq compile-auto-highlight t) - (compile-reinitialize-errors nil (point-max))) - ((numberp compile-auto-highlight) - (compile-reinitialize-errors nil - (save-excursion - (goto-line compile-auto-highlight) - (point))))) - (if compilation-finish-function - (funcall compilation-finish-function (current-buffer) msg)) - (let ((functions compilation-finish-functions)) - (while functions - (funcall (car functions) (current-buffer) msg) - (setq functions (cdr functions)))))) - -;; Called when compilation process changes state. -(defun compilation-sentinel (proc msg) - "Sentinel for compilation buffers." - (let ((buffer (process-buffer proc))) - (if (memq (process-status proc) '(signal exit)) - (progn - (if (null (buffer-name buffer)) - ;; buffer killed - (set-process-buffer proc nil) - (let ((obuf (current-buffer))) - ;; save-excursion isn't the right thing if - ;; process-buffer is current-buffer - (unwind-protect - (progn - ;; Write something in the compilation buffer - ;; and hack its mode line. - (set-buffer buffer) - (compilation-handle-exit (process-status proc) - (process-exit-status proc) - msg) - ;; Since the buffer and mode line will show that the - ;; process is dead, we can delete it now. Otherwise it - ;; will stay around until M-x list-processes. - (delete-process proc)) - (set-buffer obuf)))) - (setq compilation-in-progress (delq proc compilation-in-progress)) - )))) - -(defun compilation-filter (proc string) - "Process filter for compilation buffers. -Just inserts the text, but uses `insert-before-markers'." - (if (buffer-name (process-buffer proc)) - (save-excursion - (set-buffer (process-buffer proc)) - (let ((buffer-read-only nil) - (end (marker-position compilation-parsing-end))) - (save-excursion - (goto-char (process-mark proc)) - (insert-before-markers string) - (set-marker compilation-parsing-end end) ;don't move it - (run-hooks 'compilation-filter-hook) - ;; this seems redundant since we insert-before-marks -stefan - ;;(set-marker (process-mark proc) (point)) - ))))) - -(defun compile-error-at-point () - "Return the cdr of `compilation-old-error-list' for error containing point." - (compile-reinitialize-errors nil (point)) - (let ((errors compilation-old-error-list)) - (while (and errors - (> (point) (car (car errors)))) - (setq errors (cdr errors))) - errors)) - -(defsubst compilation-buffer-p (buffer) - (save-excursion - (set-buffer buffer) - (or compilation-shell-minor-mode compilation-minor-mode - (eq major-mode 'compilation-mode)))) - -(defun compilation-next-error (n) - "Move point to the next error in the compilation buffer. -Prefix arg N says how many error messages to move forwards (or -backwards, if negative). -Does NOT find the source line like \\[next-error]." - (interactive "p") - (or (compilation-buffer-p (current-buffer)) - (error "Not in a compilation buffer")) - (setq compilation-last-buffer (current-buffer)) - - (let ((errors (compile-error-at-point))) - - ;; Move to the error after the one containing point. - (goto-char (car (if (< n 0) - (let ((i 0) - (e compilation-old-error-list)) - ;; See how many cdrs away ERRORS is from the start. - (while (not (eq e errors)) - (setq i (1+ i) - e (cdr e))) - (if (> (- n) i) - (error "Moved back past first error") - (nth (+ i n) compilation-old-error-list))) - (save-excursion - (while (and (> n 0) errors) - ;; Discard the current error and any previous. - (while (and errors (>= (point) (car (car errors)))) - (setq errors (cdr errors))) - ;; Now (car errors) is the next error. - ;; If we want to move down more errors, - ;; put point at this one and start again. - (setq n (1- n)) - (if (and errors (> n 0)) - (goto-char (car (car errors)))))) - (let ((compilation-error-list errors)) - (compile-reinitialize-errors nil nil n) - (if compilation-error-list - (nth (1- n) compilation-error-list) - (error "Moved past last error")))))))) - -(defun compilation-previous-error (n) - "Move point to the previous error in the compilation buffer. -Prefix arg N says how many error messages to move backwards (or -forwards, if negative). -Does NOT find the source line like \\[next-error]." - (interactive "p") - (compilation-next-error (- n))) - - -;; Given an elt of `compilation-error-list', return an object representing -;; the referenced file which is equal to (but not necessarily eq to) what -;; this function would return for another error in the same file. -(defsubst compilation-error-filedata (data) - (setq data (cdr data)) - (if (markerp data) - (marker-buffer data) - (car data))) - -;; Return a string describing a value from compilation-error-filedata. -;; This value is not necessarily useful as a file name, but should be -;; indicative to the user of what file's errors are being referred to. -(defsubst compilation-error-filedata-file-name (filedata) - (if (bufferp filedata) - (buffer-file-name filedata) - (car filedata))) - -(defun compilation-next-file (n) - "Move point to the next error for a different file than the current one." - (interactive "p") - (or (compilation-buffer-p (current-buffer)) - (error "Not in a compilation buffer")) - (setq compilation-last-buffer (current-buffer)) - - (let ((reversed (< n 0)) - errors filedata) - - (if (not reversed) - (setq errors (or (compile-error-at-point) - (error "Moved past last error"))) - - ;; Get a reversed list of the errors up through the one containing point. - (compile-reinitialize-errors nil (point)) - (setq errors (reverse compilation-old-error-list) - n (- n)) - - ;; Ignore errors after point. (car ERRORS) will be the error - ;; containing point, (cadr ERRORS) the one before it. - (while (and errors - (< (point) (car (car errors)))) - (setq errors (cdr errors)))) - - (while (> n 0) - (setq filedata (compilation-error-filedata (car errors))) - - ;; Skip past the following errors for this file. - (while (equal filedata - (compilation-error-filedata - (car (or errors - (if reversed - (error "%s the first erring file" - (compilation-error-filedata-file-name - filedata)) - (let ((compilation-error-list nil)) - ;; Parse some more. - (compile-reinitialize-errors nil nil 2) - (setq errors compilation-error-list))) - (error "%s is the last erring file" - (compilation-error-filedata-file-name - filedata)))))) - (setq errors (cdr errors))) - - (setq n (1- n))) - - ;; Move to the following error. - (goto-char (car (car (or errors - (if reversed - (error "This is the first erring file") - (let ((compilation-error-list nil)) - ;; Parse the last one. - (compile-reinitialize-errors nil nil 1) - compilation-error-list)))))))) - -(defun compilation-previous-file (n) - "Move point to the previous error for a different file than the current one." - (interactive "p") - (compilation-next-file (- n))) - -(defun kill-compilation () - "Kill the process made by the \\[compile] or \\[grep] commands." - (interactive) - (let ((buffer (compilation-find-buffer))) - (if (get-buffer-process buffer) - (interrupt-process (get-buffer-process buffer)) - (error "The compilation process is not running")))) - -(defalias 'kill-grep 'kill-compilation) - -;; Parse any new errors in the compilation buffer, -;; or reparse from the beginning if the user has asked for that. -(defun compile-reinitialize-errors (reparse - &optional limit-search find-at-least) - (save-excursion - (set-buffer compilation-last-buffer) - ;; If we are out of errors, or if user says "reparse", - ;; discard the info we have, to force reparsing. - (if (or (eq compilation-error-list t) - reparse) - (compilation-forget-errors)) - (if (and compilation-error-list - (or (not limit-search) - (> compilation-parsing-end limit-search)) - (or (not find-at-least) - (>= (length compilation-error-list) find-at-least))) - ;; Since compilation-error-list is non-nil, it points to a specific - ;; error the user wanted. So don't move it around. - nil - ;; This was here for a long time (before my rewrite); why? --roland - ;;(switch-to-buffer compilation-last-buffer) - (set-buffer-modified-p nil) - (if (< compilation-parsing-end (point-max)) - ;; compilation-error-list might be non-nil if we have a non-nil - ;; LIMIT-SEARCH or FIND-AT-LEAST arg. In that case its value - ;; records the current position in the error list, and we must - ;; preserve that after reparsing. - (let ((error-list-pos compilation-error-list)) - (funcall compilation-parse-errors-function - limit-search - (and find-at-least - ;; We only need enough new parsed errors to reach - ;; FIND-AT-LEAST errors past the current - ;; position. - (- find-at-least (length compilation-error-list)))) - ;; Remember the entire list for compilation-forget-errors. If - ;; this is an incremental parse, append to previous list. If - ;; we are parsing anew, compilation-forget-errors cleared - ;; compilation-old-error-list above. - (setq compilation-old-error-list - (nconc compilation-old-error-list compilation-error-list)) - (if error-list-pos - ;; We started in the middle of an existing list of parsed - ;; errors before parsing more; restore that position. - (setq compilation-error-list error-list-pos)) - ;; Mouse-Highlight (the first line of) each error message when the - ;; mouse pointer moves over it: - (let ((inhibit-read-only t) - (buffer-undo-list t) - deactivate-mark - (buffer-was-modified (buffer-modified-p)) - (error-list compilation-error-list)) - (while error-list - (save-excursion - (add-text-properties (goto-char (car (car error-list))) - (progn (end-of-line) (point)) - '(mouse-face highlight help-echo "\ -mouse-2: visit this file and line"))) - (setq error-list (cdr error-list))) - (set-buffer-modified-p buffer-was-modified)) - ))))) - -(defun compile-mouse-goto-error (event) - "Visit the source for the error message the mouse is pointing at. -This is like `compile-goto-error' called without prefix arg -at the end of the line." - (interactive "e") - (save-excursion - (set-buffer (window-buffer (posn-window (event-end event)))) - (goto-char (posn-point (event-end event))) - - (or (compilation-buffer-p (current-buffer)) - (error "Not in a compilation buffer")) - (setq compilation-last-buffer (current-buffer)) - ;; `compile-reinitialize-errors' needs to see the complete filename - ;; on the line where they clicked the mouse. Since it only looks - ;; up to point, moving point to eol makes sure the filename is - ;; visible to `compile-reinitialize-errors'. - (end-of-line) - (compile-reinitialize-errors nil (point)) - - ;; Move to bol; the marker for the error on this line will point there. - (beginning-of-line) - - ;; Move compilation-error-list to the elt of compilation-old-error-list - ;; we want. - (setq compilation-error-list compilation-old-error-list) - (while (and compilation-error-list - ;; The marker can point nowhere if we previously - ;; failed to find the relevant file. See - ;; compilation-next-error-locus. - (or (null (marker-buffer (caar compilation-error-list))) - (and (> (point) (caar compilation-error-list)) - (>= (point) - ;; Don't skip too far: the text between - ;; two errors belongs to the first. This - ;; in-between text might be other errors - ;; on the same line (see - ;; compilation-skip-to-next-location). - (if (null (cdr compilation-error-list)) - compilation-parsing-end - (caar (cdr compilation-error-list))))))) - (setq compilation-error-list (cdr compilation-error-list))) - (or compilation-error-list - (error "No error to go to"))) - (select-window (posn-window (event-end event))) - - (push-mark) - (next-error 1)) - -(defun compile-goto-error (&optional argp) - "Visit the source for the error message point is on. -Use this command in a compilation log buffer. Sets the mark at point there. -\\[universal-argument] as a prefix arg means to reparse the buffer's error messages first; -other kinds of prefix arguments are ignored." - (interactive "P") - (or (compilation-buffer-p (current-buffer)) - (error "Not in a compilation buffer")) - (setq compilation-last-buffer (current-buffer)) - (compile-reinitialize-errors (consp argp) (point)) - - ;; Move to bol; the marker for the error on this line will point there. - (beginning-of-line) - - ;; Move compilation-error-list to the elt of compilation-old-error-list - ;; we want. - (setq compilation-error-list compilation-old-error-list) - (while (and compilation-error-list - ;; The marker can point nowhere if we previously - ;; failed to find the relevant file. See - ;; compilation-next-error-locus. - (or (null (marker-buffer (caar compilation-error-list))) - (and (> (point) (caar compilation-error-list)) - (>= (point) - ;; Don't skip too far: the text between - ;; two errors belongs to the first. This - ;; in-between text might be other errors - ;; on the same line (see - ;; compilation-skip-to-next-location). - (if (null (cdr compilation-error-list)) - compilation-parsing-end - (caar (cdr compilation-error-list))))))) - (setq compilation-error-list (cdr compilation-error-list))) - - (push-mark) - (next-error 1)) - -;; Return a compilation buffer. -;; If the current buffer is a compilation buffer, return it. -;; If compilation-last-buffer is set to a live buffer, use that. -;; Otherwise, look for a compilation buffer and signal an error -;; if there are none. -(defun compilation-find-buffer (&optional other-buffer) - (if (and (not other-buffer) - (compilation-buffer-p (current-buffer))) - ;; The current buffer is a compilation buffer. - (current-buffer) - (if (and compilation-last-buffer (buffer-name compilation-last-buffer) - (compilation-buffer-p compilation-last-buffer) - (or (not other-buffer) (not (eq compilation-last-buffer - (current-buffer))))) - compilation-last-buffer - (let ((buffers (buffer-list))) - (while (and buffers (or (not (compilation-buffer-p (car buffers))) - (and other-buffer - (eq (car buffers) (current-buffer))))) - (setq buffers (cdr buffers))) - (if buffers - (car buffers) - (or (and other-buffer - (compilation-buffer-p (current-buffer)) - ;; The current buffer is a compilation buffer. - (progn - (if other-buffer - (message "This is the only compilation buffer.")) - (current-buffer))) - (error "No compilation started!"))))))) - -;;;###autoload -(defun next-error (&optional argp) - "Visit next compilation error message and corresponding source code. - -If all the error messages parsed so far have been processed already, -the message buffer is checked for new ones. - -A prefix ARGP specifies how many error messages to move; -negative means move back to previous error messages. -Just \\[universal-argument] as a prefix means reparse the error message buffer -and start at the first error. - -\\[next-error] normally uses the most recently started compilation or -grep buffer. However, it can operate on any buffer with output from -the \\[compile] and \\[grep] commands, or, more generally, on any -buffer in Compilation mode or with Compilation Minor mode enabled. To -specify use of a particular buffer for error messages, type -\\[next-error] in that buffer. - -Once \\[next-error] has chosen the buffer for error messages, -it stays with that buffer until you use it in some other buffer which -uses Compilation mode or Compilation Minor mode. - -See variables `compilation-parse-errors-function' and -\`compilation-error-regexp-alist' for customization ideas." - (interactive "P") - (setq compilation-last-buffer (compilation-find-buffer)) - (compilation-goto-locus (compilation-next-error-locus - ;; We want to pass a number here only if - ;; we got a numeric prefix arg, not just C-u. - (and (not (consp argp)) - (prefix-numeric-value argp)) - (consp argp)))) -;;;###autoload (define-key ctl-x-map "`" 'next-error) - -(defun previous-error () - "Visit previous compilation error message and corresponding source code. -This operates on the output from the \\[compile] command." - (interactive) - (next-error -1)) - -(defun first-error () - "Reparse the error message buffer and start at the first error. -Visit corresponding source code. -This operates on the output from the \\[compile] command." - (interactive) - (next-error '(4))) - -(defvar compilation-skip-to-next-location nil - "*If non-nil, skip multiple error messages for the same source location.") - -(defun compilation-next-error-locus (&optional move reparse silent) - "Visit next compilation error and return locus in corresponding source code. -This operates on the output from the \\[compile] command. -If all preparsed error messages have been processed, -the error message buffer is checked for new ones. - -Returns a cons (ERROR . SOURCE) of two markers: ERROR is a marker at the -location of the error message in the compilation buffer, and SOURCE is a -marker at the location in the source code indicated by the error message. - -Optional first arg MOVE says how many error messages to move forwards (or -backwards, if negative); default is 1. Optional second arg REPARSE, if -non-nil, says to reparse the error message buffer and reset to the first -error (plus MOVE - 1). If optional third argument SILENT is non-nil, return -nil instead of raising an error if there are no more errors. - -The current buffer should be the desired compilation output buffer." - (or move (setq move 1)) - (compile-reinitialize-errors reparse nil (and (not reparse) (max 0 move))) - (let (next-errors next-error) - (catch 'no-next-error - (save-excursion - (set-buffer compilation-last-buffer) - ;; compilation-error-list points to the "current" error. - (setq next-errors - (if (> move 0) - (nthcdr (1- move) - compilation-error-list) - ;; Zero or negative arg; we need to move back in the list. - (let ((n (1- move)) - (i 0) - (e compilation-old-error-list)) - ;; See how many cdrs away the current error is from the start. - (while (not (eq e compilation-error-list)) - (setq i (1+ i) - e (cdr e))) - (if (> (- n) i) - (error "Moved back past first error") - (nthcdr (+ i n) compilation-old-error-list)))) - next-error (car next-errors)) - (while - (if (null next-error) - (progn - (and move (/= move 1) - (error (if (> move 0) - "Moved past last error") - "Moved back past first error")) - ;; Forget existing error messages if compilation has finished. - (if (not (and (get-buffer-process (current-buffer)) - (eq (process-status - (get-buffer-process - (current-buffer))) - 'run))) - (compilation-forget-errors)) - (if silent - (throw 'no-next-error nil) - (error (concat compilation-error-message - (and (get-buffer-process (current-buffer)) - (eq (process-status - (get-buffer-process - (current-buffer))) - 'run) - " yet"))))) - (setq compilation-error-list (cdr next-errors)) - (if (null (cdr next-error)) - ;; This error is boring. Go to the next. - t - (or (markerp (cdr next-error)) - ;; This error has a filename/lineno pair. - ;; Find the file and turn it into a marker. - (let* ((fileinfo (car (cdr next-error))) - (buffer (apply 'compilation-find-file - (car next-error) fileinfo))) - (if (null buffer) - ;; We can't find this error's file. - ;; Remove all errors in the same file. - (progn - (setq next-errors compilation-old-error-list) - (while next-errors - (and (consp (cdr (car next-errors))) - (equal (car (cdr (car next-errors))) - fileinfo) - (progn - (set-marker (car (car next-errors)) nil) - (setcdr (car next-errors) nil))) - (setq next-errors (cdr next-errors))) - ;; Look for the next error. - t) - ;; We found the file. Get a marker for this error. - ;; compilation-old-error-list and - ;; compilation-error-screen-columns are buffer-local - ;; so we must be careful to extract their value - ;; before switching to the source file buffer. - (let ((errors compilation-old-error-list) - (columns compilation-error-screen-columns) - (last-line (nth 1 (cdr next-error))) - (column (nth 2 (cdr next-error)))) - (set-buffer buffer) - (save-excursion - (save-restriction - (widen) - (goto-line last-line) - (if (and column (> column 0)) - ;; Columns in error msgs are 1-origin. - (if columns - (move-to-column (1- column)) - (forward-char (1- column))) - (beginning-of-line)) - (setcdr next-error (point-marker)) - ;; Make all the other error messages referring - ;; to the same file have markers into the buffer. - (while errors - (and (consp (cdr (car errors))) - (equal (car (cdr (car errors))) fileinfo) - (let* ((this (nth 1 (cdr (car errors)))) - (column (nth 2 (cdr (car errors)))) - (lines (- this last-line))) - (if (eq selective-display t) - ;; When selective-display is t, - ;; each C-m is a line boundary, - ;; as well as each newline. - (if (< lines 0) - (re-search-backward "[\n\C-m]" - nil 'end - (- lines)) - (re-search-forward "[\n\C-m]" - nil 'end - lines)) - (forward-line lines)) - (if (and column (> column 1)) - (if columns - (move-to-column (1- column)) - (forward-char (1- column))) - (beginning-of-line)) - (setq last-line this) - (setcdr (car errors) (point-marker)))) - (setq errors (cdr errors))))))))) - ;; If we didn't get a marker for this error, or this - ;; marker's buffer was killed, go on to the next one. - (or (not (markerp (cdr next-error))) - (not (marker-buffer (cdr next-error)))))) - (setq next-errors compilation-error-list - next-error (car next-errors))))) - - (if compilation-skip-to-next-location - ;; Skip over multiple error messages for the same source location, - ;; so the next C-x ` won't go to an error in the same place. - (while (and compilation-error-list - (equal (cdr (car compilation-error-list)) - (cdr next-error))) - (setq compilation-error-list (cdr compilation-error-list)))) - - ;; We now have a marker for the position of the error source code. - ;; NEXT-ERROR is a cons (ERROR . SOURCE) of two markers. - next-error)) - -(defun compilation-goto-locus (next-error) - "Jump to an error locus returned by `compilation-next-error-locus'. -Takes one argument, a cons (ERROR . SOURCE) of two markers. -Selects a window with point at SOURCE, with another window displaying ERROR." - (if (eq (window-buffer (selected-window)) - (marker-buffer (car next-error))) - ;; If the compilation buffer window is selected, - ;; keep the compilation buffer in this window; - ;; display the source in another window. - (let ((pop-up-windows t)) - (pop-to-buffer (marker-buffer (cdr next-error)))) - (if (window-dedicated-p (selected-window)) - (pop-to-buffer (marker-buffer (cdr next-error))) - (switch-to-buffer (marker-buffer (cdr next-error))))) - (goto-char (cdr next-error)) - ;; If narrowing got in the way of - ;; going to the right place, widen. - (or (= (point) (marker-position (cdr next-error))) - (progn - (widen) - (goto-char (cdr next-error)))) - ;; If hideshow got in the way of - ;; seeing the right place, open permanently. - (mapcar (function (lambda (ov) - (when (eq 'hs (overlay-get ov 'invisible)) - (delete-overlay ov) - (goto-char (cdr next-error))))) - (overlays-at (point))) - - ;; Show compilation buffer in other window, scrolled to this error. - (let* ((pop-up-windows t) - ;; Use an existing window if it is in a visible frame. - (w (or (get-buffer-window (marker-buffer (car next-error)) 'visible) - ;; Pop up a window. - (display-buffer (marker-buffer (car next-error)))))) - (set-window-point w (car next-error)) - (set-window-start w (car next-error)) - (compilation-set-window-height w))) - -(defun compilation-find-file (marker filename dir &rest formats) - "Find a buffer for file FILENAME. -Search the directories in `compilation-search-path'. -A nil in `compilation-search-path' means to try the -current directory, which is passed in DIR. -If FILENAME is not found at all, ask the user where to find it. -Pop up the buffer containing MARKER and scroll to MARKER if we ask the user." - (or formats (setq formats '("%s"))) - (save-excursion - (let ((dirs compilation-search-path) - buffer thisdir fmts name) - (if (file-name-absolute-p filename) - ;; The file name is absolute. Use its explicit directory as - ;; the first in the search path, and strip it from FILENAME. - (setq filename (abbreviate-file-name (expand-file-name filename)) - dirs (cons (file-name-directory filename) dirs) - filename (file-name-nondirectory filename))) - ;; Now search the path. - (while (and dirs (null buffer)) - (setq thisdir (or (car dirs) dir) - fmts formats) - ;; For each directory, try each format string. - (while (and fmts (null buffer)) - (setq name (expand-file-name (format (car fmts) filename) thisdir) - buffer (and (file-exists-p name) - (find-file-noselect name)) - fmts (cdr fmts))) - (setq dirs (cdr dirs))) - (or buffer - ;; The file doesn't exist. - ;; Ask the user where to find it. - ;; If he hits C-g, then the next time he does - ;; next-error, he'll skip past it. - (let* ((pop-up-windows t) - (w (display-buffer (marker-buffer marker)))) - (set-window-point w marker) - (set-window-start w marker) - (let ((name (expand-file-name - (read-file-name - (format "Find this error in: (default %s) " - filename) - dir filename t)))) - (if (file-directory-p name) - (setq name (expand-file-name filename name))) - (setq buffer (and (file-exists-p name) - (find-file name)))))) - ;; Make intangible overlays tangible. - (mapcar (function (lambda (ov) - (when (overlay-get ov 'intangible) - (overlay-put ov 'intangible nil)))) - (overlays-in (point-min) (point-max))) - buffer))) - -(defun compilation-normalize-filename (filename) - "Convert a filename string found in an error message to make it usable." - - ;; Check for a comint-file-name-prefix and prepend it if - ;; appropriate. (This is very useful for - ;; compilation-minor-mode in an rlogin-mode buffer.) - (and (boundp 'comint-file-name-prefix) - ;; If file name is relative, default-directory will - ;; already contain the comint-file-name-prefix (done - ;; by compile-abbreviate-directory). - (file-name-absolute-p filename) - (setq filename - (concat comint-file-name-prefix filename))) - - ;; If compilation-parse-errors-filename-function is - ;; defined, use it to process the filename. - (when compilation-parse-errors-filename-function - (setq filename - (funcall compilation-parse-errors-filename-function - filename))) - - ;; Some compilers (e.g. Sun's java compiler, reportedly) - ;; produce bogus file names like "./bar//foo.c" for file - ;; "bar/foo.c"; expand-file-name will collapse these into - ;; "/foo.c" and fail to find the appropriate file. So we - ;; look for doubled slashes in the file name and fix them - ;; up in the buffer. - (setq filename (command-line-normalize-file-name filename))) - -;; Set compilation-error-list to nil, and unchain the markers that point to the -;; error messages and their text, so that they no longer slow down gap motion. -;; This would happen anyway at the next garbage collection, but it is better to -;; do it right away. -(defun compilation-forget-errors () - (while compilation-old-error-list - (let ((next-error (car compilation-old-error-list))) - (set-marker (car next-error) nil) - (if (markerp (cdr next-error)) - (set-marker (cdr next-error) nil))) - (setq compilation-old-error-list (cdr compilation-old-error-list))) - (setq compilation-error-list nil - compilation-directory-stack (list default-directory)) - (if compilation-parsing-end - (set-marker compilation-parsing-end 1)) - ;; Remove the highlighting added by compile-reinitialize-errors: - (let ((inhibit-read-only t) - (buffer-undo-list t) - deactivate-mark) - (remove-text-properties (point-min) (point-max) - '(mouse-face highlight help-echo nil)))) - - -;; This function is not needed any more by compilation mode. -;; Does anyone else need it or can it be deleted? -(defun count-regexp-groupings (regexp) - "Return the number of \\( ... \\) groupings in REGEXP (a string)." - (let ((groupings 0) - (len (length regexp)) - (i 0) - c) - (while (< i len) - (setq c (aref regexp i) - i (1+ i)) - (cond ((= c ?\[) - ;; Find the end of this [...]. - (while (and (< i len) - (not (= (aref regexp i) ?\]))) - (setq i (1+ i)))) - ((= c ?\\) - (if (< i len) - (progn - (setq c (aref regexp i) - i (1+ i)) - (if (= c ?\)) - ;; We found the end of a grouping, - ;; so bump our counter. - (setq groupings (1+ groupings)))))))) - groupings)) - -(defvar compilation-current-file nil - "Used by `compilation-parse-errors' to store filename for file being compiled.") - -;; This variable is not used as a global variable. It's defined here just to -;; shut up the byte compiler. It's bound and used by compilation-parse-errors -;; and set by compile-collect-regexps. -(defvar compilation-regexps nil) - -(defun compilation-parse-errors (limit-search find-at-least) - "Parse the current buffer as grep, cc, lint or other error messages. -See variable `compilation-parse-errors-function' for the interface it uses." - (setq compilation-error-list nil) - (message "Parsing error messages...") - (if (null compilation-error-regexp-alist) - (error "compilation-error-regexp-alist is empty!")) - (let* ((compilation-regexps nil) ; Variable set by compile-collect-regexps. - (default-directory (car compilation-directory-stack)) - (found-desired nil) - (compilation-num-errors-found 0) - ;; Set up now the expanded, abbreviated directory variables - ;; that compile-abbreviate-directory will need, so we can - ;; compute them just once here. - (orig (abbreviate-file-name default-directory)) - (orig-expanded (abbreviate-file-name - (file-truename default-directory))) - (parent-expanded (abbreviate-file-name - (expand-file-name "../" orig-expanded)))) - - ;; Make a list of all the regexps. Each element has the form - ;; (REGEXP TYPE IDX1 IDX2 ...) - ;; where TYPE is one of leave, enter, file, error or nomessage. - (compile-collect-regexps 'leave compilation-leave-directory-regexp-alist) - (compile-collect-regexps 'enter compilation-enter-directory-regexp-alist) - (compile-collect-regexps 'file compilation-file-regexp-alist) - (compile-collect-regexps 'error compilation-error-regexp-alist) - (compile-collect-regexps 'nomessage compilation-nomessage-regexp-alist) - - ;; Don't reparse messages already seen at last parse. - (goto-char compilation-parsing-end) - (when (and (bobp) - (compilation-buffer-p (current-buffer))) - (setq compilation-current-file nil) ; No current file at start. - ;; Don't parse the first two lines as error messages. - ;; This matters for grep. - (forward-line 2)) - - ;; Parse messages. - (while (not (or found-desired (eobp) - ;; Don't parse the "compilation finished" message - ;; as a compilation error. - (get-text-property (point) 'compilation-handle-exit))) - (let ((this compilation-regexps) (prev nil) (alist nil) type) - ;; Go through the regular expressions. If a match is found, - ;; variable alist is set to the corresponding alist and the - ;; matching regexp is moved to the front of compilation-regexps - ;; to make it match faster next time. - (while (and this (null alist)) - (if (not (looking-at (car (car this)))) - (progn (setq prev this) ; No match, go to next. - (setq this (cdr this))) - (setq alist (cdr (car this))) ; Got a match. -;;; (if prev ; If not the first regexp, -;;; (progn ; move it to the front. -;;; (setcdr prev (cdr this)) -;;; (setcdr this compilation-regexps) -;;; (setq compilation-regexps this))) - )) - (if (and alist ; Seen a match and not to - (not (eq (setq type (car alist)) 'nomessage))) ; be ignored. - (let* ((end-of-match (match-end 0)) - (filename - (compile-buffer-substring (car (setq alist (cdr alist))))) - stack) - (if (eq type 'error) ; error message - (let* ((linenum (if (numberp (car (setq alist (cdr alist)))) - (string-to-int - (compile-buffer-substring (car alist))) - ;; (car alist) is not a number, must be a - ;; function that is called below to return - ;; an error position descriptor. - (car alist))) - ;; Convert to integer later if linenum not a function. - (column (compile-buffer-substring - (car (setq alist (cdr alist))))) - this-error) - - ;; Check that we have a file name. - (or filename - ;; No file name in message, we must have seen it before - (setq filename compilation-current-file) - (error "\ -An error message with no file name and no file name has been seen earlier")) - - ;; Clean up the file name string in several ways. - (setq filename (compilation-normalize-filename filename)) - - (setq filename - (cons filename (cons default-directory (cdr alist)))) - - ;; Locate the erring file and line. - ;; Make this-error a new elt for compilation-error-list, - ;; giving a marker for the current compilation buffer - ;; location, and the file and line number of the error. - ;; Save, as the start of the error, the beginning of the - ;; line containing the match. - (setq this-error - (if (numberp linenum) - (list (point-marker) filename linenum - (and column (string-to-int column))) - ;; If linenum is not a number then it must be - ;; a function returning an error position - ;; descriptor or nil (meaning no position). - (save-excursion - (funcall linenum filename column)))) - - ;; We have an error position descriptor. - ;; If we have found as many new errors as the user - ;; wants, or if we are past the buffer position he - ;; indicated, then we continue to parse until we have - ;; seen all consecutive errors in the same file. This - ;; means that all the errors of a source file will be - ;; seen in one parsing run, so that the error positions - ;; will be recorded as markers in the source file - ;; buffer that will move when the buffer is changed. - (if (and this-error - compilation-error-list ; At least one previous. - (or (and find-at-least - (>= compilation-num-errors-found - find-at-least)) - (and limit-search - (>= end-of-match limit-search))) - ;; `this-error' could contain a pair of - ;; markers already. - (let ((thispos (cdr this-error)) - (lastpos (cdar compilation-error-list))) - (not (equal - (if (markerp thispos) - (marker-buffer thispos) - (car thispos)) - (if (markerp lastpos) - (marker-buffer lastpos) - (car lastpos)))))) - ;; We are past the limits and the last error - ;; parsed, didn't belong to the same source file - ;; as the earlier ones i.e. we have seen all the - ;; errors belonging to the earlier file. We don't - ;; add the error just parsed so that the next - ;; parsing run can get it and the following errors - ;; in the same file all at once. - (setq found-desired t) - - (goto-char end-of-match) ; Prepare for next message. - ;; Don't add the same source line more than once. - (and this-error - (not (and - compilation-error-list - (equal (cdr (car compilation-error-list)) - (cdr this-error)))) - (setq compilation-error-list - (cons this-error compilation-error-list) - compilation-num-errors-found - (1+ compilation-num-errors-found))))) - - ;; Not an error message. - (if (eq type `file) ; Change current file. - (when filename - (setq compilation-current-file - ;; Clean up the file name string in several ways. - (compilation-normalize-filename filename))) - ;; Enter or leave directory. - (setq stack compilation-directory-stack) - ;; Don't check if it is really a directory. - ;; Let the code to search and clean up file names - ;; try to use it in any case. - (when filename - ;; Clean up the directory name string in several ways. - (setq filename (compilation-normalize-filename filename)) - (setq filename - ;; The directory name in the message - ;; is a truename. Try to convert it to a form - ;; like what the user typed in. - (compile-abbreviate-directory - (file-name-as-directory - (expand-file-name filename)) - orig orig-expanded parent-expanded)) - (if (eq type 'leave) - ;; If we are leaving a specific directory, - ;; as preparation, pop out of all other directories - ;; that we entered nested within it. - (while (and stack - (not (string-equal (car stack) - filename))) - (setq stack (cdr stack))) - (setq compilation-directory-stack - (cons filename compilation-directory-stack) - default-directory filename))) - (and (eq type 'leave) - stack - (setq compilation-directory-stack (cdr stack)) - (setq stack (car compilation-directory-stack)) - (setq default-directory stack))) - (goto-char end-of-match) ; Prepare to look at next message. - (and limit-search (>= end-of-match limit-search) - ;; The user wanted a specific error, and we're past it. - ;; We do this check here rather than at the end of the - ;; loop because if the last thing seen is an error - ;; message, we must carefully discard the last error - ;; when it is the first in a new file (see above in - ;; the error-message case) - (setq found-desired t))) - - ;; Go to before the last character in the message so that we will - ;; see the next line also when the message ended at end of line. - ;; When we ignore the last error message above, this will - ;; cancel the effect of forward-line below so that point - ;; doesn't move. - (forward-char -1) - - ;; Is this message necessary any more? Parsing is now so fast - ;; that you might not need to know how it proceeds. - (message - "Parsing error messages...%d found. %.0f%% of buffer seen." - compilation-num-errors-found - ;; Use floating-point because (* 100 (point)) frequently - ;; exceeds the range of Emacs Lisp integers. - (/ (* 100.0 (point)) (point-max))) - ))) - - (forward-line 1)) ; End of while loop. Look at next line. - - (set-marker compilation-parsing-end (point)) - (setq compilation-error-list (nreverse compilation-error-list)) - ;; (message "Parsing error messages...done. %d found. %.0f%% of buffer seen." - ;; compilation-num-errors-found - ;; (/ (* 100.0 (point)) (point-max))) - (message "Parsing error messages...done."))) - -(defun compile-collect-regexps (type this) - ;; Add elements to variable compilation-regexps that is bound in - ;; compilation-parse-errors. - (and (not (eq this t)) - (dolist (el this) - (push (cons (car el) (cons type (cdr el))) compilation-regexps)))) - -(defun compile-buffer-substring (index) - "Get substring matched by INDEXth subexpression." - (if index - (let ((beg (match-beginning index))) - (if beg (buffer-substring beg (match-end index)))))) - -;; If directory DIR is a subdir of ORIG or of ORIG's parent, -;; return a relative name for it starting from ORIG or its parent. -;; ORIG-EXPANDED is an expanded version of ORIG. -;; PARENT-EXPANDED is an expanded version of ORIG's parent. -;; Those two args could be computed here, but we run faster by -;; having the caller compute them just once. -(defun compile-abbreviate-directory (dir orig orig-expanded parent-expanded) - ;; Apply canonical abbreviations to DIR first thing. - ;; Those abbreviations are already done in the other arguments passed. - (setq dir (abbreviate-file-name dir)) - - ;; Check for a comint-file-name-prefix and prepend it if appropriate. - ;; (This is very useful for compilation-minor-mode in an rlogin-mode - ;; buffer.) - (if (boundp 'comint-file-name-prefix) - (setq dir (concat comint-file-name-prefix dir))) - - (if (and (> (length dir) (length orig-expanded)) - (string= orig-expanded - (substring dir 0 (length orig-expanded)))) - (setq dir - (concat orig - (substring dir (length orig-expanded))))) - (if (and (> (length dir) (length parent-expanded)) - (string= parent-expanded - (substring dir 0 (length parent-expanded)))) - (setq dir - (concat (file-name-directory - (directory-file-name orig)) - (substring dir (length parent-expanded))))) - dir) - -(add-to-list 'debug-ignored-errors "^No more errors\\( yet\\|\\)$") - -(provide 'compile) - -;;; compile.el ends here +;;; compile.el --- run compiler as inferior of Emacs, parse error messages + +;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001, 03, 2004 +;; Free Software Foundation, Inc. + +;; Authors: Roland McGrath , +;; Daniel Pfeiffer +;; Maintainer: FSF +;; Keywords: tools, processes + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This package provides the compile facilities documented in the Emacs user's +;; manual. + +;; This mode uses some complex data-structures: + +;; LOC (or location) is a list of (COLUMN LINE FILE-STRUCTURE) + +;; COLUMN and LINE are numbers parsed from an error message. COLUMN and maybe +;; LINE will be nil for a message that doesn't contain them. Then the +;; location refers to a indented beginning of line or beginning of file. +;; Once any location in some file has been jumped to, the list is extended to +;; (COLUMN LINE FILE-STRUCTURE MARKER . VISITED) for all LOCs pertaining to +;; that file. +;; MARKER initially points to LINE and COLUMN in a buffer visiting that file. +;; Being a marker it sticks to some text, when the buffer grows or shrinks +;; before that point. VISITED is t if we have jumped there, else nil. + +;; FILE-STRUCTURE is a list of +;; ((FILENAME . DIRECTORY) FORMATS (LINE LOC ...) ...) + +;; FILENAME is a string parsed from an error message. DIRECTORY is a string +;; obtained by following directory change messages. DIRECTORY will be nil for +;; an absolute filename. FORMATS is a list of formats to apply to FILENAME if +;; a file of that name can't be found. +;; The rest of the list is an alist of elements with LINE as key. The keys +;; are either nil or line numbers. If present, nil comes first, followed by +;; the numbers in decreasing order. The LOCs for each line are again an alist +;; ordered the same way. Note that the whole file structure is referenced in +;; every LOC. + +;; MESSAGE is a list of (LOC TYPE END-LOC) + +;; TYPE is 0 for info or 1 for warning if the message matcher identified it as +;; such, 2 otherwise (for a real error). END-LOC is a LOC pointing to the +;; other end, if the parsed message contained a range. If the end of the +;; range didn't specify a COLUMN, it defaults to -1, meaning end of line. +;; These are the value of the `message' text-properties in the compilation +;; buffer. + +;;; Code: + +(eval-when-compile (require 'cl)) + +(defgroup compilation nil + "Run compiler as inferior of Emacs, parse error messages." + :group 'tools + :group 'processes) + + +;;;###autoload +(defcustom compilation-mode-hook nil + "*List of hook functions run by `compilation-mode' (see `run-hooks')." + :type 'hook + :group 'compilation) + +;;;###autoload +(defcustom compilation-window-height nil + "*Number of lines in a compilation window. If nil, use Emacs default." + :type '(choice (const :tag "Default" nil) + integer) + :group 'compilation) + +(defvar compilation-first-column 1 + "*This is how compilers number the first column, usually 1 or 0.") + +(defvar compilation-parse-errors-filename-function nil + "Function to call to post-process filenames while parsing error messages. +It takes one arg FILENAME which is the name of a file as found +in the compilation output, and should return a transformed file name.") + +;;;###autoload +(defvar compilation-process-setup-function nil + "*Function to call to customize the compilation process. +This functions is called immediately before the compilation process is +started. It can be used to set any variables or functions that are used +while processing the output of the compilation process. The function +is called with variables `compilation-buffer' and `compilation-window' +bound to the compilation buffer and window, respectively.") + +;;;###autoload +(defvar compilation-buffer-name-function nil + "Function to compute the name of a compilation buffer. +The function receives one argument, the name of the major mode of the +compilation buffer. It should return a string. +nil means compute the name with `(concat \"*\" (downcase major-mode) \"*\")'.") + +;;;###autoload +(defvar compilation-finish-function nil + "Function to call when a compilation process finishes. +It is called with two arguments: the compilation buffer, and a string +describing how the process finished.") + +;;;###autoload +(defvar compilation-finish-functions nil + "Functions to call when a compilation process finishes. +Each function is called with two arguments: the compilation buffer, +and a string describing how the process finished.") + +(defvar compilation-last-buffer nil + "The most recent compilation buffer. +A buffer becomes most recent when its compilation is started +or when it is used with \\[next-error] or \\[compile-goto-error].") + +(defvar compilation-in-progress nil + "List of compilation processes now running.") +(or (assq 'compilation-in-progress minor-mode-alist) + (setq minor-mode-alist (cons '(compilation-in-progress " Compiling") + minor-mode-alist))) + +(defvar compilation-error "error" + "Stem of message to print when no matches are found.") + +(defvar compilation-arguments nil + "Arguments that were given to `compilation-start'.") + +(defvar compilation-num-errors-found) + +(defconst compilation-error-regexp-alist-alist + '((absoft + "^\\(?:[Ee]rror on \\|[Ww]arning on\\( \\)\\)?[Ll]ine[ \t]+\\([0-9]+\\)[ \t]+\ +of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) + + (ada + "\\(warning: .*\\)? at \\([^ \n]+\\):\\([0-9]+\\)$" 2 3 nil (1)) + + (aix + " in line \\([0-9]+\\) of file \\([^ \n]+[^. \n]\\)\\.? " 2 1) + + (ant + "^[ \t]*\\[[^] \n]+\\][ \t]*\\([^: \n]+\\):\\([0-9]+\\):\\(?:\\([0-9]+\\):[0-9]+:[0-9]+:\\)?\ +\\( warning\\)?" 1 2 3 (4)) + + (bash + "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2) + + (borland + "^\\(?:Error\\|Warnin\\(g\\)\\) \\(?:[FEW][0-9]+ \\)?\ +\\([a-zA-Z]?:?[^:( \t\n]+\\)\ + \\([0-9]+\\)\\(?:[) \t]\\|:[^0-9\n]\\)" 2 3 nil (1)) + + (caml + "^ *File \\(\"?\\)\\([^,\" \n\t<>]+\\)\\1, lines? \\([0-9]+\\)-?\\([0-9]+\\)?\\(?:$\\|,\ +\\(?: characters? \\([0-9]+\\)-?\\([0-9]+\\)?:\\)?\\([ \n]Warning:\\)?\\)" + 2 (3 . 4) (5 . 6) (7)) + + (comma + "^\"\\([^,\" \n\t]+\\)\", line \\([0-9]+\\)\ +\\(?:[(. pos]+\\([0-9]+\\))?\\)?[:.,; (-]\\( warning:\\|[-0-9 ]*(W)\\)?" 1 2 3 (4)) + + (epc + "^Error [0-9]+ at (\\([0-9]*\\):\\([^)\n]+\\))" 2 1) + + (iar + "^\"\\(.*\\)\",\\([0-9]+\\)\\s-+\\(?:Error\\|Warnin\\(g\\)\\)\\[[0-9]+\\]:" + 1 2 nil (3)) + + (ibm + "^\\([^( \n\t]+\\)(\\([0-9]+\\):\\([0-9]+\\)) :\ + \\(?:warnin\\(g\\)\\|informationa\\(l\\)\\)?" 1 2 3 (4 . 5)) + + (irix + "^[a-z0-9/]+: \\(?:[eE]rror\\|[wW]arnin\\(g\\)\\|[iI]nf\\(o\\)\\)[0-9 ]*:\ + \\([^,\" \n\t]+\\)\\(?:, line\\|:\\) \\([0-9]+\\):" 3 4 nil (1 . 2)) + + (java + "^\\(?:[ \t]+at \\|==[0-9]+== +\\(?:at\\|b\\(y\\)\\)\\).+(\\([^()\n]+\\):\\([0-9]+\\))$" 2 3 nil (1)) + + (jikes-file + "^\\(?:Found\\|Issued\\) .* compiling \"\\(.+\\)\":$" 1 nil nil 0) + (jikes-line + "^ *\\([0-9]+\\)\\.[ \t]+.*\n +\\(<-*>\n\\*\\*\\* \\(?:Error\\|Warnin\\(g\\)\\)\\)" + nil 1 nil 2 0 + (2 (compilation-face '(3)))) + + (gcc-include + "^\\(?:In file included\\| \\) from \ +\\(.+\\):\\([0-9]+\\)\\(?:\\(:\\)\\|\\(,\\)\\)?" 1 2 nil (3 . 4)) + + (gnu + "^\\(?:[a-zA-Z][-a-zA-Z0-9.]+: ?\\)?\ +\\([/.]*[a-zA-Z]:?[^ \t\n:]*\\): ?\ +\\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\ +\\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?:\ +\\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\ + *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\)\\)?" + 1 (2 . 5) (4 . 6) (7 . 8)) + + (lcc + "^\\(?:E\\|\\(W\\)\\), \\([^(\n]+\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" + 2 3 4 (1)) + + (makepp + "^makepp: \\(?:\\(?:warning\\(:\\).*?\\|\\(Scanning\\|[LR]e?l?oading makefile\\) \\|.*?\\)\ +`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'\\)" + 4 5 nil (1 . 2) 3 + ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)'" nil nil + (2 compilation-info-face) + (3 compilation-line-face nil t) + (1 (compilation-error-properties 2 3 nil nil nil 0 nil) + append))) + + (mips-1 + " (\\([0-9]+\\)) in \\([^ \n]+\\)" 2 1) + (mips-2 + " in \\([^()\n ]+\\)(\\([0-9]+\\))$" 1 2) + + (msft + "^\\(\\(?:[a-zA-Z]:\\)?[^:(\t\n]+\\)(\\([0-9]+\\)) \ +: \\(?:error\\|warnin\\(g\\)\\) C[0-9]+:" 1 2 nil (3)) + + (oracle + "^Semantic error at line \\([0-9]+\\), column \\([0-9]+\\), file \\(.*\\):$" + 3 1 2) + + (perl + " at \\([^ \n]+\\) line \\([0-9]+\\)\\(?:[,.]\\|$\\)" 1 2) + + (rxp + "^\\(?:Error\\|Warnin\\(g\\)\\):.*\n.* line \\([0-9]+\\) char\ + \\([0-9]+\\) of file://\\(.+\\)" + 4 2 3 (1)) + + (sparc-pascal-file + "^\\w\\w\\w \\w\\w\\w +[0-3]?[0-9] +[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\ + [12][09][0-9][0-9] +\\(.*\\):$" + 1 nil nil 0) + (sparc-pascal-line + "^\\(\\(?:E\\|\\(w\\)\\) +[0-9]+\\) line \\([0-9]+\\) - " + nil 3 nil (2) nil (1 (compilation-face '(2)))) + (sparc-pascal-example + "^ +\\([0-9]+\\) +.*\n\\(\\(?:e\\|\\(w\\)\\) [0-9]+\\)-+" + nil 1 nil (3) nil (2 (compilation-face '(3)))) + + (sun + ": \\(?:ERROR\\|WARNIN\\(G\\)\\|REMAR\\(K\\)\\) \\(?:[a-zA-Z0-9 ]+, \\)?\ +File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?" + 3 4 5 (1 . 2)) + + (sun-ada + "^\\([^, \n\t]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., \(-]" 1 2 3) + + (ultrix + "^\\(?:cfe\\|fort\\): \\(Warning\\)?[^:\n]*: \\([^ \n]*\\), line \\([0-9]+\\):" 2 3 nil (1)) + + (4bsd + "\\(?:^\\|:: \\|\\S ( \\)\\(/[^ \n\t()]+\\)(\\([0-9]+\\))\ +\\(?:: \\(warning:\\)?\\|$\\| ),\\)" 1 2 nil (3))) + "Alist of values for `compilation-error-regexp-alist'.") + +(defcustom compilation-error-regexp-alist + (mapcar 'car compilation-error-regexp-alist-alist) + "Alist that specifies how to match errors in compiler output. +Note that on Unix exerything is a valid filename, so these +matchers must make some common sense assumptions, which catch +normal cases. A shorter list will be lighter on resource usage. + +Instead of an alist element, you can use a symbol, which is +looked up in `compilation-error-regexp-alist-alist'. You can see +the predefined symbols and their effects in the file +`etc/compilation.txt' (linked below if your are customizing this). + +Each elt has the form (REGEXP FILE [LINE COLUMN TYPE HYPERLINK +HIGHLIGHT...]). If REGEXP matches, the FILE'th subexpression +gives the file name, and the LINE'th subexpression gives the line +number. The COLUMN'th subexpression gives the column number on +that line. + +If FILE, LINE or COLUMN are nil or that index didn't match, that +information is not present on the matched line. In that case the +file name is assumed to be the same as the previous one in the +buffer, line number defaults to 1 and column defaults to +beginning of line's indentation. + +FILE can also have the form (FILE FORMAT...), where the FORMATs +\(e.g. \"%s.c\") will be applied in turn to the recognized file +name, until a file of that name is found. Or FILE can also be a +function to return the filename. + +LINE can also be of the form (LINE . END-LINE) meaning a range +of lines. COLUMN can also be of the form (COLUMN . END-COLUMN) +meaning a range of columns starting on LINE and ending on +END-LINE, if that matched. + +TYPE is 2 or nil for a real error or 1 for warning or 0 for info. +TYPE can also be of the form (WARNING . INFO). In that case this +will be equivalent to 1 if the WARNING'th subexpression matched +or else equivalent to 0 if the INFO'th subexpression matched. +See `compilation-error-face', `compilation-warning-face', +`compilation-info-face' and `compilation-skip-threshold'. + +What matched the HYPERLINK'th subexpression has `mouse-face' and +`compilation-message-face' applied. If this is nil, the text +matched by the whole REGEXP becomes the hyperlink. + +Additional HIGHLIGHTs as described under `font-lock-keywords' can +be added." + :type `(set :menu-tag "Pick" + ,@(mapcar (lambda (elt) + (list 'const (car elt))) + compilation-error-regexp-alist-alist)) + :link `(file-link :tag "example file" + ,(concat doc-directory "compilation.txt")) + :group 'compilation) + +(defvar compilation-directory nil + "Directory to restore to when doing `recompile'.") + +(defvar compilation-directory-matcher + '("\\(?:Entering\\|Leavin\\(g\\)\\) directory `\\(.+\\)'$" (2 . 1)) + "A list for tracking when directories are entered or left. +Nil means not to track directories, e.g. if all file names are absolute. The +first element is the REGEXP matching these messages. It can match any number +of variants, e.g. different languages. The remaining elements are all of the +form (DIR . LEAVE). If for any one of these the DIR'th subexpression +matches, that is a directory name. If LEAVE is nil or the corresponding +LEAVE'th subexpression doesn't match, this message is about going into another +directory. If it does match anything, this message is about going back to the +directory we were in before the last entering message. If you change this, +you may also want to change `compilation-page-delimiter'.") + +(defvar compilation-page-delimiter + "^\\(?:\f\\|.*\\(?:Entering\\|Leaving\\) directory `.+'\n\\)+" + "Value of `page-delimiter' in Compilation mode.") + +(defvar compilation-mode-font-lock-keywords + '(;; configure output lines. + ("^[Cc]hecking \\(?:[Ff]or \\|[Ii]f \\|[Ww]hether \\(?:to \\)?\\)?\\(.+\\)\\.\\.\\. *\\(?:(cached) *\\)?\\(\\(yes\\(?: .+\\)?\\)\\|no\\|\\(.*\\)\\)$" + (1 font-lock-variable-name-face) + (2 (compilation-face '(4 . 3)))) + ;; Command output lines. Recognize `make[n]:' lines too. + ("^\\([A-Za-z_0-9/.+-]+\\)\\(\\[\\([0-9]+\\)\\]\\)?[ \t]*:" + (1 font-lock-function-name-face) (3 compilation-line-face nil t)) + (" --?o\\(?:utfile\\|utput\\)?[= ]?\\(\\S +\\)" . 1) + ("^Compilation finished" . compilation-info-face) + ("^Compilation exited abnormally" . compilation-error-face)) + "Additional things to highlight in Compilation mode. +This gets tacked on the end of the generated expressions.") + +(defvar compilation-highlight-regexp t + "Regexp matching part of visited source lines to highlight temporarily. +Highlight entire line if t; don't highlight source lines if nil.") + +(defvar compilation-highlight-overlay nil + "Overlay used to temporarily highlight compilation matches.") + +(defcustom compilation-error-screen-columns t + "*If non-nil, column numbers in error messages are screen columns. +Otherwise they are interpreted as character positions, with +each character occupying one column. +The default is to use screen columns, which requires that the compilation +program and Emacs agree about the display width of the characters, +especially the TAB character." + :type 'boolean + :group 'compilation + :version "20.4") + +(defcustom compilation-read-command t + "*Non-nil means \\[compile] reads the compilation command to use. +Otherwise, \\[compile] just uses the value of `compile-command'." + :type 'boolean + :group 'compilation) + +;;;###autoload +(defcustom compilation-ask-about-save t + "*Non-nil means \\[compile] asks which buffers to save before compiling. +Otherwise, it saves all modified buffers without asking." + :type 'boolean + :group 'compilation) + +;;;###autoload +(defcustom compilation-search-path '(nil) + "*List of directories to search for source files named in error messages. +Elements should be directory names, not file names of directories. +nil as an element means to try the default directory." + :type '(repeat (choice (const :tag "Default" nil) + (string :tag "Directory"))) + :group 'compilation) + +(defcustom compile-command "make -k " + "*Last shell command used to do a compilation; default for next compilation. + +Sometimes it is useful for files to supply local values for this variable. +You might also use mode hooks to specify it in certain modes, like this: + + (add-hook 'c-mode-hook + (lambda () + (unless (or (file-exists-p \"makefile\") + (file-exists-p \"Makefile\")) + (set (make-local-variable 'compile-command) + (concat \"make -k \" + (file-name-sans-extension buffer-file-name))))))" + :type 'string + :group 'compilation) + +;; A weak per-compilation-buffer hash indexed by (FILENAME . DIRECTORY). Each +;; value is a FILE-STRUCTURE as described above, with the car eq to the hash +;; key. This holds the tree seen from root, for storing new nodes. +(defvar compilation-locs ()) + +(defvar compilation-debug nil + "*Set this to `t' before creating a *compilation* buffer. +Then every error line will have a debug text property with the matcher that +fit this line and the match data. Use `describe-text-properties'.") + +(defvar compilation-exit-message-function nil "\ +If non-nil, called when a compilation process dies to return a status message. +This should be a function of three arguments: process status, exit status, +and exit message; it returns a cons (MESSAGE . MODELINE) of the strings to +write into the compilation buffer, and to put in its mode line.") + +(defvar compilation-environment nil + "*List of environment variables for compilation to inherit. +Each element should be a string of the form ENVVARNAME=VALUE. +This list is temporarily prepended to `process-environment' prior to +starting the compilation process.") + +;; History of compile commands. +(defvar compile-history nil) + +(defface compilation-warning-face + '((((type tty) (class color)) (:foreground "cyan" :weight bold)) + (((class color)) (:foreground "Orange" :weight bold)) + (t (:weight bold))) + "Face used to highlight compiler warnings." + :group 'font-lock-highlighting-faces + :version "21.4") + +(defface compilation-info-face + '((((type tty) (class color)) (:foreground "green" :weight bold)) + (((class color) (background light)) (:foreground "Green3" :weight bold)) + (((class color) (background dark)) (:foreground "Green" :weight bold)) + (t (:weight bold))) + "Face used to highlight compiler warnings." + :group 'font-lock-highlighting-faces + :version "21.4") + +(defvar compilation-message-face nil + "Face name to use for whole messages. +Faces `compilation-error-face', `compilation-warning-face', +`compilation-info-face', `compilation-line-face' and +`compilation-column-face' get prepended to this, when applicable.") + +(defvar compilation-error-face 'font-lock-warning-face + "Face name to use for file name in error messages.") + +(defvar compilation-warning-face 'compilation-warning-face + "Face name to use for file name in warning messages.") + +(defvar compilation-info-face 'compilation-info-face + "Face name to use for file name in informational messages.") + +(defvar compilation-line-face 'font-lock-variable-name-face + "Face name to use for line number in message.") + +(defvar compilation-column-face 'font-lock-type-face + "Face name to use for column number in message.") + +;; same faces as dired uses +(defvar compilation-enter-directory-face 'font-lock-function-name-face + "Face name to use for column number in message.") + +(defvar compilation-leave-directory-face 'font-lock-type-face + "Face name to use for column number in message.") + + + +;; Used for compatibility with the old compile.el. +(defvar compilation-parsing-end nil) +(defvar compilation-parse-errors-function nil) +(defvar compilation-error-list nil) +(defvar compilation-old-error-list nil) + +(defun compilation-face (type) + (or (and (car type) (match-end (car type)) compilation-warning-face) + (and (cdr type) (match-end (cdr type)) compilation-info-face) + compilation-error-face)) + +(defun compilation-directory-properties (idx leave) + (if leave (setq leave (match-end leave))) + ;; find previous stack, and push onto it, or if `leave' pop it + (let ((dir (previous-single-property-change (point) 'directory))) + (setq dir (if dir (or (get-text-property (1- dir) 'directory) + (get-text-property dir 'directory)))) + `(face ,(if leave + compilation-leave-directory-face + compilation-enter-directory-face) + directory ,(if leave + (or (cdr dir) + '(nil)) ; nil only isn't a property-change + (cons (match-string-no-properties idx) dir)) + mouse-face highlight + help-echo "mouse-2: visit current directory"))) + +;; Data type `reverse-ordered-alist' retriever. This function retrieves the +;; KEY element from the ALIST, creating it in the right position if not already +;; present. ALIST structure is +;; '(ANCHOR (KEY1 ...) (KEY2 ...)... (KEYn ALIST ...)) +;; ANCHOR is ignored, but necessary so that elements can be inserted. KEY1 +;; may be nil. The other KEYs are ordered backwards so that growing line +;; numbers can be inserted in front and searching can abort after half the +;; list on average. +(defmacro compilation-assq (key alist) + `(let* ((l1 ,alist) + (l2 (cdr l1))) + (car (if (if (null ,key) + (if l2 (null (caar l2))) + (while (if l2 (if (caar l2) (< ,key (caar l2)) t)) + (setq l1 l2 + l2 (cdr l1))) + (if l2 (eq ,key (caar l2)))) + l2 + (setcdr l1 (cons (list ,key) l2)))))) + + +;; This function is the central driver, called when font-locking to gather +;; all information needed to later jump to corresponding source code. +;; Return a property list with all meta information on this error location. +(defun compilation-error-properties (file line end-line col end-col type fmt) + (unless (< (next-single-property-change (match-beginning 0) 'directory nil (point)) + (point)) + (if file + (if (functionp file) + (setq file (funcall file)) + (let (dir) + (setq file (match-string-no-properties file)) + (unless (file-name-absolute-p file) + (setq dir (previous-single-property-change (point) 'directory) + dir (if dir (or (get-text-property (1- dir) 'directory) + (get-text-property dir 'directory))))) + (setq file (cons file (car dir)) ; top of dir stack is current + file (or (gethash file compilation-locs) + (puthash file (list file fmt) compilation-locs))))) + ;; This message didn't mention one, get it from previous + (setq file (previous-single-property-change (point) 'message) + file (or (if file + (nth 2 (car (or (get-text-property (1- file) 'message) + (get-text-property file 'message))))) + ;; no previous either -- let font-lock continue + (gethash (setq file '("*unknown*")) compilation-locs) + (puthash file (list file fmt) compilation-locs)))) + ;; All of these fields are optional, get them only if we have an index, and + ;; it matched some part of the message. + (and line + (setq line (match-string-no-properties line)) + (setq line (string-to-number line))) + (and end-line + (setq end-line (match-string-no-properties end-line)) + (setq end-line (string-to-number end-line))) + (and col + (setq col (match-string-no-properties col)) + (setq col (- (string-to-number col) compilation-first-column))) + (if (and end-col (setq end-col (match-string-no-properties end-col))) + (setq end-col (- (string-to-number end-col) compilation-first-column)) + (if end-line (setq end-col -1))) + (if (consp type) ; not a preset type, check what it is. + (setq type (or (and (car type) (match-end (car type)) 1) + (and (cdr type) (match-end (cdr type)) 0) + 2))) + ;; Get any (first) already existing marker (if any has one, all have one). + ;; Do this first, as the next assq`s may create new nodes. + (let ((marker (nth 3 (car (cdar (cddr file))))) + (loc (compilation-assq line (cdr file))) + end-loc) + (if end-line + (setq end-loc (compilation-assq end-line (cdr file)) + end-loc (compilation-assq end-col end-loc)) + (if end-col ; use same line element + (setq end-loc (compilation-assq end-col loc)))) + (setq loc (compilation-assq col loc)) + ;; If they are new, make the loc(s) reference the file they point to. + (or (cdr loc) (setcdr loc (list line file))) + (if end-loc + (or (cdr end-loc) (setcdr end-loc (list (or end-line line) file)))) + ;; If we'd found a marker, ensure that the new locs also get markers + (when (and marker + (not (or (cddr loc) (cddr end-loc))) ; maybe new node w/o marker + (marker-buffer marker)) ; other marker still valid + (or line (setq line 1)) ; normalize no linenumber to line 1 + (catch 'marker ; find nearest loc, at least one exists + (dolist (x (cddr file)) + (if (> (or (car x) 1) line) + (setq marker x) + (if (eq (or (car x) 1) line) + (if (cdr (cddr x)) ; at least one other column + (throw 'marker (setq marker x)) + (if marker (throw 'marker t))) + (throw 'marker (or marker (setq marker x))))))) + (setq marker (if (eq (car (cddr marker)) col) + (nthcdr 3 marker) + (cddr marker)) + file compilation-error-screen-columns) + (with-current-buffer (marker-buffer (cddr marker)) + (save-restriction + (widen) + (goto-char (marker-position (cddr marker))) + (beginning-of-line (- line (car (cadr marker)) -1)) + (if file ; original c.-error-screen-columns + (move-to-column (car loc)) + (forward-char (car loc))) + (setcdr (cdr loc) (point-marker)) + (when end-loc + (beginning-of-line (- end-line line -1)) + (if (< end-col 0) + (end-of-line) + (if file ; original c.-error-screen-columns + (move-to-column (car end-loc)) + (forward-char (car end-loc)))) + (setcdr (cdr end-loc) (point-marker)))))) + ;; Must start with face + `(face ,compilation-message-face + message (,loc ,type ,end-loc) + ,@(if compilation-debug + `(debug (,(assoc (with-no-warnings matcher) font-lock-keywords) + ,@(match-data)))) + help-echo ,(if col + "mouse-2: visit this file, line and column" + (if line + "mouse-2: visit this file and line" + "mouse-2: visit this file")) + keymap compilation-button-map + mouse-face highlight)))) + +(defun compilation-mode-font-lock-keywords () + "Return expressions to highlight in Compilation mode." + (if compilation-parse-errors-function + ;; An old package! Try the compatibility code. + '((compilation-compat-parse-errors)) + (append + ;; make directory tracking + (if compilation-directory-matcher + `((,(car compilation-directory-matcher) + ,@(mapcar (lambda (elt) + `(,(car elt) + (compilation-directory-properties + ,(car elt) ,(cdr elt)) + t)) + (cdr compilation-directory-matcher))))) + + ;; Compiler warning/error lines. + (mapcar + (lambda (item) + (if (symbolp item) + (setq item (cdr (assq item + compilation-error-regexp-alist-alist)))) + (let ((file (nth 1 item)) + (line (nth 2 item)) + (col (nth 3 item)) + (type (nth 4 item)) + end-line end-col fmt) + (if (consp file) (setq fmt (cdr file) file (car file))) + (if (consp line) (setq end-line (cdr line) line (car line))) + (if (consp col) (setq end-col (cdr col) col (car col))) + + (if (functionp line) + ;; The old compile.el had here an undocumented hook that + ;; allowed `line' to be a function that computed the actual + ;; error location. Let's do our best. + `(,(car item) + (0 (compilation-compat-error-properties + (funcall ',line (list* (match-string ,file) + default-directory + ',(nthcdr 4 item)) + ,(if col `(match-string ,col))))) + (,file compilation-error-face t)) + + `(,(nth 0 item) + + ,@(when (integerp file) + `((,file ,(if (consp type) + `(compilation-face ',type) + (aref [compilation-info-face + compilation-warning-face + compilation-error-face] + (or type 2)))))) + + ,@(when line + `((,line compilation-line-face nil t))) + ,@(when end-line + `((,end-line compilation-line-face nil t))) + + ,@(when col + `((,col compilation-column-face nil t))) + ,@(when end-col + `((,end-col compilation-column-face nil t))) + + ,@(nthcdr 6 item) + (,(or (nth 5 item) 0) + (compilation-error-properties ',file ,line ,end-line + ,col ,end-col ',(or type 2) + ',fmt) + append))))) ; for compilation-message-face + compilation-error-regexp-alist) + + compilation-mode-font-lock-keywords))) + + +;;;###autoload +(defun compile (command &optional comint) + "Compile the program including the current buffer. Default: run `make'. +Runs COMMAND, a shell command, in a separate process asynchronously +with output going to the buffer `*compilation*'. + +If optional second arg COMINT is t the buffer will be in comint mode with +`compilation-shell-minor-mode'. + +You can then use the command \\[next-error] to find the next error message +and move to the source code that caused it. + +Interactively, prompts for the command if `compilation-read-command' is +non-nil; otherwise uses `compile-command'. With prefix arg, always prompts. + +To run more than one compilation at once, start one and rename +the \`*compilation*' buffer to some other name with +\\[rename-buffer]. Then start the next one. On most systems, +termination of the main compilation process kills its +subprocesses. + +The name used for the buffer is actually whatever is returned by +the function in `compilation-buffer-name-function', so you can set that +to a function that generates a unique name." + (interactive + (if (or compilation-read-command current-prefix-arg) + (list (read-from-minibuffer "Compile command: " + (eval compile-command) nil nil + '(compile-history . 1))) + (list (eval compile-command)))) + (unless (equal command (eval compile-command)) + (setq compile-command command)) + (save-some-buffers (not compilation-ask-about-save) nil) + (setq compilation-directory default-directory) + (compilation-start command comint)) + +;; run compile with the default command line +(defun recompile () + "Re-compile the program including the current buffer. +If this is run in a compilation-mode buffer, re-use the arguments from the +original use. Otherwise, it recompiles using `compile-command'." + (interactive) + (save-some-buffers (not compilation-ask-about-save) nil) + (let ((default-directory (or compilation-directory default-directory))) + (apply 'compilation-start (or compilation-arguments + `(,(eval compile-command)))))) + +(defcustom compilation-scroll-output nil + "*Non-nil to scroll the *compilation* buffer window as output appears. + +Setting it causes the compilation-mode commands to put point at the +end of their output window so that the end of the output is always +visible rather than the begining." + :type 'boolean + :version "20.3" + :group 'compilation) + + +(defun compilation-buffer-name (mode-name name-function) + "Return the name of a compilation buffer to use. +If NAME-FUNCTION is non-nil, call it with one argument MODE-NAME +to determine the buffer name. +Likewise if `compilation-buffer-name-function' is non-nil. +If current buffer is in Compilation mode for the same mode name +return the name of the current buffer, so that it gets reused. +Otherwise, construct a buffer name from MODE-NAME." + (cond (name-function + (funcall name-function mode-name)) + (compilation-buffer-name-function + (funcall compilation-buffer-name-function mode-name)) + ((and (eq major-mode 'compilation-mode) + (equal mode-name (nth 2 compilation-arguments))) + (buffer-name)) + (t + (concat "*" (downcase mode-name) "*")))) + +;; This is a rough emulation of the old hack, until the transition to new +;; compile is complete. +(defun compile-internal (command error-message + &optional name-of-mode parser + error-regexp-alist name-function + enter-regexp-alist leave-regexp-alist + file-regexp-alist nomessage-regexp-alist + no-async highlight-regexp local-map) + (if parser + (error "Compile now works very differently, see `compilation-error-regexp-alist'")) + (let ((compilation-error-regexp-alist + (append file-regexp-alist (or error-regexp-alist + compilation-error-regexp-alist))) + (compilation-error (replace-regexp-in-string "^No more \\(.+\\)s\\.?" + "\\1" error-message))) + (compilation-start command nil name-function highlight-regexp))) +(make-obsolete 'compile-internal 'compilation-start) + +(defun compilation-start (command &optional mode name-function highlight-regexp) + "Run compilation command COMMAND (low level interface). +The rest of the arguments are optional; for them, nil means use the default. + +MODE is the major mode to set in the compilation buffer. Mode +may also be `t' meaning `compilation-shell-minor-mode' under `comint-mode'. +NAME-FUNCTION is a function called to name the buffer. + +If HIGHLIGHT-REGEXP is non-nil, `next-error' will temporarily highlight +matching section of the visited source line; the default is to use the +global value of `compilation-highlight-regexp'. + +Returns the compilation buffer created." + (or mode (setq mode 'compilation-mode)) + (let ((name-of-mode + (if (eq mode t) + (prog1 "compilation" (require 'comint)) + (replace-regexp-in-string "-mode$" "" (symbol-name mode)))) + (process-environment + (append + compilation-environment + (if (and (boundp 'system-uses-terminfo) + system-uses-terminfo) + (list "TERM=dumb" "TERMCAP=" + (format "COLUMNS=%d" (window-width))) + (list "TERM=emacs" + (format "TERMCAP=emacs:co#%d:tc=unknown:" + (window-width)))) + ;; Set the EMACS variable, but + ;; don't override users' setting of $EMACS. + (unless (getenv "EMACS") '("EMACS=t")) + process-environment)) + (thisdir default-directory) + outwin outbuf) + (with-current-buffer + (setq outbuf + (get-buffer-create + (compilation-buffer-name name-of-mode name-function))) + (let ((comp-proc (get-buffer-process (current-buffer)))) + (if comp-proc + (if (or (not (eq (process-status comp-proc) 'run)) + (yes-or-no-p + (format "A %s process is running; kill it? " + name-of-mode))) + (condition-case () + (progn + (interrupt-process comp-proc) + (sit-for 1) + (delete-process comp-proc)) + (error nil)) + (error "Cannot have two processes in `%s' at once" + (buffer-name))))) + ;; Clear out the compilation buffer and make it writable. + ;; Change its default-directory to the directory where the compilation + ;; will happen, and insert a `cd' command to indicate this. + (setq buffer-read-only nil) + (buffer-disable-undo (current-buffer)) + (erase-buffer) + (buffer-enable-undo (current-buffer)) + (setq default-directory thisdir) + ;; output a mode setter, for saving and later reloading this buffer + (insert "cd " thisdir " # -*-" name-of-mode + "-*-\nEntering directory `" thisdir "'\n" command "\n") + (set-buffer-modified-p nil)) + ;; If we're already in the compilation buffer, go to the end + ;; of the buffer, so point will track the compilation output. + (if (eq outbuf (current-buffer)) + (goto-char (point-max))) + ;; Pop up the compilation buffer. + (setq outwin (display-buffer outbuf nil t)) + (with-current-buffer outbuf + (if (not (eq mode t)) + (funcall mode) + (with-no-warnings (comint-mode)) + (compilation-shell-minor-mode)) + ;; In what way is it non-ergonomic ? -stef + ;; (toggle-read-only 1) ;;; Non-ergonomic. + (if highlight-regexp + (set (make-local-variable 'compilation-highlight-regexp) + highlight-regexp)) + (set (make-local-variable 'compilation-arguments) + (list command mode name-function highlight-regexp)) + (set (make-local-variable 'revert-buffer-function) + 'compilation-revert-buffer) + (set-window-start outwin (point-min)) + (or (eq outwin (selected-window)) + (set-window-point outwin (point))) + ;; The setup function is called before compilation-set-window-height + ;; so it can set the compilation-window-height buffer locally. + (if compilation-process-setup-function + (funcall compilation-process-setup-function)) + (compilation-set-window-height outwin) + ;; Start the compilation. + (if (fboundp 'start-process) + (let ((proc (if (eq mode t) + (get-buffer-process + (with-no-warnings + (comint-exec outbuf (downcase mode-name) + shell-file-name nil `("-c" ,command)))) + (start-process-shell-command (downcase mode-name) + outbuf command)))) + ;; Make the buffer's mode line show process state. + (setq mode-line-process '(":%s")) + (set-process-sentinel proc 'compilation-sentinel) + (set-process-filter proc 'compilation-filter) + (set-marker (process-mark proc) (point) outbuf) + (setq compilation-in-progress + (cons proc compilation-in-progress))) + ;; No asynchronous processes available. + (message "Executing `%s'..." command) + ;; Fake modeline display as if `start-process' were run. + (setq mode-line-process ":run") + (force-mode-line-update) + (let ((status (call-process shell-file-name nil outbuf nil "-c" + command))) + (cond ((numberp status) + (compilation-handle-exit 'exit status + (if (zerop status) + "finished\n" + (format "\ +exited abnormally with code %d\n" + status)))) + ((stringp status) + (compilation-handle-exit 'signal status + (concat status "\n"))) + (t + (compilation-handle-exit 'bizarre status status)))) + (message "Executing `%s'...done" command))) + (if (buffer-local-value 'compilation-scroll-output outbuf) + (save-selected-window + (select-window outwin) + (goto-char (point-max)))) + ;; Make it so the next C-x ` will use this buffer. + (setq compilation-last-buffer outbuf))) + +(defun compilation-set-window-height (window) + "Set the height of WINDOW according to `compilation-window-height'." + (let ((height (buffer-local-value 'compilation-window-height (window-buffer window)))) + (and height + (= (window-width window) (frame-width (window-frame window))) + ;; If window is alone in its frame, aside from a minibuffer, + ;; don't change its height. + (not (eq window (frame-root-window (window-frame window)))) + ;; This save-current-buffer prevents us from changing the current + ;; buffer, which might not be the same as the selected window's buffer. + (save-current-buffer + (save-selected-window + (select-window window) + (enlarge-window (- height (window-height)))))))) + +(defvar compilation-menu-map + (let ((map (make-sparse-keymap "Errors"))) + (define-key map [stop-subjob] + '("Stop Compilation" . kill-compilation)) + (define-key map [compilation-mode-separator2] + '("----" . nil)) + (define-key map [compilation-first-error] + '("First Error" . first-error)) + (define-key map [compilation-previous-error] + '("Previous Error" . previous-error)) + (define-key map [compilation-next-error] + '("Next Error" . next-error)) + map)) + +(defvar compilation-minor-mode-map + (let ((map (make-sparse-keymap))) + (define-key map [mouse-2] 'compile-goto-error) + (define-key map "\C-c\C-c" 'compile-goto-error) + (define-key map "\C-m" 'compile-goto-error) + (define-key map "\C-c\C-k" 'kill-compilation) + (define-key map "\M-n" 'compilation-next-error) + (define-key map "\M-p" 'compilation-previous-error) + (define-key map "\M-{" 'compilation-previous-file) + (define-key map "\M-}" 'compilation-next-file) + ;; Set up the menu-bar + (define-key map [menu-bar compilation] + (cons "Errors" compilation-menu-map)) + map) + "Keymap for `compilation-minor-mode'.") + +(defvar compilation-shell-minor-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\M-\C-m" 'compile-goto-error) + (define-key map "\M-\C-n" 'compilation-next-error) + (define-key map "\M-\C-p" 'compilation-previous-error) + (define-key map "\M-{" 'compilation-previous-file) + (define-key map "\M-}" 'compilation-next-file) + ;; Set up the menu-bar + (define-key map [menu-bar compilation] + (cons "Errors" compilation-menu-map)) + map) + "Keymap for `compilation-shell-minor-mode'.") + +(defvar compilation-button-map + (let ((map (make-sparse-keymap))) + (define-key map [mouse-2] 'compile-goto-error) + (define-key map "\C-m" 'compile-goto-error) + map) + "Keymap for compilation-message buttons.") +(fset 'compilation-button-map compilation-button-map) + +(defvar compilation-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map compilation-minor-mode-map) + (define-key map " " 'scroll-up) + (define-key map "\^?" 'scroll-down) + + ;; Set up the menu-bar + (define-key map [menu-bar compilation] + (cons "Compile" (make-sparse-keymap "Compile"))) + (define-key map [menu-bar compilation compilation-separator2] + '("----" . nil)) + (define-key map [menu-bar compilation compilation-grep] + '("Search Files (grep)" . grep)) + (define-key map [menu-bar compilation compilation-recompile] + '("Recompile" . recompile)) + (define-key map [menu-bar compilation compilation-compile] + '("Compile..." . compile)) + map) + "Keymap for compilation log buffers. +`compilation-minor-mode-map' is a parent of this.") + +(put 'compilation-mode 'mode-class 'special) + +(defvar compilation-skip-to-next-location t + "*If non-nil, skip multiple error messages for the same source location.") + +(defcustom compilation-skip-threshold 1 + "*Compilation motion commands skip less important messages. +The value can be either 2 -- skip anything less than error, 1 -- +skip anything less than warning or 0 -- don't skip any messages. +Note that all messages not positively identified as warning or +info, are considered errors." + :type '(choice (const :tag "Warnings and info" 2) + (const :tag "Info" 1) + (const :tag "None" 0)) + :group 'compilation + :version "21.4") + +(defcustom compilation-skip-visited nil + "*Compilation motion commands skip visited messages if this is t. +Visited messages are ones for which the file, line and column have been jumped +to from the current content in the current compilation buffer, even if it was +from a different message." + :type 'boolean + :group 'compilation + :version "21.4") + +;;;###autoload +(defun compilation-mode () + "Major mode for compilation log buffers. +\\To visit the source for a line-numbered error, +move point to the error message line and type \\[compile-goto-error]. +To kill the compilation, type \\[kill-compilation]. + +Runs `compilation-mode-hook' with `run-hooks' (which see)." + (interactive) + (kill-all-local-variables) + (use-local-map compilation-mode-map) + (setq major-mode 'compilation-mode + mode-name "Compilation") + (set (make-local-variable 'page-delimiter) + compilation-page-delimiter) + (compilation-setup) + (run-mode-hooks 'compilation-mode-hook)) + +(defmacro define-compilation-mode (mode name doc &rest body) + "This is like `define-derived-mode' without the PARENT argument. +The parent is always `compilation-mode' and the customizable `compilation-...' +variables are also set from the name of the mode you have chosen, by replacing +the fist word, e.g `compilation-scroll-output' from `grep-scroll-output' if that +variable exists." + (let ((mode-name (replace-regexp-in-string "-mode\\'" "" (symbol-name mode)))) + `(define-derived-mode ,mode compilation-mode ,name + ,doc + ,@(mapcar (lambda (v) + (setq v (cons v + (intern-soft (replace-regexp-in-string + "^compilation" mode-name + (symbol-name v))))) + (and (cdr v) + (or (boundp (cdr v)) + (if (boundp 'byte-compile-bound-variables) + (memq (cdr v) byte-compile-bound-variables))) + `(set (make-local-variable ',(car v)) ,(cdr v)))) + '(compilation-buffer-name-function + compilation-directory-matcher + compilation-error + compilation-error-regexp-alist + compilation-error-regexp-alist-alist + compilation-error-screen-columns + compilation-finish-function + compilation-finish-functions + compilation-first-column + compilation-mode-font-lock-keywords + compilation-page-delimiter + compilation-parse-errors-filename-function + compilation-process-setup-function + compilation-scroll-output + compilation-search-path + compilation-skip-threshold + compilation-window-height)) + ,@body))) + +(defun compilation-revert-buffer (ignore-auto noconfirm) + (if buffer-file-name + (let (revert-buffer-function) + (revert-buffer ignore-auto noconfirm)) + (if (or noconfirm (yes-or-no-p (format "Restart compilation? "))) + (apply 'compilation-start compilation-arguments)))) + +(defvar compilation-current-error nil + "Marker to the location from where the next error will be found. +The global commands next/previous/first-error/goto-error use this.") + +;; A function name can't be a hook, must be something with a value. +(defconst compilation-turn-on-font-lock 'turn-on-font-lock) + +(defun compilation-setup (&optional minor) + "Prepare the buffer for the compilation parsing commands to work." + (make-local-variable 'compilation-current-error) + (make-local-variable 'compilation-error-screen-columns) + (make-local-variable 'overlay-arrow-position) + (setq compilation-last-buffer (current-buffer)) + (set (make-local-variable 'font-lock-extra-managed-props) + '(directory message help-echo mouse-face debug)) + (set (make-local-variable 'compilation-locs) + (make-hash-table :test 'equal :weakness 'value)) + ;; lazy-lock would never find the message unless it's scrolled to + ;; jit-lock might fontify some things too late. + (set (make-local-variable 'font-lock-support-mode) nil) + (set (make-local-variable 'font-lock-maximum-size) nil) + (let ((fld font-lock-defaults)) + (if (and minor fld) + (font-lock-add-keywords nil (compilation-mode-font-lock-keywords)) + (setq font-lock-defaults '(compilation-mode-font-lock-keywords t))) + (if minor + (if font-lock-mode + (if fld + (font-lock-fontify-buffer) + (font-lock-change-mode) + (turn-on-font-lock)) + (turn-on-font-lock)) + ;; maybe defer font-lock till after derived mode is set up + (run-mode-hooks 'compilation-turn-on-font-lock)))) + +;;;###autoload +(define-minor-mode compilation-shell-minor-mode + "Toggle compilation shell minor mode. +With arg, turn compilation mode on if and only if arg is positive. +In this minor mode, all the error-parsing commands of the +Compilation major mode are available but bound to keys that don't +collide with Shell mode. See `compilation-mode'. +Turning the mode on runs the normal hook `compilation-shell-minor-mode-hook'." + nil " Shell-Compile" + :group 'compilation + (if compilation-shell-minor-mode + (compilation-setup t) + (font-lock-remove-keywords nil (compilation-mode-font-lock-keywords)) + (font-lock-fontify-buffer))) + +;;;###autoload +(define-minor-mode compilation-minor-mode + "Toggle compilation minor mode. +With arg, turn compilation mode on if and only if arg is positive. +In this minor mode, all the error-parsing commands of the +Compilation major mode are available. See `compilation-mode'. +Turning the mode on runs the normal hook `compilation-minor-mode-hook'." + nil " Compilation" + :group 'compilation + (if compilation-minor-mode + (compilation-setup t) + (font-lock-remove-keywords nil (compilation-mode-font-lock-keywords)) + (font-lock-fontify-buffer))) + +(defun compilation-handle-exit (process-status exit-status msg) + "Write msg in the current buffer and hack its mode-line-process." + (let ((buffer-read-only nil) + (status (if compilation-exit-message-function + (funcall compilation-exit-message-function + process-status exit-status msg) + (cons msg exit-status))) + (omax (point-max)) + (opoint (point))) + ;; Record where we put the message, so we can ignore it later on. + (goto-char omax) + (insert ?\n mode-name " " (car status)) + (if (and (numberp compilation-window-height) + (zerop compilation-window-height)) + (message "%s" (cdr status))) + (if (bolp) + (forward-char -1)) + (insert " at " (substring (current-time-string) 0 19)) + (goto-char (point-max)) + ;; Prevent that message from being recognized as a compilation error. + (add-text-properties omax (point) + (append '(compilation-handle-exit t) nil)) + (setq mode-line-process (format ":%s [%s]" process-status (cdr status))) + ;; Force mode line redisplay soon. + (force-mode-line-update) + (if (and opoint (< opoint omax)) + (goto-char opoint)) + (if compilation-finish-function + (funcall compilation-finish-function (current-buffer) msg)) + (let ((functions compilation-finish-functions)) + (while functions + (funcall (car functions) (current-buffer) msg) + (setq functions (cdr functions)))))) + +;; Called when compilation process changes state. +(defun compilation-sentinel (proc msg) + "Sentinel for compilation buffers." + (if (memq (process-status proc) '(exit signal)) + (let ((buffer (process-buffer proc))) + (if (null (buffer-name buffer)) + ;; buffer killed + (set-process-buffer proc nil) + (with-current-buffer buffer + ;; Write something in the compilation buffer + ;; and hack its mode line. + (compilation-handle-exit (process-status proc) + (process-exit-status proc) + msg) + ;; Since the buffer and mode line will show that the + ;; process is dead, we can delete it now. Otherwise it + ;; will stay around until M-x list-processes. + (delete-process proc))) + (setq compilation-in-progress (delq proc compilation-in-progress))))) + +(defun compilation-filter (proc string) + "Process filter for compilation buffers. +Just inserts the text, but uses `insert-before-markers'." + (if (buffer-name (process-buffer proc)) + (with-current-buffer (process-buffer proc) + (let ((inhibit-read-only t)) + (save-excursion + (goto-char (process-mark proc)) + (insert-before-markers string) + (run-hooks 'compilation-filter-hook)))))) + +(defsubst compilation-buffer-p (buffer) + (local-variable-p 'compilation-locs buffer)) + +(defmacro compilation-loop (< property-change 1+ error) + `(while (,< n 0) + (or (setq pt (,property-change pt 'message)) + (error ,error compilation-error)) + ;; prop 'message usually has 2 changes, on and off, so re-search if off + (or (setq msg (get-text-property pt 'message)) + (if (setq pt (,property-change pt 'message)) + (setq msg (get-text-property pt 'message))) + (error ,error compilation-error)) + (or (< (cadr msg) compilation-skip-threshold) + (if different-file + (eq (prog1 last (setq last (nth 2 (car msg)))) + last)) + (if compilation-skip-visited + (nthcdr 4 (car msg))) + (if compilation-skip-to-next-location + (eq (car msg) loc)) + ;; count this message only if none of the above are true + (setq n (,1+ n))))) + +(defun compilation-next-error (n &optional different-file pt) + "Move point to the next error in the compilation buffer. +Prefix arg N says how many error messages to move forwards (or +backwards, if negative). +Does NOT find the source line like \\[next-error]." + (interactive "p") + (or (compilation-buffer-p (current-buffer)) + (error "Not in a compilation buffer")) + (or pt (setq pt (point))) + (setq compilation-last-buffer (current-buffer)) + (let* ((msg (get-text-property pt 'message)) + (loc (car msg)) + last) + (if (zerop n) + (unless (or msg ; find message near here + (setq msg (get-text-property (max (1- pt) (point-min)) + 'message))) + (setq pt (previous-single-property-change pt 'message nil + (line-beginning-position))) + (unless (setq msg (get-text-property (max (1- pt) (point-min)) 'message)) + (setq pt (next-single-property-change pt 'message nil + (line-end-position))) + (or (setq msg (get-text-property pt 'message)) + (setq pt (point))))) + (setq last (nth 2 (car msg))) + (if (>= n 0) + (compilation-loop > next-single-property-change 1- + (if (get-buffer-process (current-buffer)) + "No more %ss yet" + "Moved past last %s")) + ;; Don't move "back" to message at or before point. + ;; Pass an explicit (point-min) to make sure pt is non-nil. + (setq pt (previous-single-property-change pt 'message nil (point-min))) + (compilation-loop < previous-single-property-change 1+ + "Moved back before first %s"))) + (goto-char pt) + (or msg + (error "No %s here" compilation-error)))) + +(defun compilation-previous-error (n) + "Move point to the previous error in the compilation buffer. +Prefix arg N says how many error messages to move backwards (or +forwards, if negative). +Does NOT find the source line like \\[previous-error]." + (interactive "p") + (compilation-next-error (- n))) + +(defun next-error-no-select (n) + "Move point to the next error in the compilation buffer and highlight match. +Prefix arg N says how many error messages to move forwards (or +backwards, if negative). +Finds and highlights the source line like \\[next-error], but does not +select the source buffer." + (interactive "p") + (next-error n) + (pop-to-buffer compilation-last-buffer)) + +(defun previous-error-no-select (n) + "Move point to the previous error in the compilation buffer and highlight match. +Prefix arg N says how many error messages to move backwards (or +forwards, if negative). +Finds and highlights the source line like \\[previous-error], but does not +select the source buffer." + (interactive "p") + (next-error-no-select (- n))) + +(defun compilation-next-file (n) + "Move point to the next error for a different file than the current one. +Prefix arg N says how many files to move forwards (or backwards, if negative)." + (interactive "p") + (compilation-next-error n t)) + +(defun compilation-previous-file (n) + "Move point to the previous error for a different file than the current one. +Prefix arg N says how many files to move backwards (or forwards, if negative)." + (interactive "p") + (compilation-next-file (- n))) + +(defun kill-compilation () + "Kill the process made by the \\[compile] or \\[grep] commands." + (interactive) + (let ((buffer (compilation-find-buffer))) + (if (get-buffer-process buffer) + (interrupt-process (get-buffer-process buffer)) + (error "The compilation process is not running")))) + +(defalias 'compile-mouse-goto-error 'compile-goto-error) + +(defun compile-goto-error (&optional event) + "Visit the source for the error message at point. +Use this command in a compilation log buffer. Sets the mark at point there." + (interactive (list last-input-event)) + (if event (posn-set-point (event-end event))) + (or (compilation-buffer-p (current-buffer)) + (error "Not in a compilation buffer")) + (if (get-text-property (point) 'directory) + (dired-other-window (car (get-text-property (point) 'directory))) + (push-mark) + (setq compilation-current-error (point)) + (next-error 0))) + +;; Return a compilation buffer. +;; If the current buffer is a compilation buffer, return it. +;; If compilation-last-buffer is set to a live buffer, use that. +;; Otherwise, look for a compilation buffer and signal an error +;; if there are none. +(defun compilation-find-buffer (&optional other-buffer) + (if (and (not other-buffer) + (compilation-buffer-p (current-buffer))) + ;; The current buffer is a compilation buffer. + (current-buffer) + (if (and compilation-last-buffer (buffer-name compilation-last-buffer) + (compilation-buffer-p compilation-last-buffer) + (or (not other-buffer) (not (eq compilation-last-buffer + (current-buffer))))) + compilation-last-buffer + (let ((buffers (buffer-list))) + (while (and buffers (or (not (compilation-buffer-p (car buffers))) + (and other-buffer + (eq (car buffers) (current-buffer))))) + (setq buffers (cdr buffers))) + (if buffers + (car buffers) + (or (and other-buffer + (compilation-buffer-p (current-buffer)) + ;; The current buffer is a compilation buffer. + (progn + (if other-buffer + (message "This is the only compilation buffer.")) + (current-buffer))) + (error "No compilation started!"))))))) + +;;;###autoload +(defun next-error (&optional n) + "Visit next compilation error message and corresponding source code. +Prefix arg N says how many error messages to move forwards (or +backwards, if negative). + +\\[next-error] normally uses the most recently started compilation or +grep buffer. However, it can operate on any buffer with output from +the \\[compile] and \\[grep] commands, or, more generally, on any +buffer in Compilation mode or with Compilation Minor mode enabled. To +specify use of a particular buffer for error messages, type +\\[next-error] in that buffer. + +Once \\[next-error] has chosen the buffer for error messages, +it stays with that buffer until you use it in some other buffer which +uses Compilation mode or Compilation Minor mode. + +See variable `compilation-error-regexp-alist' for customization ideas." + (interactive "p") + (set-buffer (setq compilation-last-buffer (compilation-find-buffer))) + (let* ((columns compilation-error-screen-columns) ; buffer's local value + (last 1) + (loc (compilation-next-error (or n 1) nil + (or compilation-current-error (point-min)))) + (end-loc (nth 2 loc)) + (marker (point-marker))) + (setq compilation-current-error (point-marker) + overlay-arrow-position + (if (bolp) + compilation-current-error + (save-excursion + (beginning-of-line) + (point-marker))) + loc (car loc)) + ;; If loc contains no marker, no error in that file has been visited. If + ;; the marker is invalid the buffer has been killed. So, recalculate all + ;; markers for that file. + (unless (and (nthcdr 3 loc) (marker-buffer (nth 3 loc))) + (with-current-buffer (compilation-find-file marker (caar (nth 2 loc)) + (or (cdar (nth 2 loc)) + default-directory)) + (save-restriction + (widen) + (goto-char (point-min)) + ;; Treat file's found lines in forward order, 1 by 1. + (dolist (line (reverse (cddr (nth 2 loc)))) + (when (car line) ; else this is a filename w/o a line# + (beginning-of-line (- (car line) last -1)) + (setq last (car line))) + ;; Treat line's found columns and store/update a marker for each. + (dolist (col (cdr line)) + (if (car col) + (if (eq (car col) -1) ; special case for range end + (end-of-line) + (if columns + (move-to-column (car col)) + (beginning-of-line) + (forward-char (car col)))) + (beginning-of-line) + (skip-chars-forward " \t")) + (if (nthcdr 3 col) + (set-marker (nth 3 col) (point)) + (setcdr (nthcdr 2 col) `(,(point-marker))))))))) + (compilation-goto-locus marker (nth 3 loc) (nth 3 end-loc)) + (setcdr (nthcdr 3 loc) t))) ; Set this one as visited. + +;;;###autoload (define-key ctl-x-map "`" 'next-error) + +(defun previous-error (n) + "Visit previous compilation error message and corresponding source code. +Prefix arg N says how many error messages to move backwards (or +forwards, if negative). + +This operates on the output from the \\[compile] and \\[grep] commands." + (interactive "p") + (next-error (- n))) + +(defun first-error (n) + "Restart at the first error. +Visit corresponding source code. +With prefix arg N, visit the source code of the Nth error. +This operates on the output from the \\[compile] command." + (interactive "p") + (set-buffer (setq compilation-last-buffer (compilation-find-buffer))) + (setq compilation-current-error nil) + (next-error n)) + +(defcustom compilation-context-lines next-screen-context-lines + "*Display this many lines of leading context before message." + :type 'integer + :group 'compilation + :version "21.4") + +(defsubst compilation-set-window (w mk) + ;; Align the compilation output window W with marker MK near top. + (set-window-start w (save-excursion + (goto-char mk) + (beginning-of-line (- 1 compilation-context-lines)) + (point))) + (set-window-point w mk)) + +(defun compilation-goto-locus (msg mk end-mk) + "Jump to an error MESSAGE and SOURCE. +All arguments are markers. If SOURCE-END is non nil, mark is set there." + (if (eq (window-buffer (selected-window)) + (marker-buffer msg)) + ;; If the compilation buffer window is selected, + ;; keep the compilation buffer in this window; + ;; display the source in another window. + (let ((pop-up-windows t)) + (pop-to-buffer (marker-buffer mk))) + (if (window-dedicated-p (selected-window)) + (pop-to-buffer (marker-buffer mk)) + (switch-to-buffer (marker-buffer mk)))) + ;; If narrowing gets in the way of going to the right place, widen. + (unless (eq (goto-char mk) (point)) + (widen) + (goto-char mk)) + (if end-mk + (push-mark end-mk nil t) + (if mark-active (setq mark-active))) + ;; If hideshow got in the way of + ;; seeing the right place, open permanently. + (dolist (ov (overlays-at (point))) + (when (eq 'hs (overlay-get ov 'invisible)) + (delete-overlay ov) + (goto-char mk))) + + ;; Show compilation buffer in other window, scrolled to this error. + (let* ((pop-up-windows t) + ;; Use an existing window if it is in a visible frame. + (w (or (get-buffer-window (marker-buffer msg) 'visible) + ;; Pop up a window. + (display-buffer (marker-buffer msg)))) + (highlight-regexp (with-current-buffer (marker-buffer msg) + ;; also do this while we change buffer + (compilation-set-window w msg) + compilation-highlight-regexp))) + (compilation-set-window-height w) + + (when (and highlight-regexp + (not (and end-mk transient-mark-mode))) + (unless compilation-highlight-overlay + (setq compilation-highlight-overlay + (make-overlay (point-min) (point-min))) + (overlay-put compilation-highlight-overlay 'face 'region)) + (with-current-buffer (marker-buffer mk) + (save-excursion + (end-of-line) + (let ((end (point))) + (beginning-of-line) + (if (and (stringp highlight-regexp) + (re-search-forward highlight-regexp end t)) + (progn + (goto-char (match-beginning 0)) + (move-overlay compilation-highlight-overlay (match-beginning 0) (match-end 0))) + (move-overlay compilation-highlight-overlay (point) end)) + (sit-for 0.5) + (delete-overlay compilation-highlight-overlay))))))) + + +(defun compilation-find-file (marker filename dir &rest formats) + "Find a buffer for file FILENAME. +Search the directories in `compilation-search-path'. +A nil in `compilation-search-path' means to try the +current directory, which is passed in DIR. +If FILENAME is not found at all, ask the user where to find it. +Pop up the buffer containing MARKER and scroll to MARKER if we ask the user." + (or formats (setq formats '("%s"))) + (save-excursion + (let ((dirs compilation-search-path) + buffer thisdir fmts name) + (if (file-name-absolute-p filename) + ;; The file name is absolute. Use its explicit directory as + ;; the first in the search path, and strip it from FILENAME. + (setq filename (abbreviate-file-name (expand-file-name filename)) + dirs (cons (file-name-directory filename) dirs) + filename (file-name-nondirectory filename))) + ;; Now search the path. + (while (and dirs (null buffer)) + (setq thisdir (or (car dirs) dir) + fmts formats) + ;; For each directory, try each format string. + (while (and fmts (null buffer)) + (setq name (expand-file-name (format (car fmts) filename) thisdir) + buffer (and (file-exists-p name) + (find-file-noselect name)) + fmts (cdr fmts))) + (setq dirs (cdr dirs))) + (or buffer + ;; The file doesn't exist. Ask the user where to find it. + (let ((pop-up-windows t)) + (compilation-set-window (display-buffer (marker-buffer marker)) + marker) + (let ((name (expand-file-name + (read-file-name + (format "Find this error in: (default %s) " + filename) + dir filename t)))) + (if (file-directory-p name) + (setq name (expand-file-name filename name))) + (setq buffer (and (file-exists-p name) + (find-file name)))))) + ;; Make intangible overlays tangible. + (mapcar (function (lambda (ov) + (when (overlay-get ov 'intangible) + (overlay-put ov 'intangible nil)))) + (overlays-in (point-min) (point-max))) + buffer))) + +(defun compilation-normalize-filename (filename) + "Convert a filename string found in an error message to make it usable." + + ;; Check for a comint-file-name-prefix and prepend it if + ;; appropriate. (This is very useful for + ;; compilation-minor-mode in an rlogin-mode buffer.) + (and (boundp 'comint-file-name-prefix) + ;; If file name is relative, default-directory will + ;; already contain the comint-file-name-prefix (done + ;; by compile-abbreviate-directory). + (file-name-absolute-p filename) + (setq filename + (concat (with-no-warnings 'comint-file-name-prefix) filename))) + + ;; If compilation-parse-errors-filename-function is + ;; defined, use it to process the filename. + (when compilation-parse-errors-filename-function + (setq filename + (funcall compilation-parse-errors-filename-function + filename))) + + ;; Some compilers (e.g. Sun's java compiler, reportedly) + ;; produce bogus file names like "./bar//foo.c" for file + ;; "bar/foo.c"; expand-file-name will collapse these into + ;; "/foo.c" and fail to find the appropriate file. So we + ;; look for doubled slashes in the file name and fix them + ;; up in the buffer. + (setq filename (command-line-normalize-file-name filename))) + + +;; If directory DIR is a subdir of ORIG or of ORIG's parent, +;; return a relative name for it starting from ORIG or its parent. +;; ORIG-EXPANDED is an expanded version of ORIG. +;; PARENT-EXPANDED is an expanded version of ORIG's parent. +;; Those two args could be computed here, but we run faster by +;; having the caller compute them just once. +(defun compile-abbreviate-directory (dir orig orig-expanded parent-expanded) + ;; Apply canonical abbreviations to DIR first thing. + ;; Those abbreviations are already done in the other arguments passed. + (setq dir (abbreviate-file-name dir)) + + ;; Check for a comint-file-name-prefix and prepend it if appropriate. + ;; (This is very useful for compilation-minor-mode in an rlogin-mode + ;; buffer.) + (if (boundp 'comint-file-name-prefix) + (setq dir (concat comint-file-name-prefix dir))) + + (if (and (> (length dir) (length orig-expanded)) + (string= orig-expanded + (substring dir 0 (length orig-expanded)))) + (setq dir + (concat orig + (substring dir (length orig-expanded))))) + (if (and (> (length dir) (length parent-expanded)) + (string= parent-expanded + (substring dir 0 (length parent-expanded)))) + (setq dir + (concat (file-name-directory + (directory-file-name orig)) + (substring dir (length parent-expanded))))) + dir) + +(add-to-list 'debug-ignored-errors "^No more [-a-z ]+s yet$") + +;;; Compatibility with the old compile.el. + +(defun compile-buffer-substring (n) (if n (match-string n))) + +(defun compilation-compat-error-properties (err) + ;; Map old-style ERROR to new-style MESSAGE. + (let* ((dst (cdr err)) + (loc (cond ((markerp dst) (list nil nil nil dst)) + ((consp dst) + (list (nth 2 dst) (nth 1 dst) + (cons (cdar dst) (caar dst))))))) + ;; Must start with a face, for font-lock. + `(face nil + message ,(list loc 2) + help-echo "mouse-2: visit the source location" + mouse-face highlight))) + +(defun compilation-compat-parse-errors (limit) + (when compilation-parse-errors-function + ;; FIXME: We should remove the rest of the compilation keywords + ;; but we can't do that from here because font-lock is using + ;; the value right now. --stef + (save-excursion + (setq compilation-error-list nil) + ;; Reset compilation-parsing-end each time because font-lock + ;; might force us the re-parse many times (typically because + ;; some code adds some text-property to the output that we + ;; already parsed). You might say "why reparse", well: + ;; because font-lock has just removed the `message' property so + ;; have to do it all over again. + (if compilation-parsing-end + (set-marker compilation-parsing-end (point)) + (setq compilation-parsing-end (point-marker))) + (condition-case nil + ;; Ignore any error: we're calling this function earlier than + ;; in the old compile.el so things might not all be setup yet. + (funcall compilation-parse-errors-function limit nil) + (error nil)) + (dolist (err (if (listp compilation-error-list) compilation-error-list)) + (let* ((src (car err)) + (dst (cdr err)) + (loc (cond ((markerp dst) (list nil nil nil dst)) + ((consp dst) + (list (nth 2 dst) (nth 1 dst) + (cons (cdar dst) (caar dst))))))) + (when loc + (goto-char src) + ;; (put-text-property src (line-end-position) 'font-lock-face 'font-lock-warning-face) + (put-text-property src (line-end-position) + 'message (list loc 2))))))) + (goto-char limit) + nil) + +(defun compilation-forget-errors () + ;; In case we hit the same file/line specs, we want to recompute a new + ;; marker for them, so flush our cache. + (setq compilation-locs (make-hash-table :test 'equal :weakness 'value)) + ;; FIXME: the old code reset the directory-stack, so maybe we should + ;; put a `directory change' marker of some sort, but where? -stef + ;; + ;; FIXME: The old code moved compilation-current-error (which was + ;; virtually represented by a mix of compilation-parsing-end and + ;; compilation-error-list) to point-min, but that was only meaningful for + ;; the internal uses of compilation-forget-errors: all calls from external + ;; packages seem to be followed by a move of compilation-parsing-end to + ;; something equivalent to point-max. So we speculatively move + ;; compilation-current-error to point-max (since the external package + ;; won't know that it should do it). --stef + (setq compilation-current-error (point-max))) + +(provide 'compile) + +;;; arch-tag: 12465727-7382-4f72-b234-79855a00dd8c +;;; compile.el ends here diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 8aa23d299a..e13198fb24 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -1,6 +1,6 @@ ;;; cperl-mode.el --- Perl code editing commands for Emacs -;; Copyright (C) 1985, 86, 87, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2003 +;; Copyright (C) 1985,86,87,91,92,93,94,95,96,97,98,99,2000,03,2004 ;; Free Software Foundation, Inc. ;; Author: Ilya Zakharevich and Bob Olson @@ -1063,9 +1063,6 @@ the faces: please specify bold, italic, underline, shadow and box.) (substitute-key-definition 'indent-sexp 'cperl-indent-exp cperl-mode-map global-map) - (substitute-key-definition - 'fill-paragraph 'cperl-fill-paragraph - cperl-mode-map global-map) (substitute-key-definition 'indent-region 'cperl-indent-region cperl-mode-map global-map) @@ -1086,7 +1083,7 @@ the faces: please specify bold, italic, underline, shadow and box.) ["End of function" end-of-defun t] ["Mark function" mark-defun t] ["Indent expression" cperl-indent-exp t] - ["Fill paragraph/comment" cperl-fill-paragraph t] + ["Fill paragraph/comment" fill-paragraph t] "----" ["Line up a construction" cperl-lineup (cperl-use-region-p)] ["Invert if/unless/while etc" cperl-invert-if-unless t] @@ -1464,6 +1461,7 @@ or as help on variables `cperl-tips', `cperl-problems', (setq paragraph-separate paragraph-start) (make-local-variable 'paragraph-ignore-fill-prefix) (setq paragraph-ignore-fill-prefix t) + (set (make-local-variable 'fill-paragraph-function) 'cperl-fill-paragraph) (make-local-variable 'indent-line-function) (setq indent-line-function 'cperl-indent-line) (make-local-variable 'require-final-newline) @@ -2695,168 +2693,168 @@ and closing parentheses and brackets." (cperl-calculate-indent)) (current-indentation)))))))))))))) -(defvar cperl-indent-alist - '((string nil) - (comment nil) - (toplevel 0) - (toplevel-after-parenth 2) - (toplevel-continued 2) - (expression 1)) - "Alist of indentation rules for CPerl mode. -The values mean: - nil: do not indent; - number: add this amount of indentation. - -Not finished, not used.") - -(defun cperl-where-am-i (&optional parse-start start-state) - ;; Unfinished - "Return a list of lists ((TYPE POS)...) of good points before the point. -POS may be nil if it is hard to find, say, when TYPE is `string' or `comment'. - -Not finished, not used." - (save-excursion - (let* ((start-point (point)) - (s-s (cperl-get-state)) - (start (nth 0 s-s)) - (state (nth 1 s-s)) - (prestart (nth 3 s-s)) - (containing-sexp (car (cdr state))) - (case-fold-search nil) - (res (list (list 'parse-start start) (list 'parse-prestart prestart)))) - (cond ((nth 3 state) ; In string - (setq res (cons (list 'string nil (nth 3 state)) res))) ; What started string - ((nth 4 state) ; In comment - (setq res (cons '(comment) res))) - ((null containing-sexp) - ;; Line is at top level. - ;; Indent like the previous top level line - ;; unless that ends in a closeparen without semicolon, - ;; in which case this line is the first argument decl. - (cperl-backward-to-noncomment (or parse-start (point-min))) - ;;(skip-chars-backward " \t\f\n") - (cond - ((or (bobp) - (memq (preceding-char) (append ";}" nil))) - (setq res (cons (list 'toplevel start) res))) - ((eq (preceding-char) ?\) ) - (setq res (cons (list 'toplevel-after-parenth start) res))) - (t - (setq res (cons (list 'toplevel-continued start) res))))) - ((/= (char-after containing-sexp) ?{) - ;; line is expression, not statement: - ;; indent to just after the surrounding open. - ;; skip blanks if we do not close the expression. - (setq res (cons (list 'expression-blanks - (progn - (goto-char (1+ containing-sexp)) - (or (looking-at "[ \t]*\\(#\\|$\\)") - (skip-chars-forward " \t")) - (point))) - (cons (list 'expression containing-sexp) res)))) - ((progn - ;; Containing-expr starts with \{. Check whether it is a hash. - (goto-char containing-sexp) - (not (cperl-block-p))) - (setq res (cons (list 'expression-blanks - (progn - (goto-char (1+ containing-sexp)) - (or (looking-at "[ \t]*\\(#\\|$\\)") - (skip-chars-forward " \t")) - (point))) - (cons (list 'expression containing-sexp) res)))) - (t - ;; Statement level. - (setq res (cons (list 'in-block containing-sexp) res)) - ;; Is it a continuation or a new statement? - ;; Find previous non-comment character. - (cperl-backward-to-noncomment containing-sexp) - ;; Back up over label lines, since they don't - ;; affect whether our line is a continuation. - ;; Back up comma-delimited lines too ????? - (while (or (eq (preceding-char) ?\,) - (save-excursion (cperl-after-label))) - (if (eq (preceding-char) ?\,) - ;; Will go to beginning of line, essentially - ;; Will ignore embedded sexpr XXXX. - (cperl-backward-to-start-of-continued-exp containing-sexp)) - (beginning-of-line) - (cperl-backward-to-noncomment containing-sexp)) - ;; Now we get the answer. - (if (not (memq (preceding-char) (append ";}{" '(nil)))) ; Was ?\, - ;; This line is continuation of preceding line's statement. - (list (list 'statement-continued containing-sexp)) - ;; This line starts a new statement. - ;; Position following last unclosed open. - (goto-char containing-sexp) - ;; Is line first statement after an open-brace? - (or - ;; If no, find that first statement and indent like - ;; it. If the first statement begins with label, do - ;; not believe when the indentation of the label is too - ;; small. - (save-excursion - (forward-char 1) - (let ((colon-line-end 0)) - (while (progn (skip-chars-forward " \t\n" start-point) - (and (< (point) start-point) - (looking-at - "#\\|[a-zA-Z_][a-zA-Z0-9_]*:[^:]"))) - ;; Skip over comments and labels following openbrace. - (cond ((= (following-char) ?\#) - ;;(forward-line 1) - (end-of-line)) - ;; label: - (t - (save-excursion (end-of-line) - (setq colon-line-end (point))) - (search-forward ":")))) - ;; Now at the point, after label, or at start - ;; of first statement in the block. - (and (< (point) start-point) - (if (> colon-line-end (point)) - ;; Before statement after label - (if (> (current-indentation) - cperl-min-label-indent) - (list (list 'label-in-block (point))) - ;; Do not believe: `max' is involved - (list - (list 'label-in-block-min-indent (point)))) - ;; Before statement - (list 'statement-in-block (point)))))) - ;; If no previous statement, - ;; indent it relative to line brace is on. - ;; For open brace in column zero, don't let statement - ;; start there too. If cperl-indent-level is zero, - ;; use cperl-brace-offset + cperl-continued-statement-offset instead. - ;; For open-braces not the first thing in a line, - ;; add in cperl-brace-imaginary-offset. - - ;; If first thing on a line: ????? - (+ (if (and (bolp) (zerop cperl-indent-level)) - (+ cperl-brace-offset cperl-continued-statement-offset) - cperl-indent-level) - ;; Move back over whitespace before the openbrace. - ;; If openbrace is not first nonwhite thing on the line, - ;; add the cperl-brace-imaginary-offset. - (progn (skip-chars-backward " \t") - (if (bolp) 0 cperl-brace-imaginary-offset)) - ;; If the openbrace is preceded by a parenthesized exp, - ;; move to the beginning of that; - ;; possibly a different line - (progn - (if (eq (preceding-char) ?\)) - (forward-sexp -1)) - ;; Get initial indentation of the line we are on. - ;; If line starts with label, calculate label indentation - (if (save-excursion - (beginning-of-line) - (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*:[^:]")) - (if (> (current-indentation) cperl-min-label-indent) - (- (current-indentation) cperl-label-offset) - (cperl-calculate-indent)) - (current-indentation)))))))) - res))) +;; (defvar cperl-indent-alist +;; '((string nil) +;; (comment nil) +;; (toplevel 0) +;; (toplevel-after-parenth 2) +;; (toplevel-continued 2) +;; (expression 1)) +;; "Alist of indentation rules for CPerl mode. +;; The values mean: +;; nil: do not indent; +;; number: add this amount of indentation. + +;; Not finished, not used.") + +;; (defun cperl-where-am-i (&optional parse-start start-state) +;; ;; Unfinished +;; "Return a list of lists ((TYPE POS)...) of good points before the point. +;; ;; POS may be nil if it is hard to find, say, when TYPE is `string' or `comment'. + +;; ;; Not finished, not used." +;; (save-excursion +;; (let* ((start-point (point)) +;; (s-s (cperl-get-state)) +;; (start (nth 0 s-s)) +;; (state (nth 1 s-s)) +;; (prestart (nth 3 s-s)) +;; (containing-sexp (car (cdr state))) +;; (case-fold-search nil) +;; (res (list (list 'parse-start start) (list 'parse-prestart prestart)))) +;; (cond ((nth 3 state) ; In string +;; (setq res (cons (list 'string nil (nth 3 state)) res))) ; What started string +;; ((nth 4 state) ; In comment +;; (setq res (cons '(comment) res))) +;; ((null containing-sexp) +;; ;; Line is at top level. +;; ;; Indent like the previous top level line +;; ;; unless that ends in a closeparen without semicolon, +;; ;; in which case this line is the first argument decl. +;; (cperl-backward-to-noncomment (or parse-start (point-min))) +;; ;;(skip-chars-backward " \t\f\n") +;; (cond +;; ((or (bobp) +;; (memq (preceding-char) (append ";}" nil))) +;; (setq res (cons (list 'toplevel start) res))) +;; ((eq (preceding-char) ?\) ) +;; (setq res (cons (list 'toplevel-after-parenth start) res))) +;; (t +;; (setq res (cons (list 'toplevel-continued start) res))))) +;; ((/= (char-after containing-sexp) ?{) +;; ;; line is expression, not statement: +;; ;; indent to just after the surrounding open. +;; ;; skip blanks if we do not close the expression. +;; (setq res (cons (list 'expression-blanks +;; (progn +;; (goto-char (1+ containing-sexp)) +;; (or (looking-at "[ \t]*\\(#\\|$\\)") +;; (skip-chars-forward " \t")) +;; (point))) +;; (cons (list 'expression containing-sexp) res)))) +;; ((progn +;; ;; Containing-expr starts with \{. Check whether it is a hash. +;; (goto-char containing-sexp) +;; (not (cperl-block-p))) +;; (setq res (cons (list 'expression-blanks +;; (progn +;; (goto-char (1+ containing-sexp)) +;; (or (looking-at "[ \t]*\\(#\\|$\\)") +;; (skip-chars-forward " \t")) +;; (point))) +;; (cons (list 'expression containing-sexp) res)))) +;; (t +;; ;; Statement level. +;; (setq res (cons (list 'in-block containing-sexp) res)) +;; ;; Is it a continuation or a new statement? +;; ;; Find previous non-comment character. +;; (cperl-backward-to-noncomment containing-sexp) +;; ;; Back up over label lines, since they don't +;; ;; affect whether our line is a continuation. +;; ;; Back up comma-delimited lines too ????? +;; (while (or (eq (preceding-char) ?\,) +;; (save-excursion (cperl-after-label))) +;; (if (eq (preceding-char) ?\,) +;; ;; Will go to beginning of line, essentially +;; ;; Will ignore embedded sexpr XXXX. +;; (cperl-backward-to-start-of-continued-exp containing-sexp)) +;; (beginning-of-line) +;; (cperl-backward-to-noncomment containing-sexp)) +;; ;; Now we get the answer. +;; (if (not (memq (preceding-char) (append ";}{" '(nil)))) ; Was ?\, +;; ;; This line is continuation of preceding line's statement. +;; (list (list 'statement-continued containing-sexp)) +;; ;; This line starts a new statement. +;; ;; Position following last unclosed open. +;; (goto-char containing-sexp) +;; ;; Is line first statement after an open-brace? +;; (or +;; ;; If no, find that first statement and indent like +;; ;; it. If the first statement begins with label, do +;; ;; not believe when the indentation of the label is too +;; ;; small. +;; (save-excursion +;; (forward-char 1) +;; (let ((colon-line-end 0)) +;; (while (progn (skip-chars-forward " \t\n" start-point) +;; (and (< (point) start-point) +;; (looking-at +;; "#\\|[a-zA-Z_][a-zA-Z0-9_]*:[^:]"))) +;; ;; Skip over comments and labels following openbrace. +;; (cond ((= (following-char) ?\#) +;; ;;(forward-line 1) +;; (end-of-line)) +;; ;; label: +;; (t +;; (save-excursion (end-of-line) +;; (setq colon-line-end (point))) +;; (search-forward ":")))) +;; ;; Now at the point, after label, or at start +;; ;; of first statement in the block. +;; (and (< (point) start-point) +;; (if (> colon-line-end (point)) +;; ;; Before statement after label +;; (if (> (current-indentation) +;; cperl-min-label-indent) +;; (list (list 'label-in-block (point))) +;; ;; Do not believe: `max' is involved +;; (list +;; (list 'label-in-block-min-indent (point)))) +;; ;; Before statement +;; (list 'statement-in-block (point)))))) +;; ;; If no previous statement, +;; ;; indent it relative to line brace is on. +;; ;; For open brace in column zero, don't let statement +;; ;; start there too. If cperl-indent-level is zero, +;; ;; use cperl-brace-offset + cperl-continued-statement-offset instead. +;; ;; For open-braces not the first thing in a line, +;; ;; add in cperl-brace-imaginary-offset. + +;; ;; If first thing on a line: ????? +;; (+ (if (and (bolp) (zerop cperl-indent-level)) +;; (+ cperl-brace-offset cperl-continued-statement-offset) +;; cperl-indent-level) +;; ;; Move back over whitespace before the openbrace. +;; ;; If openbrace is not first nonwhite thing on the line, +;; ;; add the cperl-brace-imaginary-offset. +;; (progn (skip-chars-backward " \t") +;; (if (bolp) 0 cperl-brace-imaginary-offset)) +;; ;; If the openbrace is preceded by a parenthesized exp, +;; ;; move to the beginning of that; +;; ;; possibly a different line +;; (progn +;; (if (eq (preceding-char) ?\)) +;; (forward-sexp -1)) +;; ;; Get initial indentation of the line we are on. +;; ;; If line starts with label, calculate label indentation +;; (if (save-excursion +;; (beginning-of-line) +;; (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*:[^:]")) +;; (if (> (current-indentation) cperl-min-label-indent) +;; (- (current-indentation) cperl-label-offset) +;; (cperl-calculate-indent)) +;; (current-indentation)))))))) +;; res))) (defun cperl-calculate-indent-within-comment () "Return the indentation amount for line, assuming that @@ -4255,11 +4253,11 @@ conditional/loop constructs." ;; Stolen from lisp-mode with a lot of improvements (defun cperl-fill-paragraph (&optional justify iteration) - "Like \\[fill-paragraph], but handle CPerl comments. + "Like `fill-paragraph', but handle CPerl comments. If any of the current line is a comment, fill the comment or the block of it that point is in, preserving the comment's initial indentation and initial hashes. Behaves usually outside of comment." - (interactive "P") + ;; (interactive "P") ; Only works when called from fill-paragraph. -stef (let (;; Non-nil if the current line contains a comment. has-comment @@ -4315,11 +4313,12 @@ indentation and initial hashes. Behaves usually outside of comment." (looking-at "^[ \t]*#+[ \t]*[^ \t\n#]"))) (point))) ;; Remove existing hashes - (goto-char (point-min)) - (while (progn (forward-line 1) (< (point) (point-max))) - (skip-chars-forward " \t") - (and (looking-at "#+") - (delete-char (- (match-end 0) (match-beginning 0))))) + (save-excursion + (goto-char (point-min)) + (while (progn (forward-line 1) (< (point) (point-max))) + (skip-chars-forward " \t") + (and (looking-at "#+") + (delete-char (- (match-end 0) (match-beginning 0)))))) ;; Lines with only hashes on them can be paragraph boundaries. (let ((paragraph-start (concat paragraph-start "\\|^[ \t#]*$")) @@ -4346,9 +4345,11 @@ indentation and initial hashes. Behaves usually outside of comment." (let ((c (save-excursion (beginning-of-line) (cperl-to-comment-or-eol) (point))) (s (memq (following-char) '(?\ ?\t))) marker) - (if (>= c (point)) nil + (if (>= c (point)) + ;; Don't break line inside code: only inside comment. + nil (setq marker (point-marker)) - (cperl-fill-paragraph) + (fill-paragraph nil) (goto-char marker) ;; Is not enough, sometimes marker is a start of line (if (bolp) (progn (re-search-forward "#+[ \t]*") @@ -7271,4 +7272,5 @@ Delay of auto-help controlled by `cperl-lazy-help-time'." (provide 'cperl-mode) +;;; arch-tag: 42e5b19b-e187-4537-929f-1a7408980ce6 ;;; cperl-mode.el ends here diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index e8d7ce8e3b..0d9a9f62a6 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -821,4 +821,5 @@ BRANCH should be either nil (false branch), t (true branch) or 'both." (provide 'cpp) +;;; arch-tag: fb7d433d-745d-495a-96f0-86908ab63f74 ;;; cpp.el ends here diff --git a/lisp/progmodes/cwarn.el b/lisp/progmodes/cwarn.el index aed7732490..b16381cd2c 100644 --- a/lisp/progmodes/cwarn.el +++ b/lisp/progmodes/cwarn.el @@ -380,4 +380,5 @@ The mode is turned if some feature is enabled for the current ;;}}} +;;; arch-tag: 225fb5e2-0838-4eb1-88ce-3811c5e4d738 ;;; cwarn.el ends here diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 799c47e09f..861c3bbb8c 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el @@ -2215,4 +2215,5 @@ otherwise return nil." (run-hooks 'dcl-mode-load-hook) ; for your customizations +;;; arch-tag: e00d421b-f26c-483e-a8bd-af412ea7764a ;;; dcl-mode.el ends here diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index 6fae66ef45..4ebbc54969 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el @@ -64,12 +64,6 @@ (provide 'delphi) -(defconst delphi-version - (let ((revision "$Revision: 3.9 $")) - (string-match ": \\([^ ]+\\)" revision) - (match-string 1 revision)) - "Version of this delphi mode.") - (eval-and-compile ;; Allow execution on pre Emacs 20 versions. (or (fboundp 'when) @@ -2010,4 +2004,5 @@ no args, if that value is non-nil." (run-hooks 'delphi-mode-hook)) +;;; arch-tag: 410e192d-e9b5-4397-ad62-12340fc3fa41 ;;; delphi.el ends here diff --git a/lisp/progmodes/ebnf-abn.el b/lisp/progmodes/ebnf-abn.el new file mode 100644 index 0000000000..35771a10f3 --- /dev/null +++ b/lisp/progmodes/ebnf-abn.el @@ -0,0 +1,663 @@ +;;; ebnf-abn.el --- parser for ABNF (Augmented BNF) + +;; Copyright (C) 2004 Free Sofware Foundation, Inc. + +;; Author: Vinicius Jose Latorre +;; Maintainer: Vinicius Jose Latorre +;; Time-stamp: <2004/04/03 16:43:57 vinicius> +;; Keywords: wp, ebnf, PostScript +;; Version: 1.1 + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; +;; This is part of ebnf2ps package. +;; +;; This package defines a parser for ABNF (Augmented BNF). +;; +;; See ebnf2ps.el for documentation. +;; +;; +;; ABNF Syntax +;; ----------- +;; +;; See the URL: +;; `http://www.ietf.org/rfc/rfc2234.txt' +;; or +;; `http://www.faqs.org/rfcs/rfc2234.html' +;; or +;; `http://www.rnp.br/ietf/rfc/rfc2234.txt' +;; ("Augmented BNF for Syntax Specifications: ABNF"). +;; +;; +;; rulelist = 1*( rule / (*c-wsp c-nl) ) +;; +;; rule = rulename defined-as elements c-nl +;; ; continues if next line starts with white space +;; +;; rulename = ALPHA *(ALPHA / DIGIT / "-") +;; +;; defined-as = *c-wsp ("=" / "=/") *c-wsp +;; ; basic rules definition and incremental +;; ; alternatives +;; +;; elements = alternation *c-wsp +;; +;; c-wsp = WSP / (c-nl WSP) +;; +;; c-nl = comment / CRLF +;; ; comment or newline +;; +;; comment = ";" *(WSP / VCHAR) CRLF +;; +;; alternation = concatenation +;; *(*c-wsp "/" *c-wsp concatenation) +;; +;; concatenation = repetition *(1*c-wsp repetition) +;; +;; repetition = [repeat] element +;; +;; repeat = 1*DIGIT / (*DIGIT "*" *DIGIT) +;; +;; element = rulename / group / option / +;; char-val / num-val / prose-val +;; +;; group = "(" *c-wsp alternation *c-wsp ")" +;; +;; option = "[" *c-wsp alternation *c-wsp "]" +;; +;; char-val = DQUOTE *(%x20-21 / %x23-7E) DQUOTE +;; ; quoted string of SP and VCHAR without DQUOTE +;; +;; num-val = "%" (bin-val / dec-val / hex-val) +;; +;; bin-val = "b" 1*BIT +;; [ 1*("." 1*BIT) / ("-" 1*BIT) ] +;; ; series of concatenated bit values +;; ; or single ONEOF range +;; +;; dec-val = "d" 1*DIGIT +;; [ 1*("." 1*DIGIT) / ("-" 1*DIGIT) ] +;; +;; hex-val = "x" 1*HEXDIG +;; [ 1*("." 1*HEXDIG) / ("-" 1*HEXDIG) ] +;; +;; prose-val = "<" *(%x20-3D / %x3F-7E) ">" +;; ; bracketed string of SP and VCHAR without +;; ; angles +;; ; prose description, to be used as last resort +;; +;; ; Core rules -- the coding depends on the system, here is used 7-bit ASCII +;; +;; ALPHA = %x41-5A / %x61-7A +;; ; A-Z / a-z +;; +;; BIT = "0" / "1" +;; +;; CHAR = %x01-7F +;; ; any 7-bit US-ASCII character, excluding NUL +;; +;; CR = %x0D +;; ; carriage return +;; +;; CRLF = CR LF +;; ; Internet standard newline +;; +;; CTL = %x00-1F / %x7F +;; ; controls +;; +;; DIGIT = %x30-39 +;; ; 0-9 +;; +;; DQUOTE = %x22 +;; ; " (Double Quote) +;; +;; HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" +;; +;; HTAB = %x09 +;; ; horizontal tab +;; +;; LF = %x0A +;; ; linefeed +;; +;; LWSP = *(WSP / CRLF WSP) +;; ; linear white space (past newline) +;; +;; OCTET = %x00-FF +;; ; 8 bits of data +;; +;; SP = %x20 +;; ; space +;; +;; VCHAR = %x21-7E +;; ; visible (printing) characters +;; +;; WSP = SP / HTAB +;; ; white space +;; +;; +;; NOTES: +;; +;; 1. Rules name and terminal strings are case INSENSITIVE. +;; So, the following rule names are all equals: +;; Rule-name, rule-Name, rule-name, RULE-NAME +;; Also, the following strings are equals: +;; "abc", "ABC", "aBc", "Abc", "aBC", etc. +;; +;; 2. To have a case SENSITIVE string, use the character notation. +;; For example, to specify the lowercase string "abc", use: +;; %d97.98.99 +;; +;; 3. There are no implicit spaces between elements, for example, the +;; following rules: +;; +;; foo = %x61 ; a +;; +;; bar = %x62 ; b +;; +;; mumble = foo bar foo +;; +;; Are equivalent to the following rule: +;; +;; mumble = %x61.62.61 +;; +;; If spaces are needed, it should be explicit specified, like: +;; +;; spaces = 1*(%x20 / %x09) ; one or more spaces or tabs +;; +;; mumble = foo spaces bar spaces foo +;; +;; 4. Lines starting with space or tab are considered a continuation line. +;; For example, the rule: +;; +;; rule = foo +;; bar +;; +;; Is equivalent to: +;; +;; rule = foo bar +;; +;; +;; Differences Between ABNF And ebnf2ps ABNF +;; ----------------------------------------- +;; +;; Besides the characters that ABNF accepts, ebnf2ps ABNF accepts also the +;; underscore (_) for rule name and european 8-bit accentuated characters (from +;; \240 to \377) for rule name, string and comment. +;; +;; +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;; Code: + + +(require 'ebnf-otz) + + +(defvar ebnf-abn-lex nil + "Value returned by `ebnf-abn-lex' function.") + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Syntactic analyzer + + +;;; rulelist = 1*( rule / (*c-wsp c-nl) ) + +(defun ebnf-abn-parser (start) + "ABNF parser." + (let ((total (+ (- ebnf-limit start) 1)) + (bias (1- start)) + (origin (point)) + rule-list token rule) + (goto-char start) + (setq token (ebnf-abn-lex)) + (and (eq token 'end-of-input) + (error "Invalid ABNF file format")) + (and (eq token 'end-of-rule) + (setq token (ebnf-abn-lex))) + (while (not (eq token 'end-of-input)) + (ebnf-message-float + "Parsing...%s%%" + (/ (* (- (point) bias) 100.0) total)) + (setq token (ebnf-abn-rule token) + rule (cdr token) + token (car token)) + (or (ebnf-add-empty-rule-list rule) + (setq rule-list (cons rule rule-list)))) + (goto-char origin) + rule-list)) + + +;;; rule = rulename defined-as elements c-nl +;;; ; continues if next line starts with white space +;;; +;;; rulename = ALPHA *(ALPHA / DIGIT / "-") +;;; +;;; defined-as = *c-wsp ("=" / "=/") *c-wsp +;;; ; basic rules definition and incremental +;;; ; alternatives +;;; +;;; elements = alternation *c-wsp +;;; +;;; c-wsp = WSP / (c-nl WSP) +;;; +;;; c-nl = comment / CRLF +;;; ; comment or newline +;;; +;;; comment = ";" *(WSP / VCHAR) CRLF + + +(defun ebnf-abn-rule (token) + (let ((name ebnf-abn-lex) + (action ebnf-action) + elements) + (setq ebnf-action nil) + (or (eq token 'non-terminal) + (error "Invalid rule name")) + (setq token (ebnf-abn-lex)) + (or (memq token '(equal incremental-alternative)) + (error "Invalid rule: missing `=' or `=/'")) + (and (eq token 'incremental-alternative) + (setq name (concat name " =/"))) + (setq elements (ebnf-abn-alternation)) + (or (memq (car elements) '(end-of-rule end-of-input)) + (error "Invalid rule: there is no end of rule")) + (setq elements (cdr elements)) + (ebnf-eps-add-production name) + (cons (ebnf-abn-lex) + (ebnf-make-production name elements action)))) + + +;;; alternation = concatenation +;;; *(*c-wsp "/" *c-wsp concatenation) + + +(defun ebnf-abn-alternation () + (let (body concatenation) + (while (eq (car (setq concatenation + (ebnf-abn-concatenation (ebnf-abn-lex)))) + 'alternative) + (setq body (cons (cdr concatenation) body))) + (ebnf-token-alternative body concatenation))) + + +;;; concatenation = repetition *(1*c-wsp repetition) + + +(defun ebnf-abn-concatenation (token) + (let ((term (ebnf-abn-repetition token)) + seq) + (or (setq token (car term) + term (cdr term)) + (error "Empty element")) + (setq seq (cons term seq)) + (while (setq term (ebnf-abn-repetition token) + token (car term) + term (cdr term)) + (setq seq (cons term seq))) + (cons token + (ebnf-token-sequence seq)))) + + +;;; repetition = [repeat] element +;;; +;;; repeat = 1*DIGIT / (*DIGIT "*" *DIGIT) + + +(defun ebnf-abn-repetition (token) + (let (lower upper) + ;; INTEGER [ "*" [ INTEGER ] ] + (when (eq token 'integer) + (setq lower ebnf-abn-lex + token (ebnf-abn-lex)) + (or (eq token 'repeat) + (setq upper lower))) + ;; "*" [ INTEGER ] + (when (eq token 'repeat) + ;; only * ==> lower & upper are empty string + (or lower + (setq lower "" + upper "")) + (when (eq (setq token (ebnf-abn-lex)) 'integer) + (setq upper ebnf-abn-lex + token (ebnf-abn-lex)))) + (let ((element (ebnf-abn-element token))) + (cond + ;; there is a repetition + (lower + (or element + (error "Missing element repetition")) + (setq token (ebnf-abn-lex)) + (cond + ;; one or more + ((and (string= lower "1") (null upper)) + (cons token (ebnf-make-one-or-more element))) + ;; zero or more + ((or (and (string= lower "0") (null upper)) + (and (string= lower "") (string= upper ""))) + (cons token (ebnf-make-zero-or-more element))) + ;; real repetition + (t + (ebnf-token-repeat lower (cons token element) upper)))) + ;; there is an element + (element + (cons (ebnf-abn-lex) element)) + ;; something that caller has to deal + (t + (cons token nil)))))) + + +;;; element = rulename / group / option / +;;; char-val / num-val / prose-val +;;; +;;; group = "(" *c-wsp alternation *c-wsp ")" +;;; +;;; option = "[" *c-wsp alternation *c-wsp "]" +;;; +;;; char-val = DQUOTE *(%x20-21 / %x23-7E) DQUOTE +;;; ; quoted string of SP and VCHAR without DQUOTE +;;; +;;; num-val = "%" (bin-val / dec-val / hex-val) +;;; +;;; bin-val = "b" 1*BIT +;;; [ 1*("." 1*BIT) / ("-" 1*BIT) ] +;;; ; series of concatenated bit values +;;; ; or single ONEOF range +;;; +;;; dec-val = "d" 1*DIGIT +;;; [ 1*("." 1*DIGIT) / ("-" 1*DIGIT) ] +;;; +;;; hex-val = "x" 1*HEXDIG +;;; [ 1*("." 1*HEXDIG) / ("-" 1*HEXDIG) ] +;;; +;;; prose-val = "<" *(%x20-3D / %x3F-7E) ">" +;;; ; bracketed string of SP and VCHAR without +;;; ; angles +;;; ; prose description, to be used as last resort + + +(defun ebnf-abn-element (token) + (cond + ;; terminal + ((eq token 'terminal) + (ebnf-make-terminal ebnf-abn-lex)) + ;; non-terminal + ((eq token 'non-terminal) + (ebnf-make-non-terminal ebnf-abn-lex)) + ;; group + ((eq token 'begin-group) + (let ((body (ebnf-abn-alternation))) + (or (eq (car body) 'end-group) + (error "Missing `)'")) + (cdr body))) + ;; optional + ((eq token 'begin-optional) + (let ((body (ebnf-abn-alternation))) + (or (eq (car body) 'end-optional) + (error "Missing `]'")) + (ebnf-token-optional (cdr body)))) + ;; no element + (t + nil) + )) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Lexical analyzer + + +(defconst ebnf-abn-token-table (make-vector 256 'error) + "Vector used to map characters to a lexical token.") + + +(defun ebnf-abn-initialize () + "Initialize EBNF token table." + ;; control character & control 8-bit character are set to `error' + (let ((char ?\060)) + ;; digits: 0-9 + (while (< char ?\072) + (aset ebnf-abn-token-table char 'integer) + (setq char (1+ char))) + ;; printable character: A-Z + (setq char ?\101) + (while (< char ?\133) + (aset ebnf-abn-token-table char 'non-terminal) + (setq char (1+ char))) + ;; printable character: a-z + (setq char ?\141) + (while (< char ?\173) + (aset ebnf-abn-token-table char 'non-terminal) + (setq char (1+ char))) + ;; European 8-bit accentuated characters: + (setq char ?\240) + (while (< char ?\400) + (aset ebnf-abn-token-table char 'non-terminal) + (setq char (1+ char))) + ;; Override end of line characters: + (aset ebnf-abn-token-table ?\n 'end-of-rule) ; [NL] linefeed + (aset ebnf-abn-token-table ?\r 'end-of-rule) ; [CR] carriage return + ;; Override space characters: + (aset ebnf-abn-token-table ?\013 'space) ; [VT] vertical tab + (aset ebnf-abn-token-table ?\t 'space) ; [HT] horizontal tab + (aset ebnf-abn-token-table ?\ 'space) ; [SP] space + ;; Override form feed character: + (aset ebnf-abn-token-table ?\f 'form-feed) ; [FF] form feed + ;; Override other lexical characters: + (aset ebnf-abn-token-table ?< 'non-terminal) + (aset ebnf-abn-token-table ?% 'terminal) + (aset ebnf-abn-token-table ?\" 'terminal) + (aset ebnf-abn-token-table ?\( 'begin-group) + (aset ebnf-abn-token-table ?\) 'end-group) + (aset ebnf-abn-token-table ?* 'repeat) + (aset ebnf-abn-token-table ?= 'equal) + (aset ebnf-abn-token-table ?\[ 'begin-optional) + (aset ebnf-abn-token-table ?\] 'end-optional) + (aset ebnf-abn-token-table ?/ 'alternative) + ;; Override comment character: + (aset ebnf-abn-token-table ?\; 'comment))) + + +;; replace the range "\240-\377" (see `ebnf-range-regexp'). +(defconst ebnf-abn-non-terminal-chars + (ebnf-range-regexp "-_0-9A-Za-z" ?\240 ?\377)) +(defconst ebnf-abn-non-terminal-letter-chars + (ebnf-range-regexp "A-Za-z" ?\240 ?\377)) + + +(defun ebnf-abn-lex () + "Lexical analyser for ABNF. + +Return a lexical token. + +See documentation for variable `ebnf-abn-lex'." + (if (>= (point) ebnf-limit) + 'end-of-input + (let (token) + ;; skip spaces and comments + (while (if (> (following-char) 255) + (progn + (setq token 'error) + nil) + (setq token (aref ebnf-abn-token-table (following-char))) + (cond + ((eq token 'space) + (skip-chars-forward " \013\t" ebnf-limit) + (< (point) ebnf-limit)) + ((eq token 'comment) + (ebnf-abn-skip-comment)) + ((eq token 'form-feed) + (forward-char) + (setq ebnf-action 'form-feed)) + ((eq token 'end-of-rule) + (ebnf-abn-skip-end-of-rule)) + (t nil) + ))) + (cond + ;; end of input + ((>= (point) ebnf-limit) + 'end-of-input) + ;; error + ((eq token 'error) + (error "Illegal character")) + ;; end of rule + ((eq token 'end-of-rule) + 'end-of-rule) + ;; integer + ((eq token 'integer) + (setq ebnf-abn-lex (ebnf-buffer-substring "0-9")) + 'integer) + ;; terminal: "string" or %[bdx]NNN((.NNN)+|-NNN)? + ((eq token 'terminal) + (setq ebnf-abn-lex + (if (= (following-char) ?\") + (ebnf-abn-string) + (ebnf-abn-character))) + 'terminal) + ;; non-terminal: NAME or + ((eq token 'non-terminal) + (let ((prose-p (= (following-char) ?<))) + (when prose-p + (forward-char) + (or (looking-at ebnf-abn-non-terminal-letter-chars) + (error "Invalid prose value"))) + (setq ebnf-abn-lex + (ebnf-buffer-substring ebnf-abn-non-terminal-chars)) + (when prose-p + (or (= (following-char) ?>) + (error "Invalid prose value")) + (setq ebnf-abn-lex (concat "<" ebnf-abn-lex ">")))) + 'non-terminal) + ;; equal: =, =/ + ((eq token 'equal) + (forward-char) + (if (/= (following-char) ?/) + 'equal + (forward-char) + 'incremental-alternative)) + ;; miscellaneous: (, ), [, ], /, * + (t + (forward-char) + token) + )))) + + +(defun ebnf-abn-skip-end-of-rule () + (let (eor-p) + (while (progn + ;; end of rule ==> 2 or more consecutive end of lines + (setq eor-p (or (> (skip-chars-forward "\r\n" ebnf-limit) 1) + eor-p)) + ;; skip spaces + (skip-chars-forward " \013\t" ebnf-limit) + ;; skip comments + (and (= (following-char) ?\;) + (ebnf-abn-skip-comment)))) + (not eor-p))) + + +;; replace the range "\177-\237" (see `ebnf-range-regexp'). +(defconst ebnf-abn-comment-chars + (ebnf-range-regexp "^\n\000-\010\016-\037" ?\177 ?\237)) + + +(defun ebnf-abn-skip-comment () + (forward-char) + (cond + ;; open EPS file + ((and ebnf-eps-executing (= (following-char) ?\[)) + (ebnf-eps-add-context (ebnf-abn-eps-filename))) + ;; close EPS file + ((and ebnf-eps-executing (= (following-char) ?\])) + (ebnf-eps-remove-context (ebnf-abn-eps-filename))) + ;; any other action in comment + (t + (setq ebnf-action (aref ebnf-comment-table (following-char))) + (skip-chars-forward ebnf-abn-comment-chars ebnf-limit)) + ) + ;; check for a valid end of comment + (cond ((>= (point) ebnf-limit) + nil) + ((= (following-char) ?\n) + t) + (t + (error "Illegal character")) + )) + + +(defun ebnf-abn-eps-filename () + (forward-char) + (ebnf-buffer-substring ebnf-abn-comment-chars)) + + +;; replace the range "\240-\377" (see `ebnf-range-regexp'). +(defconst ebnf-abn-string-chars + (ebnf-range-regexp " -!#-~" ?\240 ?\377)) + + +(defun ebnf-abn-string () + (buffer-substring-no-properties + (progn + (forward-char) + (point)) + (progn + (skip-chars-forward ebnf-abn-string-chars ebnf-limit) + (or (= (following-char) ?\") + (error "Missing `\"'")) + (prog1 + (point) + (forward-char))))) + + +(defun ebnf-abn-character () + ;; %[bdx]NNN((-NNN)|(.NNN)+)? + (buffer-substring-no-properties + (point) + (progn + (forward-char) + (let* ((char (following-char)) + (chars (cond ((or (= char ?B) (= char ?b)) "01") + ((or (= char ?D) (= char ?d)) "0-9") + ((or (= char ?X) (= char ?x)) "0-9A-Fa-f") + (t (error "Invalid terminal value"))))) + (forward-char) + (or (> (skip-chars-forward chars ebnf-limit) 0) + (error "Invalid terminal value")) + (if (= (following-char) ?-) + (progn + (forward-char) + (or (> (skip-chars-forward chars ebnf-limit) 0) + (error "Invalid terminal value range"))) + (while (= (following-char) ?.) + (forward-char) + (or (> (skip-chars-forward chars ebnf-limit) 0) + (error "Invalid terminal value"))))) + (point)))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(provide 'ebnf-abn) + +;;; arch-tag: 8d1b3c4d-4226-4393-b9ae-b7ccf07cf779 +;;; ebnf-abn.el ends here diff --git a/lisp/progmodes/ebnf-bnf.el b/lisp/progmodes/ebnf-bnf.el index 054f337b1c..d32ad5a77c 100644 --- a/lisp/progmodes/ebnf-bnf.el +++ b/lisp/progmodes/ebnf-bnf.el @@ -1,12 +1,13 @@ ;;; ebnf-bnf.el --- parser for EBNF -;; Copyright (C) 1999, 2000, 2001 Free Sofware Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +;; Free Sofware Foundation, Inc. -;; Author: Vinicius Jose Latorre -;; Maintainer: Vinicius Jose Latorre +;; Author: Vinicius Jose Latorre +;; Maintainer: Vinicius Jose Latorre +;; Time-stamp: <2004/04/03 16:42:18 vinicius> ;; Keywords: wp, ebnf, PostScript -;; Time-stamp: <2003-02-10 10:29:48 jbarranquero> -;; Version: 1.7 +;; Version: 1.9 ;; This file is part of GNU Emacs. @@ -53,7 +54,10 @@ ;; C D sequence (C occurs before D) ;; C | D alternative (C or D occurs) ;; A - B exception (A excluding B, B without any non-terminal) -;; n * A repetition (A repeats n (integer) times) +;; n * A repetition (A repeats at least n (integer) times) +;; n * n A repetition (A repeats exactly n (integer) times) +;; n * m A repetition (A repeats at least n (integer) and at most +;; m (integer) times) ;; (C) group (expression C is grouped together) ;; [C] optional (C may or not occurs) ;; C+ one or more occurrences of C @@ -77,7 +81,7 @@ ;; ;; exception = repeat [ "-" repeat]. ;; exception ;; -;; repeat = [ integer "*" ] term. ;; repetition +;; repeat = [ integer "*" [ integer ]] term. ;; repetition ;; ;; term = factor ;; | [factor] "+" ;; one-or-more @@ -95,14 +99,30 @@ ;; . ;; ;; non_terminal = "[!#%&'*-,0-:<>@-Z\\\\^-z~\\240-\\377]+". +;; ;; that is, a valid non_terminal accepts decimal digits, letters (upper +;; ;; and lower), 8-bit accentuated characters, +;; ;; "!", "#", "%", "&", "'", "*", "+", ",", ":", +;; ;; "<", ">", "@", "\", "^", "_", "`" and "~". ;; ;; terminal = "\\([^\"\\]\\|\\\\[ -~\\240-\\377]\\)+". +;; ;; that is, a valid terminal accepts any printable character (including +;; ;; 8-bit accentuated characters) except `"', as `"' is used to delimit a +;; ;; terminal. Also, accepts escaped characters, that is, a character +;; ;; pair starting with `\' followed by a printable character, for +;; ;; example: \", \\. ;; -;; special = "[^?\\n\\000-\\010\\016-\\037\\177-\\237]*". +;; special = "[^?\\000-\\010\\012-\\037\\177-\\237]*". +;; ;; that is, a valid special accepts any printable character (including +;; ;; 8-bit accentuated characters) and tabs except `?', as `?' is used to +;; ;; delimit a special. ;; ;; integer = "[0-9]+". +;; ;; that is, an integer is a sequence of one or more decimal digits. ;; ;; comment = ";" "[^\\n\\000-\\010\\016-\\037\\177-\\237]*" "\\n". +;; ;; that is, a comment starts with the character `;' and terminates at end +;; ;; of line. Also, it only accepts printable characters (including 8-bit +;; ;; accentuated characters) and tabs. ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -186,17 +206,7 @@ term (cdr term)) (setq seq (cons term seq))) (cons token - (cond - ;; null sequence - ((null seq) - (ebnf-make-empty)) - ;; sequence with only one element - ((= (length seq) 1) - (car seq)) - ;; a real sequence - (t - (ebnf-make-sequence (nreverse seq))) - )))) + (ebnf-token-sequence seq)))) ;;; exception = repeat [ "-" repeat]. @@ -233,15 +243,20 @@ )))) -;;; repeat = [ integer "*" ] term. +;;; repeat = [ integer "*" [ integer ]] term. (defun ebnf-repeat (token) (if (not (eq token 'integer)) (ebnf-term token) - (let ((times ebnf-bnf-lex)) + (let ((times ebnf-bnf-lex) + upper) (or (eq (ebnf-bnf-lex) 'repeat) (error "Missing `*'")) - (ebnf-token-repeat times (ebnf-term (ebnf-bnf-lex)))))) + (setq token (ebnf-bnf-lex)) + (when (eq token 'integer) + (setq upper ebnf-bnf-lex + token (ebnf-bnf-lex))) + (ebnf-token-repeat times (ebnf-term token) upper)))) ;;; term = factor @@ -462,9 +477,9 @@ See documentation for variable `ebnf-bnf-lex'." 'integer) ;; special: ?special? ((eq token 'special) - (setq ebnf-bnf-lex (concat "?" + (setq ebnf-bnf-lex (concat (and ebnf-special-show-delimiter "?") (ebnf-string " ->@-~" ?\? "special") - "?")) + (and ebnf-special-show-delimiter "?"))) 'special) ;; terminal: "string" ((eq token 'terminal) @@ -586,4 +601,5 @@ See documentation for variable `ebnf-bnf-lex'." (provide 'ebnf-bnf) +;;; arch-tag: 3b1834d3-8367-475b-80d5-8e0bbd00ce50 ;;; ebnf-bnf.el ends here diff --git a/lisp/progmodes/ebnf-dtd.el b/lisp/progmodes/ebnf-dtd.el new file mode 100644 index 0000000000..9a99f222cc --- /dev/null +++ b/lisp/progmodes/ebnf-dtd.el @@ -0,0 +1,1349 @@ +;;; ebnf-dtd.el --- parser for DTD (Data Type Description for XML) + +;; Copyright (C) 2004 Free Sofware Foundation, Inc. + +;; Author: Vinicius Jose Latorre +;; Maintainer: Vinicius Jose Latorre +;; Time-stamp: <2004/04/04 21:50:16 vinicius> +;; Keywords: wp, ebnf, PostScript +;; Version: 1.0 + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; +;; This is part of ebnf2ps package. +;; +;; This package defines a parser for DTD (Data Type Description for XML). +;; +;; See ebnf2ps.el for documentation. +;; +;; +;; DTD Syntax +;; ---------- +;; +;; See the URLs: +;; `http://www.w3.org/TR/2004/REC-xml-20040204/' +;; (Extensible Markup Language (XML) 1.0 (Third Edition)) +;; `http://www.w3.org/TR/html40/' +;; (HTML 4.01 Specification) +;; `http://www.w3.org/TR/NOTE-html-970421' +;; (HTML DTD with support for Style Sheets) +;; +;; +;; /* Document */ +;; +;; document ::= prolog element Misc* +;; /* Note that *only* the prolog will be parsed */ +;; +;; +;; /* Characters */ +;; +;; Char ::= #x9 | #xA | #xD +;; | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] +;; /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */ +;; +;; /* NOTE: +;; +;; Document authors are encouraged to avoid "compatibility characters", as +;; defined in section 6.8 of [Unicode] (see also D21 in section 3.6 of +;; [Unicode3]). The characters defined in the following ranges are also +;; discouraged. They are either control characters or permanently undefined +;; Unicode characters: +;; +;; [#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFDDF], +;; [#1FFFE-#x1FFFF], [#2FFFE-#x2FFFF], [#3FFFE-#x3FFFF], +;; [#4FFFE-#x4FFFF], [#5FFFE-#x5FFFF], [#6FFFE-#x6FFFF], +;; [#7FFFE-#x7FFFF], [#8FFFE-#x8FFFF], [#9FFFE-#x9FFFF], +;; [#AFFFE-#xAFFFF], [#BFFFE-#xBFFFF], [#CFFFE-#xCFFFF], +;; [#DFFFE-#xDFFFF], [#EFFFE-#xEFFFF], [#FFFFE-#xFFFFF], +;; [#10FFFE-#x10FFFF]. */ +;; +;; +;; /* White Space */ +;; +;; S ::= (#x20 | #x9 | #xD | #xA)+ +;; +;; +;; /* Names and Tokens */ +;; +;; NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' +;; | CombiningChar | Extender +;; +;; Name ::= (Letter | '_' | ':') (NameChar)* +;; +;; Names ::= Name (#x20 Name)* +;; +;; Nmtoken ::= (NameChar)+ +;; +;; Nmtokens ::= Nmtoken (#x20 Nmtoken)* +;; +;; +;; /* Literals */ +;; +;; EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' +;; | "'" ([^%&'] | PEReference | Reference)* "'" +;; +;; AttValue ::= '"' ([^<&"] | Reference)* '"' +;; | "'" ([^<&'] | Reference)* "'" +;; +;; SystemLiteral ::= ('"' [^"]* '"') +;; | ("'" [^']* "'") +;; +;; PubidLiteral ::= '"' PubidChar* '"' +;; | "'" (PubidChar - "'")* "'" +;; +;; PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] +;; +;; /* NOTE: +;; +;; Although the EntityValue production allows the definition of a general +;; entity consisting of a single explicit < in the literal (e.g., ), it is strongly advised to avoid this practice since any +;; reference to that entity will cause a well-formedness error. */ +;; +;; +;; /* Character Data */ +;; +;; CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) +;; +;; +;; /* Comments */ +;; +;; Comment ::= '' +;; +;; +;; /* Processing Instructions */ +;; +;; PI ::= '' Char*)))? '?>' +;; +;; PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) +;; +;; +;; /* CDATA Sections */ +;; +;; CDSect ::= CDStart CData CDEnd +;; +;; CDStart ::= '' Char*)) +;; +;; CDEnd ::= ']]>' +;; +;; +;; /* Prolog */ +;; +;; prolog ::= XMLDecl? Misc* (doctypedecl Misc*)? +;; +;; XMLDecl ::= '' +;; +;; VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"') +;; +;; Eq ::= S? '=' S? +;; +;; VersionNum ::= '1.0' +;; +;; Misc ::= Comment | PI | S +;; +;; +;; /* Document Type Definition */ +;; +;; doctypedecl ::= '' +;; [VC: Root Element Type] +;; [WFC: External Subset] +;; +;; DeclSep ::= PEReference | S +;; [WFC: PE Between Declarations] +;; +;; intSubset ::= (markupdecl | DeclSep)* +;; +;; markupdecl ::= elementdecl | AttlistDecl | EntityDecl +;; | NotationDecl | PI | Comment +;; [VC: Proper Declaration/PE Nesting] +;; [WFC: PEs in Internal Subset] +;; +;; +;; /* External Subset */ +;; +;; extSubset ::= TextDecl? extSubsetDecl +;; +;; extSubsetDecl ::= ( markupdecl | conditionalSect | DeclSep)* +;; +;; +;; /* Standalone Document Declaration */ +;; +;; SDDecl ::= S 'standalone' Eq +;; (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) +;; [VC: Standalone Document Declaration] +;; +;; +;; /* Element */ +;; +;; element ::= EmptyElemTag | STag content ETag +;; [WFC: Element Type Match] +;; [VC: Element Valid] +;; +;; +;; /* Start-tag */ +;; +;; STag ::= '<' Name (S Attribute)* S? '>' +;; [WFC: Unique Att Spec] +;; +;; Attribute ::= Name Eq AttValue +;; [VC: Attribute Value Type] +;; [WFC: No External Entity References] +;; [WFC: No < in Attribute Values] +;; +;; +;; /* End-tag */ +;; +;; ETag ::= '' +;; +;; +;; /* Content of Elements */ +;; +;; content ::= CharData? +;; ((element | Reference | CDSect | PI | Comment) CharData?)* +;; +;; +;; /* Tags for Empty Elements */ +;; +;; EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' +;; [WFC: Unique Att Spec] +;; +;; +;; /* Element Type Declaration */ +;; +;; elementdecl ::= '' +;; [VC: Unique Element Type Declaration] +;; +;; contentspec ::= 'EMPTY' | 'ANY' | Mixed | children +;; +;; +;; /* Element-content Models */ +;; +;; children ::= (choice | seq) ('?' | '*' | '+')? +;; +;; cp ::= (Name | choice | seq) ('?' | '*' | '+')? +;; +;; choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')' +;; [VC: Proper Group/PE Nesting] +;; +;; seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' +;; [VC: Proper Group/PE Nesting] +;; +;; +;; /* Mixed-content Declaration */ +;; +;; Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' +;; | '(' S? '#PCDATA' S? ')' +;; [VC: Proper Group/PE Nesting] +;; [VC: No Duplicate Types] +;; +;; +;; /* Attribute-list Declaration */ +;; +;; AttlistDecl ::= '' +;; +;; AttDef ::= S Name S AttType S DefaultDecl +;; +;; +;; /* Attribute Types */ +;; +;; AttType ::= StringType | TokenizedType | EnumeratedType +;; +;; StringType ::= 'CDATA' +;; +;; TokenizedType ::= 'ID' [VC: ID] +;; [VC: One ID per Element Type] +;; [VC: ID Attribute Default] +;; | 'IDREF' [VC: IDREF] +;; | 'IDREFS' [VC: IDREF] +;; | 'ENTITY' [VC: Entity Name] +;; | 'ENTITIES' [VC: Entity Name] +;; | 'NMTOKEN' [VC: Name Token] +;; | 'NMTOKENS' [VC: Name Token] +;; +;; +;; /* Enumerated Attribute Types */ +;; +;; EnumeratedType ::= NotationType | Enumeration +;; +;; NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' +;; [VC: Notation Attributes] +;; [VC: One Notation Per Element Type] +;; [VC: No Notation on Empty Element] +;; [VC: No Duplicate Tokens] +;; +;; Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' +;; [VC: Enumeration] +;; [VC: No Duplicate Tokens] +;; +;; +;; /* Attribute Defaults */ +;; +;; DefaultDecl ::= '#REQUIRED' | '#IMPLIED' +;; | (('#FIXED' S)? AttValue) +;; [VC: Required Attribute] +;; [VC: Attribute Default Value Syntactically Correct] +;; [WFC: No < in Attribute Values] +;; [VC: Fixed Attribute Default] +;; +;; +;; /* Conditional Section */ +;; +;; conditionalSect ::= includeSect | ignoreSect +;; +;; includeSect ::= '' +;; [VC: Proper Conditional Section/PE Nesting] +;; +;; ignoreSect ::= '' +;; [VC: Proper Conditional Section/PE Nesting] +;; +;; ignoreSectContents ::= Ignore ('' Ignore)* +;; +;; Ignore ::= Char* - (Char* ('') Char*) +;; +;; +;; /* Character Reference */ +;; +;; CharRef ::= '&#' [0-9]+ ';' +;; | '&#x' [0-9a-fA-F]+ ';' +;; [WFC: Legal Character] +;; +;; +;; /* Entity Reference */ +;; +;; Reference ::= EntityRef | CharRef +;; +;; EntityRef ::= '&' Name ';' +;; [WFC: Entity Declared] +;; [VC: Entity Declared] +;; [WFC: Parsed Entity] +;; [WFC: No Recursion] +;; +;; PEReference ::= '%' Name ';' +;; [VC: Entity Declared] +;; [WFC: No Recursion] +;; [WFC: In DTD] +;; +;; +;; /* Entity Declaration */ +;; +;; EntityDecl ::= GEDecl | PEDecl +;; +;; GEDecl ::= '' +;; +;; PEDecl ::= '' +;; +;; EntityDef ::= EntityValue | (ExternalID NDataDecl?) +;; +;; PEDef ::= EntityValue | ExternalID +;; +;; +;; /* External Entity Declaration */ +;; +;; ExternalID ::= 'SYSTEM' S SystemLiteral +;; | 'PUBLIC' S PubidLiteral S SystemLiteral +;; +;; NDataDecl ::= S 'NDATA' S Name +;; [VC: Notation Declared] +;; +;; +;; /* Text Declaration */ +;; +;; TextDecl ::= '' +;; +;; +;; /* Well-Formed External Parsed Entity */ +;; +;; extParsedEnt ::= TextDecl? content +;; +;; +;; /* Encoding Declaration */ +;; +;; EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" ) +;; +;; EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* +;; /* Encoding name contains only Latin characters */ +;; +;; +;; /* Notation Declarations */ +;; +;; NotationDecl ::= '' +;; [VC: Unique Notation Name] +;; +;; PublicID ::= 'PUBLIC' S PubidLiteral +;; +;; +;; /* Characters */ +;; +;; Letter ::= BaseChar | Ideographic +;; +;; BaseChar ::= [#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] +;; | [#x00D8-#x00F6] | [#x00F8-#x00FF] | [#x0100-#x0131] +;; | [#x0134-#x013E] | [#x0141-#x0148] | [#x014A-#x017E] +;; | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] +;; | [#x01FA-#x0217] | [#x0250-#x02A8] | [#x02BB-#x02C1] +;; | #x0386 | [#x0388-#x038A] | #x038C +;; | [#x038E-#x03A1] | [#x03A3-#x03CE] | [#x03D0-#x03D6] +;; | #x03DA | #x03DC | #x03DE +;; | #x03E0 | [#x03E2-#x03F3] | [#x0401-#x040C] +;; | [#x040E-#x044F] | [#x0451-#x045C] | [#x045E-#x0481] +;; | [#x0490-#x04C4] | [#x04C7-#x04C8] | [#x04CB-#x04CC] +;; | [#x04D0-#x04EB] | [#x04EE-#x04F5] | [#x04F8-#x04F9] +;; | [#x0531-#x0556] | #x0559 | [#x0561-#x0586] +;; | [#x05D0-#x05EA] | [#x05F0-#x05F2] | [#x0621-#x063A] +;; | [#x0641-#x064A] | [#x0671-#x06B7] | [#x06BA-#x06BE] +;; | [#x06C0-#x06CE] | [#x06D0-#x06D3] | #x06D5 +;; | [#x06E5-#x06E6] | [#x0905-#x0939] | #x093D +;; | [#x0958-#x0961] | [#x0985-#x098C] | [#x098F-#x0990] +;; | [#x0993-#x09A8] | [#x09AA-#x09B0] | #x09B2 +;; | [#x09B6-#x09B9] | [#x09DC-#x09DD] | [#x09DF-#x09E1] +;; | [#x09F0-#x09F1] | [#x0A05-#x0A0A] | [#x0A0F-#x0A10] +;; | [#x0A13-#x0A28] | [#x0A2A-#x0A30] | [#x0A32-#x0A33] +;; | [#x0A35-#x0A36] | [#x0A38-#x0A39] | [#x0A59-#x0A5C] +;; | #x0A5E | [#x0A72-#x0A74] | [#x0A85-#x0A8B] +;; | #x0A8D | [#x0A8F-#x0A91] | [#x0A93-#x0AA8] +;; | [#x0AAA-#x0AB0] | [#x0AB2-#x0AB3] | [#x0AB5-#x0AB9] +;; | #x0ABD | #x0AE0 | [#x0B05-#x0B0C] +;; | [#x0B0F-#x0B10] | [#x0B13-#x0B28] | [#x0B2A-#x0B30] +;; | [#x0B32-#x0B33] | [#x0B36-#x0B39] | #x0B3D +;; | [#x0B5C-#x0B5D] | [#x0B5F-#x0B61] | [#x0B85-#x0B8A] +;; | [#x0B8E-#x0B90] | [#x0B92-#x0B95] | [#x0B99-#x0B9A] +;; | #x0B9C | [#x0B9E-#x0B9F] | [#x0BA3-#x0BA4] +;; | [#x0BA8-#x0BAA] | [#x0BAE-#x0BB5] | [#x0BB7-#x0BB9] +;; | [#x0C05-#x0C0C] | [#x0C0E-#x0C10] | [#x0C12-#x0C28] +;; | [#x0C2A-#x0C33] | [#x0C35-#x0C39] | [#x0C60-#x0C61] +;; | [#x0C85-#x0C8C] | [#x0C8E-#x0C90] | [#x0C92-#x0CA8] +;; | [#x0CAA-#x0CB3] | [#x0CB5-#x0CB9] | #x0CDE +;; | [#x0CE0-#x0CE1] | [#x0D05-#x0D0C] | [#x0D0E-#x0D10] +;; | [#x0D12-#x0D28] | [#x0D2A-#x0D39] | [#x0D60-#x0D61] +;; | [#x0E01-#x0E2E] | #x0E30 | [#x0E32-#x0E33] +;; | [#x0E40-#x0E45] | [#x0E81-#x0E82] | #x0E84 +;; | [#x0E87-#x0E88] | #x0E8A | #x0E8D +;; | [#x0E94-#x0E97] | [#x0E99-#x0E9F] | [#x0EA1-#x0EA3] +;; | #x0EA5 | #x0EA7 | [#x0EAA-#x0EAB] +;; | [#x0EAD-#x0EAE] | #x0EB0 | [#x0EB2-#x0EB3] +;; | #x0EBD | [#x0EC0-#x0EC4] | [#x0F40-#x0F47] +;; | [#x0F49-#x0F69] | [#x10A0-#x10C5] | [#x10D0-#x10F6] +;; | #x1100 | [#x1102-#x1103] | [#x1105-#x1107] +;; | #x1109 | [#x110B-#x110C] | [#x110E-#x1112] +;; | #x113C | #x113E | #x1140 +;; | #x114C | #x114E | #x1150 +;; | [#x1154-#x1155] | #x1159 | [#x115F-#x1161] +;; | #x1163 | #x1165 | #x1167 +;; | #x1169 | [#x116D-#x116E] | [#x1172-#x1173] +;; | #x1175 | #x119E | #x11A8 +;; | #x11AB | [#x11AE-#x11AF] | [#x11B7-#x11B8] +;; | #x11BA | [#x11BC-#x11C2] | #x11EB +;; | #x11F0 | #x11F9 | [#x1E00-#x1E9B] +;; | [#x1EA0-#x1EF9] | [#x1F00-#x1F15] | [#x1F18-#x1F1D] +;; | [#x1F20-#x1F45] | [#x1F48-#x1F4D] | [#x1F50-#x1F57] +;; | #x1F59 | #x1F5B | #x1F5D +;; | [#x1F5F-#x1F7D] | [#x1F80-#x1FB4] | [#x1FB6-#x1FBC] +;; | #x1FBE | [#x1FC2-#x1FC4] | [#x1FC6-#x1FCC] +;; | [#x1FD0-#x1FD3] | [#x1FD6-#x1FDB] | [#x1FE0-#x1FEC] +;; | [#x1FF2-#x1FF4] | [#x1FF6-#x1FFC] | #x2126 +;; | [#x212A-#x212B] | #x212E | [#x2180-#x2182] +;; | [#x3041-#x3094] | [#x30A1-#x30FA] | [#x3105-#x312C] +;; | [#xAC00-#xD7A3] +;; +;; Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029] +;; +;; CombiningChar ::= [#x0300-#x0345] | [#x0360-#x0361] | [#x0483-#x0486] +;; | [#x0591-#x05A1] | [#x05A3-#x05B9] | [#x05BB-#x05BD] +;; | #x05BF | [#x05C1-#x05C2] | #x05C4 +;; | [#x064B-#x0652] | #x0670 | [#x06D6-#x06DC] +;; | [#x06DD-#x06DF] | [#x06E0-#x06E4] | [#x06E7-#x06E8] +;; | [#x06EA-#x06ED] | [#x0901-#x0903] | #x093C +;; | [#x093E-#x094C] | #x094D | [#x0951-#x0954] +;; | [#x0962-#x0963] | [#x0981-#x0983] | #x09BC +;; | #x09BE | #x09BF | [#x09C0-#x09C4] +;; | [#x09C7-#x09C8] | [#x09CB-#x09CD] | #x09D7 +;; | [#x09E2-#x09E3] | #x0A02 | #x0A3C +;; | #x0A3E | #x0A3F | [#x0A40-#x0A42] +;; | [#x0A47-#x0A48] | [#x0A4B-#x0A4D] | [#x0A70-#x0A71] +;; | [#x0A81-#x0A83] | #x0ABC | [#x0ABE-#x0AC5] +;; | [#x0AC7-#x0AC9] | [#x0ACB-#x0ACD] | [#x0B01-#x0B03] +;; | #x0B3C | [#x0B3E-#x0B43] | [#x0B47-#x0B48] +;; | [#x0B4B-#x0B4D] | [#x0B56-#x0B57] | [#x0B82-#x0B83] +;; | [#x0BBE-#x0BC2] | [#x0BC6-#x0BC8] | [#x0BCA-#x0BCD] +;; | #x0BD7 | [#x0C01-#x0C03] | [#x0C3E-#x0C44] +;; | [#x0C46-#x0C48] | [#x0C4A-#x0C4D] | [#x0C55-#x0C56] +;; | [#x0C82-#x0C83] | [#x0CBE-#x0CC4] | [#x0CC6-#x0CC8] +;; | [#x0CCA-#x0CCD] | [#x0CD5-#x0CD6] | [#x0D02-#x0D03] +;; | [#x0D3E-#x0D43] | [#x0D46-#x0D48] | [#x0D4A-#x0D4D] +;; | #x0D57 | #x0E31 | [#x0E34-#x0E3A] +;; | [#x0E47-#x0E4E] | #x0EB1 | [#x0EB4-#x0EB9] +;; | [#x0EBB-#x0EBC] | [#x0EC8-#x0ECD] | [#x0F18-#x0F19] +;; | #x0F35 | #x0F37 | #x0F39 +;; | #x0F3E | #x0F3F | [#x0F71-#x0F84] +;; | [#x0F86-#x0F8B] | [#x0F90-#x0F95] | #x0F97 +;; | [#x0F99-#x0FAD] | [#x0FB1-#x0FB7] | #x0FB9 +;; | [#x20D0-#x20DC] | #x20E1 | [#x302A-#x302F] +;; | #x3099 | #x309A +;; +;; Digit ::= [#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] +;; | [#x0966-#x096F] | [#x09E6-#x09EF] | [#x0A66-#x0A6F] +;; | [#x0AE6-#x0AEF] | [#x0B66-#x0B6F] | [#x0BE7-#x0BEF] +;; | [#x0C66-#x0C6F] | [#x0CE6-#x0CEF] | [#x0D66-#x0D6F] +;; | [#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29] +;; +;; Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | #x0E46 | #x0EC6 +;; | #x3005 | [#x3031-#x3035] | [#x309D-#x309E] | [#x30FC-#x30FE] +;; +;; +;; NOTES +;; ----- +;; +;; At moment, only the ` +;; +;; +;; +;; +;; +;; +;; +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;; Code: + + +(require 'ebnf-otz) + + +(defvar ebnf-dtd-lex nil + "Value returned by `ebnf-dtd-lex' function.") + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Syntactic analyzer + + +;;; document ::= prolog element Misc* +;;; /* Note that *only* the prolog will be parsed */ + +(defun ebnf-dtd-parser (start) + "DTD parser." + (let ((total (+ (- ebnf-limit start) 1)) + (bias (1- start)) + (origin (point)) + rule-list token rule the-end) + (goto-char start) + (setq token (ebnf-dtd-lex)) + (and (eq token 'end-of-input) + (error "Empty DTD file")) + (setq token (ebnf-dtd-prolog token)) + (unless (eq (car token) 'end-prolog) + (setq the-end (cdr token) + token (car token)) + (while (not (eq token the-end)) + (ebnf-message-float + "Parsing...%s%%" + (/ (* (- (point) bias) 100.0) total)) + (setq token (ebnf-dtd-intsubset token) + rule (cdr token) + token (car token)) + (or (null rule) + (ebnf-add-empty-rule-list rule) + (setq rule-list (cons rule rule-list)))) + (or (eq the-end 'end-of-input) + (eq (ebnf-dtd-lex) 'end-decl) + (error "Missing end of DOCTYPE")) + ;; adjust message, 'cause *only* prolog will be parsed + (ebnf-message-float "Parsing...%s%%" 100.0)) + (goto-char origin) + rule-list)) + + +;;; prolog ::= XMLDecl? Misc* (doctypedecl Misc*)? +;;; +;;; XMLDecl ::= '' +;;; +;;; VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"') +;;; +;;; Eq ::= S? '=' S? +;;; +;;; VersionNum ::= '1.0' +;;; +;;; Misc ::= Comment | PI | S +;;; +;;; EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" ) +;;; +;;; EncName ::= [A-Za-z] ([-A-Za-z0-9._])* +;;; /* Encoding name contains only Latin characters */ +;;; +;;; SDDecl ::= S 'standalone' Eq +;;; (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"')) +;;; +;;; doctypedecl ::= '' + + +(defun ebnf-dtd-prolog (token) + (when (and (eq token 'begin-pi) (string= ebnf-dtd-lex "xml")) + ;; version = "1.0" + (setq token (ebnf-dtd-attribute (ebnf-dtd-lex) 'version-attr + "^1\\.0$" "XML version")) + ;; ( encoding = "encoding name" )? + (setq token (ebnf-dtd-attribute-optional + token 'encoding-attr + "^[A-Za-z][-A-Za-z0-9._]*$" "XML encoding")) + ;; ( standalone = ( "yes" | "no" ) )? + (setq token (ebnf-dtd-attribute-optional + token 'standalone-attr + "^yes|no$" "XML standalone")) + (or (eq token 'end-pi) + (error "Missing end of XML processing instruction"))) + ;; processing instructions + (setq token (ebnf-dtd-pi (ebnf-dtd-lex))) + (cond + ;; DOCTYPE + ((eq token 'doctype-decl) + (or (eq (ebnf-dtd-lex) 'name) + (error "Document type name is missing")) + (cons (if (eq (ebnf-dtd-externalid) 'begin-subset) + (ebnf-dtd-lex) + 'end-prolog) + 'end-subset)) + ((memq token '(element-decl attlist-decl entity-decl notation-decl)) + (cons token 'end-of-input)) + (t + '(end-prolog . end-subset)) + )) + + +(defun ebnf-dtd-attribute (token attr match attr-name) + (or (eq token attr) + (error "%s attribute is missing" attr-name)) + (ebnf-dtd-attribute-optional token attr match attr-name)) + + +(defun ebnf-dtd-attribute-optional (token attr match attr-name) + (when (eq token attr) + (or (and (eq (ebnf-dtd-lex) 'equal) + (eq (ebnf-dtd-lex) 'string) + (string-match match ebnf-dtd-lex)) + (error "XML %s attribute is invalid" attr-name)) + (setq token (ebnf-dtd-lex))) + token) + + +;;; ExternalID ::= 'SYSTEM' S SystemLiteral +;;; | 'PUBLIC' S PubidLiteral S SystemLiteral + + +(defun ebnf-dtd-externalid (&optional token) + (let ((must-have token)) + (or token (setq token (ebnf-dtd-lex))) + (cond ((eq token 'system) + (ebnf-dtd-systemliteral)) + ((eq token 'public) + (ebnf-dtd-pubidliteral) + (ebnf-dtd-systemliteral)) + (must-have + (error "Missing `SYSTEM' or `PUBLIC' in external id")) + (t + token)))) + + +;;; SystemLiteral ::= ('"' [^"]* '"') +;;; | ("'" [^']* "'") + + +(defun ebnf-dtd-systemliteral () + (or (eq (ebnf-dtd-lex) 'string) + (error "System identifier is invalid")) + (ebnf-dtd-lex)) + + +;;; PubidLiteral ::= '"' PubidChar* '"' +;;; | "'" (PubidChar - "'")* "'" +;;; +;;; PubidChar ::= [-'()+,./:=?;!*#@$_%\n\r a-zA-Z0-9] + + +(defun ebnf-dtd-pubidliteral () + (or (and (eq (ebnf-dtd-lex) 'string) + (string-match "^[-'()+,./:=?;!*#@$_%\n\r a-zA-Z0-9]*$" + ebnf-dtd-lex)) + (error "Public identifier is invalid"))) + + +;;; PI ::= '' Char*)))? '?>' +;;; +;;; PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) + + +(defun ebnf-dtd-pi (token) + (while (eq token 'begin-pi) + (and (string-match "^[xX][mM][lL]$" ebnf-dtd-lex) + (error "Processing instruction name can not be `XML'")) + (while (not (eq (ebnf-dtd-lex) 'end-pi))) + (setq token (ebnf-dtd-lex))) + token) + + +;;; doctypedecl ::= '' +;;; +;;; intSubset ::= (markupdecl | DeclSep)* +;;; +;;; DeclSep ::= PEReference | S +;;; +;;; markupdecl ::= elementdecl | AttlistDecl | EntityDecl +;;; | NotationDecl | PI | Comment + + +(defun ebnf-dtd-intsubset (token) + ;; PI - Processing Instruction + (and (eq token 'begin-pi) + (setq token (ebnf-dtd-pi token))) + (cond + ((memq token '(end-subset end-of-input)) + (cons token nil)) + ((eq token 'pe-ref) + (cons (ebnf-dtd-lex) nil)) ; annotation + ((eq token 'element-decl) + (ebnf-dtd-elementdecl)) ; rule + ((eq token 'attlist-decl) + (ebnf-dtd-attlistdecl)) ; annotation + ((eq token 'entity-decl) + (ebnf-dtd-entitydecl)) ; annotation + ((eq token 'notation-decl) + (ebnf-dtd-notationdecl)) ; annotation + (t + (error "Invalid DOCTYPE element")) + )) + + +;;; elementdecl ::= '' +;;; +;;; contentspec ::= 'EMPTY' | 'ANY' | Mixed | children +;;; +;;; Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' +;;; | '(' S? '#PCDATA' S? ')' +;;; +;;; children ::= (choice | seq) ('?' | '*' | '+')? +;;; +;;; choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')' +;;; +;;; seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' +;;; +;;; cp ::= (Name | choice | seq) ('?' | '*' | '+')? + + +(defun ebnf-dtd-elementdecl () + (let ((action ebnf-action) + name token body) + (setq ebnf-action nil) + (or (eq (ebnf-dtd-lex) 'name) + (error "Invalid ELEMENT name")) + (setq name ebnf-dtd-lex + token (ebnf-dtd-lex) + body (cond ((memq token '(empty any)) + (let ((term (ebnf-make-terminal ebnf-dtd-lex))) + (cons (ebnf-dtd-lex) term))) + ((eq token 'begin-group) + (setq token (ebnf-dtd-lex)) + (if (eq token 'pcdata) + (ebnf-dtd-mixed) + (ebnf-dtd-children token))) + (t + (error "Invalid ELEMENT content")) + )) + (or (eq (car body) 'end-decl) + (error "Missing `>' in ELEMENT declaration")) + (ebnf-eps-add-production name) + (cons (ebnf-dtd-lex) + (ebnf-make-production name (cdr body) action)))) + + +;;; Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' +;;; | '(' S? '#PCDATA' S? ')' + + +(defun ebnf-dtd-mixed () + (let* ((alt (cons (ebnf-make-terminal ebnf-dtd-lex) nil)) + (token (ebnf-dtd-lex)) + (has-alternative (eq token 'alternative))) + (while (eq token 'alternative) + (or (eq (ebnf-dtd-lex) 'name) + (error "Invalid name")) + (setq alt (cons ebnf-dtd-lex alt) + token (ebnf-dtd-lex))) + (or (eq token 'end-group) + (error "Missing `)'")) + (and has-alternative + (or (eq (ebnf-dtd-lex) 'zero-or-more) + (error "Missing `*'"))) + (ebnf-token-alternative alt (cons (ebnf-dtd-lex) nil)))) + + +;;; children ::= (choice | seq) ('?' | '*' | '+')? + + +(defun ebnf-dtd-children (token) + (ebnf-dtd-operators (ebnf-dtd-choice-seq token))) + + +;;; choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')' +;;; +;;; seq ::= '(' S? cp ( S? ',' S? cp )* S? ')' + + +(defun ebnf-dtd-choice-seq (token) + (setq token (ebnf-dtd-cp token)) + (let (elist) + (cond + ;; choice + ((eq (car token) 'alternative) + (while (eq (car token) 'alternative) + (setq elist (cons (cdr token) elist) + token (ebnf-dtd-cp (ebnf-dtd-lex)))) + (setq elist (ebnf-token-alternative elist token))) + ;; seq + ((eq (car token) 'comma) + (while (eq (car token) 'comma) + (setq elist (cons (cdr token) elist) + token (ebnf-dtd-cp (ebnf-dtd-lex)))) + (setq elist (ebnf-token-sequence (cons (cdr token) elist)))) + ;; only one element + (t + (setq elist (cdr token)))) + (or (eq (car token) 'end-group) + (error "Missing `)' in ELEMENT content")) + elist)) + + +;;; cp ::= (Name | choice | seq) ('?' | '*' | '+')? + + +(defun ebnf-dtd-cp (token) + (ebnf-dtd-operators (cond ((eq token 'name) + (ebnf-make-terminal ebnf-dtd-lex)) + ((eq token 'begin-group) + (ebnf-dtd-choice-seq (ebnf-dtd-lex))) + (t + (error "Invalid element")) + ))) + + +;;; elm ('?' | '*' | '+')? + + +(defun ebnf-dtd-operators (elm) + (let ((token (ebnf-dtd-lex))) + (cond ((eq token 'optional) ; ? - optional + (cons (ebnf-dtd-lex) (ebnf-token-optional elm))) + ((eq token 'zero-or-more) ; * - zero or more + (cons (ebnf-dtd-lex) (ebnf-make-zero-or-more elm))) + ((eq token 'one-or-more) ; + - one or more + (cons (ebnf-dtd-lex) (ebnf-make-one-or-more elm))) + (t ; only element + (cons token elm)) + ))) + + +;;; AttlistDecl ::= '' +;;; +;;; AttDef ::= S Name S AttType S DefaultDecl +;;; +;;; AttType ::= StringType | TokenizedType | EnumeratedType +;;; +;;; StringType ::= 'CDATA' +;;; +;;; TokenizedType ::= 'ID' +;;; | 'IDREF' +;;; | 'IDREFS' +;;; | 'ENTITY' +;;; | 'ENTITIES' +;;; | 'NMTOKEN' +;;; | 'NMTOKENS' +;;; +;;; EnumeratedType ::= NotationType | Enumeration +;;; +;;; NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' +;;; +;;; Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' +;;; +;;; DefaultDecl ::= '#REQUIRED' +;;; | '#IMPLIED' +;;; | (('#FIXED' S)? AttValue) +;;; +;;; +;;; AttValue ::= '"' ([^<&"] | Reference)* '"' +;;; | "'" ([^<&'] | Reference)* "'" +;;; +;;; Reference ::= EntityRef | CharRef +;;; +;;; EntityRef ::= '&' Name ';' +;;; +;;; CharRef ::= '&#' [0-9]+ ';' +;;; | '&#x' [0-9a-fA-F]+ ';' + +;;; "^\\(&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[0-9a-fA-F]+\\|[0-9]+\\)\\);\\|[^<&]\\)*$" + + +(defun ebnf-dtd-attlistdecl () + (or (eq (ebnf-dtd-lex) 'name) + (error "Invalid ATTLIST name")) + (let (token) + (while (eq (setq token (ebnf-dtd-lex)) 'name) + ;; type + (setq token (ebnf-dtd-lex)) + (cond + ((eq token 'notation) + (or (eq (ebnf-dtd-lex) 'begin-group) + (error "Missing `(' in NOTATION type in ATTLIST declaration")) + (ebnf-dtd-namelist "NOTATION" '(name))) + ((eq token 'begin-group) + (ebnf-dtd-namelist "enumeration" '(name name-char))) + ((memq token + '(cdata id idref idrefs entity entities nmtoken nmtokens))) + (t + (error "Invalid type in ATTLIST declaration"))) + ;; default value + (setq token (ebnf-dtd-lex)) + (unless (memq token '(required implied)) + (and (eq token 'fixed) + (setq token (ebnf-dtd-lex))) + (or (and (eq token 'string) + (string-match + "^\\(&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[0-9a-fA-F]+\\|[0-9]+\\)\\);\\|[^<&]\\)*$" + ebnf-dtd-lex)) + (error "Invalid default value in ATTLIST declaration")))) + (or (eq token 'end-decl) + (error "Missing `>' in end of ATTLIST")) + (cons (ebnf-dtd-lex) nil))) + + +(defun ebnf-dtd-namelist (type name-list) + (let (token) + (while (progn + (or (memq (ebnf-dtd-lex) name-list) + (error "Invalid name in %s type in ATTLIST declaration" type)) + (eq (setq token (ebnf-dtd-lex)) 'alternative))) + (or (eq token 'end-group) + (error "Missing `)' in %s type in ATTLIST declaration" type)))) + + +;;; EntityDecl ::= GEDecl | PEDecl +;;; +;;; GEDecl ::= '' +;;; +;;; PEDecl ::= '' +;;; +;;; EntityDef ::= EntityValue | (ExternalID NDataDecl?) +;;; +;;; PEDef ::= EntityValue | ExternalID +;;; +;;; NDataDecl ::= S 'NDATA' S Name +;;; +;;; +;;; EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' +;;; | "'" ([^%&'] | PEReference | Reference)* "'" +;;; +;;; PEReference ::= '%' Name ';' +;;; +;;; Reference ::= EntityRef | CharRef +;;; +;;; EntityRef ::= '&' Name ';' +;;; +;;; CharRef ::= '&#' [0-9]+ ';' +;;; | '&#x' [0-9a-fA-F]+ ';' + +;;; "^\\(%[A-Za-z_:][-A-Za-z0-9._:]*;\\|&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[0-9a-fA-F]+\\|[0-9]+\\)\\);\\|[^%&]\\)*$" + + +(defun ebnf-dtd-entitydecl () + (let* ((token (ebnf-dtd-lex)) + (pedecl (eq token 'percent))) + (and pedecl + (setq token (ebnf-dtd-lex))) + (or (eq token 'name) + (error "Invalid name of ENTITY")) + (setq token (ebnf-dtd-lex)) + (if (eq token 'string) + (if (string-match + "^\\(%[A-Za-z_:][-A-Za-z0-9._:]*;\\|&\\([A-Za-z_:][-A-Za-z0-9._:]*\\|#\\(x[0-9a-fA-F]+\\|[0-9]+\\)\\);\\|[^%&]\\)*$" + ebnf-dtd-lex) + (setq token (ebnf-dtd-lex)) + (error "Invalid ENTITY definition")) + (setq token (ebnf-dtd-externalid token)) + (when (and (not pedecl) (eq token 'ndata)) + (or (eq (ebnf-dtd-lex) 'name) + (error "Invalid NDATA name")) + (setq token (ebnf-dtd-lex)))) + (or (eq token 'end-decl) + (error "Missing `>' in end of ENTITY")) + (cons (ebnf-dtd-lex) nil))) + + +;;; NotationDecl ::= '' +;;; +;;; PublicID ::= 'PUBLIC' S PubidLiteral + + +(defun ebnf-dtd-notationdecl () + (or (eq (ebnf-dtd-lex) 'name) + (error "Invalid name NOTATION")) + (or (eq (ebnf-dtd-externalid-or-publicid) 'end-decl) + (error "Missing `>' in end of NOTATION")) + (cons (ebnf-dtd-lex) nil)) + + +;;; ExternalID ::= 'SYSTEM' S SystemLiteral +;;; | 'PUBLIC' S PubidLiteral S SystemLiteral +;;; +;;; PublicID ::= 'PUBLIC' S PubidLiteral + + +(defun ebnf-dtd-externalid-or-publicid () + (let ((token (ebnf-dtd-lex))) + (cond ((eq token 'system) + (ebnf-dtd-systemliteral)) + ((eq token 'public) + (ebnf-dtd-pubidliteral) + (and (eq (setq token (ebnf-dtd-lex)) 'string) + (setq token (ebnf-dtd-lex))) + token) + (t + (error "Missing `SYSTEM' or `PUBLIC'"))))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Lexical analyzer + + +(defconst ebnf-dtd-token-table (make-vector 256 'error) + "Vector used to map characters to a lexical token.") + + +(defun ebnf-dtd-initialize () + "Initialize EBNF token table." + ;; control character & control 8-bit character are set to `error' + (let ((char ?\060)) + ;; digits: 0-9 + (while (< char ?\072) + (aset ebnf-dtd-token-table char 'name-char) + (setq char (1+ char))) + ;; printable character: A-Z + (setq char ?\101) + (while (< char ?\133) + (aset ebnf-dtd-token-table char 'name) + (setq char (1+ char))) + ;; printable character: a-z + (setq char ?\141) + (while (< char ?\173) + (aset ebnf-dtd-token-table char 'name) + (setq char (1+ char))) + ;; European 8-bit accentuated characters: + (setq char ?\240) + (while (< char ?\400) + (aset ebnf-dtd-token-table char 'name) + (setq char (1+ char))) + ;; Override name characters: + (aset ebnf-dtd-token-table ?_ 'name) + (aset ebnf-dtd-token-table ?: 'name) + (aset ebnf-dtd-token-table ?. 'name-char) + (aset ebnf-dtd-token-table ?- 'name-char) + ;; Override space characters: + (aset ebnf-dtd-token-table ?\n 'space) ; [NL] linefeed + (aset ebnf-dtd-token-table ?\r 'space) ; [CR] carriage return + (aset ebnf-dtd-token-table ?\t 'space) ; [HT] horizontal tab + (aset ebnf-dtd-token-table ?\ 'space) ; [SP] space + ;; Override other lexical characters: + (aset ebnf-dtd-token-table ?= 'equal) + (aset ebnf-dtd-token-table ?, 'comma) + (aset ebnf-dtd-token-table ?* 'zero-or-more) + (aset ebnf-dtd-token-table ?+ 'one-or-more) + (aset ebnf-dtd-token-table ?| 'alternative) + (aset ebnf-dtd-token-table ?% 'percent) + (aset ebnf-dtd-token-table ?& 'ampersand) + (aset ebnf-dtd-token-table ?# 'hash) + (aset ebnf-dtd-token-table ?\? 'interrogation) + (aset ebnf-dtd-token-table ?\" 'double-quote) + (aset ebnf-dtd-token-table ?\' 'single-quote) + (aset ebnf-dtd-token-table ?< 'less-than) + (aset ebnf-dtd-token-table ?> 'end-decl) + (aset ebnf-dtd-token-table ?\( 'begin-group) + (aset ebnf-dtd-token-table ?\) 'end-group) + (aset ebnf-dtd-token-table ?\[ 'begin-subset) + (aset ebnf-dtd-token-table ?\] 'end-subset))) + + +;; replace the range "\240-\377" (see `ebnf-range-regexp'). +(defconst ebnf-dtd-name-chars + (ebnf-range-regexp "-._:0-9A-Za-z" ?\240 ?\377)) + + +(defconst ebnf-dtd-decl-alist + '(("ATTLIST" . attlist-decl) + ("DOCTYPE" . doctype-decl) + ("ELEMENT" . element-decl) + ("ENTITY" . entity-decl) + ("NOTATION" . notation-decl))) + + +(defconst ebnf-dtd-element-alist + '(("#FIXED" . fixed) + ("#IMPLIED" . implied) + ("#PCDATA" . pcdata) + ("#REQUIRED" . required))) + + +(defconst ebnf-dtd-name-alist + '(("ANY" . any) + ("CDATA" . cdata) + ("EMPTY" . empty) + ("ENTITIES" . entities) + ("ENTITY" . entity) + ("ID" . id) + ("IDREF" . idref) + ("IDREFS" . idrefs) + ("NDATA" . ndata) + ("NMTOKEN" . nmtoken) + ("NMTOKENS" . nmtokens) + ("NOTATION" . notation) + ("PUBLIC" . public) + ("SYSTEM" . system) + ("encoding" . encoding-attr) + ("standalone" . standalone-attr) + ("version" . version-attr))) + + +(defun ebnf-dtd-lex () + "Lexical analyser for DTD. + +Return a lexical token. + +See documentation for variable `ebnf-dtd-lex'." + (if (>= (point) ebnf-limit) + 'end-of-input + (let (token) + ;; skip spaces and comments + (while (if (> (following-char) 255) + (progn + (setq token 'error) + nil) + (setq token (aref ebnf-dtd-token-table (following-char))) + (cond + ((eq token 'space) + (skip-chars-forward " \n\r\t" ebnf-limit) + (< (point) ebnf-limit)) + ((and (eq token 'less-than) + (looking-at "")))) + (skip-chars-forward "-" ebnf-limit)) + ;; check for a valid end of comment + (cond ((>= (point) ebnf-limit) + nil) + ((looking-at "-->") + (forward-char 3) + t) + (t + (error "Illegal character")) + )) + + +(defun ebnf-dtd-eps-filename () + (forward-char) + (let (fname) + (while (progn + (setq fname + (concat fname + (ebnf-buffer-substring ebnf-dtd-filename-chars))) + (and (< (point) ebnf-limit) + (= (following-char) ?-) ; may be \n, \t, \r + (not (looking-at "-->")))) + (setq fname (concat fname (ebnf-buffer-substring "-")))) + fname)) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(provide 'ebnf-dtd) + +;;; arch-tag: c21bb640-135f-4afa-8712-fa11d86301c4 +;;; ebnf-dtd.el ends here diff --git a/lisp/progmodes/ebnf-ebx.el b/lisp/progmodes/ebnf-ebx.el new file mode 100644 index 0000000000..d7dfa7af89 --- /dev/null +++ b/lisp/progmodes/ebnf-ebx.el @@ -0,0 +1,668 @@ +;;; ebnf-ebx.el --- parser for EBNF used to specify XML (EBNFX) + +;; Copyright (C) 2004 Free Sofware Foundation, Inc. + +;; Author: Vinicius Jose Latorre +;; Maintainer: Vinicius Jose Latorre +;; Time-stamp: <2004/04/03 16:45:34 vinicius> +;; Keywords: wp, ebnf, PostScript +;; Version: 1.1 + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; +;; This is part of ebnf2ps package. +;; +;; This package defines a parser for EBNF used to specify XML (EBNFX). +;; +;; See ebnf2ps.el for documentation. +;; +;; +;; EBNFX Syntax +;; ------------ +;; +;; See the URL: +;; `http://www.w3.org/TR/2004/REC-xml-20040204/#sec-notation' +;; (Extensible Markup Language (XML) 1.0 (Third Edition)) +;; +;; +;; rule ::= symbol '::=' expression +;; /* rules are separated by at least one blank line. */ +;; +;; expression ::= concatenation ('|' concatenation)* +;; +;; concatenation ::= exception* +;; +;; exception ::= term ('-' term)? +;; +;; term ::= factor ('*' | '+' | '?')? +;; +;; factor ::= hex-char+ +;; | '[' '^'? ( char ( '-' char )? )+ ']' +;; | '"' 'string' '"' +;; | "'" "string" "'" +;; | '(' expression ')' +;; | symbol +;; +;; symbol ::= 'upper or lower case letter' +;; ('upper or lower case letter' | '-' | '_')* +;; /* upper and lower 8-bit accentuated characters are included */ +;; +;; hex-char ::= '#x' [0-9A-Fa-f]+ +;; +;; char ::= hex-char | 'any character except control characters' +;; /* 8-bit accentuated characters are included */ +;; +;; any-char ::= char | 'newline' | 'tab' +;; +;; ignore ::= '[' ('wfc' | 'WFC' | 'vc' | 'VC') ':' ( any-char - ']' )* ']' +;; +;; comment ::= '/*' ( any-char - '*/' ) '*/' +;; +;; +;; Below is the Notation section extracted from the URL cited above. +;; +;; 6 Notation +;; +;; The formal grammar of XML is given in this specification using a simple +;; Extended Backus-Naur Form (EBNF) notation. Each rule in the grammar defines +;; one symbol, in the form +;; +;; symbol ::= expression +;; +;; Symbols are written with an initial capital letter if they are the start +;; symbol of a regular language, otherwise with an initial lowercase letter. +;; Literal strings are quoted. +;; +;; Within the expression on the right-hand side of a rule, the following +;; expressions are used to match strings of one or more characters: +;; +;; #xN +;; +;; where N is a hexadecimal integer, the expression matches the character +;; whose number (code point) in ISO/IEC 10646 is N. The number of leading +;; zeros in the #xN form is insignificant. +;; +;; [a-zA-Z], [#xN-#xN] +;; +;; matches any Char with a value in the range(s) indicated (inclusive). +;; +;; [abc], [#xN#xN#xN] +;; +;; matches any Char with a value among the characters enumerated. +;; Enumerations and ranges can be mixed in one set of brackets. +;; +;; [^a-z], [^#xN-#xN] +;; +;; matches any Char with a value outside the range indicated. +;; +;; [^abc], [^#xN#xN#xN] +;; +;; matches any Char with a value not among the characters given. +;; Enumerations and ranges of forbidden values can be mixed in one set of +;; brackets. +;; +;; "string" +;; +;; matches a literal string matching that given inside the double quotes. +;; +;; 'string' +;; +;; matches a literal string matching that given inside the single quotes. +;; +;; These symbols may be combined to match more complex patterns as follows, +;; where A and B represent simple expressions: +;; +;; (expression) +;; +;; expression is treated as a unit and may be combined as described in this +;; list. +;; +;; A? +;; +;; matches A or nothing; optional A. +;; +;; A B +;; +;; matches A followed by B. This operator has higher precedence than +;; alternation; thus A B | C D is identical to (A B) | (C D). +;; +;; A | B +;; +;; matches A or B. +;; +;; A - B +;; +;; matches any string that matches A but does not match B. +;; +;; A+ +;; +;; matches one or more occurrences of A. Concatenation has higher +;; precedence than alternation; thus A+ | B+ is identical to (A+) | (B+). +;; +;; A* +;; +;; matches zero or more occurrences of A. Concatenation has higher +;; precedence than alternation; thus A* | B* is identical to (A*) | (B*). +;; +;; Other notations used in the productions are: +;; +;; /* ... */ +;; +;; comment. +;; +;; [ wfc: ... ] +;; +;; well-formedness constraint; this identifies by name a constraint on +;; well-formed documents associated with a production. +;; +;; [ vc: ... ] +;; +;; validity constraint; this identifies by name a constraint on valid +;; documents associated with a production. +;; +;; +;; Differences Between EBNFX And ebnf2ps EBNFX +;; ------------------------------------------- +;; +;; Besides the characters that EBNFX accepts, ebnf2ps EBNFX accepts also the +;; underscore (_) and minus (-) for rule name and european 8-bit accentuated +;; characters (from \240 to \377) for rule name, string and comment. Also +;; rule name can start with upper case letter. +;; +;; +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;; Code: + + +(require 'ebnf-otz) + + +(defvar ebnf-ebx-lex nil + "Value returned by `ebnf-ebx-lex' function.") + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Syntactic analyzer + + +;;; rulelist ::= rule+ + +(defun ebnf-ebx-parser (start) + "EBNFX parser." + (let ((total (+ (- ebnf-limit start) 1)) + (bias (1- start)) + (origin (point)) + rule-list token rule) + (goto-char start) + (setq token (ebnf-ebx-lex)) + (and (eq token 'end-of-input) + (error "Invalid EBNFX file format")) + (and (eq token 'end-of-rule) + (setq token (ebnf-ebx-lex))) + (while (not (eq token 'end-of-input)) + (ebnf-message-float + "Parsing...%s%%" + (/ (* (- (point) bias) 100.0) total)) + (setq token (ebnf-ebx-rule token) + rule (cdr token) + token (car token)) + (or (ebnf-add-empty-rule-list rule) + (setq rule-list (cons rule rule-list)))) + (goto-char origin) + rule-list)) + + +;;; rule ::= symbol '::=' expression + + +(defun ebnf-ebx-rule (token) + (let ((name ebnf-ebx-lex) + (action ebnf-action) + elements) + (setq ebnf-action nil) + (or (eq token 'non-terminal) + (error "Invalid rule name")) + (setq token (ebnf-ebx-lex)) + (or (eq token 'production) + (error "Invalid rule: missing `::='")) + (setq elements (ebnf-ebx-expression)) + (or (memq (car elements) '(end-of-rule end-of-input)) + (error "Invalid rule: there is no end of rule")) + (setq elements (cdr elements)) + (ebnf-eps-add-production name) + (cons (ebnf-ebx-lex) + (ebnf-make-production name elements action)))) + + +;; expression ::= concatenation ('|' concatenation)* + + +(defun ebnf-ebx-expression () + (let (body concatenation) + (while (eq (car (setq concatenation + (ebnf-ebx-concatenation (ebnf-ebx-lex)))) + 'alternative) + (setq body (cons (cdr concatenation) body))) + (ebnf-token-alternative body concatenation))) + + +;; concatenation ::= exception* + + +(defun ebnf-ebx-concatenation (token) + (let ((term (ebnf-ebx-exception token)) + seq) + (or (setq token (car term) + term (cdr term)) + (error "Empty element")) + (setq seq (cons term seq)) + (while (setq term (ebnf-ebx-exception token) + token (car term) + term (cdr term)) + (setq seq (cons term seq))) + (cons token + (ebnf-token-sequence seq)))) + + +;;; exception ::= term ('-' term)? + + +(defun ebnf-ebx-exception (token) + (let ((term (ebnf-ebx-term token))) + (if (eq (car term) 'exception) + (let ((except (ebnf-ebx-term (ebnf-ebx-lex)))) + (cons (car except) + (ebnf-make-except (cdr term) (cdr except)))) + term))) + + + +;;; term ::= factor ('*' | '+' | '?')? + + +(defun ebnf-ebx-term (token) + (let ((factor (ebnf-ebx-factor token))) + (when factor + (setq token (ebnf-ebx-lex)) + (cond ((eq token 'zero-or-more) + (setq factor (ebnf-make-zero-or-more factor) + token (ebnf-ebx-lex))) + ((eq token 'one-or-more) + (setq factor (ebnf-make-one-or-more factor) + token (ebnf-ebx-lex))) + ((eq token 'optional) + (setq factor (ebnf-token-optional factor) + token (ebnf-ebx-lex))))) + (cons token factor))) + + +;;; factor ::= hex-char+ +;;; | '[' '^'? ( char ( '-' char )? )+ ']' +;;; | '"' 'string' '"' +;;; | "'" "string" "'" +;;; | '(' expression ')' +;;; | symbol +;;; +;;; symbol ::= 'upper or lower case letter' +;;; ('upper or lower case letter' | '-' | '_')* +;;; /* upper and lower 8-bit accentuated characters are included */ +;;; +;;; hex-char ::= '#x' [0-9A-Fa-f]+ +;;; +;;; char ::= hex-char | 'any character except control characters' +;;; /* 8-bit accentuated characters are included */ +;;; +;;; any-char ::= char | 'newline' | 'tab' + + +(defun ebnf-ebx-factor (token) + (cond + ;; terminal + ((eq token 'terminal) + (ebnf-make-terminal ebnf-ebx-lex)) + ;; non-terminal + ((eq token 'non-terminal) + (ebnf-make-non-terminal ebnf-ebx-lex)) + ;; group + ((eq token 'begin-group) + (let ((body (ebnf-ebx-expression))) + (or (eq (car body) 'end-group) + (error "Missing `)'")) + (cdr body))) + ;; no element + (t + nil) + )) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Lexical analyzer + + +(defconst ebnf-ebx-token-table (make-vector 256 'error) + "Vector used to map characters to a lexical token.") + + +(defun ebnf-ebx-initialize () + "Initialize EBNFX token table." + ;; control character & control 8-bit character are set to `error' + (let ((char ?\101)) + ;; printable character: A-Z + (while (< char ?\133) + (aset ebnf-ebx-token-table char 'non-terminal) + (setq char (1+ char))) + ;; printable character: a-z + (setq char ?\141) + (while (< char ?\173) + (aset ebnf-ebx-token-table char 'non-terminal) + (setq char (1+ char))) + ;; European 8-bit accentuated characters: + (setq char ?\240) + (while (< char ?\400) + (aset ebnf-ebx-token-table char 'non-terminal) + (setq char (1+ char))) + ;; Override end of line characters: + (aset ebnf-ebx-token-table ?\n 'end-of-rule) ; [NL] linefeed + (aset ebnf-ebx-token-table ?\r 'end-of-rule) ; [CR] carriage return + ;; Override space characters: + (aset ebnf-ebx-token-table ?\013 'space) ; [VT] vertical tab + (aset ebnf-ebx-token-table ?\t 'space) ; [HT] horizontal tab + (aset ebnf-ebx-token-table ?\ 'space) ; [SP] space + ;; Override form feed character: + (aset ebnf-ebx-token-table ?\f 'form-feed) ; [FF] form feed + ;; Override other lexical characters: + (aset ebnf-ebx-token-table ?# 'hash) + (aset ebnf-ebx-token-table ?\" 'double-quote) + (aset ebnf-ebx-token-table ?\' 'single-quote) + (aset ebnf-ebx-token-table ?\( 'begin-group) + (aset ebnf-ebx-token-table ?\) 'end-group) + (aset ebnf-ebx-token-table ?- 'exception) + (aset ebnf-ebx-token-table ?: 'colon) + (aset ebnf-ebx-token-table ?\[ 'begin-square) + (aset ebnf-ebx-token-table ?| 'alternative) + (aset ebnf-ebx-token-table ?* 'zero-or-more) + (aset ebnf-ebx-token-table ?+ 'one-or-more) + (aset ebnf-ebx-token-table ?\? 'optional) + ;; Override comment character: + (aset ebnf-ebx-token-table ?/ 'comment))) + + +;; replace the range "\240-\377" (see `ebnf-range-regexp'). +(defconst ebnf-ebx-non-terminal-chars + (ebnf-range-regexp "-_A-Za-z" ?\240 ?\377)) +(defconst ebnf-ebx-non-terminal-letter-chars + (ebnf-range-regexp "A-Za-z" ?\240 ?\377)) + + +(defun ebnf-ebx-lex () + "Lexical analyser for EBNFX. + +Return a lexical token. + +See documentation for variable `ebnf-ebx-lex'." + (if (>= (point) ebnf-limit) + 'end-of-input + (let (token) + ;; skip spaces and comments + (while (if (> (following-char) 255) + (progn + (setq token 'error) + nil) + (setq token (aref ebnf-ebx-token-table (following-char))) + (cond + ((eq token 'space) + (skip-chars-forward " \013\t" ebnf-limit) + (< (point) ebnf-limit)) + ((eq token 'comment) + (ebnf-ebx-skip-comment)) + ((eq token 'form-feed) + (forward-char) + (setq ebnf-action 'form-feed)) + ((eq token 'end-of-rule) + (ebnf-ebx-skip-end-of-rule)) + ((and (eq token 'begin-square) + (let ((case-fold-search t)) + (looking-at "\\[\\(wfc\\|vc\\):"))) + (ebnf-ebx-skip-constraint)) + (t nil) + ))) + (cond + ;; end of input + ((>= (point) ebnf-limit) + 'end-of-input) + ;; error + ((eq token 'error) + (error "Illegal character")) + ;; end of rule + ((eq token 'end-of-rule) + 'end-of-rule) + ;; terminal: #x [0-9A-Fa-f]+ + ((eq token 'hash) + (setq ebnf-ebx-lex (ebnf-ebx-character)) + 'terminal) + ;; terminal: "string" + ((eq token 'double-quote) + (setq ebnf-ebx-lex (ebnf-ebx-string ?\")) + 'terminal) + ;; terminal: 'string' + ((eq token 'single-quote) + (setq ebnf-ebx-lex (ebnf-ebx-string ?\')) + 'terminal) + ;; terminal: [ ^? ( char ( - char )? )+ ] + ((eq token 'begin-square) + (setq ebnf-ebx-lex (ebnf-ebx-range)) + 'terminal) + ;; non-terminal: NAME + ((eq token 'non-terminal) + (setq ebnf-ebx-lex + (ebnf-buffer-substring ebnf-ebx-non-terminal-chars)) + 'non-terminal) + ;; colon: ::= + ((eq token 'colon) + (or (looking-at "::=") + (error "Missing `::=' token")) + (forward-char 3) + 'production) + ;; miscellaneous: (, ), *, +, ?, |, - + (t + (forward-char) + token) + )))) + + +;; replace the range "\177-\237" (see `ebnf-range-regexp'). +(defconst ebnf-ebx-constraint-chars + (ebnf-range-regexp "^\000-\010\016-\037]" ?\177 ?\237)) + + +(defun ebnf-ebx-skip-constraint () + (or (> (skip-chars-forward ebnf-ebx-constraint-chars ebnf-limit) 0) + (error "Invalid character")) + (or (= (following-char) ?\]) + (error "Missing end of constraint `]'")) + (forward-char) + t) + + + +(defun ebnf-ebx-skip-end-of-rule () + (let (eor-p) + (while (progn + ;; end of rule ==> 2 or more consecutive end of lines + (setq eor-p (or (> (skip-chars-forward "\r\n" ebnf-limit) 1) + eor-p)) + ;; skip spaces + (skip-chars-forward " \013\t" ebnf-limit) + ;; skip comments + (and (= (following-char) ?/) + (ebnf-ebx-skip-comment)))) + (not eor-p))) + + +;; replace the range "\177-\237" (see `ebnf-range-regexp'). +(defconst ebnf-ebx-comment-chars + (ebnf-range-regexp "^\000-\010\016-\037\\*" ?\177 ?\237)) +(defconst ebnf-ebx-filename-chars + (ebnf-range-regexp "^\000-\037\\*" ?\177 ?\237)) + + +(defun ebnf-ebx-skip-comment () + (forward-char) + (or (= (following-char) ?*) + (error "Invalid beginning of comment")) + (forward-char) + (cond + ;; open EPS file + ((and ebnf-eps-executing (= (following-char) ?\[)) + (ebnf-eps-add-context (ebnf-ebx-eps-filename))) + ;; close EPS file + ((and ebnf-eps-executing (= (following-char) ?\])) + (ebnf-eps-remove-context (ebnf-ebx-eps-filename))) + ;; any other action in comment + (t + (setq ebnf-action (aref ebnf-comment-table (following-char)))) + ) + (while (progn + (skip-chars-forward ebnf-ebx-comment-chars ebnf-limit) + (or (= (following-char) ?*) + (error "Missing end of comment")) + (forward-char) + (and (/= (following-char) ?/) + (< (point) ebnf-limit)))) + ;; check for a valid end of comment + (and (>= (point) ebnf-limit) + (error "Missing end of comment")) + (forward-char) + t) + + +(defun ebnf-ebx-eps-filename () + (forward-char) + (let (fname nchar) + (while (progn + (setq fname + (concat fname + (ebnf-buffer-substring ebnf-ebx-filename-chars))) + (and (< (point) ebnf-limit) + (> (setq nchar (skip-chars-forward "*" ebnf-limit)) 0) + (< (point) ebnf-limit) + (/= (following-char) ?/))) + (setq fname (concat fname (make-string nchar ?*)) + nchar nil)) + (if (or (not nchar) (= nchar 0)) + fname + (and (< (point) ebnf-limit) + (= (following-char) ?/) + (setq nchar (1- nchar))) + (concat fname (make-string nchar ?*))))) + + +;; replace the range "\240-\377" (see `ebnf-range-regexp'). +(defconst ebnf-ebx-double-string-chars + (ebnf-range-regexp "\t -!#-~" ?\240 ?\377)) +(defconst ebnf-ebx-single-string-chars + (ebnf-range-regexp "\t -&(-~" ?\240 ?\377)) + + +(defun ebnf-ebx-string (delim) + (buffer-substring-no-properties + (progn + (forward-char) + (point)) + (progn + (skip-chars-forward (if (= delim ?\") + ebnf-ebx-double-string-chars + ebnf-ebx-single-string-chars) + ebnf-limit) + (or (= (following-char) delim) + (error "Missing string delimiter `%c'" delim)) + (prog1 + (point) + (forward-char))))) + + +(defun ebnf-ebx-character () + ;; #x [0-9A-Fa-f]+ + (buffer-substring-no-properties + (point) + (progn + (ebnf-ebx-hex-character) + (point)))) + + +(defun ebnf-ebx-range () + ;; [ ^? ( char ( - char )? )+ ] + (buffer-substring-no-properties + (point) + (progn + (forward-char) + (and (= (following-char) ?^) + (forward-char)) + (and (= (following-char) ?-) + (forward-char)) + (while (progn + (ebnf-ebx-any-character) + (when (= (following-char) ?-) + (forward-char) + (ebnf-ebx-any-character)) + (and (/= (following-char) ?\]) + (< (point) ebnf-limit)))) + (and (>= (point) ebnf-limit) + (error "Missing end of character range `]'")) + (forward-char) + (point)))) + + +(defun ebnf-ebx-any-character () + (let ((char (following-char))) + (cond ((= char ?#) + (ebnf-ebx-hex-character t)) + ((or (and (<= ?\ char) (<= char ?\")) ; # + (and (<= ?$ char) (<= char ?,)) ; - + (and (<= ?. char) (<= char ?\\)) ; ] + (and (<= ?^ char) (<= char ?~)) + (and (<= ?\240 char) (<= char ?\377))) + (forward-char)) + (t + (error "Invalid character `%c'" char))))) + + +(defun ebnf-ebx-hex-character (&optional no-error) + ;; #x [0-9A-Fa-f]+ + (forward-char) + (if (/= (following-char) ?x) + (or no-error + (error "Invalid hexadecimal character")) + (forward-char) + (or (> (skip-chars-forward "0-9A-Fa-f" ebnf-limit) 0) + (error "Invalid hexadecimal character")))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(provide 'ebnf-ebx) + +;;; arch-tag: bfe2f95b-66bc-4dc6-8b7e-b7831e68f5fb +;;; ebnf-ebx.el ends here diff --git a/lisp/progmodes/ebnf-iso.el b/lisp/progmodes/ebnf-iso.el index f4c965b6ed..f36065bd55 100644 --- a/lisp/progmodes/ebnf-iso.el +++ b/lisp/progmodes/ebnf-iso.el @@ -1,12 +1,13 @@ ;;; ebnf-iso.el --- parser for ISO EBNF -;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +;; Free Software Foundation, Inc. -;; Author: Vinicius Jose Latorre -;; Maintainer: Vinicius Jose Latorre +;; Author: Vinicius Jose Latorre +;; Maintainer: Vinicius Jose Latorre +;; Time-stamp: <2004/04/03 16:48:52 vinicius> ;; Keywords: wp, ebnf, PostScript -;; Time-stamp: <2003-02-10 10:26:32 jbarranquero> -;; Version: 1.6 +;; Version: 1.8 ;; This file is part of GNU Emacs. @@ -112,7 +113,8 @@ ;; ISO EBNF accepts the characters given by production above, ;; HORIZONTAL TAB (^I), VERTICAL TAB (^K), NEWLINE (^J or ^M) and FORM FEED ;; (^L), any other characters are illegal. But ebnf2ps accepts also the -;; european 8-bit accentuated characters (from \240 to \377). +;; european 8-bit accentuated characters (from \240 to \377) and underscore +;; (_). ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -127,7 +129,8 @@ "Value returned by `ebnf-iso-lex' function.") -(defconst ebnf-no-meta-identifier nil) +(defvar ebnf-no-meta-identifier nil + "Used by `ebnf-iso-term' and `ebnf-iso-lex' functions.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -200,17 +203,9 @@ (eq token 'catenate)) (setq seq (cons term seq))) (cons token - (cond - ;; null sequence - ((null seq) - term) - ;; sequence with only one element - ((and (null term) (= (length seq) 1)) - (car seq)) - ;; a real sequence - (t - (ebnf-make-sequence (nreverse (cons term seq)))) - )))) + (ebnf-token-sequence (if term + (cons term seq) + seq))))) ;;; term = factor, ['-', exception]; @@ -345,6 +340,7 @@ ;; Override form feed character: (aset table ?\f 'form-feed) ; [FF] form feed ;; Override other lexical characters: + (aset table ?_ 'non-terminal) (aset table ?\" 'double-terminal) (aset table ?\' 'single-terminal) (aset table ?\? 'special) @@ -389,7 +385,7 @@ ;; replace the range "\240-\377" (see `ebnf-range-regexp'). (defconst ebnf-iso-non-terminal-chars - (ebnf-range-regexp " 0-9A-Za-z" ?\240 ?\377)) + (ebnf-range-regexp " 0-9A-Za-z_" ?\240 ?\377)) (defun ebnf-iso-lex () @@ -438,9 +434,9 @@ See documentation for variable `ebnf-iso-lex'." 'integer) ;; special: ?special? ((eq token 'special) - (setq ebnf-iso-lex (concat "?" + (setq ebnf-iso-lex (concat (and ebnf-special-show-delimiter "?") (ebnf-string " ->@-~" ?\? "special") - "?")) + (and ebnf-special-show-delimiter "?"))) 'special) ;; terminal: "string" ((eq token 'double-terminal) @@ -612,4 +608,5 @@ See documentation for variable `ebnf-iso-lex'." (provide 'ebnf-iso) +;;; arch-tag: 03315eef-8f64-404a-bf9d-256d42442ee3 ;;; ebnf-iso.el ends here diff --git a/lisp/progmodes/ebnf-otz.el b/lisp/progmodes/ebnf-otz.el index 73f1ce9238..5c98677c33 100644 --- a/lisp/progmodes/ebnf-otz.el +++ b/lisp/progmodes/ebnf-otz.el @@ -1,11 +1,12 @@ ;;; ebnf-otz.el --- syntactic chart OpTimiZer -;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +;; Free Sofware Foundation, Inc. -;; Author: Vinicius Jose Latorre -;; Maintainer: Vinicius Jose Latorre +;; Author: Vinicius Jose Latorre +;; Maintainer: Vinicius Jose Latorre +;; Time-stamp: <2004/02/29 18:40:14 vinicius> ;; Keywords: wp, ebnf, PostScript -;; Time-stamp: <2003-02-10 10:46:51 jbarranquero> ;; Version: 1.0 ;; This file is part of GNU Emacs. @@ -37,6 +38,46 @@ ;; See ebnf2ps.el for documentation. ;; ;; +;; Optimizations +;; ------------- +;; +;; +;; *To be implemented*: +;; left recursion: +;; A = B | A C B | A C D. ==> A = B {C (B | D)}*. +;; +;; right recursion: +;; A = B | C A. ==> A = {C}* B. +;; A = B | D | C A | E A. ==> A = { C | E }* ( B | D ). +;; +;; optional: +;; A = B | C B. ==> A = [C] B. +;; A = B | B C. ==> A = B [C]. +;; A = D | B D | B C D. ==> A = [B [C]] D. +;; +;; +;; *Already implemented*: +;; left recursion: +;; A = B | A C. ==> A = B {C}*. +;; A = B | A B. ==> A = {B}+. +;; A = | A B. ==> A = {B}*. +;; A = B | A C B. ==> A = {B || C}+. +;; A = B | D | A C | A E. ==> A = ( B | D ) { C | E }*. +;; +;; optional: +;; A = B | . ==> A = [B]. +;; A = | B . ==> A = [B]. +;; +;; factoration: +;; A = B C | B D. ==> A = B (C | D). +;; A = C B | D B. ==> A = (C | D) B. +;; A = B C E | B D E. ==> A = B (C | D) E. +;; +;; none: +;; A = B | C | . ==> A = B | C | . +;; A = B | C A D. ==> A = B | C A D. +;; +;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Code: @@ -658,4 +699,5 @@ (provide 'ebnf-otz) +;;; arch-tag: 7ef2249d-9e8b-4bc1-999f-95d784690636 ;;; ebnf-otz.el ends here diff --git a/lisp/progmodes/ebnf-yac.el b/lisp/progmodes/ebnf-yac.el index 4aa7fb116c..c7bf0e3154 100644 --- a/lisp/progmodes/ebnf-yac.el +++ b/lisp/progmodes/ebnf-yac.el @@ -1,12 +1,13 @@ ;;; ebnf-yac.el --- parser for Yacc/Bison -;; Copyright (C) 1999, 2000, 2001 Free Sofware Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +;; Free Sofware Foundation, Inc. -;; Author: Vinicius Jose Latorre -;; Maintainer: Vinicius Jose Latorre +;; Author: Vinicius Jose Latorre +;; Maintainer: Vinicius Jose Latorre +;; Time-stamp: <2004/04/03 16:50:46 vinicius> ;; Keywords: wp, ebnf, PostScript -;; Time-stamp: <2003-02-10 10:47:04 jbarranquero> -;; Version: 1.2 +;; Version: 1.3 ;; This file is part of GNU Emacs. @@ -42,7 +43,9 @@ ;; ;; YACC = { YACC-Definitions }* "%%" { YACC-Rule }* [ "%%" [ YACC-Code ] ]. ;; -;; YACC-Definitions = "%token" [ "<" Name ">" ] Name-List +;; YACC-Definitions = ( "%token" | "%left" | "%right" | "%nonassoc" ) +;; [ "<" Name ">" ] Name-List +;; | "%prec" Name ;; | "any other Yacc definition" ;; . ;; @@ -65,7 +68,20 @@ ;; Name = "[A-Za-z][A-Za-z0-9_.]*". ;; ;; Comment = "/*" "any character, but the sequence \"*/\"" "*/" -;; | "//" "any character" "\\n". +;; | "//" "any character, but the newline \"\\n\"" "\\n". +;; +;; +;; In other words, a valid Name begins with a letter (upper or lower case) +;; followed by letters, decimal digits, underscore (_) or point (.). For +;; example: this_is_a_valid.name, Another_EXAMPLE, mIxEd.CaSe. +;; +;; +;; Acknowledgements +;; ---------------- +;; +;; Thanks to Matthew K. Junker for the suggestion to deal +;; with %right, %left and %prec pragmas. His suggestion was extended to deal +;; with %nonassoc pragma too. ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -126,7 +142,9 @@ syntax-list)) -;;; YACC-Definitions = "%token" [ "<" Name ">" ] Name-List +;;; YACC-Definitions = ( "%token" | "%left" | "%right" | "%nonassoc" ) +;;; [ "<" Name ">" ] Name-List +;;; | "%prec" Name ;;; | "any other Yacc definition" ;;; . @@ -135,7 +153,8 @@ (while (not (memq token '(yac-separator end-of-input))) (setq token (cond - ;; "%token" [ "<" Name ">" ] Name-List + ;; ( "%token" | "%left" | "%right" | "%nonassoc" ) + ;; [ "<" Name ">" ] Name-List ((eq token 'yac-token) (setq token (ebnf-yac-lex)) (when (eq token 'open-angle) @@ -148,7 +167,12 @@ ebnf-yac-token-list (nconc (cdr token) ebnf-yac-token-list)) (car token)) - ;; "any other Yacc definition" + ;; "%prec" Name + ((eq token 'yac-prec) + (or (eq (ebnf-yac-lex) 'non-terminal) + (error "Missing prec name")) + (ebnf-yac-lex)) + ;; "any other Yacc definition" (t (ebnf-yac-lex)) ))) @@ -194,20 +218,10 @@ factor (ebnf-yac-factor token)) (setq seq (cons factor seq))) (cons token - (cond - ;; ignore error recovery - ((and ebnf-yac-ignore-error-recovery ebnf-yac-error) - nil) - ;; null sequence - ((null seq) - (ebnf-make-empty)) - ;; sequence with only one element - ((= (length seq) 1) - (car seq)) - ;; a real sequence - (t - (ebnf-make-sequence (nreverse seq))) - )))) + (if (and ebnf-yac-ignore-error-recovery ebnf-yac-error) + ;; ignore error recovery + nil + (ebnf-token-sequence seq))))) ;;; Factor = Name @@ -360,9 +374,13 @@ See documentation for variable `ebnf-yac-lex'." ((eq (following-char) ?%) (forward-char) 'yac-separator) - ;; %TOKEN - ((string= (upcase (ebnf-buffer-substring "0-9A-Za-z_")) "TOKEN") - 'yac-token) + ;; %TOKEN, %RIGHT, %LEFT, %PREC, %NONASSOC + ((cdr (assoc (upcase (ebnf-buffer-substring "0-9A-Za-z_")) + '(("TOKEN" . yac-token) + ("RIGHT" . yac-token) + ("LEFT" . yac-token) + ("NONASSOC" . yac-token) + ("PREC" . yac-prec))))) ;; other Yacc pragmas (t 'yac-pragma) @@ -491,4 +509,5 @@ See documentation for variable `ebnf-yac-lex'." (provide 'ebnf-yac) +;;; arch-tag: 8a96989c-0b1d-42ba-a020-b2901f9a2a4d ;;; ebnf-yac.el ends here diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index e68bcabc9d..e45a7ee510 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el @@ -1,12 +1,13 @@ ;;; ebnf2ps.el --- translate an EBNF to a syntactic chart on PostScript -;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +;; Free Software Foundation, Inc. -;; Author: Vinicius Jose Latorre -;; Maintainer: Vinicius Jose Latorre +;; Author: Vinicius Jose Latorre +;; Maintainer: Vinicius Jose Latorre +;; Time-stamp: <2004/04/04 21:40:30 vinicius> ;; Keywords: wp, ebnf, PostScript -;; Time-stamp: <2003-02-10 10:40:14 jbarranquero> -;; Version: 3.6.1 +;; Version: 4.2 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ ;; This file is part of GNU Emacs. @@ -26,14 +27,14 @@ ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. -(defconst ebnf-version "3.6.1" - "ebnf2ps.el, v 3.6.1 <2001/09/24 vinicius> +(defconst ebnf-version "4.2" + "ebnf2ps.el, v 4.2 <2004/04/04 vinicius> Vinicius's last change version. When reporting bugs, please also report the version of Emacs, if any, that ebnf2ps was running with. Please send all bug fixes and enhancements to - Vinicius Jose Latorre . + Vinicius Jose Latorre . ") @@ -69,13 +70,19 @@ Please send all bug fixes and enhancements to ;; Using ebnf2ps ;; ------------- ;; -;; ebnf2ps provides six commands for generating PostScript syntactic chart -;; images of Emacs buffers: +;; ebnf2ps provides the following commands for generating PostScript syntactic +;; chart images of Emacs buffers: ;; +;; ebnf-print-directory +;; ebnf-print-file ;; ebnf-print-buffer ;; ebnf-print-region +;; ebnf-spool-directory +;; ebnf-spool-file ;; ebnf-spool-buffer ;; ebnf-spool-region +;; ebnf-eps-directory +;; ebnf-eps-file ;; ebnf-eps-buffer ;; ebnf-eps-region ;; @@ -110,12 +117,16 @@ Please send all bug fixes and enhancements to ;; you'll be asked to confirm the exit; this is modeled on the confirmation ;; that Emacs uses for modified buffers. ;; -;; The word "buffer" or "region" in the command name determines how much of the -;; buffer is printed: +;; The word "directory", "file", "buffer" or "region" in the command name +;; determines how much of the buffer is printed: ;; -;; buffer - Print the entire buffer. +;; directory - Read files in the directory and print them. ;; -;; region - Print just the current region. +;; file - Read file and print it. +;; +;; buffer - Print the entire buffer. +;; +;; region - Print just the current region. ;; ;; Two ebnf- command examples: ;; @@ -126,9 +137,10 @@ Please send all bug fixes and enhancements to ;; spool the image in Emacs to send to the printer ;; later. ;; -;; Note that `ebnf-eps-buffer' and `ebnf-eps-region' never spool the EPS image, -;; so they don't use the ps-print spooling mechanism. See section "Actions in -;; Comments" for an explanation about EPS file generation. +;; Note that `ebnf-eps-directory', `ebnf-eps-file', `ebnf-eps-buffer' and +;; `ebnf-eps-region' never spool the EPS image, so they don't use the ps-print +;; spooling mechanism. See section "Actions in Comments" for an explanation +;; about EPS file generation. ;; ;; ;; Invoking Ebnf2ps @@ -165,9 +177,36 @@ Please send all bug fixes and enhancements to ;; (global-set-key '(control f22) 'ebnf-despool) ;; ;; +;; Invoking Ebnf2ps in Batch +;; ------------------------- +;; +;; It's possible also to run ebnf2ps in batch, this is useful when, for +;; example, you have a directory with a lot of files containing the EBNF to be +;; translated to PostScript. +;; +;; To run ebnf2ps in batch type, for example: +;; +;; emacs -batch -l setup-ebnf2ps.el -f ebnf-eps-directory +;; +;; Where setup-ebnf2ps.el should be a file containing: +;; +;; ;; set load-path if ebnf2ps isn't installed in your Emacs environment +;; (setq load-path (append (list "/dir/of/ebnf2ps") load-path)) +;; (require 'ebnf2ps) +;; ;; insert here your ebnf2ps settings +;; (setq ebnf-terminal-shape 'bevel) +;; ;; etc. +;; +;; ;; EBNF Syntax ;; ----------- ;; +;; BNF (Backus Naur Form) notation is defined like languages, and like +;; languages there are rules about name formation and syntax. In this section +;; it's defined a BNF syntax that it's called simply EBNF (Extended BNF). +;; ebnf2ps package also deal with other BNF notation. Please, see the variable +;; `ebnf-syntax' documentation below in this section. +;; ;; The current EBNF that ebnf2ps accepts has the following constructions: ;; ;; ; comment (until end of line) @@ -181,7 +220,10 @@ Please send all bug fixes and enhancements to ;; C D sequence (C occurs before D) ;; C | D alternative (C or D occurs) ;; A - B exception (A excluding B, B without any non-terminal) -;; n * A repetition (A repeats n (integer) times) +;; n * A repetition (A repeats at least n (integer) times) +;; n * n A repetition (A repeats exactly n (integer) times) +;; n * m A repetition (A repeats at least n (integer) and at most +;; m (integer) times) ;; (C) group (expression C is grouped together) ;; [C] optional (C may or not occurs) ;; C+ one or more occurrences of C @@ -205,7 +247,7 @@ Please send all bug fixes and enhancements to ;; ;; exception = repeat [ "-" repeat]. ;; exception ;; -;; repeat = [ integer "*" ] term. ;; repetition +;; repeat = [ integer "*" [ integer ]] term. ;; repetition ;; ;; term = factor ;; | [factor] "+" ;; one-or-more @@ -223,14 +265,30 @@ Please send all bug fixes and enhancements to ;; . ;; ;; non_terminal = "[!#%&'*-,0-:<>@-Z\\\\^-z~\\240-\\377]+". +;; ;; that is, a valid non_terminal accepts decimal digits, letters (upper +;; ;; and lower), 8-bit accentuated characters, +;; ;; "!", "#", "%", "&", "'", "*", "+", ",", ":", +;; ;; "<", ">", "@", "\", "^", "_", "`" and "~". ;; ;; terminal = "\\([^\"\\]\\|\\\\[ -~\\240-\\377]\\)+". +;; ;; that is, a valid terminal accepts any printable character (including +;; ;; 8-bit accentuated characters) except `"', as `"' is used to delimit a +;; ;; terminal. Also, accepts escaped characters, that is, a character +;; ;; pair starting with `\' followed by a printable character, for +;; ;; example: \", \\. ;; -;; special = "[^?\\n\\000-\\010\\016-\\037\\177-\\237]*". +;; special = "[^?\\000-\\010\\012-\\037\\177-\\237]*". +;; ;; that is, a valid special accepts any printable character (including +;; ;; 8-bit accentuated characters) and tabs except `?', as `?' is used to +;; ;; delimit a special. ;; ;; integer = "[0-9]+". +;; ;; that is, an integer is a sequence of one or more decimal digits. ;; ;; comment = ";" "[^\\n\\000-\\010\\016-\\037\\177-\\237]*" "\\n". +;; ;; that is, a comment starts with the character `;' and terminates at end +;; ;; of line. Also, it only accepts printable characters (including 8-bit +;; ;; accentuated characters) and tabs. ;; ;; Try to use the above EBNF to test ebnf2ps. ;; @@ -273,6 +331,10 @@ Please send all bug fixes and enhancements to ;; `ebnf-terminal-regexp', `ebnf-case-fold-search', ;; `ebnf-lex-comment-char' and `ebnf-lex-eop-char'. ;; +;; `abnf' ebnf2ps recognizes the syntax described in the URL: +;; `http://www.ietf.org/rfc/rfc2234.txt' +;; ("Augmented BNF for Syntax Specifications: ABNF"). +;; ;; `iso-ebnf' ebnf2ps recognizes the syntax described in the URL: ;; `http://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html' ;; ("International Standard of the ISO EBNF Notation"). @@ -285,6 +347,14 @@ Please send all bug fixes and enhancements to ;; setting: ;; `ebnf-yac-ignore-error-recovery'. ;; +;; `ebnfx' ebnf2ps recognizes the syntax described in the URL: +;; `http://www.w3.org/TR/2004/REC-xml-20040204/#sec-notation' +;; ("Extensible Markup Language (XML) 1.0 (Third Edition)") +;; +;; `dtd' ebnf2ps recognizes the syntax described in the URL: +;; `http://www.w3.org/TR/2004/REC-xml-20040204/' +;; ("Extensible Markup Language (XML) 1.0 (Third Edition)") +;; ;; Any other value is treated as `ebnf'. ;; ;; The default value is `ebnf'. @@ -356,6 +426,8 @@ Please send all bug fixes and enhancements to ;; ;; ebnf2ps accepts the following actions in comments: ;; +;; ;^ same as form feed. See section Form Feed above. +;; ;; ;> the next production starts in the same line as the current one. ;; It is useful when `ebnf-horizontal-orientation' is nil. ;; @@ -420,8 +492,8 @@ Please send all bug fixes and enhancements to ;; Only the ;> will take effect, that is, A and B will be drawn in the same ;; line. ;; -;; In ISO EBNF the above actions are specified as (*>*), (*<*), (*[EPS*) and -;; (*]EPS*). The first example above should be written: +;; In ISO EBNF the above actions are specified as (*^*), (*>*), (*<*), (*[EPS*) +;; and (*]EPS*). The first example above should be written: ;; ;; A = t; ;; C = x; @@ -482,6 +554,12 @@ Please send all bug fixes and enhancements to ;; ;; `ebnf-setup' returns the current setup. ;; +;; `ebnf-syntax-directory' does a syntactic analysis of your EBNF files in the +;; given directory. +;; +;; `ebnf-syntax-file' does a syntactic analysis of your EBNF in the given +;; file. +;; ;; `ebnf-syntax-buffer' does a syntactic analysis of your EBNF in the current ;; buffer. ;; @@ -490,8 +568,9 @@ Please send all bug fixes and enhancements to ;; ;; `ebnf-customize' activates a customization buffer for ebnf2ps options. ;; -;; `ebnf-syntax-buffer', `ebnf-syntax-region' and `ebnf-customize' can be bound -;; to keys in the same way as `ebnf-' commands. +;; `ebnf-syntax-directory', `ebnf-syntax-file', `ebnf-syntax-buffer', +;; `ebnf-syntax-region' and `ebnf-customize' can be bound to keys in the same +;; way as `ebnf-' commands. ;; ;; ;; Hooks @@ -545,6 +624,9 @@ Please send all bug fixes and enhancements to ;; ;; `ebnf-terminal-border-color' Specify border color for terminal box. ;; +;; `ebnf-production-name-p' Non-nil means production name will be +;; printed. +;; ;; `ebnf-sort-production' Specify how productions are sorted. ;; ;; `ebnf-production-font' Specify production font. @@ -562,6 +644,9 @@ Please send all bug fixes and enhancements to ;; `ebnf-non-terminal-border-color' Specify border color for non-terminal ;; box. ;; +;; `ebnf-special-show-delimiter' Non-nil means special delimiter +;; (character `?') is shown. +;; ;; `ebnf-special-font' Specify special font. ;; ;; `ebnf-special-shape' Specify special box shape. @@ -629,10 +714,16 @@ Please send all bug fixes and enhancements to ;; default terminal, non-terminal or ;; special. ;; +;; `ebnf-file-suffix-regexp' Specify file name suffix that contains +;; EBNF. +;; ;; `ebnf-eps-prefix' Specify EPS prefix file name. ;; ;; `ebnf-use-float-format' Non-nil means use `%f' float format. ;; +;; `ebnf-stop-on-error' Non-nil means signal error and stop. +;; Nil means signal error and continue. +;; ;; `ebnf-yac-ignore-error-recovery' Non-nil means ignore error recovery. ;; ;; `ebnf-ignore-empty-rule' Non-nil means ignore empty rules. @@ -695,21 +786,24 @@ Please send all bug fixes and enhancements to ;; `ebnf-insert-style' Insert a new style NAME with inheritance INHERITS and ;; values VALUES. ;; +;; `ebnf-delete-style' Delete style NAME. +;; ;; `ebnf-merge-style' Merge values of style NAME with style VALUES. ;; -;; `ebnf-apply-style' Set STYLE to current style. +;; `ebnf-apply-style' Set STYLE as the current style. ;; ;; `ebnf-reset-style' Reset current style. ;; -;; `ebnf-push-style' Push the current style and set STYLE to current style. +;; `ebnf-push-style' Push the current style and set STYLE as the current +;; style. ;; -;; `ebnf-pop-style' Pop a style and set it to current style. +;; `ebnf-pop-style' Pop a style and set it as the current style. ;; -;; These commands helps to put together a lot of variable settings in a group +;; These commands help to put together a lot of variable settings in a group ;; and name this group. So when you wish to apply these settings it's only ;; needed to give the name. ;; -;; There is also a notion of simple inheritance of style; so if you declare +;; There is also a notion of simple inheritance of style; so, if you declare ;; that a style A inherits from a style B, all settings of B is applied first ;; and then the settings of A is applied. This is useful when you wish to ;; modify some aspects of an existing style, but at same time wish to keep it @@ -994,6 +1088,17 @@ Please send all bug fixes and enhancements to ;; Acknowledgements ;; ---------------- ;; +;; Thanks to Drew Adams for suggestions: +;; - `ebnf-production-name-p', `ebnf-stop-on-error', +;; `ebnf-file-suffix-regexp'and `ebnf-special-show-delimiter' variables. +;; - `ebnf-delete-style', `ebnf-eps-file' and `ebnf-eps-directory' +;; commands. +;; - some docs fix. +;; +;; Thanks to Matthew K. Junker for the suggestion to deal +;; with some Bison features (%right, %left and %prec pragmas). His suggestion +;; was extended to deal with %nonassoc pragma too. +;; ;; Thanks to all who emailed comments. ;; ;; @@ -1007,6 +1112,22 @@ Please send all bug fixes and enhancements to (and (string< ps-print-version "5.2.3") (error "`ebnf2ps' requires `ps-print' package version 5.2.3 or later")) + +;; to avoid gripes with Emacs 20 +(eval-and-compile + (or (fboundp 'assq-delete-all) + (defun assq-delete-all (key alist) + "Delete from ALIST all elements whose car is KEY. +Return the modified alist. +Elements of ALIST that are not conses are ignored." + (let ((tail alist)) + (while tail + (if (and (consp (car tail)) + (eq (car (car tail)) key)) + (setq alist (delq (car tail) alist))) + (setq tail (cdr tail))) + alist)))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; User Variables: @@ -1140,6 +1261,12 @@ Valid values are: :group 'ebnf-displacement) +(defcustom ebnf-special-show-delimiter t + "*Non-nil means special delimiter (character `?') is shown." + :type 'boolean + :group 'ebnf-special) + + (defcustom ebnf-special-font '(7 Courier "Black" "Gray95" bold italic) "*Specify special font. @@ -1332,6 +1459,12 @@ See documentation for `ebnf-non-terminal-shape'." :group 'ebnf-terminal) +(defcustom ebnf-production-name-p t + "*Non-nil means production name will be printed." + :type 'boolean + :group 'ebnf-production) + + (defcustom ebnf-sort-production nil "*Specify how productions are sorted. @@ -1482,14 +1615,28 @@ Valid values are: |* * + `semi-up-hollow' `semi-up-full' + * * + |* |* + | * |X* + ==+==* ==+==* + + `semi-down-hollow' `semi-down-full' + ==+==* ==+==* + | * |X* + |* |* + * * + `user' See also documentation for variable `ebnf-user-arrow'. Any other value is treated as `none'." :type '(radio :tag "Arrow Shape" - (const none) (const semi-up) - (const semi-down) (const simple) - (const transparent) (const hollow) - (const full) (const user)) + (const none) (const semi-up) + (const semi-down) (const simple) + (const transparent) (const hollow) + (const full) (const semi-up-hollow) + (const semi-down-hollow) (const semi-up-full) + (const semi-down-full) (const user)) :group 'ebnf-shape) @@ -1553,6 +1700,10 @@ Valid values are: `ebnf-terminal-regexp', `ebnf-case-fold-search', `ebnf-lex-comment-char' and `ebnf-lex-eop-char'. + `abnf' ebnf2ps recognizes the syntax described in the URL: + `http://www.ietf.org/rfc/rfc2234.txt' + (\"Augmented BNF for Syntax Specifications: ABNF\"). + `iso-ebnf' ebnf2ps recognizes the syntax described in the URL: `http://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html' (\"International Standard of the ISO EBNF Notation\"). @@ -1565,9 +1716,18 @@ Valid values are: setting: `ebnf-yac-ignore-error-recovery'. + `ebnfx' ebnf2ps recognizes the syntax described in the URL: + `http://www.w3.org/TR/2004/REC-xml-20040204/#sec-notation' + (\"Extensible Markup Language (XML) 1.0 (Third Edition)\") + + `dtd' ebnf2ps recognizes the syntax described in the URL: + `http://www.w3.org/TR/2004/REC-xml-20040204/' + (\"Extensible Markup Language (XML) 1.0 (Third Edition)\") + Any other value is treated as `ebnf'." :type '(radio :tag "Syntax" - (const ebnf) (const iso-ebnf) (const yacc)) + (const ebnf) (const abnf) (const iso-ebnf) + (const yacc) (const ebnfx) (const dtd)) :group 'ebnf-syntactic) @@ -1638,6 +1798,14 @@ It's only used when `ebnf-syntax' is `iso-ebnf'." :group 'ebnf-syntactic) +(defcustom ebnf-file-suffix-regexp "\.[Bb][Nn][Ff]$" + "*Specify file name suffix that contains EBNF. + +See `ebnf-eps-directory' command." + :type 'regexp + :group 'ebnf2ps) + + (defcustom ebnf-eps-prefix "ebnf--" "*Specify EPS prefix file name. @@ -1704,6 +1872,12 @@ when executing ebnf2ps, set `ebnf-use-float-format' to nil." :group 'ebnf2ps) +(defcustom ebnf-stop-on-error nil + "*Non-nil means signal error and stop. Nil means signal error and continue." + :type 'boolean + :group 'ebnf2ps) + + (defcustom ebnf-yac-ignore-error-recovery nil "*Non-nil means ignore error recovery. @@ -1747,6 +1921,21 @@ The above optimizations are specially useful when `ebnf-syntax' is `yacc'." :group 'ebnf-optimization) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; To make this file smaller, some commands go in a separate file. +;; But autoload them here to make the separation invisible. +;; Autoload is here to avoid compilation gripes. + +(autoload 'ebnf-eliminate-empty-rules "ebnf-otz" + "Eliminate empty rules.") + +(autoload 'ebnf-optimize "ebnf-otz" + "Syntactic chart optimizer.") + +(autoload 'ebnf-otz-initialize "ebnf-otz" + "Initialize optimizer.") + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Customization @@ -1762,6 +1951,34 @@ The above optimizations are specially useful when `ebnf-syntax' is `yacc'." ;; User commands +;;;###autoload +(defun ebnf-print-directory (&optional directory) + "Generate and print a PostScript syntactic chart image of DIRECTORY. + +If DIRECTORY is nil, it's used `default-directory'. + +The files in DIRECTORY that matches `ebnf-file-suffix-regexp' (which see) are +processed. + +See also `ebnf-print-buffer'." + (interactive + (list (read-file-name "Directory containing EBNF files (print): " + nil default-directory))) + (ebnf-directory 'ebnf-print-buffer directory)) + + +;;;###autoload +(defun ebnf-print-file (file &optional do-not-kill-buffer-when-done) + "Generate and print a PostScript syntactic chart image of the file FILE. + +If optional arg DO-NOT-KILL-BUFFER-WHEN-DONE is non-nil, the buffer isn't +killed after process termination. + +See also `ebnf-print-buffer'." + (interactive "fEBNF file to generate PostScript and print from: ") + (ebnf-file 'ebnf-print-buffer file do-not-kill-buffer-when-done)) + + ;;;###autoload (defun ebnf-print-buffer (&optional filename) "Generate and print a PostScript syntactic chart image of the buffer. @@ -1788,6 +2005,34 @@ Like `ebnf-print-buffer', but prints just the current region." (ps-do-despool filename))) +;;;###autoload +(defun ebnf-spool-directory (&optional directory) + "Generate and spool a PostScript syntactic chart image of DIRECTORY. + +If DIRECTORY is nil, it's used `default-directory'. + +The files in DIRECTORY that matches `ebnf-file-suffix-regexp' (which see) are +processed. + +See also `ebnf-spool-buffer'." + (interactive + (list (read-file-name "Directory containing EBNF files (spool): " + nil default-directory))) + (ebnf-directory 'ebnf-spool-buffer directory)) + + +;;;###autoload +(defun ebnf-spool-file (file &optional do-not-kill-buffer-when-done) + "Generate and spool a PostScript syntactic chart image of the file FILE. + +If optional arg DO-NOT-KILL-BUFFER-WHEN-DONE is non-nil, the buffer isn't +killed after process termination. + +See also `ebnf-spool-buffer'." + (interactive "fEBNF file to generate PostScript and spool from: ") + (ebnf-file 'ebnf-spool-buffer file do-not-kill-buffer-when-done)) + + ;;;###autoload (defun ebnf-spool-buffer () "Generate and spool a PostScript syntactic chart image of the buffer. @@ -1809,6 +2054,34 @@ Use the command `ebnf-despool' to send the spooled images to the printer." (ebnf-generate-region from to 'ebnf-generate)) +;;;###autoload +(defun ebnf-eps-directory (&optional directory) + "Generate EPS files from EBNF files in DIRECTORY. + +If DIRECTORY is nil, it's used `default-directory'. + +The files in DIRECTORY that matches `ebnf-file-suffix-regexp' (which see) are +processed. + +See also `ebnf-eps-buffer'." + (interactive + (list (read-file-name "Directory containing EBNF files (EPS): " + nil default-directory))) + (ebnf-directory 'ebnf-eps-buffer directory)) + + +;;;###autoload +(defun ebnf-eps-file (file &optional do-not-kill-buffer-when-done) + "Generate an EPS file from EBNF file FILE. + +If optional arg DO-NOT-KILL-BUFFER-WHEN-DONE is non-nil, the buffer isn't +killed after EPS generation. + +See also `ebnf-eps-buffer'." + (interactive "fEBNF file to generate EPS file from: ") + (ebnf-file 'ebnf-eps-buffer file do-not-kill-buffer-when-done)) + + ;;;###autoload (defun ebnf-eps-buffer () "Generate a PostScript syntactic chart image of the buffer in a EPS file. @@ -1858,6 +2131,34 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." (defalias 'ebnf-despool 'ps-despool) +;;;###autoload +(defun ebnf-syntax-directory (&optional directory) + "Does a syntactic analysis of the files in DIRECTORY. + +If DIRECTORY is nil, it's used `default-directory'. + +The files in DIRECTORY that matches `ebnf-file-suffix-regexp' (which see) are +processed. + +See also `ebnf-syntax-buffer'." + (interactive + (list (read-file-name "Directory containing EBNF files (syntax): " + nil default-directory))) + (ebnf-directory 'ebnf-syntax-buffer directory)) + + +;;;###autoload +(defun ebnf-syntax-file (file &optional do-not-kill-buffer-when-done) + "Does a syntactic analysis of the FILE. + +If optional arg DO-NOT-KILL-BUFFER-WHEN-DONE is non-nil, the buffer isn't +killed after syntax checking. + +See also `ebnf-syntax-buffer'." + (interactive "fEBNF file to check syntax: ") + (ebnf-file 'ebnf-syntax-buffer file do-not-kill-buffer-when-done)) + + ;;;###autoload (defun ebnf-syntax-buffer () "Does a syntactic analysis of the current buffer." @@ -1883,7 +2184,8 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." " ;;; ebnf2ps.el version %s -\(setq ebnf-special-font %s +\(setq ebnf-special-show-delimiter %S + ebnf-special-font %s ebnf-special-shape %s ebnf-special-shadow %S ebnf-special-border-width %S @@ -1910,6 +2212,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." ebnf-non-terminal-shadow %S ebnf-non-terminal-border-width %S ebnf-non-terminal-border-color %S + ebnf-production-name-p %S ebnf-sort-production %s ebnf-production-font %s ebnf-arrow-shape %s @@ -1925,6 +2228,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." ebnf-syntax %s ebnf-iso-alternative-p %S ebnf-iso-normalize-p %S + ebnf-file-suffix-regexp %S ebnf-eps-prefix %S ebnf-entry-percentage %S ebnf-color-p %S @@ -1932,6 +2236,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." ebnf-line-color %S ebnf-debug-ps %S ebnf-use-float-format %S + ebnf-stop-on-error %S ebnf-yac-ignore-error-recovery %S ebnf-ignore-empty-rule %S ebnf-optimize %S) @@ -1939,6 +2244,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." ;;; ebnf2ps.el - end of settings " ebnf-version + ebnf-special-show-delimiter (ps-print-quote ebnf-special-font) (ps-print-quote ebnf-special-shape) ebnf-special-shadow @@ -1966,6 +2272,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." ebnf-non-terminal-shadow ebnf-non-terminal-border-width ebnf-non-terminal-border-color + ebnf-production-name-p (ps-print-quote ebnf-sort-production) (ps-print-quote ebnf-production-font) (ps-print-quote ebnf-arrow-shape) @@ -1981,6 +2288,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." (ps-print-quote ebnf-syntax) ebnf-iso-alternative-p ebnf-iso-normalize-p + ebnf-file-suffix-regexp ebnf-eps-prefix ebnf-entry-percentage ebnf-color-p @@ -1988,6 +2296,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." ebnf-line-color ebnf-debug-ps ebnf-use-float-format + ebnf-stop-on-error ebnf-yac-ignore-error-recovery ebnf-ignore-empty-rule ebnf-optimize)) @@ -2007,7 +2316,8 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." (defconst ebnf-style-custom-list - '(ebnf-special-font + '(ebnf-special-show-delimiter + ebnf-special-font ebnf-special-shape ebnf-special-shadow ebnf-special-border-width @@ -2034,6 +2344,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." ebnf-non-terminal-shadow ebnf-non-terminal-border-width ebnf-non-terminal-border-color + ebnf-production-name-p ebnf-sort-production ebnf-production-font ebnf-arrow-shape @@ -2049,6 +2360,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." ebnf-syntax ebnf-iso-alternative-p ebnf-iso-normalize-p + ebnf-file-suffix-regexp ebnf-eps-prefix ebnf-entry-percentage ebnf-color-p @@ -2056,6 +2368,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." ebnf-line-color ebnf-debug-ps ebnf-use-float-format + ebnf-stop-on-error ebnf-yac-ignore-error-recovery ebnf-ignore-empty-rule ebnf-optimize) @@ -2066,6 +2379,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." '(;; EBNF default (default nil + (ebnf-special-show-delimiter . t) (ebnf-special-font . '(7 Courier "Black" "Gray95" bold italic)) (ebnf-special-shape . 'bevel) (ebnf-special-shadow . nil) @@ -2093,6 +2407,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." (ebnf-non-terminal-shadow . nil) (ebnf-non-terminal-border-width . 1.0) (ebnf-non-terminal-border-color . "Black") + (ebnf-production-name-p . t) (ebnf-sort-production . nil) (ebnf-production-font . '(10 Helvetica "Black" "White" bold)) (ebnf-arrow-shape . 'hollow) @@ -2108,6 +2423,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." (ebnf-syntax . 'ebnf) (ebnf-iso-alternative-p . nil) (ebnf-iso-normalize-p . nil) + (ebnf-file-suffix-regexp . "\.[Bb][Nn][Ff]$") (ebnf-eps-prefix . "ebnf--") (ebnf-entry-percentage . 0.5) (ebnf-color-p . (or (fboundp 'x-color-values) ; Emacs @@ -2116,6 +2432,7 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." (ebnf-line-color . "Black") (ebnf-debug-ps . nil) (ebnf-use-float-format . t) + (ebnf-stop-on-error . nil) (ebnf-yac-ignore-error-recovery . nil) (ebnf-ignore-empty-rule . nil) (ebnf-optimize . nil)) @@ -2125,6 +2442,10 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." (ebnf-justify-sequence . 'left) (ebnf-lex-comment-char . ?\#) (ebnf-lex-eop-char . ?\;)) + ;; ABNF default + (abnf + default + (ebnf-syntax . 'abnf)) ;; ISO EBNF default (iso-ebnf default @@ -2133,24 +2454,44 @@ WARNING: It's *NOT* asked any confirmation to override an existing file." (yacc default (ebnf-syntax . 'yacc)) + ;; ebnfx default + (ebnfx + default + (ebnf-syntax . 'ebnfx)) + ;; dtd default + (dtd + default + (ebnf-syntax . 'dtd)) ) "Style database. Each element has the following form: - (CUSTOM INHERITS (VAR . VALUE)...) + (NAME INHERITS (VAR . VALUE)...) + +Where: + +NAME is a symbol name style. + +INHERITS is a symbol name style from which the current style inherits + the context. If INHERITS is nil, means that there is no + inheritance. + + This is a simple inheritance of style; so if you declare that a + style A inherits from a style B, all settings of B is applied + first and then the settings of A is applied. This is useful + when you wish to modify some aspects of an existing style, but + at same time wish to keep it unmodified. + +VAR is a valid ebnf2ps symbol custom variable. + See `ebnf-style-custom-list' for valid symbol variable. -CUSTOM is a symbol name style. -INHERITS is a symbol name style from which the current style inherits the -context. If INHERITS is nil, means that there is no inheritance. -VAR is a valid ebnf2ps symbol custom variable. See `ebnf-style-custom-list' -for valid symbol variable. -VALUE is a sexp which it'll be evaluated to set the value to VAR. So, don't -forget to quote symbols and constant lists. See `default' style for an -example. +VALUE is a sexp which it'll be evaluated to set the value to VAR. + So, don't forget to quote symbols and constant lists. + See `default' style for an example. -Don't handle this variable directly. Use functions `ebnf-insert-style' and -`ebnf-merge-style'.") +Don't handle this variable directly. Use functions `ebnf-insert-style', +`ebnf-delete-style' and `ebnf-merge-style'.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2159,8 +2500,10 @@ Don't handle this variable directly. Use functions `ebnf-insert-style' and ;;;###autoload (defun ebnf-insert-style (name inherits &rest values) - "Insert a new style NAME with inheritance INHERITS and values VALUES." - (interactive) + "Insert a new style NAME with inheritance INHERITS and values VALUES. + +See `ebnf-style-database' documentation." + (interactive "SStyle name: \nSStyle inherits from: \nXStyle values: ") (and (assoc name ebnf-style-database) (error "Style name already exists: %s" name)) (or (assoc inherits ebnf-style-database) @@ -2170,10 +2513,29 @@ Don't handle this variable directly. Use functions `ebnf-insert-style' and ebnf-style-database))) +;;;###autoload +(defun ebnf-delete-style (name) + "Delete style NAME. + +See `ebnf-style-database' documentation." + (interactive "SDelete style name: ") + (or (assoc name ebnf-style-database) + (error "Style name doesn't exist: %s" name)) + (let ((db ebnf-style-database)) + (while db + (and (eq (nth 1 (car db)) name) + (error "Style name `%s' is inherited by `%s' style" + name (nth 0 (car db)))) + (setq db (cdr db)))) + (setq ebnf-style-database (assq-delete-all name ebnf-style-database))) + + ;;;###autoload (defun ebnf-merge-style (name &rest values) - "Merge values of style NAME with style VALUES." - (interactive) + "Merge values of style NAME with style VALUES. + +See `ebnf-style-database' documentation." + (interactive "SStyle name: \nXStyle values: ") (let ((style (or (assoc name ebnf-style-database) (error "Style name does'nt exist: %s" name))) (merge (ebnf-check-style-values values)) @@ -2193,10 +2555,12 @@ Don't handle this variable directly. Use functions `ebnf-insert-style' and ;;;###autoload (defun ebnf-apply-style (style) - "Set STYLE to current style. + "Set STYLE as the current style. -It returns the old style symbol." - (interactive) +It returns the old style symbol. + +See `ebnf-style-database' documentation." + (interactive "SApply style: ") (prog1 ebnf-current-style (and (ebnf-apply-style1 style) @@ -2207,18 +2571,22 @@ It returns the old style symbol." (defun ebnf-reset-style (&optional style) "Reset current style. -It returns the old style symbol." - (interactive) +It returns the old style symbol. + +See `ebnf-style-database' documentation." + (interactive "SReset style: ") (setq ebnf-stack-style nil) (ebnf-apply-style (or style 'default))) ;;;###autoload (defun ebnf-push-style (&optional style) - "Push the current style and set STYLE to current style. + "Push the current style and set STYLE as the current style. -It returns the old style symbol." - (interactive) +It returns the old style symbol. + +See `ebnf-style-database' documentation." + (interactive "SPush style: ") (prog1 ebnf-current-style (setq ebnf-stack-style (cons ebnf-current-style ebnf-stack-style)) @@ -2228,9 +2596,11 @@ It returns the old style symbol." ;;;###autoload (defun ebnf-pop-style () - "Pop a style and set it to current style. + "Pop a style and set it as the current style. -It returns the old style symbol." +It returns the old style symbol. + +See `ebnf-style-database' documentation." (interactive) (prog1 (ebnf-apply-style (car ebnf-stack-style)) @@ -2249,7 +2619,7 @@ It returns the old style symbol." (defun ebnf-check-style-values (values) (let (style) (while values - (and (memq (car values) ebnf-style-custom-list) + (and (memq (caar values) ebnf-style-custom-list) (setq style (cons (car values) style))) (setq values (cdr values))) (nreverse style))) @@ -2297,14 +2667,18 @@ documentation.") (defconst ebnf-arrow-shape-alist - '((none . 0) - (semi-up . 1) - (semi-down . 2) - (simple . 3) - (transparent . 4) - (hollow . 5) - (full . 6) - (user . 7)) + '((none . 0) + (semi-up . 1) + (semi-down . 2) + (simple . 3) + (transparent . 4) + (hollow . 5) + (full . 6) + (semi-up-hollow . 7) + (semi-up-full . 8) + (semi-down-hollow . 9) + (semi-down-full . 10) + (user . 11)) "Alist associating values for `ebnf-arrow-shape'. See documentation for `ebnf-arrow-shape'.") @@ -2464,19 +2838,39 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and /ArrowPath{c newpath moveto Arrow closepath}bind def +/UpPath +{c newpath moveto + hT2 neg 0 rmoveto + 0 hT4 rlineto + hT2 hT4 neg rlineto + closepath +}bind def + +/DownPath +{c newpath moveto + hT2 neg 0 rmoveto + 0 hT4 neg rlineto + hT2 hT4 rlineto + closepath +}bind def + %>Right Arrow: RA % \\ % *---+ % / /RA-vector -[{} % 0 - none - {hT2 neg hT4 rlineto} % 1 - semi-up - {Down} % 2 - semi-down - {Arrow} % 3 - simple - {Gstroke ArrowPath} % 4 - transparent - {Gstroke ArrowPath 1 FillGray} % 5 - hollow - {Gstroke ArrowPath LineColor FillRGB} % 6 - full - {Gstroke gsave UserArrow grestore} % 7 - user +[{} % 0 - none + {hT2 neg hT4 rlineto} % 1 - semi-up + {Down} % 2 - semi-down + {Arrow} % 3 - simple + {Gstroke ArrowPath} % 4 - transparent + {Gstroke ArrowPath 1 FillGray} % 5 - hollow + {Gstroke ArrowPath LineColor FillRGB} % 6 - full + {Gstroke UpPath 1 FillGray} % 7 - semi-up-hollow + {Gstroke UpPath LineColor FillRGB} % 8 - semi-up-full + {Gstroke DownPath 1 FillGray} % 9 - semi-down-hollow + {Gstroke DownPath LineColor FillRGB} % 10 - semi-down-full + {Gstroke gsave UserArrow grestore} % 11 - user ]def /RA @@ -3168,10 +3562,11 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and {xyp neg yp add /yw exch def xp add T sub /xw exch def - /Effect EffectP def - /fP F ForegroundP SetRGB BackgroundP aload pop true BG S - /Effect 0 def - ( :) S false BG + dup length 0 gt % empty string ==> no production name + {/Effect EffectP def + /fP F ForegroundP SetRGB BackgroundP aload pop true BG S + /Effect 0 def + ( :) S false BG}if xw yw moveto hT EL RA xp yw moveto @@ -3594,6 +3989,10 @@ end (format ebnf-message-float value))) +(defvar ebnf-total 0) +(defvar ebnf-nprod 0) + + (defsubst ebnf-message-info (messag) (message "%s...%3d%%" messag @@ -3814,8 +4213,6 @@ end (defvar ebnf-tree nil) (defvar ebnf-direction "R") -(defvar ebnf-total 0) -(defvar ebnf-nprod 0) (defun ebnf-generate-postscript (from to) @@ -3907,11 +4304,15 @@ end (defun ebnf-generate-production (production) (ebnf-message-info "Generating") (run-hooks 'ebnf-production-hook) - (ps-output-string (ebnf-node-name production)) + (ps-output-string (if ebnf-production-name-p + (ebnf-node-name production) + "")) (ps-output " " (ebnf-format-float (ebnf-node-width production) - (+ ebnf-basic-height + (+ (if ebnf-production-name-p + ebnf-basic-height + 0.0) (ebnf-node-entry (ebnf-node-production production)))) " BOP\n") (ebnf-node-generation (ebnf-node-production production)) @@ -4100,6 +4501,35 @@ end ;; Internal functions +(defun ebnf-directory (fun &optional directory) + "Process files in DIRECTORY applying function FUN on each file. + +If DIRECTORY is nil, it's used `default-directory'. + +The files in DIRECTORY that matches `ebnf-file-suffix-regexp' (which see) are +processed." + (let ((files (directory-files (or directory default-directory) + t ebnf-file-suffix-regexp))) + (while files + (set-buffer (find-file-noselect (car files))) + (funcall fun) + (setq buffer-backed-up t) ; Do not back it up. + (save-buffer) ; Just save new version. + (kill-buffer (current-buffer)) + (setq files (cdr files))))) + + +(defun ebnf-file (fun file &optional do-not-kill-buffer-when-done) + "Process file FILE applying function FUN. + +If optional arg DO-NOT-KILL-BUFFER-WHEN-DONE is non-nil, the buffer isn't +killed after process termination." + (set-buffer (find-file-noselect file)) + (funcall fun) + (or do-not-kill-buffer-when-done + (kill-buffer (current-buffer)))) + + ;; function `ebnf-range-regexp' is used to avoid a bug of `skip-chars-forward' ;; on version 20.4.1, that is, it doesn't accept ranges like "\240-\377" (or ;; "\177-\237"), but it accepts the character sequence from \240 to \377 (or @@ -4141,6 +4571,7 @@ end (defun ebnf-generate-region (from to gen-func) (run-hooks 'ebnf-hook) (let ((ebnf-limit (max from to)) + (error-msg "SYNTAX") the-point) (save-excursion (save-restriction @@ -4148,20 +4579,38 @@ end (condition-case data (let ((tree (ebnf-parse-and-sort (min from to)))) (when gen-func - (funcall gen-func - (ebnf-dimensions - (ebnf-optimize - (ebnf-eliminate-empty-rules tree)))))) + (setq error-msg "EMPTY RULES" + tree (ebnf-eliminate-empty-rules tree)) + (setq error-msg "OPTMIZE" + tree (ebnf-optimize tree)) + (setq error-msg "DIMENSIONS" + tree (ebnf-dimensions tree)) + (setq error-msg "GENERATION") + (funcall gen-func tree)) + (setq error-msg nil)) ; here it's ok ;; handler ((quit error) (ding) - (setq the-point (max (1- (point)) (point-min))) - (message (error-message-string data))))))) + (setq the-point (max (1- (point)) (point-min)) + error-msg (concat error-msg ": " + (error-message-string data) + ", " + (and (string= error-msg "SYNTAX") + (format "at position %d " + the-point)) + (format "in buffer \"%s\"." + (buffer-name))))))))) (cond - (the-point - (goto-char the-point)) + ;; error occurred + (error-msg + (goto-char the-point) + (if ebnf-stop-on-error + (error error-msg) + (message error-msg))) + ;; generated output OK (gen-func nil) + ;; syntax checked OK (t (message "EBNF syntactic analysis: NO ERRORS."))))) @@ -4265,8 +4714,19 @@ end (ebnf-font-select font 'line-height)) +(defconst ebnf-syntax-alist + ;; 0.syntax 1.parser 2.initializer + '((iso-ebnf ebnf-iso-parser ebnf-iso-initialize) + (yacc ebnf-yac-parser ebnf-yac-initialize) + (abnf ebnf-abn-parser ebnf-abn-initialize) + (ebnf ebnf-bnf-parser ebnf-bnf-initialize) + (ebnfx ebnf-ebx-parser ebnf-ebx-initialize) + (dtd ebnf-dtd-parser ebnf-dtd-initialize)) + "Alist associating ebnf syntax with a parser and a initializer.") + + (defun ebnf-begin-job () - (ps-printing-region nil nil) + (ps-printing-region nil nil nil) (if ebnf-use-float-format (setq ebnf-format-float "%1.3f" ebnf-message-float "%3.2f") @@ -4274,15 +4734,10 @@ end ebnf-message-float "%s")) (ebnf-otz-initialize) ;; to avoid compilation gripes when calling autoloaded functions - (funcall (cond ((eq ebnf-syntax 'iso-ebnf) - (setq ebnf-parser-func 'ebnf-iso-parser) - 'ebnf-iso-initialize) - ((eq ebnf-syntax 'yacc) - (setq ebnf-parser-func 'ebnf-yac-parser) - 'ebnf-yac-initialize) - (t - (setq ebnf-parser-func 'ebnf-bnf-parser) - 'ebnf-bnf-initialize))) + (let ((init (or (assoc ebnf-syntax ebnf-syntax-alist) + (assoc 'ebnf ebnf-syntax-alist)))) + (setq ebnf-parser-func (nth 1 init)) + (funcall (nth 2 init))) (and ebnf-terminal-regexp ; ensures that it's a string or nil (not (stringp ebnf-terminal-regexp)) (setq ebnf-terminal-regexp nil)) @@ -4364,52 +4819,53 @@ end (defun ebnf-eps-finish-and-write (buffer filename) - (save-excursion - (set-buffer buffer) - (setq ebnf-eps-upper-x (max ebnf-eps-upper-x ebnf-eps-max-width) - ebnf-eps-upper-y (if (zerop ebnf-eps-upper-y) - ebnf-eps-max-height - (+ ebnf-eps-upper-y - ebnf-production-vertical-space - ebnf-eps-max-height))) - ;; prologue - (goto-char (point-min)) - (insert - "%!PS-Adobe-3.0 EPSF-3.0" - "\n%%BoundingBox: 0 0 " - (format "%d %d" (1+ ebnf-eps-upper-x) (1+ ebnf-eps-upper-y)) - "\n%%Title: " filename - "\n%%CreationDate: " (format-time-string "%T %b %d %Y") - "\n%%Creator: " (user-full-name) " (using ebnf2ps v" ebnf-version ")" - "\n%%DocumentNeededResources: font " - (or ebnf-fonts-required - (setq ebnf-fonts-required - (mapconcat 'identity - (ps-remove-duplicates - (mapcar 'ebnf-font-name-select - (list ebnf-production-font - ebnf-terminal-font - ebnf-non-terminal-font - ebnf-special-font - ebnf-except-font - ebnf-repeat-font))) - "\n%%+ font "))) - "\n%%Pages: 0\n%%EndComments\n\n%%BeginProlog\n" - ebnf-eps-prologue) - (ebnf-insert-ebnf-prologue) - (insert ebnf-eps-begin - "\n0 " (ebnf-format-float - (- ebnf-eps-upper-y (* ebnf-font-height-P 0.7))) - " #ebnf2ps#begin\n") - ;; epilogue - (goto-char (point-max)) - (insert ebnf-eps-end) - ;; write file - (message "Saving...") - (setq filename (expand-file-name filename)) - (let ((coding-system-for-write 'raw-text-unix)) - (write-region (point-min) (point-max) filename)) - (message "Wrote %s" filename))) + (when (buffer-modified-p buffer) + (save-excursion + (set-buffer buffer) + (setq ebnf-eps-upper-x (max ebnf-eps-upper-x ebnf-eps-max-width) + ebnf-eps-upper-y (if (zerop ebnf-eps-upper-y) + ebnf-eps-max-height + (+ ebnf-eps-upper-y + ebnf-production-vertical-space + ebnf-eps-max-height))) + ;; prologue + (goto-char (point-min)) + (insert + "%!PS-Adobe-3.0 EPSF-3.0" + "\n%%BoundingBox: 0 0 " + (format "%d %d" (1+ ebnf-eps-upper-x) (1+ ebnf-eps-upper-y)) + "\n%%Title: " filename + "\n%%CreationDate: " (format-time-string "%T %b %d %Y") + "\n%%Creator: " (user-full-name) " (using ebnf2ps v" ebnf-version ")" + "\n%%DocumentNeededResources: font " + (or ebnf-fonts-required + (setq ebnf-fonts-required + (mapconcat 'identity + (ps-remove-duplicates + (mapcar 'ebnf-font-name-select + (list ebnf-production-font + ebnf-terminal-font + ebnf-non-terminal-font + ebnf-special-font + ebnf-except-font + ebnf-repeat-font))) + "\n%%+ font "))) + "\n%%Pages: 0\n%%EndComments\n\n%%BeginProlog\n" + ebnf-eps-prologue) + (ebnf-insert-ebnf-prologue) + (insert ebnf-eps-begin + "\n0 " (ebnf-format-float + (- ebnf-eps-upper-y (* ebnf-font-height-P 0.7))) + " #ebnf2ps#begin\n") + ;; epilogue + (goto-char (point-max)) + (insert ebnf-eps-end) + ;; write file + (message "Saving...") + (setq filename (expand-file-name filename)) + (let ((coding-system-for-write 'raw-text-unix)) + (write-region (point-min) (point-max) filename)) + (message "Wrote %s" filename)))) (defun ebnf-insert-ebnf-prologue () @@ -4586,12 +5042,16 @@ end (ebnf-message-info "Calculating dimensions") (ebnf-node-dimension-func (ebnf-node-production production)) (let* ((prod (ebnf-node-production production)) - (height (+ ebnf-font-height-P + (height (+ (if ebnf-production-name-p + ebnf-font-height-P + 0.0) + ebnf-line-width ebnf-line-width ebnf-basic-height (ebnf-node-height prod)))) (ebnf-node-entry production height) (ebnf-node-height production height) (ebnf-node-width production (+ (ebnf-node-width prod) + ebnf-line-width ebnf-horizontal-space)))) @@ -4848,7 +5308,7 @@ end ;; [one-or-more width-fun dim-fun entry height width element separator] ;; [zero-or-more width-fun dim-fun entry height width element separator] -(defun ebnf-list-width (or-more width) +(defun ebnf-element-width (or-more width) (setq width (- width ebnf-horizontal-space)) (ebnf-node-list or-more (ebnf-justify-list or-more @@ -4879,7 +5339,10 @@ end ;; right justify terms ((eq ebnf-justify-sequence 'right) (ebnf-justify node seq seq-width width nil)) - ;; centralize terms + ;; centralize terms -- element + ((vectorp seq) + (ebnf-adjust-width seq width)) + ;; centralize terms -- list (t (let ((the-width (/ (- width seq-width) (length seq))) (lis seq)) @@ -5038,10 +5501,11 @@ end 0.0 0.0 (let ((len (length name))) - (cond ((> len 2) name) - ((= len 2) (concat " " name)) - ((= len 1) (concat " " name " ")) - (t " "))) + (cond ((> len 3) name) + ((= len 3) (concat name " ")) + ((= len 2) (concat " " name " ")) + ((= len 1) (concat " " name " ")) + (t " "))) ebnf-default-p)) @@ -5061,7 +5525,7 @@ end (defun ebnf-make-or-more1 (gen-func dim-func list-part sep-part) (vector gen-func - 'ebnf-list-width + 'ebnf-element-width dim-func 0.0 0.0 @@ -5117,14 +5581,25 @@ end exception)) -(defun ebnf-make-repeat (times primary) +(defun ebnf-make-repeat (times primary &optional upper) (vector 'ebnf-generate-repeat 'ignore 'ebnf-repeat-dimension 0.0 0.0 0.0 - (concat times " *") + (cond ((and times upper) ; L * U, L * L + (if (string= times upper) + (if (string= times "") + " * " + times) + (concat times " * " upper))) + (times ; L * + (concat times " *")) + (upper ; * U + (concat "* " upper)) + (t ; * + " * ")) primary)) @@ -5196,13 +5671,13 @@ end ))))) -(defun ebnf-token-repeat (times repeat) +(defun ebnf-token-repeat (times repeat &optional upper) (if (null (cdr repeat)) ;; n * EMPTY ==> EMPTY repeat ;; n * term (cons (car repeat) - (ebnf-make-repeat times (cdr repeat))))) + (ebnf-make-repeat times (cdr repeat) upper)))) (defun ebnf-token-optional (body) @@ -5243,6 +5718,20 @@ end (cons seq body) body)))))))) + +(defun ebnf-token-sequence (sequence) + (cond + ;; null sequence + ((null sequence) + (ebnf-make-empty)) + ;; sequence with only one element + ((= (length sequence) 1) + (car sequence)) + ;; a real sequence + (t + (ebnf-make-sequence (nreverse sequence))) + )) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Variables used by parsers @@ -5253,6 +5742,7 @@ end ;; Override special comment character: (aset table ?< 'newline) (aset table ?> 'keep-line) + (aset table ?^ 'form-feed) table) "Vector used to map characters to a special comment token.") @@ -5261,6 +5751,12 @@ end ;; To make this file smaller, some commands go in a separate file. ;; But autoload them here to make the separation invisible. +(autoload 'ebnf-abn-parser "ebnf-abn" + "ABNF parser.") + +(autoload 'ebnf-abn-initialize "ebnf-abn" + "Initialize ABNF token table.") + (autoload 'ebnf-bnf-parser "ebnf-bnf" "EBNF parser.") @@ -5279,14 +5775,17 @@ end (autoload 'ebnf-yac-initialize "ebnf-yac" "Initializations for Yacc/Bison parser.") -(autoload 'ebnf-eliminate-empty-rules "ebnf-otz" - "Eliminate empty rules.") +(autoload 'ebnf-ebx-parser "ebnf-ebx" + "EBNFX parser.") -(autoload 'ebnf-optimize "ebnf-otz" - "Syntactic chart optimizer.") +(autoload 'ebnf-ebx-initialize "ebnf-ebx" + "Initializations for EBNFX parser.") -(autoload 'ebnf-otz-initialize "ebnf-otz" - "Initialize optimizer.") +(autoload 'ebnf-dtd-parser "ebnf-dtd" + "DTD parser.") + +(autoload 'ebnf-dtd-initialize "ebnf-dtd" + "Initializations for DTD parser.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -5294,4 +5793,5 @@ end (provide 'ebnf2ps) +;;; arch-tag: 148bc8af-5398-468b-b922-eeb7afef3e4f ;;; ebnf2ps.el ends here diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index e75022993c..478ce403b3 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -2227,7 +2227,7 @@ See 'Electric-command-loop' for a description of STATE and CONDITION." ;;; Member mode -;;###autoload +;;;###autoload (defun ebrowse-member-mode () "Major mode for Ebrowse member buffers. @@ -3397,28 +3397,28 @@ definition." (ebrowse-push-position (point-marker) info t)))) -;;###autoload +;;;###autoload (defun ebrowse-tags-view-declaration () "View declaration of member at point." (interactive) (ebrowse-tags-view/find-member-decl/defn 0 :view t :definition nil)) -;;###autoload +;;;###autoload (defun ebrowse-tags-find-declaration () "Find declaration of member at point." (interactive) (ebrowse-tags-view/find-member-decl/defn 0 :view nil :definition nil)) -;;###autoload +;;;###autoload (defun ebrowse-tags-view-definition () "View definition of member at point." (interactive) (ebrowse-tags-view/find-member-decl/defn 0 :view t :definition t)) -;;###autoload +;;;###autoload (defun ebrowse-tags-find-definition () "Find definition of member at point." (interactive) @@ -3431,21 +3431,21 @@ definition." (ebrowse-tags-view/find-member-decl/defn 4 :view t :definition nil)) -;;###autoload +;;;###autoload (defun ebrowse-tags-find-declaration-other-window () "Find declaration of member at point in other window." (interactive) (ebrowse-tags-view/find-member-decl/defn 4 :view nil :definition nil)) -;;###autoload +;;;###autoload (defun ebrowse-tags-view-definition-other-window () "View definition of member at point in other window." (interactive) (ebrowse-tags-view/find-member-decl/defn 4 :view t :definition t)) -;;###autoload +;;;###autoload (defun ebrowse-tags-find-definition-other-window () "Find definition of member at point in other window." (interactive) @@ -3458,21 +3458,21 @@ definition." (ebrowse-tags-view/find-member-decl/defn 5 :view t :definition nil)) -;;###autoload +;;;###autoload (defun ebrowse-tags-find-declaration-other-frame () "Find definition of member at point in other frame." (interactive) (ebrowse-tags-view/find-member-decl/defn 5 :view nil :definition nil)) -;;###autoload +;;;###autoload (defun ebrowse-tags-view-definition-other-frame () "View definition of member at point in other frame." (interactive) (ebrowse-tags-view/find-member-decl/defn 5 :view t :definition t)) -;;###autoload +;;;###autoload (defun ebrowse-tags-find-definition-other-frame () "Find definition of member at point in other frame." (interactive) @@ -3779,7 +3779,7 @@ TREE-BUFFER if indirectly specifies which files to loop over." (goto-char (point-min)))) -;;###autoload +;;;###autoload (defun ebrowse-tags-search (regexp) "Search for REGEXP in all files in a tree. If marked classes exist, process marked classes, only. @@ -4492,4 +4492,5 @@ EVENT is the mouse event." ;;; eval:(put 'ebrowse-for-all-trees 'lisp-indent-hook 1) ;;; End: +;;; arch-tag: 4fa3c8bf-1771-479b-bcd7-b029c7c9677b ;;; ebrowse.el ends here diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 8860cc3ceb..ef5d1eba99 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -2048,4 +2048,5 @@ for \\[find-tag] (which see)." (provide 'etags) +;;; arch-tag: b897c2b5-08f3-4837-b2d3-0e7d6db1b63e ;;; etags.el ends here diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index 4255cb973c..a5d401a5f5 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el @@ -1,6 +1,6 @@ ;;; executable.el --- base functionality for executable interpreter scripts -*- byte-compile-dynamic: t -*- -;; Copyright (C) 1994, 1995, 1996, 2000, 2003 by Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 1996, 2000, 2003, 2004 by Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer ;; Keywords: languages, unix @@ -140,6 +140,27 @@ See `compilation-error-regexp-alist'.") ;; The C function openp slightly modified would do the trick fine (defvaralias 'executable-binary-suffixes 'exec-suffixes) +;;;###autoload +(defun executable-command-find-posix-p (&optional program) + "Check if PROGRAM handles arguments Posix-style. +If PROGRAM is non-nil, use that instead of \"find\"." + ;; Pick file to search from location we know + (let* ((dir (file-truename data-directory)) + (file (car (directory-files dir nil "^[^.]")))) + (with-temp-buffer + (call-process (or program "find") + nil + (current-buffer) + nil + dir + "-name" + file + "-maxdepth" + "1") + (goto-char (point-min)) + (if (search-forward file nil t) + t)))) + ;;;###autoload (defun executable-find (command) "Search for COMMAND in `exec-path' and return the absolute file name. @@ -280,4 +301,5 @@ file modes." (provide 'executable) +;;; arch-tag: 58458d1c-d9db-45ec-942b-8bbb1d5e319d ;;; executable.el ends here diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 9a94b1dfb9..11553a1fdb 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -1,6 +1,6 @@ ;;; f90.el --- Fortran-90 mode (free format) -;; Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1996, 1997, 2000, 2004 Free Software Foundation, Inc. ;; Author: Torbj\"orn Einarsson ;; Maintainer: Glenn Morris @@ -224,7 +224,10 @@ whether to blink the matching beginning." :group 'f90) (defcustom f90-break-delimiters "[-+\\*/><=,% \t]" - "*Regexp holding list of delimiters at which lines may be broken." + "*Regexp matching delimiter characters at which lines may be broken. +There are certain tokens comprised entirely of characters +matching this regexp that should not be split, and these are +specified by the constant `f90-no-break-re'." :type 'regexp :group 'f90) @@ -574,8 +577,12 @@ Can be overridden by the value of `font-lock-maximum-decoration'.") "Regexp matching the definition of a derived type.") (defconst f90-no-break-re - (regexp-opt '("**" "//" "=>") 'paren) - "Regexp specifying where not to break lines when filling.") + (regexp-opt '("**" "//" "=>" ">=" "<=" "==" "/=") 'paren) + "Regexp specifying where not to break lines when filling. +This regexp matches certain tokens comprised entirely of +characters matching the regexp `f90-break-delimiters' that should +not be split by filling. Each element is assumed to be two +characters long.") (defvar f90-cache-position nil "Temporary position used to speed up region operations.") @@ -1793,4 +1800,5 @@ CHANGE-WORD should be one of 'upcase-word, 'downcase-word, 'capitalize-word." (provide 'f90) +;;; arch-tag: fceac97c-c147-44bd-aec0-172d4b560ef8 ;;; f90.el ends here diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 13da290617..f23eabe6e9 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -1,6 +1,6 @@ ;;; fortran.el --- Fortran mode for GNU Emacs -;; Copyright (c) 1986, 93, 94, 95, 97, 98, 99, 2000, 01, 2003 +;; Copyright (c) 1986, 93, 94, 95, 97, 98, 99, 2000, 01, 03, 04 ;; Free Software Foundation, Inc. ;; Author: Michael D. Prange @@ -237,10 +237,25 @@ See the variable `fortran-column-ruler-fixed' for fixed format mode." (defcustom fortran-break-before-delimiters t "*Non-nil causes filling to break lines before delimiters. -Delimiters are whitespace, commas, quotes, and operators." +Delimiters are characters matching the regexp `fortran-break-delimiters-re'." :type 'boolean :group 'fortran) +(defconst fortran-break-delimiters-re "[-+*/><=, \t]" + "Regexp matching delimiter characters at which lines may be broken. +There are certain tokens comprised entirely of characters +matching this regexp that should not be split, and these are +specified by the constant `fortran-no-break-re'.") + +;; The ">=", etc F77 extensions are supported by g77. +(defconst fortran-no-break-re + (regexp-opt '("**" "//" "=>" ">=" "<=" "==" "/=") 'paren) + "Regexp specifying where not to break lines when filling. +This regexp matches certain tokens comprised entirely of +characters matching the regexp `fortran-break-delimiters-re' that should +not be split by filling. Each element is assumed to be two +characters long.") + (defcustom fortran-mode-hook nil "Hook run when entering Fortran mode." :type 'hook @@ -1646,56 +1661,68 @@ If ALL is nil, only match comments that start in column > 0." (bol (line-beginning-position)) (eol (line-end-position)) (bos (min eol (+ bol (fortran-current-line-indentation)))) + ;; If in a string at fill-column, break it either before the + ;; initial quote, or at fill-col (if string is too long). (quote (save-excursion (goto-char bol) ;; OK to break quotes on comment lines. (unless (looking-at fortran-comment-line-start-skip) (let (fcpoint start) - (move-to-column fill-column) - (when (fortran-is-in-string-p (setq fcpoint (point))) - (save-excursion - (re-search-backward "\\S\"\\s\"\\S\"" bol t) - (setq start - (if fortran-break-before-delimiters - (point) - (1+ (point))))) - (if (re-search-forward "\\S\"\\s\"\\S\"" eol t) - (backward-char 2)) - ;; If the current string is longer than 72 - 6 chars, - ;; break it at the fill column (else infinite loop). - (if (> (- (point) start) - (- fill-column 6 fortran-continuation-indent)) - fcpoint - start)))))) + (move-to-column fill-column) + (when (fortran-is-in-string-p (setq fcpoint (point))) + (save-excursion + (re-search-backward "\\S\"\\s\"\\S\"?" bol t) + (setq start + (if fortran-break-before-delimiters + (point) + (1+ (point))))) + (if (re-search-forward "\\S\"\\s\"\\S\"" eol t) + (backward-char 2)) + ;; If the current string is longer than 72 - 6 chars, + ;; break it at the fill column (else infinite loop). + (if (> (- (point) start) + (- fill-column 6 fortran-continuation-indent)) + fcpoint + start)))))) ;; Decide where to split the line. If a position for a quoted ;; string was found above then use that, else break the line - ;; before the last delimiter. - ;; Delimiters are whitespace, commas, and operators. - ;; Will break before a pair of *'s. + ;; before/after the last delimiter. (fill-point (or quote (save-excursion - (move-to-column (1+ fill-column)) - ;; GM Make this a defcustom as in f90-mode? Add ", (? - (skip-chars-backward "^ \t\n,'+-/*=)" -;;; (if fortran-break-before-delimiters -;;; "^ \t\n,'+-/*=" "^ \t\n,'+-/*=)") - ) - (when (<= (point) (1+ bos)) + ;; If f-b-b-d is t, have an extra column to play with, + ;; since delimiter gets shifted to new line. + (move-to-column (if fortran-break-before-delimiters + (1+ fill-column) + fill-column)) + (let ((repeat t)) + (while repeat + (setq repeat nil) + ;; Adapted from f90-find-breakpoint. + (re-search-backward fortran-break-delimiters-re + (line-beginning-position)) + (if (not fortran-break-before-delimiters) + (if (looking-at fortran-no-break-re) + ;; Deal with cases such as "**" split over + ;; fill-col. Simpler alternative would be + ;; to start from (1- fill-column) above. + (if (> (+ 2 (current-column)) fill-column) + (setq repeat t) + (forward-char 2)) + (forward-char 1)) + (backward-char) + (or (looking-at fortran-no-break-re) + (forward-char))))) + ;; Line indented beyond fill-column? + (when (<= (point) bos) (move-to-column (1+ fill-column)) ;; What is this doing??? (or (re-search-forward "[\t\n,'+-/*)=]" eol t) (goto-char bol))) (if (bolp) - (re-search-forward "[ \t]" opoint t) - (backward-char) - (if (looking-at "\\s\"") - (forward-char) - (skip-chars-backward " \t\*"))) - (if fortran-break-before-delimiters - (point) - (1+ (point))))))) + (re-search-forward "[ \t]" opoint t)) + (point))))) ;; If we are in an in-line comment, don't break unless the ;; line of code is longer than it should be. Otherwise ;; break the line at the column computed above. @@ -1842,4 +1869,5 @@ Supplying prefix arg DO-SPACE prevents stripping the whitespace." (provide 'fortran) +;;; arch-tag: 74935096-21c4-4cab-8ee5-6ef16090dc04 ;;; fortran.el ends here diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el new file mode 100644 index 0000000000..5163471f47 --- /dev/null +++ b/lisp/progmodes/gdb-ui.el @@ -0,0 +1,1990 @@ +;;; gdb-ui.el --- User Interface for running GDB + +;; Author: Nick Roberts +;; Maintainer: FSF +;; Keywords: unix, tools + +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This mode acts as a graphical user interface to GDB. You can interact with +;; GDB through the GUD buffer in the usual way, but there are also further +;; buffers which control the execution and describe the state of your program. +;; It separates the input/output of your program from that of GDB, if +;; required, and displays expressions and their current values in their own +;; buffers. It also uses features of Emacs 21 such as the display margin for +;; breakpoints, and the toolbar (see the GDB Graphical Interface section in +;; the Emacs info manual). + +;; Start the debugger with M-x gdba. + +;; This file has evolved from gdba.el from GDB 5.0 written by Tom Lord and Jim +;; Kingdon and uses GDB's annotation interface. You don't need to know about +;; annotations to use this mode as a debugger, but if you are interested +;; developing the mode itself, then see the Annotations section in the GDB +;; info manual. Some GDB/MI commands are also used through th CLI command +;; 'interpreter mi '. +;; +;; Known Bugs: +;; + +;;; Code: + +(require 'gud) + +(defvar gdb-current-address "main" "Initialisation for Assembler buffer.") +(defvar gdb-previous-address nil) +(defvar gdb-previous-frame nil) +(defvar gdb-current-frame "main") +(defvar gdb-current-language nil) +(defvar gdb-view-source t "Non-nil means that source code can be viewed.") +(defvar gdb-selected-view 'source "Code type that user wishes to view.") +(defvar gdb-var-list nil "List of variables in watch window") +(defvar gdb-var-changed nil "Non-nil means that gdb-var-list has changed.") +(defvar gdb-buffer-type nil) +(defvar gdb-overlay-arrow-position nil) +(defvar gdb-variables '() + "A list of variables that are local to the GUD buffer.") + +;;;###autoload +(defun gdba (command-line) + "Run gdb on program FILE in buffer *gud-FILE*. +The directory containing FILE becomes the initial working directory +and source-file directory for your debugger. + +If `gdb-many-windows' is nil (the default value) then gdb just +pops up the GUD buffer unless `gdb-show-main' is t. In this case +it starts with two windows: one displaying the GUD buffer and the +other with the source file with the main routine of the debugee. + +If `gdb-many-windows' is t the layout below will appear +regardless of the value of `gdb-show-main' unless +`gdb-use-inferior-io-buffer' is nil when the source buffer +occupies the full width of the frame. Keybindings are given in +relevant buffer. + +--------------------------------------------------------------------- + GDB Toolbar +--------------------------------------------------------------------- +GUD buffer (I/O of GDB) | Locals buffer + | + | + | +--------------------------------------------------------------------- +Source buffer | Input/Output (of debugee) buffer + | (comint-mode) + | + | + | + | + | + | +--------------------------------------------------------------------- +Stack buffer | Breakpoints buffer + RET gdb-frames-select | SPC gdb-toggle-breakpoint + | RET gdb-goto-breakpoint + | d gdb-delete-breakpoint +--------------------------------------------------------------------- + +All the buffers share the toolbar and source should always display in the same +window e.g after typing g on a breakpoint in the breakpoints buffer. Breakpoint +icons are displayed both by setting a break with gud-break and by typing break +in the GUD buffer. + +This works best (depending on the size of your monitor) using most of the +screen. + +Displayed expressions appear in separate frames. Arrays may be displayed +as slices and visualised using the graph program from plotutils if installed. +Pointers in structures may be followed in a tree-like fashion. + +The following interactive lisp functions help control operation : + +`gdb-many-windows' - Toggle the number of windows gdb uses. +`gdb-restore-windows' - To restore the window layout." + ;; + (interactive (list (gud-query-cmdline 'gdba))) + ;; + ;; Let's start with a basic gud-gdb buffer and then modify it a bit. + (gdb command-line) + (gdb-ann3)) + +(defvar gdb-debug-log nil) + +(defcustom gdb-enable-debug-log nil + "Non-nil means record the process input and output in `gdb-debug-log'." + :type 'boolean + :group 'gud) + +(defcustom gdb-use-inferior-io-buffer nil + "Non-nil means display output from the inferior in a separate buffer." + :type 'boolean + :group 'gud) + +(defun gdb-ann3 () + (setq gdb-debug-log nil) + (set (make-local-variable 'gud-minor-mode) 'gdba) + (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) + ;; + (gud-def gud-break (if (not (string-equal mode-name "Machine")) + (gud-call "break %f:%l" arg) + (save-excursion + (beginning-of-line) + (forward-char 2) + (gud-call "break *%a" arg))) + "\C-b" "Set breakpoint at current line or address.") + ;; + (gud-def gud-remove (if (not (string-equal mode-name "Machine")) + (gud-call "clear %f:%l" arg) + (save-excursion + (beginning-of-line) + (forward-char 2) + (gud-call "clear *%a" arg))) + "\C-d" "Remove breakpoint at current line or address.") + ;; + (gud-def gud-until (if (not (string-equal mode-name "Machine")) + (gud-call "until %f:%l" arg) + (save-excursion + (beginning-of-line) + (forward-char 2) + (gud-call "until *%a" arg))) + "\C-u" "Continue to current line or address.") + + (define-key gud-minor-mode-map [left-margin mouse-1] + 'gdb-mouse-toggle-breakpoint) + (define-key gud-minor-mode-map [left-fringe mouse-1] + 'gdb-mouse-toggle-breakpoint) + + (setq comint-input-sender 'gdb-send) + ;; + ;; (re-)initialise + (setq gdb-current-address "main") + (setq gdb-previous-address nil) + (setq gdb-previous-frame nil) + (setq gdb-current-frame "main") + (setq gdb-view-source t) + (setq gdb-selected-view 'source) + (setq gdb-var-list nil) + (setq gdb-var-changed nil) + (setq gdb-first-prompt nil) + ;; + (mapc 'make-local-variable gdb-variables) + (setq gdb-buffer-type 'gdba) + ;; + (if gdb-use-inferior-io-buffer (gdb-clear-inferior-io)) + ;; + (if (eq window-system 'w32) + (gdb-enqueue-input (list "set new-console off\n" 'ignore))) + (gdb-enqueue-input (list "set height 0\n" 'ignore)) + ;; find source file and compilation directory here + (gdb-enqueue-input (list "server list main\n" 'ignore)) ; C program + (gdb-enqueue-input (list "server list MAIN__\n" 'ignore)) ; Fortran program + (gdb-enqueue-input (list "server info source\n" 'gdb-source-info)) + ;; + (run-hooks 'gdba-mode-hook)) + +(defcustom gdb-use-colon-colon-notation nil + "Non-nil means use FUNCTION::VARIABLE format to display variables in the +speedbar." + :type 'boolean + :group 'gud) + +(defun gud-watch () + "Watch expression at point." + (interactive) + (require 'tooltip) + (let ((expr (tooltip-identifier-from-point (point)))) + (if (and (string-equal gdb-current-language "c") + gdb-use-colon-colon-notation) + (setq expr (concat gdb-current-frame "::" expr))) + (catch 'already-watched + (dolist (var gdb-var-list) + (if (string-equal expr (car var)) (throw 'already-watched nil))) + (set-text-properties 0 (length expr) nil expr) + (gdb-enqueue-input + (list (concat "server interpreter mi \"-var-create - * " expr "\"\n") + `(lambda () (gdb-var-create-handler ,expr)))))) + (select-window (get-buffer-window gud-comint-buffer))) + +(defconst gdb-var-create-regexp +"name=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\",type=\"\\(.*?\\)\"") + +(defun gdb-var-create-handler (expr) + (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) + (goto-char (point-min)) + (if (re-search-forward gdb-var-create-regexp nil t) + (let ((var (list expr + (match-string 1) + (match-string 2) + (match-string 3) + nil nil))) + (push var gdb-var-list) + (setq speedbar-update-flag t) + (speedbar 1) + (if (equal (nth 2 var) "0") + (gdb-enqueue-input + (list (concat "server interpreter mi \"-var-evaluate-expression " + (nth 1 var) "\"\n") + `(lambda () (gdb-var-evaluate-expression-handler + ,(nth 1 var) nil)))) + (setq gdb-var-changed t))) + (if (re-search-forward "Undefined command" nil t) + (message "Watching expressions requires gdb 6.0 onwards") + (message "No symbol %s in current context." expr))))) + +(defun gdb-var-evaluate-expression-handler (varnum changed) + (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) + (goto-char (point-min)) + (re-search-forward ".*value=\"\\(.*?\\)\"" nil t) + (catch 'var-found + (let ((var-list nil) (num 0)) + (dolist (var gdb-var-list) + (if (string-equal varnum (cadr var)) + (progn + (if changed (setcar (nthcdr 5 var) t)) + (setcar (nthcdr 4 var) (match-string 1)) + (setcar (nthcdr num gdb-var-list) var) + (throw 'var-found nil))) + (setq num (+ num 1)))))) + (setq gdb-var-changed t)) + +(defun gdb-var-list-children (varnum) + (gdb-enqueue-input + (list (concat "server interpreter mi \"-var-list-children " varnum "\"\n") + `(lambda () (gdb-var-list-children-handler ,varnum))))) + +(defconst gdb-var-list-children-regexp +"name=\"\\(.*?\\)\",exp=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\"") + +(defun gdb-var-list-children-handler (varnum) + (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) + (goto-char (point-min)) + (let ((var-list nil)) + (catch 'child-already-watched + (dolist (var gdb-var-list) + (if (string-equal varnum (cadr var)) + (progn + (push var var-list) + (while (re-search-forward gdb-var-list-children-regexp nil t) + (let ((varchild (list (match-string 2) + (match-string 1) + (match-string 3) + nil nil nil))) + (if (looking-at ",type=\"\\(.*?\\)\"") + (setcar (nthcdr 3 varchild) (match-string 1))) + (dolist (var1 gdb-var-list) + (if (string-equal (cadr var1) (cadr varchild)) + (throw 'child-already-watched nil))) + (push varchild var-list) + (if (equal (nth 2 varchild) "0") + (gdb-enqueue-input + (list + (concat + "server interpreter mi \"-var-evaluate-expression " + (nth 1 varchild) "\"\n") + `(lambda () (gdb-var-evaluate-expression-handler + ,(nth 1 varchild) nil)))))))) + (push var var-list))) + (setq gdb-var-list (nreverse var-list)))))) + +(defun gdb-var-update () + (if (not (member 'gdb-var-update (gdb-get-pending-triggers))) + (progn + (gdb-enqueue-input (list "server interpreter mi \"-var-update *\"\n" + 'gdb-var-update-handler)) + (gdb-set-pending-triggers (cons 'gdb-var-update + (gdb-get-pending-triggers)))))) + +(defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"") + +(defun gdb-var-update-handler () + (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) + (goto-char (point-min)) + (while (re-search-forward gdb-var-update-regexp nil t) + (let ((varnum (match-string 1))) + (gdb-enqueue-input + (list (concat "server interpreter mi \"-var-evaluate-expression " + varnum "\"\n") + `(lambda () (gdb-var-evaluate-expression-handler + ,varnum t))))))) + (gdb-set-pending-triggers + (delq 'gdb-var-update (gdb-get-pending-triggers)))) + +(defun gdb-var-delete () + "Delete watched expression from the speedbar." + (interactive) + (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) + (let ((text (speedbar-line-text))) + (string-match "\\(\\S-+\\)" text) + (let* ((expr (match-string 1 text)) + (var (assoc expr gdb-var-list)) + (varnum (cadr var))) + (unless (string-match "\\." varnum) + (gdb-enqueue-input + (list (concat "server interpreter mi \"-var-delete " + varnum "\"\n") + 'ignore)) + (setq gdb-var-list (delq var gdb-var-list)) + (dolist (varchild gdb-var-list) + (if (string-match (concat (nth 1 var) "\\.") (nth 1 varchild)) + (setq gdb-var-list (delq varchild gdb-var-list)))) + (setq gdb-var-changed t)))))) + +(defun gdb-edit-value (text token indent) + "Assign a value to a variable displayed in the speedbar" + (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) + (varnum (cadr var)) (value)) + (setq value (read-string "New value: ")) + (gdb-enqueue-input + (list (concat "server interpreter mi \"-var-assign " + varnum " " value "\"\n") + 'ignore)))) + +(defcustom gdb-show-changed-values t + "Non-nil means use font-lock-warning-face to display values that have +recently changed in the speedbar." + :type 'boolean + :group 'gud) + +(defun gdb-speedbar-expand-node (text token indent) + "Expand the node the user clicked on. +TEXT is the text of the button we clicked on, a + or - item. +TOKEN is data related to this node. +INDENT is the current indentation depth." + (cond ((string-match "+" text) ;expand this node + (gdb-var-list-children token)) + ((string-match "-" text) ;contract this node + (dolist (var gdb-var-list) + (if (string-match (concat token "\\.") (nth 1 var)) + (setq gdb-var-list (delq var gdb-var-list)))) + (setq gdb-var-changed t)))) + + +;; ====================================================================== +;; +;; In this world, there are gdb variables (of unspecified +;; representation) and buffers associated with those objects. +;; The list of variables is built up by the expansions of +;; def-gdb-variable + +(defmacro def-gdb-var (root-symbol &optional default doc) + (let* ((root (symbol-name root-symbol)) + (accessor (intern (concat "gdb-get-" root))) + (setter (intern (concat "gdb-set-" root))) + (name (intern (concat "gdb-" root)))) + `(progn + (defvar ,name ,default ,doc) + (if (not (memq ',name gdb-variables)) + (push ',name gdb-variables)) + (defun ,accessor () + (buffer-local-value ',name gud-comint-buffer)) + (defun ,setter (val) + (with-current-buffer gud-comint-buffer + (setq ,name val)))))) + +(def-gdb-var buffer-type nil + "One of the symbols bound in `gdb-buffer-rules'.") + +(def-gdb-var burst "" + "A string of characters from gdb that have not yet been processed.") + +(def-gdb-var input-queue () + "A list of gdb command objects.") + +(def-gdb-var prompting nil + "True when gdb is idle with no pending input.") + +(def-gdb-var output-sink 'user + "The disposition of the output of the current gdb command. +Possible values are these symbols: + + user -- gdb output should be copied to the GUD buffer + for the user to see. + + inferior -- gdb output should be copied to the inferior-io buffer + + pre-emacs -- output should be ignored util the post-prompt + annotation is received. Then the output-sink + becomes:... + emacs -- output should be collected in the partial-output-buffer + for subsequent processing by a command. This is the + disposition of output generated by commands that + gdb mode sends to gdb on its own behalf. + post-emacs -- ignore output until the prompt annotation is + received, then go to USER disposition. +") + +(def-gdb-var current-item nil + "The most recent command item sent to gdb.") + +(def-gdb-var pending-triggers '() + "A list of trigger functions that have run later than their output +handlers.") + +;; end of gdb variables + +(defun gdb-get-target-string () + (with-current-buffer gud-comint-buffer + gud-target-name)) + + +;; +;; gdb buffers. +;; +;; Each buffer has a TYPE -- a symbol that identifies the function +;; of that particular buffer. +;; +;; The usual gdb interaction buffer is given the type `gdba' and +;; is constructed specially. +;; +;; Others are constructed by gdb-get-create-buffer and +;; named according to the rules set forth in the gdb-buffer-rules-assoc + +(defvar gdb-buffer-rules-assoc '()) + +(defun gdb-get-buffer (key) + "Return the gdb buffer tagged with type KEY. +The key should be one of the cars in `gdb-buffer-rules-assoc'." + (save-excursion + (gdb-look-for-tagged-buffer key (buffer-list)))) + +(defun gdb-get-create-buffer (key) + "Create a new gdb buffer of the type specified by KEY. +The key should be one of the cars in `gdb-buffer-rules-assoc'." + (or (gdb-get-buffer key) + (let* ((rules (assoc key gdb-buffer-rules-assoc)) + (name (funcall (gdb-rules-name-maker rules))) + (new (get-buffer-create name))) + (with-current-buffer new + ;; FIXME: This should be set after calling the function, since the + ;; function should run kill-all-local-variables. + (set (make-local-variable 'gdb-buffer-type) key) + (if (cdr (cdr rules)) + (funcall (car (cdr (cdr rules))))) + (set (make-local-variable 'gud-comint-buffer) gud-comint-buffer) + (set (make-local-variable 'gud-minor-mode) 'gdba) + (set (make-local-variable 'tool-bar-map) gud-tool-bar-map) + new)))) + +(defun gdb-rules-name-maker (rules) (car (cdr rules))) + +(defun gdb-look-for-tagged-buffer (key bufs) + (let ((retval nil)) + (while (and (not retval) bufs) + (set-buffer (car bufs)) + (if (eq gdb-buffer-type key) + (setq retval (car bufs))) + (setq bufs (cdr bufs))) + retval)) + +;; +;; This assoc maps buffer type symbols to rules. Each rule is a list of +;; at least one and possible more functions. The functions have these +;; roles in defining a buffer type: +;; +;; NAME - Return a name for this buffer type. +;; +;; The remaining function(s) are optional: +;; +;; MODE - called in a new buffer with no arguments, should establish +;; the proper mode for the buffer. +;; + +(defun gdb-set-buffer-rules (buffer-type &rest rules) + (let ((binding (assoc buffer-type gdb-buffer-rules-assoc))) + (if binding + (setcdr binding rules) + (push (cons buffer-type rules) + gdb-buffer-rules-assoc)))) + +;; GUD buffers are an exception to the rules +(gdb-set-buffer-rules 'gdba 'error) + +;; +;; Partial-output buffer : This accumulates output from a command executed on +;; behalf of emacs (rather than the user). +;; +(gdb-set-buffer-rules 'gdb-partial-output-buffer + 'gdb-partial-output-name) + +(defun gdb-partial-output-name () + (concat "*partial-output-" + (gdb-get-target-string) + "*")) + + +(gdb-set-buffer-rules 'gdb-inferior-io + 'gdb-inferior-io-name + 'gdb-inferior-io-mode) + +(defun gdb-inferior-io-name () + (concat "*input/output of " + (gdb-get-target-string) + "*")) + +(defvar gdb-inferior-io-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-c\C-c" 'gdb-inferior-io-interrupt) + (define-key map "\C-c\C-z" 'gdb-inferior-io-stop) + (define-key map "\C-c\C-\\" 'gdb-inferior-io-quit) + (define-key map "\C-c\C-d" 'gdb-inferior-io-eof) + map)) + +(define-derived-mode gdb-inferior-io-mode comint-mode "Debuggee I/O" + "Major mode for gdb inferior-io." + :syntax-table nil :abbrev-table nil + ;; We want to use comint because it has various nifty and familiar + ;; features. We don't need a process, but comint wants one, so create + ;; a dummy one. + (make-comint-in-buffer + (substring (buffer-name) 1 (- (length (buffer-name)) 1)) + (current-buffer) "hexl") + (setq comint-input-sender 'gdb-inferior-io-sender)) + +(defun gdb-inferior-io-sender (proc string) + ;; PROC is the pseudo-process created to satisfy comint. + (with-current-buffer (process-buffer proc) + (setq proc (get-buffer-process gud-comint-buffer)) + (process-send-string proc string) + (process-send-string proc "\n"))) + +(defun gdb-inferior-io-interrupt () + "Interrupt the program being debugged." + (interactive) + (interrupt-process + (get-buffer-process gud-comint-buffer) comint-ptyp)) + +(defun gdb-inferior-io-quit () + "Send quit signal to the program being debugged." + (interactive) + (quit-process + (get-buffer-process gud-comint-buffer) comint-ptyp)) + +(defun gdb-inferior-io-stop () + "Stop the program being debugged." + (interactive) + (stop-process + (get-buffer-process gud-comint-buffer) comint-ptyp)) + +(defun gdb-inferior-io-eof () + "Send end-of-file to the program being debugged." + (interactive) + (process-send-eof + (get-buffer-process gud-comint-buffer))) + + +;; +;; gdb communications +;; + +;; INPUT: things sent to gdb +;; +;; The queues are lists. Each element is either a string (indicating user or +;; user-like input) or a list of the form: +;; +;; (INPUT-STRING HANDLER-FN) +;; +;; The handler function will be called from the partial-output buffer when the +;; command completes. This is the way to write commands which invoke gdb +;; commands autonomously. +;; +;; These lists are consumed tail first. +;; + +(defun gdb-send (proc string) + "A comint send filter for gdb. +This filter may simply queue output for a later time." + (if gud-running + (process-send-string proc (concat string "\n")) + (gdb-enqueue-input (concat string "\n")))) + +;; Note: Stuff enqueued here will be sent to the next prompt, even if it +;; is a query, or other non-top-level prompt. + +(defun gdb-enqueue-input (item) + (if (gdb-get-prompting) + (progn + (gdb-send-item item) + (gdb-set-prompting nil)) + (gdb-set-input-queue + (cons item (gdb-get-input-queue))))) + +(defun gdb-dequeue-input () + (let ((queue (gdb-get-input-queue))) + (and queue + (let ((last (car (last queue)))) + (unless (nbutlast queue) (gdb-set-input-queue '())) + last)))) + + +;; +;; output -- things gdb prints to emacs +;; +;; GDB output is a stream interrupted by annotations. +;; Annotations can be recognized by their beginning +;; with \C-j\C-z\C-z\C-j +;; +;; The tag is a string obeying symbol syntax. +;; +;; The optional part `' can be either the empty string +;; or a space followed by more data relating to the annotation. +;; For example, the SOURCE annotation is followed by a filename, +;; line number and various useless goo. This data must not include +;; any newlines. +;; + +(defcustom gud-gdba-command-name "gdb -annotate=3" + "Default command to execute an executable under the GDB-UI debugger." + :type 'string + :group 'gud) + +(defvar gdb-annotation-rules + '(("pre-prompt" gdb-pre-prompt) + ("prompt" gdb-prompt) + ("commands" gdb-subprompt) + ("overload-choice" gdb-subprompt) + ("query" gdb-subprompt) + ("prompt-for-continue" gdb-subprompt) + ("post-prompt" gdb-post-prompt) + ("source" gdb-source) + ("starting" gdb-starting) + ("exited" gdb-stopping) + ("signalled" gdb-stopping) + ("signal" gdb-stopping) + ("breakpoint" gdb-stopping) + ("watchpoint" gdb-stopping) + ("frame-begin" gdb-frame-begin) + ("stopped" gdb-stopped) + ) "An assoc mapping annotation tags to functions which process them.") + +(defconst gdb-source-spec-regexp + "\\(.*\\):\\([0-9]*\\):[0-9]*:[a-z]*:\\(0x[a-f0-9]*\\)") + +;; Do not use this except as an annotation handler. +(defun gdb-source (args) + (string-match gdb-source-spec-regexp args) + ;; Extract the frame position from the marker. + (setq gud-last-frame + (cons + (match-string 1 args) + (string-to-int (match-string 2 args)))) + (setq gdb-current-address (match-string 3 args)) + (setq gdb-view-source t) +;; cover for auto-display output which comes *before* +;; stopped annotation + (if (eq (gdb-get-output-sink) 'inferior) (gdb-set-output-sink 'user))) + +(defun gdb-send-item (item) + (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log)) + (gdb-set-current-item item) + (if (stringp item) + (progn + (gdb-set-output-sink 'user) + (process-send-string (get-buffer-process gud-comint-buffer) item)) + (progn + (gdb-clear-partial-output) + (gdb-set-output-sink 'pre-emacs) + (process-send-string (get-buffer-process gud-comint-buffer) + (car item))))) + +(defun gdb-pre-prompt (ignored) + "An annotation handler for `pre-prompt'. This terminates the collection of +output from a previous command if that happens to be in effect." + (let ((sink (gdb-get-output-sink))) + (cond + ((eq sink 'user) t) + ((eq sink 'emacs) + (gdb-set-output-sink 'post-emacs)) + (t + (gdb-set-output-sink 'user) + (error "Phase error in gdb-pre-prompt (got %s)" sink))))) + +(defun gdb-prompt (ignored) + "An annotation handler for `prompt'. +This sends the next command (if any) to gdb." + (when gdb-first-prompt (gdb-ann3)) + (let ((sink (gdb-get-output-sink))) + (cond + ((eq sink 'user) t) + ((eq sink 'post-emacs) + (gdb-set-output-sink 'user) + (let ((handler + (car (cdr (gdb-get-current-item))))) + (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) + (funcall handler)))) + (t + (gdb-set-output-sink 'user) + (error "Phase error in gdb-prompt (got %s)" sink)))) + (let ((input (gdb-dequeue-input))) + (if input + (gdb-send-item input) + (progn + (gdb-set-prompting t) + (gud-display-frame))))) + +(defun gdb-subprompt (ignored) + "An annotation handler for non-top-level prompts." + (gdb-set-prompting t)) + +(defun gdb-starting (ignored) + "An annotation handler for `starting'. This says that I/O for the +subprocess is now the program being debugged, not GDB." + (let ((sink (gdb-get-output-sink))) + (cond + ((eq sink 'user) + (progn + (setq gud-running t) + (if gdb-use-inferior-io-buffer + (gdb-set-output-sink 'inferior)))) + (t (error "Unexpected `starting' annotation"))))) + +(defun gdb-stopping (ignored) + "An annotation handler for `exited' and other annotations which say that I/O +for the subprocess is now GDB, not the program being debugged." + (if gdb-use-inferior-io-buffer + (let ((sink (gdb-get-output-sink))) + (cond + ((eq sink 'inferior) + (gdb-set-output-sink 'user)) + (t (error "Unexpected stopping annotation")))))) + +(defun gdb-frame-begin (ignored) + (let ((sink (gdb-get-output-sink))) + (cond + ((eq sink 'inferior) + (gdb-set-output-sink 'user)) + ((eq sink 'user) t) + ((eq sink 'emacs) t) + (t (error "Unexpected frame-begin annotation (%S)" sink))))) + +(defun gdb-stopped (ignored) + "An annotation handler for `stopped'. It is just like gdb-stopping, except +that if we already set the output sink to 'user in gdb-stopping, that is fine." + (setq gud-running nil) + (let ((sink (gdb-get-output-sink))) + (cond + ((eq sink 'inferior) + (gdb-set-output-sink 'user)) + ((eq sink 'user) t) + (t (error "Unexpected stopped annotation"))))) + +(defun gdb-post-prompt (ignored) + "An annotation handler for `post-prompt'. This begins the collection of +output from the current command if that happens to be appropriate." + (if (not (gdb-get-pending-triggers)) + (progn + (gdb-get-current-frame) + (gdb-invalidate-frames) + (gdb-invalidate-breakpoints) + (gdb-invalidate-assembler) + (gdb-invalidate-registers) + (gdb-invalidate-locals) + (gdb-invalidate-threads) + (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3. + ;; FIXME: with GDB-6 on Darwin, this might very well work. + (dolist (frame (frame-list)) + (when (string-equal (frame-parameter frame 'name) "Speedbar") + (setq gdb-var-changed t) ; force update + (dolist (var gdb-var-list) + (setcar (nthcdr 5 var) nil)))) + (gdb-var-update)))) + (let ((sink (gdb-get-output-sink))) + (cond + ((eq sink 'user) t) + ((eq sink 'pre-emacs) + (gdb-set-output-sink 'emacs)) + (t + (gdb-set-output-sink 'user) + (error "Phase error in gdb-post-prompt (got %s)" sink))))) + +(defun gud-gdba-marker-filter (string) + "A gud marker filter for gdb. Handle a burst of output from GDB." + (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log)) + ;; Recall the left over gud-marker-acc from last time + (setq gud-marker-acc (concat gud-marker-acc string)) + ;; Start accumulating output for the GUD buffer + (let ((output "")) + ;; + ;; Process all the complete markers in this chunk. + (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc) + (let ((annotation (match-string 1 gud-marker-acc))) + ;; + ;; Stuff prior to the match is just ordinary output. + ;; It is either concatenated to OUTPUT or directed + ;; elsewhere. + (setq output + (gdb-concat-output + output + (substring gud-marker-acc 0 (match-beginning 0)))) + ;; + ;; Take that stuff off the gud-marker-acc. + (setq gud-marker-acc (substring gud-marker-acc (match-end 0))) + ;; + ;; Parse the tag from the annotation, and maybe its arguments. + (string-match "\\(\\S-*\\) ?\\(.*\\)" annotation) + (let* ((annotation-type (match-string 1 annotation)) + (annotation-arguments (match-string 2 annotation)) + (annotation-rule (assoc annotation-type + gdb-annotation-rules))) + ;; Call the handler for this annotation. + (if annotation-rule + (funcall (car (cdr annotation-rule)) + annotation-arguments) + ;; Else the annotation is not recognized. Ignore it silently, + ;; so that GDB can add new annotations without causing + ;; us to blow up. + )))) + ;; + ;; Does the remaining text end in a partial line? + ;; If it does, then keep part of the gud-marker-acc until we get more. + (if (string-match "\n\\'\\|\n\032\\'\\|\n\032\032.*\\'" + gud-marker-acc) + (progn + ;; Everything before the potential marker start can be output. + (setq output + (gdb-concat-output output + (substring gud-marker-acc 0 + (match-beginning 0)))) + ;; + ;; Everything after, we save, to combine with later input. + (setq gud-marker-acc (substring gud-marker-acc (match-beginning 0)))) + ;; + ;; In case we know the gud-marker-acc contains no partial annotations: + (progn + (setq output (gdb-concat-output output gud-marker-acc)) + (setq gud-marker-acc ""))) + output)) + +(defun gdb-concat-output (so-far new) + (let ((sink (gdb-get-output-sink ))) + (cond + ((eq sink 'user) (concat so-far new)) + ((or (eq sink 'pre-emacs) (eq sink 'post-emacs)) so-far) + ((eq sink 'emacs) + (gdb-append-to-partial-output new) + so-far) + ((eq sink 'inferior) + (gdb-append-to-inferior-io new) + so-far) + (t (error "Bogon output sink %S" sink))))) + +(defun gdb-append-to-partial-output (string) + (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) + (goto-char (point-max)) + (insert string))) + +(defun gdb-clear-partial-output () + (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) + (erase-buffer))) + +(defun gdb-append-to-inferior-io (string) + (with-current-buffer (gdb-get-create-buffer 'gdb-inferior-io) + (goto-char (point-max)) + (insert-before-markers string)) + (if (not (string-equal string "")) + (gdb-display-buffer (gdb-get-create-buffer 'gdb-inferior-io)))) + +(defun gdb-clear-inferior-io () + (with-current-buffer (gdb-get-create-buffer 'gdb-inferior-io) + (erase-buffer))) + + +;; One trick is to have a command who's output is always available in a buffer +;; of it's own, and is always up to date. We build several buffers of this +;; type. +;; +;; There are two aspects to this: gdb has to tell us when the output for that +;; command might have changed, and we have to be able to run the command +;; behind the user's back. +;; +;; The output phasing associated with the variable gdb-output-sink +;; help us to run commands behind the user's back. +;; +;; Below is the code for specificly managing buffers of output from one +;; command. +;; + +;; The trigger function is suitable for use in the assoc GDB-ANNOTATION-RULES +;; It adds an input for the command we are tracking. It should be the +;; annotation rule binding of whatever gdb sends to tell us this command +;; might have changed it's output. +;; +;; NAME is the function name. DEMAND-PREDICATE tests if output is really needed. +;; GDB-COMMAND is a string of such. OUTPUT-HANDLER is the function bound to the +;; input in the input queue (see comment about ``gdb communications'' above). + +(defmacro def-gdb-auto-update-trigger (name demand-predicate gdb-command + output-handler) + `(defun ,name (&optional ignored) + (if (and (,demand-predicate) + (not (member ',name + (gdb-get-pending-triggers)))) + (progn + (gdb-enqueue-input + (list ,gdb-command ',output-handler)) + (gdb-set-pending-triggers + (cons ',name + (gdb-get-pending-triggers))))))) + +(defmacro def-gdb-auto-update-handler (name trigger buf-key custom-defun) + `(defun ,name () + (gdb-set-pending-triggers + (delq ',trigger + (gdb-get-pending-triggers))) + (let ((buf (gdb-get-buffer ',buf-key))) + (and buf + (with-current-buffer buf + (let ((p (point)) + (buffer-read-only nil)) + (erase-buffer) + (insert-buffer-substring (gdb-get-create-buffer + 'gdb-partial-output-buffer)) + (goto-char p))))) + ;; put customisation here + (,custom-defun))) + +(defmacro def-gdb-auto-updated-buffer (buffer-key trigger-name gdb-command + output-handler-name custom-defun) + `(progn + (def-gdb-auto-update-trigger ,trigger-name + ;; The demand predicate: + (lambda () (gdb-get-buffer ',buffer-key)) + ,gdb-command + ,output-handler-name) + (def-gdb-auto-update-handler ,output-handler-name + ,trigger-name ,buffer-key ,custom-defun))) + + +;; +;; Breakpoint buffer : This displays the output of `info breakpoints'. +;; +(gdb-set-buffer-rules 'gdb-breakpoints-buffer + 'gdb-breakpoints-buffer-name + 'gdb-breakpoints-mode) + +(def-gdb-auto-updated-buffer gdb-breakpoints-buffer + ;; This defines the auto update rule for buffers of type + ;; `gdb-breakpoints-buffer'. + ;; + ;; It defines a function to serve as the annotation handler that + ;; handles the `foo-invalidated' message. That function is called: + gdb-invalidate-breakpoints + ;; + ;; To update the buffer, this command is sent to gdb. + "server info breakpoints\n" + ;; + ;; This also defines a function to be the handler for the output + ;; from the command above. That function will copy the output into + ;; the appropriately typed buffer. That function will be called: + gdb-info-breakpoints-handler + ;; buffer specific functions + gdb-info-breakpoints-custom) + +(defvar gdb-cdir nil "Compilation directory.") + +(defconst breakpoint-xpm-data "/* XPM */ +static char *magick[] = { +/* columns rows colors chars-per-pixel */ +\"10 10 2 1\", +\" c red\", +\"+ c None\", +/* pixels */ +\"+++ +++\", +\"++ ++\", +\"+ +\", +\" \", +\" \", +\" \", +\" \", +\"+ +\", +\"++ ++\", +\"+++ +++\", +};" + "XPM data used for breakpoint icon.") + +(defconst breakpoint-enabled-pbm-data +"P1 +10 10\", +0 0 0 0 1 1 1 1 0 0 0 0 +0 0 0 1 1 1 1 1 1 0 0 0 +0 0 1 1 1 1 1 1 1 1 0 0 +0 1 1 1 1 1 1 1 1 1 1 0 +0 1 1 1 1 1 1 1 1 1 1 0 +0 1 1 1 1 1 1 1 1 1 1 0 +0 1 1 1 1 1 1 1 1 1 1 0 +0 0 1 1 1 1 1 1 1 1 0 0 +0 0 0 1 1 1 1 1 1 0 0 0 +0 0 0 0 1 1 1 1 0 0 0 0" + "PBM data used for enabled breakpoint icon.") + +(defconst breakpoint-disabled-pbm-data +"P1 +10 10\", +0 0 1 0 1 0 1 0 0 0 +0 1 0 1 0 1 0 1 0 0 +1 0 1 0 1 0 1 0 1 0 +0 1 0 1 0 1 0 1 0 1 +1 0 1 0 1 0 1 0 1 0 +0 1 0 1 0 1 0 1 0 1 +1 0 1 0 1 0 1 0 1 0 +0 1 0 1 0 1 0 1 0 1 +0 0 1 0 1 0 1 0 1 0 +0 0 0 1 0 1 0 1 0 0" + "PBM data used for disabled breakpoint icon.") + +(defvar breakpoint-enabled-icon nil + "Icon for enabled breakpoint in display margin") + +(defvar breakpoint-disabled-icon nil + "Icon for disabled breakpoint in display margin") + +(defvar breakpoint-bitmap nil + "Bitmap for breakpoint in fringe") + +(defface breakpoint-enabled-bitmap-face + '((t + :inherit fringe + :foreground "red")) + "Face for enabled breakpoint icon in fringe.") + +(defface breakpoint-disabled-bitmap-face + '((t + :inherit fringe + :foreground "grey60")) + "Face for disabled breakpoint icon in fringe.") + + +;;-put breakpoint icons in relevant margins (even those set in the GUD buffer) +(defun gdb-info-breakpoints-custom () + (let ((flag)(address)) + ;; + ;; remove all breakpoint-icons in source buffers but not assembler buffer + (dolist (buffer (buffer-list)) + (with-current-buffer buffer + (if (and (eq gud-minor-mode 'gdba) + (not (string-match "^\*" (buffer-name)))) + (gdb-remove-breakpoint-icons (point-min) (point-max))))) + (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) + (save-excursion + (goto-char (point-min)) + (while (< (point) (- (point-max) 1)) + (forward-line 1) + (if (looking-at "[^\t].*breakpoint") + (progn + (looking-at "[0-9]*\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)") + (setq flag (char-after (match-beginning 1))) + (beginning-of-line) + (if (re-search-forward "in\\s-+\\S-+\\s-+at\\s-+" nil t) + (progn + (looking-at "\\(\\S-*\\):\\([0-9]+\\)") + (let ((line (match-string 2)) (buffer-read-only nil) + (file (match-string 1))) + (add-text-properties (point-at-bol) (point-at-eol) + '(mouse-face highlight + help-echo "mouse-2, RET: visit breakpoint")) + (with-current-buffer + (find-file-noselect + (if (file-exists-p file) file + (expand-file-name file gdb-cdir))) + (save-current-buffer + (set (make-local-variable 'gud-minor-mode) 'gdba) + (set (make-local-variable 'tool-bar-map) + gud-tool-bar-map)) + ;; only want one breakpoint icon at each location + (save-excursion + (goto-line (string-to-number line)) + (gdb-put-breakpoint-icon (eq flag ?y))))))))) + (end-of-line)))))) + +(defun gdb-mouse-toggle-breakpoint (event) + "Toggle breakpoint with mouse click in left margin." + (interactive "e") + (mouse-minibuffer-check event) + (let ((posn (event-end event))) + (if (numberp (posn-point posn)) + (with-selected-window (posn-window posn) + (save-excursion + (goto-char (posn-point posn)) + (if (or (posn-object posn) + (and breakpoint-bitmap + (eq (car (fringe-bitmaps-at-pos (posn-point posn))) + breakpoint-bitmap))) + (gud-remove nil) + (gud-break nil))))))) + +(defun gdb-breakpoints-buffer-name () + (with-current-buffer gud-comint-buffer + (concat "*breakpoints of " (gdb-get-target-string) "*"))) + +(defun gdb-display-breakpoints-buffer () + (interactive) + (gdb-display-buffer + (gdb-get-create-buffer 'gdb-breakpoints-buffer))) + +(defun gdb-frame-breakpoints-buffer () + (interactive) + (switch-to-buffer-other-frame + (gdb-get-create-buffer 'gdb-breakpoints-buffer))) + +(defvar gdb-breakpoints-mode-map + (let ((map (make-sparse-keymap)) + (menu (make-sparse-keymap "Breakpoints"))) + (define-key menu [toggle] '("Toggle" . gdb-toggle-breakpoint)) + (define-key menu [delete] '("Delete" . gdb-delete-breakpoint)) + (define-key menu [goto] '("Goto" . gdb-goto-breakpoint)) + + (suppress-keymap map) + (define-key map [menu-bar breakpoints] (cons "Breakpoints" menu)) + (define-key map " " 'gdb-toggle-breakpoint) + (define-key map "d" 'gdb-delete-breakpoint) + (define-key map "\r" 'gdb-goto-breakpoint) + (define-key map [mouse-2] 'gdb-mouse-goto-breakpoint) + map)) + +(defun gdb-breakpoints-mode () + "Major mode for gdb breakpoints. + +\\{gdb-breakpoints-mode-map}" + (setq major-mode 'gdb-breakpoints-mode) + (setq mode-name "Breakpoints") + (use-local-map gdb-breakpoints-mode-map) + (setq buffer-read-only t) + (gdb-invalidate-breakpoints)) + +(defun gdb-toggle-breakpoint () + "Enable/disable the breakpoint at current line." + (interactive) + (save-excursion + (beginning-of-line 1) + (if (not (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")) + (error "Not recognized as break/watchpoint line") + (gdb-enqueue-input + (list + (concat + (if (eq ?y (char-after (match-beginning 2))) + "server disable " + "server enable ") + (match-string 1) "\n") + 'ignore))))) + +(defun gdb-delete-breakpoint () + "Delete the breakpoint at current line." + (interactive) + (beginning-of-line 1) + (if (not (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)")) + (error "Not recognized as break/watchpoint line") + (gdb-enqueue-input + (list (concat "server delete " (match-string 1) "\n") 'ignore)))) + +(defun gdb-goto-breakpoint () + "Display the file in the source buffer at the breakpoint specified on the +current line." + (interactive) + (save-excursion + (beginning-of-line 1) + (re-search-forward "in\\s-+\\S-+\\s-+at\\s-+" nil t) + (looking-at "\\(\\S-*\\):\\([0-9]+\\)")) + (if (match-string 2) + (let ((line (match-string 2)) + (file (match-string 1))) + (save-selected-window + (gdb-display-buffer (find-file-noselect + (if (file-exists-p file) + file + (expand-file-name file gdb-cdir)))) + (goto-line (string-to-number line)))))) + +(defun gdb-mouse-goto-breakpoint (event) + "Display the file in the source buffer at the selected breakpoint." + (interactive "e") + (mouse-set-point event) + (gdb-goto-breakpoint)) + +;; +;; Frames buffer. This displays a perpetually correct bactracktrace +;; (from the command `where'). +;; +;; Alas, if your stack is deep, it is costly. +;; +(gdb-set-buffer-rules 'gdb-stack-buffer + 'gdb-stack-buffer-name + 'gdb-frames-mode) + +(def-gdb-auto-updated-buffer gdb-stack-buffer + gdb-invalidate-frames + "server where\n" + gdb-info-frames-handler + gdb-info-frames-custom) + +(defun gdb-info-frames-custom () + (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer) + (save-excursion + (let ((buffer-read-only nil)) + (goto-char (point-min)) + (while (< (point) (point-max)) + (add-text-properties (point-at-bol) (point-at-eol) + '(mouse-face highlight + help-echo "mouse-2, RET: Select frame")) + (beginning-of-line) + (when (and (or (looking-at "^#[0-9]*\\s-*\\S-* in \\(\\S-*\\)") + (looking-at "^#[0-9]*\\s-*\\(\\S-*\\)")) + (equal (match-string 1) gdb-current-frame)) + (put-text-property (point-at-bol) (point-at-eol) + 'face '(:inverse-video t))) + (forward-line 1)))))) + +(defun gdb-stack-buffer-name () + (with-current-buffer gud-comint-buffer + (concat "*stack frames of " (gdb-get-target-string) "*"))) + +(defun gdb-display-stack-buffer () + (interactive) + (gdb-display-buffer + (gdb-get-create-buffer 'gdb-stack-buffer))) + +(defun gdb-frame-stack-buffer () + (interactive) + (switch-to-buffer-other-frame + (gdb-get-create-buffer 'gdb-stack-buffer))) + +(defvar gdb-frames-mode-map + (let ((map (make-sparse-keymap))) + (suppress-keymap map) + (define-key map "\r" 'gdb-frames-select) + (define-key map [mouse-2] 'gdb-frames-mouse-select) + map)) + +(defun gdb-frames-mode () + "Major mode for gdb frames. + +\\{gdb-frames-mode-map}" + (setq major-mode 'gdb-frames-mode) + (setq mode-name "Frames") + (setq buffer-read-only t) + (use-local-map gdb-frames-mode-map) + (font-lock-mode -1) + (gdb-invalidate-frames)) + +(defun gdb-get-frame-number () + (save-excursion + (let* ((pos (re-search-backward "^#\\([0-9]*\\)" nil t)) + (n (or (and pos (match-string-no-properties 1)) "0"))) + n))) + +(defun gdb-frames-select () + "Make the frame on the current line become the current frame and display the +source in the source buffer." + (interactive) + (gdb-enqueue-input + (list (concat "server frame " (gdb-get-frame-number) "\n") 'ignore)) + (gud-display-frame)) + +(defun gdb-frames-mouse-select (event) + "Make the selected frame become the current frame and display the source in +the source buffer." + (interactive "e") + (mouse-set-point event) + (gdb-frames-select)) + +;; +;; Threads buffer. This displays a selectable thread list. +;; +(gdb-set-buffer-rules 'gdb-threads-buffer + 'gdb-threads-buffer-name + 'gdb-threads-mode) + +(def-gdb-auto-updated-buffer gdb-threads-buffer + gdb-invalidate-threads + "server info threads\n" + gdb-info-threads-handler + gdb-info-threads-custom) + +(defun gdb-info-threads-custom () + (with-current-buffer (gdb-get-buffer 'gdb-threads-buffer) + (let ((buffer-read-only nil)) + (goto-char (point-min)) + (while (< (point) (point-max)) + (add-text-properties (point-at-bol) (point-at-eol) + '(mouse-face highlight + help-echo "mouse-2, RET: select thread")) + (forward-line 1))))) + +(defun gdb-threads-buffer-name () + (with-current-buffer gud-comint-buffer + (concat "*threads of " (gdb-get-target-string) "*"))) + +(defun gdb-display-threads-buffer () + (interactive) + (gdb-display-buffer + (gdb-get-create-buffer 'gdb-threads-buffer))) + +(defun gdb-frame-threads-buffer () + (interactive) + (switch-to-buffer-other-frame + (gdb-get-create-buffer 'gdb-threads-buffer))) + +(defvar gdb-threads-mode-map + (let ((map (make-sparse-keymap))) + (suppress-keymap map) + (define-key map "\r" 'gdb-threads-select) + (define-key map [mouse-2] 'gdb-threads-mouse-select) + map)) + +(defun gdb-threads-mode () + "Major mode for gdb frames. + +\\{gdb-frames-mode-map}" + (setq major-mode 'gdb-threads-mode) + (setq mode-name "Threads") + (setq buffer-read-only t) + (use-local-map gdb-threads-mode-map) + (gdb-invalidate-threads)) + +(defun gdb-get-thread-number () + (save-excursion + (re-search-backward "^\\s-*\\([0-9]*\\)" nil t) + (match-string-no-properties 1))) + +(defun gdb-threads-select () + "Make the thread on the current line become the current thread and display the +source in the source buffer." + (interactive) + (gdb-enqueue-input + (list (concat "thread " (gdb-get-thread-number) "\n") 'ignore)) + (gud-display-frame)) + +(defun gdb-threads-mouse-select (event) + "Make the selected frame become the current frame and display the source in +the source buffer." + (interactive "e") + (mouse-set-point event) + (gdb-threads-select)) + +;; +;; Registers buffer. +;; +(gdb-set-buffer-rules 'gdb-registers-buffer + 'gdb-registers-buffer-name + 'gdb-registers-mode) + +(def-gdb-auto-updated-buffer gdb-registers-buffer + gdb-invalidate-registers + "server info registers\n" + gdb-info-registers-handler + gdb-info-registers-custom) + +(defun gdb-info-registers-custom ()) + +(defvar gdb-registers-mode-map + (let ((map (make-sparse-keymap))) + (suppress-keymap map) + map)) + +(defun gdb-registers-mode () + "Major mode for gdb registers. + +\\{gdb-registers-mode-map}" + (setq major-mode 'gdb-registers-mode) + (setq mode-name "Registers") + (setq buffer-read-only t) + (use-local-map gdb-registers-mode-map) + (gdb-invalidate-registers)) + +(defun gdb-registers-buffer-name () + (with-current-buffer gud-comint-buffer + (concat "*registers of " (gdb-get-target-string) "*"))) + +(defun gdb-display-registers-buffer () + (interactive) + (gdb-display-buffer + (gdb-get-create-buffer 'gdb-registers-buffer))) + +(defun gdb-frame-registers-buffer () + (interactive) + (switch-to-buffer-other-frame + (gdb-get-create-buffer 'gdb-registers-buffer))) + +;; +;; Locals buffer. +;; +(gdb-set-buffer-rules 'gdb-locals-buffer + 'gdb-locals-buffer-name + 'gdb-locals-mode) + +(def-gdb-auto-updated-buffer gdb-locals-buffer + gdb-invalidate-locals + "server info locals\n" + gdb-info-locals-handler + gdb-info-locals-custom) + +;; Abbreviate for arrays and structures. +;; These can be expanded using gud-display. +(defun gdb-info-locals-handler nil + (gdb-set-pending-triggers (delq 'gdb-invalidate-locals + (gdb-get-pending-triggers))) + (let ((buf (gdb-get-buffer 'gdb-partial-output-buffer))) + (with-current-buffer buf + (goto-char (point-min)) + (while (re-search-forward "^ .*\n" nil t) + (replace-match "" nil nil)) + (goto-char (point-min)) + (while (re-search-forward "{[-0-9, {}\]*\n" nil t) + (replace-match "(array);\n" nil nil)) + (goto-char (point-min)) + (while (re-search-forward "{.*=.*\n" nil t) + (replace-match "(structure);\n" nil nil)))) + (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) + (and buf (with-current-buffer buf + (let ((p (point)) + (buffer-read-only nil)) + (delete-region (point-min) (point-max)) + (insert-buffer-substring (gdb-get-create-buffer + 'gdb-partial-output-buffer)) + (goto-char p))))) + (run-hooks 'gdb-info-locals-hook)) + +(defun gdb-info-locals-custom () + nil) + +(defvar gdb-locals-mode-map + (let ((map (make-sparse-keymap))) + (suppress-keymap map) + map)) + +(defun gdb-locals-mode () + "Major mode for gdb locals. + +\\{gdb-locals-mode-map}" + (setq major-mode 'gdb-locals-mode) + (setq mode-name "Locals") + (setq buffer-read-only t) + (use-local-map gdb-locals-mode-map) + (gdb-invalidate-locals)) + +(defun gdb-locals-buffer-name () + (with-current-buffer gud-comint-buffer + (concat "*locals of " (gdb-get-target-string) "*"))) + +(defun gdb-display-locals-buffer () + (interactive) + (gdb-display-buffer + (gdb-get-create-buffer 'gdb-locals-buffer))) + +(defun gdb-frame-locals-buffer () + (interactive) + (switch-to-buffer-other-frame + (gdb-get-create-buffer 'gdb-locals-buffer))) + + +;;;; Window management + +;;; The way we abuse the dedicated-p flag is pretty gross, but seems +;;; to do the right thing. Seeing as there is no way for Lisp code to +;;; get at the use_time field of a window, I'm not sure there exists a +;;; more elegant solution without writing C code. + +(defun gdb-display-buffer (buf &optional size) + (let ((must-split nil) + (answer nil)) + (unwind-protect + (progn + (walk-windows + #'(lambda (win) + (if (eq gud-comint-buffer (window-buffer win)) + (set-window-dedicated-p win t)))) + (setq answer (get-buffer-window buf)) + (if (not answer) + (let ((window (get-lru-window))) + (if window + (progn + (set-window-buffer window buf) + (setq answer window)) + (setq must-split t))))) + (walk-windows + #'(lambda (win) + (if (eq gud-comint-buffer (window-buffer win)) + (set-window-dedicated-p win nil))))) + (if must-split + (let* ((largest (get-largest-window)) + (cur-size (window-height largest)) + (new-size (and size (< size cur-size) (- cur-size size)))) + (setq answer (split-window largest new-size)) + (set-window-buffer answer buf))) + answer)) + +(defun gdb-display-source-buffer (buffer) + (if (eq gdb-selected-view 'source) + (progn + (gdb-display-buffer buffer) + (get-buffer-window buffer)) + (gdb-display-buffer (gdb-get-buffer 'gdb-assembler-buffer)) + nil)) + + +;;; Shared keymap initialization: + +(let ((menu (make-sparse-keymap "GDB-Frames"))) + (define-key gud-menu-map [frames] + `(menu-item "GDB-Frames" ,menu :visible (eq gud-minor-mode 'gdba))) + (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer)) + (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) + (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) + (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer)) + (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer)) + (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) +; (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer)) +) + +(let ((menu (make-sparse-keymap "GDB-Windows"))) + (define-key gud-menu-map [displays] + `(menu-item "GDB-Windows" ,menu :visible (eq gud-minor-mode 'gdba))) + (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer)) + (define-key menu [locals] '("Locals" . gdb-display-locals-buffer)) + (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) + (define-key menu [frames] '("Stack" . gdb-display-stack-buffer)) + (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer)) + (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) +; (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer)) +) + +(let ((menu (make-sparse-keymap "View"))) + (define-key gud-menu-map [view] + `(menu-item "View" ,menu :visible (eq gud-minor-mode 'gdba))) +; (define-key menu [both] '(menu-item "Both" gdb-view-both +; :help "Display both source and assembler" +; :button (:radio . (eq gdb-selected-view 'both)))) + (define-key menu [assembler] '(menu-item "Machine" gdb-view-assembler + :help "Display assembler only" + :button (:radio . (eq gdb-selected-view 'assembler)))) + (define-key menu [source] '(menu-item "Source" gdb-view-source-function + :help "Display source only" + :button (:radio . (eq gdb-selected-view 'source))))) + +(let ((menu (make-sparse-keymap "GDB-UI"))) + (define-key gud-menu-map [ui] + `(menu-item "GDB-UI" ,menu :visible (eq gud-minor-mode 'gdba))) + (define-key menu [gdb-restore-windows] + '("Restore window layout" . gdb-restore-windows)) + (define-key menu [gdb-many-windows] + (menu-bar-make-toggle gdb-many-windows gdb-many-windows + "Display other windows" "Many Windows %s" + "Display locals, stack and breakpoint information"))) + +(defun gdb-frame-gdb-buffer () + (interactive) + (switch-to-buffer-other-frame + (gdb-get-create-buffer 'gdba))) + +(defun gdb-display-gdb-buffer () + (interactive) + (gdb-display-buffer + (gdb-get-create-buffer 'gdba))) + +(defvar gdb-main-file nil "Source file from which program execution begins.") + +(defun gdb-view-source-function () + (interactive) + (if gdb-view-source + (gdb-display-buffer + (if gud-last-last-frame + (gud-find-file (car gud-last-last-frame)) + (gud-find-file gdb-main-file)))) + (setq gdb-selected-view 'source)) + +(defun gdb-view-assembler() + (interactive) + (gdb-display-buffer (gdb-get-create-buffer 'gdb-assembler-buffer)) + (setq gdb-selected-view 'assembler)) + +;(defun gdb-view-both() +;(interactive) +;(setq gdb-selected-view 'both)) + +(defcustom gdb-show-main nil + "Nil means don't display source file containing the main routine." + :type 'boolean + :group 'gud) + +(defun gdb-setup-windows () + "Layout the window pattern for gdb-many-windows." + (gdb-display-locals-buffer) + (gdb-display-stack-buffer) + (delete-other-windows) + (gdb-display-breakpoints-buffer) + (delete-other-windows) + (switch-to-buffer gud-comint-buffer) + (split-window nil ( / ( * (window-height) 3) 4)) + (split-window nil ( / (window-height) 3)) + (split-window-horizontally) + (other-window 1) + (switch-to-buffer (gdb-locals-buffer-name)) + (other-window 1) + (switch-to-buffer + (if (and gdb-view-source + (eq gdb-selected-view 'source)) + (if gud-last-last-frame + (gud-find-file (car gud-last-last-frame)) + (gud-find-file gdb-main-file)) + (gdb-get-create-buffer 'gdb-assembler-buffer))) + (when gdb-use-inferior-io-buffer + (split-window-horizontally) + (other-window 1) + (switch-to-buffer (gdb-inferior-io-name))) + (other-window 1) + (switch-to-buffer (gdb-stack-buffer-name)) + (split-window-horizontally) + (other-window 1) + (switch-to-buffer (gdb-breakpoints-buffer-name)) + (other-window 1)) + +(defcustom gdb-many-windows nil + "Nil (the default value) means just pops up the GUD buffer +unless `gdb-show-main' is t. In this case it starts with two +windows: one displaying the GUD buffer and the other with the +source file with the main routine of the debugee. Non-nil means +display the layout shown for `gdba'." + :type 'boolean + :group 'gud) + +(defun gdb-many-windows (arg) +"Toggle the number of windows in the basic arrangement." + (interactive "P") + (setq gdb-many-windows + (if (null arg) + (not gdb-many-windows) + (> (prefix-numeric-value arg) 0))) + (condition-case nil + (gdb-restore-windows) + (error nil))) + +(defun gdb-restore-windows () + "Restore the basic arrangement of windows used by gdba. +This arrangement depends on the value of `gdb-many-windows'." + (interactive) + (if gdb-many-windows + (progn + (switch-to-buffer gud-comint-buffer) + (delete-other-windows) + (gdb-setup-windows)) + (switch-to-buffer gud-comint-buffer) + (delete-other-windows) + (split-window) + (other-window 1) + (switch-to-buffer + (if (and gdb-view-source + (eq gdb-selected-view 'source)) + (if gud-last-last-frame + (gud-find-file (car gud-last-last-frame)) + (gud-find-file gdb-main-file)) + (gdb-get-create-buffer 'gdb-assembler-buffer))) + (other-window 1))) + +(defun gdb-reset () + "Exit a debugging session cleanly by killing the gdb buffers and resetting + the source buffers." + (dolist (buffer (buffer-list)) + (if (not (eq buffer gud-comint-buffer)) + (with-current-buffer buffer + (if (memq gud-minor-mode '(gdba pdb)) + (if (string-match "^\*.+*$" (buffer-name)) + (kill-buffer nil) + (gdb-remove-breakpoint-icons (point-min) (point-max) t) + (setq gud-minor-mode nil) + (kill-local-variable 'tool-bar-map) + (setq gud-running nil)))))) + (when (markerp gdb-overlay-arrow-position) + (move-marker gdb-overlay-arrow-position nil) + (setq gdb-overlay-arrow-position nil)) + (setq overlay-arrow-variable-list + (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list))) + +(defun gdb-source-info () + "Find the source file where the program starts and displays it with related +buffers." + (goto-char (point-min)) + (if (search-forward "directory is " nil t) + (if (looking-at "\\S-*:\\(\\S-*\\)") + (setq gdb-cdir (match-string 1)) + (looking-at "\\S-*") + (setq gdb-cdir (match-string 0)))) + (if (search-forward "Located in " nil t) + (if (looking-at "\\S-*") + (setq gdb-main-file (match-string 0))) + (setq gdb-view-source nil)) + (if gdb-many-windows + (gdb-setup-windows) + (gdb-get-create-buffer 'gdb-breakpoints-buffer) + (when gdb-show-main + (switch-to-buffer gud-comint-buffer) + (delete-other-windows) + (split-window) + (other-window 1) + (switch-to-buffer + (if gdb-view-source + (gud-find-file gdb-main-file) + (gdb-get-create-buffer 'gdb-assembler-buffer))) + (other-window 1)))) + +;;from put-image +(defun gdb-put-string (putstring pos &optional dprop) + "Put string PUTSTRING in front of POS in the current buffer. +PUTSTRING is displayed by putting an overlay into the current buffer with a +`before-string' STRING that has a `display' property whose value is +PUTSTRING." + (let ((gdb-string "x") + (buffer (current-buffer))) + (let ((overlay (make-overlay pos pos buffer)) + (prop (or dprop + (list (list 'margin 'left-margin) putstring)))) + (put-text-property 0 (length gdb-string) 'display prop gdb-string) + (overlay-put overlay 'put-break t) + (overlay-put overlay 'before-string gdb-string)))) + +;;from remove-images +(defun gdb-remove-strings (start end &optional buffer) + "Remove strings between START and END in BUFFER. +Remove only strings that were put in BUFFER with calls to `gdb-put-string'. +BUFFER nil or omitted means use the current buffer." + (unless buffer + (setq buffer (current-buffer))) + (let ((overlays (overlays-in start end))) + (while overlays + (let ((overlay (car overlays))) + (when (overlay-get overlay 'put-break) + (delete-overlay overlay))) + (setq overlays (cdr overlays))))) + +(defun gdb-put-breakpoint-icon (enabled) + (let ((start (progn (beginning-of-line) (- (point) 1))) + (end (progn (end-of-line) (+ (point) 1)))) + (gdb-remove-breakpoint-icons start end) + (if (display-images-p) + (if (>= (car (window-fringes)) 8) + (gdb-put-string + nil (1+ start) + `(left-fringe + ,(or breakpoint-bitmap + (setq breakpoint-bitmap + (define-fringe-bitmap + "\x3c\x7e\xff\xff\xff\xff\x7e\x3c"))) + ,(if enabled + 'breakpoint-enabled-bitmap-face + 'breakpoint-disabled-bitmap-face))) + (when (< left-margin-width 2) + (save-current-buffer + (setq left-margin-width 2) + (if (get-buffer-window (current-buffer)) + (set-window-margins (get-buffer-window + (current-buffer)) + left-margin-width + right-margin-width)))) + (put-image + (if enabled + (or breakpoint-enabled-icon + (setq breakpoint-enabled-icon + (find-image `((:type xpm :data + ,breakpoint-xpm-data + :ascent 100 :pointer hand) + (:type pbm :data + ,breakpoint-enabled-pbm-data + :ascent 100 :pointer hand))))) + (or breakpoint-disabled-icon + (setq breakpoint-disabled-icon + (find-image `((:type xpm :data + ,breakpoint-xpm-data + :conversion disabled + :ascent 100) + (:type pbm :data + ,breakpoint-disabled-pbm-data + :ascent 100)))))) + (+ start 1) nil 'left-margin)) + (when (< left-margin-width 2) + (save-current-buffer + (setq left-margin-width 2) + (if (get-buffer-window (current-buffer)) + (set-window-margins (get-buffer-window + (current-buffer)) + left-margin-width + right-margin-width)))) + (gdb-put-string (if enabled "B" "b") (1+ start))))) + +(defun gdb-remove-breakpoint-icons (start end &optional remove-margin) + (gdb-remove-strings start end) + (if (display-images-p) + (remove-images start end)) + (when remove-margin + (setq left-margin-width 0) + (if (get-buffer-window (current-buffer)) + (set-window-margins (get-buffer-window + (current-buffer)) + left-margin-width + right-margin-width)))) + + +;; +;; Assembler buffer. +;; +(gdb-set-buffer-rules 'gdb-assembler-buffer + 'gdb-assembler-buffer-name + 'gdb-assembler-mode) + +(def-gdb-auto-updated-buffer gdb-assembler-buffer + gdb-invalidate-assembler + (concat "server disassemble " gdb-current-address "\n") + gdb-assembler-handler + gdb-assembler-custom) + +(defun gdb-assembler-custom () + (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer)) + (pos 1) (address) (flag)) + (with-current-buffer buffer + (if (not (equal gdb-current-address "main")) + (progn + (goto-char (point-min)) + (if (re-search-forward gdb-current-address nil t) + (progn + (setq pos (point)) + (beginning-of-line) + (or gdb-overlay-arrow-position + (setq gdb-overlay-arrow-position (make-marker))) + (set-marker gdb-overlay-arrow-position + (point) (current-buffer)))))) + ;; remove all breakpoint-icons in assembler buffer before updating. + (gdb-remove-breakpoint-icons (point-min) (point-max))) + (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer) + (goto-char (point-min)) + (while (< (point) (- (point-max) 1)) + (forward-line 1) + (if (looking-at "[^\t].*breakpoint") + (progn + (looking-at + "[0-9]*\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*0x\\(\\S-*\\)") + (setq flag (char-after (match-beginning 1))) + (setq address (match-string 2)) + ;; remove leading 0s from output of info break. + (if (string-match "^0+\\(.*\\)" address) + (setq address (match-string 1 address))) + (with-current-buffer buffer + (goto-char (point-min)) + (if (re-search-forward address nil t) + (gdb-put-breakpoint-icon (eq flag ?y)))))))) + (if (not (equal gdb-current-address "main")) + (set-window-point (get-buffer-window buffer) pos)))) + +(defvar gdb-assembler-mode-map + (let ((map (make-sparse-keymap))) + (suppress-keymap map) + map)) + +(defun gdb-assembler-mode () + "Major mode for viewing code assembler. + +\\{gdb-assembler-mode-map}" + (setq major-mode 'gdb-assembler-mode) + (setq mode-name "Machine") + (setq gdb-overlay-arrow-position nil) + (add-to-list 'overlay-arrow-variable-list 'gdb-overlay-arrow-position) + (put 'gdb-overlay-arrow-position 'overlay-arrow-string "=>") + (setq fringes-outside-margins t) + (setq buffer-read-only t) + (use-local-map gdb-assembler-mode-map) + (gdb-invalidate-assembler)) + +(defun gdb-assembler-buffer-name () + (with-current-buffer gud-comint-buffer + (concat "*Machine Code " (gdb-get-target-string) "*"))) + +(defun gdb-display-assembler-buffer () + (interactive) + (gdb-display-buffer + (gdb-get-create-buffer 'gdb-assembler-buffer))) + +(defun gdb-frame-assembler-buffer () + (interactive) + (switch-to-buffer-other-frame + (gdb-get-create-buffer 'gdb-assembler-buffer))) + +;; modified because if gdb-current-address has changed value a new command +;; must be enqueued to update the buffer with the new output +(defun gdb-invalidate-assembler (&optional ignored) + (if (gdb-get-buffer 'gdb-assembler-buffer) + (progn + (unless (string-equal gdb-current-frame gdb-previous-frame) + (if (or (not (member 'gdb-invalidate-assembler + (gdb-get-pending-triggers))) + (not (string-equal gdb-current-address + gdb-previous-address))) + (progn + ;; take previous disassemble command off the queue + (with-current-buffer gud-comint-buffer + (let ((queue (gdb-get-input-queue)) (item)) + (dolist (item queue) + (if (equal (cdr item) '(gdb-assembler-handler)) + (gdb-set-input-queue + (delete item (gdb-get-input-queue))))))) + (gdb-enqueue-input + (list (concat "server disassemble " gdb-current-address "\n") + 'gdb-assembler-handler)) + (gdb-set-pending-triggers + (cons 'gdb-invalidate-assembler + (gdb-get-pending-triggers))) + (setq gdb-previous-address gdb-current-address) + (setq gdb-previous-frame gdb-current-frame))))))) + +(defun gdb-get-current-frame () + (if (not (member 'gdb-get-current-frame (gdb-get-pending-triggers))) + (progn + (gdb-enqueue-input + (list (concat "server info frame\n") 'gdb-frame-handler)) + (gdb-set-pending-triggers + (cons 'gdb-get-current-frame + (gdb-get-pending-triggers)))))) + +(defun gdb-frame-handler () + (gdb-set-pending-triggers + (delq 'gdb-get-current-frame (gdb-get-pending-triggers))) + (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) + (goto-char (point-min)) + (forward-line) + (if (looking-at ".*=\\s-+0x\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*\\)") + (progn + (setq gdb-current-frame (match-string 2)) + (let ((address (match-string 1))) + ;; remove leading 0s from output of info frame command. + (if (string-match "^0+\\(.*\\)" address) + (setq gdb-current-address + (concat "0x" (match-string 1 address))) + (setq gdb-current-address (concat "0x" address)))) + (if (or (if (not (re-search-forward "(\\S-*:[0-9]*);" nil t)) + (progn (setq gdb-view-source nil) t)) + (eq gdb-selected-view 'assembler)) + (progn + (gdb-display-buffer + (gdb-get-create-buffer 'gdb-assembler-buffer)) + ;;update with new frame for machine code if necessary + (gdb-invalidate-assembler)))))) + (if (re-search-forward " source language \\(\\S-*\\)\." nil t) + (setq gdb-current-language (match-string 1)))) + +(provide 'gdb-ui) + +;;; arch-tag: e9fb00c5-74ef-469f-a088-37384caae352 +;;; gdb-ui.el ends here diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index 7ba294d53a..dea40b8db1 100644 --- a/lisp/progmodes/glasses.el +++ b/lisp/progmodes/glasses.el @@ -273,4 +273,5 @@ at places they belong to." (provide 'glasses) +;;; arch-tag: a3515167-c89e-484f-90a1-d85143e52b12 ;;; glasses.el ends here diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el new file mode 100644 index 0000000000..94937ba1e8 --- /dev/null +++ b/lisp/progmodes/grep.el @@ -0,0 +1,566 @@ +;;; grep.el --- run compiler as inferior of Emacs, parse error messages + +;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001, 02, 2004 +;; Free Software Foundation, Inc. + +;; Author: Roland McGrath +;; Maintainer: FSF +;; Keywords: tools, processes + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This package provides the grep facilities documented in the Emacs +;; user's manual. + +;;; Code: + +(require 'compile) + +(defgroup grep nil + "Run compiler as inferior of Emacs, parse error messages." + :group 'tools + :group 'processes) + + +;;;###autoload +(defcustom grep-window-height nil + "*Number of lines in a grep window. If nil, use `compilation-window-height'." + :type '(choice (const :tag "Default" nil) + integer) + :version "21.4" + :group 'grep) + +(defcustom grep-auto-highlight t + "*Specify how many grep matches to highlight (and parse) initially. +\(Highlighting applies to an grep match when the mouse is over it.) +If this is a number N, all grep matches in the first N lines +are highlighted and parsed as soon as they arrive in Emacs. +If t, highlight and parse the whole grep output as soon as it arrives. +If nil, don't highlight or parse any of the grep buffer until you try to +move to the error messages. + +Those grep matches which are not parsed and highlighted initially +will be parsed and highlighted as soon as you try to move to them." + :type '(choice (const :tag "All" t) + (const :tag "None" nil) + (integer :tag "First N lines")) + :version "21.4" + :group 'grep) + +(defcustom grep-scroll-output nil + "*Non-nil to scroll the *grep* buffer window as output appears. + +Setting it causes the grep commands to put point at the end of their +output window so that the end of the output is always visible rather +than the begining." + :type 'boolean + :version "21.4" + :group 'grep) + +(defcustom grep-command nil + "The default grep command for \\[grep]. +If the grep program used supports an option to always include file names +in its output (such as the `-H' option to GNU grep), it's a good idea to +include it when specifying `grep-command'. + +The default value of this variable is set up by `grep-compute-defaults'; +call that function before using this variable in your program." + :type '(choice string + (const :tag "Not Set" nil)) + :group 'grep) + +(defcustom grep-use-null-device 'auto-detect + "If t, append the value of `null-device' to `grep' commands. +This is done to ensure that the output of grep includes the filename of +any match in the case where only a single file is searched, and is not +necessary if the grep program used supports the `-H' option. + +The default value of this variable is set up by `grep-compute-defaults'; +call that function before using this variable in your program." + :type 'boolean + :type '(choice (const :tag "Do Not Append Null Device" nil) + (const :tag "Append Null Device" t) + (other :tag "Not Set" auto-detect)) + :group 'grep) + +(defcustom grep-find-command nil + "The default find command for \\[grep-find]. +The default value of this variable is set up by `grep-compute-defaults'; +call that function before using this variable in your program." + :type '(choice string + (const :tag "Not Set" nil)) + :group 'grep) + +(defcustom grep-tree-command nil + "The default find command for \\[grep-tree]. +The default value of this variable is set up by `grep-compute-defaults'; +call that function before using this variable in your program. +The following place holders should be present in the string: + - base directory for find + - find options to restrict or expand the directory list + - find options to limit the files matched + - place to put -i if case insensitive grep + - the regular expression searched for." + :type '(choice string + (const :tag "Not Set" nil)) + :version "21.4" + :group 'grep) + +(defcustom grep-tree-files-aliases '( + ("ch" . "*.[ch]") + ("c" . "*.c") + ("h" . "*.h") + ("m" . "[Mm]akefile*") + ("asm" . "*.[sS]") + ("all" . "*") + ("el" . "*.el") + ) + "*Alist of aliases for the FILES argument to `grep-tree'." + :type 'alist + :group 'grep) + +(defcustom grep-tree-ignore-case t + "*If non-nil, `grep-tree' ignores case in matches." + :type 'boolean + :group 'grep) + +(defcustom grep-tree-ignore-CVS-directories t + "*If non-nil, `grep-tree' does no recurse into CVS directories." + :type 'boolean + :group 'grep) + +;;;###autoload +(defcustom grep-setup-hook nil + "List of hook functions run by `grep-process-setup' (see `run-hooks')." + :type 'hook + :group 'grep) + +(defvar grep-mode-map + (let ((map (cons 'keymap compilation-minor-mode-map))) + (define-key map " " 'scroll-up) + (define-key map "\^?" 'scroll-down) + + ;; This is intolerable -- rms +;;; (define-key map [remap next-line] 'compilation-next-error) +;;; (define-key map [remap previous-line] 'compilation-previous-error) + + (define-key map "\r" 'compile-goto-error) ;; ? + (define-key map "n" 'next-error-no-select) + (define-key map "p" 'previous-error-no-select) + (define-key map "{" 'compilation-previous-file) + (define-key map "}" 'compilation-next-file) + (define-key map "\t" 'compilation-next-file) + + ;; Set up the menu-bar + (define-key map [menu-bar grep] + (cons "Grep" (make-sparse-keymap "Grep"))) + + (define-key map [menu-bar grep compilation-kill-compilation] + '("Kill Grep" . kill-compilation)) + (define-key map [menu-bar grep compilation-separator2] + '("----" . nil)) + (define-key map [menu-bar grep compilation-compile] + '("Compile..." . compile)) + (define-key map [menu-bar grep compilation-grep] + '("Another grep" . grep)) + (define-key map [menu-bar grep compilation-recompile] + '("Repeat grep" . recompile)) + (define-key map [menu-bar grep compilation-separator2] + '("----" . nil)) + (define-key map [menu-bar grep compilation-first-error] + '("First Match" . first-error)) + (define-key map [menu-bar grep compilation-previous-error] + '("Previous Match" . previous-error)) + (define-key map [menu-bar grep compilation-next-error] + '("Next Match" . next-error)) + map) + "Keymap for grep buffers. +`compilation-minor-mode-map' is a cdr of this.") + +(defalias 'kill-grep 'kill-compilation) + +;;;; TODO --- refine this!! + +;;; (defcustom grep-use-compilation-buffer t +;;; "When non-nil, grep specific commands update `compilation-last-buffer'. +;;; This means that standard compile commands like \\[next-error] and \\[compile-goto-error] +;;; can be used to navigate between grep matches (the default). +;;; Otherwise, the grep specific commands like \\[grep-next-match] must +;;; be used to navigate between grep matches." +;;; :type 'boolean +;;; :group 'grep) + +;; override compilation-last-buffer +(defvar grep-last-buffer nil + "The most recent grep buffer. +A grep buffer becomes most recent when its process is started +or when it is used with \\[grep-next-match]. +Notice that using \\[next-error] or \\[compile-goto-error] modifies +`complation-last-buffer' rather than `grep-last-buffer'.") + +(defvar grep-regexp-alist + '(("^\\(.+?\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2) + ("^Binary file \\(.+\\) matches$" 1 nil nil 1)) + "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") + +(defvar grep-error "grep hit" + "Message to print when no matches are found.") + +;; Reverse the colors because grep hits are not errors (though we jump there +;; with `next-error'), and unreadable files can't be gone to. +(defvar grep-hit-face compilation-info-face + "Face name to use for grep hits.") + +(defvar grep-error-face compilation-error-face + "Face name to use for grep error messages.") + +(defvar grep-mode-font-lock-keywords + '(;; Command output lines. + ("^\\([A-Za-z_0-9/\.+-]+\\)[ \t]*:" 1 font-lock-function-name-face) + (": \\(.+\\): \\(?:Permission denied\\|No such \\(?:file or directory\\|device or address\\)\\)$" + 1 grep-error-face) + ;; remove match from grep-regexp-alist before fontifying + ("^Grep finished \\(?:(\\(matches found\\))\\|with \\(no matches found\\)\\).*" + (0 '(face nil message nil help-echo nil mouse-face nil) t) + (1 grep-hit-face nil t) + (2 grep-error-face nil t)) + ("^Grep \\(exited abnormally\\) with code \\([0-9]+\\).*" + (0 '(face nil message nil help-echo nil mouse-face nil) t) + (1 compilation-warning-face) + (2 compilation-line-face))) + "Additional things to highlight in grep output. +This gets tacked on the end of the generated expressions.") + +(defvar grep-program + ;; Currently zgrep has trouble. It runs egrep instead of grep, + ;; and it doesn't pass along long options right. + "grep" + ;; (if (equal (condition-case nil ; in case "zgrep" isn't in exec-path + ;; (call-process "zgrep" nil nil nil + ;; "foo" null-device) + ;; (error nil)) + ;; 1) + ;; "zgrep" + ;; "grep") + "The default grep program for `grep-command' and `grep-find-command'. +This variable's value takes effect when `grep-compute-defaults' is called.") + +(defvar find-program "find" + "The default find program for `grep-find-command'. +This variable's value takes effect when `grep-compute-defaults' is called.") + +(defvar grep-find-use-xargs nil + "Whether \\[grep-find] uses the `xargs' utility by default. + +If nil, it uses `find -exec'; if `gnu', it uses `find -print0' and `xargs -0'; +if not nil and not `gnu', it uses `find -print' and `xargs'. + +This variable's value takes effect when `grep-compute-defaults' is called.") + +;; History of grep commands. +(defvar grep-history nil) +(defvar grep-find-history nil) + +(defun grep-process-setup () + "Setup compilation variables and buffer for `grep'. +Set up `compilation-exit-message-function' and run `grep-setup-hook'." + (set (make-local-variable 'compilation-exit-message-function) + (lambda (status code msg) + (if (eq status 'exit) + (cond ((zerop code) + '("finished (matches found)\n" . "matched")) + ((= code 1) + '("finished with no matches found\n" . "no match")) + (t + (cons msg code))) + (cons msg code)))) + (run-hooks 'grep-setup-hook)) + +(defun grep-compute-defaults () + (unless (or (not grep-use-null-device) (eq grep-use-null-device t)) + (setq grep-use-null-device + (with-temp-buffer + (let ((hello-file (expand-file-name "HELLO" data-directory))) + (not + (and (equal (condition-case nil + (if grep-command + ;; `grep-command' is already set, so + ;; use that for testing. + (call-process-shell-command + grep-command nil t nil + "^English" hello-file) + ;; otherwise use `grep-program' + (call-process grep-program nil t nil + "-nH" "^English" hello-file)) + (error nil)) + 0) + (progn + (goto-char (point-min)) + (looking-at + (concat (regexp-quote hello-file) + ":[0-9]+:English"))))))))) + (unless grep-command + (setq grep-command + (let ((required-options (if grep-use-null-device "-n" "-nH"))) + (if (equal (condition-case nil ; in case "grep" isn't in exec-path + (call-process grep-program nil nil nil + "-e" "foo" null-device) + (error nil)) + 1) + (format "%s %s -e " grep-program required-options) + (format "%s %s " grep-program required-options))))) + (unless grep-find-use-xargs + (setq grep-find-use-xargs + (if (and + (equal (call-process "find" nil nil nil + null-device "-print0") + 0) + (equal (call-process "xargs" nil nil nil + "-0" "-e" "echo") + 0)) + 'gnu))) + (unless grep-find-command + (setq grep-find-command + (cond ((eq grep-find-use-xargs 'gnu) + (format "%s . -type f -print0 | xargs -0 -e %s" + find-program grep-command)) + (grep-find-use-xargs + (format "%s . -type f -print | xargs %s" + find-program grep-command)) + (t (cons (format "%s . -type f -exec %s {} %s \\;" + find-program grep-command null-device) + (+ 22 (length grep-command))))))) + (unless grep-tree-command + (setq grep-tree-command + (let* ((glen (length grep-program)) + (gcmd (concat grep-program " " (substring grep-command glen)))) + (cond ((eq grep-find-use-xargs 'gnu) + (format "%s -type f -print0 | xargs -0 -e %s " + find-program gcmd)) + (grep-find-use-xargs + (format "%s -type f -print | xargs %s " + find-program gcmd)) + (t (format "%s -type f -exec %s {} %s \\;" + find-program gcmd null-device))))))) + +(defun grep-default-command () + (let ((tag-default + (funcall (or find-tag-default-function + (get major-mode 'find-tag-default-function) + ;; We use grep-tag-default instead of + ;; find-tag-default, to avoid loading etags. + 'grep-tag-default))) + (sh-arg-re "\\(\\(?:\"\\(?:[^\"]\\|\\\\\"\\)+\"\\|'[^']+'\\|[^\"' \t\n]\\)+\\)") + (grep-default (or (car grep-history) grep-command))) + ;; Replace the thing matching for with that around cursor. + (when (or (string-match + (concat "[^ ]+\\s +\\(?:-[^ ]+\\s +\\)*" + sh-arg-re "\\(\\s +\\(\\S +\\)\\)?") + grep-default) + ;; If the string is not yet complete. + (string-match "\\(\\)\\'" grep-default)) + (unless (or (not (stringp buffer-file-name)) + (when (match-beginning 2) + (save-match-data + (string-match + (wildcard-to-regexp + (file-name-nondirectory + (match-string 3 grep-default))) + (file-name-nondirectory buffer-file-name))))) + (setq grep-default (concat (substring grep-default + 0 (match-beginning 2)) + " *." + (file-name-extension buffer-file-name)))) + (replace-match (or tag-default "") t t grep-default 1)))) + +;;;###autoload +(defun grep (command-args &optional highlight-regexp) + "Run grep, with user-specified args, and collect output in a buffer. +While grep runs asynchronously, you can use \\[next-error] (M-x next-error), +or \\\\[compile-goto-error] in the grep \ +output buffer, to go to the lines +where grep found matches. + +This command uses a special history list for its COMMAND-ARGS, so you can +easily repeat a grep command. + +A prefix argument says to default the argument based upon the current +tag the cursor is over, substituting it into the last grep command +in the grep command history (or into `grep-command' +if that history list is empty). + +If specified, optional second arg HIGHLIGHT-REGEXP is the regexp to +temporarily highlight in visited source lines." + (interactive + (progn + (unless (and grep-command + (or (not grep-use-null-device) (eq grep-use-null-device t))) + (grep-compute-defaults)) + (let ((default (grep-default-command))) + (list (read-from-minibuffer "Run grep (like this): " + (if current-prefix-arg + default grep-command) + nil nil 'grep-history + (if current-prefix-arg nil default)))))) + + ;; Setting process-setup-function makes exit-message-function work + ;; even when async processes aren't supported. + (let ((compilation-process-setup-function 'grep-process-setup)) + (compilation-start (if (and grep-use-null-device null-device) + (concat command-args " " null-device) + command-args) + 'grep-mode nil highlight-regexp))) + +;;;###autoload (autoload 'grep-mode "grep" nil t) +(define-compilation-mode grep-mode "Grep" + "Sets `grep-last-buffer' and `compilation-window-height'." + (setq grep-last-buffer (current-buffer)) + (set (make-local-variable 'compilation-error-face) + grep-hit-face) + (set (make-local-variable 'compilation-error-regexp-alist) + grep-regexp-alist)) + +;; This is a copy of find-tag-default from etags.el. +(defun grep-tag-default () + (save-excursion + (while (looking-at "\\sw\\|\\s_") + (forward-char 1)) + (when (or (re-search-backward "\\sw\\|\\s_" + (save-excursion (beginning-of-line) (point)) + t) + (re-search-forward "\\(\\sw\\|\\s_\\)+" + (save-excursion (end-of-line) (point)) + t)) + (goto-char (match-end 0)) + (buffer-substring (point) + (progn (forward-sexp -1) + (while (looking-at "\\s'") + (forward-char 1)) + (point)))))) + +;;;###autoload +(defun grep-find (command-args) + "Run grep via find, with user-specified args COMMAND-ARGS. +Collect output in a buffer. +While find runs asynchronously, you can use the \\[next-error] command +to find the text that grep hits refer to. + +This command uses a special history list for its arguments, so you can +easily repeat a find command." + (interactive + (progn + (unless grep-find-command + (grep-compute-defaults)) + (if grep-find-command + (list (read-from-minibuffer "Run find (like this): " + grep-find-command nil nil + 'grep-find-history)) + ;; No default was set + (read-string + "compile.el: No `grep-find-command' command available. Press RET.") + (list nil)))) + (when (and grep-find-command command-args) + (let ((null-device nil)) ; see grep + (grep command-args)))) + +(defun grep-expand-command-macros (command &optional regexp files dir excl case-fold) + "Patch grep COMMAND replacing , etc." + (setq command + (replace-regexp-in-string "" + (or dir ".") command t t)) + (setq command + (replace-regexp-in-string "" + (or excl "") command t t)) + (setq command + (replace-regexp-in-string "" + (or files "") command t t)) + (setq command + (replace-regexp-in-string "" + (if case-fold "-i" "") command t t)) + (setq command + (replace-regexp-in-string "" + (or regexp "") command t t)) + command) + +(defvar grep-tree-last-regexp "") +(defvar grep-tree-last-files (car (car grep-tree-files-aliases))) + +;;;###autoload +(defun grep-tree (regexp files dir &optional subdirs) + "Grep for REGEXP in FILES in directory tree rooted at DIR. +Collect output in a buffer. +Interactively, prompt separately for each search parameter. +With prefix arg, reuse previous REGEXP. +The search is limited to file names matching shell pattern FILES. +FILES may use abbreviations defined in `grep-tree-files-aliases', e.g. +entering `ch' is equivalent to `*.[ch]'. + +While find runs asynchronously, you can use the \\[next-error] command +to find the text that grep hits refer to. + +This command uses a special history list for its arguments, so you can +easily repeat a find command. + +When used non-interactively, optional arg SUBDIRS limits the search to +those sub directories of DIR." + (interactive + (let* ((regexp + (if current-prefix-arg + grep-tree-last-regexp + (let* ((default (current-word)) + (spec (read-string + (concat "Search for" + (if (and default (> (length default) 0)) + (format " (default %s): " default) ": "))))) + (if (equal spec "") default spec)))) + (files + (read-string (concat "Search for \"" regexp "\" in files (default " grep-tree-last-files "): "))) + (dir + (read-directory-name "Base directory: " nil default-directory t))) + (list regexp files dir))) + (unless grep-tree-command + (grep-compute-defaults)) + (unless (and (stringp files) (> (length files) 0)) + (setq files grep-tree-last-files)) + (when files + (setq grep-tree-last-files files) + (let ((mf (assoc files grep-tree-files-aliases))) + (if mf + (setq files (cdr mf))))) + (let ((command-args (grep-expand-command-macros + grep-tree-command + (setq grep-tree-last-regexp regexp) + (and files (concat "-name '" files "'")) + (if subdirs + (if (stringp subdirs) + subdirs + (mapconcat 'identity subdirs " ")) + nil) ;; we change default-directory to dir + (and grep-tree-ignore-CVS-directories "-path '*/CVS' -prune -o ") + grep-tree-ignore-case)) + (default-directory dir) + (null-device nil)) ; see grep + (grep command-args regexp))) + + +(provide 'grep) + +;;; arch-tag: 5a5b9169-a79d-4f38-9c38-f69615f39c4d +;;; grep.el ends here diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 349c78ce3d..a34b0bb2d4 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -96,9 +96,9 @@ Used to grey out relevant toolbar icons.") ([run] menu-item "Run" gud-run :enable (and (not gud-running) (memq gud-minor-mode '(gdba gdb dbx jdb)))) - ([goto] menu-item "Continue to selection" gud-until + ([until] menu-item "Continue to selection" gud-until :enable (and (not gud-running) - (memq gud-minor-mode '(gdba gdb)))) + (memq gud-minor-mode '(gdba gdb perldb)))) ([remove] menu-item "Remove Breakpoint" gud-remove :enable (not gud-running)) ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak @@ -115,7 +115,7 @@ Used to grey out relevant toolbar icons.") '(gdba gdb dbx xdb jdb pdb bashdb)))) ([print] menu-item "Print Expression" gud-print :enable (not gud-running)) - ([display] menu-item "Display Expression" gud-display + ([watch] menu-item "Watch Expression" gud-watch :enable (and (not gud-running) (eq gud-minor-mode 'gdba))) ([finish] menu-item "Finish Function" gud-finish @@ -158,15 +158,18 @@ Used to grey out relevant toolbar icons.") (dolist (x '((gud-break . "gud-break") (gud-remove . "gud-remove") (gud-print . "gud-print") - (gud-display . "gud-display") + (gud-watch . "gud-watch") (gud-run . "gud-run") (gud-until . "gud-until") (gud-cont . "gud-cont") - (gud-step . "gud-step") - (gud-next . "gud-next") + ;; gud-s, gud-si etc. instead of gud-step, + ;; gud-stepi, to avoid file-name clashes on DOS + ;; 8+3 filesystems. + (gud-step . "gud-s") + (gud-next . "gud-n") (gud-finish . "gud-finish") - (gud-stepi . "gud-stepi") - (gud-nexti . "gud-nexti") + (gud-stepi . "gud-si") + (gud-nexti . "gud-ni") (gud-up . "gud-up") (gud-down . "gud-down")) map) @@ -302,11 +305,18 @@ t means that there is no stack, and we are in display-file mode.") (define-key gud-speedbar-key-map "j" 'speedbar-edit-line) (define-key gud-speedbar-key-map "e" 'speedbar-edit-line) - (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line))) + (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line) + (define-key gud-speedbar-key-map "D" 'gdb-var-delete))) + (defvar gud-speedbar-menu-items ;; Note to self. Add expand, and turn off items when not available. - '(["Jump to stack frame" speedbar-edit-line t]) + '(["Jump to stack frame" speedbar-edit-line + (with-current-buffer gud-comint-buffer (not (eq gud-minor-mode 'gdba)))] + ["Edit value" speedbar-edit-line + (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))] + ["Delete expression" gdb-var-delete + (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))]) "Additional menu items to add to the speedbar frame.") ;; Make sure our special speedbar mode is loaded @@ -318,52 +328,85 @@ t means that there is no stack, and we are in display-file mode.") "Create a speedbar display based on the current state of GUD. If the GUD BUFFER is not running a supported debugger, then turn off the specialized speedbar mode." - (if (and (save-excursion (goto-char (point-min)) - (looking-at "Current Stack")) - (equal gud-last-last-frame gud-last-speedbar-stackframe)) - nil - (setq gud-last-speedbar-buffer buffer) - (let* ((minor-mode (with-current-buffer buffer gud-minor-mode)) - (frames - (cond ((memq minor-mode '(gdba gdb)) - (gud-gdb-get-stackframe buffer)) - ;; Add more debuggers here! - (t - (speedbar-remove-localized-speedbar-support buffer) - nil)))) - (erase-buffer) - (if (not frames) - (insert "No Stack frames\n") - (insert "Current Stack:\n")) - (while frames - (insert (nth 1 (car frames)) ":\n") - (if (= (length (car frames)) 2) - (progn -; (speedbar-insert-button "[?]" + (let ((minor-mode (with-current-buffer buffer gud-minor-mode))) + (cond + ((eq minor-mode 'gdba) + (when (or gdb-var-changed + (not (save-excursion + (goto-char (point-min)) + (let ((case-fold-search t)) + (looking-at "Watch Expressions:"))))) + (erase-buffer) + (insert "Watch Expressions:\n") + (let ((var-list gdb-var-list)) + (while var-list + (let* ((depth 0) (start 0) (char ?+) + (var (car var-list)) (varnum (nth 1 var))) + (while (string-match "\\." varnum start) + (setq depth (1+ depth) + start (1+ (match-beginning 0)))) + (if (equal (nth 2 var) "0") + (speedbar-make-tag-line 'bracket ?? nil nil + (concat (car var) "\t" (nth 4 var)) + 'gdb-edit-value + nil + (if (and (nth 5 var) + gdb-show-changed-values) + 'font-lock-warning-face + nil) depth) + (if (and (cadr var-list) + (string-match varnum (cadr (cadr var-list)))) + (setq char ?-)) + (speedbar-make-tag-line 'bracket char + 'gdb-speedbar-expand-node varnum + (concat (car var) "\t" (nth 3 var)) + nil nil nil depth))) + (setq var-list (cdr var-list)))) + (setq gdb-var-changed nil))) + (t (if (and (save-excursion + (goto-char (point-min)) + (looking-at "Current Stack")) + (equal gud-last-last-frame gud-last-speedbar-stackframe)) + nil + (setq gud-last-speedbar-buffer buffer) + (let ((gud-frame-list + (cond ((eq minor-mode 'gdb) + (gud-gdb-get-stackframe buffer)) + ;; Add more debuggers here! + (t (speedbar-remove-localized-speedbar-support buffer) + nil)))) + (erase-buffer) + (if (not gud-frame-list) + (insert "No Stack frames\n") + (insert "Current Stack:\n")) + (dolist (frame gud-frame-list) + (insert (nth 1 frame) ":\n") + (if (= (length frame) 2) + (progn +; (speedbar-insert-button "[?]" +; 'speedbar-button-face +; nil nil nil t) + (speedbar-insert-button (car frame) + 'speedbar-directory-face + nil nil nil t)) +; (speedbar-insert-button "[+]" ; 'speedbar-button-face -; nil nil nil t) - (speedbar-insert-button (car (car frames)) - 'speedbar-directory-face - nil nil nil t)) -; (speedbar-insert-button "[+]" -; 'speedbar-button-face -; 'speedbar-highlight-face -; 'gud-gdb-get-scope-data -; (car frames) t) - (speedbar-insert-button (car (car frames)) - 'speedbar-file-face - 'speedbar-highlight-face - (cond ((memq minor-mode '(gdba gdb)) - 'gud-gdb-goto-stackframe) - (t (error "Should never be here"))) - (car frames) t)) - (setq frames (cdr frames))) -; (let ((selected-frame -; (cond ((eq ff 'gud-gdb-find-file) -; (gud-gdb-selected-frame-info buffer)) -; (t (error "Should never be here")))))) - ) - (setq gud-last-speedbar-stackframe gud-last-last-frame))) +; 'speedbar-highlight-face +; 'gud-gdb-get-scope-data +; frame t) + (speedbar-insert-button (car frame) + 'speedbar-file-face + 'speedbar-highlight-face + (cond ((memq minor-mode '(gdba gdb)) + 'gud-gdb-goto-stackframe) + (t (error "Should never be here"))) + frame t))) +; (let ((selected-frame +; (cond ((eq ff 'gud-gdb-find-file) +; (gud-gdb-selected-frame-info buffer)) +; (t (error "Should never be here")))))) + ) + (setq gud-last-speedbar-stackframe gud-last-last-frame)))))) ;; ====================================================================== @@ -372,7 +415,7 @@ off the specialized speedbar mode." ;; History of argument lists passed to gdb. (defvar gud-gdb-history nil) -(defcustom gud-gdb-command-name "gdb --fullname" +(defcustom gud-gdb-command-name "gdb --annotate=3" "Default command to execute an executable under the GDB debugger." :type 'string :group 'gud) @@ -413,12 +456,28 @@ off the specialized speedbar mode." ;; Set the accumulator to the remaining text. gud-marker-acc (substring gud-marker-acc (match-end 0)))) + ;; Check for annotations and change gud-minor-mode to 'gdba if + ;; they are found. + (while (string-match "\n\032\032\\(.*\\)\n" gud-marker-acc) + (when (string-equal (match-string 1 gud-marker-acc) "prompt") + (require 'gdb-ui) + (gdb-prompt nil)) + + (setq + ;; Append any text before the marker to the output we're going + ;; to return - we don't include the marker in this text. + output (concat output + (substring gud-marker-acc 0 (match-beginning 0))) + + ;; Set the accumulator to the remaining text. + gud-marker-acc (substring gud-marker-acc (match-end 0)))) + ;; Does the remaining text look like it might end with the ;; beginning of another marker? If it does, then keep it in ;; gud-marker-acc until we receive the rest of it. Since we ;; know the full marker regexp above failed, it's pretty simple to ;; test for marker starts. - (if (string-match "\032.*\\'" gud-marker-acc) + (if (string-match "\n\\(\032.*\\)?\\'" gud-marker-acc) (progn ;; Everything before the potential marker start can be output. (setq output (concat output (substring gud-marker-acc @@ -458,6 +517,8 @@ off the specialized speedbar mode." gud-minibuffer-local-map nil hist-sym))) +(defvar gdb-first-prompt t) + ;;;###autoload (defun gdb (command-line) "Run gdb on program FILE in buffer *gud-FILE*. @@ -488,8 +549,8 @@ and source-file directory for your debugger." (local-set-key "\C-i" 'gud-gdb-complete-command) (setq comint-prompt-regexp "^(.*gdb[+]?) *") (setq paragraph-start comint-prompt-regexp) - (run-hooks 'gdb-mode-hook) - ) + (setq gdb-first-prompt t) + (run-hooks 'gdb-mode-hook)) ;; One of the nice features of GDB is its impressive support for ;; context-sensitive command completion. We preserve that feature @@ -1254,14 +1315,16 @@ and source-file directory for your debugger." (set (make-local-variable 'gud-minor-mode) 'perldb) (gud-def gud-break "b %l" "\C-b" "Set breakpoint at current line.") - (gud-def gud-remove "d %l" "\C-d" "Remove breakpoint at current line") + (gud-def gud-remove "B %l" "\C-d" "Remove breakpoint at current line") (gud-def gud-step "s" "\C-s" "Step one source line with display.") (gud-def gud-next "n" "\C-n" "Step one line (skip functions).") (gud-def gud-cont "c" "\C-r" "Continue with display.") ; (gud-def gud-finish "finish" "\C-f" "Finish executing current function.") ; (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).") ; (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).") - (gud-def gud-print "%e" "\C-p" "Evaluate perl expression at point.") + (gud-def gud-print "p %e" "\C-p" "Evaluate perl expression at point.") + (gud-def gud-until "c %l" "\C-u" "Continue to current line.") + (setq comint-prompt-regexp "^ DB<+[0-9]+>+ ") (setq paragraph-start comint-prompt-regexp) @@ -1913,14 +1976,14 @@ nil) ;; FIXME: Java ID's are UNICODE strings, this matches ASCII ;; ID's only. ;; - ;; The "," in the last square-bracket is necessary because of - ;; Sun's total disrespect for backwards compatibility in + ;; The ".," in the last square-bracket are necessary because + ;; of Sun's total disrespect for backwards compatibility in ;; reported line numbers from jdb - starting in 1.4.0 they - ;; introduced a comma at the thousands position (how - ;; ingenious!) + ;; print line numbers using LOCALE, inserting a comma or a + ;; period at the thousands positions (how ingenious!). "\\(\[[0-9]+\] \\)*\\([a-zA-Z0-9.$_]+\\)\\.[a-zA-Z0-9$_<>(),]+ \ -\\(([a-zA-Z0-9.$_]+:\\|line=\\)\\([0-9,]+\\)" +\\(([a-zA-Z0-9.$_]+:\\|line=\\)\\([0-9.,]+\\)" gud-marker-acc) ;; A good marker is one that: @@ -1947,7 +2010,7 @@ nil) (string-to-int (let ((numstr (match-string 4 gud-marker-acc))) - (if (string-match "," numstr) + (if (string-match "[.,]" numstr) (replace-match "" nil nil numstr) numstr))))) (message "Could not find source file."))) @@ -2524,26 +2587,24 @@ Obeying it means displaying in another window the specified file and line." (if buffer (progn (with-current-buffer buffer - (if (not (or (verify-visited-file-modtime buffer) gud-keep-buffer)) - (progn - (if - (yes-or-no-p + (unless (or (verify-visited-file-modtime buffer) gud-keep-buffer) + (if (yes-or-no-p (format "File %s changed on disk. Reread from disk? " (buffer-name))) (revert-buffer t t) - (setq gud-keep-buffer t)))) + (setq gud-keep-buffer t))) (save-restriction (widen) (goto-line line) (setq pos (point)) (setq overlay-arrow-string "=>") (or overlay-arrow-position - (setq overlay-arrow-position (make-marker))) + (setq overlay-arrow-position (make-marker))) (set-marker overlay-arrow-position (point) (current-buffer))) (cond ((or (< pos (point-min)) (> pos (point-max))) - (widen) - (goto-char pos)))) - (set-window-point window overlay-arrow-position))))) + (widen) + (goto-char pos)))) + (if window (set-window-point window overlay-arrow-position)))))) ;; The gud-call function must do the right thing whether its invoking ;; keystroke is from the GUD buffer itself (via major-mode binding) @@ -2819,8 +2880,13 @@ class of the file (using s to separate nested class ids)." (save-match-data (let ((cplist (append gud-jdb-sourcepath gud-jdb-classpath)) (fbuffer (get-file-buffer f)) - class-found) + syntax-symbol syntax-point class-found) (setq f (file-name-sans-extension (file-truename f))) + ;; Syntax-symbol returns the symbol of the *first* element + ;; in the syntactical analysis result list, syntax-point + ;; returns the buffer position of same + (fset 'syntax-symbol (lambda (x) (c-langelem-sym (car x)))) + (fset 'syntax-point (lambda (x) (c-langelem-pos (car x)))) ;; Search through classpath list for an entry that is ;; contained in f (while (and cplist (not class-found)) @@ -2843,17 +2909,17 @@ class of the file (using s to separate nested class ids)." ;; with the 'topmost-intro symbol, there may be ;; nested classes... (while (not (eq 'topmost-intro - (car (car (c-guess-basic-syntax))))) + (syntax-symbol (c-guess-basic-syntax)))) ;; Check if the current position c-syntactic ;; analysis has 'inclass (setq syntax (c-guess-basic-syntax)) (while - (and (not (eq 'inclass (car (car syntax)))) + (and (not (eq 'inclass (syntax-symbol syntax))) (cdr syntax)) (setq syntax (cdr syntax))) - (if (eq 'inclass (car (car syntax))) + (if (eq 'inclass (syntax-symbol syntax)) (progn - (goto-char (cdr (car syntax))) + (goto-char (syntax-point syntax)) ;; Now we're at the beginning of a class ;; definition. Find class name (looking-at @@ -2862,9 +2928,9 @@ class of the file (using s to separate nested class ids)." (append (list (match-string-no-properties 1)) nclass))) (setq syntax (c-guess-basic-syntax)) - (while (and (not (cdr (car syntax))) (cdr syntax)) + (while (and (not (syntax-point syntax)) (cdr syntax)) (setq syntax (cdr syntax))) - (goto-char (cdr (car syntax))) + (goto-char (syntax-point syntax)) )) (string-match (concat (car nclass) "$") class-found) (setq class-found @@ -2975,4 +3041,5 @@ class of the file (using s to separate nested class ids)." (provide 'gud) +;;; arch-tag: 6d990948-df65-461a-be39-1c7fb83ac4c4 ;;; gud.el ends here diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 0213d2411c..aabc2f5783 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -969,4 +969,5 @@ Return as (TOP . BOTTOM) the extent of ifdef block." (provide 'hideif) +;;; arch-tag: c6381d17-a59a-483a-b945-658f22277981 ;;; hideif.el ends here diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 3520bbc468..7013c3856e 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -201,7 +201,7 @@ ;; Love, Dirk Herrmann, Gael Marziou, Jan Djarv, Guillaume Leray, ;; Moody Ahmad, Preston F. Crow, Lars Lindberg, Reto Zimmermann, ;; Keith Sheffield, Chew Meng Kuan, Tony Lam, Pete Ware, François -;; Pinard, Stefan Monnier, Joseph Eydelnant +;; Pinard, Stefan Monnier, Joseph Eydelnant, Michael Ernst ;; ;; Special thanks go to Dan Nicolaescu, who reimplemented hideshow using ;; overlays (rather than selective display), added isearch magic, folded @@ -395,9 +395,9 @@ Note that `mode-line-format' is buffer-local.") ; (setq buffer-invisibility-spec ; (cons arg buffer-invisibility-spec))))) ; (defun remove-from-invisibility-spec (arg) -; (if buffer-invisibility-spec -; (setq buffer-invisibility-spec -; (delete arg buffer-invisibility-spec))))) +; (when buffer-invisibility-spec +; (setq buffer-invisibility-spec +; (delete arg buffer-invisibility-spec))))) ;; hs-match-data (defalias 'hs-match-data 'match-data) @@ -497,29 +497,29 @@ The block beginning is adjusted by `hs-adjust-block-beginning' and then further adjusted to be at the end of the line." (if comment-reg (hs-hide-comment-region (car comment-reg) (cadr comment-reg) end) - (if (looking-at hs-block-start-regexp) - (let* ((mdata (hs-match-data t)) - (pure-p (match-end 0)) - (p - ;; `p' is the point at the end of the block beginning, - ;; which may need to be adjusted - (save-excursion - (goto-char (funcall (or hs-adjust-block-beginning - 'identity) - pure-p)) - ;; whatever the adjustment, we move to eol - (end-of-line) - (point))) - (q - ;; `q' is the point at the end of the block - (progn (hs-forward-sexp mdata 1) - (end-of-line) - (point)))) - (if (and (< p (point)) (> (count-lines p q) 1)) - (overlay-put (hs-flag-region p q 'code) - 'hs-ofs - (- pure-p p))) - (goto-char (if end q (min p pure-p))))))) + (when (looking-at hs-block-start-regexp) + (let* ((mdata (hs-match-data t)) + (pure-p (match-end 0)) + (p + ;; `p' is the point at the end of the block beginning, + ;; which may need to be adjusted + (save-excursion + (goto-char (funcall (or hs-adjust-block-beginning + 'identity) + pure-p)) + ;; whatever the adjustment, we move to eol + (end-of-line) + (point))) + (q + ;; `q' is the point at the end of the block + (progn (hs-forward-sexp mdata 1) + (end-of-line) + (point)))) + (when (and (< p (point)) (> (count-lines p q) 1)) + (overlay-put (hs-flag-region p q 'code) + 'hs-ofs + (- pure-p p))) + (goto-char (if end q (min p pure-p))))))) (defun hs-safety-is-job-n () "Warn if `buffer-invisibility-spec' does not contain symbol `hs'." @@ -568,16 +568,16 @@ as cdr." (setq p (point));; use this to avoid an infinite cycle (forward-comment 1) (skip-chars-forward " \t\n\f")) - (if (or (not (looking-at hs-c-start-regexp)) - (> (point) q)) - ;; we cannot hide this comment block - (setq not-hidable t))) + (when (or (not (looking-at hs-c-start-regexp)) + (> (point) q)) + ;; we cannot hide this comment block + (setq not-hidable t))) ;; goto the end of the comment (forward-comment (buffer-size)) (skip-chars-backward " \t\n\f") (end-of-line) - (if (>= (point) q) - (list (if not-hidable nil p) (point)))))))) + (when (>= (point) q) + (list (if not-hidable nil p) (point)))))))) (defun hs-grok-mode-type () "Set up hideshow variables for new buffers. @@ -607,9 +607,8 @@ function; and adjust-block-beginning function." c-start-regexp))) hs-forward-sexp-func (or (nth 4 lookup) 'forward-sexp) hs-adjust-block-beginning (nth 5 lookup))) - (progn - (setq hs-minor-mode nil) - (error "%s Mode doesn't support Hideshow Minor Mode" mode-name)))) + (setq hs-minor-mode nil) + (error "%s Mode doesn't support Hideshow Minor Mode" mode-name))) (defun hs-find-block-beginning () "Reposition point at block-start. @@ -667,11 +666,11 @@ and `case-fold-search' are both t." (if (and c-reg (nth 0 c-reg)) ;; point is inside a comment, and that comment is hidable (goto-char (nth 0 c-reg)) - (if (and (not c-reg) - (hs-find-block-beginning) - (looking-at hs-block-start-regexp)) - ;; point is inside a block - (goto-char (match-end 0))))) + (when (and (not c-reg) + (hs-find-block-beginning) + (looking-at hs-block-start-regexp)) + ;; point is inside a block + (goto-char (match-end 0))))) (end-of-line) (let ((overlays (overlays-at (point))) (found nil)) @@ -888,8 +887,7 @@ Key bindings: ;; load-time actions ;; keymaps and menus -(if hs-minor-mode-map - nil +(unless hs-minor-mode-map (setq hs-minor-mode-map (make-sparse-keymap)) (easy-menu-define hs-minor-mode-menu hs-minor-mode-map @@ -941,4 +939,5 @@ Key bindings: (provide 'hideshow) +;;; arch-tag: 378b6852-e82a-466a-aee8-d9c73859a65e ;;; hideshow.el ends here diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index df5084814f..694eea1285 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el @@ -243,7 +243,6 @@ with no args, if that value is non-nil." (self-insert-command (prefix-numeric-value arg))))) (defun icon-indent-command (&optional whole-exp) - (interactive "P") "Indent current line as Icon code, or in some cases insert a tab character. If `icon-tab-always-indent' is non-nil (the default), always indent current line. Otherwise, indent the current line only if point is at the left margin @@ -253,6 +252,7 @@ A numeric argument, regardless of its value, means indent rigidly all the lines of the expression starting after point so that this line becomes properly indented. The relative indentation among the lines of the expression are preserved." + (interactive "P") (if whole-exp ;; If arg, always indent this line as Icon ;; and shift remaining lines of expression the same amount. @@ -687,4 +687,5 @@ Returns nil if line starts inside a string, t if in a comment." (provide 'icon) +;;; arch-tag: 8abf8c99-e7df-44af-a58f-ef5ed2ee52cb ;;; icon.el ends here diff --git a/lisp/progmodes/idlw-rinfo.el b/lisp/progmodes/idlw-rinfo.el index 8499574ffb..fd43391fc5 100644 --- a/lisp/progmodes/idlw-rinfo.el +++ b/lisp/progmodes/idlw-rinfo.el @@ -1535,4 +1535,5 @@ (provide 'idlw-rinfo) (provide 'idlwave-rinfo) +;;; arch-tag: d0b65da3-7f5e-4992-b8dd-885800b5cd6b ;;; idlw-rinfo.el ends here diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index d9e59553c4..a600939ef7 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -5,7 +5,6 @@ ;; Chris Chase ;; Maintainer: J.D. Smith ;; Version: 4.15 -;; Date: $Date: 2002/09/13 06:18:53 $ ;; Keywords: processes ;; This file is part of GNU Emacs. @@ -3650,4 +3649,6 @@ static char * file[] = { (if idlwave-shell-use-toolbar (add-hook 'idlwave-shell-mode-hook 'idlwave-toolbar-add-everywhere)) + +;;; arch-tag: 20c2e8ce-0709-41d8-a5b6-bb039148440a ;;; idlw-shell.el ends here diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/progmodes/idlw-toolbar.el index 74f16b6b70..dc28938d5c 100644 --- a/lisp/progmodes/idlw-toolbar.el +++ b/lisp/progmodes/idlw-toolbar.el @@ -4,7 +4,6 @@ ;; Author: Carsten Dominik ;; Maintainer: J.D. Smith ;; Version: 4.15 -;; Date: $Date: 2002/09/12 16:56:54 $ ;; Keywords: processes ;; This file is part of GNU Emacs. @@ -880,3 +879,4 @@ static char * file[] = { ;;; idlw-toolbar.el ends here +;;; arch-tag: ec9a3717-c44c-4716-9bda-cdacbe5ddb62 diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index cd7cee7311..a49f70aa0b 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -5,7 +5,6 @@ ;; Chris Chase ;; Maintainer: J.D. Smith ;; Version: 4.15 -;; Date: $Date: 2003/05/06 17:40:52 $ ;; Keywords: languages ;; This file is part of GNU Emacs. @@ -3889,9 +3888,12 @@ you specify /." (progn (message (concat "Tagging " item "...")) (setq errbuf (get-buffer-create "*idltags-error*")) - (setq status (+ status - (call-process "sh" nil errbuf nil "-c" - (concat cmd append item)))) + (setq status + (+ status + (if (eq 0 (call-process "sh" nil errbuf nil "-c" + (concat cmd append item))) + 0 + 1))) ;; ;; Append additional tags (setq append " --append ") @@ -8251,4 +8253,5 @@ This function was written since `list-abbrevs' looks terrible for IDLWAVE mode." (provide 'idlwave) +;;; arch-tag: f77f3b0c-c37c-424f-a328-0886fd42b6fb ;;; idlwave.el ends here diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index ec4faacb3b..83a0c9d3e2 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -625,4 +625,5 @@ This is a good place to put keybindings.") (provide 'inf-lisp) +;;; arch-tag: 5b74abc3-a085-4b91-8ab8-8da6899d3b92 ;;; inf-lisp.el ends here diff --git a/lisp/progmodes/ld-script.el b/lisp/progmodes/ld-script.el new file mode 100644 index 0000000000..120cae538d --- /dev/null +++ b/lisp/progmodes/ld-script.el @@ -0,0 +1,135 @@ +;;; ld-script.el --- GNU linker script editing mode for Emacs + +;; Copyright (C) 2003 Free Software Foundation, Inc. + +;; Author: Masatake YAMATO +;; Keywords: languages, faces + +;; This file is part of GNU Emacs. + +;; This program 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 program 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 this program; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; Major mode for editing GNU linker (ld) scripts. + +;;; Code: + +;; Custom +(defgroup ld-script nil + "GNU linker script code editing commands for Emacs." + :prefix "ld-script-" + :group 'languages) + +(defvar ld-script-location-counter-face 'ld-script-location-counter-face) +(defface ld-script-location-counter-face + '((t (:weight bold :inherit font-lock-builtin-face))) + "Face for location counter in GNU ld script." + :group 'ld-script) + +;; Syntax rules +(defvar ld-script-mode-syntax-table + (let ((st (make-syntax-table))) + (modify-syntax-entry ?\ "-" st) + (modify-syntax-entry ?{ "(}" st) + (modify-syntax-entry ?} "){" st) + (modify-syntax-entry ?\( "()" st) + (modify-syntax-entry ?\) ")(" st) + (modify-syntax-entry ?\[ "(]" st) + (modify-syntax-entry ?\] ")[" st) + (modify-syntax-entry ?_ "w" st) + (modify-syntax-entry ?. "_" st) + (modify-syntax-entry ?\\ "\\" st) + (modify-syntax-entry ?: "." st) + (modify-syntax-entry ?, "." st) + (modify-syntax-entry ?? "." st) + (modify-syntax-entry ?= "." st) + (modify-syntax-entry ?* ". 23" st) + (modify-syntax-entry ?/ ". 14" st) + (modify-syntax-entry ?+ "." st) + (modify-syntax-entry ?- "." st) + (modify-syntax-entry ?! "." st) + (modify-syntax-entry ?~ "." st) + (modify-syntax-entry ?% "." st) + (modify-syntax-entry ?< "." st) + (modify-syntax-entry ?> "." st) + (modify-syntax-entry ?& "." st) + (modify-syntax-entry ?| "." st) + (modify-syntax-entry ?\" "\"" st) + st) + "Syntax table used while in `ld-script-mode'.") + +;; Font lock keywords +(defvar ld-script-keywords + '("ENTRY" "INCLUDE" "INPUT" "GROUP" + "OUTPUT" "SEARCH_DIR" "STARTUP" + "OUTPUT_FORMAT" "TARGET" + "ASSERT" "EXTERN" "FORCE_COMMON_ALLOCATION" "NOCROSSREFS" "OUTPUT_ARCH" + "PROVIDE" + "SECTIONS" "SORT" "COMMON" "KEEP" + "BYTE" "SHORT" "LONG" "QUAD" "SQAD" + "FILL" + "CREATE_OBJECT_SYMBOLS" + "CONSTRUCTORS" + "NOLOAD" "DSECT" "COPY" "INFO" "OVERLAY" + "AT" + "MEMORY" + "PHDRS" "FILEHDR" "FLAGS" + "PT_NULL" "PT_LOAD" "PT_DYNAMIC" "PT_INTERP" "PT_NONE" "PT_SHLIB" "PT_PHDR" + "VERSION") + "Keywords used of GNU ld script.") + +(defvar ld-script-builtins + '("ABSOLUTE" + "ADDR" + "ALIGN" + "BLOCK" + "DEFINED" + "LOADADDR" + "MAX" + "MIN" + "NEXT" + "SIZEOF" + "SIZEOF_HEADERS" + "sizeof_headers") + "Builtin functions of GNU ld script.") + +(defvar ld-script-font-lock-keywords + `((,(regexp-opt ld-script-keywords 'words) + 1 font-lock-keyword-face) + (,(regexp-opt ld-script-builtins 'words) + 1 font-lock-builtin-face) + ("/DISCARD/" . font-lock-warning-face) + ("##\\|#[^#\n]+$" . font-lock-preprocessor-face) + ("\\W\\(\\.\\)\\W" 1 ld-script-location-counter-face) + ) + "Default font-lock-keywords for `ld-script-mode'.") + +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.lds" . ld-script-mode)) + +;;;###autoload +(define-derived-mode ld-script-mode nil "LD-Script" + "A major mode to edit GNU ld script files" + (set (make-local-variable 'comment-start) "/* ") + (set (make-local-variable 'comment-end) " */") + (set (make-local-variable 'indent-line-function) #'indent-relative) + (set (make-local-variable 'font-lock-defaults) '(ld-script-font-lock-keywords nil))) + +(provide 'ld-script) + +;;; arch-tag: 83280b6b-e6fc-4d00-a630-922d7aec5593 +;;; ld-script.el ends here diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el index 56a28b437b..bd6fac5c63 100644 --- a/lisp/progmodes/m4-mode.el +++ b/lisp/progmodes/m4-mode.el @@ -171,4 +171,5 @@ ;;; "m4_syscmd" "m4_sysval" "m4_traceoff" "m4_traceon" "m4_translit" ;;; "m4_m4_undefine" "m4_undivert")) +;;; arch-tag: 87811d86-94c1-474b-9666-587f6da74af1 ;;; m4-mode.el ends here diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index f44bca814c..5130ca9bfe 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -301,9 +301,14 @@ not be enclosed in { } or ( )." '("^\\( +\\)\t" 1 makefile-space-face))) (defconst makefile-font-lock-syntactic-keywords - (list - ;; Change the syntax of a quoted newline so that it does not end a comment. - '("\\\\\n" 0 " "))) + ;; From sh-script.el. + ;; A `#' begins a comment in sh when it is unquoted and at the beginning + ;; of a word. In the shell, words are separated by metacharacters. + ;; The list of special chars is taken from the single-unix spec of the + ;; shell command language (under `quoting') but with `$' removed. + '(("[^|&;<>()`\\\"' \t\n]\\(#+\\)" 1 "_") + ;; Change the syntax of a quoted newline so that it does not end a comment. + ("\\\\\n" 0 "."))) (defvar makefile-imenu-generic-expression (list @@ -1369,7 +1374,7 @@ and generates the overview, one line per target name." (delete-file filename)) ; remove the tmpfile (defun makefile-query-by-make-minus-q (target &optional filename) - (not (zerop + (not (eq 0 (call-process makefile-brave-make nil nil nil "-f" filename "-q" target)))) @@ -1552,4 +1557,5 @@ If it isn't in one, return nil." (provide 'make-mode) +;;; arch-tag: bd23545a-de91-44fb-b1b2-feafbb2635a0 ;;; make-mode.el ends here diff --git a/lisp/progmodes/mantemp.el b/lisp/progmodes/mantemp.el index 9b8fa4a6ea..371fb3972f 100644 --- a/lisp/progmodes/mantemp.el +++ b/lisp/progmodes/mantemp.el @@ -203,4 +203,5 @@ but operates on the region." (provide 'mantemp) +;;; arch-tag: 49794712-3b1b-4baa-9785-39556cb52c94 ;;; mantemp.el ends here diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index 7e036e55dc..7bf9e93571 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el @@ -1031,4 +1031,5 @@ Turning on MetaPost mode calls the value of the variable (provide 'meta-mode) (run-hooks 'meta-mode-load-hook) +;;; arch-tag: ec2916b2-3a83-4cf7-962d-d8019370c006 ;;; meta-mode.el ends here diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el index 5a1f7e2e80..72a0f2e910 100644 --- a/lisp/progmodes/mixal-mode.el +++ b/lisp/progmodes/mixal-mode.el @@ -1310,4 +1310,6 @@ The converted character representation is stored in rAX." (add-to-list 'auto-mode-alist '("\\.mixal\\'" . mixal-mode)) (provide 'mixal-mode) + +;;; arch-tag: be7c128a-bf61-4951-a90e-9398267ce3f3 ;;; mixal-mode.el ends here diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el index 81e5653275..2501f2d362 100644 --- a/lisp/progmodes/modula2.el +++ b/lisp/progmodes/modula2.el @@ -563,4 +563,5 @@ FROM SysStreams IMPORT sysIn, sysOut, sysErr; (provide 'modula2) +;;; arch-tag: a21df1cb-5ece-4709-9219-1e7cd2d85d90 ;;; modula2.el ends here diff --git a/lisp/progmodes/octave-hlp.el b/lisp/progmodes/octave-hlp.el index 9291392b41..dce561e841 100644 --- a/lisp/progmodes/octave-hlp.el +++ b/lisp/progmodes/octave-hlp.el @@ -134,4 +134,5 @@ The files specified by `octave-help-files' are searched." (provide 'octave-hlp) +;;; arch-tag: df5ef8fa-76c9-44e5-9835-cb5a502c6282 ;;; octave-hlp.el ends here diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index bedc1a86aa..265cf6c049 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -41,7 +41,7 @@ :group 'octave-inferior) (defcustom inferior-octave-prompt - "\\(^octave\\(\\|.bin\\)\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ " + "\\(^octave\\(\\|.bin\\)\\(-[.0-9]+\\)?\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ " "*Regexp to match prompts for the inferior Octave process." :type 'regexp :group 'octave-inferior) @@ -382,4 +382,5 @@ directory and makes this the current buffer's default directory." (provide 'octave-inf) +;;; arch-tag: bdce0395-24d1-4bb4-bfba-6fb1eeb1a660 ;;; octave-inf.el ends here diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 23a0cda035..281edfd693 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -1,6 +1,6 @@ ;;; octave-mod.el --- editing Octave source files under Emacs -;; Copyright (C) 1997 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2003 Free Software Foundation, Inc. ;; Author: Kurt Hornik ;; Author: John Eaton @@ -94,7 +94,7 @@ All Octave abbrevs start with a grave accent (`).") (defvar octave-comment-char ?# "Character to start an Octave comment.") (defvar octave-comment-start - (concat (make-string 1 octave-comment-char) " ") + (string octave-comment-char ?\ ) "String to insert to start a new Octave in-line comment.") (defvar octave-comment-start-skip "\\s<+\\s-*" "Regexp to match the start of an Octave comment up to its body.") @@ -287,10 +287,7 @@ parenthetical grouping.") ["Lookup Octave Index" octave-help t]) "Menu for Octave mode.") -(defvar octave-mode-syntax-table nil - "Syntax table in use in octave-mode buffers.") -(if octave-mode-syntax-table - () +(defvar octave-mode-syntax-table (let ((table (make-syntax-table))) (modify-syntax-entry ?\r " " table) (modify-syntax-entry ?+ "." table) @@ -309,10 +306,11 @@ parenthetical grouping.") (modify-syntax-entry ?\" "\"" table) (modify-syntax-entry ?. "w" table) (modify-syntax-entry ?_ "w" table) - (modify-syntax-entry ?\% "." table) + (modify-syntax-entry ?\% "<" table) (modify-syntax-entry ?\# "<" table) (modify-syntax-entry ?\n ">" table) - (setq octave-mode-syntax-table table))) + table) + "Syntax table in use in `octave-mode' buffers.") (defcustom octave-auto-indent nil "*Non-nil means indent line after a semicolon or space in Octave mode." @@ -565,33 +563,21 @@ including a reproducible test case and send the message." (interactive) (describe-function major-mode)) -(defun octave-point (position) - "Returns the value of point at certain positions." - (save-excursion - (cond - ((eq position 'bol) (beginning-of-line)) - ((eq position 'eol) (end-of-line)) - ((eq position 'boi) (back-to-indentation)) - ((eq position 'bonl) (forward-line 1)) - ((eq position 'bopl) (forward-line -1)) - (t (error "unknown buffer position requested: %s" position))) - (point))) - (defsubst octave-in-comment-p () "Returns t if point is inside an Octave comment, nil otherwise." (interactive) (save-excursion - (nth 4 (parse-partial-sexp (octave-point 'bol) (point))))) + (nth 4 (parse-partial-sexp (line-beginning-position) (point))))) (defsubst octave-in-string-p () "Returns t if point is inside an Octave string, nil otherwise." (interactive) (save-excursion - (nth 3 (parse-partial-sexp (octave-point 'bol) (point))))) + (nth 3 (parse-partial-sexp (line-beginning-position) (point))))) (defsubst octave-not-in-string-or-comment-p () "Returns t iff point is not inside an Octave string or comment." - (let ((pps (parse-partial-sexp (octave-point 'bol) (point)))) + (let ((pps (parse-partial-sexp (line-beginning-position) (point)))) (not (or (nth 3 pps) (nth 4 pps))))) (defun octave-in-block-p () @@ -682,7 +668,7 @@ level." (back-to-indentation) (setq icol (current-column)) (let ((bot (point)) - (eol (octave-point 'eol))) + (eol (line-end-position))) (while (< (point) eol) (if (octave-not-in-string-or-comment-p) (cond @@ -1017,7 +1003,7 @@ Signal an error if the keywords are incompatible." (buffer-substring-no-properties (match-beginning 0) pos) pos (+ pos 1) - eol (octave-point 'eol) + eol (line-end-position) bb-arg (save-excursion (save-restriction @@ -1123,7 +1109,7 @@ otherwise." (if (save-excursion (skip-syntax-backward " <") (bolp)) - (re-search-forward "[ \t]" (octave-point 'eol) + (re-search-forward "[ \t]" (line-end-position) 'move)) ;; If we're not in a comment line and just ahead the ;; continuation string, don't break here. @@ -1535,4 +1521,5 @@ code line." (provide 'octave-mod) +;;; arch-tag: 05f1ce09-be87-4c00-803e-4919ffa26c23 ;;; octave-mod.el ends here diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index debe52ed6f..6292fd36a6 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el @@ -1627,4 +1627,5 @@ Pascal Outline mode provides some additional commands. (provide 'pascal) +;;; arch-tag: 04535136-fd93-40b4-a505-c9bebdc051f5 ;;; pascal.el ends here diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 4b0440321f..a84eaff1ab 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -929,4 +929,5 @@ With argument, repeat that many times; negative args move backward." (provide 'perl-mode) +;;; arch-tag: 8c7ff68d-15f3-46a2-ade2-b7c41f176826 ;;; perl-mode.el ends here diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 6cb571b73e..c5a169d2fa 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -1,6 +1,6 @@ ;;; prolog.el --- major mode for editing and running Prolog under Emacs -;; Copyright (C) 1986, 1987 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1987, 2003, 2004 Free Software Foundation, Inc. ;; Author: Masanobu UMEDA ;; Keywords: languages @@ -30,16 +30,17 @@ ;;; Code: -(defvar prolog-mode-syntax-table nil) -(defvar prolog-mode-abbrev-table nil) -(defvar prolog-mode-map nil) - (defgroup prolog nil "Major mode for editing and running Prolog under Emacs" :group 'languages) -(defcustom prolog-program-name "prolog" +(defcustom prolog-program-name + (let ((names '("prolog" "gprolog"))) + (while (and names + (not (executable-find (car names)))) + (setq names (cdr names))) + (or (car names) "prolog")) "*Program name for invoking an inferior Prolog with `run-prolog'." :type 'string :group 'prolog) @@ -75,8 +76,7 @@ nil means send actual operating system end of file." (3 font-lock-variable-name-face))) "Font-lock keywords for Prolog mode.") -(if prolog-mode-syntax-table - () +(defvar prolog-mode-syntax-table (let ((table (make-syntax-table))) (modify-syntax-entry ?_ "w" table) (modify-syntax-entry ?\\ "\\" table) @@ -90,17 +90,14 @@ nil means send actual operating system end of file." (modify-syntax-entry ?< "." table) (modify-syntax-entry ?> "." table) (modify-syntax-entry ?\' "\"" table) - (setq prolog-mode-syntax-table table))) + table)) +(defvar prolog-mode-abbrev-table nil) (define-abbrev-table 'prolog-mode-abbrev-table ()) (defun prolog-mode-variables () - (set-syntax-table prolog-mode-syntax-table) - (setq local-abbrev-table prolog-mode-abbrev-table) - (make-local-variable 'paragraph-start) - (setq paragraph-start (concat "%%\\|$\\|" page-delimiter)) ;'%%..' (make-local-variable 'paragraph-separate) - (setq paragraph-separate paragraph-start) + (setq paragraph-separate (concat "%%\\|$\\|" page-delimiter)) ;'%%..' (make-local-variable 'paragraph-ignore-fill-prefix) (setq paragraph-ignore-fill-prefix t) (make-local-variable 'imenu-generic-expression) @@ -110,20 +107,16 @@ nil means send actual operating system end of file." (make-local-variable 'comment-start) (setq comment-start "%") (make-local-variable 'comment-start-skip) - (setq comment-start-skip "%+ *") + (setq comment-start-skip "\\(?:%+\\|/\\*+\\)[ \t]*") + (make-local-variable 'comment-end-skip) + (setq comment-end-skip "[ \t]*\\(\n\\|\\*+/\\)") (make-local-variable 'comment-column) - (setq comment-column 48) - (make-local-variable 'comment-indent-function) - (setq comment-indent-function 'prolog-comment-indent)) - -(defun prolog-mode-commands (map) - (define-key map "\t" 'prolog-indent-line) - (define-key map "\e\C-x" 'prolog-consult-region)) + (setq comment-column 48)) -(if prolog-mode-map - nil - (setq prolog-mode-map (make-sparse-keymap)) - (prolog-mode-commands prolog-mode-map)) +(defvar prolog-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\e\C-x" 'prolog-consult-region) + map)) ;;;###autoload (defun prolog-mode () @@ -136,6 +129,7 @@ if that value is non-nil." (interactive) (kill-all-local-variables) (use-local-map prolog-mode-map) + (set-syntax-table prolog-mode-syntax-table) (setq major-mode 'prolog-mode) (setq mode-name "Prolog") (prolog-mode-variables) @@ -143,7 +137,7 @@ if that value is non-nil." (setq font-lock-defaults '(prolog-font-lock-keywords nil nil nil beginning-of-line)) - (run-hooks 'prolog-mode-hook)) + (run-mode-hooks 'prolog-mode-hook)) (defun prolog-indent-line (&optional whole-exp) "Indent current line as Prolog code. @@ -217,26 +211,20 @@ rigidly along with this one (not yet)." (if (re-search-forward comment-start-skip eolpos 'move) (goto-char (match-beginning 0))) (skip-chars-backward " \t"))) - -(defun prolog-comment-indent () - "Compute prolog comment indentation." - (cond ((looking-at "%%%") 0) - ((looking-at "%%") (prolog-indent-level)) - (t - (save-excursion - (skip-chars-backward " \t") - ;; Insert one space at least, except at left margin. - (max (+ (current-column) (if (bolp) 0 1)) - comment-column))) - )) - ;;; ;;; Inferior prolog mode ;;; -(defvar inferior-prolog-mode-map nil) +(defvar inferior-prolog-mode-map + (let ((map (make-sparse-keymap))) + ;; This map will inherit from `comint-mode-map' when entering + ;; inferior-prolog-mode. + map)) + +(defvar inferior-prolog-mode-syntax-table prolog-mode-syntax-table) +(defvar inferior-prolog-mode-abbrev-table prolog-mode-abbrev-table) -(defun inferior-prolog-mode () +(define-derived-mode inferior-prolog-mode comint-mode "Inferior Prolog" "Major mode for interacting with an inferior Prolog process. The following commands are available: @@ -260,25 +248,15 @@ Return not at end copies rest of line to end and sends it. \\[comint-kill-input] and \\[backward-kill-word] are kill commands, imitating normal Unix input editing. \\[comint-interrupt-subjob] interrupts the shell or its current subjob if any. \\[comint-stop-subjob] stops. \\[comint-quit-subjob] sends quit signal." - (interactive) - (require 'comint) - (comint-mode) - (setq major-mode 'inferior-prolog-mode - mode-name "Inferior Prolog" - comint-prompt-regexp "^| [ ?][- ] *") - (prolog-mode-variables) - (if inferior-prolog-mode-map nil - (setq inferior-prolog-mode-map (copy-keymap comint-mode-map)) - (prolog-mode-commands inferior-prolog-mode-map)) - (use-local-map inferior-prolog-mode-map) - (run-hooks 'prolog-mode-hook)) + (setq comint-prompt-regexp "^| [ ?][- ] *") + (prolog-mode-variables)) ;;;###autoload (defun run-prolog () "Run an inferior Prolog process, input and output via buffer *prolog*." (interactive) (require 'comint) - (switch-to-buffer (make-comint "prolog" prolog-program-name)) + (pop-to-buffer (make-comint "prolog" prolog-program-name)) (inferior-prolog-mode)) (defun prolog-consult-region (compile beg end) @@ -304,4 +282,5 @@ If COMPILE (prefix arg) is not nil, use compile mode rather than consult mode." (provide 'prolog) +;;; arch-tag: f3ec6748-1272-4ab6-8826-c50cb1607636 ;;; prolog.el ends here diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el index c6edddc3a4..b3495c7449 100644 --- a/lisp/progmodes/ps-mode.el +++ b/lisp/progmodes/ps-mode.el @@ -1190,4 +1190,5 @@ Use line numbers if `ps-run-error-line-numbers' is not nil" (provide 'ps-mode) +;;; arch-tag: dce13d2d-69fb-4ec4-9d5d-6dd29c3f0e6e ;;; ps-mode.el ends here diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el new file mode 100644 index 0000000000..bfa507b851 --- /dev/null +++ b/lisp/progmodes/python.el @@ -0,0 +1,1614 @@ +;;; python.el --- silly walks for Python + +;; Copyright (C) 2003, 04 Free Software Foundation, Inc. + +;; Author: Dave Love +;; Created: Nov 2003 +;; Keywords: languages + +;; This file is part of GNU Emacs. + +;; 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. + +;; 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., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; Major mode for editing Python, with support for inferior processes. + +;; There is another Python mode, python-mode.el, used by XEmacs and +;; maintained with Python. That isn't covered by an FSF copyright +;; assignment, unlike this code, and seems not to be well-maintained +;; for Emacs (though I've submitted fixes). This mode is rather +;; simpler and is, perhaps, better in other ways. In particular, +;; using the syntax functions with text properties maintained by +;; font-lock should make it more correct with arbitrary string and +;; comment contents. + +;; This doesn't implement all the facilities of python-mode.el. Some +;; just need doing, e.g. catching exceptions in the inferior Python +;; buffer (but see M-x pdb for debugging). [Actually, the use of +;; `compilation-minor-mode' now is probably enough for that.] Others +;; don't seem appropriate. For instance, `forward-into-nomenclature' +;; should be done separately, since it's not specific to Python, and +;; I've installed a minor mode to do the job properly in Emacs 22. +;; Other things seem more natural or canonical here, e.g. the +;; {beginning,end}-of-defun implementation dealing with nested +;; definitions, and the inferior mode following `cmuscheme'. (The +;; inferior mode should be able to find the source of errors from +;; `python-send-region' & al via `compilation-minor-mode', but I can't +;; make that work with the current (March '04) compile.el.) +;; Successive TABs cycle between possible indentations for the line. + +;; Even where it has similar facilities, this is incompatible with +;; python-mode.el in various respects. For instance, various key +;; bindings are changed to obey Emacs conventions, and things like +;; marking blocks and `beginning-of-defun' behave differently. + +;; TODO: See various Fixmes below. It should be possible to arrange +;; some sort of completion using the inferior interpreter. + +;;; Code: + +;; It's messy to autoload the relevant comint functions so that comint +;; is only required when inferior Python is used. +(require 'comint) +(eval-when-compile + (require 'compile) + (autoload 'Info-last "info") + (autoload 'Info-exit "info") + (autoload 'info-lookup-maybe-add-help "info-look")) +(autoload 'compilation-start "compile") ; spurious compiler warning anyway + +(defgroup python nil + "Silly walks in the Python language" + :group 'languages + :version "21.4" + :link '(emacs-commentary-link "python")) + +;;;###autoload +(add-to-list 'interpreter-mode-alist '("jython" . jython-mode)) +;;;###autoload +(add-to-list 'interpreter-mode-alist '("python" . python-mode)) +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)) + +;;;; Font lock + +(defvar python-font-lock-keywords + `(,(rx (and word-start + ;; From v 2.3 reference. + ;; def and class dealt with separately below + (or "and" "assert" "break" "continue" "del" "elif" "else" + "except" "exec" "finally" "for" "from" "global" "if" + "import" "in" "is" "lambda" "not" "or" "pass" "print" + "raise" "return" "try" "while" "yield" + ;; Future keywords + "as" "None") + word-end)) + (,(rx (and word-start (group "class") (1+ space) (group (1+ word)))) + (1 font-lock-keyword-face) (2 font-lock-type-face)) + (,(rx (and word-start (group "def") (1+ space) (group (1+ word)))) + (1 font-lock-keyword-face) (2 font-lock-function-name-face)))) + +(defconst python-font-lock-syntactic-keywords + ;; Make outer chars of matching triple-quote sequences into generic + ;; string delimiters. Fixme: Is there a better way? + `((,(rx (and (group (optional (any "uUrR"))) ; prefix gets syntax property + (optional (any "rR")) ; possible second prefix + (group (syntax string-quote)) ; maybe gets property + (backref 2) ; per first quote + (group (backref 2)))) ; maybe gets property + (1 (python-quote-syntax 1)) + (2 (python-quote-syntax 2)) + (3 (python-quote-syntax 3))) + ;; This doesn't really help. +;;; (,(rx (and ?\\ (group ?\n))) (1 " ")) + )) + +(defun python-quote-syntax (n) + "Put `syntax-table' property correctly on triple quote. +Used for syntactic keywords. N is the match number (1, 2 or 3)." + ;; Given a triple quote, we have to check the context to know + ;; whether this is an opening or closing triple or whether it's + ;; quoted anyhow, and should be ignored. (For that we need to do + ;; the same job as `syntax-ppss' to be correct and it seems to be OK + ;; to use it here despite initial worries.) We also have to sort + ;; out a possible prefix -- well, we don't _have_ to, but I think it + ;; should be treated as part of the string. + + ;; Test cases: + ;; ur"""ar""" x='"' # """ + ;; x = ''' """ ' a + ;; ''' + ;; x '"""' x + (save-excursion + (goto-char (match-beginning 0)) + (unless (eq ?\\ (char-before)) + (cond + ;; Consider property for the last char if in a fenced string. + ((= n 3) + (let ((syntax (syntax-ppss))) + (when (eq t (nth 3 syntax)) ; after unclosed fence + (goto-char (nth 8 syntax)) ; fence position + ;; Skip any prefix. + (if (memq (char-after) '(?u ?U ?R ?r)) + (skip-chars-forward "uUrR")) + ;; Is it a matching sequence? + (if (eq (char-after) (char-after (match-beginning 2))) + (eval-when-compile (string-to-syntax "|")))))) + ;; Consider property for initial char, accounting for prefixes. + ((or (and (= n 2) ; not prefix + (= (match-beginning 1) (match-end 1))) ; prefix is null + (and (= n 1) ; prefix + (/= (match-beginning 1) (match-end 1)))) ; non-empty + (unless (eq 'string (syntax-ppss-context (syntax-ppss))) + (eval-when-compile (string-to-syntax "|"))))) + ;; Otherwise (we're in a non-matching string) the property is + ;; nil, which is OK. + ))) + +;; This isn't currently in `font-lock-defaults' as probably not worth +;; it -- we basically only mess with a few normally-symbol characters. + +;; (defun python-font-lock-syntactic-face-function (state) +;; "`font-lock-syntactic-face-function' for Python mode. +;; Returns the string or comment face as usual, with side effect of putting +;; a `syntax-table' property on the inside of the string or comment which is +;; the standard syntax table." +;; (if (nth 3 state) +;; (save-excursion +;; (goto-char (nth 8 state)) +;; (condition-case nil +;; (forward-sexp) +;; (error nil)) +;; (put-text-property (1+ (nth 8 state)) (1- (point)) +;; 'syntax-table (standard-syntax-table)) +;; 'font-lock-string-face) +;; (put-text-property (1+ (nth 8 state)) (line-end-position) +;; 'syntax-table (standard-syntax-table)) +;; 'font-lock-comment-face)) + +;;;; Keymap and syntax + +(defvar python-mode-map + (let ((map (make-sparse-keymap))) + ;; Mostly taken from python-mode.el. + (define-key map ":" 'python-electric-colon) + (define-key map "\177" 'python-backspace) + (define-key map "\C-c<" 'python-shift-left) + (define-key map "\C-c>" 'python-shift-right) + (define-key map "\C-c\C-k" 'python-mark-block) + (define-key map "\C-c\C-n" 'python-next-statement) + (define-key map "\C-c\C-p" 'python-previous-statement) + (define-key map "\C-c\C-u" 'python-beginning-of-block) + (define-key map "\C-c\C-f" 'python-describe-symbol) + (define-key map "\C-c\C-w" 'python-check) + (define-key map "\C-c\C-v" 'python-check) ; a la sgml-mode + (define-key map "\C-c\C-s" 'python-send-string) + (define-key map [?\C-\M-x] 'python-send-defun) + (define-key map "\C-c\C-r" 'python-send-region) + (define-key map "\C-c\M-r" 'python-send-region-and-go) + (define-key map "\C-c\C-c" 'python-send-buffer) + (define-key map "\C-c\C-z" 'python-switch-to-python) + (define-key map "\C-c\C-m" 'python-load-file) + (define-key map "\C-c\C-l" 'python-load-file) ; a la cmuscheme + ;; Fixme: Add :help to menu. + (easy-menu-define python-menu map "Python Mode menu" + '("Python" + ["Shift region left" python-shift-left :active mark-active] + ["Shift region right" python-shift-right :active mark-active] + "-" + ["Mark block" python-mark-block] + ["Mark def/class" mark-defun + :help "Mark innermost definition around point"] + "-" + ["Start of block" python-beginning-of-block] + ["End of block" python-end-of-block] + ["Start of def/class" beginning-of-defun + :help "Go to start of innermost definition around point"] + ["End of def/class" end-of-defun + :help "Go to end of innermost definition around point"] + "-" + ["Start interpreter" run-python + :help "Run `inferior' Python in separate buffer"] + ["Import/reload file" python-load-file + :help "Load into inferior Python session"] + ["Eval buffer" python-send-buffer + :help "Evaluate buffer en bloc in inferior Python session"] + ["Eval region" python-send-region :active mark-active + :help "Evaluate region en bloc in inferior Python session"] + ["Eval def/class" python-send-defun + :help "Evaluate current definition in inferior Python session"] + ["Switch to interpreter" python-switch-to-python + :help "Switch to inferior Python buffer"] + ["Check file" python-check :help "Run pychecker"] + ["Debugger" pdb :help "Run pdb under GUD"] + "-" + ["Help on symbol" python-describe-symbol + :help "Use pydoc on symbol at point"])) + map)) + +(defvar python-mode-syntax-table + (let ((table (make-syntax-table))) + ;; Give punctuation syntax to ASCII that normally has symbol + ;; syntax or has word syntax and isn't a letter. + (let ((symbol (string-to-syntax "_")) + (sst (standard-syntax-table))) + (dotimes (i 128) + (unless (= i ?_) + (if (equal symbol (aref sst i)) + (modify-syntax-entry i "." table))))) + (modify-syntax-entry ?$ "." table) + (modify-syntax-entry ?% "." table) + ;; exceptions + (modify-syntax-entry ?# "<" table) + (modify-syntax-entry ?\n ">" table) + (modify-syntax-entry ?' "\"" table) + (modify-syntax-entry ?` "$" table) + table)) + +;;;; Utility stuff + +(defsubst python-in-string/comment () + "Return non-nil if point is in a Python literal (a comment or string). +Optional argument LIM indicates the beginning of the containing form, +i.e. the limit on how far back to scan." + (syntax-ppss-context (syntax-ppss))) + +(defconst python-space-backslash-table + (let ((table (copy-syntax-table python-mode-syntax-table))) + (modify-syntax-entry ?\\ " " table) + table) + "`python-mode-syntax-table' with backslash given whitespace syntax.") + +(defun python-skip-comments/blanks (&optional backward) + "Skip comments and blank lines. +BACKWARD non-nil means go backwards, otherwise go forwards. Backslash is +treated as whitespace so that continued blank lines are skipped. +Doesn't move out of comments -- should be outside or at end of line." + (with-syntax-table python-space-backslash-table + (forward-comment (if backward + most-negative-fixnum + most-positive-fixnum)))) + +(defun python-backslash-continuation-line-p () + "Non-nil if preceding line ends with backslash that is not in a comment." + (and (eq ?\\ (char-before (line-end-position 0))) + (not (syntax-ppss-context (syntax-ppss))))) + +(defun python-continuation-line-p () + "Return non-nil if current line continues a previous one. +The criteria are that the previous line ends in a backslash outside +comments and strings, or that the bracket/paren nesting depth is nonzero." + (or (and (eq ?\\ (char-before (line-end-position 0))) + (not (syntax-ppss-context (syntax-ppss)))) + (/= 0 (syntax-ppss-depth + (save-excursion ; syntax-ppss with arg changes point + (syntax-ppss (line-beginning-position))))))) + +(defun python-comment-line-p () + "Return non-nil if current line has only a comment or is blank." + (save-excursion + (back-to-indentation) + (looking-at (rx (or (syntax comment-start) line-end))))) + +(defun python-beginning-of-string () + "Go to beginning of string around point. +Do nothing if not in string." + (let ((state (syntax-ppss))) + (when (nth 3 state) + (goto-char (nth 8 state))))) + +(defun python-open-block-statement-p (&optional bos) + "Return non-nil if statement at point opens a block. +BOS non-nil means point is known to be at beginning of statement." + (save-excursion + (unless bos (python-beginning-of-statement)) + (and (not (python-comment-line-p)) + (re-search-forward (rx (and ?: (0+ space) + (optional (and (syntax comment-start) + (0+ not-newline))) + line-end)) + (save-excursion (python-end-of-statement)) + t) + (not (python-in-string/comment))))) + +(defun python-close-block-statement-p (&optional bos) + "Return non-nil if current line is a statement closing a block. +BOS non-nil means point is at beginning of statement. +The criteria are that the line isn't a comment or in string and starts with +keyword `raise', `break', `continue' or `pass'." + (save-excursion + (unless bos (python-beginning-of-statement)) + (back-to-indentation) + (looking-at (rx (and (or "return" "raise" "break" "continue" "pass") + word-end))))) + +(defun python-outdent-p () + "Return non-nil if current line should outdent a level." + (save-excursion + (back-to-indentation) + (and (looking-at (rx (and (or (and (or "else" "finally") word-end) + (and (or "except" "elif") word-end + (1+ (not (any ?:))))) + (optional space) ":" (optional space) + (or (syntax comment-start) line-end)))) + (progn (end-of-line) + (not (python-in-string/comment))) + ;; Ensure there's a previous statement and move to it. + (zerop (python-previous-statement)) + (not (python-close-block-statement-p t)) + ;; Fixme: check this + (not (looking-at (rx (and (or (and (or "if" "elif" "except" + "for" "while") + word-end (1+ (not (any ?:)))) + (and "try" word-end)) + (optional space) ":" (optional space) + (or (syntax comment-start) line-end))))) + (progn (end-of-line) + (not (python-in-string/comment)))))) + +;;;; Indentation. + +(defcustom python-indent 4 + "*Number of columns for a unit of indentation in Python mode. +See also `\\[python-guess-indent]'" + :group 'python + :type 'integer) + +(defcustom python-guess-indent t + "*Non-nil means Python mode guesses `python-indent' for the buffer." + :type 'boolean + :group 'python) + +(defcustom python-indent-string-contents t + "*Non-nil means indent contents of multi-line strings together. +This means indent them the same as the preceding non-blank line. +Otherwise indent them to column zero." + :type '(choice (const :tag "Align with preceding" t) + (const :tag "Indent to column 0" nil)) + :group 'python) + +(defcustom python-honour-comment-indentation nil + "Non-nil means indent relative to preceding comment line. +Only do this for comments where the leading comment character is followed +by space." + :type 'boolean + :group 'python) + +(defcustom python-continuation-offset 4 + "*Number of columns of additional indentation for continuation lines. +Continuation lines follow a backslash-terminated line starting a statement." + :group 'python + :type 'integer) + +(defun python-guess-indent () + "Guess step for indentation of current buffer. +Set `python-indent' locally to the value guessed." + (interactive) + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (let (done indent) + (while (and (not done) (not (eobp))) + (when (and (re-search-forward (rx (and ?: (0+ space) + (or (syntax comment-start) + line-end))) + nil 'move) + (python-open-block-statement-p)) + (save-excursion + (python-beginning-of-statement) + (let ((initial (current-indentation))) + (if (zerop (python-next-statement)) + (setq indent (- (current-indentation) initial))) + (if (and (>= indent 2) (<= indent 8)) ; sanity check + (setq done t)))))) + (when done + (when (/= indent (default-value 'python-indent)) + (set (make-local-variable 'python-indent) indent) + (unless (= tab-width python-indent) + (setq indent-tabs-mode nil))) + indent))))) + +(defun python-calculate-indentation () + "Calculate Python indentation for line at point." + (save-excursion + (beginning-of-line) + (let ((syntax (syntax-ppss)) + start) + (cond + ((eq 'string (syntax-ppss-context syntax)) ; multi-line string + (if (not python-indent-string-contents) + 0 + (save-excursion + ;; Find indentation of preceding non-blank line within string. + (setq start (nth 8 syntax)) + (forward-line -1) + (while (and (< start (point)) (looking-at "\\s-*$")) + (forward-line -1)) + (current-indentation)))) + ((python-continuation-line-p) + (let ((point (point)) + (open-start (cadr syntax))) + (if open-start + ;; Inside bracketed expression. + (progn + (goto-char (1+ open-start)) + ;; Look for first item in list (preceding point) and + ;; align with it, if found. + (if (with-syntax-table python-space-backslash-table + (let ((parse-sexp-ignore-comments t)) + (condition-case () + (progn (forward-sexp) + (backward-sexp) + (< (point) point)) + (error nil)))) + (current-column) + ;; Otherwise indent relative to statement start, one + ;; level per bracketing level. + (goto-char (1+ open-start)) + (python-beginning-of-statement) + (+ (current-indentation) (* (car syntax) python-indent)))) + ;; Otherwise backslash-continued. + (forward-line -1) + (if (python-continuation-line-p) + ;; We're past first continuation line. Align with + ;; previous line. + (current-indentation) + ;; First continuation line. Indent one step, with an + ;; extra one if statement opens a block. + (save-excursion + (python-beginning-of-statement) + (+ (current-indentation) python-continuation-offset + (if (python-open-block-statement-p t) + python-indent + 0))))))) + ((bobp) 0) + ;; Fixme: Like python-mode.el; not convinced by this. + ((looking-at (rx (and (0+ space) (syntax comment-start) + (not (any " \t\n"))))) ; non-indentable comment + (current-indentation)) + (t (let ((point (point))) + (if python-honour-comment-indentation + ;; Back over whitespace, newlines, non-indentable comments. + (catch 'done + (while t + (if (cond ((bobp)) + ;; not at comment start + ((not (forward-comment -1)) + (python-beginning-of-statement) + t) + ;; trailing comment + ((/= (current-column) (current-indentation)) + (python-beginning-of-statement) + t) + ;; indentable comment like python-mode.el + ((and (looking-at (rx (and (syntax comment-start) + (or space line-end)))) + (/= 0 (current-column))))) + (throw 'done t)))) + ;; Else back over all comments. + (python-skip-comments/blanks t) + (python-beginning-of-statement)) + ;; don't lose on bogus outdent + (max 0 (+ (current-indentation) + (or (cond ((python-open-block-statement-p t) + python-indent) + ((python-close-block-statement-p t) + (- python-indent))) + (progn (goto-char point) + (if (python-outdent-p) + (- python-indent))) + 0))))))))) + +;;;; Cycling through the possible indentations with successive TABs. + +;; These don't need to be buffer-local since they're only relevant +;; during a cycle. + +;; Alist of possible indentations and start of statement they would close. +(defvar python-indent-list nil + "Internal use.") +;; Length of the above +(defvar python-indent-list-length nil + "Internal use.") +;; Current index into the alist. +(defvar python-indent-index nil + "Internal use.") + +(defun python-initial-text () + "Text of line following indentation and ignoring any trailing comment." + (buffer-substring (+ (line-beginning-position) (current-indentation)) + (save-excursion + (end-of-line) + (forward-comment -1) + (point)))) + +(defun python-indentation-levels () + "Return a list of possible indentations for this statement. +Includes the default indentation and those which would close all +enclosing blocks." + (save-excursion + (let ((levels (list (cons (current-indentation) nil)))) + ;; Only one possibility if we immediately follow a block open or + ;; are in a continuation line. + (unless (or (python-continuation-line-p) + (save-excursion (and (python-previous-statement) + (python-open-block-statement-p t)))) + (while (python-beginning-of-block) + (push (cons (current-indentation) (python-initial-text)) + levels))) + levels))) + +;; This is basically what `python-indent-line' would be if we didn't +;; do the cycling. +(defun python-indent-line-1 () + "Subroutine of `python-indent-line'." + (let ((target (python-calculate-indentation)) + (pos (- (point-max) (point)))) + (if (= target (current-indentation)) + (if (< (current-column) (current-indentation)) + (back-to-indentation)) + (beginning-of-line) + (delete-horizontal-space) + (indent-to target) + (if (> (- (point-max) pos) (point)) + (goto-char (- (point-max) pos)))))) + +;; Fixme: Is the arg necessary? +(defun python-indent-line (&optional arg) + "Indent current line as Python code. +When invoked via `indent-for-tab-command', cycle through possible +indentations for current line. The cycle is broken by a command different +from `indent-for-tab-command', i.e. successive TABs do the cycling." + (interactive) + ;; Don't do extra work if invoked via `indent-region', for instance. + (if (not (eq this-command 'indent-for-tab-command)) + (python-indent-line-1) + (if (eq last-command this-command) + (if (= 1 python-indent-list-length) + (message "Sole indentation") + (progn (setq python-indent-index (% (1+ python-indent-index) + python-indent-list-length)) + (beginning-of-line) + (delete-horizontal-space) + (indent-to (car (nth python-indent-index python-indent-list))) + (let ((text (cdr (nth python-indent-index + python-indent-list)))) + (if text (message "Closes: %s" text))))) + (python-indent-line-1) + (setq python-indent-list (python-indentation-levels) + python-indent-list-length (length python-indent-list) + python-indent-index (1- python-indent-list-length))))) + +;;;; Movement. + +(defun python-beginning-of-defun () + "`beginning-of-defun-function' for Python. +Finds beginning of innermost nested class or method definition. +Returns the name of the definition found at the end, or nil if reached +start of buffer." + (let ((ci (current-indentation)) + (def-re (rx (and line-start (0+ space) (or "def" "class") + (1+ space) + (group (1+ (or word (syntax symbol))))))) + found lep def-line) + (if (python-comment-line-p) + (setq ci most-positive-fixnum)) + (while (and (not (bobp)) (not found)) + ;; Treat bol at beginning of function as outside function so + ;; that successive C-M-a makes progress backwards. + (setq def-line (looking-at def-re)) + (unless (bolp) (end-of-line)) + (setq lep (line-end-position)) + (if (and (re-search-backward def-re nil 'move) + ;; Must be less indented or matching top level, or + ;; equally indented if we started on a definition line. + (let ((in (current-indentation))) + (or (and (zerop ci) (zerop in)) + (= lep (line-end-position)) ; on initial line + (and def-line (= in ci)) + (< in ci))) + (not (python-in-string/comment))) + (setq found t))))) + +(defun python-end-of-defun () + "`end-of-defun-function' for Python. +Finds end of innermost nested class or method definition." + (let ((orig (point)) + (pattern (rx (and line-start (0+ space) + (or "def" "class") space)))) + ;; Go to start of current block and check whether it's at top + ;; level. If it is, and not a block start, look forward for + ;; definition statement. + (when (python-comment-line-p) + (end-of-line) + (forward-comment most-positive-fixnum)) + (if (not (python-open-block-statement-p)) + (python-beginning-of-block)) + (if (zerop (current-indentation)) + (unless (python-open-block-statement-p) + (while (and (re-search-forward pattern nil 'move) + (python-in-string/comment))) ; just loop + (unless (eobp) + (beginning-of-line))) + ;; Don't move before top-level statement that would end defun. + (end-of-line) + (python-beginning-of-defun)) + ;; If we got to the start of buffer, look forward for + ;; definition statement. + (if (and (bobp) (not (looking-at "def\\|class"))) + (while (and (not (eobp)) + (re-search-forward pattern nil 'move) + (python-in-string/comment)))) ; just loop + ;; We're at a definition statement (or end-of-buffer). + (unless (eobp) + (python-end-of-block) + ;; Count trailing space in defun (but not trailing comments). + (skip-syntax-forward " >") + (beginning-of-line)) + ;; Catch pathological case like this, where the beginning-of-defun + ;; skips to a definition we're not in: + ;; if ...: + ;; ... + ;; else: + ;; ... # point here + ;; ... + ;; def ... + (if (< (point) orig) + (goto-char (point-max))))) + +(defun python-beginning-of-statement () + "Go to start of current statement. +Accounts for continuation lines, multi-line strings, and multi-line bracketed +expressions." + (beginning-of-line) + (python-beginning-of-string) + (while (python-continuation-line-p) + (beginning-of-line) + (if (python-backslash-continuation-line-p) + (while (python-backslash-continuation-line-p) + (forward-line -1)) + (python-beginning-of-string) + ;; Skip forward out of nested brackets. + (condition-case () ; beware invalid syntax + (progn (backward-up-list (syntax-ppss-depth (syntax-ppss))) t) + (error (end-of-line))))) + (back-to-indentation)) + +(defun python-end-of-statement () + "Go to the end of the current statement and return point. +Usually this is the start of the next line, but if this is a +multi-line statement we need to skip over the continuation lines. +On a comment line, go to end of line." + (end-of-line) + (while (let (comment) + ;; Move past any enclosing strings and sexps, or stop if + ;; we're in a comment. + (while (let ((s (syntax-ppss))) + (cond ((eq 'comment (syntax-ppss-context s)) + (setq comment t) + nil) + ((eq 'string (syntax-ppss-context s)) + ;; Go to start of string and skip it. + (goto-char (nth 8 s)) + (condition-case () ; beware invalid syntax + (progn (forward-sexp) t) + (error (end-of-line)))) + ((> (syntax-ppss-depth s) 0) + ;; Skip forward out of nested brackets. + (condition-case () ; beware invalid syntax + (progn (backward-up-list + (- (syntax-ppss-depth s))) + t) + (error (end-of-line)))))) + (end-of-line)) + (unless comment + (eq ?\\ (char-before)))) ; Line continued? + (end-of-line 2)) ; Try next line. + (point)) + +(defun python-previous-statement (&optional count) + "Go to start of previous statement. +With argument COUNT, do it COUNT times. Stop at beginning of buffer. +Return count of statements left to move." + (interactive "p") + (unless count (setq count 1)) + (if (< count 0) + (python-next-statement (- count)) + (python-beginning-of-statement) + (while (and (> count 0) (not (bobp))) + (python-skip-comments/blanks t) + (python-beginning-of-statement) + (unless (bobp) (setq count (1- count)))) + count)) + +(defun python-next-statement (&optional count) + "Go to start of next statement. +With argument COUNT, do it COUNT times. Stop at end of buffer. +Return count of statements left to move." + (interactive "p") + (unless count (setq count 1)) + (if (< count 0) + (python-previous-statement (- count)) + (beginning-of-line) + (while (and (> count 0) (not (eobp))) + (python-end-of-statement) + (python-skip-comments/blanks) + (setq count (1- count))) + count)) + +(defun python-beginning-of-block (&optional arg) + "Go to start of current block. +With numeric arg, do it that many times. If ARG is negative, call +`python-end-of-block' instead. +If point is on the first line of a block, use its outer block. +If current statement is in column zero, don't move and return nil. +Otherwise return non-nil." + (interactive "p") + (unless arg (setq arg 1)) + (cond + ((zerop arg)) + ((< arg 0) (python-end-of-block (- arg))) + (t + (let ((point (point))) + (if (python-comment-line-p) + (python-skip-comments/blanks t)) + (python-beginning-of-statement) + (let ((ci (current-indentation))) + (if (zerop ci) + (not (goto-char point)) ; return nil + ;; Look upwards for less indented statement. + (if (catch 'done +;;; This is slower than the below. +;;; (while (zerop (python-previous-statement)) +;;; (when (and (< (current-indentation) ci) +;;; (python-open-block-statement-p t)) +;;; (beginning-of-line) +;;; (throw 'done t))) + (while (and (zerop (forward-line -1))) + (when (and (< (current-indentation) ci) + (not (python-comment-line-p)) + ;; Move to beginning to save effort in case + ;; this is in string. + (progn (python-beginning-of-statement) t) + (python-open-block-statement-p t)) + (beginning-of-line) + (throw 'done t))) + (not (goto-char point))) ; Failed -- return nil + (python-beginning-of-block (1- arg))))))))) + +(defun python-end-of-block (&optional arg) + "Go to end of current block. +With numeric arg, do it that many times. If ARG is negative, call +`python-beginning-of-block' instead. +If current statement is in column zero and doesn't open a block, don't +move and return nil. Otherwise return t." + (interactive "p") + (unless arg (setq arg 1)) + (if (< arg 0) + (python-beginning-of-block (- arg))) + (while (and (> arg 0) + (let* ((point (point)) + (_ (if (python-comment-line-p) + (python-skip-comments/blanks t))) + (ci (current-indentation)) + (open (python-open-block-statement-p))) + (if (and (zerop ci) (not open)) + (not (goto-char point)) + (catch 'done + (while (zerop (python-next-statement)) + (when (or (and open (<= (current-indentation) ci)) + (< (current-indentation) ci)) + (python-skip-comments/blanks t) + (beginning-of-line 2) + (throw 'done t))) + (not (goto-char point)))))) + (setq arg (1- arg))) + (zerop arg)) + +;;;; Imenu. + +(defvar python-recursing) +(defun python-imenu-create-index () + "`imenu-create-index-function' for Python. + +Makes nested Imenu menus from nested `class' and `def' statements. +The nested menus are headed by an item referencing the outer +definition; it has a space prepended to the name so that it sorts +first with `imenu--sort-by-name'." + (unless (boundp 'python-recursing) ; dynamically bound below + (goto-char (point-min))) ; normal call from Imenu + (let (index-alist ; accumulated value to return + name) + (while (re-search-forward + (rx (and line-start (0+ space) ; leading space + (or (group "def") (group "class")) ; type + (1+ space) (group (1+ (or word ?_))))) ; name + nil t) + (unless (python-in-string/comment) + (let ((pos (match-beginning 0)) + (name (match-string-no-properties 3))) + (if (match-beginning 2) ; def or class? + (setq name (concat "class " name))) + (save-restriction + (narrow-to-defun) + (let* ((python-recursing t) + (sublist (python-imenu-create-index))) + (if sublist + (progn (push (cons (concat " " name) pos) sublist) + (push (cons name sublist) index-alist)) + (push (cons name pos) index-alist))))))) + (nreverse index-alist))) + +;;;; `Electric' commands. + +(defun python-electric-colon (arg) + "Insert a colon and maybe outdent the line if it is a statement like `else'. +With numeric ARG, just insert that many colons. With \\[universal-argument], +just insert a single colon." + (interactive "*P") + (self-insert-command (if (not (integerp arg)) 1 arg)) + (and (not arg) + (eolp) + (python-outdent-p) + (not (python-in-string/comment)) + (> (current-indentation) (python-calculate-indentation)) + (python-indent-line))) ; OK, do it +(put 'python-electric-colon 'delete-selection t) + +(defun python-backspace (arg) + "Maybe delete a level of indentation on the current line. +If not at the end of line's indentation, or on a comment line, just call +`backward-delete-char-untabify'. With ARG, repeat that many times." + (interactive "*p") + (if (or (/= (current-indentation) (current-column)) + (bolp) + (python-continuation-line-p)) + (backward-delete-char-untabify arg) + (let ((indent 0)) + (save-excursion + (while (and (> arg 0) (python-beginning-of-block)) + (setq arg (1- arg))) + (when (zerop arg) + (setq indent (current-indentation)) + (message "Closes %s" (python-initial-text)))) + (delete-horizontal-space) + (indent-to indent)))) +(put 'python-backspace 'delete-selection 'supersede) + +;;;; pychecker + +(defcustom python-check-command "pychecker --stdlib" + "*Command used to check a Python file." + :type 'string + :group 'python) + +(defvar python-saved-check-command nil + "Internal use.") + +;; After `sgml-validate-command'. +(defun python-check (command) + "Check a Python file (default current buffer's file). +Runs COMMAND, a shell command, as if by `compile'. +See `python-check-command' for the default." + (interactive + (list (read-string "Checker command: " + (or python-saved-check-command + (concat python-check-command " " + (let ((name (buffer-file-name))) + (if name + (file-name-nondirectory name)))))))) + (setq python-saved-check-command command) + (save-some-buffers (not compilation-ask-about-save) nil) + (compilation-start command)) + +;;;; Inferior mode stuff (following cmuscheme). + +(defcustom python-python-command "python" + "*Shell command to run Python interpreter. +Any arguments can't contain whitespace." + :group 'python + :type 'string) + +(defcustom python-jython-command "jython" + "*Shell command to run Jython interpreter. +Any arguments can't contain whitespace." + :group 'python + :type 'string) + +(defvar python-command python-python-command + "Actual command used to run Python. +May be `python-python-command' or `python-jython-command'. +Additional arguments are added when the command is used by `run-python' +et al.") + +(defvar python-buffer nil + "*The current python process buffer. +To run multiple Python processes, start the first with \\[run-python]. +It will be in a buffer named *Python*. Rename that with +\\[rename-buffer]. Now start a new process with \\[run-python]. It +will be in a new buffer, named *Python*. Switch between the different +process buffers with \\[switch-to-buffer]. + +Commands that send text from source buffers to Python processes have +to choose a process to send to. This is determined by global variable +`python-buffer'. Suppose you have three inferior Pythons running: + Buffer Process + foo python + bar python<2> + *Python* python<3> +If you do a \\[python-send-region-and-go] command on some Python source +code, what process does it go to? + +- In a process buffer (foo, bar, or *Python*), send it to that process. +- In some other buffer (e.g. a source file), send it to the process + attached to `python-buffer'. +Process selection is done by function `python-proc'. + +Whenever \\[run-python] starts a new process, it resets `python-buffer' +to be the new process's buffer. If you only run one process, this will +do the right thing. If you run multiple processes, you can change +`python-buffer' to another process buffer with \\[set-variable].") + +(defconst python-compilation-regexp-alist + `((,(rx (and line-start (1+ (any " \t")) "File \"" + (group (1+ (not (any "\"<")))) ; avoid `' &c + "\", line " (group (1+ digit)))) + 1 python-compilation-line-number)) + "`compilation-error-regexp-alist' for inferior Python.") + +(define-derived-mode inferior-python-mode comint-mode "Inferior Python" + "Major mode for interacting with an inferior Python process. +A Python process can be started with \\[run-python]. + +Hooks `comint-mode-hook' and `inferior-python-mode-hook' are run in +that order. + +You can send text to the inferior Python process from other buffers containing +Python source. + * `python-switch-to-python' switches the current buffer to the Python + process buffer. + * `python-send-region' sends the current region to the Python process. + * `python-send-region-and-go' switches to the Python process buffer + after sending the text. +For running multiple processes in multiple buffers, see `python-buffer'. + +\\{inferior-python-mode-map}" + :group 'python + (set-syntax-table python-mode-syntax-table) + (setq mode-line-process '(":%s")) + ;; Fixme: Maybe install some python-mode bindings too. + (define-key inferior-python-mode-map "\C-c\C-l" 'python-load-file) + (define-key inferior-python-mode-map "\C-c\C-z" 'python-switch-to-python) + (add-hook 'comint-input-filter-functions 'python-input-filter nil t) + (add-hook 'comint-preoutput-filter-functions #'python-preoutput-filter + nil t) + ;; Still required by `comint-redirect-send-command', for instance: + (set (make-local-variable 'comint-prompt-regexp) "^\\([>.]\\{3\\} \\)+") + (set (make-local-variable 'compilation-error-regexp-alist) + python-compilation-regexp-alist) + (compilation-shell-minor-mode 1)) + +(defcustom inferior-python-filter-regexp "\\`\\s-*\\S-?\\S-?\\s-*\\'" + "*Input matching this regexp is not saved on the history list. +Default ignores all inputs of 0, 1, or 2 non-blank characters." + :type 'regexp + :group 'python) + +(defvar python-orig-start nil + "Marker to the start of the region passed to the inferior Python. +It can also be a filename.") + +(defun python-input-filter (str) + "`comint-input-filter' function for inferior Python. +Don't save anything for STR matching `inferior-python-filter-regexp'. +Also resets variables for adjusting error messages." + (setq python-orig-start nil) + (not (string-match inferior-python-filter-regexp str))) + +;; Fixme: Loses with quoted whitespace. +(defun python-args-to-list (string) + (let ((where (string-match "[ \t]" string))) + (cond ((null where) (list string)) + ((not (= where 0)) + (cons (substring string 0 where) + (python-args-to-list (substring string (+ 1 where))))) + (t (let ((pos (string-match "[^ \t]" string))) + (if pos (python-args-to-list (substring string pos)))))))) + +(defun python-compilation-line-number (file col) + "Return error descriptor of error found for FILE, column COL. +Used as line-number hook function in `python-compilation-regexp-alist'." + (let ((line (string-to-number (match-string 2)))) + (cons (point-marker) + (if (and (markerp python-orig-start) + (marker-buffer python-orig-start)) + (with-current-buffer (marker-buffer python-orig-start) + (goto-char python-orig-start) + (forward-line (1- line))) + (list (if (stringp python-orig-start) python-orig-start file) + line nil))))) + +(defvar python-preoutput-result nil + "Data from output line last `_emacs_out' line seen by the preoutput filter.") + +(defvar python-preoutput-continuation nil + "If non-nil, funcall this when `python-preoutput-filter' sees `_emacs_ok'.") + +;; Using this stops us getting lines in the buffer like +;; >>> ... ... >>> +;; Also look for (and delete) an `_emacs_ok' string and call +;; `python-preoutput-continuation' if we get it. +(defun python-preoutput-filter (s) + "`comint-preoutput-filter-functions' function: ignore prompts not at bol." + (cond ((and (string-match "\\`[.>]\\{3\\} \\'" s) + (/= (let ((inhibit-field-text-motion t)) + (line-beginning-position)) + (point))) + "") + ((string= s "_emacs_ok\n") + (when python-preoutput-continuation + (funcall python-preoutput-continuation) + (setq python-preoutput-continuation nil)) + "") + ((string-match "_emacs_out \\(.*\\)\n" s) + (setq python-preoutput-result (match-string 1 s)) + "") + (t s))) + +;;;###autoload +(defun run-python (&optional cmd noshow) + "Run an inferior Python process, input and output via buffer *Python*. +CMD is the Python command to run. NOSHOW non-nil means don't show the +buffer automatically. +If there is a process already running in `*Python*', switch to +that buffer. Interactively a prefix arg, allows you to edit the initial +command line (default is the value of `python-command'); `-i' etc. args +will be added to this as appropriate. Runs the hooks +`inferior-python-mode-hook' (after the `comint-mode-hook' is run). +\(Type \\[describe-mode] in the process buffer for a list of commands.)" + (interactive (list (if current-prefix-arg + (read-string "Run Python: " python-command) + python-command))) + (unless cmd (setq cmd python-python-command)) + (setq python-command cmd) + ;; Fixme: Consider making `python-buffer' buffer-local as a buffer + ;; (not a name) in Python buffers from which `run-python' &c is + ;; invoked. Would support multiple processes better. + (unless (comint-check-proc "*Python*") + (let ((cmdlist (append (python-args-to-list cmd) '("-i")))) + (set-buffer (apply 'make-comint "Python" (car cmdlist) nil + (cdr cmdlist)))) + (inferior-python-mode) + ;; Load function defintions we need. + ;; Before the preoutput function was used, this was done via -c in + ;; cmdlist, but that loses the banner and doesn't run the startup + ;; file. + (python-send-string "\ +def _emacs_execfile (file): # execute file and remove it + from os import remove + try: execfile (file, globals (), globals ()) + finally: remove (file) + +def _emacs_args (name): # get arglist of name for eldoc &c + import inspect + parts = name.split ('.') + if len (parts) > 1: + try: exec 'import ' + parts[0] + except: return None + try: exec 'func='+name # lose if name is keyword or undefined + except: return None + if inspect.isbuiltin (func): + doc = func.__doc__ + if doc.find (' ->') != -1: + print '_emacs_out', doc.split (' ->')[0] + elif doc.find ('\\n') != -1: + print '_emacs_out', doc.split ('\\n')[0] + return None + if inspect.ismethod (func): func = func.im_func + if not inspect.isfunction (func): + return None + (args, varargs, varkw, defaults) = inspect.getargspec (func) + print '_emacs_out', func.__name__+inspect.formatargspec (args, varargs, varkw, defaults) + +print '_emacs_ok'")) + (unless noshow (pop-to-buffer (setq python-buffer "*Python*")))) + +(defun python-send-region (start end) + "Send the region to the inferior Python process." + ;; The region is evaluated from a temporary file. This avoids + ;; problems with blank lines, which have different semantics + ;; interactively and in files. It also saves the inferior process + ;; buffer filling up with interpreter prompts. We need a function + ;; to remove the temporary file when it has been evaluated, which + ;; unfortunately means using a not-quite pristine interpreter + ;; initially. Unfortunately we also get tracebacks which look like: + ;; + ;; >>> Traceback (most recent call last): + ;; File "", line 1, in ? + ;; File "", line 4, in _emacs_execfile + ;; File "/tmp/py7734RSB", line 11 + ;; + ;; The compilation-minor-mode parsing takes care of relating the + ;; reference to the temporary file to the source. Fixme: + ;; comint-filter the first two lines of the traceback? + (interactive "r") + (let* ((f (make-temp-file "py")) + (command (format "_emacs_execfile(%S)" f)) + (orig-start (copy-marker start))) + (if (save-excursion + (goto-char start) + (/= 0 (current-indentation))) ; need dummy block + (write-region "if True:\n" nil f nil 'nomsg)) + (write-region start end f t 'nomsg) + (when python-buffer + (with-current-buffer python-buffer + (let ((end (marker-position (process-mark (python-proc))))) + (set (make-local-variable 'python-orig-start) orig-start) + (set (make-local-variable 'compilation-error-list) nil) + (let ((comint-input-filter-functions + (delete 'python-input-filter comint-input-filter-functions))) + (python-send-string command)) + (set-marker compilation-parsing-end end) + (setq compilation-last-buffer (current-buffer))))))) + +(defun python-send-string (string) + "Evaluate STRING in inferior Python process." + (interactive "sPython command: ") + (comint-send-string (python-proc) string) + (comint-send-string (python-proc) "\n\n")) + +(defun python-send-buffer () + "Send the current buffer to the inferior Python process." + (interactive) + (python-send-region (point-min) (point-max))) + +(defun python-send-defun () + "Send the current defun (class or method) to the inferior Python process." + (interactive) + (save-excursion (python-send-region (progn (beginning-of-defun) (point)) + (progn (end-of-defun) (point))))) + +(defun python-switch-to-python (eob-p) + "Switch to the Python process buffer. +With prefix arg, position cursor at end of buffer." + (interactive "P") + (if (get-buffer python-buffer) + (pop-to-buffer python-buffer) + (error "No current process buffer. See variable `python-buffer'")) + (when eob-p + (push-mark) + (goto-char (point-max)))) + +(add-to-list 'debug-ignored-errors "^No current process buffer.") + +(defun python-send-region-and-go (start end) + "Send the region to the inferior Python process. +Then switch to the process buffer." + (interactive "r") + (python-send-region start end) + (python-switch-to-python t)) + +(defcustom python-source-modes '(python-mode jython-mode) + "*Used to determine if a buffer contains Python source code. +If it's loaded into a buffer that is in one of these major modes, it's +considered a Python source file by `python-load-file'. +Used by these commands to determine defaults." + :type '(repeat function) + :group 'python) + +(defvar python-prev-dir/file nil + "Caches (directory . file) pair used in the last `python-load-file' command. +Used for determining the default in the next one.") + +(defun python-load-file (file-name) + "Load a Python file FILE-NAME into the inferior Python process. +If the file has extension `.py' import or reload it as a module. +Treating it as a module keeps the global namespace clean, provides +function location information for debugging, and supports users of +module-qualified names." + (interactive (comint-get-source "Load Python file: " python-prev-dir/file + python-source-modes + t)) ; because execfile needs exact name + (comint-check-source file-name) ; Check to see if buffer needs saved. + (setq python-prev-dir/file (cons (file-name-directory file-name) + (file-name-nondirectory file-name))) + (when python-buffer + (with-current-buffer python-buffer + (let ((end (marker-position (process-mark (python-proc))))) + (set (make-local-variable 'compilation-error-list) nil) + ;; (set (make-local-variable 'compilation-old-error-list) nil) + (let ((comint-input-filter-functions + (delete 'python-input-filter comint-input-filter-functions))) + (python-send-string + (if (string-match "\\.py\\'" file-name) + ;; Fixme: make sure the directory is in the path list + (let ((module (file-name-sans-extension + (file-name-nondirectory file-name)))) + (set (make-local-variable 'python-orig-start) nil) + (format "\ +if globals().has_key(%S): reload(%s) +else: import %s +" module module module)) + (set (make-local-variable 'python-orig-start) file-name) + (format "execfile('%s')" file-name)))) + (set-marker compilation-parsing-end end) + (setq compilation-last-buffer (current-buffer)))))) + +;; Fixme: Should this start a process if there isn't one? (Unlike cmuscheme.) +(defun python-proc () + "Return the current Python process. See variable `python-buffer'." + (let ((proc (get-buffer-process (if (eq major-mode 'inferior-python-mode) + (current-buffer) + python-buffer)))) + (or proc (error "No current process. See variable `python-buffer'")))) + +;;;; Context-sensitive help. + +(defconst python-dotty-syntax-table + (let ((table (make-syntax-table))) + (set-char-table-parent table python-mode-syntax-table) + (modify-syntax-entry ?. "_" table) + table) + "Syntax table giving `.' symbol syntax. +Otherwise inherits from `python-mode-syntax-table'.") + +;; Fixme: Should this actually be used instead of info-look, i.e. be +;; bound to C-h S? +(defun python-describe-symbol (symbol) + "Get help on SYMBOL using `pydoc'. +Interactively, prompt for symbol." + ;; Note that we do this in the inferior process, not a separate one to + ;; ensure the environment is appropriate. + (interactive + (let ((symbol (with-syntax-table python-dotty-syntax-table + (current-word))) + (enable-recursive-minibuffers t) + val) + (setq val (read-string (if symbol + (format "Describe symbol (default %s): " + symbol) + "Describe symbol: ") + nil nil symbol)) + (list (or val symbol)))) + (if (equal symbol "") (error "No symbol")) + (let* ((func `(lambda () + (comint-redirect-send-command (format "help(%S)\n" ,symbol) + "*Help*" nil)))) + ;; Ensure we have a suitable help buffer. + (let (temp-buffer-show-hook) ; avoid xref stuff + (with-output-to-temp-buffer "*Help*" + (with-current-buffer standard-output + (set (make-local-variable 'comint-redirect-subvert-readonly) t)))) + (if (and python-buffer (get-buffer python-buffer)) + (with-current-buffer python-buffer + (funcall func)) + (setq python-preoutput-continuation func) + (run-python nil t)))) + +(add-to-list 'debug-ignored-errors "^No symbol") + +;; Fixme: try to make it work with point in the arglist. Also, is +;; there anything reasonable we can do with random methods? +;; (Currently only works with functions.) +(defun python-eldoc-function () + "`eldoc-print-current-symbol-info' for Python. +Only works when point is in a function name, not its arglist, for instance. +Assumes an inferior Python is running." + (let ((symbol (with-syntax-table python-dotty-syntax-table + (current-word))) + (proc (and python-buffer (python-proc)))) + (when (and proc symbol) + (python-send-string + (format "_emacs_args(%S)" symbol)) + (setq python-preoutput-result nil) + (accept-process-output proc 1) + python-preoutput-result))) + +;;;; Info-look functionality. + +(defun python-after-info-look () + "Set up info-look for Python. +Used with `eval-after-load'." + (let* ((version (let ((s (shell-command-to-string (concat python-command + " -V")))) + (string-match "^Python \\([0-9]+\\.[0-9]+\\>\\)" s) + (match-string 1 s))) + ;; Whether info files have a Python version suffix, e.g. in Debian. + (versioned + (with-temp-buffer + (Info-mode) + (condition-case () + ;; Don't use `info' because it would pop-up a *info* buffer. + (Info-goto-node (format "(python%s-lib)Miscellaneous Index" + version)) + (error nil))))) + (info-lookup-maybe-add-help + :mode 'python-mode + :regexp "[[:alnum:]_]+" + :doc-spec + ;; Fixme: Can this reasonably be made specific to indices with + ;; different rules? Is the order of indices optimal? + ;; (Miscellaneous in -ref first prefers lookup of keywords, for + ;; instance.) + (if versioned + ;; The empty prefix just gets us highlighted terms. + `((,(concat "(python" version "-ref)Miscellaneous Index") nil "") + (,(concat "(python" version "-ref)Module Index" nil "")) + (,(concat "(python" version "-ref)Function-Method-Variable Index" + nil "")) + (,(concat "(python" version "-ref)Class-Exception-Object Index" + nil "")) + (,(concat "(python" version "-lib)Module Index" nil "")) + (,(concat "(python" version "-lib)Class-Exception-Object Index" + nil "")) + (,(concat "(python" version "-lib)Function-Method-Variable Index" + nil "")) + (,(concat "(python" version "-lib)Miscellaneous Index" nil ""))) + '(("(python-ref)Miscellaneous Index" nil "") + ("(python-ref)Module Index" nil "") + ("(python-ref)Function-Method-Variable Index" nil "") + ("(python-ref)Class-Exception-Object Index" nil "") + ("(python-lib)Module Index" nil "") + ("(python-lib)Class-Exception-Object Index" nil "") + ("(python-lib)Function-Method-Variable Index" nil "") + ("(python-lib)Miscellaneous Index" nil "")))))) +(eval-after-load "info-look" '(python-after-info-look)) + +;;;; Miscellancy. + +(defcustom python-jython-packages '("java" "javax" "org" "com") + "Packages implying `jython-mode'. +If these are imported near the beginning of the buffer, `python-mode' +actually punts to `jython-mode'." + :type '(repeat string) + :group 'python) + +;; Called from `python-mode', this causes a recursive call of the +;; mode. See logic there to break out of the recursion. +(defun python-maybe-jython () + "Invoke `jython-mode' if the buffer appears to contain Jython code. +The criterion is either a match for `jython-mode' via +`interpreter-mode-alist' or an import of a module from the list +`python-jython-packages'." + ;; The logic is taken from python-mode.el. + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (let ((interpreter (if (looking-at auto-mode-interpreter-regexp) + (match-string 2)))) + (if (and interpreter (eq 'jython-mode + (cdr (assoc (file-name-nondirectory + interpreter) + interpreter-mode-alist)))) + (jython-mode) + (if (catch 'done + (while (re-search-forward + (rx (and line-start (or "import" "from") (1+ space) + (group (1+ (not (any " \t\n.")))))) + 10000 ; Probably not worth customizing. + t) + (if (member (match-string 1) python-jython-packages) + (throw 'done t)))) + (jython-mode))))))) + +(defun python-fill-paragraph (&optional justify) + "`fill-paragraph-function' handling comments and multi-line strings. +If any of the current line is a comment, fill the comment or the +paragraph of it that point is in, preserving the comment's +indentation and initial comment characters. Similarly if the end +of the current line is in or at the end of a multi-line string. +Otherwise, do nothing." + (interactive "P") + (or (fill-comment-paragraph justify) + ;; The `paragraph-start' and `paragraph-separate' variables + ;; don't allow us to delimit the last paragraph in a multi-line + ;; string properly, so narrow to the string and then fill around + ;; (the end of) the current line. + (save-excursion + (end-of-line) + (let* ((syntax (syntax-ppss)) + (orig (point)) + (start (nth 8 syntax)) + end) + (cond ((eq t (nth 3 syntax)) ; in fenced string + (goto-char (nth 8 syntax)) ; string start + (condition-case () ; for unbalanced quotes + (progn (forward-sexp) + (setq end (point))) + (error (setq end (point-max))))) + ((re-search-backward "\\s|\\s-*\\=" nil t) ; end of fenced + ; string + (forward-char) + (setq end (point)) + (condition-case () + (progn (backward-sexp) + (setq start (point))) + (error nil)))) + (when end + (save-restriction + (narrow-to-region start end) + (goto-char orig) + (fill-paragraph justify)))))) + t) + +(defun python-shift-left (start end &optional count) + "Shift lines in region COUNT (the prefix arg) columns to the left. +COUNT defaults to `python-indent'. If region isn't active, just shift +current line. The region shifted includes the lines in which START and +END lie. It is an error if any lines in the region are indented less than +COUNT columns." + (interactive (if mark-active + (list (region-beginning) (region-end) current-prefix-arg) + (list (point) (point) current-prefix-arg))) + (if count + (setq count (prefix-numeric-value count)) + (setq count python-indent)) + (when (> count 0) + (save-excursion + (goto-char start) + (while (< (point) end) + (if (and (< (current-indentation) count) + (not (looking-at "[ \t]*$"))) + (error "Can't shift all lines enough")) + (forward-line)) + (indent-rigidly start end (- count))))) + +(add-to-list 'debug-ignored-errors "^Can't shift all lines enough") + +(defun python-shift-right (start end &optional count) + "Shift lines in region COUNT (the prefix arg) columns to the right. +COUNT defaults to `python-indent'. If region isn't active, just shift +current line. The region shifted includes the lines in which START and +END lie." + (interactive (if mark-active + (list (region-beginning) (region-end) current-prefix-arg) + (list (point) (point) current-prefix-arg))) + (if count + (setq count (prefix-numeric-value count)) + (setq count python-indent)) + (indent-rigidly start end count)) + +(defun python-outline-level () + "`outline-level' function for Python mode. +The level is the number of `python-indent' steps of indentation +of current line." + (/ (current-indentation) python-indent)) + +;; Fixme: Consider top-level assignments, imports, &c. +(defun python-current-defun () + "`add-log-current-defun-function' for Python." + (save-excursion + ;; Move up the tree of nested `class' and `def' blocks until we + ;; get to zero indentation, accumulating the defined names. + (let ((start t) + accum) + (while (or start (> (current-indentation) 0)) + (setq start nil) + (python-beginning-of-block) + (end-of-line) + (beginning-of-defun) + (if (looking-at (rx (and (0+ space) (or "def" "class") (1+ space) + (group (1+ (or word (syntax symbol)))) + word-end))) + (push (match-string 1) accum))) + (if accum (mapconcat 'identity accum "."))))) + +(defun python-mark-block () + "Mark the block around point. +Uses `python-beginning-of-block', `python-end-of-block'." + (interactive) + (push-mark) + (python-beginning-of-block) + (push-mark (point) nil t) + (python-end-of-block) + (exchange-point-and-mark)) + +;;;; Modes. + +(defvar outline-heading-end-regexp) +(defvar eldoc-print-current-symbol-info-function) +(defvar python-mode-running) +;;;###autoload +(define-derived-mode python-mode fundamental-mode "Python" + "Major mode for editing Python files. +Turns on Font Lock mode unconditionally since it is required for correct +parsing of the source. +See also `jython-mode', which is actually invoked if the buffer appears to +contain Jython code. See also `run-python' and associated Python mode +commands for running Python under Emacs. + +The Emacs commands which work with `defun's, e.g. \\[beginning-of-defun], deal +with nested `def' and `class' blocks. They take the innermost one as +current without distinguishing method and class definitions. Used multiple +times, they move over others at the same indentation level until they reach +the end of definitions at that level, when they move up a level. +\\ +Colon is electric: it outdents the line if appropriate, e.g. for +an else statement. \\[python-backspace] at the beginning of an indented statement +deletes a level of indentation to close the current block; otherwise it +deletes a charcter backward. TAB indents the current line relative to +the preceding code. Successive TABs, with no intervening command, cycle +through the possibilities for indentation on the basis of enclosing blocks. + +\\[fill-paragraph] fills comments and multiline strings appropriately, but has no +effect outside them. + +Supports Eldoc mode (only for functions, using a Python process), +Info-Look and Imenu. In Outline minor mode, `class' and `def' +lines count as headers. + +\\{python-mode-map}" + :group 'python + (set (make-local-variable 'font-lock-defaults) + '(python-font-lock-keywords nil nil ((?_ . "w")) nil + (font-lock-syntactic-keywords + . python-font-lock-syntactic-keywords) +;;; This probably isn't worth it. +;;; (font-lock-syntactic-face-function +;;; . python-font-lock-syntactic-face-function) + )) + (set (make-local-variable 'parse-sexp-lookup-properties) t) + (set (make-local-variable 'comment-start) "# ") + ;; Fixme: define a comment-indent-function? + (set (make-local-variable 'indent-line-function) #'python-indent-line) + (set (make-local-variable 'paragraph-start) "\\s-*$") + (set (make-local-variable 'fill-paragraph-function) + 'python-fill-paragraph) + (set (make-local-variable 'require-final-newline) t) + (set (make-local-variable 'add-log-current-defun-function) + #'python-current-defun) + ;; Fixme: Generalize to do all blocks? + (set (make-local-variable 'outline-regexp) "\\s-*\\(def\\|class\\)\\>") + (set (make-local-variable 'outline-heading-end-regexp) ":\\s-*\n") + (set (make-local-variable 'outline-level) #'python-outline-level) + (set (make-local-variable 'open-paren-in-column-0-is-defun-start) nil) + (make-local-variable 'python-saved-check-command) + (set (make-local-variable 'beginning-of-defun-function) + 'python-beginning-of-defun) + (set (make-local-variable 'end-of-defun-function) 'python-end-of-defun) + (setq imenu-create-index-function #'python-imenu-create-index) + (set (make-local-variable 'eldoc-print-current-symbol-info-function) + #'python-eldoc-function) + (add-hook 'eldoc-mode-hook + '(lambda () (run-python 0 t)) nil t) ; need it running + (unless font-lock-mode (font-lock-mode 1)) + (when python-guess-indent (python-guess-indent)) + (set (make-local-variable 'python-command) python-python-command) + (unless (boundp 'python-mode-running) ; kill the recursion from jython-mode + (let ((python-mode-running t)) + (python-maybe-jython)))) + +(custom-add-option 'python-mode-hook 'imenu-add-menubar-index) +(custom-add-option 'python-mode-hook + '(lambda () + "Turn on Indent Tabs mode." + (set (make-local-variable 'indent-tabs-mode) t))) +(custom-add-option 'python-mode-hook 'turn-on-eldoc-mode) + +;;;###autoload +(define-derived-mode jython-mode python-mode "Jython" + "Major mode for editing Jython files. +Like `python-mode', but sets up parameters for Jython subprocesses. +Runs `jython-mode-hook' after `python-mode-hook'." + :group 'python + (set (make-local-variable 'python-command) python-jython-command)) + +(provide 'python) +;; arch-tag: 6fce1d99-a704-4de9-ba19-c6e4912b0554 +;;; python.el ends here diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index 588bab138e..13dd790b6a 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el @@ -165,7 +165,7 @@ (setq font-lock-defaults '((scheme-font-lock-keywords scheme-font-lock-keywords-1 scheme-font-lock-keywords-2) - nil t (("+-*/.<>=!?$%_&~^:" . "w")) beginning-of-defun + nil t (("+-*/.<>=!?$%_&~^:#" . "w")) beginning-of-defun (font-lock-mark-block-function . mark-defun) (font-lock-syntactic-face-function . lisp-font-lock-syntactic-face-function)))) @@ -328,7 +328,7 @@ See `run-hooks'." "do" "else" "for-each" "if" "lambda" "let" "let*" "let-syntax" "letrec" "letrec-syntax" ;; Hannes Haug wants: - "and" "or" "delay" + "and" "or" "delay" "force" ;; Stefan Monnier says don't bother: ;;"quasiquote" "quote" "unquote" "unquote-splicing" "map" "syntax" "syntax-rules") t) @@ -337,8 +337,8 @@ See `run-hooks'." ;; David Fox for SOS/STklos class specifiers. '("\\<<\\sw+>\\>" . font-lock-type-face) ;; - ;; Scheme `:' keywords as builtins. - '("\\<:\\sw+\\>" . font-lock-builtin-face) + ;; Scheme `:' and `#:' keywords as builtins. + '("\\<#?:\\sw+\\>" . font-lock-builtin-face) ))) "Gaudy expressions to highlight in Scheme modes.") @@ -558,4 +558,5 @@ that variable's value is a string." (provide 'scheme) +;;; arch-tag: a8f06bc1-ad11-42d2-9e36-ce651df37a90 ;;; scheme.el ends here diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 2d332bae66..df2bf6803d 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1,6 +1,6 @@ ;;; sh-script.el --- shell-script editing commands for Emacs -;; Copyright (C) 1993, 94, 95, 96, 97, 1999, 2001, 2003 +;; Copyright (C) 1993, 94, 95, 96, 97, 1999, 2001, 03, 2004 ;; Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer @@ -315,9 +315,7 @@ shell it really is." :type '(repeat (cons (symbol :tag "Shell") (choice (const :tag "No Arguments" nil) (string :tag "Arguments") - (cons :format "Evaluate: %v" - (const :format "" eval) - sexp)))) + (sexp :format "Evaluate: %v")))) :group 'sh-script) (defcustom sh-imenu-generic-expression @@ -358,21 +356,21 @@ the car and cdr are the same symbol.") ;; I turned off this feature because it doesn't permit typing commands ;; in the usual way without help. ;;(defvar sh-abbrevs -;; '((csh eval sh-abbrevs shell +;; '((csh sh-abbrevs shell ;; "switch" 'sh-case ;; "getopts" 'sh-while-getopts) -;; (es eval sh-abbrevs shell +;; (es sh-abbrevs shell ;; "function" 'sh-function) -;; (ksh88 eval sh-abbrevs sh +;; (ksh88 sh-abbrevs sh ;; "select" 'sh-select) -;; (rc eval sh-abbrevs shell +;; (rc sh-abbrevs shell ;; "case" 'sh-case ;; "function" 'sh-function) -;; (sh eval sh-abbrevs shell +;; (sh sh-abbrevs shell ;; "case" 'sh-case ;; "function" 'sh-function ;; "until" 'sh-until @@ -385,7 +383,7 @@ the car and cdr are the same symbol.") ;; "tmpfile" sh-tmp-file ;; "while" sh-while) -;; (zsh eval sh-abbrevs ksh88 +;; (zsh sh-abbrevs ksh88 ;; "repeat" 'sh-repeat)) ;; "Abbrev-table used in Shell-Script mode. See `sh-feature'. ;;;Due to the internal workings of abbrev tables, the shell name symbol is @@ -393,8 +391,19 @@ the car and cdr are the same symbol.") -(defvar sh-mode-syntax-table - '((sh eval sh-mode-syntax-table () +(defun sh-mode-syntax-table (table &rest list) + "Copy TABLE and set syntax for successive CHARs according to strings S." + (setq table (copy-syntax-table table)) + (while list + (modify-syntax-entry (pop list) (pop list) table)) + table) + +(defvar sh-mode-syntax-table nil + "The syntax table to use for Shell-Script mode. +This is buffer-local in every such buffer.") + +(defvar sh-mode-default-syntax-table + (sh-mode-syntax-table () ?\# "<" ?\n ">#" ?\" "\"\"" @@ -409,9 +418,10 @@ the car and cdr are the same symbol.") ?, "_" ?< "." ?> ".") - (csh eval identity sh) - (rc eval identity sh)) + "Default syntax table for shell mode.") +(defvar sh-mode-syntax-table-input + '((sh . nil)) "Syntax-table used in Shell-Script mode. See `sh-feature'.") (defvar sh-mode-map @@ -480,15 +490,13 @@ the car and cdr are the same symbol.") (defcustom sh-require-final-newline '((csh . t) (pdksh . t) - (rc eval . require-final-newline) - (sh eval . require-final-newline)) + (rc . require-final-newline) + (sh . require-final-newline)) "*Value of `require-final-newline' in Shell-Script mode buffers. See `sh-feature'." :type '(repeat (cons (symbol :tag "Shell") (choice (const :tag "require" t) - (cons :format "Evaluate: %v" - (const :format "" eval) - sexp)))) + (sexp :format "Evaluate: %v")))) :group 'sh-script) @@ -503,9 +511,7 @@ First grouping matches the variable name. This is upto and including the `=' sign. See `sh-feature'." :type '(repeat (cons (symbol :tag "Shell") (choice regexp - (cons :format "Evaluate: %v" - (const :format "" eval) - sexp)))) + (sexp :format "Evaluate: %v")))) :group 'sh-script) @@ -561,60 +567,61 @@ documents - you must insert literal tabs by hand.") ;; customized this out of sheer bravado. not for the faint of heart. ;; but it *did* have an asterisk in the docstring! (defcustom sh-builtins - '((bash eval sh-append posix - "alias" "bg" "bind" "builtin" "declare" "dirs" "enable" "fc" "fg" - "help" "history" "jobs" "kill" "let" "local" "popd" "pushd" "source" - "suspend" "typeset" "unalias") + '((bash sh-append posix + "." "alias" "bg" "bind" "builtin" "compgen" "complete" + "declare" "dirs" "disown" "enable" "fc" "fg" "help" "history" + "jobs" "kill" "let" "local" "popd" "printf" "pushd" "shopt" + "source" "suspend" "typeset" "unalias") ;; The next entry is only used for defining the others - (bourne eval sh-append shell + (bourne sh-append shell "eval" "export" "getopts" "newgrp" "pwd" "read" "readonly" "times" "ulimit") - (csh eval sh-append shell + (csh sh-append shell "alias" "chdir" "glob" "history" "limit" "nice" "nohup" "rehash" "setenv" "source" "time" "unalias" "unhash") - (dtksh eval identity wksh) + (dtksh sh-append wksh) (es "access" "apids" "cd" "echo" "eval" "false" "let" "limit" "local" "newpgrp" "result" "time" "umask" "var" "vars" "wait" "whatis") - (jsh eval sh-append sh + (jsh sh-append sh "bg" "fg" "jobs" "kill" "stop" "suspend") - (jcsh eval sh-append csh + (jcsh sh-append csh "bg" "fg" "jobs" "kill" "notify" "stop" "suspend") - (ksh88 eval sh-append bourne + (ksh88 sh-append bourne "alias" "bg" "false" "fc" "fg" "jobs" "kill" "let" "print" "time" "typeset" "unalias" "whence") - (oash eval sh-append sh + (oash sh-append sh "checkwin" "dateline" "error" "form" "menu" "newwin" "oadeinit" "oaed" "oahelp" "oainit" "pp" "ppfile" "scan" "scrollok" "wattr" "wclear" "werase" "win" "wmclose" "wmmessage" "wmopen" "wmove" "wmtitle" "wrefresh") - (pdksh eval sh-append ksh88 + (pdksh sh-append ksh88 "bind") - (posix eval sh-append sh + (posix sh-append sh "command") (rc "builtin" "cd" "echo" "eval" "limit" "newpgrp" "shift" "umask" "wait" "whatis") - (sh eval sh-append bourne + (sh sh-append bourne "hash" "test" "type") ;; The next entry is only used for defining the others (shell "cd" "echo" "eval" "set" "shift" "umask" "unset" "wait") - (wksh eval sh-append ksh88 + (wksh sh-append ksh88 "Xt[A-Z][A-Za-z]*") - (zsh eval sh-append ksh88 + (zsh sh-append ksh88 "autoload" "bindkey" "builtin" "chdir" "compctl" "declare" "dirs" "disable" "disown" "echotc" "enable" "functions" "getln" "hash" "history" "integer" "limit" "local" "log" "popd" "pushd" "r" @@ -626,15 +633,16 @@ Note that on some systems not all builtins are available or some are implemented as aliases. See `sh-feature'." :type '(repeat (cons (symbol :tag "Shell") (choice (repeat string) - (cons :format "Evaluate: %v" - (const :format "" eval) - sexp)))) + (sexp :format "Evaluate: %v")))) :group 'sh-script) (defcustom sh-leading-keywords - '((csh "else") + '((bash sh-append sh + "time") + + (csh "else") (es "true" "unwind-protect" "whatis") @@ -647,88 +655,90 @@ system, the distinction here has been based on whether they influence the flow of control or syntax. See `sh-feature'." :type '(repeat (cons (symbol :tag "Shell") (choice (repeat string) - (cons :format "Evaluate: %v" - (const :format "" eval) - sexp)))) + (sexp :format "Evaluate: %v")))) :group 'sh-script) (defcustom sh-other-keywords - '((bash eval sh-append bourne + '((bash sh-append bourne "bye" "logout" "select") ;; The next entry is only used for defining the others - (bourne eval sh-append sh + (bourne sh-append sh "function") - (csh eval sh-append shell + (csh sh-append shell "breaksw" "default" "end" "endif" "endsw" "foreach" "goto" "if" "logout" "onintr" "repeat" "switch" "then" "while") (es "break" "catch" "exec" "exit" "fn" "for" "forever" "fork" "if" "return" "throw" "while") - (ksh88 eval sh-append bourne + (ksh88 sh-append bourne "select") (rc "break" "case" "exec" "exit" "fn" "for" "if" "in" "return" "switch" "while") - (sh eval sh-append shell + (sh sh-append shell "done" "esac" "fi" "for" "in" "return") ;; The next entry is only used for defining the others (shell "break" "case" "continue" "exec" "exit") - (zsh eval sh-append bash + (zsh sh-append bash "select")) "*List of keywords not in `sh-leading-keywords'. See `sh-feature'." :type '(repeat (cons (symbol :tag "Shell") (choice (repeat string) - (cons :format "Evaluate: %v" - (const :format "" eval) - sexp)))) + (sexp :format "Evaluate: %v")))) :group 'sh-script) (defvar sh-variables - '((bash eval sh-append sh - "allow_null_glob_expansion" "auto_resume" "BASH" "BASH_VERSION" - "cdable_vars" "ENV" "EUID" "FCEDIT" "FIGNORE" "glob_dot_filenames" - "histchars" "HISTFILE" "HISTFILESIZE" "history_control" "HISTSIZE" - "hostname_completion_file" "HOSTTYPE" "IGNOREEOF" "ignoreeof" - "LINENO" "MAIL_WARNING" "noclobber" "nolinks" "notify" - "no_exit_on_failed_exec" "NO_PROMPT_VARS" "OLDPWD" "OPTERR" "PPID" - "PROMPT_COMMAND" "PS4" "pushd_silent" "PWD" "RANDOM" "REPLY" - "SECONDS" "SHLVL" "TMOUT" "UID") - - (csh eval sh-append shell + '((bash sh-append sh + "allow_null_glob_expansion" "auto_resume" "BASH" "BASH_ENV" + "BASH_VERSINFO" "BASH_VERSION" "cdable_vars" "COMP_CWORD" + "COMP_LINE" "COMP_POINT" "COMP_WORDS" "COMPREPLY" "DIRSTACK" + "ENV" "EUID" "FCEDIT" "FIGNORE" "FUNCNAME" + "glob_dot_filenames" "GLOBIGNORE" "GROUPS" "histchars" + "HISTCMD" "HISTCONTROL" "HISTFILE" "HISTFILESIZE" + "HISTIGNORE" "history_control" "HISTSIZE" + "hostname_completion_file" "HOSTFILE" "HOSTTYPE" "IGNOREEOF" + "ignoreeof" "INPUTRC" "LINENO" "MACHTYPE" "MAIL_WARNING" + "noclobber" "nolinks" "notify" "no_exit_on_failed_exec" + "NO_PROMPT_VARS" "OLDPWD" "OPTERR" "OSTYPE" "PIPESTATUS" + "PPID" "POSIXLY_CORRECT" "PROMPT_COMMAND" "PS3" "PS4" + "pushd_silent" "PWD" "RANDOM" "REPLY" "SECONDS" "SHELLOPTS" + "SHLVL" "TIMEFORMAT" "TMOUT" "UID") + + (csh sh-append shell "argv" "cdpath" "child" "echo" "histchars" "history" "home" "ignoreeof" "mail" "noclobber" "noglob" "nonomatch" "path" "prompt" "shell" "status" "time" "verbose") - (es eval sh-append shell + (es sh-append shell "apid" "cdpath" "CDPATH" "history" "home" "ifs" "noexport" "path" "pid" "prompt" "signals") - (jcsh eval sh-append csh + (jcsh sh-append csh "notify") - (ksh88 eval sh-append sh + (ksh88 sh-append sh "ENV" "ERRNO" "FCEDIT" "FPATH" "HISTFILE" "HISTSIZE" "LINENO" "OLDPWD" "PPID" "PS3" "PS4" "PWD" "RANDOM" "REPLY" "SECONDS" "TMOUT") - (oash eval sh-append sh + (oash sh-append sh "FIELD" "FIELD_MAX" "LAST_KEY" "OALIB" "PP_ITEM" "PP_NUM") - (rc eval sh-append shell + (rc sh-append shell "apid" "apids" "cdpath" "CDPATH" "history" "home" "ifs" "path" "pid" "prompt" "status") - (sh eval sh-append shell + (sh sh-append shell "CDPATH" "IFS" "OPTARG" "OPTIND" "PS1" "PS2") ;; The next entry is only used for defining the others @@ -737,7 +747,7 @@ See `sh-feature'." "LINES" "LOGNAME" "MAIL" "MAILCHECK" "MAILPATH" "PAGER" "PATH" "SHELL" "TERM" "TERMCAP" "TERMINFO" "VISUAL") - (tcsh eval sh-append csh + (tcsh sh-append csh "addsuffix" "ampm" "autocorrect" "autoexpand" "autolist" "autologout" "chase_symlinks" "correct" "dextract" "edit" "el" "fignore" "gid" "histlit" "HOST" "HOSTTYPE" "HPATH" @@ -748,7 +758,7 @@ See `sh-feature'." "tperiod" "tty" "uid" "version" "visiblebell" "watch" "who" "wordchars") - (zsh eval sh-append ksh88 + (zsh sh-append ksh88 "BAUD" "bindcmds" "cdpath" "DIRSTACKSIZE" "fignore" "FIGNORE" "fpath" "HISTCHARS" "hostcmds" "hosts" "HOSTS" "LISTMAX" "LITHISTSIZE" "LOGCHECK" "mailpath" "manpath" "NULLCMD" "optcmds" "path" "POSTEDIT" @@ -777,34 +787,36 @@ See `sh-feature'.") (defvar sh-font-lock-keywords - '((csh eval sh-append shell - '("\\${?[#?]?\\([A-Za-z_][A-Za-z0-9_]*\\|0\\)" 1 - font-lock-variable-name-face)) + '((csh sh-append shell + ("\\${?[#?]?\\([A-Za-z_][A-Za-z0-9_]*\\|0\\)" 1 + font-lock-variable-name-face)) - (es eval sh-append executable-font-lock-keywords - '("\\$#?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\)" 1 - font-lock-variable-name-face)) + (es sh-append executable-font-lock-keywords + ("\\$#?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\)" 1 + font-lock-variable-name-face)) - (rc eval identity es) + (rc sh-append es) - (sh eval sh-append shell + (sh sh-append shell ;; Variable names. - '("\\$\\({#?\\)?\\([A-Za-z_][A-Za-z0-9_]*\\|[-#?@!]\\)" 2 + ("\\$\\({#?\\)?\\([A-Za-z_][A-Za-z0-9_]*\\|[-#?@!]\\)" 2 font-lock-variable-name-face) ;; Function names. - '("^\\(\\sw+\\)[ \t]*(" 1 font-lock-function-name-face) - '("\\<\\(function\\)\\>[ \t]*\\(\\sw+\\)?" + ("^\\(\\sw+\\)[ \t]*(" 1 font-lock-function-name-face) + ("\\<\\(function\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t))) ;; The next entry is only used for defining the others - (shell eval sh-append executable-font-lock-keywords - '("\\\\[^A-Za-z0-9]" 0 font-lock-string-face) - '("\\${?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\|[$*_]\\)" 1 + (shell sh-append executable-font-lock-keywords + ;; Using font-lock-string-face here confuses sh-get-indent-info. + ("\\\\$" 0 font-lock-warning-face) + ("\\\\[^A-Za-z0-9]" 0 font-lock-string-face) + ("\\${?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\|[$*_]\\)" 1 font-lock-variable-name-face)) - (rpm eval sh-append rpm2 - '("%{?\\(\\sw+\\)" 1 font-lock-keyword-face)) - (rpm2 eval sh-append shell - '("^\\(\\sw+\\):" 1 font-lock-variable-name-face))) + (rpm sh-append rpm2 + ("%{?\\(\\sw+\\)" 1 font-lock-keyword-face)) + (rpm2 sh-append shell + ("^\\(\\sw+\\):" 1 font-lock-variable-name-face))) "Default expressions to highlight in Shell Script modes. See `sh-feature'.") (defvar sh-font-lock-keywords-1 @@ -905,7 +917,7 @@ be indented (i.e. a <<- was used rather than just <<)." ;; Skip through one pattern (while (or (/= 0 (skip-syntax-backward "w_")) - (/= 0 (skip-chars-backward "?[]*/\\")) + (/= 0 (skip-chars-backward "?[]*@/\\")) (and (sh-is-quoted-p (1- (point))) (goto-char (- (point) 2))) (when (memq (char-before) '(?\" ?\')) @@ -1466,16 +1478,23 @@ Calls the value of `sh-set-shell-hook' if set." (setq sh-shell-file (executable-set-magic shell (sh-feature sh-shell-arg) no-query-flag insert-flag))) - (setq require-final-newline (sh-feature sh-require-final-newline) -;;; local-abbrev-table (sh-feature sh-abbrevs) + (let ((tem (sh-feature sh-require-final-newline))) + (unless (eq tem 'require-final-newline) + (setq require-final-newline tem))) + (setq comment-start-skip "#+[\t ]*" +;;; local-abbrev-table (sh-feature sh-abbrevs) mode-line-process (format "[%s]" sh-shell) sh-shell-variables nil sh-shell-variables-initialized nil imenu-generic-expression (sh-feature sh-imenu-generic-expression) imenu-case-fold-search nil) - (set-syntax-table (or (sh-feature sh-mode-syntax-table) - (standard-syntax-table))) + (make-local-variable 'sh-mode-syntax-table) + (let ((tem (sh-feature sh-mode-syntax-table-input))) + (setq sh-mode-syntax-table + (if tem (apply 'sh-mode-syntax-table tem) + sh-mode-default-syntax-table))) + (set-syntax-table sh-mode-syntax-table) (dolist (var (sh-feature sh-variables)) (sh-remember-variable var)) (make-local-variable 'indent-line-function) @@ -1501,7 +1520,7 @@ Calls the value of `sh-set-shell-hook' if set." -(defun sh-feature (list &optional function) +(defun sh-feature (alist &optional function) "Index ALIST by the current shell. If ALIST isn't a list where every element is a cons, it is returned as is. Else indexing follows an inheritance logic which works in two ways: @@ -1510,45 +1529,43 @@ Else indexing follows an inheritance logic which works in two ways: the alist contains no value for the current shell. The ultimate default is always `sh'. - - If the value thus looked up is a list starting with `eval' its `cdr' is - first evaluated. If that is also a list and the first argument is a - symbol in ALIST it is not evaluated, but rather recursively looked up in - ALIST to allow the function called to define the value for one shell to be - derived from another shell. While calling the function, is the car of the - alist element is the current shell. + - If the value thus looked up is a list starting with `sh-append', + we call the function `sh-append' with the rest of the list as + arguments, and use the value. However, the next element of the + list is not used as-is; instead, we look it up recursively + in ALIST to allow the function called to define the value for + one shell to be derived from another shell. The value thus determined is physically replaced into the alist. Optional FUNCTION is applied to the determined value and the result is cached in ALIST." - (or (if (consp list) - (let ((l list)) + (or (if (consp alist) + (let ((l alist)) (while (and l (consp (car l))) (setq l (cdr l))) - (if l list))) + (if l alist))) (if function - (cdr (assoc (setq function (cons sh-shell function)) list))) + (cdr (assoc (setq function (cons sh-shell function)) alist))) (let ((sh-shell sh-shell) elt val) (while (and sh-shell - (not (setq elt (assq sh-shell list)))) + (not (setq elt (assq sh-shell alist)))) (setq sh-shell (cdr (assq sh-shell sh-ancestor-alist)))) ;; If the shell is not known, treat it as sh. (unless elt - (setq elt (assq 'sh list))) + (setq elt (assq 'sh alist))) (if (and (consp (setq val (cdr elt))) - (eq (car val) 'eval)) + (memq (car val) '(sh-append sh-modify))) (setcdr elt (setq val - (eval (if (consp (setq val (cdr val))) - (let ((sh-shell (car (cdr val)))) - (if (assq sh-shell list) - (setcar (cdr val) - (list 'quote - (sh-feature list)))) - val) - val))))) + (apply (car val) + (let ((sh-shell (car (cdr val)))) + (if (assq sh-shell alist) + (sh-feature alist) + (eval sh-shell))) + (cddr val))))) (if function - (nconc list + (nconc alist (list (cons function (setq sh-shell (car function) val (funcall (cdr function) val)))))) @@ -1589,13 +1606,6 @@ in ALIST." ;; (symbol-value sh-shell))) -(defun sh-mode-syntax-table (table &rest list) - "Copy TABLE and set syntax for successive CHARs according to strings S." - (setq table (copy-syntax-table table)) - (while list - (modify-syntax-entry (pop list) (pop list) table)) - table) - (defun sh-append (ancestor &rest list) "Return list composed of first argument (a list) physically appended to rest." (nconc list ancestor)) @@ -2030,7 +2040,8 @@ STRING This is ignored for the purposes of calculating (progn (setq result (append result val)) (setq align-point (point)))) - (forward-char -1) + (or (bobp) + (forward-char -1)) (skip-chars-forward "[a-z0-9]*?") ) ((string-match "[])}]" x) @@ -3106,16 +3117,16 @@ This is always added to the end of the buffer." (define-skeleton sh-for "Insert a for loop. See `sh-feature'." - (csh eval sh-modify sh + (csh sh-modify sh 1 "" 2 "foreach " 4 " ( " 6 " )" 15 '< 16 "end") - (es eval sh-modify rc + (es sh-modify rc 4 " = ") - (rc eval sh-modify sh + (rc sh-modify sh 2 "for( " 6 " ) {" 15 ?\} ) @@ -3128,14 +3139,14 @@ This is always added to the end of the buffer." (define-skeleton sh-indexed-loop "Insert an indexed loop from 1 to n. See `sh-feature'." - (bash eval identity posix) + (bash sh-modify posix) (csh "Index variable: " "@ " str " = 1" \n "while( $" str " <= " (read-string "upper limit: ") " )" \n > _ ?$ str \n "@ " str "++" \n < "end" \n) - (es eval sh-modify rc + (es sh-modify rc 4 " =") (ksh88 "Index variable: " > "integer " str "=0" \n @@ -3203,7 +3214,7 @@ t means to return a list of all possible completions of STRING. process-environment) sh-shell-variables)))) (case code - (nil (try-completion string sh-shell-variables predicate)) + ((nil) (try-completion string sh-shell-variables predicate)) (lambda (test-completion string sh-shell-variables predicate)) (t (all-completions string sh-shell-variables predicate))))) @@ -3233,13 +3244,13 @@ t means to return a list of all possible completions of STRING. (define-skeleton sh-function "Insert a function definition. See `sh-feature'." - (bash eval sh-modify ksh88 + (bash sh-modify ksh88 3 "() {") (ksh88 "name: " "function " str " {" \n > _ \n < "}" \n) - (rc eval sh-modify ksh88 + (rc sh-modify ksh88 1 "fn ") (sh () "() {" \n @@ -3315,14 +3326,14 @@ t means to return a list of all possible completions of STRING. > "select " str " in " _ "; do" \n > ?$ str \n "done" > \n) - (bash eval sh-append ksh88)) + (bash sh-append ksh88)) ;;;(put 'sh-select 'menu-enable '(sh-feature sh-select)) (define-skeleton sh-tmp-file "Insert code to setup temporary file handling. See `sh-feature'." - (bash eval identity ksh88) + (bash sh-append ksh88) (csh (file-name-nondirectory (buffer-file-name)) "set tmp = /tmp/" str ".$$" \n "onintr exit" \n _ @@ -3341,7 +3352,7 @@ t means to return a list of all possible completions of STRING. _ \n ?\} > \n ?\} > \n) - (ksh88 eval sh-modify sh + (ksh88 sh-modify sh 7 "EXIT") (rc (file-name-nondirectory (buffer-file-name)) > "tmp = /tmp/" str ".$pid" \n @@ -3365,17 +3376,17 @@ t means to return a list of all possible completions of STRING. (define-skeleton sh-while "Insert a while loop. See `sh-feature'." - (csh eval sh-modify sh + (csh sh-modify sh 2 "" 3 "while( " 5 " )" 10 '< 11 "end") - (es eval sh-modify sh + (es sh-modify sh 3 "while { " 5 " } {" 10 ?\} ) - (rc eval sh-modify sh + (rc sh-modify sh 3 "while( " 5 " ) {" 10 ?\} ) @@ -3391,7 +3402,7 @@ t means to return a list of all possible completions of STRING. "Insert a while getopts loop. See `sh-feature'. Prompts for an options string which consists of letters for each recognized option followed by a colon `:' if the option accepts an argument." - (bash eval sh-modify sh + (bash sh-modify sh 18 "${0##*/}") (csh nil "while( 1 )" \n @@ -3416,11 +3427,11 @@ option followed by a colon `:' if the option accepts an argument." < < "endsw" \n "shift" \n < "end" \n) - (ksh88 eval sh-modify sh + (ksh88 sh-modify sh 16 "print" 18 "${0##*/}" 37 "OPTIND-1") - (posix eval sh-modify sh + (posix sh-modify sh 18 "$(basename $0)") (sh "optstring: " > "while getopts :" str " OPT; do" \n @@ -3533,4 +3544,5 @@ The document is bounded by `sh-here-document-word'." (provide 'sh-script) +;;; arch-tag: eccd8b72-f337-4fc2-ae86-18155a69d937 ;;; sh-script.el ends here diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el index 74dafc3faf..a27f91e859 100644 --- a/lisp/progmodes/simula.el +++ b/lisp/progmodes/simula.el @@ -1656,4 +1656,5 @@ If not nil and not t, move to limit of search and return nil." (provide 'simula) +;;; arch-tag: 488c1bb0-eebf-4f06-93df-1df603f06255 ;;; simula.el ends here diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 4be9ec903f..1a9251599c 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -1,10 +1,10 @@ ;;; sql.el --- specialized comint.el for SQL interpreters -;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ;; Author: Alex Schroeder -;; Maintainer: Alex Schroeder -;; Version: 1.7.0 +;; Maintainer: Michael Mauger +;; Version: 1.8.0 ;; Keywords: comm languages processes ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?SqlMode @@ -78,14 +78,107 @@ ;;; Bugs: -;; Using sql-ms (isql by Microsoft): When commands with syntax errors -;; or execution errors are executed, there is no server feedback. -;; This happens in stored procedures for example. The server messages -;; only appear after the process is exited. This makes things -;; somewhat unreliable. +;; sql-ms now uses osql instead of isql. Osql flushes its error +;; stream more frequently than isql so that error messages are +;; available. There is no prompt and some output still is buffered. +;; This improves the interaction under Emacs but it still is somewhat +;; awkward. + +;; Quoted identifiers are not supported for hilighting. Most +;; databases support the use of double quoted strings in place of +;; identifiers; ms (Microsoft SQLServer) also supports identifiers +;; enclosed within brackets []. ;; ChangeLog available on request. +;;; Product Support: + +;; To add support for additional SQL products the following steps +;; must be followed ("xyz" is the name of the product in the examples +;; below): + +;; 1) Add the product to `sql-product' choice list. + +;; (const :tag "XyzDB" xyz) + +;; 2) Add an entry to the `sql-product-support' list. + +;; (xyz +;; :font-lock sql-mode-xyz-font-lock-keywords +;; :sqli-login (user password server database) +;; :sqli-connect sql-connect-xyz +;; :sqli-prompt-regexp "^xyzdb> " +;; :sqli-prompt-length 7 +;; :sqli-input-sender nil +;; :syntax-alist ((?# . "w"))) + +;; 3) Add customizable values for the product interpreter and options. + +;; ;; Customization for XyzDB +;; +;; (defcustom sql-xyz-program "ixyz" +;; "*Command to start ixyz by XyzDB." +;; :type 'file +;; :group 'SQL) +;; +;; (defcustom sql-xyz-options '("-X" "-Y" "-Z") +;; "*List of additional options for `sql-xyz-program'." +;; :type '(repeat string) +;; :group 'SQL) + +;; 4) Add an entry to SQL->Product submenu. + +;; ["XyzDB" sql-highlight-xyz-keywords +;; :style radio +;; :selected (eq sql-product 'xyz)] + +;; 5) Add the font-lock specifications. At a minimum, default to +;; using ANSI keywords. See sql-mode-oracle-font-lock-keywords for +;; a more complex example. + +;; (defvar sql-mode-xyz-font-lock-keywords sql-mode-ansi-font-lock-keywords +;; "XyzDB SQL keywords used by font-lock.") + +;; 6) Add a product highlighting function. + +;; (defun sql-highlight-xyz-keywords () +;; "Highlight XyzDB keywords." +;; (interactive) +;; (sql-set-product 'xyz)) + +;; 7) Add an autoloaded SQLi function. + +;; ;;;###autoload +;; (defun sql-xyz () +;; "Run ixyz by XyzDB as an inferior process." +;; (interactive) +;; (sql-product-interactive 'xyz)) + +;; 8) Add a connect function which formats the command line arguments +;; and starts the product interpreter in a comint buffer. See the +;; existing connect functions for examples of the types of +;; processing available. + +;; (defun sql-connect-xyz () +;; "Create comint buffer and connect to XyzDB using the login +;; parameters and command options." +;; +;; ;; Do something with `sql-user', `sql-password', +;; ;; `sql-database', and `sql-server'. +;; (let ((params sql-xyz-options)) +;; (if (not (string= "" sql-server)) +;; (setq params (append (list "-S" sql-server) params))) +;; (if (not (string= "" sql-database)) +;; (setq params (append (list "-D" sql-database) params))) +;; (if (not (string= "" sql-password)) +;; (setq params (append (list "-P" sql-password) params))) +;; (if (not (string= "" sql-user)) +;; (setq params (append (list "-U" sql-user) params))) +;; (set-buffer (apply 'make-comint "SQL" sql-xyz-program +;; nil params)))) + +;; 9) Save and compile sql.el. + ;;; To Do: ;; Add better hilight support for other brands; there is a bias towards @@ -105,6 +198,7 @@ ;; Gregor Zych ;; nino ;; Berend de Boer +;; Michael Mauger @@ -112,7 +206,8 @@ (require 'comint) ;; Need the following to allow GNU Emacs 19 to compile the file. -(require 'regexp-opt) +(eval-when-compile + (require 'regexp-opt)) (require 'custom) ;;; Allow customization @@ -122,7 +217,7 @@ :version "20.4" :group 'processes) -;; These three variables will be used as defaults, if set. +;; These four variables will be used as defaults, if set. (defcustom sql-user "" "*Default username." @@ -147,6 +242,145 @@ Customizing your password will store it in your ~/.emacs file." :type 'string :group 'SQL) +;; SQL Product support +(defcustom sql-product 'ansi + "*Select the SQL database product used so that buffers can be +highlighted properly when you open them." + :type '(choice (const :tag "ANSI" ansi) + (const :tag "DB2" db2) + (const :tag "Informix" informix) + (const :tag "Ingres" ingres) + (const :tag "Interbase" interbase) + (const :tag "Linter" linter) + (const :tag "Microsoft" ms) + (const :tag "MySQL" mysql) + (const :tag "Oracle" oracle) + (const :tag "PostGres" postgres) + (const :tag "Solid" solid) + (const :tag "SQLite" sqlite) + (const :tag "Sybase" sybase)) + :group 'SQL) + +(defvar sql-interactive-product nil + "Product under `sql-interactive-mode'.") + +(defvar sql-product-support + '((ansi + :font-lock sql-mode-ansi-font-lock-keywords) + (db2 + :font-lock sql-mode-db2-font-lock-keywords + :sqli-login nil + :sqli-connect sql-connect-db2 + :sqli-prompt-regexp "^db2 => " + :sqli-prompt-length 7) + (informix + :font-lock sql-mode-informix-font-lock-keywords + :sqli-login (database) + :sqli-connect sql-connect-informix + :sqli-prompt-regexp "^SQL> " + :sqli-prompt-length 5) + (ingres + :font-lock sql-mode-ingres-font-lock-keywords + :sqli-login (database) + :sqli-connect sql-connect-ingres + :sqli-prompt-regexp "^\* " + :sqli-prompt-length 2) + (interbase + :font-lock sql-mode-interbase-font-lock-keywords + :sqli-login (user password database) + :sqli-connect sql-connect-interbase + :sqli-prompt-regexp "^SQL> " + :sqli-prompt-length 5) + (linter + :font-lock sql-mode-linter-font-lock-keywords + :sqli-login (user password database server) + :sqli-connect sql-connect-linter + :sqli-prompt-regexp "^SQL>" + :sqli-prompt-length 4) + (ms + :font-lock sql-mode-ms-font-lock-keywords + :sqli-login (user password server database) + :sqli-connect sql-connect-ms + :sqli-prompt-regexp "^[0-9]*>" + :sqli-prompt-length 5 + :syntax-alist ((?@ . "w"))) + (mysql + :font-lock sql-mode-mysql-font-lock-keywords + :sqli-login (user password database server) + :sqli-connect sql-connect-mysql + :sqli-prompt-regexp "^mysql> " + :sqli-prompt-length 6) + (oracle + :font-lock sql-mode-oracle-font-lock-keywords + :sqli-login (user password database) + :sqli-connect sql-connect-oracle + :sqli-prompt-regexp "^SQL> " + :sqli-prompt-length 5 + :syntax-alist ((?$ . "w") (?# . "w"))) + (postgres + :font-lock sql-mode-postgres-font-lock-keywords + :sqli-login (database server) + :sqli-connect sql-connect-postgres + :sqli-prompt-regexp "^.*> *" + :sqli-prompt-length 5) + (solid + :font-lock sql-mode-solid-font-lock-keywords + :sqli-login (user password server) + :sqli-connect sql-connect-solid + :sqli-prompt-regexp "^" + :sqli-prompt-length 0) + (sqlite + :font-lock sql-mode-sqlite-font-lock-keywords + :sqli-login (user password server database) + :sqli-connect sql-connect-sqlite + :sqli-prompt-regexp "^sqlite> " + :sqli-prompt-length 8) + (sybase + :font-lock sql-mode-sybase-font-lock-keywords + :sqli-login (server user password database) + :sqli-connect sql-connect-sybase + :sqli-prompt-regexp "^SQL> " + :sqli-prompt-length 5 + :syntax-alist ((?@ . "w"))) + ) + "This variable contains a list of product features for each of the +SQL products handled by `sql-mode'. Without an entry in this list a +product will not be properly highlighted and will not support +`sql-interactive-mode'. + +Each element in the list is in the following format: + + \(PRODUCT FEATURE VALUE ...) + +where PRODUCT is the appropriate value of `sql-product'. The product +name is then followed by FEATURE-VALUE pairs. If a FEATURE is not +specified, its VALUE is treated as nil. FEATURE must be one of the +following: + + :font-lock name of the variable containing the product + specific font lock highlighting patterns. + + :sqli-login a list of login parameters (i.e., user, + password, database and server) needed to + connect to the database. + + :sqli-connect the name of a function which accepts no + parameters that will use the values of + `sql-user', `sql-password', + `sql-database' and `sql-server' to open a + comint buffer and connect to the + database. Do product specific + configuration of comint in this function. + + :sqli-prompt-regexp a regular expression string that matches the + prompt issued by the product interpreter. + + :sqli-prompt-length the length of the prompt on the line. + + :syntax-alist an alist of syntax table entries to enable + special character treatment by font-lock and + imenu. ") + ;; misc customization of sql.el behaviour (defcustom sql-electric-stuff nil @@ -177,8 +411,15 @@ buffer is shown using `display-buffer'." ;; imenu support for sql-mode. (defvar sql-imenu-generic-expression - '(("Tables" "^\\s-*create\\s-+table\\s-+\\(\\w+\\)" 1) - ("Indexes" "^\\s-*create\\s-+index\\s-+\\(\\w+\\)" 1)) + ;; Items are in reverse order because they are rendered in reverse. + '(("Rules/Defaults" "^\\s-*create\\s-+\\(rule\\|default\\)\\s-+\\(\\w+\\)" 2) + ("Sequences" "^\\s-*create\\s-+sequence\\s-+\\(\\w+\\)" 1) + ("Triggers" "^\\s-*\\(create\\s-+\\(or\\s-+replace\\s-+\\)?\\)?trigger\\s-+\\(\\w+\\)" 3) + ("Functions" "^\\s-*\\(create\\s-+\\(or\\s-+replace\\s-+\\)?\\)?function\\s-+\\(\\w+\\)" 3) + ("Procedures" "^\\s-*\\(create\\s-+\\(or\\s-+replace\\s-+\\)?\\)?proc\\(edure\\)?\\s-+\\(\\w+\\)" 4) + ("Packages" "^\\s-*create\\s-+\\(or\\s-+replace\\s-+\\)?package\\s-+\\(body\\s-+\\)?\\(\\w+\\)" 3) + ("Indexes" "^\\s-*create\\s-+index\\s-+\\(\\w+\\)" 1) + ("Tables/Views" "^\\s-*create\\s-+\\(\\(global\\s-+\\)?\\(temporary\\s-+\\)?table\\|view\\)\\s-+\\(\\w+\\)" 4)) "Define interesting points in the SQL buffer for `imenu'. This is used to set `imenu-generic-expression' when SQL mode is @@ -274,7 +515,7 @@ The program can also specify a TCP connection. See `make-comint'." :group 'SQL) (defcustom sql-sqlite-options nil - "*List of additional options for `sql-mysql-program'. + "*List of additional options for `sql-sqlite-program'. The following list of options is reported to make things work on Windows: \"-C\" \"-t\" \"-f\" \"-n\"." :type '(repeat string) @@ -353,8 +594,8 @@ The program can also specify a TCP connection. See `make-comint'." ;; Customization for Microsoft -(defcustom sql-ms-program "isql" - "*Command to start isql by Microsoft. +(defcustom sql-ms-program "osql" + "*Command to start osql by Microsoft. Starts `sql-interactive-mode' after doing some setup. @@ -468,12 +709,12 @@ the local value of `sql-buffer' using \\[sql-set-sqli-buffer].") (defvar sql-prompt-regexp nil "Prompt used to initialize `comint-prompt-regexp'. -You can change `comint-prompt-regexp' on `sql-interactive-mode-hook'.") +You can change `sql-prompt-regexp' on `sql-interactive-mode-hook'.") (defvar sql-prompt-length 0 "Prompt used to set `left-margin' in `sql-interactive-mode'. -You can change it on `sql-interactive-mode-hook'.") +You can change `sql-prompt-length' on `sql-interactive-mode-hook'.") (defvar sql-alternate-buffer-name nil "Buffer-local string used to possibly rename the SQLi buffer. @@ -518,22 +759,60 @@ Based on `comint-mode-map'.") (get-buffer-process sql-buffer))] ["Send Region" sql-send-region (and (or (and (boundp 'mark-active); Emacs mark-active) - (mark)); XEmacs + (mark t)); XEmacs (buffer-live-p sql-buffer) (get-buffer-process sql-buffer))] ["Send Buffer" sql-send-buffer (and (buffer-live-p sql-buffer) (get-buffer-process sql-buffer))] + ["--" nil nil] + ["Start SQLi session" sql-product-interactive (sql-product-feature :sqli-connect)] ["Show SQLi buffer" sql-show-sqli-buffer t] ["Set SQLi buffer" sql-set-sqli-buffer t] ["Pop to SQLi buffer after send" sql-toggle-pop-to-buffer-after-send-region :style toggle :selected sql-pop-to-buffer-after-send-region] - ("Highlighting" - ["ANSI SQL keywords" sql-highlight-ansi-keywords t] - ["Oracle keywords" sql-highlight-oracle-keywords t] - ["Postgres keywords" sql-highlight-postgres-keywords t] - ["Linter keywords" sql-highlight-linter-keywords t] + ["--" nil nil] + ("Product" + ["ANSI" sql-highlight-ansi-keywords + :style radio + :selected (eq sql-product 'ansi)] + ["DB2" sql-highlight-db2-keywords + :style radio + :selected (eq sql-product 'db2)] + ["Informix" sql-highlight-informix-keywords + :style radio + :selected (eq sql-product 'informix)] + ["Ingres" sql-highlight-ingres-keywords + :style radio + :selected (eq sql-product 'ingres)] + ["Interbase" sql-highlight-interbase-keywords + :style radio + :selected (eq sql-product 'interbase)] + ["Linter" sql-highlight-linter-keywords + :style radio + :selected (eq sql-product 'linter)] + ["Microsoft" sql-highlight-ms-keywords + :style radio + :selected (eq sql-product 'ms)] + ["MySQL" sql-highlight-mysql-keywords + :style radio + :selected (eq sql-product 'mysql)] + ["Oracle" sql-highlight-oracle-keywords + :style radio + :selected (eq sql-product 'oracle)] + ["Postgres" sql-highlight-postgres-keywords + :style radio + :selected (eq sql-product 'postgres)] + ["Solid" sql-highlight-solid-keywords + :style radio + :selected (eq sql-product 'solid)] + ["SQLite" sql-highlight-sqlite-keywords + :style radio + :selected (eq sql-product 'sqlite)] + ["Sybase" sql-highlight-sybase-keywords + :style radio + :selected (eq sql-product 'sybase)] ))) ;; easy menu for sql-interactive-mode. @@ -551,12 +830,22 @@ Based on `comint-mode-map'.") "Abbrev table used in `sql-mode' and `sql-interactive-mode'.") (if sql-mode-abbrev-table () - (let ((wrapper)) - (define-abbrev-table 'sql-mode-abbrev-table ()) - (define-abbrev sql-mode-abbrev-table "ins" "insert") - (define-abbrev sql-mode-abbrev-table "upd" "update") - (define-abbrev sql-mode-abbrev-table "del" "delete") - (define-abbrev sql-mode-abbrev-table "sel" "select"))) + (let ((nargs (cdr (subr-arity (symbol-function 'define-abbrev)))) + d-a) + ;; In Emacs 21.3+, provide SYSTEM-FLAG to define-abbrev. + (setq d-a + (if (>= nargs 6) + '(lambda (name expansion) (define-abbrev sql-mode-abbrev-table name expansion nil 0 t)) + '(lambda (name expansion) (define-abbrev sql-mode-abbrev-table name expansion)))) + + (define-abbrev-table 'sql-mode-abbrev-table nil) + (funcall d-a "ins" "insert") + (funcall d-a "upd" "update") + (funcall d-a "del" "delete") + (funcall d-a "sel" "select") + (funcall d-a "proc" "procedure") + (funcall d-a "func" "function") + (funcall d-a "cr" "create"))) ;; Syntax Table @@ -581,146 +870,253 @@ Based on `comint-mode-map'.") ;; Font lock support -(defvar sql-mode-ansi-font-lock-keywords nil - "ANSI SQL keywords used by font-lock. +(defvar sql-mode-font-lock-object-name + (list (concat "^\\s-*\\(create\\(\\s-+or\\s-+replace\\)?\\|drop\\|alter\\)?\\s-+" + "\\(\\(global\\s-+\\)?\\(temporary\\s-+\\)?table\\|view\\|package\\(\\s-+body\\)?\\|" + "proc\\(edure\\)?\\|function\\|trigger\\|sequence\\|rule\\|default\\)\\s-+\\(\\w+\\)") + 8 'font-lock-function-name-face) -This variable is used by `sql-mode' and `sql-interactive-mode'. The -regular expressions are created during compilation by calling the -function `regexp-opt'. Therefore, take a look at the source before -you define your own sql-mode-ansi-font-lock-keywords. You may want to -add functions and PL/SQL keywords.") -(if sql-mode-ansi-font-lock-keywords - () + "Pattern to match the names of top-level objects in a CREATE, +DROP or ALTER statement. + +The format of variable should be a valid `font-lock-keywords' +entry.") + +(defvar sql-mode-ansi-font-lock-keywords (let ((ansi-keywords (eval-when-compile (concat "\\b" (regexp-opt '( + "authorization" "avg" "begin" "close" "cobol" "commit" "continue" "count" "declare" "double" "end" "escape" "exec" "fetch" "foreign" "fortran" "found" "go" "goto" "indicator" "key" "language" "max" "min" "module" "numeric" "open" "pascal" "pli" "precision" "primary" "procedure" "references" "rollback" -"schema" "section" "some" "sqlcode" "sqlerror" "sum" "work") t) "\\b"))) +"schema" "section" "some" "sqlcode" "sqlerror" "sum" "work" + +) t) "\\b"))) (ansi-reserved-words (eval-when-compile (concat "\\b" (regexp-opt '( + "all" "and" "any" "as" "asc" "between" "by" "check" "create" "current" "default" "delete" "desc" "distinct" "exists" "float" "for" "from" "grant" "group" "having" "in" "insert" "into" "is" "like" "not" "null" "of" "on" "option" "or" "order" "privileges" "public" "select" "set" "table" "to" "union" "unique" -"update" "user" "values" "view" "where" "with") t) "\\b"))) +"update" "user" "values" "view" "where" "with" + +) t) "\\b"))) (ansi-types (eval-when-compile (concat "\\b" (regexp-opt '( + ;; ANSI Keywords that look like types "character" "cursor" "dec" "int" "real" ;; ANSI Reserved Word that look like types -"char" "integer" "smallint" ) t) "\\b")))) - (setq sql-mode-ansi-font-lock-keywords - (list (cons ansi-keywords 'font-lock-function-name-face) +"char" "integer" "smallint" + +) t) "\\b")))) + (list (cons ansi-keywords 'font-lock-keyword-face) (cons ansi-reserved-words 'font-lock-keyword-face) - (cons ansi-types 'font-lock-type-face))))) + (cons ansi-types 'font-lock-type-face))) -(defvar sql-mode-oracle-font-lock-keywords nil - "Oracle SQL keywords used by font-lock. + "ANSI SQL keywords used by font-lock. This variable is used by `sql-mode' and `sql-interactive-mode'. The regular expressions are created during compilation by calling the function `regexp-opt'. Therefore, take a look at the source before -you define your own sql-mode-oracle-font-lock-keywords. You may want -to add functions and PL/SQL keywords.") -(if sql-mode-oracle-font-lock-keywords - () +you define your own sql-mode-ansi-font-lock-keywords. You may want to +add functions and PL/SQL keywords.") + +(defvar sql-mode-oracle-font-lock-keywords (let ((oracle-keywords (eval-when-compile (concat "\\b" (regexp-opt '( -"admin" "after" "allocate" "analyze" "archive" "archivelog" "backup" -"become" "before" "block" "body" "cache" "cancel" "cascade" "change" -"checkpoint" "compile" "constraint" "constraints" "contents" -"controlfile" "cycle" "database" "datafile" "dba" "disable" "dismount" -"dump" "each" "else" "elsif" "enable" "events" "except" "exceptions" -"execute" "exit" "explain" "extent" "externally" "false" "flush" "force" -"freelist" "freelists" "function" "groups" "if" "including" "initrans" -"instance" "layer" "link" "lists" "logfile" "loop" "manage" "manual" -"maxdatafiles" "maxinistances" "maxlogfiles" "maxloghistory" -"maxlogmembers" "maxtrans" "maxvalue" "minextents" "minvalue" "mount" -"new" "next" "noarchivelog" "nocache" "nocycle" "nomaxvalue" -"nominvalue" "none" "noorder" "noresetlogs" "normal" "nosort" "off" -"old" "only" "optimal" "others" "out" "own" "package" "parallel" -"pctincrease" "pctused" "plan" "pragma" "private" "profile" "quota" -"raise" "read" "recover" "referencing" "resetlogs" "restrict_references" -"restricted" "return" "returning" "reuse" "rnds" "rnps" "role" "roles" -"savepoint" "scn" "segment" "sequence" "shared" "snapshot" "sort" -"statement_id" "statistics" "stop" "storage" "subtype" "switch" "system" -"tables" "tablespace" "temporary" "thread" "time" "tracing" -"transaction" "triggers" "true" "truncate" "type" "under" "unlimited" -"until" "use" "using" "when" "while" "wnds" "wnps" "write") t) "\\b"))) +;; Oracle (+ANSI) SQL keywords + +; ANSI keywords +"authorization" "avg" "begin" "close" "cobol" "commit" +"continue" "count" "declare" "double" "end" "escape" +"exec" "fetch" "foreign" "fortran" "found" "go" "goto" "indicator" +"key" "language" "max" "min" "module" "numeric" "open" "pascal" "pli" +"precision" "primary" "procedure" "references" "rollback" +"schema" "section" "some" "sqlcode" "sqlerror" "sum" "work" + +; ANSI reserved words +"all" "and" "any" "as" "asc" "between" "by" "check" "create" +"current" "default" "delete" "desc" "distinct" "exists" "float" "for" +"from" "grant" "group" "having" "in" "insert" "into" "is" +"like" "not" "null" "of" "on" "option" "or" "order" "privileges" +"public" "select" "set" "table" "to" "union" "unique" +"update" "user" "values" "view" "where" "with" + +"access" "add" "admin" "after" "allocate" "alter" "analyze" "archive" +"archivelog" "audit" "authid" "backup" "become" "before" "block" +"body" "cache" "cancel" "cascade" "change" "checkpoint" "cluster" +"comment" "compile" "compress" "compute" "connect" "constraint" +"constraints" "contents" "controlfile" "cross" "currval" "cycle" +"database" "datafile" "dba" "deterministic" "disable" "dismount" +"drop" "dump" "each" "else" "else" "elsif" "enable" "events" "except" +"exceptions" "exclusive" "execute" "exit" "explain" "extent" +"externally" "false" "file" "flush" "force" "freelist" "freelists" +"full" "function" "global" "grant" "groups" "identified" "if" +"immediate" "including" "increment" "index" "initial" "initrans" +"inner" "instance" "intersect" "join" "layer" "left" "level" "link" +"lists" "lock" "logfile" "long" "loop" "manage" "manual" +"maxdatafiles" "maxextents" "maxinistances" "maxlogfiles" +"maxloghistory" "maxlogmembers" "maxtrans" "maxvalue" "merge" +"minextents" "minus" "minvalue" "mode" "modify" "mount" "natural" +"new" "next" "nextval" "noarchivelog" "noaudit" "nocache" "nocompress" +"nocycle" "nomaxvalue" "nominvalue" "none" "noorder" "noresetlogs" +"normal" "nosort" "nowait" "off" "offline" "old" "online" "only" +"optimal" "others" "out" "outer" "over" "own" "package" "parallel" +"parallel_enable" "pctfree" "pctincrease" "pctused" "plan" "pragma" +"preserve" "prior" "private" "profile" "quota" "raise" "raw" "read" +"recover" "referencing" "rename" "replace" "resetlogs" "resource" +"restrict_references" "restricted" "return" "returning" "reuse" +"revoke" "right" "rnds" "rnps" "role" "roles" "row" "rowlabel" +"rownum" "rows" "savepoint" "scn" "segment" "sequence" "session" +"share" "shared" "size" "snapshot" "sort" "statement_id" "statistics" +"stop" "storage" "subtype" "successful" "switch" "synonym" "sysdate" +"system" "tables" "tablespace" "temporary" "then" "thread" "tracing" +"transaction" "trigger" "triggers" "true" "truncate" "type" "uid" +"under" "unlimited" "until" "use" "using" "validate" "when" "while" +"wnds" "wnps" "write" + +) t) "\\b"))) (oracle-warning-words (eval-when-compile (concat "\\b" (regexp-opt '( -"cursor_already_open" "dup_val_on_index" "exception" "invalid_cursor" +;; PLSQL defined exceptions + +"access_into_null" "case_not_found" "collection_is_null" +"cursor_already_open" "dup_val_on_index" "invalid_cursor" "invalid_number" "login_denied" "no_data_found" "not_logged_on" -"notfound" "others" "pragma" "program_error" "storage_error" -"timeout_on_resource" "too_many_rows" "transaction_backed_out" -"value_error" "zero_divide") t) "\\b"))) - (oracle-reserved-words (eval-when-compile - (concat "\\b" +"program_error" "rowtype_mismatch" "self_is_null" "storage_error" +"subscript_beyond_count" "subscript_outside_limit" "sys_invalid_rowid" +"timeout_on_resource" "too_many_rows" "value_error" "zero_divide" +"exception" "notfound" + +) t) "\\b"))) + + (oracle-sqlplus-commands + (eval-when-compile + (concat "^\\(\\(" (regexp-opt '( -"access" "add" "alter" "audit" "cluster" "column" "comment" "compress" -"connect" "drop" "else" "exclusive" "file" "grant" -"identified" "immediate" "increment" "index" "initial" "intersect" -"level" "lock" "long" "maxextents" "minus" "mode" "modify" "noaudit" -"nocompress" "nowait" "number" "offline" "online" "pctfree" "prior" -"raw" "rename" "resource" "revoke" "row" "rowlabel" "rownum" -"rows" "session" "share" "size" "start" "successful" "synonym" "sysdate" -"then" "trigger" "uid" "validate" "whenever") t) "\\b"))) - (oracle-types (eval-when-compile +;; SQL*Plus commands + +"@" "@@" "accept" "append" "archive" "attribute" "break" +"btitle" "change" "clear" "column" "connect" "copy" "define" +"del" "describe" "disconnect" "edit" "execute" "exit" "get" "help" +"host" "input" "list" "password" "pause" "print" "prompt" "recover" +"remark" "repfooter" "repheader" "run" "save" "show" "shutdown" +"spool" "start" "startup" "store" "timing" "ttitle" "undefine" +"variable" "whenever" + +) t) + + "\\)\\|" + "\\(compute\\s-+\\(avg\\|cou\\|min\\|max\\|num\\|sum\\|std\\|var\\)\\)\\|" + "\\(set\\s-+\\(appi\\(nfo\\)?\\|array\\(size\\)?\\|" + "auto\\(commit\\)?\\|autop\\(rint\\)?\\|autorecovery\\|" + "autot\\(race\\)?\\|blo\\(ckterminator\\)?\\|cmds\\(ep\\)?\\|" + "colsep\\|com\\(patibility\\)?\\|con\\(cat\\)?\\|" + "copyc\\(ommit\\)?\\|copytypecheck\\|def\\(ine\\)?\\|" + "describe\\|echo\\|editf\\(ile\\)?\\|emb\\(edded\\)?\\|" + "esc\\(ape\\)?\\|feed\\(back\\)?\\|flagger\\|" + "flu\\(sh\\)?\\|hea\\(ding\\)?\\|heads\\(ep\\)?\\|" + "instance\\|lin\\(esize\\)?\\|lobof\\(fset\\)?\\|" + "logsource\\|long\\|longc\\(hunksize\\)?\\|mark\\(up\\)?\\|" + "newp\\(age\\)?\\|null\\|numf\\(ormat\\)?\\|" + "num\\(width\\)?\\|pages\\(ize\\)?\\|pau\\(se\\)?\\|" + "recsep\\|recsepchar\\|serverout\\(put\\)?\\|" + "shift\\(inout\\)?\\|show\\(mode\\)?\\|" + "sqlbl\\(anklines\\)?\\|sqlc\\(ase\\)?\\|" + "sqlco\\(ntinue\\)?\\|sqln\\(umber\\)?\\|" + "sqlpluscompat\\(ibility\\)?\\|sqlpre\\(fix\\)?\\|" + "sqlp\\(rompt\\)?\\|sqlt\\(erminator\\)?\\|" + "suf\\(fix\\)?\\|tab\\|term\\(out\\)?\\|ti\\(me\\)?\\|" + "timi\\(ng\\)?\\|trim\\(out\\)?\\|trims\\(pool\\)?\\|" + "und\\(erline\\)?\\|ver\\(ify\\)?\\|wra\\(p\\)?\\)\\)\\)" + "\\b.*$" + ))) + + (oracle-types + (eval-when-compile (concat "\\b" (regexp-opt '( ;; Oracle Keywords that look like types ;; Oracle Reserved Words that look like types -"binary_integer" "blob" "boolean" "constant" "date" "decimal" "rowid" -"varchar" "varchar2") t) "\\b"))) + +"bfile" "binary_integer" "blob" "boolean" "byte" "char" "character" +"clob" "date" "day" "dec" "decimal" "double" "float" "int" "integer" +"interval" "local" "long" "month" "natural" "naturaln" "nchar" "nclob" +"number" "numeric" "nvarchar2" "pls_integer" "positive" "positiven" +"precision" "raw" "real" "rowid" "second" "signtype" "smallint" +"string" "time" "timestamp" "urowid" "varchar" "varchar2" "year" +"zone" + +) t) "\\b"))) (oracle-builtin-functions (eval-when-compile (concat "\\b" (regexp-opt '( ;; Misc Oracle builtin functions -"abs" "add_months" "ascii" "avg" "ceil" "chartorowid" "chr" "concat" -"convert" "cos" "cosh" "count" "currval" "decode" "dump" "exp" "floor" -"glb" "greatest" "greatest_lb" "hextoraw" "initcap" "instr" "instrb" -"last_day" "least" "least_ub" "length" "lengthb" "ln" "log" "lower" -"lpad" "ltrim" "lub" "max" "min" "mod" "months_between" "new_time" -"next_day" "nextval" "nls_initcap" "nls_lower" "nls_upper" "nlssort" -"nvl" "power" "rawtohex" "replace" "round" "rowidtochar" "rpad" -"rtrim" "sign" "sin" "sinh" "soundex" "sqlcode" "sqlerrm" "sqrt" -"stddev" "sum" "substr" "substrb" "tan" "tanh" "to_char" -"to_date" "to_label" "to_multi_byte" "to_number" "to_single_byte" -"translate" "trim" "trunc" "uid" "upper" "userenv" "variance" "vsize") t) "\\b")))) - (setq sql-mode-oracle-font-lock-keywords - (append sql-mode-ansi-font-lock-keywords - (list (cons oracle-keywords 'font-lock-function-name-face) + +"abs" "acos" "add_months" "ascii" "asciistr" "asin" "atan" "atan2" +"avg" "bfilename" "bin_to_num" "bitand" "case" "cast" "ceil" +"chartorowid" "chr" "coalesce" "compose" "concat" "convert" "corr" +"cos" "cosh" "count" "covar_pop" "covar_samp" "cume_dist" +"current_date" "current_timestamp" "current_user" "dbtimezone" +"decode" "decompose" "dense_rank" "depth" "deref" "dump" "empty_blob" +"empty_clob" "existsnode" "exp" "extract" "extractvalue" "first" +"first_value" "floor" "from_tz" "greatest" "group_id" "grouping" +"grouping_id" "hextoraw" "initcap" "instr" "lag" "last" "last_day" +"last_value" "lead" "least" "length" "ln" "localtimestamp" "log" +"lower" "lpad" "ltrim" "make_ref" "max" "min" "mod" "months_between" +"nchr" "new_time" "next_day" "nls_charset_decl_len" "nls_charset_id" +"nls_charset_name" "nls_initcap" "nls_lower" "nlssort" "nls_upper" +"ntile" "nullif" "numtodsinterval" "numtoyminterval" "nvl" "nvl2" +"path" "percent_rank" "percentile_cont" "percentile_disc" "power" +"rank" "ratio_to_report" "rawtohex" "rawtonhex" "ref" "reftohex" +"regr_slope" "regr_intercept" "regr_count" "regr_r2" "regr_avgx" +"regr_avgy" "regr_sxx" "regr_syy" "regr_sxy" "round" +"row_number" "rowidtochar" "rowidtonchar" "rpad" "rtrim" +"sessiontimezone" "sign" "sin" "sinh" "soundex" "sqrt" "stddev" +"stddev_pop" "stddev_samp" "substr" "sum" "sys_connect_by_path" +"sys_context" "sys_dburigen" "sys_extract_utc" "sys_guid" "sys_typeid" +"sys_xmlagg" "sys_xmlgen" "sysdate" "systimestamp" "tan" "tanh" +"to_char" "to_clob" "to_date" "to_dsinterval" "to_lob" "to_multi_byte" +"to_nchar" "to_nclob" "to_number" "to_single_byte" "to_timestamp" +"to_timestamp_tz" "to_yminterval" "translate" "treat" "trim" "trunc" +"tz_offset" "uid" "unistr" "updatexml" "upper" "user" "userenv" +"value" "var_pop" "var_samp" "variance" "vsize" "width_bucket" +"xmlagg" "xmlcolattval" "xmlconcat" "xmlelement" "xmlforest" +"xmlsequence" "xmltransform" + +) t) "\\b")))) + (list (cons oracle-sqlplus-commands 'font-lock-doc-face) + (cons oracle-keywords 'font-lock-keyword-face) (cons oracle-warning-words 'font-lock-warning-face) - (cons oracle-reserved-words 'font-lock-keyword-face) ;; XEmacs doesn't have font-lock-builtin-face (if (string-match "XEmacs\\|Lucid" emacs-version) (cons oracle-builtin-functions 'font-lock-preprocessor-face) ;; GNU Emacs 19 doesn't have it either (if (string-match "GNU Emacs 19" emacs-version) - (cons oracle-builtin-functions 'font-lock-function-name-face) + (cons oracle-builtin-functions 'font-lock-keyword-face) ;; Emacs (cons oracle-builtin-functions 'font-lock-builtin-face))) - (cons oracle-types 'font-lock-type-face)))))) + (cons oracle-types 'font-lock-type-face))) -(defvar sql-mode-postgres-font-lock-keywords nil - "Postgres SQL keywords used by font-lock. + "Oracle SQL keywords used by font-lock. This variable is used by `sql-mode' and `sql-interactive-mode'. The regular expressions are created during compilation by calling the function `regexp-opt'. Therefore, take a look at the source before -you define your own sql-mode-postgres-font-lock-keywords.") +you define your own sql-mode-oracle-font-lock-keywords. You may want +to add functions and PL/SQL keywords.") -(if sql-mode-postgres-font-lock-keywords - () +(defvar sql-mode-postgres-font-lock-keywords (let ((postgres-reserved-words (eval-when-compile (concat "\\b" (regexp-opt '( @@ -729,14 +1125,17 @@ you define your own sql-mode-postgres-font-lock-keywords.") (postgres-types (eval-when-compile (concat "\\b" (regexp-opt '( + "bool" "box" "circle" "char" "char2" "char4" "char8" "char16" "date" "float4" "float8" "int2" "int4" "int8" "line" "lseg" "money" "path" "point" "polygon" "serial" "text" "time" "timespan" "timestamp" "varchar" + ) t)"\\b"))) (postgres-builtin-functions (eval-when-compile (concat "\\b" (regexp-opt '( ;; Misc Postgres builtin functions + "abstime" "age" "area" "box" "center" "date_part" "date_trunc" "datetime" "dexp" "diameter" "dpow" "float" "float4" "height" "initcap" "integer" "isclosed" "isfinite" "isoldpath" "isopen" @@ -744,8 +1143,8 @@ you define your own sql-mode-postgres-font-lock-keywords.") "position" "radius" "reltime" "revertpoly" "rpad" "rtrim" "substr" "substring" "text" "timespan" "translate" "trim" "upgradepath" "upgradepoly" "upper" "varchar" "width" + ) t) "\\b")))) - (setq sql-mode-postgres-font-lock-keywords (append sql-mode-ansi-font-lock-keywords (list (cons postgres-reserved-words 'font-lock-keyword-face) ;; XEmacs doesn't have 'font-lock-builtin-face @@ -753,21 +1152,20 @@ you define your own sql-mode-postgres-font-lock-keywords.") (cons postgres-builtin-functions 'font-lock-preprocessor-face) ;; Emacs (cons postgres-builtin-functions 'font-lock-builtin-face)) - (cons postgres-types 'font-lock-type-face)))))) + (cons postgres-types 'font-lock-type-face)))) - -(defvar sql-mode-linter-font-lock-keywords nil - "Linter SQL keywords used by font-lock. + "Postgres SQL keywords used by font-lock. This variable is used by `sql-mode' and `sql-interactive-mode'. The regular expressions are created during compilation by calling the -function `regexp-opt'.") +function `regexp-opt'. Therefore, take a look at the source before +you define your own sql-mode-postgres-font-lock-keywords.") -(if sql-mode-linter-font-lock-keywords - () +(defvar sql-mode-linter-font-lock-keywords (let ((linter-keywords (eval-when-compile (concat "\\b" (regexp-opt '( + "autocommit" "autoinc" "autorowid" "cancel" "cascade" "channel" "committed" "count" "countblob" "cross" "current" "data" "database" "datafile" "datafiles" "datesplit" "dba" "dbname" "default" "deferred" @@ -792,10 +1190,12 @@ function `regexp-opt'.") "trigger_info_size" "true" "trunc" "uncommitted" "unicode" "unknown" "unlimited" "unlisted" "user" "utf8" "value" "varying" "volumes" "wait" "windows_code" "workspace" "write" "xml" + ) t) "\\b"))) (linter-reserved-words (eval-when-compile (concat "\\b" (regexp-opt '( + "access" "action" "add" "address" "after" "all" "alter" "always" "and" "any" "append" "as" "asc" "ascic" "async" "at_begin" "at_end" "audit" "aud_obj_name_len" "backup" "base" "before" "between" "blobfile" @@ -813,18 +1213,22 @@ function `regexp-opt'.") "start" "stop" "sync" "synchronize" "synonym" "sysdate" "table" "then" "to" "union" "unique" "unlock" "until" "update" "using" "values" "view" "when" "where" "with" "without" + ) t) "\\b"))) (linter-types (eval-when-compile (concat "\\b" (regexp-opt '( + "bigint" "bitmap" "blob" "boolean" "char" "character" "date" "datetime" "dec" "decimal" "double" "float" "int" "integer" "nchar" "number" "numeric" "real" "smallint" "varbyte" "varchar" "byte" "cursor" "long" + ) t) "\\b"))) (linter-builtin-functions (eval-when-compile (concat "\\b" (regexp-opt '( + "abs" "acos" "asin" "atan" "atan2" "avg" "ceil" "cos" "cosh" "divtime" "exp" "floor" "getbits" "getblob" "getbyte" "getlong" "getraw" "getstr" "gettext" "getword" "hextoraw" "lenblob" "length" "log" @@ -835,59 +1239,367 @@ function `regexp-opt'.") "to_gmtime" "to_localtime" "to_number" "trim" "upper" "decode" "substr" "substring" "chr" "dayname" "days" "greatest" "hex" "initcap" "instr" "least" "multime" "replace" "width" + ) t) "\\b")))) - (setq sql-mode-linter-font-lock-keywords (append sql-mode-ansi-font-lock-keywords - (list (cons linter-keywords 'font-lock-function-name-face) + (list (cons linter-keywords 'font-lock-keywords-face) (cons linter-reserved-words 'font-lock-keyword-face) ;; XEmacs doesn't have font-lock-builtin-face (if (string-match "XEmacs\\|Lucid" emacs-version) (cons linter-builtin-functions 'font-lock-preprocessor-face) ;; GNU Emacs 19 doesn't have it either (if (string-match "GNU Emacs 19" emacs-version) - (cons linter-builtin-functions 'font-lock-function-name-face) + (cons linter-builtin-functions 'font-lock-keywords-face) ;; Emacs (cons linter-builtin-functions 'font-lock-builtin-face))) - (cons linter-types 'font-lock-type-face)))))) + (cons linter-types 'font-lock-type-face)))) + + "Linter SQL keywords used by font-lock. -(defvar sql-mode-font-lock-keywords sql-mode-ansi-font-lock-keywords +This variable is used by `sql-mode' and `sql-interactive-mode'. The +regular expressions are created during compilation by calling the +function `regexp-opt'.") + +(defvar sql-mode-ms-font-lock-keywords + (let ((ms-reserved-words (eval-when-compile + (concat "\\b" + (regexp-opt '( + +"absolute" "add" "all" "alter" "and" "any" "as" "asc" "authorization" +"avg" "backup" "begin" "between" "break" "browse" "bulk" "by" +"cascade" "case" "check" "checkpoint" "close" "clustered" "coalesce" +"column" "commit" "committed" "compute" "confirm" "constraint" +"contains" "containstable" "continue" "controlrow" "convert" "count" +"create" "cross" "current" "current_date" "current_time" +"current_timestamp" "current_user" "database" "deallocate" +"declare" "default" "delete" "deny" "desc" "disk" "distinct" +"distributed" "double" "drop" "dummy" "dump" "else" "end" "errlvl" +"errorexit" "escape" "except" "exec" "execute" "exists" "exit" "fetch" +"file" "fillfactor" "first" "floppy" "for" "foreign" "freetext" +"freetexttable" "from" "full" "goto" "grant" "group" "having" +"holdlock" "identity" "identity_insert" "identitycol" "if" "in" +"index" "inner" "insert" "intersect" "into" "is" "isolation" "join" +"key" "kill" "last" "left" "level" "like" "lineno" "load" "max" "min" +"mirrorexit" "national" "next" "nocheck" "nolock" "nonclustered" "not" +"null" "nullif" "of" "off" "offsets" "on" "once" "only" "open" +"opendatasource" "openquery" "openrowset" "option" "or" "order" +"outer" "output" "over" "paglock" "percent" "perm" "permanent" "pipe" +"plan" "precision" "prepare" "primary" "print" "prior" "privileges" +"proc" "procedure" "processexit" "public" "raiserror" "read" +"readcommitted" "readpast" "readtext" "readuncommitted" "reconfigure" +"references" "relative" "repeatable" "repeatableread" "replication" +"restore" "restrict" "return" "revoke" "right" "rollback" "rowcount" +"rowguidcol" "rowlock" "rule" "save" "schema" "select" "serializable" +"session_user" "set" "shutdown" "some" "statistics" "sum" +"system_user" "table" "tablock" "tablockx" "tape" "temp" "temporary" +"textsize" "then" "to" "top" "tran" "transaction" "trigger" "truncate" +"tsequal" "uncommitted" "union" "unique" "update" "updatetext" +"updlock" "use" "user" "values" "view" "waitfor" "when" "where" +"while" "with" "work" "writetext" +"collate" "function" "openxml" "returns" + +) t) "\\b"))) + (ms-types (eval-when-compile + (concat "\\b" + (regexp-opt '( + +"binary" "bit" "char" "character" "cursor" "datetime" "dec" "decimal" +"double" "float" "image" "int" "integer" "money" "national" "nchar" +"ntext" "numeric" "numeric" "nvarchar" "precision" "real" +"smalldatetime" "smallint" "smallmoney" "text" "timestamp" "tinyint" +"uniqueidentifier" "varbinary" "varchar" "varying" + +) t) "\\b"))) + + (ms-vars "\\b@[a-zA-Z0-9_]*\\b") + + (ms-builtin-functions (eval-when-compile + (concat "\\b" + (regexp-opt '( +;; Misc MS builtin functions + +"@@connections" "@@cpu_busy" "@@cursor_rows" "@@datefirst" "@@dbts" +"@@error" "@@fetch_status" "@@identity" "@@idle" "@@io_busy" +"@@langid" "@@language" "@@lock_timeout" "@@max_connections" +"@@max_precision" "@@nestlevel" "@@options" "@@pack_received" +"@@pack_sent" "@@packet_errors" "@@procid" "@@remserver" "@@rowcount" +"@@servername" "@@servicename" "@@spid" "@@textsize" "@@timeticks" +"@@total_errors" "@@total_read" "@@total_write" "@@trancount" +"@@version" "abs" "acos" "and" "app_name" "ascii" "asin" "atan" "atn2" +"avg" "case" "cast" "ceiling" "char" "charindex" "coalesce" +"col_length" "col_name" "columnproperty" "containstable" "convert" +"cos" "cot" "count" "current_timestamp" "current_user" "cursor_status" +"databaseproperty" "datalength" "dateadd" "datediff" "datename" +"datepart" "day" "db_id" "db_name" "degrees" "difference" "exp" +"file_id" "file_name" "filegroup_id" "filegroup_name" +"filegroupproperty" "fileproperty" "floor" "formatmessage" +"freetexttable" "fulltextcatalogproperty" "fulltextserviceproperty" +"getansinull" "getdate" "grouping" "host_id" "host_name" "ident_incr" +"ident_seed" "identity" "index_col" "indexproperty" "is_member" +"is_srvrolemember" "isdate" "isnull" "isnumeric" "left" "len" "log" +"log10" "lower" "ltrim" "max" "min" "month" "nchar" "newid" "nullif" +"object_id" "object_name" "objectproperty" "openquery" "openrowset" +"parsename" "patindex" "patindex" "permissions" "pi" "power" +"quotename" "radians" "rand" "replace" "replicate" "reverse" "right" +"round" "rtrim" "session_user" "sign" "sin" "soundex" "space" "sqrt" +"square" "stats_date" "stdev" "stdevp" "str" "stuff" "substring" "sum" +"suser_id" "suser_name" "suser_sid" "suser_sname" "system_user" "tan" +"textptr" "textvalid" "typeproperty" "unicode" "upper" "user" +"user_id" "user_name" "var" "varp" "year" + +) t) "\\b"))) + + (ms-config-commands + (eval-when-compile + (concat "^\\(\\(set\\s-+\\(" + (regexp-opt '( + +"datefirst" "dateformat" "deadlock_priority" "lock_timeout" +"concat_null_yields_null" "cursor_close_on_commit" +"disable_def_cnst_chk" "fips_flagger" "identity_insert" "language" +"offsets" "quoted_identifier" "arithabort" "arithignore" "fmtonly" +"nocount" "noexec" "numeric_roundabort" "parseonly" +"query_governor_cost_limit" "rowcount" "textsize" "ansi_defaults" +"ansi_null_dflt_off" "ansi_null_dflt_on" "ansi_nulls" "ansi_padding" +"ansi_warnings" "forceplan" "showplan_all" "showplan_text" +"statistics" "implicit_transactions" "remote_proc_transactions" +"transaction" "xact_abort" + +) t) + "\\)\\)\\|go\\s-*\\|use\\s-+\\|setuser\\s-+\\|dbcc\\s-+\\).*$")))) + + (list (cons ms-config-commands 'font-lock-doc-face) + (cons ms-reserved-words 'font-lock-keyword-face) + ;; XEmacs doesn't have 'font-lock-builtin-face + (if (string-match "XEmacs\\|Lucid" emacs-version) + (cons ms-builtin-functions 'font-lock-preprocessor-face) + ;; Emacs + (cons ms-builtin-functions 'font-lock-builtin-face)) + (cons ms-vars 'font-lock-variable-name-face) + (cons ms-types 'font-lock-type-face))) + + "Microsoft SQLServer SQL keywords used by font-lock. + +This variable is used by `sql-mode' and `sql-interactive-mode'. The +regular expressions are created during compilation by calling the +function `regexp-opt'. Therefore, take a look at the source before +you define your own sql-mode-ms-font-lock-keywords.") + +(defvar sql-mode-sybase-font-lock-keywords sql-mode-ansi-font-lock-keywords + "Sybase SQL keywords used by font-lock. + +This variable is used by `sql-mode' and `sql-interactive-mode'. The +regular expressions are created during compilation by calling the +function `regexp-opt'. Therefore, take a look at the source before +you define your own sql-mode-sybase-font-lock-keywords.") + +(defvar sql-mode-informix-font-lock-keywords sql-mode-ansi-font-lock-keywords + "Informix SQL keywords used by font-lock. + +This variable is used by `sql-mode' and `sql-interactive-mode'. The +regular expressions are created during compilation by calling the +function `regexp-opt'. Therefore, take a look at the source before +you define your own sql-mode-informix-font-lock-keywords.") + +(defvar sql-mode-interbase-font-lock-keywords sql-mode-ansi-font-lock-keywords + "Interbase SQL keywords used by font-lock. + +This variable is used by `sql-mode' and `sql-interactive-mode'. The +regular expressions are created during compilation by calling the +function `regexp-opt'. Therefore, take a look at the source before +you define your own sql-mode-interbase-font-lock-keywords.") + +(defvar sql-mode-ingres-font-lock-keywords sql-mode-ansi-font-lock-keywords + "Ingres SQL keywords used by font-lock. + +This variable is used by `sql-mode' and `sql-interactive-mode'. The +regular expressions are created during compilation by calling the +function `regexp-opt'. Therefore, take a look at the source before +you define your own sql-mode-interbase-font-lock-keywords.") + +(defvar sql-mode-solid-font-lock-keywords sql-mode-ansi-font-lock-keywords + "Solid SQL keywords used by font-lock. + +This variable is used by `sql-mode' and `sql-interactive-mode'. The +regular expressions are created during compilation by calling the +function `regexp-opt'. Therefore, take a look at the source before +you define your own sql-mode-solid-font-lock-keywords.") + +(defvar sql-mode-mysql-font-lock-keywords sql-mode-ansi-font-lock-keywords + "MySQL SQL keywords used by font-lock. + +This variable is used by `sql-mode' and `sql-interactive-mode'. The +regular expressions are created during compilation by calling the +function `regexp-opt'. Therefore, take a look at the source before +you define your own sql-mode-mysql-font-lock-keywords.") + +(defvar sql-mode-sqlite-font-lock-keywords sql-mode-ansi-font-lock-keywords + "SQLite SQL keywords used by font-lock. + +This variable is used by `sql-mode' and `sql-interactive-mode'. The +regular expressions are created during compilation by calling the +function `regexp-opt'. Therefore, take a look at the source before +you define your own sql-mode-sqlite-font-lock-keywords.") + +(defvar sql-mode-db2-font-lock-keywords sql-mode-ansi-font-lock-keywords + "DB2 SQL keywords used by font-lock. + +This variable is used by `sql-mode' and `sql-interactive-mode'. The +regular expressions are created during compilation by calling the +function `regexp-opt'. Therefore, take a look at the source before +you define your own sql-mode-db2-font-lock-keywords.") + +(defvar sql-mode-font-lock-keywords nil "SQL keywords used by font-lock. -This variable defaults to `sql-mode-ansi-font-lock-keywords'. This is -used for the default `font-lock-defaults' value in `sql-mode'. This -can be changed by some entry functions to provide more hilighting.") +Setting this variable directly no longer has any affect. Use +`sql-product' and `sql-add-product-keywords' to control the +highlighting rules in sql-mode.") + + + +;;; SQL Product support functions + +(defun sql-product-feature (feature &optional product) + "Lookup `feature' needed to support the current SQL product. + +See \[sql-product-support] for a list of products and supported features." + (cadr + (memq feature + (assoc (or product sql-product) + sql-product-support)))) + +(defun sql-product-font-lock (keywords-only imenu) + "Sets `font-lock-defaults' and `font-lock-keywords' based on +the product-specific keywords and syntax-alists defined in +`sql-product-support'." + (let + ;; Get the product-specific syntax-alist. + ((syntax-alist + (append + (sql-product-feature :syntax-alist) + '((?_ . "w") (?. . "w"))))) + + ;; Get the product-specific keywords. + (setq sql-mode-font-lock-keywords + (append + (eval (sql-product-feature :font-lock)) + (list sql-mode-font-lock-object-name))) + + ;; Setup font-lock. (What is the minimum we should have to do + ;; here?) + (setq font-lock-set-defaults nil + font-lock-keywords sql-mode-font-lock-keywords + font-lock-defaults (list 'sql-mode-font-lock-keywords + keywords-only t syntax-alist)) + + ;; Setup imenu; it needs the same syntax-alist. + (when imenu + (setq imenu-syntax-alist syntax-alist)))) + +;;;###autoload +(defun sql-add-product-keywords (product keywords) + "Append a `font-lock-keywords' entry to the existing entries defined + for the specified `product'." + + (let ((font-lock (sql-product-feature :font-lock product))) + (set font-lock (append (eval font-lock) (list keywords))))) ;;; Functions to switch highlighting +(defun sql-highlight-product () + "Turns on the appropriate font highlighting for the SQL product +selected." + + (when (eq major-mode 'sql-mode) + ;; Setup font-lock + (sql-product-font-lock nil t) + + ;; Force fontification, if its enabled. + (if font-lock-mode + (font-lock-fontify-buffer)) + + ;; Set the mode name to include the product. + (setq mode-name (concat "SQL[" (prin1-to-string sql-product) "]")))) + +(defun sql-set-product (product) + "Set `sql-product' to product and enable appropriate +highlighting." + (interactive "SEnter SQL product: ") + (when (not (assoc product sql-product-support)) + (error "SQL product %s is not supported; treated as ANSI" product) + (setq product 'ansi)) + + ;; Save product setting and fontify. + (setq sql-product product) + (sql-highlight-product)) + (defun sql-highlight-oracle-keywords () - "Highlight Oracle keywords. -Basically, this just sets `font-lock-keywords' appropriately." + "Highlight Oracle keywords." (interactive) - (setq font-lock-keywords sql-mode-oracle-font-lock-keywords) - (font-lock-fontify-buffer)) + (sql-set-product 'oracle)) (defun sql-highlight-postgres-keywords () - "Highlight Postgres keywords. -Basically, this just sets `font-lock-keywords' appropriately." + "Highlight Postgres keywords." (interactive) - (setq font-lock-keywords sql-mode-postgres-font-lock-keywords) - (font-lock-fontify-buffer)) + (sql-set-product 'postgres)) (defun sql-highlight-linter-keywords () - "Highlight LINTER keywords. -Basically, this just sets `font-lock-keywords' appropriately." + "Highlight LINTER keywords." + (interactive) + (sql-set-product 'linter)) + +(defun sql-highlight-ms-keywords () + "Highlight Microsoft SQLServer keywords." (interactive) - (setq font-lock-keywords sql-mode-linter-font-lock-keywords) - (font-lock-fontify-buffer)) + (sql-set-product 'ms)) (defun sql-highlight-ansi-keywords () - "Highlight ANSI SQL keywords. -Basically, this just sets `font-lock-keywords' appropriately." + "Highlight ANSI SQL keywords." (interactive) - (setq font-lock-keywords sql-mode-ansi-font-lock-keywords) - (font-lock-fontify-buffer)) + (sql-set-product 'ansi)) + +(defun sql-highlight-sybase-keywords () + "Highlight Sybase SQL keywords." + (interactive) + (sql-set-product 'sybase)) + +(defun sql-highlight-informix-keywords () + "Highlight Informix SQL keywords." + (interactive) + (sql-set-product 'informix)) + +(defun sql-highlight-interbase-keywords () + "Highlight Interbase SQL keywords." + (interactive) + (sql-set-product 'interbase)) + +(defun sql-highlight-ingres-keywords () + "Highlight Ingres SQL keywords." + (interactive) + (sql-set-product 'ingres)) + +(defun sql-highlight-solid-keywords () + "Highlight Solid SQL keywords." + (interactive) + (sql-set-product 'solid)) + +(defun sql-highlight-mysql-keywords () + "Highlight MySQL SQL keywords." + (interactive) + (sql-set-product 'mysql)) + +(defun sql-highlight-sqlite-keywords () + "Highlight SQLite SQL keywords." + (interactive) + (sql-set-product 'sqlite)) + +(defun sql-highlight-db2-keywords () + "Highlight DB2 SQL keywords." + (interactive) + (sql-set-product 'db2)) @@ -953,6 +1665,7 @@ Other non-free SQL implementations are also supported: Sybase: \\[sql-sybase] Ingres: \\[sql-ingres] Microsoft: \\[sql-ms] + DB2: \\[sql-db2] Interbase: \\[sql-interbase] Linter: \\[sql-linter] @@ -999,26 +1712,30 @@ Parameter WHAT is a list of the arguments passed to this function. The function asks for the username if WHAT contains symbol `user', for the password if it contains symbol `password', for the server if it contains symbol `server', and for the database if it contains symbol -`database'. +`database'. The members of WHAT are processed in the order in which +they are provided. In order to ask the user for username, password and database, call the function like this: (sql-get-login 'user 'password 'database)." (interactive) - (if (memq 'user what) + (while what + (cond + ((eq (car what) 'user) ; user (setq sql-user (read-from-minibuffer "User: " sql-user nil nil sql-user-history))) - (if (memq 'password what) + ((eq (car what) 'password) ; password (setq sql-password (sql-read-passwd "Password: " sql-password))) - (if (memq 'server what) + ((eq (car what) 'server) ; server (setq sql-server (read-from-minibuffer "Server: " sql-server nil nil sql-server-history))) - (if (memq 'database what) + ((eq (car what) 'database) ; database (setq sql-database (read-from-minibuffer "Database: " sql-database nil nil sql-database-history)))) + (setq what (cdr what)))) (defun sql-find-sqli-buffer () "Return the current default SQLi buffer or nil. @@ -1287,13 +2004,7 @@ you must tell Emacs. Here's how to do that in your `~/.emacs' file: (easy-menu-add sql-mode-menu)); XEmacs (set-syntax-table sql-mode-syntax-table) (make-local-variable 'font-lock-defaults) - ;; Note that making KEYWORDS-ONLY nil will cause havoc if you try - ;; SELECT 'x' FROM DUAL with SQL*Plus, because the title of the column - ;; will have just one quote. Therefore syntactic hilighting is - ;; disabled for interactive buffers. `_' and `.' are considered part - ;; of words. - (setq font-lock-defaults '(sql-mode-font-lock-keywords - nil t ((?_ . "w") (?. . "w")))) + (make-local-variable 'sql-mode-font-lock-keywords) (make-local-variable 'comment-start) (setq comment-start "--") ;; Make each buffer in sql-mode remember the "current" SQLi buffer. @@ -1301,11 +2012,8 @@ you must tell Emacs. Here's how to do that in your `~/.emacs' file: ;; Add imenu support for sql-mode. Note that imenu-generic-expression ;; is buffer-local, so we don't need a local-variable for it. SQL is ;; case-insensitive, that's why we have to set imenu-case-fold-search. - ;; imenu-syntax-alist makes sure that `_' is considered part of object - ;; names. (setq imenu-generic-expression sql-imenu-generic-expression - imenu-case-fold-search t - imenu-syntax-alist '(("_" . "w"))) + imenu-case-fold-search t) ;; Make `sql-send-paragraph' work on paragraphs that contain indented ;; lines. (make-local-variable 'paragraph-separate) @@ -1316,7 +2024,10 @@ you must tell Emacs. Here's how to do that in your `~/.emacs' file: (setq local-abbrev-table sql-mode-abbrev-table) (setq abbrev-all-caps 1) ;; Run hook - (run-hooks 'sql-mode-hook)) + (run-hooks 'sql-mode-hook) + ;; Catch changes to sql-product and highlight accordingly + (sql-highlight-product) + (add-hook 'hack-local-variables-hook 'sql-highlight-product t t)) @@ -1393,41 +2104,53 @@ you entered, right above the output it created. \(setq comint-output-filter-functions \(function (lambda (STR) (comint-show-output))))" (comint-mode) - (setq comint-prompt-regexp sql-prompt-regexp) - (setq left-margin sql-prompt-length) + ;; Get the `sql-product' for this interactive session. + (set (make-local-variable 'sql-product) + (or sql-interactive-product + sql-product)) + ;; Setup the mode. (setq major-mode 'sql-interactive-mode) - (setq mode-name "SQLi") + (setq mode-name (concat "SQLi[" (prin1-to-string sql-product) "]")) (use-local-map sql-interactive-mode-map) (if sql-interactive-mode-menu - (easy-menu-add sql-interactive-mode-menu)); XEmacs + (easy-menu-add sql-interactive-mode-menu)) ; XEmacs (set-syntax-table sql-mode-syntax-table) + (make-local-variable 'sql-mode-font-lock-keywords) (make-local-variable 'font-lock-defaults) ;; Note that making KEYWORDS-ONLY nil will cause havoc if you try ;; SELECT 'x' FROM DUAL with SQL*Plus, because the title of the column ;; will have just one quote. Therefore syntactic hilighting is - ;; disabled for interactive buffers. `_' and `.' are considered part - ;; of words. - (setq font-lock-defaults '(sql-mode-font-lock-keywords - t t ((?_ . "w") (?. . "w")))) + ;; disabled for interactive buffers. No imenu support. + (sql-product-font-lock t nil) ;; Enable commenting and uncommenting of the region. (make-local-variable 'comment-start) (setq comment-start "--") - ;; Abbreviation table init and case-insensitive. It is not activatet + ;; Abbreviation table init and case-insensitive. It is not activated ;; by default. (setq local-abbrev-table sql-mode-abbrev-table) (setq abbrev-all-caps 1) ;; Exiting the process will call sql-stop. (set-process-sentinel (get-buffer-process sql-buffer) 'sql-stop) + ;; Create a usefull name for renaming this buffer later. + (make-local-variable 'sql-alternate-buffer-name) + (setq sql-alternate-buffer-name (sql-make-alternate-buffer-name)) + ;; User stuff. Initialize before the hook. + (set (make-local-variable 'sql-prompt-regexp) + (sql-product-feature :sqli-prompt-regexp)) + (set (make-local-variable 'sql-prompt-length) + (sql-product-feature :sqli-prompt-length)) + (make-local-variable 'sql-input-ring-separator) + (make-local-variable 'sql-input-ring-file-name) + ;; Run hook. + (run-hooks 'sql-interactive-mode-hook) + ;; Set comint based on user overrides. + (setq comint-prompt-regexp sql-prompt-regexp) + (setq left-margin sql-prompt-length) ;; People wanting a different history file for each ;; buffer/process/client/whatever can change separator and file-name ;; on the sql-interactive-mode-hook. (setq comint-input-ring-separator sql-input-ring-separator comint-input-ring-file-name sql-input-ring-file-name) - ;; Create a usefull name for renaming this buffer later. - (make-local-variable 'sql-alternate-buffer-name) - (setq sql-alternate-buffer-name (sql-make-alternate-buffer-name)) - ;; User stuff. - (run-hooks 'sql-interactive-mode-hook) ;; Calling the hook before calling comint-read-input-ring allows users ;; to set comint-input-ring-file-name in sql-interactive-mode-hook. (comint-read-input-ring t)) @@ -1450,6 +2173,33 @@ Sentinels will always get the two parameters PROCESS and EVENT." ;;; Entry functions for different SQL interpreters. +;;;###autoload +(defun sql-product-interactive (&optional product) + "Run product interpreter as an inferior process. + +If buffer `*SQL*' exists but no process is running, make a new process. +If buffer exists and a process is running, just switch to buffer +`*SQL*'. + +\(Type \\[describe-mode] in the SQL buffer for a list of commands.)" + (interactive) + (setq product (or product sql-product)) + (when (sql-product-feature :sqli-connect product) + (if (comint-check-proc "*SQL*") + (pop-to-buffer "*SQL*") + ;; Get credentials. + (apply 'sql-get-login (sql-product-feature :sqli-login product)) + ;; Connect to database. + (message "Login...") + (funcall (sql-product-feature :sqli-connect product)) + ;; Set SQLi mode. + (setq sql-interactive-product product) + (setq sql-buffer (current-buffer)) + (sql-interactive-mode) + ;; All done. + (message "Login...done") + (pop-to-buffer sql-buffer)))) + ;;;###autoload (defun sql-oracle () "Run sqlplus by Oracle as an inferior process. @@ -1475,42 +2225,32 @@ The default comes from `process-coding-system-alist' and \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" (interactive) - (if (comint-check-proc "*SQL*") - (pop-to-buffer "*SQL*") - (sql-get-login 'user 'password 'database) - (message "Login...") - ;; Produce user/password@database construct. Password without user - ;; is meaningless; database without user/password is meaningless, - ;; because "@param" will ask sqlplus to interpret the script - ;; "param". - (let ((parameter nil)) - (if (not (string= "" sql-user)) - (if (not (string= "" sql-password)) - (setq parameter (concat sql-user "/" sql-password)) - (setq parameter sql-user))) - (if (and parameter (not (string= "" sql-database))) - (setq parameter (concat parameter "@" sql-database))) - (if parameter - (setq parameter (nconc (list parameter) sql-oracle-options)) - (setq parameter sql-oracle-options)) - (if parameter - (set-buffer (apply 'make-comint "SQL" sql-oracle-program nil - parameter)) - (set-buffer (make-comint "SQL" sql-oracle-program nil)))) - (setq sql-prompt-regexp "^SQL> ") - (setq sql-prompt-length 5) - (setq sql-buffer (current-buffer)) - ;; set sql-mode-font-lock-keywords to something different before - ;; calling sql-interactive-mode. - (setq sql-mode-font-lock-keywords sql-mode-oracle-font-lock-keywords) - (sql-interactive-mode) - ;; If running on NT, make sure we do placeholder replacement - ;; ourselves. This must come after sql-interactive-mode because all - ;; local variables will be killed, there. + (sql-product-interactive 'oracle)) + +(defun sql-connect-oracle () + "Create comint buffer and connect to Oracle using the login +parameters and command options." + ;; Produce user/password@database construct. Password without user + ;; is meaningless; database without user/password is meaningless, + ;; because "@param" will ask sqlplus to interpret the script + ;; "param". + (let ((parameter nil)) + (if (not (string= "" sql-user)) + (if (not (string= "" sql-password)) + (setq parameter (concat sql-user "/" sql-password)) + (setq parameter sql-user))) + (if (and parameter (not (string= "" sql-database))) + (setq parameter (concat parameter "@" sql-database))) + (if parameter + (setq parameter (nconc (list parameter) sql-oracle-options)) + (setq parameter sql-oracle-options)) + (if parameter + (set-buffer (apply 'make-comint "SQL" sql-oracle-program nil + parameter)) + (set-buffer (make-comint "SQL" sql-oracle-program nil))) + ;; SQL*Plus is buffered on WindowsNT; this handles &placeholders. (if (eq window-system 'w32) - (setq comint-input-sender 'sql-query-placeholders-and-send)) - (message "Login...done") - (pop-to-buffer sql-buffer))) + (setq comint-input-sender 'sql-query-placeholders-and-send)))) @@ -1539,29 +2279,24 @@ The default comes from `process-coding-system-alist' and \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" (interactive) - (if (comint-check-proc "*SQL*") - (pop-to-buffer "*SQL*") - (sql-get-login 'server 'user 'password 'database) - (message "Login...") - ;; Put all parameters to the program (if defined) in a list and call - ;; make-comint. - (let ((params sql-sybase-options)) - (if (not (string= "" sql-server)) - (setq params (append (list "-S" sql-server) params))) - (if (not (string= "" sql-database)) - (setq params (append (list "-D" sql-database) params))) - (if (not (string= "" sql-password)) - (setq params (append (list "-P" sql-password) params))) - (if (not (string= "" sql-user)) - (setq params (append (list "-U" sql-user) params))) - (set-buffer (apply 'make-comint "SQL" sql-sybase-program - nil params))) - (setq sql-prompt-regexp "^SQL> ") - (setq sql-prompt-length 5) - (setq sql-buffer (current-buffer)) - (sql-interactive-mode) - (message "Login...done") - (pop-to-buffer sql-buffer))) + (sql-product-interactive 'sybase)) + +(defun sql-connect-sybase () + "Create comint buffer and connect to Sybase using the login +parameters and command options." + ;; Put all parameters to the program (if defined) in a list and call + ;; make-comint. + (let ((params sql-sybase-options)) + (if (not (string= "" sql-server)) + (setq params (append (list "-S" sql-server) params))) + (if (not (string= "" sql-database)) + (setq params (append (list "-D" sql-database) params))) + (if (not (string= "" sql-password)) + (setq params (append (list "-P" sql-password) params))) + (if (not (string= "" sql-user)) + (setq params (append (list "-U" sql-user) params))) + (set-buffer (apply 'make-comint "SQL" sql-sybase-program + nil params)))) @@ -1588,20 +2323,15 @@ The default comes from `process-coding-system-alist' and \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" (interactive) - (if (comint-check-proc "*SQL*") - (pop-to-buffer "*SQL*") - (sql-get-login 'database) - (message "Login...") - ;; username and password are ignored. - (if (string= "" sql-database) - (set-buffer (make-comint "SQL" sql-informix-program nil)) - (set-buffer (make-comint "SQL" sql-informix-program nil sql-database "-"))) - (setq sql-prompt-regexp "^SQL> ") - (setq sql-prompt-length 5) - (setq sql-buffer (current-buffer)) - (sql-interactive-mode) - (message "Login...done") - (pop-to-buffer sql-buffer))) + (sql-product-interactive 'informix)) + +(defun sql-connect-informix () + "Create comint buffer and connect to Informix using the login +parameters and command options." + ;; username and password are ignored. + (if (string= "" sql-database) + (set-buffer (make-comint "SQL" sql-informix-program nil)) + (set-buffer (make-comint "SQL" sql-informix-program nil sql-database "-")))) @@ -1632,31 +2362,26 @@ The default comes from `process-coding-system-alist' and \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" (interactive) - (if (comint-check-proc "*SQL*") - (pop-to-buffer "*SQL*") - (sql-get-login 'database) - (message "Login...") - ;; Put all parameters to the program (if defined) in a list and call - ;; make-comint. - (let ((params)) - (if (not (string= "" sql-database)) - (setq params (append (list sql-database) params))) - (if (not (string= "" sql-server)) - (setq params (append (list (concat "--host=" sql-server)) params))) - (if (not (string= "" sql-password)) - (setq params (append (list (concat "--password=" sql-password)) params))) - (if (not (string= "" sql-user)) - (setq params (append (list (concat "--user=" sql-user)) params))) - (if (not (null sql-sqlite-options)) - (setq params (append sql-sqlite-options params))) - (set-buffer (apply 'make-comint "SQL" sql-sqlite-program - nil params))) - (setq sql-prompt-regexp "^sqlite> ") - (setq sql-prompt-length 8) - (setq sql-buffer (current-buffer)) - (sql-interactive-mode) - (message "Login...done") - (pop-to-buffer sql-buffer))) + (sql-product-interactive 'sqlite)) + +(defun sql-connect-sqlite () + "Create comint buffer and connect to SQLite using the login +parameters and command options." + ;; Put all parameters to the program (if defined) in a list and call + ;; make-comint. + (let ((params)) + (if (not (string= "" sql-database)) + (setq params (append (list sql-database) params))) + (if (not (string= "" sql-server)) + (setq params (append (list (concat "--host=" sql-server)) params))) + (if (not (string= "" sql-password)) + (setq params (append (list (concat "--password=" sql-password)) params))) + (if (not (string= "" sql-user)) + (setq params (append (list (concat "--user=" sql-user)) params))) + (if (not (null sql-sqlite-options)) + (setq params (append sql-sqlite-options params))) + (set-buffer (apply 'make-comint "SQL" sql-sqlite-program + nil params)))) @@ -1687,31 +2412,26 @@ The default comes from `process-coding-system-alist' and \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" (interactive) - (if (comint-check-proc "*SQL*") - (pop-to-buffer "*SQL*") - (sql-get-login 'user 'password 'database 'server) - (message "Login...") - ;; Put all parameters to the program (if defined) in a list and call - ;; make-comint. - (let ((params)) - (if (not (string= "" sql-database)) - (setq params (append (list sql-database) params))) - (if (not (string= "" sql-server)) - (setq params (append (list (concat "--host=" sql-server)) params))) - (if (not (string= "" sql-password)) - (setq params (append (list (concat "--password=" sql-password)) params))) - (if (not (string= "" sql-user)) - (setq params (append (list (concat "--user=" sql-user)) params))) - (if (not (null sql-mysql-options)) - (setq params (append sql-mysql-options params))) - (set-buffer (apply 'make-comint "SQL" sql-mysql-program - nil params))) - (setq sql-prompt-regexp "^mysql>") - (setq sql-prompt-length 6) - (setq sql-buffer (current-buffer)) - (sql-interactive-mode) - (message "Login...done") - (pop-to-buffer sql-buffer))) + (sql-product-interactive 'mysql)) + +(defun sql-connect-mysql () + "Create comint buffer and connect to MySQL using the login +parameters and command options." + ;; Put all parameters to the program (if defined) in a list and call + ;; make-comint. + (let ((params)) + (if (not (string= "" sql-database)) + (setq params (append (list sql-database) params))) + (if (not (string= "" sql-server)) + (setq params (append (list (concat "--host=" sql-server)) params))) + (if (not (string= "" sql-password)) + (setq params (append (list (concat "--password=" sql-password)) params))) + (if (not (string= "" sql-user)) + (setq params (append (list (concat "--user=" sql-user)) params))) + (if (not (null sql-mysql-options)) + (setq params (append sql-mysql-options params))) + (set-buffer (apply 'make-comint "SQL" sql-mysql-program + nil params)))) @@ -1739,27 +2459,22 @@ The default comes from `process-coding-system-alist' and \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" (interactive) - (if (comint-check-proc "*SQL*") - (pop-to-buffer "*SQL*") - (sql-get-login 'user 'password 'server) - (message "Login...") - ;; Put all parameters to the program (if defined) in a list and call - ;; make-comint. - (let ((params)) - ;; It only makes sense if both username and password are there. - (if (not (or (string= "" sql-user) - (string= "" sql-password))) - (setq params (append (list sql-user sql-password) params))) - (if (not (string= "" sql-server)) - (setq params (append (list sql-server) params))) - (set-buffer (apply 'make-comint "SQL" sql-solid-program - nil params))) - (setq sql-prompt-regexp "^") - (setq sql-prompt-length 0) - (setq sql-buffer (current-buffer)) - (sql-interactive-mode) - (message "Login...done") - (pop-to-buffer sql-buffer))) + (sql-product-interactive 'solid)) + +(defun sql-connect-solid () + "Create comint buffer and connect to Solid using the login +parameters and command options." + ;; Put all parameters to the program (if defined) in a list and call + ;; make-comint. + (let ((params)) + ;; It only makes sense if both username and password are there. + (if (not (or (string= "" sql-user) + (string= "" sql-password))) + (setq params (append (list sql-user sql-password) params))) + (if (not (string= "" sql-server)) + (setq params (append (list sql-server) params))) + (set-buffer (apply 'make-comint "SQL" sql-solid-program + nil params)))) @@ -1786,26 +2501,21 @@ The default comes from `process-coding-system-alist' and \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" (interactive) - (if (comint-check-proc "*SQL*") - (pop-to-buffer "*SQL*") - (sql-get-login 'database) - (message "Login...") - ;; username and password are ignored. - (if (string= "" sql-database) - (set-buffer (make-comint "SQL" sql-ingres-program nil)) - (set-buffer (make-comint "SQL" sql-ingres-program nil sql-database))) - (setq sql-prompt-regexp "^\* ") - (setq sql-prompt-length 2) - (setq sql-buffer (current-buffer)) - (sql-interactive-mode) - (message "Login...done") - (pop-to-buffer sql-buffer))) + (sql-product-interactive 'ingres)) + +(defun sql-connect-ingres () + "Create comint buffer and connect to Ingres using the login +parameters and command options." + ;; username and password are ignored. + (if (string= "" sql-database) + (set-buffer (make-comint "SQL" sql-ingres-program nil)) + (set-buffer (make-comint "SQL" sql-ingres-program nil sql-database)))) ;;;###autoload (defun sql-ms () - "Run isql by Microsoft as an inferior process. + "Run osql by Microsoft as an inferior process. If buffer `*SQL*' exists but no process is running, make a new process. If buffer exists and a process is running, just switch to buffer @@ -1828,32 +2538,31 @@ The default comes from `process-coding-system-alist' and \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" (interactive) - (if (comint-check-proc "*SQL*") - (pop-to-buffer "*SQL*") - (sql-get-login 'user 'password 'database 'server) - (message "Login...") - ;; Put all parameters to the program (if defined) in a list and call - ;; make-comint. - (let ((params sql-ms-options)) - (if (not (string= "" sql-server)) + (sql-product-interactive 'ms)) + +(defun sql-connect-ms () + "Create comint buffer and connect to Microsoft using the login +parameters and command options." + ;; Put all parameters to the program (if defined) in a list and call + ;; make-comint. + (let ((params sql-ms-options)) + (if (not (string= "" sql-server)) (setq params (append (list "-S" sql-server) params))) - (if (not (string= "" sql-database)) + (if (not (string= "" sql-database)) (setq params (append (list "-d" sql-database) params))) - (if (not (string= "" sql-user)) - (setq params (append (list "-U" sql-user) params))) - (if (not (string= "" sql-password)) - (setq params (append (list "-P" sql-password) params)) - ;; If -P is passed to ISQL as the last argument without a password, - ;; it's considered null. - (setq params (append params (list "-P")))) - (set-buffer (apply 'make-comint "SQL" sql-ms-program - nil params))) - (setq sql-prompt-regexp "^[0-9]*>") - (setq sql-prompt-length 5) - (setq sql-buffer (current-buffer)) - (sql-interactive-mode) - (message "Login...done") - (pop-to-buffer sql-buffer))) + (if (not (string= "" sql-user)) + (setq params (append (list "-U" sql-user) params))) + (if (not (string= "" sql-password)) + (setq params (append (list "-P" sql-password) params)) + (if (string= "" sql-user) + ;; if neither user nor password is provided, use system + ;; credentials. + (setq params (append (list "-E") params)) + ;; If -P is passed to ISQL as the last argument without a + ;; password, it's considered null. + (setq params (append params (list "-P"))))) + (set-buffer (apply 'make-comint "SQL" sql-ms-program + nil params)))) @@ -1887,34 +2596,23 @@ Try to set `comint-output-filter-functions' like this: \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" (interactive) - (if (comint-check-proc "*SQL*") - (pop-to-buffer "*SQL*") - (sql-get-login 'database 'server) - (message "Login...") - ;; username and password are ignored. Mark Stosberg suggest to add - ;; the database at the end. Jason Beegan suggest using --pset and - ;; pager=off instead of \\o|cat. The later was the solution by - ;; Gregor Zych. Jason's suggestion is the default value for - ;; sql-postgres-options. - (let ((params sql-postgres-options)) - (if (not (string= "" sql-database)) - (setq params (append params (list sql-database)))) - (if (not (string= "" sql-server)) - (setq params (append (list "-h" sql-server) params))) - (set-buffer (apply 'make-comint "SQL" sql-postgres-program - nil params))) - (setq sql-prompt-regexp "^.*> *") - (setq sql-prompt-length 5) - ;; This is a lousy hack to prevent psql from truncating it's output - ;; and giving stupid warnings. If s.o. knows a way to prevent psql - ;; from acting this way, then I would be very thankful to - ;; incorporate this (Gregor Zych ) - ;; (comint-send-string "*SQL*" "\\o \| cat\n") - (setq sql-mode-font-lock-keywords sql-mode-postgres-font-lock-keywords) - (setq sql-buffer (current-buffer)) - (sql-interactive-mode) - (message "Login...done") - (pop-to-buffer sql-buffer))) + (sql-product-interactive 'postgres)) + +(defun sql-connect-postgres () + "Create comint buffer and connect to Postgres using the login +parameters and command options." + ;; username and password are ignored. Mark Stosberg suggest to add + ;; the database at the end. Jason Beegan suggest using --pset and + ;; pager=off instead of \\o|cat. The later was the solution by + ;; Gregor Zych. Jason's suggestion is the default value for + ;; sql-postgres-options. + (let ((params sql-postgres-options)) + (if (not (string= "" sql-database)) + (setq params (append params (list sql-database)))) + (if (not (string= "" sql-server)) + (setq params (append (list "-h" sql-server) params))) + (set-buffer (apply 'make-comint "SQL" sql-postgres-program + nil params)))) @@ -1942,27 +2640,22 @@ The default comes from `process-coding-system-alist' and \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" (interactive) - (if (comint-check-proc "*SQL*") - (pop-to-buffer "*SQL*") - (sql-get-login 'user 'password 'database) - (message "Login...") - ;; Put all parameters to the program (if defined) in a list and call - ;; make-comint. - (let ((params sql-interbase-options)) - (if (not (string= "" sql-user)) - (setq params (append (list "-u" sql-user) params))) - (if (not (string= "" sql-password)) - (setq params (append (list "-p" sql-password) params))) - (if (not (string= "" sql-database)) - (setq params (cons sql-database params))); add to the front! - (set-buffer (apply 'make-comint "SQL" sql-interbase-program - nil params))) - (setq sql-prompt-regexp "^SQL> ") - (setq sql-prompt-length 5) - (setq sql-buffer (current-buffer)) - (sql-interactive-mode) - (message "Login...done") - (pop-to-buffer sql-buffer))) + (sql-product-interactive 'interbase)) + +(defun sql-connect-interbase () + "Create comint buffer and connect to Interbase using the login +parameters and command options." + ;; Put all parameters to the program (if defined) in a list and call + ;; make-comint. + (let ((params sql-interbase-options)) + (if (not (string= "" sql-user)) + (setq params (append (list "-u" sql-user) params))) + (if (not (string= "" sql-password)) + (setq params (append (list "-p" sql-password) params))) + (if (not (string= "" sql-database)) + (setq params (cons sql-database params))) ; add to the front! + (set-buffer (apply 'make-comint "SQL" sql-interbase-program + nil params)))) @@ -1994,22 +2687,17 @@ The default comes from `process-coding-system-alist' and \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" (interactive) - (if (comint-check-proc "*SQL*") - (pop-to-buffer "*SQL*") - (message "Login...") - ;; Put all parameters to the program (if defined) in a list and call - ;; make-comint. - (set-buffer (apply 'make-comint "SQL" sql-db2-program - nil sql-db2-options)) - (setq sql-prompt-regexp "^db2 => ") - (setq sql-prompt-length 7) - (setq sql-buffer (current-buffer)) - (sql-interactive-mode) - ;; Escape newlines. This must come after sql-interactive-mode - ;; because all local variables will be killed, there. - (setq comint-input-sender 'sql-escape-newlines-and-send) - (message "Login...done") - (pop-to-buffer sql-buffer))) + (sql-product-interactive 'db2)) + +(defun sql-connect-db2 () + "Create comint buffer and connect to DB2 using the login +parameters and command options." + ;; Put all parameters to the program (if defined) in a list and call + ;; make-comint. + (set-buffer (apply 'make-comint "SQL" sql-db2-program + nil sql-db2-options)) + ;; Properly escape newlines when DB2 is interactive. + (setq comint-input-sender 'sql-escape-newlines-and-send)) ;;;###autoload (defun sql-linter () @@ -2034,39 +2722,31 @@ an empty password. The buffer is put in sql-interactive-mode, giving commands for sending input. See `sql-interactive-mode'. -To use LINTER font locking by default, put this line into your .emacs : - (setq sql-mode-font-lock-keywords sql-mode-linter-font-lock-keywords) - \(Type \\[describe-mode] in the SQL buffer for a list of commands.)" (interactive) - (if (comint-check-proc "*SQL*") - (pop-to-buffer "*SQL*") - (sql-get-login 'user 'password 'database 'server) - (message "Login...") - ;; Put all parameters to the program (if defined) in a list and call - ;; make-comint. - (let ((params sql-linter-options) (login nil) (old-mbx (getenv "LINTER_MBX"))) - (if (not (string= "" sql-user)) - (setq login (concat sql-user "/" sql-password))) - (setq params (append (list "-u" login) params)) - (if (not (string= "" sql-server)) - (setq params (append (list "-n" sql-server) params))) - (if (string= "" sql-database) - (setenv "LINTER_MBX" nil) - (setenv "LINTER_MBX" sql-database)) - (set-buffer (apply 'make-comint "SQL" sql-linter-program nil - params)) - (setenv "LINTER_MBX" old-mbx) - ) - (setq sql-prompt-regexp "^SQL>") - (setq sql-prompt-length 4) - (setq sql-buffer (current-buffer)) - (sql-interactive-mode) - (message "Login...done") - (pop-to-buffer sql-buffer))) + (sql-product-interactive 'linter)) + +(defun sql-connect-linter () + "Create comint buffer and connect to Linter using the login +parameters and command options." + ;; Put all parameters to the program (if defined) in a list and call + ;; make-comint. + (let ((params sql-linter-options) (login nil) (old-mbx (getenv "LINTER_MBX"))) + (if (not (string= "" sql-user)) + (setq login (concat sql-user "/" sql-password))) + (setq params (append (list "-u" login) params)) + (if (not (string= "" sql-server)) + (setq params (append (list "-n" sql-server) params))) + (if (string= "" sql-database) + (setenv "LINTER_MBX" nil) + (setenv "LINTER_MBX" sql-database)) + (set-buffer (apply 'make-comint "SQL" sql-linter-program nil + params)) + (setenv "LINTER_MBX" old-mbx))) (provide 'sql) +;;; arch-tag: 7e1fa1c4-9ca2-402e-87d2-83a5eccb7ac3 ;;; sql.el ends here diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 599075d66a..ac370cc103 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -6,7 +6,6 @@ ;; Author: Tom Tromey ;; Chris Lindblad ;; Keywords: languages tcl modes -;; Version: $Revision: 1.74 $ ;; This file is part of GNU Emacs. @@ -1510,4 +1509,5 @@ The first line is assumed to look like \"#!.../program ...\"." (provide 'tcl) +;;; arch-tag: 8a032554-c3ef-422e-b84c-acec0522179d ;;; tcl.el ends here diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 80803999bc..42aabace4d 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -5,7 +5,6 @@ ;; Authors: Reto Zimmermann ;; Rodney J. Whitby ;; Maintainer: Reto Zimmermann -;; RCS: $Id: vhdl-mode.el,v 32.51 2002/11/12 18:10:27 reto Exp reto $ ;; Keywords: languages vhdl ;; WWW: http://opensource.ethz.ch/emacs/vhdl-mode.html @@ -16578,4 +16577,5 @@ to visually support naming conventions.") (provide 'vhdl-mode) +;;; arch-tag: 780d7073-9b5d-4c6c-b0d8-26b28783aba3 ;;; vhdl-mode.el ends here diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 4b1dfca6f5..fef159d850 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -76,7 +76,7 @@ (defcustom which-func-modes '(emacs-lisp-mode c-mode c++-mode perl-mode cperl-mode makefile-mode - sh-mode fortran-mode f90-mode) + sh-mode fortran-mode f90-mode ada-mode) "List of major modes for which Which Function mode should be used. For other modes it is disabled. If this is equal to t, then Which Function mode is enabled in any major mode that supports it." @@ -198,7 +198,8 @@ and off otherwise." (or (eq which-func-modes t) (member major-mode which-func-modes)))))) ;; Turn it off - (cancel-timer which-func-update-timer) + (when (timerp which-func-update-timer) + (cancel-timer which-func-update-timer)) (setq which-func-update-timer nil) (dolist (buf (buffer-list)) (with-current-buffer buf (setq which-func-mode nil))))) @@ -206,20 +207,37 @@ and off otherwise." (defvar which-function-imenu-failed nil "Locally t in a buffer if `imenu--make-index-alist' found nothing there.") +(defvar which-func-functions nil + "List of functions for `which-function' to call with no arguments. +It calls them sequentially, and if any returns non-nil, +`which-function' uses that name and stops looking for the name.") + (defun which-function () "Return current function name based on point. -Uses `imenu--index-alist' or `add-log-current-defun-function'. +Uses `which-function-functions', `imenu--index-alist' +or `add-log-current-defun-function'. If no function name is found, return nil." (let (name) + ;; Try the which-function-functions functions first. + (let ((hooks which-func-functions)) + (while hooks + (let ((value (funcall (car hooks)))) + (when value + (setq name value + hooks nil))) + (setq hooks (cdr hooks)))) + ;; If Imenu is loaded, try to make an index alist with it. - (when (and (boundp 'imenu--index-alist) (null imenu--index-alist) + (when (and (null name) + (boundp 'imenu--index-alist) (null imenu--index-alist) (null which-function-imenu-failed)) (imenu--make-index-alist) (unless imenu--index-alist (make-local-variable 'which-function-imenu-failed) (setq which-function-imenu-failed t))) ;; If we have an index alist, use it. - (when (and (boundp 'imenu--index-alist) imenu--index-alist) + (when (and (null name) + (boundp 'imenu--index-alist) imenu--index-alist) (let ((alist imenu--index-alist) (minoffset (point-max)) offset elem pair mark) @@ -253,4 +271,5 @@ If no function name is found, return nil." (provide 'which-func) +;;; arch-tag: fa8a55c7-bfe3-4ffc-95ab-01bf21796827 ;;; which-func.el ends here diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index 98803e510a..609c7db1e2 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el @@ -1,6 +1,6 @@ ;;; xscheme.el --- run MIT Scheme under Emacs -;; Copyright (C) 1986, 1987, 1989, 1990, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1987, 1989, 1990, 2001, 2004 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: languages, lisp @@ -222,14 +222,14 @@ With argument, asks for a command line." (let* ((buffer (get-buffer buffer-name)) (process (and buffer (get-buffer-process buffer)))) (cond ((not buffer) - (error "Buffer does not exist" buffer-name)) + (error "Buffer `%s' does not exist" buffer-name)) ((not process) - (error "Buffer is not a scheme interaction buffer" buffer-name)) + (error "Buffer `%s' is not a scheme interaction buffer" buffer-name)) (t (save-excursion (set-buffer buffer) (if (not (xscheme-process-buffer-current-p)) - (error "Buffer is not a scheme interaction buffer" + (error "Buffer `%s' is not a scheme interaction buffer" buffer-name))) (process-name process))))) @@ -1229,4 +1229,5 @@ the remaining input.") (provide 'xscheme) +;;; arch-tag: cfc14adc-2917-409e-ad16-432e8d0017de ;;; xscheme.el ends here diff --git a/lisp/ps-bdf.el b/lisp/ps-bdf.el index 92cc333e76..c033950410 100644 --- a/lisp/ps-bdf.el +++ b/lisp/ps-bdf.el @@ -445,4 +445,5 @@ BITMAP-STRING is a string representing bits by hexadecimal digits." (provide 'ps-bdf) +;;; arch-tag: 9b875ba8-565a-4ecf-acaa-30cee732c898 ;;; ps-bdf.el ends here diff --git a/lisp/ps-mule.el b/lisp/ps-mule.el index d16b5da594..1f43e011c6 100644 --- a/lisp/ps-mule.el +++ b/lisp/ps-mule.el @@ -1364,4 +1364,5 @@ V%s 0 /%s-latin1 /%s Latin1Encoding put\n" (provide 'ps-mule) +;;; arch-tag: bca017b2-66a7-4e59-8584-103e749eadbe ;;; ps-mule.el ends here diff --git a/lisp/ps-print.el b/lisp/ps-print.el index a38a0363be..50d7f1d219 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -1,7 +1,7 @@ ;;; ps-print.el --- print text from the buffer as PostScript ;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -;; 2003 Free Software Foundation, Inc. +;; 2003, 2004 Free Software Foundation, Inc. ;; Author: Jim Thompson (was ) ;; Jacques Duthen (was ) @@ -10,12 +10,12 @@ ;; Maintainer: Kenichi Handa (multi-byte characters) ;; Vinicius Jose Latorre ;; Keywords: wp, print, PostScript -;; Time-stamp: <2003/07/10 19:19:12 vinicius> -;; Version: 6.6.2 +;; Time-stamp: <2004/03/10 18:57:00 vinicius> +;; Version: 6.6.4 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ -(defconst ps-print-version "6.6.2" - "ps-print.el, v 6.6.2 <2003/07/10 vinicius> +(defconst ps-print-version "6.6.4" + "ps-print.el, v 6.6.4 <2004/03/10 vinicius> Vinicius's last change version -- this file may have been edited as part of Emacs without changes to the version number. When reporting bugs, please also @@ -1213,6 +1213,9 @@ Please send all bug fixes and enhancements to ;; ;; [vinicius] Vinicius Jose Latorre ;; +;; 20040229 +;; `ps-time-stamp-yyyy-mm-dd', `ps-time-stamp-iso8601' +;; ;; 20010619 ;; `ps-time-stamp-locale-default' ;; @@ -1261,7 +1264,7 @@ Please send all bug fixes and enhancements to ;; ;; [keinichi] 19990509 Kein'ichi Handa ;; -;; `ps-print-region-function' +;; `ps-print-region-function' ;; ;; [vinicius] Vinicius Jose Latorre ;; @@ -1274,7 +1277,7 @@ Please send all bug fixes and enhancements to ;; ;; [keinichi] 19980819 Kein'ichi Handa ;; -;; Multi-byte buffer handling. +;; Multi-byte buffer handling. ;; ;; [vinicius] Vinicius Jose Latorre ;; @@ -1370,9 +1373,11 @@ Please send all bug fixes and enhancements to ;; Thanks to David X Callaway for helping debugging PostScript ;; level 1 compatibility. ;; -;; Thanks to Colin Marquardt for upside-down, -;; line number step, line number start and zebra stripe follow suggestions, and -;; for XEmacs beta-tests. +;; Thanks to Colin Marquardt for: +;; - upside-down, line number step, line number start and zebra stripe +;; follow suggestions. +;; - `ps-time-stamp-yyyy-mm-dd' and `ps-time-stamp-iso8601' suggestion. +;; - and for XEmacs beta-tests. ;; ;; Thanks to Klaus Berndl for user defined PostScript ;; prologue code suggestion, for odd/even printing suggestion and for @@ -3111,7 +3116,9 @@ delimiters '(' and ')'. For symbols with bound functions, the function is called and should return a string to be inserted into the array. For symbols with bound values, the value should be a string to be inserted into the array. In either case, function or -variable, the string value has PostScript string delimiters added to it." +variable, the string value has PostScript string delimiters added to it. + +If symbols are unbounded, they are silently ignored." :type '(repeat (choice :menu-tag "Left Header" :tag "Left Header" string symbol)) @@ -3135,6 +3142,11 @@ There are the following basic functions implemented: `ps-time-stamp-mon-dd-yyyy' Return date as \"Jun 18 2001\". + `ps-time-stamp-yyyy-mm-dd' Return date as \"2001-06-18\" (ISO + date). + + `ps-time-stamp-iso8601' Alias for `ps-time-stamp-yyyy-mm-dd'. + You can also create your own time stamp function by using `format-time-string' \(which see)." :type '(repeat (choice :menu-tag "Right Header" @@ -3157,7 +3169,9 @@ string literals should be delimited with PostScript string delimiters '(' and For symbols with bound functions, the function is called and should return a string to be inserted into the array. For symbols with bound values, the value should be a string to be inserted into the array. In either case, function or -variable, the string value has PostScript string delimiters added to it." +variable, the string value has PostScript string delimiters added to it. + +If symbols are unbounded, they are silently ignored." :version "21.1" :type '(repeat (choice :menu-tag "Left Footer" :tag "Left Footer" @@ -3182,6 +3196,11 @@ There are the following basic functions implemented: `ps-time-stamp-mon-dd-yyyy' Return date as \"Jun 18 2001\". + `ps-time-stamp-yyyy-mm-dd' Return date as \"2001-06-18\" (ISO + date). + + `ps-time-stamp-iso8601' Alias for `ps-time-stamp-yyyy-mm-dd'. + You can also create your own time stamp function by using `format-time-string' \(which see)." :version "21.1" @@ -3694,6 +3713,15 @@ It can be retrieved with `(ps-get ALIST-SYM KEY)'." (format-time-string "%b %d %Y")) +(defun ps-time-stamp-yyyy-mm-dd () + "Return date as \"2001-06-18\" (ISO date)." + (format-time-string "%Y-%m-%d")) + + +(defalias 'ps-time-stamp-iso8601 'ps-time-stamp-yyyy-mm-dd + "Alias for `ps-time-stamp-yyyy-mm-dd' (which see).") + + (defun ps-time-stamp-hh:mm:ss () "Return time as \"17:28:31\"." (format-time-string "%T")) @@ -4113,6 +4141,11 @@ If EXTENSION is any other symbol, it is ignored." ;; Internal functions and variables +(defun ps-message-log-max () + (and (not (string= (buffer-name) "*Messages*")) + message-log-max)) + + (defvar ps-print-hook nil) (defvar ps-print-begin-sheet-hook nil) (defvar ps-print-begin-page-hook nil) @@ -4125,9 +4158,10 @@ If EXTENSION is any other symbol, it is ignored." (defun ps-spool-without-faces (from to &optional region-p) - (run-hooks 'ps-print-hook) - (ps-printing-region region-p from to) - (ps-generate (current-buffer) from to 'ps-generate-postscript)) + (let ((message-log-max (ps-message-log-max))) ; to print *Messages* buffer + (run-hooks 'ps-print-hook) + (ps-printing-region region-p from to) + (ps-generate (current-buffer) from to 'ps-generate-postscript))) (defun ps-print-with-faces (from to &optional filename region-p) @@ -4136,15 +4170,17 @@ If EXTENSION is any other symbol, it is ignored." (defun ps-spool-with-faces (from to &optional region-p) - (run-hooks 'ps-print-hook) - (ps-printing-region region-p from to) - (ps-generate (current-buffer) from to 'ps-generate-postscript-with-faces)) + (let ((message-log-max (ps-message-log-max))) ; to print *Messages* buffer + (run-hooks 'ps-print-hook) + (ps-printing-region region-p from to) + (ps-generate (current-buffer) from to 'ps-generate-postscript-with-faces))) (defun ps-count-lines-preprint (from to) - (or (and from to) - (error "The mark is not set now")) - (list (count-lines from to))) + (or (and from to) + (error "The mark is not set now")) + (let ((message-log-max (ps-message-log-max))) ; to count lines of *Messages* + (list (count-lines from to)))) (defun ps-count-lines (from to) @@ -6551,10 +6587,12 @@ If FACE is not a valid face name, it is used default face." (defun ps-kill-emacs-check () (let (ps-buffer) (and (setq ps-buffer (get-buffer ps-spool-buffer-name)) + (buffer-name ps-buffer) ; check if it's not killed (buffer-modified-p ps-buffer) (y-or-n-p "Unprinted PostScript waiting; print now? ") (ps-despool)) (and (setq ps-buffer (get-buffer ps-spool-buffer-name)) + (buffer-name ps-buffer) ; check if it's not killed (buffer-modified-p ps-buffer) (not (yes-or-no-p "Unprinted PostScript waiting; exit anyway? ")) (error "Unprinted PostScript")))) @@ -6792,4 +6830,5 @@ This checks if all multi-byte characters in the region are printable or not.") (provide 'ps-print) +;;; arch-tag: fb06a585-1112-4206-885d-a57d95d50579 ;;; ps-print.el ends here diff --git a/lisp/recentf.el b/lisp/recentf.el index 4bfcf79aa3..7e37982245 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -8,8 +8,6 @@ ;; Maintainer: FSF ;; Keywords: files -(defconst recentf-version "$Revision: 1.23 $") - ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify @@ -78,9 +76,13 @@ See the command `recentf-save-list'." :type 'file) (defcustom recentf-exclude nil - "*List of regexps for filenames excluded from the recent list." +"*List of regexps and predicates for filenames excluded from the recent list. +When a filename matches any of the regexps or satisfies any of the +predicates it is excluded from the recent list. +A predicate is a function that is passed a filename to check and that +must return non-nil to exclude it." :group 'recentf - :type '(repeat regexp)) + :type '(repeat (choice regexp function))) (defun recentf-menu-customization-changed (variable value) "Function called when the recentf menu customization has changed. @@ -98,7 +100,7 @@ Set VARIABLE with VALUE, and force a rebuild of the recentf menu." (defcustom recentf-menu-path '("files") "*Path where to add the recentf menu. -If nil add it at top level (see also `easy-menu-change')." +If nil add it at top level (see also `easy-menu-add-item')." :group 'recentf :type '(choice (const :tag "Top Level" nil) (sexp :tag "Menu Path")) @@ -106,7 +108,7 @@ If nil add it at top level (see also `easy-menu-change')." (defcustom recentf-menu-before "Open File..." "*Name of the menu before which the recentf menu will be added. -If nil add it at end of menu (see also `easy-menu-change')." +If nil add it at end of menu (see also `easy-menu-add-item')." :group 'recentf :type '(choice (string :tag "Name") (const :tag "Last" nil)) @@ -236,6 +238,12 @@ cleanup the list." ;; Unavailable until recentf has been loaded. (recentf-auto-cleanup)))) +(defcustom recentf-initialize-file-name-history t + "*non-nil means to initialize `file-name-history' with the recent list. +If `file-name-history' is not empty, do nothing." + :group 'recentf + :type 'boolean) + (defcustom recentf-load-hook nil "*Normal hook run at end of loading the `recentf' package." :group 'recentf @@ -343,17 +351,34 @@ process the canonical name." (funcall recentf-filename-handler filename)) filename))) +(defsubst recentf-file-readable-p (filename) + "Return t if file FILENAME exists and you can read it. +Like the function `file-readable-p' but return nil on error." + (condition-case nil + (file-readable-p filename) + (error nil))) + (defun recentf-include-p (filename) - "Return t if FILENAME match none of the `recentf-exclude' regexps." + "Return non-nil if FILENAME should be included in the recent list. +That is, if it doesn't match any of the `recentf-exclude' checks." (let ((case-fold-search recentf-case-fold-search) - (rl recentf-exclude)) - (while (and rl (not (string-match (car rl) filename))) - (setq rl (cdr rl))) - (null rl))) + (checks recentf-exclude) + (keepit t) + check) + (while (and checks keepit) + (setq check (car checks) + checks (cdr checks) + keepit (not (if (stringp check) + ;; A regexp + (string-match check filename) + ;; A predicate + (funcall check filename))))) + keepit)) (defsubst recentf-add-file (filename) "Add or move FILENAME at the beginning of the recent list. -Does nothing it if it matches any of the `recentf-exclude' regexps." +Does nothing if the name satisfies any of the `recentf-exclude' regexps or +predicates." (setq filename (recentf-expand-file-name filename)) (when (recentf-include-p filename) (recentf-push filename))) @@ -361,7 +386,7 @@ Does nothing it if it matches any of the `recentf-exclude' regexps." (defsubst recentf-remove-if-non-readable (filename) "Remove FILENAME from the recent list, if file is not readable. Return non-nil if FILENAME has been removed." - (unless (file-readable-p filename) + (unless (recentf-file-readable-p filename) (let ((m (recentf-string-member (recentf-expand-file-name filename) recentf-list))) (and m (setq recentf-list (delq (car m) recentf-list)))))) @@ -520,10 +545,15 @@ menu-elements (no sub-menu)." :help (concat "Open " value) :active t)))) +(defsubst recentf-menu-bar () + "Return the keymap of the global menu bar." + (lookup-key global-map [menu-bar])) + (defun recentf-clear-data () "Clear data used to build the recentf menu. This force a rebuild of the menu." - (easy-menu-remove-item nil recentf-menu-path recentf-menu-title) + (easy-menu-remove-item (recentf-menu-bar) + recentf-menu-path recentf-menu-title) (setq recentf-data-cache nil)) ;;; Predefined menu filters @@ -916,10 +946,11 @@ That is, remove a non readable file from the recent list, if (unless (equal recentf-data-cache cache) (setq recentf-data-cache cache) (condition-case err - (easy-menu-change recentf-menu-path - recentf-menu-title - (recentf-make-menu-items) - recentf-menu-before) + (easy-menu-add-item + (recentf-menu-bar) recentf-menu-path + (easy-menu-create-menu recentf-menu-title + (recentf-make-menu-items)) + recentf-menu-before) (error (message "recentf update menu failed: %s" (error-message-string err))))))) @@ -1106,28 +1137,35 @@ default." "Save the recent list. Write data into the file specified by `recentf-save-file'." (interactive) - (with-temp-file (expand-file-name recentf-save-file) + (with-temp-buffer (erase-buffer) (insert (format recentf-save-file-header (current-time-string))) (recentf-dump-variable 'recentf-list recentf-max-saved-items) (recentf-dump-variable 'recentf-filter-changer-state) + (write-file (expand-file-name recentf-save-file)) nil)) (defun recentf-load-list () "Load a previously saved recent list. -Read data from the file specified by `recentf-save-file'." +Read data from the file specified by `recentf-save-file'. +When `recentf-initialize-file-name-history' is non-nil, initialize an +empty `file-name-history' with the recent list." (interactive) (let ((file (expand-file-name recentf-save-file))) (when (file-readable-p file) - (load-file file)))) + (load-file file) + (and recentf-initialize-file-name-history + (not file-name-history) + (setq file-name-history (mapcar 'abbreviate-file-name + recentf-list)))))) (defun recentf-cleanup () - "Remove all non-readable and excluded files from the recent list." + "Remove all excluded or non-readable files from the recent list." (interactive) (message "Cleaning up the recentf list...") (let (newlist) (dolist (f recentf-list) - (if (and (recentf-include-p f) (file-readable-p f)) + (if (and (recentf-include-p f) (recentf-file-readable-p f)) (push f newlist) (message "File %s removed from the recentf list" f))) (setq recentf-list (nreverse newlist)) @@ -1161,4 +1199,5 @@ that were operated on recently." (run-hooks 'recentf-load-hook) +;;; arch-tag: 78f1eec9-0d16-4d19-a4eb-2e4529edb62a ;;; recentf.el ends here diff --git a/lisp/rect.el b/lisp/rect.el index c6b83995b7..6d9cd6a2aa 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -384,4 +384,5 @@ rectangle which were empty." (provide 'rect) +;;; arch-tag: 178847b3-1f50-4b03-83de-a6e911cc1d16 ;;; rect.el ends here diff --git a/lisp/register.el b/lisp/register.el index d550858eba..bab9d01edf 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -304,8 +304,10 @@ START and END are buffer positions indicating what to prepend." (defun copy-rectangle-to-register (register start end &optional delete-flag) "Copy rectangular region into register REGISTER. -With prefix arg, delete as well. -Called from program, takes four args: REGISTER, START, END and DELETE-FLAG. +With prefix arg, delete as well. To insert this register +in the buffer, use \\[insert-register]. + +Called from a program, takes four args: REGISTER, START, END and DELETE-FLAG. START and END are buffer positions giving two corners of rectangle." (interactive "cCopy rectangle to register: \nr\nP") (set-register register @@ -313,4 +315,6 @@ START and END are buffer positions giving two corners of rectangle." (delete-extract-rectangle start end) (extract-rectangle start end)))) +(provide 'register) +;;; arch-tag: ce14dd68-8265-475f-9341-5d4ec5a53035 ;;; register.el ends here diff --git a/lisp/repeat.el b/lisp/repeat.el index ae2cc97498..aa73c86967 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -344,4 +344,5 @@ can be modified by the global variable `repeat-on-final-keystroke'." (provide 'repeat) +;;; arch-tag: cd569600-a1ad-4fa7-9062-bb91dfeaf1db ;;; repeat.el ends here diff --git a/lisp/replace.el b/lisp/replace.el index 82dfb0e405..2d26cb5cc6 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -223,7 +223,7 @@ Fourth and fifth arg START and END specify the region to operate on." (if (and transient-mark-mode mark-active) (region-end))))) (perform-replace regexp (cons 'replace-eval-replacement to-expr) - t t delimited nil nil start end)) + t 'literal delimited nil nil start end)) (defun map-query-replace-regexp (regexp to-strings &optional n start end) "Replace some matches for REGEXP with various strings, in rotation. @@ -916,8 +916,9 @@ See also `multi-occur'." (goto-char headerpt) (let ((beg (point)) end) - (insert (format "%d lines matching \"%s\" in buffer: %s\n" - matches regexp (buffer-name buf))) + (insert (format "%d match%s for \"%s\" in buffer: %s\n" + matches (if (= matches 1) "" "es") + regexp (buffer-name buf))) (setq end (point)) (add-text-properties beg end (append @@ -1057,7 +1058,7 @@ make, or the user didn't cancel the call." (case-fold-search (and case-fold-search (string-equal from-string (downcase from-string)))) - (literal (not regexp-flag)) + (literal (or (not regexp-flag) (eq regexp-flag 'literal))) (search-function (if regexp-flag 're-search-forward 'search-forward)) (search-string from-string) (real-match-data nil) ; the match data for the current match @@ -1328,4 +1329,5 @@ make, or the user didn't cancel the call." 'query-replace 'region)))) (move-overlay replace-overlay start end (current-buffer))))) +;;; arch-tag: 16b4cd61-fd40-497b-b86f-b667c4cf88e4 ;;; replace.el ends here diff --git a/lisp/reposition.el b/lisp/reposition.el index 0811f8dd57..8dc752c235 100644 --- a/lisp/reposition.el +++ b/lisp/reposition.el @@ -196,4 +196,5 @@ first comment line visible (if point is in a comment)." (provide 'reposition) +;;; arch-tag: 79487039-3bd7-4ab5-a3e8-ecf3b4919010 ;;; reposition.el ends here diff --git a/lisp/resume.el b/lisp/resume.el index 36d35ac13a..4a131034e5 100644 --- a/lisp/resume.el +++ b/lisp/resume.el @@ -125,4 +125,5 @@ (provide 'resume) +;;; arch-tag: c90b2761-4803-4e58-a0ae-c4721368b628 ;;; resume.el ends here diff --git a/lisp/reveal.el b/lisp/reveal.el index 11f8c11c93..2809db23e2 100644 --- a/lisp/reveal.el +++ b/lisp/reveal.el @@ -171,4 +171,5 @@ With zero or negative ARG turn mode off." (provide 'reveal) +;;; arch-tag: 96ba0242-2274-4ed7-8e10-26bc0707b4d8 ;;; reveal.el ends here diff --git a/lisp/rfn-eshadow.el b/lisp/rfn-eshadow.el index 347881b0cd..5fb31561c4 100644 --- a/lisp/rfn-eshadow.el +++ b/lisp/rfn-eshadow.el @@ -222,4 +222,5 @@ Returns non-nil if the new state is enabled." (provide 'rfn-eshadow) +;;; arch-tag: dcf70a52-0115-4ec2-b1e3-4f8d3541a888 ;;; rfn-eshadow.el ends here diff --git a/lisp/rot13.el b/lisp/rot13.el index c427ef3af8..bcf4252d14 100644 --- a/lisp/rot13.el +++ b/lisp/rot13.el @@ -110,4 +110,5 @@ See also `toggle-rot13-mode'." (provide 'rot13) +;;; arch-tag: ad5b9ca8-946c-4414-996f-e9b1bf9ec79f ;;; rot13.el ends here diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el index e8568a8d68..a7cdc327e8 100644 --- a/lisp/ruler-mode.el +++ b/lisp/ruler-mode.el @@ -1,6 +1,6 @@ ;;; ruler-mode.el --- display a ruler in the header line -;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: David Ponce ;; Maintainer: David Ponce @@ -94,6 +94,9 @@ ;; WARNING: To keep ruler graduations aligned on text columns it is ;; important to use the same font family and size for ruler and text ;; areas. +;; +;; You can override the ruler format by defining an appropriate +;; function as the buffer-local value of `ruler-mode-ruler-function'. ;; Installation ;; @@ -108,6 +111,8 @@ ;;; Code: (eval-when-compile (require 'wid-edit)) +(require 'scroll-bar) +(require 'fringe) (defgroup ruler-mode nil "Display a ruler in the header line." @@ -134,7 +139,7 @@ or remove a tab stop. \\[ruler-mode-toggle-show-tab-stops] or (format "Invalid character value: %S" value)) widget)))) -(defcustom ruler-mode-fill-column-char (if window-system +(defcustom ruler-mode-fill-column-char (if (char-displayable-p ?¶) ?\¶ ?\|) "*Character used at the `fill-column' location." @@ -160,7 +165,7 @@ or remove a tab stop. \\[ruler-mode-toggle-show-tab-stops] or (integer :tag "Integer char value" :validate ruler-mode-character-validate))) -(defcustom ruler-mode-current-column-char (if window-system +(defcustom ruler-mode-current-column-char (if (char-displayable-p ?¦) ?\¦ ?\@) "*Character used at the `current-column' location." @@ -293,49 +298,6 @@ or remove a tab stop. \\[ruler-mode-toggle-show-tab-stops] or "Face used to highlight the `current-column' character." :group 'ruler-mode) -(defmacro ruler-mode-left-fringe-cols () - "Return the width, measured in columns, of the left fringe area." - '(ceiling (or (car (window-fringes)) 0) - (frame-char-width))) - -(defmacro ruler-mode-right-fringe-cols () - "Return the width, measured in columns, of the right fringe area." - '(ceiling (or (nth 1 (window-fringes)) 0) - (frame-char-width))) - -(defun ruler-mode-left-scroll-bar-cols () - "Return the width, measured in columns, of the right vertical scrollbar." - (let* ((wsb (window-scroll-bars)) - (vtype (nth 2 wsb)) - (cols (nth 1 wsb))) - (if (or (eq vtype 'left) - (and (eq vtype t) - (eq (frame-parameter nil 'vertical-scroll-bars) 'left))) - (or cols - (ceiling - ;; nil means it's a non-toolkit scroll bar, - ;; and its width in columns is 14 pixels rounded up. - (or (frame-parameter nil 'scroll-bar-width) 14) - ;; Always round up to multiple of columns. - (frame-char-width))) - 0))) - -(defun ruler-mode-right-scroll-bar-cols () - "Return the width, measured in columns, of the right vertical scrollbar." - (let* ((wsb (window-scroll-bars)) - (vtype (nth 2 wsb)) - (cols (nth 1 wsb))) - (if (or (eq vtype 'right) - (and (eq vtype t) - (eq (frame-parameter nil 'vertical-scroll-bars) 'right))) - (or cols - (ceiling - ;; nil means it's a non-toolkit scroll bar, - ;; and its width in columns is 14 pixels rounded up. - (or (frame-parameter nil 'scroll-bar-width) 14) - ;; Always round up to multiple of columns. - (frame-char-width))) - 0))) (defsubst ruler-mode-full-window-width () "Return the full width of the selected window." @@ -348,8 +310,8 @@ N is a column number relative to selected frame." (- n (car (window-edges)) (or (car (window-margins)) 0) - (ruler-mode-left-fringe-cols) - (ruler-mode-left-scroll-bar-cols))) + (fringe-columns 'left) + (scroll-bar-columns 'left))) (defun ruler-mode-mouse-set-left-margin (start-event) "Set left margin end to the graduation where the mouse pointer is on. @@ -362,10 +324,10 @@ START-EVENT is the mouse click event." (save-selected-window (select-window (posn-window start)) (setq col (- (car (posn-col-row start)) (car (window-edges)) - (ruler-mode-left-scroll-bar-cols)) + (scroll-bar-columns 'left)) w (- (ruler-mode-full-window-width) - (ruler-mode-left-scroll-bar-cols) - (ruler-mode-right-scroll-bar-cols))) + (scroll-bar-columns 'left) + (scroll-bar-columns 'right))) (when (and (>= col 0) (< col w)) (setq lm (window-margins) rm (or (cdr lm) 0) @@ -384,10 +346,10 @@ START-EVENT is the mouse click event." (save-selected-window (select-window (posn-window start)) (setq col (- (car (posn-col-row start)) (car (window-edges)) - (ruler-mode-left-scroll-bar-cols)) + (scroll-bar-columns 'left)) w (- (ruler-mode-full-window-width) - (ruler-mode-left-scroll-bar-cols) - (ruler-mode-right-scroll-bar-cols))) + (scroll-bar-columns 'left) + (scroll-bar-columns 'right))) (when (and (>= col 0) (< col w)) (setq lm (window-margins) rm (or (cdr lm) 0) @@ -568,11 +530,15 @@ START-EVENT is the mouse click event." (defvar ruler-mode-header-line-format-old nil "Hold previous value of `header-line-format'.") -(make-variable-buffer-local 'ruler-mode-header-line-format-old) + +(defvar ruler-mode-ruler-function 'ruler-mode-ruler + "Function to call to return ruler header line format. +This variable is expected to be made buffer-local by modes.") (defconst ruler-mode-header-line-format - '(:eval (ruler-mode-ruler)) - "`header-line-format' used in ruler mode.") + '(:eval (funcall ruler-mode-ruler-function)) + "`header-line-format' used in ruler mode. +Call `ruler-mode-ruler-function' to compute the ruler value.") ;;;###autoload (define-minor-mode ruler-mode @@ -585,18 +551,18 @@ START-EVENT is the mouse click event." ;; When `ruler-mode' is on save previous header line format ;; and install the ruler header line format. (when (local-variable-p 'header-line-format) - (setq ruler-mode-header-line-format-old header-line-format)) + (set (make-local-variable 'ruler-mode-header-line-format-old) + header-line-format)) (setq header-line-format ruler-mode-header-line-format) - (add-hook 'post-command-hook ; add local hook - #'force-mode-line-update nil t)) + (add-hook 'post-command-hook 'force-mode-line-update nil t)) ;; When `ruler-mode' is off restore previous header line format if ;; the current one is the ruler header line format. (when (eq header-line-format ruler-mode-header-line-format) (kill-local-variable 'header-line-format) (when (local-variable-p 'ruler-mode-header-line-format-old) - (setq header-line-format ruler-mode-header-line-format-old))) - (remove-hook 'post-command-hook ; remove local hook - #'force-mode-line-update t))) + (setq header-line-format ruler-mode-header-line-format-old) + (kill-local-variable 'ruler-mode-header-line-format-old))) + (remove-hook 'post-command-hook 'force-mode-line-update t))) ;; Add ruler-mode to the minor mode menu in the mode line (define-key mode-line-mode-menu [ruler-mode] @@ -646,143 +612,128 @@ mouse-2: unset goal column" (defconst ruler-mode-fringe-help-echo "%s fringe %S" "Help string shown when mouse is over a fringe area.") + +(defsubst ruler-mode-space (width &rest props) + "Return a single space string of WIDTH times the normal character width. +Optional argument PROPS specifies other text properties to apply." + (apply 'propertize " " 'display (list 'space :width width) props)) (defun ruler-mode-ruler () - "Return a string ruler." - (when ruler-mode - (let* ((fullw (ruler-mode-full-window-width)) - (w (window-width)) - (m (window-margins)) - (lsb (ruler-mode-left-scroll-bar-cols)) - (lf (ruler-mode-left-fringe-cols)) - (lm (or (car m) 0)) - (rsb (ruler-mode-right-scroll-bar-cols)) - (rf (ruler-mode-right-fringe-cols)) - (rm (or (cdr m) 0)) - (ruler (make-string fullw ruler-mode-basic-graduation-char)) - (o (+ lsb lf lm)) - (x 0) - (i o) - (j (window-hscroll)) - k c l1 l2 r2 r1 h1 h2 f1 f2) - - ;; Setup the default properties. - (put-text-property 0 fullw 'face 'ruler-mode-default-face ruler) - (put-text-property 0 fullw - 'help-echo - (cond - (ruler-mode-show-tab-stops - ruler-mode-ruler-help-echo-when-tab-stops) - (goal-column - ruler-mode-ruler-help-echo-when-goal-column) - (t - ruler-mode-ruler-help-echo)) - ruler) - ;; Setup the local map. - (put-text-property 0 fullw 'local-map ruler-mode-map ruler) - - ;; Setup the active area. - (while (< x w) - ;; Graduations. - (cond - ;; Show a number graduation. - ((= (mod j 10) 0) - (setq c (number-to-string (/ j 10)) - m (length c) - k i) - (put-text-property - i (1+ i) 'face 'ruler-mode-column-number-face - ruler) - (while (and (> m 0) (>= k 0)) - (aset ruler k (aref c (setq m (1- m)))) - (setq k (1- k)))) - ;; Show an intermediate graduation. - ((= (mod j 5) 0) - (aset ruler i ruler-mode-inter-graduation-char))) - ;; Special columns. - (cond - ;; Show the `current-column' marker. - ((= j (current-column)) - (aset ruler i ruler-mode-current-column-char) - (put-text-property - i (1+ i) 'face 'ruler-mode-current-column-face - ruler)) - ;; Show the `goal-column' marker. - ((and goal-column (= j goal-column)) - (aset ruler i ruler-mode-goal-column-char) - (put-text-property - i (1+ i) 'face 'ruler-mode-goal-column-face - ruler) - (put-text-property - i (1+ i) 'help-echo ruler-mode-goal-column-help-echo - ruler)) - ;; Show the `comment-column' marker. - ((= j comment-column) - (aset ruler i ruler-mode-comment-column-char) - (put-text-property - i (1+ i) 'face 'ruler-mode-comment-column-face - ruler) - (put-text-property - i (1+ i) 'help-echo ruler-mode-comment-column-help-echo - ruler)) - ;; Show the `fill-column' marker. - ((= j fill-column) - (aset ruler i ruler-mode-fill-column-char) - (put-text-property - i (1+ i) 'face 'ruler-mode-fill-column-face - ruler) - (put-text-property - i (1+ i) 'help-echo ruler-mode-fill-column-help-echo - ruler)) - ;; Show the `tab-stop-list' markers. - ((and ruler-mode-show-tab-stops (member j tab-stop-list)) - (aset ruler i ruler-mode-tab-stop-char) - (put-text-property - i (1+ i) 'face 'ruler-mode-tab-stop-face - ruler))) - (setq i (1+ i) - j (1+ j) - x (1+ x))) - - ;; Highlight the fringes and margins. - (if (nth 2 (window-fringes)) - ;; fringes outside margins. - (setq l1 lf - l2 lm - r2 rm - r1 rf - h1 ruler-mode-fringe-help-echo - h2 ruler-mode-margin-help-echo - f1 'ruler-mode-fringes-face - f2 'ruler-mode-margins-face) - ;; fringes inside margins. - (setq l1 lm - l2 lf - r2 rf - r1 rm - h1 ruler-mode-margin-help-echo - h2 ruler-mode-fringe-help-echo - f1 'ruler-mode-margins-face - f2 'ruler-mode-fringes-face)) - (setq i lsb j (+ i l1)) - (put-text-property i j 'face f1 ruler) - (put-text-property i j 'help-echo (format h1 "Left" l1) ruler) - (setq i j j (+ i l2)) - (put-text-property i j 'face f2 ruler) - (put-text-property i j 'help-echo (format h2 "Left" l2) ruler) - (setq i (+ o w) j (+ i r2)) - (put-text-property i j 'face f2 ruler) - (put-text-property i j 'help-echo (format h2 "Right" r2) ruler) - (setq i j j (+ i r1)) - (put-text-property i j 'face f1 ruler) - (put-text-property i j 'help-echo (format h1 "Right" r1) ruler) - - ;; Show inactive areas. - (put-text-property 0 lsb 'face 'ruler-mode-pad-face ruler) - (put-text-property j fullw 'face 'ruler-mode-pad-face ruler) - - ;; Return the ruler propertized string. - ruler))) + "Compute and return an header line ruler." + (let* ((w (window-width)) + (m (window-margins)) + (f (window-fringes)) + (i 0) + (j (window-hscroll)) + ;; Setup the scrollbar, fringes, and margins areas. + (lf (ruler-mode-space + 'left-fringe + 'face 'ruler-mode-fringes-face + 'help-echo (format ruler-mode-fringe-help-echo + "Left" (or (car f) 0)))) + (rf (ruler-mode-space + 'right-fringe + 'face 'ruler-mode-fringes-face + 'help-echo (format ruler-mode-fringe-help-echo + "Right" (or (cadr f) 0)))) + (lm (ruler-mode-space + 'left-margin + 'face 'ruler-mode-margins-face + 'help-echo (format ruler-mode-margin-help-echo + "Left" (or (car m) 0)))) + (rm (ruler-mode-space + 'right-margin + 'face 'ruler-mode-margins-face + 'help-echo (format ruler-mode-margin-help-echo + "Right" (or (cdr m) 0)))) + (sb (ruler-mode-space + 'scroll-bar + 'face 'ruler-mode-pad-face)) + ;; Remember the scrollbar vertical type. + (sbvt (car (window-current-scroll-bars))) + ;; Create an "clean" ruler. + (ruler + (propertize + (make-string w ruler-mode-basic-graduation-char) + 'face 'ruler-mode-default-face + 'local-map ruler-mode-map + 'help-echo (cond + (ruler-mode-show-tab-stops + ruler-mode-ruler-help-echo-when-tab-stops) + (goal-column + ruler-mode-ruler-help-echo-when-goal-column) + (ruler-mode-ruler-help-echo)))) + k c) + ;; Setup the active area. + (while (< i w) + ;; Graduations. + (cond + ;; Show a number graduation. + ((= (mod j 10) 0) + (setq c (number-to-string (/ j 10)) + m (length c) + k i) + (put-text-property + i (1+ i) 'face 'ruler-mode-column-number-face + ruler) + (while (and (> m 0) (>= k 0)) + (aset ruler k (aref c (setq m (1- m)))) + (setq k (1- k)))) + ;; Show an intermediate graduation. + ((= (mod j 5) 0) + (aset ruler i ruler-mode-inter-graduation-char))) + ;; Special columns. + (cond + ;; Show the `current-column' marker. + ((= j (current-column)) + (aset ruler i ruler-mode-current-column-char) + (put-text-property + i (1+ i) 'face 'ruler-mode-current-column-face + ruler)) + ;; Show the `goal-column' marker. + ((and goal-column (= j goal-column)) + (aset ruler i ruler-mode-goal-column-char) + (put-text-property + i (1+ i) 'face 'ruler-mode-goal-column-face + ruler) + (put-text-property + i (1+ i) 'help-echo ruler-mode-goal-column-help-echo + ruler)) + ;; Show the `comment-column' marker. + ((= j comment-column) + (aset ruler i ruler-mode-comment-column-char) + (put-text-property + i (1+ i) 'face 'ruler-mode-comment-column-face + ruler) + (put-text-property + i (1+ i) 'help-echo ruler-mode-comment-column-help-echo + ruler)) + ;; Show the `fill-column' marker. + ((= j fill-column) + (aset ruler i ruler-mode-fill-column-char) + (put-text-property + i (1+ i) 'face 'ruler-mode-fill-column-face + ruler) + (put-text-property + i (1+ i) 'help-echo ruler-mode-fill-column-help-echo + ruler)) + ;; Show the `tab-stop-list' markers. + ((and ruler-mode-show-tab-stops (member j tab-stop-list)) + (aset ruler i ruler-mode-tab-stop-char) + (put-text-property + i (1+ i) 'face 'ruler-mode-tab-stop-face + ruler))) + (setq i (1+ i) + j (1+ j))) + ;; Return the ruler propertized string. Using list here, + ;; instead of concat visually separate the different areas. + (if (nth 2 (window-fringes)) + ;; fringes outside margins. + (list "" (and (eq 'left sbvt) sb) lf lm + ruler rm rf (and (eq 'right sbvt) sb)) + ;; fringes inside margins. + (list "" (and (eq 'left sbvt) sb) lm lf + ruler rf rm (and (eq 'right sbvt) sb))))) (provide 'ruler-mode) @@ -790,4 +741,5 @@ mouse-2: unset goal column" ;; coding: iso-latin-1 ;; End: +;;; arch-tag: b2f24546-5605-44c4-b67b-c9a4eeba3ee8 ;;; ruler-mode.el ends here diff --git a/lisp/s-region.el b/lisp/s-region.el index 2b53bfa7f5..4153174ee2 100644 --- a/lisp/s-region.el +++ b/lisp/s-region.el @@ -121,4 +121,5 @@ to global keymap." (provide 's-region) +;;; arch-tag: a471e912-18d7-4247-a29b-2100bca180ff ;;; s-region.el ends here diff --git a/lisp/saveplace.el b/lisp/saveplace.el index 3211a05533..3e40f118a4 100644 --- a/lisp/saveplace.el +++ b/lisp/saveplace.el @@ -94,6 +94,40 @@ value of `version-control'." (const :tag "No Limit" nil)) :group 'save-place) +(defcustom save-place-forget-unreadable-files t + "Non-nil means forget place in unreadable files. + +The filenames in `save-place-alist' that do not match +`save-place-skip-check-regexp' are filtered through +`file-readable-p'. if nil, their alist entries are removed. + +You may do this anytime by calling the complementary function, +`save-place-forget-unreadable-files'. When this option is turned on, +this happens automatically before saving `save-place-alist' to +`save-place-file'." + :type 'boolean :group 'save-place) + +(defcustom save-place-save-skipped t + "If non-nil, remember files matching `save-place-skip-check-regexp'. + +When filtering `save-place-alist' for unreadable files, some will not +be checked, based on said regexp, and instead saved or forgotten based +on this flag." + :type 'boolean :group 'save-place) + +(defcustom save-place-skip-check-regexp + ;; thanks to ange-ftp-name-format + "\\`/\\(?:cdrom\\|floppy\\|mnt\\|\\(?:[^@/:]*@\\)?[^@/:]*[^@/:.]:\\)" + "Regexp whose file names shall not be checked for readability. + +When forgetting unreadable files, file names matching this regular +expression shall not be checked for readability, but instead be +subject to `save-place-save-skipped'. + +Files for which such a check may be inconvenient include those on +removable and network volumes." + :type 'regexp :group 'save-place) + (defun toggle-save-place (&optional parg) "Toggle whether to save your place in this file between sessions. If this mode is enabled, point is recorded when you kill the buffer @@ -138,12 +172,41 @@ To save places automatically in all files, put this in your `.emacs' file: (cons (cons buffer-file-name position) save-place-alist))))))) +(defun save-place-forget-unreadable-files () + "Remove unreadable files from `save-place-alist'. +For each entry in the alist, if `file-readable-p' returns nil for the +filename, remove the entry. Save the new alist \(as the first pair +may have changed\) back to `save-place-alist'." + (interactive) + ;; the following was adapted from an in-place filtering function, + ;; `filter-mod', used in the original. + (unless (null save-place-alist) ;says it better than `when' + ;; first, check all except first + (let ((fmprev save-place-alist) (fmcur (cdr save-place-alist))) + (while fmcur ;not null + ;; a value is only saved when it becomes FMPREV. + (if (if (string-match save-place-skip-check-regexp (caar fmcur)) + save-place-save-skipped + (file-readable-p (caar fmcur))) + (setq fmprev fmcur) + (setcdr fmprev (cdr fmcur))) + (setq fmcur (cdr fmcur)))) + ;; test first pair, keep it if OK, otherwise 2nd element, which + ;; may be '() + (unless (if (string-match save-place-skip-check-regexp + (caar save-place-alist)) + save-place-save-skipped + (file-readable-p (caar save-place-alist))) + (setq save-place-alist (cdr save-place-alist))))) + (defun save-place-alist-to-file () (let ((file (expand-file-name save-place-file))) (save-excursion (message "Saving places to %s..." file) (set-buffer (get-buffer-create " *Saved Places*")) (delete-region (point-min) (point-max)) + (when save-place-forget-unreadable-files + (save-place-forget-unreadable-files)) (print save-place-alist (current-buffer)) (let ((version-control (cond @@ -238,4 +301,5 @@ To save places automatically in all files, put this in your `.emacs' file: (provide 'saveplace) ; why not... +;;; arch-tag: 3c2ef47b-0a22-4558-b116-118c9ef454a0 ;;; saveplace.el ends here diff --git a/lisp/scroll-all.el b/lisp/scroll-all.el index f3bd3d334f..287ed3ba47 100644 --- a/lisp/scroll-all.el +++ b/lisp/scroll-all.el @@ -117,4 +117,5 @@ apply to all visible windows in the same frame." (provide 'scroll-all) +;;; arch-tag: db20089a-b157-45df-b5d4-2430e60acdd8 ;;; scroll-all.el ends here diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el index 609bea4ab9..2d2921e9fc 100644 --- a/lisp/scroll-bar.el +++ b/lisp/scroll-bar.el @@ -54,6 +54,23 @@ that scroll bar position." ;; with a large scroll bar portion can easily overflow a lisp int. (truncate (/ (* (float (car num-denom)) whole) (cdr num-denom)))) +(defun scroll-bar-columns (side) + "Return the width, measured in columns, of the vertical scrollbar on SIDE. +SIDE must be the symbol `left' or `right'." + (let* ((wsb (window-scroll-bars)) + (vtype (nth 2 wsb)) + (cols (nth 1 wsb))) + (cond + ((not (memq side '(left right))) + (error "`left' or `right' expected instead of %S" side)) + ((and (eq vtype side) cols)) + ((eq (frame-parameter nil 'vertical-scroll-bars) side) + ;; nil means it's a non-toolkit scroll bar, and its width in + ;; columns is 14 pixels rounded up. + (ceiling (or (frame-parameter nil 'scroll-bar-width) 14) + (frame-char-width))) + (0)))) + ;;;; Helpful functions for enabling and disabling scroll bars. @@ -87,10 +104,7 @@ This is nil while loading `scroll-bar.el', and t afterward.") (list (cons 'vertical-scroll-bars scroll-bar-mode))) (setq frames (cdr frames)))))) -(defcustom scroll-bar-mode - (cond ((eq system-type 'windows-nt) 'right) - ((featurep 'mac-carbon) 'right) - (t 'left)) +(defcustom scroll-bar-mode default-frame-scroll-bars "*Specify whether to have vertical scroll bars, and on which side. Possible values are nil (no scroll bars), `left' (scroll bars on left) and `right' (scroll bars on right). @@ -117,14 +131,13 @@ created in the future. With a numeric argument, if the argument is negative, turn off scroll bars; otherwise, turn on scroll bars." (interactive "P") - (if flag (setq flag (prefix-numeric-value flag))) ;; Tweedle the variable according to the argument. - (set-scroll-bar-mode (if (null flag) (not scroll-bar-mode) - (and (or (not (numberp flag)) (>= flag 0)) - (cond ((eq system-type 'windows-nt) 'right) - ((featurep 'mac-carbon) 'right) - (t 'left)))))) + (set-scroll-bar-mode (if (if (null flag) + (not scroll-bar-mode) + (setq flag (prefix-numeric-value flag)) + (or (not (numberp flag)) (>= flag 0))) + default-frame-scroll-bars))) (defun toggle-scroll-bar (arg) "Toggle whether or not the selected frame has vertical scroll bars. @@ -142,10 +155,7 @@ when they are turned on; if it is nil, they go on the left." (selected-frame) (list (cons 'vertical-scroll-bars (if (> arg 0) - (or scroll-bar-mode - (cond ((eq system-type 'windows-nt) 'right) - ((featurep 'mac-carbon) 'right) - (t 'left)))))))) + (or scroll-bar-mode default-frame-scroll-bars)))))) (defun toggle-horizontal-scroll-bar (arg) "Toggle whether or not the selected frame has horizontal scroll bars. @@ -358,4 +368,5 @@ EVENT should be a scroll bar click." (provide 'scroll-bar) +;;; arch-tag: 6f1d01d0-0b1e-4bf8-86db-d491e0f399f3 ;;; scroll-bar.el ends here diff --git a/lisp/select.el b/lisp/select.el index f679b27805..01b227d871 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -389,4 +389,5 @@ This function returns the string \"emacs\"." (provide 'select) +;;; arch-tag: bb634f97-8a3b-4b0a-b940-f6e09982328c ;;; select.el ends here diff --git a/lisp/server.el b/lisp/server.el index 36cad64dde..fe2fc0f59f 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1,6 +1,6 @@ ;;; server.el --- Lisp code for GNU Emacs running as server process -;; Copyright (C) 1986,87,92,94,95,96,97,98,99,2000,01,02,2003 +;; Copyright (C) 1986,87,92,94,95,96,97,98,99,2000,01,02,03,2004 ;; Free Software Foundation, Inc. ;; Author: William Sommerfeld @@ -159,9 +159,10 @@ This means that the server should not kill the buffer when you say you are done with it in the server.") (make-variable-buffer-local 'server-existing-buffer) -(defvar server-socket-name - (format "/tmp/emacs%d-%s/server" (user-uid) - (substring (system-name) 0 (string-match "\\." (system-name))))) +(defvar server-name "server") + +(defvar server-socket-dir + (format "/tmp/emacs%d" (user-uid))) (defun server-log (string &optional client) "If a *server* buffer exists, write STRING to it for logging purposes." @@ -247,12 +248,14 @@ Emacs distribution as your standard \"editor\". Prefix arg means just kill any existing server communications subprocess." (interactive "P") ;; Make sure there is a safe directory in which to place the socket. - (server-ensure-safe-dir (file-name-directory server-socket-name)) + (server-ensure-safe-dir server-socket-dir) ;; kill it dead! (if server-process (condition-case () (delete-process server-process) (error nil))) ;; Delete the socket files made by previous server invocations. - (condition-case () (delete-file server-socket-name) (error nil)) + (condition-case () + (delete-file (expand-file-name server-name server-socket-dir)) + (error nil)) ;; If this Emacs already had a server, clear out associated status. (while server-clients (let ((buffer (nth 1 (car server-clients)))) @@ -264,7 +267,7 @@ Prefix arg means just kill any existing server communications subprocess." (setq server-process (make-network-process :name "server" :family 'local :server t :noquery t - :service server-socket-name + :service (expand-file-name server-name server-socket-dir) :sentinel 'server-sentinel :filter 'server-process-filter ;; We must receive file names without being decoded. ;; Those are decoded by server-process-filter according @@ -302,6 +305,7 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"." client nowait eval (files nil) (lineno 1) + (tmp-frame nil) ; Sometimes used to embody the selected display. (columnno 0)) ;; Remove this line from STRING. (setq string (substring string (match-end 0))) @@ -316,7 +320,7 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"." (let ((display (server-unquote-arg (match-string 1 request)))) (setq request (substring request (match-end 0))) (condition-case err - (server-select-display display) + (setq tmp-frame (server-select-display display)) (error (process-send-string proc (nth 1 err)) (setq request ""))))) ;; ARG is a line number option. @@ -363,7 +367,9 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"." (run-hooks 'server-switch-hook) (unless nowait (message (substitute-command-keys - "When done with a buffer, type \\[server-edit]"))))))) + "When done with a buffer, type \\[server-edit]"))))) + ;; Avoid preserving the connection after the last real frame is deleted. + (if tmp-frame (delete-frame tmp-frame)))) ;; Save for later any partial line that remains. (when (> (length string) 0) (process-put proc 'previous-string string))) @@ -624,4 +630,5 @@ Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it." (provide 'server) +;;; arch-tag: 1f7ecb42-f00a-49f8-906d-61995d84c8d6 ;;; server.el ends here diff --git a/lisp/ses.el b/lisp/ses.el index 6341e76ed9..a5cc6bf657 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1,6 +1,6 @@ -;;;; ses.el -- Simple Emacs Spreadsheet +;;; ses.el -- Simple Emacs Spreadsheet -;; Copyright (C) 2002 Free Software Foundation, Inc. +;; Copyright (C) 2002,03,04 Free Software Foundation, Inc. ;; Author: Jonathan Yavner ;; Maintainer: Jonathan Yavner @@ -24,11 +24,12 @@ ;; Boston, MA 02111-1307, USA. ;;; To-do list: +;; * Use $ or … for truncated fields +;; * Add command to make a range of columns be temporarily invisible. +;; * Allow paste of one cell to a range of cells -- copy formula to each. ;; * Do something about control characters & octal codes in cell print -;; areas. Currently they distort the columnar appearance, but fixing them -;; seems like too much work? Use text-char-description? +;; areas. Use string-width? ;; * Input validation functions. How specified? -;; * Menubar and popup menus. ;; * Faces (colors & styles) in print cells. ;; * Move a column by dragging its letter in the header line. ;; * Left-margin column for row number. @@ -87,16 +88,119 @@ usually runs a cursor-movement function. Each function is called with ARG=1." (defvar ses-read-printer-history nil "List of printer functions that have been typed in.") -(defvar ses-mode-map nil - "Local keymap for Simple Emacs Spreadsheet.") +(easy-menu-define ses-header-line-menu nil + "Context menu when mouse-3 is used on the header-line in an SES buffer." + '("SES header row" + ["Set current row" ses-set-header-row t] + ["Unset row" ses-unset-header-row (> header-row 0)])) -(defvar ses-mode-print-map nil - "Local keymap for SES print area.") +(defconst ses-mode-map + (let ((keys `("\C-c\M-\C-l" ses-reconstruct-all + "\C-c\C-l" ses-recalculate-all + "\C-c\C-n" ses-renarrow-buffer + "\C-c\C-c" ses-recalculate-cell + "\C-c\M-\C-s" ses-sort-column + "\C-c\M-\C-h" ses-set-header-row + "\C-c\C-t" ses-truncate-cell + "\C-c\C-j" ses-jump + "\C-c\C-p" ses-read-default-printer + "\M-\C-l" ses-reprint-all + [?\S-\C-l] ses-reprint-all + [header-line down-mouse-3] ,ses-header-line-menu + [header-line mouse-2] ses-sort-column-click)) + (newmap (make-sparse-keymap))) + (while keys + (define-key (1value newmap) (car keys) (cadr keys)) + (setq keys (cddr keys))) + newmap) + "Local keymap for Simple Emacs Spreadsheet.") -(defvar ses-mode-edit-map nil +(easy-menu-define ses-menu ses-mode-map + "Menu bar menu for SES." + '("SES" + ["Insert row" ses-insert-row (ses-in-print-area)] + ["Delete row" ses-delete-row (ses-in-print-area)] + ["Insert column" ses-insert-column (ses-in-print-area)] + ["Delete column" ses-delete-column (ses-in-print-area)] + ["Set column printer" ses-read-column-printer t] + ["Set column width" ses-set-column-width t] + ["Set default printer" ses-read-default-printer t] + ["Jump to cell" ses-jump t] + ["Set cell printer" ses-read-cell-printer t] + ["Recalculate cell" ses-recalculate-cell t] + ["Truncate cell display" ses-truncate-cell t] + ["Export values" ses-export-tsv t] + ["Export formulas" ses-export-tsf t])) + +(defconst ses-mode-edit-map + (let ((keys '("\C-c\C-r" ses-insert-range + "\C-c\C-s" ses-insert-ses-range + [S-mouse-3] ses-insert-range-click + [C-S-mouse-3] ses-insert-ses-range-click + "\M-\C-i" lisp-complete-symbol)) + (newmap (make-sparse-keymap))) + (set-keymap-parent newmap minibuffer-local-map) + (while keys + (define-key newmap (car keys) (cadr keys)) + (setq keys (cddr keys))) + newmap) "Local keymap for SES minibuffer cell-editing.") -;Key map used for 'x' key. +;Local keymap for SES print area +(defalias 'ses-mode-print-map + (let ((keys '([backtab] backward-char + [tab] ses-forward-or-insert + "\C-i" ses-forward-or-insert ;Needed for ses-coverage.el? + "\M-o" ses-insert-column + "\C-o" ses-insert-row + "\C-m" ses-edit-cell + "\M-k" ses-delete-column + "\M-y" ses-yank-pop + "\C-k" ses-delete-row + "\C-j" ses-append-row-jump-first-column + "\M-h" ses-mark-row + "\M-H" ses-mark-column + "\C-d" ses-clear-cell-forward + "\C-?" ses-clear-cell-backward + "(" ses-read-cell + "\"" ses-read-cell + "'" ses-read-symbol + "=" ses-edit-cell + "j" ses-jump + "p" ses-read-cell-printer + "w" ses-set-column-width + "x" ses-export-keymap + "\M-p" ses-read-column-printer)) + (repl '(;;We'll replace these wherever they appear in the keymap + clipboard-kill-region ses-kill-override + end-of-line ses-end-of-line + kill-line ses-delete-row + kill-region ses-kill-override + open-line ses-insert-row)) + (numeric "0123456789.-") + (newmap (make-keymap))) + ;;Get rid of printables + (suppress-keymap newmap t) + ;;These keys insert themselves as the beginning of a numeric value + (dotimes (x (length numeric)) + (define-key newmap (substring numeric x (1+ x)) 'ses-read-cell)) + ;;Override these global functions wherever they're bound + (while repl + (substitute-key-definition (car repl) (cadr repl) newmap + (current-global-map)) + (setq repl (cddr repl))) + ;;Apparently substitute-key-definition doesn't catch this? + (define-key newmap [(menu-bar) edit cut] 'ses-kill-override) + ;;Define our other local keys + (while keys + (define-key newmap (car keys) (cadr keys)) + (setq keys (cddr keys))) + newmap)) + +;;Helptext for ses-mode wants keymap as variable, not function +(defconst ses-mode-print-map (symbol-function 'ses-mode-print-map)) + +;;Key map used for 'x' key. (defalias 'ses-export-keymap (let ((map (make-sparse-keymap "SES export"))) (define-key map "T" (cons " tab-formulas" 'ses-export-tsf)) @@ -132,8 +236,9 @@ usually runs a cursor-movement function. Each function is called with ARG=1." REFERENCES.") (defconst ses-paramlines-plist - '(column-widths 2 col-printers 3 default-printer 4 header-row 5 - file-format 8 numrows 9 numcols 10) + '(ses--col-widths 2 ses--col-printers 3 ses--default-printer 4 + ses--header-row 5 ses--file-format 8 ses--numrows 9 + ses--numcols 10) "Offsets from last cell line to various parameter lines in the data area of a spreadsheet.") @@ -150,11 +255,13 @@ default printer and then modify its output.") (eval-and-compile (defconst ses-localvars - '(blank-line cells col-printers column-widths curcell curcell-overlay - default-printer deferred-narrow deferred-recalc deferred-write - file-format header-hscroll header-row header-string linewidth - mode-line-process next-line-add-newlines numcols numrows - symbolic-formulas transient-mark-mode) + '(ses--blank-line ses--cells ses--col-printers ses--col-widths ses--curcell + ses--curcell-overlay ses--default-printer ses--deferred-narrow + ses--deferred-recalc ses--deferred-write ses--file-format + ses--header-hscroll ses--header-row ses--header-string ses--linewidth + ses--numcols ses--numrows ses--symbolic-formulas + ;;Global variables that we override + mode-line-process next-line-add-newlines transient-mark-mode) "Buffer-local variables used by SES.")) ;;When compiling, create all the buffer locals and give them values @@ -195,7 +302,7 @@ when to emit a progress message.") (defmacro ses-get-cell (row col) "Return the cell structure that stores information about cell (ROW,COL)." - `(aref (aref cells ,row) ,col)) + `(aref (aref ses--cells ,row) ,col)) (defmacro ses-cell-symbol (row &optional col) "From a CELL or a pair (ROW,COL), get the symbol that names the local-variable holding its value. (0,0) => A1." @@ -220,11 +327,11 @@ functions refer to its value." (defmacro ses-col-width (col) "Return the width for column COL." - `(aref column-widths ,col)) + `(aref ses--col-widths ,col)) (defmacro ses-col-printer (col) "Return the default printer for column COL." - `(aref col-printers ,col)) + `(aref ses--col-printers ,col)) (defmacro ses-sym-rowcol (sym) "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result @@ -246,7 +353,7 @@ PRINTER are deferred until first use." (stringp printer) (eq safe-functions t) (setq printer `(ses-safe-printer ,printer))) - (aset (aref cells (car rowcol)) + (aset (aref ses--cells (car rowcol)) (cdr rowcol) (vector sym formula printer references))) (set sym value) @@ -255,39 +362,39 @@ PRINTER are deferred until first use." (defmacro ses-column-widths (widths) "Load the vector of column widths from the spreadsheet file. This is a macro to prevent propagate-on-load viruses." - (or (and (vectorp widths) (= (length widths) numcols)) + (or (and (vectorp widths) (= (length widths) ses--numcols)) (error "Bad column-width vector")) ;;To save time later, we also calculate the total width of each line in the ;;print area (excluding the terminating newline) - (setq column-widths widths - linewidth (apply '+ -1 (mapcar '1+ widths)) - blank-line (concat (make-string linewidth ? ) "\n")) + (setq ses--col-widths widths + ses--linewidth (apply '+ -1 (mapcar '1+ widths)) + ses--blank-line (concat (make-string ses--linewidth ? ) "\n")) t) (defmacro ses-column-printers (printers) "Load the vector of column printers from the spreadsheet file and checks them for safety. This is a macro to prevent propagate-on-load viruses." - (or (and (vectorp printers) (= (length printers) numcols)) + (or (and (vectorp printers) (= (length printers) ses--numcols)) (error "Bad column-printers vector")) - (dotimes (x numcols) + (dotimes (x ses--numcols) (aset printers x (ses-safe-printer (aref printers x)))) - (setq col-printers printers) + (setq ses--col-printers printers) (mapc 'ses-printer-record printers) t) (defmacro ses-default-printer (def) "Load the global default printer from the spreadsheet file and checks it for safety. This is a macro to prevent propagate-on-load viruses." - (setq default-printer (ses-safe-printer def)) + (setq ses--default-printer (ses-safe-printer def)) (ses-printer-record def) t) (defmacro ses-header-row (row) "Load the header row from the spreadsheet file and checks it for safety. This is a macro to prevent propagate-on-load viruses." - (or (and (wholenump row) (< row numrows)) + (or (and (wholenump row) (< row ses--numrows)) (error "Bad header-row")) - (setq header-row row) + (setq ses--header-row row) t) (defmacro ses-dotimes-msg (spec msg &rest body) @@ -405,7 +512,7 @@ checking that it is a valid printer function." for this spreadsheet." (when (and (eq (car-safe formula) 'quote) (symbolp (cadr formula))) - (add-to-list 'symbolic-formulas + (add-to-list 'ses--symbolic-formulas (list (symbol-name (cadr formula)))))) (defun ses-column-letter (col) @@ -451,7 +558,7 @@ for this spreadsheet." "Flags the header string for update. Upon undo, the header string will be updated again." (push '(ses-reset-header-string) buffer-undo-list) - (setq header-hscroll -1)) + (setq ses--header-hscroll -1)) ;;Split this code off into a function to avoid coverage-testing difficulties (defun ses-time-check (format arg) @@ -480,7 +587,7 @@ cell (ROW,COL). This is undoable. The cell's data will be updated through (ses-set-with-undo (ses-cell-symbol cell) val) (ses-aset-with-undo cell elt val))) (if change - (add-to-list 'deferred-write (cons row col)))) + (add-to-list 'ses--deferred-write (cons row col)))) nil) ;Make coverage-tester happy (defun ses-cell-set-formula (row col formula) @@ -496,7 +603,7 @@ means Emacs will crash if FORMULA contains a circular list." (newref (ses-formula-references formula)) (inhibit-quit t) x xrow xcol) - (add-to-list 'deferred-recalc sym) + (add-to-list 'ses--deferred-recalc sym) ;;Delete old references from this cell. Skip the ones that are also ;;in the new list. (dolist (ref oldref) @@ -542,10 +649,10 @@ the old and FORCE is nil." ;;Don't lose the *skip* - previous field spans this one (setq newval '*skip*)) (when (or force (not (eq newval oldval))) - (add-to-list 'deferred-write (cons row col)) ;In case force=t + (add-to-list 'ses--deferred-write (cons row col)) ;In case force=t (ses-set-cell row col 'value newval) (dolist (ref (ses-cell-references cell)) - (add-to-list 'deferred-recalc ref)))) + (add-to-list 'ses--deferred-recalc ref)))) (setq printer-error (ses-print-cell row col)) (or formula-error printer-error))) @@ -558,31 +665,31 @@ the old and FORCE is nil." "Recalculate cells in LIST, checking for dependency loops. Prints progress messages every second. Dependent cells are not recalculated if the cell's value is unchanged if FORCE is nil." - (let ((deferred-recalc list) - (nextlist list) - (pos (point)) + (let ((ses--deferred-recalc list) + (nextlist list) + (pos (point)) curlist prevlist rowcol formula) (with-temp-message " " - (while (and deferred-recalc (not (equal nextlist prevlist))) + (while (and ses--deferred-recalc (not (equal nextlist prevlist))) ;;In each loop, recalculate cells that refer only to other cells that ;;have already been recalculated or aren't in the recalculation ;;region. Repeat until all cells have been processed or until the ;;set of cells being worked on stops changing. (if prevlist (message "Recalculating... (%d cells left)" - (length deferred-recalc))) - (setq curlist deferred-recalc - deferred-recalc nil - prevlist nextlist) + (length ses--deferred-recalc))) + (setq curlist ses--deferred-recalc + ses--deferred-recalc nil + prevlist nextlist) (while curlist (setq rowcol (ses-sym-rowcol (car curlist)) formula (ses-cell-formula (car rowcol) (cdr rowcol))) (or (catch 'ref (dolist (ref (ses-formula-references formula)) (when (or (memq ref curlist) - (memq ref deferred-recalc)) + (memq ref ses--deferred-recalc)) ;;This cell refers to another that isn't done yet - (add-to-list 'deferred-recalc (car curlist)) + (add-to-list 'ses--deferred-recalc (car curlist)) (throw 'ref t)))) ;;ses-update-cells is called from post-command-hook, so ;;inhibit-quit is implicitly bound to t. @@ -591,19 +698,19 @@ if the cell's value is unchanged if FORCE is nil." (error "Quit")) (ses-calculate-cell (car rowcol) (cdr rowcol) force)) (setq curlist (cdr curlist))) - (dolist (ref deferred-recalc) + (dolist (ref ses--deferred-recalc) (add-to-list 'nextlist ref)) (setq nextlist (sort (copy-sequence nextlist) 'string<)) (if (equal nextlist prevlist) ;;We'll go around the loop one more time. (add-to-list 'nextlist t))) - (when deferred-recalc + (when ses--deferred-recalc ;;Just couldn't finish these - (dolist (x deferred-recalc) + (dolist (x ses--deferred-recalc) (let ((rowcol (ses-sym-rowcol x))) (ses-set-cell (car rowcol) (cdr rowcol) 'value '*error*) (1value (ses-print-cell (car rowcol) (cdr rowcol))))) - (error "Circular references: %s" deferred-recalc)) + (error "Circular references: %s" ses--deferred-recalc)) (message " ")) ;;Can't use save-excursion here: if the cell under point is ;;updated, save-excusion's marker will move past the cell. @@ -614,46 +721,50 @@ if the cell's value is unchanged if FORCE is nil." ;;;; The print area ;;;---------------------------------------------------------------------------- +(defun ses-in-print-area () + "Returns t if point is in print area of spreadsheet." + (eq (get-text-property (point) 'keymap) 'ses-mode-print-map)) + ;;;We turn off point-motion-hooks and explicitly position the cursor, in case ;;;the intangible properties have gotten screwed up (e.g., when ;;;ses-goto-print is called during a recursive ses-print-cell). (defun ses-goto-print (row col) "Move point to print area for cell (ROW,COL)." (let ((inhibit-point-motion-hooks t)) - (goto-char 1) + (goto-char (point-min)) (forward-line row) (dotimes (c col) (forward-char (1+ (ses-col-width c)))))) (defun ses-set-curcell () - "Sets `curcell' to the current cell symbol, or a cons (BEG,END) for a + "Sets `ses--curcell' to the current cell symbol, or a cons (BEG,END) for a region, or nil if cursor is not at a cell." (if (or (not mark-active) deactivate-mark (= (region-beginning) (region-end))) ;;Single cell - (setq curcell (get-text-property (point) 'intangible)) + (setq ses--curcell (get-text-property (point) 'intangible)) ;;Range (let ((bcell (get-text-property (region-beginning) 'intangible)) (ecell (get-text-property (1- (region-end)) 'intangible))) - (setq curcell (if (and bcell ecell) - (cons bcell ecell) - nil)))) + (setq ses--curcell (if (and bcell ecell) + (cons bcell ecell) + nil)))) nil) (defun ses-check-curcell (&rest args) - "Signal an error if curcell is inappropriate. The end marker is + "Signal an error if ses--curcell is inappropriate. The end marker is appropriate if some argument is 'end. A range is appropriate if some argument is 'range. A single cell is appropriate unless some argument is 'needrange." - (if (eq curcell t) + (if (eq ses--curcell t) ;;curcell recalculation was postponed, but user typed ahead (ses-set-curcell)) (cond - ((not curcell) + ((not ses--curcell) (or (memq 'end args) (error "Not at cell"))) - ((consp curcell) + ((consp ses--curcell) (or (memq 'range args) (memq 'needrange args) (error "Can't use a range"))) @@ -689,7 +800,7 @@ preceding cell has spilled over." ;;Print the value (setq text (ses-call-printer (or printer (ses-col-printer col) - default-printer) + ses--default-printer) value)) (if (consp ses-call-printer-return) ;;Printer returned an error @@ -708,7 +819,7 @@ preceding cell has spilled over." ;;Spill over into following cells, if possible (let ((maxwidth width)) (while (and (> len maxwidth) - (< maxcol numcols) + (< maxcol ses--numcols) (or (not (setq x (ses-cell-value row maxcol))) (eq x '*skip*))) (unless x @@ -720,11 +831,23 @@ preceding cell has spilled over." ;;Fill to complete width of all the fields spanned (setq text (concat text (make-string (- maxwidth len) ? ))) ;;Not enough room to end of line or next non-nil field. Truncate - ;;if string; otherwise fill with error indicator + ;;if string or decimal; otherwise fill with error indicator (setq sig `(error "Too wide" ,text)) - (if (stringp value) - (setq text (substring text 0 maxwidth)) - (setq text (make-string maxwidth ?#)))))))) + (cond + ((stringp value) + (setq text (substring text 0 maxwidth))) + ((and (numberp value) + (string-match "\\.[0-9]+" text) + (>= 0 (setq width + (- len maxwidth + (- (match-end 0) (match-beginning 0)))))) + ;; Turn 6.6666666666e+49 into 6.66e+49. Rounding is too hard! + (setq text (concat (substring text + 0 + (- (match-beginning 0) width)) + (substring text (match-end 0))))) + (t + (setq text (make-string maxwidth ?#))))))))) ;;Substitute question marks for tabs and newlines. Newlines are ;;used as row-separators; tabs could confuse the reimport logic. (setq text (replace-regexp-in-string "[\t\n]" "?" text)) @@ -736,7 +859,7 @@ preceding cell has spilled over." (delete-char (1+ (length text))) ;;We use concat instead of inserting separate strings in order to ;;reduce the number of cells in the undo list. - (setq x (concat text (if (< maxcol numcols) " " "\n"))) + (setq x (concat text (if (< maxcol ses--numcols) " " "\n"))) ;;We use set-text-properties to prevent a wacky print function ;;from inserting rogue properties, and to ensure that the keymap ;;property is inherited (is it a bug that only unpropertied strings @@ -747,15 +870,16 @@ preceding cell has spilled over." (ses-cell-symbol cell)) (when (and (zerop row) (zerop col)) ;;Reconstruct special beginning-of-buffer attributes - (put-text-property 1 (point) 'keymap 'ses-mode-print-map) - (put-text-property 1 (point) 'read-only 'ses) - (put-text-property 1 2 'front-sticky t))) - (if (= row (1- header-row)) + (put-text-property (point-min) (point) 'keymap 'ses-mode-print-map) + (put-text-property (point-min) (point) 'read-only 'ses) + (put-text-property (point-min) (1+ (point-min)) 'front-sticky t))) + (if (= row (1- ses--header-row)) ;;This line is part of the header - force recalc (ses-reset-header-string)) ;;If this cell (or a preceding one on the line) previously spilled over ;;and has gotten shorter, redraw following cells on line recursively. - (when (and (< maxcol numcols) (eq (ses-cell-value row maxcol) '*skip*)) + (when (and (< maxcol ses--numcols) + (eq (ses-cell-value row maxcol) '*skip*)) (ses-set-cell row maxcol 'value nil) (ses-print-cell row maxcol)) ;;Return to start of cell @@ -796,12 +920,12 @@ COL=NUMCOLS. Deletes characters if CHANGE < 0. Caller should bind inhibit-quit to t." (let ((inhibit-read-only t) (blank (if (> change 0) (make-string change ? ))) - (at-end (= col numcols))) - (ses-set-with-undo 'linewidth (+ linewidth change)) + (at-end (= col ses--numcols))) + (ses-set-with-undo 'ses--linewidth (+ ses--linewidth change)) ;;ses-set-with-undo always returns t for strings. - (1value (ses-set-with-undo 'blank-line - (concat (make-string linewidth ? ) "\n"))) - (dotimes (row numrows) + (1value (ses-set-with-undo 'ses--blank-line + (concat (make-string ses--linewidth ? ) "\n"))) + (dotimes (row ses--numrows) (ses-goto-print row col) (when at-end ;;Insert new columns before newline @@ -829,21 +953,22 @@ cell (ROW,COL) has changed." ;;;---------------------------------------------------------------------------- (defun ses-goto-data (def &optional col) - "Move point to data area for (DEF,COL). If DEF is a row number, COL is the -column number for a data cell -- otherwise DEF is one of the symbols -column-widths, col-printers, default-printer, numrows, or numcols." + "Move point to data area for (DEF,COL). If DEF is a row +number, COL is the column number for a data cell -- otherwise DEF +is one of the symbols ses--col-widths, ses--col-printers, +ses--default-printer, ses--numrows, or ses--numcols." (if (< (point-max) (buffer-size)) - (setq deferred-narrow t)) + (setq ses--deferred-narrow t)) (widen) (let ((inhibit-point-motion-hooks t)) ;In case intangible attrs are wrong - (goto-char 1) + (goto-char (point-min)) (if col ;;It's a cell - (forward-line (+ numrows 2 (* def (1+ numcols)) col)) + (forward-line (+ ses--numrows 2 (* def (1+ ses--numcols)) col)) ;;Convert def-symbol to offset (setq def (plist-get ses-paramlines-plist def)) (or def (signal 'args-out-of-range nil)) - (forward-line (+ (* numrows (+ numcols 2)) def))))) + (forward-line (+ (* ses--numrows (+ ses--numcols 2)) def))))) (defun ses-set-parameter (def value &optional elem) "Sets parameter DEF to VALUE (with undo) and writes the value to the data @@ -858,19 +983,19 @@ be set to VALUE." (ses-aset-with-undo (symbol-value def) elem value) (ses-set-with-undo def value)) (let ((inhibit-read-only t) - (fmt (plist-get '(column-widths "(ses-column-widths %S)" - col-printers "(ses-column-printers %S)" - default-printer "(ses-default-printer %S)" - header-row "(ses-header-row %S)" - file-format " %S ;SES file-format" - numrows " %S ;numrows" - numcols " %S ;numcols") + (fmt (plist-get '(ses--column-widths "(ses-column-widths %S)" + ses--col-printers "(ses-column-printers %S)" + ses--default-printer "(ses-default-printer %S)" + ses--header-row "(ses-header-row %S)" + ses--file-format " %S ;SES file-format" + ses--numrows " %S ;numrows" + ses--numcols " %S ;numcols") def))) (delete-region (point) (line-end-position)) (insert (format fmt (symbol-value def)))))) (defun ses-write-cells () - "`deferred-write' is a list of (ROW,COL) for cells to be written from + "`ses--deferred-write' is a list of (ROW,COL) for cells to be written from buffer-local variables to data area. Newlines in the data are escaped." (let* ((inhibit-read-only t) (print-escape-newlines t) @@ -878,10 +1003,10 @@ buffer-local variables to data area. Newlines in the data are escaped." (setq ses-start-time (float-time)) (with-temp-message " " (save-excursion - (while deferred-write + (while ses--deferred-write (ses-time-check "Writing... (%d cells left)" - '(length deferred-write)) - (setq rowcol (pop deferred-write) + '(length ses--deferred-write)) + (setq rowcol (pop ses--deferred-write) row (car rowcol) col (cdr rowcol) cell (ses-get-cell row col) @@ -1001,7 +1126,7 @@ by (ROWINCR,COLINCR)." (setq row (+ row rowincr) col (+ col colincr)) (if (and (>= row startrow) (>= col startcol) - (< row numrows) (< col numcols)) + (< row ses--numrows) (< col ses--numcols)) ;;Relocate this variable (ses-create-cell-symbol row col) ;;Delete reference to a deleted cell @@ -1038,7 +1163,8 @@ if the range was altered." (if (not max) (if (> rowincr 0) ;;Trying to insert a nonexistent row - (setq max (ses-create-cell-symbol (1- numrows) (cdr minrowcol))) + (setq max (ses-create-cell-symbol (1- ses--numrows) + (cdr minrowcol))) ;;End of range is being deleted (setq max (ses-create-cell-symbol (1- startrow) (cdr minrowcol)) ses-relocate-return 'range)) @@ -1058,7 +1184,8 @@ if the range was altered." (if (not max) (if (> colincr 0) ;;Trying to insert a nonexistent column - (setq max (ses-create-cell-symbol (car maxrowcol) (1- numcols))) + (setq max (ses-create-cell-symbol (car maxrowcol) + (1- ses--numcols))) ;;End of range is being deleted (setq max (ses-create-cell-symbol (car maxrowcol) (1- startcol)) ses-relocate-return 'range)) @@ -1083,8 +1210,8 @@ the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR to each symbol." (let (reform) (let (mycell newval) - (ses-dotimes-msg (row numrows) "Relocating formulas..." - (dotimes (col numcols) + (ses-dotimes-msg (row ses--numrows) "Relocating formulas..." + (dotimes (col ses--numcols) (setq ses-relocate-return nil mycell (ses-get-cell row col) newval (ses-relocate-formula (ses-cell-formula mycell) @@ -1098,7 +1225,7 @@ to each symbol." ;;This cell referred to a cell that's been deleted or is no ;;longer part of the range. We can't fix that now because ;;reference lists cells have been partially updated. - (add-to-list 'deferred-recalc + (add-to-list 'ses--deferred-recalc (ses-create-cell-symbol row col))) (setq newval (ses-relocate-formula (ses-cell-references mycell) minrow mincol rowincr colincr)) @@ -1111,25 +1238,25 @@ to each symbol." (cond ((and (<= rowincr 0) (<= colincr 0)) ;;Deletion of rows and/or columns - (ses-dotimes-msg (row (- numrows minrow)) "Relocating variables..." + (ses-dotimes-msg (row (- ses--numrows minrow)) "Relocating variables..." (setq myrow (+ row minrow)) - (dotimes (col (- numcols mincol)) + (dotimes (col (- ses--numcols mincol)) (setq mycol (+ col mincol) xrow (- myrow rowincr) xcol (- mycol colincr)) - (if (and (< xrow numrows) (< xcol numcols)) + (if (and (< xrow ses--numrows) (< xcol ses--numcols)) (setq oldval (ses-cell-value xrow xcol)) ;;Cell is off the end of the array (setq oldval (symbol-value (ses-create-cell-symbol xrow xcol)))) (ses-set-cell myrow mycol 'value oldval)))) ((and (wholenump rowincr) (wholenump colincr)) ;;Insertion of rows and/or columns. Run the loop backwards. - (let ((disty (1- numrows)) - (distx (1- numcols)) + (let ((disty (1- ses--numrows)) + (distx (1- ses--numcols)) myrow mycol) - (ses-dotimes-msg (row (- numrows minrow)) "Relocating variables..." + (ses-dotimes-msg (row (- ses--numrows minrow)) "Relocating variables..." (setq myrow (- disty row)) - (dotimes (col (- numcols mincol)) + (dotimes (col (- ses--numcols mincol)) (setq mycol (- distx col) xrow (- myrow rowincr) xcol (- mycol colincr)) @@ -1180,7 +1307,8 @@ cdr--its arglist." (if (not (eq major-mode 'ses-mode)) ad-do-it ;;Here is some extra code for SES mode. - (setq deferred-narrow (or deferred-narrow (< (point-max) (buffer-size)))) + (setq ses--deferred-narrow + (or ses--deferred-narrow (< (point-max) (buffer-size)))) (widen) (condition-case x ad-do-it @@ -1229,101 +1357,6 @@ stuff." ;;;; Startup for major mode ;;;---------------------------------------------------------------------------- -(defun ses-build-mode-map () - "Set up `ses-mode-map', `ses-mode-print-map', and `ses-mode-edit-map' with -standard keymap bindings for SES." - (message "Building mode map...") - ;;;Define ses-mode-map - (let ((keys '("\C-c\M-\C-l" ses-reconstruct-all - "\C-c\C-l" ses-recalculate-all - "\C-c\C-n" ses-renarrow-buffer - "\C-c\C-c" ses-recalculate-cell - "\C-c\M-\C-s" ses-sort-column - "\C-c\M-\C-h" ses-read-header-row - "\C-c\C-t" ses-truncate-cell - "\C-c\C-j" ses-jump - "\C-c\C-p" ses-read-default-printer - "\M-\C-l" ses-reprint-all - [?\S-\C-l] ses-reprint-all - [header-line mouse-2] ses-sort-column-click)) - (newmap (make-sparse-keymap))) - (while keys - (define-key (1value newmap) (car keys) (cadr keys)) - (setq keys (cddr keys))) - (setq ses-mode-map (1value newmap))) - ;;;Define ses-mode-print-map - (let ((keys '(;;At least three ways to define shift-tab--and some PC systems - ;;won't generate it at all! - [S-tab] backward-char - [backtab] backward-char - [S-iso-backtab] backward-char - [S-iso-lefttab] backward-char - [tab] ses-forward-or-insert - "\C-i" ses-forward-or-insert ;Needed for ses-coverage.el? - "\M-o" ses-insert-column - "\C-o" ses-insert-row - "\C-m" ses-edit-cell - "\M-k" ses-delete-column - "\M-y" ses-yank-pop - "\C-k" ses-delete-row - "\C-j" ses-append-row-jump-first-column - "\M-h" ses-mark-row - "\M-H" ses-mark-column - "\C-d" ses-clear-cell-forward - "\C-?" ses-clear-cell-backward - "(" ses-read-cell - "\"" ses-read-cell - "'" ses-read-symbol - "=" ses-edit-cell - "j" ses-jump - "p" ses-read-cell-printer - "w" ses-set-column-width - "x" ses-export-keymap - "\M-p" ses-read-column-printer)) - (repl '(;;We'll replace these wherever they appear in the keymap - clipboard-kill-region ses-kill-override - end-of-line ses-end-of-line - kill-line ses-delete-row - kill-region ses-kill-override - open-line ses-insert-row)) - (numeric "0123456789.-") - (newmap (make-keymap))) - ;;Get rid of printables - (suppress-keymap (1value newmap) t) - ;;These keys insert themselves as the beginning of a numeric value - (dotimes (x (length (1value numeric))) - (define-key (1value newmap) - (substring (1value numeric) x (1+ x)) - 'ses-read-cell)) - ;;Override these global functions wherever they're bound - (while repl - (substitute-key-definition (car repl) (cadr repl) - (1value newmap) - (current-global-map)) - (setq repl (cddr repl))) - ;;Apparently substitute-key-definition doesn't catch this? - (define-key (1value newmap) [(menu-bar) edit cut] 'ses-kill-override) - ;;Define our other local keys - (while keys - (define-key (1value newmap) (car keys) (cadr keys)) - (setq keys (cddr keys))) - ;;Keymap property wants the map as a function, not a variable - (fset 'ses-mode-print-map (1value newmap)) - (setq ses-mode-print-map (1value newmap))) - ;;;Define ses-mode-edit-map - (let ((keys '("\C-c\C-r" ses-insert-range - "\C-c\C-s" ses-insert-ses-range - [S-mouse-3] ses-insert-range-click - [C-S-mouse-3] ses-insert-ses-range-click - "\M-\C-i" lisp-complete-symbol)) - (newmap (make-sparse-keymap))) - (1value (set-keymap-parent (1value newmap) (1value minibuffer-local-map))) - (while keys - (define-key (1value newmap) (car keys) (cadr keys)) - (setq keys (cddr keys))) - (setq ses-mode-edit-map (1value newmap))) - (message nil)) - (defun ses-load () "Parse the current buffer and sets up buffer-local variables. Does not execute cell formulas or print functions." @@ -1341,34 +1374,34 @@ execute cell formulas or print functions." (numberp (nth 2 params)) (> (nth 2 params) 0)) (error "Invalid SES file")) - (setq file-format (car params) - numrows (cadr params) - numcols (nth 2 params)) - (when (= file-format 1) + (setq ses--file-format (car params) + ses--numrows (cadr params) + ses--numcols (nth 2 params)) + (when (= ses--file-format 1) (let (buffer-undo-list) ;This is not undoable - (ses-goto-data 'header-row) + (ses-goto-data 'ses--header-row) (insert "(ses-header-row 0)\n") - (ses-set-parameter 'file-format 2) + (ses-set-parameter 'ses--file-format 2) (message "Upgrading from SES-1 file format"))) - (or (= file-format 2) + (or (= ses--file-format 2) (error "This file needs a newer version of the SES library code.")) - (ses-create-cell-variable-range 0 (1- numrows) 0 (1- numcols)) + (ses-create-cell-variable-range 0 (1- ses--numrows) 0 (1- ses--numcols)) ;;Initialize cell array - (setq cells (make-vector numrows nil)) - (dotimes (row numrows) - (aset cells row (make-vector numcols nil)))) + (setq ses--cells (make-vector ses--numrows nil)) + (dotimes (row ses--numrows) + (aset ses--cells row (make-vector ses--numcols nil)))) ;;Skip over print area, which we assume is correct - (goto-char 1) - (forward-line numrows) + (goto-char (point-min)) + (forward-line ses--numrows) (or (looking-at ses-print-data-boundary) (error "Missing marker between print and data areas")) (forward-char (length ses-print-data-boundary)) ;;Initialize printer and symbol lists (mapc 'ses-printer-record ses-standard-printer-functions) - (setq symbolic-formulas nil) + (setq ses--symbolic-formulas nil) ;;Load cell definitions - (dotimes (row numrows) - (dotimes (col numcols) + (dotimes (row ses--numrows) + (dotimes (col ses--numcols) (let* ((x (read (current-buffer))) (rowcol (ses-sym-rowcol (car-safe (cdr-safe x))))) (or (and (looking-at "\n") @@ -1409,7 +1442,7 @@ execute cell formulas or print functions." ;;Check for overall newline count in definitions area (forward-line 3) (let ((start (point))) - (ses-goto-data 'numrows) + (ses-goto-data 'ses--numrows) (or (= (point) start) (error "Extraneous newlines someplace?")))) @@ -1419,28 +1452,28 @@ execute cell formulas or print functions." Narrows the buffer to show only the print area. Gives it `read-only' and `intangible' properties. Sets up highlighting for current cell." (interactive) - (let ((end 1) + (let ((end (point-min)) (inhibit-read-only t) (was-modified (buffer-modified-p)) pos sym) (ses-goto-data 0 0) ;;Include marker between print-area and data-area - (set-text-properties (point) (buffer-size) nil) ;Delete garbage props - (mapc 'delete-overlay (overlays-in 1 (buffer-size))) + (set-text-properties (point) (point-max) nil) ;Delete garbage props + (mapc 'delete-overlay (overlays-in (point-min) (point-max))) ;;The print area is read-only (except for our special commands) and uses a ;;special keymap. - (put-text-property 1 (1- (point)) 'read-only 'ses) - (put-text-property 1 (1- (point)) 'keymap 'ses-mode-print-map) + (put-text-property (point-min) (1- (point)) 'read-only 'ses) + (put-text-property (point-min) (1- (point)) 'keymap 'ses-mode-print-map) ;;For the beginning of the buffer, we want the read-only and keymap ;;attributes to be inherited from the first character - (put-text-property 1 2 'front-sticky t) + (put-text-property (point-min) (1+ (point-min)) 'front-sticky t) ;;Create intangible properties, which also indicate which cell the text ;;came from. - (ses-dotimes-msg (row numrows) "Finding cells..." - (dotimes (col numcols) + (ses-dotimes-msg (row ses--numrows) "Finding cells..." + (dotimes (col ses--numcols) (setq pos end sym (ses-cell-symbol row col)) ;;Include skipped cells following this one - (while (and (< col (1- numcols)) + (while (and (< col (1- ses--numcols)) (eq (ses-cell-value row (1+ col)) '*skip*)) (setq end (+ end (ses-col-width col) 1) col (1+ col))) @@ -1453,8 +1486,8 @@ Narrows the buffer to show only the print area. Gives it `read-only' and (buffer-enable-undo))) ;;Create the underlining overlay. It's impossible for (point) to be 2, ;;because column A must be at least 1 column wide. - (setq curcell-overlay (make-overlay 2 2)) - (overlay-put curcell-overlay 'face 'underline)) + (setq ses--curcell-overlay (make-overlay (1+ (point-min)) (1+ (point-min)))) + (overlay-put ses--curcell-overlay 'face 'underline)) (defun ses-cleanup () "Cleanup when changing a buffer from SES mode to something else. Delete @@ -1464,15 +1497,16 @@ overlay, remove special text properties." (was-modified (buffer-modified-p)) end) ;;Delete read-only, keymap, and intangible properties - (set-text-properties 1 (point-max) nil) + (set-text-properties (point-min) (point-max) nil) ;;Delete overlay - (mapc 'delete-overlay (overlays-in 1 (point-max))) + (mapc 'delete-overlay (overlays-in (point-min) (point-max))) (unless was-modified (set-buffer-modified-p nil)))) ;;;###autoload (defun ses-mode () - "Major mode for Simple Emacs Spreadsheet. See \"ses-readme.txt\" for more info. + "Major mode for Simple Emacs Spreadsheet. +See \"ses-example.ses\" (in the etc data directory) for more info. Key definitions: \\{ses-mode-map} @@ -1481,8 +1515,8 @@ These key definitions are active only in the print area (the visible part): These are active only in the minibuffer, when entering or editing a formula: \\{ses-mode-edit-map}" (interactive) - (unless (and (boundp 'deferred-narrow) - (eq deferred-narrow 'ses-mode)) + (unless (and (boundp 'ses--deferred-narrow) + (eq ses--deferred-narrow 'ses-mode)) (kill-all-local-variables) (mapc 'make-local-variable ses-localvars) (setq major-mode 'ses-mode @@ -1493,23 +1527,22 @@ These are active only in the minibuffer, when entering or editing a formula: show-trailing-whitespace nil ;;Cell ranges do not work reasonably without this transient-mark-mode t) - (unless (and ses-mode-map ses-mode-print-map ses-mode-edit-map) - (ses-build-mode-map)) (1value (add-hook 'change-major-mode-hook 'ses-cleanup nil t)) (1value (add-hook 'before-revert-hook 'ses-cleanup nil t)) - (setq curcell nil - deferred-recalc nil - deferred-write nil - header-hscroll -1 ;Flag for "initial recalc needed" - header-line-format '(:eval (progn - (when (/= (window-hscroll) - header-hscroll) - ;;Reset header-hscroll first, to - ;;avoid recursion problems when - ;;debugging ses-create-header-string - (setq header-hscroll (window-hscroll)) - (ses-create-header-string)) - header-string))) + (setq ses--curcell nil + ses--deferred-recalc nil + ses--deferred-write nil + ses--header-hscroll -1 ;Flag for "initial recalc needed" + header-line-format '(:eval (progn + (when (/= (window-hscroll) + ses--header-hscroll) + ;;Reset ses--header-hscroll first, to + ;;avoid recursion problems when + ;;debugging ses-create-header-string + (setq ses--header-hscroll + (window-hscroll)) + (ses-create-header-string)) + ses--header-string))) (let ((was-empty (zerop (buffer-size))) (was-modified (buffer-modified-p))) (save-excursion @@ -1519,20 +1552,20 @@ These are active only in the minibuffer, when entering or editing a formula: (ses-load) (ses-setup)) (when was-empty - (unless (equal ses-initial-default-printer (1value default-printer)) + (unless (equal ses-initial-default-printer (1value ses--default-printer)) (1value (ses-read-default-printer ses-initial-default-printer))) (unless (= ses-initial-column-width (1value (ses-col-width 0))) (1value (ses-set-column-width 0 ses-initial-column-width))) (ses-set-curcell) - (if (> (car ses-initial-size) (1value numrows)) + (if (> (car ses-initial-size) (1value ses--numrows)) (1value (ses-insert-row (1- (car ses-initial-size))))) - (if (> (cdr ses-initial-size) (1value numcols)) + (if (> (cdr ses-initial-size) (1value ses--numcols)) (1value (ses-insert-column (1- (cdr ses-initial-size))))) (ses-write-cells) - (set-buffer-modified-p was-modified) + (restore-buffer-modified-p was-modified) (buffer-disable-undo) (buffer-enable-undo) - (goto-char 1))) + (goto-char (point-min)))) (use-local-map ses-mode-map) ;;Set the deferred narrowing flag (we can't narrow until after ;;after-find-file completes). If .ses is on the auto-load alist and the @@ -1540,7 +1573,7 @@ These are active only in the minibuffer, when entering or editing a formula: ;;a special flag to detect this (will be reset by ses-command-hook). ;;For find-alternate-file, post-command-hook doesn't get run for some ;;reason, so use an idle timer to make sure. - (setq deferred-narrow 'ses-mode) + (setq ses--deferred-narrow 'ses-mode) (1value (add-hook 'post-command-hook 'ses-command-hook nil t)) (run-with-idle-timer 0.01 nil 'ses-command-hook) (run-hooks 'ses-mode-hook))) @@ -1554,50 +1587,51 @@ writes that have been deferred. If buffer-narrowing has been deferred, narrows the buffer now." (condition-case err (when (eq major-mode 'ses-mode) ;Otherwise, not our buffer anymore - (when deferred-recalc + (when ses--deferred-recalc ;;We reset the deferred list before starting on the recalc -- in case ;;of error, we don't want to retry the recalc after every keystroke! - (let ((old deferred-recalc)) - (setq deferred-recalc nil) + (let ((old ses--deferred-recalc)) + (setq ses--deferred-recalc nil) (ses-update-cells old))) - (if deferred-write + (if ses--deferred-write ;;We don't reset the deferred list before starting -- the most ;;likely error is keyboard-quit, and we do want to keep trying ;;these writes after a quit. (ses-write-cells)) - (when deferred-narrow + (when ses--deferred-narrow ;;We're not allowed to narrow the buffer until after-find-file has ;;read the local variables at the end of the file. Now it's safe to ;;do the narrowing. (save-excursion - (goto-char 1) - (forward-line numrows) - (narrow-to-region 1 (point))) - (setq deferred-narrow nil)) + (goto-char (point-min)) + (forward-line ses--numrows) + (narrow-to-region (point-min) (point))) + (setq ses--deferred-narrow nil)) ;;Update the modeline - (let ((oldcell curcell)) + (let ((oldcell ses--curcell)) (ses-set-curcell) - (unless (eq curcell oldcell) + (unless (eq ses--curcell oldcell) (cond - ((not curcell) + ((not ses--curcell) (setq mode-line-process nil)) - ((atom curcell) - (setq mode-line-process (list " cell " (symbol-name curcell)))) + ((atom ses--curcell) + (setq mode-line-process (list " cell " + (symbol-name ses--curcell)))) (t (setq mode-line-process (list " range " - (symbol-name (car curcell)) + (symbol-name (car ses--curcell)) "-" - (symbol-name (cdr curcell)))))) + (symbol-name (cdr ses--curcell)))))) (force-mode-line-update))) ;;Use underline overlay for single-cells only, turn off otherwise - (if (listp curcell) - (move-overlay curcell-overlay 2 2) + (if (listp ses--curcell) + (move-overlay ses--curcell-overlay 2 2) (let ((next (next-single-property-change (point) 'intangible))) - (move-overlay curcell-overlay (point) (1- next)))) + (move-overlay ses--curcell-overlay (point) (1- next)))) (when (not (pos-visible-in-window-p)) ;;Scrolling will happen later (run-with-idle-timer 0.01 nil 'ses-command-hook) - (setq curcell t))) + (setq ses--curcell t))) ;;Prevent errors in this post-command-hook from silently erasing the hook! (error (unless executing-kbd-macro @@ -1621,23 +1655,23 @@ narrows the buffer now." (+ left-fringe left-scrollbar))) (defun ses-create-header-string () - "Sets up `header-string' as the buffer's header line, based on the + "Sets up `ses--header-string' as the buffer's header line, based on the current set of columns and window-scroll position." (let* ((left-offset (ses-header-string-left-offset)) (totwidth (- left-offset (window-hscroll))) result width result x) ;;Leave room for the left-side fringe and scrollbar (push (make-string left-offset ? ) result) - (dotimes (col numcols) + (dotimes (col ses--numcols) (setq width (ses-col-width col) totwidth (+ totwidth width 1)) (if (= totwidth (+ left-offset 1)) ;;Scrolled so intercolumn space is leftmost (push " " result)) (when (> totwidth (+ left-offset 1)) - (if (> header-row 0) + (if (> ses--header-row 0) (save-excursion - (ses-goto-print (1- header-row) col) + (ses-goto-print (1- ses--header-row) col) (setq x (buffer-substring-no-properties (point) (+ (point) width))) (if (>= width (- totwidth left-offset)) @@ -1653,11 +1687,11 @@ current set of columns and window-scroll position." ;;Coverage test ignores properties, thinks this is always a space! (push (1value (propertize " " 'display `((space :align-to ,totwidth)))) result))) - (if (> header-row 0) - (push (propertize (format " [row %d]" header-row) + (if (> ses--header-row 0) + (push (propertize (format " [row %d]" ses--header-row) 'display '((height (- 1)))) result)) - (setq header-string (apply 'concat (nreverse result))))) + (setq ses--header-string (apply 'concat (nreverse result))))) ;;;---------------------------------------------------------------------------- @@ -1685,23 +1719,23 @@ print area if NONARROW is nil." (interactive "*P") (widen) (unless nonarrow - (setq deferred-narrow t)) + (setq ses--deferred-narrow t)) (let ((startcell (get-text-property (point) 'intangible)) (inhibit-read-only t)) (ses-begin-change) - (goto-char 1) + (goto-char (point-min)) (search-forward ses-print-data-boundary) (backward-char (length ses-print-data-boundary)) - (delete-region 1 (point)) + (delete-region (point-min) (point)) ;;Insert all blank lines before printing anything, so ses-print-cell can ;;find the data area when inserting or deleting *skip* values for cells - (dotimes (row numrows) - (insert-and-inherit blank-line)) - (ses-dotimes-msg (row numrows) "Reprinting..." + (dotimes (row ses--numrows) + (insert-and-inherit ses--blank-line)) + (ses-dotimes-msg (row ses--numrows) "Reprinting..." (if (eq (ses-cell-value row 0) '*skip*) ;;Column deletion left a dangling skip (ses-set-cell row 0 'value nil)) - (dotimes (col numcols) + (dotimes (col ses--numcols) (ses-print-cell row col)) (beginning-of-line 2)) (ses-jump-safe startcell))) @@ -1718,12 +1752,12 @@ to are recalculated first." (ses-begin-change) (let (sig) (setq ses-start-time (float-time)) - (if (atom curcell) - (setq sig (ses-sym-rowcol curcell) + (if (atom ses--curcell) + (setq sig (ses-sym-rowcol ses--curcell) sig (ses-calculate-cell (car sig) (cdr sig) t)) ;;First, recalculate all cells that don't refer to other cells and ;;produce a list of cells with references. - (ses-dorange curcell + (ses-dorange ses--curcell (ses-time-check "Recalculating... %s" '(ses-cell-symbol row col)) (condition-case nil (progn @@ -1733,26 +1767,27 @@ to are recalculated first." (setq sig (ses-calculate-cell row col t))) (wrong-type-argument ;;The formula contains a reference - (add-to-list 'deferred-recalc (ses-cell-symbol row col)))))) + (add-to-list 'ses--deferred-recalc (ses-cell-symbol row col)))))) ;;Do the update now, so we can force recalculation - (let ((x deferred-recalc)) - (setq deferred-recalc nil) + (let ((x ses--deferred-recalc)) + (setq ses--deferred-recalc nil) (condition-case hold (ses-update-cells x t) (error (setq sig hold)))) (cond (sig (message (error-message-string sig))) - ((consp curcell) + ((consp ses--curcell) (message " ")) (t - (princ (symbol-value curcell)))))) + (princ (symbol-value ses--curcell)))))) (defun ses-recalculate-all () "Recalculate and reprint all cells." (interactive "*") - (let ((startcell (get-text-property (point) 'intangible)) - (curcell (cons 'A1 (ses-cell-symbol (1- numrows) (1- numcols))))) + (let ((startcell (get-text-property (point) 'intangible)) + (ses--curcell (cons 'A1 (ses-cell-symbol (1- ses--numrows) + (1- ses--numcols))))) (ses-recalculate-cell) (ses-jump-safe startcell))) @@ -1761,10 +1796,10 @@ to are recalculated first." cells." (interactive "*") (ses-check-curcell) - (let* ((rowcol (ses-sym-rowcol curcell)) + (let* ((rowcol (ses-sym-rowcol ses--curcell)) (row (car rowcol)) (col (cdr rowcol))) - (when (and (< col (1- numcols)) ;;Last column can't spill over, anyway + (when (and (< col (1- ses--numcols)) ;;Last column can't spill over, anyway (eq (ses-cell-value row (1+ col)) '*skip*)) ;;This cell has spill-over. We'll momentarily pretend the following ;;cell has a `t' in it. @@ -1781,12 +1816,12 @@ cells." ;;Reconstruct reference lists. (let (refs x yrow ycol) ;;Delete old reference lists - (ses-dotimes-msg (row numrows) "Deleting references..." - (dotimes (col numcols) + (ses-dotimes-msg (row ses--numrows) "Deleting references..." + (dotimes (col ses--numcols) (ses-set-cell row col 'references nil))) ;;Create new reference lists - (ses-dotimes-msg (row numrows) "Computing references..." - (dotimes (col numcols) + (ses-dotimes-msg (row ses--numrows) "Computing references..." + (dotimes (col ses--numcols) (dolist (ref (ses-formula-references (ses-cell-formula row col))) (setq x (ses-sym-rowcol ref) yrow (car x) @@ -1796,35 +1831,35 @@ cells." (ses-cell-references yrow ycol))))))) ;;Delete everything and reconstruct basic data area (if (< (point-max) (buffer-size)) - (setq deferred-narrow t)) + (setq ses--deferred-narrow t)) (widen) (let ((inhibit-read-only t)) (goto-char (point-max)) (if (search-backward ";;; Local Variables:\n" nil t) - (delete-region 1 (point)) + (delete-region (point-min) (point)) ;;Buffer is quite screwed up - can't even save the user-specified locals - (delete-region 1 (point-max)) + (delete-region (point-min) (point-max)) (insert ses-initial-file-trailer) - (goto-char 1)) + (goto-char (point-min))) ;;Create a blank display area - (dotimes (row numrows) - (insert blank-line)) + (dotimes (row ses--numrows) + (insert ses--blank-line)) (insert ses-print-data-boundary) ;;Placeholders for cell data - (insert (make-string (* numrows (1+ numcols)) ?\n)) + (insert (make-string (* ses--numrows (1+ ses--numcols)) ?\n)) ;;Placeholders for col-widths, col-printers, default-printer, header-row (insert "\n\n\n\n") (insert ses-initial-global-parameters)) - (ses-set-parameter 'column-widths column-widths) - (ses-set-parameter 'col-printers col-printers) - (ses-set-parameter 'default-printer default-printer) - (ses-set-parameter 'header-row header-row) - (ses-set-parameter 'numrows numrows) - (ses-set-parameter 'numcols numcols) + (ses-set-parameter 'ses--col-widths ses--col-widths) + (ses-set-parameter 'ses--col-printers ses--col-printers) + (ses-set-parameter 'ses--default-printer ses--default-printer) + (ses-set-parameter 'ses--header-row ses--header-row) + (ses-set-parameter 'ses--numrows ses--numrows) + (ses-set-parameter 'ses--numcols ses--numcols) ;;Keep our old narrowing (ses-setup) (ses-recalculate-all) - (goto-char 1)) + (goto-char (point-min))) ;;;---------------------------------------------------------------------------- @@ -1838,7 +1873,7 @@ cell formula was unsafe and user declined confirmation." (progn (barf-if-buffer-read-only) (ses-check-curcell) - (let* ((rowcol (ses-sym-rowcol curcell)) + (let* ((rowcol (ses-sym-rowcol ses--curcell)) (row (car rowcol)) (col (cdr rowcol)) (formula (ses-cell-formula row col)) @@ -1852,7 +1887,7 @@ cell formula was unsafe and user declined confirmation." ;;Position cursor inside close-quote (setq initial (cons initial (length initial)))) (list row col - (read-from-minibuffer (format "Cell %s: " curcell) + (read-from-minibuffer (format "Cell %s: " ses--curcell) initial ses-mode-edit-map t ;Convert to Lisp object @@ -1866,7 +1901,7 @@ cell formula was unsafe and user declined confirmation." "Self-insert for initial character of cell function." (interactive (let ((initial (this-command-keys)) - (rowcol (progn (ses-check-curcell) (ses-sym-rowcol curcell)))) + (rowcol (progn (ses-check-curcell) (ses-sym-rowcol ses--curcell)))) (barf-if-buffer-read-only) (if (string= initial "\"") (setq initial "\"\"") ;Enter a string @@ -1874,7 +1909,7 @@ cell formula was unsafe and user declined confirmation." (setq initial "()"))) ;Enter a formula list (list (car rowcol) (cdr rowcol) - (read-from-minibuffer (format "Cell %s: " curcell) + (read-from-minibuffer (format "Cell %s: " ses--curcell) (cons initial 2) ses-mode-edit-map t ;Convert to Lisp object @@ -1888,11 +1923,11 @@ cell formula was unsafe and user declined confirmation." "Self-insert for a symbol as a cell formula. The set of all symbols that have been used as formulas in this spreadsheet is available for completions." (interactive - (let ((rowcol (progn (ses-check-curcell) (ses-sym-rowcol curcell))) + (let ((rowcol (progn (ses-check-curcell) (ses-sym-rowcol ses--curcell))) newval) (barf-if-buffer-read-only) - (setq newval (completing-read (format "Cell %s ': " curcell) - symbolic-formulas)) + (setq newval (completing-read (format "Cell %s ': " ses--curcell) + ses--symbolic-formulas)) (list (car rowcol) (cdr rowcol) (if (string= newval "") @@ -1913,7 +1948,7 @@ With prefix, deletes several cells." (ses-begin-change) (dotimes (x count) (ses-set-curcell) - (let ((rowcol (ses-sym-rowcol curcell))) + (let ((rowcol (ses-sym-rowcol ses--curcell))) (or rowcol (signal 'end-of-buffer nil)) (ses-clear-cell (car rowcol) (cdr rowcol))) (forward-char 1)))) @@ -1929,7 +1964,7 @@ cells." (dotimes (x count) (backward-char 1) ;Will signal 'beginning-of-buffer if appropriate (ses-set-curcell) - (let ((rowcol (ses-sym-rowcol curcell))) + (let ((rowcol (ses-sym-rowcol ses--curcell))) (ses-clear-cell (car rowcol) (cdr rowcol)))))) @@ -1974,11 +2009,11 @@ latter two cases, the function's result should be either a string (will be right-justified) or a list of one string (will be left-justified)." (interactive (let ((default t) - prompt) + prompt x) (ses-check-curcell 'range) ;;Default is none if not all cells in range have same printer (catch 'ses-read-cell-printer - (ses-dorange curcell + (ses-dorange ses--curcell (setq x (ses-cell-printer row col)) (if (eq (car-safe x) 'ses-safe-printer) (setq x (cadr x))) @@ -1988,10 +2023,11 @@ right-justified) or a list of one string (will be left-justified)." ;;Range contains differing printer functions (setq default t) (throw 'ses-read-cell-printer t))))) - (list (ses-read-printer (format "Cell %S printer: " curcell) default)))) + (list (ses-read-printer (format "Cell %S printer: " ses--curcell) + default)))) (unless (eq newval t) (ses-begin-change) - (ses-dorange curcell + (ses-dorange ses--curcell (ses-set-cell row col 'printer newval) (ses-print-cell row col)))) @@ -1999,7 +2035,7 @@ right-justified) or a list of one string (will be left-justified)." "Set the printer function for the current column. See `ses-read-cell-printer' for input forms." (interactive - (let ((col (cdr (ses-sym-rowcol curcell)))) + (let ((col (cdr (ses-sym-rowcol ses--curcell)))) (ses-check-curcell) (list col (ses-read-printer (format "Column %s printer: " (ses-column-letter col)) @@ -2007,19 +2043,19 @@ right-justified) or a list of one string (will be left-justified)." (unless (eq newval t) (ses-begin-change) - (ses-set-parameter 'col-printers newval col) + (ses-set-parameter 'ses--col-printers newval col) (save-excursion - (dotimes (row numrows) + (dotimes (row ses--numrows) (ses-print-cell row col))))) (defun ses-read-default-printer (newval) "Set the default printer function for cells that have no other. See `ses-read-cell-printer' for input forms." (interactive - (list (ses-read-printer "Default printer: " default-printer))) + (list (ses-read-printer "Default printer: " ses--default-printer))) (unless (eq newval t) (ses-begin-change) - (ses-set-parameter 'default-printer newval) + (ses-set-parameter 'ses--default-printer newval) (ses-reprint-all t))) @@ -2036,47 +2072,47 @@ before current one." (ses-begin-change) (let ((inhibit-quit t) (inhibit-read-only t) - (row (or (car (ses-sym-rowcol curcell)) numrows)) + (row (or (car (ses-sym-rowcol ses--curcell)) ses--numrows)) newrow) ;;Create a new set of cell-variables - (ses-create-cell-variable-range numrows (+ numrows count -1) - 0 (1- numcols)) - (ses-set-parameter 'numrows (+ numrows count)) + (ses-create-cell-variable-range ses--numrows (+ ses--numrows count -1) + 0 (1- ses--numcols)) + (ses-set-parameter 'ses--numrows (+ ses--numrows count)) ;;Insert each row (ses-goto-print row 0) (ses-dotimes-msg (x count) "Inserting row..." ;;Create a row of empty cells. The `symbol' fields will be set by ;;the call to ses-relocate-all. - (setq newrow (make-vector numcols nil)) - (dotimes (col numcols) + (setq newrow (make-vector ses--numcols nil)) + (dotimes (col ses--numcols) (aset newrow col (make-vector ses-cell-size nil))) - (setq cells (ses-vector-insert cells row newrow)) - (push `(ses-vector-delete cells ,row 1) buffer-undo-list) - (insert blank-line)) + (setq ses--cells (ses-vector-insert ses--cells row newrow)) + (push `(ses-vector-delete ses--cells ,row 1) buffer-undo-list) + (insert ses--blank-line)) ;;Insert empty lines in cell data area (will be replaced by ;;ses-relocate-all) (ses-goto-data row 0) - (insert (make-string (* (1+ numcols) count) ?\n)) + (insert (make-string (* (1+ ses--numcols) count) ?\n)) (ses-relocate-all row 0 count 0) ;;If any cell printers insert constant text, insert that text ;;into the line. - (let ((cols (mapconcat #'ses-call-printer col-printers nil)) - (global (ses-call-printer default-printer))) + (let ((cols (mapconcat #'ses-call-printer ses--col-printers nil)) + (global (ses-call-printer ses--default-printer))) (if (or (> (length cols) 0) (> (length global) 0)) (dotimes (x count) - (dotimes (col numcols) + (dotimes (col ses--numcols) ;;These cells are always nil, only constant formatting printed (1value (ses-print-cell (+ x row) col)))))) - (when (> header-row row) + (when (> ses--header-row row) ;;Inserting before header - (ses-set-parameter 'header-row (+ header-row count)) + (ses-set-parameter 'ses--header-row (+ ses--header-row count)) (ses-reset-header-string))) ;;Reconstruct text attributes (ses-setup) ;;Return to current cell - (if curcell - (ses-jump-safe curcell) - (ses-goto-print (1- numrows) 0))) + (if ses--curcell + (ses-jump-safe ses--curcell) + (ses-goto-print (1- ses--numrows) 0))) (defun ses-delete-row (count) "Delete the current row. With prefix, Deletes COUNT rows starting from the @@ -2086,31 +2122,31 @@ current one." (or (> count 0) (signal 'args-out-of-range nil)) (let ((inhibit-quit t) (inhibit-read-only t) - (row (car (ses-sym-rowcol curcell))) + (row (car (ses-sym-rowcol ses--curcell))) pos) - (setq count (min count (- numrows row))) + (setq count (min count (- ses--numrows row))) (ses-begin-change) - (ses-set-parameter 'numrows (- numrows count)) + (ses-set-parameter 'ses--numrows (- ses--numrows count)) ;;Delete lines from print area (ses-goto-print row 0) (ses-delete-line count) ;;Delete lines from cell data area (ses-goto-data row 0) - (ses-delete-line (* count (1+ numcols))) + (ses-delete-line (* count (1+ ses--numcols))) ;;Relocate variables and formulas - (ses-set-with-undo 'cells (ses-vector-delete cells row count)) + (ses-set-with-undo 'ses--cells (ses-vector-delete ses--cells row count)) (ses-relocate-all row 0 (- count) 0) - (ses-destroy-cell-variable-range numrows (+ numrows count -1) - 0 (1- numcols)) - (when (> header-row row) - (if (<= header-row (+ row count)) + (ses-destroy-cell-variable-range ses--numrows (+ ses--numrows count -1) + 0 (1- ses--numcols)) + (when (> ses--header-row row) + (if (<= ses--header-row (+ row count)) ;;Deleting the header row - (ses-set-parameter 'header-row 0) - (ses-set-parameter 'header-row (- header-row count))) + (ses-set-parameter 'ses--header-row 0) + (ses-set-parameter 'ses--header-row (- ses--header-row count))) (ses-reset-header-string))) ;;Reconstruct attributes (ses-setup) - (ses-jump-safe curcell)) + (ses-jump-safe ses--curcell)) (defun ses-insert-column (count &optional col width printer) "Insert a new column before COL (default is the current one). With prefix, @@ -2121,30 +2157,30 @@ the current column)." (ses-check-curcell) (or (> count 0) (signal 'args-out-of-range nil)) (or col - (setq col (cdr (ses-sym-rowcol curcell)) + (setq col (cdr (ses-sym-rowcol ses--curcell)) width (ses-col-width col) printer (ses-col-printer col))) (ses-begin-change) (let ((inhibit-quit t) (inhibit-read-only t) - (widths column-widths) - (printers col-printers) + (widths ses--col-widths) + (printers ses--col-printers) has-skip) ;;Create a new set of cell-variables - (ses-create-cell-variable-range 0 (1- numrows) - numcols (+ numcols count -1)) + (ses-create-cell-variable-range 0 (1- ses--numrows) + ses--numcols (+ ses--numcols count -1)) ;;Insert each column. (ses-dotimes-msg (x count) "Inserting column..." ;;Create a column of empty cells. The `symbol' fields will be set by ;;the call to ses-relocate-all. (ses-adjust-print-width col (1+ width)) - (ses-set-parameter 'numcols (1+ numcols)) - (dotimes (row numrows) - (and (< (1+ col) numcols) (eq (ses-cell-value row col) '*skip*) + (ses-set-parameter 'ses--numcols (1+ ses--numcols)) + (dotimes (row ses--numrows) + (and (< (1+ col) ses--numcols) (eq (ses-cell-value row col) '*skip*) ;;Inserting in the middle of a spill-over (setq has-skip t)) - (ses-aset-with-undo cells row - (ses-vector-insert (aref cells row) + (ses-aset-with-undo ses--cells row + (ses-vector-insert (aref ses--cells row) col (make-vector ses-cell-size nil))) ;;Insert empty lines in cell data area (will be replaced by @@ -2154,22 +2190,22 @@ the current column)." ;;Insert column width and printer (setq widths (ses-vector-insert widths col width) printers (ses-vector-insert printers col printer))) - (ses-set-parameter 'column-widths widths) - (ses-set-parameter 'col-printers printers) + (ses-set-parameter 'ses--col-widths widths) + (ses-set-parameter 'ses--col-printers printers) (ses-reset-header-string) (ses-relocate-all 0 col 0 count) (if has-skip (ses-reprint-all t) (when (or (> (length (ses-call-printer printer)) 0) - (> (length (ses-call-printer default-printer)) 0)) + (> (length (ses-call-printer ses--default-printer)) 0)) ;;Either column printer or global printer inserts some constant text ;;Reprint the new columns to insert that text. - (dotimes (x numrows) + (dotimes (x ses--numrows) (dotimes (y count) ;Always nil here - this is a blank column (1value (ses-print-cell-new-width x (+ y col)))))) (ses-setup))) - (ses-jump-safe curcell)) + (ses-jump-safe ses--curcell)) (defun ses-delete-column (count) "Delete the current column. With prefix, Deletes COUNT columns starting @@ -2179,45 +2215,45 @@ from the current one." (or (> count 0) (signal 'args-out-of-range nil)) (let ((inhibit-quit t) (inhibit-read-only t) - (rowcol (ses-sym-rowcol curcell)) + (rowcol (ses-sym-rowcol ses--curcell)) (width 0) new col origrow has-skip) (setq origrow (car rowcol) col (cdr rowcol) - count (min count (- numcols col))) - (if (= count numcols) + count (min count (- ses--numcols col))) + (if (= count ses--numcols) (error "Can't delete all columns!")) ;;Determine width of column(s) being deleted (dotimes (x count) (setq width (+ width (ses-col-width (+ col x)) 1))) (ses-begin-change) - (ses-set-parameter 'numcols (- numcols count)) + (ses-set-parameter 'ses--numcols (- ses--numcols count)) (ses-adjust-print-width col (- width)) - (ses-dotimes-msg (row numrows) "Deleting column..." + (ses-dotimes-msg (row ses--numrows) "Deleting column..." ;;Delete lines from cell data area (ses-goto-data row col) (ses-delete-line count) ;;Delete cells. Check if deletion area begins or ends with a skip. (if (or (eq (ses-cell-value row col) '*skip*) - (and (< col numcols) + (and (< col ses--numcols) (eq (ses-cell-value row (+ col count)) '*skip*))) (setq has-skip t)) - (ses-aset-with-undo cells row - (ses-vector-delete (aref cells row) col count))) + (ses-aset-with-undo ses--cells row + (ses-vector-delete (aref ses--cells row) col count))) ;;Update globals - (ses-set-parameter 'column-widths - (ses-vector-delete column-widths col count)) - (ses-set-parameter 'col-printers - (ses-vector-delete col-printers col count)) + (ses-set-parameter 'ses--col-widths + (ses-vector-delete ses--col-widths col count)) + (ses-set-parameter 'ses--col-printers + (ses-vector-delete ses--col-printers col count)) (ses-reset-header-string) ;;Relocate variables and formulas (ses-relocate-all 0 col 0 (- count)) - (ses-destroy-cell-variable-range 0 (1- numrows) - numcols (+ numcols count -1)) + (ses-destroy-cell-variable-range 0 (1- ses--numrows) + ses--numcols (+ ses--numcols count -1)) (if has-skip (ses-reprint-all t) (ses-setup)) - (if (>= col numcols) + (if (>= col ses--numcols) (setq col (1- col))) (ses-goto-print origrow col))) @@ -2229,11 +2265,11 @@ inserts a new row if at bottom of print area. Repeat COUNT times." (setq deactivate-mark t) ;Doesn't combine well with ranges (dotimes (x count) (ses-set-curcell) - (if (not curcell) + (if (not ses--curcell) (progn ;At bottom of print area (barf-if-buffer-read-only) (ses-insert-row 1)) - (let ((col (cdr (ses-sym-rowcol curcell)))) + (let ((col (cdr (ses-sym-rowcol ses--curcell)))) (when (/= 32 (char-before (next-single-property-change (point) 'intangible))) @@ -2241,7 +2277,7 @@ inserts a new row if at bottom of print area. Repeat COUNT times." ;;new column. (barf-if-buffer-read-only) (ses-insert-column (- count x) - numcols + ses--numcols (ses-col-width col) (ses-col-printer col))))) (forward-char))) @@ -2258,7 +2294,7 @@ inserts a new row if at bottom of print area. Repeat COUNT times." (defun ses-set-column-width (col newwidth) "Set the width of the current column." (interactive - (let ((col (cdr (progn (ses-check-curcell) (ses-sym-rowcol curcell))))) + (let ((col (cdr (progn (ses-check-curcell) (ses-sym-rowcol ses--curcell))))) (barf-if-buffer-read-only) (list col (if current-prefix-arg @@ -2279,8 +2315,8 @@ inserts a new row if at bottom of print area. Repeat COUNT times." (save-excursion (let ((inhibit-quit t)) (ses-adjust-print-width col (- newwidth (ses-col-width col))) - (ses-set-parameter 'column-widths newwidth col)) - (dotimes (row numrows) + (ses-set-parameter 'ses--col-widths newwidth col)) + (dotimes (row ses--numrows) (ses-print-cell-new-width row col)))) @@ -2361,9 +2397,9 @@ cells instead of deleting them." ;;check whether the buffer really is read-only. (barf-if-buffer-read-only) (ses-begin-change) - (ses-dorange curcell + (ses-dorange ses--curcell (ses-clear-cell row col)) - (ses-jump (car curcell))) + (ses-jump (car ses--curcell))) (defadvice yank (around ses-yank activate preactivate) "In SES mode, the yanked text is inserted as cells. @@ -2548,10 +2584,12 @@ is a list. Ignore a final newline." confirmation and then inserts them. Result is (row,col) for top left of yank spot, or error signal if user requests cancel." (ses-begin-change) - (let ((rowcol (if curcell (ses-sym-rowcol curcell) (cons numrows 0))) + (let ((rowcol (if ses--curcell + (ses-sym-rowcol ses--curcell) + (cons ses--numrows 0))) rowbool colbool) - (setq needrows (- (+ (car rowcol) needrows) numrows) - needcols (- (+ (cdr rowcol) needcols) numcols) + (setq needrows (- (+ (car rowcol) needrows) ses--numrows) + needcols (- (+ (cdr rowcol) needcols) ses--numcols) rowbool (> needrows 0) colbool (> needcols 0)) (when (or rowbool colbool) @@ -2562,15 +2600,15 @@ spot, or error signal if user requests cancel." (if colbool (format "%d columns" needcols) ""))) (error "Cancelled")) (when rowbool - (let (curcell) + (let (ses--curcell) (save-excursion - (ses-goto-print numrows 0) + (ses-goto-print ses--numrows 0) (ses-insert-row needrows)))) (when colbool (ses-insert-column needcols - numcols - (ses-col-width (1- numcols)) - (ses-col-printer (1- numcols))))) + ses--numcols + (ses-col-width (1- ses--numcols)) + (ses-col-printer (1- ses--numcols))))) rowcol)) (defun ses-export-tsv (beg end) @@ -2592,7 +2630,7 @@ WANT-FORMULAS is non-nil. Newlines and tabs in the export text are escaped." (ses-check-curcell 'needrange) (let ((print-escape-newlines t) result item) - (ses-dorange curcell + (ses-dorange ses--curcell (setq item (if want-formulas (ses-cell-formula row col) (ses-cell-value row col))) @@ -2620,19 +2658,34 @@ WANT-FORMULAS is non-nil. Newlines and tabs in the export text are escaped." ;;;; Other user commands ;;;---------------------------------------------------------------------------- -(defun ses-read-header-row (row) - (interactive "NHeader row: ") - (if (or (< row 0) (> row numrows)) +(defun ses-unset-header-row () + "Select the default header row." + (interactive) + (ses-set-header-row 0)) + +(defun ses-set-header-row (row) + "Set the ROW to display in the header-line. +With a numerical prefix arg, use that row. +With no prefix arg, use the current row. +With a \\[universal-argument] prefix arg, prompt the user. +The top row is row 1. Selecting row 0 displays the default header row." + (interactive + (list (if (numberp current-prefix-arg) current-prefix-arg + (let ((currow (1+ (car (ses-sym-rowcol ses--curcell))))) + (if current-prefix-arg + (read-number "Header row: " currow) + currow))))) + (if (or (< row 0) (> row ses--numrows)) (error "Invalid header-row")) (ses-begin-change) - (ses-set-parameter 'header-row row) + (ses-set-parameter 'ses--header-row row) (ses-reset-header-string)) (defun ses-mark-row () "Marks the entirety of current row as a range." (interactive) (ses-check-curcell 'range) - (let ((row (car (ses-sym-rowcol (or (car-safe curcell) curcell))))) + (let ((row (car (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell))))) (push-mark (point)) (ses-goto-print (1+ row) 0) (push-mark (point) nil t) @@ -2642,10 +2695,10 @@ WANT-FORMULAS is non-nil. Newlines and tabs in the export text are escaped." "Marks the entirety of current column as a range." (interactive) (ses-check-curcell 'range) - (let ((col (cdr (ses-sym-rowcol (or (car-safe curcell) curcell)))) + (let ((col (cdr (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell)))) (row 0)) (push-mark (point)) - (ses-goto-print (1- numrows) col) + (ses-goto-print (1- ses--numrows) col) (forward-char 1) (push-mark (point) nil t) (while (eq '*skip* (ses-cell-value row col)) @@ -2657,25 +2710,25 @@ WANT-FORMULAS is non-nil. Newlines and tabs in the export text are escaped." "Move point to last cell on line." (interactive) (ses-check-curcell 'end 'range) - (when curcell ;Otherwise we're at the bottom row, which is empty anyway - (let ((col (1- numcols)) + (when ses--curcell ;Otherwise we're at the bottom row, which is empty anyway + (let ((col (1- ses--numcols)) row rowcol) - (if (symbolp curcell) + (if (symbolp ses--curcell) ;;Single cell - (setq row (car (ses-sym-rowcol curcell))) + (setq row (car (ses-sym-rowcol ses--curcell))) ;;Range - use whichever end of the range the point is at (setq rowcol (ses-sym-rowcol (if (< (point) (mark)) - (car curcell) - (cdr curcell)))) + (car ses--curcell) + (cdr ses--curcell)))) ;;If range already includes the last cell in a row, point is actually ;;in the following row (if (<= (cdr rowcol) (1- col)) (setq row (car rowcol)) (setq row (1+ (car rowcol))) - (if (= row numrows) + (if (= row ses--numrows) ;;Already at end - can't go anywhere (setq col 0)))) - (when (< row numrows) ;Otherwise it's a range that includes last cell + (when (< row ses--numrows) ;Otherwise it's a range that includes last cell (while (eq (ses-cell-value row col) '*skip*) ;;Back to beginning of multi-column cell (setq col (1- col))) @@ -2684,15 +2737,15 @@ WANT-FORMULAS is non-nil. Newlines and tabs in the export text are escaped." (defun ses-renarrow-buffer () "Narrow the buffer so only the print area is visible. Use after \\[widen]." (interactive) - (setq deferred-narrow t)) + (setq ses--deferred-narrow t)) (defun ses-sort-column (sorter &optional reverse) "Sorts the range by a specified column. With prefix, sorts in REVERSE order." (interactive "*sSort column: \nP") (ses-check-curcell 'needrange) - (let ((min (ses-sym-rowcol (car curcell))) - (max (ses-sym-rowcol (cdr curcell)))) + (let ((min (ses-sym-rowcol (car ses--curcell))) + (max (ses-sym-rowcol (cdr ses--curcell)))) (let ((minrow (car min)) (mincol (cdr min)) (maxrow (car max)) @@ -2725,15 +2778,16 @@ REVERSE order." (ses-yank-cells (pop extracts) nil))))) (defun ses-sort-column-click (event reverse) + "Mouse version of `ses-sort-column'." (interactive "*e\nP") (setq event (event-end event)) (select-window (posn-window event)) (setq event (car (posn-col-row event))) ;Click column (let ((col 0)) - (while (and (< col numcols) (> event (ses-col-width col))) + (while (and (< col ses--numcols) (> event (ses-col-width col))) (setq event (- event (ses-col-width col) 1) col (1+ col))) - (if (>= col numcols) + (if (>= col ses--numcols) (ding) (ses-sort-column (ses-column-letter col) reverse)))) @@ -2745,7 +2799,8 @@ spreadsheet." (with-current-buffer (window-buffer minibuffer-scroll-window) (ses-command-hook) ;For ses-coverage (ses-check-curcell 'needrange) - (setq x (cdr (macroexpand `(ses-range ,(car curcell) ,(cdr curcell)))))) + (setq x (cdr (macroexpand `(ses-range ,(car ses--curcell) + ,(cdr ses--curcell)))))) (insert (substring (prin1-to-string (nreverse x)) 1 -1)))) (defun ses-insert-ses-range () @@ -2756,7 +2811,9 @@ highlighted range in the spreadsheet." (with-current-buffer (window-buffer minibuffer-scroll-window) (ses-command-hook) ;For ses-coverage (ses-check-curcell 'needrange) - (setq x (format "(ses-range %S %S)" (car curcell) (cdr curcell)))) + (setq x (format "(ses-range %S %S)" + (car ses--curcell) + (cdr ses--curcell)))) (insert x))) (defun ses-insert-range-click (event) @@ -2867,17 +2924,15 @@ TEST is evaluated." ;;dynamically bound by ses-print-cell. We define these varables at ;;compile-time to make the compiler happy. (eval-when-compile - (make-local-variable 'row) - (make-local-variable 'col) - ;;Don't use setq -- that gives a "free variable" compiler warning - (set 'row nil) - (set 'col nil)) + (dolist (x '(row col)) + (make-local-variable x) + (set x nil))) (defun ses-center (value &optional span fill) "Print VALUE, centered within column. FILL is the fill character for centering (default = space). SPAN indicates how many additional rightward columns to include in width (default = 0)." - (let ((printer (or (ses-col-printer col) default-printer)) + (let ((printer (or (ses-col-printer col) ses--default-printer)) (width (ses-col-width col)) half) (or fill (setq fill ? )) @@ -2897,7 +2952,7 @@ columns to include in width (default = 0)." and continues until the next nonblank column. FILL specifies the fill character (default = space)." (let ((end (1+ col))) - (while (and (< end numcols) + (while (and (< end ses--numcols) (memq (ses-cell-value row end) '(nil *skip*))) (setq end (1+ end))) (ses-center value (- end col 1) fill))) @@ -2927,4 +2982,5 @@ current column and continues until the next nonblank column." (provide 'ses) +;;; arch-tag: 88c1ccf0-4293-4824-8c5d-0757b52217f3 ;; ses.el ends here. diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el index d9b8f92e90..b3427ac59e 100644 --- a/lisp/shadowfile.el +++ b/lisp/shadowfile.el @@ -839,4 +839,5 @@ look for files that have been changed and need to be copied to other systems." (provide 'shadowfile) +;;; arch-tag: e2f4cdd7-2bab-4def-9130-9e69b412b79e ;;; shadowfile.el ends here diff --git a/lisp/shell.el b/lisp/shell.el index fdf80cba22..1817a1fd3b 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -167,7 +167,7 @@ This is a fine thing to set in your `.emacs' file.") (defvar shell-file-name-chars (if (memq system-type '(ms-dos windows-nt cygwin)) "~/A-Za-z0-9_^$!#%&{}@`'.,:()-" - "~/A-Za-z0-9+@:_.$#%,={}-") + "[]~/A-Za-z0-9+@:_.$#%,={}-") "String of characters valid in a file name. This variable is used to initialize `comint-file-name-chars' in the shell buffer. The value may depend on the operating system or shell. @@ -177,7 +177,7 @@ This is a fine thing to set in your `.emacs' file.") (defvar shell-file-name-quote-list (if (memq system-type '(ms-dos windows-nt)) nil - (append shell-delimiter-argument-list '(?\ ?\* ?\! ?\" ?\' ?\` ?\#))) + (append shell-delimiter-argument-list '(?\ ?\* ?\! ?\" ?\' ?\` ?\# ?\\))) "List of characters to quote when in a file name. This variable is used to initialize `comint-file-name-quote-list' in the shell buffer. The value may depend on the operating system or shell. @@ -533,7 +533,8 @@ Otherwise, one argument `-i' is passed to the shell. (interactive (list (and current-prefix-arg - (read-buffer "Shell buffer: " "*shell*")))) + (read-buffer "Shell buffer: " + (generate-new-buffer-name "*shell*"))))) (setq buffer (get-buffer-create (or buffer "*shell*"))) ;; Pop to buffer, so that the buffer's window will be correctly set ;; when we call comint (so that comint sets the COLUMNS env var properly). @@ -940,36 +941,37 @@ Returns t if successful." "Dynamically complete at point as a command. See `shell-dynamic-complete-filename'. Returns t if successful." (let* ((filename (or (comint-match-partial-filename) "")) - (pathnondir (file-name-nondirectory filename)) - (paths (cdr (reverse exec-path))) + (filenondir (file-name-nondirectory filename)) + (path-dirs (cdr (reverse exec-path))) (cwd (file-name-as-directory (expand-file-name default-directory))) (ignored-extensions (and comint-completion-fignore (mapconcat (function (lambda (x) (concat (regexp-quote x) "$"))) comint-completion-fignore "\\|"))) - (path "") (comps-in-path ()) (file "") (filepath "") (completions ())) - ;; Go thru each path in the search path, finding completions. - (while paths - (setq path (file-name-as-directory (comint-directory (or (car paths) "."))) - comps-in-path (and (file-accessible-directory-p path) - (file-name-all-completions pathnondir path))) + (dir "") (comps-in-dir ()) + (file "") (abs-file-name "") (completions ())) + ;; Go thru each dir in the search path, finding completions. + (while path-dirs + (setq dir (file-name-as-directory (comint-directory (or (car path-dirs) "."))) + comps-in-dir (and (file-accessible-directory-p dir) + (file-name-all-completions filenondir dir))) ;; Go thru each completion found, to see whether it should be used. - (while comps-in-path - (setq file (car comps-in-path) - filepath (concat path file)) + (while comps-in-dir + (setq file (car comps-in-dir) + abs-file-name (concat dir file)) (if (and (not (member file completions)) (not (and ignored-extensions (string-match ignored-extensions file))) - (or (string-equal path cwd) - (not (file-directory-p filepath))) + (or (string-equal dir cwd) + (not (file-directory-p abs-file-name))) (or (null shell-completion-execonly) - (file-executable-p filepath))) + (file-executable-p abs-file-name))) (setq completions (cons file completions))) - (setq comps-in-path (cdr comps-in-path))) - (setq paths (cdr paths))) + (setq comps-in-dir (cdr comps-in-dir))) + (setq path-dirs (cdr path-dirs))) ;; OK, we've got a list of completions. (let ((success (let ((comint-completion-addsuffix nil)) - (comint-dynamic-simple-complete pathnondir completions)))) + (comint-dynamic-simple-complete filenondir completions)))) (if (and (memq success '(sole shortest)) comint-completion-addsuffix (not (file-directory-p (comint-match-partial-filename)))) (insert " ")) @@ -1064,4 +1066,5 @@ Returns t if successful." (provide 'shell) +;;; arch-tag: bcb5f12a-c1f4-4aea-a809-2504bd5bd797 ;;; shell.el ends here diff --git a/lisp/simple.el b/lisp/simple.el index 8b669b0bdb..2d0a176de0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -303,14 +303,14 @@ In programming language modes, this is the same as TAB. In some text modes, where TAB inserts a tab, this indents to the column specified by the function `current-left-margin'." (interactive "*") - (delete-horizontal-space t) (let ((pos (point))) ;; Be careful to insert the newline before indenting the line. ;; Otherwise, the indentation might be wrong. (newline) (save-excursion (goto-char pos) - (indent-according-to-mode)) + (indent-according-to-mode) + (delete-horizontal-space t)) (indent-according-to-mode))) (defun quoted-insert (arg) @@ -352,16 +352,16 @@ useful for editing binary files." (insert-and-inherit char) (setq arg (1- arg))))) -(defun forward-to-indentation (arg) +(defun forward-to-indentation (&optional arg) "Move forward ARG lines and position at first nonblank character." (interactive "p") - (forward-line arg) + (forward-line (or arg 1)) (skip-chars-forward " \t")) -(defun backward-to-indentation (arg) +(defun backward-to-indentation (&optional arg) "Move backward ARG lines and position at first nonblank character." (interactive "p") - (forward-line (- arg)) + (forward-line (- (or arg 1))) (skip-chars-forward " \t")) (defun back-to-indentation () @@ -498,20 +498,15 @@ that uses or sets the mark." (defun what-line () "Print the current buffer line number and narrowed line number of point." (interactive) - (let ((opoint (point)) start) - (save-excursion - (save-restriction - (goto-char (point-min)) - (widen) - (forward-line 0) - (setq start (point)) - (goto-char opoint) - (forward-line 0) - (if (/= start (point-min)) - (message "line %d (narrowed line %d)" - (1+ (count-lines (point-min) (point))) - (1+ (count-lines start (point)))) - (message "Line %d" (1+ (count-lines (point-min) (point))))))))) + (let ((opoint (point)) (start (point-min)) + (n (line-number-at-pos))) + (if (= start 1) + (message "Line %d" n) + (save-excursion + (save-restriction + (widen) + (message "line %d (narrowed line %d)" + (+ n (line-number-at-pos start) -1) n)))))) (defun count-lines (start end) "Return number of lines between START and END. @@ -536,6 +531,17 @@ and the greater of them is not at the start of a line." done))) (- (buffer-size) (forward-line (buffer-size))))))) +(defun line-number-at-pos (&optional pos) + "Return (narrowed) buffer line number at position POS. +If POS is nil, use current buffer location." + (let ((opoint (or pos (point))) start) + (save-excursion + (goto-char (point-min)) + (setq start (point)) + (goto-char opoint) + (forward-line 0) + (1+ (count-lines start (point)))))) + (defun what-cursor-position (&optional detail) "Print info on cursor position (on screen and within buffer). Also describe the character after point, and give its character code @@ -661,23 +667,28 @@ the echo area." (let ((print-length eval-expression-print-length) (print-level eval-expression-print-level)) - (prin1 (car values) - (if eval-expression-insert-value (current-buffer) t)))) + (if eval-expression-insert-value + (with-no-warnings + (let ((standard-output (current-buffer))) + (eval-last-sexp-print-value (car values)))) + (prin1 (car values) t)))) (defun edit-and-eval-command (prompt command) "Prompting with PROMPT, let user edit COMMAND and eval result. COMMAND is a Lisp expression. Let user edit that expression in the minibuffer, then read and evaluate the result." (let ((command - (unwind-protect - (read-from-minibuffer prompt - (prin1-to-string command) - read-expression-map t - '(command-history . 1)) - ;; If command was added to command-history as a string, - ;; get rid of that. We want only evaluable expressions there. - (if (stringp (car command-history)) - (setq command-history (cdr command-history)))))) + (let ((print-level nil) + (minibuffer-history-sexp-flag (1+ (minibuffer-depth)))) + (unwind-protect + (read-from-minibuffer prompt + (prin1-to-string command) + read-expression-map t + 'command-history) + ;; If command was added to command-history as a string, + ;; get rid of that. We want only evaluable expressions there. + (if (stringp (car command-history)) + (setq command-history (cdr command-history))))))) ;; If command to be redone does not match front of history, ;; add it to the history. @@ -728,11 +739,11 @@ to get different commands to edit and resubmit." This is used for all minibuffer input except when an alternate history list is specified.") (defvar minibuffer-history-sexp-flag nil - "Non-nil when doing history operations on the variable `command-history'. -More generally, indicates that the history list being acted on -contains expressions rather than strings. -It is only valid if its value equals the current minibuffer depth, -to handle recursive uses of the minibuffer.") + "Control whether history list elements are expressions or strings. +If the value of this variable equals current minibuffer depth, +they are expressions; otherwise they are strings. +\(That convention is designed to do the right thing fora +recursive uses of the minibuffer.)") (setq minibuffer-history-variable 'minibuffer-history) (setq minibuffer-history-position nil) (defvar minibuffer-history-search-history nil) @@ -961,9 +972,13 @@ as an argument limits undo to changes within the current region." ;; another undo command will find the undo history empty ;; and will get another error. To begin undoing the undos, ;; you must type some other command. - (setq this-command 'undo) (let ((modified (buffer-modified-p)) (recent-save (recent-auto-save-p))) + ;; If we get an error in undo-start, + ;; the next command should not be a "consecutive undo". + ;; So set `this-command' to something other than `undo'. + (setq this-command 'undo-start) + (unless (eq last-command 'undo) (setq undo-in-region (if transient-mark-mode mark-active (and arg (not (numberp arg))))) @@ -972,6 +987,8 @@ as an argument limits undo to changes within the current region." (undo-start)) ;; get rid of initial undo boundary (undo-more 1)) + ;; If we got this far, the next command should be a consecutive undo. + (setq this-command 'undo) ;; Check to see whether we're hitting a redo record, and if ;; so, ask the user whether she wants to skip the redo/undo pair. (let ((equiv (gethash pending-undo-list undo-equiv-table))) @@ -1654,6 +1671,26 @@ specifies the value of ERROR-BUFFER." `universal-argument-other-key' uses this to discard those events from (this-command-keys), and reread only the final command.") +(defvar overriding-map-is-bound nil + "Non-nil when `overriding-terminal-local-map' is `universal-argument-map'.") + +(defvar saved-overriding-map nil + "The saved value of `overriding-terminal-local-map'. +That variable gets restored to this value on exiting \"universal +argument mode\".") + +(defun ensure-overriding-map-is-bound () + "Check `overriding-terminal-local-map' is `universal-argument-map'." + (unless overriding-map-is-bound + (setq saved-overriding-map overriding-terminal-local-map) + (setq overriding-terminal-local-map universal-argument-map) + (setq overriding-map-is-bound t))) + +(defun restore-overriding-map () + "Restore `overriding-terminal-local-map' to its saved value." + (setq overriding-terminal-local-map saved-overriding-map) + (setq overriding-map-is-bound nil)) + (defun universal-argument () "Begin a numeric argument for the following command. Digits or minus sign following \\[universal-argument] make up the numeric argument. @@ -1667,7 +1704,7 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]." (interactive) (setq prefix-arg (list 4)) (setq universal-argument-num-events (length (this-command-keys))) - (setq overriding-terminal-local-map universal-argument-map)) + (ensure-overriding-map-is-bound)) ;; A subsequent C-u means to multiply the factor by 4 if we've typed ;; nothing but C-u's; otherwise it means to terminate the prefix arg. @@ -1678,7 +1715,7 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]." (if (eq arg '-) (setq prefix-arg (list -4)) (setq prefix-arg arg) - (setq overriding-terminal-local-map nil))) + (restore-overriding-map))) (setq universal-argument-num-events (length (this-command-keys)))) (defun negative-argument (arg) @@ -1692,7 +1729,7 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]." (t (setq prefix-arg '-))) (setq universal-argument-num-events (length (this-command-keys))) - (setq overriding-terminal-local-map universal-argument-map)) + (ensure-overriding-map-is-bound)) (defun digit-argument (arg) "Part of the numeric argument for the next command. @@ -1711,7 +1748,7 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]." (t (setq prefix-arg digit)))) (setq universal-argument-num-events (length (this-command-keys))) - (setq overriding-terminal-local-map universal-argument-map)) + (ensure-overriding-map-is-bound)) ;; For backward compatibility, minus with no modifiers is an ordinary ;; command if digits have already been entered. @@ -1732,7 +1769,7 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]." (append (nthcdr universal-argument-num-events keylist) unread-command-events))) (reset-this-command-lengths) - (setq overriding-terminal-local-map nil)) + (restore-overriding-map)) ;;;; Window system cut and paste hooks. @@ -1748,8 +1785,8 @@ programs. The function takes one or two arguments. The first argument, TEXT, is a string containing the text which should be made available. -The second, PUSH, if non-nil means this is a \"new\" kill; -nil means appending to an \"old\" kill.") +The second, optional, argument PUSH, has the same meaning as the +similar argument to `x-set-cut-buffer', which see.") (defvar interprogram-paste-function nil "Function to call to get text cut from other programs. @@ -1762,7 +1799,8 @@ text that other programs have provided for pasting. The function should be called with no arguments. If the function returns nil, then no other program has provided such text, and the top of the Emacs kill ring should be used. If the function returns a -string, that string should be put in the kill ring as the latest kill. +string, then the caller of the function \(usually `current-kill') +should put this string in the kill ring as the latest kill. Note that the function should return a string only if a program other than Emacs has provided a string for pasting; if Emacs provided the @@ -1803,7 +1841,7 @@ the front of the kill ring, rather than being added to the list. Optional third arguments YANK-HANDLER controls how the STRING is later inserted into a buffer; see `insert-for-yank' for details. When a yank handler is specified, STRING must be non-empty (the yank -handler is stored as a `yank-handler'text property on STRING). +handler, if non-nil, is stored as a `yank-handler' text property on STRING). When the yank handler has a non-nil PARAM element, the original STRING argument is not used by `insert-for-yank'. However, since Lisp code @@ -1811,7 +1849,8 @@ may access and use elements from the kill-ring directly, the STRING argument should still be a \"useful\" string for such uses." (if (> (length string) 0) (if yank-handler - (put-text-property 0 1 'yank-handler yank-handler string)) + (put-text-property 0 (length string) + 'yank-handler yank-handler string)) (if yank-handler (signal 'args-out-of-range (list string "yank-handler specified for empty string")))) @@ -1829,11 +1868,12 @@ argument should still be a \"useful\" string for such uses." (defun kill-append (string before-p &optional yank-handler) "Append STRING to the end of the latest kill in the kill ring. If BEFORE-P is non-nil, prepend STRING to the kill. -Optional third argument YANK-HANDLER specifies the yank-handler text -property to be set on the combined kill ring string. If the specified -yank-handler arg differs from the yank-handler property of the latest -kill string, STRING is added as a new kill ring element instead of -being appending to the last kill. +Optional third argument YANK-HANDLER, if non-nil, specifies the +yank-handler text property to be set on the combined kill ring +string. If the specified yank-handler arg differs from the +yank-handler property of the latest kill string, this function +adds the combined string to the kill ring as a new element, +instead of replacing the last kill with it. If `interprogram-cut-function' is set, pass the resulting kill to it." (let* ((cur (car kill-ring))) (kill-new (if before-p (concat string cur) (concat cur string)) @@ -1902,8 +1942,9 @@ If the previous command was also a kill command, the text killed this time appends to the text killed last time to make one entry in the kill ring. -In Lisp code, optional third arg YANK-HANDLER specifies the yank-handler -text property to be set on the killed text. See `insert-for-yank'." +In Lisp code, optional third arg YANK-HANDLER, if non-nil, +specifies the yank-handler text property to be set on the killed +text. See `insert-for-yank'." (interactive "r") (condition-case nil (let ((string (delete-and-extract-region beg end))) @@ -1913,7 +1954,8 @@ text property to be set on the killed text. See `insert-for-yank'." (kill-append string (< end beg) yank-handler) (kill-new string nil yank-handler))) (when (or string (eq last-command 'kill-region)) - (setq this-command 'kill-region))) + (setq this-command 'kill-region)) + nil) ((buffer-read-only text-read-only) ;; The code above failed because the buffer, or some of the characters ;; in the region, are read-only. @@ -1925,7 +1967,7 @@ text property to be set on the killed text. See `insert-for-yank'." (setq this-command 'kill-region) ;; This should barf, if appropriate, and give us the correct error. (if kill-read-only-ok - (message "Read only text copied to kill ring") + (progn (message "Read only text copied to kill ring") nil) ;; Signal an error if the buffer is read-only. (barf-if-buffer-read-only) ;; If the buffer isn't read-only, the text is. @@ -2019,7 +2061,7 @@ Function is called with two parameters, START and END corresponding to the value of the mark and point; it is guaranteed that START <= END. Normally set from the UNDO element of a yank-handler; see `insert-for-yank'.") -(defun yank-pop (arg) +(defun yank-pop (&optional arg) "Replace just-yanked stretch of killed text with a different stretch. This command is allowed only immediately after a `yank' or a `yank-pop'. At such a time, the region contains a stretch of reinserted @@ -2036,6 +2078,7 @@ comes the newest one." (if (not (eq last-command 'yank)) (error "Previous command was not a yank")) (setq this-command 'yank) + (unless arg (setq arg 1)) (let ((inhibit-read-only t) (before (< (point) (mark t)))) (if before @@ -2071,7 +2114,7 @@ See also the command \\[yank-pop]." (push-mark (point)) (insert-for-yank (current-kill (cond ((listp arg) 0) - ((eq arg '-) -1) + ((eq arg '-) -2) (t (1- arg))))) (if (consp arg) ;; This is like exchange-point-and-mark, but doesn't activate the mark. @@ -2202,7 +2245,10 @@ even beep.)" (save-excursion (end-of-visible-line) (point)))) (if (or (save-excursion - (skip-chars-forward " \t" end) + ;; If trailing whitespace is visible, + ;; don't treat it as nothing. + (unless show-trailing-whitespace + (skip-chars-forward " \t" end)) (= (point) end)) (and kill-whole-line (bolp))) (forward-visible-line 1) @@ -2697,7 +2743,7 @@ If you are thinking of using this in a Lisp program, consider using `forward-line' instead. It is usually easier to use and more reliable (no dependence on goal column, etc.)." (interactive "p") - (unless arg (setq arg 1)) + (or arg (setq arg 1)) (if (and next-line-add-newlines (= arg 1)) (if (save-excursion (end-of-line) (eobp)) ;; When adding a newline, don't expand an abbrev. @@ -2729,7 +2775,7 @@ If you are thinking of using this in a Lisp program, consider using `forward-line' with a negative argument instead. It is usually easier to use and more reliable (no dependence on goal column, etc.)." (interactive "p") - (unless arg (setq arg 1)) + (or arg (setq arg 1)) (if (interactive-p) (condition-case nil (line-move (- arg)) @@ -3109,11 +3155,11 @@ With argument 0, interchanges line point is in with line mark is in." (goto-char (car pos1)) (insert word2)))) -(defun backward-word (arg) +(defun backward-word (&optional arg) "Move backward until encountering the beginning of a word. With argument, do this that many times." (interactive "p") - (forward-word (- arg))) + (forward-word (- (or arg 1)))) (defun mark-word (arg) "Set mark arg words away from point. @@ -3345,7 +3391,7 @@ Just \\[universal-argument] as argument means to use the current column." (setq arg (current-column))) (if (not (integerp arg)) ;; Disallow missing argument; it's probably a typo for C-x C-f. - (error "set-fill-column requires an explicit argument") + (error "Set-fill-column requires an explicit argument") (message "Fill column set to %d (was %d)" arg fill-column) (setq fill-column arg))) @@ -3452,6 +3498,13 @@ With arg, turn Column Number mode on iff arg is positive. When Column Number mode is enabled, the column number appears in the mode line." :global t :group 'editing-basics :require nil) + +(define-minor-mode size-indication-mode + "Toggle Size Indication mode. +With arg, turn Size Indication mode on iff arg is positive. When +Size Indication mode is enabled, the size of the accessible part +of the buffer appears in the mode line." + :global t :group 'editing-basics :require nil) (defgroup paren-blinking nil "Blinking matching of parens and expressions." @@ -3498,7 +3551,8 @@ when it is off screen)." (point))))) (let* ((oldpos (point)) (blinkpos) - (mismatch)) + (mismatch) + matching-paren) (save-excursion (save-restriction (if blink-matching-paren-distance @@ -3512,12 +3566,20 @@ when it is off screen)." (setq blinkpos (scan-sexps oldpos -1))) (error nil))) (and blinkpos - (/= (char-syntax (char-after blinkpos)) - ?\$) - (setq mismatch - (or (null (matching-paren (char-after blinkpos))) + (save-excursion + (goto-char blinkpos) + (not (looking-at "\\s$"))) + (setq matching-paren + (or (and parse-sexp-lookup-properties + (let ((prop (get-text-property blinkpos 'syntax-table))) + (and (consp prop) + (eq (car prop) 4) + (cdr prop)))) + (matching-paren (char-after blinkpos))) + mismatch + (or (null matching-paren) (/= (char-after (1- oldpos)) - (matching-paren (char-after blinkpos)))))) + matching-paren)))) (if mismatch (setq blinkpos nil)) (if blinkpos ;; Don't log messages about paren matching. @@ -3696,9 +3758,9 @@ See also `read-mail-command' concerning reading mail." (same-window-buffer-names nil) (same-window-regexps nil)) (funcall switch-function "*mail*"))) - (let ((cc (cdr (assoc-ignore-case "cc" other-headers))) - (in-reply-to (cdr (assoc-ignore-case "in-reply-to" other-headers))) - (body (cdr (assoc-ignore-case "body" other-headers)))) + (let ((cc (cdr (assoc-string "cc" other-headers t))) + (in-reply-to (cdr (assoc-string "in-reply-to" other-headers t))) + (body (cdr (assoc-string "body" other-headers t)))) (or (mail continue to subject in-reply-to cc yank-action send-actions) continue (error "Message aborted")) @@ -3791,25 +3853,25 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally." (read-variable (format "Set variable (default %s): " default-var) default-var) (read-variable "Set variable: "))) - (minibuffer-help-form '(describe-variable var)) - (prop (get var 'variable-interactive)) - (prompt (format "Set %s%s to value: " var - (cond ((local-variable-p var) - " (buffer-local)") - ((or current-prefix-arg - (local-variable-if-set-p var)) - " buffer-locally") - (t " globally")))) - (val (if prop - ;; Use VAR's `variable-interactive' property - ;; as an interactive spec for prompting. - (call-interactively `(lambda (arg) - (interactive ,prop) - arg)) - (read - (read-string prompt nil - 'set-variable-value-history))))) - (list var val current-prefix-arg))) + (minibuffer-help-form '(describe-variable var)) + (prop (get var 'variable-interactive)) + (prompt (format "Set %s%s to value: " var + (cond ((local-variable-p var) + " (buffer-local)") + ((or current-prefix-arg + (local-variable-if-set-p var)) + " buffer-locally") + (t " globally")))) + (val (if prop + ;; Use VAR's `variable-interactive' property + ;; as an interactive spec for prompting. + (call-interactively `(lambda (arg) + (interactive ,prop) + arg)) + (read + (read-string prompt nil + 'set-variable-value-history))))) + (list var val current-prefix-arg))) (and (custom-variable-p var) (not (get var 'custom-type)) @@ -4054,6 +4116,15 @@ The completion list buffer is available as the value of `standard-output'.") ;; This function goes in completion-setup-hook, so that it is called ;; after the text of the completion list buffer is written. +(defface completion-emphasis + '((t (:inherit bold))) + "Face put on the first uncommon character in completions in *Completions* buffer." + :group 'completion) + +(defface completion-de-emphasis + '((t (:inherit default))) + "Face put on the common prefix substring in completions in *Completions* buffer." + :group 'completion) (defun completion-setup-function () (save-excursion @@ -4083,6 +4154,27 @@ The completion list buffer is available as the value of `standard-output'.") (save-match-data (if (minibufferp mainbuf) (setq completion-base-size 0)))) + ;; Put emphasis and de-emphasis faces on completions. + (when completion-base-size + (let ((common-string-length (length + (substring mbuf-contents + completion-base-size))) + (element-start (next-single-property-change + (point-min) + 'mouse-face)) + element-common-end) + (while element-start + (setq element-common-end (+ element-start common-string-length)) + (when (and (get-char-property element-start 'mouse-face) + (get-char-property element-common-end 'mouse-face)) + (put-text-property element-start element-common-end + 'font-lock-face 'completion-de-emphasis) + (put-text-property element-common-end (1+ element-common-end) + 'font-lock-face 'completion-emphasis)) + (setq element-start (next-single-property-change + element-start + 'mouse-face))))) + ;; Insert help string. (goto-char (point-min)) (if (display-mouse-p) (insert (substitute-command-keys @@ -4251,11 +4343,22 @@ Returns nil if PROCESS has already terminated." ;; - syntax-table ;; - overlays (defun clone-buffer (&optional newname display-flag) - "Create a twin copy of the current buffer. -If NEWNAME is nil, it defaults to the current buffer's name; -NEWNAME is modified by adding or incrementing at the end as necessary. + "Create and return a twin copy of the current buffer. +Unlike an indirect buffer, the new buffer can be edited +independently of the old one (if it is not read-only). +NEWNAME is the name of the new buffer. It may be modified by +adding or incrementing at the end as necessary to create a +unique buffer name. If nil, it defaults to the name of the +current buffer, with the proper suffix. If DISPLAY-FLAG is +non-nil, the new buffer is shown with `pop-to-buffer'. Trying to +clone a file-visiting buffer, or a buffer whose major mode symbol +has a non-nil `no-clone' property, results in an error. + +Interactively, DISPLAY-FLAG is t and NEWNAME is the name of the +current buffer with appropriate suffix. However, if a prefix +argument is given, then the command prompts for NEWNAME in the +minibuffer. -If DISPLAY-FLAG is non-nil, the new buffer is shown with `pop-to-buffer'. This runs the normal hook `clone-buffer-hook' in the new buffer after it has been set up properly in other respects." (interactive @@ -4520,4 +4623,6 @@ works by saving the value of `buffer-invisibility-spec' and setting it to nil." ; (provide 'simple) + +;;; arch-tag: 24af67c0-2a49-44f6-b3b1-312d8b570dfd ;;; simple.el ends here diff --git a/lisp/skeleton.el b/lisp/skeleton.el index 3cb37b44ae..e843ef9f02 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el @@ -561,4 +561,5 @@ symmetrical ones, and the same character twice for the others." (provide 'skeleton) +;;; arch-tag: ccad7bd5-eb5d-40de-9ded-900197215c3e ;;; skeleton.el ends here diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el index 108eff0775..bd4d8d04a6 100644 --- a/lisp/smerge-mode.el +++ b/lisp/smerge-mode.el @@ -1,10 +1,9 @@ ;;; smerge-mode.el --- Minor mode to resolve diff3 conflicts -;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 01, 03, 2004 Free Software Foundation, Inc. ;; Author: Stefan Monnier -;; Keywords: merge diff3 cvs conflict -;; Revision: $Id: smerge-mode.el,v 1.20 2002/10/10 17:30:20 monnier Exp $ +;; Keywords: revision-control merge diff3 cvs conflict ;; This file is part of GNU Emacs. @@ -137,26 +136,64 @@ Used in `smerge-diff-base-mine' and related functions." `((,smerge-command-prefix . ,smerge-basic-map)) "Keymap for `smerge-mode'.") +(defvar smerge-check-cache nil) +(make-variable-buffer-local 'smerge-check-cache) +(defun smerge-check (n) + (condition-case nil + (let ((state (cons (point) (buffer-modified-tick)))) + (unless (equal (cdr smerge-check-cache) state) + (smerge-match-conflict) + (setq smerge-check-cache (cons (match-data) state))) + (nth (* 2 n) (car smerge-check-cache))) + (error nil))) + (easy-menu-define smerge-mode-menu smerge-mode-map "Menu for `smerge-mode'." '("SMerge" ["Next" smerge-next :help "Go to next conflict"] ["Previous" smerge-prev :help "Go to previous conflict"] - ["Keep All" smerge-keep-all :help "Keep all three versions"] - ["Revert to Base" smerge-keep-base :help "Revert to base version"] - ["Keep Other" smerge-keep-other :help "Keep `other' version"] - ["Keep Yours" smerge-keep-mine :help "Keep your version"] - ["Keep Current" smerge-keep-current :help "Use current (at point) version"] + "--" + ["Keep All" smerge-keep-all :help "Keep all three versions" + :active (smerge-check 1)] + ["Keep Current" smerge-keep-current :help "Use current (at point) version" + :active (and (smerge-check 1) (> (smerge-get-current) 0))] + "--" + ["Revert to Base" smerge-keep-base :help "Revert to base version" + :active (smerge-check 2)] + ["Keep Other" smerge-keep-other :help "Keep `other' version" + :active (smerge-check 3)] + ["Keep Yours" smerge-keep-mine :help "Keep your version" + :active (smerge-check 1)] "--" ["Diff Base/Mine" smerge-diff-base-mine - :help "Diff `base' and `mine' for current conflict"] + :help "Diff `base' and `mine' for current conflict" + :active (smerge-check 2)] ["Diff Base/Other" smerge-diff-base-other - :help "Diff `base' and `other' for current conflict"] + :help "Diff `base' and `other' for current conflict" + :active (smerge-check 2)] ["Diff Mine/Other" smerge-diff-mine-other - :help "Diff `mine' and `other' for current conflict"] + :help "Diff `mine' and `other' for current conflict" + :active (smerge-check 1)] "--" ["Invoke Ediff" smerge-ediff - :help "Use Ediff to resolve the conflicts"] + :help "Use Ediff to resolve the conflicts" + :active (smerge-check 1)] + ["Auto Resolve" smerge-resolve + :help "Try auto-resolution heuristics" + :active (smerge-check 1)] + ["Combine" smerge-combine-with-next + :help "Combine current conflict with next" + :active (smerge-check 1)] + )) + +(easy-menu-define smerge-context-menu nil + "Context menu for mine area in `smerge-mode'." + '(nil + ["Keep Current" smerge-keep-current :help "Use current (at point) version"] + ["Kill Current" smerge-kill-current :help "Remove current (at point) version"] + ["Keep All" smerge-keep-all :help "Keep all three versions"] + "---" + ["More..." (popup-menu smerge-mode-menu) :help "Show full SMerge mode menu"] )) (defconst smerge-font-lock-keywords @@ -206,15 +243,22 @@ Can be nil if the style is undecided, or else: (defun smerge-keep-all () - "Keep all three versions. -Convenient for the kind of conflicts that can arise in ChangeLog files." + "Concatenate all versions." (interactive) (smerge-match-conflict) - (replace-match (concat (or (match-string 1) "") - (or (match-string 2) "") - (or (match-string 3) "")) - t t) - (smerge-auto-leave)) + (let ((mb2 (or (match-beginning 2) (point-max))) + (me2 (or (match-end 2) (point-min)))) + (delete-region (match-end 3) (match-end 0)) + (delete-region (max me2 (match-end 1)) (match-beginning 3)) + (if (and (match-end 2) (/= (match-end 1) (match-end 3))) + (delete-region (match-end 1) (match-beginning 2))) + (delete-region (match-beginning 0) (min (match-beginning 1) mb2)) + (smerge-auto-leave))) + +(defun smerge-keep-n (n) + ;; We used to use replace-match, but that did not preserve markers so well. + (delete-region (match-end n) (match-end 0)) + (delete-region (match-beginning 0) (match-beginning n))) (defun smerge-combine-with-next () "Combine the current conflict with the next one." @@ -255,13 +299,71 @@ Convenient for the kind of conflicts that can arise in ChangeLog files." The function is called with no argument and with the match data set according to `smerge-match-conflict'.") +(defvar smerge-text-properties + `(help-echo "merge conflict: mouse-3 shows a menu" + ;; mouse-face highlight + keymap (keymap (down-mouse-3 . smerge-popup-context-menu)))) + +(defun smerge-remove-props (&optional beg end) + (remove-text-properties + (or beg (match-beginning 0)) + (or end (match-end 0)) + smerge-text-properties)) + +(defun smerge-popup-context-menu (event) + "Pop up the Smerge mode context menu under mouse." + (interactive "e") + (if (and smerge-mode + (save-excursion (posn-set-point (event-end event)) (smerge-check 1))) + (progn + (posn-set-point (event-end event)) + (smerge-match-conflict) + (let ((i (smerge-get-current)) + o) + (if (<= i 0) + ;; Out of range + (popup-menu smerge-mode-menu) + ;; Install overlay. + (setq o (make-overlay (match-beginning i) (match-end i))) + (unwind-protect + (progn + (overlay-put o 'face 'highlight) + (sit-for 0) ;Display the new highlighting. + (popup-menu smerge-context-menu)) + ;; Delete overlay. + (delete-overlay o))))) + ;; There's no conflict at point, the text-props are just obsolete. + (save-excursion + (let ((beg (re-search-backward smerge-end-re nil t)) + (end (re-search-forward smerge-begin-re nil t))) + (smerge-remove-props (or beg (point-min)) (or end (point-max))) + (push event unread-command-events))))) + (defun smerge-resolve () "Resolve the conflict at point intelligently. This relies on mode-specific knowledge and thus only works in some major modes. Uses `smerge-resolve-function' to do the actual work." (interactive) (smerge-match-conflict) - (funcall smerge-resolve-function) + (smerge-remove-props) + (cond + ;; Trivial diff3 -A non-conflicts. + ((and (eq (match-end 1) (match-end 3)) + (eq (match-beginning 1) (match-beginning 3))) + ;; FIXME: Add "if [ diff -b MINE OTHER ]; then select OTHER; fi" + (smerge-keep-n 3)) + ((and (match-end 2) + ;; FIXME: Add "diff -b BASE MINE | patch OTHER". + ;; FIXME: Add "diff -b BASE OTHER | patch MINE". + nil) + ) + ((and (not (match-end 2)) + ;; FIXME: Add "diff -b"-based refinement. + nil) + ) + (t + ;; Mode-specific conflict resolution. + (funcall smerge-resolve-function))) (smerge-auto-leave)) (defun smerge-keep-base () @@ -269,7 +371,8 @@ some major modes. Uses `smerge-resolve-function' to do the actual work." (interactive) (smerge-match-conflict) (smerge-ensure-match 2) - (replace-match (match-string 2) t t) + (smerge-remove-props) + (smerge-keep-n 2) (smerge-auto-leave)) (defun smerge-keep-other () @@ -277,7 +380,8 @@ some major modes. Uses `smerge-resolve-function' to do the actual work." (interactive) (smerge-match-conflict) ;;(smerge-ensure-match 3) - (replace-match (match-string 3) t t) + (smerge-remove-props) + (smerge-keep-n 3) (smerge-auto-leave)) (defun smerge-keep-mine () @@ -285,22 +389,45 @@ some major modes. Uses `smerge-resolve-function' to do the actual work." (interactive) (smerge-match-conflict) ;;(smerge-ensure-match 1) - (replace-match (match-string 1) t t) + (smerge-remove-props) + (smerge-keep-n 1) (smerge-auto-leave)) -(defun smerge-keep-current () - "Use the current (under the cursor) version." - (interactive) - (smerge-match-conflict) +(defun smerge-get-current () (let ((i 3)) (while (or (not (match-end i)) (< (point) (match-beginning i)) (>= (point) (match-end i))) (decf i)) + i)) + +(defun smerge-keep-current () + "Use the current (under the cursor) version." + (interactive) + (smerge-match-conflict) + (let ((i (smerge-get-current))) (if (<= i 0) (error "Not inside a version") - (replace-match (match-string i) t t) + (smerge-remove-props) + (smerge-keep-n i) (smerge-auto-leave)))) +(defun smerge-kill-current () + "Remove the current (under the cursor) version." + (interactive) + (smerge-match-conflict) + (let ((i (smerge-get-current))) + (if (<= i 0) (error "Not inside a version") + (smerge-remove-props) + (let ((left nil)) + (dolist (n '(3 2 1)) + (if (and (match-end n) (/= (match-end n) (match-end i))) + (push n left))) + (if (and (cdr left) + (/= (match-end (car left)) (match-end (cadr left)))) + (ding) ;We don't know how to do that. + (smerge-keep-n (car left)) + (smerge-auto-leave)))))) + (defun smerge-diff-base-mine () "Diff 'base' and 'mine' version in current conflict region." (interactive) @@ -357,20 +484,28 @@ An error is raised if not inside a conflict." (setq mine-end (match-beginning 0)) (setq base-start (match-end 0))) - ((string= filename (file-name-nondirectory - (or buffer-file-name ""))) - ;; a 2-parts conflict - (set (make-local-variable 'smerge-conflict-style) 'diff3-E)) - - ((and (not base-start) - (or (eq smerge-conflict-style 'diff3-A) - (string-match "^[.0-9]+\\'" filename))) - ;; a same-diff conflict - (setq base-start mine-start) - (setq base-end mine-end) - (setq mine-start other-start) - (setq mine-end other-end))) - + ((string= filename (file-name-nondirectory + (or buffer-file-name ""))) + ;; a 2-parts conflict + (set (make-local-variable 'smerge-conflict-style) 'diff3-E)) + + ((and (not base-start) + (or (eq smerge-conflict-style 'diff3-A) + (equal filename "ANCESTOR") + (string-match "\\`[.0-9]+\\'" filename))) + ;; a same-diff conflict + (setq base-start mine-start) + (setq base-end mine-end) + (setq mine-start other-start) + (setq mine-end other-end))) + + (let ((inhibit-read-only t) + (inhibit-modification-hooks t) + (m (buffer-modified-p))) + (unwind-protect + (add-text-properties start end smerge-text-properties) + (restore-buffer-modified-p m))) + (store-match-data (list start end mine-start mine-end base-start base-end @@ -455,7 +590,7 @@ buffer names." (goto-char (point-min)) (while (smerge-find-conflict) (when (match-beginning 2) (setq base t)) - (replace-match (match-string 1) t t)) + (smerge-keep-n 1)) (buffer-enable-undo) (set-buffer-modified-p nil) (funcall mode)) @@ -465,7 +600,7 @@ buffer names." (insert-buffer-substring buf) (goto-char (point-min)) (while (smerge-find-conflict) - (replace-match (match-string 3) t t)) + (smerge-keep-n 3)) (buffer-enable-undo) (set-buffer-modified-p nil) (funcall mode)) @@ -478,7 +613,9 @@ buffer names." (insert-buffer-substring buf) (goto-char (point-min)) (while (smerge-find-conflict) - (replace-match (or (match-string 2) "") t t)) + (if (match-end 2) + (smerge-keep-n 2) + (delete-region (match-beginning 0) (match-end 0)))) (buffer-enable-undo) (set-buffer-modified-p nil) (funcall mode))) @@ -535,4 +672,6 @@ buffer names." (provide 'smerge-mode) + +;;; arch-tag: 605c8d1e-e43d-4943-a6f3-1bcc4333e690 ;;; smerge-mode.el ends here diff --git a/lisp/sort.el b/lisp/sort.el index 59e076ecec..d90369cabc 100644 --- a/lisp/sort.el +++ b/lisp/sort.el @@ -480,19 +480,30 @@ Use \\[untabify] to convert tabs to spaces before sorting." (setq col-end (max col-beg1 col-end1)) (if (search-backward "\t" beg1 t) (error "sort-columns does not work with tabs -- use M-x untabify")) - (if (not (or (eq system-type 'vax-vms) - (text-properties-at beg1) - (< (next-property-change beg1 nil end1) end1))) + (if (not (or (memq system-type '(vax-vms windows-nt)) + (let ((pos beg1) plist fontified) + (catch 'found + (while (< pos end1) + (setq plist (text-properties-at pos)) + (setq fontified (plist-get plist 'fontified)) + (while (consp plist) + (unless (or (eq (car plist) 'fontified) + (and (eq (car plist) 'face) + fontified)) + (throw 'found t)) + (setq plist (cddr plist))) + (setq pos (next-property-change pos nil end1))))))) ;; Use the sort utility if we can; it is 4 times as fast. - ;; Do not use it if there are any properties in the region, - ;; since the sort utility would lose the properties. + ;; Do not use it if there are any non-font-lock properties + ;; in the region, since the sort utility would lose the + ;; properties. (let ((sort-args (list (if reverse "-rt\n" "-t\n") (concat "+0." (int-to-string col-start)) (concat "-0." (int-to-string col-end))))) (when sort-fold-case (push "-f" sort-args)) (apply #'call-process-region beg1 end1 "sort" t t nil sort-args)) - ;; On VMS, use Emacs's own facilities. + ;; On VMS and ms-windows, use Emacs's own facilities. (save-excursion (save-restriction (narrow-to-region beg1 end1) @@ -535,4 +546,5 @@ From a program takes two point or marker arguments, BEG and END." (provide 'sort) +;;; arch-tag: fbac12be-2a7b-4c8a-9665-264d61f70bd9 ;;; sort.el ends here diff --git a/lisp/soundex.el b/lisp/soundex.el index f0c5445817..fb9d72f8fa 100644 --- a/lisp/soundex.el +++ b/lisp/soundex.el @@ -73,4 +73,5 @@ and Searching\", Addison-Wesley (1973), pp. 391-392." (provide 'soundex) +;;; arch-tag: b2615a98-feb7-430e-a717-171086738953 ;;; soundex.el ends here diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 992571e9c1..f8e9386585 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -3410,7 +3410,9 @@ directory with these items." (if (re-search-forward "[]>?}] [^ ]" (save-excursion (end-of-line) (point)) t) - (speedbar-do-function-pointer) + (progn + (forward-char -1) + (speedbar-do-function-pointer)) nil)) (speedbar-do-function-pointer))) @@ -4339,4 +4341,5 @@ If we have an image associated with it, use that image." ;; run load-time hooks (run-hooks 'speedbar-load-hook) +;;; arch-tag: 4477e6d1-f78c-48b9-a503-387d3c9767d5 ;;; speedbar.el ends here diff --git a/lisp/startup.el b/lisp/startup.el index 6bcb04855e..b3066bffba 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -25,101 +25,9 @@ ;;; Commentary: -;; This file parses the command line and gets Emacs running. Options on -;; the command line are handled in precedence order. The order is the -;; one in the list below; first described means first handled. Options -;; within each category (delimited by a bar) are handled in the order -;; encountered on the command line. - -;; ------------------------- -;; -version Print Emacs version to stderr, then exit -;; --version successfully right away. -;; This option is handled by emacs.c -;; ------------------------- -;; -help Print a short usage description and exit -;; --help successfully right away. -;; This option is handled by emacs.c -;; ------------------------- -;; -nl Do not use shared memory (for systems that -;; -no-shared-memory support this) for the dumped Emacs data. -;; This option is handled by emacs.c -;; -;; -map For VMS. -;; --map-data This option is handled by emacs.c -;; ------------------------- -;; -t FILE Use FILE as the name of the terminal. -;; --terminal FILE Using this implies "-nw" also. -;; This option is handled by emacs.c -;; ------------------------- -;; -d DISPNAME Use DISPNAME as the name of the X -;; -display DISPNAME display for the initial frame. -;; --display DISPNAME This option is handled by emacs.c -;; ------------------------- -;; -nw Do not use a windows system (but use the -;; --no-window-system terminal instead.) -;; This option is handled by emacs.c -;; ------------------------- -;; -batch Execute noninteractively (messages go to stdout, -;; --batch variable noninteractive set to t) -;; This option is handled by emacs.c -;; ------------------------- -;; -q Do not load user's init file and do not load -;; -no-init-file "default.el". Regardless of this switch, -;; --no-init-file "site-start" is still loaded. -;; ------------------------- -;; -no-site-file Do not load "site-start.el". (This is the ONLY -;; --no-site-file way to prevent loading that file.) -;; ------------------------- -;; -no-splash Don't display a splash screen on startup. -;; --no-splash -;; ------------------------- -;; -u USER Load USER's init file instead of the init -;; -user USER file belonging to the user starting Emacs. -;; --user USER -;; ------------------------- -;; -debug-init Don't catch errors in init files; let the -;; --debug-init debugger run. -;; ------------------------- -;; -i ICONTYPE Set type of icon using when Emacs is -;; -itype ICONTYPE iconified under X. -;; --icon-type ICONTYPE This option is passed on to term/x-win.el -;; -;; -iconic Start Emacs iconified. -;; --iconic This option is passed on to term/x-win.el -;; ------------------------- -;; Various X options for colors/fonts/geometry/title etc. -;; These options are passed on to term/x-win.el which see. -;; ------------------------- -;; FILE Visit FILE. -;; -visit FILE -;; --visit FILE -;; -file FILE -;; --file FILE -;; -;; -L DIRNAME Add DIRNAME to load-path -;; -directory DIRNAME -;; --directory DIRNAME -;; -;; -l FILE Load and execute the Emacs lisp code -;; -load FILE in FILE. -;; --load FILE -;; -;; -f FUNC Execute Emacs lisp function FUNC with -;; -funcall FUNC no arguments. The "-e" form is outdated -;; --funcall FUNC and should not be used. (It's a typo -;; -e FUNC promoted to a feature.) -;; -;; -eval FORM Execute Emacs lisp form FORM. -;; --eval FORM -;; -execute EXPR -;; --execute EXPR -;; -;; -insert FILE Insert the contents of FILE into buffer. -;; --insert FILE -;; ------------------------- -;; -kill Kill (exit) Emacs right away. -;; --kill -;; ------------------------- +;; This file parses the command line and gets Emacs running. Options +;; on the command line are handled in precedence order. For priorities +;; see the structure standard_args in the emacs.c file. ;;; Code: @@ -168,8 +76,8 @@ the startup message unless he personally acts to inhibit it." (defvar command-switch-alist nil "Alist of command-line switches. Elements look like (SWITCH-STRING . HANDLER-FUNCTION). -HANDLER-FUNCTION receives switch name as sole arg; -remaining command-line args are in the variable `command-line-args-left'.") +HANDLER-FUNCTION receives the switch string as its sole argument; +the remaining command-line args are in the variable `command-line-args-left'.") (defvar command-line-args-left nil "List of command-line args not yet processed.") @@ -359,6 +267,8 @@ from being initialized." string) :group 'auto-save) +(defvar emacs-quick-startup nil) + (defvar init-file-debug nil) (defvar init-file-had-error nil) @@ -777,6 +687,11 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (setq argval nil argi orig-argi))))) (cond + ((equal argi "-Q") + (setq init-file-user nil + site-run-file nil + emacs-quick-startup t) + (push '(vertical-scroll-bars . nil) initial-frame-alist)) ((member argi '("-q" "-no-init-file")) (setq init-file-user nil)) ((member argi '("-u" "-user")) @@ -808,18 +723,21 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." ;; If frame was created with a menu bar, set menu-bar-mode on. (unless (or noninteractive + emacs-quick-startup (and (memq window-system '(x w32)) (<= (frame-parameter nil 'menu-bar-lines) 0))) (menu-bar-mode 1)) ;; If frame was created with a tool bar, switch tool-bar-mode on. (unless (or noninteractive + emacs-quick-startup (not (display-graphic-p)) (<= (frame-parameter nil 'tool-bar-lines) 0)) (tool-bar-mode 1)) ;; Can't do this init in defcustom because window-system isn't set. (unless (or noninteractive + emacs-quick-startup (eq system-type 'ms-dos) (not (memq window-system '(x w32)))) (setq-default blink-cursor t) @@ -841,6 +759,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (normal-erase-is-backspace-mode 1))) (unless (or noninteractive + emacs-quick-startup (not (display-graphic-p)) (not (fboundp 'x-show-tip))) (setq-default tooltip-mode t) @@ -1194,8 +1113,8 @@ where FACE is a valid face specification, as it can be used with (when img (when (> window-width image-width) ;; Center the image in the window. - (let ((pos (/ (- window-width image-width) 2))) - (insert (propertize " " 'display `(space :align-to ,pos)))) + (insert (propertize " " 'display + `(space :align-to (+ center (-0.5 . ,img))))) ;; Change the color of the XPM version of the splash image ;; so that it is visible with a dark frame background. @@ -1344,9 +1263,10 @@ we put it on this frame." (defun use-fancy-splash-screens-p () "Return t if fancy splash screens should be used." - (when (or (and (display-color-p) + (when (and (display-graphic-p) + (or (and (display-color-p) (image-type-available-p 'xpm)) - (image-type-available-p 'pbm)) + (image-type-available-p 'pbm))) (let ((frame (fancy-splash-frame))) (when frame (let* ((img (create-image (or fancy-splash-image @@ -1520,8 +1440,7 @@ Type \\[describe-distribution] for information on getting the latest version.")) Fancy splash screens are used on graphic displays, normal otherwise." (interactive) - (if (and (display-graphic-p) - (use-fancy-splash-screens-p)) + (if (use-fancy-splash-screens-p) (fancy-splash-screens) (normal-splash-screen))) @@ -1556,6 +1475,8 @@ normal otherwise." nil t)) (error nil)) (kill-buffer buffer))))) + ;; Stop any "Loading image..." message hiding echo-area-message. + (use-fancy-splash-screens-p) (display-startup-echo-area-message)) ;; Delay 2 seconds after an init file error message @@ -1745,11 +1666,13 @@ normal otherwise." (list-buffers))))) ;; Maybe display a startup screen. - (when (and (not inhibit-startup-message) (not noninteractive) + (unless (or inhibit-startup-message + noninteractive + emacs-quick-startup ;; Don't display startup screen if init file ;; has started some sort of server. - (not (and (fboundp 'process-list) - (process-list)))) + (and (fboundp 'process-list) + (process-list))) ;; Display a startup screen, after some preparations. ;; If there are no switches to process, we might as well @@ -1808,4 +1731,5 @@ normal otherwise." (setq file (replace-match "/" t t file))) file)) +;;; arch-tag: 7e294698-244d-4758-984b-4047f887a5db ;;; startup.el ends here diff --git a/lisp/strokes.el b/lisp/strokes.el index 9b138e0e5d..cd3e82c4d3 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el @@ -78,7 +78,7 @@ ;; however, if you would probably just have the user enter in the ;; stroke interactively and then set the stroke to whatever he/she -;; entered. The Lisp function to interactively read a stroke is +;; entered. The Lisp function to interactively read a stroke is ;; `strokes-read-stroke'. This is especially helpful when you're ;; on a fast computer that can handle a 9x9 stroke grid. @@ -173,6 +173,8 @@ ;; Other: I always have the most beta version of strokes, so if you ;; want it just let me know. +;; Fixme: Use pbm instead of xpm for pixmaps to work generally. + ;;; Code: ;;; Requirements and provisions... @@ -433,7 +435,9 @@ or for window START-WINDOW if that is specified." Operated just like `global-set-key', except for strokes. COMMAND is a symbol naming an interactively-callable function. STROKE is a list of sampled positions on the stroke grid as described in the -documentation for the `strokes-define-stroke' function." +documentation for the `strokes-define-stroke' function. + +See also `strokes-global-set-stroke-string'." (interactive (list (and (or strokes-mode (strokes-mode t)) @@ -442,6 +446,22 @@ documentation for the `strokes-define-stroke' function." (read-command "Command to map stroke to: "))) (strokes-define-stroke strokes-global-map stroke command)) +(defun strokes-global-set-stroke-string (stroke string) + "Interactively give STROKE the global binding as STRING. +Operated just like `global-set-key', except for strokes. STRING +is a string to be inserted by the stroke. STROKE is a list of +sampled positions on the stroke grid as described in the +documentation for the `strokes-define-stroke' function. + +Compare `strokes-global-set-stroke'." + (interactive + (list + (and (or strokes-mode (strokes-mode t)) + (strokes-read-complex-stroke + "Draw with mouse button 1 (or 2). End with button 3...")) + (read-string "String to map stroke to: "))) + (strokes-define-stroke strokes-global-map stroke string)) + ;;(defun global-unset-stroke (stroke); FINISH THIS DEFUN! ;; "delete all strokes matching STROKE from `strokes-global-map', ;; letting the user input @@ -1317,7 +1337,9 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead." "------- ------") (loop for def in strokes-map do (let ((stroke (car def)) - (command-name (symbol-name (cdr def)))) + (command-name (if (symbolp (cdr def)) + (symbol-name (cdr def)) + (prin1-to-string (cdr def))))) (strokes-xpm-for-stroke stroke " *strokes-xpm*") (newline 2) (insert-char ?\ 45) @@ -1325,9 +1347,13 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead." (insert command-name) (beginning-of-line) (forward-char 45) - (insert-image (create-image (with-current-buffer " *strokes-xpm*" - (buffer-string)) - 'xpm t))) + (insert-image + (create-image (with-current-buffer " *strokes-xpm*" + (buffer-string)) + 'xpm t + :color-symbols + `(("foreground" + . ,(frame-parameter nil 'foreground-color)))))) finally do (kill-region (1+ (point)) (point-max))) (view-buffer "*Strokes List*" nil) (set (make-local-variable 'view-mode-map) @@ -1722,4 +1748,5 @@ Store XPM in buffer BUFNAME if supplied \(default is ` *strokes-xpm*'\)" (run-hooks 'strokes-load-hook) (provide 'strokes) +;;; arch-tag: 8377f60e-43fb-467a-bbcd-2774f91f833e ;;; strokes.el ends here diff --git a/lisp/subr.el b/lisp/subr.el index 67b9360f07..39a9caa310 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1,6 +1,6 @@ ;;; subr.el --- basic lisp subroutines for Emacs -;; Copyright (C) 1985, 86, 92, 94, 95, 99, 2000, 2001, 2002, 2003 +;; Copyright (C) 1985, 86, 92, 94, 95, 99, 2000, 2001, 2002, 03, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -62,6 +62,20 @@ The return value of this function is not used." (defalias 'not 'null) +(defmacro noreturn (form) + "Evaluates FORM, with the expectation that the evaluation will signal an error +instead of returning to its caller. If FORM does return, an error is +signalled." + `(prog1 ,form + (error "Form marked with `noreturn' did return"))) + +(defmacro 1value (form) + "Evaluates FORM, with the expectation that all the same value will be returned +from all evaluations of FORM. This is the global do-nothing +version of `1value'. There is also `testcover-1value' that +complains if FORM ever does return differing values." + form) + (defmacro lambda (&rest cdr) "Return a lambda expression. A call of the form (lambda ARGS DOCSTRING INTERACTIVE BODY) is @@ -144,6 +158,12 @@ the return value (nil if RESULT is omitted). (setq ,(car spec) (1+ ,(car spec)))) ,@(cdr (cdr spec))))) +(defmacro declare (&rest specs) + "Do not evaluate any arguments and return nil. +Treated as a declaration when used at the right place in a +`defmacro' form. \(See Info anchor `(elisp)Definition of declare'." + nil) + (defsubst caar (x) "Return the car of the car of X." (car (car x))) @@ -189,22 +209,54 @@ If N is bigger than the length of X, return X." (if (> n 0) (setcdr (nthcdr (- (1- m) n) x) nil)) x)))) +(defun delete-dups (list) + "Destructively remove `equal' duplicates from LIST. +Store the result in LIST and return it. LIST must be a proper list. +Of several `equal' occurrences of an element in LIST, the first +one is kept." + (let ((tail list)) + (while tail + (setcdr tail (delete (car tail) (cdr tail))) + (setq tail (cdr tail)))) + list) + (defun number-sequence (from &optional to inc) "Return a sequence of numbers from FROM to TO (both inclusive) as a list. -INC is the increment used between numbers in the sequence. -So, the Nth element of the list is (+ FROM (* N INC)) where N counts from -zero. -If INC is nil, it defaults to 1 (one). -If TO is nil, it defaults to FROM. -If TO is less than FROM, the value is nil. -Note that FROM, TO and INC can be integer or float." - (if (not to) +INC is the increment used between numbers in the sequence and defaults to 1. +So, the Nth element of the list is \(+ FROM \(* N INC)) where N counts from +zero. TO is only included if there is an N for which TO = FROM + N * INC. +If TO is nil or numerically equal to FROM, return \(FROM). +If INC is positive and TO is less than FROM, or INC is negative +and TO is larger than FROM, return nil. +If INC is zero and TO is neither nil nor numerically equal to +FROM, signal an error. + +This function is primarily designed for integer arguments. +Nevertheless, FROM, TO and INC can be integer or float. However, +floating point arithmetic is inexact. For instance, depending on +the machine, it may quite well happen that +\(number-sequence 0.4 0.6 0.2) returns the one element list \(0.4), +whereas \(number-sequence 0.4 0.8 0.2) returns a list with three +elements. Thus, if some of the arguments are floats and one wants +to make sure that TO is included, one may have to explicitly write +TO as \(+ FROM \(* N INC)) or use a variable whose value was +computed with this exact expression. Alternatively, you can, +of course, also replace TO with a slightly larger value +\(or a slightly more negative value if INC is negative)." + (if (or (not to) (= from to)) (list from) (or inc (setq inc 1)) - (let (seq) - (while (<= from to) - (setq seq (cons from seq) - from (+ from inc))) + (when (zerop inc) (error "The increment can not be zero")) + (let (seq (n 0) (next from)) + (if (> inc 0) + (while (<= next to) + (setq seq (cons next seq) + n (1+ n) + next (+ from (* n inc)))) + (while (>= next to) + (setq seq (cons next seq) + n (1+ n) + next (+ from (* n inc))))) (nreverse seq)))) (defun remove (elt seq) @@ -263,27 +315,19 @@ If TEST is omitted or nil, `equal' is used." (setq tail (cdr tail))) value)) +(make-obsolete 'assoc-ignore-case 'assoc-string) (defun assoc-ignore-case (key alist) "Like `assoc', but ignores differences in case and text representation. KEY must be a string. Upper-case and lower-case letters are treated as equal. Unibyte strings are converted to multibyte for comparison." - (let (element) - (while (and alist (not element)) - (if (eq t (compare-strings key 0 nil (car (car alist)) 0 nil t)) - (setq element (car alist))) - (setq alist (cdr alist))) - element)) + (assoc-string key alist t)) +(make-obsolete 'assoc-ignore-representation 'assoc-string) (defun assoc-ignore-representation (key alist) "Like `assoc', but ignores differences in text representation. KEY must be a string. Unibyte strings are converted to multibyte for comparison." - (let (element) - (while (and alist (not element)) - (if (eq t (compare-strings key 0 nil (car (car alist)) 0 nil)) - (setq element (car alist))) - (setq alist (cdr alist))) - element)) + (assoc-string key alist nil)) (defun member-ignore-case (elt list) "Like `member', but ignores differences in case and text representation. @@ -634,20 +678,23 @@ The value is a printing character (not upper case) or a symbol." (defsubst event-start (event) "Return the starting position of EVENT. -If EVENT is a mouse press or a mouse click, this returns the location +If EVENT is a mouse or key press or a mouse click, this returns the location of the event. If EVENT is a drag, this returns the drag's starting position. The return value is of the form - (WINDOW BUFFER-POSITION (X . Y) TIMESTAMP) + (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW) + IMAGE (DX . DY) (WIDTH . HEIGHT)) The `posn-' functions access elements of such lists." (if (consp event) (nth 1 event) (list (selected-window) (point) '(0 . 0) 0))) (defsubst event-end (event) - "Return the ending location of EVENT. EVENT should be a click or drag event. + "Return the ending location of EVENT. +EVENT should be a click, drag, or key press event. If EVENT is a click event, this function is the same as `event-start'. The return value is of the form - (WINDOW BUFFER-POSITION (X . Y) TIMESTAMP) + (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW) + IMAGE (DX . DY) (WIDTH . HEIGHT)) The `posn-' functions access elements of such lists." (if (consp event) (nth (if (consp (nth 2 event)) 2 1) event) (list (selected-window) (point) '(0 . 0) 0))) @@ -659,61 +706,116 @@ The return value is a positive integer." (defsubst posn-window (position) "Return the window in POSITION. -POSITION should be a list of the form - (WINDOW BUFFER-POSITION (X . Y) TIMESTAMP) -as returned by the `event-start' and `event-end' functions." +POSITION should be a list of the form returned by the `event-start' +and `event-end' functions." (nth 0 position)) +(defsubst posn-area (position) + "Return the window area recorded in POSITION, or nil for the text area. +POSITION should be a list of the form returned by the `event-start' +and `event-end' functions." + (let ((area (if (consp (nth 1 position)) + (car (nth 1 position)) + (nth 1 position)))) + (and (symbolp area) area))) + (defsubst posn-point (position) "Return the buffer location in POSITION. -POSITION should be a list of the form - (WINDOW BUFFER-POSITION (X . Y) TIMESTAMP) -as returned by the `event-start' and `event-end' functions." - (if (consp (nth 1 position)) - (car (nth 1 position)) - (nth 1 position))) +POSITION should be a list of the form returned by the `event-start' +and `event-end' functions." + (or (nth 5 position) + (if (consp (nth 1 position)) + (car (nth 1 position)) + (nth 1 position)))) + +(defun posn-set-point (position) + "Move point to POSITION. +Select the corresponding window as well." + (if (not (windowp (posn-window position))) + (error "Position not in text area of window")) + (select-window (posn-window position)) + (if (numberp (posn-point position)) + (goto-char (posn-point position)))) (defsubst posn-x-y (position) "Return the x and y coordinates in POSITION. -POSITION should be a list of the form - (WINDOW BUFFER-POSITION (X . Y) TIMESTAMP) -as returned by the `event-start' and `event-end' functions." +POSITION should be a list of the form returned by the `event-start' +and `event-end' functions." (nth 2 position)) (defun posn-col-row (position) - "Return the column and row in POSITION, measured in characters. -POSITION should be a list of the form - (WINDOW BUFFER-POSITION (X . Y) TIMESTAMP) -as returned by the `event-start' and `event-end' functions. + "Return the nominal column and row in POSITION, measured in characters. +The column and row values are approximations calculated from the x +and y coordinates in POSITION and the frame's default character width +and height. For a scroll-bar event, the result column is 0, and the row -corresponds to the vertical position of the click in the scroll bar." - (let* ((pair (nth 2 position)) - (window (posn-window position))) - (if (eq (if (consp (nth 1 position)) - (car (nth 1 position)) - (nth 1 position)) - 'vertical-scroll-bar) - (cons 0 (scroll-bar-scale pair (1- (window-height window)))) - (if (eq (if (consp (nth 1 position)) - (car (nth 1 position)) - (nth 1 position)) - 'horizontal-scroll-bar) - (cons (scroll-bar-scale pair (window-width window)) 0) - (let* ((frame (if (framep window) window (window-frame window))) - (x (/ (car pair) (frame-char-width frame))) - (y (/ (cdr pair) (+ (frame-char-height frame) - (or (frame-parameter frame 'line-spacing) - default-line-spacing - 0))))) - (cons x y)))))) +corresponds to the vertical position of the click in the scroll bar. +POSITION should be a list of the form returned by the `event-start' +and `event-end' functions." + (let* ((pair (posn-x-y position)) + (window (posn-window position)) + (area (posn-area position))) + (cond + ((null window) + '(0 . 0)) + ((eq area 'vertical-scroll-bar) + (cons 0 (scroll-bar-scale pair (1- (window-height window))))) + ((eq area 'horizontal-scroll-bar) + (cons (scroll-bar-scale pair (window-width window)) 0)) + (t + (let* ((frame (if (framep window) window (window-frame window))) + (x (/ (car pair) (frame-char-width frame))) + (y (/ (cdr pair) (+ (frame-char-height frame) + (or (frame-parameter frame 'line-spacing) + default-line-spacing + 0))))) + (cons x y)))))) + +(defun posn-actual-col-row (position) + "Return the actual column and row in POSITION, measured in characters. +These are the actual row number in the window and character number in that row. +Return nil if POSITION does not contain the actual position; in that case +`posn-col-row' can be used to get approximate values. +POSITION should be a list of the form returned by the `event-start' +and `event-end' functions." + (nth 6 position)) (defsubst posn-timestamp (position) "Return the timestamp of POSITION. -POSITION should be a list of the form - (WINDOW BUFFER-POSITION (X . Y) TIMESTAMP) -as returned by the `event-start' and `event-end' functions." +POSITION should be a list of the form returned by the `event-start' +and `event-end' functions." (nth 3 position)) +(defsubst posn-string (position) + "Return the string object of POSITION, or nil if a buffer position. +POSITION should be a list of the form returned by the `event-start' +and `event-end' functions." + (nth 4 position)) + +(defsubst posn-image (position) + "Return the image object of POSITION, or nil if a not an image. +POSITION should be a list of the form returned by the `event-start' +and `event-end' functions." + (nth 7 position)) + +(defsubst posn-object (position) + "Return the object (image or string) of POSITION. +POSITION should be a list of the form returned by the `event-start' +and `event-end' functions." + (or (posn-image position) (posn-string position))) + +(defsubst posn-object-x-y (position) + "Return the x and y coordinates relative to the object of POSITION. +POSITION should be a list of the form returned by the `event-start' +and `event-end' functions." + (nth 8 position)) + +(defsubst posn-object-width-height (position) + "Return the pixel width and height of the object of POSITION. +POSITION should be a list of the form returned by the `event-start' +and `event-end' functions." + (nth 9 position)) + ;;;; Obsolescent names for functions. @@ -878,31 +980,32 @@ FUNCTION isn't the value of HOOK, or, if FUNCTION doesn't appear in the list of hooks to run in HOOK, then nothing is done. See `add-hook'. The optional third argument, LOCAL, if non-nil, says to modify -the hook's buffer-local value rather than its default value. -This makes the hook buffer-local if needed." +the hook's buffer-local value rather than its default value." (or (boundp hook) (set hook nil)) (or (default-boundp hook) (set-default hook nil)) - (if local (unless (local-variable-if-set-p hook) - (set (make-local-variable hook) (list t))) + ;; Do nothing if LOCAL is t but this hook has no local binding. + (unless (and local (not (local-variable-p hook))) ;; Detect the case where make-local-variable was used on a hook ;; and do what we used to do. - (unless (and (consp (symbol-value hook)) (memq t (symbol-value hook))) - (setq local t))) - (let ((hook-value (if local (symbol-value hook) (default-value hook)))) - ;; Remove the function, for both the list and the non-list cases. - (if (or (not (listp hook-value)) (eq (car hook-value) 'lambda)) - (if (equal hook-value function) (setq hook-value nil)) - (setq hook-value (delete function (copy-sequence hook-value)))) - ;; If the function is on the global hook, we need to shadow it locally - ;;(when (and local (member function (default-value hook)) - ;; (not (member (cons 'not function) hook-value))) - ;; (push (cons 'not function) hook-value)) - ;; Set the actual variable - (if (not local) - (set-default hook hook-value) - (if (equal hook-value '(t)) - (kill-local-variable hook) - (set hook hook-value))))) + (when (and (local-variable-p hook) + (not (and (consp (symbol-value hook)) + (memq t (symbol-value hook))))) + (setq local t)) + (let ((hook-value (if local (symbol-value hook) (default-value hook)))) + ;; Remove the function, for both the list and the non-list cases. + (if (or (not (listp hook-value)) (eq (car hook-value) 'lambda)) + (if (equal hook-value function) (setq hook-value nil)) + (setq hook-value (delete function (copy-sequence hook-value)))) + ;; If the function is on the global hook, we need to shadow it locally + ;;(when (and local (member function (default-value hook)) + ;; (not (member (cons 'not function) hook-value))) + ;; (push (cons 'not function) hook-value)) + ;; Set the actual variable + (if (not local) + (set-default hook hook-value) + (if (equal hook-value '(t)) + (kill-local-variable hook) + (set hook hook-value)))))) (defun add-to-list (list-var element &optional append) "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. @@ -1180,10 +1283,10 @@ Optional DEFAULT is a default password to use instead of empty input." (second (read-passwd "Confirm password: " nil default))) (if (equal first second) (progn - (and (arrayp second) (fillarray second ?\0)) + (and (arrayp second) (clear-string second)) (setq success first)) - (and (arrayp first) (fillarray first ?\0)) - (and (arrayp second) (fillarray second ?\0)) + (and (arrayp first) (clear-string first)) + (and (arrayp second) (clear-string second)) (message "Password not repeated accurately; please start over") (sit-for 1)))) success) @@ -1199,21 +1302,42 @@ Optional DEFAULT is a default password to use instead of empty input." (clear-this-command-keys) (if (= c ?\C-u) (progn - (and (arrayp pass) (fillarray pass ?\0)) + (and (arrayp pass) (clear-string pass)) (setq pass "")) (if (and (/= c ?\b) (/= c ?\177)) (let* ((new-char (char-to-string c)) (new-pass (concat pass new-char))) - (and (arrayp pass) (fillarray pass ?\0)) - (fillarray new-char ?\0) + (and (arrayp pass) (clear-string pass)) + (clear-string new-char) (setq c ?\0) (setq pass new-pass)) (if (> (length pass) 0) (let ((new-pass (substring pass 0 -1))) - (and (arrayp pass) (fillarray pass ?\0)) + (and (arrayp pass) (clear-string pass)) (setq pass new-pass)))))) (message nil) (or pass default "")))) + +;; This should be used by `call-interactively' for `n' specs. +(defun read-number (prompt &optional default) + (let ((n nil)) + (when default + (setq prompt + (if (string-match "\\(\\):[^:]*" prompt) + (replace-match (format " [%s]" default) t t prompt 1) + (concat prompt (format " [%s] " default))))) + (while + (progn + (let ((str (read-from-minibuffer prompt nil nil nil nil + (number-to-string default)))) + (setq n (cond + ((zerop (length str)) default) + ((stringp str) (read str))))) + (unless (numberp n) + (message "Please enter a number.") + (sit-for 1) + t))) + n)) ;;; Atomic change groups. @@ -1321,8 +1445,10 @@ This finishes the change group by reverting all of its changes." (defalias 'redraw-modeline 'force-mode-line-update) (defun force-mode-line-update (&optional all) - "Force the mode line of the current buffer to be redisplayed. -With optional non-nil ALL, force redisplay of all mode lines." + "Force redisplay of the current buffer's mode line and header line. +With optional non-nil ALL, force redisplay of all mode lines and +header lines. This function also forces recomputation of the +menu bar menus and the frame title." (if all (save-excursion (set-buffer (other-buffer)))) (set-buffer-modified-p (buffer-modified-p))) @@ -1497,7 +1623,18 @@ Replaces `category' properties with their defined properties." (defvar yank-undo-function) (defun insert-for-yank (string) + "Calls `insert-for-yank-1' repetitively for each `yank-handler' segment. + +See `insert-for-yank-1' for more details." + (let (to) + (while (setq to (next-single-property-change 0 'yank-handler string)) + (insert-for-yank-1 (substring string 0 to)) + (setq string (substring string to)))) + (insert-for-yank-1 string)) + +(defun insert-for-yank-1 (string) "Insert STRING at point, stripping some text properties. + Strip text properties from the inserted text according to `yank-excluded-properties'. Otherwise just like (insert STRING). @@ -1550,6 +1687,8 @@ BUFFER may be a buffer or a buffer name. Arguments START and END are character numbers specifying the substring. They default to the beginning and the end of BUFFER. Strip text properties from the inserted text according to `yank-excluded-properties'." + ;; Since the buffer text should not normally have yank-handler properties, + ;; there is no need to handle them here. (let ((opoint (point))) (insert-buffer-substring buf start end) (remove-yank-excluded-properties opoint (point)))) @@ -1741,6 +1880,7 @@ in BODY." (defvar delayed-mode-hooks nil "List of delayed mode hooks waiting to be run.") (make-variable-buffer-local 'delayed-mode-hooks) +(put 'delay-mode-hooks 'permanent-local t) (defun run-mode-hooks (&rest hooks) "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS. @@ -1872,10 +2012,8 @@ Zero means the entire text matched by the whole regexp or whole string. STRING should be given if the last search was by `string-match' on STRING." (if (match-beginning num) (if string - (let ((result - (substring string (match-beginning num) (match-end num)))) - (set-text-properties 0 (length result) nil result) - result) + (substring-no-properties string (match-beginning num) + (match-end num)) (buffer-substring-no-properties (match-beginning num) (match-end num))))) @@ -2133,7 +2271,10 @@ configuration." (eq (car object) 'frame-configuration))) (defun functionp (object) - "Non-nil iff OBJECT is a type of object that can be called as a function." + "Non-nil if OBJECT is any kind of function or a special form. +Also non-nil if OBJECT is a symbol and its function definition is +\(recursively) a function or special form. This does not include +macros." (or (and (symbolp object) (fboundp object) (condition-case nil (setq object (indirect-function object)) @@ -2143,28 +2284,6 @@ configuration." (subrp object) (byte-code-function-p object) (eq (car-safe object) 'lambda))) -(defun interactive-form (function) - "Return the interactive form of FUNCTION. -If function is a command (see `commandp'), value is a list of the form -\(interactive SPEC). If function is not a command, return nil." - (setq function (indirect-function function)) - (when (commandp function) - (cond ((byte-code-function-p function) - (when (> (length function) 5) - (let ((spec (aref function 5))) - (if spec - (list 'interactive spec) - (list 'interactive))))) - ((subrp function) - (subr-interactive-form function)) - ((eq (car-safe function) 'lambda) - (setq function (cddr function)) - (when (stringp (car function)) - (setq function (cdr function))) - (let ((form (car function))) - (when (eq (car-safe form) 'interactive) - (copy-sequence form))))))) - (defun assq-delete-all (key alist) "Delete from ALIST all elements whose car is KEY. Return the modified alist. @@ -2219,7 +2338,8 @@ If SUFFIX is non-nil, add that at the end of the file name." ;; isearch-mode is deliberately excluded, since you should ;; not call it yourself. (defvar minor-mode-list '(auto-save-mode auto-fill-mode abbrev-mode - overwrite-mode view-mode) + overwrite-mode view-mode + hs-minor-mode) "List of all minor mode functions.") (defun add-minor-mode (toggle name &optional keymap after toggle-fun) @@ -2448,4 +2568,5 @@ The properties used on SYMBOL are `composefunc', `sendfunc', (put symbol 'abortfunc (or abortfunc 'kill-buffer)) (put symbol 'hookvar (or hookvar 'mail-send-hook))) +;;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc ;;; subr.el ends here diff --git a/lisp/tabify.el b/lisp/tabify.el index 971e1715ee..a28f0d6ccd 100644 --- a/lisp/tabify.el +++ b/lisp/tabify.el @@ -79,4 +79,5 @@ The variable `tab-width' controls the spacing of tab stops." (provide 'tabify) +;;; arch-tag: c83893b1-e0cc-4e57-8a09-73fd03466416 ;;; tabify.el ends here diff --git a/lisp/talk.el b/lisp/talk.el index 07b63b84cc..bbe9c949dd 100644 --- a/lisp/talk.el +++ b/lisp/talk.el @@ -101,4 +101,5 @@ Select the first of these windows, displaying the first of the buffers." (provide 'talk) +;;; arch-tag: 7ab0ad88-1788-4886-a44c-ae685e6f8a1a ;;; talk.el ends here diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index cf795e5d92..a2e9ac8fff 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -1,6 +1,6 @@ ;;; tar-mode.el --- simple editing of tar files from GNU emacs -;; Copyright (C) 1990,91,93,94,95,96,97,98,99,2000,2001 +;; Copyright (C) 1990,91,93,94,95,96,97,98,99,2000,01,2004 ;; Free Software Foundation, Inc. ;; Author: Jamie Zawinski @@ -290,7 +290,7 @@ write-date, checksum, link-type, and link-name." (dotimes (i L) (if (or (< (aref string i) ?0) (> (aref string i) ?7)) - (error "`%c' is not an octal digit")))) + (error "`%c' is not an octal digit" (aref string i))))) (tar-parse-octal-integer string)) @@ -1239,4 +1239,5 @@ Leaves the region wide." (provide 'tar-mode) +;;; arch-tag: 8a585a4a-340e-42c2-89e7-d3b1013a4b78 ;;; tar-mode.el ends here diff --git a/lisp/tempo.el b/lisp/tempo.el index f5a592f5ad..3ceb3e271f 100644 --- a/lisp/tempo.el +++ b/lisp/tempo.el @@ -755,4 +755,5 @@ space bar, and looks something like this: (provide 'tempo) +;;; arch-tag: b3c0ee36-db3b-47bc-875f-091b4e27a063 ;;; tempo.el ends here diff --git a/lisp/term.el b/lisp/term.el index d57355416a..2e0e3efc18 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -658,14 +658,12 @@ Buffer local variable.") (put 'term-scroll-show-maximum-output 'permanent-local t) (put 'term-ptyp 'permanent-local t) -;; True if running under XEmacs (previously Lucid Emacs). -(defmacro term-is-xemacs () '(string-match "Lucid" emacs-version)) ;; Do FORM if running under XEmacs (previously Lucid Emacs). (defmacro term-if-xemacs (&rest forms) - (if (term-is-xemacs) (cons 'progn forms))) + (if (featurep 'xemacs) (cons 'progn forms))) ;; Do FORM if NOT running under XEmacs (previously Lucid Emacs). (defmacro term-ifnot-xemacs (&rest forms) - (if (not (term-is-xemacs)) (cons 'progn forms))) + (if (not (featurep 'xemacs)) (cons 'progn forms))) (defmacro term-in-char-mode () '(eq (current-local-map) term-raw-map)) (defmacro term-in-line-mode () '(not (term-in-char-mode))) @@ -921,6 +919,14 @@ is buffer-local.") (define-key term-raw-map [next] 'term-send-next))) (term-set-escape-char ?\C-c) + +(defun term-window-width () + (if (featurep 'xemacs) + (1- (window-width)) + (if window-system + (window-width) + (1- (window-width))))) + (put 'term-mode 'mode-class 'special) @@ -978,8 +984,10 @@ Entry to this mode runs the hooks on `term-mode-hook'." (make-local-variable 'term-saved-home-marker) (make-local-variable 'term-height) (make-local-variable 'term-width) - (setq term-width (1- (window-width))) + (setq term-width (term-window-width)) (setq term-height (1- (window-height))) + (term-ifnot-xemacs + (set (make-local-variable 'overflow-newline-into-fringe) nil)) (make-local-variable 'term-terminal-parameter) (make-local-variable 'term-saved-cursor) (make-local-variable 'term-last-input-start) @@ -1114,9 +1122,9 @@ Entry to this mode runs the hooks on `term-mode-hook'." (defun term-check-size (process) (if (or (/= term-height (1- (window-height))) - (/= term-width (1- (window-width)))) + (/= term-width (term-window-width))) (progn - (term-reset-size (1- (window-height)) (1- (window-width))) + (term-reset-size (1- (window-height)) (term-window-width)) (set-process-window-size process term-height term-width)))) (defun term-send-raw-string (chars) @@ -1170,6 +1178,7 @@ without any interpretation." ;; Give temporary modes such as isearch a chance to turn off. (run-hooks 'mouse-leave-buffer-hook) (setq this-command 'yank) + (mouse-set-point click) (term-send-raw-string (current-kill (cond ((listp arg) 0) ((eq arg '-) -1) @@ -1288,6 +1297,7 @@ buffer. The hook term-exec-hook is run after each exec." (goto-char (point-max)) (set-marker (process-mark proc) (point)) (set-process-filter proc 'term-emulate-terminal) + (set-process-sentinel proc 'term-sentinel) ;; Feed it the startfile. (cond (startfile ;;This is guaranteed to wait long enough @@ -1304,6 +1314,49 @@ buffer. The hook term-exec-hook is run after each exec." (run-hooks 'term-exec-hook) buffer))) +(defun term-sentinel (proc msg) + "Sentinel for term buffers. +The main purpose is to get rid of the local keymap." + (let ((buffer (process-buffer proc))) + (if (memq (process-status proc) '(signal exit)) + (progn + (if (null (buffer-name buffer)) + ;; buffer killed + (set-process-buffer proc nil) + (let ((obuf (current-buffer))) + ;; save-excursion isn't the right thing if + ;; process-buffer is current-buffer + (unwind-protect + (progn + ;; Write something in the compilation buffer + ;; and hack its mode line. + (set-buffer buffer) + ;; Get rid of local keymap. + (use-local-map nil) + (term-handle-exit (process-name proc) + msg) + ;; Since the buffer and mode line will show that the + ;; process is dead, we can delete it now. Otherwise it + ;; will stay around until M-x list-processes. + (delete-process proc)) + (set-buffer obuf)))) + )))) + +(defun term-handle-exit (process-name msg) + "Write process exit (or other change) message MSG in the current buffer." + (let ((buffer-read-only nil) + (omax (point-max)) + (opoint (point))) + ;; Record where we put the message, so we can ignore it + ;; later on. + (goto-char omax) + (insert ?\n "Process " process-name " " msg) + ;; Force mode line redisplay soon. + (force-mode-line-update) + (if (and opoint (< opoint omax)) + (goto-char opoint)))) + + ;;; Name to use for TERM. ;;; Using "emacs" loses, because bash disables editing if TERM == emacs. (defvar term-term-name "eterm") @@ -1345,6 +1398,8 @@ buffer. The hook term-exec-hook is run after each exec." (process-connection-type t) ;; We should suppress conversion of end-of-line format. (inhibit-eol-conversion t) + ;; inhibit-eol-conversion doesn't seem to do the job, but this does. + (coding-system-for-read 'unknown-unix) ) (apply 'start-process name buffer "/bin/sh" "-c" @@ -4018,4 +4073,5 @@ the process. Any more args are arguments to PROGRAM." (provide 'term) +;;; arch-tag: eee16bc8-2cd7-4147-9534-a5694752f716 ;;; term.el ends here diff --git a/lisp/term/AT386.el b/lisp/term/AT386.el index 1885580945..31248018c4 100644 --- a/lisp/term/AT386.el +++ b/lisp/term/AT386.el @@ -57,4 +57,5 @@ (define-key function-key-map "\eN" [27]) ; ALT map ) +;;; arch-tag: abec1b03-582f-49f8-b8cb-e2fd52ea4bd7 ;;; AT386.el ends here diff --git a/lisp/term/apollo.el b/lisp/term/apollo.el index 3a2961811a..1d04fd3524 100644 --- a/lisp/term/apollo.el +++ b/lisp/term/apollo.el @@ -2,4 +2,5 @@ (load "term/vt100" nil t) +;;; arch-tag: c72f446f-e6b7-4749-90a4-bd68632adacf ;;; apollo.el ends here diff --git a/lisp/term/bg-mouse.el b/lisp/term/bg-mouse.el index 7291b877d5..abcbb4904f 100644 --- a/lisp/term/bg-mouse.el +++ b/lisp/term/bg-mouse.el @@ -296,4 +296,5 @@ X and Y are 0-based character positions on the screen." (provide 'bg-mouse) +;;; arch-tag: b3d06605-2971-44b1-be2c-e49c24e1a8d3 ;;; bg-mouse.el ends here diff --git a/lisp/term/bobcat.el b/lisp/term/bobcat.el index 85f211e39f..85f816570e 100644 --- a/lisp/term/bobcat.el +++ b/lisp/term/bobcat.el @@ -2,4 +2,5 @@ ;;; HP terminals usually encourage using ^H as the rubout character (load "term/keyswap" nil t) +;;; arch-tag: 754e4520-0a3e-4e6e-8ca5-9481b1f85cf7 ;;; bobcat.el ends here diff --git a/lisp/term/internal.el b/lisp/term/internal.el index 8b22a0e02c..87a78d2e9a 100644 --- a/lisp/term/internal.el +++ b/lisp/term/internal.el @@ -728,4 +728,5 @@ list. You can (and should) also run it whenever the value of ;; characters to arrive at our display code verbatim. (standard-display-8bit 127 255) +;;; arch-tag: eea04c06-7311-4b5a-b531-3c1be1b070af ;;; internal.el ends here diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el index 199f724e0c..e73c3e1996 100644 --- a/lisp/term/iris-ansi.el +++ b/lisp/term/iris-ansi.el @@ -322,4 +322,5 @@ (define-key function-key-map "\e[196q" [C-delete]) (define-key function-key-map "\e[197q" [M-delete]) +;;; arch-tag: b1d0e73a-bb7d-47be-9fb2-6fb126469a1b ;;; iris-ansi.el ends here diff --git a/lisp/term/keyswap.el b/lisp/term/keyswap.el index e9b4519543..d636a22bb9 100644 --- a/lisp/term/keyswap.el +++ b/lisp/term/keyswap.el @@ -38,4 +38,5 @@ (aset the-table ?\^h ?\177) (setq keyboard-translate-table the-table)) +;;; arch-tag: 67cf7009-e23e-421c-9648-078e7277297c ;;; keyswap.el ends here diff --git a/lisp/term/linux.el b/lisp/term/linux.el index 2b4e7abc6d..80bfe83a4e 100644 --- a/lisp/term/linux.el +++ b/lisp/term/linux.el @@ -12,4 +12,5 @@ ;; The third arg only matters in that it is not t or nil. (set-input-mode (nth 0 value) (nth 1 value) 'iso-latin-1 (nth 3 value))) +;;; arch-tag: 5d0c4f63-739b-4862-abf3-041fe42adb8f ;;; linux.el ends here diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el index 920b3e1b91..1f8d9ca77a 100644 --- a/lisp/term/lk201.el +++ b/lisp/term/lk201.el @@ -68,4 +68,5 @@ (define-key function-key-map "\eOx" [kp-8]) (define-key function-key-map "\eOy" [kp-9]) +;;; arch-tag: 7ffb4444-6a23-43e1-b457-43cf4f673c0d ;;; lk201.el ends here diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index f00507898f..1220c046cb 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -993,4 +993,5 @@ mac-roman:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")) "The list of X colors from the `rgb.txt' file. XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp") +;;; arch-tag: 71dfcd14-cde8-4d66-b05c-85ec94fb23a6 ;;; mac-win.el ends here diff --git a/lisp/term/news.el b/lisp/term/news.el index 4d7bc17b58..a6f7481c42 100644 --- a/lisp/term/news.el +++ b/lisp/term/news.el @@ -70,4 +70,5 @@ (define-key news-fkey-prefix "x" [kp-8]) ) +;;; arch-tag: bfe141a0-623b-4b42-b753-5d9353776c5e ;;; news.el ends here diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index 0e40d51daf..663e3ea3e6 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el @@ -240,4 +240,5 @@ are fixed-pitch." ;; --------------------------------------------------------------------------- +;;; arch-tag: 5cbdb455-b495-427b-95d0-e417d77d00b4 ;;; pc-win.el ends here diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el index 5bd89efe26..7839ebba95 100644 --- a/lisp/term/rxvt.el +++ b/lisp/term/rxvt.el @@ -172,4 +172,5 @@ for the currently selected frame." ;; This recomputes all the default faces given the colors we've just set up. (tty-set-up-initial-frame-faces) +;;; arch-tag: 20cf2fb6-6318-4bab-9dbf-1d15048f2257 ;;; rxvt.el ends here diff --git a/lisp/term/sun-mouse.el b/lisp/term/sun-mouse.el index 95fa4b5344..8d9bfb67cf 100644 --- a/lisp/term/sun-mouse.el +++ b/lisp/term/sun-mouse.el @@ -679,4 +679,5 @@ just close the window, and wait for reopening." (provide 'sun-mouse) (provide 'term/sun-mouse) ; have to (require 'term/sun-mouse) +;;; arch-tag: 6e879372-b899-4509-833f-d7f6250e309a ;;; sun-mouse.el ends here diff --git a/lisp/term/sun.el b/lisp/term/sun.el index ed211ee8fc..e0564d44ec 100644 --- a/lisp/term/sun.el +++ b/lisp/term/sun.el @@ -274,4 +274,5 @@ (sun-mouse-handler)) ; Now, execute this mouse blip. (define-key ctl-x-map "\C-@" 'sun-mouse-once) +;;; arch-tag: db761d47-fd7d-42b4-aae1-04fa116b6ba6 ;;; sun.el ends here diff --git a/lisp/term/sup-mouse.el b/lisp/term/sup-mouse.el index 9ef05b42f6..1ae0b25a73 100644 --- a/lisp/term/sup-mouse.el +++ b/lisp/term/sup-mouse.el @@ -196,4 +196,5 @@ X and Y are 0-based character positions on the frame." (get-window-with-predicate (lambda (w) (coordinates-in-window-p (cons x y) w)))) +;;; arch-tag: ec644ed4-cac4-43b8-b3db-cfe83e9098d7 ;;; sup-mouse.el ends here diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el index 627fc89e11..956d46738d 100644 --- a/lisp/term/tty-colors.el +++ b/lisp/term/tty-colors.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. -;; Author: Eli Zaretskii +;; Author: Eli Zaretskii ;; Maintainer: FSF ;; Keywords: terminals, faces @@ -1047,4 +1047,5 @@ A color is considered gray if the 3 components of its RGB value are equal." (setq colors (cdr colors))) count)) +;;; arch-tag: 84d5c3ef-ae22-4754-99ac-e6350c0967ae ;;; tty-colors.el ends here diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el index 67864a6d8e..425ac20092 100644 --- a/lisp/term/tvi970.el +++ b/lisp/term/tvi970.el @@ -123,4 +123,5 @@ With a negative argument, select numeric keypad mode." (tvi970-set-keypad-mode 1) +;;; arch-tag: c1334cf0-1462-41c3-a963-c077d175f8f0 ;;; tvi970.el ends here diff --git a/lisp/term/vt100.el b/lisp/term/vt100.el index cc33087ea5..aa73722b15 100644 --- a/lisp/term/vt100.el +++ b/lisp/term/vt100.el @@ -53,4 +53,5 @@ With negative argument, switch to 80-column mode." (send-string-to-terminal (if vt100-wide-mode "\e[?3h" "\e[?3l")) (set-frame-width terminal-frame (if vt100-wide-mode 132 80))) +;;; arch-tag: 9ff41f24-a7c9-4dee-9cf2-fbaa951eb840 ;;; vt100.el ends here diff --git a/lisp/term/vt102.el b/lisp/term/vt102.el index 4a2462aa81..887f63837e 100644 --- a/lisp/term/vt102.el +++ b/lisp/term/vt102.el @@ -2,4 +2,5 @@ (load "term/vt100" nil t) +;;; arch-tag: 6e839cfc-125a-4574-82f1-c23a51f7c50f ;;; vt102.el ends here diff --git a/lisp/term/vt125.el b/lisp/term/vt125.el index bd5ecadf5c..458e0dafc2 100644 --- a/lisp/term/vt125.el +++ b/lisp/term/vt125.el @@ -2,4 +2,5 @@ (load "term/vt100" nil t) +;;; arch-tag: 1d92d70f-dd55-4a1d-9088-e215a4883801 ;;; vt125.el ends here diff --git a/lisp/term/vt200.el b/lisp/term/vt200.el index e77c910ac5..0ff0a30f56 100644 --- a/lisp/term/vt200.el +++ b/lisp/term/vt200.el @@ -6,4 +6,5 @@ ;; Make F11 an escape key. (define-key function-key-map "\e[23~" [?\e]) +;;; arch-tag: 0f78f583-9f32-4237-b106-28bcfff21d89 ;;; vt200.el ends here diff --git a/lisp/term/vt201.el b/lisp/term/vt201.el index 5f1c6c8716..d7deeaf11c 100644 --- a/lisp/term/vt201.el +++ b/lisp/term/vt201.el @@ -6,4 +6,5 @@ ;; Make F11 an escape key. (define-key function-key-map "\e[23~" [?\e]) +;;; arch-tag: a6abb38f-60ea-449e-a9e9-3fb8572c52ae ;;; vt201.el ends here diff --git a/lisp/term/vt220.el b/lisp/term/vt220.el index eaa6243de6..7ea1e3b57f 100644 --- a/lisp/term/vt220.el +++ b/lisp/term/vt220.el @@ -6,4 +6,5 @@ ;; Make F11 an escape key. (define-key function-key-map "\e[23~" [?\e]) +;;; arch-tag: 98fc4867-a20d-46a1-a276-d7be31e49871 ;;; vt220.el ends here diff --git a/lisp/term/vt240.el b/lisp/term/vt240.el index 0884097758..05f0bebe50 100644 --- a/lisp/term/vt240.el +++ b/lisp/term/vt240.el @@ -6,4 +6,5 @@ ;; Make F11 an escape key. (define-key function-key-map "\e[23~" [?\e]) +;;; arch-tag: d9f88e9c-02dc-49ff-871c-a415f08e4eb7 ;;; vt240.el ends here diff --git a/lisp/term/vt300.el b/lisp/term/vt300.el index cd290f3f07..871ed234bc 100644 --- a/lisp/term/vt300.el +++ b/lisp/term/vt300.el @@ -4,4 +4,5 @@ ;; Make F11 an escape key. (define-key function-key-map "\e[23~" [?\e]) +;;; arch-tag: 876831c9-a6f2-444a-b033-706e6fbc149f ;;; vt300.el ends here diff --git a/lisp/term/vt320.el b/lisp/term/vt320.el index fdbcdb2bbc..c99b8672fc 100644 --- a/lisp/term/vt320.el +++ b/lisp/term/vt320.el @@ -4,4 +4,5 @@ ;; Make F11 an escape key. (define-key function-key-map "\e[23~" [?\e]) +;;; arch-tag: f9f4c954-0b9e-45f9-b450-a320d32abd9c ;;; vt320.el ends here diff --git a/lisp/term/vt400.el b/lisp/term/vt400.el index 7034d6d55e..666266e2bf 100644 --- a/lisp/term/vt400.el +++ b/lisp/term/vt400.el @@ -4,4 +4,5 @@ ;; Make F11 an escape key. (define-key function-key-map "\e[23~" [?\e]) +;;; arch-tag: a70809c5-6b21-42cc-ba20-536683e5e7d5 ;;; vt400.el ends here diff --git a/lisp/term/vt420.el b/lisp/term/vt420.el index b5ce8ee10c..9ed5fbe135 100644 --- a/lisp/term/vt420.el +++ b/lisp/term/vt420.el @@ -4,4 +4,5 @@ ;; Make F11 an escape key. (define-key function-key-map "\e[23~" [?\e]) +;;; arch-tag: df2f897c-3a12-4b3c-9259-df089f96c160 ;;; vt420.el ends here diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index a714ecc9b8..fc17831604 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -1255,4 +1255,5 @@ font dialog to get the matching FONTS. Otherwise use a pop-up menu (if (null font) (error "Font not found"))))) +;;; arch-tag: 69fb1701-28c2-4890-b351-3d1fe4b4f166 ;;; w32-win.el ends here diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el index 8bb12e6d75..edcbe1259f 100644 --- a/lisp/term/wyse50.el +++ b/lisp/term/wyse50.el @@ -148,4 +148,5 @@ M-r M-x move-to-window-line, Funct up-arrow or down-arrow are similar (send-string-to-terminal (concat "\ea23R" (1+ (frame-width)) "C\eG0"))))) +;;; arch-tag: b6a05d37-eead-4cf6-b997-0f956c68881c ;;; wyse50.el ends here diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 735d21c8e9..074524622c 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -76,6 +76,7 @@ (require 'select) (require 'menu-bar) (require 'fontset) +(require 'x-dnd) (defvar x-invocation-args) @@ -1390,70 +1391,70 @@ as returned by `x-server-vendor'." ;; Kana: Fixme: needs conversion to Japanese charset -- seems ;; to require jisx0213, for which the Unicode translation ;; isn't clear. - (#x47e . ?$,1s>(B) - (#x4a1 . ?$,2=B(B) - (#x4a2 . ?\$,2=L(B) - (#x4a3 . ?\$,2=M(B) - (#x4a4 . ?$,2=A(B) - (#x4a5 . ?$,2?{(B) - (#x4a6 . ?$,2?r(B) - (#x4a7 . ?$,2?!(B) - (#x4a8 . ?$,2?#(B) - (#x4a9 . ?$,2?%(B) - (#x4aa . ?$,2?'(B) - (#x4ab . ?$,2?)(B) - (#x4ac . ?$,2?c(B) - (#x4ad . ?$,2?e(B) - (#x4ae . ?$,2?g(B) - (#x4af . ?$,2?C(B) - (#x4b0 . ?$,2?|(B) - (#x4b1 . ?$,2?"(B) - (#x4b2 . ?$,2?$(B) - (#x4b3 . ?$,2?&(B) - (#x4b4 . ?$,2?((B) - (#x4b5 . ?$,2?*(B) - (#x4b6 . ?$,2?+(B) - (#x4b7 . ?$,2?-(B) - (#x4b8 . ?$,2?/(B) - (#x4b9 . ?$,2?1(B) - (#x4ba . ?$,2?3(B) - (#x4bb . ?$,2?5(B) - (#x4bc . ?$,2?7(B) - (#x4bd . ?$,2?9(B) - (#x4be . ?$,2?;(B) - (#x4bf . ?$,2?=(B) - (#x4c0 . ?$,2??(B) - (#x4c1 . ?$,2?A(B) - (#x4c2 . ?$,2?D(B) - (#x4c3 . ?$,2?F(B) - (#x4c4 . ?$,2?H(B) - (#x4c5 . ?$,2?J(B) - (#x4c6 . ?$,2?K(B) - (#x4c7 . ?$,2?L(B) - (#x4c8 . ?$,2?M(B) - (#x4c9 . ?$,2?N(B) - (#x4ca . ?$,2?O(B) - (#x4cb . ?$,2?R(B) - (#x4cc . ?$,2?U(B) - (#x4cd . ?$,2?X(B) - (#x4ce . ?$,2?[(B) - (#x4cf . ?$,2?^(B) - (#x4d0 . ?$,2?_(B) - (#x4d1 . ?$,2?`(B) - (#x4d2 . ?$,2?a(B) - (#x4d3 . ?$,2?b(B) - (#x4d4 . ?$,2?d(B) - (#x4d5 . ?$,2?f(B) - (#x4d6 . ?$,2?h(B) - (#x4d7 . ?$,2?i(B) - (#x4d8 . ?$,2?j(B) - (#x4d9 . ?$,2?k(B) - (#x4da . ?$,2?l(B) - (#x4db . ?$,2?m(B) - (#x4dc . ?$,2?o(B) - (#x4dd . ?$,2?s(B) - (#x4de . ?$,2>{(B) - (#x4df . ?$,2>|(B) + (#x47e . ?(J~(B) + (#x4a1 . ?$A!#(B) + (#x4a2 . ?\$A!8(B) + (#x4a3 . ?\$A!9(B) + (#x4a4 . ?$A!"(B) + (#x4a5 . ?$A!$(B) + (#x4a6 . ?$A%r(B) + (#x4a7 . ?$A%!(B) + (#x4a8 . ?$A%#(B) + (#x4a9 . ?$A%%(B) + (#x4aa . ?$A%'(B) + (#x4ab . ?$A%)(B) + (#x4ac . ?$A%c(B) + (#x4ad . ?$A%e(B) + (#x4ae . ?$A%g(B) + (#x4af . ?$A%C(B) + (#x4b0 . ?$B!<(B) + (#x4b1 . ?$A%"(B) + (#x4b2 . ?$A%$(B) + (#x4b3 . ?$A%&(B) + (#x4b4 . ?$A%((B) + (#x4b5 . ?$A%*(B) + (#x4b6 . ?$A%+(B) + (#x4b7 . ?$A%-(B) + (#x4b8 . ?$A%/(B) + (#x4b9 . ?$A%1(B) + (#x4ba . ?$A%3(B) + (#x4bb . ?$A%5(B) + (#x4bc . ?$A%7(B) + (#x4bd . ?$A%9(B) + (#x4be . ?$A%;(B) + (#x4bf . ?$A%=(B) + (#x4c0 . ?$A%?(B) + (#x4c1 . ?$A%A(B) + (#x4c2 . ?$A%D(B) + (#x4c3 . ?$A%F(B) + (#x4c4 . ?$A%H(B) + (#x4c5 . ?$A%J(B) + (#x4c6 . ?$A%K(B) + (#x4c7 . ?$A%L(B) + (#x4c8 . ?$A%M(B) + (#x4c9 . ?$A%N(B) + (#x4ca . ?$A%O(B) + (#x4cb . ?$A%R(B) + (#x4cc . ?$A%U(B) + (#x4cd . ?$A%X(B) + (#x4ce . ?$A%[(B) + (#x4cf . ?$A%^(B) + (#x4d0 . ?$A%_(B) + (#x4d1 . ?$A%`(B) + (#x4d2 . ?$A%a(B) + (#x4d3 . ?$A%b(B) + (#x4d4 . ?$A%d(B) + (#x4d5 . ?$A%f(B) + (#x4d6 . ?$A%h(B) + (#x4d7 . ?$A%i(B) + (#x4d8 . ?$A%j(B) + (#x4d9 . ?$A%k(B) + (#x4da . ?$A%l(B) + (#x4db . ?$A%m(B) + (#x4dc . ?$A%o(B) + (#x4dd . ?$A%s(B) + (#x4de . ?$B!+(B) + (#x4df . ?$B!,(B) ;; Arabic (#x5ac . ?,G,(B) (#x5bb . ?,G;(B) @@ -1671,11 +1672,11 @@ as returned by `x-server-vendor'." (#x7f9 . ?,Fy(B) ;; Technical (#x8a1 . ?$,1|W(B) - (#x8a2 . ?$,2 ,(B) - (#x8a3 . ?$,2 (B) + (#x8a2 . ?$A)0(B) + (#x8a3 . ?$A)$(B) (#x8a4 . ?$,1{ (B) (#x8a5 . ?$,1{!(B) - (#x8a6 . ?$,2 "(B) + (#x8a6 . ?$A)&(B) (#x8a7 . ?$,1|A(B) (#x8a8 . ?$,1|C(B) (#x8a9 . ?$,1|D(B) @@ -1686,56 +1687,56 @@ as returned by `x-server-vendor'." (#x8ae . ?$,1|@(B) (#x8af . ?$,1|H(B) (#x8b0 . ?$,1|L(B) - (#x8bc . ?$,1y$(B) - (#x8bd . ?$,1y (B) - (#x8be . ?$,1y%(B) - (#x8bf . ?$,1xK(B) - (#x8c0 . ?$,1xT(B) - (#x8c1 . ?$,1x=(B) - (#x8c2 . ?$,1x>(B) - (#x8c5 . ?$,1x'(B) - (#x8c8 . ?$,1x\(B) - (#x8c9 . ?$,1xc(B) - (#x8cd . ?$,1wT(B) - (#x8ce . ?$,1wR(B) - (#x8cf . ?$,1y!(B) - (#x8d6 . ?$,1x:(B) - (#x8da . ?$,1yB(B) - (#x8db . ?$,1yC(B) - (#x8dc . ?$,1xI(B) - (#x8dd . ?$,1xJ(B) - (#x8de . ?$,1xG(B) - (#x8df . ?$,1xH(B) - (#x8ef . ?$,1x"(B) + (#x8bc . ?$A!\(B) + (#x8bd . ?$A!Y(B) + (#x8be . ?$A!](B) + (#x8bf . ?$A!R(B) + (#x8c0 . ?$A!`(B) + (#x8c1 . ?$A!X(B) + (#x8c2 . ?$A!^(B) + (#x8c5 . ?$B"`(B) + (#x8c8 . ?$(G"D(B) + (#x8c9 . ?$(O"l(B) + (#x8cd . ?$B"N(B) + (#x8ce . ?$B"M(B) + (#x8cf . ?$A!T(B) + (#x8d6 . ?$A!L(B) + (#x8da . ?$B">(B) + (#x8db . ?$B"?(B) + (#x8dc . ?$A!I(B) + (#x8dd . ?$A!H(B) + (#x8de . ?$A!D(B) + (#x8df . ?$A!E(B) + (#x8ef . ?$B"_(B) (#x8f6 . ?$,1!R(B) - (#x8fb . ?$,1vp(B) - (#x8fc . ?$,1vq(B) - (#x8fd . ?$,1vr(B) - (#x8fe . ?$,1vs(B) + (#x8fb . ?$A!{(B) + (#x8fc . ?$A!|(B) + (#x8fd . ?$A!z(B) + (#x8fe . ?$A!}(B) ;; Special - (#x9e0 . ?$,2"&(B) - (#x9e1 . ?$,2!R(B) - (#x9e2 . ?$,1}I(B) - (#x9e3 . ?$,1}L(B) - (#x9e4 . ?$,1}M(B) - (#x9e5 . ?$,1}J(B) + (#x9e0 . ?$A!t(B) + (#x9e1 . ?$(C"F(B) + (#x9e2 . ?$(GB*(B) + (#x9e3 . ?$(GB-(B) + (#x9e4 . ?$(GB.(B) + (#x9e5 . ?$(GB+(B) (#x9e8 . ?$,1}d(B) - (#x9e9 . ?$,1}K(B) - (#x9ea . ?$,2 8(B) - (#x9eb . ?$,2 0(B) - (#x9ec . ?$,2 ,(B) - (#x9ed . ?$,2 4(B) - (#x9ee . ?$,2 \(B) + (#x9e9 . ?$(GB,(B) + (#x9ea . ?$A)<(B) + (#x9eb . ?$A)4(B) + (#x9ec . ?$A)0(B) + (#x9ed . ?$A)8(B) + (#x9ee . ?$A)`(B) (#x9ef . ?$,1|Z(B) (#x9f0 . ?$,1|[(B) - (#x9f1 . ?$,2 (B) + (#x9f1 . ?$A)$(B) (#x9f2 . ?$,1|\(B) (#x9f3 . ?$,1|](B) - (#x9f4 . ?$,2 <(B) - (#x9f5 . ?$,2 D(B) - (#x9f6 . ?$,2 T(B) - (#x9f7 . ?$,2 L(B) - (#x9f8 . ?$,2 "(B) + (#x9f4 . ?$A)@(B) + (#x9f5 . ?$A)H(B) + (#x9f6 . ?$A)X(B) + (#x9f7 . ?$A)P(B) + (#x9f8 . ?$A)&(B) ;; Publishing (#xaa1 . ?$,1rc(B) (#xaa2 . ?$,1rb(B) @@ -1745,93 +1746,93 @@ as returned by `x-server-vendor'." (#xaa6 . ?$,1rh(B) (#xaa7 . ?$,1ri(B) (#xaa8 . ?$,1rj(B) - (#xaa9 . ?$,1rt(B) - (#xaaa . ?$,1rs(B) - (#xaae . ?$,1s&(B) - (#xaaf . ?$,1s%(B) - (#xab0 . ?$,1v3(B) - (#xab1 . ?$,1v4(B) - (#xab2 . ?$,1v5(B) + (#xaa9 . ?$(G!7(B) + (#xaaa . ?$(G!9(B) + (#xaae . ?$A!-(B) + (#xaaf . ?$(G!-(B) + (#xab0 . ?$(O'x(B) + (#xab1 . ?$(O'y(B) + (#xab2 . ?$(O'z(B) (#xab3 . ?$,1v6(B) (#xab4 . ?$,1v7(B) (#xab5 . ?$,1v8(B) (#xab6 . ?$,1v9(B) (#xab7 . ?$,1v:(B) - (#xab8 . ?$,1uE(B) + (#xab8 . ?$(G""(B) (#xabb . ?$,1rr(B) (#xabc . ?$,1{)(B) (#xabe . ?$,1{*(B) - (#xac3 . ?$,1v;(B) - (#xac4 . ?$,1v<(B) - (#xac5 . ?$,1v=(B) - (#xac6 . ?$,1v>(B) - (#xac9 . ?$,1ub(B) + (#xac3 . ?$(C({(B) + (#xac4 . ?$(C(|(B) + (#xac5 . ?$(C(}(B) + (#xac6 . ?$(C(~(B) + (#xac9 . ?$(D"o(B) (#xaca . ?$,2"s(B) - (#xacc . ?$,2"!(B) - (#xacd . ?$,2!w(B) - (#xace . ?$,2"+(B) + (#xacc . ?$(O##(B) + (#xacd . ?$(O#!(B) + (#xace . ?$A!p(B) (#xacf . ?$,2!o(B) - (#xad0 . ?$,1rx(B) - (#xad1 . ?$,1ry(B) - (#xad2 . ?$,1r|(B) - (#xad3 . ?$,1r}(B) + (#xad0 . ?,F!(B) + (#xad1 . ?,F"(B) + (#xad2 . ?,Y4(B) + (#xad3 . ?,Y!(B) (#xad4 . ?$,1u^(B) - (#xad6 . ?$,1s2(B) - (#xad7 . ?$,1s3(B) + (#xad6 . ?$A!d(B) + (#xad7 . ?$A!e(B) (#xad9 . ?$,2%](B) (#xadb . ?$,2!l(B) - (#xadc . ?$,2" (B) - (#xadd . ?$,2!v(B) - (#xade . ?$,2"/(B) + (#xadc . ?$(O#$(B) + (#xadd . ?$(O#"(B) + (#xade . ?$A!q(B) (#xadf . ?$,2!n(B) - (#xae0 . ?$,2"F(B) + (#xae0 . ?$(O#?(B) (#xae1 . ?$,2!k(B) (#xae2 . ?$,2!m(B) - (#xae3 . ?$,2!s(B) - (#xae4 . ?$,2!}(B) - (#xae5 . ?$,2"f(B) - (#xae6 . ?$,1s"(B) + (#xae3 . ?$A!w(B) + (#xae4 . ?$(G!}(B) + (#xae5 . ?$A!n(B) + (#xae6 . ?$(O#@(B) (#xae7 . ?$,2!j(B) - (#xae8 . ?$,2!r(B) - (#xae9 . ?$,2!|(B) - (#xaea . ?$,2"|(B) - (#xaeb . ?$,2"~(B) - (#xaec . ?$,2#c(B) - (#xaed . ?$,2#f(B) - (#xaee . ?$,2#e(B) + (#xae8 . ?$A!x(B) + (#xae9 . ?$(G!~(B) + (#xaea . ?$(C"P(B) + (#xaeb . ?$(O-~(B) + (#xaec . ?$(O&@(B) + (#xaed . ?$(O&<(B) + (#xaee . ?$(O&>(B) (#xaf0 . ?$,2%`(B) - (#xaf1 . ?$,1s (B) - (#xaf2 . ?$,1s!(B) - (#xaf3 . ?$,2%S(B) + (#xaf1 . ?$B"w(B) + (#xaf2 . ?$B"x(B) + (#xaf3 . ?$(O'{(B) (#xaf4 . ?$,2%W(B) - (#xaf5 . ?$,2#o(B) - (#xaf6 . ?$,2#m(B) - (#xaf7 . ?$,2#B(B) - (#xaf8 . ?$,2#@(B) - (#xaf9 . ?$,2"n(B) + (#xaf5 . ?$B"t(B) + (#xaf6 . ?$B"u(B) + (#xaf7 . ?$A!a(B) + (#xaf8 . ?$A!b(B) + (#xaf9 . ?$(O&g(B) (#xafa . ?$,1zu(B) (#xafb . ?$,1uW(B) (#xafc . ?$,1s8(B) (#xafd . ?$,1rz(B) - (#xafe . ?$,1r~(B) + (#xafe . ?,Y%(B) ;; APL (#xba3 . ?<) (#xba6 . ?>) - (#xba8 . ?$,1xH(B) - (#xba9 . ?$,1xG(B) + (#xba8 . ?$A!E(B) + (#xba9 . ?$A!D(B) (#xbc0 . ?,A/(B) - (#xbc2 . ?$,1ye(B) - (#xbc3 . ?$,1xI(B) + (#xbc2 . ?$A!M(B) + (#xbc3 . ?$A!I(B) (#xbc4 . ?$,1zj(B) (#xbc6 . ?_) (#xbca . ?$,1x8(B) (#xbcc . ?$,1|5(B) (#xbce . ?$,1yd(B) - (#xbcf . ?$,2"+(B) + (#xbcf . ?$A!p(B) (#xbd3 . ?$,1zh(B) - (#xbd6 . ?$,1xJ(B) - (#xbd8 . ?$,1yC(B) - (#xbda . ?$,1yB(B) + (#xbd6 . ?$A!H(B) + (#xbd8 . ?$B"?(B) + (#xbda . ?$B">(B) (#xbdc . ?$,1yb(B) (#xbfc . ?$,1yc(B) ;; Hebrew @@ -2046,7 +2047,7 @@ as returned by `x-server-vendor'." ;; Latin-9 (#x13bc . ?,b<(B) (#x13bd . ?,b=(B) - (#x13be . ?,b>(B) + (#x13be . ?,_/(B) ;; Currency (#x20a0 . ?$,1t@(B) (#x20a1 . ?$,1tA(B) @@ -2178,13 +2179,11 @@ order until succeed.") char) (if (/= len-utf8 len-ctext) (if (> len-utf8 len-ctext) utf8 ctext) - (while (< i len-utf8) - (setq char (aref ctext i)) - (if (and (< char 128) (/= char (aref utf8 i))) - (setq selected utf8 - i len-utf8) - (setq i (1+ i)))) - selected))) + (let ((result (compare-strings utf8 0 len-utf8 ctext 0 len-ctext))) + (if (or (eq result t) + (>= (aref ctext (1- (abs result))) 128)) + ctext + utf8))))) (defun x-selection-value (type) (let (text) @@ -2366,12 +2365,6 @@ order until succeed.") ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...). (create-fontset-from-x-resource) -;; Sun expects the menu bar cut and paste commands to use the clipboard. -;; This has ,? to match both on Sunos and on Solaris. -(if (string-match "Sun Microsystems,? Inc\\." - (x-server-vendor)) - (menu-bar-enable-clipboard)) - ;; Apply a geometry resource to the initial frame. Put it at the end ;; of the alist, so that anything specified on the command line takes ;; precedence. @@ -2437,4 +2430,27 @@ order until succeed.") ;; Turn on support for mouse wheels. (mouse-wheel-mode 1) + +;; Enable CLIPBOARD copy/paste through menu bar commands. +(menu-bar-enable-clipboard) + +;; Override Paste so it looks at CLIPBOARD first. +(defun x-clipboard-yank () + "Insert the clipboard contents, or the last stretch of killed text." + (interactive) + (let ((clipboard-text (x-get-selection 'CLIPBOARD)) + (x-select-enable-clipboard t)) + (if (and clipboard-text (> (length clipboard-text) 0)) + (kill-new clipboard-text)) + (yank))) + +(define-key menu-bar-edit-menu [paste] + (cons "Paste" (cons "Paste text from clipboard or kill ring" + 'x-clipboard-yank))) + +;; Initiate drag and drop +(add-hook 'after-make-frame-functions 'x-dnd-init-frame) +(global-set-key [drag-n-drop] 'x-dnd-handle-drag-n-drop-event) + +;;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78 ;;; x-win.el ends here diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 372b5f65ff..d66646876b 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -236,4 +236,5 @@ versions of xterm." ;; This recomputes all the default faces given the colors we've just set up. (tty-set-up-initial-frame-faces) +;;; arch-tag: 12e7ebdd-1e6c-4b25-b0f9-35ace25e855a ;;; xterm.el ends here diff --git a/lisp/terminal.el b/lisp/terminal.el index 7d89f3ff82..64c58d7743 100644 --- a/lisp/terminal.el +++ b/lisp/terminal.el @@ -1341,4 +1341,5 @@ in the directory specified by `te-terminfo-directory'." (provide 'terminal) +;;; arch-tag: 0ae1d7d7-90ef-4566-a531-6e7ff8c79b2f ;;; terminal.el ends here diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index b973290725..e4f143c3b8 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -5515,4 +5515,5 @@ The event, EV, is the mouse event." ;; Don't hesitate to ask me any questions. +;;; arch-tag: 3e63b881-aaaa-4b83-a072-220d4661a8a3 ;;; artist.el ends here diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el index 82dd8cc785..63714a3a09 100644 --- a/lisp/textmodes/bib-mode.el +++ b/lisp/textmodes/bib-mode.el @@ -34,6 +34,7 @@ (defgroup bib nil "Major mode for editing bib files." :prefix "bib-" + :group 'external :group 'wp) (defcustom bib-file "~/my-bibliography.bib" @@ -235,4 +236,5 @@ named by variable `unread-bib-file'." (provide 'bib-mode) +;;; arch-tag: e3a97958-3c2c-487f-9557-fafc3c98452d ;;; bib-mode.el ends here diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 141d123641..82b15cf4eb 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1656,16 +1656,15 @@ are defined, but only for the head part of the entry "Make sure point is outside of a BibTeX entry." (let ((orig-point (point))) (bibtex-end-of-entry) - (when (<= (point) orig-point) + (when (< (point) orig-point) ;; We moved backward, so we weren't inside an entry to begin with. ;; Leave point at the beginning of a line, and preferably ;; at the beginning of a paragraph. (goto-char orig-point) (beginning-of-line 1) - (let ((cb (char-before (1- (point))))) - (unless (and cb (= ?\n cb)) - (re-search-forward "^[ \t]*[@\n]" nil 'move) - (backward-char 1)))) + (unless (= ?\n (char-before (1- (point)))) + (re-search-forward "^[ \t]*[@\n]" nil 'move) + (backward-char 1))) (skip-chars-forward " \t\n"))) (defun bibtex-beginning-of-first-entry () @@ -3891,4 +3890,5 @@ is outside key or BibTeX field." (provide 'bibtex) +;;; arch-tag: ee2be3af-caad-427f-b42a-d20fad630d04 ;;; bibtex.el ends here diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el index acbef7ae18..05eaef06ce 100644 --- a/lisp/textmodes/enriched.el +++ b/lisp/textmodes/enriched.el @@ -471,4 +471,5 @@ the range of text to assign text property SYMBOL with value VALUE." (message "Warning: invalid parameter %s" param)) (list start end 'display prop))) +;;; arch-tag: 05cae488-3fea-45cd-ac29-5b02cb64e42b ;;; enriched.el ends here diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index c8e635268e..aaa10fbce5 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -1,6 +1,6 @@ ;;; fill.el --- fill commands for Emacs -;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,2003 +;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,03,2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -30,6 +30,11 @@ ;;; Code: +(defgroup fill nil + "Indenting and filling text." + :link '(custom-manual "(emacs)Filling") + :group 'editing) + (defcustom fill-individual-varying-indent nil "*Controls criterion for a new paragraph in `fill-individual-paragraphs'. Non-nil means changing indent doesn't end a paragraph. @@ -49,13 +54,14 @@ A value of nil means that any change in indentation starts a new paragraph." If the function returns nil, then `fill-paragraph' does its normal work.") (defvar fill-paragraph-handle-comment t - "If non-nil, paragraph filling will try to pay attention to comments.") + "Non-nil means paragraph filling will try to pay attention to comments.") -(defvar enable-kinsoku t - "*Non-nil means enable \"kinsoku\" processing on filling paragraph. +(defcustom enable-kinsoku t + "*Non-nil means enable \"kinsoku\" processing on filling paragraphs. Kinsoku processing is designed to prevent certain characters from being placed at the beginning or end of a line by filling. -See the documentation of `kinsoku' for more information.") +See the documentation of `kinsoku' for more information." + :type 'boolean) (defun set-fill-prefix () "Set the fill prefix to the current line up to point. @@ -317,7 +323,7 @@ be tested. If it returns t, fill commands do not break the line there." :options '(fill-french-nobreak-p fill-single-word-nobreak-p)) (defcustom fill-nobreak-invisible nil - "Non-nil means that fill command do not break lines in invisible text." + "Non-nil means that fill commands do not break lines in invisible text." :type 'boolean :group 'fill) @@ -365,7 +371,7 @@ and `fill-nobreak-invisible'." Don't move back past the buffer position LIMIT. This function is called when we are going to break the current line -after or before a non-ascii character. If the charset of the +after or before a non-ASCII character. If the charset of the character has the property `fill-find-break-point-function', this function calls the property value as a function with one arg LINEBEG. If the charset has no such property, do nothing." @@ -423,9 +429,13 @@ Point is moved to just past the fill prefix on the first line." ((string-match "\\[[^][]*\\(\\.\\)[^][]*\\]" sentence-end) (concat (replace-match ".:" nil nil sentence-end 1) "$")) ;; Can't find the right spot to insert the colon. - (t "[.?!:][])}\"']*$")))) + (t "[.?!:][])}\"']*$"))) + (sentence-end-without-space-list + (string-to-list sentence-end-without-space))) (while (re-search-forward eol-double-space-re to t) (or (>= (point) to) (memq (char-before) '(?\t ?\ )) + (memq (char-after (match-beginning 0)) + sentence-end-without-space-list) (insert-and-inherit ?\ )))) (goto-char from) @@ -728,7 +738,7 @@ If `fill-paragraph-function' is nil, return the `fill-prefix' used for filling." ;; Then try our syntax-aware filling code. (and fill-paragraph-handle-comment ;; Our code only handles \n-terminated comments right now. - comment-start comment-start-skip (equal comment-end "") + comment-start (equal comment-end "") (let ((fill-paragraph-handle-comment nil)) (fill-comment-paragraph arg))) ;; If it all fails, default to the good ol' text paragraph filling. @@ -801,9 +811,13 @@ can take care of filling. JUSTIFY is used as in `fill-paragraph'." (save-excursion (goto-char comstart) (if has-code-and-comment - (concat (make-string (/ (current-column) tab-width) ?\t) - (make-string (% (current-column) tab-width) ?\ ) - (buffer-substring (point) comin)) + (concat + (if (not indent-tabs-mode) + (make-string (current-column) ?\ ) + (concat + (make-string (/ (current-column) tab-width) ?\t) + (make-string (% (current-column) tab-width) ?\ ))) + (buffer-substring (point) comin)) (buffer-substring (line-beginning-position) comin)))) beg end) (save-excursion @@ -818,7 +832,11 @@ can take care of filling. JUSTIFY is used as in `fill-paragraph'." (looking-at comment-re))) ;; We may have gone too far. Go forward again. (line-beginning-position - (if (looking-at (concat ".*\\(?:" comment-start-skip "\\)")) + (if (progn + (goto-char + (or (comment-search-forward (line-end-position) t) + (point))) + (looking-at comment-re)) 1 2)))) ;; Find the beginning of the first line past the region to fill. (save-excursion @@ -836,8 +854,13 @@ can take care of filling. JUSTIFY is used as in `fill-paragraph'." (concat paragraph-start "\\|[ \t]*\\(?:" comment-start-skip "\\)\\(?:" (default-value 'paragraph-start) "\\)")) - (paragraph-ignore-fill-prefix nil) - (fill-prefix comment-fill-prefix) + ;; We used to reply on fill-prefix to break paragraph at + ;; comment-starter changes, but it did not work for the + ;; first line (mixed comment&code). + ;; We now use comment-re instead to "manually" make sure + ;; we treat comment-marker changes as paragraph boundaries. + ;; (paragraph-ignore-fill-prefix nil) + ;; (fill-prefix comment-fill-prefix) (after-line (if has-code-and-comment (line-beginning-position 2)))) (setq end (progn (forward-paragraph) (point))) @@ -884,7 +907,7 @@ as specified by its text properties. The fourth arg NOSQUEEZE non-nil means to leave whitespace other than line breaks untouched, and fifth arg TO-EOP non-nil means to keep filling to the end of the paragraph (or next -hard newline, if `use-hard-newlines' is on). +hard newline, if variable `use-hard-newlines' is on). Return the fill-prefix used for filling the last paragraph. @@ -968,8 +991,8 @@ beginning and end of the region are not at paragraph breaks, they are moved to the beginning and end \(respectively) of the paragraphs they are in. -If `use-hard-newlines' is true, all hard newlines are taken to be paragraph -breaks. +If variable `use-hard-newlines' is true, all hard newlines are +taken to be paragraph breaks. When calling from a program, operates just on region between BEGIN and END, unless optional fourth arg WHOLE-PAR is non-nil. In that case bounds are @@ -1406,4 +1429,5 @@ Also, if CITATION-REGEXP is non-nil, don't fill header lines." "") string)) +;;; arch-tag: 727ad455-1161-4fa9-8df5-0f74b179216d ;;; fill.el ends here diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 9d553a6884..3d41042e8d 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -267,7 +267,9 @@ property of the major mode name.") (defun mail-mode-flyspell-verify () "This function is used for `flyspell-generic-check-word-p' in Mail mode." (let ((in-headers (save-excursion - (re-search-forward mail-header-separator nil t))) + ;; When mail-header-separator is "", + ;; it is likely to be found in both directions. + (not (re-search-backward (concat "^" (regexp-quote mail-header-separator) "$") nil t)))) (in-signature (save-excursion (re-search-backward message-signature-separator nil t)))) (cond (in-headers @@ -1349,7 +1351,7 @@ Word syntax described by `ispell-dictionary-alist' (which see)." ispell-personal-dictionary))))) (setq args (append args ispell-extra-args)) args)))) - (if (= c 0) + (if (eq c 0) (flyspell-external-point-words) (error "Can't check region..."))))) @@ -1628,7 +1630,7 @@ misspelled words backwards." (defun flyspell-abbrev-table () (if flyspell-use-global-abbrev-table-p global-abbrev-table - local-abbrev-table)) + (or local-abbrev-table global-abbrev-table))) ;*---------------------------------------------------------------------*/ ;* flyspell-define-abbrev ... */ @@ -2123,4 +2125,5 @@ This function is meant to be added to 'flyspell-incorrect-hook'." (provide 'flyspell) +;;; arch-tag: 05d915b9-e9cf-44fb-9137-fc28f5eaab2a ;;; flyspell.el ends here diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 5848956ac2..39fe89bdaa 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1947,7 +1947,7 @@ SPC: Accept word this time. (help-2 (concat "[l]ook a word up in alternate dictionary; " "e[x/X]it; [q]uit session")) (help-3 (concat "[u]ncapitalized insert into dict. " - "Type 'x C-h d ispell-help' for more help"))) + "Type 'x C-h f ispell-help' for more help"))) (save-window-excursion (if ispell-help-in-bufferp (progn @@ -3572,4 +3572,5 @@ Both should not be used to define a buffer-local dictionary." ; LocalWords: uuencoded unidiff sc nn VM SGML eval IspellPersDict unsplitable ; LocalWords: lns XEmacs HTML casechars Multibyte +;;; arch-tag: 4941b9f9-3b7c-4a76-a4ed-5fa8b6010ef5 ;;; ispell.el ends here diff --git a/lisp/textmodes/makeinfo.el b/lisp/textmodes/makeinfo.el index c748921606..9136cb5220 100644 --- a/lisp/textmodes/makeinfo.el +++ b/lisp/textmodes/makeinfo.el @@ -282,4 +282,5 @@ line LINE of the window, or centered if LINE is nil." ;;; Place `provide' at end of file. (provide 'makeinfo) +;;; arch-tag: 5f810713-3de2-4e20-8030-4bc3dd0d9604 ;;; makeinfo.el ends here diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el index de122679f9..c0638804ff 100644 --- a/lisp/textmodes/nroff-mode.el +++ b/lisp/textmodes/nroff-mode.el @@ -272,4 +272,5 @@ turns it on iff arg is positive, otherwise off." (provide 'nroff-mode) +;;; arch-tag: 6e276340-6c65-4f65-b4e3-0ca431ddfb6c ;;; nroff-mode.el ends here diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index 2c3fd38f34..2afaafd601 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el @@ -800,4 +800,6 @@ to the same line in the pages buffer." :syntax-table nil) (provide 'page-ext) + +;;; arch-tag: 2f311550-c6e0-4458-9c12-7f039c058bdb ;;; page-ext.el ends here diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el index ec09153d13..f033a8504c 100644 --- a/lisp/textmodes/page.el +++ b/lisp/textmodes/page.el @@ -163,4 +163,5 @@ thus showing a page other than the one point was originally in." ;;; Place `provide' at end of file. (provide 'page) +;;; arch-tag: e8d7a0bd-8655-4b6e-b852-f2ee25316a1d ;;; page.el ends here diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 735eeca3e2..f7595e24cb 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el @@ -132,14 +132,23 @@ without a period." :type 'boolean :group 'fill) +(defcustom sentence-end-without-space + "$B!#!%!)!*$A!##.#?#!$(0!$!%!)!*$(G!$!%!)!*(B" + "*String containing characters that end sentence without following spaces. +If you change this, you should also change `sentence-end'. See Info +node `Sentences'." + :group 'paragraphs + :type 'string) + (defcustom sentence-end (purecopy ;; This is a bit stupid since it's not auto-updated when the ;; other variables are changes, but it's still useful info. (concat (if sentence-end-without-period "\\w \\|") - "[.?!$B!#!%!)!*$A!##.#?#!$(0!$!%!)!*$(G!$!%!)!*(B][]\"')}]*" + "\\([.?!][]\"')}]*" (if sentence-end-double-space "\\($\\| $\\|\t\\| \\)" "\\($\\|[\t ]\\)") + "\\|[" sentence-end-without-space "]+\\)" "[ \t\n]*")) "*Regexp describing the end of a sentence. The value includes the whitespace following the sentence. @@ -421,9 +430,9 @@ sentences. Also, every paragraph boundary terminates sentences as well." (constrain-to-field nil opoint t))) (defun repunctuate-sentences () - (interactive) "Put two spaces at the end of sentences from point to the end of buffer. It works using `query-replace-regexp'." + (interactive) (query-replace-regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\"')]?\\) +" "\\1\\2\\3 ")) @@ -469,4 +478,5 @@ ones already marked." ;;; coding: iso-2022-7bit ;;; End: +;;; arch-tag: e727eb1a-527a-4464-b9d7-9d3ec0d1a575 ;;; paragraphs.el ends here diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 0835763217..0497a82304 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -755,4 +755,5 @@ With no argument strips whitespace from end of every line in Picture buffer (provide 'picture) +;;; arch-tag: e452d08d-a470-4fbf-896e-ea276698d1ca ;;; picture.el ends here diff --git a/lisp/textmodes/po.el b/lisp/textmodes/po.el index 46e37311ab..a4ec5d3ac8 100644 --- a/lisp/textmodes/po.el +++ b/lisp/textmodes/po.el @@ -122,4 +122,5 @@ Called through `file-coding-system-alist', before the file is visited for real." (provide 'po) +;;; arch-tag: 56748a57-d64c-4200-8f6b-c3a70496eb8c ;;; po.el ends here diff --git a/lisp/textmodes/refbib.el b/lisp/textmodes/refbib.el index 4b3699409d..5c9e6c1c6d 100644 --- a/lisp/textmodes/refbib.el +++ b/lisp/textmodes/refbib.el @@ -740,4 +740,5 @@ Please send bug reports and suggestions to (provide 'refbib) (provide 'refer-to-bibtex) +;;; arch-tag: 664afee2-6e76-4408-ba56-981d8a179586 ;;; refbib.el ends here diff --git a/lisp/textmodes/refer.el b/lisp/textmodes/refer.el index 9087f690a7..1c77a8f4b3 100644 --- a/lisp/textmodes/refer.el +++ b/lisp/textmodes/refer.el @@ -1,6 +1,6 @@ ;;; refer.el --- look up references in bibliography files -;; Copyright (C) 1992, 1996, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1996, 2001, 2004 Free Software Foundation, Inc. ;; Author: Ashwin Ram ;; Maintainer: Gernot Heiser @@ -226,10 +226,12 @@ found on the last refer-find-entry or refer-find-next-entry." (throw 'found (find-file file))) (setq refer-saved-pos nil files (cdr files))) - (progn (message "Scanning %s... No such file" (car files) (ding)) + (progn (ding) + (message "Scanning %s... No such file" (car files)) (sit-for 1) (setq files (cdr files)))))) - (message "Keywords \"%s\" not found in any \.bib file" keywords (ding))) + (ding) + (message "Keywords \"%s\" not found in any \.bib file" keywords)) (select-window old-window))) (defun refer-find-entry-in-file (keywords-list file &optional old-pos) @@ -395,4 +397,5 @@ found on the last refer-find-entry or refer-find-next-entry." (setq refer-bib-files files)) files)) +;;; arch-tag: 151f641b-e79b-462b-9a29-a95c3793f300 ;;; refer.el ends here diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el index b5dd64a891..60b64e9a9f 100644 --- a/lisp/textmodes/refill.el +++ b/lisp/textmodes/refill.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2000, 2003 Free Software Foundation, Inc. ;; Author: Dave Love +;; Maintainer: Miles Bader ;; Keywords: wp ;; This file is part of GNU Emacs. @@ -256,4 +257,5 @@ refilling if they would cause auto-filling." (provide 'refill) +;;; arch-tag: 2c4ce9e8-1daa-4a3b-b6f8-fd6ac5bf6138 ;;; refill.el ends here diff --git a/lisp/textmodes/reftex-auc.el b/lisp/textmodes/reftex-auc.el index b71e325612..7b9ad8348c 100644 --- a/lisp/textmodes/reftex-auc.el +++ b/lisp/textmodes/reftex-auc.el @@ -1,8 +1,8 @@ ;;; reftex-auc.el --- RefTeX's interface to AUC TeX -;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.18 +;; Version: 4.21 ;; This file is part of GNU Emacs. @@ -34,7 +34,7 @@ ;; Tell if a certain flag is set in reftex-plug-into-AUCTeX (or (eq t reftex-plug-into-AUCTeX) (and (listp reftex-plug-into-AUCTeX) - (nth which reftex-plug-into-AUCTeX)))) + (nth which reftex-plug-into-AUCTeX)))) (defun reftex-arg-label (optional &optional prompt definition) "Use `reftex-label', `reftex-reference' or AUCTeX's code to insert label arg. @@ -44,17 +44,17 @@ What is being used depends upon `reftex-plug-into-AUCTeX'." ((and definition (reftex-plug-flag 1)) ;; Create a new label, with a temporary brace for `reftex-what-macro' (unwind-protect - (progn (insert "{") (setq label (or (reftex-label nil t) ""))) - (delete-backward-char 1))) + (progn (insert "{") (setq label (or (reftex-label nil t) ""))) + (delete-backward-char 1))) ((and (not definition) (reftex-plug-flag 2)) ;; Reference a label with RefTeX (setq label (reftex-reference nil t))) (t ;; AUCTeX's default mechanism (setq label (completing-read (TeX-argument-prompt optional prompt "Key") - (LaTeX-label-list))))) + (LaTeX-label-list))))) (if (and definition (not (string-equal "" label))) - (LaTeX-add-labels label)) + (LaTeX-add-labels label)) (TeX-argument-insert label optional))) (defun reftex-arg-cite (optional &optional prompt definition) @@ -66,28 +66,28 @@ What is being used depends upon `reftex-plug-into-AUCTeX'." (setq items (list (or (reftex-citation t) "")))) (t (setq prompt (concat (if optional "(Optional) " "") - (if prompt prompt "Add key") - ": (default none) ")) + (if prompt prompt "Add key") + ": (default none) ")) (setq items (multi-prompt "," t prompt (LaTeX-bibitem-list))))) (apply 'LaTeX-add-bibitems items) (TeX-argument-insert (mapconcat 'identity items ",") optional))) (defun reftex-arg-index-tag (optional &optional prompt &rest args) - "Prompt for an index tag with completion. + "Prompt for an index tag with completion. This is the name of an index, not the entry." (let (tag taglist) (setq prompt (concat (if optional "(Optional) " "") - (if prompt prompt "Index tag") - ": (default none) ")) + (if prompt prompt "Index tag") + ": (default none) ")) (if (and reftex-support-index (reftex-plug-flag 4)) - ;; Use RefTeX completion - (progn - (reftex-access-scan-info nil) - (setq taglist - (cdr (assoc 'index-tags - (symbol-value reftex-docstruct-symbol))) - tag (completing-read prompt (mapcar 'list taglist)))) + ;; Use RefTeX completion + (progn + (reftex-access-scan-info nil) + (setq taglist + (cdr (assoc 'index-tags + (symbol-value reftex-docstruct-symbol))) + tag (completing-read prompt (mapcar 'list taglist)))) ;; Just ask like AUCTeX does. (setq tag (read-string prompt))) (TeX-argument-insert tag optional))) @@ -98,12 +98,12 @@ Completion is specific for just one index, if the macro or a tag argument identify one of multiple indices." (let* (tag key) (if (and reftex-support-index (reftex-plug-flag 4)) - (progn - (reftex-access-scan-info nil) - (setq tag (reftex-what-index-tag) - key (reftex-index-complete-key (or tag "idx")))) + (progn + (reftex-access-scan-info nil) + (setq tag (reftex-what-index-tag) + key (reftex-index-complete-key (or tag "idx")))) (setq key (completing-read (TeX-argument-prompt optional prompt "Key") - (LaTeX-index-entry-list)))) + (LaTeX-index-entry-list)))) (unless (string-equal "" key) (LaTeX-add-index-entries key)) (TeX-argument-insert key optional))) @@ -111,18 +111,18 @@ argument identify one of multiple indices." (defun reftex-what-index-tag () ;; Look backward to find out what index the macro at point belongs to (let ((macro (save-excursion - (and (re-search-backward "\\\\[a-zA-Z*]+" nil t) - (match-string 0)))) - tag entry) + (and (re-search-backward "\\\\[a-zA-Z*]+" nil t) + (match-string 0)))) + tag entry) (when (and macro - (setq entry (assoc macro reftex-index-macro-alist))) + (setq entry (assoc macro reftex-index-macro-alist))) (setq tag (nth 1 entry)) (cond ((stringp tag) tag) ((integerp tag) - (save-excursion - (goto-char (match-end 1)) - (or (reftex-nth-arg tag (nth 6 entry)) "idx"))) + (save-excursion + (goto-char (match-end 1)) + (or (reftex-nth-arg tag (nth 6 entry)) "idx"))) (t "idx"))))) (defvar LaTeX-label-function) @@ -130,7 +130,7 @@ argument identify one of multiple indices." ;; Replace AUCTeX functions with RefTeX functions. ;; Which functions are replaced is controlled by the variable ;; `reftex-plug-into-AUCTeX'. - + (if (reftex-plug-flag 0) (setq LaTeX-label-function 'reftex-label) (setq LaTeX-label-function nil)) @@ -142,11 +142,11 @@ argument identify one of multiple indices." (and (reftex-plug-flag 3) (fboundp 'TeX-arg-cite) (fset 'TeX-arg-cite 'reftex-arg-cite)) - - (and (reftex-plug-flag 4) + + (and (reftex-plug-flag 4) (fboundp 'TeX-arg-index-tag) (fset 'TeX-arg-index-tag 'reftex-arg-index-tag)) - (and (reftex-plug-flag 4) + (and (reftex-plug-flag 4) (fboundp 'TeX-arg-index) (fset 'TeX-arg-index 'reftex-arg-index))) @@ -174,17 +174,17 @@ the label information is recompiled on next use." (unless reftex-docstruct-symbol (reftex-tie-multifile-symbols)) (when (and reftex-docstruct-symbol - (symbolp reftex-docstruct-symbol)) + (symbolp reftex-docstruct-symbol)) (let ((list (get reftex-docstruct-symbol 'reftex-label-alist-style)) - entry changed) + entry changed) (while entry-list - (setq entry (pop entry-list)) - (unless (member entry list) - (setq reftex-tables-dirty t - changed t) - (push entry list))) + (setq entry (pop entry-list)) + (unless (member entry list) + (setq reftex-tables-dirty t + changed t) + (push entry list))) (when changed - (put reftex-docstruct-symbol 'reftex-label-alist-style list))))) + (put reftex-docstruct-symbol 'reftex-label-alist-style list))))) (defalias 'reftex-add-to-label-alist 'reftex-add-label-environments) (defun reftex-add-section-levels (entry-list) @@ -195,19 +195,20 @@ of ENTRY-LIST is a list of cons cells (\"MACRONAME\" . LEVEL). See (unless reftex-docstruct-symbol (reftex-tie-multifile-symbols)) (when (and reftex-docstruct-symbol - (symbolp reftex-docstruct-symbol)) + (symbolp reftex-docstruct-symbol)) (let ((list (get reftex-docstruct-symbol 'reftex-section-levels)) - entry changed) + entry changed) (while entry-list - (setq entry (pop entry-list)) - (unless (member entry list) - (setq reftex-tables-dirty t - changed t) - (push entry list))) + (setq entry (pop entry-list)) + (unless (member entry list) + (setq reftex-tables-dirty t + changed t) + (push entry list))) (when changed - (put reftex-docstruct-symbol 'reftex-section-levels list))))) + (put reftex-docstruct-symbol 'reftex-section-levels list))))) (defun reftex-notice-new-section () (reftex-notice-new 1 'force)) +;;; arch-tag: 4a798e68-3405-421c-a09b-0269aac64ab4 ;;; reftex-auc.el ends here diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index acd33f3d62..e25464c798 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el @@ -1,8 +1,8 @@ ;;; reftex-cite.el --- creating citations with RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.18 +;; Version: 4.21 ;; This file is part of GNU Emacs. @@ -57,21 +57,21 @@ (defmacro reftex-with-special-syntax-for-bib (&rest body) `(let ((saved-syntax (syntax-table))) (unwind-protect - (progn - (set-syntax-table reftex-syntax-table-for-bib) - ,@body) + (progn + (set-syntax-table reftex-syntax-table-for-bib) + ,@body) (set-syntax-table saved-syntax)))) (defun reftex-default-bibliography () ;; Return the expanded value of `reftex-default-bibliography'. ;; The expanded value is cached. (unless (eq (get 'reftex-default-bibliography :reftex-raw) - reftex-default-bibliography) + reftex-default-bibliography) (put 'reftex-default-bibliography :reftex-expanded - (reftex-locate-bibliography-files - default-directory reftex-default-bibliography)) + (reftex-locate-bibliography-files + default-directory reftex-default-bibliography)) (put 'reftex-default-bibliography :reftex-raw - reftex-default-bibliography)) + reftex-default-bibliography)) (get 'reftex-default-bibliography :reftex-expanded)) (defun reftex-bib-or-thebib () @@ -79,19 +79,19 @@ ;; citation ;; Find the bof of the current file (let* ((docstruct (symbol-value reftex-docstruct-symbol)) - (rest (or (member (list 'bof (buffer-file-name)) docstruct) - docstruct)) - (bib (assq 'bib rest)) - (thebib (assq 'thebib rest)) - (bibmem (memq bib rest)) - (thebibmem (memq thebib rest))) + (rest (or (member (list 'bof (buffer-file-name)) docstruct) + docstruct)) + (bib (assq 'bib rest)) + (thebib (assq 'thebib rest)) + (bibmem (memq bib rest)) + (thebibmem (memq thebib rest))) (when (not (or thebib bib)) (setq bib (assq 'bib docstruct) - thebib (assq 'thebib docstruct) - bibmem (memq bib docstruct) - thebibmem (memq thebib docstruct))) + thebib (assq 'thebib docstruct) + bibmem (memq bib docstruct) + thebibmem (memq thebib docstruct))) (if (> (length bibmem) (length thebibmem)) - (if bib 'bib nil) + (if bib 'bib nil) (if thebib 'thebib nil)))) (defun reftex-get-bibfile-list () @@ -119,7 +119,7 @@ ;; Find a certain reference in any of the BibTeX files. (defun reftex-pop-to-bibtex-entry (key file-list &optional mark-to-kill - highlight item return) + highlight item return) ;; Find BibTeX KEY in any file in FILE-LIST in another window. ;; If MARK-TO-KILL is non-nil, mark new buffer to kill. ;; If HIGHLIGHT is non-nil, highlight the match. @@ -127,11 +127,11 @@ ;; If RETURN is non-nil, just return the entry. (let* ((re - (if item - (concat "\\\\bibitem\\(\\[[^]]*\\]\\)?{" (regexp-quote key) "}") - (concat "@[a-zA-Z]+[ \t\n\r]*[{(][ \t\n\r]*" (regexp-quote key) - "[, \t\r\n}]"))) - (buffer-conf (current-buffer)) + (if item + (concat "\\\\bibitem\\(\\[[^]]*\\]\\)?{" (regexp-quote key) "}") + (concat "@[a-zA-Z]+[ \t\n\r]*[{(][ \t\n\r]*" (regexp-quote key) + "[, \t\r\n}]"))) + (buffer-conf (current-buffer)) file buf pos) (catch 'exit @@ -145,47 +145,71 @@ (goto-char (point-min)) (when (re-search-forward re nil t) (goto-char (match-beginning 0)) - (setq pos (point)) - (when return - ;; Just return the relevant entry - (if item (goto-char (match-end 0))) - (setq return (buffer-substring - (point) (reftex-end-of-bib-entry item))) - (set-buffer buffer-conf) - (throw 'exit return)) - (switch-to-buffer-other-window buf) - (goto-char pos) + (setq pos (point)) + (when return + ;; Just return the relevant entry + (if item (goto-char (match-end 0))) + (setq return (buffer-substring + (point) (reftex-end-of-bib-entry item))) + (set-buffer buffer-conf) + (throw 'exit return)) + (switch-to-buffer-other-window buf) + (goto-char pos) (recenter 0) (if highlight (reftex-highlight 0 (match-beginning 0) (match-end 0))) (throw 'exit (selected-window)))) (set-buffer buffer-conf) (if item - (error "No \\bibitem with citation key %s" key) - (error "No BibTeX entry with citation key %s" key))))) + (error "No \\bibitem with citation key %s" key) + (error "No BibTeX entry with citation key %s" key))))) (defun reftex-end-of-bib-entry (item) - (save-excursion + (save-excursion (condition-case nil - (if item - (progn (end-of-line) - (re-search-forward - "\\\\bibitem\\|\\end{thebibliography}") - (1- (match-beginning 0))) - (progn (forward-list 1) (point))) + (if item + (progn (end-of-line) + (re-search-forward + "\\\\bibitem\\|\\end{thebibliography}") + (1- (match-beginning 0))) + (progn (forward-list 1) (point))) (error (min (point-max) (+ 300 (point))))))) ;; Parse bibtex buffers -(defun reftex-extract-bib-entries (buffers re-list) +(defun reftex-extract-bib-entries (buffers) ;; Extract bib entries which match regexps from BUFFERS. ;; BUFFERS is a list of buffers or file names. ;; Return list with entries." - (let* ((buffer-list (if (listp buffers) buffers (list buffers))) - (first-re (car re-list)) ; We'll use the first re to find things, - (rest-re (cdr re-list)) ; the others to narrow down. - found-list entry buffer1 buffer alist - key-point start-point end-point default) + (let* (re-list first-re rest-re + (buffer-list (if (listp buffers) buffers (list buffers))) + found-list entry buffer1 buffer alist + key-point start-point end-point default) + + ;; Read a regexp, completing on known citation keys. + (setq default (regexp-quote (reftex-get-bibkey-default))) + (setq re-list + (split-string + (completing-read + (concat + "Regex { && Regex...}: " + "[" default "]: ") + (if reftex-mode + (if (fboundp 'LaTeX-bibitem-list) + (LaTeX-bibitem-list) + (cdr (assoc 'bibview-cache + (symbol-value reftex-docstruct-symbol)))) + nil) + nil nil nil 'reftex-cite-regexp-hist) + "[ \t]*&&[ \t]*")) + + (if (or (null re-list ) (equal re-list '(""))) + (setq re-list (list default))) + + (setq first-re (car re-list) ; We'll use the first re to find things, + rest-re (cdr re-list)) ; the others to narrow down. + (if (string-match "\\`[ \t]*\\'" (or first-re "")) + (error "Empty regular expression")) (save-excursion (save-window-excursion @@ -204,62 +228,65 @@ (message "Scanning bibliography database %s" buffer1)) (set-buffer buffer1) - (reftex-with-special-syntax-for-bib - (save-excursion - (goto-char (point-min)) - (while (re-search-forward first-re nil t) - (catch 'search-again - (setq key-point (point)) - (unless (re-search-backward - "^[ \t]*@\\([a-zA-Z]+\\)[ \t\n\r]*[{(]" nil t) - (throw 'search-again nil)) - (setq start-point (point)) - (goto-char (match-end 0)) - (condition-case nil - (up-list 1) - (error (goto-char key-point) + (reftex-with-special-syntax-for-bib + (save-excursion + (goto-char (point-min)) + (while (re-search-forward first-re nil t) + (catch 'search-again + (setq key-point (point)) + (unless (re-search-backward + "\\(\\`\\|[\n\r]\\)[ \t]*@\\([a-zA-Z]+\\)[ \t\n\r]*[{(]" nil t) + (throw 'search-again nil)) + (setq start-point (point)) + (goto-char (match-end 0)) + (condition-case nil + (up-list 1) + (error (goto-char key-point) (throw 'search-again nil))) - (setq end-point (point)) - - ;; Ignore @string, @comment and @c entries or things - ;; outside entries - (when (or (member-ignore-case (match-string 1) - '("string" "comment" "c")) - (< (point) key-point)) ; this means match not in {} - (goto-char key-point) - (throw 'search-again nil)) - - ;; Well, we have got a match - (setq entry (buffer-substring start-point (point))) - - ;; Check if other regexp match as well - (setq re-list rest-re) - (while re-list - (unless (string-match (car re-list) entry) - ;; nope - move on - (throw 'search-again nil)) - (pop re-list)) - - (setq alist (reftex-parse-bibtex-entry - nil start-point end-point)) - (push (cons "&entry" entry) alist) - - ;; check for crossref entries - (if (assoc "crossref" alist) - (setq alist - (append - alist (reftex-get-crossref-alist alist)))) - - ;; format the entry - (push (cons "&formatted" (reftex-format-bib-entry alist)) - alist) - - ;; make key the first element - (push (reftex-get-bib-field "&key" alist) alist) - - ;; add it to the list - (push alist found-list))))) - (reftex-kill-temporary-buffers)))) + (setq end-point (point)) + + ;; Ignore @string, @comment and @c entries or things + ;; outside entries + (when (or (string= (downcase (match-string 2)) "string") + (string= (downcase (match-string 2)) "comment") + (string= (downcase (match-string 2)) "c") + (< (point) key-point)) ; this means match not in {} + (goto-char key-point) + (throw 'search-again nil)) + + ;; Well, we have got a match + ;;(setq entry (concat + ;; (buffer-substring start-point (point)) "\n")) + (setq entry (buffer-substring start-point (point))) + + ;; Check if other regexp match as well + (setq re-list rest-re) + (while re-list + (unless (string-match (car re-list) entry) + ;; nope - move on + (throw 'search-again nil)) + (pop re-list)) + + (setq alist (reftex-parse-bibtex-entry + nil start-point end-point)) + (push (cons "&entry" entry) alist) + + ;; check for crossref entries + (if (assoc "crossref" alist) + (setq alist + (append + alist (reftex-get-crossref-alist alist)))) + + ;; format the entry + (push (cons "&formatted" (reftex-format-bib-entry alist)) + alist) + + ;; make key the first element + (push (reftex-get-bib-field "&key" alist) alist) + + ;; add it to the list + (push alist found-list))))) + (reftex-kill-temporary-buffers)))) (setq found-list (nreverse found-list)) ;; Sorting @@ -310,61 +337,84 @@ nil))))) ;; Parse the bibliography environment -(defun reftex-extract-bib-entries-from-thebibliography (files re-list) +(defun reftex-extract-bib-entries-from-thebibliography (files) ;; Extract bib-entries from the \begin{thebibliography} environment. ;; Parsing is not as good as for the BibTeX database stuff. ;; The environment should be located in file FILE. - (let* (start end buf entries re file default) + (let* (start end buf entries re re-list file default) (unless files (error "Need file name to find thebibliography environment")) (while (setq file (pop files)) - (setq buf (reftex-get-file-buffer-force - file (not reftex-keep-temporary-buffers))) + (setq buf (reftex-get-file-buffer-force + file (not reftex-keep-temporary-buffers))) (unless buf - (error "No such file %s" file)) + (error "No such file %s" file)) (message "Scanning thebibliography environment in %s" file) (save-excursion - (set-buffer buf) - (save-restriction - (widen) - (goto-char (point-min)) - (while (re-search-forward - "\\(\\`\\|[\n\r]\\)[ \t]*\\\\begin{thebibliography}" nil t) - (beginning-of-line 2) - (setq start (point)) - (if (re-search-forward - "\\(\\`\\|[\n\r]\\)[ \t]*\\\\end{thebibliography}" nil t) - (progn - (beginning-of-line 1) - (setq end (point)))) - (when (and start end) - (setq entries - (append entries + (set-buffer buf) + (save-restriction + (widen) + (goto-char (point-min)) + (while (re-search-forward + "\\(\\`\\|[\n\r]\\)[ \t]*\\\\begin{thebibliography}" nil t) + (beginning-of-line 2) + (setq start (point)) + (if (re-search-forward + "\\(\\`\\|[\n\r]\\)[ \t]*\\\\end{thebibliography}" nil t) + (progn + (beginning-of-line 1) + (setq end (point)))) + (when (and start end) + (setq entries + (append entries (mapcar 'reftex-parse-bibitem - (delete "" - (split-string - (buffer-substring-no-properties start end) - "[ \t\n\r]*\\\\bibitem\\(\\[[^]]*]\\)*")))))) - (goto-char end))))) + (delete "" + (split-string + (buffer-substring-no-properties start end) + "[ \t\n\r]*\\\\bibitem\\(\\[[^]]*]\\)*")))))) + (goto-char end))))) (unless entries (error "No bibitems found")) + ;; Read a regexp, completing on known citation keys. + (setq default (regexp-quote (reftex-get-bibkey-default))) + (setq re-list + (split-string + (completing-read + (concat + "Regex { && Regex...}: " + "[" default "]: ") + (if reftex-mode + (if (fboundp 'LaTeX-bibitem-list) + (LaTeX-bibitem-list) + (cdr (assoc 'bibview-cache + (symbol-value reftex-docstruct-symbol)))) + nil) + nil nil nil 'reftex-cite-regexp-hist) + "[ \t]*&&[ \t]*")) + + (if (or (null re-list ) (equal re-list '(""))) + (setq re-list (list default))) + + (if (string-match "\\`[ \t]*\\'" (car re-list)) + (error "Empty regular expression")) + (while (and (setq re (pop re-list)) entries) - (setq entries - (delq nil (mapcar - (lambda (x) - (if (string-match re (cdr (assoc "&entry" x))) - x nil)) - entries)))) - (setq entries - (mapcar - (lambda (x) - (push (cons "&formatted" (reftex-format-bibitem x)) x) - (push (reftex-get-bib-field "&key" x) x) - x) - entries)) + (setq entries + (delq nil (mapcar + (lambda (x) + (if (string-match re (cdr (assoc "&entry" x))) + x nil)) + entries)))) + (setq entries + (mapcar + (lambda (x) + (push (cons "&formatted" (reftex-format-bibitem x)) x) + (push (reftex-get-bib-field "&key" x) x) + x) + entries)) entries)) @@ -374,7 +424,7 @@ (let* ((macro (reftex-what-macro 1))) (save-excursion (if (and macro (string-match "cite" (car macro))) - (goto-char (cdr macro))) + (goto-char (cdr macro))) (skip-chars-backward "^a-zA-Z0-9") (reftex-this-word)))) @@ -403,7 +453,7 @@ (progn (set-buffer (get-buffer-create " *RefTeX-scratch*")) (fundamental-mode) - (set-syntax-table reftex-syntax-table-for-bib) + (set-syntax-table reftex-syntax-table-for-bib) (erase-buffer) (insert entry)) (widen) @@ -450,9 +500,9 @@ ;; Extract the field FIELDNAME from an ENTRY (let ((cell (assoc fieldname entry))) (if cell - (if format - (format format (cdr cell)) - (cdr cell)) + (if format + (format format (cdr cell)) + (cdr cell)) ""))) (defun reftex-format-bib-entry (entry) @@ -487,9 +537,9 @@ (setq authors (reftex-truncate authors 30 t t)) (when (reftex-use-fonts) (put-text-property 0 (length key) 'face - (reftex-verified-face reftex-label-face - 'font-lock-constant-face - 'font-lock-reference-face) + (reftex-verified-face reftex-label-face + 'font-lock-constant-face + 'font-lock-reference-face) key) (put-text-property 0 (length authors) 'face reftex-bib-author-face authors) @@ -506,12 +556,12 @@ (let ((key "") (text "")) (when (string-match "\\`{\\([^}]+\\)}\\([^\000]*\\)" item) (setq key (match-string 1 item) - text (match-string 2 item))) + text (match-string 2 item))) ;; Clean up the text a little bit (while (string-match "[\n\r\t]\\|[ \t][ \t]+" text) (setq text (replace-match " " nil t text))) (if (string-match "\\`[ \t]+" text) - (setq text (replace-match "" nil t text))) + (setq text (replace-match "" nil t text))) (list (cons "&key" key) (cons "&text" text) @@ -520,14 +570,14 @@ (defun reftex-format-bibitem (item) ;; Format a \bibitem entry so that it is (relatively) nice to look at. (let ((text (reftex-get-bib-field "&text" item)) - (key (reftex-get-bib-field "&key" item)) - (lines nil)) + (key (reftex-get-bib-field "&key" item)) + (lines nil)) ;; Wrap the text into several lines. (while (and (> (length text) 70) - (string-match " " (substring text 60))) - (push (substring text 0 (+ 60 (match-beginning 0))) lines) - (setq text (substring text (+ 61 (match-beginning 0))))) + (string-match " " (substring text 60))) + (push (substring text 0 (+ 60 (match-beginning 0))) lines) + (setq text (substring text (+ 61 (match-beginning 0))))) (push text lines) (setq text (mapconcat 'identity (nreverse lines) "\n ")) @@ -579,18 +629,18 @@ While entering the regexp, completion on knows citation keys is possible. ;; This really does the work of reftex-citation. (let* ((format (reftex-figure-out-cite-format arg no-insert format-key)) - (docstruct-symbol reftex-docstruct-symbol) - (selected-entries (reftex-offer-bib-menu)) - (insert-entries selected-entries) - entry string cite-view) + (docstruct-symbol reftex-docstruct-symbol) + (selected-entries (reftex-offer-bib-menu)) + (insert-entries selected-entries) + entry string cite-view) (unless selected-entries (error "Quit")) (if (stringp selected-entries) - ;; Nonexistent entry - (setq selected-entries nil - insert-entries (list (list selected-entries - (cons "&key" selected-entries)))) + ;; Nonexistent entry + (setq selected-entries nil + insert-entries (list (list selected-entries + (cons "&key" selected-entries)))) ;; It makes sense to compute the cite-view strings. (setq cite-view t)) @@ -598,54 +648,54 @@ While entering the regexp, completion on knows citation keys is possible. ;; All keys go into a single command - we need to trick a little (pop selected-entries) (let ((concat-keys (mapconcat 'car selected-entries ","))) - (setq insert-entries - (list (list concat-keys (cons "&key" concat-keys)))))) - + (setq insert-entries + (list (list concat-keys (cons "&key" concat-keys)))))) + (unless no-insert ;; We shall insert this into the buffer... (message "Formatting...") (while (setq entry (pop insert-entries)) - ;; Format the citation and insert it - (setq string (if reftex-format-cite-function - (funcall reftex-format-cite-function - (reftex-get-bib-field "&key" entry) - format) - (reftex-format-citation entry format))) - (insert string)) + ;; Format the citation and insert it + (setq string (if reftex-format-cite-function + (funcall reftex-format-cite-function + (reftex-get-bib-field "&key" entry) + format) + (reftex-format-citation entry format))) + (insert string)) ;; Reposition cursor? (when (string-match "\\?" string) - (search-backward "?") - (delete-char 1)) + (search-backward "?") + (delete-char 1)) ;; Tell AUCTeX - (when (and reftex-mode - (fboundp 'LaTeX-add-bibitems) - reftex-plug-into-AUCTeX) - (apply 'LaTeX-add-bibitems (mapcar 'car selected-entries))) - + (when (and reftex-mode + (fboundp 'LaTeX-add-bibitems) + reftex-plug-into-AUCTeX) + (apply 'LaTeX-add-bibitems (mapcar 'car selected-entries))) + ;; Produce the cite-view strings (when (and reftex-mode reftex-cache-cite-echo cite-view) - (mapcar (lambda (entry) - (reftex-make-cite-echo-string entry docstruct-symbol)) - selected-entries)) + (mapcar (lambda (entry) + (reftex-make-cite-echo-string entry docstruct-symbol)) + selected-entries)) (message "")) (set-marker reftex-select-return-marker nil) (reftex-kill-buffer "*RefTeX Select*") - + ;; Check if the prefix arg was numeric, and call recursively (when (integerp arg) (if (> arg 1) - (progn - (skip-chars-backward "}") - (decf arg) - (reftex-do-citation arg)) - (forward-char 1))) - + (progn + (skip-chars-backward "}") + (decf arg) + (reftex-do-citation arg)) + (forward-char 1))) + ;; Return the citation key (car (car selected-entries)))) @@ -653,44 +703,44 @@ While entering the regexp, completion on knows citation keys is possible. ;; Check if there is already a cite command at point and change cite format ;; in order to only add another reference in the same cite command. (let ((macro (car (reftex-what-macro 1))) - (cite-format-value (reftex-get-cite-format)) - key format) + (cite-format-value (reftex-get-cite-format)) + key format) (cond (no-insert ;; Format does not really matter because nothing will be inserted. (setq format "%l")) - + ((and (stringp macro) - (string-match "\\`\\\\cite\\|cite\\'" macro)) + (string-match "\\`\\\\cite\\|cite\\'" macro)) ;; We are already inside a cite macro (if (or (not arg) (not (listp arg))) - (setq format - (concat - (if (member (preceding-char) '(?\{ ?,)) "" ",") - "%l" - (if (member (following-char) '(?\} ?,)) "" ","))) - (setq format "%l"))) + (setq format + (concat + (if (member (preceding-char) '(?\{ ?,)) "" ",") + "%l" + (if (member (following-char) '(?\} ?,)) "" ","))) + (setq format "%l"))) (t ;; Figure out the correct format (setq format (if (and (symbolp cite-format-value) - (assq cite-format-value reftex-cite-format-builtin)) - (nth 2 (assq cite-format-value reftex-cite-format-builtin)) - cite-format-value)) + (assq cite-format-value reftex-cite-format-builtin)) + (nth 2 (assq cite-format-value reftex-cite-format-builtin)) + cite-format-value)) (when (listp format) - (setq key - (or format-key - (reftex-select-with-char - "" (concat "SELECT A CITATION FORMAT\n\n" - (mapconcat - (lambda (x) - (format "[%c] %s %s" (car x) - (if (> (car x) 31) " " "") - (cdr x))) - format "\n"))))) - (if (assq key format) - (setq format (cdr (assq key format))) - (error "No citation format associated with key `%c'" key))))) + (setq key + (or format-key + (reftex-select-with-char + "" (concat "SELECT A CITATION FORMAT\n\n" + (mapconcat + (lambda (x) + (format "[%c] %s %s" (car x) + (if (> (car x) 31) " " "") + (cdr x))) + format "\n"))))) + (if (assq key format) + (setq format (cdr (assq key format))) + (error "No citation format associated with key `%c'" key))))) format)) (defun reftex-citep () @@ -708,163 +758,141 @@ While entering the regexp, completion on knows citation keys is possible. ;; Offer bib menu and return list of selected items (let ((bibtype (reftex-bib-or-thebib)) - found-list rtn key data selected-entries re-list) - (while - (not - (catch 'done - ;; Get the search regexps, completing on known citation keys. - (setq re-list - (let ((default (regexp-quote (reftex-get-bibkey-default)))) - (split-string - (completing-read - (concat - "Regex { && Regex...}: " - "[" default "]: ") - (if reftex-mode - (if (fboundp 'LaTeX-bibitem-list) - (LaTeX-bibitem-list) - (cdr (assoc 'bibview-cache - (symbol-value reftex-docstruct-symbol)))) - nil) - nil nil nil 'reftex-cite-regexp-hist default) - "[ \t]*&&[ \t]*"))) - - (if (string-match "\\`[ \t]*\\'" (car re-list)) - (error "Empty regular expression")) - - ;; Scan bibtex files - (setq found-list - (cond - ((eq bibtype 'bib) -; ((assq 'bib (symbol-value reftex-docstruct-symbol)) - ;; using BibTeX database files. - (reftex-extract-bib-entries (reftex-get-bibfile-list) re-list)) - ((eq bibtype 'thebib) -; ((assq 'thebib (symbol-value reftex-docstruct-symbol)) - ;; using thebibliography environment. - (reftex-extract-bib-entries-from-thebibliography - (reftex-uniquify - (mapcar 'cdr - (reftex-all-assq - 'thebib (symbol-value reftex-docstruct-symbol)))) - re-list)) - (reftex-default-bibliography - (message "Using default bibliography") - (reftex-extract-bib-entries (reftex-default-bibliography) - re-list)) - (t (error "No valid bibliography in this document, and no default available")))) - - (unless found-list - (error "Sorry, no matches found")) - - ;; Remember where we came from - (setq reftex-call-back-to-this-buffer (current-buffer)) - (set-marker reftex-select-return-marker (point)) - - ;; Offer selection - (save-window-excursion - (delete-other-windows) - (let ((default-major-mode 'reftex-select-bib-mode)) - (reftex-kill-buffer "*RefTeX Select*") - (switch-to-buffer-other-window "*RefTeX Select*") - (unless (eq major-mode 'reftex-select-bib-mode) - (reftex-select-bib-mode)) - (let ((buffer-read-only nil)) - (erase-buffer) - (reftex-insert-bib-matches found-list))) - (setq buffer-read-only t) - (if (= 0 (buffer-size)) - (error "No matches found")) - (setq truncate-lines t) - (goto-char 1) - (while t - (setq rtn - (reftex-select-item - reftex-citation-prompt - reftex-citation-help - reftex-select-bib-map - nil - 'reftex-bibtex-selection-callback nil)) - (setq key (car rtn) - data (nth 1 rtn)) - (unless key (throw 'done t)) - (cond - ((eq key ?g) - ;; Start over - (throw 'done nil)) - ((eq key ?r) - ;; Restrict with new regular expression - (setq found-list (reftex-restrict-bib-matches found-list)) - (let ((buffer-read-only nil)) - (erase-buffer) - (reftex-insert-bib-matches found-list)) - (goto-char 1)) - ((eq key ?A) - ;; Take all (marked) - (setq selected-entries - (if reftex-select-marked - (mapcar 'car (nreverse reftex-select-marked)) - found-list)) - (throw 'done t)) - ((eq key ?a) - ;; Take all (marked), and push the symbol 'concat - (setq selected-entries - (cons 'concat - (if reftex-select-marked - (mapcar 'car (nreverse reftex-select-marked)) - found-list))) - (throw 'done t)) - ((or (eq key ?\C-m) - (eq key 'return)) - ;; Take selected - (setq selected-entries - (if reftex-select-marked - (cons 'concat - (mapcar 'car (nreverse reftex-select-marked))) - (if data (list data) nil))) - (throw 'done t)) - ((stringp key) - ;; Got this one with completion - (setq selected-entries key) - (throw 'done t)) - (t - (ding)))))))) + found-list rtn key data selected-entries) + (while + (not + (catch 'done + ;; Scan bibtex files + (setq found-list + (cond + ((eq bibtype 'bib) +; ((assq 'bib (symbol-value reftex-docstruct-symbol)) + ;; using BibTeX database files. + (reftex-extract-bib-entries (reftex-get-bibfile-list))) + ((eq bibtype 'thebib) +; ((assq 'thebib (symbol-value reftex-docstruct-symbol)) + ;; using thebibliography environment. + (reftex-extract-bib-entries-from-thebibliography + (reftex-uniquify + (mapcar 'cdr + (reftex-all-assq + 'thebib (symbol-value reftex-docstruct-symbol)))))) + (reftex-default-bibliography + (message "Using default bibliography") + (reftex-extract-bib-entries (reftex-default-bibliography))) + (t (error "No valid bibliography in this document, and no default available")))) + + (unless found-list + (error "Sorry, no matches found")) + + ;; Remember where we came from + (setq reftex-call-back-to-this-buffer (current-buffer)) + (set-marker reftex-select-return-marker (point)) + + ;; Offer selection + (save-window-excursion + (delete-other-windows) + (let ((default-major-mode 'reftex-select-bib-mode)) + (reftex-kill-buffer "*RefTeX Select*") + (switch-to-buffer-other-window "*RefTeX Select*") + (unless (eq major-mode 'reftex-select-bib-mode) + (reftex-select-bib-mode)) + (let ((buffer-read-only nil)) + (erase-buffer) + (reftex-insert-bib-matches found-list))) + (setq buffer-read-only t) + (if (= 0 (buffer-size)) + (error "No matches found")) + (setq truncate-lines t) + (goto-char 1) + (while t + (setq rtn + (reftex-select-item + reftex-citation-prompt + reftex-citation-help + reftex-select-bib-map + nil + 'reftex-bibtex-selection-callback nil)) + (setq key (car rtn) + data (nth 1 rtn)) + (unless key (throw 'done t)) + (cond + ((eq key ?g) + ;; Start over + (throw 'done nil)) + ((eq key ?r) + ;; Restrict with new regular expression + (setq found-list (reftex-restrict-bib-matches found-list)) + (let ((buffer-read-only nil)) + (erase-buffer) + (reftex-insert-bib-matches found-list)) + (goto-char 1)) + ((eq key ?A) + ;; Take all (marked) + (setq selected-entries + (if reftex-select-marked + (mapcar 'car (nreverse reftex-select-marked)) + found-list)) + (throw 'done t)) + ((eq key ?a) + ;; Take all (marked), and push the symbol 'concat + (setq selected-entries + (cons 'concat + (if reftex-select-marked + (mapcar 'car (nreverse reftex-select-marked)) + found-list))) + (throw 'done t)) + ((or (eq key ?\C-m) + (eq key 'return)) + ;; Take selected + (setq selected-entries + (if reftex-select-marked + (cons 'concat + (mapcar 'car (nreverse reftex-select-marked))) + (if data (list data) nil))) + (throw 'done t)) + ((stringp key) + ;; Got this one with completion + (setq selected-entries key) + (throw 'done t)) + (t + (ding)))))))) selected-entries)) (defun reftex-restrict-bib-matches (found-list) ;; Limit FOUND-LIST with more regular expressions (let ((re-list (split-string (read-string - "RegExp [ && RegExp...]: " - nil 'reftex-cite-regexp-hist) - "[ \t]*&&[ \t]*")) - (found-list-r found-list) - re) + "RegExp [ && RegExp...]: " + nil 'reftex-cite-regexp-hist) + "[ \t]*&&[ \t]*")) + (found-list-r found-list) + re) (while (setq re (pop re-list)) (setq found-list-r - (delq nil - (mapcar - (lambda (x) - (if (string-match - re (cdr (assoc "&entry" x))) - x - nil)) - found-list-r)))) + (delq nil + (mapcar + (lambda (x) + (if (string-match + re (cdr (assoc "&entry" x))) + x + nil)) + found-list-r)))) (if found-list-r - found-list-r + found-list-r (ding) found-list))) (defun reftex-insert-bib-matches (list) ;; Insert the bib matches and number them correctly (let ((mouse-face - (if (memq reftex-highlight-selection '(mouse both)) - reftex-mouse-selected-face - nil)) - tmp len) - (mapcar + (if (memq reftex-highlight-selection '(mouse both)) + reftex-mouse-selected-face + nil)) + tmp len) + (mapcar (lambda (x) (setq tmp (cdr (assoc "&formatted" x)) - len (length tmp)) + len (length tmp)) (put-text-property 0 len :data x tmp) (put-text-property 0 (1- len) 'mouse-face mouse-face tmp) (insert tmp)) @@ -916,7 +944,7 @@ While entering the regexp, completion on knows citation keys is possible. ((= l ?A) (car (reftex-get-bib-names "author" entry))) ((= l ?b) (reftex-get-bib-field "booktitle" entry "in: %s")) ((= l ?B) (reftex-abbreviate-title - (reftex-get-bib-field "booktitle" entry "in: %s"))) + (reftex-get-bib-field "booktitle" entry "in: %s"))) ((= l ?c) (reftex-get-bib-field "chapter" entry)) ((= l ?d) (reftex-get-bib-field "edition" entry)) ((= l ?e) (reftex-format-names @@ -939,7 +967,7 @@ While entering the regexp, completion on knows citation keys is possible. ((= l ?r) (reftex-get-bib-field "address" entry)) ((= l ?t) (reftex-get-bib-field "title" entry)) ((= l ?T) (reftex-abbreviate-title - (reftex-get-bib-field "title" entry))) + (reftex-get-bib-field "title" entry))) ((= l ?v) (reftex-get-bib-field "volume" entry)) ((= l ?y) (reftex-get-bib-field "year" entry))))) @@ -956,25 +984,25 @@ While entering the regexp, completion on knows citation keys is possible. (defun reftex-make-cite-echo-string (entry docstruct-symbol) ;; Format a bibtex entry for the echo area and cache the result. (let* ((key (reftex-get-bib-field "&key" entry)) - (string - (let* ((reftex-cite-punctuation '(" " " & " " etal."))) - (reftex-format-citation entry reftex-cite-view-format))) - (cache (assq 'bibview-cache (symbol-value docstruct-symbol))) - (cache-entry (assoc key (cdr cache)))) + (string + (let* ((reftex-cite-punctuation '(" " " & " " etal."))) + (reftex-format-citation entry reftex-cite-view-format))) + (cache (assq 'bibview-cache (symbol-value docstruct-symbol))) + (cache-entry (assoc key (cdr cache)))) (unless cache ;; This docstruct has no cache - make one. (set docstruct-symbol (cons (cons 'bibview-cache nil) - (symbol-value docstruct-symbol)))) + (symbol-value docstruct-symbol)))) (when reftex-cache-cite-echo (setq key (copy-sequence key)) (set-text-properties 0 (length key) nil key) (set-text-properties 0 (length string) nil string) (if cache-entry - (unless (string= (cdr cache-entry) string) - (setcdr cache-entry string) - (put reftex-docstruct-symbol 'modified t)) - (push (cons key string) (cdr cache)) - (put reftex-docstruct-symbol 'modified t))) + (unless (string= (cdr cache-entry) string) + (setcdr cache-entry string) + (put reftex-docstruct-symbol 'modified t)) + (push (cons key string) (cdr cache)) + (put reftex-docstruct-symbol 'modified t))) string)) (defun reftex-bibtex-selection-callback (data ignore no-revisit) @@ -987,32 +1015,33 @@ While entering the regexp, completion on knows citation keys is possible. (catch 'exit (save-excursion - (set-buffer reftex-call-back-to-this-buffer) - (setq bibtype (reftex-bib-or-thebib)) - (cond - ((eq bibtype 'bib) -; ((assq 'bib (symbol-value reftex-docstruct-symbol)) - (setq bibfile-list (reftex-get-bibfile-list))) - ((eq bibtype 'thebib) -; ((assq 'thebib (symbol-value reftex-docstruct-symbol)) - (setq bibfile-list - (reftex-uniquify - (mapcar 'cdr - (reftex-all-assq - 'thebib (symbol-value reftex-docstruct-symbol)))) - item t)) - (reftex-default-bibliography - (setq bibfile-list (reftex-default-bibliography))) - (t (ding) (throw 'exit nil)))) + (set-buffer reftex-call-back-to-this-buffer) + (setq bibtype (reftex-bib-or-thebib)) + (cond + ((eq bibtype 'bib) +; ((assq 'bib (symbol-value reftex-docstruct-symbol)) + (setq bibfile-list (reftex-get-bibfile-list))) + ((eq bibtype 'thebib) +; ((assq 'thebib (symbol-value reftex-docstruct-symbol)) + (setq bibfile-list + (reftex-uniquify + (mapcar 'cdr + (reftex-all-assq + 'thebib (symbol-value reftex-docstruct-symbol)))) + item t)) + (reftex-default-bibliography + (setq bibfile-list (reftex-default-bibliography))) + (t (ding) (throw 'exit nil)))) (when no-revisit - (setq bibfile-list (reftex-visited-files bibfile-list))) + (setq bibfile-list (reftex-visited-files bibfile-list))) (condition-case nil - (reftex-pop-to-bibtex-entry - key bibfile-list (not reftex-keep-temporary-buffers) t item) - (error (ding)))) - + (reftex-pop-to-bibtex-entry + key bibfile-list (not reftex-keep-temporary-buffers) t item) + (error (ding)))) + (select-window win))) +;;; arch-tag: d53d0a5a-ab32-4b52-a846-2a7c3527cd89 ;;; reftex-cite.el ends here diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el index 34fd334987..dc47a5e756 100644 --- a/lisp/textmodes/reftex-dcr.el +++ b/lisp/textmodes/reftex-dcr.el @@ -1,8 +1,8 @@ ;;; reftex-dcr.el --- viewing cross references and citations with RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.18 +;; Version: 4.21 ;; ;; This file is part of GNU Emacs. @@ -52,10 +52,10 @@ to the functions `reftex-view-cr-cite' and `reftex-view-cr-ref'." ;; See where we are. (let* ((macro (car (reftex-what-macro-safe 1))) (key (reftex-this-word "^{}%\n\r, \t")) - dw) + dw) (if (or (null macro) (reftex-in-comment)) - (error "Not on a crossref macro argument")) + (error "Not on a crossref macro argument")) (setq reftex-call-back-to-this-buffer (current-buffer)) @@ -68,42 +68,42 @@ to the functions `reftex-view-cr-cite' and `reftex-view-cr-ref'." (setq dw (reftex-view-cr-ref arg key auto-how))) (auto-how nil) ;; No further action for automatic display (speed) ((or (equal macro "\\label") - (member macro reftex-macros-with-labels)) + (member macro reftex-macros-with-labels)) ;; A label macro: search for reference macros (reftex-access-scan-info arg) (setq dw (reftex-view-regexp-match - (format reftex-find-reference-format (regexp-quote key)) - 4 nil nil))) + (format reftex-find-reference-format (regexp-quote key)) + 4 nil nil))) ((equal macro "\\bibitem") ;; A bibitem macro: search for citations (reftex-access-scan-info arg) (setq dw (reftex-view-regexp-match - (format reftex-find-citation-regexp-format (regexp-quote key)) - 4 nil nil))) + (format reftex-find-citation-regexp-format (regexp-quote key)) + 4 nil nil))) ((member macro reftex-macros-with-index) (reftex-access-scan-info arg) (setq dw (reftex-view-regexp-match - (format reftex-find-index-entry-regexp-format - (regexp-quote key)) - 3 nil nil))) - (t + (format reftex-find-index-entry-regexp-format + (regexp-quote key)) + 3 nil nil))) + (t (reftex-access-scan-info arg) (catch 'exit - (let ((list reftex-view-crossref-extra) - entry mre action group) - (while (setq entry (pop list)) - (setq mre (car entry) - action (nth 1 entry) - group (nth 2 entry)) - (when (string-match mre macro) - (setq dw (reftex-view-regexp-match - (format action key) group nil nil)) - (throw 'exit t)))) - (error "Not on a crossref macro argument")))) + (let ((list reftex-view-crossref-extra) + entry mre action group) + (while (setq entry (pop list)) + (setq mre (car entry) + action (nth 1 entry) + group (nth 2 entry)) + (when (string-match mre macro) + (setq dw (reftex-view-regexp-match + (format action key) group nil nil)) + (throw 'exit t)))) + (error "Not on a crossref macro argument")))) (if (and (eq arg 2) (windowp dw)) (select-window dw)))) - + (defun reftex-view-cr-cite (arg key how) - ;; View crossreference of a ref cite. HOW can have the values + ;; View crossreference of a ref cite. HOW can have the values ;; nil: Show in another window. ;; echo: Show one-line info in echo area. ;; tmp-window: Show in small window and arrange for window to disappear. @@ -113,113 +113,113 @@ to the functions `reftex-view-cr-cite' and `reftex-view-cr-ref'." (if (eq how 'tmp-window) ;; Remember the window configuration - (put 'reftex-auto-view-crossref 'last-window-conf - (current-window-configuration))) + (put 'reftex-auto-view-crossref 'last-window-conf + (current-window-configuration))) (let (files size item (pos (point)) (win (selected-window)) pop-win - (bibtype (reftex-bib-or-thebib))) + (bibtype (reftex-bib-or-thebib))) ;; Find the citation mode and the file list (cond ; ((assq 'bib (symbol-value reftex-docstruct-symbol)) ((eq bibtype 'bib) (setq item nil - files (reftex-get-bibfile-list))) + files (reftex-get-bibfile-list))) ; ((assq 'thebib (symbol-value reftex-docstruct-symbol)) ((eq bibtype 'thebib) (setq item t - files (reftex-uniquify - (mapcar 'cdr - (reftex-all-assq - 'thebib (symbol-value reftex-docstruct-symbol)))))) + files (reftex-uniquify + (mapcar 'cdr + (reftex-all-assq + 'thebib (symbol-value reftex-docstruct-symbol)))))) (reftex-default-bibliography (setq item nil - files (reftex-default-bibliography))) + files (reftex-default-bibliography))) (how) ;; don't throw for special display (t (error "Cannot display crossref"))) (if (eq how 'echo) - ;; Display in Echo area - (reftex-echo-cite key files item) + ;; Display in Echo area + (reftex-echo-cite key files item) ;; Display in a window (if (not (eq how 'tmp-window)) - ;; Normal display - (reftex-pop-to-bibtex-entry key files nil t item) - ;; A temporary window - (condition-case nil - (reftex-pop-to-bibtex-entry key files nil t item) - (error (goto-char pos) - (message "cite: no such citation key %s" key) - (error ""))) - ;; Resize the window - (setq size (max 1 (count-lines (point) - (reftex-end-of-bib-entry item)))) - (let ((window-min-height 2)) - (shrink-window (1- (- (window-height) size))) - (recenter 0)) - ;; Arrange restoration - (add-hook 'pre-command-hook 'reftex-restore-window-conf)) - - ;; Normal display in other window + ;; Normal display + (reftex-pop-to-bibtex-entry key files nil t item) + ;; A temporary window + (condition-case nil + (reftex-pop-to-bibtex-entry key files nil t item) + (error (goto-char pos) + (message "cite: no such citation key %s" key) + (error ""))) + ;; Resize the window + (setq size (max 1 (count-lines (point) + (reftex-end-of-bib-entry item)))) + (let ((window-min-height 2)) + (shrink-window (1- (- (window-height) size))) + (recenter 0)) + ;; Arrange restoration + (add-hook 'pre-command-hook 'reftex-restore-window-conf)) + + ;; Normal display in other window (add-hook 'pre-command-hook 'reftex-highlight-shall-die) (setq pop-win (selected-window)) (select-window win) (goto-char pos) (when (equal arg 2) - (select-window pop-win))))) + (select-window pop-win))))) (defun reftex-view-cr-ref (arg label how) - ;; View crossreference of a ref macro. HOW can have the values + ;; View crossreference of a ref macro. HOW can have the values ;; nil: Show in another window. ;; echo: Show one-line info in echo area. ;; tmp-window: Show in small window and arrange for window to disappear. ;; Ensure access to scanning info (reftex-access-scan-info (or arg current-prefix-arg)) - + (if (eq how 'tmp-window) ;; Remember the window configuration - (put 'reftex-auto-view-crossref 'last-window-conf - (current-window-configuration))) + (put 'reftex-auto-view-crossref 'last-window-conf + (current-window-configuration))) (let* ((xr-data (assoc 'xr (symbol-value reftex-docstruct-symbol))) - (xr-re (nth 2 xr-data)) - (entry (assoc label (symbol-value reftex-docstruct-symbol))) - (win (selected-window)) pop-win (pos (point))) + (xr-re (nth 2 xr-data)) + (entry (assoc label (symbol-value reftex-docstruct-symbol))) + (win (selected-window)) pop-win (pos (point))) (if (and (not entry) (stringp label) xr-re (string-match xr-re label)) - ;; Label is defined in external document - (save-excursion - (save-match-data - (set-buffer - (or (reftex-get-file-buffer-force - (cdr (assoc (match-string 1 label) (nth 1 - xr-data)))) - (error "Problem with external label %s" label)))) - (setq label (substring label (match-end 1))) - (reftex-access-scan-info) - (setq entry - (assoc label (symbol-value reftex-docstruct-symbol))))) + ;; Label is defined in external document + (save-excursion + (save-match-data + (set-buffer + (or (reftex-get-file-buffer-force + (cdr (assoc (match-string 1 label) (nth 1 + xr-data)))) + (error "Problem with external label %s" label)))) + (setq label (substring label (match-end 1))) + (reftex-access-scan-info) + (setq entry + (assoc label (symbol-value reftex-docstruct-symbol))))) (if (eq how 'echo) - ;; Display in echo area - (reftex-echo-ref label entry (symbol-value reftex-docstruct-symbol)) + ;; Display in echo area + (reftex-echo-ref label entry (symbol-value reftex-docstruct-symbol)) (let ((window-conf (current-window-configuration))) - (condition-case nil - (reftex-show-label-location entry t nil t t) - (error (set-window-configuration window-conf) - (message "ref: Label %s not found" label) - (error "ref: Label %s not found" label)))) ;; 2nd is line OK + (condition-case nil + (reftex-show-label-location entry t nil t t) + (error (set-window-configuration window-conf) + (message "ref: Label %s not found" label) + (error "ref: Label %s not found" label)))) ;; 2nd is line OK (add-hook 'pre-command-hook 'reftex-highlight-shall-die) (when (eq how 'tmp-window) - ;; Resize window and arrange restauration - (shrink-window (1- (- (window-height) 9))) - (recenter '(4)) - (add-hook 'pre-command-hook 'reftex-restore-window-conf)) + ;; Resize window and arrange restauration + (shrink-window (1- (- (window-height) 9))) + (recenter '(4)) + (add-hook 'pre-command-hook 'reftex-restore-window-conf)) (setq pop-win (selected-window)) (select-window win) (goto-char pos) (when (equal arg 2) - (select-window pop-win))))) + (select-window pop-win))))) (defun reftex-mouse-view-crossref (ev) "View cross reference of \\ref or \\cite macro where you click. @@ -240,28 +240,28 @@ With argument, actually select the window showing the cross reference." (or (eq reftex-auto-view-crossref 'window) (not (current-message))) ;; Make sure we are not already displaying this one (not (memq last-command '(reftex-view-crossref - reftex-mouse-view-crossref))) + reftex-mouse-view-crossref))) ;; Quick precheck if this might be a relevant spot ;; FIXME: Can fail with backslash in comment - (save-excursion - (search-backward "\\" nil t) - (looking-at "\\\\[a-zA-Z]*\\(cite\\|ref\\|bibentry\\)")) + (save-excursion + (search-backward "\\" nil t) + (looking-at "\\\\[a-zA-Z]*\\(cite\\|ref\\|bibentry\\)")) (condition-case nil - (let ((current-prefix-arg nil)) - (cond - ((eq reftex-auto-view-crossref t) - (reftex-view-crossref -1 'echo)) - ((eq reftex-auto-view-crossref 'window) - (reftex-view-crossref -1 'tmp-window)) - (t nil))) - (error nil)))) + (let ((current-prefix-arg nil)) + (cond + ((eq reftex-auto-view-crossref t) + (reftex-view-crossref -1 'echo)) + ((eq reftex-auto-view-crossref 'window) + (reftex-view-crossref -1 'tmp-window)) + (t nil))) + (error nil)))) (defun reftex-restore-window-conf () (set-window-configuration (get 'reftex-auto-view-crossref 'last-window-conf)) (put 'reftex-auto-view-crossref 'last-window-conf nil) (remove-hook 'pre-command-hook 'reftex-restore-window-conf)) - + (defun reftex-echo-ref (label entry docstruct) ;; Display crossref info in echo area. (cond @@ -274,46 +274,46 @@ With argument, actually select the window showing the cross reference." (message "ref(%s): %s" (nth 1 entry) (nth 2 entry))) (let ((buf (get-buffer " *Echo Area*"))) (when buf - (save-excursion - (set-buffer buf) - (run-hooks 'reftex-display-copied-context-hook))))))) + (save-excursion + (set-buffer buf) + (run-hooks 'reftex-display-copied-context-hook))))))) (defun reftex-echo-cite (key files item) ;; Display citation info in echo area. (let* ((cache (assq 'bibview-cache (symbol-value reftex-docstruct-symbol))) - (cache-entry (assoc key (cdr cache))) - entry string buf (all-files files)) + (cache-entry (assoc key (cdr cache))) + entry string buf (all-files files)) (if (and reftex-cache-cite-echo cache-entry) - ;; We can just use the cache - (setq string (cdr cache-entry)) + ;; We can just use the cache + (setq string (cdr cache-entry)) ;; Need to look in the database (unless reftex-revisit-to-echo - (setq files (reftex-visited-files files))) - - (setq entry - (condition-case nil - (save-excursion - (reftex-pop-to-bibtex-entry key files nil nil item t)) - (error - (if (and files (= (length all-files) (length files))) - (message "cite: no such database entry: %s" key) - (message (substitute-command-keys - (format reftex-no-info-message "cite")))) - nil))) + (setq files (reftex-visited-files files))) + + (setq entry + (condition-case nil + (save-excursion + (reftex-pop-to-bibtex-entry key files nil nil item t)) + (error + (if (and files (= (length all-files) (length files))) + (message "cite: no such database entry: %s" key) + (message (substitute-command-keys + (format reftex-no-info-message "cite")))) + nil))) (when entry - (if item - (setq string (reftex-nicify-text entry)) - (setq string (reftex-make-cite-echo-string - (reftex-parse-bibtex-entry entry) - reftex-docstruct-symbol))))) + (if item + (setq string (reftex-nicify-text entry)) + (setq string (reftex-make-cite-echo-string + (reftex-parse-bibtex-entry entry) + reftex-docstruct-symbol))))) (unless (or (null string) (equal string "")) (message "cite: %s" string)) (when (setq buf (get-buffer " *Echo Area*")) (save-excursion - (set-buffer buf) - (run-hooks 'reftex-display-copied-context-hook))))) + (set-buffer buf) + (run-hooks 'reftex-display-copied-context-hook))))) (defvar reftex-use-itimer-in-xemacs nil "*Non-nil means use the idle timers in XEmacs for crossref display. @@ -326,34 +326,34 @@ will display info in the echo area." (interactive) (if reftex-auto-view-crossref-timer (progn - (if (featurep 'xemacs) - (if reftex-use-itimer-in-xemacs - (delete-itimer reftex-auto-view-crossref-timer) - (remove-hook 'post-command-hook 'reftex-start-itimer-once)) - (cancel-timer reftex-auto-view-crossref-timer)) - (setq reftex-auto-view-crossref-timer nil) - (message "Automatic display of crossref information was turned off")) + (if (featurep 'xemacs) + (if reftex-use-itimer-in-xemacs + (delete-itimer reftex-auto-view-crossref-timer) + (remove-hook 'post-command-hook 'reftex-start-itimer-once)) + (cancel-timer reftex-auto-view-crossref-timer)) + (setq reftex-auto-view-crossref-timer nil) + (message "Automatic display of crossref information was turned off")) (setq reftex-auto-view-crossref-timer - (if (featurep 'xemacs) - (if reftex-use-itimer-in-xemacs - (start-itimer "RefTeX Idle Timer" - 'reftex-view-crossref-when-idle - reftex-idle-time reftex-idle-time t) - (add-hook 'post-command-hook 'reftex-start-itimer-once) - t) - (run-with-idle-timer - reftex-idle-time t 'reftex-view-crossref-when-idle))) + (if (featurep 'xemacs) + (if reftex-use-itimer-in-xemacs + (start-itimer "RefTeX Idle Timer" + 'reftex-view-crossref-when-idle + reftex-idle-time reftex-idle-time t) + (add-hook 'post-command-hook 'reftex-start-itimer-once) + t) + (run-with-idle-timer + reftex-idle-time t 'reftex-view-crossref-when-idle))) (unless reftex-auto-view-crossref (setq reftex-auto-view-crossref t)) (message "Automatic display of crossref information was turned on"))) (defun reftex-start-itimer-once () (and reftex-mode - (not (itimer-live-p reftex-auto-view-crossref-timer)) - (setq reftex-auto-view-crossref-timer - (start-itimer "RefTeX Idle Timer" - 'reftex-view-crossref-when-idle - reftex-idle-time nil t)))) + (not (itimer-live-p reftex-auto-view-crossref-timer)) + (setq reftex-auto-view-crossref-timer + (start-itimer "RefTeX Idle Timer" + 'reftex-view-crossref-when-idle + reftex-idle-time nil t)))) (defun reftex-view-crossref-from-bibtex (&optional arg) "View location in a LaTeX document which cites the BibTeX entry at point. @@ -362,34 +362,34 @@ prompts upon first use for a buffer in RefTeX mode. To reset this link to a document, call the function with with a prefix arg. Calling this function several times find successive citation locations." (interactive "P") - (when arg + (when arg ;; Break connection to reference buffer (put 'reftex-bibtex-view-cite-locations :ref-buffer nil)) (let ((ref-buffer (get 'reftex-bibtex-view-cite-locations :ref-buffer))) ;; Establish connection to reference buffer (unless ref-buffer (setq ref-buffer - (save-excursion - (completing-read - "Reference buffer: " - (delq nil - (mapcar - (lambda (b) - (set-buffer b) - (if reftex-mode (list (buffer-name b)) nil)) - (buffer-list))) - nil t))) + (save-excursion + (completing-read + "Reference buffer: " + (delq nil + (mapcar + (lambda (b) + (set-buffer b) + (if reftex-mode (list (buffer-name b)) nil)) + (buffer-list))) + nil t))) (put 'reftex-bibtex-view-cite-locations :ref-buffer ref-buffer)) ;; Search for citations (bibtex-beginning-of-entry) (if (looking-at - "@[a-zA-Z]+[ \t\n\r]*[{(][ \t\n\r]*\\([^, \t\r\n}]+\\)") - (progn - (goto-char (match-beginning 1)) - (reftex-view-regexp-match - (format reftex-find-citation-regexp-format - (regexp-quote (match-string 1))) - 4 arg ref-buffer)) + "@[a-zA-Z]+[ \t\n\r]*[{(][ \t\n\r]*\\([^, \t\r\n}]+\\)") + (progn + (goto-char (match-beginning 1)) + (reftex-view-regexp-match + (format reftex-find-citation-regexp-format + (regexp-quote (match-string 1))) + 4 arg ref-buffer)) (error "Cannot find citation key in BibTeX entry")))) (defun reftex-view-regexp-match (re &optional highlight-group new ref-buffer) @@ -402,39 +402,39 @@ Calling this function several times find successive citation locations." ;;; Decide if new search or continued search (let* ((oldprop (get 'reftex-view-regexp-match :props)) - (newprop (list (current-buffer) re)) - (cont (and (not new) (equal oldprop newprop))) - (cnt (if cont (get 'reftex-view-regexp-match :cnt) 0)) - (current-window (selected-window)) - (window-conf (current-window-configuration)) - match pop-window) + (newprop (list (current-buffer) re)) + (cont (and (not new) (equal oldprop newprop))) + (cnt (if cont (get 'reftex-view-regexp-match :cnt) 0)) + (current-window (selected-window)) + (window-conf (current-window-configuration)) + match pop-window) (switch-to-buffer-other-window (or ref-buffer (current-buffer))) ;; Search (condition-case nil - (if cont - (setq match (reftex-global-search-continue)) - (reftex-access-scan-info) - (setq match (reftex-global-search re (reftex-all-document-files)))) + (if cont + (setq match (reftex-global-search-continue)) + (reftex-access-scan-info) + (setq match (reftex-global-search re (reftex-all-document-files)))) (error nil)) ;; Evaluate the match. (if match - (progn - (put 'reftex-view-regexp-match :props newprop) - (put 'reftex-view-regexp-match :cnt (incf cnt)) - (reftex-highlight 0 (match-beginning highlight-group) - (match-end highlight-group)) - (add-hook 'pre-command-hook 'reftex-highlight-shall-die) - (setq pop-window (selected-window))) + (progn + (put 'reftex-view-regexp-match :props newprop) + (put 'reftex-view-regexp-match :cnt (incf cnt)) + (reftex-highlight 0 (match-beginning highlight-group) + (match-end highlight-group)) + (add-hook 'pre-command-hook 'reftex-highlight-shall-die) + (setq pop-window (selected-window))) (put 'reftex-view-regexp-match :props nil) (or cont (set-window-configuration window-conf))) (select-window current-window) (if match - (progn - (message "Match Nr. %s" cnt) - pop-window) + (progn + (message "Match Nr. %s" cnt) + pop-window) (if cont - (error "No further matches (total number of matches: %d)" cnt) - (error "No matches"))))) + (error "No further matches (total number of matches: %d)" cnt) + (error "No matches"))))) (defvar reftex-global-search-marker (make-marker)) (defun reftex-global-search (regexp file-list) @@ -449,11 +449,11 @@ Calling this function several times find successive citation locations." (unless (get 'reftex-global-search :file-list) (error "No global search to continue")) (let* ((file-list (get 'reftex-global-search :file-list)) - (regexp (get 'reftex-global-search :regexp)) - (buf (or (marker-buffer reftex-global-search-marker) - (reftex-get-file-buffer-force (car file-list)))) - (pos (or (marker-position reftex-global-search-marker) 1)) - file) + (regexp (get 'reftex-global-search :regexp)) + (buf (or (marker-buffer reftex-global-search-marker) + (reftex-get-file-buffer-force (car file-list)))) + (pos (or (marker-position reftex-global-search-marker) 1)) + file) ;; Take up starting position (unless buf (error "No such buffer %s" buf)) (switch-to-buffer buf) @@ -461,22 +461,23 @@ Calling this function several times find successive citation locations." (goto-char pos) ;; Search and switch file if necessary (if (catch 'exit - (while t - (when (re-search-forward regexp nil t) - (move-marker reftex-global-search-marker (point)) - (throw 'exit t)) - ;; No match - goto next file - (pop file-list) - (or file-list (throw 'exit nil)) - (setq file (car file-list) - buf (reftex-get-file-buffer-force file)) - (unless buf (error "Cannot access file %s" file)) - (put 'reftex-global-search :file-list file-list) - (switch-to-buffer buf) - (widen) - (goto-char 1))) - t + (while t + (when (re-search-forward regexp nil t) + (move-marker reftex-global-search-marker (point)) + (throw 'exit t)) + ;; No match - goto next file + (pop file-list) + (or file-list (throw 'exit nil)) + (setq file (car file-list) + buf (reftex-get-file-buffer-force file)) + (unless buf (error "Cannot access file %s" file)) + (put 'reftex-global-search :file-list file-list) + (switch-to-buffer buf) + (widen) + (goto-char 1))) + t (move-marker reftex-global-search-marker nil) (error "All files processed")))) +;;; arch-tag: d2f52b56-744e-44ad-830d-1fc193b90eda ;;; reftex-dcr.el ends here diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index 36cecd12c1..84b4c7c67f 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el @@ -1,8 +1,8 @@ ;;; reftex-global.el --- operations on entire documents with RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.18 +;; Version: 4.21 ;; This file is part of GNU Emacs. @@ -107,26 +107,26 @@ No active TAGS table is required." (reftex-access-scan-info t) (let ((master (reftex-TeX-master-file)) - (cnt 0) + (cnt 0) (dlist (mapcar - (lambda (x) - (let (x1) - (cond - ((memq (car x) - '(toc bof eof bib thebib label-numbers xr xr-doc - master-dir file-error bibview-cache appendix - is-multi index)) - nil) - (t - (setq x1 (reftex-all-assoc-string - (car x) (symbol-value reftex-docstruct-symbol))) - (if (< 1 (length x1)) - (append (list (car x)) - (mapcar (lambda(x) - (abbreviate-file-name (nth 3 x))) - x1)) - (list nil)))))) + (lambda (x) + (let (x1) + (cond + ((memq (car x) + '(toc bof eof bib thebib label-numbers xr xr-doc + master-dir file-error bibview-cache appendix + is-multi index)) + nil) + (t + (setq x1 (reftex-all-assoc-string + (car x) (symbol-value reftex-docstruct-symbol))) + (if (< 1 (length x1)) + (append (list (car x)) + (mapcar (lambda(x) + (abbreviate-file-name (nth 3 x))) + x1)) + (list nil)))))) (reftex-uniquify-by-car (symbol-value reftex-docstruct-symbol))))) (setq dlist (reftex-uniquify-by-car dlist)) @@ -135,19 +135,19 @@ No active TAGS table is required." (set (make-local-variable 'TeX-master) master) (erase-buffer) (insert " MULTIPLE LABELS IN CURRENT DOCUMENT:\n") - (insert + (insert " Move point to label and type `r' to run a query-replace on the label\n" " and its references. Type `q' to exit this buffer.\n\n") (insert " LABEL FILE\n") (insert " -------------------------------------------------------------\n") (use-local-map (make-sparse-keymap)) (local-set-key [?q] (lambda () "Kill this buffer." (interactive) - (kill-buffer (current-buffer)) (delete-window))) + (kill-buffer (current-buffer)) (delete-window))) (local-set-key [?r] 'reftex-change-label) (while dlist (when (and (car (car dlist)) (cdr (car dlist))) - (incf cnt) + (incf cnt) (insert (mapconcat 'identity (car dlist) "\n ") "\n")) (pop dlist)) (goto-char (point-min)) @@ -157,7 +157,7 @@ No active TAGS table is required." (message "Document does not contain duplicate labels.")))) (defun reftex-change-label (&optional from to) - "Run `query-replace-regexp' of FROM with TO in all \\label and \\ref commands. + "Run `query-replace-regexp' of FROM with TO in all macro arguments. Works on the entire multifile document. If you exit (\\[keyboard-quit], RET or q), you can resume the query replace with the command \\[tags-loop-continue]. @@ -172,8 +172,8 @@ No active TAGS table is required." (setq to (read-string (format "Replace label %s with: " from)))) (reftex-query-replace-document - (concat "\\\\\\(label\\|[a-zA-Z]*ref\\){" (regexp-quote from) "}") - (format "\\\\\\1{%s}" to)))) + (concat "{" (regexp-quote from) "}") + (format "{%s}" to)))) (defun reftex-renumber-simple-labels () "Renumber all simple labels in the document to make them sequentially. @@ -190,33 +190,33 @@ one with the `xr' package." (reftex-access-scan-info 1) ;; Get some insurance (if (and (reftex-is-multi) - (not (yes-or-no-p "Replacing all simple labels in multiple files is risky. Continue? "))) + (not (yes-or-no-p "Replacing all simple labels in multiple files is risky. Continue? "))) (error "Abort")) ;; Make the translation list - (let* ((re-core (concat "\\(" - (mapconcat 'cdr reftex-typekey-to-prefix-alist "\\|") - "\\)")) - (label-re (concat "\\`" re-core "\\([0-9]+\\)\\'")) - (search-re (concat "[{,]\\(" re-core "\\([0-9]+\\)\\)[,}]")) - (error-fmt "Undefined label or reference %s. Ignore and continue? ") - (label-numbers-alist (mapcar (lambda (x) (cons (cdr x) 0)) - reftex-typekey-to-prefix-alist)) - (files (reftex-all-document-files)) - (list (symbol-value reftex-docstruct-symbol)) - translate-alist n entry label new-label nr-cell changed-sequence) + (let* ((re-core (concat "\\(" + (mapconcat 'cdr reftex-typekey-to-prefix-alist "\\|") + "\\)")) + (label-re (concat "\\`" re-core "\\([0-9]+\\)\\'")) + (search-re (concat "[{,]\\(" re-core "\\([0-9]+\\)\\)[,}]")) + (error-fmt "Undefined label or reference %s. Ignore and continue? ") + (label-numbers-alist (mapcar (lambda (x) (cons (cdr x) 0)) + reftex-typekey-to-prefix-alist)) + (files (reftex-all-document-files)) + (list (symbol-value reftex-docstruct-symbol)) + translate-alist n entry label new-label nr-cell changed-sequence) (while (setq entry (pop list)) (when (and (stringp (car entry)) - (string-match label-re (car entry))) - (setq label (car entry) - nr-cell (assoc (match-string 1 (car entry)) - label-numbers-alist)) - (if (assoc label translate-alist) - (error "Duplicate label %s" label)) - (setq new-label (concat (match-string 1 (car entry)) - (int-to-string (incf (cdr nr-cell))))) - (push (cons label new-label) translate-alist) - (or (string= label new-label) (setq changed-sequence t)))) + (string-match label-re (car entry))) + (setq label (car entry) + nr-cell (assoc (match-string 1 (car entry)) + label-numbers-alist)) + (if (assoc label translate-alist) + (error "Duplicate label %s" label)) + (setq new-label (concat (match-string 1 (car entry)) + (int-to-string (incf (cdr nr-cell))))) + (push (cons label new-label) translate-alist) + (or (string= label new-label) (setq changed-sequence t)))) (unless changed-sequence (error "Simple labels are already in correct sequence")) @@ -227,79 +227,79 @@ one with the `xr' package." (reftex-save-all-document-buffers) ;; First test to check for erros - (setq n (reftex-translate - files search-re translate-alist error-fmt 'test)) + (setq n (reftex-translate + files search-re translate-alist error-fmt 'test)) ;; Now the real thing. - (if (yes-or-no-p - (format "Replace %d items at %d places in %d files? " - (length translate-alist) n (length files))) - (progn - (let ((inhibit-quit t)) ;; Do not disturb... - (reftex-translate - files search-re translate-alist error-fmt nil) - (setq quit-flag nil)) - (if (and (reftex-is-multi) - (yes-or-no-p "Save entire document? ")) - (reftex-save-all-document-buffers)) - ;; Rescan again... - (reftex-access-scan-info 1) - (message "Done replacing simple labels.")) + (if (yes-or-no-p + (format "Replace %d items at %d places in %d files? " + (length translate-alist) n (length files))) + (progn + (let ((inhibit-quit t)) ;; Do not disturb... + (reftex-translate + files search-re translate-alist error-fmt nil) + (setq quit-flag nil)) + (if (and (reftex-is-multi) + (yes-or-no-p "Save entire document? ")) + (reftex-save-all-document-buffers)) + ;; Rescan again... + (reftex-access-scan-info 1) + (message "Done replacing simple labels.")) (message "No replacements done")))) (defun reftex-translate (files search-re translate-alist error-fmt test) ;; In FILES, look for SEARCH-RE and replace match 1 of it with - ;; its association in TRANSLATE-ALSIT. + ;; its association in TRANSLATE-ALSIT. ;; If we do not find an association and TEST is non-nil, query - ;; to ignore the problematic string. + ;; to ignore the problematic string. ;; If TEST is nil, it is ignored without query. ;; Return the number of replacements. (let ((n 0) file label match-data buf macro pos cell) (while (setq file (pop files)) (setq buf (reftex-get-file-buffer-force file)) (unless buf - (error "No such file %s" file)) + (error "No such file %s" file)) (set-buffer buf) (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (while (re-search-forward search-re nil t) - (backward-char) - (save-excursion - (setq label (reftex-match-string 1) - cell (assoc label translate-alist) - match-data (match-data) - macro (reftex-what-macro 1) - pos (cdr macro)) - (goto-char (or pos (point))) - (when (and macro - (or (looking-at "\\\\ref") - (looking-at "\\\\[a-zA-Z]*ref\\(range\\)?[^a-zA-Z]") - (looking-at "\\\\ref[a-zA-Z]*[^a-zA-Z]") - (looking-at (format - reftex-find-label-regexp-format - (regexp-quote label))))) - ;; OK, we should replace it. - (set-match-data match-data) - (cond - ((and test (not cell)) - ;; We've got a problem - (unwind-protect - (progn - (reftex-highlight 1 (match-beginning 0) (match-end 0)) - (ding) - (or (y-or-n-p (format error-fmt label)) - (error "Abort"))) - (reftex-unhighlight 1))) - ((and test cell) - (incf n)) - ((and (not test) cell) - ;; Replace - (goto-char (match-beginning 1)) - (delete-region (match-beginning 1) (match-end 1)) - (insert (cdr cell))) - (t nil)))))))) + (save-restriction + (widen) + (goto-char (point-min)) + (while (re-search-forward search-re nil t) + (backward-char) + (save-excursion + (setq label (reftex-match-string 1) + cell (assoc label translate-alist) + match-data (match-data) + macro (reftex-what-macro 1) + pos (cdr macro)) + (goto-char (or pos (point))) + (when (and macro + (or (looking-at "\\\\ref") + (looking-at "\\\\[a-zA-Z]*ref\\(range\\)?[^a-zA-Z]") + (looking-at "\\\\ref[a-zA-Z]*[^a-zA-Z]") + (looking-at (format + reftex-find-label-regexp-format + (regexp-quote label))))) + ;; OK, we should replace it. + (set-match-data match-data) + (cond + ((and test (not cell)) + ;; We've got a problem + (unwind-protect + (progn + (reftex-highlight 1 (match-beginning 0) (match-end 0)) + (ding) + (or (y-or-n-p (format error-fmt label)) + (error "Abort"))) + (reftex-unhighlight 1))) + ((and test cell) + (incf n)) + ((and (not test) cell) + ;; Replace + (goto-char (match-beginning 1)) + (delete-region (match-beginning 1) (match-end 1)) + (insert (cdr cell))) + (t nil)))))))) n)) (defun reftex-save-all-document-buffers () @@ -308,13 +308,13 @@ The function is useful after a global action like replacing or renumbering labels." (interactive) (let ((files (reftex-all-document-files)) - file buffer) + file buffer) (save-excursion (while (setq file (pop files)) - (setq buffer (reftex-get-buffer-visiting file)) - (when buffer - (set-buffer buffer) - (save-buffer)))))) + (setq buffer (reftex-get-buffer-visiting file)) + (when buffer + (set-buffer buffer) + (save-buffer)))))) (defun reftex-ensure-write-access (files) "Make sure we have write access to all files in FILES. @@ -322,20 +322,21 @@ Also checks if buffers visiting the files are in read-only mode." (let (file buf) (while (setq file (pop files)) (unless (file-exists-p file) - (ding) - (or (y-or-n-p (format "No such file %s. Continue? " file)) - (error "Abort"))) + (ding) + (or (y-or-n-p (format "No such file %s. Continue? " file)) + (error "Abort"))) (unless (file-writable-p file) - (ding) - (or (y-or-n-p (format "No write access to %s. Continue? " file)) - (error "Abort"))) + (ding) + (or (y-or-n-p (format "No write access to %s. Continue? " file)) + (error "Abort"))) (when (and (setq buf (reftex-get-buffer-visiting file)) - (save-excursion - (set-buffer buf) - buffer-read-only)) - (ding) - (or (y-or-n-p (format "Buffer %s is read-only. Continue? " - (buffer-name buf))) - (error "Abort")))))) - + (save-excursion + (set-buffer buf) + buffer-read-only)) + (ding) + (or (y-or-n-p (format "Buffer %s is read-only. Continue? " + (buffer-name buf))) + (error "Abort")))))) + +;;; arch-tag: 2dbf7633-92c8-4340-8656-7aa019d0f80d ;;; reftex-global.el ends here diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el index a1dd605464..71b3b62477 100644 --- a/lisp/textmodes/reftex-index.el +++ b/lisp/textmodes/reftex-index.el @@ -1,8 +1,8 @@ ;;; reftex-index.el --- index support with RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.18 +;; Version: 4.21 ;; This file is part of GNU Emacs. @@ -47,48 +47,48 @@ which is part of AUCTeX, the string is first processed with the `reftex-index-math-format', which see." (interactive "P") (let* ((use-default (not (equal arg '(16)))) ; check for double prefix - ;; check if we have an active selection - (active (if (boundp 'zmacs-regions) - (and zmacs-regions (region-exists-p)) ; XEmacs - (and transient-mark-mode mark-active))) ; Emacs - (beg (if active - (region-beginning) - (save-excursion - (skip-syntax-backward "w\\") (point)))) - (end (if active - (region-end) - (save-excursion - (skip-syntax-forward "w\\") (point)))) - (sel (buffer-substring beg end)) - (mathp (condition-case nil (texmathp) (error nil))) - (current-prefix-arg nil) ; we want to call reftex-index without prefix. - key def-char def-tag full-entry) + ;; check if we have an active selection + (active (if (boundp 'zmacs-regions) + (and zmacs-regions (region-exists-p)) ; XEmacs + (and transient-mark-mode mark-active))) ; Emacs + (beg (if active + (region-beginning) + (save-excursion + (skip-syntax-backward "w\\") (point)))) + (end (if active + (region-end) + (save-excursion + (skip-syntax-forward "w\\") (point)))) + (sel (buffer-substring beg end)) + (mathp (condition-case nil (texmathp) (error nil))) + (current-prefix-arg nil) ; we want to call reftex-index without prefix. + key def-char def-tag full-entry) (if phrase - (progn - (reftex-index-visit-phrases-buffer) - (reftex-index-new-phrase sel)) + (progn + (reftex-index-visit-phrases-buffer) + (reftex-index-new-phrase sel)) (if (equal sel "") - ;; Nothing selected, no word, so use full reftex-index command - (reftex-index) - ;; OK, we have something to index here. - ;; Add the dollars when necessary - (setq key (if mathp - (format reftex-index-math-format sel) - sel)) - ;; Get info from `reftex-index-default-macro' - (setq def-char (if use-default (car reftex-index-default-macro))) - (setq def-tag (if use-default (nth 1 reftex-index-default-macro))) - ;; Does the user want to edit the entry? - (setq full-entry (if arg - (reftex-index-complete-key - def-tag nil (cons key 0)) - key)) - ;; Delete what is in the buffer and make the index entry - (delete-region beg end) - (reftex-index def-char full-entry def-tag sel))))) - + ;; Nothing selected, no word, so use full reftex-index command + (reftex-index) + ;; OK, we have something to index here. + ;; Add the dollars when necessary + (setq key (if mathp + (format reftex-index-math-format sel) + sel)) + ;; Get info from `reftex-index-default-macro' + (setq def-char (if use-default (car reftex-index-default-macro))) + (setq def-tag (if use-default (nth 1 reftex-index-default-macro))) + ;; Does the user want to edit the entry? + (setq full-entry (if arg + (reftex-index-complete-key + def-tag nil (cons key 0)) + key)) + ;; Delete what is in the buffer and make the index entry + (delete-region beg end) + (reftex-index def-char full-entry def-tag sel))))) + (defun reftex-index (&optional char key tag sel no-insert) "Query for an index macro and insert it along with its argments. The index macros available are those defined in `reftex-index-macro' or @@ -104,58 +104,58 @@ will prompt for other arguments." ;; Find out which macro we are going to use (let* ((char (or char - (reftex-select-with-char reftex-query-index-macro-prompt - reftex-query-index-macro-help))) - (macro (nth 1 (assoc char reftex-key-to-index-macro-alist))) - (entry (or (assoc macro reftex-index-macro-alist) - (error "No index macro associated with %c" char))) - (ntag (nth 1 entry)) - (tag (or tag (nth 1 entry))) - (nargs (nth 4 entry)) - (nindex (nth 5 entry)) - (opt-args (nth 6 entry)) - (repeat (nth 7 entry)) - opt tag1 value) + (reftex-select-with-char reftex-query-index-macro-prompt + reftex-query-index-macro-help))) + (macro (nth 1 (assoc char reftex-key-to-index-macro-alist))) + (entry (or (assoc macro reftex-index-macro-alist) + (error "No index macro associated with %c" char))) + (ntag (nth 1 entry)) + (tag (or tag (nth 1 entry))) + (nargs (nth 4 entry)) + (nindex (nth 5 entry)) + (opt-args (nth 6 entry)) + (repeat (nth 7 entry)) + opt tag1 value) ;; Get the supported arguments (if (stringp tag) - (setq tag1 tag) + (setq tag1 tag) (setq tag1 (or (reftex-index-complete-tag tag opt-args) ""))) (setq key (or key - (reftex-index-complete-key - (if (string= tag1 "") "idx" tag1) - (member nindex opt-args)))) + (reftex-index-complete-key + (if (string= tag1 "") "idx" tag1) + (member nindex opt-args)))) ;; Insert the macro and ask for any additional args (insert macro) (loop for i from 1 to nargs do (setq opt (member i opt-args) - value (cond ((= nindex i) key) - ((equal ntag i) tag1) - (t (read-string (concat "Macro arg nr. " - (int-to-string i) - (if opt " (optional)" "") - ": "))))) + value (cond ((= nindex i) key) + ((equal ntag i) tag1) + (t (read-string (concat "Macro arg nr. " + (int-to-string i) + (if opt " (optional)" "") + ": "))))) (unless (and opt (string= value "")) - (insert (if opt "[" "{") value (if opt "]" "}")))) + (insert (if opt "[" "{") value (if opt "]" "}")))) (and repeat (stringp sel) (insert sel)) (and key reftex-plug-into-AUCTeX (fboundp 'LaTeX-add-index-entries) - (LaTeX-add-index-entries key)) + (LaTeX-add-index-entries key)) (reftex-index-update-taglist tag1) (reftex-notice-new))) (defun reftex-default-index () (cond ((null reftex-index-default-tag) nil) - ((stringp reftex-index-default-tag) reftex-index-default-tag) - (t (or (get reftex-docstruct-symbol 'default-index-tag) - "idx")))) + ((stringp reftex-index-default-tag) reftex-index-default-tag) + (t (or (get reftex-docstruct-symbol 'default-index-tag) + "idx")))) (defun reftex-update-default-index (tag &optional tag-list) (if (and (not (equal tag "")) - (stringp tag) - (eq reftex-index-default-tag 'last) - (or (null tag-list) - (member tag tag-list))) + (stringp tag) + (eq reftex-index-default-tag 'last) + (or (null tag-list) + (member tag tag-list))) (put reftex-docstruct-symbol 'default-index-tag tag))) (defun reftex-index-complete-tag (&optional itag opt-args) @@ -164,13 +164,13 @@ will prompt for other arguments." ;; OPT-ARGS is a list of optional argument indices, as given by ;; `reftex-parse-args'. (let* ((opt (and (integerp itag) (member itag opt-args))) - (index-tags (cdr (assq 'index-tags - (symbol-value reftex-docstruct-symbol)))) - (default (reftex-default-index)) - (prompt (concat "Index tag" - (if default (format " (default: %s)" default) "") - (if opt " (optional)" "") ": ")) - (tag (completing-read prompt (mapcar 'list index-tags)))) + (index-tags (cdr (assq 'index-tags + (symbol-value reftex-docstruct-symbol)))) + (default (reftex-default-index)) + (prompt (concat "Index tag" + (if default (format " (default: %s)" default) "") + (if opt " (optional)" "") ": ")) + (tag (completing-read prompt (mapcar 'list index-tags)))) (if (and default (equal tag "")) (setq tag default)) (reftex-update-default-index tag) tag)) @@ -178,70 +178,70 @@ will prompt for other arguments." (defun reftex-index-select-tag () ;; Have the user select an index tag. ;; FIXME: should we cache tag-alist, prompt and help? - (let* ((index-tags (cdr (assoc 'index-tags - (symbol-value reftex-docstruct-symbol)))) - (default (reftex-default-index))) - (cond + (let* ((index-tags (cdr (assoc 'index-tags + (symbol-value reftex-docstruct-symbol)))) + (default (reftex-default-index))) + (cond ((null index-tags) (error "No index tags available")) ((= (length index-tags) 1) ;; Just one index, use it (car index-tags)) - + ((> (length index-tags) 1) ;; Several indices, ask. (let* ((tags (copy-sequence index-tags)) - (cnt 0) - tag-alist i val len tag prompt help rpl) - ;; Move idx and glo up in the list to ensure ?i and ?g shortcuts - (if (member "glo" tags) - (setq tags (cons "glo" (delete "glo" tags)))) - (if (member "idx" tags) - (setq tags (cons "idx" (delete "idx" tags)))) - ;; Find unique shortcuts for each index. - (while (setq tag (pop tags)) - (setq len (length tag) - i -1 - val nil) - (catch 'exit - (while (and (< (incf i) len) (null val)) - (unless (assq (aref tag i) tag-alist) - (push (list (aref tag i) - tag - (concat (substring tag 0 i) - "[" (substring tag i (incf i)) "]" - (substring tag i))) - tag-alist) - (throw 'exit t))) - (push (list (+ ?0 (incf cnt)) tag - (concat "[" (int-to-string cnt) "]:" tag)) - tag-alist))) - (setq tag-alist (nreverse tag-alist)) - ;; Compute Prompt and Help strings - (setq prompt - (concat - (format "Select Index%s: " - (if default (format " (Default <%s>)" default) "")) - (mapconcat (lambda(x) (nth 2 x)) tag-alist " "))) - (setq help - (concat "Select an Index\n===============\n" - (if default - (format "[^M] %s (the default)\n" default) - "") - (mapconcat (lambda(x) - (apply 'format "[%c] %s" x)) - tag-alist "\n"))) - ;; Query the user for an index-tag - (setq rpl (reftex-select-with-char prompt help 3 t)) - (message "") - (if (and default (equal rpl ?\C-m)) - default - (if (assq rpl tag-alist) - (progn - (reftex-update-default-index (nth 1 (assq rpl tag-alist))) - (nth 1 (assq rpl tag-alist))) - (error "No index tag associated with %c" rpl))))) + (cnt 0) + tag-alist i val len tag prompt help rpl) + ;; Move idx and glo up in the list to ensure ?i and ?g shortcuts + (if (member "glo" tags) + (setq tags (cons "glo" (delete "glo" tags)))) + (if (member "idx" tags) + (setq tags (cons "idx" (delete "idx" tags)))) + ;; Find unique shortcuts for each index. + (while (setq tag (pop tags)) + (setq len (length tag) + i -1 + val nil) + (catch 'exit + (while (and (< (incf i) len) (null val)) + (unless (assq (aref tag i) tag-alist) + (push (list (aref tag i) + tag + (concat (substring tag 0 i) + "[" (substring tag i (incf i)) "]" + (substring tag i))) + tag-alist) + (throw 'exit t))) + (push (list (+ ?0 (incf cnt)) tag + (concat "[" (int-to-string cnt) "]:" tag)) + tag-alist))) + (setq tag-alist (nreverse tag-alist)) + ;; Compute Prompt and Help strings + (setq prompt + (concat + (format "Select Index%s: " + (if default (format " (Default <%s>)" default) "")) + (mapconcat (lambda(x) (nth 2 x)) tag-alist " "))) + (setq help + (concat "Select an Index\n===============\n" + (if default + (format "[^M] %s (the default)\n" default) + "") + (mapconcat (lambda(x) + (apply 'format "[%c] %s" x)) + tag-alist "\n"))) + ;; Query the user for an index-tag + (setq rpl (reftex-select-with-char prompt help 3 t)) + (message "") + (if (and default (equal rpl ?\C-m)) + default + (if (assq rpl tag-alist) + (progn + (reftex-update-default-index (nth 1 (assq rpl tag-alist))) + (nth 1 (assq rpl tag-alist))) + (error "No index tag associated with %c" rpl))))) (t (error "This should not happen (reftex-index-select-tag)"))))) (defun reftex-index-complete-key (&optional tag optional initial) @@ -249,19 +249,19 @@ will prompt for other arguments." ;; Restrict completion table on index tag TAG. ;; OPTIONAL indicates if the arg is optional. (let* ((table (reftex-sublist-nth - (symbol-value reftex-docstruct-symbol) 6 - (lambda(x) (and (eq (car x) 'index) - (string= (nth 1 x) (or tag "")))) - t)) - (prompt (concat "Index key" (if optional " (optional)" "") ": ")) - (key (completing-read prompt table nil nil initial))) + (symbol-value reftex-docstruct-symbol) 6 + (lambda(x) (and (eq (car x) 'index) + (string= (nth 1 x) (or tag "")))) + t)) + (prompt (concat "Index key" (if optional " (optional)" "") ": ")) + (key (completing-read prompt table nil nil initial))) key)) (defun reftex-index-update-taglist (newtag) - ;; add NEWTAG to the list of available index tags. + ;; add NEWTAG to the list of available index tags. (let ((cell (assoc 'index-tags (symbol-value reftex-docstruct-symbol)))) (and newtag (cdr cell) (not (member newtag (cdr cell))) - (push newtag (cdr cell))))) + (push newtag (cdr cell))))) (defvar reftex-index-map (make-sparse-keymap) "Keymap used for *Index* buffers.") @@ -290,16 +290,16 @@ Here are all local bindings. (interactive) (kill-all-local-variables) (setq major-mode 'reftex-index-mode - mode-name "RefTeX Index") + mode-name "RefTeX Index") (use-local-map reftex-index-map) (set (make-local-variable 'revert-buffer-function) 'reftex-index-revert) (set (make-local-variable 'reftex-index-restriction-data) nil) (set (make-local-variable 'reftex-index-restriction-indicator) nil) (setq mode-line-format - (list "---- " 'mode-line-buffer-identification - " " 'global-mode-string - " R<" 'reftex-index-restriction-indicator ">" - " -%-")) + (list "---- " 'mode-line-buffer-identification + " " 'global-mode-string + " R<" 'reftex-index-restriction-indicator ">" + " -%-")) (setq truncate-lines t) (when (featurep 'xemacs) ;; XEmacs needs the call to make-local-hook @@ -339,21 +339,21 @@ _ ^ Add/Remove parent key (to make this item a subitem). ;; Note: This function just looks for the nearest match of the ;; context string and may fail if the entry moved and an identical ;; entry is close to the old position. Frequent rescans make this - ;; safer. + ;; safer. (let* ((file (nth 3 data)) - (literal (nth 2 data)) - (pos (nth 4 data)) - (re (regexp-quote literal)) - (match - (cond - ((or (not no-revisit) - (reftex-get-buffer-visiting file)) - (switch-to-buffer-other-window - (reftex-get-file-buffer-force file nil)) - (goto-char (or pos (point-min))) - (or (looking-at re) - (reftex-nearest-match re (length literal)))) - (t (message reftex-no-follow-message) nil)))) + (literal (nth 2 data)) + (pos (nth 4 data)) + (re (regexp-quote literal)) + (match + (cond + ((or (not no-revisit) + (reftex-get-buffer-visiting file)) + (switch-to-buffer-other-window + (reftex-get-file-buffer-force file nil)) + (goto-char (or pos (point-min))) + (or (looking-at re) + (reftex-nearest-match re (length literal)))) + (t (message reftex-no-follow-message) nil)))) (when match (goto-char (match-beginning 0)) (recenter '(4)) @@ -361,7 +361,7 @@ _ ^ Add/Remove parent key (to make this item a subitem). match)) (defun reftex-display-index (&optional tag overriding-restriction - &rest locations) + &rest locations) "Display a buffer with an index compiled from the current document. When the document has multiple indices, first prompts for the correct one. When index support is turned off, offer to turn it on. @@ -381,40 +381,40 @@ With prefix 3, restrict index to region." ;; Determine the correct index to process (let* ((docstruct (symbol-value reftex-docstruct-symbol)) - (docstruct-symbol reftex-docstruct-symbol) - (index-tag (or tag (reftex-index-select-tag))) - (master (reftex-TeX-master-file)) - (calling-file (buffer-file-name)) - (restriction - (or overriding-restriction - (and (interactive-p) - (reftex-get-restriction current-prefix-arg docstruct)))) - (locations - ;; See if we are on an index macro as initial position - (or locations - (let* ((what-macro (reftex-what-macro-safe 1)) - (macro (car what-macro)) - (here-I-am (when (member macro reftex-macros-with-index) - (save-excursion - (goto-char (+ (cdr what-macro) - (length macro))) - (reftex-move-over-touching-args) - (reftex-where-am-I))))) - (if (eq (car (car here-I-am)) 'index) - (list (car here-I-am)))))) - buffer-name) + (docstruct-symbol reftex-docstruct-symbol) + (index-tag (or tag (reftex-index-select-tag))) + (master (reftex-TeX-master-file)) + (calling-file (buffer-file-name)) + (restriction + (or overriding-restriction + (and (interactive-p) + (reftex-get-restriction current-prefix-arg docstruct)))) + (locations + ;; See if we are on an index macro as initial position + (or locations + (let* ((what-macro (reftex-what-macro-safe 1)) + (macro (car what-macro)) + (here-I-am (when (member macro reftex-macros-with-index) + (save-excursion + (goto-char (+ (cdr what-macro) + (length macro))) + (reftex-move-over-touching-args) + (reftex-where-am-I))))) + (if (eq (car (car here-I-am)) 'index) + (list (car here-I-am)))))) + buffer-name) (setq buffer-name (reftex-make-index-buffer-name index-tag)) ;; Goto the buffer and put it into the correct mode - + (when (or restriction current-prefix-arg) - (reftex-kill-buffer buffer-name)) + (reftex-kill-buffer buffer-name)) (if (get-buffer-window buffer-name) - (select-window (get-buffer-window buffer-name)) + (select-window (get-buffer-window buffer-name)) (let ((default-major-mode 'reftex-index-mode)) - (switch-to-buffer buffer-name))) + (switch-to-buffer buffer-name))) (or (eq major-mode 'reftex-index-mode) (reftex-index-mode)) @@ -425,11 +425,11 @@ With prefix 3, restrict index to region." (set (make-local-variable 'reftex-index-tag) index-tag) (set (make-local-variable 'reftex-docstruct-symbol) docstruct-symbol) (if restriction - (setq reftex-index-restriction-indicator (car restriction) - reftex-index-restriction-data (cdr restriction)) + (setq reftex-index-restriction-indicator (car restriction) + reftex-index-restriction-data (cdr restriction)) (if (interactive-p) - (setq reftex-index-restriction-indicator nil - reftex-index-restriction-data nil))) + (setq reftex-index-restriction-indicator nil + reftex-index-restriction-data nil))) (when (= (buffer-size) 0) ;; buffer is empty - fill it (message "Building %s buffer..." buffer-name) @@ -466,22 +466,22 @@ SPC=view TAB=goto RET=goto+hide [e]dit [q]uit [r]escan [f]ollow [?]Help ;; it with whatever the DOCSTRUCT contains. ;; REMARK can be a note to add to the entry. (let* ((all docstruct) - (indent " ") - (context reftex-index-include-context) - (context-indent (concat indent " ")) - (section-chars (mapcar 'identity reftex-index-section-letters)) - (this-section-char 0) - (font (reftex-use-fonts)) - (bor (car reftex-index-restriction-data)) - (eor (nth 1 reftex-index-restriction-data)) - (mouse-face - (if (memq reftex-highlight-selection '(mouse both)) - reftex-mouse-selected-face - nil)) - (index-face (reftex-verified-face reftex-label-face - 'font-lock-constant-face - 'font-lock-reference-face)) - sublist cell from to first-char) + (indent " ") + (context reftex-index-include-context) + (context-indent (concat indent " ")) + (section-chars (mapcar 'identity reftex-index-section-letters)) + (this-section-char 0) + (font (reftex-use-fonts)) + (bor (car reftex-index-restriction-data)) + (eor (nth 1 reftex-index-restriction-data)) + (mouse-face + (if (memq reftex-highlight-selection '(mouse both)) + reftex-mouse-selected-face + nil)) + (index-face (reftex-verified-face reftex-label-face + 'font-lock-constant-face + 'font-lock-reference-face)) + sublist cell from to first-char) ;; Make the sublist and sort it (when bor @@ -489,68 +489,68 @@ SPC=view TAB=goto RET=goto+hide [e]dit [q]uit [r]escan [f]ollow [?]Help (while (setq cell (pop all)) (if (eq cell eor) - (setq all nil) - (and (eq (car cell) 'index) - (equal (nth 1 cell) tag) - (push cell sublist)))) + (setq all nil) + (and (eq (car cell) 'index) + (equal (nth 1 cell) tag) + (push cell sublist)))) (setq sublist (sort (nreverse sublist) - (lambda (a b) (string< (nth 8 a) (nth 8 b))))) + (lambda (a b) (string< (nth 8 a) (nth 8 b))))) (when update-one ;; Delete the entry at place (and (bolp) (forward-char 1)) (delete-region (previous-single-property-change (1+ (point)) :data) - (or (next-single-property-change (point) :data) - (point-max)))) + (or (next-single-property-change (point) :data) + (point-max)))) ;; Walk through the list and insert all entries (while (setq cell (pop sublist)) (unless update-one - (setq first-char (upcase (string-to-char (nth 6 cell)))) - (when (and (not (equal first-char this-section-char)) - (member first-char section-chars)) - ;; There is a new initial letter, so start a new section - (reftex-index-insert-new-letter first-char font) - (setq section-chars (delete first-char section-chars) - this-section-char first-char)) - (when (= this-section-char 0) - (setq this-section-char ?!) - (reftex-index-insert-new-letter this-section-char font))) + (setq first-char (upcase (string-to-char (nth 6 cell)))) + (when (and (not (equal first-char this-section-char)) + (member first-char section-chars)) + ;; There is a new initial letter, so start a new section + (reftex-index-insert-new-letter first-char font) + (setq section-chars (delete first-char section-chars) + this-section-char first-char)) + (when (= this-section-char 0) + (setq this-section-char ?!) + (reftex-index-insert-new-letter this-section-char font))) (setq from (point)) (insert indent (nth 7 cell)) (when font - (setq to (point)) - (put-text-property - (- (point) (length (nth 7 cell))) to - 'face index-face) - (goto-char to)) + (setq to (point)) + (put-text-property + (- (point) (length (nth 7 cell))) to + 'face index-face) + (goto-char to)) (when (or remark (nth 9 cell)) - (and (< (current-column) 40) - ;; FIXME: maybe this is too slow? - (insert (make-string (max (- 40 (current-column)) 0) ?\ ))) - (and (nth 9 cell) (insert " " (substring (nth 5 cell) (nth 9 cell)))) - (and remark (insert " " remark))) + (and (< (current-column) 40) + ;; FIXME: maybe this is too slow? + (insert (make-string (max (- 40 (current-column)) 0) ?\ ))) + (and (nth 9 cell) (insert " " (substring (nth 5 cell) (nth 9 cell)))) + (and remark (insert " " remark))) (insert "\n") (setq to (point)) (when context - (insert context-indent (nth 2 cell) "\n") - (setq to (point))) + (insert context-indent (nth 2 cell) "\n") + (setq to (point))) (put-text-property from to :data cell) (when mouse-face - (put-text-property from (1- to) - 'mouse-face mouse-face)) + (put-text-property from (1- to) + 'mouse-face mouse-face)) (goto-char to)))) (defun reftex-index-insert-new-letter (letter &optional font) ;; Start a new section in the index (let ((from (point))) - (insert "\n" letter letter letter - "-----------------------------------------------------------------") + (insert "\n" letter letter letter + "-----------------------------------------------------------------") (when font (put-text-property from (point) 'face reftex-index-section-face)) (insert "\n"))) @@ -558,30 +558,30 @@ SPC=view TAB=goto RET=goto+hide [e]dit [q]uit [r]escan [f]ollow [?]Help (defun reftex-get-restriction (arg docstruct) ;; Interprete the prefix ARG and derive index restriction specs. (let* ((beg (min (point) (or (condition-case nil (mark) (error nil)) - (point-max)))) - (end (max (point) (or (condition-case nil (mark) (error nil)) - (point-min)))) - bor eor label here-I-am) + (point-max)))) + (end (max (point) (or (condition-case nil (mark) (error nil)) + (point-min)))) + bor eor label here-I-am) (cond ((eq arg 2) (setq here-I-am (car (reftex-where-am-I)) - bor (if (eq (car here-I-am) 'toc) - here-I-am - (reftex-last-assoc-before-elt - 'toc here-I-am docstruct)) - eor (car (memq (assq 'toc (cdr (memq bor docstruct))) docstruct)) - label (nth 6 bor))) + bor (if (eq (car here-I-am) 'toc) + here-I-am + (reftex-last-assoc-before-elt + 'toc here-I-am docstruct)) + eor (car (memq (assq 'toc (cdr (memq bor docstruct))) docstruct)) + label (nth 6 bor))) ((eq arg 3) (save-excursion - (setq label "region") - (goto-char beg) - (setq bor (car (reftex-where-am-I))) - (setq bor (nth 1 (memq bor docstruct))) - (goto-char end) - (setq eor (nth 1 (memq (car (reftex-where-am-I)) docstruct))))) + (setq label "region") + (goto-char beg) + (setq bor (car (reftex-where-am-I))) + (setq bor (nth 1 (memq bor docstruct))) + (goto-char end) + (setq eor (nth 1 (memq (car (reftex-where-am-I)) docstruct))))) (t nil)) (if (and label (or bor eor)) - (list label bor eor) + (list label bor eor) nil))) (defun reftex-index-pre-command-hook () @@ -593,23 +593,23 @@ SPC=view TAB=goto RET=goto+hide [e]dit [q]uit [r]escan [f]ollow [?]Help ;; Used in the post-command-hook for the *Index* buffer (when (get-text-property (point) :data) (and (> (point) 1) - (not (get-text-property (point) 'intangible)) - (memq reftex-highlight-selection '(cursor both)) - (reftex-highlight 1 - (or (previous-single-property-change (1+ (point)) :data) - (point-min)) - (or (next-single-property-change (point) :data) - (point-max))))) + (not (get-text-property (point) 'intangible)) + (memq reftex-highlight-selection '(cursor both)) + (reftex-highlight 1 + (or (previous-single-property-change (1+ (point)) :data) + (point-min)) + (or (next-single-property-change (point) :data) + (point-max))))) (if (integerp reftex-index-follow-mode) ;; Remove delayed action (setq reftex-index-follow-mode t) (and reftex-index-follow-mode - (not (equal reftex-last-follow-point (point))) - ;; Show context in other window - (setq reftex-last-follow-point (point)) - (condition-case nil - (reftex-index-visit-location nil (not reftex-revisit-to-follow)) - (error t))))) + (not (equal reftex-last-follow-point (point))) + ;; Show context in other window + (setq reftex-last-follow-point (point)) + (condition-case nil + (reftex-index-visit-location nil (not reftex-revisit-to-follow)) + (error t))))) (defun reftex-index-show-help () "Show a summary of special key bindings." @@ -626,20 +626,20 @@ SPC=view TAB=goto RET=goto+hide [e]dit [q]uit [r]escan [f]ollow [?]Help (interactive "p") (setq reftex-callback-fwd t) (or (eobp) (forward-char 1)) - (goto-char (or (next-single-property-change (point) :data) - (point))) + (goto-char (or (next-single-property-change (point) :data) + (point))) (unless (get-text-property (point) :data) - (goto-char (or (next-single-property-change (point) :data) - (point))))) + (goto-char (or (next-single-property-change (point) :data) + (point))))) (defun reftex-index-previous (&optional arg) "Move to previous selectable item." (interactive "p") (setq reftex-callback-fwd nil) (goto-char (or (previous-single-property-change (point) :data) - (point))) + (point))) (unless (get-text-property (point) :data) (goto-char (or (previous-single-property-change (point) :data) - (point))))) + (point))))) (defun reftex-index-toggle-follow () "Toggle follow (other window follows with context)." (interactive) @@ -695,22 +695,22 @@ The function will go to the section where the entry at point was defined." (interactive) (let ((index-tag reftex-index-tag)) (if (and reftex-enable-partial-scans - (null current-prefix-arg)) - (let* ((data (get-text-property (point) :data)) - (file (nth 3 data)) - (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0)))) - (if (not file) - (error "Don't know which file to rescan. Try `C-u r'") - (switch-to-buffer (reftex-get-file-buffer-force file)) - (setq current-prefix-arg '(4)) - (reftex-display-index index-tag nil line))) + (null current-prefix-arg)) + (let* ((data (get-text-property (point) :data)) + (file (nth 3 data)) + (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0)))) + (if (not file) + (error "Don't know which file to rescan. Try `C-u r'") + (switch-to-buffer (reftex-get-file-buffer-force file)) + (setq current-prefix-arg '(4)) + (reftex-display-index index-tag nil line))) (reftex-index-Rescan)) (reftex-kill-temporary-buffers))) (defun reftex-index-Rescan (&rest ignore) "Regenerate the *Index* buffer after reparsing the entire document." (interactive) (let ((index-tag reftex-index-tag) - (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0)))) + (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0)))) (switch-to-buffer (reftex-get-file-buffer-force reftex-last-index-file)) (setq current-prefix-arg '(16)) @@ -719,14 +719,14 @@ The function will go to the section where the entry at point was defined." "Regenerate the *Index* from the internal lists. No reparsing os done." (interactive) (let ((buf (current-buffer)) - (index-tag reftex-index-tag) - (data (get-text-property (point) :data)) - (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0)))) + (index-tag reftex-index-tag) + (data (get-text-property (point) :data)) + (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0)))) (switch-to-buffer (reftex-get-file-buffer-force reftex-last-index-file)) (reftex-erase-buffer buf) (setq current-prefix-arg nil - reftex-last-follow-point 1) + reftex-last-follow-point 1) (reftex-display-index index-tag nil data line))) (defun reftex-index-switch-index-tag (&rest ignore) "Switch to a different index of the same document." @@ -741,23 +741,23 @@ The function will go to the section where the entry at point was defined." ;; Optional FORCE means, even if point is not on an index entry. (interactive) (let* ((data (get-text-property (point) :data)) - (docstruct (symbol-value reftex-docstruct-symbol)) - bor eor) + (docstruct (symbol-value reftex-docstruct-symbol)) + bor eor) (if (and (not data) force) - (setq data (assq 'toc docstruct))) + (setq data (assq 'toc docstruct))) (when data (setq bor (reftex-last-assoc-before-elt 'toc data docstruct) - eor (car (memq (assq 'toc (cdr (memq bor docstruct))) - docstruct)) - reftex-index-restriction-data (list bor eor) - reftex-index-restriction-indicator (nth 6 bor) ))) + eor (car (memq (assq 'toc (cdr (memq bor docstruct))) + docstruct)) + reftex-index-restriction-data (list bor eor) + reftex-index-restriction-indicator (nth 6 bor) ))) (reftex-index-revert)) (defun reftex-index-widen (&rest ignore) "Show the unrestricted index (all entries)." (interactive) (setq reftex-index-restriction-indicator nil - reftex-index-restriction-data nil) + reftex-index-restriction-data nil) (reftex-index-revert) (message "Index widened")) (defun reftex-index-restriction-forward (&rest ignore) @@ -766,15 +766,15 @@ When index is currently unrestricted, restrict it to a section. When index is restricted, select the next section as restriction criterion." (interactive) (let* ((docstruct (symbol-value reftex-docstruct-symbol)) - (bor (nth 1 reftex-index-restriction-data))) + (bor (nth 1 reftex-index-restriction-data))) (if (or (not bor) - (not (eq (car bor) 'toc))) - (reftex-index-restrict-to-section t) + (not (eq (car bor) 'toc))) + (reftex-index-restrict-to-section t) (setq reftex-index-restriction-indicator (nth 6 bor) - reftex-index-restriction-data - (list bor - (car (memq (assq 'toc (cdr (memq bor docstruct))) - docstruct)))) + reftex-index-restriction-data + (list bor + (car (memq (assq 'toc (cdr (memq bor docstruct))) + docstruct)))) (reftex-index-revert)))) (defun reftex-index-restriction-backward (&rest ignore) "Restrict to next section. @@ -782,14 +782,14 @@ When index is currently unrestricted, restrict it to a section. When index is restricted, select the previous section as restriction criterion." (interactive) (let* ((docstruct (symbol-value reftex-docstruct-symbol)) - (eor (car reftex-index-restriction-data)) - (bor (reftex-last-assoc-before-elt 'toc eor docstruct t))) + (eor (car reftex-index-restriction-data)) + (bor (reftex-last-assoc-before-elt 'toc eor docstruct t))) (if (or (not bor) - (not (eq (car bor) 'toc))) - (reftex-index-restrict-to-section t) + (not (eq (car bor) 'toc))) + (reftex-index-restrict-to-section t) (setq reftex-index-restriction-indicator (nth 6 bor) - reftex-index-restriction-data - (list bor eor)) + reftex-index-restriction-data + (list bor eor)) (reftex-index-revert)))) (defun reftex-index-visit-location (&optional final no-revisit) @@ -804,9 +804,9 @@ When index is restricted, select the previous section as restriction criterion." show-window show-buffer match) (unless data (error "Don't know which index entry to visit")) - + (if (eq (car data) 'index) - (setq match (reftex-index-show-entry data no-revisit))) + (setq match (reftex-index-show-entry data no-revisit))) (setq show-window (selected-window) show-buffer (current-buffer)) @@ -833,32 +833,32 @@ When index is restricted, select the previous section as restriction criterion." ;; values are accessible individually. (interactive) (let* ((arg (nth 5 data)) - (context (nth 2 data)) - (sc reftex-index-special-chars) - (boa (if (string-match (regexp-quote (concat "{" arg "}")) context) - (1+ (match-beginning 0)) - (error "Something is wrong here"))) - (eoa (1- (match-end 0))) - (boactual (if (string-match (concat "[^" (nth 3 sc) "]" (nth 2 sc)) - context boa) - (1+ (match-beginning 0)) - eoa)) - (boattr (if (string-match (concat "[^" (nth 3 sc) "]" (nth 1 sc)) - context boa) - (1+ (match-beginning 0)) - boactual)) - (pre (substring context 0 boa)) - (key (substring context boa boattr)) - (attr (substring context boattr boactual)) - (actual (substring context boactual eoa)) - (post (substring context eoa))) + (context (nth 2 data)) + (sc reftex-index-special-chars) + (boa (if (string-match (regexp-quote (concat "{" arg "}")) context) + (1+ (match-beginning 0)) + (error "Something is wrong here"))) + (eoa (1- (match-end 0))) + (boactual (if (string-match (concat "[^" (nth 3 sc) "]" (nth 2 sc)) + context boa) + (1+ (match-beginning 0)) + eoa)) + (boattr (if (string-match (concat "[^" (nth 3 sc) "]" (nth 1 sc)) + context boa) + (1+ (match-beginning 0)) + boactual)) + (pre (substring context 0 boa)) + (key (substring context boa boattr)) + (attr (substring context boattr boactual)) + (actual (substring context boactual eoa)) + (post (substring context eoa))) (list pre key attr actual post))) (defun reftex-index-edit () "Edit the index entry at point." (interactive) (let* ((data (get-text-property (point) :data)) - old new) + old new) (unless data (error "Don't know which index entry to edit")) (reftex-index-view-entry) (setq old (nth 2 data) new (read-string "Edit: " old)) @@ -868,33 +868,33 @@ When index is restricted, select the previous section as restriction criterion." "Toggle the page range start attribute `|('." (interactive) (let* ((data (get-text-property (point) :data)) - (bor (concat (nth 1 reftex-index-special-chars) "(")) - new analyze attr) + (bor (concat (nth 1 reftex-index-special-chars) "(")) + new analyze attr) (unless data (error "Don't know which index entry to edit")) (setq analyze (reftex-index-analyze-entry data) - attr (nth 2 analyze)) + attr (nth 2 analyze)) (setf (nth 2 analyze) (if (string= attr bor) "" bor)) (setq new (apply 'concat analyze)) - (reftex-index-change-entry + (reftex-index-change-entry new (if (string= (nth 2 analyze) bor) - "Entry is now START-OF-PAGE-RANGE" - "START-OF-PAGE-RANGE canceled")))) + "Entry is now START-OF-PAGE-RANGE" + "START-OF-PAGE-RANGE canceled")))) (defun reftex-index-toggle-range-end () "Toggle the page-range-end attribute `|)'." (interactive) (let* ((data (get-text-property (point) :data)) - (eor (concat (nth 1 reftex-index-special-chars) ")")) - new analyze attr) + (eor (concat (nth 1 reftex-index-special-chars) ")")) + new analyze attr) (unless data (error "Don't know which index entry to edit")) (setq analyze (reftex-index-analyze-entry data) - attr (nth 2 analyze)) + attr (nth 2 analyze)) (setf (nth 2 analyze) (if (string= attr eor) "" eor)) (setq new (apply 'concat analyze)) (reftex-index-change-entry new (if (string= (nth 2 analyze) eor) - "Entry is now END-OF-PAGE-RANGE" - "END-OF-PAGE-RANGE canceled")))) + "Entry is now END-OF-PAGE-RANGE" + "END-OF-PAGE-RANGE canceled")))) (defun reftex-index-edit-key () "Edit the KEY part of the index entry." @@ -905,7 +905,7 @@ When index is restricted, select the previous section as restriction criterion." "EDIT the ATTRIBUTE part of the entry. With arg: remove entire ATTRIBUTE." (interactive "P") (reftex-index-edit-part arg 2 (nth 1 reftex-index-special-chars) - "Attribute: ")) + "Attribute: ")) (defun reftex-index-edit-visual (&optional arg) "EDIT the VISUAL part of the entry. With arg: remove entire VISUAL string." @@ -915,51 +915,51 @@ When index is restricted, select the previous section as restriction criterion." (defun reftex-index-edit-part (arg n initial prompt &optional dont-allow-empty) ;; This function does the work for all partial editing commands (let* ((data (get-text-property (point) :data)) - new analyze opart npart) + new analyze opart npart) (unless data (error "Don't know which index entry to edit")) ;; Analyze the whole context string (setq analyze (reftex-index-analyze-entry data) - opart (nth n analyze)) + opart (nth n analyze)) (and (> (length opart) 0) (setq opart (substring opart 1))) ;; Have the user editing the part (setq npart (if arg "" (read-string (concat prompt initial) opart))) ;; Tests: (cond ((string= npart opart) - (error "Not changed")) - ((string= npart "") - (if dont-allow-empty - (error "Illegal value") - (setf (nth n analyze) npart))) - (t (setf (nth n analyze) (concat initial npart)))) + (error "Not changed")) + ((string= npart "") + (if dont-allow-empty + (error "Illegal value") + (setf (nth n analyze) npart))) + (t (setf (nth n analyze) (concat initial npart)))) (setq new (apply 'concat analyze)) ;; Change the entry and insert the changed version into the index. - (reftex-index-change-entry + (reftex-index-change-entry new (if (string= npart "") - (format "Deleted: %s" opart) - (format "New value is: %s" npart))))) + (format "Deleted: %s" opart) + (format "New value is: %s" npart))))) (defun reftex-index-level-down () "Make index entry a subitem of another entry." (interactive) (let* ((data (get-text-property (point) :data)) - (docstruct (symbol-value reftex-docstruct-symbol)) - old new prefix key) + (docstruct (symbol-value reftex-docstruct-symbol)) + old new prefix key) (unless data (error "Don't know which index entry to change")) (setq old (nth 2 data) - key (nth 6 data) - prefix (completing-read - "Prefix: " - (reftex-sublist-nth - docstruct 6 - (lambda (x) - (and (eq (car x) 'index) - (string= (nth 1 x) reftex-index-tag))) t))) - (unless (string-match - (concat (regexp-quote (car reftex-index-special-chars)) "\\'") - prefix) + key (nth 6 data) + prefix (completing-read + "Prefix: " + (reftex-sublist-nth + docstruct 6 + (lambda (x) + (and (eq (car x) 'index) + (string= (nth 1 x) reftex-index-tag))) t))) + (unless (string-match + (concat (regexp-quote (car reftex-index-special-chars)) "\\'") + prefix) (setq prefix (concat prefix (car reftex-index-special-chars)))) (if (string-match (regexp-quote key) old) - (setq new (replace-match (concat prefix key) t t old)) + (setq new (replace-match (concat prefix key) t t old)) (error "Cannot construct new index key")) (reftex-index-change-entry new (format "Added prefix: %s" prefix)))) @@ -967,17 +967,17 @@ When index is restricted, select the previous section as restriction criterion." "Remove the highest level of a hierarchical index entry." (interactive) (let* ((data (get-text-property (point) :data)) - old new prefix) + old new prefix) (unless data (error "Don't know which entry to change")) (setq old (nth 2 data)) (if (string-match (concat "{\\([^" (nth 0 reftex-index-special-chars) "]*" - "[^" (nth 3 reftex-index-special-chars) "]" - (regexp-quote (nth 0 reftex-index-special-chars)) - "\\)") - old) - (setq prefix (substring old (match-beginning 1) (match-end 1)) - new (concat (substring old 0 (match-beginning 1)) - (substring old (match-end 1)))) + "[^" (nth 3 reftex-index-special-chars) "]" + (regexp-quote (nth 0 reftex-index-special-chars)) + "\\)") + old) + (setq prefix (substring old (match-beginning 1) (match-end 1)) + new (concat (substring old 0 (match-beginning 1)) + (substring old (match-end 1)))) (error "Entry is not a subitem")) (reftex-index-change-entry new (format "Removed prefix: %s" prefix)))) @@ -994,9 +994,9 @@ When index is restricted, select the previous section as restriction criterion." (defun reftex-index-change-entry (new &optional message) ;; Change the full context string of the index entry at point to ;; NEW. This actually edits the buffer where the entry is defined. - + (let* ((data (get-text-property (point) :data)) - old beg end info) + old beg end info) (unless data (error "Cannot change entry")) (reftex-index-view-entry) (setq beg (match-beginning 0) end (match-end 0)) @@ -1006,19 +1006,19 @@ When index is restricted, select the previous section as restriction criterion." (set-buffer (get-file-buffer (nth 3 data))) (goto-char beg) (unless (looking-at (regexp-quote old)) - (error "This should not happen (reftex-index-change-entry)")) + (error "This should not happen (reftex-index-change-entry)")) (delete-region beg end) (insert new) (goto-char (1- beg)) (when (and (re-search-forward (reftex-everything-regexp) nil t) - (match-end 10) - (< (abs (- (match-beginning 10) beg)) (length new)) - (setq info (reftex-index-info-safe buffer-file-name))) - (setcdr data (cdr info)))) + (match-end 10) + (< (abs (- (match-beginning 10) beg)) (length new)) + (setq info (reftex-index-info-safe buffer-file-name))) + (setcdr data (cdr info)))) (let ((buffer-read-only nil)) (save-excursion - (reftex-insert-index (list data) reftex-index-tag t - "EDITED"))) + (reftex-insert-index (list data) reftex-index-tag t + "EDITED"))) (setq reftex-last-follow-point 1) (and message (message message)))) @@ -1033,33 +1033,33 @@ When index is restricted, select the previous section as restriction criterion." (loop for x in '(("n" . reftex-index-next) - ("p" . reftex-index-previous) - ("?" . reftex-index-show-help) - (" " . reftex-index-view-entry) - ("\C-m" . reftex-index-goto-entry-and-hide) - ("\C-i" . reftex-index-goto-entry) - ("\C-k" . reftex-index-kill) - ("r" . reftex-index-rescan) - ("R" . reftex-index-Rescan) - ("g" . revert-buffer) - ("q" . reftex-index-quit) - ("k" . reftex-index-quit-and-kill) - ("f" . reftex-index-toggle-follow) - ("s" . reftex-index-switch-index-tag) - ("e" . reftex-index-edit) - ("^" . reftex-index-level-up) - ("_" . reftex-index-level-down) - ("}" . reftex-index-restrict-to-section) - ("{" . reftex-index-widen) - (">" . reftex-index-restriction-forward) - ("<" . reftex-index-restriction-backward) - ("(" . reftex-index-toggle-range-beginning) - (")" . reftex-index-toggle-range-end) - ("|" . reftex-index-edit-attribute) - ("@" . reftex-index-edit-visual) - ("*" . reftex-index-edit-key) - ("\C-c=". reftex-index-goto-toc) - ("c" . reftex-index-toggle-context)) + ("p" . reftex-index-previous) + ("?" . reftex-index-show-help) + (" " . reftex-index-view-entry) + ("\C-m" . reftex-index-goto-entry-and-hide) + ("\C-i" . reftex-index-goto-entry) + ("\C-k" . reftex-index-kill) + ("r" . reftex-index-rescan) + ("R" . reftex-index-Rescan) + ("g" . revert-buffer) + ("q" . reftex-index-quit) + ("k" . reftex-index-quit-and-kill) + ("f" . reftex-index-toggle-follow) + ("s" . reftex-index-switch-index-tag) + ("e" . reftex-index-edit) + ("^" . reftex-index-level-up) + ("_" . reftex-index-level-down) + ("}" . reftex-index-restrict-to-section) + ("{" . reftex-index-widen) + (">" . reftex-index-restriction-forward) + ("<" . reftex-index-restriction-backward) + ("(" . reftex-index-toggle-range-beginning) + (")" . reftex-index-toggle-range-end) + ("|" . reftex-index-edit-attribute) + ("@" . reftex-index-edit-visual) + ("*" . reftex-index-edit-key) + ("\C-c=". reftex-index-goto-toc) + ("c" . reftex-index-toggle-context)) do (define-key reftex-index-map (car x) (cdr x))) (loop for key across "0123456789" do @@ -1069,33 +1069,33 @@ When index is restricted, select the previous section as restriction criterion." ;; The capital letters and the exclamation mark (loop for key across (concat "!" reftex-index-section-letters) do (define-key reftex-index-map (vector (list key)) - (list 'lambda '() '(interactive) - (list 'reftex-index-goto-letter key)))) + (list 'lambda '() '(interactive) + (list 'reftex-index-goto-letter key)))) (defun reftex-index-goto-letter (char) "Go to the CHAR section in the index." (let ((pos (point)) - (case-fold-search nil)) + (case-fold-search nil)) (goto-line 3) (if (re-search-forward (concat "^" (char-to-string char)) nil t) - (progn - (beginning-of-line) - (recenter 0) - (reftex-index-next)) + (progn + (beginning-of-line) + (recenter 0) + (reftex-index-next)) (goto-char pos) (if (eq char ?!) - (error "This <%s> index does not contain entries sorted before the letters" - reftex-index-tag) - (error "This <%s> index does not contain entries starting with `%c'" - reftex-index-tag char))))) + (error "This <%s> index does not contain entries sorted before the letters" + reftex-index-tag) + (error "This <%s> index does not contain entries starting with `%c'" + reftex-index-tag char))))) -(easy-menu-define +(easy-menu-define reftex-index-menu reftex-index-map "Menu for Index buffer" `("Index" - ["Goto section A-Z" + ["Goto section A-Z" (message "To go to a section, just press any of: !%s" - reftex-index-section-letters) t] + reftex-index-section-letters) t] ["Show Entry" reftex-index-view-entry t] ["Go To Entry" reftex-index-goto-entry t] ["Exit & Go To Entry" reftex-index-goto-entry-and-hide t] @@ -1133,7 +1133,7 @@ When index is restricted, select the previous section as restriction criterion." ["Context" reftex-index-toggle-context :style toggle :selected reftex-index-include-context] "--" - ["Follow Mode" reftex-index-toggle-follow :style toggle + ["Follow Mode" reftex-index-toggle-follow :style toggle :selected reftex-index-follow-mode]) "--" ["Help" reftex-index-show-help t])) @@ -1185,79 +1185,79 @@ You get a chance to edit the entry in the phrases buffer - finish with (set-marker reftex-index-return-marker (point)) (reftex-index-selection-or-word arg 'phrase) (if (eq major-mode 'reftex-index-phrases-mode) - (message + (message (substitute-command-keys - "Return to LaTeX with \\[reftex-index-phrases-save-and-return]")))) + "Return to LaTeX with \\[reftex-index-phrases-save-and-return]")))) (defun reftex-index-visit-phrases-buffer () "Switch to the phrases buffer, initialize if empty." (interactive) (reftex-access-scan-info) (let* ((master (reftex-TeX-master-file)) - (name (concat (file-name-sans-extension master) - reftex-index-phrase-file-extension))) + (name (concat (file-name-sans-extension master) + reftex-index-phrase-file-extension))) (find-file name) (unless (eq major-mode 'reftex-index-phrases-mode) (reftex-index-phrases-mode)) (if (= (buffer-size) 0) - (reftex-index-initialize-phrases-buffer master)))) + (reftex-index-initialize-phrases-buffer master)))) (defun reftex-index-initialize-phrases-buffer (&optional master) "Initialize the phrases buffer by creating the header. If the buffer is non-empty, delete the old header first." (interactive) (let* ((case-fold-search t) - (default-key (car reftex-index-default-macro)) - (default-macro (nth 1 (assoc default-key - reftex-key-to-index-macro-alist))) - (macro-alist - (sort (copy-sequence reftex-index-macro-alist) - (lambda (a b) (equal (car a) default-macro)))) - macro entry key repeat) - + (default-key (car reftex-index-default-macro)) + (default-macro (nth 1 (assoc default-key + reftex-key-to-index-macro-alist))) + (macro-alist + (sort (copy-sequence reftex-index-macro-alist) + (lambda (a b) (equal (car a) default-macro)))) + macro entry key repeat) + (if master (set (make-local-variable 'TeX-master) - (file-name-nondirectory master))) + (file-name-nondirectory master))) (when (> (buffer-size) 0) (goto-char 1) (set-mark (point)) (while (re-search-forward reftex-index-phrases-macrodef-regexp nil t) - (end-of-line)) + (end-of-line)) (beginning-of-line 2) (if (looking-at reftex-index-phrases-comment-regexp) - (beginning-of-line 2)) + (beginning-of-line 2)) (while (looking-at "^[ \t]*$") - (beginning-of-line 2)) + (beginning-of-line 2)) (cond ((fboundp 'zmacs-activate-region) (zmacs-activate-region)) - ((boundp 'make-active) (setq mark-active t))) + ((boundp 'make-active) (setq mark-active t))) (if (yes-or-no-p "Delete and rebuilt header ") - (delete-region (point-min) (point)))) + (delete-region (point-min) (point)))) ;; Insert the mode line (insert (format "%% -*- mode: reftex-index-phrases; TeX-master: \"%s\" -*-\n" - (file-name-nondirectory (reftex-index-phrase-tex-master)))) + (file-name-nondirectory (reftex-index-phrase-tex-master)))) ;; Insert the macro definitions (insert "% Key Macro Format Repeat\n") (insert "%---------------------------------------------------------------------\n") (while (setq entry (pop macro-alist)) (setq macro (car entry) - repeat (nth 7 entry) - key (car (delq nil (mapcar (lambda (x) (if (equal (nth 1 x) macro) - (car x) - nil)) - reftex-key-to-index-macro-alist)))) + repeat (nth 7 entry) + key (car (delq nil (mapcar (lambda (x) (if (equal (nth 1 x) macro) + (car x) + nil)) + reftex-key-to-index-macro-alist)))) (insert (format ">>>INDEX_MACRO_DEFINITION:\t%s\t%-20s\t%s\n" - (char-to-string key) (concat macro "{%s}") - (if repeat "t" "nil")))) + (char-to-string key) (concat macro "{%s}") + (if repeat "t" "nil")))) (insert "%---------------------------------------------------------------------\n\n\n"))) (defvar TeX-master) (defun reftex-index-phrase-tex-master (&optional dir) "Return the name of the master file associated with a phrase buffer." (if (and (boundp 'TeX-master) - (local-variable-p 'TeX-master (current-buffer)) - (stringp TeX-master)) + (local-variable-p 'TeX-master (current-buffer)) + (stringp TeX-master)) ;; We have a local variable which tells us which file to use (expand-file-name TeX-master dir) ;; have to guess @@ -1301,9 +1301,9 @@ Here are all local bindings. (interactive) (kill-all-local-variables) (setq major-mode 'reftex-index-phrases-mode - mode-name "Phrases") + mode-name "Phrases") (use-local-map reftex-index-phrases-map) - (set (make-local-variable 'font-lock-defaults) + (set (make-local-variable 'font-lock-defaults) reftex-index-phrases-font-lock-defaults) (easy-menu-add reftex-index-phrases-menu reftex-index-phrases-map) (set (make-local-variable 'reftex-index-phrases-marker) (make-marker)) @@ -1313,31 +1313,31 @@ Here are all local bindings. ;; Font Locking stuff (let ((ss (if (featurep 'xemacs) 'secondary-selection ''secondary-selection))) (setq reftex-index-phrases-font-lock-keywords - (list - (cons reftex-index-phrases-comment-regexp 'font-lock-comment-face) - (list reftex-index-phrases-macrodef-regexp - '(1 font-lock-type-face) - '(2 font-lock-keyword-face) - (list 3 ss) - '(4 font-lock-function-name-face) - (list 5 ss) - '(6 font-lock-string-face)) - (list reftex-index-phrases-phrase-regexp1 - '(1 font-lock-keyword-face) - (list 2 ss) - '(3 font-lock-string-face) - (list 4 ss)) - (list reftex-index-phrases-phrase-regexp2 - '(1 font-lock-keyword-face) - (list 2 ss) - '(3 font-lock-string-face) - (list 4 ss) - '(5 font-lock-function-name-face)) - (cons "^\t$" ss))) + (list + (cons reftex-index-phrases-comment-regexp 'font-lock-comment-face) + (list reftex-index-phrases-macrodef-regexp + '(1 font-lock-type-face) + '(2 font-lock-keyword-face) + (list 3 ss) + '(4 font-lock-function-name-face) + (list 5 ss) + '(6 font-lock-string-face)) + (list reftex-index-phrases-phrase-regexp1 + '(1 font-lock-keyword-face) + (list 2 ss) + '(3 font-lock-string-face) + (list 4 ss)) + (list reftex-index-phrases-phrase-regexp2 + '(1 font-lock-keyword-face) + (list 2 ss) + '(3 font-lock-string-face) + (list 4 ss) + '(5 font-lock-function-name-face)) + (cons "^\t$" ss))) (setq reftex-index-phrases-font-lock-defaults - '((reftex-index-phrases-font-lock-keywords) - nil t nil beginning-of-line)) - (put 'reftex-index-phrases-mode 'font-lock-defaults + '((reftex-index-phrases-font-lock-keywords) + nil t nil beginning-of-line)) + (put 'reftex-index-phrases-mode 'font-lock-defaults reftex-index-phrases-font-lock-defaults) ; XEmacs ) @@ -1350,9 +1350,9 @@ Here are all local bindings. (decf arg) (end-of-line) (if (re-search-forward reftex-index-phrases-phrase-regexp12 nil t) - (progn - (goto-char (match-beginning 0)) - (reftex-index-this-phrase)) + (progn + (goto-char (match-beginning 0)) + (reftex-index-this-phrase)) (error "No more phrase lines after point")))) (defun reftex-index-this-phrase () @@ -1364,48 +1364,48 @@ match, the user will be asked to confirm the replacement." (save-excursion (beginning-of-line) (cond ((looking-at reftex-index-phrases-comment-regexp) - (if (interactive-p) (error "Comment line"))) - ((looking-at "^[ \t]*$") - (if (interactive-p) (error "Empty line"))) - ((looking-at reftex-index-phrases-macrodef-regexp) - (if (interactive-p) (error "Macro definition line"))) - ((looking-at reftex-index-phrases-phrase-regexp12) - ;; This is a phrase - (let* ((char (if (not (equal (match-string 1) "")) - (string-to-char (match-string 1)))) - (phrase (match-string 3)) - (index-key (match-string 6)) - (macro-data (cdr (if (null char) - (car reftex-index-phrases-macro-data) - (assoc char reftex-index-phrases-macro-data)))) - (macro-fmt (car macro-data)) - (repeat (nth 1 macro-data)) - (files - (cond ((and (stringp reftex-index-phrases-restrict-file) - (file-regular-p reftex-index-phrases-restrict-file)) - (list reftex-index-phrases-restrict-file)) - ((stringp reftex-index-phrases-restrict-file) - (error "Illegal restriction file %s" - reftex-index-phrases-restrict-file)) - (t reftex-index-phrases-files))) - (as-words reftex-index-phrases-search-whole-words)) - (unless macro-data - (error "No macro associated with key %c" char)) - (unwind-protect - (let ((overlay-arrow-string "=>") - (overlay-arrow-position - reftex-index-phrases-marker) - (replace-count 0)) - ;; Show the overlay arrow - (move-marker reftex-index-phrases-marker - (match-beginning 0) (current-buffer)) - ;; Start the query-replace - (reftex-query-index-phrase-globally - files phrase macro-fmt - index-key repeat as-words) - (message "%s replaced" - (reftex-number replace-count "occurrence")))))) - (t (error "Cannot parse this line"))))) + (if (interactive-p) (error "Comment line"))) + ((looking-at "^[ \t]*$") + (if (interactive-p) (error "Empty line"))) + ((looking-at reftex-index-phrases-macrodef-regexp) + (if (interactive-p) (error "Macro definition line"))) + ((looking-at reftex-index-phrases-phrase-regexp12) + ;; This is a phrase + (let* ((char (if (not (equal (match-string 1) "")) + (string-to-char (match-string 1)))) + (phrase (match-string 3)) + (index-key (match-string 6)) + (macro-data (cdr (if (null char) + (car reftex-index-phrases-macro-data) + (assoc char reftex-index-phrases-macro-data)))) + (macro-fmt (car macro-data)) + (repeat (nth 1 macro-data)) + (files + (cond ((and (stringp reftex-index-phrases-restrict-file) + (file-regular-p reftex-index-phrases-restrict-file)) + (list reftex-index-phrases-restrict-file)) + ((stringp reftex-index-phrases-restrict-file) + (error "Illegal restriction file %s" + reftex-index-phrases-restrict-file)) + (t reftex-index-phrases-files))) + (as-words reftex-index-phrases-search-whole-words)) + (unless macro-data + (error "No macro associated with key %c" char)) + (unwind-protect + (let ((overlay-arrow-string "=>") + (overlay-arrow-position + reftex-index-phrases-marker) + (replace-count 0)) + ;; Show the overlay arrow + (move-marker reftex-index-phrases-marker + (match-beginning 0) (current-buffer)) + ;; Start the query-replace + (reftex-query-index-phrase-globally + files phrase macro-fmt + index-key repeat as-words) + (message "%s replaced" + (reftex-number replace-count "occurrence")))))) + (t (error "Cannot parse this line"))))) (defun reftex-index-all-phrases () "Index all phrases in the phrases buffer. @@ -1428,7 +1428,7 @@ Calls `reftex-index-this-phrase' on each line in the region." (reftex-index-phrases-parse-header t) (goto-char beg) (while (not (or (eobp) - (>= (point) end))) + (>= (point) end))) (save-excursion (reftex-index-this-phrase)) (beginning-of-line 2))) @@ -1438,31 +1438,31 @@ The definitions get stored in `reftex-index-phrases-macro-data'. Also switches to the LaTeX document to find out which files belong to the document and stores the list in `reftex-index-phrases-files'." (let* ((master (reftex-index-phrase-tex-master)) - buf) + buf) (if get-files - ;; Get the file list - (save-excursion - (setq buf (reftex-get-file-buffer-force master)) - (unless buf (error "Master file %s not found" master)) - (set-buffer buf) - (reftex-access-scan-info) - (setq reftex-index-phrases-files - (reftex-all-document-files)))) + ;; Get the file list + (save-excursion + (setq buf (reftex-get-file-buffer-force master)) + (unless buf (error "Master file %s not found" master)) + (set-buffer buf) + (reftex-access-scan-info) + (setq reftex-index-phrases-files + (reftex-all-document-files)))) ;; Parse the files header for macro definitions (setq reftex-index-phrases-macro-data nil) (save-excursion (goto-char (point-min)) (while (re-search-forward reftex-index-phrases-macrodef-regexp nil t) - (push (list - (string-to-char (match-string 2)) - (match-string 4) - (equal (match-string 6) "t")) - reftex-index-phrases-macro-data)) + (push (list + (string-to-char (match-string 2)) + (match-string 4) + (equal (match-string 6) "t")) + reftex-index-phrases-macro-data)) ;; Reverse the list, so that the first macro is first (if (null reftex-index-phrases-macro-data) - (error "No valid MACRO DEFINITION line in %s file (make sure to use TAB separators)" reftex-index-phrase-file-extension)) - (setq reftex-index-phrases-macro-data - (nreverse reftex-index-phrases-macro-data)) + (error "No valid MACRO DEFINITION line in %s file (make sure to use TAB separators)" reftex-index-phrase-file-extension)) + (setq reftex-index-phrases-macro-data + (nreverse reftex-index-phrases-macro-data)) (goto-char (point-min))))) (defun reftex-index-phrases-apply-to-region (beg end) @@ -1473,34 +1473,34 @@ you need to add/change text in an already indexed document and want to index the new part without having to go over the unchanged parts again." (interactive "r") (let ((win-conf (current-window-configuration)) - (reftex-index-phrases-restrict-file (buffer-file-name))) + (reftex-index-phrases-restrict-file (buffer-file-name))) (save-excursion (save-restriction (narrow-to-region beg end) (unwind-protect - (progn - ;; Hide the region highlighting - (cond ((fboundp 'zmacs-deactivate-region) (zmacs-deactivate-region)) - ((fboundp 'deactivate-mark) (deactivate-mark))) - (delete-other-windows) - (reftex-index-visit-phrases-buffer) - (reftex-index-all-phrases)) - (set-window-configuration win-conf)))))) + (progn + ;; Hide the region highlighting + (cond ((fboundp 'zmacs-deactivate-region) (zmacs-deactivate-region)) + ((fboundp 'deactivate-mark) (deactivate-mark))) + (delete-other-windows) + (reftex-index-visit-phrases-buffer) + (reftex-index-all-phrases)) + (set-window-configuration win-conf)))))) (defun reftex-index-new-phrase (&optional text) "Open a new line in the phrases buffer, insert TEXT." (interactive) (if (and text (stringp text)) (progn - ;; Check if the phrase is already in the buffer - (setq text (reftex-index-simplify-phrase text)) - (goto-char (point-min)) - (if (re-search-forward - (concat "^\\(\\S-*\\)\t\\(" (regexp-quote text) - "\\) *[\t\n]") nil t) - (progn - (goto-char (match-end 2)) - (error "Phrase is already in phrases buffer"))))) + ;; Check if the phrase is already in the buffer + (setq text (reftex-index-simplify-phrase text)) + (goto-char (point-min)) + (if (re-search-forward + (concat "^\\(\\S-*\\)\t\\(" (regexp-quote text) + "\\) *[\t\n]") nil t) + (progn + (goto-char (match-end 2)) + (error "Phrase is already in phrases buffer"))))) ;; Add the new phrase line after the last in the buffer (goto-char (point-max)) (if (re-search-backward reftex-index-phrases-phrase-regexp12 nil t) @@ -1521,19 +1521,19 @@ To check the whole buffer, start at the beginning and continue by calling this function repeatedly." (interactive "P") (if (catch 'exit - (while (re-search-forward reftex-index-phrases-phrase-regexp12 nil t) - (goto-char (match-beginning 3)) - (let* ((phrase (match-string 3)) - (case-fold-search reftex-index-phrases-case-fold-search) - (re (reftex-index-phrases-find-dup-re phrase t))) - (if (save-excursion - (goto-char (point-min)) - (and (re-search-forward re nil t) - (re-search-forward re nil t))) - (throw 'exit t))))) + (while (re-search-forward reftex-index-phrases-phrase-regexp12 nil t) + (goto-char (match-beginning 3)) + (let* ((phrase (match-string 3)) + (case-fold-search reftex-index-phrases-case-fold-search) + (re (reftex-index-phrases-find-dup-re phrase t))) + (if (save-excursion + (goto-char (point-min)) + (and (re-search-forward re nil t) + (re-search-forward re nil t))) + (throw 'exit t))))) (progn - (reftex-index-phrases-info) - (message "Phrase with match conflict discovered")) + (reftex-index-phrases-info) + (message "Phrase with match conflict discovered")) (goto-char (point-max)) (error "No further problematic phrases found"))) @@ -1546,82 +1546,82 @@ this function repeatedly." (error "Not a phrase line")) (save-match-data (reftex-index-phrases-parse-header t)) (let* ((char (if (not (equal (match-string 1) "")) - (string-to-char (match-string 1)))) - (phrase (match-string 3)) - (index-key (match-string 6)) - (index-keys (split-string - (or index-key phrase) - reftex-index-phrases-logical-or-regexp)) - (macro-data (cdr (if (null char) - (car reftex-index-phrases-macro-data) - (assoc char reftex-index-phrases-macro-data)))) - (macro-fmt (car macro-data)) - (repeat (nth 1 macro-data)) - (as-words reftex-index-phrases-search-whole-words) - (example (reftex-index-make-replace-string - macro-fmt (downcase phrase) (car index-keys) repeat)) - (re (reftex-index-make-phrase-regexp phrase as-words t)) - (re1 (reftex-index-phrases-find-dup-re phrase)) - (re2 (reftex-index-phrases-find-dup-re phrase 'sub)) - superphrases - (nmatches 0) - (ntimes1 0) - (ntimes2 0) - (case-fold-search reftex-index-phrases-case-fold-search) - file files buf) + (string-to-char (match-string 1)))) + (phrase (match-string 3)) + (index-key (match-string 6)) + (index-keys (split-string + (or index-key phrase) + reftex-index-phrases-logical-or-regexp)) + (macro-data (cdr (if (null char) + (car reftex-index-phrases-macro-data) + (assoc char reftex-index-phrases-macro-data)))) + (macro-fmt (car macro-data)) + (repeat (nth 1 macro-data)) + (as-words reftex-index-phrases-search-whole-words) + (example (reftex-index-make-replace-string + macro-fmt (downcase phrase) (car index-keys) repeat)) + (re (reftex-index-make-phrase-regexp phrase as-words t)) + (re1 (reftex-index-phrases-find-dup-re phrase)) + (re2 (reftex-index-phrases-find-dup-re phrase 'sub)) + superphrases + (nmatches 0) + (ntimes1 0) + (ntimes2 0) + (case-fold-search reftex-index-phrases-case-fold-search) + file files buf) (setq files reftex-index-phrases-files) (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (while (re-search-forward re1 nil t) - (incf ntimes1)) - (goto-char (point-min)) - (while (re-search-forward re2 nil t) - (push (cons (count-lines 1 (point)) (match-string 1)) superphrases) - (incf ntimes2)))) + (save-restriction + (widen) + (goto-char (point-min)) + (while (re-search-forward re1 nil t) + (incf ntimes1)) + (goto-char (point-min)) + (while (re-search-forward re2 nil t) + (push (cons (count-lines 1 (point)) (match-string 1)) superphrases) + (incf ntimes2)))) (save-excursion - (while (setq file (pop files)) - (setq buf (reftex-get-file-buffer-force file)) - (when buf - (set-buffer buf) - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (let ((case-fold-search reftex-index-phrases-case-fold-search)) - (while (re-search-forward re nil t) - (or (reftex-in-comment) - (incf nmatches))))))))) + (while (setq file (pop files)) + (setq buf (reftex-get-file-buffer-force file)) + (when buf + (set-buffer buf) + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (let ((case-fold-search reftex-index-phrases-case-fold-search)) + (while (re-search-forward re nil t) + (or (reftex-in-comment) + (incf nmatches))))))))) (with-output-to-temp-buffer "*Help*" - (princ (format " Phrase: %s\n" phrase)) - (princ (format " Macro key: %s\n" char)) - (princ (format " Macro format: %s\n" macro-fmt)) - (princ (format " Repeat: %s\n" repeat)) - (cond - (index-key - (let ((iks index-keys) (cnt 0) ik) - (while (setq ik (pop iks)) - (princ (format "Index entry %d: %s\n" (incf cnt) ik))))) - (repeat - (princ (format " Index entry: %s\n" phrase))) - (t - (princ (format " Index key: <>\n")))) - (princ (format " Example: %s\n" example)) - (terpri) - (princ (format "Total matches: %s in %s\n" - (reftex-number nmatches "match" "es") - (reftex-number (length reftex-index-phrases-files) - "LaTeX file"))) - (princ (format " Uniqueness: Phrase occurs %s in phrase buffer\n" - (reftex-number ntimes1 "time"))) - (if (> ntimes2 1) - (progn - (princ (format " Superphrases: Phrase matches the following %s in the phrase buffer:\n" - (reftex-number ntimes2 "line"))) - (mapcar (lambda(x) - (princ (format " Line %4d: %s\n" (car x) (cdr x)))) - (nreverse superphrases)))))))) + (princ (format " Phrase: %s\n" phrase)) + (princ (format " Macro key: %s\n" char)) + (princ (format " Macro format: %s\n" macro-fmt)) + (princ (format " Repeat: %s\n" repeat)) + (cond + (index-key + (let ((iks index-keys) (cnt 0) ik) + (while (setq ik (pop iks)) + (princ (format "Index entry %d: %s\n" (incf cnt) ik))))) + (repeat + (princ (format " Index entry: %s\n" phrase))) + (t + (princ (format " Index key: <>\n")))) + (princ (format " Example: %s\n" example)) + (terpri) + (princ (format "Total matches: %s in %s\n" + (reftex-number nmatches "match" "es") + (reftex-number (length reftex-index-phrases-files) + "LaTeX file"))) + (princ (format " Uniqueness: Phrase occurs %s in phrase buffer\n" + (reftex-number ntimes1 "time"))) + (if (> ntimes2 1) + (progn + (princ (format " Superphrases: Phrase matches the following %s in the phrase buffer:\n" + (reftex-number ntimes2 "line"))) + (mapcar (lambda(x) + (princ (format " Line %4d: %s\n" (car x) (cdr x)))) + (nreverse superphrases)))))))) (defun reftex-index-phrases-set-macro-key () "Change the macro key for the current line. @@ -1634,32 +1634,32 @@ information about the currently selected macro." (save-excursion (beginning-of-line) (unless (or (looking-at reftex-index-phrases-phrase-regexp12) - (looking-at "\t")) + (looking-at "\t")) (error "This is not a phrase line")) (let* ((nc (reftex-index-select-phrases-macro 0)) - (macro-data (assoc nc reftex-index-phrases-macro-data)) - macro-fmt repeat) + (macro-data (assoc nc reftex-index-phrases-macro-data)) + macro-fmt repeat) (cond (macro-data) - ((equal nc ?\ ) - (setq nc "" - macro-data (car reftex-index-phrases-macro-data))) - ((equal nc ?\C-m) - (setq nc (char-after (point))) - (if (equal nc ?\t) - (setq nc "" - macro-data (car reftex-index-phrases-macro-data)) - (setq macro-data (assoc nc reftex-index-phrases-macro-data)))) - (t (error "No macro associated with %c" nc))) + ((equal nc ?\ ) + (setq nc "" + macro-data (car reftex-index-phrases-macro-data))) + ((equal nc ?\C-m) + (setq nc (char-after (point))) + (if (equal nc ?\t) + (setq nc "" + macro-data (car reftex-index-phrases-macro-data)) + (setq macro-data (assoc nc reftex-index-phrases-macro-data)))) + (t (error "No macro associated with %c" nc))) (setq macro-fmt (nth 1 macro-data) - repeat (nth 2 macro-data)) + repeat (nth 2 macro-data)) (if macro-data - (progn - (if (looking-at "[^\t]") (delete-char 1)) - (insert nc) - (message "Line will use %s %s repeat" macro-fmt - (if repeat "with" "without"))) - (error "Abort"))))) + (progn + (if (looking-at "[^\t]") (delete-char 1)) + (insert nc) + (message "Line will use %s %s repeat" macro-fmt + (if repeat "with" "without"))) + (error "Abort"))))) (defun reftex-index-sort-phrases (&optional chars-first) "Sort the phrases lines in the buffer alphabetically. @@ -1668,28 +1668,28 @@ it first compares the macro identifying chars and then the phrases." (interactive "P") ;; Remember the current line, so that we can return (let ((line (buffer-substring (progn (beginning-of-line) (point)) - (progn (end-of-line) (point)))) - beg end) + (progn (end-of-line) (point)))) + beg end) (goto-char (point-min)) ;; Find first and last phrase line in buffer - (setq beg - (and (re-search-forward reftex-index-phrases-phrase-regexp12 nil t) - (match-beginning 0))) + (setq beg + (and (re-search-forward reftex-index-phrases-phrase-regexp12 nil t) + (match-beginning 0))) (goto-char (point-max)) (setq end (re-search-backward reftex-index-phrases-phrase-regexp12 nil t)) (if end (setq end (progn (goto-char end) (end-of-line) (point)))) ;; Take the lines, sort them and re-insert. (if (and beg end) - (progn - (message "Sorting lines...") - (let* ((lines (split-string (buffer-substring beg end) "\n")) - (lines1 (sort lines 'reftex-compare-phrase-lines))) - (message "Sorting lines...done") - (let ((inhibit-quit t)) ;; make sure we do not loose lines - (delete-region beg end) - (insert (mapconcat 'identity lines1 "\n")))) - (goto-char (point-max)) - (re-search-backward (concat "^" (regexp-quote line) "$") nil t)) + (progn + (message "Sorting lines...") + (let* ((lines (split-string (buffer-substring beg end) "\n")) + (lines1 (sort lines 'reftex-compare-phrase-lines))) + (message "Sorting lines...done") + (let ((inhibit-quit t)) ;; make sure we do not loose lines + (delete-region beg end) + (insert (mapconcat 'identity lines1 "\n")))) + (goto-char (point-max)) + (re-search-backward (concat "^" (regexp-quote line) "$") nil t)) (error "Cannot find phrases lines to sort")))) (defvar chars-first) @@ -1697,28 +1697,28 @@ it first compares the macro identifying chars and then the phrases." "The comparison function used for sorting." (let (ca cb pa pb c-p p-p) (if (string-match reftex-index-phrases-phrase-regexp12 a) - (progn - ;; Extract macro char and phrase-or-key for a - (setq ca (match-string 1 a) - pa (downcase - (or (and reftex-index-phrases-sort-prefers-entry - (match-string 6 a)) - (match-string 3 a)))) - (if (string-match reftex-index-phrases-phrase-regexp12 b) - (progn - ;; Extract macro char and phrase-or-key for b - (setq cb (match-string 1 b) - pb (downcase - (or (and reftex-index-phrases-sort-prefers-entry - (match-string 6 b)) - (match-string 3 b)))) - (setq c-p (string< ca cb) - p-p (string< pa pb)) - ;; Do the right comparison, based on the value of `chars-first' - ;; `chars-first' is bound locally in the calling function - (if chars-first - (if (string= ca cb) p-p c-p) - (if (string= pa pb) c-p p-p))))) + (progn + ;; Extract macro char and phrase-or-key for a + (setq ca (match-string 1 a) + pa (downcase + (or (and reftex-index-phrases-sort-prefers-entry + (match-string 6 a)) + (match-string 3 a)))) + (if (string-match reftex-index-phrases-phrase-regexp12 b) + (progn + ;; Extract macro char and phrase-or-key for b + (setq cb (match-string 1 b) + pb (downcase + (or (and reftex-index-phrases-sort-prefers-entry + (match-string 6 b)) + (match-string 3 b)))) + (setq c-p (string< ca cb) + p-p (string< pa pb)) + ;; Do the right comparison, based on the value of `chars-first' + ;; `chars-first' is bound locally in the calling function + (if chars-first + (if (string= ca cb) p-p c-p) + (if (string= pa pb) c-p p-p))))) ;; If line a does not match, the answer we return determines ;; if non-matching lines are collected at the beginning. ;; When we return t here, non-matching lines form @@ -1726,22 +1726,22 @@ it first compares the macro identifying chars and then the phrases." (not reftex-index-phrases-sort-in-blocks)))) (defvar reftex-index-phrases-menu) -(defun reftex-index-make-phrase-regexp (phrase &optional - as-words allow-newline) +(defun reftex-index-make-phrase-regexp (phrase &optional + as-words allow-newline) "Return a regexp matching PHRASE, even if distributed over lines. With optional arg AS-WORDS, require word boundary at beginning and end. With optional arg ALLOW-NEWLINE, allow single newline between words." (let* ((words (split-string phrase)) - (space-re (if allow-newline - "\\([ \t]*\\(\n[ \t]*\\)?\\|[ \t]\\)" - "\\([ \t]+\\)"))) + (space-re (if allow-newline + "\\([ \t]*\\(\n[ \t]*\\)?\\|[ \t]\\)" + "\\([ \t]+\\)"))) (concat (if (and as-words (string-match "\\`\\w" (car words))) - "\\<" "") - (mapconcat (lambda (w) (regexp-quote (downcase w))) - words space-re) - (if (and as-words - (string-match "\\w\\'" (nth (1- (length words)) words))) - "\\>" "")))) + "\\<" "") + (mapconcat (lambda (w) (regexp-quote (downcase w))) + words space-re) + (if (and as-words + (string-match "\\w\\'" (nth (1- (length words)) words))) + "\\>" "")))) (defun reftex-index-simplify-phrase (phrase) "Make phrase single spaces and single line." @@ -1752,40 +1752,40 @@ With optional arg ALLOW-NEWLINE, allow single newline between words." When SUB ins non-nil, the regexp will also match when PHRASE is a subphrase of another phrase. The regexp works lonly in the phrase buffer." (concat (if sub "^\\S-?\t\\([^\t\n]*" "^\\S-?\t") - (mapconcat 'regexp-quote (split-string phrase) " +") - (if sub "[^\t\n]*\\)\\([\t\n]\\|$\\)" " *\\([\t\n]\\|$\\)"))) + (mapconcat 'regexp-quote (split-string phrase) " +") + (if sub "[^\t\n]*\\)\\([\t\n]\\|$\\)" " *\\([\t\n]\\|$\\)"))) (defun reftex-index-make-replace-string (macro-fmt match index-key - &optional repeat mathp) + &optional repeat mathp) "Return the string which can be used as replacement. Treats the logical `and' for index phrases." (let ((index-keys (split-string (or index-key match) - reftex-index-phrases-logical-and-regexp))) + reftex-index-phrases-logical-and-regexp))) (concat - (mapconcat (lambda (x) - (format macro-fmt - (format (if mathp reftex-index-math-format "%s") x))) - index-keys "") + (mapconcat (lambda (x) + (format macro-fmt + (format (if mathp reftex-index-math-format "%s") x))) + index-keys "") (if repeat (reftex-index-simplify-phrase match) "")))) (defun reftex-query-index-phrase-globally (files &rest args) "Call `reftex-query-index-phrase' for all files in FILES." (let ((win-conf (current-window-configuration)) - (file)) + (file)) (unless files (error "No files")) (unwind-protect - (progn - (switch-to-buffer-other-window (reftex-get-file-buffer-force - (car files))) - (catch 'no-more-files - (while (setq file (pop files)) - (switch-to-buffer (reftex-get-file-buffer-force file)) - (save-excursion - (save-restriction - (unless (stringp reftex-index-phrases-restrict-file) - (widen)) - (goto-char (point-min)) - (apply 'reftex-query-index-phrase args)))))) + (progn + (switch-to-buffer-other-window (reftex-get-file-buffer-force + (car files))) + (catch 'no-more-files + (while (setq file (pop files)) + (switch-to-buffer (reftex-get-file-buffer-force file)) + (save-excursion + (save-restriction + (unless (stringp reftex-index-phrases-restrict-file) + (widen)) + (goto-char (point-min)) + (apply 'reftex-query-index-phrase args)))))) (reftex-unhighlight 0) (set-window-configuration win-conf)))) @@ -1806,7 +1806,7 @@ C-g Abort" (defvar replace-count) (defun reftex-query-index-phrase (phrase macro-fmt &optional - index-key repeat as-words) + index-key repeat as-words) "Search through buffer for PHRASE, and offer to replace it with an indexed version. The index version is derived by applying `format' with MACRO-FMT to INDEX-KEY or PHRASE. When REPEAT is non-nil, the PHRASE is inserted @@ -1814,140 +1814,142 @@ again after the macro. AS-WORDS means, the search for PHRASE should require word boundaries at both ends." (let* ((re (reftex-index-make-phrase-regexp phrase as-words 'allow-newline)) - (case-fold-search reftex-index-phrases-case-fold-search) - (index-keys (split-string - (or index-key phrase) - reftex-index-phrases-logical-or-regexp)) - (nkeys (length index-keys)) - (ckey (nth 0 index-keys)) - (all-yes nil) - match rpl char beg end mathp) + (case-fold-search reftex-index-phrases-case-fold-search) + (index-keys (split-string + (or index-key phrase) + reftex-index-phrases-logical-or-regexp)) + (nkeys (length index-keys)) + (ckey (nth 0 index-keys)) + (all-yes nil) + match rpl char beg end mathp) (unwind-protect - (while (re-search-forward re nil t) - (catch 'next-match - (if (and (fboundp reftex-index-verify-function) - (not (funcall reftex-index-verify-function))) - (throw 'next-match nil)) - (setq match (match-string 0)) - (setq mathp - (save-match-data - (condition-case nil (texmathp) (error nil)))) - (setq beg (car (match-data)) - end (nth 1 (match-data))) - (if (and reftex-index-phrases-skip-indexed-matches - (save-match-data - (reftex-index-phrase-match-is-indexed beg - end))) - (throw 'next-match nil)) - (reftex-highlight 0 (match-beginning 0) (match-end 0)) - (setq rpl - (save-match-data - (reftex-index-make-replace-string - macro-fmt (match-string 0) ckey repeat mathp))) - (while - (not - (catch 'loop - (message "REPLACE: %s? (yn!qoe%s?)" - rpl - (if (> nkeys 1) - (concat "1-" (int-to-string nkeys)) - "")) - (setq char (if all-yes ?y (read-char-exclusive))) - (cond ((member char '(?y ?Y ?\ )) - ;; Yes! - (replace-match rpl t t) - (incf replace-count) - ;; See if we should insert newlines to shorten lines - (and reftex-index-phrases-wrap-long-lines - (reftex-index-phrases-fixup-line beg end)) - (throw 'loop t)) - ((member char '(?n ?N ?\C-h ?\C-?));; FIXME: DEL - ;; No - (throw 'loop t)) - ((equal char ?!) - ;; Yes for all in this buffer - (setq all-yes t)) - ((equal char ?q) - ;; Stop this one in this file - (goto-char (point-max)) - (throw 'loop t)) - ((equal char ?Q) - ;; Stop this one - (throw 'no-more-files t)) - ((equal char ?s) - (save-buffer)) - ((equal char ?S) - (reftex-save-all-document-buffers)) - ((equal char ?\C-g) - (keyboard-quit)) - ((member char '(?o ?O)) - ;; Select a differnt macro - (let* ((nc (reftex-index-select-phrases-macro 2)) - (macro-data - (cdr (assoc nc reftex-index-phrases-macro-data))) - (macro-fmt (car macro-data)) - (repeat (nth 1 macro-data))) - (if macro-data - (setq rpl (save-match-data - (reftex-index-make-replace-string - macro-fmt match - ckey repeat mathp))) - (ding)))) - ((equal char ?\?) - ;; Help - (with-output-to-temp-buffer "*Help*" - (princ reftex-index-phrases-help))) - ((equal char ?\C-r) - ;; Recursive edit - (save-match-data - (save-excursion - (message - (substitute-command-keys - "Recursive edit. Resume with \\[exit-recursive-edit]")) - (recursive-edit)))) - ((equal char ?e) - (setq rpl (read-string "Edit: " rpl))) - ((equal char ?0) - (setq ckey (or index-key phrase) - rpl (save-match-data - (reftex-index-make-replace-string - macro-fmt match ckey repeat mathp)))) - ((and (> char ?0) - (<= char (+ ?0 nkeys))) - (setq ckey (nth (1- (- char ?0)) index-keys) - rpl (save-match-data - (reftex-index-make-replace-string - macro-fmt match ckey repeat mathp)))) - (t (ding))) - nil))))) + (while (re-search-forward re nil t) + (catch 'next-match + (if (and (fboundp reftex-index-verify-function) + (not (funcall reftex-index-verify-function))) + (throw 'next-match nil)) + (setq match (match-string 0)) + (setq mathp + (save-match-data + (condition-case nil (texmathp) (error nil)))) + (setq beg (car (match-data)) + end (nth 1 (match-data))) + (if (and reftex-index-phrases-skip-indexed-matches + (save-match-data + (reftex-index-phrase-match-is-indexed beg + end))) + (throw 'next-match nil)) + (reftex-highlight 0 (match-beginning 0) (match-end 0)) + (setq rpl + (save-match-data + (reftex-index-make-replace-string + macro-fmt (match-string 0) ckey repeat mathp))) + (while + (not + (catch 'loop + (message "REPLACE: %s? (yn!qoe%s?)" + rpl + (if (> nkeys 1) + (concat "1-" (int-to-string nkeys)) + "")) + (setq char (if all-yes ?y (read-char-exclusive))) + (cond ((member char '(?y ?Y ?\ )) + ;; Yes! + (replace-match rpl t t) + (incf replace-count) + ;; See if we should insert newlines to shorten lines + (and reftex-index-phrases-wrap-long-lines + (reftex-index-phrases-fixup-line beg end)) + (throw 'loop t)) + ((member char '(?n ?N ?\C-h ?\C-?));; FIXME: DEL + ;; No + (throw 'loop t)) + ((equal char ?!) + ;; Yes for all in this buffer + (setq all-yes t)) + ((equal char ?q) + ;; Stop this one in this file + (goto-char (point-max)) + (throw 'loop t)) + ((equal char ?Q) + ;; Stop this one + (throw 'no-more-files t)) + ((equal char ?s) + (save-buffer)) + ((equal char ?S) + (reftex-save-all-document-buffers)) + ((equal char ?\C-g) + (keyboard-quit)) + ((member char '(?o ?O)) + ;; Select a differnt macro + (let* ((nc (reftex-index-select-phrases-macro 2)) + (macro-data + (cdr (assoc nc reftex-index-phrases-macro-data))) + (macro-fmt (car macro-data)) + (repeat (nth 1 macro-data))) + (if macro-data + (setq rpl (save-match-data + (reftex-index-make-replace-string + macro-fmt match + ckey repeat mathp))) + (ding)))) + ((equal char ?\?) + ;; Help + (with-output-to-temp-buffer "*Help*" + (princ reftex-index-phrases-help))) + ((equal char ?\C-r) + ;; Recursive edit + (save-match-data + (save-excursion + (message + (substitute-command-keys + "Recursive edit. Resume with \\[exit-recursive-edit]")) + (recursive-edit)))) + ((equal char ?e) + (setq rpl (read-string "Edit: " rpl))) + ((equal char ?0) + (setq ckey (or index-key phrase) + rpl (save-match-data + (reftex-index-make-replace-string + macro-fmt match ckey repeat mathp)))) + ((and (> char ?0) + (<= char (+ ?0 nkeys))) + (setq ckey (nth (1- (- char ?0)) index-keys) + rpl (save-match-data + (reftex-index-make-replace-string + macro-fmt match ckey repeat mathp)))) + (t (ding))) + nil))))) (message "") (setq all-yes nil) (reftex-unhighlight 0)))) (defun reftex-index-phrase-match-is-indexed (beg end) + ;; CHeck if match is in an argument of an index macro, or if an + ;; index macro is directly attached to the match. (save-excursion (goto-char end) - (let* ((this-macro (car (reftex-what-macro 1))) - (before-char (char-before beg)) - (after-char (char-after end)) - (before-macro - (and (> beg 2) - (goto-char (1- beg)) - (memq (char-after (point)) '(?\] ?\})) - (car (reftex-what-macro 1)))) - (after-macro - (and (goto-char end) - (looking-at "\\(\\\\[a-zA-Z]+\\*?\\)[[{]") - (match-string 1)))) - (or (and this-macro - (member before-char '(?\{ ?\[)) - (member after-char '(?\} ?\])) - (member this-macro reftex-macros-with-index)) - (and before-macro - (member before-macro reftex-macros-with-index)) - (and after-macro - (member after-macro reftex-macros-with-index)))))) - + (let* ((all-macros (reftex-what-macro t)) + (this-macro (car (car all-macros))) + (before-macro + (and (> beg 2) + (goto-char (1- beg)) + (memq (char-after (point)) '(?\] ?\})) + (car (reftex-what-macro 1)))) + (after-macro + (and (goto-char end) + (looking-at "\\(\\\\[a-zA-Z]+\\*?\\)[[{]") + (match-string 1))) + macro) + (or (catch 'matched + (while (setq macro (pop all-macros)) + (if (member (car macro) reftex-macros-with-index) + (throw 'matched t))) + nil) + (and before-macro + (member before-macro reftex-macros-with-index)) + (and after-macro + (member after-macro reftex-macros-with-index)))))) (defun reftex-index-phrases-fixup-line (beg end) "Insert newlines before BEG and/or after END to shorten line." @@ -1961,38 +1963,38 @@ both ends." (goto-char beg) (skip-chars-backward "^ \n") (if (and (equal (preceding-char) ?\ ) - (string-match "\\S-" (buffer-substring bol (point)))) - (setq space1 (1- (point)))) + (string-match "\\S-" (buffer-substring bol (point)))) + (setq space1 (1- (point)))) (goto-char end) (skip-chars-forward "^ \n") (if (and (equal (following-char) ?\ ) - (string-match "\\S-" (buffer-substring (point) eol))) - (setq space2 (point))) + (string-match "\\S-" (buffer-substring (point) eol))) + (setq space2 (point))) ;; Now check what we have and insert the newlines (if (<= (- eol bol) fill-column) - ;; Line is already short - nil - (cond - ((and (not space1) (not space2))) ; No spaces available - ((not space2) ; Do space1 - (reftex-index-phrases-replace-space space1)) - ((not space1) ; Do space2 - (reftex-index-phrases-replace-space space2)) - (t ; We have both spaces - (let ((l1 (- space1 bol)) - (l2 (- space2 space1)) - (l3 (- eol space2))) - (if (> l2 fill-column) - ;; The central part alone is more than one line - (progn - (reftex-index-phrases-replace-space space1) - (reftex-index-phrases-replace-space space2)) - (if (> (+ l1 l2) fill-column) - ;; Need to split beginning - (reftex-index-phrases-replace-space space1)) - (if (> (+ l2 l3) fill-column) - ;; Need to split end - (reftex-index-phrases-replace-space space2)))))))))) + ;; Line is already short + nil + (cond + ((and (not space1) (not space2))) ; No spaces available + ((not space2) ; Do space1 + (reftex-index-phrases-replace-space space1)) + ((not space1) ; Do space2 + (reftex-index-phrases-replace-space space2)) + (t ; We have both spaces + (let ((l1 (- space1 bol)) + (l2 (- space2 space1)) + (l3 (- eol space2))) + (if (> l2 fill-column) + ;; The central part alone is more than one line + (progn + (reftex-index-phrases-replace-space space1) + (reftex-index-phrases-replace-space space2)) + (if (> (+ l1 l2) fill-column) + ;; Need to split beginning + (reftex-index-phrases-replace-space space1)) + (if (> (+ l2 l3) fill-column) + ;; Need to split end + (reftex-index-phrases-replace-space space2)))))))))) (defun reftex-index-phrases-replace-space (pos) "If there is a space at POS, replace it with a newline char. @@ -2005,34 +2007,34 @@ Does not do a save-excursion." (defun reftex-index-select-phrases-macro (&optional delay) "Offer a list of possible index macros and have the user select one." (let* ((prompt (concat "Select macro: [" - (mapconcat (lambda (x) (char-to-string (car x))) - reftex-index-phrases-macro-data "") - "] ")) - (help (concat "Select an indexing macro\n========================\n" - (mapconcat (lambda (x) - (format " [%c] %s" - (car x) (nth 1 x))) - reftex-index-phrases-macro-data "\n")))) + (mapconcat (lambda (x) (char-to-string (car x))) + reftex-index-phrases-macro-data "") + "] ")) + (help (concat "Select an indexing macro\n========================\n" + (mapconcat (lambda (x) + (format " [%c] %s" + (car x) (nth 1 x))) + reftex-index-phrases-macro-data "\n")))) (reftex-select-with-char prompt help delay))) ;; Keybindings and Menu for phrases buffer (loop for x in '(("\C-c\C-c" . reftex-index-phrases-save-and-return) - ("\C-c\C-x" . reftex-index-this-phrase) - ("\C-c\C-f" . reftex-index-next-phrase) - ("\C-c\C-r" . reftex-index-region-phrases) - ("\C-c\C-a" . reftex-index-all-phrases) - ("\C-c\C-d" . reftex-index-remaining-phrases) - ("\C-c\C-s" . reftex-index-sort-phrases) - ("\C-c\C-n" . reftex-index-new-phrase) - ("\C-c\C-m" . reftex-index-phrases-set-macro-key) - ("\C-c\C-i" . reftex-index-phrases-info) - ("\C-c\C-t" . reftex-index-find-next-conflict-phrase) - ("\C-i" . self-insert-command)) + ("\C-c\C-x" . reftex-index-this-phrase) + ("\C-c\C-f" . reftex-index-next-phrase) + ("\C-c\C-r" . reftex-index-region-phrases) + ("\C-c\C-a" . reftex-index-all-phrases) + ("\C-c\C-d" . reftex-index-remaining-phrases) + ("\C-c\C-s" . reftex-index-sort-phrases) + ("\C-c\C-n" . reftex-index-new-phrase) + ("\C-c\C-m" . reftex-index-phrases-set-macro-key) + ("\C-c\C-i" . reftex-index-phrases-info) + ("\C-c\C-t" . reftex-index-find-next-conflict-phrase) + ("\C-i" . self-insert-command)) do (define-key reftex-index-phrases-map (car x) (cdr x))) -(easy-menu-define +(easy-menu-define reftex-index-phrases-menu reftex-index-phrases-map "Menu for Phrases buffer" '("Phrases" @@ -2049,7 +2051,7 @@ Does not do a save-excursion." ["by Index Entry" (setq reftex-index-phrases-sort-prefers-entry t) :style radio :selected reftex-index-phrases-sort-prefers-entry] ["in Blocks" (setq reftex-index-phrases-sort-in-blocks - (not reftex-index-phrases-sort-in-blocks)) + (not reftex-index-phrases-sort-in-blocks)) :style toggle :selected reftex-index-phrases-sort-in-blocks]) ["Describe Phrase" reftex-index-phrases-info t] ["Next Phrase Conflict" reftex-index-find-next-conflict-phrase t] @@ -2063,20 +2065,21 @@ Does not do a save-excursion." "--" "Options" ["Match Whole Words" (setq reftex-index-phrases-search-whole-words - (not reftex-index-phrases-search-whole-words)) + (not reftex-index-phrases-search-whole-words)) :style toggle :selected reftex-index-phrases-search-whole-words] ["Case Sensitive Search" (setq reftex-index-phrases-case-fold-search - (not reftex-index-phrases-case-fold-search)) + (not reftex-index-phrases-case-fold-search)) :style toggle :selected (not - reftex-index-phrases-case-fold-search)] + reftex-index-phrases-case-fold-search)] ["Wrap Long Lines" (setq reftex-index-phrases-wrap-long-lines - (not reftex-index-phrases-wrap-long-lines)) + (not reftex-index-phrases-wrap-long-lines)) :style toggle :selected reftex-index-phrases-wrap-long-lines] ["Skip Indexed Matches" (setq reftex-index-phrases-skip-indexed-matches - (not reftex-index-phrases-skip-indexed-matches)) + (not reftex-index-phrases-skip-indexed-matches)) :style toggle :selected reftex-index-phrases-skip-indexed-matches]) "--" ["Save and Return" reftex-index-phrases-save-and-return t])) +;;; arch-tag: 4b2362af-c156-42c1-8932-ea2823e205c1 ;;; reftex-index.el ends here diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index a03c5b6646..534775bf5a 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el @@ -1,8 +1,8 @@ ;;; reftex-parse.el --- parser functions for RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.18 +;; Version: 4.21 ;; ;; This file is part of GNU Emacs. @@ -33,10 +33,10 @@ (defmacro reftex-with-special-syntax (&rest body) `(let ((saved-syntax (syntax-table))) (unwind-protect - (progn - (set-syntax-table reftex-syntax-table) - (let ((case-fold-search nil)) - ,@body)) + (progn + (set-syntax-table reftex-syntax-table) + (let ((case-fold-search nil)) + ,@body)) (set-syntax-table saved-syntax)))) (defun reftex-parse-one () @@ -68,12 +68,12 @@ (let* ((old-list (symbol-value reftex-docstruct-symbol)) (master (reftex-TeX-master-file)) - (true-master (file-truename master)) - (master-dir (file-name-as-directory (file-name-directory master))) + (true-master (file-truename master)) + (master-dir (file-name-as-directory (file-name-directory master))) (file (or file (buffer-file-name))) - (true-file (file-truename file)) - (bibview-cache (assq 'bibview-cache old-list)) - (index-tags (cdr (assq 'index-tags old-list))) + (true-file (file-truename file)) + (bibview-cache (assq 'bibview-cache old-list)) + (index-tags (cdr (assq 'index-tags old-list))) from-file appendix docstruct tmp) ;; Make sure replacement is really an option here @@ -97,9 +97,9 @@ ;; Find active toc entry and initialize section-numbers (setq reftex-active-toc (reftex-last-assoc-before-elt - 'toc (list 'bof from-file) old-list) - appendix (reftex-last-assoc-before-elt - 'appendix (list 'bof from-file) old-list)) + 'toc (list 'bof from-file) old-list) + appendix (reftex-last-assoc-before-elt + 'appendix (list 'bof from-file) old-list)) (reftex-init-section-numbers reftex-active-toc appendix) @@ -110,11 +110,11 @@ (reftex-with-special-syntax (save-window-excursion (save-excursion - (unwind-protect - (setq docstruct - (reftex-parse-from-file - from-file docstruct master-dir)) - (reftex-kill-temporary-buffers))))) + (unwind-protect + (setq docstruct + (reftex-parse-from-file + from-file docstruct master-dir)) + (reftex-kill-temporary-buffers))))) (message "Scanning document... done") @@ -141,27 +141,27 @@ (and index-tags (setq index-tags (sort index-tags 'string<))) (let ((index-tag-cell (assq 'index-tags docstruct))) (if index-tag-cell - (setcdr index-tag-cell index-tags) - (push (cons 'index-tags index-tags) docstruct))) + (setcdr index-tag-cell index-tags) + (push (cons 'index-tags index-tags) docstruct))) (unless (assq 'xr docstruct) (let* ((allxr (reftex-all-assq 'xr-doc docstruct)) - (alist (mapcar - (lambda (x) - (if (setq tmp (reftex-locate-file (nth 2 x) "tex" - master-dir)) - (cons (nth 1 x) tmp) - (message "Can't find external document %s" - (nth 2 x)) - nil)) - allxr)) - (alist (delq nil alist)) - (allprefix (delq nil (mapcar 'car alist))) - (regexp (if allprefix - (concat "\\`\\(" - (mapconcat 'identity allprefix "\\|") - "\\)") - "\\\\\\\\\\\\"))) ; this will never match - (push (list 'xr alist regexp) docstruct))) + (alist (mapcar + (lambda (x) + (if (setq tmp (reftex-locate-file (nth 2 x) "tex" + master-dir)) + (cons (nth 1 x) tmp) + (message "Can't find external document %s" + (nth 2 x)) + nil)) + allxr)) + (alist (delq nil alist)) + (allprefix (delq nil (mapcar 'car alist))) + (regexp (if allprefix + (concat "\\`\\(" + (mapconcat 'identity allprefix "\\|") + "\\)") + "\\\\\\\\\\\\"))) ; this will never match + (push (list 'xr alist regexp) docstruct))) (set reftex-docstruct-symbol docstruct) (put reftex-docstruct-symbol 'modified t))) @@ -201,8 +201,8 @@ of master file." (catch 'exit (setq file-found (reftex-locate-file file "tex" master-dir)) (if (and (not file-found) - (setq buf (reftex-get-buffer-visiting file))) - (setq file-found (buffer-file-name buf))) + (setq buf (reftex-get-buffer-visiting file))) + (setq file-found (buffer-file-name buf))) (unless file-found (push (list 'file-error file) docstruct) @@ -221,106 +221,106 @@ of master file." (setq file (buffer-file-name)) (push (list 'bof file) docstruct) - (reftex-with-special-syntax - (save-excursion - (save-restriction - (widen) - (goto-char 1) - - (while (re-search-forward regexp nil t) - - (cond - - ((match-end 1) - ;; It is a label - (push (reftex-label-info (reftex-match-string 1) file bound) - docstruct)) - - ((match-end 3) - ;; It is a section - (setq bound (point)) - - ;; Insert in List - (setq toc-entry (reftex-section-info file)) - (when toc-entry - ;; It can happen that section info returns nil - (setq level (nth 5 toc-entry)) - (setq highest-level (min highest-level level)) - (if (= level highest-level) - (message - "Scanning %s %s ..." - (car (rassoc level reftex-section-levels-all)) - (nth 6 toc-entry))) - - (push toc-entry docstruct) - (setq reftex-active-toc toc-entry))) - - ((match-end 7) - ;; It's an include or input - (setq include-file (reftex-match-string 7)) - ;; Test if this file should be ignored - (unless (delq nil (mapcar - (lambda (x) (string-match x include-file)) - reftex-no-include-regexps)) - ;; Parse it - (setq docstruct - (reftex-parse-from-file - include-file - docstruct master-dir)))) - - ((match-end 9) - ;; Appendix starts here - (reftex-init-section-numbers nil t) - (push (cons 'appendix t) docstruct)) - - ((match-end 10) - ;; Index entry - (when reftex-support-index - (setq index-entry (reftex-index-info file)) - (when index-entry - (add-to-list 'index-tags (nth 1 index-entry)) - (push index-entry docstruct)))) - - ((match-end 11) - ;; A macro with label - (save-excursion - (let* ((mac (reftex-match-string 11)) - (label (progn (goto-char (match-end 11)) - (save-match-data - (reftex-no-props - (reftex-nth-arg-wrapper - mac))))) - (typekey (nth 1 (assoc mac reftex-env-or-mac-alist))) - (entry (progn (if typekey - ;; A typing macro - (goto-char (match-end 0)) - ;; A neutral macro - (goto-char (match-end 11)) - (reftex-move-over-touching-args)) - (reftex-label-info - label file bound nil nil)))) - (push entry docstruct)))) - (t (error "This should not happen (reftex-parse-from-file)"))) - ) - - ;; Find bibliography statement - (when (setq tmp (reftex-locate-bibliography-files master-dir)) - (push (cons 'bib tmp) docstruct)) - - (goto-char 1) - (when (re-search-forward - "\\(\\`\\|[\n\r]\\)[ \t]*\\\\begin{thebibliography}" nil t) - (push (cons 'thebib file) docstruct)) - - ;; Find external document specifications - (goto-char 1) - (while (re-search-forward "[\n\r][ \t]*\\\\externaldocument\\(\\[\\([^]]*\\)\\]\\)?{\\([^}]+\\)}" nil t) - (push (list 'xr-doc (reftex-match-string 2) - (reftex-match-string 3)) - docstruct)) - - ;; End of file mark - (push (list 'eof file) docstruct))))) + (reftex-with-special-syntax + (save-excursion + (save-restriction + (widen) + (goto-char 1) + + (while (re-search-forward regexp nil t) + + (cond + + ((match-end 1) + ;; It is a label + (push (reftex-label-info (reftex-match-string 1) file bound) + docstruct)) + + ((match-end 3) + ;; It is a section + (setq bound (point)) + + ;; Insert in List + (setq toc-entry (reftex-section-info file)) + (when toc-entry + ;; It can happen that section info returns nil + (setq level (nth 5 toc-entry)) + (setq highest-level (min highest-level level)) + (if (= level highest-level) + (message + "Scanning %s %s ..." + (car (rassoc level reftex-section-levels-all)) + (nth 6 toc-entry))) + + (push toc-entry docstruct) + (setq reftex-active-toc toc-entry))) + + ((match-end 7) + ;; It's an include or input + (setq include-file (reftex-match-string 7)) + ;; Test if this file should be ignored + (unless (delq nil (mapcar + (lambda (x) (string-match x include-file)) + reftex-no-include-regexps)) + ;; Parse it + (setq docstruct + (reftex-parse-from-file + include-file + docstruct master-dir)))) + + ((match-end 9) + ;; Appendix starts here + (reftex-init-section-numbers nil t) + (push (cons 'appendix t) docstruct)) + + ((match-end 10) + ;; Index entry + (when reftex-support-index + (setq index-entry (reftex-index-info file)) + (when index-entry + (add-to-list 'index-tags (nth 1 index-entry)) + (push index-entry docstruct)))) + + ((match-end 11) + ;; A macro with label + (save-excursion + (let* ((mac (reftex-match-string 11)) + (label (progn (goto-char (match-end 11)) + (save-match-data + (reftex-no-props + (reftex-nth-arg-wrapper + mac))))) + (typekey (nth 1 (assoc mac reftex-env-or-mac-alist))) + (entry (progn (if typekey + ;; A typing macro + (goto-char (match-end 0)) + ;; A neutral macro + (goto-char (match-end 11)) + (reftex-move-over-touching-args)) + (reftex-label-info + label file bound nil nil)))) + (push entry docstruct)))) + (t (error "This should not happen (reftex-parse-from-file)"))) + ) + + ;; Find bibliography statement + (when (setq tmp (reftex-locate-bibliography-files master-dir)) + (push (cons 'bib tmp) docstruct)) + + (goto-char 1) + (when (re-search-forward + "\\(\\`\\|[\n\r]\\)[ \t]*\\\\begin{thebibliography}" nil t) + (push (cons 'thebib file) docstruct)) + + ;; Find external document specifications + (goto-char 1) + (while (re-search-forward "[\n\r][ \t]*\\\\externaldocument\\(\\[\\([^]]*\\)\\]\\)?{\\([^}]+\\)}" nil t) + (push (list 'xr-doc (reftex-match-string 2) + (reftex-match-string 3)) + docstruct)) + + ;; End of file mark + (push (list 'eof file) docstruct))))) ;; Kill the scanned buffer (reftex-kill-temporary-buffers next-buf)) @@ -330,31 +330,31 @@ of master file." (defun reftex-locate-bibliography-files (master-dir &optional files) ;; Scan buffer for bibliography macro and return file list. - + (unless files (save-excursion (goto-char (point-min)) (if (re-search-forward - (concat -; "\\(\\`\\|[\n\r]\\)[^%]*\\\\\\(" - "\\(^\\)[^%]*\\\\\\(" - (mapconcat 'identity reftex-bibliography-commands "\\|") - "\\){[ \t]*\\([^}]+\\)") nil t) - (setq files - (split-string (reftex-match-string 3) - "[ \t\n\r]*,[ \t\n\r]*"))))) + (concat +; "\\(\\`\\|[\n\r]\\)[^%]*\\\\\\(" + "\\(^\\)[^%\n\r]*\\\\\\(" + (mapconcat 'identity reftex-bibliography-commands "\\|") + "\\){[ \t]*\\([^}]+\\)") nil t) + (setq files + (split-string (reftex-match-string 3) + "[ \t\n\r]*,[ \t\n\r]*"))))) (when files - (setq files - (mapcar - (lambda (x) - (if (or (member x reftex-bibfile-ignore-list) - (delq nil (mapcar (lambda (re) (string-match re x)) - reftex-bibfile-ignore-regexps))) - ;; excluded file - nil - ;; find the file - (reftex-locate-file x "bib" master-dir))) - files)) + (setq files + (mapcar + (lambda (x) + (if (or (member x reftex-bibfile-ignore-list) + (delq nil (mapcar (lambda (re) (string-match re x)) + reftex-bibfile-ignore-regexps))) + ;; excluded file + nil + ;; find the file + (reftex-locate-file x "bib" master-dir))) + files)) (delq nil files))) (defun reftex-replace-label-list-segment (old insert &optional entirely) @@ -387,24 +387,24 @@ of master file." ;; Carefull: This function expects the match-data to be still in place! (let* ((marker (set-marker (make-marker) (1- (match-beginning 3)))) (macro (reftex-match-string 3)) - (prefix (save-match-data - (if (string-match "begin{\\([^}]+\\)}" macro) - (match-string 1 macro)))) - (level-exp (cdr (assoc macro reftex-section-levels-all))) + (prefix (save-match-data + (if (string-match "begin{\\([^}]+\\)}" macro) + (match-string 1 macro)))) + (level-exp (cdr (assoc macro reftex-section-levels-all))) (level (if (symbolp level-exp) - (save-match-data (funcall level-exp)) - level-exp)) - (star (= ?* (char-after (match-end 3)))) - (unnumbered (or star (< level 0))) - (level (abs level)) + (save-match-data (funcall level-exp)) + level-exp)) + (star (= ?* (char-after (match-end 3)))) + (unnumbered (or star (< level 0))) + (level (abs level)) (section-number (reftex-section-number level unnumbered)) - (text1 (save-match-data - (save-excursion - (reftex-context-substring prefix)))) + (text1 (save-match-data + (save-excursion + (reftex-context-substring prefix)))) (literal (buffer-substring-no-properties (1- (match-beginning 3)) (min (point-max) (+ (match-end 0) (length text1) 1)))) - ;; Literal can be too short since text1 too short. No big problem. + ;; Literal can be too short since text1 too short. No big problem. (text (reftex-nicify-text text1))) ;; Add section number and indentation @@ -413,7 +413,7 @@ of master file." (make-string (* reftex-level-indent level) ?\ ) (if (nth 1 reftex-label-menu-flags) ; section number flag (concat section-number " ")) - (if prefix (concat (capitalize prefix) ": ") "") + (if prefix (concat (capitalize prefix) ": ") "") text)) (list 'toc "toc" text file marker level section-number literal (marker-position marker)))) @@ -426,12 +426,12 @@ of master file." (reftex-support-index t) ((y-or-n-p "Turn on index support and rescan entire document? ") (setq reftex-support-index 'demanded - current-prefix-arg '(16))) + current-prefix-arg '(16))) (t (if abort - (error "No index support") - (message "No index support") - (ding) - (sit-for 1))))) + (error "No index support") + (message "No index support") + (ding) + (sit-for 1))))) (defun reftex-index-info-safe (file) (reftex-with-special-syntax @@ -443,49 +443,49 @@ of master file." ;; Carefull: This function expects the match-data to be still in place! (catch 'exit (let* ((macro (reftex-match-string 10)) - (bom (match-beginning 10)) - (boa (match-end 10)) - (entry (or (assoc macro reftex-index-macro-alist) - (throw 'exit nil))) - (exclude (nth 3 entry)) - ;; The following is a test if this match should be excluded - (test-dummy (and (fboundp exclude) - (funcall exclude) - (throw 'exit nil))) - (itag (nth 1 entry)) - (prefix (nth 2 entry)) - (index-tag - (cond ((stringp itag) itag) - ((integerp itag) - (progn (goto-char boa) - (or (reftex-nth-arg itag (nth 6 entry)) "idx"))) - (t "idx"))) - (arg (or (progn (goto-char boa) - (reftex-nth-arg (nth 5 entry) (nth 6 entry))) - "")) - (end-of-args (progn (goto-char boa) - (reftex-move-over-touching-args) - (point))) - (end-of-context (progn (skip-chars-forward "^ \t\n\r") (point))) - (begin-of-context - (progn (goto-char bom) - (skip-chars-backward "^ \t\r\n") - (point))) - (context (buffer-substring-no-properties - begin-of-context end-of-context)) - (key-end (if (string-match reftex-index-key-end-re arg) - (1+ (match-beginning 0)))) - (rawkey (substring arg 0 key-end)) - - (key (if prefix (concat prefix rawkey) rawkey)) - (sortkey (downcase key)) - (showkey (mapconcat 'identity - (split-string key reftex-index-level-re) - " ! "))) + (bom (match-beginning 10)) + (boa (match-end 10)) + (entry (or (assoc macro reftex-index-macro-alist) + (throw 'exit nil))) + (exclude (nth 3 entry)) + ;; The following is a test if this match should be excluded + (test-dummy (and (fboundp exclude) + (funcall exclude) + (throw 'exit nil))) + (itag (nth 1 entry)) + (prefix (nth 2 entry)) + (index-tag + (cond ((stringp itag) itag) + ((integerp itag) + (progn (goto-char boa) + (or (reftex-nth-arg itag (nth 6 entry)) "idx"))) + (t "idx"))) + (arg (or (progn (goto-char boa) + (reftex-nth-arg (nth 5 entry) (nth 6 entry))) + "")) + (end-of-args (progn (goto-char boa) + (reftex-move-over-touching-args) + (point))) + (end-of-context (progn (skip-chars-forward "^ \t\n\r") (point))) + (begin-of-context + (progn (goto-char bom) + (skip-chars-backward "^ \t\r\n") + (point))) + (context (buffer-substring-no-properties + begin-of-context end-of-context)) + (key-end (if (string-match reftex-index-key-end-re arg) + (1+ (match-beginning 0)))) + (rawkey (substring arg 0 key-end)) + + (key (if prefix (concat prefix rawkey) rawkey)) + (sortkey (downcase key)) + (showkey (mapconcat 'identity + (split-string key reftex-index-level-re) + " ! "))) (goto-char end-of-args) ;; 0 1 2 3 4 5 6 7 8 9 (list 'index index-tag context file bom arg key showkey sortkey key-end)))) - + (defun reftex-short-context (env parse &optional bound derive) ;; Get about one line of useful context for the label definition at point. @@ -516,9 +516,9 @@ of master file." (match-string 1 (nth 7 reftex-active-toc))) "SECTION HEADING NOT FOUND"))) (save-excursion - (goto-char reftex-default-context-position) - (unless (eq (string-to-char env) ?\\) - (reftex-move-over-touching-args)) + (goto-char reftex-default-context-position) + (unless (eq (string-to-char env) ?\\) + (reftex-move-over-touching-args)) (reftex-context-substring)))) ((stringp parse) @@ -593,7 +593,7 @@ of master file." ((looking-at (reftex-make-regexp-allow-for-ctrl-m (nth 7 (car list)))) ;; Same title: remember, but keep looking - (setq rtn-if-no-other (car list))))) + (setq rtn-if-no-other (car list))))) (pop list)) rtn1)) ((match-end 7) @@ -601,35 +601,35 @@ of master file." (car (member (list 'eof (reftex-locate-file (reftex-match-string 7) "tex" - (cdr (assq 'master-dir docstruct)))) + (cdr (assq 'master-dir docstruct)))) docstruct))) - ((match-end 9) - (assq 'appendix (symbol-value reftex-docstruct-symbol))) - ((match-end 10) - ;; Index entry - (when reftex-support-index - (let* ((index-info (save-excursion - (reftex-index-info-safe nil))) - (list (member (list 'bof (buffer-file-name)) - docstruct)) - (endelt (car (member (list 'eof (buffer-file-name)) - list))) - dist last-dist last (n 0)) - ;; Check all index entries with equal text - (while (and list (not (eq endelt (car list)))) - (when (and (eq (car (car list)) 'index) - (string= (nth 2 index-info) - (nth 2 (car list)))) - (incf n) - (setq dist (abs (- (point) (nth 4 (car list))))) - (if (or (not last-dist) (< dist last-dist)) - (setq last-dist dist last (car list)))) - (setq list (cdr list))) - ;; We are sure if we have only one, or a zero distance - (cond ((or (= n 1) (= dist 0)) last) - ((> n 1) (setq cnt 2) last) - (t nil))))) - ((match-end 11) + ((match-end 9) + (assq 'appendix (symbol-value reftex-docstruct-symbol))) + ((match-end 10) + ;; Index entry + (when reftex-support-index + (let* ((index-info (save-excursion + (reftex-index-info-safe nil))) + (list (member (list 'bof (buffer-file-name)) + docstruct)) + (endelt (car (member (list 'eof (buffer-file-name)) + list))) + dist last-dist last (n 0)) + ;; Check all index entries with equal text + (while (and list (not (eq endelt (car list)))) + (when (and (eq (car (car list)) 'index) + (string= (nth 2 index-info) + (nth 2 (car list)))) + (incf n) + (setq dist (abs (- (point) (nth 4 (car list))))) + (if (or (not last-dist) (< dist last-dist)) + (setq last-dist dist last (car list)))) + (setq list (cdr list))) + ;; We are sure if we have only one, or a zero distance + (cond ((or (= n 1) (equal dist 0)) last) + ((> n 1) (setq cnt 2) last) + (t nil))))) + ((match-end 11) (save-excursion (goto-char (match-end 11)) (assoc (reftex-no-props @@ -641,88 +641,88 @@ of master file." ;; Check if there was only a by-name match for the section. (when (and (not rtn) rtn-if-no-other) (setq rtn rtn-if-no-other - cnt 2)) + cnt 2)) (cons rtn (eq cnt 1)))) (defun reftex-notice-new (&optional n force) "Hook to handshake with RefTeX after something new has been inserted." ;; Add a new entry to the docstruct list. If it is a section, renumber ;; the following sections. - ;; FIXME: Put in a WHAT parameter + ;; FIXME: Put in a WHAT parameter and search backward until one is found. ;; When N is given, go back that many matches of reftex-everything-regexp ;; When FORCE is non-nil, also insert if `reftex-where-am-I' was uncertain. (condition-case nil (catch 'exit - (unless reftex-mode (throw 'exit nil)) - (reftex-access-scan-info) - (let* ((docstruct (symbol-value reftex-docstruct-symbol)) - here-I-am appendix tail entry star level - section-number context) + (unless reftex-mode (throw 'exit nil)) + (reftex-access-scan-info) + (let* ((docstruct (symbol-value reftex-docstruct-symbol)) + here-I-am appendix tail entry star level + section-number context) (save-excursion (when (re-search-backward (reftex-everything-regexp) nil t (or n 1)) - ;; Find where we are - (setq here-I-am (reftex-where-am-I)) - (or here-I-am (throw 'exit nil)) - (unless (or force (cdr here-I-am)) (throw 'exit nil)) - (setq tail (memq (car here-I-am) docstruct)) - (or tail (throw 'exit nil)) - (setq reftex-active-toc (reftex-last-assoc-before-elt - 'toc (car here-I-am) docstruct) - appendix (reftex-last-assoc-before-elt - 'appendix (car here-I-am) docstruct)) - - ;; Initialize section numbers - (if (eq (car (car here-I-am)) 'appendix) - (reftex-init-section-numbers nil t) - (reftex-init-section-numbers reftex-active-toc appendix)) - - ;; Match the section command - (when (re-search-forward (reftex-everything-regexp) nil t) - (cond - ((match-end 1) - (push (reftex-label-info (reftex-match-string 1) buffer-file-name) - (cdr tail))) - - ((match-end 3) - (setq star (= ?* (char-after (match-end 3))) - entry (reftex-section-info (buffer-file-name)) - level (nth 5 entry)) - ;; Insert the section info - (push entry (cdr tail)) - - ;; We are done unless we use section numbers - (unless (nth 1 reftex-label-menu-flags) (throw 'exit nil)) - - ;; Update the remaining toc items - (setq tail (cdr tail)) - (while (and (setq tail (memq (assq 'toc (cdr tail)) tail)) - (setq entry (car tail)) - (>= (nth 5 entry) level)) - (setq star (string-match "\\*" (nth 6 entry)) - context (nth 2 entry) - section-number - (reftex-section-number (nth 5 entry) star)) - (when (string-match "\\`\\([ \t]*\\)\\([.0-9A-Z]+\\)\\(.*\\)" - context) - (when (and (not appendix) - (>= (string-to-char (match-string 2)) ?A)) - ;; Just entered the appendex. Get out. - (throw 'exit nil)) - - ;; Change the section number. - (setf (nth 2 entry) - (concat (match-string 1 context) - section-number - (match-string 3 context)))))) - ((match-end 10) - ;; Index entry - (and reftex-support-index - (setq entry (reftex-index-info-safe buffer-file-name)) - ;; FIXME: (add-to-list 'index-tags (nth 1 index-entry)) - (push entry (cdr tail)))))))))) - + ;; Find where we are + (setq here-I-am (reftex-where-am-I)) + (or here-I-am (throw 'exit nil)) + (unless (or force (cdr here-I-am)) (throw 'exit nil)) + (setq tail (memq (car here-I-am) docstruct)) + (or tail (throw 'exit nil)) + (setq reftex-active-toc (reftex-last-assoc-before-elt + 'toc (car here-I-am) docstruct) + appendix (reftex-last-assoc-before-elt + 'appendix (car here-I-am) docstruct)) + + ;; Initialize section numbers + (if (eq (car (car here-I-am)) 'appendix) + (reftex-init-section-numbers nil t) + (reftex-init-section-numbers reftex-active-toc appendix)) + + ;; Match the section command + (when (re-search-forward (reftex-everything-regexp) nil t) + (cond + ((match-end 1) + (push (reftex-label-info (reftex-match-string 1) buffer-file-name) + (cdr tail))) + + ((match-end 3) + (setq star (= ?* (char-after (match-end 3))) + entry (reftex-section-info (buffer-file-name)) + level (nth 5 entry)) + ;; Insert the section info + (push entry (cdr tail)) + + ;; We are done unless we use section numbers + (unless (nth 1 reftex-label-menu-flags) (throw 'exit nil)) + + ;; Update the remaining toc items + (setq tail (cdr tail)) + (while (and (setq tail (memq (assq 'toc (cdr tail)) tail)) + (setq entry (car tail)) + (>= (nth 5 entry) level)) + (setq star (string-match "\\*" (nth 6 entry)) + context (nth 2 entry) + section-number + (reftex-section-number (nth 5 entry) star)) + (when (string-match "\\`\\([ \t]*\\)\\([.0-9A-Z]+\\)\\(.*\\)" + context) + (when (and (not appendix) + (>= (string-to-char (match-string 2)) ?A)) + ;; Just entered the appendex. Get out. + (throw 'exit nil)) + + ;; Change the section number. + (setf (nth 2 entry) + (concat (match-string 1 context) + section-number + (match-string 3 context)))))) + ((match-end 10) + ;; Index entry + (and reftex-support-index + (setq entry (reftex-index-info-safe buffer-file-name)) + ;; FIXME: (add-to-list 'index-tags (nth 1 index-entry)) + (push entry (cdr tail)))))))))) + (error nil)) ) @@ -736,8 +736,8 @@ of master file." ((memq (preceding-char) '(?\] ?\}))) ;; Do a search ((and reftex-allow-detached-macro-args - (re-search-backward - "[]}][ \t]*[\n\r]?\\([ \t]*%[^\n\r]*[\n\r]\\)*[ \t]*\\=" bound t)) + (re-search-backward + "[]}][ \t]*[\n\r]?\\([ \t]*%[^\n\r]*[\n\r]\\)*[ \t]*\\=" bound t)) (goto-char (1+ (match-beginning 0))) t) (t nil))) @@ -774,7 +774,7 @@ of master file." pos cmd-list cmd cnt cnt-opt entry) (save-restriction (save-excursion - (narrow-to-region (max (point-min) bound) (point-max)) + (narrow-to-region (max 1 bound) (point-max)) ;; move back out of the current parenthesis (while (condition-case nil (progn (up-list -1) t) @@ -782,29 +782,29 @@ of master file." (setq cnt 1 cnt-opt 0) ;; move back over any touching sexps (while (and (reftex-move-to-previous-arg bound) - (condition-case nil - (progn (backward-sexp) t) - (error nil))) - (if (eq (following-char) ?\[) (incf cnt-opt)) + (condition-case nil + (progn (backward-sexp) t) + (error nil))) + (if (eq (following-char) ?\[) (incf cnt-opt)) (incf cnt)) (setq pos (point)) (when (and (or (= (following-char) ?\[) (= (following-char) ?\{)) (re-search-backward "\\\\[*a-zA-Z]+\\=" nil t)) (setq cmd (reftex-match-string 0)) - (when (looking-at "\\\\begin{[^}]*}") - (setq cmd (reftex-match-string 0) - cnt (1- cnt))) - ;; This does ignore optional arguments. Very hard to fix. - (when (setq entry (assoc cmd reftex-env-or-mac-alist)) - (if (> cnt (or (nth 4 entry) 100)) - (setq cmd nil))) + (when (looking-at "\\\\begin{[^}]*}") + (setq cmd (reftex-match-string 0) + cnt (1- cnt))) + ;; This does ignore optional arguments. Very hard to fix. + (when (setq entry (assoc cmd reftex-env-or-mac-alist)) + (if (> cnt (or (nth 4 entry) 100)) + (setq cmd nil))) (cond - ((null cmd)) - ((eq t which) - (push (cons cmd (point)) cmd-list)) - ((or (eq 1 which) (member cmd which)) - (throw 'exit (cons cmd (point)))))) + ((null cmd)) + ((eq t which) + (push (cons cmd (point)) cmd-list)) + ((or (eq 1 which) (member cmd which)) + (throw 'exit (cons cmd (point)))))) (goto-char pos))) (nreverse cmd-list))))) @@ -837,7 +837,7 @@ of master file." (match-beginning 2) (match-end 2))) (cond ((string= (match-string 1) "end") - (push env end-list)) + (push env end-list)) ((equal env (car end-list)) (setq end-list (cdr end-list))) ((eq t which) @@ -867,25 +867,25 @@ of master file." (let ((bound (or bound (save-excursion (re-search-backward reftex-section-regexp nil 1) (point)))) - (fun-list (if (listp which) - (mapcar (lambda (x) (if (memq x which) x nil)) - reftex-special-env-parsers) - reftex-special-env-parsers)) + (fun-list (if (listp which) + (mapcar (lambda (x) (if (memq x which) x nil)) + reftex-special-env-parsers) + reftex-special-env-parsers)) specials rtn) - ;; Call all functions - (setq specials (mapcar - (lambda (fun) - (save-excursion - (setq rtn (and fun (funcall fun bound))) - (if rtn (cons (symbol-name fun) rtn) nil))) - fun-list)) - ;; Delete the non-matches - (setq specials (delq nil specials)) - ;; Sort - (setq specials (sort specials (lambda (a b) (> (cdr a) (cdr b))))) - (if (eq which t) - specials - (car specials)))))) + ;; Call all functions + (setq specials (mapcar + (lambda (fun) + (save-excursion + (setq rtn (and fun (funcall fun bound))) + (if rtn (cons (symbol-name fun) rtn) nil))) + fun-list)) + ;; Delete the non-matches + (setq specials (delq nil specials)) + ;; Sort + (setq specials (sort specials (lambda (a b) (> (cdr a) (cdr b))))) + (if (eq which t) + specials + (car specials)))))) (defsubst reftex-move-to-next-arg (&optional ignore) ;; Assuming that we are at the end of a macro name or a macro argument, @@ -897,7 +897,7 @@ of master file." ((memq (following-char) '(?\[ ?\{))) ;; Do a search ((and reftex-allow-detached-macro-args - (looking-at "[ \t]*[\n\r]?\\([ \t]*%[^\n\r]*[\n\r]\\)*[ \t]*[[{]")) + (looking-at "[ \t]*[\n\r]?\\([ \t]*%[^\n\r]*[\n\r]\\)*[ \t]*[[{]")) (goto-char (1- (match-end 0))) t) (t nil))) @@ -916,39 +916,39 @@ of master file." (if (= n 1000) ;; Special case: Skip all touching arguments (progn - (reftex-move-over-touching-args) - (reftex-context-substring)) + (reftex-move-over-touching-args) + (reftex-context-substring)) ;; Do the real thing. (let ((cnt 1)) - + (when (reftex-move-to-next-arg) - - (while (< cnt n) - (while (and (member cnt opt-args) - (eq (following-char) ?\{)) - (incf cnt)) - (when (< cnt n) - (unless (and (condition-case nil - (or (forward-list 1) t) - (error nil)) - (reftex-move-to-next-arg) - (incf cnt)) - (setq cnt 1000)))) - - (while (and (memq cnt opt-args) - (eq (following-char) ?\{)) - (incf cnt))) + + (while (< cnt n) + (while (and (member cnt opt-args) + (eq (following-char) ?\{)) + (incf cnt)) + (when (< cnt n) + (unless (and (condition-case nil + (or (forward-list 1) t) + (error nil)) + (reftex-move-to-next-arg) + (incf cnt)) + (setq cnt 1000)))) + + (while (and (memq cnt opt-args) + (eq (following-char) ?\{)) + (incf cnt))) (if (and (= n cnt) - (> (skip-chars-forward "{\\[") 0)) - (reftex-context-substring) - nil)))) + (> (skip-chars-forward "{\\[") 0)) + (reftex-context-substring) + nil)))) (defun reftex-move-over-touching-args () (condition-case nil (while (memq (following-char) '(?\[ ?\{)) - (forward-list 1)) - (error nil))) + (forward-list 1)) + (error nil))) (defun reftex-context-substring (&optional to-end) ;; Return up to 150 chars from point @@ -959,11 +959,11 @@ of master file." (buffer-substring-no-properties (point) (min (+ (point) 150) - (save-match-data - ;; FIXME: THis is not perfect - (if (re-search-forward "\\\\end{" nil t) - (match-beginning 0) - (point-max)))))) + (save-match-data + ;; FIXME: This is not perfect + (if (re-search-forward "\\\\end{" nil t) + (match-beginning 0) + (point-max)))))) ((or (= (preceding-char) ?\{) (= (preceding-char) ?\[)) ;; Inside a list - get only the list. @@ -978,8 +978,8 @@ of master file." (error (point-max)))))) (t ;; no list - just grab 150 characters - (buffer-substring-no-properties (point) - (min (+ (point) 150) (point-max)))))) + (buffer-substring-no-properties (point) + (min (+ (point) 150) (point-max)))))) ;; Variable holding the vector with section numbers (defvar reftex-section-numbers (make-vector reftex-max-section-depth 0)) @@ -994,11 +994,11 @@ of master file." (while (>= i 0) (if (> i level) (aset reftex-section-numbers i 0) - (setq number-string (or (car numbers) "0")) - (if (string-match "\\`[A-Z]\\'" number-string) - (aset reftex-section-numbers i - (- (string-to-char number-string) ?A -1)) - (aset reftex-section-numbers i (string-to-int number-string))) + (setq number-string (or (car numbers) "0")) + (if (string-match "\\`[A-Z]\\'" number-string) + (aset reftex-section-numbers i + (- (string-to-char number-string) ?A -1)) + (aset reftex-section-numbers i (string-to-int number-string))) (pop numbers)) (decf i))) (put 'reftex-section-numbers 'appendix appendix)) @@ -1007,65 +1007,66 @@ of master file." ;; Return a string with the current section number. ;; When LEVEL is non-nil, increase section numbers on that level. (let* ((depth (1- (length reftex-section-numbers))) idx n (string "") - (appendix (get 'reftex-section-numbers 'appendix)) - (partspecial (and (not reftex-part-resets-chapter) - (equal level 0)))) + (appendix (get 'reftex-section-numbers 'appendix)) + (partspecial (and (not reftex-part-resets-chapter) + (equal level 0)))) ;; partspecial means, this is a part statement. ;; Parts do not reset the chapter counter, and the part number is ;; not included in the numbering of other sectioning levels. (when level (when (and (> level -1) (not star)) - (aset reftex-section-numbers - level (1+ (aref reftex-section-numbers level)))) + (aset reftex-section-numbers + level (1+ (aref reftex-section-numbers level)))) (setq idx (1+ level)) (when (not star) - (while (<= idx depth) - (if (or (not partspecial) - (not (= idx 1))) - (aset reftex-section-numbers idx 0)) - (incf idx)))) + (while (<= idx depth) + (if (or (not partspecial) + (not (= idx 1))) + (aset reftex-section-numbers idx 0)) + (incf idx)))) (if partspecial - (setq string (concat "Part " (reftex-roman-number - (aref reftex-section-numbers 0)))) + (setq string (concat "Part " (reftex-roman-number + (aref reftex-section-numbers 0)))) (setq idx (if reftex-part-resets-chapter 0 1)) (while (<= idx depth) - (setq n (aref reftex-section-numbers idx)) - (if (not (and partspecial (not (equal string "")))) - (setq string (concat string (if (not (string= string "")) "." "") - (int-to-string n)))) - (incf idx)) + (setq n (aref reftex-section-numbers idx)) + (if (not (and partspecial (not (equal string "")))) + (setq string (concat string (if (not (string= string "")) "." "") + (int-to-string n)))) + (incf idx)) (save-match-data - (if (string-match "\\`\\([@0]\\.\\)+" string) - (setq string (replace-match "" nil nil string))) - (if (string-match "\\(\\.0\\)+\\'" string) - (setq string (replace-match "" nil nil string))) - (if (and appendix - (string-match "\\`[0-9]+" string)) - (setq string - (concat - (char-to-string - (1- (+ ?A (string-to-int (match-string 0 string))))) - (substring string (match-end 0)))))) + (if (string-match "\\`\\([@0]\\.\\)+" string) + (setq string (replace-match "" nil nil string))) + (if (string-match "\\(\\.0\\)+\\'" string) + (setq string (replace-match "" nil nil string))) + (if (and appendix + (string-match "\\`[0-9]+" string)) + (setq string + (concat + (char-to-string + (1- (+ ?A (string-to-int (match-string 0 string))))) + (substring string (match-end 0)))))) (if star - (concat (make-string (1- (length string)) ?\ ) "*") - string)))) + (concat (make-string (1- (length string)) ?\ ) "*") + string)))) (defun reftex-roman-number (n) ;; Return as a string the roman number equal to N. (let ((nrest n) - (string "") - (list '((1000 . "M") ( 900 . "CM") ( 500 . "D") ( 400 . "CD") - ( 100 . "C") ( 90 . "XC") ( 50 . "L") ( 40 . "XL") - ( 10 . "X") ( 9 . "IX") ( 5 . "V") ( 4 . "IV") - ( 1 . "I"))) - listel i s) + (string "") + (list '((1000 . "M") ( 900 . "CM") ( 500 . "D") ( 400 . "CD") + ( 100 . "C") ( 90 . "XC") ( 50 . "L") ( 40 . "XL") + ( 10 . "X") ( 9 . "IX") ( 5 . "V") ( 4 . "IV") + ( 1 . "I"))) + listel i s) (while (>= nrest 1) (setq listel (pop list) - i (car listel) - s (cdr listel)) + i (car listel) + s (cdr listel)) (while (>= nrest i) - (setq string (concat string s) - nrest (- nrest i)))) + (setq string (concat string s) + nrest (- nrest i)))) string)) +;;; arch-tag: 6a8168f7-abb9-4576-99dc-fcbc7ba901a3 ;;; reftex-parse.el ends here diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el index 9991c0b2f7..2d4935aedd 100644 --- a/lisp/textmodes/reftex-ref.el +++ b/lisp/textmodes/reftex-ref.el @@ -1,8 +1,8 @@ ;;; reftex-ref.el --- code to create labels and references with RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.18 +;; Version: 4.21 ;; This file is part of GNU Emacs. @@ -36,11 +36,11 @@ If optional BOUND is an integer, limit backward searches to that point." (let* ((loc1 (reftex-what-macro reftex-label-mac-list bound)) (loc2 (reftex-what-environment reftex-label-env-list bound)) - (loc3 (reftex-what-special-env 1 bound)) + (loc3 (reftex-what-special-env 1 bound)) (p1 (or (cdr loc1) 0)) (p2 (or (cdr loc2) 0)) - (p3 (or (cdr loc3) 0)) - (pmax (max p1 p2 p3))) + (p3 (or (cdr loc3) 0)) + (pmax (max p1 p2 p3))) (setq reftex-location-start pmax) (cond @@ -57,9 +57,9 @@ If optional BOUND is an integer, limit backward searches to that point." (setq reftex-default-context-position p3) (setq loc3 (car loc3)) (cond ((null loc3) "section") - ((symbolp loc3) (symbol-name loc3)) - ((stringp loc3) loc3) - (t "section"))) + ((symbolp loc3) (symbol-name loc3)) + ((stringp loc3) loc3) + (t "section"))) (t ;; This should not happen, I think? "section")))) @@ -83,11 +83,11 @@ If optional BOUND is an integer, limit backward searches to that point." (goto-char 1) (if (or (re-search-forward - (format reftex-find-label-regexp-format - (regexp-quote label)) nil t) - (re-search-forward - (format reftex-find-label-regexp-format2 - (regexp-quote label)) nil t)) + (format reftex-find-label-regexp-format + (regexp-quote label)) nil t) + (re-search-forward + (format reftex-find-label-regexp-format2 + (regexp-quote label)) nil t)) (progn (backward-char 1) @@ -102,7 +102,7 @@ If optional BOUND is an integer, limit backward searches to that point." (parse (nth 2 (assoc env-or-mac reftex-env-or-mac-alist))) (text (reftex-short-context env-or-mac parse reftex-location-start derive)) - (in-comment (reftex-in-comment))) + (in-comment (reftex-in-comment))) (list label typekey text file in-comment))) ;;; Creating labels --------------------------------------------------------- @@ -132,18 +132,18 @@ This function is controlled by the settings of reftex-insert-label-flags." ;; Ok, go ahead. (catch 'exit (let* ((entry (assoc environment reftex-env-or-mac-alist)) - (typekey (nth 1 entry)) - (format (nth 3 entry)) - (macro-cell (reftex-what-macro 1)) - (entry1 (assoc (car macro-cell) reftex-env-or-mac-alist)) - label naked prefix valid default force-prompt rescan-is-useful) + (typekey (nth 1 entry)) + (format (nth 3 entry)) + (macro-cell (reftex-what-macro 1)) + (entry1 (assoc (car macro-cell) reftex-env-or-mac-alist)) + label naked prefix valid default force-prompt rescan-is-useful) (when (and (or (nth 5 entry) (nth 5 entry1)) - (memq (preceding-char) '(?\[ ?\{))) - ;; This is an argument of a label macro. Insert naked label. - (setq naked t format "%s")) + (memq (preceding-char) '(?\[ ?\{))) + ;; This is an argument of a label macro. Insert naked label. + (setq naked t format "%s")) (setq prefix (or (cdr (assoc typekey reftex-typekey-to-prefix-alist)) - (concat typekey "-"))) + (concat typekey "-"))) ;; Replace any escapes in the prefix (setq prefix (reftex-replace-prefix-escapes prefix)) @@ -151,115 +151,115 @@ This function is controlled by the settings of reftex-insert-label-flags." (cond ((reftex-typekey-check typekey (nth 0 reftex-insert-label-flags)) - ;; Derive a label from context. - (setq reftex-active-toc (reftex-last-assoc-before-elt - 'toc (car (reftex-where-am-I)) - (symbol-value reftex-docstruct-symbol))) - (setq default (reftex-no-props - (nth 2 (reftex-label-info " " nil nil t)))) - ;; Catch the cases where the is actually no context available. - (if (or (string-match "NO MATCH FOR CONTEXT REGEXP" default) - (string-match "ILLEGAL VALUE OF PARSE" default) - (string-match "SECTION HEADING NOT FOUND" default) - (string-match "HOOK ERROR" default) - (string-match "^[ \t]*$" default)) - (setq default prefix - force-prompt t) ; need to prompt - (setq default - (concat prefix - (funcall reftex-string-to-label-function default))) - - ;; Make it unique. - (setq default (reftex-uniquify-label default nil "-")))) + ;; Derive a label from context. + (setq reftex-active-toc (reftex-last-assoc-before-elt + 'toc (car (reftex-where-am-I)) + (symbol-value reftex-docstruct-symbol))) + (setq default (reftex-no-props + (nth 2 (reftex-label-info " " nil nil t)))) + ;; Catch the cases where the is actually no context available. + (if (or (string-match "NO MATCH FOR CONTEXT REGEXP" default) + (string-match "ILLEGAL VALUE OF PARSE" default) + (string-match "SECTION HEADING NOT FOUND" default) + (string-match "HOOK ERROR" default) + (string-match "^[ \t]*$" default)) + (setq default prefix + force-prompt t) ; need to prompt + (setq default + (concat prefix + (funcall reftex-string-to-label-function default))) + + ;; Make it unique. + (setq default (reftex-uniquify-label default nil "-")))) ((reftex-typekey-check typekey (nth 1 reftex-insert-label-flags)) - ;; Minimal default: the user will be prompted. - (setq default prefix)) + ;; Minimal default: the user will be prompted. + (setq default prefix)) (t - ;; Make an automatic label. - (setq default (reftex-uniquify-label prefix t)))) + ;; Make an automatic label. + (setq default (reftex-uniquify-label prefix t)))) ;; Should we ask the user? (if (or (reftex-typekey-check typekey - (nth 1 reftex-insert-label-flags)) ; prompt - force-prompt) - - (while (not valid) - ;; iterate until we get a legal label - - (setq label (read-string - (if naked "Naked Label: " "Label: ") - default)) - - ;; Lets make sure that this is a legal label - (cond - - ((string-match (concat "\\`\\(" (regexp-quote prefix) - "\\)?[ \t]*\\'") - label) - ;; No label at all, please - (message "No label inserted.") - (throw 'exit nil)) - - ;; Test if label contains strange characters - ((string-match reftex-label-illegal-re label) - (message "Label \"%s\" contains illegal characters" label) - (ding) - (sit-for 2)) - - ;; Look it up in the label list - ((setq entry (assoc label - (symbol-value reftex-docstruct-symbol))) - (ding) - (if (y-or-n-p - (format "Label '%s' exists. Use anyway? " label)) - (setq valid t))) - - ;; Label is ok - (t - (setq valid t)))) - (setq label default)) + (nth 1 reftex-insert-label-flags)) ; prompt + force-prompt) + + (while (not valid) + ;; iterate until we get a legal label + + (setq label (read-string + (if naked "Naked Label: " "Label: ") + default)) + + ;; Lets make sure that this is a legal label + (cond + + ((string-match (concat "\\`\\(" (regexp-quote prefix) + "\\)?[ \t]*\\'") + label) + ;; No label at all, please + (message "No label inserted.") + (throw 'exit nil)) + + ;; Test if label contains strange characters + ((string-match reftex-label-illegal-re label) + (message "Label \"%s\" contains illegal characters" label) + (ding) + (sit-for 2)) + + ;; Look it up in the label list + ((setq entry (assoc label + (symbol-value reftex-docstruct-symbol))) + (ding) + (if (y-or-n-p + (format "Label '%s' exists. Use anyway? " label)) + (setq valid t))) + + ;; Label is ok + (t + (setq valid t)))) + (setq label default)) ;; Insert the label into the label list - (let* ((here-I-am-info - (save-excursion - (if (and (or naked no-insert) - (integerp (cdr macro-cell))) - (goto-char (cdr macro-cell))) - (reftex-where-am-I))) - (here-I-am (car here-I-am-info)) - (note (if (cdr here-I-am-info) - "" - "POSITION UNCERTAIN. RESCAN TO FIX.")) - (file (buffer-file-name)) - (text nil) - (tail (memq here-I-am (symbol-value reftex-docstruct-symbol)))) - - (or (cdr here-I-am-info) (setq rescan-is-useful t)) - - (when tail - (push (list label typekey text file nil note) (cdr tail)) - (put reftex-docstruct-symbol 'modified t))) + (let* ((here-I-am-info + (save-excursion + (if (and (or naked no-insert) + (integerp (cdr macro-cell))) + (goto-char (cdr macro-cell))) + (reftex-where-am-I))) + (here-I-am (car here-I-am-info)) + (note (if (cdr here-I-am-info) + "" + "POSITION UNCERTAIN. RESCAN TO FIX.")) + (file (buffer-file-name)) + (text nil) + (tail (memq here-I-am (symbol-value reftex-docstruct-symbol)))) + + (or (cdr here-I-am-info) (setq rescan-is-useful t)) + + (when tail + (push (list label typekey text file nil note) (cdr tail)) + (put reftex-docstruct-symbol 'modified t))) ;; Insert the label into the buffer (unless no-insert - (insert - (if reftex-format-label-function - (funcall reftex-format-label-function label format) - (format format label))) - (if (and reftex-plug-into-AUCTeX - (fboundp 'LaTeX-add-labels)) - ;; Tell AUCTeX about this - (LaTeX-add-labels label))) + (insert + (if reftex-format-label-function + (funcall reftex-format-label-function label format) + (format format label))) + (if (and reftex-plug-into-AUCTeX + (fboundp 'LaTeX-add-labels)) + ;; Tell AUCTeX about this + (LaTeX-add-labels label))) ;; Delete the corresponding selection buffers to force update on next use. (when reftex-auto-update-selection-buffers - (reftex-erase-buffer (reftex-make-selection-buffer-name typekey)) - (reftex-erase-buffer (reftex-make-selection-buffer-name " "))) + (reftex-erase-buffer (reftex-make-selection-buffer-name typekey)) + (reftex-erase-buffer (reftex-make-selection-buffer-name " "))) (when (and rescan-is-useful reftex-allow-automatic-rescan) - (reftex-parse-one)) + (reftex-parse-one)) ;; return value of the function is the label label))) @@ -269,24 +269,24 @@ This function is controlled by the settings of reftex-insert-label-flags." Uses `reftex-derive-label-parameters' and `reftex-label-illegal-re'. It also applies `reftex-translate-to-ascii-function' to the string." (when (and reftex-translate-to-ascii-function - (fboundp reftex-translate-to-ascii-function)) + (fboundp reftex-translate-to-ascii-function)) (setq string (funcall reftex-translate-to-ascii-function string))) (apply 'reftex-convert-string string - "[-~ \t\n\r,;]+" reftex-label-illegal-re nil nil - reftex-derive-label-parameters)) + "[-~ \t\n\r,;]+" reftex-label-illegal-re nil nil + reftex-derive-label-parameters)) (defun reftex-latin1-to-ascii (string) ;; Translate the upper 128 chars in the Latin-1 charset to ASCII equivalents (let ((tab "@@@@@@@@@@@@@@@@@@'@@@@@@@@@@@@@ icLxY|S\"ca<--R-o|23'uq..1o>423?AAAAAAACEEEEIIIIDNOOOOOXOUUUUYP3aaaaaaaceeeeiiiidnooooo:ouuuuypy") - (emacsp (not (featurep 'xemacs)))) - (mapconcat + (emacsp (not (featurep 'xemacs)))) + (mapconcat (lambda (c) (cond ((and (> c 127) (< c 256)) ; 8 bit Latin-1 - (char-to-string (aref tab (- c 128)))) - ((and emacsp ; Not for XEmacs - (> c 2175) (< c 2304)) ; Mule Latin-1 - (char-to-string (aref tab (- c 2176)))) - (t (char-to-string c)))) + (char-to-string (aref tab (- c 128)))) + ((and emacsp ; Not for XEmacs + (> c 2175) (< c 2304)) ; Mule Latin-1 + (char-to-string (aref tab (- c 2176)))) + (t (char-to-string c)))) string ""))) (defun reftex-replace-prefix-escapes (prefix) @@ -309,21 +309,21 @@ also applies `reftex-translate-to-ascii-function' to the string." file))) ((equal letter "u") (or (user-login-name) "")) - ((equal letter "S") - (let* (macro level-exp level) - (save-excursion - (save-match-data - (when (re-search-backward reftex-section-regexp nil t) - (setq macro (reftex-match-string 2) - level-exp (cdr (assoc macro reftex-section-levels-all)) - level (if (symbolp level-exp) - (abs (save-match-data - (funcall level-exp))) - (abs level-exp)))) - (cdr (or (assoc macro reftex-section-prefixes) - (assoc level reftex-section-prefixes) - (assq t reftex-section-prefixes) - (list t "sec:"))))))) + ((equal letter "S") + (let* (macro level-exp level) + (save-excursion + (save-match-data + (when (re-search-backward reftex-section-regexp nil t) + (setq macro (reftex-match-string 2) + level-exp (cdr (assoc macro reftex-section-levels-all)) + level (if (symbolp level-exp) + (abs (save-match-data + (funcall level-exp))) + (abs level-exp)))) + (cdr (or (assoc macro reftex-section-prefixes) + (assoc level reftex-section-prefixes) + (assq t reftex-section-prefixes) + (list t "sec:"))))))) (t ""))) (setq num (1- (+ (match-beginning 1) (length replace))) prefix (replace-match replace nil nil prefix))) @@ -396,40 +396,40 @@ When called with 2 C-u prefix args, disable magic word recognition." ;; check for active recursive edits (reftex-check-recursive-edit) - ;; Ensure access to scanning info and rescan buffer if prefix arg is '(4) + ;; Ensure access to scanning info and rescan buffer if prefix are is '(4) (reftex-access-scan-info current-prefix-arg) (unless type ;; guess type from context (if (and reftex-guess-label-type (setq type (reftex-guess-label-type))) - (setq cut (cdr type) - type (car type)) + (setq cut (cdr type) + type (car type)) (setq type (reftex-query-label-type)))) - (let* ((refstyle - (cond ((reftex-typekey-check type reftex-vref-is-default) "\\vref") - ((reftex-typekey-check type reftex-fref-is-default) "\\fref") - (t "\\ref"))) - (reftex-format-ref-function reftex-format-ref-function) - (form "\\ref{%s}") - label labels sep sep1) + (let* ((refstyle + (cond ((reftex-typekey-check type reftex-vref-is-default) "\\vref") + ((reftex-typekey-check type reftex-fref-is-default) "\\fref") + (t "\\ref"))) + (reftex-format-ref-function reftex-format-ref-function) + (form "\\ref{%s}") + label labels sep sep1) ;; Have the user select a label (set-marker reftex-select-return-marker (point)) (setq labels (save-excursion - (reftex-offer-label-menu type))) + (reftex-offer-label-menu type))) (reftex-ensure-compiled-variables) (set-marker reftex-select-return-marker nil) ;; If the first entry is the symbol 'concat, concat all labels. ;; We keep the cdr of the first label for typekey etc information. (if (eq (car labels) 'concat) - (setq labels (list (list (mapconcat 'car (cdr labels) ",") - (cdr (nth 1 labels)))))) + (setq labels (list (list (mapconcat 'car (cdr labels) ",") + (cdr (nth 1 labels)))))) (setq type (nth 1 (car labels)) - form (or (cdr (assoc type reftex-typekey-to-format-alist)) - form)) - + form (or (cdr (assoc type reftex-typekey-to-format-alist)) + form)) + (cond (no-insert ;; Just return the first label @@ -439,60 +439,60 @@ When called with 2 C-u prefix args, disable magic word recognition." nil) (t (while labels - (setq label (car (car labels)) - sep (nth 2 (car labels)) - sep1 (cdr (assoc sep reftex-multiref-punctuation)) - labels (cdr labels)) - (when cut - (backward-delete-char cut) - (setq cut nil)) - - ;; remove ~ if we do already have a space - (when (and (= ?~ (string-to-char form)) - (member (preceding-char) '(?\ ?\t ?\n))) - (setq form (substring form 1))) - ;; do we have a special format? - (setq reftex-format-ref-function - (cond - ((string= refstyle "\\vref") 'reftex-format-vref) - ((string= refstyle "\\fref") 'reftex-format-fref) - ((string= refstyle "\\Fref") 'reftex-format-Fref) - (t reftex-format-ref-function))) - ;; ok, insert the reference - (if sep1 (insert sep1)) - (insert - (if reftex-format-ref-function - (funcall reftex-format-ref-function label form) - (format form label label))) - ;; take out the initial ~ for good - (and (= ?~ (string-to-char form)) - (setq form (substring form 1)))) + (setq label (car (car labels)) + sep (nth 2 (car labels)) + sep1 (cdr (assoc sep reftex-multiref-punctuation)) + labels (cdr labels)) + (when cut + (backward-delete-char cut) + (setq cut nil)) + + ;; remove ~ if we do already have a space + (when (and (= ?~ (string-to-char form)) + (member (preceding-char) '(?\ ?\t ?\n ?. ?~))) + (setq form (substring form 1))) + ;; do we have a special format? + (setq reftex-format-ref-function + (cond + ((string= refstyle "\\vref") 'reftex-format-vref) + ((string= refstyle "\\fref") 'reftex-format-fref) + ((string= refstyle "\\Fref") 'reftex-format-Fref) + (t reftex-format-ref-function))) + ;; ok, insert the reference + (if sep1 (insert sep1)) + (insert + (if reftex-format-ref-function + (funcall reftex-format-ref-function label form) + (format form label label))) + ;; take out the initial ~ for good + (and (= ?~ (string-to-char form)) + (setq form (substring form 1)))) (message "") label)))) (defun reftex-guess-label-type () ;; Examine context to guess what a \ref might want to reference. (let ((words reftex-words-to-typekey-alist) - (case-fold-search t) - (bound (max (point-min) (- (point) 35))) - matched cell) + (case-fold-search t) + (bound (max (point-min) (- (point) 35))) + matched cell) (save-excursion (while (and (setq cell (pop words)) - (not (setq matched - (re-search-backward (car cell) bound t)))))) + (not (setq matched + (re-search-backward (car cell) bound t)))))) (if matched - (cons (cdr cell) (- (match-end 0) (match-end 1))) + (cons (cdr cell) (- (match-end 0) (match-end 1))) nil))) (defvar reftex-select-label-map) (defun reftex-offer-label-menu (typekey) ;; Offer a menu with the appropriate labels. (let* ((buf (current-buffer)) - (xr-data (assq 'xr (symbol-value reftex-docstruct-symbol))) - (xr-alist (cons (cons "" (buffer-file-name)) (nth 1 xr-data))) - (xr-index 0) + (xr-data (assq 'xr (symbol-value reftex-docstruct-symbol))) + (xr-alist (cons (cons "" (buffer-file-name)) (nth 1 xr-data))) + (xr-index 0) (here-I-am (car (reftex-where-am-I))) - (here-I-am1 here-I-am) + (here-I-am1 here-I-am) (toc (reftex-typekey-check typekey reftex-label-menu-flags 0)) (files (reftex-typekey-check typekey reftex-label-menu-flags 7)) (context (not (reftex-typekey-check @@ -502,158 +502,158 @@ When called with 2 C-u prefix args, disable magic word recognition." (follow (reftex-typekey-check typekey reftex-label-menu-flags 4)) (commented (nth 5 reftex-label-menu-flags)) - (prefix "") - selection-buffers + (prefix "") + selection-buffers offset rtn key data last-data entries) (unwind-protect (catch 'exit (while t (save-window-excursion - (delete-other-windows) - (setq reftex-call-back-to-this-buffer buf - reftex-latex-syntax-table (syntax-table)) - (let ((default-major-mode 'reftex-select-label-mode)) - (if reftex-use-multiple-selection-buffers - (switch-to-buffer-other-window - (save-excursion - (set-buffer buf) - (reftex-make-selection-buffer-name typekey))) - (switch-to-buffer-other-window "*RefTeX Select*") - (reftex-erase-buffer))) - (unless (eq major-mode 'reftex-select-label-mode) - (reftex-select-label-mode)) - (add-to-list 'selection-buffers (current-buffer)) + (delete-other-windows) + (setq reftex-call-back-to-this-buffer buf + reftex-latex-syntax-table (syntax-table)) + (let ((default-major-mode 'reftex-select-label-mode)) + (if reftex-use-multiple-selection-buffers + (switch-to-buffer-other-window + (save-excursion + (set-buffer buf) + (reftex-make-selection-buffer-name typekey))) + (switch-to-buffer-other-window "*RefTeX Select*") + (reftex-erase-buffer))) + (unless (eq major-mode 'reftex-select-label-mode) + (reftex-select-label-mode)) + (add-to-list 'selection-buffers (current-buffer)) (setq truncate-lines t) - (setq mode-line-format - (list "---- " 'mode-line-buffer-identification - " " 'global-mode-string " (" mode-name ")" - " S<" 'refstyle ">" - " -%-")) - (cond - ((= 0 (buffer-size)) - (let ((buffer-read-only nil)) - (message "Creating Selection Buffer...") - (setq offset (reftex-insert-docstruct - buf - toc - typekey - nil ; index - files - context - counter - commented - (or here-I-am offset) - prefix - nil ; no a toc buffer - )))) - (here-I-am - (setq offset (reftex-get-offset buf here-I-am typekey))) - (t (setq offset t))) - (setq buffer-read-only t) - (setq offset (or offset t)) + (setq mode-line-format + (list "---- " 'mode-line-buffer-identification + " " 'global-mode-string " (" mode-name ")" + " S<" 'refstyle ">" + " -%-")) + (cond + ((= 0 (buffer-size)) + (let ((buffer-read-only nil)) + (message "Creating Selection Buffer...") + (setq offset (reftex-insert-docstruct + buf + toc + typekey + nil ; index + files + context + counter + commented + (or here-I-am offset) + prefix + nil ; no a toc buffer + )))) + (here-I-am + (setq offset (reftex-get-offset buf here-I-am typekey))) + (t (setq offset t))) + (setq buffer-read-only t) + (setq offset (or offset t)) (setq here-I-am nil) ; turn off determination of offset (setq rtn (reftex-select-item reftex-select-label-prompt reftex-select-label-help - reftex-select-label-map + reftex-select-label-map offset 'reftex-show-label-location follow)) (setq key (car rtn) data (nth 1 rtn) last-data (nth 2 rtn) - offset t) + offset t) (unless key (throw 'exit nil)) (cond - ((eq key ?g) - ;; update buffer - (reftex-erase-buffer)) + ((eq key ?g) + ;; update buffer + (reftex-erase-buffer)) ((or (eq key ?r) (eq key ?R)) ;; rescan buffer - (and current-prefix-arg (setq key ?R)) - (reftex-erase-buffer) + (and current-prefix-arg (setq key ?R)) + (reftex-erase-buffer) (reftex-reparse-document buf last-data key)) ((eq key ?c) ;; toggle context mode - (reftex-erase-buffer) + (reftex-erase-buffer) (setq context (not context))) ((eq key ?s) ;; switch type - (setq here-I-am here-I-am1) + (setq here-I-am here-I-am1) (setq typekey (reftex-query-label-type))) ((eq key ?t) ;; toggle table of contents display, or change depth - (reftex-erase-buffer) - (if current-prefix-arg - (setq reftex-toc-max-level (prefix-numeric-value - current-prefix-arg)) - (setq toc (not toc)))) + (reftex-erase-buffer) + (if current-prefix-arg + (setq reftex-toc-max-level (prefix-numeric-value + current-prefix-arg)) + (setq toc (not toc)))) ((eq key ?F) ;; toggle display of included file borders - (reftex-erase-buffer) + (reftex-erase-buffer) (setq files (not files))) ((eq key ?#) ;; toggle counter display - (reftex-erase-buffer) + (reftex-erase-buffer) (setq counter (not counter))) ((eq key ?%) ;; toggle display of commented labels - (reftex-erase-buffer) + (reftex-erase-buffer) (setq commented (not commented))) ((eq key ?l) ;; reuse the last referenced label again (setq entries reftex-last-used-reference) (throw 'exit t)) - ((eq key ?x) - ;; select an external document - (setq xr-index (reftex-select-external-document - xr-alist xr-index)) - (setq buf (or (reftex-get-file-buffer-force - (cdr (nth xr-index xr-alist))) - (error "Cannot switch document")) - prefix (or (car (nth xr-index xr-alist)) "")) - (set-buffer buf) - (reftex-access-scan-info)) - ((stringp key) - (setq entries - (list - (list - (or (assoc key (symbol-value reftex-docstruct-symbol)) - (list key typekey))))) - (throw 'exit t)) - ((memq key '(?a ?A return)) - (cond - (reftex-select-marked - (setq entries (nreverse reftex-select-marked))) - (data - (setq entries (list (list data)))) - (t (setq entries nil))) - (when entries - (if (equal key ?a) (push 'concat entries)) - (setq reftex-last-used-reference entries)) + ((eq key ?x) + ;; select an external document + (setq xr-index (reftex-select-external-document + xr-alist xr-index)) + (setq buf (or (reftex-get-file-buffer-force + (cdr (nth xr-index xr-alist))) + (error "Cannot switch document")) + prefix (or (car (nth xr-index xr-alist)) "")) (set-buffer buf) + (reftex-access-scan-info)) + ((stringp key) + (setq entries + (list + (list + (or (assoc key (symbol-value reftex-docstruct-symbol)) + (list key typekey))))) (throw 'exit t)) - (t (error "This should not happen (reftex-offer-label-menu)")))))) + ((memq key '(?a ?A return)) + (cond + (reftex-select-marked + (setq entries (nreverse reftex-select-marked))) + (data + (setq entries (list (list data)))) + (t (setq entries nil))) + (when entries + (if (equal key ?a) (push 'concat entries)) + (setq reftex-last-used-reference entries)) + (set-buffer buf) + (throw 'exit t)) + (t (error "This should not happen (reftex-offer-label-menu)")))))) (save-excursion - (while reftex-buffers-with-changed-invisibility - (set-buffer (car (car reftex-buffers-with-changed-invisibility))) - (setq buffer-invisibility-spec - (cdr (pop reftex-buffers-with-changed-invisibility))))) + (while reftex-buffers-with-changed-invisibility + (set-buffer (car (car reftex-buffers-with-changed-invisibility))) + (setq buffer-invisibility-spec + (cdr (pop reftex-buffers-with-changed-invisibility))))) (mapcar (lambda (buf) (and (buffer-live-p buf) (bury-buffer buf))) - selection-buffers) + selection-buffers) (reftex-kill-temporary-buffers)) ;; Add the prefixes, put together the relevant information in the form ;; (LABEL TYPEKEY SEPARATOR) and return a list of those. (mapcar (lambda (x) - (if (listp x) - (list (concat prefix (car (car x))) - (nth 1 (car x)) - (nth 2 x)) - x)) - entries))) + (if (listp x) + (list (concat prefix (car (car x))) + (nth 1 (car x)) + (nth 2 x)) + x)) + entries))) (defun reftex-reparse-document (&optional buffer data key) ;; Rescan the document. @@ -669,14 +669,14 @@ When called with 2 C-u prefix args, disable magic word recognition." (defun reftex-query-label-type () ;; Ask for label type - (let ((key (reftex-select-with-char - reftex-type-query-prompt reftex-type-query-help 3))) + (let ((key (reftex-select-with-char + reftex-type-query-prompt reftex-type-query-help 3))) (unless (member (char-to-string key) reftex-typekey-list) (error "No such label type: %s" (char-to-string key))) (char-to-string key))) -(defun reftex-show-label-location (data forward no-revisit - &optional stay error) +(defun reftex-show-label-location (data forward no-revisit + &optional stay error) ;; View the definition site of a label in another window. ;; DATA is an entry from the docstruct list. ;; FORWARD indicates if the label is likely forward from current point. @@ -685,53 +685,53 @@ When called with 2 C-u prefix args, disable magic word recognition." ;; ERROR means throw an error exception when the label cannot be found. ;; If ERROR is nil, the return value of this function indicates success. (let* ((this-window (selected-window)) - (errorf (if error 'error 'message)) + (errorf (if error 'error 'message)) label file buffer re found) (catch 'exit (setq label (nth 0 data) - file (nth 3 data)) + file (nth 3 data)) (unless file - (funcall errorf "Unknown label - reparse might help") - (throw 'exit nil)) + (funcall errorf "Unknown label - reparse might help") + (throw 'exit nil)) ;; Goto the file in another window - (setq buffer - (if no-revisit - (reftex-get-buffer-visiting file) - (reftex-get-file-buffer-force - file (not reftex-keep-temporary-buffers)))) + (setq buffer + (if no-revisit + (reftex-get-buffer-visiting file) + (reftex-get-file-buffer-force + file (not reftex-keep-temporary-buffers)))) (if buffer ;; good - the file is available (switch-to-buffer-other-window buffer) ;; we have got a problem here. The file does not exist. ;; Let' get out of here.. - (funcall errorf "Label %s not found" label) - (throw 'exit nil)) + (funcall errorf "Label %s not found" label) + (throw 'exit nil)) ;; search for that label (setq re (format reftex-find-label-regexp-format (regexp-quote label))) (setq found - (if forward - (re-search-forward re nil t) - (re-search-backward re nil t))) + (if forward + (re-search-forward re nil t) + (re-search-backward re nil t))) (unless found (goto-char (point-min)) - (unless (setq found (re-search-forward re nil t)) - ;; Ooops. Must be in a macro with distributed args. - (setq found - (re-search-forward - (format reftex-find-label-regexp-format2 - (regexp-quote label)) nil t)))) + (unless (setq found (re-search-forward re nil t)) + ;; Ooops. Must be in a macro with distributed args. + (setq found + (re-search-forward + (format reftex-find-label-regexp-format2 + (regexp-quote label)) nil t)))) (if (match-end 3) - (progn - (reftex-highlight 0 (match-beginning 3) (match-end 3)) - (reftex-show-entry (match-beginning 3) (match-end 3)) - (recenter '(4)) - (unless stay (select-window this-window))) - (select-window this-window) - (funcall errorf "Label %s not found" label)) + (progn + (reftex-highlight 0 (match-beginning 3) (match-end 3)) + (reftex-show-entry (match-beginning 3) (match-end 3)) + (recenter '(4)) + (unless stay (select-window this-window))) + (select-window this-window) + (funcall errorf "Label %s not found" label)) found))) (defvar font-lock-mode) @@ -744,34 +744,34 @@ When called with 2 C-u prefix args, disable magic word recognition." (re-search-forward "[\n\r]" nil 1 n) (point)))) (cond ((and (boundp 'buffer-invisibility-spec) buffer-invisibility-spec - (get-char-property (1+ beg-hlt) 'invisible)) + (get-char-property (1+ beg-hlt) 'invisible)) ;; Invisible with text properties. That is easy to change. (push (cons (current-buffer) buffer-invisibility-spec) - reftex-buffers-with-changed-invisibility) + reftex-buffers-with-changed-invisibility) (setq buffer-invisibility-spec nil)) ((string-match "\r" (buffer-substring beg end)) ;; Invisible with selective display. We need to copy it. (let ((string (buffer-substring-no-properties beg end))) - (switch-to-buffer "*RefTeX Context Copy*") - (setq buffer-read-only nil) - (erase-buffer) - (insert string) - (subst-char-in-region (point-min) (point-max) ?\r ?\n t) - (goto-char (- beg-hlt beg)) - (reftex-highlight 0 (1+ (- beg-hlt beg)) (1+ (- end-hlt beg))) - (if (reftex-refontify) - (when (or (not (eq major-mode 'latex-mode)) - (not font-lock-mode)) - (latex-mode) - (run-hook-with-args - 'reftex-pre-refontification-functions - reftex-call-back-to-this-buffer 'reftex-hidden) - (turn-on-font-lock)) - (when (or (not (eq major-mode 'fundamental-mode)) - font-lock-mode) - (fundamental-mode))) - (run-hooks 'reftex-display-copied-context-hook) - (setq buffer-read-only t)))))) + (switch-to-buffer "*RefTeX Context Copy*") + (setq buffer-read-only nil) + (erase-buffer) + (insert string) + (subst-char-in-region (point-min) (point-max) ?\r ?\n t) + (goto-char (- beg-hlt beg)) + (reftex-highlight 0 (1+ (- beg-hlt beg)) (1+ (- end-hlt beg))) + (if (reftex-refontify) + (when (or (not (eq major-mode 'latex-mode)) + (not font-lock-mode)) + (latex-mode) + (run-hook-with-args + 'reftex-pre-refontification-functions + reftex-call-back-to-this-buffer 'reftex-hidden) + (turn-on-font-lock)) + (when (or (not (eq major-mode 'fundamental-mode)) + font-lock-mode) + (fundamental-mode))) + (run-hooks 'reftex-display-copied-context-hook) + (setq buffer-read-only t)))))) (defun reftex-varioref-vref () "Insert a reference using the `\\vref' macro from the varioref package." @@ -782,15 +782,15 @@ When called with 2 C-u prefix args, disable magic word recognition." "Insert a reference using the `\\fref' macro from the fancyref package." (interactive) (let ((reftex-format-ref-function 'reftex-format-fref) - ;;(reftex-guess-label-type nil) ;FIXME do we want this???? - ) + ;;(reftex-guess-label-type nil) ;FIXME do we want this???? + ) (reftex-reference))) (defun reftex-fancyref-Fref () "Insert a reference using the `\\Fref' macro from the fancyref package." (interactive) (let ((reftex-format-ref-function 'reftex-format-Fref) - ;;(reftex-guess-label-type nil) ;FIXME do we want this???? - ) + ;;(reftex-guess-label-type nil) ;FIXME do we want this???? + ) (reftex-reference))) (defun reftex-format-vref (label fmt) @@ -802,36 +802,26 @@ When called with 2 C-u prefix args, disable magic word recognition." (defun reftex-format-fref (label def-fmt) (format "\\fref{%s}" label)) - -;(defun reftex-goto-label () -; (interactive) -; (reftex-access-scan-info) -; (let* ((docstruct (symbol-value reftex-docstruct-symbol)) -; (label (completing-read "Label: " docstruct -; (lambda (x) (stringp (car x))) t)) -; (selection (assoc label docstruct))) -; (reftex-show-label-location selection t nil 'stay) -; (reftex-unhighlight 0))) - (defun reftex-goto-label (&optional other-window) "Prompt for a label (with completion) and jump to the location of this label. Optional prefix argument OTHER-WINDOW goes to the label in another window." (interactive "P") (reftex-access-scan-info) (let* ((wcfg (current-window-configuration)) - (docstruct (symbol-value reftex-docstruct-symbol)) - (label (completing-read "Label: " docstruct - (lambda (x) (stringp (car x))) t)) - (selection (assoc label docstruct)) - (where (progn - (reftex-show-label-location selection t nil 'stay) - (point-marker)))) + (docstruct (symbol-value reftex-docstruct-symbol)) + (label (completing-read "Label: " docstruct + (lambda (x) (stringp (car x))) t)) + (selection (assoc label docstruct)) + (where (progn + (reftex-show-label-location selection t nil 'stay) + (point-marker)))) (unless other-window (set-window-configuration wcfg) (switch-to-buffer (marker-buffer where)) - (goto-char where)) + (goto-char where)) (reftex-unhighlight 0))) +;;; arch-tag: 52f14032-fb76-4d31-954f-750c72415675 ;;; reftex-ref.el ends here diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el index cd9119ea74..3074e83b68 100644 --- a/lisp/textmodes/reftex-sel.el +++ b/lisp/textmodes/reftex-sel.el @@ -1,8 +1,8 @@ ;;; reftex-sel.el --- the selection modes for RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.18 +;; Version: 4.21 ;; This file is part of GNU Emacs. @@ -38,7 +38,7 @@ started with the command \\[reftex-reference].") (defun reftex-select-label-mode () "Major mode for selecting a label in a LaTeX document. This buffer was created with RefTeX. -It only has a meaningful keymap when you are in the middle of a +It only has a meaningful keymap when you are in the middle of a selection process. To select a label, move the cursor to it and press RET. Press `?' for a summary of important key bindings. @@ -54,7 +54,7 @@ During a selection process, these are the local bindings. (make-local-hook 'pre-command-hook) (make-local-hook 'post-command-hook)) (setq major-mode 'reftex-select-label-mode - mode-name "LSelect") + mode-name "LSelect") (set (make-local-variable 'reftex-select-marked) nil) (when (syntax-table-p reftex-latex-syntax-table) (set-syntax-table reftex-latex-syntax-table)) @@ -69,7 +69,7 @@ started with the command \\[reftex-citation].") (defun reftex-select-bib-mode () "Major mode for selecting a citation key in a LaTeX document. This buffer was created with RefTeX. -It only has a meaningful keymap when you are in the middle of a +It only has a meaningful keymap when you are in the middle of a selection process. In order to select a citation, move the cursor to it and press RET. Press `?' for a summary of important key bindings. @@ -84,7 +84,7 @@ During a selection process, these are the local bindings. (make-local-hook 'pre-command-hook) (make-local-hook 'post-command-hook)) (setq major-mode 'reftex-select-bib-mode - mode-name "BSelect") + mode-name "BSelect") (set (make-local-variable 'reftex-select-marked) nil) ;; We do not set a local map - reftex-select-item does this. (run-hooks 'reftex-select-bib-mode-hook)) @@ -99,18 +99,18 @@ During a selection process, these are the local bindings. ;;; (set-buffer buf) ;;; (reftex-access-scan-info) ;;; (let* ((rest (memq here-am-I (symbol-value reftex-docstruct-symbol))) -;;; entry) -;;; (while (setq entry (pop rest)) -;;; (if (or (and typekey -;;; (stringp (car entry)) -;;; (or (equal typekey " ") -;;; (equal typekey (nth 1 entry)))) -;;; (and toc (eq (car entry) 'toc)) -;;; (and index (eq (car entry) 'index)) -;;; (and file -;;; (memq (car entry) '(bof eof file-error)))) -;;; (throw 'exit entry))) -;;; nil)))) +;;; entry) +;;; (while (setq entry (pop rest)) +;;; (if (or (and typekey +;;; (stringp (car entry)) +;;; (or (equal typekey " ") +;;; (equal typekey (nth 1 entry)))) +;;; (and toc (eq (car entry) 'toc)) +;;; (and index (eq (car entry) 'index)) +;;; (and file +;;; (memq (car entry) '(bof eof file-error)))) +;;; (throw 'exit entry))) +;;; nil)))) (defun reftex-get-offset (buf here-am-I &optional typekey toc index file) ;; Find the correct offset data, like insert-docstruct would, but faster. @@ -122,24 +122,24 @@ During a selection process, these are the local bindings. (set-buffer buf) (reftex-access-scan-info) (let* ((rest (symbol-value reftex-docstruct-symbol)) - lastentry entry) - (while (setq entry (pop rest)) - (if (or (and typekey - (stringp (car entry)) - (or (equal typekey " ") - (equal typekey (nth 1 entry)))) - (and toc (eq (car entry) 'toc)) - (and index (eq (car entry) 'index)) - (and file - (memq (car entry) '(bof eof file-error)))) - (setq lastentry entry)) - (if (eq entry here-am-I) - (throw 'exit (or lastentry entry)))) - nil)))) + lastentry entry) + (while (setq entry (pop rest)) + (if (or (and typekey + (stringp (car entry)) + (or (equal typekey " ") + (equal typekey (nth 1 entry)))) + (and toc (eq (car entry) 'toc)) + (and index (eq (car entry) 'index)) + (and file + (memq (car entry) '(bof eof file-error)))) + (setq lastentry entry)) + (if (eq entry here-am-I) + (throw 'exit (or lastentry entry)))) + nil)))) (defun reftex-insert-docstruct (buf toc labels index-entries files context counter show-commented - here-I-am xr-prefix toc-buffer) + here-I-am xr-prefix toc-buffer) ;; Insert an excerpt of the docstruct list. ;; Return the data property of the entry corresponding to HERE-I-AM. ;; BUF is the buffer which has the correct docstruct-symbol. @@ -163,18 +163,18 @@ During a selection process, these are the local bindings. (context-indent (concat ". " (if toc (make-string (* 7 reftex-level-indent) ?\ ) ""))) - (mouse-face - (if (memq reftex-highlight-selection '(mouse both)) - reftex-mouse-selected-face - nil)) - (label-face (reftex-verified-face reftex-label-face - 'font-lock-constant-face - 'font-lock-reference-face)) - (index-face (reftex-verified-face reftex-index-face - 'font-lock-constant-face - 'font-lock-reference-face)) + (mouse-face + (if (memq reftex-highlight-selection '(mouse both)) + reftex-mouse-selected-face + nil)) + (label-face (reftex-verified-face reftex-label-face + 'font-lock-constant-face + 'font-lock-reference-face)) + (index-face (reftex-verified-face reftex-index-face + 'font-lock-constant-face + 'font-lock-reference-face)) all cell text label typekey note comment master-dir-re - prev-inserted offset from to index-tag docstruct-symbol) + prev-inserted offset from to index-tag docstruct-symbol) ;; Pop to buffer buf to get the correct buffer-local variables (save-excursion @@ -184,7 +184,7 @@ During a selection process, these are the local bindings. (reftex-access-scan-info) (setq docstruct-symbol reftex-docstruct-symbol - all (symbol-value reftex-docstruct-symbol) + all (symbol-value reftex-docstruct-symbol) reftex-active-toc nil master-dir-re (concat "\\`" (regexp-quote @@ -192,7 +192,7 @@ During a selection process, these are the local bindings. (set (make-local-variable 'reftex-docstruct-symbol) docstruct-symbol) (set (make-local-variable 'reftex-prefix) - (cdr (assoc labels reftex-typekey-to-prefix-alist))) + (cdr (assoc labels reftex-typekey-to-prefix-alist))) (if (equal reftex-prefix " ") (setq reftex-prefix nil)) ;; Walk the docstruct and insert the appropriate stuff @@ -204,14 +204,14 @@ During a selection process, these are the local bindings. (cond ((memq (car cell) '(bib thebib label-numbers appendix - master-dir bibview-cache is-multi xr xr-doc))) + master-dir bibview-cache is-multi xr xr-doc))) ;; These are currently ignored ((memq (car cell) '(bof eof file-error)) ;; Beginning or end of a file (when files - (setq prev-inserted cell) -; (if (eq offset 'attention) (setq offset cell)) + (setq prev-inserted cell) +; (if (eq offset 'attention) (setq offset cell)) (insert " File " (if (string-match master-dir-re (nth 1 cell)) (substring (nth 1 cell) (match-end 0)) @@ -219,41 +219,41 @@ During a selection process, these are the local bindings. (cond ((eq (car cell) 'bof) " starts here\n") ((eq (car cell) 'eof) " ends here\n") ((eq (car cell) 'file-error) " was not found\n"))) - (setq to (point)) + (setq to (point)) (when font (put-text-property from to 'face reftex-file-boundary-face)) - (when toc-buffer - (if mouse-face - (put-text-property from (1- to) - 'mouse-face mouse-face)) - (put-text-property from to :data cell)))) + (when toc-buffer + (if mouse-face + (put-text-property from (1- to) + 'mouse-face mouse-face)) + (put-text-property from to :data cell)))) ((eq (car cell) 'toc) ;; a table of contents entry (when (and toc - (<= (nth 5 cell) reftex-toc-max-level)) - (setq prev-inserted cell) -; (if (eq offset 'attention) (setq offset cell)) + (<= (nth 5 cell) reftex-toc-max-level)) + (setq prev-inserted cell) +; (if (eq offset 'attention) (setq offset cell)) (setq reftex-active-toc cell) (insert (concat toc-indent (nth 2 cell) "\n")) - (setq to (point)) - (when font - (put-text-property from to - 'face reftex-section-heading-face)) - (when toc-buffer - (if mouse-face - (put-text-property from (1- to) - 'mouse-face mouse-face)) - (put-text-property from to :data cell)) - (goto-char to))) + (setq to (point)) + (when font + (put-text-property from to + 'face reftex-section-heading-face)) + (when toc-buffer + (if mouse-face + (put-text-property from (1- to) + 'mouse-face mouse-face)) + (put-text-property from to :data cell)) + (goto-char to))) ((stringp (car cell)) ;; a label (when (null (nth 2 cell)) ;; No context yet. Quick update. - (setcdr cell (cdr (reftex-label-info-update cell))) - (put docstruct-symbol 'modified t)) + (setcdr cell (cdr (reftex-label-info-update cell))) + (put docstruct-symbol 'modified t)) (setq label (car cell) typekey (nth 1 cell) @@ -262,27 +262,27 @@ During a selection process, these are the local bindings. note (nth 5 cell)) (when (and labels - (or (eq labels t) - (string= typekey labels) - (string= labels " ")) + (or (eq labels t) + (string= typekey labels) + (string= labels " ")) (or show-commented (null comment))) ;; Yes we want this one (incf cnt) - (setq prev-inserted cell) -; (if (eq offset 'attention) (setq offset cell)) + (setq prev-inserted cell) +; (if (eq offset 'attention) (setq offset cell)) - (setq label (concat xr-prefix label)) + (setq label (concat xr-prefix label)) (when comment (setq label (concat "% " label))) (insert label-indent label) (when font - (setq to (point)) + (setq to (point)) (put-text-property (- (point) (length label)) to 'face (if comment 'font-lock-comment-face label-face)) - (goto-char to)) + (goto-char to)) (insert (if counter (format " (%d) " cnt) "") (if comment " LABEL IS COMMENTED OUT " "") @@ -294,46 +294,46 @@ During a selection process, these are the local bindings. (insert context-indent text "\n") (setq to (point))) (put-text-property from to :data cell) - (when mouse-face - (put-text-property from (1- to) - 'mouse-face mouse-face)) + (when mouse-face + (put-text-property from (1- to) + 'mouse-face mouse-face)) (goto-char to))) ((eq (car cell) 'index) - ;; index entry - (when (and index-entries - (or (eq t index-entries) - (string= index-entries (nth 1 cell)))) - (setq prev-inserted cell) -; (if (eq offset 'attention) (setq offset cell)) - (setq index-tag (format "<%s>" (nth 1 cell))) - (and font - (put-text-property 0 (length index-tag) - 'face reftex-index-tag-face index-tag)) - (insert label-indent index-tag " " (nth 7 cell)) - - (when font - (setq to (point)) - (put-text-property - (- (point) (length (nth 7 cell))) to - 'face index-face) - (goto-char to)) - (insert "\n") - (setq to (point)) - - (when context - (insert context-indent (nth 2 cell) "\n") - (setq to (point))) - (put-text-property from to :data cell) - (when mouse-face - (put-text-property from (1- to) - 'mouse-face mouse-face)) + ;; index entry + (when (and index-entries + (or (eq t index-entries) + (string= index-entries (nth 1 cell)))) + (setq prev-inserted cell) +; (if (eq offset 'attention) (setq offset cell)) + (setq index-tag (format "<%s>" (nth 1 cell))) + (and font + (put-text-property 0 (length index-tag) + 'face reftex-index-tag-face index-tag)) + (insert label-indent index-tag " " (nth 7 cell)) + + (when font + (setq to (point)) + (put-text-property + (- (point) (length (nth 7 cell))) to + 'face index-face) + (goto-char to)) + (insert "\n") + (setq to (point)) + + (when context + (insert context-indent (nth 2 cell) "\n") + (setq to (point))) + (put-text-property from to :data cell) + (when mouse-face + (put-text-property from (1- to) + 'mouse-face mouse-face)) (goto-char to)))) - (if (eq cell here-I-am) - (setq offset 'attention)) + (if (eq cell here-I-am) + (setq offset 'attention)) (if (and prev-inserted (eq offset 'attention)) - (setq offset prev-inserted)) + (setq offset prev-inserted)) ) (when (reftex-refontify) @@ -351,18 +351,18 @@ During a selection process, these are the local bindings. (goto-char (point-min)) (let (loc pos) (while locations - (setq loc (pop locations)) - (cond - ((null loc)) - ((listp loc) - (setq pos (text-property-any (point-min) (point-max) :data loc)) - (when pos - (goto-char pos) - (throw 'exit t))) - ((integerp loc) - (when (<= loc (count-lines (point-min) (point-max))) - (goto-line loc) - (throw 'exit t))))) + (setq loc (pop locations)) + (cond + ((null loc)) + ((listp loc) + (setq pos (text-property-any (point-min) (point-max) :data loc)) + (when pos + (goto-char pos) + (throw 'exit t))) + ((integerp loc) + (when (<= loc (count-lines (point-min) (point-max))) + (goto-line loc) + (throw 'exit t))))) (goto-char fallback)))) (defvar reftex-last-data nil) @@ -370,8 +370,8 @@ During a selection process, these are the local bindings. (defvar reftex-select-marked nil) (defun reftex-select-item (prompt help-string keymap - &optional offset - call-back cb-flag) + &optional offset + call-back cb-flag) ;; Select an item, using PROMPT. The function returns a key indicating ;; an exit status, along with a data structure indicating which item was ;; selected. @@ -393,36 +393,36 @@ During a selection process, these are the local bindings. (save-window-excursion (setq truncate-lines t) - ;; Find a good starting point - (reftex-find-start-point - (point-min) offset reftex-last-data reftex-last-line) + ;; Find a good starting point + (reftex-find-start-point + (point-min) offset reftex-last-data reftex-last-line) (beginning-of-line 1) - (set (make-local-variable 'reftex-last-follow-point) (point)) + (set (make-local-variable 'reftex-last-follow-point) (point)) (unwind-protect - (progn - (use-local-map keymap) - (add-hook 'pre-command-hook 'reftex-select-pre-command-hook nil t) - (add-hook 'post-command-hook 'reftex-select-post-command-hook nil t) - (princ prompt) - (set-marker reftex-recursive-edit-marker (point)) - ;; XEmacs does not run post-command-hook here - (and (featurep 'xemacs) (run-hooks 'post-command-hook)) - (recursive-edit)) - - (set-marker reftex-recursive-edit-marker nil) - (save-excursion - (set-buffer selection-buffer) - (use-local-map nil) - (remove-hook 'pre-command-hook 'reftex-select-pre-command-hook t) - (remove-hook 'post-command-hook - 'reftex-select-post-command-hook t)) - ;; Kill the mark overlays - (mapcar (lambda (c) (delete-overlay (nth 1 c))) - reftex-select-marked))))) + (progn + (use-local-map keymap) + (add-hook 'pre-command-hook 'reftex-select-pre-command-hook nil t) + (add-hook 'post-command-hook 'reftex-select-post-command-hook nil t) + (princ prompt) + (set-marker reftex-recursive-edit-marker (point)) + ;; XEmacs does not run post-command-hook here + (and (featurep 'xemacs) (run-hooks 'post-command-hook)) + (recursive-edit)) + + (set-marker reftex-recursive-edit-marker nil) + (save-excursion + (set-buffer selection-buffer) + (use-local-map nil) + (remove-hook 'pre-command-hook 'reftex-select-pre-command-hook t) + (remove-hook 'post-command-hook + 'reftex-select-post-command-hook t)) + ;; Kill the mark overlays + (mapcar (lambda (c) (delete-overlay (nth 1 c))) + reftex-select-marked))))) (set (make-local-variable 'reftex-last-line) - (+ (count-lines (point-min) (point)) (if (bolp) 1 0))) + (+ (count-lines (point-min) (point)) (if (bolp) 1 0))) (set (make-local-variable 'reftex-last-data) last-data) (reftex-kill-buffer "*RefTeX Help*") (setq reftex-callback-fwd (not reftex-callback-fwd)) ;; ;-))) @@ -451,25 +451,25 @@ During a selection process, these are the local bindings. (let (b e) (setq data (get-text-property (point) :data)) (setq last-data (or data last-data)) - + (when (and data cb-flag - (not (equal reftex-last-follow-point (point)))) + (not (equal reftex-last-follow-point (point)))) (setq reftex-last-follow-point (point)) - (funcall call-back data reftex-callback-fwd - (not reftex-revisit-to-follow))) + (funcall call-back data reftex-callback-fwd + (not reftex-revisit-to-follow))) (if data - (setq b (or (previous-single-property-change - (1+ (point)) :data) - (point-min)) - e (or (next-single-property-change - (point) :data) - (point-max))) + (setq b (or (previous-single-property-change + (1+ (point)) :data) + (point-min)) + e (or (next-single-property-change + (point) :data) + (point-max))) (setq b (point) e (point))) (and (memq reftex-highlight-selection '(cursor both)) - (reftex-highlight 1 b e)) + (reftex-highlight 1 b e)) (if (or (not (pos-visible-in-window-p b)) - (not (pos-visible-in-window-p e))) - (recenter '(4))) + (not (pos-visible-in-window-p e))) + (recenter '(4))) (unless (current-message) (princ prompt)))) @@ -518,12 +518,12 @@ Useful for large TOC's." (let (pos) (cond ((and (local-variable-p 'reftex-last-data (current-buffer)) - reftex-last-data - (setq pos (text-property-any (point-min) (point-max) - :data reftex-last-data))) + reftex-last-data + (setq pos (text-property-any (point-min) (point-max) + :data reftex-last-data))) (goto-char pos)) ((and (local-variable-p 'reftex-last-line (current-buffer)) - (integerp reftex-last-line)) + (integerp reftex-last-line)) (goto-line reftex-last-line)) (t (ding))))) (defun reftex-select-toggle-follow () @@ -542,20 +542,20 @@ Useful for large TOC's." "Toggle the macro used for referencing the label between \\ref and \\vref." (interactive) (setq refstyle - (cond ((string= refstyle "\\ref") "\\fref") - ((string= refstyle "\\fref") "\\Fref") - (t "\\ref"))) + (cond ((string= refstyle "\\ref") "\\fref") + ((string= refstyle "\\fref") "\\Fref") + (t "\\ref"))) (force-mode-line-update)) (defun reftex-select-show-insertion-point () "Show the point from where selection was started in another window." (interactive) (let ((this-window (selected-window))) (unwind-protect - (progn - (switch-to-buffer-other-window - (marker-buffer reftex-select-return-marker)) - (goto-char (marker-position reftex-select-return-marker)) - (recenter '(4))) + (progn + (switch-to-buffer-other-window + (marker-buffer reftex-select-return-marker)) + (goto-char (marker-position reftex-select-return-marker)) + (recenter '(4))) (select-window this-window)))) (defun reftex-select-callback () "Show full context in another window." @@ -575,16 +575,16 @@ Useful for large TOC's." (defun reftex-select-read-label () "Use minibuffer to read a label to reference, with completion." (interactive) - (let ((label (completing-read - "Label: " (symbol-value reftex-docstruct-symbol) - nil nil reftex-prefix))) + (let ((label (completing-read + "Label: " (symbol-value reftex-docstruct-symbol) + nil nil reftex-prefix))) (unless (or (equal label "") (equal label reftex-prefix)) (throw 'myexit label)))) (defun reftex-select-read-cite () "Use minibuffer to read a citation key with completion." (interactive) (let* ((key (completing-read "Citation key: " found-list)) - (entry (assoc key found-list))) + (entry (assoc key found-list))) (cond ((or (null key) (equal key ""))) (entry @@ -597,23 +597,23 @@ Useful for large TOC's." "Mark the entry." (interactive) (let* ((data (get-text-property (point) :data)) - boe eoe ovl) + boe eoe ovl) (or data (error "No entry to mark at point")) (if (assq data reftex-select-marked) - (error "Entry is already marked")) + (error "Entry is already marked")) (setq boe (or (previous-single-property-change (1+ (point)) :data) - (point-min)) - eoe (or (next-single-property-change (point) :data) (point-max))) + (point-min)) + eoe (or (next-single-property-change (point) :data) (point-max))) (setq ovl (make-overlay boe eoe)) (push (list data ovl separator) reftex-select-marked) (overlay-put ovl 'face reftex-select-mark-face) (if (featurep 'xemacs) - ;; before-string property is broken in Emacs - (overlay-put ovl 'before-string - (if separator - (format "*%c%d* " separator - (length reftex-select-marked)) - (format "*%d* " (length reftex-select-marked))))) + ;; before-string property is broken in Emacs + (overlay-put ovl 'before-string + (if separator + (format "*%c%d* " separator + (length reftex-select-marked)) + (format "*%d* " (length reftex-select-marked))))) (message "Entry has mark no. %d" (length reftex-select-marked)))) (defun reftex-select-mark-comma () @@ -633,25 +633,25 @@ Useful for large TOC's." "Unmark the entry." (interactive) (let* ((data (get-text-property (point) :data)) - (cell (assq data reftex-select-marked)) - (ovl (nth 1 cell)) - (cnt 0) - sep) + (cell (assq data reftex-select-marked)) + (ovl (nth 1 cell)) + (cnt 0) + sep) (unless cell (error "No marked entry at point")) (and ovl (delete-overlay ovl)) (setq reftex-select-marked (delq cell reftex-select-marked)) (if (featurep 'xemacs) - ;; before-string property is broken in Emacs - (progn - (setq cnt (1+ (length reftex-select-marked))) - (mapcar (lambda (c) - (setq sep (nth 2 c)) - (overlay-put (nth 1 c) 'before-string - (if sep - (format "*%c%d* " sep (decf cnt)) - (format "*%d* " (decf cnt))))) - reftex-select-marked))) + ;; before-string property is broken in Emacs + (progn + (setq cnt (1+ (length reftex-select-marked))) + (mapcar (lambda (c) + (setq sep (nth 2 c)) + (overlay-put (nth 1 c) 'before-string + (if sep + (format "*%c%d* " sep (decf cnt)) + (format "*%d* " (decf cnt))))) + reftex-select-marked))) (message "Entry no longer marked"))) (defun reftex-select-help () @@ -664,27 +664,27 @@ Useful for large TOC's." ;; Common bindings in reftex-select-label-map and reftex-select-bib-map (let ((map (make-sparse-keymap))) (substitute-key-definition - 'next-line 'reftex-select-next map global-map) + 'next-line 'reftex-select-next map global-map) (substitute-key-definition - 'previous-line 'reftex-select-previous map global-map) + 'previous-line 'reftex-select-previous map global-map) (substitute-key-definition 'keyboard-quit 'reftex-select-keyboard-quit map global-map) (substitute-key-definition - 'newline 'reftex-select-accept map global-map) + 'newline 'reftex-select-accept map global-map) (loop for x in - '((" " . reftex-select-callback) - ("n" . reftex-select-next) - ([(down)] . reftex-select-next) - ("p" . reftex-select-previous) - ([(up)] . reftex-select-previous) - ("f" . reftex-select-toggle-follow) - ("\C-m" . reftex-select-accept) - ([(return)] . reftex-select-accept) - ("q" . reftex-select-quit) - ("." . reftex-select-show-insertion-point) - ("?" . reftex-select-help)) - do (define-key map (car x) (cdr x))) + '((" " . reftex-select-callback) + ("n" . reftex-select-next) + ([(down)] . reftex-select-next) + ("p" . reftex-select-previous) + ([(up)] . reftex-select-previous) + ("f" . reftex-select-toggle-follow) + ("\C-m" . reftex-select-accept) + ([(return)] . reftex-select-accept) + ("q" . reftex-select-quit) + ("." . reftex-select-show-insertion-point) + ("?" . reftex-select-help)) + do (define-key map (car x) (cdr x))) ;; The mouse-2 binding (if (featurep 'xemacs) @@ -693,7 +693,7 @@ Useful for large TOC's." ;; Digit arguments (loop for key across "0123456789" do - (define-key map (vector (list key)) 'digit-argument)) + (define-key map (vector (list key)) 'digit-argument)) (define-key map "-" 'negative-argument) ;; Make two maps @@ -703,40 +703,41 @@ Useful for large TOC's." ;; Specific bindings in reftex-select-label-map (loop for key across "aAcgFlrRstx#%" do (define-key reftex-select-label-map (vector (list key)) - (list 'lambda '() - "Press `?' during selection to find out about this key." - '(interactive) (list 'throw '(quote myexit) key)))) + (list 'lambda '() + "Press `?' during selection to find out about this key." + '(interactive) (list 'throw '(quote myexit) key)))) (loop for x in '(("b" . reftex-select-jump-to-previous) - ("z" . reftex-select-jump) - ("v" . reftex-select-toggle-varioref) - ("V" . reftex-select-toggle-fancyref) - ("m" . reftex-select-mark) - ("u" . reftex-select-unmark) - ("," . reftex-select-mark-comma) - ("-" . reftex-select-mark-to) - ("+" . reftex-select-mark-and) - ([(tab)] . reftex-select-read-label) - ("\C-i" . reftex-select-read-label) - ("\C-c\C-n" . reftex-select-next-heading) - ("\C-c\C-p" . reftex-select-previous-heading)) + ("z" . reftex-select-jump) + ("v" . reftex-select-toggle-varioref) + ("V" . reftex-select-toggle-fancyref) + ("m" . reftex-select-mark) + ("u" . reftex-select-unmark) + ("," . reftex-select-mark-comma) + ("-" . reftex-select-mark-to) + ("+" . reftex-select-mark-and) + ([(tab)] . reftex-select-read-label) + ("\C-i" . reftex-select-read-label) + ("\C-c\C-n" . reftex-select-next-heading) + ("\C-c\C-p" . reftex-select-previous-heading)) do (define-key reftex-select-label-map (car x) (cdr x))) ;; Specific bindings in reftex-select-bib-map (loop for key across "grRaA" do (define-key reftex-select-bib-map (vector (list key)) - (list 'lambda '() - "Press `?' during selection to find out about this key." - '(interactive) (list 'throw '(quote myexit) key)))) + (list 'lambda '() + "Press `?' during selection to find out about this key." + '(interactive) (list 'throw '(quote myexit) key)))) (loop for x in '(("\C-i" . reftex-select-read-cite) - ([(tab)] . reftex-select-read-cite) - ("m" . reftex-select-mark) - ("u" . reftex-select-unmark)) + ([(tab)] . reftex-select-read-cite) + ("m" . reftex-select-mark) + ("u" . reftex-select-unmark)) do (define-key reftex-select-bib-map (car x) (cdr x))) + - +;;; arch-tag: 842078ff-0586-4e0b-957e-536e08218464 ;;; reftex-sel.el ends here diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el index 414760747e..8d217f08df 100644 --- a/lisp/textmodes/reftex-toc.el +++ b/lisp/textmodes/reftex-toc.el @@ -1,8 +1,8 @@ ;;; reftex-toc.el --- RefTeX's table of contents mode -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.18 +;; Version: 4.21 ;; This file is part of GNU Emacs. @@ -46,21 +46,23 @@ Here are all local bindings. (interactive) (kill-all-local-variables) (setq major-mode 'reftex-toc-mode - mode-name "TOC") + mode-name "TOC") (use-local-map reftex-toc-map) + (set (make-local-variable 'transient-mark-mode) t) + (set (make-local-variable 'zmacs-regions) t) (set (make-local-variable 'revert-buffer-function) 'reftex-toc-revert) (set (make-local-variable 'reftex-toc-include-labels-indicator) "") (set (make-local-variable 'reftex-toc-max-level-indicator) (if (= reftex-toc-max-level 100) - "ALL" - (int-to-string reftex-toc-max-level))) + "ALL" + (int-to-string reftex-toc-max-level))) (setq mode-line-format - (list "---- " 'mode-line-buffer-identification - " " 'global-mode-string " (" mode-name ")" - " L<" 'reftex-toc-include-labels-indicator ">" - " I<" 'reftex-toc-include-index-indicator ">" - " T<" 'reftex-toc-max-level-indicator ">" - " -%-")) + (list "---- " 'mode-line-buffer-identification + " " 'global-mode-string " (" mode-name ")" + " L<" 'reftex-toc-include-labels-indicator ">" + " I<" 'reftex-toc-include-index-indicator ">" + " T<" 'reftex-toc-max-level-indicator ">" + " -%-")) (setq truncate-lines t) (when (featurep 'xemacs) ;; XEmacs needs the call to make-local-hook @@ -91,20 +93,26 @@ n / p next-line / previous-line SPC Show the corresponding location of the LaTeX document. TAB Goto the location and keep the *toc* window. RET Goto the location and hide the *toc* window (also on mouse-2). +< / > Promote / Demote section, or all sections in region. C-c > Display Index. With prefix arg, restrict index to current section. q / k Hide/Kill *toc* buffer, return to position of reftex-toc command. l i c F Toggle display of [l]abels, [i]ndex, [c]ontext, [F]ile borders. t Change maximum toc depth (e.g. `3 t' hides levels greater than 3). -f / a / g Toggle follow mode / toggle auto recenter / Refresh *toc* buffer. +f / g Toggle follow mode / Refresh *toc* buffer. +a / d Toggle auto recenter / Toggle dedicated frame r / C-u r Reparse the LaTeX document / Reparse entire LaTeX document. . In other window, show position from where `reftex-toc' was called. +M-% Global search and replace to rename label at point. x Switch to TOC of external document (with LaTeX package `xr'). -z Jump to a specific section (e.g. '3 z' goes to section 3") +z Jump to a specific section (e.g. '3 z' goes to section 3).") -(defun reftex-toc (&optional rebuild) +(defun reftex-toc (&optional rebuild reuse) "Show the table of contents for the current document. When called with a raw C-u prefix, rescan the document first." +;; The REUSE argument means, search all visible frames for a window +;; displaying the toc window. If yes, reuse this window. + (interactive) (if (or (not (string= reftex-last-toc-master (reftex-TeX-master-file))) @@ -129,40 +137,50 @@ When called with a raw C-u prefix, rescan the document first." (reftex-access-scan-info current-prefix-arg) (let* ((this-buf (current-buffer)) - (docstruct-symbol reftex-docstruct-symbol) - (xr-data (assq 'xr (symbol-value reftex-docstruct-symbol))) - (xr-alist (cons (cons "" (buffer-file-name)) (nth 1 xr-data))) - (here-I-am (if (boundp 'reftex-rebuilding-toc) - (get 'reftex-toc :reftex-data) - (car (reftex-where-am-I)))) - offset) - - (if (get-buffer-window "*toc*") - (select-window (get-buffer-window "*toc*")) + (docstruct-symbol reftex-docstruct-symbol) + (xr-data (assq 'xr (symbol-value reftex-docstruct-symbol))) + (xr-alist (cons (cons "" (buffer-file-name)) (nth 1 xr-data))) + (here-I-am (if (boundp 'reftex-rebuilding-toc) + (get 'reftex-toc :reftex-data) + (car (reftex-where-am-I)))) + (unsplittable (if (fboundp 'frame-property) + (frame-property (selected-frame) 'unsplittable) + (frame-parameter (selected-frame) 'unsplittable))) + offset toc-window) + + (if (setq toc-window (get-buffer-window + "*toc*" + (if reuse 'visible))) + (select-window toc-window) (when (or (not reftex-toc-keep-other-windows) - (< (window-height) (* 2 window-min-height))) - (delete-other-windows)) + (< (window-height) (* 2 window-min-height))) + (delete-other-windows)) (setq reftex-last-window-width (window-width) - reftex-last-window-height (window-height)) ; remember - (if reftex-toc-split-windows-horizontally - (split-window-horizontally - (floor (* (frame-width) reftex-toc-split-windows-horizontally-fraction))) - (split-window)) + reftex-last-window-height (window-height)) ; remember + + (unless unsplittable + (if reftex-toc-split-windows-horizontally + (split-window-horizontally + (floor (* (window-width) + reftex-toc-split-windows-fraction))) + (split-window-vertically + (floor (* (window-height) + reftex-toc-split-windows-fraction))))) (let ((default-major-mode 'reftex-toc-mode)) - (switch-to-buffer "*toc*"))) + (switch-to-buffer "*toc*"))) (or (eq major-mode 'reftex-toc-mode) (reftex-toc-mode)) (set (make-local-variable 'reftex-docstruct-symbol) docstruct-symbol) (setq reftex-toc-include-labels-indicator - (if (eq reftex-toc-include-labels t) - "ALL" - reftex-toc-include-labels)) + (if (eq reftex-toc-include-labels t) + "ALL" + reftex-toc-include-labels)) (setq reftex-toc-include-index-indicator - (if (eq reftex-toc-include-index-entries t) - "ALL" - reftex-toc-include-index-entries)) + (if (eq reftex-toc-include-index-entries t) + "ALL" + reftex-toc-include-index-entries)) (cond ((= (buffer-size) 0) @@ -182,34 +200,34 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help (put-text-property (point-min) (1+ (point-min)) 'xr-alist xr-alist) (setq offset - (reftex-insert-docstruct - this-buf - t ; include toc - reftex-toc-include-labels - reftex-toc-include-index-entries - reftex-toc-include-file-boundaries - reftex-toc-include-context - nil ; counter - nil ; commented - here-I-am - "" ; xr-prefix - t ; a toc buffer - )) - + (reftex-insert-docstruct + this-buf + t ; include toc + reftex-toc-include-labels + reftex-toc-include-index-entries + reftex-toc-include-file-boundaries + reftex-toc-include-context + nil ; counter + nil ; commented + here-I-am + "" ; xr-prefix + t ; a toc buffer + )) + (run-hooks 'reftex-display-copied-context-hook) (message "Building *toc* buffer...done.") (setq buffer-read-only t)) (t ;; Only compute the offset (setq offset - (or (reftex-get-offset this-buf here-I-am - (if reftex-toc-include-labels " " nil) - t - reftex-toc-include-index-entries - reftex-toc-include-file-boundaries) - (reftex-last-assoc-before-elt - 'toc here-I-am - (symbol-value reftex-docstruct-symbol)))) + (or (reftex-get-offset this-buf here-I-am + (if reftex-toc-include-labels " " nil) + t + reftex-toc-include-index-entries + reftex-toc-include-file-boundaries) + (reftex-last-assoc-before-elt + 'toc here-I-am + (symbol-value reftex-docstruct-symbol)))) (put 'reftex-toc :reftex-line 3) (goto-line 3) (beginning-of-line))) @@ -221,27 +239,27 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help (defun reftex-toc-recenter (&optional arg) "Display the TOC window and highlight line corresponding to current position." (interactive "P") - (let ((buf (current-buffer))) - (reftex-toc arg) + (let ((buf (current-buffer)) + (frame (selected-frame))) + (reftex-toc arg t) (if (= (count-lines 1 (point)) 2) - (let ((current-prefix-arg nil)) - (select-window (get-buffer-window buf)) - (reftex-toc nil))) + (let ((current-prefix-arg nil)) + (select-window (get-buffer-window buf frame)) + (reftex-toc nil t))) (and (> (point) 1) - (not (get-text-property (point) 'intangible)) - (memq reftex-highlight-selection '(cursor both)) - (reftex-highlight 2 - (or (previous-single-property-change - (min (point-max) (1+ (point))) :data) - (point-min)) - (or (next-single-property-change (point) :data) - (point-max)))) - (select-window (get-buffer-window buf)))) + (not (get-text-property (point) 'intangible)) + (memq reftex-highlight-selection '(cursor both)) + (reftex-highlight 2 + (or (previous-single-property-change + (min (point-max) (1+ (point))) :data) + (point-min)) + (or (next-single-property-change (point) :data) + (point-max)))) + (select-window (get-buffer-window buf frame)))) (defun reftex-toc-pre-command-hook () ;; used as pre command hook in *toc* buffer (reftex-unhighlight 0) -;; (reftex-unhighlight 1) ;; remove highlight on leaving buffer. ) (defun reftex-toc-post-command-hook () @@ -249,37 +267,52 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help (when (get-text-property (point) :data) (put 'reftex-toc :reftex-data (get-text-property (point) :data)) (and (> (point) 1) - (not (get-text-property (point) 'intangible)) - (memq reftex-highlight-selection '(cursor both)) - (reftex-highlight 2 - (or (previous-single-property-change (1+ (point)) :data) - (point-min)) - (or (next-single-property-change (point) :data) - (point-max))))) + (not (get-text-property (point) 'intangible)) + (memq reftex-highlight-selection '(cursor both)) + (reftex-highlight 2 + (or (previous-single-property-change (1+ (point)) :data) + (point-min)) + (or (next-single-property-change (point) :data) + (point-max))))) (if (integerp reftex-toc-follow-mode) ;; remove delayed action (setq reftex-toc-follow-mode t) - (and reftex-toc-follow-mode - (not (equal reftex-last-follow-point (point))) - ;; show context in other window - (setq reftex-last-follow-point (point)) - (condition-case nil - (reftex-toc-visit-location nil (not reftex-revisit-to-follow)) - (error t))))) + (and (not (reftex-toc-dframe-p)) + reftex-toc-follow-mode + (not (equal reftex-last-follow-point (point))) + ;; show context in other window + (setq reftex-last-follow-point (point)) + (condition-case nil + (reftex-toc-visit-location nil (not reftex-revisit-to-follow)) + (error t))))) (defun reftex-re-enlarge () ;; Enlarge window to a remembered size. (if reftex-toc-split-windows-horizontally (enlarge-window-horizontally (max 0 (- (or reftex-last-window-width (window-width)) - (window-width)))) + (window-width)))) (enlarge-window (max 0 (- (or reftex-last-window-height (window-height)) - (window-height)))))) + (window-height)))))) + +(defun reftex-toc-dframe-p (&optional frame error) + ;; Check if FRAME is the dedicated TOC frame. + ;; If yes, and ERROR is non-nil, throw an error. + (setq frame (or frame (selected-frame))) + (let ((res (equal + (if (fboundp 'frame-property) + (frame-property frame 'name) + (frame-parameter frame 'name)) + "RefTeX TOC Frame"))) + (if (and res error) + (error "This frame is view-only. Use `C-c =' to create toc window for commands.")) + res)) (defun reftex-toc-show-help () "Show a summary of special key bindings." (interactive) + (reftex-toc-dframe-p nil 'error) (with-output-to-temp-buffer "*RefTeX Help*" (princ reftex-toc-help)) (reftex-enlarge-to-fit "*RefTeX Help*" t) @@ -290,25 +323,29 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help (defun reftex-toc-next (&optional arg) "Move to next selectable item." (interactive "p") + (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t)) (setq reftex-callback-fwd t) (or (eobp) (forward-char 1)) - (goto-char (or (next-single-property-change (point) :data) - (point)))) + (goto-char (or (next-single-property-change (point) :data) + (point)))) (defun reftex-toc-previous (&optional arg) "Move to previous selectable item." (interactive "p") + (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t)) (setq reftex-callback-fwd nil) (goto-char (or (previous-single-property-change (point) :data) - (point)))) + (point)))) (defun reftex-toc-next-heading (&optional arg) "Move to next table of contentes line." (interactive "p") + (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t)) (end-of-line) (re-search-forward "^ " nil t arg) (beginning-of-line)) (defun reftex-toc-previous-heading (&optional arg) "Move to previous table of contentes line." (interactive "p") + (if (boundp 'zmacs-region-stays) (setq zmacs-region-stays t)) (re-search-backward "^ " nil t arg)) (defun reftex-toc-toggle-follow () "Toggle follow (other window follows with context)." @@ -319,16 +356,16 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help "Toggle inclusion of file boundaries in *toc* buffer." (interactive) (setq reftex-toc-include-file-boundaries - (not reftex-toc-include-file-boundaries)) + (not reftex-toc-include-file-boundaries)) (reftex-toc-revert)) (defun reftex-toc-toggle-labels (arg) "Toggle inclusion of labels in *toc* buffer. With prefix ARG, prompt for a label type and include only labels of that specific type." (interactive "P") - (setq reftex-toc-include-labels - (if arg (reftex-query-label-type) - (not reftex-toc-include-labels))) + (setq reftex-toc-include-labels + (if arg (reftex-query-label-type) + (not reftex-toc-include-labels))) (reftex-toc-revert)) (defun reftex-toc-toggle-index (arg) "Toggle inclusion of index in *toc* buffer. @@ -336,8 +373,8 @@ With prefix arg, prompt for an index tag and include only entries of that specific index." (interactive "P") (setq reftex-toc-include-index-entries - (if arg (reftex-index-select-tag) - (not reftex-toc-include-index-entries))) + (if arg (reftex-index-select-tag) + (not reftex-toc-include-index-entries))) (reftex-toc-revert)) (defun reftex-toc-toggle-context () "Toggle inclusion of label context in *toc* buffer. @@ -351,46 +388,57 @@ When no prefix is given, set the max level to a large number, so that all levels are shown. For eaxample, to set the level to 3, type `3 m'." (interactive "P") (setq reftex-toc-max-level (if arg - (prefix-numeric-value arg) - 100)) + (prefix-numeric-value arg) + 100)) (setq reftex-toc-max-level-indicator - (if arg (int-to-string reftex-toc-max-level) "ALL")) + (if arg (int-to-string reftex-toc-max-level) "ALL")) (reftex-toc-revert)) (defun reftex-toc-view-line () "View document location in other window." (interactive) + (reftex-toc-dframe-p nil 'error) (reftex-toc-visit-location)) (defun reftex-toc-goto-line-and-hide () "Go to document location in other window. Hide the *toc* window." (interactive) + (reftex-toc-dframe-p nil 'error) (reftex-toc-visit-location 'hide)) (defun reftex-toc-goto-line () "Go to document location in other window. *toc* window stays." (interactive) + (reftex-toc-dframe-p nil 'error) (reftex-toc-visit-location t)) (defun reftex-toc-mouse-goto-line-and-hide (ev) "Go to document location in other window. Hide the *toc* window." (interactive "e") (mouse-set-point ev) + (reftex-toc-dframe-p nil 'error) (reftex-toc-visit-location 'hide)) (defun reftex-toc-show-calling-point () "Show point where reftex-toc was called from." (interactive) + (reftex-toc-dframe-p nil 'error) (let ((this-window (selected-window))) (unwind-protect - (progn - (switch-to-buffer-other-window - (marker-buffer reftex-toc-return-marker)) - (goto-char (marker-position reftex-toc-return-marker)) - (recenter '(4))) + (progn + (switch-to-buffer-other-window + (marker-buffer reftex-toc-return-marker)) + (goto-char (marker-position reftex-toc-return-marker)) + (recenter '(4))) (select-window this-window)))) (defun reftex-toc-quit () - "Hide the *toc* window and do not move point." + "Hide the *toc* window and do not move point. +If the toc window is the only window on the dedicated TOC frame, the frame +is destroyed." (interactive) - (or (one-window-p) (delete-window)) - (switch-to-buffer (marker-buffer reftex-toc-return-marker)) - (reftex-re-enlarge) - (goto-char (or (marker-position reftex-toc-return-marker) (point)))) + (if (and (one-window-p) + (reftex-toc-dframe-p) + (> (length (frame-list)) 1)) + (delete-frame) + (or (one-window-p) (delete-window)) + (switch-to-buffer (marker-buffer reftex-toc-return-marker)) + (reftex-re-enlarge) + (goto-char (or (marker-position reftex-toc-return-marker) (point))))) (defun reftex-toc-quit-and-kill () "Kill the *toc* buffer." (interactive) @@ -404,37 +452,41 @@ levels are shown. For eaxample, to set the level to 3, type `3 m'." This works just like `reftex-display-index' from a LaTeX buffer. With prefix arg 1, restrict index to the section at point." (interactive "P") + (reftex-toc-dframe-p nil 'error) (let ((data (get-text-property (point) :data)) - (docstruct (symbol-value reftex-docstruct-symbol)) - bor eor restr) + (docstruct (symbol-value reftex-docstruct-symbol)) + bor eor restr) (when (equal arg 2) (setq bor (reftex-last-assoc-before-elt 'toc data docstruct) - eor (assoc 'toc (cdr (memq bor docstruct))) - restr (list (nth 6 bor) bor eor))) + eor (assoc 'toc (cdr (memq bor docstruct))) + restr (list (nth 6 bor) bor eor))) (reftex-toc-goto-line) (reftex-display-index (if restr nil arg) restr))) + +;; Rescanning the document and rebuilding the TOC buffer. (defun reftex-toc-rescan (&rest ignore) "Regenerate the *toc* buffer by reparsing file of section at point." (interactive) - (if (and reftex-enable-partial-scans - (null current-prefix-arg)) + (if (and reftex-enable-partial-scans + (null current-prefix-arg)) (let* ((data (get-text-property (point) :data)) - (what (car data)) - (file (cond ((eq what 'toc) (nth 3 data)) - ((memq what '(eof bof file-error)) (nth 1 data)) - ((stringp what) (nth 3 data)) - ((eq what 'index) (nth 3 data)))) - (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0)))) + (what (car data)) + (file (cond ((eq what 'toc) (nth 3 data)) + ((memq what '(eof bof file-error)) (nth 1 data)) + ((stringp what) (nth 3 data)) + ((eq what 'index) (nth 3 data)))) + (line (+ (count-lines (point-min) (point)) (if (bolp) 1 0)))) (if (not file) (error "Don't know which file to rescan. Try `C-u r'") - (put 'reftex-toc :reftex-line line) + (put 'reftex-toc :reftex-line line) (switch-to-buffer-other-window (reftex-get-file-buffer-force file)) - (setq current-prefix-arg '(4)) - (let ((reftex-rebuilding-toc t)) - (reftex-toc)))) + (setq current-prefix-arg '(4)) + (let ((reftex-rebuilding-toc t)) + (reftex-toc)))) (reftex-toc-Rescan)) (reftex-kill-temporary-buffers)) + (defun reftex-toc-Rescan (&rest ignore) "Regenerate the *toc* buffer by reparsing the entire document." (interactive) @@ -445,28 +497,38 @@ With prefix arg 1, restrict index to the section at point." (setq current-prefix-arg '(16)) (let ((reftex-rebuilding-toc t)) (reftex-toc))) + (defun reftex-toc-revert (&rest ignore) "Regenerate the *toc* from the internal lists." (interactive) - (switch-to-buffer-other-window - (reftex-get-file-buffer-force reftex-last-toc-file)) + (let ((unsplittable + (if (fboundp 'frame-property) + (frame-property (selected-frame) 'unsplittable) + (frame-parameter (selected-frame) 'unsplittable))) + (reftex-rebuilding-toc t)) + (if unsplittable + (switch-to-buffer + (reftex-get-file-buffer-force reftex-last-toc-file)) + (switch-to-buffer-other-window + (reftex-get-file-buffer-force reftex-last-toc-file)))) (reftex-erase-buffer "*toc*") (setq current-prefix-arg nil) - (let ((reftex-rebuilding-toc t)) - (reftex-toc t))) + (reftex-toc t)) + (defun reftex-toc-external (&rest ignore) "Switch to table of contents of an external document." (interactive) + (reftex-toc-dframe-p nil 'error) (let* ((old-buf (current-buffer)) - (xr-alist (get-text-property 1 'xr-alist)) - (xr-index (reftex-select-external-document - xr-alist 0))) + (xr-alist (get-text-property 1 'xr-alist)) + (xr-index (reftex-select-external-document + xr-alist 0))) (switch-to-buffer-other-window (or (reftex-get-file-buffer-force - (cdr (nth xr-index xr-alist))) - (error "Cannot switch document"))) + (cdr (nth xr-index xr-alist))) + (error "Cannot switch document"))) (reftex-toc) (if (equal old-buf (current-buffer)) - (message "") + (message "") (message "Switched document")))) (defun reftex-toc-jump (arg) @@ -479,6 +541,254 @@ Useful for large TOC's." nil t) (beginning-of-line)) +;; Promotion/Demotion stuff + +(defun reftex-toc-demote (&optional arg) + "Demote section at point. If region is active, apply to all in region." + (interactive "p") + (reftex-toc-do-promote 1)) +(defun reftex-toc-promote (&optional arg) + "Promote section at point. If region is active, apply to all in region." + (interactive "p") + (reftex-toc-do-promote -1)) +(defun reftex-toc-do-promote (delta) + "Workhorse for reftex-toc-promote and reftex-to-demote. +Changes the level of sections in the current region, or just the section at +point." + ;; We should not do anything unless we are sure this is going to work for + ;; each section in the region. Therefore we first collect information and + ;; test. + (let* ((start-line (+ (count-lines (point-min) (point)) + (if (bolp) 1 0))) + (mark-line (if (reftex-region-active-p) + (save-excursion (goto-char (mark)) + (+ (count-lines (point-min) (point)) + (if (bolp) 1 0))))) + (start-pos (point)) + (pro-or-de (if (> delta 0) "de" "pro")) + beg end entries data sections nsec mpos msg) + (setq msg + (catch 'exit + (if (reftex-region-active-p) + ;; A region is dangerous, check if we have a brandnew scan, + ;; to make sure we are not missing any section statements. + (if (not (reftex-toc-check-docstruct)) + (reftex-toc-load-all-files-for-promotion) ;; exits + (setq beg (min (point) (mark)) + end (max (point) (mark)))) + (setq beg (point) end (point))) + (goto-char beg) + (while (and (setq data (get-text-property (point) :data)) + (<= (point) end)) + (if (eq (car data) 'toc) (push (cons data (point)) entries)) + (goto-char (or (next-single-property-change (point) :data) + (point-max)))) + (setq entries (nreverse entries)) + ;; Get the relevant section numbers, for an informative message + (goto-char start-pos) + (setq sections (reftex-toc-extract-section-number (car entries))) + (if (> (setq nsec (length entries)) 1) + (setq sections + (concat sections "-" + (reftex-toc-extract-section-number + (nth (1- nsec) entries))))) + ;; Run through the list and prepare the changes. + (setq entries (mapcar 'reftex-toc-promote-prepare entries)) + ;; Ask for permission + (if (or (not reftex-toc-confirm-promotion) ; never confirm + (and (integerp reftex-toc-confirm-promotion) ; confirm if many + (< nsec reftex-toc-confirm-promotion)) + (yes-or-no-p ; ask + (format "%s %d toc-entr%s (section%s %s)? " + (if (< delta 0) "Promote" "Demote") + nsec + (if (= 1 nsec) "y" "ies") + (if (= 1 nsec) "" "s") + sections))) + nil ; we have permission, do nothing + (error "Abort")) ; abort, we don't have permission + ;; Do the changes + (mapcar 'reftex-toc-promote-action entries) + ;; Rescan the document and rebuilt the toc buffer + (save-window-excursion + (reftex-toc-Rescan)) + (reftex-toc-restore-region start-line mark-line) + (message "%d section%s %smoted" + nsec (if (= 1 nsec) "" "s") pro-or-de) + nil)) + (if msg (progn (ding) (message msg))))) + +(defvar delta) +(defvar mpos) +(defvar pro-or-de) +(defvar start-pos) +(defvar start-line) +(defvar mark-line) + +(defun reftex-toc-restore-region (point-line &optional mark-line) + (if mark-line + (progn (goto-line mark-line) + (setq mpos (point)))) + (if point-line (goto-line point-line)) + (if mark-line + (progn + (set-mark mpos) + (if (fboundp 'zmacs-activate-region) + (zmacs-activate-region) + (setq mark-active t + deactivate-mark nil))))) + +(defun reftex-toc-promote-prepare (x) + "Look at a toc entry and see if we could pro/demote it. +Expects the level change DELTA to be dynamically scoped into this function. +This function prepares everything for the changes, but does not do it. +The return value is a list with information needed when doing the +promotion/demotion later." + (let* ((data (car x)) + (toc-point (cdr x)) + (marker (nth 4 data)) + (literal (nth 7 data)) + (load nil) + (name nil) + ;; Here follows some paranoid code to make very sure we are not + ;; going to break anything + (name1 ; dummy + (if (and (markerp marker) (marker-buffer marker)) + ;; Buffer is still live and we have the marker. + (progn + (save-excursion + ;; Goto the buffer and check of section is unchanged + (set-buffer (marker-buffer marker)) + (goto-char (marker-position marker)) + (if (looking-at (regexp-quote literal)) + ;; OK, get the makro name + (progn + (beginning-of-line 1) + (if (looking-at reftex-section-regexp) + (setq name (reftex-match-string 2)) + (error "Something is wrong! Contact maintainer!"))) + ;; Section has changed, request scan and loading + ;; We use a variable to delay until after the safe-exc. + ;; because otherwise we loose the region. + (setq load t))) + ;; Scan document and load all files, this exits command + (if load (reftex-toc-load-all-files-for-promotion))) ; exits + ;; We don't have a live marker: scan and load files. + (reftex-toc-load-all-files-for-promotion))) + (level (cdr (assoc name reftex-section-levels-all))) + (dummy (if (not (integerp level)) + (progn + (goto-char toc-point) + (error "Cannot %smote special sections" pro-or-de)))) + ;; Delta is dynamically scoped into here... + (newlevel (if (>= level 0) (+ delta level) (- level delta))) + (dummy2 (if (or (and (>= level 0) (= newlevel -1)) + (and (< level 0) (= newlevel 0))) + (error "Cannot %smote \\%s" pro-or-de name))) + (newname (reftex-toc-newhead-from-alist newlevel name + reftex-section-levels-all))) + (if (and name newname) + (list data name newname toc-point) + (goto-char toc-point) + (error "Cannot %smote \\%s" pro-or-de name)))) + +(defun reftex-toc-promote-action (x) + "Change the level of a toc entry. +DELTA and PRO-OR-DE are assumed to be dynamically scoped into this function." + (let* ((data (car x)) + (name (nth 1 x)) + (newname (nth 2 x)) + (marker (nth 4 data))) + (save-excursion + (set-buffer (marker-buffer marker)) + (goto-char (marker-position marker)) + (if (looking-at (concat "\\([ \t]*\\\\\\)" (regexp-quote name))) + (replace-match (concat "\\1" newname)) + (error "Fatal error during %smotion" pro-or-de))))) + +(defun reftex-toc-extract-section-number (entry) + "Get the numbering of a toc entry, for message purposes." + (if (string-match "\\s-*\\(\\S-+\\)" (nth 2 (car entry))) + (match-string 1 (nth 2 (car entry))) + "?")) + +(defun reftex-toc-newhead-from-alist (nlevel head alist) + "Get new heading with level NLEVEL from ALIST. +If there are no such entries, return nil. +If there are several different entries with same new level, choose +the one with the smallest distance to the assocation of HEAD in the alist. +This makes it possible for promotion to work several sets of headings, +if these sets are sorted blocks in the alist." + (let* ((al alist) + (ass (assoc head al)) + (pos (length (memq ass al))) + dist (mindist 1000) newhead) + (while al + (if (equal (cdar al) nlevel) + (progn + (setq dist (abs (- (length al) pos))) + (if (< dist mindist) + (setq newhead (car (car al)) + mindist dist)))) + (setq al (cdr al))) + newhead)) + +(defun reftex-toc-check-docstruct () + "Check if the current docstruct is fully up to date and all files visited." + ;; We do this by checking if all sections are on the right position + (let ((docstruct (symbol-value reftex-docstruct-symbol)) + entry marker empoint) + (catch 'exit + (while (setq entry (pop docstruct)) + (if (eq (car entry) 'toc) + (progn + (setq marker (nth 4 entry) + empoint (nth 8 entry)) + (if (not (and (markerp marker) + (marker-buffer marker) + (= (marker-position marker) empoint))) + (throw 'exit nil))))) + t))) + +(defun reftex-toc-load-all-files-for-promotion () + "Make sure all files of the document are being visited by buffers, +and that the scanning info is absolutely up to date. +We do this by rescanning with reftex-keep-temporary-buffers bound to t. +The variable PRO-OR-DE is assumed to be dynamically scoped into this function. +When finished, we exit with an error message." + (let ((reftex-keep-temporary-buffers t)) + (reftex-toc-Rescan) + (reftex-toc-restore-region start-line mark-line) + (throw 'exit + "TOC had to be updated first. Please check selection and repeat the command."))) + +(defun reftex-toc-rename-label () + "Rename the currently selected label in the *TOC* buffer. +This launches a global search and replace in order to rename a label. +Renaming a label is hardly ever necessary - the only exeption is after +promotion/demotion in connection with a package like fancyref, where the +label prefix determines the wording of a reference." + (interactive) + (let* ((toc (get-text-property (point) :data)) + (label (car toc)) newlabel) + (if (not (stringp label)) + (error "This is not a label entry.")) + (setq newlabel (read-string (format "Rename label \"%s\" to:" label))) + (if (assoc newlabel (symbol-value reftex-docstruct-symbol)) + (if (not (y-or-n-p + (format "Label '%s' exists. Use anyway? " label))) + (error "Abort"))) + (save-excursion + (save-window-excursion + (reftex-toc-visit-location t) + (condition-case nil + (reftex-query-replace-document + (concat "{" (regexp-quote label) "}") + (format "{%s}" newlabel)) + (error t)))) + (reftex-toc-rescan))) + + (defun reftex-toc-visit-location (&optional final no-revisit) ;; Visit the tex file corresponding to the toc entry on the current line. ;; If FINAL is t, stay there @@ -494,9 +804,9 @@ Useful for large TOC's." show-window show-buffer match) (unless toc (error "Don't know which toc line to visit")) - + (cond - + ((eq (car toc) 'toc) ;; a toc entry (setq match (reftex-toc-find-section toc no-revisit))) @@ -508,19 +818,19 @@ Useful for large TOC's." ((memq (car toc) '(bof eof)) ;; A file entry (setq match - (let ((where (car toc)) - (file (nth 1 toc))) - (if (or (not no-revisit) (reftex-get-buffer-visiting file)) - (progn - (switch-to-buffer-other-window - (reftex-get-file-buffer-force file nil)) - (goto-char (if (eq where 'bof) (point-min) (point-max)))) - (message reftex-no-follow-message) nil)))) + (let ((where (car toc)) + (file (nth 1 toc))) + (if (or (not no-revisit) (reftex-get-buffer-visiting file)) + (progn + (switch-to-buffer-other-window + (reftex-get-file-buffer-force file nil)) + (goto-char (if (eq where 'bof) (point-min) (point-max)))) + (message reftex-no-follow-message) nil)))) ((stringp (car toc)) ;; a label (setq match (reftex-show-label-location toc reftex-callback-fwd - no-revisit t)))) + no-revisit t)))) (setq show-window (selected-window) show-buffer (current-buffer)) @@ -542,46 +852,46 @@ Useful for large TOC's." ;; If `show-window' is still live, show-buffer is already visible ;; so let's not make it visible in yet-another-window. (if (window-live-p show-window) - (select-window show-window) + (set-buffer show-buffer) (switch-to-buffer show-buffer)) (reftex-re-enlarge)) (t nil)))) (defun reftex-toc-find-section (toc &optional no-revisit) (let* ((file (nth 3 toc)) - (marker (nth 4 toc)) - (level (nth 5 toc)) - (literal (nth 7 toc)) - (emergency-point (nth 8 toc)) - (match - (cond - ((and (markerp marker) (marker-buffer marker)) - ;; Buffer is still live and we have the marker. Should be easy. - (switch-to-buffer-other-window (marker-buffer marker)) - (goto-char (marker-position marker)) - (or (looking-at (regexp-quote literal)) - (looking-at (reftex-make-regexp-allow-for-ctrl-m literal)) - (looking-at (reftex-make-desperate-section-regexp literal)) - (looking-at (concat "\\\\" - (regexp-quote - (car - (rassq level - reftex-section-levels-all))) - "[[{]?")))) - ((or (not no-revisit) - (reftex-get-buffer-visiting file)) - ;; Marker is lost. Use the backup method. - (switch-to-buffer-other-window - (reftex-get-file-buffer-force file nil)) - (goto-char (or emergency-point (point-min))) - (or (looking-at (regexp-quote literal)) - (let ((len (length literal))) - (or (reftex-nearest-match (regexp-quote literal) len) - (reftex-nearest-match - (reftex-make-regexp-allow-for-ctrl-m literal) len) - (reftex-nearest-match - (reftex-make-desperate-section-regexp literal) len))))) - (t (message reftex-no-follow-message) nil)))) + (marker (nth 4 toc)) + (level (nth 5 toc)) + (literal (nth 7 toc)) + (emergency-point (nth 8 toc)) + (match + (cond + ((and (markerp marker) (marker-buffer marker)) + ;; Buffer is still live and we have the marker. Should be easy. + (switch-to-buffer-other-window (marker-buffer marker)) + (goto-char (marker-position marker)) + (or (looking-at (regexp-quote literal)) + (looking-at (reftex-make-regexp-allow-for-ctrl-m literal)) + (looking-at (reftex-make-desperate-section-regexp literal)) + (looking-at (concat "\\\\" + (regexp-quote + (car + (rassq level + reftex-section-levels-all))) + "[[{]?")))) + ((or (not no-revisit) + (reftex-get-buffer-visiting file)) + ;; Marker is lost. Use the backup method. + (switch-to-buffer-other-window + (reftex-get-file-buffer-force file nil)) + (goto-char (or emergency-point (point-min))) + (or (looking-at (regexp-quote literal)) + (let ((len (length literal))) + (or (reftex-nearest-match (regexp-quote literal) len) + (reftex-nearest-match + (reftex-make-regexp-allow-for-ctrl-m literal) len) + (reftex-nearest-match + (reftex-make-desperate-section-regexp literal) len))))) + (t (message reftex-no-follow-message) nil)))) (when match (goto-char (match-beginning 0)) (if (not (= (point) (point-max))) (recenter 1)) @@ -603,15 +913,17 @@ Useful for large TOC's." (setq old (substring old (match-end 0)))) new)) +;; Auto recentering of TOC window (defun reftex-recenter-toc-when-idle () (and (> (buffer-size) 5) reftex-mode (not (active-minibuffer-window)) (fboundp 'reftex-toc-mode) - (get-buffer-window "*toc*") + (get-buffer-window "*toc*" 'visible) (string= reftex-last-toc-master (reftex-TeX-master-file)) - (reftex-toc-recenter))) + (let (current-prefix-arg) + (reftex-toc-recenter)))) (defun reftex-toggle-auto-toc-recenter () "Toggle the automatic recentering of the toc window. @@ -620,20 +932,73 @@ section." (interactive) (if reftex-toc-auto-recenter-timer (progn - (if (featurep 'xemacs) - (delete-itimer reftex-toc-auto-recenter-timer) - (cancel-timer reftex-toc-auto-recenter-timer)) - (setq reftex-toc-auto-recenter-timer nil) - (message "Automatic recentering of toc buffer was turned off")) + (if (featurep 'xemacs) + (delete-itimer reftex-toc-auto-recenter-timer) + (cancel-timer reftex-toc-auto-recenter-timer)) + (setq reftex-toc-auto-recenter-timer nil) + (message "Automatic recentering of toc windwo was turned off")) (setq reftex-toc-auto-recenter-timer - (if (featurep 'xemacs) - (start-itimer "RefTeX Idle Timer for recenter" - 'reftex-recenter-toc-when-idle - reftex-idle-time reftex-idle-time t) - (run-with-idle-timer - reftex-idle-time t 'reftex-recenter-toc-when-idle))) + (if (featurep 'xemacs) + (start-itimer "RefTeX Idle Timer for recenter" + 'reftex-recenter-toc-when-idle + reftex-idle-time reftex-idle-time t) + (run-with-idle-timer + reftex-idle-time t 'reftex-recenter-toc-when-idle))) (message "Automatic recentering of toc window was turned on"))) +(defun reftex-toc-toggle-dedicated-frame () + "Toggle the display of a separate frame for the TOC. +This frame is not used by the `reftex-toc' commands, but it is useful to +always show the current section in connection with the option +`reftex-auto-recenter-toc'." + (interactive) + (catch 'exit + (let* ((frames (frame-list)) frame + (get-frame-prop-func (if (fboundp 'frame-property) + 'frame-property + 'frame-parameter))) + (while (setq frame (pop frames)) + (if (equal (funcall get-frame-prop-func frame 'name) + "RefTeX TOC Frame") + (progn + (delete-frame frame) + (throw 'exit nil)))) + (reftex-make-separate-toc-frame)))) + +(defun reftex-make-separate-toc-frame () + ;; Create a new fame showing only the toc buffer. + (let ((current-frame (selected-frame)) + (current-window (selected-window)) + (current-toc-window (get-buffer-window "*toc*" 'visible)) + current-toc-frame) + (if (and current-toc-window + (not (equal (selected-frame) (window-frame current-toc-window)))) + nil + (setq current-toc-frame + (make-frame + '((name . "RefTeX TOC Frame") + (height . 20) (width . 60) + (unsplittable . t) + (minibuffer . nil) + (default-toolbar-visible-p . nil) + (menubar-visible-p . nil) + (horizontal-scrollbar-visible-p . nil)))) + (select-frame current-toc-frame) + (switch-to-buffer "*toc*") + (select-frame current-frame) + (if (fboundp 'focus-frame) (focus-frame current-frame) + (if (fboundp 'x-focus-frame) (x-focus-frame current-frame))) + (select-window current-window) + (when (eq reftex-auto-recenter-toc 'frame) + (unless reftex-toc-auto-recenter-timer + (reftex-toggle-auto-toc-recenter)) + (add-hook 'delete-frame-hook 'reftex-toc-delete-frame-hook))))) + +(defun reftex-toc-delete-frame-hook (frame) + (if (and reftex-toc-auto-recenter-timer + (reftex-toc-dframe-p frame)) + (progn + (reftex-toggle-auto-toc-recenter)))) ;; Table of Contents map (define-key reftex-toc-map (if (featurep 'xemacs) [(button2)] [(mouse-2)]) @@ -645,47 +1010,57 @@ section." 'previous-line 'reftex-toc-previous reftex-toc-map global-map) (loop for x in - '(("n" . reftex-toc-next) - ("p" . reftex-toc-previous) - ("?" . reftex-toc-show-help) - (" " . reftex-toc-view-line) - ("\C-m" . reftex-toc-goto-line-and-hide) - ("\C-i" . reftex-toc-goto-line) - ("\C-c>". reftex-toc-display-index) - ("r" . reftex-toc-rescan) - ("R" . reftex-toc-Rescan) - ("g" . revert-buffer) - ("q" . reftex-toc-quit) - ("k" . reftex-toc-quit-and-kill) - ("f" . reftex-toc-toggle-follow) - ("a" . reftex-toggle-auto-toc-recenter) - ("F" . reftex-toc-toggle-file-boundary) - ("i" . reftex-toc-toggle-index) - ("l" . reftex-toc-toggle-labels) - ("t" . reftex-toc-max-level) - ("c" . reftex-toc-toggle-context) - ("%" . reftex-toc-toggle-commented) - ("x" . reftex-toc-external) - ("z" . reftex-toc-jump) - ("." . reftex-toc-show-calling-point) - ("\C-c\C-n" . reftex-toc-next-heading) - ("\C-c\C-p" . reftex-toc-previous-heading)) + '(("n" . reftex-toc-next) + ("p" . reftex-toc-previous) + ("?" . reftex-toc-show-help) + (" " . reftex-toc-view-line) + ("\C-m" . reftex-toc-goto-line-and-hide) + ("\C-i" . reftex-toc-goto-line) + ("\C-c>" . reftex-toc-display-index) + ("r" . reftex-toc-rescan) + ("R" . reftex-toc-Rescan) + ("g" . revert-buffer) + ("q" . reftex-toc-quit); + ("k" . reftex-toc-quit-and-kill) + ("f" . reftex-toc-toggle-follow); + ("a" . reftex-toggle-auto-toc-recenter) + ("d" . reftex-toc-toggle-dedicated-frame) + ("F" . reftex-toc-toggle-file-boundary) + ("i" . reftex-toc-toggle-index) + ("l" . reftex-toc-toggle-labels) + ("t" . reftex-toc-max-level) + ("c" . reftex-toc-toggle-context) +; ("%" . reftex-toc-toggle-commented) + ("\M-%" . reftex-toc-rename-label) + ("x" . reftex-toc-external) + ("z" . reftex-toc-jump) + ("." . reftex-toc-show-calling-point) + ("\C-c\C-n" . reftex-toc-next-heading) + ("\C-c\C-p" . reftex-toc-previous-heading) + (">" . reftex-toc-demote) + ("<" . reftex-toc-promote)) do (define-key reftex-toc-map (car x) (cdr x))) (loop for key across "0123456789" do (define-key reftex-toc-map (vector (list key)) 'digit-argument)) (define-key reftex-toc-map "-" 'negative-argument) -(easy-menu-define +(easy-menu-define reftex-toc-menu reftex-toc-map "Menu for Table of Contents buffer" '("TOC" ["Show Location" reftex-toc-view-line t] ["Go To Location" reftex-toc-goto-line t] ["Exit & Go To Location" reftex-toc-goto-line-and-hide t] - ["Index" reftex-toc-display-index t] + ["Show Calling Point" reftex-toc-show-calling-point t] ["Quit" reftex-toc-quit t] "--" + ("Edit" + ["Promote" reftex-toc-promote t] + ["Demote" reftex-toc-demote t] + ["Rename Label" reftex-toc-rename-label t]) + "--" + ["Index" reftex-toc-display-index t] ["External Document TOC " reftex-toc-external t] "--" ("Update" @@ -703,10 +1078,14 @@ section." ["Context" reftex-toc-toggle-context :style toggle :selected reftex-toc-include-context] "--" - ["Follow Mode" reftex-toc-toggle-follow :style toggle - :selected reftex-toc-follow-mode]) + ["Follow Mode" reftex-toc-toggle-follow :style toggle + :selected reftex-toc-follow-mode] + ["Auto Recenter" reftex-toggle-auto-toc-recenter :style toggle + :selected reftex-toc-auto-recenter-timer] + ["Dedicated Frame" reftex-toc-toggle-dedicated-frame t]) "--" ["Help" reftex-toc-show-help t])) -;;; reftex-toc.el ends here +;;; arch-tag: 92400ce2-0b86-4c89-a606-4ed71acea17e +;;; reftex-toc.el ends here \ No newline at end of file diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 91deb85056..53357342c5 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -1,8 +1,8 @@ ;;; reftex-vars.el --- configuration variables for RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2003 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.18 +;; Version: 4.21 ;; This file is part of GNU Emacs. @@ -13,11 +13,11 @@ ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; 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 +;; along with GNU Emacs; see the file COPYING If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. @@ -93,28 +93,28 @@ (LaTeX "LaTeX default environments" (("section" ?s "%S" "~\\ref{%s}" (nil . t) (regexp "parts?" "chapters?" "chap\\." "sections?" "sect?\\." - "paragraphs?" "par\\." - "\\\\S" "\247" "Teile?" "Kapitel" "Kap\\." "Abschnitte?" - "appendi\\(x\\|ces\\)" "App\\." "Anh\"?ange?" "Anh\\.")) + "paragraphs?" "par\\." + "\\\\S" "\247" "Teile?" "Kapitel" "Kap\\." "Abschnitte?" + "appendi\\(x\\|ces\\)" "App\\." "Anh\"?ange?" "Anh\\.")) ("enumerate" ?i "item:" "~\\ref{%s}" item (regexp "items?" "Punkte?")) - + ("equation" ?e "eq:" "~(\\ref{%s})" t (regexp "equations?" "eqs?\\." "eqn\\." "Gleichung\\(en\\)?" "Gl\\.")) ("eqnarray" ?e "eq:" nil eqnarray-like) - + ("figure" ?f "fig:" "~\\ref{%s}" caption (regexp "figure?[sn]?" "figs?\\." "Abbildung\\(en\\)?" "Abb\\.")) ("figure*" ?f nil nil caption) - + ("table" ?t "tab:" "~\\ref{%s}" caption (regexp "tables?" "tab\\." "Tabellen?")) ("table*" ?t nil nil caption) - + ("\\footnote[]{}" ?n "fn:" "~\\ref{%s}" 2 (regexp "footnotes?" "Fussnoten?")) - + ("any" ?\ " " "~\\ref{%s}" nil) ;; The label macro is hard coded, but it *could* be defined like this: @@ -141,6 +141,19 @@ distribution. Mixed-case symbols are convenience aliases.") (?A . "\\citeauthor*{%l}") (?y . "\\citeyear{%l}") (?n . "\\nocite{%l}"))) + (amsrefs "The AMSRefs package" + ((?\C-m . "\\cite{%l}") + (?p . "\\cite{%l}") + (?P . "\\cites{%l}") + (?t . "\\ocite{%l}") + (?T . "\\ocites{%l}") + (?y . "\\ycite{%l}") + (?Y . "\\ycites{%l}") + (?a . "\\citeauthor{%l}") + (?A . "\\citeauthory{%l}") + (?f . "\\fullcite{%l}") + (?F . "\\fullocite{%l}") + (?n . "\\nocite{%l}"))) (bibentry "The Bibentry package" "\\bibentry{%l}") (harvard "The Harvard package" @@ -178,20 +191,20 @@ The following conventions are valid for all alist entries: `?t' should point to a textual citation (citation as a noun). `?p' should point to a parenthetical citation.") -(defconst reftex-index-macros-builtin +(defconst reftex-index-macros-builtin '((default "Default \\index and \\glossary macros" (("\\index{*}" "idx" ?i "" nil t) ("\\glossary{*}" "glo" ?g "" nil t))) (multind "The multind.sty package" (("\\index{}{*}" 1 ?i "" nil t))) (index "The index.sty package" - (("\\index[]{*}" 1 ?i "" nil t) - ("\\index*[]{*}" 1 ?I "" nil nil))) + (("\\index[]{*}" 1 ?i "" nil t) + ("\\index*[]{*}" 1 ?I "" nil nil))) (Index-Shortcut "index.sty with \\shortindexingon" (("\\index[]{*}" 1 ?i "" nil t) - ("\\index*[]{*}" 1 ?I "" nil nil) - ("^[]{*}" 1 ?^ "" texmathp t) - ("_[]{*}" 1 ?_ "" texmathp nil)))) + ("\\index*[]{*}" 1 ?I "" nil nil) + ("^[]{*}" 1 ?^ "" texmathp t) + ("_[]{*}" 1 ?_ "" texmathp nil)))) "Builtin stuff for reftex-index-macros. Lower-case symbols correspond to a style file of the same name in the LaTeX distribution. Mixed-case symbols are convenience aliases.") @@ -202,8 +215,8 @@ distribution. Mixed-case symbols are convenience aliases.") (defgroup reftex nil "LaTeX label and citation support." :tag "RefTeX" - :link '(url-link :tag "Home Page" - "http://strw.leidenuniv.nl/~dominik/Tools/") + :link '(url-link :tag "Home Page" + "http://zon.astro.uva.nl/~dominik/Tools/") :link '(emacs-commentary-link :tag "Commentary in reftex.el" "reftex.el") :link '(custom-manual "(reftex)Top") :prefix "reftex-" @@ -240,7 +253,6 @@ needs to be larger." ("subsubsection" . 4) ("paragraph" . 5) ("subparagraph" . 6) - ("subsubparagraph" . 7) ("addchap" . -1) ; KOMA-Script ("addsec" . -2) ; KOMA-Script ;;; ("minisec" . -7) ; KOMA-Script @@ -251,14 +263,19 @@ The car of each cons cell is the name of the section macro (without the backslash). The cdr is a number indicating its level. A negative level means the same level as the positive value, but the section will never get a number. The cdr may also be a function which will be called -to after the section-re matched to determine the level." +to after the section-re matched to determine the level. +This list is also used for promotion and demption of sectioning commands. +If you are using a document class which has several sets of sectioning +commands, promotion only works correctly if this list is sorted first +by set, then within each set by level. The promotion commands always +select the nearest entry with the correct new level." :group 'reftex-table-of-contents-browser :set 'reftex-set-dirty :type '(repeat (cons (string :tag "sectioning macro" "") - (choice - (number :tag "level " 0) - (symbol :tag "function " my-level-func))))) + (choice + (number :tag "level " 0) + (symbol :tag "function " my-level-func))))) (defcustom reftex-toc-max-level 100 "*The maximum level of toc entries which will be included in the TOC. @@ -278,27 +295,43 @@ and also do not show up in chapter numbers." :type 'boolean) -(defcustom reftex-auto-recenter-toc nil - "*Non-nil means, initially turn automatic recentering of toc on. -When active, the *TOC* buffer will always show the section you +(defcustom reftex-auto-recenter-toc 'frame + "*Non-nil means, turn automatic recentering of *TOC* window on. +When active, the *TOC* window will always show the section you are currently working in. Recentering happens whenever Emacs is idle for more than `reftex-idle-time' seconds. -This feature can be turned on and off from the menu -(Ref->Options)." - :group 'reftex-table-of-contents-browser - :type 'boolean) +Value t means, turn on immediately when RefTeX gets started. Then, +recentering will work for any toc window created during the session. + +Value 'frame (the default) means, turn automatic recentering on only while the +dedicated TOC frame does exist, and do the recentering only in that frame. So +when creating that frame (with \"d\" key in an ordinary TOC window), the +automatic recentering is turned on. When the frame gets destroyed, automatic +recentering is turned off again. + +This feature can be turned on and off from the menu +\(Ref->Options)." + :group 'reftex-table-of-contents-browser + :type '(choice + (const :tag "never" nil) + (const :tag "always" t) + (const :tag "in dedicated frame only" frame))) + (defcustom reftex-toc-split-windows-horizontally nil "*Non-nil means, create TOC window by splitting window horizontally." :group 'reftex-table-of-contents-browser :type 'boolean) -(defcustom reftex-toc-split-windows-horizontally-fraction .5 - "*Fraction of the horizontal width of the frame to be used for TOC window. -Only relevant when `reftex-toc-split-windows-horizontally' is non-nil." +(defcustom reftex-toc-split-windows-fraction .3 + "*Fraction of the width or height of the frame to be used for TOC window. +See also `reftex-toc-split-windows-horizontally'." :group 'reftex-table-of-contents-browser :type 'number) +(defvar reftex-toc-split-windows-horizontally-fraction 0.5 + "This variable is obsolete, use `reftex-toc-split-windows-fraction' instead.") + (defcustom reftex-toc-keep-other-windows t "*Non-nil means, split the selected window to display the *toc* buffer. This helps to keep the window configuration, but makes the *toc* small. @@ -325,6 +358,17 @@ This flag can be toggled from within the *toc* buffer with the `i' key." :group 'reftex-table-of-contents-browser :type 'boolean) +(defcustom reftex-toc-confirm-promotion 2 + "*Non-nil means, promotion/demotion commands first prompt for confirmation. +When nil, the command is executed immediately. When this is an integer +N, ask for confirmation only if N or more section commands are going to be +changed." + :group 'reftex-table-of-contents-browser + :type '(choice + (const :tag "Never" nil) + (const :tag "Always" t) + (number :tag "When more than N sections" :value 2))) + (defcustom reftex-toc-include-context nil "*Non-nil means, include context with labels in the *toc* buffer. Context will only be shown when labels are visible as well. @@ -363,22 +407,22 @@ When nil, follow-mode will be suspended for stuff in unvisited files." (defcustom reftex-default-label-alist-entries '(amsmath endnotes fancybox floatfig longtable picinpar - rotating sidecap subfigure supertab wrapfig LaTeX) + rotating sidecap subfigure supertab wrapfig LaTeX) "Default label alist specifications. LaTeX should always be the last entry. -The value of this variable is a list of symbols with associations in the +The value of this variable is a list of symbols with associations in the constant `reftex-label-alist-builtin'. Check that constant for a full list of options." :group 'reftex-defining-label-environments :set 'reftex-set-dirty :type `(set - :indent 4 + :indent 4 :inline t :greedy t ,@(mapcar - (lambda (x) - (list 'const :tag (concat (symbol-name (nth 0 x)) - ": " (nth 1 x)) - (nth 0 x))) + (lambda (x) + (list 'const :tag (concat (symbol-name (nth 0 x)) + ": " (nth 1 x)) + (nth 0 x))) reftex-label-alist-builtin))) (defcustom reftex-label-alist nil @@ -526,10 +570,10 @@ list. However, builtin defaults should normally be set with the variable (choice :tag "Environment or \\macro " (const :tag "Ignore, just use typekey" nil) (string "") - (symbol :tag "Special parser" my-parser)) - (choice :tag "Type specification " - (const :tag "unspecified, like in \\label" nil) - (character :tag "Char " ?a)) + (symbol :tag "Special parser" my-parser)) + (choice :tag "Type specification " + (const :tag "unspecified, like in \\label" nil) + (character :tag "Char " ?a)) (choice :tag "Label prefix string " (const :tag "Default" nil) (string :tag "String" "lab:")) @@ -537,44 +581,44 @@ list. However, builtin defaults should normally be set with the variable (const :tag "Default" nil) (string :tag "String" "~\\ref{%s}")) (choice :tag "Context method " - (const :tag "Default position" t) - (const :tag "After label" nil) - (number :tag "Macro arg nr" 1) - (regexp :tag "Regexp" "") - (const :tag "Caption in float" caption) - (const :tag "Item in list" item) - (const :tag "Eqnarray-like" eqnarray-like) - (const :tag "Alignat-like" alignat-like) - (symbol :tag "Function" my-func)) - (repeat :tag "Magic words" :extra-offset 2 (string)) - (option (choice :tag "Make TOC entry " - (const :tag "No entry" nil) - (integer :tag "Level" :value -3)))) + (const :tag "Default position" t) + (const :tag "After label" nil) + (number :tag "Macro arg nr" 1) + (regexp :tag "Regexp" "") + (const :tag "Caption in float" caption) + (const :tag "Item in list" item) + (const :tag "Eqnarray-like" eqnarray-like) + (const :tag "Alignat-like" alignat-like) + (symbol :tag "Function" my-func)) + (repeat :tag "Magic words" :extra-offset 2 (string)) + (option (choice :tag "Make TOC entry " + (const :tag "No entry" nil) + (integer :tag "Level" :value -3)))) (choice :tag "Package" :value AMSTeX ,@(mapcar - (lambda (x) - (list 'const :tag (concat (symbol-name (nth 0 x))) - (nth 0 x))) - reftex-label-alist-builtin))))) + (lambda (x) + (list 'const :tag (concat (symbol-name (nth 0 x))) + (nth 0 x))) + reftex-label-alist-builtin))))) (defcustom reftex-section-prefixes '((0 . "part:") (1 . "cha:") (t . "sec:")) "Prefixes for section labels. When the label prefix given in an entry in `reftex-label-alist' contains `%S', -this list is used to determine the correct prefix string depending on the +this list is used to determine the correct prefix string depending on the current section level. The list is an alist, with each entry of the form (KEY . PREFIX) Possible keys are sectioning macro names like `chapter', section levels -(as given in `reftex-section-levels'), and t for the default." +\(as given in `reftex-section-levels'), and t for the default." :group 'reftex-defining-label-environments :type '(repeat - (cons :value (0 . "") - (choice - (string :tag "macro name") - (integer :tag "section level") - (const :tag "default" t)) - (string :tag "Prefix")))) + (cons :value (0 . "") + (choice + (string :tag "macro name") + (integer :tag "section level") + (const :tag "default" t)) + (string :tag "Prefix")))) (defcustom reftex-default-context-regexps '((caption . "\\\\\\(rot\\)?caption\\*?[[{]") @@ -587,7 +631,7 @@ the final regular expression - so %s will be replaced with the environment or macro." :group 'reftex-defining-label-environments :type '(repeat (cons (symbol) (regexp)))) - + (defcustom reftex-special-environment-functions nil "List of functions to be called when trying to figure out current environment. These are special functions to detect \"environments\" which do not @@ -633,7 +677,7 @@ And here is the setup for RefTeX: (let ((pos (point)) p1) (save-excursion ;; Search for any of the linguex item macros at the beginning of a line - (if (re-search-backward + (if (re-search-backward \"^[ \\t]*\\\\(\\\\\\\\\\\\(ex\\\\|a\\\\|b\\\\|c\\\\|d\\\\|e\\\\|f\\\\)g?\\\\.\\\\)\" bound t) (progn (setq p1 (match-beginning 1)) @@ -643,7 +687,7 @@ And here is the setup for RefTeX: nil ;; OK, we got it (cons \"linguex\" p1))) - ;; Return nil for not found + ;; Return nil for not found nil)))) 3. Tell RefTeX to use this function @@ -690,7 +734,7 @@ indicating the label types for which it should be true. The strings work like character classes. Thus, the combination may be set differently for each label type. The default settings \"s\" and \"sft\" mean: Derive section labels from headings -(with confirmation). Prompt for figure and table labels. Use simple labels +\(with confirmation). Prompt for figure and table labels. Use simple labels without confirmation for everything else. The available label types are: s (section), f (figure), t (table), i (item), e (equation), n (footnote), N (endnote), plus any definitions in @@ -751,7 +795,7 @@ DOWNCASE t: Downcase words before using them." (repeat :tag "Ignore words" :entry-format " %i %d %v" (string :tag "")) - (option (boolean :tag "Downcase words ")))) + (option (boolean :tag "Downcase words ")))) (defcustom reftex-label-illegal-re "[^-a-zA-Z0-9_+=:;,.]" "Regexp matching characters not legal in labels." @@ -827,7 +871,7 @@ get one interactively during selection from the label menu." (choice :tag "Hide short context " ,@reftex-tmp) (choice :tag "Follow context in other window " ,@reftex-tmp) (choice :tag "Show commented labels " ,@reftex-tmp) - (choice :tag "Obsolete flag. Don't use. " ,@reftex-tmp) + (choice :tag "Obsolete flag, Don't use. " ,@reftex-tmp) (choice :tag "Show begin/end of included files" ,@reftex-tmp))) (defcustom reftex-multiref-punctuation '((?, . ", ") (?- . "--") (?+ . " and ")) @@ -842,7 +886,7 @@ This is used to string together whole reference sets, like (defcustom reftex-vref-is-default nil "*Non-nil means, the varioref macro \\vref is used as default. -In the selection buffer, the `v' key toggles the reference macro between +In the selection buffer, the `v' key toggles the reference macro between `\\ref' and `\\vref'. The value of this variable determines the default which is active when entering the selection process. Instead of nil or t, this may also be a string of type letters indicating @@ -852,7 +896,7 @@ the label types for which it should be true." (defcustom reftex-fref-is-default nil "*Non-nil means, the fancyref macro \\fref is used as default. -In the selection buffer, the `V' key toggles the reference macro between +In the selection buffer, the `V' key toggles the reference macro between `\\ref', `\\fref' and `\\Fref'. The value of this variable determines the default which is active when entering the selection process. Instead of nil or t, this may also be a string of type letters indicating @@ -876,7 +920,7 @@ a label type. If you set this variable to nil, RefTeX will always prompt." (defcustom reftex-format-ref-function nil "Function which produces the string to insert as a reference. -Normally should be nil, because the format to insert a reference can +Normally should be nil, because the format to insert a reference can already be specified in `reftex-label-alist'. This hook also is used by the special commands to insert `\\vref' and `\\fref' references, so even if you set this, your setting will be ignored by @@ -957,13 +1001,13 @@ It is also possible to access all other BibTeX database fields: %i institution %j journal %k key %m month %n number %o organization %p pages %P first page %r address %s school %u publisher %t title -%v volume %y year +%v volume %y year %B booktitle, abbreviated %T title, abbreviated Usually, only %l is needed. The other stuff is mainly for the echo area display, and for (setq reftex-comment-citations t). -%< as a special operator kills punctuation and space around it after the +%< as a special operator kills punctuation and space around it after the string has been formatted. Beware that all this only works with BibTeX database files. When @@ -975,7 +1019,7 @@ will be prompted for a character to select one of the possible format strings. In order to configure this variable, you can either set `reftex-cite-format' directly yourself or set it to the SYMBOL of one of -the predefined styles. The predefined symbols are those which have an +the predefined styles. The predefined symbols are those which have an association in the constant `reftex-cite-format-builtin'. E.g.: (setq reftex-cite-format 'natbib)" :group 'reftex-citation-support @@ -1033,7 +1077,7 @@ This is a list of 3 strings. (defcustom reftex-format-cite-function nil "Function which produces the string to insert as a citation. -Normally should be nil, because the format to insert a reference can +Normally should be nil, because the format to insert a reference can already be specified in `reftex-cite-format'. The function will be called with two arguments, the CITATION KEY and the DEFAULT FORMAT, which is taken from `reftex-cite-format'. The function @@ -1066,16 +1110,16 @@ you will be asked for confirmation to turn it on and rescan the document." These correspond to the makeindex keywords LEVEL ENCAP ACTUAL QUOTE ESCAPE." :group 'reftex-index-support :type '(list - (string :tag "LEVEL separator") - (string :tag "ENCAP char ") - (string :tag "ACTUAL char ") - (string :tag "QUOTE char ") - (string :tag "ESCAPE char "))) + (string :tag "LEVEL separator") + (string :tag "ENCAP char ") + (string :tag "ACTUAL char ") + (string :tag "QUOTE char ") + (string :tag "ESCAPE char "))) (defcustom reftex-index-macros nil "Macros which define index entries. The structure is -(MACRO INDEX-TAG KEY PREFIX EXCLUDE REPEAT) +\(MACRO INDEX-TAG KEY PREFIX EXCLUDE REPEAT) MACRO is the macro. Arguments should be denoted by empty braces like \\index[]{*}. Use square brackets to denote optional arguments. The star @@ -1116,43 +1160,43 @@ package here." :group 'reftex-index-support :set 'reftex-set-dirty :type `(list - (repeat - :inline t - (list :value ("" "idx" ?a "" nil) - (string :tag "Macro with args") - (choice :tag "Index Tag " - (string) - (integer :tag "Macro arg Nr" :value 1)) - (character :tag "Access Key ") - (string :tag "Key Prefix ") - (symbol :tag "Exclusion hook ") + (repeat + :inline t + (list :value ("" "idx" ?a "" nil) + (string :tag "Macro with args") + (choice :tag "Index Tag " + (string) + (integer :tag "Macro arg Nr" :value 1)) + (character :tag "Access Key ") + (string :tag "Key Prefix ") + (symbol :tag "Exclusion hook ") (boolean :tag "Repeat Outside "))) - (option - :tag "Package:" - (choice :tag "Package" - :value index - ,@(mapcar - (lambda (x) - (list 'const :tag (concat (symbol-name (nth 0 x)) - ": " (nth 1 x)) - (nth 0 x))) - reftex-index-macros-builtin))))) + (option + :tag "Package:" + (choice :tag "Package" + :value index + ,@(mapcar + (lambda (x) + (list 'const :tag (concat (symbol-name (nth 0 x)) + ": " (nth 1 x)) + (nth 0 x))) + reftex-index-macros-builtin))))) (defcustom reftex-index-default-macro '(?i "idx") "The default index macro for \\[reftex-index-selection-or-word]. This is a list with (MACRO-KEY DEFAULT-TAG). MACRO-KEY: Character identifying an index macro - see `reftex-index-macros'. -DEFAULT-TAG: This is the tag to be used if the macro requires a TAG argument. +DEFAULT-TAG: This is the tag to be used if the macro requires a TAG argument. When this is nil and a TAG is needed, RefTeX will ask for it. When this is the empty string and the TAG argument of the index macro is optional, the TAG argument will be omitted." :group 'reftex-index-support :type '(list - (character :tag "Character identifying default macro") - (choice :tag "Default index tag " - (const nil) - (string)))) + (character :tag "Character identifying default macro") + (choice :tag "Default index tag " + (const nil) + (string)))) (defcustom reftex-index-default-tag "idx" "Default index tag. @@ -1166,16 +1210,16 @@ nil Do not provide a default index last The last used index tag will be offered as default." :group 'reftex-index-support :type '(choice - (const :tag "no default" nil) - (const :tag "last used " 'last) - (string :tag "index tag " "idx"))) + (const :tag "no default" nil) + (const :tag "last used " 'last) + (string :tag "index tag " "idx"))) (defcustom reftex-index-math-format "$%s$" "Format of index entries when copied from inside math mode. When `reftex-index-selection-or-word' is executed inside TeX math mode, the index key copied from the buffer is processed with this format string through the `format' function. This can be used to add the math delimiters -(e.g. `$') to the string. +\(e.g. `$') to the string. Requires the `texmathp.el' library which is part of AUCTeX." :group 'reftex-index-support :type 'string) @@ -1229,8 +1273,8 @@ at one of these points, no word boundary is required there." If the function returns nil, the current match is skipped." :group 'reftex-index-support :type '(choice - (const :tag "No verification" nil) - (function))) + (const :tag "No verification" nil) + (function))) (defcustom reftex-index-phrases-skip-indexed-matches nil "*Non-nil means, skip matches which appear to be indexed already. @@ -1238,7 +1282,7 @@ When doing global indexing from the phrases buffer, searches for some phrases may match at places where that phrase was already indexed. In particular when indexing an already processed document again, this will even be the norm. When this variable is non-nil, RefTeX checks if -the match is an index macro argument, or if an index macro is directly +the match is inside an index macro argument, or if an index macro is directly before or after the phrase. If that is the case, that match will be ignored." :group 'reftex-index-support @@ -1282,7 +1326,7 @@ to that section." (defcustom reftex-index-include-context nil "*Non-nil means, display the index definition context in the index buffer. -This flag may also be toggled from the index buffer with the `c' key." +This flag may also be toggled from the index buffer with the `c' key." :group 'reftex-index-support :type 'boolean) @@ -1305,9 +1349,9 @@ This is used when `reftex-view-crossref' is called with point in an argument of a macro. Note that crossref viewing for citations, references (both ways) and index entries is hard-coded. This variable is only to configure additional structures for which crossreference -viewing can be useful. Each entry has the structure +viewing can be useful. Each entry has the structure -(MACRO-RE SEARCH-RE HIGHLIGHT). +\(MACRO-RE SEARCH-RE HIGHLIGHT). MACRO-RE is matched against the macro. SEARCH-RE is the regexp used to search for cross references. `%s' in this regexp is replaced with @@ -1315,8 +1359,8 @@ with the macro argument at point. HIGHLIGHT is an integer indicating which subgroup of the match should be highlighted." :group 'reftex-viewing-cross-references :type '(repeat (group (regexp :tag "Macro Regexp ") - (string :tag "Search Regexp ") - (integer :tag "Highlight Group")))) + (string :tag "Search Regexp ") + (integer :tag "Highlight Group")))) (defcustom reftex-auto-view-crossref t "*Non-nil means, initially turn automatic viewing of crossref info on. @@ -1326,12 +1370,12 @@ argument of a \\ref or \\cite macro, and no other message is being displayed, the echo area will display information about that cross reference. You can also set the variable to the symbol `window'. In this case a small temporary window is used for the display. -This feature can be turned on and off from the menu -(Ref->Options)." +This feature can be turned on and off from the menu +\(Ref->Options)." :group 'reftex-viewing-cross-references :type '(choice (const :tag "off" nil) - (const :tag "in Echo Area" t) - (const :tag "in Other Window" window))) + (const :tag "in Echo Area" t) + (const :tag "in Other Window" window))) (defcustom reftex-idle-time 1.2 "*Time (secs) Emacs has to be idle before automatic crossref display is done. @@ -1372,7 +1416,7 @@ Several entries are possible. - If an element is the name of an environment variable, its content is used. - If an element starts with an exclamation mark, it is used as a command to retrieve the path. A typical command with the kpathsearch library would - be `!kpsewhich -show-path=.tex'. + be `!kpsewhich -show-path=.tex'. - Otherwise the element itself is interpreted as a path. Multiple directories can be separated by the system dependent `path-separator'. Directories ending in `//' or `!!' will be expanded recursively. @@ -1387,7 +1431,7 @@ Several entries are possible. - If an element is the name of an environment variable, its content is used. - If an element starts with an exclamation mark, it is used as a command to retrieve the path. A typical command with the kpathsearch library would - be `!kpsewhich -show-path=.bib'. + be `!kpsewhich -show-path=.bib'. - Otherwise the element itself is interpreted as a path. Multiple directories can be separated by the system dependent `path-separator'. Directories ending in `//' or `!!' will be expanded recursively. @@ -1398,7 +1442,7 @@ See also `reftex-use-external-file-finders'." :type '(repeat (string :tag "Specification"))) (defcustom reftex-file-extensions '(("tex" . (".tex" ".ltx")) - ("bib" . (".bib"))) + ("bib" . (".bib"))) "*Association list with file extensions for different file types. This is a list of items, each item is like: (TYPE . (DEF-EXT OTHER-EXT ...)) @@ -1413,7 +1457,7 @@ If you are using AUCTeX, you also need to add new extensions to TeX-file-extensions." :group 'reftex-finding-files :type '(repeat (cons (string :tag "File type") - (repeat (string :tag "Extension"))))) + (repeat (string :tag "Extension"))))) (defcustom reftex-search-unrecursed-path-first t "*Non-nil means, search all specified directories before trying recursion. @@ -1432,13 +1476,13 @@ Normally, RefTeX searches the paths given in the environment variables TEXINPUTS and BIBINPUTS to find TeX files and BibTeX database files. With this option turned on, it calls an external program specified in the option `reftex-external-file-finders' instead. As a side effect, -the variables `reftex-texpath-environment-variables' and +the variables `reftex-texpath-environment-variables' and `reftex-bibpath-environment-variables' will be ignored." :group 'reftex-finding-files :type 'boolean) (defcustom reftex-external-file-finders '(("tex" . "kpsewhich -format=.tex %f") - ("bib" . "kpsewhich -format=.bib %f")) + ("bib" . "kpsewhich -format=.bib %f")) "*Association list with external programs to call for finding files. Each entry is a cons cell (TYPE . PROGRAM). TYPE is either \"tex\" or \"bib\". PROGRAM is the external program to use with @@ -1447,7 +1491,7 @@ Note that these commands will be executed directly, not via a shell. Only relevant when `reftex-use-external-file-finders' is non-nil." :group 'reftex-finding-files :type '(repeat (cons (string :tag "File type") - (string :tag "Program ")))) + (string :tag "Program ")))) ;; Tuning the parser ---------------------------------------------------- @@ -1523,7 +1567,7 @@ list." (defcustom reftex-save-parse-info nil "*Non-nil means, save information gathered with parsing in a file. The file MASTER.rel in the same directory as MASTER.tex is used to save the -information. When this variable is t, +information. When this variable is t, - accessing the parsing information for the first time in an editing session will read that file (if available) instead of parsing the document. - exiting Emacs or killing a buffer in reftex-mode will cause a new version @@ -1607,10 +1651,10 @@ Changing this variable requires to rebuild the selection and *toc* buffers to become effective (keys `g' or `r')." :group 'reftex-fontification-configurations :type '(choice - (const :tag "Never" nil) - (const :tag "Cursor driven" cursor) - (const :tag "Mouse driven" mouse) - (const :tag "Mouse and Cursor driven." both))) + (const :tag "Never" nil) + (const :tag "Cursor driven" cursor) + (const :tag "Mouse driven" mouse) + (const :tag "Mouse and Cursor driven." both))) (defcustom reftex-cursor-selected-face 'highlight "Face name to highlight cursor selected item in toc and selection buffers. @@ -1716,18 +1760,18 @@ RefTeX uses `fset' to take over the function calls. Changing the variable may require a restart of Emacs in order to become effective." :group 'reftex-miscellaneous-configurations :group 'LaTeX - :type '(choice - (const :tag "No plug-ins" nil) - (const :tag "All possible plug-ins" t) - (list - :tag "Individual choice" - :value (t t t t t) - (boolean :tag "supply label in new sections and environments") - (boolean :tag "supply argument for macros like `\\label' ") - (boolean :tag "supply argument for macros like `\\ref' ") - (boolean :tag "supply argument for macros like `\\cite' ") - (boolean :tag "supply argument for macros like `\\index' ") - ))) + :type '(choice + (const :tag "No plug-ins" nil) + (const :tag "All possible plug-ins" t) + (list + :tag "Individual choice" + :value (t t t t t) + (boolean :tag "supply label in new sections and environments") + (boolean :tag "supply argument for macros like `\\label' ") + (boolean :tag "supply argument for macros like `\\ref' ") + (boolean :tag "supply argument for macros like `\\cite' ") + (boolean :tag "supply argument for macros like `\\index' ") + ))) (defcustom reftex-allow-detached-macro-args nil "*Non-nil means, allow arguments of macros to be detached by whitespace. @@ -1747,6 +1791,8 @@ construct: \\bbb [xxx] {aaa}." :group 'reftex-miscellaneous-configurations :type 'hook) + (provide 'reftex-vars) +;;; arch-tag: 9591ea34-ef39-4431-90b7-c115eaf5e16f ;;; reftex-vars.el ends here diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index e0ac95ecfa..c00400a7b9 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -1,8 +1,8 @@ ;;; reftex.el --- minor mode for doing \label, \ref, \cite, \index in LaTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.18 +;; Version: 4.21 ;; Keywords: tex ;; This file is part of GNU Emacs. @@ -25,7 +25,7 @@ ;;--------------------------------------------------------------------------- ;; ;;; Commentary: -;; +;; ;; RefTeX is a minor mode with distinct support for \ref, \label, \cite, ;; and \index commands in (multi-file) LaTeX documents. ;; - A table of contents provides easy access to any part of a document. @@ -64,13 +64,13 @@ ;; ;; The documentation in various formats is also available at ;; -;; http://www.strw.leidenuniv.nl/~dominik/Tools/ +;; http://zon.astro.uva.nl/~dominik/Tools/ ;; ;;--------------------------------------------------------------------------- ;; ;; Introduction ;; ************ -;; +;; ;; RefTeX is a specialized package for support of labels, references, ;; citations, and the index in LaTeX. RefTeX wraps itself round 4 LaTeX ;; macros: `\label', `\ref', `\cite', and `\index'. Using these macros @@ -79,13 +79,13 @@ ;; time-consuming tasks almost entirely. It also provides functions to ;; display the structure of a document and to move around in this ;; structure quickly. -;; +;; ;; *Note Imprint::, for information about who to contact for help, bug ;; reports or suggestions. -;; +;; ;; Environment ;; =========== -;; +;; ;; RefTeX needs to access all files which are part of a multifile ;; document, and the BibTeX database files requested by the ;; `\bibliography' command. To find these files, RefTeX will require a @@ -94,26 +94,26 @@ ;; which are also used by RefTeX. However, on some systems these ;; variables do not contain the full search path. If RefTeX does not work ;; for you because it cannot find some files, read *Note Finding Files::. -;; +;; ;; Entering RefTeX Mode ;; ==================== -;; +;; ;; To turn RefTeX Mode on and off in a particular buffer, use `M-x ;; reftex-mode'. To turn on RefTeX Mode for all LaTeX files, add the ;; following lines to your `.emacs' file: -;; +;; ;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode ;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode -;; +;; ;; RefTeX in a Nutshell ;; ==================== -;; +;; ;; 1. Table of Contents ;; Typing `C-c =' (`reftex-toc') will show a table of contents of the ;; document. This buffer can display sections, labels and index ;; entries defined in the document. From the buffer, you can jump ;; quickly to every part of your document. Press `?' to get help. -;; +;; ;; 2. Labels and References ;; RefTeX helps to create unique labels and to find the correct key ;; for references quickly. It distinguishes labels for different @@ -121,7 +121,7 @@ ;; others), and can be configured to recognize any additional labeled ;; environments you have defined yourself (variable ;; `reftex-label-alist'). -;; +;; ;; * Creating Labels ;; Type `C-c (' (`reftex-label') to insert a label at point. ;; RefTeX will either @@ -130,17 +130,17 @@ ;; tables) or ;; - insert a simple label made of a prefix and a number (all ;; other environments) -;; +;; ;; Which labels are created how is configurable with the variable ;; `reftex-insert-label-flags'. -;; +;; ;; * Referencing Labels ;; To make a reference, type `C-c )' (`reftex-reference'). This ;; shows an outline of the document with all labels of a certain ;; type (figure, equation,...) and some label context. ;; Selecting a label inserts a `\ref{LABEL}' macro into the ;; original buffer. -;; +;; ;; 3. Citations ;; Typing `C-c [' (`reftex-citation') will let you specify a regular ;; expression to search in current BibTeX database files (as @@ -149,7 +149,7 @@ ;; sorted. The selected article is referenced as `\cite{KEY}' (see ;; the variable `reftex-cite-format' if you want to insert different ;; macros). -;; +;; ;; 4. Index Support ;; RefTeX helps to enter index entries. It also compiles all entries ;; into an alphabetically sorted `*Index*' buffer which you can use @@ -157,25 +157,25 @@ ;; index macros and can be configured to recognize any additional ;; macros you have defined (`reftex-index-macros'). Multiple indices ;; are supported. -;; +;; ;; * Creating Index Entries ;; To index the current selection or the word at point, type ;; `C-c /' (`reftex-index-selection-or-word'). The default macro ;; `reftex-index-default-macro' will be used. For a more ;; complex entry type `C-c <' (`reftex-index'), select any of ;; the index macros and enter the arguments with completion. -;; +;; ;; * The Index Phrases File (Delayed Indexing) ;; Type `C-c \' (`reftex-index-phrase-selection-or-word') to add ;; the current word or selection to a special _index phrase ;; file_. RefTeX can later search the document for occurrences ;; of these phrases and let you interactively index the matches. -;; +;; ;; * Displaying and Editing the Index ;; To display the compiled index in a special buffer, type `C-c ;; >' (`reftex-display-index'). From that buffer you can check ;; and edit all entries. -;; +;; ;; 5. Viewing Cross-References ;; When point is on the KEY argument of a cross-referencing macro ;; (`\label', `\ref', `\cite', `\bibitem', `\index', and variations) @@ -185,14 +185,14 @@ ;; When the enclosing macro is `\cite' or `\ref' and no other message ;; occupies the echo area, information about the citation or label ;; will automatically be displayed in the echo area. -;; +;; ;; 6. Multifile Documents ;; Multifile Documents are fully supported. The included files must ;; have a file variable `TeX-master' or `tex-main-file' pointing to ;; the master file. RefTeX provides cross-referencing information ;; from all parts of the document, and across document borders ;; (`xr.sty'). -;; +;; ;; 7. Document Parsing ;; RefTeX needs to parse the document in order to find labels and ;; other information. It does it automatically once and updates its @@ -201,23 +201,23 @@ ;; with a raw `C-u' prefix, or press the `r' key in the label ;; selection buffer, the table of contents buffer, or the index ;; buffer. -;; +;; ;; 8. AUCTeX ;; If your major LaTeX mode is AUCTeX, RefTeX can cooperate with it ;; (see variable `reftex-plug-into-AUCTeX'). AUCTeX contains style ;; files which trigger appropriate settings in RefTeX, so that for ;; many of the popular LaTeX packages no additional customizations ;; will be necessary. -;; +;; ;; 9. Useful Settings ;; To make RefTeX faster for large documents, try these: ;; (setq reftex-enable-partial-scans t) ;; (setq reftex-save-parse-info t) ;; (setq reftex-use-multiple-selection-buffers t) -;; +;; ;; To integrate with AUCTeX, use ;; (setq reftex-plug-into-AUCTeX t) -;; +;; ;; To make your own LaTeX macro definitions known to RefTeX, ;; customize the variables ;; `reftex-label-alist' (for label macros/environments) @@ -227,7 +227,7 @@ ;; `reftex-index-default-macro' (to set the default macro) ;; If you have a large number of macros defined, you may want to write ;; an AUCTeX style file to support them with both AUCTeX and RefTeX. -;; +;; ;; 10. Where Next? ;; Go ahead and use RefTeX. Use its menus until you have picked up ;; the key bindings. For an overview of what you can do in each of @@ -236,13 +236,13 @@ ;; The first part of the manual explains in a tutorial way how to use ;; and customize RefTeX. The second part is a command and variable ;; reference. -;; +;; ;;--------------------------------------------------------------------------- ;; ;; AUTHOR ;; ====== ;; -;; Carsten Dominik +;; Carsten Dominik ;; ;; with contributions from Stephen Eglen ;; @@ -250,7 +250,7 @@ ;; XEmacs 21.x. If you need to install it yourself, you can find a ;; distribution at ;; -;; http://www.strw.leidenuniv.nl/~dominik/Tools/ +;; http://zon.astro.uva.nl/~dominik/Tools/ ;; ;; THANKS TO: ;; --------- @@ -282,6 +282,12 @@ (defvar reftex-tables-dirty t "Flag showing if tables need to be re-computed.") +(eval-and-compile + (defun reftex-set-dirty (symbol value) + (setq reftex-tables-dirty t) + (set symbol value))) + + ;;; ========================================================================= ;;; ;;; Configuration variables @@ -294,7 +300,7 @@ ;;; Define the formal stuff for a minor mode named RefTeX. ;;; -(defconst reftex-version "RefTeX version 4.18" +(defconst reftex-version "RefTeX version 4.21" "Version string for RefTeX.") (defvar reftex-mode nil @@ -312,10 +318,10 @@ (setq reftex-syntax-table (copy-syntax-table)) (modify-syntax-entry ?\( "." reftex-syntax-table) (modify-syntax-entry ?\) "." reftex-syntax-table)) - + (unless reftex-syntax-table-for-bib (setq reftex-syntax-table-for-bib - (copy-syntax-table reftex-syntax-table)) + (copy-syntax-table reftex-syntax-table)) (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib) (modify-syntax-entry ?\" "." reftex-syntax-table-for-bib) (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib) @@ -371,30 +377,30 @@ on the menu bar. (if reftex-mode (progn - ;; Mode was turned on + ;; Mode was turned on (easy-menu-add reftex-mode-menu) - (and reftex-plug-into-AUCTeX - (reftex-plug-into-AUCTeX)) - (unless (get 'reftex-auto-view-crossref 'initialized) - (and reftex-auto-view-crossref - (reftex-toggle-auto-view-crossref)) - (put 'reftex-auto-view-crossref 'initialized t)) - (unless (get 'reftex-auto-recenter-toc 'initialized) - (and reftex-auto-recenter-toc - (reftex-toggle-auto-toc-recenter)) - (put 'reftex-auto-recenter-toc 'initialized t)) - - ;; Prepare the special syntax tables. - (setq reftex-syntax-table (copy-syntax-table (syntax-table))) - (modify-syntax-entry ?\( "." reftex-syntax-table) - (modify-syntax-entry ?\) "." reftex-syntax-table) - - (setq reftex-syntax-table-for-bib - (copy-syntax-table reftex-syntax-table)) - (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib) - (modify-syntax-entry ?\" "." reftex-syntax-table-for-bib) - (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib) - (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib) + (and reftex-plug-into-AUCTeX + (reftex-plug-into-AUCTeX)) + (unless (get 'reftex-auto-view-crossref 'initialized) + (and reftex-auto-view-crossref + (reftex-toggle-auto-view-crossref)) + (put 'reftex-auto-view-crossref 'initialized t)) + (unless (get 'reftex-auto-recenter-toc 'initialized) + (and (eq reftex-auto-recenter-toc t) + (reftex-toggle-auto-toc-recenter)) + (put 'reftex-auto-recenter-toc 'initialized t)) + + ;; Prepare the special syntax tables. + (setq reftex-syntax-table (copy-syntax-table (syntax-table))) + (modify-syntax-entry ?\( "." reftex-syntax-table) + (modify-syntax-entry ?\) "." reftex-syntax-table) + + (setq reftex-syntax-table-for-bib + (copy-syntax-table reftex-syntax-table)) + (modify-syntax-entry ?\' "." reftex-syntax-table-for-bib) + (modify-syntax-entry ?\" "." reftex-syntax-table-for-bib) + (modify-syntax-entry ?\[ "." reftex-syntax-table-for-bib) + (modify-syntax-entry ?\] "." reftex-syntax-table-for-bib) (run-hooks 'reftex-mode-hook)) ;; Mode was turned off @@ -419,13 +425,13 @@ on the menu bar. ;; This function should be installed in `kill-buffer-hook'. ;; We are careful to make sure nothing goes wring in this function. (when (and (boundp 'reftex-mode) reftex-mode - (boundp 'reftex-save-parse-info) reftex-save-parse-info - (boundp 'reftex-docstruct-symbol) reftex-docstruct-symbol - (symbol-value reftex-docstruct-symbol) - (get reftex-docstruct-symbol 'modified)) + (boundp 'reftex-save-parse-info) reftex-save-parse-info + (boundp 'reftex-docstruct-symbol) reftex-docstruct-symbol + (symbol-value reftex-docstruct-symbol) + (get reftex-docstruct-symbol 'modified)) ;; Write the file. (condition-case nil - (reftex-access-parse-file 'write) + (reftex-access-parse-file 'write) (error nil)))) (defun reftex-kill-emacs-hook () @@ -433,9 +439,9 @@ on the menu bar. ;; This function should be installed in `kill-emacs-hook'. (save-excursion (mapcar (lambda (buf) - (set-buffer buf) - (reftex-kill-buffer-hook)) - (buffer-list)))) + (set-buffer buf) + (reftex-kill-buffer-hook)) + (buffer-list)))) ;;; ========================================================================= ;;; @@ -505,8 +511,8 @@ on the menu bar. (put (symbol-value symbol) :master-index index) ;; Initialize if new symbols. (when newflag - (set (symbol-value symbol) nil) - (put (symbol-value symbol) 'reftex-index-macros-style '(default)))) + (set (symbol-value symbol) nil) + (put (symbol-value symbol) 'reftex-index-macros-style '(default)))) ;; Return t if the symbols did already exist, nil when we've made them. (not newflag))) @@ -529,10 +535,10 @@ on the menu bar. ((master (cond ((fboundp 'TeX-master-file) ; AUCTeX is loaded. Use its mechanism. - (condition-case nil - (TeX-master-file t) - (error (buffer-file-name)))) - ((fboundp 'tex-main-file) (tex-main-file)) ; Emacs LaTeX mode + (condition-case nil + (TeX-master-file t) + (error (buffer-file-name)))) + ((fboundp 'tex-main-file) (tex-main-file)) ; Emacs LaTeX mode ((boundp 'TeX-master) ; The variable is defined - lets use it. (cond ((eq TeX-master t) @@ -558,7 +564,7 @@ on the menu bar. (buffer-file-name))))) (cond ((null master) - (error "Need a filename for this buffer, please save it first")) + (error "Need a filename for this buffer, please save it first")) ((or (file-exists-p (concat master ".tex")) (reftex-get-buffer-visiting (concat master ".tex"))) ;; Ahh, an extra .tex was missing... @@ -569,7 +575,7 @@ on the menu bar. ) (t ;; Use buffer file name. - (setq master (buffer-file-name)))) + (buffer-file-name))) (expand-file-name master))) (defun reftex-is-multi () @@ -587,15 +593,15 @@ for possible values. This function should be used from AUCTeX style files." (unless reftex-docstruct-symbol (reftex-tie-multifile-symbols)) (when (and reftex-docstruct-symbol - (symbolp reftex-docstruct-symbol)) + (symbolp reftex-docstruct-symbol)) (put reftex-docstruct-symbol 'reftex-cite-format value))) (defun reftex-get-cite-format () ;; Return the current citation format. Either the document-local value in ;; reftex-cite-format-symbol, or the global value in reftex-cite-format. (if (and reftex-docstruct-symbol - (symbolp reftex-docstruct-symbol) - (get reftex-docstruct-symbol 'reftex-cite-format)) + (symbolp reftex-docstruct-symbol) + (get reftex-docstruct-symbol 'reftex-cite-format)) (get reftex-docstruct-symbol 'reftex-cite-format) reftex-cite-format)) @@ -611,22 +617,22 @@ the label information is recompiled on next use." (unless reftex-docstruct-symbol (reftex-tie-multifile-symbols)) (when (and reftex-docstruct-symbol - (symbolp reftex-docstruct-symbol)) + (symbolp reftex-docstruct-symbol)) (let ((list (get reftex-docstruct-symbol 'reftex-index-macros-style)) - entry changed) + entry changed) (while entry-list - (setq entry (pop entry-list)) - ;; When it is a symbol, remove all other symbols - (and (symbolp entry) - (not (memq entry list)) - (setq list (reftex-remove-symbols-from-list list))) - ;; Add to list unless already member - (unless (member entry list) - (setq reftex-tables-dirty t - changed t) - (push entry list))) + (setq entry (pop entry-list)) + ;; When it is a symbol, remove all other symbols + (and (symbolp entry) + (not (memq entry list)) + (setq list (reftex-remove-symbols-from-list list))) + ;; Add to list unless already member + (unless (member entry list) + (setq reftex-tables-dirty t + changed t) + (push entry list))) (when changed - (put reftex-docstruct-symbol 'reftex-index-macros-style list))))) + (put reftex-docstruct-symbol 'reftex-index-macros-style list))))) ;;; ========================================================================= ;;; @@ -728,14 +734,14 @@ the label information is recompiled on next use." ;; A list of all variables in the cache. ;; The cache is used to save the compiled versions of some variables. -(defconst reftex-cache-variables +(defconst reftex-cache-variables '(reftex-memory ;; This MUST ALWAYS be the first! - + ;; Outline reftex-section-levels-all ;; Labels - reftex-env-or-mac-alist + reftex-env-or-mac-alist reftex-special-env-parsers reftex-macros-with-labels reftex-label-mac-list @@ -751,7 +757,7 @@ the label information is recompiled on next use." reftex-index-macro-alist reftex-macros-with-index reftex-query-index-macro-prompt - reftex-query-index-macro-help + reftex-query-index-macro-help reftex-key-to-index-macro-alist ;; Regular expressions @@ -768,35 +774,35 @@ the label information is recompiled on next use." (defun reftex-ensure-compiled-variables () ;; Recompile the label alist when necessary (let* ((mem reftex-memory) - (cache (get reftex-docstruct-symbol 'reftex-cache)) - (cmem (car cache)) - (alist reftex-label-alist) - (levels (get reftex-docstruct-symbol 'reftex-section-levels)) - (style (get reftex-docstruct-symbol 'reftex-label-alist-style)) - (default reftex-default-label-alist-entries) - (index reftex-index-macros) - (istyle (get reftex-docstruct-symbol 'reftex-index-macros-style))) + (cache (get reftex-docstruct-symbol 'reftex-cache)) + (cmem (car cache)) + (alist reftex-label-alist) + (levels (get reftex-docstruct-symbol 'reftex-section-levels)) + (style (get reftex-docstruct-symbol 'reftex-label-alist-style)) + (default reftex-default-label-alist-entries) + (index reftex-index-macros) + (istyle (get reftex-docstruct-symbol 'reftex-index-macros-style))) (cond (reftex-tables-dirty (reftex-compile-variables)) ((and (eq alist (nth 0 mem)) - (eq levels (nth 1 mem)) - (eq style (nth 2 mem)) - (eq default (nth 3 mem)) - (eq index (nth 4 mem)) - (eq istyle (nth 5 mem)))) ;; everything is OK + (eq levels (nth 1 mem)) + (eq style (nth 2 mem)) + (eq default (nth 3 mem)) + (eq index (nth 4 mem)) + (eq istyle (nth 5 mem)))) ;; everything is OK ((and (eq alist (nth 0 cmem)) - (eq levels (nth 1 cmem)) - (eq style (nth 2 cmem)) - (eq default (nth 2 cmem)) - (eq index (nth 4 cmem)) - (eq istyle (nth 5 cmem))) + (eq levels (nth 1 cmem)) + (eq style (nth 2 cmem)) + (eq default (nth 2 cmem)) + (eq index (nth 4 cmem)) + (eq istyle (nth 5 cmem))) ;; restore the cache (message "Restoring cache") (mapcar (lambda (sym) (set sym (pop cache))) reftex-cache-variables)) (t (reftex-compile-variables))))) (defun reftex-reset-mode () - "Reset RefTeX Mode. + "Reset RefTeX Mode. This will re-compile the configuration information and remove all current scanning information and the parse file to enforce a rescan on next use." @@ -804,18 +810,18 @@ on next use." ;; Reset the file search path variables (loop for prop in '(status master-dir recursive-path rec-type) do - (put 'reftex-tex-path prop nil) - (put 'reftex-bib-path prop nil)) + (put 'reftex-tex-path prop nil) + (put 'reftex-bib-path prop nil)) ;; Kill temporary buffers associated with RefTeX - just in case they ;; were not cleaned up properly (save-excursion (let ((buffer-list '("*RefTeX Help*" "*RefTeX Select*" - "*Duplicate Labels*" "*toc*" " *RefTeX-scratch*")) - buf) + "*Duplicate Labels*" "*toc*" " *RefTeX-scratch*")) + buf) (while (setq buf (pop buffer-list)) - (if (get-buffer buf) - (kill-buffer buf)))) + (if (get-buffer buf) + (kill-buffer buf)))) (reftex-erase-all-selection-and-index-buffers)) ;; Make sure the current document will be rescanned soon. @@ -830,6 +836,7 @@ on next use." (reftex-compile-variables)) +;;;###autoload (defun reftex-reset-scanning-information () "Reset the symbols containing information from buffer scanning. This enforces rescanning the buffer on next use." @@ -846,12 +853,12 @@ This enforces rescanning the buffer on next use." (defun reftex-erase-all-selection-and-index-buffers () ;; Remove all selection buffers associated with current document. - (mapcar + (mapcar (lambda (type) (reftex-erase-buffer (reftex-make-selection-buffer-name type))) reftex-typekey-list) ;; Kill all index buffers - (mapcar + (mapcar (lambda (tag) (reftex-kill-buffer (reftex-make-index-buffer-name tag))) (cdr (assoc 'index-tags (symbol-value reftex-docstruct-symbol))))) @@ -867,34 +874,34 @@ This enforces rescanning the buffer on next use." ;; Record that we have done this, and what we have used. (setq reftex-tables-dirty nil) - (setq reftex-memory - (list reftex-label-alist - (get reftex-docstruct-symbol 'reftex-section-levels) - (get reftex-docstruct-symbol 'reftex-label-alist-style) - reftex-default-label-alist-entries - reftex-index-macros - (get reftex-docstruct-symbol 'reftex-index-macros-style))) + (setq reftex-memory + (list reftex-label-alist + (get reftex-docstruct-symbol 'reftex-section-levels) + (get reftex-docstruct-symbol 'reftex-label-alist-style) + reftex-default-label-alist-entries + reftex-index-macros + (get reftex-docstruct-symbol 'reftex-index-macros-style))) ;; Compile information in reftex-label-alist (let ((all (reftex-uniquify-by-car - (reftex-splice-symbols-into-list - (append reftex-label-alist - (get reftex-docstruct-symbol - 'reftex-label-alist-style) - reftex-default-label-alist-entries) - reftex-label-alist-builtin) - '(nil))) - (all-index (reftex-uniquify-by-car - (reftex-splice-symbols-into-list - (append reftex-index-macros - (get reftex-docstruct-symbol - 'reftex-index-macros-style) - '(default)) - reftex-index-macros-builtin))) + (reftex-splice-symbols-into-list + (append reftex-label-alist + (get reftex-docstruct-symbol + 'reftex-label-alist-style) + reftex-default-label-alist-entries) + reftex-label-alist-builtin) + '(nil))) + (all-index (reftex-uniquify-by-car + (reftex-splice-symbols-into-list + (append reftex-index-macros + (get reftex-docstruct-symbol + 'reftex-index-macros-style) + '(default)) + reftex-index-macros-builtin))) entry env-or-mac typekeychar typekey prefix context word fmt reffmt labelfmt wordlist qh-list macros-with-labels nargs nlabel opt-args cell sum i - macro verify repeat nindex tag key toc-level toc-levels) + macro verify repeat nindex tag key toc-level toc-levels) (setq reftex-words-to-typekey-alist nil reftex-typekey-list nil @@ -923,7 +930,7 @@ This enforces rescanning the buffer on next use." fmt (nth 2 entry) context (nth 3 entry) wordlist (nth 4 entry) - toc-level (nth 5 entry)) + toc-level (nth 5 entry)) (if (stringp wordlist) ;; This is before version 2.04 - convert to new format (setq wordlist (nthcdr 4 entry))) @@ -935,66 +942,66 @@ This enforces rescanning the buffer on next use." (setq fmt (list "\\label{%s}" fmt))) (setq labelfmt (car fmt) reffmt (nth 1 fmt)) - ;; Note a new typekey + ;; Note a new typekey (if typekey (add-to-list 'reftex-typekey-list typekey)) (if (and typekey prefix (not (assoc typekey reftex-typekey-to-prefix-alist))) (add-to-list 'reftex-typekey-to-prefix-alist (cons typekey prefix))) - ;; Check if this is a macro or environment + ;; Check if this is a macro or environment (cond - ((symbolp env-or-mac) - ;; A special parser function - (unless (fboundp env-or-mac) - (message "Warning: %s does not seem to be a valid function" - env-or-mac)) + ((symbolp env-or-mac) + ;; A special parser function + (unless (fboundp env-or-mac) + (message "Warning: %s does not seem to be a valid function" + env-or-mac)) (setq nargs nil nlabel nil opt-args nil) - (add-to-list 'reftex-special-env-parsers env-or-mac) - (setq env-or-mac (symbol-name env-or-mac))) + (add-to-list 'reftex-special-env-parsers env-or-mac) + (setq env-or-mac (symbol-name env-or-mac))) ((string-match "\\`\\\\" env-or-mac) ;; It's a macro (let ((result (reftex-parse-args env-or-mac))) (setq env-or-mac (or (first result) env-or-mac) - nargs (second result) + nargs (second result) nlabel (third result) opt-args (fourth result)) (if nlabel (add-to-list 'macros-with-labels env-or-mac))) - (if typekey (add-to-list 'reftex-label-mac-list env-or-mac))) + (if typekey (add-to-list 'reftex-label-mac-list env-or-mac))) (t - ;; It's an environment + ;; It's an environment (setq nargs nil nlabel nil opt-args nil) (cond ((string= env-or-mac "any")) ((string= env-or-mac "")) ((string= env-or-mac "section")) (t (add-to-list 'reftex-label-env-list env-or-mac) - (if toc-level - (let ((string (format "begin{%s}" env-or-mac))) - (or (assoc string toc-levels) - (push (cons string toc-level) toc-levels)))))))) - ;; Translate some special context cases - (when (assq context reftex-default-context-regexps) - (setq context - (format - (cdr (assq context reftex-default-context-regexps)) - (regexp-quote env-or-mac)))) - ;; See if this is the first format for this typekey + (if toc-level + (let ((string (format "begin{%s}" env-or-mac))) + (or (assoc string toc-levels) + (push (cons string toc-level) toc-levels)))))))) + ;; Translate some special context cases + (when (assq context reftex-default-context-regexps) + (setq context + (format + (cdr (assq context reftex-default-context-regexps)) + (regexp-quote env-or-mac)))) + ;; See if this is the first format for this typekey (and reffmt (not (assoc typekey reftex-typekey-to-format-alist)) (push (cons typekey reffmt) reftex-typekey-to-format-alist)) - ;; See if this is the first definition for this env-or-mac + ;; See if this is the first definition for this env-or-mac (and (not (string= env-or-mac "any")) (not (string= env-or-mac "")) (not (assoc env-or-mac reftex-env-or-mac-alist)) (push (list env-or-mac typekey context labelfmt - nargs nlabel opt-args) + nargs nlabel opt-args) reftex-env-or-mac-alist)) - ;; Are the magic words regular expressions? Quote normal words. - (if (eq (car wordlist) 'regexp) - (setq wordlist (cdr wordlist)) - (setq wordlist (mapcar 'regexp-quote wordlist))) - ;; Remember the first association of each word. + ;; Are the magic words regular expressions? Quote normal words. + (if (eq (car wordlist) 'regexp) + (setq wordlist (cdr wordlist)) + (setq wordlist (mapcar 'regexp-quote wordlist))) + ;; Remember the first association of each word. (while (stringp (setq word (pop wordlist))) (or (assoc word reftex-words-to-typekey-alist) (push (cons word typekey) reftex-words-to-typekey-alist))) @@ -1009,10 +1016,10 @@ This enforces rescanning the buffer on next use." (nreverse reftex-typekey-to-prefix-alist)) ;; Prepare the typekey query prompt and help string. - (setq qh-list - (sort qh-list - (lambda (x1 x2) - (string< (downcase (car x1)) (downcase (car x2)))))) + (setq qh-list + (sort qh-list + (lambda (x1 x2) + (string< (downcase (car x1)) (downcase (car x2)))))) (setq reftex-type-query-prompt (concat "Label type: [" (mapconcat (lambda(x) (format "%s" (car x))) @@ -1020,164 +1027,164 @@ This enforces rescanning the buffer on next use." "]")) ;; In the help string, we need to wrap lines... (setq reftex-type-query-help - (concat - "SELECT A LABEL TYPE:\n--------------------\n" - (mapconcat - (lambda(x) - (setq sum 0) - (format " [%s] %s" - (car x) - (mapconcat (lambda(env) - (setq sum (+ sum (length env))) - (if (< sum 60) - env - (setq sum 0) - (concat "\n " env))) - (cdr x) " "))) - qh-list "\n"))) + (concat + "SELECT A LABEL TYPE:\n--------------------\n" + (mapconcat + (lambda(x) + (setq sum 0) + (format " [%s] %s" + (car x) + (mapconcat (lambda(env) + (setq sum (+ sum (length env))) + (if (< sum 60) + env + (setq sum 0) + (concat "\n " env))) + (cdr x) " "))) + qh-list "\n"))) ;; Convert magic words to regular expressions. We make regular expressions ;; which allow for some chars from the ref format to be in the buffer. ;; These characters will be seen and removed. (setq reftex-words-to-typekey-alist - (mapcar - (lambda (x) - (setq word (car x) - typekey (cdr x) - fmt (cdr (assoc typekey reftex-typekey-to-format-alist))) - (setq word (concat "\\W\\(" word "[ \t\n\r]*\\)\\(")) - (setq i 0) - (while (and (< i 10) ; maximum number of format chars allowed - (< i (length fmt)) - (not (member (aref fmt i) '(?%)))) - (setq word (concat word "\\|" (regexp-quote - (substring fmt 0 (1+ i))))) - (incf i)) - (cons (concat word "\\)\\=") typekey)) - (nreverse reftex-words-to-typekey-alist))) + (mapcar + (lambda (x) + (setq word (car x) + typekey (cdr x) + fmt (cdr (assoc typekey reftex-typekey-to-format-alist))) + (setq word (concat "\\W\\(" word "[ \t\n\r]*\\)\\(")) + (setq i 0) + (while (and (< i 10) ; maximum number of format chars allowed + (< i (length fmt)) + (not (member (aref fmt i) '(?%)))) + (setq word (concat word "\\|" (regexp-quote + (substring fmt 0 (1+ i))))) + (incf i)) + (cons (concat word "\\)\\=") typekey)) + (nreverse reftex-words-to-typekey-alist))) ;; Parse the index macros (setq reftex-index-macro-alist nil - reftex-key-to-index-macro-alist nil - reftex-macros-with-index nil) + reftex-key-to-index-macro-alist nil + reftex-macros-with-index nil) (while all-index (setq entry (car all-index) - macro (car entry) - tag (nth 1 entry) - key (nth 2 entry) - prefix (or (nth 3 entry) "") - verify (nth 4 entry) - ;; For repeat, we need to be compatible with older code - ;; This information used to be given only for the default macro, - ;; but later we required to have it for *every* index macro - repeat (cond ((> (length entry) 5) (nth 5 entry)) - ((and (eq key (car reftex-index-default-macro)) - (> (length reftex-index-default-macro) 2)) - ;; User has old setting - respect it - (nth 2 reftex-index-default-macro)) - (t t)) - all-index (cdr all-index)) + macro (car entry) + tag (nth 1 entry) + key (nth 2 entry) + prefix (or (nth 3 entry) "") + verify (nth 4 entry) + ;; For repeat, we need to be compatible with older code + ;; This information used to be given only for the default macro, + ;; but later we required to have it for *every* index macro + repeat (cond ((> (length entry) 5) (nth 5 entry)) + ((and (eq key (car reftex-index-default-macro)) + (> (length reftex-index-default-macro) 2)) + ;; User has old setting - respect it + (nth 2 reftex-index-default-macro)) + (t t)) + all-index (cdr all-index)) (let ((result (reftex-parse-args macro))) - (setq macro (or (first result) macro) - nargs (second result) - nindex (third result) - opt-args (fourth result)) - (unless (member macro reftex-macros-with-index) - ;; 0 1 2 3 4 5 6 7 - (push (list macro tag prefix verify nargs nindex opt-args repeat) - reftex-index-macro-alist) - (or (assoc key reftex-key-to-index-macro-alist) - (push (list key macro) reftex-key-to-index-macro-alist)) - (push macro reftex-macros-with-index)))) + (setq macro (or (first result) macro) + nargs (second result) + nindex (third result) + opt-args (fourth result)) + (unless (member macro reftex-macros-with-index) + ;; 0 1 2 3 4 5 6 7 + (push (list macro tag prefix verify nargs nindex opt-args repeat) + reftex-index-macro-alist) + (or (assoc key reftex-key-to-index-macro-alist) + (push (list key macro) reftex-key-to-index-macro-alist)) + (push macro reftex-macros-with-index)))) ;; Make the prompt and help string for index macros query (setq reftex-key-to-index-macro-alist - (sort reftex-key-to-index-macro-alist - (lambda (a b) (< (downcase (car a)) (downcase (car b)))))) - (setq reftex-query-index-macro-prompt - (concat "Index macro: [" - (mapconcat (lambda (x) (char-to-string (car x))) - reftex-key-to-index-macro-alist "") - "]")) + (sort reftex-key-to-index-macro-alist + (lambda (a b) (< (downcase (car a)) (downcase (car b)))))) + (setq reftex-query-index-macro-prompt + (concat "Index macro: [" + (mapconcat (lambda (x) (char-to-string (car x))) + reftex-key-to-index-macro-alist "") + "]")) (setq i 0 - reftex-query-index-macro-help - (concat - "SELECT A MACRO:\n---------------\n" - (mapconcat - (lambda(x) - (format "[%c] %-20.20s%s" (car x) (nth 1 x) - (if (= 0 (mod (incf i) 3)) "\n" ""))) - reftex-key-to-index-macro-alist ""))) + reftex-query-index-macro-help + (concat + "SELECT A MACRO:\n---------------\n" + (mapconcat + (lambda(x) + (format "[%c] %-20.20s%s" (car x) (nth 1 x) + (if (= 0 (mod (incf i) 3)) "\n" ""))) + reftex-key-to-index-macro-alist ""))) ;; Make the full list of section levels (setq reftex-section-levels-all - (append toc-levels - (get reftex-docstruct-symbol 'reftex-section-levels) - reftex-section-levels)) + (append toc-levels + (get reftex-docstruct-symbol 'reftex-section-levels) + reftex-section-levels)) ;; Calculate the regular expressions (let* ( -; (wbol "\\(\\`\\|[\n\r]\\)[ \t]*") - (wbol "\\(^\\)[ \t]*") ; Need to keep the empty group because - ;;; because match number are hard coded - (label-re "\\\\label{\\([^}]*\\)}") - (include-re (concat wbol - "\\\\\\(" - (mapconcat 'identity - reftex-include-file-commands "\\|") - "\\)[{ \t]+\\([^} \t\n\r]+\\)")) - (section-re - (concat wbol "\\\\\\(" - (mapconcat (lambda (x) (regexp-quote (car x))) - reftex-section-levels-all "\\|") - "\\)\\*?\\(\\[[^]]*\\]\\)?[[{ \t\r\n]")) - (appendix-re (concat wbol "\\(\\\\appendix\\)")) - (macro-re - (if macros-with-labels - (concat "\\(" - (mapconcat 'regexp-quote macros-with-labels "\\|") - "\\)[[{]") - "")) - (index-re - (concat "\\(" - (mapconcat 'regexp-quote reftex-macros-with-index "\\|") - "\\)[[{]")) - (find-index-re-format - (concat "\\(" - (mapconcat 'regexp-quote reftex-macros-with-index "\\|") - "\\)\\([[{][^]}]*[]}]\\)*[[{]\\(%s\\)[]}]")) - (find-label-re-format - (concat "\\(" - (mapconcat 'regexp-quote (append '("\\label") - macros-with-labels) "\\|") - "\\)\\([[{][^]}]*[]}]\\)*[[{]\\(%s\\)[]}]")) - (index-level-re - (regexp-quote (nth 0 reftex-index-special-chars))) - (index-key-end-re ;; ^]- not allowed - (concat "[^" (nth 3 reftex-index-special-chars) "]" - "[" (nth 1 reftex-index-special-chars) - (nth 2 reftex-index-special-chars) "]")) - ) +; (wbol "\\(\\`\\|[\n\r]\\)[ \t]*") + (wbol "\\(^\\)[ \t]*") ; Need to keep the empty group because + ;;; because match number are hard coded + (label-re "\\\\label{\\([^}]*\\)}") + (include-re (concat wbol + "\\\\\\(" + (mapconcat 'identity + reftex-include-file-commands "\\|") + "\\)[{ \t]+\\([^} \t\n\r]+\\)")) + (section-re + (concat wbol "\\\\\\(" + (mapconcat (lambda (x) (regexp-quote (car x))) + reftex-section-levels-all "\\|") + "\\)\\*?\\(\\[[^]]*\\]\\)?[[{ \t\r\n]")) + (appendix-re (concat wbol "\\(\\\\appendix\\)")) + (macro-re + (if macros-with-labels + (concat "\\(" + (mapconcat 'regexp-quote macros-with-labels "\\|") + "\\)[[{]") + "")) + (index-re + (concat "\\(" + (mapconcat 'regexp-quote reftex-macros-with-index "\\|") + "\\)[[{]")) + (find-index-re-format + (concat "\\(" + (mapconcat 'regexp-quote reftex-macros-with-index "\\|") + "\\)\\([[{][^]}]*[]}]\\)*[[{]\\(%s\\)[]}]")) + (find-label-re-format + (concat "\\(" + (mapconcat 'regexp-quote (append '("\\label") + macros-with-labels) "\\|") + "\\)\\([[{][^]}]*[]}]\\)*[[{]\\(%s\\)[]}]")) + (index-level-re + (regexp-quote (nth 0 reftex-index-special-chars))) + (index-key-end-re ;; ^]- not allowed + (concat "[^" (nth 3 reftex-index-special-chars) "]" + "[" (nth 1 reftex-index-special-chars) + (nth 2 reftex-index-special-chars) "]")) + ) (setq reftex-section-regexp section-re reftex-section-or-include-regexp (concat section-re "\\|" include-re) reftex-everything-regexp (concat label-re "\\|" section-re "\\|" include-re - "\\|" appendix-re - "\\|" index-re + "\\|" appendix-re + "\\|" index-re (if macros-with-labels "\\|" "") macro-re) reftex-everything-regexp-no-index (concat label-re "\\|" section-re "\\|" include-re - "\\|" appendix-re - "\\|" "\\(\\\\6\\\\3\\\\1\\)" ; This is unlikely to match + "\\|" appendix-re + "\\|" "\\(\\\\6\\\\3\\\\1\\)" ; This is unlikely to match (if macros-with-labels "\\|" "") macro-re) - reftex-index-re index-re - reftex-index-level-re index-level-re - reftex-index-key-end-re index-key-end-re - reftex-macros-with-labels macros-with-labels - reftex-find-index-entry-regexp-format find-index-re-format + reftex-index-re index-re + reftex-index-level-re index-level-re + reftex-index-key-end-re index-key-end-re + reftex-macros-with-labels macros-with-labels + reftex-find-index-entry-regexp-format find-index-re-format reftex-find-label-regexp-format find-label-re-format - reftex-find-label-regexp-format2 - "\\([]} \t\n\r]\\)\\([[{]\\)\\(%s\\)[]}]") + reftex-find-label-regexp-format2 + "\\([]} \t\n\r]\\)\\([[{]\\)\\(%s\\)[]}]") (message "Compiling label environment definitions...done"))) (put reftex-docstruct-symbol 'reftex-cache (mapcar 'symbol-value reftex-cache-variables))) @@ -1195,8 +1202,8 @@ This enforces rescanning the buffer on next use." (when (eq ?\[ (string-to-char args)) (push cnt opt-list)) (when (and (match-end 1) - (not nlabel)) - (setq nlabel cnt)) + (not nlabel)) + (setq nlabel cnt)) (setq args (substring args (match-end 0)))) (list must-match cnt nlabel opt-list))) nil)) @@ -1220,14 +1227,14 @@ This enforces rescanning the buffer on next use." (reftex-ensure-compiled-variables) (when (or (null (symbol-value reftex-docstruct-symbol)) - (member rescan '(t 1 (4) (16)))) + (member rescan '(t 1 (4) (16)))) ;; The docstruct will change: Remove selection buffers. (save-excursion (reftex-erase-buffer "*toc*") (reftex-erase-all-selection-and-index-buffers))) (if (and (null (symbol-value reftex-docstruct-symbol)) - (not (member rescan '(t 1 (4) (16)))) + (not (member rescan '(t 1 (4) (16)))) reftex-save-parse-info) ;; Try to read the stuff from a file (reftex-access-parse-file 'read)) @@ -1241,7 +1248,6 @@ This enforces rescanning the buffer on next use." ;; Scan whatever was required by the caller. (reftex-do-parse rescan file)))) -;;;###autoload (defun reftex-scanning-info-available-p () "Is the scanning info about the current document available?" (unless reftex-docstruct-symbol @@ -1249,7 +1255,7 @@ This enforces rescanning the buffer on next use." (and (symbolp reftex-docstruct-symbol) (symbol-value reftex-docstruct-symbol) t)) - + (defun reftex-silence-toc-markers (list n) ;; Set all toc markers in the first N entries in list to nil (while (and list (> (decf n) -1)) @@ -1262,12 +1268,12 @@ This enforces rescanning the buffer on next use." "Perform ACTION on the parse file (the .rel file). Valid actions are: readable, restore, read, kill, write." (let* ((list (symbol-value reftex-docstruct-symbol)) - (docstruct-symbol reftex-docstruct-symbol) + (docstruct-symbol reftex-docstruct-symbol) (master (reftex-TeX-master-file)) - (enable-local-variables nil) + (enable-local-variables nil) (file (if (string-match "\\.[a-zA-Z]+\\'" master) - (concat (substring master 0 (match-beginning 0)) - reftex-parse-file-extension) + (concat (substring master 0 (match-beginning 0)) + reftex-parse-file-extension) (concat master reftex-parse-file-extension)))) (cond ((eq action 'readable) @@ -1279,31 +1285,31 @@ Valid actions are: readable, restore, read, kill, write." (reftex-tie-multifile-symbols)) (if (file-exists-p file) ;; load the file and return t for success - (condition-case nil - (progn (load-file file) t) - (error (set reftex-docstruct-symbol nil) - (error "Error while loading file %s" file))) + (condition-case nil + (progn (load-file file) t) + (error (set reftex-docstruct-symbol nil) + (error "Error while loading file %s" file))) ;; Throw an exception if the file does not exist (error "No restore file %s" file))) ((eq action 'read) (put reftex-docstruct-symbol 'modified nil) (if (file-exists-p file) ;; load the file and return t for success - (condition-case nil - (progn - (load-file file) - (reftex-check-parse-consistency) - t) - (error (message "Error while restoring file %s" file) - (set reftex-docstruct-symbol nil) - nil)) + (condition-case nil + (progn + (load-file file) + (reftex-check-parse-consistency) + t) + (error (message "Error while restoring file %s" file) + (set reftex-docstruct-symbol nil) + nil)) ;; return nil for failure, but no exception nil)) ((eq action 'kill) ;; Remove the file (when (and (file-exists-p file) (file-writable-p file)) - (message "Unlinking file %s" file) - (delete-file file))) + (message "Unlinking file %s" file) + (delete-file file))) (t (put docstruct-symbol 'modified nil) (save-excursion @@ -1319,20 +1325,20 @@ Valid actions are: readable, restore, read, kill, write." (insert "(set reftex-docstruct-symbol '(\n\n") (let ((standard-output (current-buffer))) (mapcar - (lambda (x) - (cond ((eq (car x) 'toc) - ;; A toc entry. Do not save the marker. - ;; Save the markers position at position 8 - (print (list 'toc "toc" (nth 2 x) (nth 3 x) - nil (nth 5 x) (nth 6 x) (nth 7 x) - (or (and (markerp (nth 4 x)) - (marker-position (nth 4 x))) - (nth 8 x))))) - ((and (not (eq t reftex-support-index)) - (eq (car x) 'index)) - ;; Don't save index entries - ) - (t (print x)))) + (lambda (x) + (cond ((eq (car x) 'toc) + ;; A toc entry. Do not save the marker. + ;; Save the markers position at position 8 + (print (list 'toc "toc" (nth 2 x) (nth 3 x) + nil (nth 5 x) (nth 6 x) (nth 7 x) + (or (and (markerp (nth 4 x)) + (marker-position (nth 4 x))) + (nth 8 x))))) + ((and (not (eq t reftex-support-index)) + (eq (car x) 'index)) + ;; Don't save index entries + ) + (t (print x)))) list)) (insert "))\n\n") (save-buffer 0) @@ -1345,29 +1351,29 @@ Valid actions are: readable, restore, read, kill, write." ;; Check if the master is the same: when moving a document, this will see it. (let* ((real-master (reftex-TeX-master-file)) - (parsed-master - (nth 1 (assq 'bof (symbol-value reftex-docstruct-symbol))))) + (parsed-master + (nth 1 (assq 'bof (symbol-value reftex-docstruct-symbol))))) (unless (string= (file-truename real-master) (file-truename parsed-master)) (message "Master file name in load file is different: %s versus %s" - parsed-master real-master) + parsed-master real-master) (error "Master file name error"))) ;; Check for the existence of all document files ;;; (let* ((all (symbol-value reftex-docstruct-symbol))) ;;; (while all ;;; (when (and (eq (car (car all)) 'bof) -;;; (not (file-regular-p (nth 1 (car all))))) -;;; (message "File %s in saved parse info not avalable" (cdr (car all))) -;;; (error "File not found")) +;;; (not (file-regular-p (nth 1 (car all))))) +;;; (message "File %s in saved parse info not avalable" (cdr (car all))) +;;; (error "File not found")) ;;; (setq all (cdr all)))) ) (defun reftex-select-external-document (xr-alist xr-index) ;; Return index of an external document. (let* ((len (length xr-alist)) (highest (1- (+ ?0 len))) - (prompt (format "[%c-%c] Select TAB: Read prefix with completion" - ?0 highest)) - key prefix) + (prompt (format "[%c-%c] Select TAB: Read prefix with completion" + ?0 highest)) + key prefix) (cond ((= len 1) (message "No external documents available") @@ -1376,27 +1382,27 @@ Valid actions are: readable, restore, read, kill, write." (- 1 xr-index)) (t (save-excursion - (let* ((length (apply 'max (mapcar - (lambda(x) (length (car x))) xr-alist))) - (fmt (format " [%%c] %%-%ds %%s\n" length)) - (n (1- ?0))) - (setq key - (reftex-select-with-char - prompt - (concat - "SELECT EXTERNAL DOCUMENT\n------------------------\n" - (mapconcat - (lambda (x) - (format fmt (incf n) (or (car x) "") - (abbreviate-file-name (cdr x)))) - xr-alist "")) - nil t)) - (cond - ((and (>= key ?0) (<= key highest)) (- key ?0)) - ((= key ?\C-i) - (setq prefix (completing-read "Prefix: " xr-alist nil t)) - (- len (length (memq (assoc prefix xr-alist) xr-alist)))) - (t (error "Illegal document selection [%c]" key))))))))) + (let* ((length (apply 'max (mapcar + (lambda(x) (length (car x))) xr-alist))) + (fmt (format " [%%c] %%-%ds %%s\n" length)) + (n (1- ?0))) + (setq key + (reftex-select-with-char + prompt + (concat + "SELECT EXTERNAL DOCUMENT\n------------------------\n" + (mapconcat + (lambda (x) + (format fmt (incf n) (or (car x) "") + (abbreviate-file-name (cdr x)))) + xr-alist "")) + nil t)) + (cond + ((and (>= key ?0) (<= key highest)) (- key ?0)) + ((= key ?\C-i) + (setq prefix (completing-read "Prefix: " xr-alist nil t)) + (- len (length (memq (assoc prefix xr-alist) xr-alist)))) + (t (error "Illegal document selection [%c]" key))))))))) ;;; ========================================================================= ;;; @@ -1408,65 +1414,65 @@ If the file does not have any of the legal extensions for TYPE, try first the default extension and only then the naked file name. When DIE is non-nil, throw an error if file not found." (let* ((rec-values (if reftex-search-unrecursed-path-first '(nil t) '(t))) - (extensions (cdr (assoc type reftex-file-extensions))) - (def-ext (car extensions)) - (ext-re (concat "\\(" - (mapconcat 'regexp-quote extensions "\\|") - "\\)\\'")) - (files (if (string-match ext-re file) - (cons file nil) - (cons (concat file def-ext) file))) - path old-path file1) + (extensions (cdr (assoc type reftex-file-extensions))) + (def-ext (car extensions)) + (ext-re (concat "\\(" + (mapconcat 'regexp-quote extensions "\\|") + "\\)\\'")) + (files (if (string-match ext-re file) + (cons file nil) + (cons (concat file def-ext) file))) + path old-path file1) (cond ((file-name-absolute-p file) - (setq file1 - (or - (and (car files) (file-regular-p (car files)) (car files)) - (and (cdr files) (file-regular-p (cdr files)) (cdr files))))) + (setq file1 + (or + (and (car files) (file-regular-p (car files)) (car files)) + (and (cdr files) (file-regular-p (cdr files)) (cdr files))))) ((and reftex-use-external-file-finders - (assoc type reftex-external-file-finders)) + (assoc type reftex-external-file-finders)) (setq file1 (reftex-find-file-externally file type master-dir))) (t (while (and (null file1) rec-values) - (setq path (reftex-access-search-path - type (pop rec-values) master-dir file)) - (if (or (null old-path) - (not (eq old-path path))) - (setq old-path path - path (cons master-dir path) - file1 (or (and (car files) - (reftex-find-file-on-path - (car files) path master-dir)) - (and (cdr files) - (reftex-find-file-on-path - (cdr files) path master-dir)))))))) + (setq path (reftex-access-search-path + type (pop rec-values) master-dir file)) + (if (or (null old-path) + (not (eq old-path path))) + (setq old-path path + path (cons master-dir path) + file1 (or (and (car files) + (reftex-find-file-on-path + (car files) path master-dir)) + (and (cdr files) + (reftex-find-file-on-path + (cdr files) path master-dir)))))))) (cond (file1 file1) - (die (error "No such file: %s" file) nil) - (t (message "No such file: %s (ignored)" file) nil)))) + (die (error "No such file: %s" file) nil) + (t (message "No such file: %s (ignored)" file) nil)))) (defun reftex-find-file-externally (file type &optional master-dir) ;; Use external program to find FILE. ;; The program is taken from `reftex-external-file-finders'. ;; Interprete relative path definitions starting from MASTER-DIR. (let ((default-directory (or master-dir default-directory)) - (prg (cdr (assoc type reftex-external-file-finders))) - out) + (prg (cdr (assoc type reftex-external-file-finders))) + out) (if (string-match "%f" prg) - (setq prg (replace-match file t t prg))) + (setq prg (replace-match file t t prg))) (setq out (apply 'reftex-process-string (split-string prg))) (if (string-match "[ \t\n]+\\'" out) ; chomp - (setq out (replace-match "" nil nil out))) + (setq out (replace-match "" nil nil out))) (cond ((equal out "") nil) - ((file-regular-p out) (expand-file-name out master-dir)) - (t nil)))) + ((file-regular-p out) (expand-file-name out master-dir)) + (t nil)))) (defun reftex-process-string (program &rest args) "Execute PROGRAM with arguments ARGS and return its STDOUT as a string." (let ((calling-dir default-directory)) ; remember default directory (with-output-to-string (with-current-buffer standard-output - (let ((default-directory calling-dir)) ; set default directory - (apply 'call-process program nil '(t nil) nil args)))))) + (let ((default-directory calling-dir)) ; set default directory + (apply 'call-process program nil '(t nil) nil args)))))) (defun reftex-access-search-path (type &optional recurse master-dir file) ;; Access path from environment variables. TYPE is either "tex" or "bib". @@ -1480,51 +1486,51 @@ When DIE is non-nil, throw an error if file not found." (when (null (get pathvar 'status)) ;; Get basic path (set pathvar - (reftex-uniq - (reftex-parse-colon-path - (mapconcat - (lambda(x) - (if (string-match "^!" x) - (apply 'reftex-process-string - (split-string (substring x 1))) - (or (getenv x) x))) - ;; For consistency, the next line should look like this: - ;; (cdr (assoc type reftex-path-environment)) - ;; However, historically we have separate options for the - ;; environment variables, so we have to do this: - (symbol-value (intern (concat "reftex-" type - "path-environment-variables"))) - path-separator)))) + (reftex-uniq + (reftex-parse-colon-path + (mapconcat + (lambda(x) + (if (string-match "^!" x) + (apply 'reftex-process-string + (split-string (substring x 1))) + (or (getenv x) x))) + ;; For consistency, the next line should look like this: + ;; (cdr (assoc type reftex-path-environment)) + ;; However, historically we have separate options for the + ;; environment variables, so we have to do this: + (symbol-value (intern (concat "reftex-" type + "path-environment-variables"))) + path-separator)))) (put pathvar 'status 'split) ;; Check if we have recursive elements (let ((path (symbol-value pathvar)) dir rec) - (while (setq dir (pop path)) - (when (string= (substring dir -2) "//") - (if (file-name-absolute-p dir) - (setq rec (or rec 'absolute)) - (setq rec 'relative)))) - (put pathvar 'rec-type rec))) + (while (setq dir (pop path)) + (when (string= (substring dir -2) "//") + (if (file-name-absolute-p dir) + (setq rec (or rec 'absolute)) + (setq rec 'relative)))) + (put pathvar 'rec-type rec))) (if recurse - ;; Return the recursive expansion of the path - (cond - ((not (get pathvar 'rec-type)) - ;; Path does not contain recursive elements - use simple path - (symbol-value pathvar)) - ((or (not (get pathvar 'recursive-path)) - (and (eq (get pathvar 'rec-type) 'relative) - (not (equal master-dir (get pathvar 'master-dir))))) - ;; Either: We don't have a recursive expansion yet. - ;; or: Relative recursive path elements need to be expanded - ;; relative to new default directory - (message "Expanding search path to find %s file: %s ..." type file) - (put pathvar 'recursive-path - (reftex-expand-path (symbol-value pathvar) master-dir)) - (put pathvar 'master-dir master-dir) - (get pathvar 'recursive-path)) - (t - ;; Recursive path computed earlier is still OK. - (get pathvar 'recursive-path))) + ;; Return the recursive expansion of the path + (cond + ((not (get pathvar 'rec-type)) + ;; Path does not contain recursive elements - use simple path + (symbol-value pathvar)) + ((or (not (get pathvar 'recursive-path)) + (and (eq (get pathvar 'rec-type) 'relative) + (not (equal master-dir (get pathvar 'master-dir))))) + ;; Either: We don't have a recursive expansion yet. + ;; or: Relative recursive path elements need to be expanded + ;; relative to new default directory + (message "Expanding search path to find %s file: %s ..." type file) + (put pathvar 'recursive-path + (reftex-expand-path (symbol-value pathvar) master-dir)) + (put pathvar 'master-dir master-dir) + (get pathvar 'recursive-path)) + (t + ;; Recursive path computed earlier is still OK. + (get pathvar 'recursive-path))) ;; The simple path was requested (symbol-value pathvar)))) @@ -1534,15 +1540,15 @@ When DIE is non-nil, throw an error if file not found." (catch 'exit (when (file-name-absolute-p file) (if (file-regular-p file) - (throw 'exit file) - (throw 'exit nil))) + (throw 'exit file) + (throw 'exit nil))) (let* ((thepath path) file1 dir) (while (setq dir (pop thepath)) - (when (string= (substring dir -2) "//") - (setq dir (substring dir 0 -1))) - (setq file1 (expand-file-name file (expand-file-name dir def-dir))) - (if (file-regular-p file1) - (throw 'exit file1))) + (when (string= (substring dir -2) "//") + (setq dir (substring dir 0 -1))) + (setq file1 (expand-file-name file (expand-file-name dir def-dir))) + (if (file-regular-p file1) + (throw 'exit file1))) ;; No such file nil))) @@ -1551,8 +1557,8 @@ When DIE is non-nil, throw an error if file not found." ;; Trailing ! or !! will be converted into `//' (emTeX convention) (mapcar (lambda (dir) - (if (string-match "\\(//+\\|/*!+\\)\\'" dir) - (setq dir (replace-match "//" t t dir))) + (if (string-match "\\(//+\\|/*!+\\)\\'" dir) + (setq dir (replace-match "//" t t dir))) (file-name-as-directory dir)) (delete "" (split-string path (concat path-separator "+"))))) @@ -1562,15 +1568,15 @@ When DIE is non-nil, throw an error if file not found." (let (path1 dir recursive) (while (setq dir (pop path)) (if (setq recursive (string= (substring dir -2) "//")) - (setq dir (substring dir 0 -1))) + (setq dir (substring dir 0 -1))) (if (and recursive - (not (file-name-absolute-p dir))) - (setq dir (expand-file-name dir default-dir))) + (not (file-name-absolute-p dir))) + (setq dir (expand-file-name dir default-dir))) (if recursive - ;; Expand recursively - (setq path1 (append (reftex-recursive-directory-list dir) path1)) - ;; Keep unchanged - (push dir path1))) + ;; Expand recursively + (setq path1 (append (reftex-recursive-directory-list dir) path1)) + ;; Keep unchanged + (push dir path1))) (nreverse path1))) (defun reftex-recursive-directory-list (dir) @@ -1578,18 +1584,18 @@ When DIE is non-nil, throw an error if file not found." (let ((path (list dir)) path1 file files) (while (setq dir (pop path)) (when (file-directory-p dir) - (setq files (nreverse (directory-files dir t "[^.]"))) - (while (setq file (pop files)) - (if (file-directory-p file) - (push (file-name-as-directory file) path))) - (push dir path1))) + (setq files (nreverse (directory-files dir t "[^.]"))) + (while (setq file (pop files)) + (if (file-directory-p file) + (push (file-name-as-directory file) path))) + (push dir path1))) path1)) (defun reftex-uniq (list) (let (new) (while list (or (member (car list) new) - (push (car list) new)) + (push (car list) new)) (pop list)) (nreverse new))) @@ -1652,8 +1658,8 @@ When DIE is non-nil, throw an error if file not found." "Show the table of contents for the current document." t) (autoload 'reftex-toc-recenter "reftex-toc" "Display the TOC window and highlight line corresponding to current position." t) -(autoload 'reftex-toggle-auto-toc-recenter "reftex-toc" t) - +(autoload 'reftex-toggle-auto-toc-recenter "reftex-toc" + "Toggle automatic recentering of TOC window." t) ;;; ========================================================================= ;;; @@ -1791,6 +1797,13 @@ When DIE is non-nil, throw an error if file not found." (when (match-beginning n) (buffer-substring-no-properties (match-beginning n) (match-end n)))) +(defun reftex-region-active-p () + "Is transient-mark-mode on and the region active? +Works on both Emacs and XEmacs." + (if (featurep 'xemacs) + (and zmacs-regions (region-active-p)) + (and transient-mark-mode mark-active))) + (defun reftex-kill-buffer (buffer) ;; Kill buffer if it exists. (and (setq buffer (get-buffer buffer)) @@ -1848,7 +1861,7 @@ When DIE is non-nil, throw an error if file not found." (let* ((elt (car (member elt list))) (ex (not exclusive)) ass last-ass) (while (and (setq ass (assoc key list)) (setq list (memq ass list)) - (or ex (not (eq elt (car list)))) + (or ex (not (eq elt (car list)))) (memq elt list)) (setq last-ass ass list (cdr list))) @@ -1862,22 +1875,22 @@ When DIE is non-nil, throw an error if file not found." (let (rtn) (while list (if (funcall predicate (car list)) - (push (if completion - (list (nth nth (car list))) - (nth nth (car list))) - rtn)) + (push (if completion + (list (nth nth (car list))) + (nth nth (car list))) + rtn)) (setq list (cdr list))) (nreverse rtn))) (defun reftex-make-selection-buffer-name (type &optional index) ;; Make unique name for a selection buffer. (format " *RefTeX[%s][%d]*" - type (or index (get reftex-docstruct-symbol :master-index) 0))) + type (or index (get reftex-docstruct-symbol :master-index) 0))) (defun reftex-make-index-buffer-name (tag &optional cnt) ;; Make unique name for an index buffer. (format "*Index[%s][%d]*" - tag (or cnt (get reftex-docstruct-symbol :master-index) 0))) + tag (or cnt (get reftex-docstruct-symbol :master-index) 0))) (defun reftex-truncate (string ncols &optional ellipses padding) ;; Truncate STRING to NCOLS characters. @@ -1885,11 +1898,11 @@ When DIE is non-nil, throw an error if file not found." ;; white space to NCOLS characters. When ELLIPSES is non-nil and the ;; string needs to be truncated, replace last 3 characters by dots. (setq string - (if (<= (length string) ncols) - string - (if ellipses - (concat (substring string 0 (- ncols 3)) "...") - (substring string 0 ncols)))) + (if (<= (length string) ncols) + string + (if ellipses + (concat (substring string 0 (- ncols 3)) "...") + (substring string 0 ncols)))) (if padding (format (format "%%-%ds" ncols) string) string)) @@ -1899,8 +1912,8 @@ When DIE is non-nil, throw an error if file not found." ;; If POS is given, calculate distances relative to it. ;; Return nil if there is no match. (let ((pos (point)) - (dist (or max-length (length regexp))) - match1 match2 match) + (dist (or max-length (length regexp))) + match1 match2 match) (goto-char (min (+ pos dist) (point-max))) (when (re-search-backward regexp nil t) (setq match1 (match-data))) @@ -1936,14 +1949,14 @@ When DIE is non-nil, throw an error if file not found." ;; Enlarge other window displaying buffer to show whole buffer if possible. ;; If KEEP-CURRENT in non-nil, current buffer must remain visible. (let* ((win1 (selected-window)) - (buf1 (current-buffer)) - (win2 (get-buffer-window buf2))) ;; Only on current frame. + (buf1 (current-buffer)) + (win2 (get-buffer-window buf2))) ;; Only on current frame. (when win2 (select-window win2) - (unless (and (pos-visible-in-window-p 1) - (pos-visible-in-window-p (point-max))) - (enlarge-window (1+ (- (count-lines 1 (point-max)) - (reftex-window-height)))))) + (unless (and (pos-visible-in-window-p (point-min)) + (pos-visible-in-window-p (point-max))) + (enlarge-window (1+ (- (count-lines (point-min) (point-max)) + (reftex-window-height)))))) (cond ((window-live-p win1) (select-window win1)) (keep-current @@ -1958,37 +1971,37 @@ When DIE is non-nil, throw an error if file not found." (let ((char ?\?)) (save-window-excursion (catch 'exit - (message (concat prompt " (?=Help)")) - (when (or (sit-for (or delay-time 0)) - (= ?\? (setq char (read-char-exclusive)))) - (reftex-kill-buffer "*RefTeX Select*") - (switch-to-buffer-other-window "*RefTeX Select*") - (insert help-string) - (goto-char 1) - (unless (and (pos-visible-in-window-p (point-min)) - (pos-visible-in-window-p (point-max))) - (enlarge-window (1+ (- (count-lines (point-min) (point-max)) - (reftex-window-height))))) - (setq truncate-lines t)) - (if (and (pos-visible-in-window-p (point-min)) - (pos-visible-in-window-p (point-max))) - nil - (setq prompt (concat prompt (if scroll " (SPC/DEL=Scroll)" "")))) - (message prompt) - (and (equal char ?\?) (setq char (read-char-exclusive))) - (while t - (cond ((equal char ?\C-g) (keyboard-quit)) - ((equal char ?\?)) - ((and scroll (equal char ?\ )) - (condition-case nil (scroll-up) (error nil)) - (message prompt)) - ((and scroll (equal char ?\C-? )) - (condition-case nil (scroll-down) (error nil)) - (message prompt)) - (t (message "") - (throw 'exit char))) - (setq char (read-char-exclusive))))))) - + (message (concat prompt " (?=Help)")) + (when (or (sit-for (or delay-time 0)) + (= ?\? (setq char (read-char-exclusive)))) + (reftex-kill-buffer "*RefTeX Select*") + (switch-to-buffer-other-window "*RefTeX Select*") + (insert help-string) + (goto-char 1) + (unless (and (pos-visible-in-window-p (point-min)) + (pos-visible-in-window-p (point-max))) + (enlarge-window (1+ (- (count-lines (point-min) (point-max)) + (reftex-window-height))))) + (setq truncate-lines t)) + (if (and (pos-visible-in-window-p (point-min)) + (pos-visible-in-window-p (point-max))) + nil + (setq prompt (concat prompt (if scroll " (SPC/DEL=Scroll)" "")))) + (message prompt) + (and (equal char ?\?) (setq char (read-char-exclusive))) + (while t + (cond ((equal char ?\C-g) (keyboard-quit)) + ((equal char ?\?)) + ((and scroll (equal char ?\ )) + (condition-case nil (scroll-up) (error nil)) + (message prompt)) + ((and scroll (equal char ?\C-? )) + (condition-case nil (scroll-down) (error nil)) + (message prompt)) + (t (message "") + (throw 'exit char))) + (setq char (read-char-exclusive))))))) + (defun reftex-make-regexp-allow-for-ctrl-m (string) ;; convert STRING into a regexp, allowing ^M for \n and vice versa @@ -2011,14 +2024,14 @@ When DIE is non-nil, throw an error if file not found." ;; Define `current-message' for compatibility with XEmacs prior to 20.4 (defvar message-stack) (if (and (featurep 'xemacs) - (not (fboundp 'current-message))) + (not (fboundp 'current-message))) (defun current-message (&optional frame) (cdr (car message-stack)))) (defun reftex-visited-files (list) ;; Takes a list of filenames and returns the buffers of those already visited (delq nil (mapcar (lambda (x) (if (reftex-get-buffer-visiting x) x nil)) - list))) + list))) (defun reftex-get-file-buffer-force (file &optional mark-to-kill) ;; Return a buffer visiting file. Make one, if necessary. @@ -2049,7 +2062,7 @@ When DIE is non-nil, throw an error if file not found." (let ((format-alist nil) (auto-mode-alist (reftex-auto-mode-alist)) (default-major-mode 'fundamental-mode) - (enable-local-variables nil) + (enable-local-variables nil) (after-insert-file-functions nil)) (setq buf (find-file-noselect file))) @@ -2059,9 +2072,9 @@ When DIE is non-nil, throw an error if file not found." (set-buffer buf) (run-hooks 'reftex-initialize-temporary-buffers)))) - ;; Lets see if we got a license to kill :-| - (and mark-to-kill - (add-to-list 'reftex-buffers-to-kill buf)) + ;; Lets see if we got a license to kill :-| + (and mark-to-kill + (add-to-list 'reftex-buffers-to-kill buf)) ;; Return the new buffer buf) @@ -2111,7 +2124,7 @@ When DIE is non-nil, throw an error if file not found." (let (rtn) (while list (unless (symbolp (car list)) - (push (car list) rtn)) + (push (car list) rtn)) (setq list (cdr list))) (nreverse rtn))) @@ -2121,7 +2134,7 @@ When DIE is non-nil, throw an error if file not found." (while list (setq elm (pop list)) (unless (member elm new) - (push elm new))) + (push elm new))) (nreverse new))) (defun reftex-uniquify-by-car (alist &optional keep-list) @@ -2137,11 +2150,11 @@ When DIE is non-nil, throw an error if file not found." (defun reftex-abbreviate-title (string) (reftex-convert-string string "[-~ \t\n\r,;]" nil t t - 5 40 nil 1 " " (nth 5 reftex-derive-label-parameters))) + 5 40 nil 1 " " (nth 5 reftex-derive-label-parameters))) (defun reftex-convert-string (string split-re illegal-re dot keep-fp - nwords maxchar illegal abbrev sep - ignore-words &optional downcase) + nwords maxchar illegal abbrev sep + ignore-words &optional downcase) "Convert a string (a sentence) to something shorter. SPLIT-RE is the regular expression used to split the string into words. ILLEGAL-RE matches characters which are illegal in the final string. @@ -2159,14 +2172,14 @@ SEP String separating different words in the output string. IGNORE-WORDS List of words which should be removed from the string." (let* ((words0 (split-string string (or split-re "[ \t\n\r]"))) - (reftex-label-illegal-re (or illegal-re "\000")) - (abbrev-re (concat - "\\`\\(" - (make-string (nth 0 reftex-abbrev-parameters) ?.) - "[" (nth 2 reftex-abbrev-parameters) "]*" - "\\)" - "[" (nth 3 reftex-abbrev-parameters) "]" - (make-string (1- (nth 1 reftex-abbrev-parameters)) ?.))) + (reftex-label-illegal-re (or illegal-re "\000")) + (abbrev-re (concat + "\\`\\(" + (make-string (nth 0 reftex-abbrev-parameters) ?.) + "[" (nth 2 reftex-abbrev-parameters) "]*" + "\\)" + "[" (nth 3 reftex-abbrev-parameters) "]" + (make-string (1- (nth 1 reftex-abbrev-parameters)) ?.))) words word) ;; Remove words from the ignore list or with funny characters @@ -2186,21 +2199,21 @@ IGNORE-WORDS List of words which should be removed from the string." ;; Restrict number of words (if (> (length words) nwords) (setcdr (nthcdr (1- nwords) words) nil)) - + ;; First, try to use all words (setq string (mapconcat 'identity words sep)) - + ;; Abbreviate words if enforced by user settings or string length (if (or (eq t abbrev) (and abbrev (> (length string) maxchar))) (setq words (mapcar - (lambda (w) (if (string-match abbrev-re w) - (if dot - (concat (match-string 1 w) ".") - (match-string 1 w)) - w)) + (lambda (w) (if (string-match abbrev-re w) + (if dot + (concat (match-string 1 w) ".") + (match-string 1 w)) + w)) words) string (mapconcat 'identity words sep))) @@ -2250,47 +2263,47 @@ IGNORE-WORDS List of words which should be removed from the string." (and (reftex-use-fonts) (or (eq t reftex-refontify-context) (and (eq 1 reftex-refontify-context) - ;; Test of we use the font-lock version of x-symbol - (and (featurep 'x-symbol-tex) (not (boundp 'x-symbol-mode))))))) + ;; Test of we use the font-lock version of x-symbol + (and (featurep 'x-symbol-tex) (not (boundp 'x-symbol-mode))))))) (defvar font-lock-defaults-computed) (defun reftex-fontify-select-label-buffer (parent-buffer) ;; Fontify the `*RefTeX Select*' buffer. Buffer is temporarily renamed to ;; start with none-SPC char, beacuse Font-Lock otherwise refuses operation. (run-hook-with-args 'reftex-pre-refontification-functions - parent-buffer 'reftex-ref) + parent-buffer 'reftex-ref) (let* ((oldname (buffer-name)) - (newname (concat "Fontify-me-" oldname))) + (newname (concat "Fontify-me-" oldname))) (unwind-protect - (progn - ;; Rename buffer temporarily to start w/o space (because of font-lock) - (rename-buffer newname t) - (cond - ((fboundp 'font-lock-default-fontify-region) - ;; Good: we have the indirection functions - (set (make-local-variable 'font-lock-fontify-region-function) - 'reftex-select-font-lock-fontify-region) - (let ((major-mode 'latex-mode)) - (font-lock-mode 1))) - ((fboundp 'font-lock-set-defaults-1) - ;; Looks like the XEmacs font-lock stuff. - ;; FIXME: this is still kind of a hack, but it works. - (set (make-local-variable 'font-lock-keywords) nil) - (let ((major-mode 'latex-mode) - (font-lock-defaults-computed nil)) - (font-lock-set-defaults-1) - (reftex-select-font-lock-fontify-region (point-min) (point-max)))) - (t - ;; Oops? - (message "Sorry: cannot refontify RefTeX Select buffer.")))) + (progn + ;; Rename buffer temporarily to start w/o space (because of font-lock) + (rename-buffer newname t) + (cond + ((fboundp 'font-lock-default-fontify-region) + ;; Good: we have the indirection functions + (set (make-local-variable 'font-lock-fontify-region-function) + 'reftex-select-font-lock-fontify-region) + (let ((major-mode 'latex-mode)) + (font-lock-mode 1))) + ((fboundp 'font-lock-set-defaults-1) + ;; Looks like the XEmacs font-lock stuff. + ;; FIXME: this is still kind of a hack, but it works. + (set (make-local-variable 'font-lock-keywords) nil) + (let ((major-mode 'latex-mode) + (font-lock-defaults-computed nil)) + (font-lock-set-defaults-1) + (reftex-select-font-lock-fontify-region (point-min) (point-max)))) + (t + ;; Oops? + (message "Sorry: cannot refontify RefTeX Select buffer.")))) (rename-buffer oldname)))) (defun reftex-select-font-lock-fontify-region (beg end &optional loudly) ;; Fontify a region, but only lines starting with a dot. (let ((func (if (fboundp 'font-lock-default-fontify-region) - 'font-lock-default-fontify-region - 'font-lock-fontify-region)) - beg1 end1) + 'font-lock-default-fontify-region + 'font-lock-fontify-region)) + beg1 end1) (goto-char beg) (while (re-search-forward "^\\." end t) (setq beg1 (point) end1 (progn (skip-chars-forward "^\n") (point))) @@ -2309,9 +2322,9 @@ IGNORE-WORDS List of words which should be removed from the string." (let (face) (catch 'exit (while (setq face (pop faces)) - (if (featurep 'xemacs) - (if (find-face face) (throw 'exit face)) - (if (facep face) (throw 'exit face))))))) + (if (featurep 'xemacs) + (if (find-face face) (throw 'exit face)) + (if (facep face) (throw 'exit face))))))) ;; Highlighting uses overlays. For XEmacs, we need the emulation. (if (featurep 'xemacs) (require 'overlay)) @@ -2321,14 +2334,14 @@ IGNORE-WORDS List of words which should be removed from the string." ;; Initialize the overlays (aset reftex-highlight-overlays 0 (make-overlay 1 1)) -(overlay-put (aref reftex-highlight-overlays 0) - 'face 'highlight) +(overlay-put (aref reftex-highlight-overlays 0) + 'face 'highlight) (aset reftex-highlight-overlays 1 (make-overlay 1 1)) (overlay-put (aref reftex-highlight-overlays 1) - 'face reftex-cursor-selected-face) + 'face reftex-cursor-selected-face) (aset reftex-highlight-overlays 2 (make-overlay 1 1)) (overlay-put (aref reftex-highlight-overlays 2) - 'face reftex-cursor-selected-face) + 'face reftex-cursor-selected-face) ;; Two functions for activating and deactivation highlight overlays (defun reftex-highlight (index begin end &optional buffer) @@ -2346,30 +2359,30 @@ IGNORE-WORDS List of words which should be removed from the string." ;;; ========================================================================= ;;; -;;; Keybindings +;;; Keybindings ;; The default bindings in the mode map. (loop for x in '(("\C-c=" . reftex-toc) - ("\C-c-" . reftex-toc-recenter) - ("\C-c(" . reftex-label) - ("\C-c)" . reftex-reference) - ("\C-c[" . reftex-citation) - ("\C-c<" . reftex-index) - ("\C-c>" . reftex-display-index) - ("\C-c/" . reftex-index-selection-or-word) - ("\C-c\\" . reftex-index-phrase-selection-or-word) - ("\C-c|" . reftex-index-visit-phrases-buffer) - ("\C-c&" . reftex-view-crossref)) + ("\C-c-" . reftex-toc-recenter) + ("\C-c(" . reftex-label) + ("\C-c)" . reftex-reference) + ("\C-c[" . reftex-citation) + ("\C-c<" . reftex-index) + ("\C-c>" . reftex-display-index) + ("\C-c/" . reftex-index-selection-or-word) + ("\C-c\\" . reftex-index-phrase-selection-or-word) + ("\C-c|" . reftex-index-visit-phrases-buffer) + ("\C-c&" . reftex-view-crossref)) do (define-key reftex-mode-map (car x) (cdr x))) ;; Bind `reftex-mouse-view-crossref' only when the key is still free (if (featurep 'xemacs) (unless (key-binding [(shift button2)]) - (define-key reftex-mode-map [(shift button2)] - 'reftex-mouse-view-crossref)) + (define-key reftex-mode-map [(shift button2)] + 'reftex-mouse-view-crossref)) (unless (key-binding [(shift mouse-2)]) - (define-key reftex-mode-map [(shift mouse-2)] + (define-key reftex-mode-map [(shift mouse-2)] 'reftex-mouse-view-crossref))) ;; Bind `reftex-view-crossref-from-bibtex' in BibTeX mode map @@ -2380,14 +2393,14 @@ IGNORE-WORDS List of words which should be removed from the string." ;; If the user requests so, she can have a few more bindings: (when reftex-extra-bindings (loop for x in - '(("\C-ct" . reftex-toc) - ("\C-cl" . reftex-label) - ("\C-cr" . reftex-reference) - ("\C-cc" . reftex-citation) - ("\C-cv" . reftex-view-crossref) - ("\C-cg" . reftex-grep-document) - ("\C-cs" . reftex-search-document)) - do (define-key reftex-mode-map (car x) (cdr x)))) + '(("\C-ct" . reftex-toc) + ("\C-cl" . reftex-label) + ("\C-cr" . reftex-reference) + ("\C-cc" . reftex-citation) + ("\C-cv" . reftex-view-crossref) + ("\C-cg" . reftex-grep-document) + ("\C-cs" . reftex-search-document)) + do (define-key reftex-mode-map (car x) (cdr x)))) ;;; ========================================================================= ;;; @@ -2464,23 +2477,23 @@ IGNORE-WORDS List of words which should be removed from the string." :style toggle :selected reftex-plug-into-AUCTeX]) ("Reference Style" ["Default" (setq reftex-vref-is-default nil - reftex-fref-is-default nil) - :style radio :selected (not (or reftex-vref-is-default - reftex-fref-is-default))] + reftex-fref-is-default nil) + :style radio :selected (not (or reftex-vref-is-default + reftex-fref-is-default))] ["Varioref" (setq reftex-vref-is-default t - reftex-fref-is-default nil) + reftex-fref-is-default nil) :style radio :selected reftex-vref-is-default] ["Fancyref" (setq reftex-fref-is-default t - reftex-vref-is-default nil) + reftex-vref-is-default nil) :style radio :selected reftex-fref-is-default]) ("Citation Style" ,@(mapcar (lambda (x) - (vector - (capitalize (symbol-name (car x))) - (list 'reftex-set-cite-format (list 'quote (car x))) - :style 'radio :selected - (list 'eq (list 'reftex-get-cite-format) (list 'quote (car x))))) + (vector + (capitalize (symbol-name (car x))) + (list 'reftex-set-cite-format (list 'quote (car x))) + :style 'radio :selected + (list 'eq (list 'reftex-get-cite-format) (list 'quote (car x))))) reftex-cite-format-builtin) "--" "Sort Database Matches" @@ -2495,13 +2508,13 @@ IGNORE-WORDS List of words which should be removed from the string." ("Index Style" ,@(mapcar (lambda (x) - (vector - (capitalize (symbol-name (car x))) - (list 'reftex-add-index-macros (list 'list (list 'quote (car x)))) - :style 'radio :selected - (list 'memq (list 'quote (car x)) - (list 'get 'reftex-docstruct-symbol - (list 'quote 'reftex-index-macros-style))))) + (vector + (capitalize (symbol-name (car x))) + (list 'reftex-add-index-macros (list 'list (list 'quote (car x)))) + :style 'radio :selected + (list 'memq (list 'quote (car x)) + (list 'get 'reftex-docstruct-symbol + (list 'quote 'reftex-index-macros-style))))) reftex-index-macros-builtin)) "--" ["Reset RefTeX Mode" reftex-reset-mode t] @@ -2509,7 +2522,7 @@ IGNORE-WORDS List of words which should be removed from the string." ("Customize" ["Browse RefTeX Group" reftex-customize t] "--" - ["Build Full Customize Menu" reftex-create-customize-menu + ["Build Full Customize Menu" reftex-create-customize-menu (fboundp 'customize-menu-create)]) ("Documentation" ["Info" reftex-info t] @@ -2525,17 +2538,17 @@ IGNORE-WORDS List of words which should be removed from the string." (interactive) (if (fboundp 'customize-menu-create) (progn - (easy-menu-change - '("Ref") "Customize" - `(["Browse RefTeX group" reftex-customize t] - "--" - ,(customize-menu-create 'reftex) - ["Set" Custom-set t] - ["Save" Custom-save t] - ["Reset to Current" Custom-reset-current t] - ["Reset to Saved" Custom-reset-saved t] - ["Reset to Standard Settings" Custom-reset-standard t])) - (message "\"Ref\"-menu now contains full customization menu")) + (easy-menu-change + '("Ref") "Customize" + `(["Browse RefTeX group" reftex-customize t] + "--" + ,(customize-menu-create 'reftex) + ["Set" Custom-set t] + ["Save" Custom-save t] + ["Reset to Current" Custom-reset-current t] + ["Reset to Saved" Custom-reset-saved t] + ["Reset to Standard Settings" Custom-reset-standard t])) + (message "\"Ref\"-menu now contains full customization menu")) (error "Cannot expand menu (outdated version of cus-edit.el)"))) (defun reftex-show-commentary () @@ -2563,8 +2576,9 @@ With optional NODE, go directly to that node." ;;; That's it! ---------------------------------------------------------------- (setq reftex-tables-dirty t) ; in case this file is evaluated by hand -(provide 'reftex) +(provide 'reftex) ;;;============================================================================ +;;; arch-tag: 49e0da4e-bd5e-4cfc-a717-fb444fccb9e6 ;;; reftex.el ends here diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index c62721270f..584056bf30 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -1952,4 +1952,5 @@ Can be used as a value for `html-mode-hook'." (provide 'sgml-mode) +;;; arch-tag: 9675da94-b7f9-4bda-ad19-73ed7b4fb401 ;;; sgml-mode.el ends here diff --git a/lisp/textmodes/spell.el b/lisp/textmodes/spell.el index 1923c867fb..c6289819c8 100644 --- a/lisp/textmodes/spell.el +++ b/lisp/textmodes/spell.el @@ -163,4 +163,5 @@ for example, \"word\"." (provide 'spell) +;;; arch-tag: 7eabb848-9c76-431a-bcdb-0e0592d2db04 ;;; spell.el ends here diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 2edf604ecb..93ea3cc0c1 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -5,7 +5,7 @@ ;; Keywords: wp, convenience ;; Author: Takaaki Ota ;; Created: Sat Jul 08 2000 13:28:45 (PST) -;; Revised: jue jun 05 2003 22:00:02 (Hora de verano romance) +;; Revised: Tue Dec 09 2003 14:36:50 (PST) ;; This file is part of GNU Emacs. @@ -837,6 +837,9 @@ simply by any key input." :type 'hook :group 'table-hooks) +(defcustom table-yank-handler '(nil nil t nil) + "*yank-handler for table.") + (setplist 'table-disable-incompatibility-warning nil) (defvar table-disable-menu (null (and (locate-library "easymenu") @@ -5228,7 +5231,8 @@ and the right cell border character." (defun table--put-cell-indicator-property (beg end &optional object) "Put cell property which indicates that the location is within a table cell." - (put-text-property beg end 'table-cell t object)) + (put-text-property beg end 'table-cell t object) + (put-text-property beg end 'yank-handler table-yank-handler object)) (defun table--put-cell-face-property (beg end &optional object) "Put cell face property." @@ -5587,4 +5591,5 @@ It returns COLUMN unless STR contains some wide characters." ;; End: *** ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; arch-tag: 0d69b03e-aa5f-4e72-8806-5727217617e0 ;;; table.el ends here diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 0dba467e89..75a064c895 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1,6 +1,6 @@ ;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands -*- coding: utf-8 -*- -;; Copyright (C) 1985,86,89,92,94,95,96,97,98,1999,2002,2003 +;; Copyright (C) 1985,86,89,92,94,95,96,97,98,1999,2002,03,2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -196,7 +196,7 @@ use." :group 'tex-view) ;;;###autoload -(defcustom tex-dvi-view-command '(if (eq window-system 'x) \"xdvi\" \"dvi2tty * | cat -s\") +(defcustom tex-dvi-view-command '(if (eq window-system 'x) "xdvi" "dvi2tty * | cat -s") "*Command used by \\[tex-view] to display a `.dvi' file. If it is a string, that specifies the command directly. If this string contains an asterisk (`*'), that is replaced by the file name; @@ -902,7 +902,7 @@ subshell is initiated, `tex-shell-hook' is run." (set (make-local-variable 'tex-start-of-header) "\\\\document\\(style\\|class\\)") (set (make-local-variable 'tex-end-of-header) "\\\\begin\\s-*{document}") - (set (make-local-variable 'tex-trailer) "\\end\\s-*{document}\n") + (set (make-local-variable 'tex-trailer) "\\end{document}\n") ;; A line containing just $$ is treated as a paragraph separator. ;; A line starting with $$ starts a paragraph, ;; but does not separate paragraphs if it has more stuff on it. @@ -1446,6 +1446,8 @@ Mark is left at original location." ;; The utility functions: (define-derived-mode tex-shell shell-mode "TeX-Shell" + (set (make-local-variable 'compilation-parse-errors-function) + 'tex-compilation-parse-errors) (compilation-shell-minor-mode t)) ;;;###autoload @@ -1584,6 +1586,7 @@ If NOT-ALL is non-nil, save the `.dvi' file." " " (if (< 0 (length tex-start-commands)) (shell-quote-argument tex-start-commands)) " %f") t "%r.dvi") + ("yap %r &" "%r.dvi") ("xdvi %r &" "%r.dvi") ("advi %r &" "%r.dvi") ("bibtex %r" "%r.aux" "%r.bbl") @@ -1592,6 +1595,7 @@ If NOT-ALL is non-nil, save the `.dvi' file." ("dvipdfm %r" "%r.dvi" "%r.pdf") ("dvipdf %r" "%r.dvi" "%r.pdf") ("dvips %r" "%r.dvi" "%r.ps") + ("ps2pdf %r.ps" "%r.ps" "%r.pdf") ("gv %r.ps &" "%r.ps") ("gv %r.pdf &" "%r.pdf") ("xpdf %r.pdf &" "%r.pdf") @@ -1670,7 +1674,8 @@ of the current buffer." (tex-guess-main-file 'sub) ;; (tex-guess-main-file t) buffer-file-name))))))) - (if (file-exists-p file) file (concat file ".tex")))) + (if (or (file-exists-p file) (string-match "\\.tex\\'" file)) + file (concat file ".tex")))) (defun tex-summarize-command (cmd) (if (not (stringp cmd)) "" @@ -1717,7 +1722,9 @@ FILE is typically the output DVI or PDF file." (uptodate t)) (while (and files uptodate) (let ((f (pop files))) - (if (file-directory-p f) + (if (and (file-directory-p f) + ;; Avoid infinite loops. + (not (file-symlink-p f))) (unless (string-match ignored-dirs-re f) (setq files (nconc (directory-files f t tex-input-files-re) @@ -1874,8 +1881,6 @@ FILE is typically the output DVI or PDF file." (let (shell-dirtrack-verbose) (tex-send-command tex-shell-cd-command dir))) (with-current-buffer (process-buffer (tex-send-command cmd)) - (make-local-variable 'compilation-parse-errors-function) - (setq compilation-parse-errors-function 'tex-compilation-parse-errors) (setq compilation-last-buffer (current-buffer)) (compilation-forget-errors) ;; Don't parse previous compilations. @@ -1922,7 +1927,7 @@ for the error messages." end-of-error (match-end 0))) (re-search-forward "^l\\.\\([0-9]+\\) \\(\\.\\.\\.\\)?\\(.*\\)$" nil 'move)) - (let* ((this-error (set-marker (make-marker) begin-of-error)) + (let* ((this-error (copy-marker begin-of-error)) (linenum (string-to-int (match-string 1))) (error-text (regexp-quote (match-string 3))) (filename @@ -2337,15 +2342,15 @@ There might be text before point." (+ indent (current-column) tex-indent-item)) (t (let ((col (current-column))) - (if (not (eq (char-syntax char) ?\()) + (if (or (null char) (not (eq (char-syntax char) ?\())) ;; If the first char was not an open-paren, there's ;; a risk that this is really not an argument to the ;; macro at all. - (+ indent col) - (forward-sexp 1) - (if (< (line-end-position) - (save-excursion (forward-comment (point-max)) - (point))) + (+ indent col) + (forward-sexp 1) + (if (< (line-end-position) + (save-excursion (forward-comment (point-max)) + (point))) ;; we're indenting the first argument. (min (current-column) (+ tex-indent-arg col)) (skip-syntax-forward " ") @@ -2412,4 +2417,5 @@ There might be text before point." (provide 'tex-mode) +;;; arch-tag: c0a680b1-63aa-4547-84b9-4193c29c0080 ;;; tex-mode.el ends here diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index 59adecc2ed..3e79d18a10 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el @@ -134,6 +134,11 @@ Info-split to do these manually." (defvar texinfo-region-buffer-name "*Info Region*" "*Name of the temporary buffer used by \\[texinfo-format-region].") +(defvar texinfo-pre-format-hook nil + "Hook called before the conversion of the Texinfo file to Info format. +The functions on this hook are called with argument BUFFER, the buffer +containing the Texinfo file.") + ;; These come from tex-mode.el. (defvar tex-start-of-header) (defvar tex-end-of-header) @@ -215,6 +220,7 @@ converted to Info is stored in a temporary buffer." input-buffer (max region-beginning header-end) region-end) + (run-hook-with-args 'texinfo-pre-format-hook input-buffer) ;; Make sure region ends in a newline. (or (= (preceding-char) ?\n) (insert "\n")) @@ -381,6 +387,7 @@ if large. You can use Info-split to do this manually." (set-syntax-table texinfo-format-syntax-table) (insert-buffer-substring input-buffer) + (run-hook-with-args 'texinfo-pre-format-hook input-buffer) (message "Converting %s to Info format..." (buffer-name input-buffer)) ;; Insert @include files so `texinfo-raise-lower-sections' can @@ -4334,4 +4341,5 @@ For example, invoke ;;; Place `provide' at end of file. (provide 'texinfmt) +;;; arch-tag: 1e8d9a2d-bca0-40a0-ac6c-dab01bc6f725 ;;; texinfmt.el ends here diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index 37da88410f..8e5b94114a 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -1,11 +1,11 @@ ;;; texinfo.el --- major mode for editing Texinfo files -;; Copyright (C) 1985,88,89,90,91,92,93,96,97,2000,01,03 +;; Copyright (C) 1985,88,89,90,91,92,93,96,97,2000,01,03,04 ;; Free Software Foundation, Inc. ;; Author: Robert J. Chassell ;; Date: [See date below for texinfo-version] -;; Maintainer: bug-texinfo@gnu.org +;; Maintainer: FSF ;; Keywords: maint, tex, docs ;; This file is part of GNU Emacs. @@ -59,6 +59,12 @@ :type 'string :group 'texinfo) +(defcustom texinfo-mode-hook nil + "Normal hook run when entering Texinfo mode." + :type 'hook + :options '(turn-on-auto-fill flyspell-mode) + :group 'texinfo) + ;;; Autoloads: @@ -310,7 +316,7 @@ chapter." (defvar texinfo-imenu-generic-expression '((nil "^@\\(node\\|anchor\\)[ \t]+\\([^,\n]*\\)" 2) ("Chapters" "^@chapter[ \t]+\\(.*\\)$" 1)) - "Imenu generic expression for TexInfo mode. See `imenu-generic-expression'.") + "Imenu generic expression for Texinfo mode. See `imenu-generic-expression'.") (defvar texinfo-font-lock-syntactic-keywords '(("\\(@\\)c\\(omment\\)?\\>" (1 "<")) @@ -330,11 +336,11 @@ chapter." "macro" "menu" "multitable" "quotation" "smalldisplay" "smallexample" "smallformat" "smalllisp" "table" "tex" "titlepage" "verbatim" "vtable") - "List of TeXinfo environments.") + "List of Texinfo environments.") (defconst texinfo-environment-regexp (concat "^@" (regexp-opt (cons "end" texinfo-environments) t) "\\>") - "Regexp for environment-like TexInfo list commands. + "Regexp for environment-like Texinfo list commands. Subexpression 1 is what goes into the corresponding `@end' statement.") (defface texinfo-heading-face @@ -367,7 +373,7 @@ Subexpression 1 is what goes into the corresponding `@end' statement.") ;; 1 (texinfo-clone-environment (match-beginning 1) (match-end 1)) keep) (,(concat "^@" (regexp-opt (mapcar 'car texinfo-section-list) t) ".*\n") 0 texinfo-heading-face t)) - "Additional expressions to highlight in TeXinfo mode.") + "Additional expressions to highlight in Texinfo mode.") (defun texinfo-clone-environment (start end) (let ((endp nil)) @@ -670,7 +676,7 @@ Puts point on a blank line between them." (defvar texinfo-enable-quote-macros "@\\(code\\|samp\\|kbd\\)\\>") (defvar texinfo-enable-quote-envs '("example\\>" "lisp\\>")) (defun texinfo-insert-quote (&optional arg) - "Insert the appropriate quote mark for TeXinfo. + "Insert the appropriate quote mark for Texinfo. Usually inserts the value of `texinfo-open-quote' (normally ``) or `texinfo-close-quote' (normally ''), depending on the context. With prefix argument or inside @code or @example, inserts a plain \"." @@ -797,10 +803,18 @@ The default is not to surround any existing words with the braces." (texinfo-insert-@-with-arg "file" arg)) (defun texinfo-insert-@item () - "Insert the string `@item' in a Texinfo buffer." + "Insert the string `@item' in a Texinfo buffer. +If in a table defined by @table, follow said string with a space. +Otherwise, follow with a newline." (interactive) - (insert "@item") - (newline)) + (insert "@item" + (if (equal (ignore-errors + (save-excursion + (texinfo-last-unended-begin) + (match-string 1))) + "table") + ? ;space + ?\n))) (defun texinfo-insert-@kbd (&optional arg) "Insert a `@kbd{...}' command in a Texinfo buffer. @@ -898,9 +912,8 @@ to jump to the corresponding spot in the Texinfo source file." ;; Second, create and format an *Occur* buffer (save-excursion (goto-char (point-min)) - (if nodes-too - (occur (concat "^@node\\>\\|" outline-regexp)) - (occur outline-regexp))) + (occur (concat "^\\(?:" (if nodes-too "@node\\>\\|") + outline-regexp "\\)"))) (pop-to-buffer "*Occur*") (goto-char (point-min)) (let ((inhibit-read-only t)) @@ -1039,4 +1052,5 @@ You are prompted for the job number (use a number shown by a previous (provide 'texinfo) +;;; arch-tag: 005d7c38-43b9-4b7d-aa1d-aea69bae73e1 ;;; texinfo.el ends here diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index 43a6f0d0ac..6fac040c28 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el @@ -1,6 +1,6 @@ ;;; texnfo-upd.el --- utilities for updating nodes and menus in Texinfo files -;; Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003 Free Software Foundation, Inc. ;; Author: Robert J. Chassell ;; Maintainer: bug-texinfo@gnu.org @@ -618,10 +618,11 @@ Point must be located just after the node name. Point left before description. Single argument, END-OF-MENU, is position limiting search." (skip-chars-forward "[:.,\t\n ]+") ;; don't copy a carriage return at line beginning with asterisk! + ;; don't copy @detailmenu or @end menu as descriptions! ;; do copy a description that begins with an `@'! ;; !! Known bug: does not copy descriptions starting with ^|\{?* etc. (if (and (looking-at "\\(\\w+\\|@\\)") - (not (looking-at "\\(^\\* \\|^@end menu\\)"))) + (not (looking-at "\\(^\\* \\|^@detailmenu\\|^@end menu\\)"))) (buffer-substring (point) (save-excursion @@ -1782,7 +1783,13 @@ Requirements: * this node must be the first node in the included file, * each highest hierarchical level node must be of the same type. -Thus, normally, each included file contains one, and only one, chapter." +Thus, normally, each included file contains one, and only one, chapter. + +However, when an included file does not have any node lines in +it, this command does not try to create a menu entry for it. +Consequently, you can include any file, such as a version or an +update file without node lines, not just files that are +chapters." ;; The menu-list has the form: ;; @@ -1795,25 +1802,34 @@ Thus, normally, each included file contains one, and only one, chapter." ;; description slot of a menu as a description. (let ((case-fold-search t) - menu-list next-node-name previous-node-name) + menu-list next-node-name previous-node-name files-with-node-lines) - ;; Find the name of the first node of the first included file. - (set-buffer (find-file-noselect (car (cdr files)))) + ;; Create a new list of included files that only have node lines + (while files + (set-buffer (find-file-noselect (car files))) + (widen) + (goto-char (point-min)) + (when (re-search-forward "^@node" nil t) + (setq files-with-node-lines (cons (car files) files-with-node-lines))) + (setq files (cdr files))) + (setq files-with-node-lines (nreverse files-with-node-lines)) + + ;; Find the name of the first node in a subsequent file + ;; and copy it into the variable next-node-name + (set-buffer (find-file-noselect (car (cdr files-with-node-lines)))) (widen) (goto-char (point-min)) - (if (not (re-search-forward "^@node" nil t)) - (error "No `@node' line found in %s" (buffer-name))) (beginning-of-line) (texinfo-check-for-node-name) (setq next-node-name (texinfo-copy-node-name)) - (push (cons next-node-name (prog1 "" (forward-line 1))) ;; Use following to insert section titles automatically. ;; (texinfo-copy-next-section-title) menu-list) ;; Go to outer file - (set-buffer (find-file-noselect (pop files))) + ;; `pop' is analogous to (prog1 (car PLACE) (setf PLACE (cdr PLACE))) + (set-buffer (find-file-noselect (pop files-with-node-lines))) (goto-char (point-min)) (if (not (re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)" nil t)) (error "This buffer needs a Top node")) @@ -1824,18 +1840,16 @@ Thus, normally, each included file contains one, and only one, chapter." (beginning-of-line) (setq previous-node-name "Top") - (while files + (while files-with-node-lines - (if (not (cdr files)) + (if (not (cdr files-with-node-lines)) ;; No next file (setq next-node-name "") ;; Else, ;; find the name of the first node in the next file. - (set-buffer (find-file-noselect (car (cdr files)))) + (set-buffer (find-file-noselect (car (cdr files-with-node-lines)))) (widen) (goto-char (point-min)) - (if (not (re-search-forward "^@node" nil t)) - (error "No `@node' line found in %s" (buffer-name))) (beginning-of-line) (texinfo-check-for-node-name) (setq next-node-name (texinfo-copy-node-name)) @@ -1845,10 +1859,8 @@ Thus, normally, each included file contains one, and only one, chapter." menu-list)) ;; Go to node to be updated. - (set-buffer (find-file-noselect (car files))) + (set-buffer (find-file-noselect (car files-with-node-lines))) (goto-char (point-min)) - (if (not (re-search-forward "^@node" nil t)) - (error "No `@node' line found in %s" (buffer-name))) (beginning-of-line) ;; Update other menus and nodes if requested. @@ -1862,7 +1874,7 @@ Thus, normally, each included file contains one, and only one, chapter." (beginning-of-line) (setq previous-node-name (texinfo-copy-node-name)) - (setq files (cdr files))) + (setq files-with-node-lines (cdr files-with-node-lines))) (nreverse menu-list))) (defun texinfo-multi-files-insert-main-menu (menu-list) @@ -2039,4 +2051,5 @@ chapter." ;; Place `provide' at end of file. (provide 'texnfo-upd) +;;; arch-tag: d21613a5-c32f-43f4-8af4-bfb1e7455842 ;;; texnfo-upd.el ends here diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el index 1d92b26b13..d20a67db14 100644 --- a/lisp/textmodes/text-mode.el +++ b/lisp/textmodes/text-mode.el @@ -87,7 +87,7 @@ Turning on Paragraph-Indent Text mode runs the normal hooks "Minor mode for editing text, with leading spaces starting a paragraph. In this mode, you do not need blank lines between paragraphs when the first line of the following paragraph starts with whitespace, as with -`paragraph-indent-mode'. +`paragraph-indent-text-mode'. Turning on Paragraph-Indent minor mode runs the normal hook `paragraph-indent-text-mode-hook'." (interactive) @@ -178,4 +178,5 @@ The argument NLINES says how many lines to center." (setq nlines (1+ nlines)) (forward-line -1))))) +;;; arch-tag: a07ccaad-da13-4d7b-9c61-cd04f5926aab ;;; text-mode.el ends here diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el index 27452dc98d..c8dcc4dba1 100644 --- a/lisp/textmodes/tildify.el +++ b/lisp/textmodes/tildify.el @@ -354,4 +354,5 @@ further questions)." ;; coding: iso-latin-2 ;; End: +;;; arch-tag: fc9b05a6-7355-4639-8170-dcf57853ba22 ;;; tildify.el ends here diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index 1e47a65a52..71687f431c 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el @@ -639,4 +639,5 @@ When autoscrolling is turned on, this also realigns the two buffers." (provide 'two-column) +;;; arch-tag: 2021b5ab-d3a4-4a8c-a21c-1936b0f9e6b1 ;;; two-column.el ends here diff --git a/lisp/textmodes/underline.el b/lisp/textmodes/underline.el index d6f08b5dee..18f86eb55d 100644 --- a/lisp/textmodes/underline.el +++ b/lisp/textmodes/underline.el @@ -62,4 +62,5 @@ which specify the range to operate on." (provide 'underline) +;;; arch-tag: e7b48582-c3ea-4386-987a-87415f3c372a ;;; underline.el ends here diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 4dd5686291..eee7b85374 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -413,4 +413,5 @@ Signal an error if the entire string was not used." ;;;###autoload (defun list-at-point () (form-at-point 'list 'listp)) +;;; arch-tag: bb65a163-dae2-4055-aedc-fe11f497f698 ;;; thingatpt.el ends here diff --git a/lisp/thumbs.el b/lisp/thumbs.el new file mode 100644 index 0000000000..cc692c1f97 --- /dev/null +++ b/lisp/thumbs.el @@ -0,0 +1,737 @@ +;;; thumbs.el --- Thumbnails previewer for images files +;;; +;; Author: Jean-Philippe Theberge +;; +;; Thanks: Alex Schroeder for maintaining the package at some time +;; The peoples at #emacs@freenode.net for numerous help +;; RMS for emacs and the GNU project. +;; +;; Keywords: Multimedia + +(defconst thumbs-version "2.0") + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This package create two new mode: thumbs-mode and +;; thumbs-view-image-mode. It is used for images browsing and viewing +;; from within emacs. Minimal image manipulation functions are also +;; available via external programs. +;; +;; The 'convert' program from 'ImageMagick' +;; [URL:http://www.imagemagick.org/] is required. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; CHANGELOG +;; +;; This is version 2.0 +;; +;; USAGE +;; +;; Type M-x thumbs RET DIR RET to view the directory DIR in Thumbs mode. +;; That should be a directory containing image files. +;; from dired, C-t m enter in thumbs-mode with all marked files +;; C-t a enter in thumbs-mode with all files in current-directory +;; In thumbs-mode, pressing on a image will bring you in image view mode +;; for that image. C-h m will give you a list of available keybinding. + +;;; History: +;; + +;;; Code: + +(require 'dired) + +;; Abort if in-line imaging isn't supported (i.e. Emacs-20.7) + +(when (not (display-images-p)) + (error "Your Emacs version (%S) doesn't support in-line images, +was not compiled with image support or is run in console mode. +Upgrade to Emacs 21.1 or newer, compile it with image support +or use a window-system" + emacs-version)) + +;; CUSTOMIZATIONS + +(defgroup thumbs nil + "Thumbnails previewer." + :group 'multimedia) + +(defcustom thumbs-thumbsdir + (expand-file-name "~/.emacs-thumbs") + "*Directory to store thumbnails." + :type 'directory + :group 'thumbs) + +(defcustom thumbs-geometry "100x100" + "*Size of thumbnails." + :type 'string + :group 'thumbs) + +(defcustom thumbs-per-line 5 + "*Number of thumbnails per line to show in directory." + :type 'string + :group 'thumbs) + +(defcustom thumbs-thumbsdir-max-size 50000000 + "Max size for thumbnails directory. +When it reach that size (in bytes), a warning is send." + :type 'string + :group 'thumbs) + +(defcustom thumbs-conversion-program + (if (equal 'windows-nt system-type) + "convert.exe" + (or (executable-find "convert") + "/usr/X11R6/bin/convert")) + "*Name of conversion program for thumbnails generation. +It must be 'convert'." + :type 'string + :group 'thumbs) + +(defcustom thumbs-setroot-command + "xloadimage -onroot -fullscreen *" + "Command to set the root window." + :type 'string + :group 'thumbs) + +(defcustom thumbs-relief 5 + "*Size of button-like border around thumbnails." + :type 'string + :group 'thumbs) + +(defcustom thumbs-margin 2 + "*Size of the margin around thumbnails. +This is where you see the cursor." + :type 'string + :group 'thumbs) + +(defcustom thumbs-thumbsdir-auto-clean t + "If set, delete older file in the thumbnails directory. +Deletion is done at load time when the directory size is bigger +than 'thumbs-thumbsdir-max-size'." + :type 'boolean + :group 'thumbs) + +(defcustom thumbs-image-resizing-step 10 + "Step by wich to resize image." + :type 'string + :group 'thumbs) + +(defcustom thumbs-temp-dir + "/tmp/" + "Temporary directory to use. +Leaving it to default '/tmp/' can let another user +see some of your images." + :type 'directory + :group 'thumbs) + +(defcustom thumbs-temp-prefix "emacsthumbs" + "Prefix to add to temp files." + :type 'string + :group 'thumbs) + +;; Initialize some variable, for later use. +(defvar thumbs-temp-file + (concat thumbs-temp-dir thumbs-temp-prefix) + "Temporary filesname for images.") + +(defvar thumbs-current-tmp-filename + nil + "Temporary filename of current image.") +(defvar thumbs-current-image-filename + nil + "Filename of current image.") +(defvar thumbs-current-image-size + nil + "Size of current image.") +(defvar thumbs-image-num + nil + "Number of current image.") +(defvar thumbs-current-dir + nil + "Current directory.") +(defvar thumbs-markedL + nil + "List of marked files.") + +;; Make sure auto-image-file-mode is ON. +(auto-image-file-mode t) + +;; Create the thumbs directory if it does not exists. +(setq thumbs-thumbsdir (expand-file-name thumbs-thumbsdir)) + +(when (not (file-directory-p thumbs-thumbsdir)) + (progn + (make-directory thumbs-thumbsdir) + (message "Creating thumbnails directory"))) + +(when (not (fboundp 'ignore-errors)) + (defmacro ignore-errors (&rest body) + "Execute FORMS; if anz error occurs, return nil. +Otherwise, return result of last FORM." + (let ((err (thumbs-gensym))) + (list 'condition-case err (cons 'progn body) '(error nil))))) + +(when (not (fboundp 'time-less-p)) + (defun time-less-p (t1 t2) + "Say whether time T1 is less than time T2." + (or (< (car t1) (car t2)) + (and (= (car t1) (car t2)) + (< (nth 1 t1) (nth 1 t2)))))) + +(when (not (fboundp 'caddar)) + (defun caddar (x) + "Return the `car' of the `cdr' of the `cdr' of the `car' of X." + (car (cdr (cdr (car x)))))) + +(defvar thumbs-gensym-counter 0) + +(defun thumbs-gensym (&optional arg) + "Generate a new uninterned symbol. +The name is made by appending a number to PREFIX, default \"Thumbs\"." + (let ((prefix (if (stringp arg) arg "Thumbs")) + (num (if (integerp arg) arg + (prog1 + thumbs-gensym-counter + (setq thumbs-gensym-counter (1+ thumbs-gensym-counter)))))) + (make-symbol (format "%s%d" prefix num)))) + +(defun thumbs-cleanup-thumbsdir () + "Clean the thumbnails directory. +If the total size of all files in 'thumbs-thumbsdir' is bigger than +'thumbs-thumbsdir-max-size', files are deleted until the max size is +reached." + (let* ((filesL + (sort + (mapcar + (lambda (f) + (let ((fattribsL (file-attributes f))) + `(,(nth 4 fattribsL) ,(nth 7 fattribsL) ,f))) + (directory-files thumbs-thumbsdir t (image-file-name-regexp))) + '(lambda (l1 l2) (time-less-p (car l1)(car l2))))) + (dirsize (apply '+ (mapcar (lambda (x) (cadr x)) filesL)))) + (while (> dirsize thumbs-thumbsdir-max-size) + (progn + (message "Deleting file %s" (caddar filesL))) + (delete-file (caddar filesL)) + (setq dirsize (- dirsize (cadar filesL))) + (setq filesL (cdr filesL))))) + +;; Check the thumbsnail directory size and clean it if necessary. +(when thumbs-thumbsdir-auto-clean + (thumbs-cleanup-thumbsdir)) + +(defun thumbs-call-convert (filein fileout action + &optional arg output-format action-prefix) + "Call the convert program. +FILEIN is the input file, +FILEOUT is the output file, +ACTION is the command to send to convert. +Optional argument are: +ARG any arguments to the ACTION command, +OUTPUT-FORMAT is the file format to output, default is jpeg +ACTION-PREFIX is the symbol to place before the ACTION command + (default to '-' but can sometime be '+')." + (let ((command (format "%s %s%s %s \"%s\" \"%s:%s\"" + thumbs-conversion-program + (or action-prefix "-") + action + (or arg "") + filein + (or output-format "jpeg") + fileout))) + (shell-command command))) + +(defun thumbs-increment-image-size-element (n d) + "Increment number N by D percent." + (round (+ n (/ (* d n) 100)))) + +(defun thumbs-decrement-image-size-element (n d) + "Decrement number N by D percent." + (round (- n (/ (* d n) 100)))) + +(defun thumbs-increment-image-size (s) + "Increment S (a cons of width x heigh)." + (cons + (thumbs-increment-image-size-element (car s) + thumbs-image-resizing-step) + (thumbs-increment-image-size-element (cdr s) + thumbs-image-resizing-step))) + +(defun thumbs-decrement-image-size (s) + "Decrement S (a cons of width x heigh)." + (cons + (thumbs-decrement-image-size-element (car s) + thumbs-image-resizing-step) + (thumbs-decrement-image-size-element (cdr s) + thumbs-image-resizing-step))) + +(defun thumbs-resize-image (&optional increment size) + "Resize image in current buffer. +if INCREMENT is set, make the image bigger, else smaller. +Or, alternatively, a SIZE may be specified." + (interactive) + ;; cleaning of old temp file + (ignore-errors + (apply 'delete-file + (directory-files + thumbs-temp-dir t + thumbs-temp-prefix))) + (let ((buffer-read-only nil) + (x (if size + size + (if increment + (thumbs-increment-image-size + thumbs-current-image-size) + (thumbs-decrement-image-size + thumbs-current-image-size)))) + (tmp (format "%s%s.jpg" thumbs-temp-file (thumbs-gensym)))) + (erase-buffer) + (thumbs-call-convert thumbs-current-image-filename + tmp "sample" + (concat (number-to-string (car x)) "x" + (number-to-string (cdr x)))) + (thumbs-insert-image tmp 'jpeg 0) + (setq thumbs-current-tmp-filename tmp))) + +(defun thumbs-resize-interactive (width height) + "Resize Image interactively to specified WIDTH and HEIGHT." + (interactive "nWidth: \nnHeight: ") + (thumbs-resize-image nil (cons width height))) + +(defun thumbs-resize-image-size-down () + "Resize image (smaller)." + (interactive) + (thumbs-resize-image nil)) + +(defun thumbs-resize-image-size-up () + "Resize image (bigger)." + (interactive) + (thumbs-resize-image t)) + +(defun thumbs-subst-char-in-string (orig rep string) + "Replace occurrences of character ORIG with character REP in STRING. +Return the resulting (new) string. -- (defun borowed to Dave Love)" + (let ((string (copy-sequence string)) + (l (length string)) + (i 0)) + (while (< i l) + (if (= (aref string i) orig) + (aset string i rep)) + (setq i (1+ i))) + string)) + +(defun thumbs-thumbname (img) + "Return a thumbnail name for the image IMG." + (concat thumbs-thumbsdir "/" + (thumbs-subst-char-in-string + ?\ ?\_ + (apply + 'concat + (split-string + (expand-file-name img) "/"))))) + +(defun thumbs-make-thumb (img) + "Create the thumbnail for IMG." + (let* ((fn (expand-file-name img)) + (tn (thumbs-thumbname img))) + (if (or (not (file-exists-p tn)) + (not (equal (thumbs-file-size tn) thumbs-geometry))) + (thumbs-call-convert fn tn "sample" thumbs-geometry)) + tn)) + +(defun thumbs-image-type (img) + "Return image type from filename IMG." + (cond ((string-match ".*\\.jpe?g\\'" img) 'jpeg) + ((string-match ".*\\.xpm\\'" img) 'xpm) + ((string-match ".*\\.xbm\\'" img) 'xbm) + ((string-match ".*\\.gif\\'" img) 'gif) + ((string-match ".*\\.bmp\\'" img) 'bmp) + ((string-match ".*\\.png\\'" img) 'png) + ((string-match ".*\\.tiff?\\'" img) 'tiff))) + +(defun thumbs-file-size (img) + (let ((i (image-size (find-image `((:type ,(thumbs-image-type img) :file ,img))) t))) + (concat (number-to-string (round (car i))) + "x" + (number-to-string (round (cdr i)))))) + +;;;###autoload +(defun thumbs-find-thumb (img) + "Display the thumbnail for IMG." + (interactive "f") + (find-file (thumbs-make-thumb img))) + +(defun thumbs-insert-image (img type relief &optional marked) + "Insert image IMG at point. +TYPE and RELIEF will be used in constructing the image; see `image' +in the emacs-lisp manual for further documentation. +if MARKED is non-nil, the image is marked." + (let ((i `(image :type ,type + :file ,img + :relief ,relief + :conversion ,(if marked 'disabled) + :margin ,thumbs-margin))) + (insert-image i) + (setq thumbs-current-image-size + (image-size i t)))) + +(defun thumbs-insert-thumb (img &optional marked) + "Insert the thumbnail for IMG at point. +if MARKED is non-nil, the image is marked" + (thumbs-insert-image + (thumbs-make-thumb img) 'jpeg thumbs-relief marked)) + +(defun thumbs-do-thumbs-insertion (L) + "Insert all thumbs in list L." + (setq thumbs-fileL nil) + (let ((i 0)) + (while L + (when (= 0 (mod (setq i (1+ i)) thumbs-per-line)) + (newline)) + (setq thumbs-fileL (cons (cons (point) + (car L)) + thumbs-fileL)) + (thumbs-insert-thumb (car L) + (member (car L) thumbs-markedL)) + (setq L (cdr L))))) + +(defun thumbs-show-thumbs-list (L &optional buffer-name same-window) + (funcall (if same-window 'switch-to-buffer 'pop-to-buffer) + (or buffer-name "*THUMB-View*")) + (let ((inhibit-read-only t)) + (erase-buffer) + (thumbs-mode) + (make-variable-buffer-local 'thumbs-fileL) + (setq thumbs-fileL nil) + (thumbs-do-thumbs-insertion L) + (goto-char (point-min)) + (setq thumbs-current-dir default-directory) + (make-variable-buffer-local 'thumbs-current-dir))) + +;;;###autoload +(defun thumbs-show-all-from-dir (dir &optional reg same-window) + "Make a preview buffer for all images in DIR. +Optional argument REG to select file matching a regexp, +and SAME-WINDOW to show thumbs in the same window." + (interactive "DDir: ") + (thumbs-show-thumbs-list + (directory-files dir t + (or reg (image-file-name-regexp))) + (concat "*Thumbs: " dir) same-window)) + +;;;###autoload +(defun thumbs-dired-show-marked () + "In Dired, make a thumbs buffer with all marked files." + (interactive) + (thumbs-show-thumbs-list (dired-get-marked-files) nil t)) + +;;;###autoload +(defun thumbs-dired-show-all () + "In dired, make a thumbs buffer with all files in current directory." + (interactive) + (thumbs-show-all-from-dir default-directory nil t)) + +;;;###autoload +(defalias 'thumbs 'thumbs-show-all-from-dir) + +(defun thumbs-find-image (img L &optional num otherwin) + (funcall + (if otherwin 'switch-to-buffer-other-window 'switch-to-buffer) + (concat "*Image: " (file-name-nondirectory img) " - " + (number-to-string (or num 0)) "*")) + (thumbs-view-image-mode) + (let ((inhibit-read-only t)) + (setq thumbs-current-image-filename img + thumbs-current-tmp-filename nil + thumbs-image-num (or num 0)) + (make-variable-buffer-local 'thumbs-current-image-filename) + (make-variable-buffer-local 'thumbs-current-tmp-filename) + (make-variable-buffer-local 'thumbs-current-image-size) + (make-variable-buffer-local 'thumbs-image-num) + (make-variable-buffer-local 'thumbs-fileL) + (setq thumbs-fileL L) + (delete-region (point-min)(point-max)) + (thumbs-insert-image img (thumbs-image-type img) 0))) + +(defun thumbs-find-image-at-point (&optional img otherwin) + "Display image IMG for thumbnail at point. +use another window it OTHERWIN is t." + (interactive) + (let* ((L thumbs-fileL) + (n (point)) + (i (or img (cdr (assoc n L))))) + (thumbs-find-image i L n otherwin))) + +(defun thumbs-find-image-at-point-other-window () + "Display image for thumbnail at point in the preview buffer. +Open another window." + (interactive) + (thumbs-find-image-at-point nil t)) + +(defun thumbs-call-setroot-command (img) + "Call the setroot program for IMG." + (run-hooks 'thumbs-before-setroot-hook) + (shell-command (replace-regexp-in-string + "\\*" + (shell-quote-argument (expand-file-name img)) + thumbs-setroot-command nil t)) + (run-hooks 'thumbs-after-setroot-hook)) + +(defun thumbs-set-image-at-point-to-root-window () + "Set the image at point as the desktop wallpaper." + (interactive) + (thumbs-call-setroot-command (cdr (assoc (point) thumbs-fileL)))) + +(defun thumbs-set-root () + "Set the current image as root." + (interactive) + (thumbs-call-setroot-command + (or thumbs-current-tmp-filename + thumbs-current-image-filename))) + +(defun thumbs-delete-images () + "Delete the image at point (and it's thumbnail) (or marked files if any)." + (interactive) + (let ((f (or thumbs-markedL (list (cdr (assoc (point) thumbs-fileL)))))) + (if (yes-or-no-p "Really delete %d files?" (length f)) + (progn + (mapcar (lambda (x) + (setq thumbs-fileL (delete (rassoc x thumbs-fileL) thumbs-fileL)) + (delete-file x) + (delete-file (thumbs-thumbname x))) f) + (thumbs-redraw-buffer))))) + +(defun thumbs-kill-buffer () + "Kill the current buffer." + (interactive) + (let ((buffer (current-buffer))) + (ignore-errors (delete-window (selected-window))) + (kill-buffer buffer))) + +(defun thumbs-show-image-num (num) + "Show the image with number NUM." + (let ((inhibit-read-only t)) + (delete-region (point-min)(point-max)) + (let ((i (cdr (assoc num thumbs-fileL)))) + (thumbs-insert-image i (thumbs-image-type i) 0) + (sleep-for 2) + (rename-buffer (concat "*Image: " + (file-name-nondirectory i) + " - " + (number-to-string num) "*"))) + (setq thumbs-image-num num + thumbs-current-image-filename i))) + +(defun thumbs-next-image () + "Show next image." + (interactive) + (let* ((i (1+ thumbs-image-num)) + (l (caar thumbs-fileL)) + (num + (cond ((assoc i thumbs-fileL) i) + ((>= i l) 1) + (t (1+ i))))) + (thumbs-show-image-num num))) + +(defun thumbs-previous-image () + "Show the previous image." + (interactive) + (let* ((i (- thumbs-image-num 1)) + (l (caar thumbs-fileL)) + (num + (cond ((assoc i thumbs-fileL) i) + ((<= i 1) l) + (t (- i 1))))) + (thumbs-show-image-num num))) + +(defun thumbs-redraw-buffer () + "Redraw the current thumbs buffer." + (let ((p (point)) + (inhibit-read-only t)) + (delete-region (point-min)(point-max)) + (thumbs-do-thumbs-insertion (reverse (mapcar 'cdr thumbs-fileL))) + (goto-char (1+ p)))) + +(defun thumbs-mark () + "Mark the image at point." + (interactive) + (setq thumbs-markedL (cons (cdr (assoc (point) thumbs-fileL)) thumbs-markedL)) + (let ((inhibit-read-only t)) + (delete-char 1) + (thumbs-insert-thumb (cdr (assoc (point) thumbs-fileL)) t)) + (when (eolp)(forward-char))) + +;; Image modification routines + +(defun thumbs-modify-image (action &optional arg) + "Call convert to do ACTION on image with argument ARG. +ACTION and ARG should be legal convert command." + (interactive "sAction: \nsValue: ") + ;; cleaning of old temp file + (mapc 'delete-file + (directory-files + thumbs-temp-dir + t + thumbs-temp-prefix)) + (let ((buffer-read-only nil) + (tmp (format "%s%s.jpg" thumbs-temp-file (thumbs-gensym)))) + (erase-buffer) + (thumbs-call-convert thumbs-current-image-filename + tmp + action + (or arg "")) + (thumbs-insert-image tmp 'jpeg 0) + (setq thumbs-current-tmp-filename tmp))) + +(defun thumbs-emboss-image (emboss) + "Emboss the image with value EMBOSS." + (interactive "nEmboss value: ") + (if (or (< emboss 3)(> emboss 31)(evenp emboss)) + (error "Arg must be a odd number between 3 and 31")) + (thumbs-modify-image "emboss" (number-to-string emboss))) + +(defun thumbs-monochrome-image () + "Turn the image to monochrome." + (interactive) + (thumbs-modify-image "monochrome")) + +(defun thumbs-negate-image () + "Negate the image." + (interactive) + (thumbs-modify-image "negate")) + +(defun thumbs-rotate-left () + "Rotate the image 90 degrees counter-clockwise." + (interactive) + (thumbs-modify-image "rotate" "270")) + +(defun thumbs-rotate-right () + "Rotate the image 90 degrees clockwise." + (interactive) + (thumbs-modify-image "rotate" "90")) + +(defun thumbs-forward-char () + "Move forward one image." + (interactive) + (forward-char) + (when (eolp)(forward-char)) + (thumbs-show-name)) + +(defun thumbs-backward-char () + "Move backward one image." + (interactive) + (forward-char -1) + (thumbs-show-name)) + +(defun thumbs-forward-line () + "Move down one line." + (interactive) + (forward-line 1) + (thumbs-show-name)) + +(defun thumbs-backward-line () + "Move up one line." + (interactive) + (forward-line -1) + (thumbs-show-name)) + +(defun thumbs-show-name () + "Show the name of the current file." + (interactive) + (let ((f (cdr (assoc (point) thumbs-fileL)))) + (message "%s [%s]" f (thumbs-file-size f)))) + +(defun thumbs-save-current-image () + "Save the current image." + (interactive) + (let ((f (or thumbs-current-tmp-filename + thumbs-current-image-filename)) + (sa (read-from-minibuffer "save file as: " + thumbs-current-image-filename))) + (copy-file f sa))) + +(defun thumbs-dired () + "Use `dired' on the current thumbs directory." + (interactive) + (dired thumbs-current-dir)) + +;; thumbs-mode + +(defvar thumbs-mode-map + (let ((map (make-sparse-keymap))) + (define-key map [return] 'thumbs-find-image-at-point) + (define-key map [(meta return)] 'thumbs-find-image-at-point-other-window) + (define-key map [(control return)] 'thumbs-set-image-at-point-to-root-window) + (define-key map [delete] 'thumbs-delete-images) + (define-key map [right] 'thumbs-forward-char) + (define-key map [left] 'thumbs-backward-char) + (define-key map [up] 'thumbs-backward-line) + (define-key map [down] 'thumbs-forward-line) + (define-key map "d" 'thumbs-dired) + (define-key map "m" 'thumbs-mark) + (define-key map "s" 'thumbs-show-name) + (define-key map "q" 'thumbs-kill-buffer) + map) + "Keymap for `thumbs-mode'.") + +(define-derived-mode thumbs-mode + fundamental-mode "thumbs" + "Preview images in a thumbnails buffer" + (make-variable-buffer-local 'thumbs-markedL) + (setq thumbs-markedL nil)) + +(defvar thumbs-view-image-mode-map + (let ((map (make-sparse-keymap))) + (define-key map [prior] 'thumbs-previous-image) + (define-key map [next] 'thumbs-next-image) + (define-key map "-" 'thumbs-resize-image-size-down) + (define-key map "+" 'thumbs-resize-image-size-up) + (define-key map "<" 'thumbs-rotate-left) + (define-key map ">" 'thumbs-rotate-right) + (define-key map "e" 'thumbs-emboss-image) + (define-key map "r" 'thumbs-resize-interactive) + (define-key map "s" 'thumbs-save-current-image) + (define-key map "q" 'thumbs-kill-buffer) + (define-key map "w" 'thunbs-set-root) + map) + "Keymap for `thumbs-view-image-mode'.") + +;; thumbs-view-image-mode +(define-derived-mode thumbs-view-image-mode + fundamental-mode "image-view-mode") + +;;;###autoload +(defun thumbs-dired-setroot () + "In dired, Call the setroot program on the image at point." + (interactive) + (thumbs-call-setroot-command (dired-get-filename))) + +;; Modif to dired mode map +(define-key dired-mode-map "\C-ta" 'thumbs-dired-show-all) +(define-key dired-mode-map "\C-tm" 'thumbs-dired-show-marked) +(define-key dired-mode-map "\C-tw" 'thumbs-dired-setroot) + +(provide 'thumbs) + +;;; thumbs.el ends here + + +;;; arch-tag: f9ac1ef8-83fc-42c0-8069-1fae43fd2e5c diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el index a3f0d66be3..b6e76ee539 100644 --- a/lisp/time-stamp.el +++ b/lisp/time-stamp.el @@ -760,4 +760,5 @@ The first character of DD is space if the value is less than 10." (provide 'time-stamp) +;;; arch-tag: 8a12c5c3-25d6-4a71-adc5-24b0e025a1e7 ;;; time-stamp.el ends here diff --git a/lisp/time.el b/lisp/time.el index 0f7d8d97d9..ebc883b3d8 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -173,9 +173,11 @@ depend on `display-time-day-and-date' and `display-time-24hr-format'." '((if (and (not display-time-format) display-time-day-and-date) (format-time-string "%a %b %e " now) "") - (format-time-string (or display-time-format - (if display-time-24hr-format "%H:%M" "%-I:%M%p")) - now) + (propertize + (format-time-string (or display-time-format + (if display-time-24hr-format "%H:%M" "%-I:%M%p")) + now) + 'help-echo (format-time-string "%a %b %e, %Y" now)) load (if mail ;; Build the string every time to act on customization. @@ -391,4 +393,5 @@ This runs the normal hook `display-time-hook' after each update." (provide 'time) +;;; arch-tag: b9c1623f-b5cb-48e4-b650-482a4d23c5a6 ;;; time.el ends here diff --git a/lisp/timezone.el b/lisp/timezone.el index 7e1fe70ee3..bad269d9cb 100644 --- a/lisp/timezone.el +++ b/lisp/timezone.el @@ -191,11 +191,11 @@ Understands the following styles: ;; Styles: (8) with timezone. (setq year 1 month 2 day 3 time 4 zone 5)) ((string-match - "\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9]+\\)[ \t]+\\([-+a-zA-Z0-9:]+\\)" date) + "\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\)[T \t]+\\([0-9]+:[0-9]+\\)[ \t]+\\([-+a-zA-Z0-9:]+\\)" date) ;; Styles: (8) with timezone with a colon in it. (setq year 1 month 2 day 3 time 4 zone 5)) ((string-match - "\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9]+:[0-9]+\\)" date) + "\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\)[T \t]+\\([0-9]+:[0-9]+:[0-9]+\\)" date) ;; Styles: (8) without timezone. (setq year 1 month 2 day 3 time 4 zone nil)) ) @@ -397,4 +397,5 @@ The Gregorian date Sunday, December 31, 1 BC is imaginary." (provide 'timezone) +;;; arch-tag: e23d5bc6-f32d-48ba-8996-323e9d654b3f ;;; timezone.el ends here diff --git a/lisp/tmm.el b/lisp/tmm.el index 759caba560..9993186779 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -506,4 +506,5 @@ of `menu-bar-final-items'." (provide 'tmm) +;;; arch-tag: e7ddbdb6-4b95-4da3-afbe-ad6063d112f4 ;;; tmm.el ends here diff --git a/lisp/toolbar/gud-n.pbm b/lisp/toolbar/gud-n.pbm new file mode 100644 index 0000000000000000000000000000000000000000..dc2a15323e3846ddf4256f98ddbe99394cca924b GIT binary patch literal 81 zcmWGA;W9E&Ff!p{KmyGF8CVz^I2ar_XE<>4IB@d@F!MYBBL_A%2WB1yWW+cFNhbpX E0F<2wPyhe` literal 0 HcmV?d00001 diff --git a/lisp/toolbar/gud-n.xpm b/lisp/toolbar/gud-n.xpm new file mode 100644 index 0000000000..0e631de18e --- /dev/null +++ b/lisp/toolbar/gud-n.xpm @@ -0,0 +1,34 @@ +/* XPM */ +static char * next_xpm[] = { +"24 24 7 1", +" c #c0c0c0", +". c #cc0033", +"X c #616161", +"o c #2a1f55", +"O c #adadad", +"+ c #d40000", +"@ c #cc9999", +" ", +" ", +" ", +" ", +" .......... ", +" . . ", +" . . ", +" . Xo oX . ", +" . XoO OoX . ", +" . oo oo +@.@+ ", +" oo oo @...@ ", +" oo oo ... ", +" oX Xo @.@ ", +" oo oo . ", +" oX Xo ", +" oo oo ", +" oo oo ", +" oo oo ", +" XoO OoX ", +" Xo oX ", +" ", +" ", +" ", +" "}; diff --git a/lisp/toolbar/gud-ni.pbm b/lisp/toolbar/gud-ni.pbm new file mode 100644 index 0000000000000000000000000000000000000000..ecad2965b0d01f7a7e2d2ea95e27a4b4401004ad GIT binary patch literal 81 zcmWGA;W9E&Ff!p{KmyGF8CVz^I2atDXkq~4j0em-57^ioc$k5RfsKuUnTLUK1_Q$c IByC_O0IKQpR4hbM)V=!Q5NMLL@z|hcu IqzTFd0FY1#A^-pY literal 0 HcmV?d00001 diff --git a/lisp/toolbar/gud-si.xpm b/lisp/toolbar/gud-si.xpm new file mode 100644 index 0000000000..d2667fc70b --- /dev/null +++ b/lisp/toolbar/gud-si.xpm @@ -0,0 +1,32 @@ +/* XPM */ +static char * gud_stepi_xpm[] = { +"24 24 5 1", +" c #C0C0C0C0C0C0", +". c #D4D400000000", +"X c #616161616161", +"o c #2A2A1F1F5555", +"O c #CCCC99999999", +" ", +" ", +" ", +" ", +" ..... ", +" . . ", +" . . ", +" . . ", +" . X . X ", +" . Xo .O.O. oX ", +" Xo O...O oX ", +" Xo ... oX ", +" Xo O.O oX ", +" oX . Xo ", +" oX Xo ", +" oX Xo ", +" oX Xo ", +" o o ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/lisp/toolbar/gud-watch.pbm b/lisp/toolbar/gud-watch.pbm new file mode 100644 index 0000000000000000000000000000000000000000..223d4ebf8c7870ebf68a4415ce06af87f4fd0ef3 GIT binary patch literal 81 zcmWGA;W9E&Ff!p{Km!sC45|za$qfuG4U7#3m>C?Hn;)=*ByeabKoE-yP^1A(6Oao4 Drp5`$ literal 0 HcmV?d00001 diff --git a/lisp/toolbar/gud-watch.xpm b/lisp/toolbar/gud-watch.xpm new file mode 100644 index 0000000000..41361dc32b --- /dev/null +++ b/lisp/toolbar/gud-watch.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char * watch_xpm[] = { +"24 24 11 1", +" c #C0C0C0C0C0C0", +". c #808080808080", +"X c #000000000000", +"o c #A5A59F9FA3A3", +"O c #B5B5B9B9B5B5", +"+ c #070707070707", +"@ c #616161616161", +"# c #2D2D30302D2D", +"$ c #020202020202", +"% c #9A9A99999A9A", +"& c #2F2F1A1A0202", +" ", +" ", +" ", +" ", +" ", +" .XX ", +" oX. X Xo ", +" O+@ X@# ", +" # X O$o ", +" ## @# ", +" @+O O$o ", +" %XX&% %&X&## ", +" %#O O#%X%#O O#X ", +" &O O& &O O& ", +" X X X X ", +" &O O& &O O& ", +" %#O O#% %#O O#% ", +" %&X&% %&X&% ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/lisp/toolbar/tool-bar.el b/lisp/toolbar/tool-bar.el index 4cee4a00e6..425789eb80 100644 --- a/lisp/toolbar/tool-bar.el +++ b/lisp/toolbar/tool-bar.el @@ -266,4 +266,5 @@ MAP must contain appropriate binding for `[menu-bar]' which holds a keymap." (provide 'tool-bar) +;;; arch-tag: 15f30f0a-d0d7-4d50-bbb7-f48fd0c8582f ;;; tool-bar.el ends here diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 59cb3e2791..6ff86b4cf0 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el @@ -524,4 +524,5 @@ use either \\[customize] or the function `tooltip-mode'." (provide 'tooltip) +;;; arch-tag: 3d61135e-4618-4a78-af28-183f6df5636f ;;; tooltip.el ends here diff --git a/lisp/type-break.el b/lisp/type-break.el index 4121287ea0..26ac7f87ec 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el @@ -1,6 +1,6 @@ ;;; type-break.el --- encourage rests from typing at appropriate intervals -;; Copyright (C) 1994, 95, 97, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1994, 95, 97, 2000, 2004 Free Software Foundation, Inc. ;; Author: Noah Friedman ;; Maintainer: Noah Friedman @@ -8,8 +8,6 @@ ;; Status: Works in GNU Emacs 19.25 or later, some versions of XEmacs ;; Created: 1994-07-13 -;; $Id: type-break.el,v 1.27 2003/05/06 17:50:17 lektu Exp $ - ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify @@ -277,39 +275,6 @@ It will be either \"seconds\" or \"keystrokes\".") (defvar type-break-current-keystroke-warning-interval nil) (defvar type-break-time-warning-count 0) (defvar type-break-keystroke-warning-count 0) - -;; Constant indicating emacs variant. -;; This can be one of `xemacs', `lucid', `epoch', `mule', etc. -(defconst type-break-emacs-variant - (let ((data (match-data)) - (version (cond - ((fboundp 'nemacs-version) - (nemacs-version)) - (t - (emacs-version)))) - (alist '(("\\bXEmacs\\b" . xemacs) - ("\\bLucid\\b" . lucid) - ("^Nemacs\\b" . nemacs) - ("^GNU Emacs 19" . standard19) - ("^GNU Emacs 20" . standard19) - ("^GNU Emacs 18" . emacs18))) - result) - (while alist - (cond - ((string-match (car (car alist)) version) - (setq result (cdr (car alist))) - (setq alist nil)) - (t - (setq alist (cdr alist))))) - (set-match-data data) - (cond ((eq result 'lucid) - (and (string= emacs-version "19.8 Lucid") - (setq result 'lucid-19-8))) - ((memq result '(nemacs emacs18)) - (signal 'error - "type-break not supported in this version of emacs."))) - result)) - ;;;###autoload (defun type-break-mode (&optional prefix) @@ -954,38 +919,37 @@ With optional non-nil ALL, force redisplay of all mode-lines." ;;; for different versions of emacs. (defun type-break-run-at-time (time repeat function) - (cond ((eq type-break-emacs-variant 'standard19) - (require 'timer) - (funcall 'run-at-time time repeat function)) - ((eq type-break-emacs-variant 'lucid-19-8) + (condition-case nil (or (require 'timer) (require 'itimer)) (error nil)) + (cond ((fboundp 'run-at-time) + (run-at-time time repeat function)) + ((fboundp 'start-timer) (let ((name (if (symbolp function) (symbol-name function) "type-break"))) - (require 'timer) - (funcall 'start-timer name function time repeat))) - ((memq type-break-emacs-variant '(xemacs lucid)) + (start-timer name function time repeat))) + ((fboundp 'start-itimer) (let ((name (if (symbolp function) (symbol-name function) "type-break"))) - (require 'itimer) - (funcall 'start-itimer name function time repeat))))) + (start-itimer name function time repeat))))) +(defvar timer-dont-exit) (defun type-break-cancel-function-timers (function) - (cond ((eq type-break-emacs-variant 'standard19) + (cond ((fboundp 'cancel-function-timers) (let ((timer-dont-exit t)) - (funcall 'cancel-function-timers function))) - ((eq type-break-emacs-variant 'lucid-19-8) + (cancel-function-timers function))) + ((fboundp 'delete-timer) (let ((list timer-list)) (while list (and (eq (funcall 'timer-function (car list)) function) - (funcall 'delete-timer (car list))) + (delete-timer (car list))) (setq list (cdr list))))) - ((memq type-break-emacs-variant '(xemacs lucid)) + ((fboundp 'delete-itimer) (with-no-warnings (let ((list itimer-list)) (while list (and (eq (funcall 'itimer-function (car list)) function) - (funcall 'delete-itimer (car list))) + (delete-itimer (car list))) (setq list (cdr list)))))))) @@ -1090,4 +1054,5 @@ With optional non-nil ALL, force redisplay of all mode-lines." (if type-break-mode (type-break-mode 1)) +;;; arch-tag: 943a2eb3-07e6-420b-993f-96e4796f5fd0 ;;; type-break.el ends here diff --git a/lisp/uniquify.el b/lisp/uniquify.el index 656f5c3708..f106297476 100644 --- a/lisp/uniquify.el +++ b/lisp/uniquify.el @@ -457,4 +457,6 @@ For use on `kill-buffer-hook'." (add-hook 'kill-buffer-hook 'uniquify-maybe-rerationalize-w/o-cb) (provide 'uniquify) + +;;; arch-tag: e763faa3-56c9-4903-8eb8-26e1c45a0065 ;;; uniquify.el ends here diff --git a/lisp/userlock.el b/lisp/userlock.el index 752c3bc90c..e6e5ef0a1b 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el @@ -160,4 +160,5 @@ to get the latest version of the file, then make the change again.") (set-buffer standard-output) (help-mode)))) +;;; arch-tag: a61c5b60-e1c8-44fd-894a-c617f4dfc639 ;;; userlock.el ends here diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el new file mode 100644 index 0000000000..c8efca0283 --- /dev/null +++ b/lisp/vc-arch.el @@ -0,0 +1,421 @@ +;;; vc-arch.el --- VC backend for the Arch version-control system + +;; Copyright (C) 1995,98,99,2000,01,02,03,2004 Free Software Foundation, Inc. + +;; Author: FSF (see vc.el for full credits) +;; Maintainer: Stefan Monnier + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; The home page of the Arch version control system is at +;; +;; http://www.gnuarch.org/ +;; +;; This is derived from vc-mcvs.el as follows: +;; - cp vc-mcvs.el vc-arch.el and then M-% mcvs RET arch RET +;; +;; Then of course started the hacking. +;; +;; What has been partly tested: +;; - Open a file. +;; - C-x v = without any prefix arg. +;; - C-x v v to commit a change to a single file. + +;; Bugs: + +;; - *VC-log*'s initial content lacks the `Summary:' lines. +;; - All files under the tree are considered as "under Arch's control" +;; without regards to =tagging-method and such. +;; - Files are always considered as `edited'. +;; - C-x v l does not work. +;; - C-x v i does not work. +;; - C-x v ~ does not work. +;; - C-x v u does not work. +;; - C-x v s does not work. +;; - C-x v r does not work. +;; - VC-dired does not work. +;; - And more... + +;;; Code: + +(eval-when-compile (require 'vc) (require 'cl)) + +;;; +;;; Customization options +;;; + +(defvar vc-arch-command + (let ((candidates '("tla"))) + (while (and candidates (not (executable-find (car candidates)))) + (setq candidates (cdr candidates))) + (or (car candidates) "tla"))) + +;; Clear up the cache to force vc-call to check again and discover +;; new functions when we reload this file. +(put 'Arch 'vc-functions nil) + +;;;###autoload (defun vc-arch-registered (file) +;;;###autoload (let ((dir file)) +;;;###autoload (while (and (stringp dir) +;;;###autoload (not (equal +;;;###autoload dir (setq dir (file-name-directory dir)))) +;;;###autoload dir) +;;;###autoload (setq dir (if (file-directory-p +;;;###autoload (expand-file-name "{arch}" dir)) +;;;###autoload t (directory-file-name dir)))) +;;;###autoload (if (eq dir t) +;;;###autoload (progn +;;;###autoload (load "vc-arch") +;;;###autoload (vc-arch-registered file))))) + +(defun vc-arch-add-tagline () + "Add an `arch-tag' to the end of the current file." + (interactive) + (comment-normalize-vars) + (goto-char (point-max)) + (forward-comment -1) + (unless (bolp) (insert "\n")) + (let ((beg (point)) + (idfile (and buffer-file-name + (expand-file-name + (concat ".arch-ids/" + (file-name-nondirectory buffer-file-name) + ".id") + (file-name-directory buffer-file-name))))) + (insert "arch-tag: ") + (if (and idfile (file-exists-p idfile)) + ;; If the file is unreadable, we do want to get an error here. + (progn + (insert-file-contents idfile) + (forward-line 1) + (delete-file idfile)) + (condition-case nil + (call-process "uuidgen" nil t) + (file-error (insert (format "%s <%s> %s" + (current-time-string) + user-mail-address + (+ (nth 2 (current-time)) + (buffer-size))))))) + (comment-region beg (point)))) + +(defconst vc-arch-tagline-re "^\\W*arch-tag:[ \t]*\\(.*[^ \t\n]\\)") + +(defun vc-arch-file-source-p (file) + "Can return nil, `maybe' or a non-nil value. +Only the value `maybe' can be trusted :-(." + ;; FIXME: Check the tag and name of parent dirs. + (unless (string-match "\\`[,+]" (file-name-nondirectory file)) + (or (string-match "\\`{arch}/" + (file-relative-name file (vc-arch-root file))) + (file-exists-p + ;; Check the presence of an ID file. + (expand-file-name + (concat ".arch-ids/" (file-name-nondirectory file) ".id") + (file-name-directory file))) + ;; Check the presence of a tagline. + (with-current-buffer (find-file-noselect file) + (save-excursion + (goto-char (point-max)) + (or (re-search-backward vc-arch-tagline-re (- (point) 1000) t) + (progn + (goto-char (point-min)) + (re-search-forward vc-arch-tagline-re (+ (point) 1000) t))))) + ;; FIXME: check =tagging-method to see whether untagged files might + ;; be source or not. + (with-current-buffer + (find-file-noselect (expand-file-name "{arch}/=tagging-method" + (vc-arch-root file))) + (let ((untagged-source t)) ;Default is `names'. + (save-excursion + (goto-char (point-min)) + (if (re-search-forward "^[ \t]*\\(\\(tagline\\|implicit\\|names\\)\\|explicit\\)" nil t) + (setq untagged-source (match-end 2))) + (if (re-search-forward "^[ \t]*untagged-source[ \t]+\\(\\(source\\)\\|precious\\|backup\\|junk\\|unrecognized\\)" nil t) + (setq untagged-source (match-end 2)))) + (if untagged-source 'maybe)))))) + +(defun vc-arch-file-id (file) + ;; Don't include the kind of ID this is because it seems to be too messy. + (let ((idfile (expand-file-name + (concat ".arch-ids/" (file-name-nondirectory file) ".id") + (file-name-directory file)))) + (if (file-exists-p idfile) + (with-temp-buffer + (insert-file-contents idfile) + (looking-at ".*[^ \n\t]") + (match-string 0))) + (with-current-buffer (find-file-noselect file) + (save-excursion + (goto-char (point-max)) + (if (or (re-search-backward vc-arch-tagline-re (- (point) 1000) t) + (progn + (goto-char (point-min)) + (re-search-forward vc-arch-tagline-re (+ (point) 1000) t))) + (match-string 1) + (concat "./" (file-relative-name file (vc-arch-root file)))))))) + +(defun vc-arch-tagging-method (file) + (with-current-buffer + (find-file-noselect + (expand-file-name "{arch}/=tagging-method" (vc-arch-root file))) + (save-excursion + (goto-char (point-min)) + (if (re-search-forward + "^[ \t]*\\(tagline\\|implicit\\|names\\|explicit\\)" nil t) + (intern (match-string 1)) + 'names)))) + +(defun vc-arch-root (file) + "Return the root directory of a Arch project, if any." + (or (vc-file-getprop file 'arch-root) + (vc-file-setprop + file 'arch-root + (let ((root nil)) + (while (not (or root + (equal file (setq file (file-name-directory file))) + (null file))) + ;; Check the =tagging-method, in case someone naively manually + ;; creates a {arch} directory somewhere. + (if (file-exists-p (expand-file-name "{arch}/=tagging-method" file)) + (setq root file) + (setq file (directory-file-name file)))) + root)))) + +(defun vc-arch-register (file &optional rev comment) + (if rev (error "Explicit initial revision not supported for Arch")) + (let ((tagmet (vc-arch-tagging-method file))) + (if (and (memq tagmet '(tagline implicit)) comment-start) + (with-current-buffer (find-file-noselect file) + (if (buffer-modified-p) + (error "Save %s first" (buffer-name))) + (vc-arch-add-tagline) + (save-buffer)) + (vc-arch-command nil 0 file "add")))) + +(defun vc-arch-registered (file) + ;; Don't seriously check whether it's source or not. Checking would + ;; require running TLA, so it's better to not do it, so it also works if + ;; TLA is not installed. + (and (vc-arch-root file) + (vc-arch-file-source-p file))) + +(defun vc-arch-default-version (file) + (or (vc-file-getprop (vc-arch-root file) 'arch-default-version) + (let* ((root (vc-arch-root file)) + (f (expand-file-name "{arch}/++default-version" root))) + (if (file-readable-p f) + (vc-file-setprop + root 'arch-default-version + (with-temp-buffer + (insert-file-contents f) + ;; Strip the terminating newline. + (buffer-substring (point-min) (1- (point-max))))))))) + +(defun vc-arch-workfile-unchanged-p (file) + "Check if FILE is unchanged by diffing against the master version. +Return non-nil if FILE is unchanged." + nil) + +(defun vc-arch-state (file) + ;; There's no checkout operation and merging is not done from VC + ;; so the only operation that's state dependent that VC supports is commit + ;; which is only activated if the file is `edited'. + (let* ((root (vc-arch-root file)) + (ver (vc-arch-default-version file)) + (pat (concat "\\`" (subst-char-in-string ?/ ?% ver))) + (dir (expand-file-name ",,inode-sigs/" + (expand-file-name "{arch}" root))) + (sigfile nil)) + (dolist (f (if (file-directory-p dir) (directory-files dir t pat))) + (if (or (not sigfile) (file-newer-than-file-p f sigfile)) + (setq sigfile f))) + (if (not sigfile) + 'edited ;We know nothing. + (let ((id (vc-arch-file-id file))) + (setq id (replace-regexp-in-string "[ \t]" "_" id)) + (with-current-buffer (find-file-noselect sigfile) + (goto-char (point-min)) + (while (and (search-forward id nil 'move) + (progn (goto-char (- (match-beginning 0) 2)) + ;; Ignore E_ entries used for foo.id files. + (or (not (bolp)) (looking-at "E_"))))) + (if (eobp) + ;; ID not found. + (if (equal (file-name-nondirectory sigfile) + (subst-char-in-string + ?/ ?% (vc-arch-workfile-version file))) + 'added + ;; Might be `added' or `up-to-date' as well. + ;; FIXME: Check in the patch logs to find out. + 'edited) + ;; Found the ID, let's check the inode. + (if (not (re-search-forward + "\t.*mtime=\\([0-9]+\\):size=\\([0-9]+\\)" + (line-end-position) t)) + ;; Buh? Unexpected format. + 'edited + (let ((ats (file-attributes file))) + (if (and (= (nth 7 ats) (string-to-number (match-string 2))) + (equal (format-time-string "%s" (nth 5 ats)) + (match-string 1))) + 'up-to-date + 'edited))))))))) + +(defun vc-arch-workfile-version (file) + (let* ((root (expand-file-name "{arch}" (vc-arch-root file))) + (defbranch (vc-arch-default-version file))) + (when (and defbranch (string-match "\\`\\(.+@[^/\n]+\\)/\\(\\(\\(.*\\)--.*\\)--.*\\)\\'" defbranch)) + (let* ((archive (match-string 1 defbranch)) + (category (match-string 4 defbranch)) + (branch (match-string 3 defbranch)) + (version (match-string 2 defbranch)) + (sealed nil) (rev-nb 0) + (rev nil) + logdir tmp) + (setq logdir (expand-file-name category root)) + (setq logdir (expand-file-name branch logdir)) + (setq logdir (expand-file-name version logdir)) + (setq logdir (expand-file-name archive logdir)) + (setq logdir (expand-file-name "patch-log" logdir)) + ;; Revision names go: base-0, patch-N, version-0, versionfix-N. + (dolist (file (directory-files logdir)) + (when (and (eq (aref file 0) ?v) (not sealed)) + (setq sealed t rev-nb 0)) + (if (and (string-match "-\\([0-9]+\\)\\'" file) + (setq tmp (string-to-number (match-string 1 file))) + (or (not sealed) (eq (aref file 0) ?v)) + (>= tmp rev-nb)) + (setq rev-nb tmp rev file))) + (concat defbranch "--" rev))))) + + +(defcustom vc-arch-mode-line-rewrite + '(("\\`.*--\\(.*--.*\\)--\\(v?\\).*-\\([0-9]+\\)\\'" . "\\2\\3[\\1]")) + "Rewrite rules to shorten Arch's revision names on the mode-line." + :type '(repeat (cons regexp string))) + +(defun vc-arch-mode-line-string (file) + "Return string for placement in modeline by `vc-mode-line' for FILE." + (let ((rev (vc-workfile-version file))) + (dolist (rule vc-arch-mode-line-rewrite) + (if (string-match (car rule) rev) + (setq rev (replace-match (cdr rule) t nil rev)))) + (format "Arch%c%s" + (case (vc-state file) + ((up-to-date needs-patch) ?-) + (added ?@) + (t ?:)) + rev))) + +(defun vc-arch-diff3-rej-p (rej) + (let ((attrs (file-attributes rej))) + (and attrs (< (nth 7 attrs) 60) + (with-temp-buffer + (insert-file-contents rej) + (goto-char (point-min)) + (looking-at "Conflicts occured, diff3 conflict markers left in file\\."))))) + +(defun vc-arch-delete-rej-if-obsolete () + "For use in `after-save-hook'." + (save-excursion + (let ((rej (concat buffer-file-name ".rej"))) + (when (and buffer-file-name (vc-arch-diff3-rej-p rej)) + (if (not (re-search-forward "^<<<<<<< " nil t)) + ;; The .rej file is obsolete. + (condition-case nil (delete-file rej) (error nil))))))) + +(defun vc-arch-find-file-hook () + (let ((rej (concat buffer-file-name ".rej"))) + (when (and buffer-file-name (file-exists-p rej)) + (if (vc-arch-diff3-rej-p rej) + (save-excursion + (goto-char (point-min)) + (if (not (re-search-forward "^<<<<<<< " nil t)) + ;; The .rej file is obsolete. + (condition-case nil (delete-file rej) (error nil)) + (smerge-mode 1) + (add-hook 'after-save-hook + 'vc-arch-delete-rej-if-obsolete nil t) + (message "There are unresolved conflicts in this file"))) + (message "There are unresolved conflicts in %s" + (file-name-nondirectory rej)))))) + +(defun vc-arch-find-file-not-found-hook () + ;; Do nothing. We are not sure whether the file is `source' or not, + ;; so we shouldn't ask the user whether she wants to check it out. + ) + +(defun vc-arch-checkout-model (file) 'implicit) + +(defun vc-arch-checkin (file rev comment) + (if rev (error "Committing to a specific revision is unsupported.")) + (let ((summary (file-relative-name file (vc-arch-root file)))) + ;; Extract a summary from the comment. + (when (or (string-match "\\`Summary:[ \t]*\\(.*[^ \t\n]\\)\\([ \t]*\n\\)*" comment) + (string-match "\\`[ \t]*\\(.*[^ \t\n]\\)[ \t]*\\(\n?\\'\\|\n\\([ \t]*\n\\)+\\)" comment)) + (setq summary (match-string 1 comment)) + (setq comment (substring comment (match-end 0)))) + (vc-arch-command nil 0 file "commit" "-s" summary "-L" comment "--" + (vc-switches 'Arch 'checkin)))) + +(defun vc-arch-diff (file &optional oldvers newvers) + "Get a difference report using Arch between two versions of FILE." + (if (and newvers + (vc-up-to-date-p file) + (equal newvers (vc-workfile-version file))) + ;; Newvers is the base revision and the current file is unchanged, + ;; so we can diff with the current file. + (setq newvers nil)) + (if newvers + (error "Diffing specific revisions not implemented.") + (let* ((async (fboundp 'start-process)) + ;; Run the command from the root dir. + (default-directory (vc-arch-root file)) + (status + (vc-arch-command + "*vc-diff*" + (if async 'async 1) + nil "file-diffs" + ;; Arch does not support the typical flags. + ;; (vc-switches 'Arch 'diff) + (file-relative-name file) + (if (equal oldvers (vc-workfile-version file)) + nil + oldvers)))) + (if async 1 status)))) ; async diff, pessimistic assumption. + +(defun vc-arch-delete-file (file) + (vc-arch-command nil 0 file "rm")) + +(defun vc-arch-rename-file (old new) + (vc-arch-command nil 0 new "mv" (file-relative-name old))) + +(defalias 'vc-arch-responsible-p 'vc-arch-root) + +(defun vc-arch-command (buffer okstatus file &rest flags) + "A wrapper around `vc-do-command' for use in vc-arch.el." + (apply 'vc-do-command buffer okstatus vc-arch-command file flags)) + +(defun vc-arch-init-version () nil) + +(provide 'vc-arch) + +;;; arch-tag: a35c7c1c-5237-429d-88ef-3d718fd2e704 +;;; vc-arch.el ends here diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index aef6137570..0c1e6bc174 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el @@ -5,7 +5,7 @@ ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel -;; $Id: vc-cvs.el,v 1.61 2003/05/23 17:57:29 spiegel Exp $ +;; $Id: vc-cvs.el,v 1.67 2004/01/20 17:41:18 uid65624 Exp $ ;; This file is part of GNU Emacs. @@ -533,14 +533,14 @@ The changes are between FIRST-VERSION and SECOND-VERSION." ;;; History functions ;;; -(defun vc-cvs-print-log (file) +(defun vc-cvs-print-log (file &optional buffer) "Get change log associated with FILE." (vc-cvs-command - nil + buffer (if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0) file "log")) -(defun vc-cvs-diff (file &optional oldvers newvers) +(defun vc-cvs-diff (file &optional oldvers newvers buffer) "Get a difference report using CVS between two versions of FILE." (if (string= (vc-workfile-version file) "0") ;; This file is added but not yet committed; there is no master file. @@ -549,13 +549,13 @@ The changes are between FIRST-VERSION and SECOND-VERSION." ;; We regard this as "changed". ;; Diff it against /dev/null. ;; Note: this is NOT a "cvs diff". - (apply 'vc-do-command "*vc-diff*" + (apply 'vc-do-command (or buffer "*vc-diff*") 1 "diff" file (append (vc-switches nil 'diff) '("/dev/null"))) ;; Even if it's empty, it's locally modified. 1) (let* ((async (and (vc-stay-local-p file) (fboundp 'start-process))) - (status (apply 'vc-cvs-command "*vc-diff*" + (status (apply 'vc-cvs-command (or buffer "*vc-diff*") (if async 'async 1) file "diff" (and oldvers (concat "-r" oldvers)) @@ -625,6 +625,14 @@ systime, or nil if there is none." (beginning-of-line nil) (vc-cvs-annotate-time)))))) +(defun vc-cvs-annotate-extract-revision-at-line () + (save-excursion + (beginning-of-line) + (if (re-search-forward "^\\([0-9]+\\.[0-9]+\\(\\.[0-9]+\\)*\\) +(" + (line-end-position) t) + (match-string-no-properties 1) + nil))) + ;;; ;;; Snapshot system ;;; @@ -921,22 +929,26 @@ is non-nil." "\\(.*\\)")) ;Sticky tag (vc-file-setprop file 'vc-workfile-version (match-string 1)) (vc-file-setprop file 'vc-cvs-sticky-tag - (vc-cvs-parse-sticky-tag (match-string 4) (match-string 5))) - ;; compare checkout time and modification time - (let* ((mtime (nth 5 (file-attributes file))) - (system-time-locale "C") - (mtstr (format-time-string "%c" mtime 'utc))) - ;; Solaris sometimes uses "Wed Sep 05" instead of "Wed Sep 5". - ;; See "grep '[^a-z_]ctime' cvs/src/*.c" for reference. - (if (= (aref mtstr 8) ?0) - (setq mtstr (concat (substring mtstr 0 8) " " (substring mtstr 9)))) - (cond ((equal mtstr (match-string 2)) - (vc-file-setprop file 'vc-checkout-time mtime) - (if set-state (vc-file-setprop file 'vc-state 'up-to-date))) - (t - (vc-file-setprop file 'vc-checkout-time 0) - (if set-state (vc-file-setprop file 'vc-state 'edited)))))))) + (vc-cvs-parse-sticky-tag (match-string 4) + (match-string 5))) + ;; Compare checkout time and modification time. + ;; This is intentionally different from the algorithm that CVS uses + ;; (which is based on textual comparison), because there can be problems + ;; generating a time string that looks exactly like the one from CVS. + (let ((mtime (nth 5 (file-attributes file)))) + (require 'parse-time) + (let ((parsed-time + (parse-time-string (concat (match-string 2) " +0000")))) + (cond ((and (not (string-match "\\+" (match-string 2))) + (car parsed-time) + (equal mtime (apply 'encode-time parsed-time))) + (vc-file-setprop file 'vc-checkout-time mtime) + (if set-state (vc-file-setprop file 'vc-state 'up-to-date))) + (t + (vc-file-setprop file 'vc-checkout-time 0) + (if set-state (vc-file-setprop file 'vc-state 'edited))))))))) (provide 'vc-cvs) +;;; arch-tag: 60e1402a-aa53-4607-927a-cf74f144b432 ;;; vc-cvs.el ends here diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 708bb5b17e..80b9766caa 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -1,12 +1,12 @@ ;;; vc-hooks.el --- resident support for version-control -;; Copyright (C) 1992,93,94,95,96,98,99,2000,2003 +;; Copyright (C) 1992,93,94,95,96,98,99,2000,03,2004 ;; Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel -;; $Id: vc-hooks.el,v 1.155 2003/07/26 15:54:53 rost Exp $ +;; $Id: vc-hooks.el,v 1.165 2004/03/28 17:38:03 monnier Exp $ ;; This file is part of GNU Emacs. @@ -40,13 +40,20 @@ ;; Customization Variables (the rest is in vc.el) (defvar vc-ignore-vc-files nil) -(make-obsolete-variable 'vc-ignore-vc-files 'vc-handled-backends) +(make-obsolete-variable 'vc-ignore-vc-files + "set `vc-handled-backends' to nil to disable VC.") + (defvar vc-master-templates ()) -(make-obsolete-variable 'vc-master-templates 'vc-BACKEND-master-templates) +(make-obsolete-variable 'vc-master-templates + "to define master templates for a given BACKEND, use +vc-BACKEND-master-templates. To enable or disable VC for a given +BACKEND, use `vc-handled-backends'.") + (defvar vc-header-alist ()) (make-obsolete-variable 'vc-header-alist 'vc-BACKEND-header) -(defcustom vc-handled-backends '(RCS CVS SVN MCVS SCCS) +(defcustom vc-handled-backends '(RCS CVS SVN SCCS Arch MCVS) + ;; Arch and MCVS come last because they are per-tree rather than per-dir. "*List of version control backends for which VC will be used. Entries in this list will be tried in order to determine whether a file is under that sort of version control. @@ -259,7 +266,6 @@ It is usually called via the `vc-call' macro." (defmacro vc-call (fun file &rest args) ;; BEWARE!! `file' is evaluated twice!! `(vc-call-backend (vc-backend ,file) ',fun ,file ,@args)) - (defsubst vc-parse-buffer (pattern i) "Find PATTERN in the current buffer and return its Ith submatch." @@ -456,8 +462,21 @@ and does not employ any heuristic at all." (defun vc-default-workfile-unchanged-p (backend file) "Check if FILE is unchanged by diffing against the master version. Return non-nil if FILE is unchanged." - ;; If rev1 is nil, `diff' uses the current workfile version. - (zerop (vc-call diff file))) + (zerop (condition-case err + ;; If the implementation supports it, let the output + ;; go to *vc*, not *vc-diff*, since this is an internal call. + (vc-call diff file nil nil "*vc*") + (wrong-number-of-arguments + ;; If this error came from the above call to vc-BACKEND-diff, + ;; try again without the optional buffer argument (for + ;; backward compatibility). Otherwise, resignal. + (if (or (not (eq (cadr err) + (indirect-function + (vc-find-backend-function (vc-backend file) + 'diff)))) + (not (eq (caddr err) 5))) + (signal wrong-number-of-arguments err) + (vc-call diff file)))))) (defun vc-workfile-version (file) "Return the version level of the current workfile FILE. @@ -583,7 +602,7 @@ a regexp for matching all such backup files, regardless of the version." "Make a backup copy of FILE, which is assumed in sync with the repository. Before doing that, check if there are any old backups and get rid of them." (unless (and (fboundp 'msdos-long-file-names) - (not (with-no-warnings msdos-long-file-names))) + (not (with-no-warnings (msdos-long-file-names)))) (vc-delete-automatic-version-backups file) (copy-file file (vc-version-backup-file-name file) nil 'keep-date))) @@ -692,6 +711,9 @@ current, and kill the buffer that visits the link." (set-buffer true-buffer) (kill-buffer this-buffer)))) +(defun vc-default-find-file-hook (backend) + nil) + (defun vc-find-file-hook () "Function for `find-file-hook' activating VC mode if appropriate." ;; Recompute whether file is version controlled, @@ -707,7 +729,9 @@ current, and kill the buffer that visits the link." (unless vc-make-backup-files ;; Use this variable, not make-backup-files, ;; because this is for things that depend on the file name. - (set (make-local-variable 'backup-inhibited) t))) + (set (make-local-variable 'backup-inhibited) t)) + ;; Let the backend setup any buffer-local things he needs. + (vc-call-backend (vc-backend buffer-file-name) 'find-file-hook)) ((let* ((link (file-symlink-p buffer-file-name)) (link-type (and link (vc-backend (file-chase-links link))))) (cond ((not link-type) nil) ;Nothing to do. @@ -746,14 +770,17 @@ Used in `find-file-not-found-functions'." ;; When a file does not exist, ignore cached info about it ;; from a previous visit. (vc-file-clearprops buffer-file-name) - (if (and (vc-backend buffer-file-name) - (yes-or-no-p - (format "File %s was lost; check out from version control? " - (file-name-nondirectory buffer-file-name)))) - (save-excursion - (require 'vc) - (setq default-directory (file-name-directory buffer-file-name)) - (not (vc-error-occurred (vc-checkout buffer-file-name)))))) + (let ((backend (vc-backend buffer-file-name))) + (if backend (vc-call-backend backend 'find-file-not-found-hook)))) + +(defun vc-default-find-file-not-found-hook (backend) + (if (yes-or-no-p + (format "File %s was lost; check out from version control? " + (file-name-nondirectory buffer-file-name))) + (save-excursion + (require 'vc) + (setq default-directory (file-name-directory buffer-file-name)) + (not (vc-error-occurred (vc-checkout buffer-file-name)))))) (add-hook 'find-file-not-found-functions 'vc-file-not-found-hook) @@ -842,4 +869,5 @@ Used in `find-file-not-found-functions'." (provide 'vc-hooks) +;;; arch-tag: 2e5a6fa7-1d30-48e2-8bd0-e3d335f04f32 ;;; vc-hooks.el ends here diff --git a/lisp/vc-mcvs.el b/lisp/vc-mcvs.el index 1f59f5f328..94beb7eb09 100644 --- a/lisp/vc-mcvs.el +++ b/lisp/vc-mcvs.el @@ -1,6 +1,6 @@ ;;; vc-mcvs.el --- VC backend for the Meta-CVS version-control system -;; Copyright (C) 1995,98,99,2000,01,02,2003 Free Software Foundation, Inc. +;; Copyright (C) 1995,98,99,2000,01,02,03,2004 Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Stefan Monnier @@ -170,13 +170,6 @@ This is only meaningful if you don't use the implicit checkout model 0)) t))) -(defmacro vc-mcvs-cvs (op file &rest args) - (declare (debug t)) - `(,(intern (concat "vc-cvs-" (symbol-name op))) - (expand-file-name (vc-file-getprop ,file 'mcvs-inode) - (vc-file-getprop ,file 'mcvs-root)) - ,@args)) - (defun vc-mcvs-state (file) ;; This would assume the Meta-CVS sandbox is synchronized. ;; (vc-mcvs-cvs state file)) @@ -215,19 +208,13 @@ This is only meaningful if you don't use the implicit checkout model (goto-char (point-max)) (widen))))))) -(defun vc-mcvs-workfile-version (file) (vc-mcvs-cvs workfile-version file)) +(defun vc-mcvs-workfile-version (file) + (vc-cvs-workfile-version + (expand-file-name (vc-file-getprop file 'mcvs-inode) + (vc-file-getprop file 'mcvs-root)))) (defalias 'vc-mcvs-checkout-model 'vc-cvs-checkout-model) -(defun vc-mcvs-mode-line-string (file) - (let ((s (vc-mcvs-cvs mode-line-string file))) - (when s - (if (and (not (memq (vc-state file) '(up-to-date needs-patch))) - (string-match "\\`CVS-" s)) - ;; The CVS file is not in sync, so we need to adjust the state. - (concat "MCVS:" (substring s 4)) - (concat "M" s))))) - ;;; ;;; State-changing functions ;;; @@ -589,7 +576,7 @@ and that it passes `vc-mcvs-global-switches' to it before FLAGS." ;; We need to filter the output. ;; The output of the filter uses filenames relative to the root, ;; so we need to change the default-directory. - (assert (equal default-directory (vc-mcvs-root file))) + ;; (assert (equal default-directory (vc-mcvs-root file))) (vc-do-command buffer okstatus "sh" nil "-c" (concat "mcvs " @@ -620,4 +607,6 @@ and that it passes `vc-mcvs-global-switches' to it before FLAGS." (defalias 'vc-mcvs-valid-version-number-p 'vc-cvs-valid-version-number-p) (provide 'vc-mcvs) + +;;; arch-tag: a39c7c1c-5247-429d-88df-dd7187d2e704 ;;; vc-mcvs.el ends here diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index db609eae42..02dc093ed5 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el @@ -5,7 +5,7 @@ ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel -;; $Id: vc-rcs.el,v 1.36 2003/02/04 12:11:40 lektu Exp $ +;; $Id: vc-rcs.el,v 1.38 2003/09/01 15:45:17 miles Exp $ ;; This file is part of GNU Emacs. @@ -479,14 +479,14 @@ Needs RCS 5.6.2 or later for -M." ;;; History functions ;;; -(defun vc-rcs-print-log (file) +(defun vc-rcs-print-log (file &optional buffer) "Get change log associated with FILE." - (vc-do-command nil 0 "rlog" (vc-name file))) + (vc-do-command buffer 0 "rlog" (vc-name file))) -(defun vc-rcs-diff (file &optional oldvers newvers) +(defun vc-rcs-diff (file &optional oldvers newvers buffer) "Get a difference report using RCS between two versions of FILE." (if (not oldvers) (setq oldvers (vc-workfile-version file))) - (apply 'vc-do-command "*vc-diff*" 1 "rcsdiff" file + (apply 'vc-do-command (or buffer "*vc-diff*") 1 "rcsdiff" file (append (list "-q" (concat "-r" oldvers) (and newvers (concat "-r" newvers))) @@ -782,4 +782,5 @@ variable `vc-rcs-release' is set to the returned value." (provide 'vc-rcs) +;;; arch-tag: 759b4916-5b0d-431d-b647-b185b8c652cf ;;; vc-rcs.el ends here diff --git a/lisp/vc-sccs.el b/lisp/vc-sccs.el index 352218b6c4..1649349e0b 100644 --- a/lisp/vc-sccs.el +++ b/lisp/vc-sccs.el @@ -5,7 +5,7 @@ ;; Author: FSF (see vc.el for full credits) ;; Maintainer: Andre Spiegel -;; $Id: vc-sccs.el,v 1.21 2003/02/04 12:11:54 lektu Exp $ +;; $Id: vc-sccs.el,v 1.24 2003/09/01 15:45:17 miles Exp $ ;; This file is part of GNU Emacs. @@ -130,15 +130,19 @@ For a description of possible values, see `vc-check-master-templates'." (if (file-ownership-preserved-p file) 'edited (vc-user-login-name owner-uid)) - ;; Strange permissions. - ;; Fall through to real state computation. - (vc-sccs-state file))) - (vc-sccs-state file)))) + ;; Strange permissions. + ;; Fall through to real state computation. + (vc-sccs-state file)))) + (vc-sccs-state file))) (defun vc-sccs-workfile-version (file) "SCCS-specific version of `vc-workfile-version'." (with-temp-buffer - (vc-insert-file (vc-name file) "^\001e") + ;; The workfile version is always the latest version number. + ;; To find this number, search the entire delta table, + ;; rather than just the first entry, because the + ;; first entry might be a deleted ("R") version. + (vc-insert-file (vc-name file) "^\001e\n\001[^s]") (vc-parse-buffer "^\001d D \\([^ ]+\\)" 1))) (defun vc-sccs-checkout-model (file) @@ -266,9 +270,9 @@ EDITABLE non-nil means previous version should be locked." ;;; History functions ;;; -(defun vc-sccs-print-log (file) +(defun vc-sccs-print-log (file &optional buffer) "Get change log associated with FILE." - (vc-do-command nil 0 "prs" (vc-name file))) + (vc-do-command buffer 0 "prs" (vc-name file))) (defun vc-sccs-logentry-check () "Check that the log entry in the current buffer is acceptable for SCCS." @@ -276,11 +280,11 @@ EDITABLE non-nil means previous version should be locked." (goto-char 512) (error "Log must be less than 512 characters; point is now at pos 512"))) -(defun vc-sccs-diff (file &optional oldvers newvers) +(defun vc-sccs-diff (file &optional oldvers newvers buffer) "Get a difference report using SCCS between two versions of FILE." (setq oldvers (vc-sccs-lookup-triple file oldvers)) (setq newvers (vc-sccs-lookup-triple file newvers)) - (apply 'vc-do-command "*vc-diff*" 1 "vcdiff" (vc-name file) + (apply 'vc-do-command (or buffer "*vc-diff*") 1 "vcdiff" (vc-name file) (append (list "-q" (and oldvers (concat "-r" oldvers)) (and newvers (concat "-r" newvers))) @@ -393,4 +397,5 @@ If NAME is nil or a version number string it's just passed through." (provide 'vc-sccs) +;;; arch-tag: d751dee3-d7b3-47e1-95e3-7ae98c052041 ;;; vc-sccs.el ends here diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index 1d46c90d9c..08af8f0197 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -502,4 +502,5 @@ essential information." (provide 'vc-svn) +;;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d ;;; vc-svn.el ends here diff --git a/lisp/vc.el b/lisp/vc.el index 491ff1f5da..801cf6d575 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1,13 +1,13 @@ ;;; vc.el --- drive a version-control system from within Emacs -;; Copyright (C) 1992,93,94,95,96,97,98,2000,01,2003 +;; Copyright (C) 1992,93,94,95,96,97,98,2000,01,2003,2004 ;; Free Software Foundation, Inc. ;; Author: FSF (see below for full credits) ;; Maintainer: Andre Spiegel ;; Keywords: tools -;; $Id: vc.el,v 1.358 2003/07/06 17:28:12 monnier Exp $ +;; $Id: vc.el,v 1.374 2004/03/28 22:00:19 monnier Exp $ ;; This file is part of GNU Emacs. @@ -264,9 +264,10 @@ ;; ;; HISTORY FUNCTIONS ;; -;; * print-log (file) +;; * print-log (file &optional buffer) ;; -;; Insert the revision log of FILE into the *vc* buffer. +;; Insert the revision log of FILE into BUFFER, or the *vc* buffer +;; if BUFFER is nil. ;; ;; - show-log-entry (version) ;; @@ -301,17 +302,17 @@ ;; default implementation runs rcs2log, which handles RCS- and ;; CVS-style logs. ;; -;; * diff (file &optional rev1 rev2) +;; * diff (file &optional rev1 rev2 buffer) ;; -;; Insert the diff for FILE into the *vc-diff* buffer. If REV1 and -;; REV2 are non-nil, report differences from REV1 to REV2. If REV1 -;; is nil, use the current workfile version (as found in the -;; repository) as the older version; if REV2 is nil, use the current -;; workfile contents as the newer version. This function should -;; pass the value of (vc-switches BACKEND 'diff) to the backend -;; command. It should return a status of either 0 (no differences -;; found), or 1 (either non-empty diff or the diff is run -;; asynchronously). +;; Insert the diff for FILE into BUFFER, or the *vc-diff* buffer if +;; BUFFER is nil. If REV1 and REV2 are non-nil, report differences +;; from REV1 to REV2. If REV1 is nil, use the current workfile +;; version (as found in the repository) as the older version; if +;; REV2 is nil, use the current workfile contents as the newer +;; version. This function should pass the value of (vc-switches +;; BACKEND 'diff) to the backend command. It should return a status +;; of either 0 (no differences found), or 1 (either non-empty diff +;; or the diff is run asynchronously). ;; ;; - diff-tree (dir &optional rev1 rev2) ;; @@ -347,6 +348,13 @@ ;; time with hours, minutes, and seconds included. Probably safe to ;; ignore. Return the current-time, in units of fractional days. ;; +;; - annotate-extract-revision-at-line () +;; +;; Only required if `annotate-command' is defined for the backend. +;; Invoked from a buffer in vc-annotate-mode, return the revision +;; corresponding to the current line, or nil if there is no revision +;; corresponding to the current line. +;; ;; SNAPSHOT SYSTEM ;; ;; - create-snapshot (dir name branchp) @@ -392,7 +400,13 @@ ;; ;; - previous-version (file rev) ;; -;; Return the version number that precedes REV for FILE. +;; Return the version number that precedes REV for FILE, or nil if no such +;; version exists. +;; +;; - next-version (file rev) +;; +;; Return the version number that follows REV for FILE, or nil if no such +;; version exists. ;; ;; - check-headers () ;; @@ -419,6 +433,15 @@ ;; repository. If this function is not provided, the renaming ;; will be done by (vc-delete-file old) and (vc-register new). ;; +;; - find-file-hook () +;; +;; Operation called in current buffer when opening a file. This can +;; be used by the backend to setup some local variables it might need. +; +;; - find-file-not-found-hook () +;; +;; Operation called in current buffer when opening a non-existing file. +;; By default, this asks the user if she wants to check out the file. ;;; Code: @@ -631,6 +654,14 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'." m) "Local keymap used for VC-Annotate mode.") +(define-key vc-annotate-mode-map "A" 'vc-annotate-revision-previous-to-line) +(define-key vc-annotate-mode-map "D" 'vc-annotate-show-diff-revision-at-line) +(define-key vc-annotate-mode-map "J" 'vc-annotate-revision-at-line) +(define-key vc-annotate-mode-map "L" 'vc-annotate-show-log-revision-at-line) +(define-key vc-annotate-mode-map "N" 'vc-annotate-next-version) +(define-key vc-annotate-mode-map "P" 'vc-annotate-prev-version) +(define-key vc-annotate-mode-map "W" 'vc-annotate-workfile-version) + (defvar vc-annotate-mode-menu nil "Local keymap used for VC-Annotate mode's menu bar menu.") @@ -714,9 +745,10 @@ The keys are \(BUFFER . BACKEND\). See also `vc-annotate-get-backend'.") (substring rev (match-beginning 0) (match-end 0))) (defun vc-default-previous-version (backend file rev) - "Guess the version number immediately preceding REV for FILE. -This default implementation works for .-style version numbers -as used by RCS and CVS." + "Return the version number immediately preceding REV for FILE, +or nil if there is no previous version. This default +implementation works for .-style version numbers as +used by RCS and CVS." (let ((branch (vc-branch-part rev)) (minor-num (string-to-number (vc-minor-part rev)))) (when branch @@ -731,6 +763,16 @@ as used by RCS and CVS." ;; return version of starting point (vc-branch-part branch)))))) +(defun vc-default-next-version (backend file rev) + "Return the version number immediately following REV for FILE, +or nil if there is no next version. This default implementation +works for .-style version numbers as used by RCS +and CVS." + (when (not (string= rev (vc-workfile-version file))) + (let ((branch (vc-branch-part rev)) + (minor-num (string-to-number (vc-minor-part rev)))) + (concat branch "." (number-to-string (1+ minor-num)))))) + ;; File property caching (defun vc-clear-context () @@ -772,11 +814,11 @@ somebody else, signal error." (let ((filevar (make-symbol "file"))) `(let ((,filevar (expand-file-name ,file))) (or (vc-backend ,filevar) - (error (format "File not under version control: `%s'" file))) + (error "File not under version control: `%s'" file)) (unless (vc-editable-p ,filevar) (let ((state (vc-state ,filevar))) (if (stringp state) - (error (format "`%s' is locking `%s'" state ,filevar)) + (error "`%s' is locking `%s'" state ,filevar) (vc-checkout ,filevar t)))) (save-excursion ,@body) @@ -1635,10 +1677,10 @@ saving the buffer." (message "No changes to %s since latest version" file) (vc-version-diff file nil nil))))) -(defun vc-version-diff (file rel1 rel2) - "List the differences between FILE's versions REL1 and REL2. -If REL1 is empty or nil it means to use the current workfile version; -REL2 empty or nil means the current file contents. FILE may also be +(defun vc-version-diff (file rev1 rev2) + "List the differences between FILE's versions REV1 and REV2. +If REV1 is empty or nil it means to use the current workfile version; +REV2 empty or nil means the current file contents. FILE may also be a directory, in that case, generate diffs between the correponding versions of all registered files in or below it." (interactive @@ -1647,7 +1689,7 @@ versions of all registered files in or below it." "File or dir to diff: (default visited file) " "File or dir to diff: ") default-directory buffer-file-name t))) - (rel1-default nil) (rel2-default nil)) + (rev1-default nil) (rev2-default nil)) ;; compute default versions based on the file state (cond ;; if it's a directory, don't supply any version default @@ -1655,52 +1697,54 @@ versions of all registered files in or below it." nil) ;; if the file is not up-to-date, use current version as older version ((not (vc-up-to-date-p file)) - (setq rel1-default (vc-workfile-version file))) + (setq rev1-default (vc-workfile-version file))) ;; if the file is not locked, use last and previous version as default (t - (setq rel1-default (vc-call previous-version file + (setq rev1-default (vc-call previous-version file (vc-workfile-version file))) - (if (string= rel1-default "") (setq rel1-default nil)) - (setq rel2-default (vc-workfile-version file)))) + (if (string= rev1-default "") (setq rev1-default nil)) + (setq rev2-default (vc-workfile-version file)))) ;; construct argument list (list file - (read-string (if rel1-default + (read-string (if rev1-default (concat "Older version: (default " - rel1-default ") ") + rev1-default ") ") "Older version: ") - nil nil rel1-default) - (read-string (if rel2-default + nil nil rev1-default) + (read-string (if rev2-default (concat "Newer version: (default " - rel2-default ") ") + rev2-default ") ") "Newer version (default: current source): ") - nil nil rel2-default)))) + nil nil rev2-default)))) (if (file-directory-p file) ;; recursive directory diff (progn (vc-setup-buffer "*vc-diff*") - (if (string-equal rel1 "") (setq rel1 nil)) - (if (string-equal rel2 "") (setq rel2 nil)) + (if (string-equal rev1 "") (setq rev1 nil)) + (if (string-equal rev2 "") (setq rev2 nil)) (let ((inhibit-read-only t)) (insert "Diffs between " - (or rel1 "last version checked in") + (or rev1 "last version checked in") " and " - (or rel2 "current workfile(s)") + (or rev2 "current workfile(s)") ":\n\n")) (let ((dir (file-name-as-directory file))) (vc-call-backend (vc-responsible-backend dir) - 'diff-tree dir rel1 rel2)) + 'diff-tree dir rev1 rev2)) (vc-exec-after `(let ((inhibit-read-only t)) (insert "\nEnd of diffs.\n")))) - ;; single file diff - (vc-diff-internal file rel1 rel2)) + ;; Single file diff. It is important that the vc-controlled buffer + ;; is still current at this time, because any local settings in that + ;; buffer should affect the diff command. + (vc-diff-internal file rev1 rev2)) (set-buffer "*vc-diff*") (if (and (zerop (buffer-size)) (not (get-buffer-process (current-buffer)))) (progn - (if rel1 - (if rel2 - (message "No changes to %s between %s and %s" file rel1 rel2) - (message "No changes to %s since %s" file rel1)) + (if rev1 + (if rev2 + (message "No changes to %s between %s and %s" file rev1 rev2) + (message "No changes to %s since %s" file rev1)) (message "No changes to %s since latest version" file)) nil) (pop-to-buffer (current-buffer)) @@ -1714,29 +1758,40 @@ versions of all registered files in or below it." (shrink-window-if-larger-than-buffer))) t)) -(defun vc-diff-internal (file rel1 rel2) - "Run diff to compare FILE's revisions REL1 and REL2. -Output goes to the current buffer, which is assumed properly set up. -The exit status of the diff command is returned. +(defun vc-diff-label (file file-rev rev) + (concat (file-relative-name file) + (format-time-string "\t%d %b %Y %T %z\t" + (nth 5 (file-attributes file-rev))) + rev)) + +(defun vc-diff-internal (file rev1 rev2) + "Run diff to compare FILE's revisions REV1 and REV2. +Diff output goes to the *vc-diff* buffer. The exit status of the diff +command is returned. This function takes care to set up a proper coding system for diff output. If both revisions are available as local files, then it also does not actually call the backend, but performs a local diff." - (if (or (not rel1) (string-equal rel1 "")) - (setq rel1 (vc-workfile-version file))) - (if (string-equal rel2 "") - (setq rel2 nil)) - (let ((file-rel1 (vc-version-backup-file file rel1)) - (file-rel2 (if (not rel2) + (if (or (not rev1) (string-equal rev1 "")) + (setq rev1 (vc-workfile-version file))) + (if (string-equal rev2 "") + (setq rev2 nil)) + (let ((file-rev1 (vc-version-backup-file file rev1)) + (file-rev2 (if (not rev2) file - (vc-version-backup-file file rel2))) + (vc-version-backup-file file rev2))) (coding-system-for-read (vc-coding-system-for-diff file))) - (if (and file-rel1 file-rel2) + (if (and file-rev1 file-rev2) (apply 'vc-do-command "*vc-diff*" 1 "diff" nil (append (vc-switches nil 'diff) - (list (file-relative-name file-rel1) - (file-relative-name file-rel2)))) - (vc-call diff file rel1 rel2)))) + ;; Provide explicit labels like RCS or CVS would do + ;; so diff-mode refers to `file' rather than to + ;; `file-rev1' when trying to find/apply/undo hunks. + (list "-L" (vc-diff-label file file-rev1 rev1) + "-L" (vc-diff-label file file-rev2 rev2) + (file-relative-name file-rev1) + (file-relative-name file-rev2)))) + (vc-call diff file rev1 rev2)))) (defun vc-switches (backend op) @@ -1760,9 +1815,9 @@ actually call the backend, but performs a local diff." (defmacro vc-diff-switches-list (backend) `(vc-switches ',backend 'diff)) (make-obsolete 'vc-diff-switches-list 'vc-switches "21.4") -(defun vc-default-diff-tree (backend dir rel1 rel2) +(defun vc-default-diff-tree (backend dir rev1 rev2) "List differences for all registered files at and below DIR. -The meaning of REL1 and REL2 is the same as for `vc-version-diff'." +The meaning of REV1 and REV2 is the same as for `vc-version-diff'." ;; This implementation does an explicit tree walk, and calls ;; vc-BACKEND-diff directly for each file. An optimization ;; would be to use `vc-diff-internal', so that diffs can be local, @@ -1777,7 +1832,7 @@ The meaning of REL1 and REL2 is the same as for `vc-version-diff'." `(let ((coding-system-for-read (vc-coding-system-for-diff ',f))) (message "Looking at %s" ',f) (vc-call-backend ',(vc-backend f) - 'diff ',f ',rel1 ',rel2)))))) + 'diff ',f ',rev1 ',rev2)))))) (defun vc-coding-system-for-diff (file) "Return the coding system for reading diff output for FILE." @@ -1945,9 +2000,7 @@ See Info node `Merging'." (vc-resynch-buffer file t (not (buffer-modified-p))) (if (zerop status) (message "Merge successful") (smerge-mode 1) - (if (y-or-n-p "Conflicts detected. Resolve them now? ") - (vc-resolve-conflicts name-A name-B) - (message "File contains conflict markers")))) + (message "File contains conflicts."))) ;;;###autoload (defalias 'vc-resolve-conflicts 'smerge-ediff) @@ -2144,7 +2197,7 @@ Called by dired after any portion of a vc-dired buffer has been read in." ;; We cannot remove the top level directory. ;; Just make it look a little nicer. (forward-line 1) - (kill-line) + (or (eobp) (kill-line)) (if (not (dired-next-subdir 1 t)) (goto-char (point-max)))))) (goto-char (point-min))) @@ -2285,13 +2338,33 @@ allowed and simply skipped)." ;; Miscellaneous other entry points ;;;###autoload -(defun vc-print-log () - "List the change log of the current buffer in a window." +(defun vc-print-log (&optional focus-rev) + "List the change log of the current buffer in a window. +If FOCUS-REV is non-nil, leave the point at that revision." (interactive) (vc-ensure-vc-buffer) (let ((file buffer-file-name)) - (vc-call print-log file) - (set-buffer "*vc*") + (or focus-rev (setq focus-rev (vc-workfile-version file))) + ;; Don't switch to the output buffer before running the command, + ;; so that any buffer-local settings in the vc-controlled + ;; buffer can be accessed by the command. + (condition-case err + (progn + (vc-call print-log file "*vc-change-log*") + (set-buffer "*vc-change-log*")) + (wrong-number-of-arguments + ;; If this error came from the above call to print-log, try again + ;; without the optional buffer argument (for backward compatibility). + ;; Otherwise, resignal. + (if (or (not (eq (cadr err) + (indirect-function + (vc-find-backend-function (vc-backend file) + 'print-log)))) + (not (eq (caddr err) 2))) + (signal wrong-number-of-arguments err) + ;; for backward compatibility + (vc-call print-log file) + (set-buffer "*vc*")))) (pop-to-buffer (current-buffer)) (log-view-mode) (vc-exec-after @@ -2307,7 +2380,7 @@ allowed and simply skipped)." ;; move point to the log entry for the current version (vc-call-backend ',(vc-backend file) 'show-log-entry - ',(vc-workfile-version file)) + ',focus-rev) (set-buffer-modified-p nil))))) (defun vc-default-show-log-entry (backend rev) @@ -2453,7 +2526,7 @@ A prefix argument NOREVERT means do not revert the buffer afterwards." ((not (vc-call latest-on-branch-p file)) (error "This is not the latest version; VC cannot cancel it")) ((not (vc-up-to-date-p file)) - (error (substitute-command-keys "File is not up to date; use \\[vc-revert-buffer] to discard changes")))) + (error "%s" (substitute-command-keys "File is not up to date; use \\[vc-revert-buffer] to discard changes")))) (if (null (yes-or-no-p (format "Remove version %s from master? " target))) (error "Aborted") (setq norevert (or norevert (not @@ -2778,6 +2851,11 @@ Uses `rcs2log' which only works for RCS and CVS." (defvar vc-annotate-ratio nil "Global variable.") (defvar vc-annotate-backend nil "Global variable.") +;; internal buffer-local variables +(defvar vc-annotate-parent-file nil) +(defvar vc-annotate-parent-rev nil) +(defvar vc-annotate-parent-display-mode nil) + (defconst vc-annotate-font-lock-keywords ;; The fontification is done by vc-annotate-lines instead of font-lock. '((vc-annotate-lines))) @@ -2797,6 +2875,7 @@ menu items." (set (make-local-variable 'truncate-lines) t) (set (make-local-variable 'font-lock-defaults) '(vc-annotate-font-lock-keywords t)) + (view-mode 1) (vc-annotate-add-menu)) (defun vc-annotate-display-default (&optional ratio) @@ -2885,7 +2964,23 @@ cover the range from the oldest annotation to the newest." (unless (eq vc-annotate-display-mode 'fullscale) (vc-annotate-display-select nil 'fullscale)) :style toggle :selected - (eq vc-annotate-display-mode 'fullscale)]))) + (eq vc-annotate-display-mode 'fullscale)]) + (list "--") + (list ["Annotate previous revision" + (call-interactively 'vc-annotate-prev-version)]) + (list ["Annotate next revision" + (call-interactively 'vc-annotate-next-version)]) + (list ["Annotate revision at line" + (vc-annotate-revision-at-line)]) + (list ["Annotate revision previous to line" + (vc-annotate-revision-previous-to-line)]) + (list ["Annotate latest revision" + (vc-annotate-workfile-version)]) + (list ["Show log of revision at line" + (vc-annotate-show-log-revision-at-line)]) + (list ["Show diff of revision at line" + (vc-annotate-show-diff-revision-at-line)]))) + ;; Define the menu (if (or (featurep 'easymenu) (load "easymenu" t)) (easy-menu-define vc-annotate-mode-menu vc-annotate-mode-map @@ -2922,7 +3017,7 @@ use; you may override this using the second optional arg MODE." ;;;; the contents in BUFFER. ;;;###autoload -(defun vc-annotate (prefix) +(defun vc-annotate (prefix &optional revision display-mode) "Display the edit history of the current file using colours. This command creates a buffer that shows, for each line of the current @@ -2949,19 +3044,24 @@ mode-specific menu. `vc-annotate-color-map' and colors. `vc-annotate-background' specifies the background color." (interactive "P") (vc-ensure-vc-buffer) - (let* ((temp-buffer-name (concat "*Annotate " (buffer-name) "*")) + (let* ((temp-buffer-name nil) (temp-buffer-show-function 'vc-annotate-display-select) - (rev (vc-workfile-version buffer-file-name)) + (rev (or revision (vc-workfile-version buffer-file-name))) + (bfn buffer-file-name) (vc-annotate-version - (if prefix (read-string - (format "Annotate from version: (default %s) " rev) - nil nil rev) - rev))) - (if prefix - (setq vc-annotate-display-mode - (float (string-to-number - (read-string "Annotate span days: (default 20) " - nil nil "20"))))) + (if prefix (read-string + (format "Annotate from version: (default %s) " rev) + nil nil rev) + rev))) + (if display-mode + (setq vc-annotate-display-mode display-mode) + (if prefix + (setq vc-annotate-display-mode + (float (string-to-number + (read-string "Annotate span days: (default 20) " + nil nil "20")))))) + (setq temp-buffer-name (format "*Annotate %s (rev %s)*" + (buffer-name) vc-annotate-version)) (setq vc-annotate-backend (vc-backend buffer-file-name)) (message "Annotating...") (if (not (vc-find-backend-function vc-annotate-backend 'annotate-command)) @@ -2972,6 +3072,13 @@ colors. `vc-annotate-background' specifies the background color." buffer-file-name (get-buffer temp-buffer-name) vc-annotate-version)) + (save-excursion + (set-buffer temp-buffer-name) + (set (make-local-variable 'vc-annotate-parent-file) bfn) + (set (make-local-variable 'vc-annotate-parent-rev) vc-annotate-version) + (set (make-local-variable 'vc-annotate-parent-display-mode) + vc-annotate-display-mode)) + ;; Don't use the temp-buffer-name until the buffer is created ;; (only after `with-output-to-temp-buffer'.) (setq vc-annotate-buffers @@ -2979,6 +3086,137 @@ colors. `vc-annotate-background' specifies the background color." (list (cons (get-buffer temp-buffer-name) vc-annotate-backend)))) (message "Annotating... done"))) +(defun vc-annotate-prev-version (prefix) + "Visit the annotation of the version previous to this one. + +With a numeric prefix argument, annotate the version that many +versions previous." + (interactive "p") + (vc-annotate-warp-version (- 0 prefix))) + +(defun vc-annotate-next-version (prefix) + "Visit the annotation of the version after this one. + +With a numeric prefix argument, annotate the version that many +versions after." + (interactive "p") + (vc-annotate-warp-version prefix)) + +(defun vc-annotate-workfile-version () + "Visit the annotation of the workfile version of this file." + (interactive) + (if (not (equal major-mode 'vc-annotate-mode)) + (message "Cannot be invoked outside of a vc annotate buffer") + (let ((warp-rev (vc-workfile-version vc-annotate-parent-file))) + (if (equal warp-rev vc-annotate-parent-rev) + (message "Already at version %s" warp-rev) + (vc-annotate-warp-version warp-rev))))) + +(defun vc-annotate-extract-revision-at-line () + "Extract the revision number of the current line." + ;; This function must be invoked from a buffer in vc-annotate-mode + (save-window-excursion + (vc-ensure-vc-buffer) + (setq vc-annotate-backend (vc-backend buffer-file-name))) + (vc-call-backend vc-annotate-backend 'annotate-extract-revision-at-line)) + +(defun vc-annotate-revision-at-line () + "Visit the annotation of the version identified in the current line." + (interactive) + (if (not (equal major-mode 'vc-annotate-mode)) + (message "Cannot be invoked outside of a vc annotate buffer") + (let ((rev-at-line (vc-annotate-extract-revision-at-line))) + (if (not rev-at-line) + (message "Cannot extract revision number from the current line") + (if (equal rev-at-line vc-annotate-parent-rev) + (message "Already at version %s" rev-at-line) + (vc-annotate-warp-version rev-at-line)))))) + +(defun vc-annotate-revision-previous-to-line () + "Visit the annotation of the version before the version at line." + (interactive) + (if (not (equal major-mode 'vc-annotate-mode)) + (message "Cannot be invoked outside of a vc annotate buffer") + (let ((rev-at-line (vc-annotate-extract-revision-at-line)) + (prev-rev nil)) + (if (not rev-at-line) + (message "Cannot extract revision number from the current line") + (setq prev-rev + (vc-call previous-version vc-annotate-parent-file rev-at-line)) + (vc-annotate-warp-version prev-rev))))) + +(defun vc-annotate-show-log-revision-at-line () + "Visit the log of the version at line." + (interactive) + (if (not (equal major-mode 'vc-annotate-mode)) + (message "Cannot be invoked outside of a vc annotate buffer") + (let ((rev-at-line (vc-annotate-extract-revision-at-line))) + (if (not rev-at-line) + (message "Cannot extract revision number from the current line") + (vc-print-log rev-at-line))))) + +(defun vc-annotate-show-diff-revision-at-line () + "Visit the diff of the version at line from its previous version." + (interactive) + (if (not (equal major-mode 'vc-annotate-mode)) + (message "Cannot be invoked outside of a vc annotate buffer") + (let ((rev-at-line (vc-annotate-extract-revision-at-line)) + (prev-rev nil)) + (if (not rev-at-line) + (message "Cannot extract revision number from the current line") + (setq prev-rev + (vc-call previous-version vc-annotate-parent-file rev-at-line)) + (if (not prev-rev) + (message "Cannot diff from any version prior to %s" rev-at-line) + (save-window-excursion + (vc-version-diff vc-annotate-parent-file prev-rev rev-at-line)) + (switch-to-buffer "*vc-diff*")))))) + +(defun vc-annotate-warp-version (revspec) + "Annotate the version described by REVSPEC. + +If REVSPEC is a positive integer, warp that many versions +forward, if possible, otherwise echo a warning message. If +REVSPEC is a negative integer, warp that many versions backward, +if possible, otherwise echo a warning message. If REVSPEC is a +string, then it describes a revision number, so warp to that +revision." + (if (not (equal major-mode 'vc-annotate-mode)) + (message "Cannot be invoked outside of a vc annotate buffer") + (let* ((oldline (line-number-at-pos)) + (revspeccopy revspec) + (newrev nil)) + (cond + ((and (integerp revspec) (> revspec 0)) + (setq newrev vc-annotate-parent-rev) + (while (and (> revspec 0) newrev) + (setq newrev (vc-call next-version + vc-annotate-parent-file newrev)) + (setq revspec (1- revspec))) + (if (not newrev) + (message "Cannot increment %d versions from version %s" + revspeccopy vc-annotate-parent-rev))) + ((and (integerp revspec) (< revspec 0)) + (setq newrev vc-annotate-parent-rev) + (while (and (< revspec 0) newrev) + (setq newrev (vc-call previous-version + vc-annotate-parent-file newrev)) + (setq revspec (1+ revspec))) + (if (not newrev) + (message "Cannot decrement %d versions from version %s" + (- 0 revspeccopy) vc-annotate-parent-rev))) + ((stringp revspec) (setq newrev revspec)) + (t (error "Invalid argument to vc-annotate-warp-version"))) + (when newrev + (save-window-excursion + (find-file vc-annotate-parent-file) + (vc-annotate nil newrev vc-annotate-parent-display-mode)) + (kill-buffer (current-buffer)) ;; kill the buffer we started from + (switch-to-buffer (car (car (last vc-annotate-buffers)))) + (goto-line (min oldline (progn (goto-char (point-max)) + (previous-line) + (line-number-at-pos)))))))) + (defun vc-annotate-car-last-cons (a-list) "Return car of last cons in association list A-LIST." (if (not (eq nil (cdr a-list))) @@ -3467,4 +3705,5 @@ Invoke FUNC f ARGS on each VC-managed file f underneath it." ;; ;; Thus, there is no explicit recovery code. +;;; arch-tag: ca82c1de-3091-4e26-af92-460abc6213a6 ;;; vc.el ends here diff --git a/lisp/vcursor.el b/lisp/vcursor.el index 6f17efd19c..4de92f02f0 100644 --- a/lisp/vcursor.el +++ b/lisp/vcursor.el @@ -314,7 +314,7 @@ ;; - The logic in vcursor-find-window is rather complicated and ;; therefore bug-prone, though in practice it seems to work OK. ;; -;; Possible enhnacements: +;; Possible enhancements: ;; It would be easy to implement vcursor-push (save vcursor position ;; as mark and deactivate) and vcursor-pop (deactivate vcursor and ;; move to last pushed position) functions. @@ -342,9 +342,14 @@ disable the vcursor." :type '(choice (const t) (const nil) (const copy)) :group 'vcursor) +(defcustom vcursor-modifiers (list 'control 'shift) + "*A list of modifiers that are used to define vcursor key bindings." + :type '(repeat symbol) + :group 'vcursor) + ;; Needed for defcustom, must be up here (defun vcursor-cs-binding (base &optional meta) - (vector (let ((key (list 'control 'shift (intern base)))) + (vector (let ((key (append vcursor-modifiers (list (intern base))))) (if meta (cons 'meta key) key)))) @@ -1161,4 +1166,5 @@ Disabling the vcursor automatically turns this off." (provide 'vcursor) +;;; arch-tag: cdfe1cdc-2c46-4046-88e4-ed57d20f7aca ;;; vcursor.el ends here diff --git a/lisp/version.el b/lisp/version.el index 17191f9a1c..ef6a40f540 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -62,6 +62,8 @@ to the system configuration; look at `system-configuration' instead." (cond ((featurep 'motif) (concat ", " (substring motif-version-string 4))) ((featurep 'x-toolkit) ", X toolkit") + ((featurep 'gtk) + (concat ", GTK+ Version " gtk-version-string)) (t "")) (if (and (boundp 'x-toolkit-scroll-bars) (memq x-toolkit-scroll-bars '(xaw xaw3d))) @@ -88,4 +90,5 @@ to the system configuration; look at `system-configuration' instead." ;;version-control: never ;;End: +;;; arch-tag: e60dc445-6218-4a4c-a7df-f15a818642a0 ;;; version.el ends here diff --git a/lisp/view.el b/lisp/view.el index 281230950b..1ee6014c73 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -1002,4 +1002,5 @@ for highlighting the match that is found." (provide 'view) +;;; arch-tag: 6d0ace36-1d12-4de3-8de3-1fa3231636d7 ;;; view.el ends here diff --git a/lisp/vms-patch.el b/lisp/vms-patch.el index 09c44bfa09..48174f4123 100644 --- a/lisp/vms-patch.el +++ b/lisp/vms-patch.el @@ -193,4 +193,5 @@ following bindings are established. All other Emacs commands are still available." t) +;;; arch-tag: c178494e-2c37-4d02-99b7-e47e615656cf ;;; vms-patch.el ends here diff --git a/lisp/vmsproc.el b/lisp/vmsproc.el index 14f9b2903a..da8715e860 100644 --- a/lisp/vmsproc.el +++ b/lisp/vmsproc.el @@ -145,4 +145,5 @@ line to the last line for resubmission." (define-key esc-map "$" 'subprocess-command) +;;; arch-tag: 600b2512-f903-4887-bcd2-e76b306f5b66 ;;; vmsproc.el ends here diff --git a/lisp/vt-control.el b/lisp/vt-control.el index 0ffc275704..edc4f92734 100644 --- a/lisp/vt-control.el +++ b/lisp/vt-control.el @@ -106,4 +106,5 @@ (provide 'vt-control) +;;; arch-tag: d4fed1bf-2524-4ba1-a4fe-86bca3d928a2 ;;; vt-control.el ends here diff --git a/lisp/vt100-led.el b/lisp/vt100-led.el index 88819da9c2..d78960a578 100644 --- a/lisp/vt100-led.el +++ b/lisp/vt100-led.el @@ -67,4 +67,5 @@ Element 0 is not used.") (provide 'vt100-led) +;;; arch-tag: 346e6480-5e31-4234-aafe-257cea4a36d1 ;;; vt100-led.el ends here diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index a270e5d4dc..54f051ef5e 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el @@ -459,4 +459,5 @@ they were unset." (setq interprogram-paste-function 'x-get-selection-value) +;;; arch-tag: c49b48cc-0f4f-454f-a274-c2dc34815e14 ;;; w32-fns.el ends here diff --git a/lisp/w32-vars.el b/lisp/w32-vars.el index ffdf50a7d1..72c4d30cc8 100644 --- a/lisp/w32-vars.el +++ b/lisp/w32-vars.el @@ -155,4 +155,5 @@ This is in addition to the primary selection." :group 'killing) +;;; arch-tag: ee2394fb-9db7-4c15-a8f0-66b47f4a2bb1 ;;; w32-vars.el ends here diff --git a/lisp/whitespace.el b/lisp/whitespace.el index a833e85fa3..e330febf93 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -5,7 +5,6 @@ ;; Author: Rajesh Vaidheeswarran ;; Keywords: convenience -;; $Id: whitespace.el,v 1.24 2003/06/11 03:50:45 rv Exp $ ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify @@ -33,7 +32,7 @@ ;; 1. Leading space (empty lines at the top of a file). ;; 2. Trailing space (empty lines at the end of a file). ;; 3. Indentation space (8 or more spaces at beginning of line, that should be -;; replaced with TABS). +;; replaced with TABS). ;; 4. Spaces followed by a TAB. (Almost always, we never want that). ;; 5. Spaces or TABS at the end of a line. ;; @@ -87,7 +86,7 @@ ;;; Code: -(defvar whitespace-version "3.3" "Version of the whitespace library.") +(defvar whitespace-version "3.4" "Version of the whitespace library.") (defvar whitespace-all-buffer-files nil "An associated list of buffers and files checked for whitespace cleanliness. @@ -236,6 +235,12 @@ It can be overriden by setting a buffer local variable :type 'string :group 'whitespace) +(defcustom whitespace-clean-msg "clean." + "If non-nil, this message will be displayed after a whitespace check +determines a file to be clean." + :type 'string + :group 'whitespace) + (defcustom whitespace-abort-on-error nil "While writing a file, abort if the file is unclean. If `whitespace-auto-cleanup' is set, that takes precedence over this @@ -503,8 +508,9 @@ and: (concat "!" whitespace-unchecked) "")) whitespace-filename))) - (if (not quiet) - (message "%s clean" whitespace-filename)))))))) + (if (and (not quiet) (not (equal whitespace-clean-msg ""))) + (message "%s %s" whitespace-filename + whitespace-clean-msg)))))))) (if whitespace-error t nil))) @@ -816,7 +822,7 @@ If timer is not set, then set it to scan the files in ;;;###autoload (define-minor-mode whitespace-global-mode "Toggle using Whitespace mode in new buffers. -With ARG, turn the mode on if and only iff ARG is positive. +With ARG, turn the mode on iff ARG is positive. When this mode is active, `whitespace-buffer' is added to `find-file-hook' and `kill-buffer-hook'." @@ -851,4 +857,6 @@ This is meant to be added buffer-locally to `write-file-functions'." (remove-hook 'kill-buffer-hook 'whitespace-buffer)) (provide 'whitespace) + +;;; arch-tag: 4ff44e87-b63c-402d-95a6-15e51e58bd0c ;;; whitespace.el ends here diff --git a/lisp/wid-browse.el b/lisp/wid-browse.el index ed90496563..3878289b46 100644 --- a/lisp/wid-browse.el +++ b/lisp/wid-browse.el @@ -297,4 +297,5 @@ With arg, turn widget mode on if and only if arg is positive." (provide 'wid-browse) +;;; arch-tag: d5ffb18f-8984-4735-8502-edf70456db21 ;;; wid-browse.el ends here diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index c33790a511..dd55b35caa 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -1,6 +1,6 @@ ;;; wid-edit.el --- Functions for creating and using widgets -*-byte-compile-dynamic: t;-*- ;; -;; Copyright (C) 1996,97,1999,2000,01,02,2003 Free Software Foundation, Inc. +;; Copyright (C) 1996,97,1999,2000,01,02,2003, 2004 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen ;; Maintainer: FSF @@ -1267,6 +1267,42 @@ Optional EVENT is the event that triggered the action." found (widget-apply child :validate))) found)) +(defun widget-child-value-get (widget) + "Get the value of the first member of :children in WIDGET." + (widget-value (car (widget-get widget :children)))) + +(defun widget-child-value-inline (widget) + "Get the inline value of the first member of :children in WIDGET." + (widget-apply (car (widget-get widget :children)) :value-inline)) + +(defun widget-child-validate (widget) + "The result of validating the first member of :children in WIDGET." + (widget-apply (car (widget-get widget :children)) :validate)) + +(defun widget-type-value-create (widget) + "Convert and instantiate the value of the :type attribute of WIDGET. +Store the newly created widget in the :children attribute. + +The value of the :type attribute should be an unconverted widget type." + (let ((value (widget-get widget :value)) + (type (widget-get widget :type))) + (widget-put widget :children + (list (widget-create-child-value widget + (widget-convert type) + value))))) + +(defun widget-type-default-get (widget) + "Get default value from the :type attribute of WIDGET. + +The value of the :type attribute should be an unconverted widget type." + (widget-default-get (widget-convert (widget-get widget :type)))) + +(defun widget-type-match (widget value) + "Non-nil if the :type value of WIDGET matches VALUE. + +The value of the :type attribute should be an unconverted widget type." + (widget-apply (widget-convert (widget-get widget :type)) :match value)) + (defun widget-types-copy (widget) "Copy :args as widget types in WIDGET." (widget-put widget :args (mapcar 'widget-copy (widget-get widget :args))) @@ -1312,6 +1348,7 @@ Optional EVENT is the event that triggered the action." :copy 'identity :value-set 'widget-default-value-set :value-inline 'widget-default-value-inline + :value-delete 'ignore :default-get 'widget-default-default-get :menu-tag-get 'widget-default-menu-tag-get :validate #'ignore @@ -1465,6 +1502,7 @@ If that does not exists, call the value of `widget-complete-field'." (inhibit-modification-hooks t) (inhibit-read-only t)) (widget-apply widget :value-delete) + (widget-children-value-delete widget) (when inactive-overlay (delete-overlay inactive-overlay)) (when button-overlay @@ -1861,9 +1899,8 @@ the earlier input." :tag "choice" :void '(item :format "invalid (%t)\n") :value-create 'widget-choice-value-create - :value-delete 'widget-children-value-delete - :value-get 'widget-choice-value-get - :value-inline 'widget-choice-value-inline + :value-get 'widget-child-value-get + :value-inline 'widget-child-value-inline :default-get 'widget-choice-default-get :mouse-down-action 'widget-choice-mouse-down-action :action 'widget-choice-action @@ -1900,14 +1937,6 @@ the earlier input." widget void :value value))) (widget-put widget :choice void)))))) -(defun widget-choice-value-get (widget) - ;; Get value of the child widget. - (widget-value (car (widget-get widget :children)))) - -(defun widget-choice-value-inline (widget) - ;; Get value of the child widget. - (widget-apply (car (widget-get widget :children)) :value-inline)) - (defun widget-choice-default-get (widget) ;; Get default for the first choice. (widget-default-get (car (widget-get widget :args)))) @@ -2098,7 +2127,6 @@ when he invoked the menu." :entry-format "%b %v" :greedy nil :value-create 'widget-checklist-value-create - :value-delete 'widget-children-value-delete :value-get 'widget-checklist-value-get :validate 'widget-checklist-validate :match 'widget-checklist-match @@ -2275,7 +2303,6 @@ Return an alist of (TYPE MATCH)." :format "%v" :entry-format "%b %v" :value-create 'widget-radio-value-create - :value-delete 'widget-children-value-delete :value-get 'widget-radio-value-get :value-inline 'widget-radio-value-inline :value-set 'widget-radio-value-set @@ -2465,7 +2492,6 @@ Return an alist of (TYPE MATCH)." :format-handler 'widget-editable-list-format-handler :entry-format "%i %d %v" :value-create 'widget-editable-list-value-create - :value-delete 'widget-children-value-delete :value-get 'widget-editable-list-value-get :validate 'widget-children-validate :match 'widget-editable-list-match @@ -2636,7 +2662,6 @@ Return an alist of (TYPE MATCH)." :copy 'widget-types-copy :format "%v" :value-create 'widget-group-value-create - :value-delete 'widget-children-value-delete :value-get 'widget-editable-list-value-get :default-get 'widget-group-default-get :validate 'widget-children-validate @@ -2802,7 +2827,6 @@ link for that string." "A documentation string." :format "%v" :action 'widget-documentation-string-action - :value-delete 'widget-children-value-delete :value-create 'widget-documentation-string-value-create) (defun widget-documentation-string-value-create (widget) @@ -3283,6 +3307,62 @@ To use this type, you must define :match or :match-alternatives." (widget-group-match widget (widget-apply widget :value-to-internal value)))) +;;; The `lazy' Widget. +;; +;; Recursive datatypes. + +(define-widget 'lazy 'default + "Base widget for recursive datastructures. + +The `lazy' widget will, when instantiated, contain a single inferior +widget, of the widget type specified by the :type parameter. The +value of the `lazy' widget is the same as the value of the inferior +widget. When deriving a new widget from the 'lazy' widget, the :type +parameter is allowed to refer to the widget currently being defined, +thus allowing recursive datastructures to be described. + +The :type parameter takes the same arguments as the defcustom +parameter with the same name. + +Most composite widgets, i.e. widgets containing other widgets, does +not allow recursion. That is, when you define a new widget type, none +of the inferior widgets may be of the same type you are currently +defining. + +In Lisp, however, it is custom to define datastructures in terms of +themselves. A list, for example, is defined as either nil, or a cons +cell whose cdr itself is a list. The obvious way to translate this +into a widget type would be + + (define-widget 'my-list 'choice + \"A list of sexps.\" + :tag \"Sexp list\" + :args '((const nil) (cons :value (nil) sexp my-list))) + +Here we attempt to define my-list as a choice of either the constant +nil, or a cons-cell containing a sexp and my-lisp. This will not work +because the `choice' widget does not allow recursion. + +Using the `lazy' widget you can overcome this problem, as in this +example: + + (define-widget 'sexp-list 'lazy + \"A list of sexps.\" + :tag \"Sexp list\" + :type '(choice (const nil) (cons :value (nil) sexp sexp-list)))" + :format "%{%t%}: %v" + ;; We don't convert :type because we want to allow recursive + ;; datastructures. This is slow, so we should not create speed + ;; critical widgets by deriving from this. + :convert-widget 'widget-value-convert-widget + :value-create 'widget-type-value-create + :value-get 'widget-child-value-get + :value-inline 'widget-child-value-inline + :default-get 'widget-type-default-get + :match 'widget-type-match + :validate 'widget-child-validate) + + ;;; The `plist' Widget. ;; ;; Property lists. @@ -3519,11 +3599,11 @@ To use this type, you must define :match or :match-alternatives." (help-echo (and widget (widget-get widget :help-echo)))) (if (functionp help-echo) (setq help-echo (funcall help-echo widget))) - (if (stringp help-echo) - (message "%s" help-echo)))) + (if help-echo (message "%s" (eval help-echo))))) ;;; The End: (provide 'wid-edit) +;;; arch-tag: a076e75e-18a1-4b46-8be5-3f317bcbc707 ;;; wid-edit.el ends here diff --git a/lisp/widget.el b/lisp/widget.el index 45b72acb27..f7e7d5d899 100644 --- a/lisp/widget.el +++ b/lisp/widget.el @@ -95,4 +95,5 @@ The third argument DOC is a documentation string for the widget." (provide 'widget) +;;; arch-tag: 932c71a3-9aeb-4827-a293-8b88b26d5c58 ;;; widget.el ends here diff --git a/lisp/windmove.el b/lisp/windmove.el index d6dd84e5b1..7008b86335 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -608,4 +608,5 @@ Default MODIFIER is 'shift." (provide 'windmove) +;;; arch-tag: 56267432-bf1a-4296-a9a0-85c6bd9f2375 ;;; windmove.el ends here diff --git a/lisp/window.el b/lisp/window.el index 3f533940a1..91b91cfb15 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -1,6 +1,6 @@ ;;; window.el --- GNU Emacs window commands aside from those written in C -;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002 +;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002, 2004 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -75,6 +75,23 @@ If ALL-FRAMES is neither nil nor t, count only the selected frame." (eq base-window (next-window base-window (if nomini 'arg) all-frames)))) +(defun window-current-scroll-bars (&optional window) + "Return the current scroll-bar settings in window WINDOW. +Value is a cons (VERTICAL . HORISONTAL) where VERTICAL specifies the +current location of the vertical scroll-bars (left, right, or nil), +and HORISONTAL specifies the current location of the horisontal scroll +bars (top, bottom, or nil)." + (let ((vert (nth 2 (window-scroll-bars window))) + (hor nil)) + (when (or (eq vert t) (eq hor t)) + (let ((fcsb (frame-current-scroll-bars + (window-frame (or window (selected-window)))))) + (if (eq vert t) + (setq vert (car fcsb))) + (if (eq hor t) + (setq hor (cdr fcsb))))) + (cons vert hor))) + (defun walk-windows (proc &optional minibuf all-frames) "Cycle through all visible windows, calling PROC for each one. PROC is called with a window as argument. @@ -171,13 +188,11 @@ even if it is inactive." (defun window-safely-shrinkable-p (&optional window) "Non-nil if the WINDOW can be shrunk without shrinking other windows. If WINDOW is nil or omitted, it defaults to the currently selected window." - (save-selected-window - (when window (select-window window)) - (or (and (not (eq window (frame-first-window))) - (= (car (window-edges)) - (car (window-edges (previous-window))))) - (= (car (window-edges)) - (car (window-edges (next-window))))))) + (with-selected-window (or window (selected-window)) + (let ((edges (window-edges))) + (or (= (nth 2 edges) (nth 2 (window-edges (previous-window)))) + (= (nth 0 edges) (nth 0 (window-edges (next-window)))))))) + (defun balance-windows () "Make all visible windows the same height (approximately)." @@ -532,11 +547,18 @@ Return non-nil if the window was shrunk." (defun kill-buffer-and-window () "Kill the current buffer and delete the selected window." (interactive) - (if (yes-or-no-p (format "Kill buffer `%s'? " (buffer-name))) - (let ((buffer (current-buffer))) - (delete-window (selected-window)) - (kill-buffer buffer)) - (error "Aborted"))) + (let ((window-to-delete (selected-window)) + (delete-window-hook (lambda () + (condition-case nil + (delete-window) + (error nil))))) + (add-hook 'kill-buffer-hook delete-window-hook t t) + (if (kill-buffer (current-buffer)) + ;; If `delete-window' failed before, we rerun it to regenerate + ;; the error so it can be seen in the minibuffer. + (when (eq (selected-window) window-to-delete) + (delete-window)) + (remove-hook 'kill-buffer-hook delete-window-hook t)))) (defun quit-window (&optional kill window) "Quit the current buffer. Bury it, and maybe delete the selected frame. @@ -602,4 +624,5 @@ and the buffer that is killed or buried is the one in that window." (define-key ctl-x-map "+" 'balance-windows) (define-key ctl-x-4-map "0" 'kill-buffer-and-window) +;;; arch-tag: b508dfcc-c353-4c37-89fa-e773fe10cea9 ;;; window.el ends here diff --git a/lisp/winner.el b/lisp/winner.el index 7841ad0d1d..aaca331e7b 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -484,4 +484,5 @@ In other words, \"undo\" changes in window configuration." (provide 'winner) +;;; arch-tag: 686d1c1b-010e-42ca-a192-b5685112418f ;;; winner.el ends here diff --git a/lisp/woman.el b/lisp/woman.el index 06eeb6c56e..d69c631f27 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -539,9 +539,9 @@ Change only via `Customization' or the function `add-hook'." (mapcar 'woman-Cyg-to-Win path) path)) "*List of dirs to search and/or files to try for man config file. -A trailing separator (`/' for UNIX etc.) on directories is optional -and the filename used if a directory is specified is the first to -match the regexp \"man.*\\.conf\". +A trailing separator (`/' for UNIX etc.) on directories is optional, +and the filename is used if a directory specified is the first to +contain the strings \"man\" and \".conf\" (in that order). If MANPATH is not set but a config file is found then it is parsed instead to provide a default value for `woman-manpath'." :type '(repeat string) @@ -554,7 +554,9 @@ Look in `woman-man.conf-path' and return a value for `woman-manpath'. Concatenate data from all lines in the config file of the form MANPATH /usr/man or - MANDATORY_MANPATH /usr/man" + MANDATORY_MANPATH /usr/man +or + OPTIONAL_MANPATH /usr/man" ;; Functionality suggested by Charles Curley. (let ((path woman-man.conf-path) file manpath) @@ -574,7 +576,7 @@ or (while (re-search-forward ;; `\(?: ... \)' is a "shy group" "\ -^[ \t]*\\(?:MANDATORY_\\)?MANPATH[ \t]+\\(\\S-+\\)" nil t) +^[ \t]*\\(?:MANDATORY_\\|OPTIONAL_\\)?MANPATH[ \t]+\\(\\S-+\\)" nil t) (setq manpath (cons (match-string 1) manpath))) manpath)) )) @@ -807,7 +809,7 @@ Only useful when run on a graphic display such as X or MS-Windows." (defcustom woman-fill-frame nil ;; Based loosely on a suggestion by Theodore Jump: - "*If non-nil then most of the frame width is used." + "*If non-nil then most of the window width is used." :type 'boolean :group 'woman-formatting) @@ -830,10 +832,15 @@ the buffer, which may aid debugging." :type 'boolean :group 'woman-formatting) -(defcustom woman-preserve-ascii nil - "*If non-nil then preserve ASCII characters in the WoMan buffer. -Otherwise, non-ASCII characters (that display as ASCII) may remain. -This is irrelevant unless the buffer is to be saved to a file." +(defcustom woman-preserve-ascii t + "*If non-nil, preserve ASCII characters in the WoMan buffer. +Otherwise, to save time, some backslashes and spaces may be +represented differently (as the values of the variables +`woman-escaped-escape-char' and `woman-unpadded-space-char' +respectively) so that the buffer content is strictly wrong even though +it should display correctly. This should be irrelevant unless the +buffer text is searched, copied or saved to a file." + ;; This option should probably be removed! :type 'boolean :group 'woman-formatting) @@ -1221,7 +1228,7 @@ Optional argument RE-CACHE, if non-nil, forces the cache to be re-read." ;; Was let-bound when file loaded, so ... (setq woman-topic-at-point woman-topic-at-point-default))) (setq topic - (current-word t)) ; only within or adjacent to word + (or (current-word t) "")) ; only within or adjacent to word (assoc topic woman-topic-all-completions)) (setq topic (completing-read @@ -1230,7 +1237,7 @@ Optional argument RE-CACHE, if non-nil, forces the cache to be re-read." ;; Initial input suggestion (was nil), with ;; cursor at left ready to kill suggestion!: (and woman-topic-at-point - (cons (current-word) 0)) ; nearest word + (cons (or (current-word) "") 0)) ; nearest word 'woman-topic-history))) ;; Note that completing-read always returns a string. (if (= (length topic) 0) @@ -1744,7 +1751,7 @@ Leave point at end of new text. Return length of inserted text." Argument EVENT is the invoking mouse event." (interactive "e") ; mouse event (goto-char (posn-point (event-start event))) - (woman (current-word t))) + (woman (or (current-word t) ""))) ;; WoMan menu bar and pop-up menu: (easy-menu-define @@ -2204,7 +2211,7 @@ Currently set only from '\" t in the first line of the source file.") ;; Based loosely on a suggestion by Theodore Jump: (if (or woman-fill-frame (not (and (integerp woman-fill-column) (> woman-fill-column 0)))) - (setq woman-fill-column (- (frame-width) woman-default-indent))) + (setq woman-fill-column (- (window-width) woman-default-indent))) ;; Check for preprocessor requests: (goto-char from) @@ -3232,7 +3239,7 @@ If optional arg CONCAT is non-nil then join arguments." ;; Paragraph .LP/PP/HP/IP/TP and font .B/.BI etc. macros reset font. ;; Should .SH/.SS reset font? ;; Font size setting macros (?) should reset font. - (let ((woman-font-alist woman-font-alist) ; for local updating + (let ((font-alist woman-font-alist) ; for local updating (previous-pos (point)) (previous-font 'default) (current-font 'default)) @@ -3263,15 +3270,15 @@ If optional arg CONCAT is non-nil then join arguments." ;; Get font name: (or font (let ((fontstring (match-string 0))) - (setq font (assoc fontstring woman-font-alist) - ;; NB: woman-font-alist contains VARIABLE NAMES. + (setq font (assoc fontstring font-alist) + ;; NB: font-alist contains VARIABLE NAMES. font (if font (cdr font) (WoMan-warn "Unknown font %s." fontstring) ;; Output this message once only per call ... - (setq woman-font-alist + (setq font-alist (cons (cons fontstring 'woman-unknown-face) - woman-font-alist)) + font-alist)) 'woman-unknown-face) ))) ;; Delete font control line or escape sequence: @@ -4526,4 +4533,5 @@ logging the message." (provide 'woman) +;;; arch-tag: eea35e90-552f-4712-a94b-d9ffd3db7651 ;;; woman.el ends here diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el new file mode 100644 index 0000000000..cdb0a63ace --- /dev/null +++ b/lisp/x-dnd.el @@ -0,0 +1,877 @@ +;;; x-dnd.el --- drag and drop support for X. + +;; Copyright (C) 2004 +;; Free Software Foundation, Inc. + +;; Author: Jan Dj,Ad(Brv +;; Maintainer: FSF +;; Keywords: window, drag, drop + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This file provides the drop part only. Currently supported protocols +;; are XDND, Motif and the old KDE 1.x protocol. + +;;; Code: + +;;; Customizable variables + + +(defcustom x-dnd-test-function 'x-dnd-default-test-function + "The function drag and drop uses to determine if to accept or reject a drop. +The function takes three arguments, WINDOW ACTION and TYPES. +WINDOW is where the mouse is when the function is called. WINDOW may be a +frame if the mouse isn't over a real window (i.e. menu bar, tool bar or +scroll bar). ACTION is the suggested action from the drag and drop source, +one of the symbols move, copy link or ask. TYPES is a list of available types +for the drop. + +The function shall return nil to reject the drop or a cons with two values, +the wanted action as car and the wanted type as cdr. The wanted action +can be copy, move, link, ask or private. +The default value for this variable is `x-dnd-default-test-function'." + :type 'symbol + :group 'x) + +(defcustom x-dnd-protocol-alist + '( + ("^file:///" . x-dnd-open-local-file) ; XDND format. + ("^file://" . x-dnd-open-file) ; URL with host + ("^file:" . x-dnd-open-local-file) ; Old KDE, Motif, Sun + ) + + "The functions to call for different protocols when a drop is made. +This variable is used by `x-dnd-handle-uri-list' and `x-dnd-handle-moz-url'. +The list contains of (REGEXP . FUNCTION) pairs. +The functions shall take two arguments, URL, which is the URL dropped and +ACTION which is the action to be performed for the drop (move, copy, link, +private or ask). +If no match is found here, and the value of `browse-url-browser-function' +is a pair of (REGEXP . FUNCTION), those regexps are tried for a match. +Insertion of text is not handeled by these functions, see `x-dnd-types-alist' +for that. +The function shall return the action done (move, copy, link or private) +if some action was made, or nil if the URL is ignored." + :type 'alist + :group 'x) + + +(defcustom x-dnd-types-alist + '( + ("text/uri-list" . x-dnd-handle-uri-list) + ("text/x-moz-url" . x-dnd-handle-moz-url) + ("_NETSCAPE_URL" . x-dnd-handle-uri-list) + ("FILE_NAME" . x-dnd-handle-file-name) + ("UTF8_STRING" . x-dnd-insert-utf8-text) + ("text/plain;charset=UTF-8" . x-dnd-insert-utf8-text) + ("text/plain;charset=utf-8" . x-dnd-insert-utf8-text) + ("text/unicode" . x-dnd-insert-utf16-text) + ("text/plain" . x-dnd-insert-text) + ("COMPOUND_TEXT" . x-dnd-insert-ctext) + ("STRING" . x-dnd-insert-text) + ("TEXT" . x-dnd-insert-text) + ) + "Which function to call to handle a drop of that type. +If the type for the drop is not present, or the function is nil, +the drop is rejected. The function takes three arguments, WINDOW, ACTION +and DATA. WINDOW is where the drop occured, ACTION is the action for +this drop (copy, move, link, private or ask) as determined by a previous +call to `x-dnd-test-function'. DATA is the drop data. +The function shall return the action used (copy, move, link or private) if drop +is successful, nil if not." + :type 'alist + :group 'x) + +(defcustom x-dnd-open-file-other-window nil + "If non-nil, always use find-file-other-window to open dropped files." + :type 'boolean + :group 'x) + +;; Internal variables + +(defvar x-dnd-known-types + '("text/uri-list" + "text/x-moz-url" + "_NETSCAPE_URL" + "FILE_NAME" + "UTF8_STRING" + "text/plain;charset=UTF-8" + "text/plain;charset=utf-8" + "text/unicode" + "text/plain" + "COMPOUND_TEXT" + "STRING" + "TEXT" + ) + "The types accepted by default for dropped data. +The types are chosen in the order they appear in the list.") + +(defvar x-dnd-current-state nil + "The current state for a drop. +This is an alist with one entry for each display. The value for each display +is a vector that contains the state for drag and drop for that display. +Elements in the vector are: +Last buffer drag was in, +last window drag was in, +types available for drop, +the action suggested by the source, +the type we want for the drop, +the action we want for the drop, +any protocol specific data.") + +(defvar x-dnd-empty-state [nil nil nil nil nil nil nil]) + + + +(defun x-dnd-init-frame (&optional frame) + "Setup drag and drop for FRAME (i.e. create appropriate properties)." + (x-dnd-init-xdnd-for-frame frame) + (x-dnd-init-motif-for-frame frame)) + +(defun x-dnd-get-state-cons-for-frame (frame-or-window) + "Return the entry in x-dnd-current-state for a frame or window." + (let* ((frame (if (framep frame-or-window) frame-or-window + (window-frame frame-or-window))) + (display (frame-parameter frame 'display))) + (if (not (assoc display x-dnd-current-state)) + (push (cons display (copy-sequence x-dnd-empty-state)) + x-dnd-current-state)) + (assoc display x-dnd-current-state))) + +(defun x-dnd-get-state-for-frame (frame-or-window) + "Return the state in x-dnd-current-state for a frame or window." + (cdr (x-dnd-get-state-cons-for-frame frame-or-window))) + +(defun x-dnd-default-test-function (window action types) + "The default test function for drag and drop. +WINDOW is where the mouse is when this function is called. It may be a frame +if the mouse is over the menu bar, scroll bar or tool bar. +ACTION is the suggested action from the source, and TYPES are the +types the drop data can have. This function only accepts drops with +types in `x-dnd-known-types'. It always returns the action private." + (let ((type (x-dnd-choose-type types))) + (when type (cons 'private type)))) + + +(defun x-dnd-current-type (frame-or-window) + "Return the type we want the DND data to be in for the current drop. +FRAME-OR-WINDOW is the frame or window that the mouse is over." + (aref (x-dnd-get-state-for-frame frame-or-window) 4)) + +(defun x-dnd-forget-drop (frame-or-window) + "Remove all state for the last drop. +FRAME-OR-WINDOW is the frame or window that the mouse is over." + (setcdr (x-dnd-get-state-cons-for-frame frame-or-window) + (copy-sequence x-dnd-empty-state))) + +(defun x-dnd-maybe-call-test-function (window action) + "Call `x-dnd-test-function' if something has changed. +WINDOW is the window the mouse is over. ACTION is the suggested +action from the source. If nothing has changed, return the last +action and type we got from `x-dnd-test-function'." + (let ((buffer (when (and (windowp window) (window-live-p window)) + (window-buffer window))) + (current-state (x-dnd-get-state-for-frame window))) + (when (or (not (equal buffer (aref current-state 0))) + (not (equal window (aref current-state 1))) + (not (equal action (aref current-state 3)))) + (save-excursion + (when buffer (set-buffer buffer)) + (let* ((action-type (funcall x-dnd-test-function + window + action + (aref current-state 2))) + (handler (cdr (assoc (cdr action-type) x-dnd-types-alist)))) + ;; Ignore action-type if we have no handler. + (setq current-state + (x-dnd-save-state window + action + (when handler action-type))))))) + (let ((current-state (x-dnd-get-state-for-frame window))) + (cons (aref current-state 5) + (aref current-state 4)))) + +(defun x-dnd-save-state (window action action-type &optional types extra-data) + "Save the state of the current drag and drop. +WINDOW is the window the mouse is over. ACTION is the action suggested +by the source. ACTION-TYPE is the result of calling `x-dnd-test-function'. +If given, TYPES are the types for the drop data that the source supports. +EXTRA-DATA is data needed for a specific protocol." + (let ((current-state (x-dnd-get-state-for-frame window))) + (aset current-state 5 (car action-type)) + (aset current-state 4 (cdr action-type)) + (aset current-state 3 action) + (when types (aset current-state 2 types)) + (when extra-data (aset current-state 6 extra-data)) + (aset current-state 1 window) + (aset current-state 0 (if (and (windowp window) + (window-live-p window)) + (window-buffer window) nil)) + (setcdr (x-dnd-get-state-cons-for-frame window) current-state))) + + +(defun x-dnd-handle-one-url (window action arg) + "Handle one dropped url by calling the appropriate handler. +The handler is first localted by looking at `x-dnd-protocol-alist'. +If no match is found here, and the value of `browse-url-browser-function' +is a pair of (REGEXP . FUNCTION), those regexps are tried for a match. +If no match is found, just call `x-dnd-insert-text'. +WINDOW is where the drop happend, ACTION is the action for the drop, +ARG is the URL that has been dropped. +Returns ACTION." + (require 'browse-url) + (let* ((uri (replace-regexp-in-string + "%[A-Z0-9][A-Z0-9]" + (lambda (arg) + (format "%c" (string-to-number (substring arg 1) 16))) + arg)) + ret) + (or + (catch 'done + (dolist (bf x-dnd-protocol-alist) + (when (string-match (car bf) uri) + (setq ret (funcall (cdr bf) uri action)) + (throw 'done t))) + nil) + (when (not (functionp browse-url-browser-function)) + (catch 'done + (dolist (bf browse-url-browser-function) + (when (string-match (car bf) uri) + (setq ret 'private) + (funcall (cdr bf) uri action) + (throw 'done t))) + nil)) + (progn + (x-dnd-insert-text window action uri) + (setq ret 'private))) + ret)) + + +(defun x-dnd-get-local-file-uri (uri) + "Return an uri converted to file:/// syntax if uri is a local file. +Return nil if URI is not a local file." + + ;; The hostname may be our hostname, in that case, convert to a local + ;; file. Otherwise return nil. TODO: How about an IP-address as hostname? + (let ((hostname (when (string-match "^file://\\([^/]*\\)" uri) + (downcase (match-string 1 uri)))) + (system-name-no-dot + (downcase (if (string-match "^[^\\.]+" system-name) + (match-string 0 system-name) + system-name)))) + (when (and hostname + (or (string-equal "localhost" hostname) + (string-equal (downcase system-name) hostname) + (string-equal system-name-no-dot hostname))) + (concat "file://" (substring uri (+ 7 (length hostname))))))) + +(defun x-dnd-get-local-file-name (uri &optional must-exist) + "Return file name converted from file:/// or file: syntax. +URI is the uri for the file. If MUST-EXIST is given and non-nil, +only return non-nil if the file exists. +Return nil if URI is not a local file." + (let ((f (cond ((string-match "^file:///" uri) ; XDND format. + (substring uri (1- (match-end 0)))) + ((string-match "^file:" uri) ; Old KDE, Motif, Sun + (substring uri (match-end 0)))))) + (when (and f must-exist) + (let* ((decoded-f (decode-coding-string + f + (or file-name-coding-system + default-file-name-coding-system))) + (try-f (if (file-readable-p decoded-f) decoded-f f))) + (when (file-readable-p try-f) try-f))))) + + +(defun x-dnd-open-local-file (uri action) + "Open a local file. +The file is opened in the current window, or a new window if +`x-dnd-open-file-other-window' is set. URI is the url for the file, +and must have the format file:file-name or file:///file-name. +The last / in file:/// is part of the file name. ACTION is ignored." + + (let* ((f (x-dnd-get-local-file-name uri t))) + (when f + (if (file-readable-p f) + (progn + (if x-dnd-open-file-other-window + (find-file-other-window f) + (find-file f)) + 'private) + (error "Can not read %s (%s)" f uri))))) + +(defun x-dnd-open-file (uri action) + "Open a local or remote file. +The file is opened in the current window, or a new window if +`x-dnd-open-file-other-window' is set. URI is the url for the file, +and must have the format file://hostname/file-name. ACTION is ignored. +The last / in file://hostname/ is part of the file name." + + ;; The hostname may be our hostname, in that case, convert to a local + ;; file. Otherwise return nil. + (let ((local-file (x-dnd-get-local-file-uri uri))) + (when local-file (x-dnd-open-local-file local-file action)))) + + +(defun x-dnd-handle-moz-url (window action data) + "Handle one item of type text/x-moz-url. +WINDOW is the window where the drop happened. ACTION is ignored. +DATA is the moz-url, which is formatted as two strings separated by \r\n. +The first string is the URL, the second string is the title of that URL. +DATA is encoded in utf-16. Decode the URL and call `x-dnd-handle-uri-list'." + ;; Mozilla and applications based on it (Galeon for example) uses + ;; text/unicode, but it is impossible to tell if it is le or be. Use what + ;; the machine Emacs runs on use. This looses if dropping between machines + ;; with different endian, but it is the best we can do. + (let* ((coding (if (eq (byteorder) ?B) 'utf-16be 'utf-16le)) + (string (decode-coding-string data coding)) + (strings (split-string string "[\r\n]" t)) + ;; Can one drop more than one moz-url ?? Assume not. + (url (car strings)) + (title (car (cdr strings)))) + (x-dnd-handle-uri-list window action url))) + +(defun x-dnd-insert-utf8-text (window action text) + "Decode the UTF-8 text and insert it at point. +TEXT is the text as a string, WINDOW is the window where the drop happened." + (x-dnd-insert-text window action (decode-coding-string text 'utf-8))) + +(defun x-dnd-insert-utf16-text (window action text) + "Decode the UTF-16 text and insert it at point. +TEXT is the text as a string, WINDOW is the window where the drop happened." + ;; See comment in x-dnd-handle-moz-url about coding. + (let ((coding (if (eq (byteorder) ?B) 'utf-16be 'utf-16le))) + (x-dnd-insert-text window action (decode-coding-string text coding)))) + +(defun x-dnd-insert-ctext (window action text) + "Decode the compound text and insert it at point. +TEXT is the text as a string, WINDOW is the window where the drop happened." + (x-dnd-insert-text window action + (decode-coding-string text + 'compound-text-with-extensions))) + +(defun x-dnd-insert-text (window action text) + "Insert text at point or push to the kill ring if buffer is read only. +TEXT is the text as a string, WINDOW is the window where the drop happened." + (if (or buffer-read-only + (not (windowp window))) + (progn + (kill-new text) + (message + (substitute-command-keys + "The dropped text can be accessed with \\[yank]"))) + (insert text)) + action) + +(defun x-dnd-handle-uri-list (window action string) + "Split an uri-list into separate URIs and call `x-dnd-handle-one-url'. +WINDOW is the window where the drop happened. +STRING is the uri-list as a string. The URIs are separated by \r\n." + (let ((uri-list (split-string string "[\0\r\n]" t)) + retval) + (dolist (bf uri-list) + ;; If one URL is handeled, treat as if the whole drop succeeded. + (let ((did-action (x-dnd-handle-one-url window action bf))) + (when did-action (setq retval did-action)))) + retval)) + +(defun x-dnd-handle-file-name (window action string) + "Prepend file:// to file names and call `x-dnd-handle-one-url'. +WINDOW is the window where the drop happened. +STRING is the file names as a string, separated by nulls." + (let ((uri-list (split-string string "[\0\r\n]" t)) + retval) + (dolist (bf uri-list) + ;; If one URL is handeled, treat as if the whole drop succeeded. + (let* ((file-uri (concat "file://" bf)) + (did-action (x-dnd-handle-one-url window action file-uri))) + (when did-action (setq retval did-action)))) + retval)) + + +(defun x-dnd-choose-type (types &optional known-types) + "Choose which type we want to receive for the drop. +TYPES are the types the source of the drop offers, a vector of type names +as strings or symbols. Select among the types in `x-dnd-known-types' or +KNOWN-TYPES if given, and return that type name. +If no suitable type is found, return nil." + (let* ((known-list (or known-types x-dnd-known-types)) + (first-known-type (car known-list)) + (types-array types) + (found (when first-known-type + (catch 'done + (dotimes (i (length types-array)) + (let* ((type (aref types-array i)) + (typename (if (symbolp type) + (symbol-name type) type))) + (when (equal first-known-type typename) + (throw 'done first-known-type)))) + nil)))) + + (if (and (not found) (cdr known-list)) + (x-dnd-choose-type types (cdr known-list)) + found))) + +(defun x-dnd-drop-data (event frame window data type) + "Drop one data item onto a frame. +EVENT is the client message for the drop, FRAME is the frame the drop occurred +on. WINDOW is the window of FRAME where the drop happened. DATA is the data +received from the source, and type is the type for DATA, see +`x-dnd-types-alist'). + +Returns the action used (move, copy, link, private) if drop was successful, +nil if not." + (let* ((type-info (assoc type x-dnd-types-alist)) + (handler (cdr type-info)) + (state (x-dnd-get-state-for-frame frame)) + (action (aref state 5)) + (w (posn-window (event-start event)))) + (when handler + (if (and (windowp w) (window-live-p w)) + ;; If dropping in a window, open files in that window rather + ;; than in a new widow. + (let ((x-dnd-open-file-other-window nil)) + (goto-char (posn-point (event-start event))) + (funcall handler window action data)) + (let ((x-dnd-open-file-other-window t)) ;; Dropping on non-window. + (select-frame frame) + (funcall handler window action data)))))) + +(defun x-dnd-handle-drag-n-drop-event (event) + "Receive drag and drop events (X client messages). +Currently XDND, Motif and old KDE 1.x protocols are recognized." + (interactive "e") + (let* ((client-message (car (cdr (cdr event)))) + (window (posn-window (event-start event))) + (message-atom (aref client-message 0)) + (frame (aref client-message 1)) + (format (aref client-message 2)) + (data (aref client-message 3))) + + (cond ((equal "DndProtocol" message-atom) ; Old KDE 1.x. + (x-dnd-handle-old-kde event frame window message-atom format data)) + + ((equal "_MOTIF_DRAG_AND_DROP_MESSAGE" message-atom) ; Motif + (x-dnd-handle-motif event frame window message-atom format data)) + + ((and (> (length message-atom) 4) ; XDND protocol. + (equal "Xdnd" (substring message-atom 0 4))) + (x-dnd-handle-xdnd event frame window message-atom format data))))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Old KDE protocol. Only dropping of files. + +(defun x-dnd-handle-old-kde (event frame window message format data) + "Open the files in a KDE 1.x drop." + (let ((values (x-window-property "DndSelection" frame nil 0 t))) + (x-dnd-handle-uri-list window 'private + (replace-regexp-in-string "\0$" "" values)))) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; XDND protocol. + +(defvar x-dnd-xdnd-to-action + '(("XdndActionPrivate" . private) + ("XdndActionCopy" . copy) + ("XdndActionMove" . move) + ("XdndActionLink" . link) + ("XdndActionAsk" . ask)) + "Mapping from XDND action types to lisp symbols.") + +(defun x-dnd-init-xdnd-for-frame (frame) + "Set the XdndAware property for FRAME to indicate that we do XDND." + (x-change-window-property "XdndAware" + '(5) ;; The version of XDND we support. + frame "ATOM" 32 t)) + +(defun x-dnd-get-drop-width-height (frame w accept) + "Return the widht/height to be sent in a XDndStatus message. +FRAME is the frame and W is the window where the drop happened. +If ACCEPT is nil return 0 (empty rectangle), +otherwise if W is a window, return its widht/height, +otherwise return the frame width/height." + (if accept + (if (windowp w) ;; w is not a window if dropping on the menu bar, + ;; scroll bar or tool bar. + (let ((edges (window-inside-pixel-edges w))) + (cons + (- (nth 2 edges) (nth 0 edges)) ;; right - left + (- (nth 3 edges) (nth 1 edges)))) ;; bottom - top + (cons (frame-pixel-width frame) + (frame-pixel-height frame))) + 0)) + +(defun x-dnd-get-drop-x-y (frame w) + "Return the x/y coordinates to be sent in a XDndStatus message. +Coordinates are required to be absolute. +FRAME is the frame and W is the window where the drop happened. +If W is a window, return its absolute corrdinates, +otherwise return the frame coordinates." + (let* ((frame-left (frame-parameter frame 'left)) + ;; If the frame is outside the display, frame-left looks like + ;; '(0 -16). Extract the -16. + (frame-real-left (if (consp frame-left) (car (cdr frame-left)) + frame-left)) + (frame-top (frame-parameter frame 'top)) + (frame-real-top (if (consp frame-top) (car (cdr frame-top)) + frame-top))) + (if (windowp w) + (let ((edges (window-inside-pixel-edges w))) + (cons + (+ frame-real-left (nth 0 edges)) + (+ frame-real-top (nth 1 edges)))) + (cons frame-real-left frame-real-top)))) + +(defun x-dnd-handle-xdnd (event frame window message format data) + "Receive one XDND event (client message) and send the appropriate reply. +EVENT is the client message. FRAME is where the mouse is now. +WINDOW is the window within FRAME where the mouse is now. +FORMAT is 32 (not used). MESSAGE is the data part of an XClientMessageEvent." + (cond ((equal "XdndEnter" message) + (let ((version (ash (car (aref data 1)) -8)) + (more-than-3 (cdr (aref data 1))) + (dnd-source (aref data 0))) + (x-dnd-save-state + window nil nil + (if (> more-than-3 0) + (x-window-property "XdndTypeList" + frame "AnyPropertyType" + dnd-source nil t) + (vector (x-get-atom-name (aref data 2)) + (x-get-atom-name (aref data 3)) + (x-get-atom-name (aref data 4))))))) + + ((equal "XdndPosition" message) + (let* ((x (car (aref data 2))) + (y (cdr (aref data 2))) + (action (x-get-atom-name (aref data 4))) + (dnd-source (aref data 0)) + (dnd-time (aref data 3)) + (action-type (x-dnd-maybe-call-test-function + window + (cdr (assoc action x-dnd-xdnd-to-action)))) + (reply-action (car (rassoc (car action-type) + x-dnd-xdnd-to-action))) + (accept ;; 1 = accept, 0 = reject + (if (and reply-action action-type) 1 0)) + (list-to-send + (list (string-to-number + (frame-parameter frame 'outer-window-id)) + accept ;; 1 = Accept, 0 = reject. + (x-dnd-get-drop-x-y frame window) + (x-dnd-get-drop-width-height + frame window (eq accept 1)) + (or reply-action 0) + ))) + (x-send-client-message + frame dnd-source frame "XdndStatus" 32 list-to-send) + )) + + ((equal "XdndLeave" message) + (x-dnd-forget-drop window)) + + ((equal "XdndDrop" message) + (if (windowp window) (select-window window)) + (let* ((dnd-source (aref data 0)) + (value (and (x-dnd-current-type window) + (x-get-selection-internal + 'XdndSelection + (intern (x-dnd-current-type window))))) + success action ret-action) + + (setq action (if value + (condition-case info + (x-dnd-drop-data event frame window value + (x-dnd-current-type window)) + (error + (message "Error: %s" info) + nil)))) + + (setq success (if action 1 0)) + (setq ret-action + (if (eq success 1) + (or (car (rassoc action x-dnd-xdnd-to-action)) + "XdndActionPrivate") + 0)) + + (x-send-client-message + frame dnd-source frame "XdndFinished" 32 + (list (string-to-number (frame-parameter frame 'outer-window-id)) + success ;; 1 = Success, 0 = Error + (if success "XdndActionPrivate" 0) + )) + (x-dnd-forget-drop window))) + + (t (error "Unknown XDND message %s %s" message data)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Motif protocol. + +(defun x-dnd-init-motif-for-frame (frame) + "Set _MOTIF_DRAG_RECEIVER_INFO for FRAME to indicate that we do Motif DND." + (x-change-window-property "_MOTIF_DRAG_RECEIVER_INFO" + (list + (byteorder) + 0 ; The Motif DND version. + 5 ; We want drag dynamic. + 0 0 0 0 0 0 0 + 0 0 0 0 0 0) ; Property must be 16 bytes. + frame "_MOTIF_DRAG_RECEIVER_INFO" 8 t)) + +(defun x-dnd-get-motif-value (data offset size byteorder) + (cond ((eq size 2) + (if (eq byteorder ?l) + (+ (ash (aref data (1+ offset)) 8) + (aref data offset)) + (+ (ash (aref data offset) 8) + (aref data (1+ offset))))) + + ((eq size 4) + (if (eq byteorder ?l) + (cons (+ (ash (aref data (+ 3 offset)) 8) + (aref data (+ 2 offset))) + (+ (ash (aref data (1+ offset)) 8) + (aref data offset))) + (cons (+ (ash (aref data offset) 8) + (aref data (1+ offset))) + (+ (ash (aref data (+ 2 offset)) 8) + (aref data (+ 3 offset)))))))) + +(defun x-dnd-motif-value-to-list (value size byteorder) + (let ((bytes (cond ((eq size 2) + (list (logand (lsh value -8) ?\xff) + (logand value ?\xff))) + + ((eq size 4) + (if (consp value) + (list (logand (lsh (car value) -8) ?\xff) + (logand (car value) ?\xff) + (logand (lsh (cdr value) -8) ?\xff) + (logand (cdr value) ?\xff)) + (list (logand (lsh value -24) ?\xff) + (logand (lsh value -16) ?\xff) + (logand (lsh value -8) ?\xff) + (logand value ?\xff))))))) + (if (eq byteorder ?l) + (reverse bytes) + bytes))) + + +(defvar x-dnd-motif-message-types + '((0 . XmTOP_LEVEL_ENTER) + (1 . XmTOP_LEVEL_LEAVE) + (2 . XmDRAG_MOTION) + (3 . XmDROP_SITE_ENTER) + (4 . XmDROP_SITE_LEAVE) + (5 . XmDROP_START) + (6 . XmDROP_FINISH) + (7 . XmDRAG_DROP_FINISH) + (8 . XmOPERATION_CHANGED)) + "Mapping from numbers to Motif DND message types.") + +(defvar x-dnd-motif-to-action + '((1 . move) + (2 . copy) + (3 . link) ; Both 3 and 4 has been seen as link. + (4 . link) + (2 . private)) ; Motif does not have private, so use copy for private. + "Mapping from number to operation for Motif DND.") + +(defun x-dnd-handle-motif (event frame window message-atom format data) + (let* ((message-type (cdr (assoc (aref data 0) x-dnd-motif-message-types))) + (source-byteorder (aref data 1)) + (my-byteorder (byteorder)) + (source-flags (x-dnd-get-motif-value data 2 2 source-byteorder)) + (source-action (cdr (assoc (logand ?\xF source-flags) + x-dnd-motif-to-action)))) + + (cond ((eq message-type 'XmTOP_LEVEL_ENTER) + (let* ((dnd-source (x-dnd-get-motif-value + data 8 4 source-byteorder)) + (selection-atom (x-dnd-get-motif-value + data 12 4 source-byteorder)) + (atom-name (x-get-atom-name selection-atom)) + (types (when atom-name + (x-get-selection-internal (intern atom-name) + 'TARGETS)))) + (x-dnd-forget-drop frame) + (when types (x-dnd-save-state window nil nil + types + dnd-source)))) + + ;; Can not forget drop here, LEAVE comes before DROP_START and + ;; we need the state in DROP_START. + ((eq message-type 'XmTOP_LEVEL_LEAVE) + nil) + + ((eq message-type 'XmDRAG_MOTION) + (let* ((state (x-dnd-get-state-for-frame frame)) + (timestamp (x-dnd-motif-value-to-list + (x-dnd-get-motif-value data 4 4 + source-byteorder) + 4 my-byteorder)) + (x (x-dnd-motif-value-to-list + (x-dnd-get-motif-value data 8 2 source-byteorder) + 2 my-byteorder)) + (y (x-dnd-motif-value-to-list + (x-dnd-get-motif-value data 10 2 source-byteorder) + 2 my-byteorder)) + (dnd-source (aref state 6)) + (first-move (not (aref state 3))) + (action-type (x-dnd-maybe-call-test-function + window + source-action)) + (reply-action (car (rassoc (car action-type) + x-dnd-motif-to-action))) + (reply-flags + (x-dnd-motif-value-to-list + (if reply-action + (+ reply-action + ?\x30 ; 30: valid drop site + ?\x700) ; 700: can do copy, move or link + ?\x30) ; 30: drop site, but noop. + 2 my-byteorder)) + (reply (append + (list + (+ ?\x80 ; 0x80 indicates a reply. + (if first-move + 3 ; First time, reply is SITE_ENTER. + 2)) ; Not first time, reply is DRAG_MOTION. + my-byteorder) + reply-flags + timestamp + x + y))) + (x-send-client-message frame + dnd-source + frame + "_MOTIF_DRAG_AND_DROP_MESSAGE" + 8 + reply))) + + ((eq message-type 'XmOPERATION_CHANGED) + (let* ((state (x-dnd-get-state-for-frame frame)) + (timestamp (x-dnd-motif-value-to-list + (x-dnd-get-motif-value data 4 4 source-byteorder) + 4 my-byteorder)) + (dnd-source (aref state 6)) + (action-type (x-dnd-maybe-call-test-function + window + source-action)) + (reply-action (car (rassoc (car action-type) + x-dnd-motif-to-action))) + (reply-flags + (x-dnd-motif-value-to-list + (if reply-action + (+ reply-action + ?\x30 ; 30: valid drop site + ?\x700) ; 700: can do copy, move or link + ?\x30) ; 30: drop site, but noop + 2 my-byteorder)) + (reply (append + (list + (+ ?\x80 ; 0x80 indicates a reply. + 8) ; 8 is OPERATION_CHANGED + my-byteorder) + reply-flags + timestamp))) + (x-send-client-message frame + dnd-source + frame + "_MOTIF_DRAG_AND_DROP_MESSAGE" + 8 + reply))) + + ((eq message-type 'XmDROP_START) + (let* ((x (x-dnd-motif-value-to-list + (x-dnd-get-motif-value data 8 2 source-byteorder) + 2 my-byteorder)) + (y (x-dnd-motif-value-to-list + (x-dnd-get-motif-value data 10 2 source-byteorder) + 2 my-byteorder)) + (selection-atom (x-dnd-get-motif-value + data 12 4 source-byteorder)) + (atom-name (x-get-atom-name selection-atom)) + (dnd-source (x-dnd-get-motif-value + data 16 4 source-byteorder)) + (action-type (x-dnd-maybe-call-test-function + window + source-action)) + (reply-action (car (rassoc (car action-type) + x-dnd-motif-to-action))) + (reply-flags + (x-dnd-motif-value-to-list + (if reply-action + (+ reply-action + ?\x30 ; 30: valid drop site + ?\x700) ; 700: can do copy, move or link + (+ ?\x30 ; 30: drop site, but noop. + ?\x200)) ; 200: drop cancel. + 2 my-byteorder)) + (reply (append + (list + (+ ?\x80 ; 0x80 indicates a reply. + 5) ; DROP_START. + my-byteorder) + reply-flags + x + y)) + (timestamp (x-dnd-get-motif-value + data 4 4 source-byteorder)) + action) + + (x-send-client-message frame + dnd-source + frame + "_MOTIF_DRAG_AND_DROP_MESSAGE" + 8 + reply) + (setq action + (when (and reply-action atom-name) + (let* ((value (x-get-selection-internal + (intern atom-name) + (intern (x-dnd-current-type window))))) + (when value + (condition-case info + (x-dnd-drop-data event frame window value + (x-dnd-current-type window)) + (error + (message "Error: %s" info) + nil)))))) + (x-get-selection-internal + (intern atom-name) + (if action 'XmTRANSFER_SUCCESS 'XmTRANSFER_FAILURE) + timestamp) + (x-dnd-forget-drop frame))) + + (t (error "Unknown Motif DND message %s %s" message data))))) + + +;;; + + +(provide 'x-dnd) + +;;; arch-tag: b621fb7e-50da-4323-850b-5fc71ae64621 +;;; x-dnd.el ends here diff --git a/lisp/xml.el b/lisp/xml.el index 55c8fca23a..408c13ab39 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -1,6 +1,6 @@ ;;; xml.el --- XML parser -;; Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2000, 01, 03, 2004 Free Software Foundation, Inc. ;; Author: Emmanuel Briot ;; Maintainer: Mark A. Hershberger @@ -52,15 +52,15 @@ ;;; LIST FORMAT -;; The functions `xml-parse-file' and `xml-parse-tag' return a list with -;; the following format: +;; The functions `xml-parse-file', `xml-parse-region' and +;; `xml-parse-tag' return a list with the following format: ;; ;; xml-list ::= (node node ...) -;; node ::= (tag_name attribute-list . child_node_list) +;; node ::= (qname attribute-list . child_node_list) ;; child_node_list ::= child_node child_node ... ;; child_node ::= node | string -;; tag_name ::= string -;; attribute_list ::= (("attribute" . "value") ("attribute" . "value") ...) +;; qname ::= (:namespace-uri . "name") | "name" +;; attribute_list ::= ((qname . "value") (qname . "value") ...) ;; | nil ;; string ::= "..." ;; @@ -68,6 +68,11 @@ ;; Whitespace is preserved. Fixme: There should be a tree-walker that ;; can remove it. +;; TODO: +;; * xml:base, xml:space support +;; * more complete DOCTYPE parsing +;; * pi support + ;;; Code: ;; Note that {buffer-substring,match-string}-no-properties were @@ -104,15 +109,19 @@ CHILD-NAME should be a lower case symbol." (push child match)))) (nreverse match))) -(defun xml-get-attribute (node attribute) +(defun xml-get-attribute-or-nil (node attribute) "Get from NODE the value of ATTRIBUTE. -An empty string is returned if the attribute was not found." - (if (xml-node-attributes node) - (let ((value (assoc attribute (xml-node-attributes node)))) - (if value - (cdr value) - "")) - "")) +Return `nil' if the attribute was not found. + +See also `xml-get-attribute'." + (cdr (assoc attribute (xml-node-attributes node)))) + +(defsubst xml-get-attribute (node attribute) + "Get from NODE the value of ATTRIBUTE. +An empty string is returned if the attribute was not found. + +See also `xml-get-attribute-or-nil'." + (or (xml-get-attribute-or-nil node attribute) "")) ;;******************************************************************* ;;** @@ -208,13 +217,14 @@ If PARSE-NS is non-nil, then QNAMES are expanded." (if (search-forward "<" nil t) (progn (forward-char -1) - (if xml + (setq result (xml-parse-tag parse-dtd parse-ns)) + (if (and xml result) ;; translation of rule [1] of XML specifications (error "XML files can have only one toplevel tag") - (setq result (xml-parse-tag parse-dtd parse-ns)) (cond ((null result)) - ((listp (car result)) + ((and (listp (car result)) + parse-dtd) (setq dtd (car result)) (if (cdr result) ; possible leading comment (add-to-list 'xml (cdr result)))) @@ -225,6 +235,27 @@ If PARSE-NS is non-nil, then QNAMES are expanded." (cons dtd (nreverse xml)) (nreverse xml))))))) +(defun xml-maybe-do-ns (name default xml-ns) + "Perform any namespace expansion. NAME is the name to perform the expansion on. +DEFAULT is the default namespace. XML-NS is a cons of namespace +names to uris. When namespace-aware parsing is off, then XML-NS +is nil. + +During namespace-aware parsing, any name without a namespace is +put into the namespace identified by DEFAULT. nil is used to +specify that the name shouldn't be given a namespace." + (if (consp xml-ns) + (let* ((nsp (string-match ":" name)) + (lname (if nsp (substring name (match-end 0)) name)) + (prefix (if nsp (substring name 0 (match-beginning 0)) default)) + (special (and (string-equal lname "xmlns") (not prefix))) + ;; Setting default to nil will insure that there is not + ;; matching cons in xml-ns. In which case we + (ns (or (cdr (assoc (if special "xmlns" prefix) + xml-ns)) + :))) + (cons ns (if special "" lname))) + (intern name))) (defun xml-parse-tag (&optional parse-dtd parse-ns) "Parse the tag at point. @@ -239,10 +270,12 @@ Returns one of: parse-ns (if parse-ns (list - ;; Default no namespace - (cons "" "") + ;; Default for empty prefix is no namespace + (cons "" :) + ;; "xml" namespace + (cons "xml" :http://www.w3.org/XML/1998/namespace) ;; We need to seed the xmlns namespace - (cons "xmlns" "http://www.w3.org/2000/xmlns/")))))) + (cons "xmlns" :http://www.w3.org/2000/xmlns/)))))) (cond ;; Processing instructions (like the tag at the ;; beginning of a document). @@ -276,53 +309,26 @@ Returns one of: ;; opening tag ((looking-at "<\\([^/>[:space:]]+\\)") (goto-char (match-end 1)) - (let* ((node-name (match-string 1)) - ;; Parse the attribute list. - (children (list (xml-parse-attlist) (intern node-name))) - pos) - - ;; add the xmlns:* attrs to our cache - (when (consp xml-ns) - (mapcar - (lambda (attr) - (let* ((splitup (split-string (symbol-name (car attr)) ":")) - (prefix (nth 0 splitup)) - (lname (nth 1 splitup))) - (when (string= "xmlns" prefix) - (setq xml-ns (append (list (cons (if lname - lname - "") - (cdr attr))) - xml-ns))))) - (car children)) - - ;; expand element names - (let* ((splitup (split-string (symbol-name (cadr children)) ":")) - (lname (or (nth 1 splitup) - (nth 0 splitup))) - (prefix (if (nth 1 splitup) - (nth 0 splitup) - ""))) - (setcdr children (list - (intern (concat "{" - (cdr (assoc-string prefix xml-ns)) - "}" lname))))) - - ;; expand attribute names - (mapcar - (lambda (attr) - (let* ((splitup (split-string (symbol-name (car attr)) ":")) - (lname (or (nth 1 splitup) - (nth 0 splitup))) - (prefix (if (nth 1 splitup) - (nth 0 splitup) - (caar xml-ns)))) - - (setcar attr (intern (concat "{" - (cdr (assoc-string prefix xml-ns)) - "}" lname))))) - (car children))) + ;; Parse this node + (let* ((node-name (match-string 1)) + ;; Parse the attribute list. + (attrs (xml-parse-attlist xml-ns)) + children pos) + + ;; add the xmlns:* attrs to our cache + (when (consp xml-ns) + (dolist (attr attrs) + (when (and (consp (car attr)) + (eq :http://www.w3.org/2000/xmlns/ + (caar attr))) + (push (cons (cdar attr) (intern (concat ":" (cdr attr)))) + xml-ns)))) + + ;; expand element names + (setq node-name (list (xml-maybe-do-ns node-name "" xml-ns))) + + (setq children (list attrs node-name)) ;; is this an empty element ? (if (looking-at "/>") (progn @@ -376,24 +382,26 @@ Returns one of: (t ;; This is not a tag. (error "XML: Invalid character"))))) -(defun xml-parse-attlist () - "Return the attribute-list after point.Leave point at the first non-blank character after the tag." +(defun xml-parse-attlist (&optional xml-ns) + "Return the attribute-list after point. Leave point at the +first non-blank character after the tag." (let ((attlist ()) - start-pos name) + end-pos name) (skip-syntax-forward " ") (while (looking-at (eval-when-compile (concat "\\(" xml-name-regexp "\\)\\s-*=\\s-*"))) - (setq name (intern (match-string 1))) - (goto-char (match-end 0)) + (setq end-pos (match-end 0)) + (setq name (xml-maybe-do-ns (match-string 1) nil xml-ns)) + (goto-char end-pos) ;; See also: http://www.w3.org/TR/2000/REC-xml-20001006#AVNormalize ;; Do we have a string between quotes (or double-quotes), ;; or a simple word ? (if (looking-at "\"\\([^\"]*\\)\"") - (setq start-pos (match-beginning 0)) + (setq end-pos (match-end 0)) (if (looking-at "'\\([^']*\\)'") - (setq start-pos (match-beginning 0)) + (setq end-pos (match-end 0)) (error "XML: Attribute values must be given between quotes"))) ;; Each attribute must be unique within a given element @@ -407,9 +415,7 @@ Returns one of: (replace-regexp-in-string "\\s-\\{2,\\}" " " string) (push (cons name (xml-substitute-special string)) attlist)) - (goto-char start-pos) - (forward-sexp) ; we have string syntax - + (goto-char end-pos) (skip-syntax-forward " ")) (nreverse attlist))) @@ -490,7 +496,7 @@ This follows the rule [28] in the XML specifications." ((looking-at "]+\\)>") - (setq element (intern (match-string 1)) + (setq element (match-string 1) type (match-string-no-properties 2)) (setq end-pos (match-end 0)) @@ -510,7 +516,7 @@ This follows the rule [28] in the XML specifications." ;; rule [45]: the element declaration must be unique (if (assoc element dtd) (error "XML: element declarations must be unique in a DTD (<%s>)" - (symbol-name element))) + element)) ;; Store the element in the DTD (push (list element type) dtd) @@ -525,7 +531,6 @@ This follows the rule [28] in the XML specifications." (search-forward ">")))) (nreverse dtd))) - (defun xml-parse-elem-type (string) "Convert element type STRING into a Lisp structure." @@ -643,4 +648,5 @@ The first line is indented with INDENT-STRING." (provide 'xml) +;;; arch-tag: 5864b283-5a68-4b59-a20d-36a72b353b9b ;;; xml.el ends here diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 9fad35fb85..a261d3d36c 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -198,4 +198,5 @@ Turn it on to use emacs mouse commands, and off to use xterm mouse commands." (provide 'xt-mouse) +;;; arch-tag: 84962d4e-fae9-4c13-a9d7-ef4925a4ac03 ;;; xt-mouse.el ends here diff --git a/lispintro/ChangeLog b/lispintro/ChangeLog index 5892f5b34d..159bf98259 100644 --- a/lispintro/ChangeLog +++ b/lispintro/ChangeLog @@ -1,3 +1,21 @@ +2004-02-29 Juanma Barranquero + + * makefile.w32-in (mostlyclean, clean, maintainer-clean): Use + $(DEL) instead of rm, and ignore exit code. + +2003-11-16 Kevin Ryde + + * emacs-lisp-intro.texi: [CVS commitment by ] + Corrections to cross references, + (Interactive Options): elisp "interactive" -> "Using Interactive". + (defvar and asterisk): Remove emacs "Edit Options" reference, + edit-options is no longer described in the emacs manual. + (Lists diagrammed): elisp "List Type" -> "Cons Cell Type". + +2003-09-03 Peter Runestig + + * makefile.w32-in: New file. + 2001-11-29 Eli Zaretskii * emacs-lisp-intro.texi (Index): @ignore extraneous text. @@ -17,10 +35,12 @@ * *.eps: Rename to avoid clashes in DOS 8+3 namespace. ;; Local Variables: -;; coding: iso-2022-7bit-unix +;; coding: iso-2022-7bit ;; End: Copyright (C) 2001 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: ee4f8e1f-e14c-4d2e-86de-4dd697e6f1c3 diff --git a/lispintro/Makefile.am b/lispintro/Makefile.am index 082d100217..1b89c55528 100644 --- a/lispintro/Makefile.am +++ b/lispintro/Makefile.am @@ -3,3 +3,5 @@ info_TEXINFOS = emacs-lisp-intro.texi EXTRA_DIST = INSTALL MANIFEST README drawers.eps \ cons-1.eps cons-2.eps cons-2a.eps cons-3.eps \ cons-4.eps cons-5.eps lambda-1.eps lambda-2.eps lambda-3.eps + +# arch-tag: 6a3e6d99-7aa2-479f-939c-5531165c5747 diff --git a/lispintro/Makefile.in b/lispintro/Makefile.in index 88ac497501..14c1b1c9ab 100644 --- a/lispintro/Makefile.in +++ b/lispintro/Makefile.in @@ -69,3 +69,5 @@ maintainer-clean: distclean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# arch-tag: eb660994-cd29-4ab8-8043-5042e2dbde84 diff --git a/lispintro/Makefile.old b/lispintro/Makefile.old index 50713d1e8e..248de3d9c9 100644 --- a/lispintro/Makefile.old +++ b/lispintro/Makefile.old @@ -339,3 +339,5 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: + +# arch-tag: f1a44ea0-b792-4ac7-be28-9626b972c216 diff --git a/lispintro/configure.in b/lispintro/configure.in index e222b955a2..7d60c898d0 100644 --- a/lispintro/configure.in +++ b/lispintro/configure.in @@ -3,3 +3,7 @@ dnl autoconf input file for the emacs lisp intro AC_INIT(emacs-lisp-intro.texi) AM_INIT_AUTOMAKE(emacs-lisp-intro, 2.00) AC_OUTPUT(Makefile) + +m4_if(dnl Do not change this comment + arch-tag: 8d676bd8-8677-4ae0-8aa0-99bfd595b373 +)dnl diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index 8f6c9236c3..cf01932d02 100644 --- a/lispintro/emacs-lisp-intro.texi +++ b/lispintro/emacs-lisp-intro.texi @@ -21,8 +21,8 @@ @comment %**end of header -@set edition-number 2.10 -@set update-date 2003 July 15 +@set edition-number 2.12 +@set update-date 2003 Nov 19 @ignore ## Summary of shell commands to create various output formats: @@ -3519,7 +3519,7 @@ this. Alternatively, if the special letter-codes are not right for your application, you can pass your own arguments to @code{interactive} as -a list. @xref{interactive, , Using @code{Interactive}, elisp, The +a list. @xref{Using Interactive, , Using @code{Interactive}, elisp, The GNU Emacs Lisp Reference Manual}, for more information about this advanced technique. @@ -8066,8 +8066,8 @@ internal variables that you would not expect a user to change and for variables that you do expect a user to change. Although you can still use @code{defvar} for user customizable variables, please use @code{defcustom} instead, since that special form provides a path into -the Customization commands. (@xref{defcustom, , Setting Variables -with @code{defcustom}}.) +the Customization commands. (@xref{defcustom, , Specifying Variables +using @code{defcustom}}.) When you specified a variable using the @code{defvar} special form, you could distinguish a readily settable variable from others by @@ -8082,23 +8082,24 @@ string. For example: @end group @end smallexample +@findex set-variable @noindent -This means that you could (and still can) use the @code{edit-options} -command to change the value of -@code{shell-command-default-error-buffer} temporarily. - -@findex edit-options -However, options set using @code{edit-options} are set only for the -duration of your editing session. The new values are not saved -between sessions. Each time Emacs starts, it reads the original +You could (and still can) use the @code{set-variable} command to +change the value of @code{shell-command-default-error-buffer} +temporarily. However, options set using @code{set-variable} are set +only for the duration of your editing session. The new values are not +saved between sessions. Each time Emacs starts, it reads the original value, unless you change the value within your @file{.emacs} file, either by setting it manually or by using @code{customize}. @xref{Emacs Initialization, , Your @file{.emacs} File}. -For me, the major use of the @code{edit-options} command is to suggest -variables that I might want to set in my @file{.emacs} file. I urge -you to look through the list. (@xref{Edit Options, , Editing Variable -Values, emacs, The GNU Emacs Manual}.) +For me, the major use of the @code{set-variable} command is to suggest +variables that I might want to set in my @file{.emacs} file. There +are now more than 700 such variables --- far too many to remember +readily. Fortunately, you can press @key{TAB} after calling the +@code{M-x set-variable} command to see the list of variables. +(@xref{Examining, , Examining and Setting Variables, emacs, +The GNU Emacs Manual}.) @node copy-region-as-kill, cons & search-fwd Review, defvar, Cutting & Storing Text @comment node-name, next, previous, up @@ -9142,7 +9143,7 @@ address-boxes, the first of which holds the address of @code{violet}, and the second of which holds the address of @code{buttercup}. A pair of address-boxes is called a @dfn{cons cell} or @dfn{dotted -pair}. @xref{List Type, , List Type , elisp, The GNU Emacs Lisp +pair}. @xref{Cons Cell Type, , Cons Cell and List Types, elisp, The GNU Emacs Lisp Reference Manual}, and @ref{Dotted Pair Notation, , Dotted Pair Notation, elisp, The GNU Emacs Lisp Reference Manual}, for more information about cons cells and dotted pairs. @@ -14373,7 +14374,7 @@ version, you may have to evaluate the following: @end smallexample @noindent -(@xref{defcustom, , Setting Variables with @code{defcustom}}. +(@xref{defcustom, , Specifying Variables using @code{defcustom}}.) Then evaluate the @code{lengths-list-file} expression.) @need 1200 @@ -16125,9 +16126,9 @@ For example, the customizable user option variable The name of the variable is @code{text-mode-hook}; it has no default value; and its documentation string tells you what it does. -The @code{:type} keyword tells Emacs what kind of data -@code{text-mode-hook} should be set to and how to display the value in -a Customization buffer. +The @code{:type} keyword tells Emacs the kind of data to which +@code{text-mode-hook} should be set and how to display the value in a +Customization buffer. The @code{:options} keyword specifies a suggested list of values for the variable. Currently, you can use @code{:options} only for a hook. @@ -21831,3 +21832,7 @@ airplane. @end iftex @bye + +@ignore + arch-tag: da1a2154-531f-43a8-8e33-fc7faad10acf +@end ignore diff --git a/lispintro/makefile.w32-in b/lispintro/makefile.w32-in new file mode 100644 index 0000000000..7af64075bc --- /dev/null +++ b/lispintro/makefile.w32-in @@ -0,0 +1,73 @@ +#### Makefile for the Emacs Lisp Introduction manual + +# Copyright (C) 2003 Free Software Foundation, Inc. + +# This file is part of GNU Emacs. + +# GNU Emacs is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# GNU Emacs is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with GNU Emacs; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +srcdir = . + +infodir = $(srcdir)/../info + +INFO_SOURCES = $(srcdir)/emacs-lisp-intro.texi +# The file name eintr must fit within 5 characters, to allow for +# -NN extensions to fit into DOS 8+3 limits without clashing +INFO_TARGETS = $(infodir)/eintr +DVI_TARGETS = emacs-lisp-intro.dvi + +MAKEINFO = makeinfo +INSTALL_INFO = install-info +TEXI2DVI = texi2dvi +DVIPS = dvips +ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \ + "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C + +.SUFFIXES: .dvi .ps .texi + +info: $(INFO_TARGETS) + $(INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS) + +dvi: $(DVI_TARGETS) + +$(infodir)/eintr: $(INFO_SOURCES) + $(MAKEINFO) -o $@ $(srcdir)/emacs-lisp-intro.texi + +emacs-lisp-intro.dvi: $(INFO_SOURCES) + $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-lisp-intro.texi + +emacs-lisp-intro.html: $(INFO_SOURCES) + $(MAKEINFO) --html -o $@ $(srcdir)/emacs-lisp-intro.texi + +.dvi.ps: + $(DVIPS) $< -o $@ + +mostlyclean: + - $(DEL) *.log *.cp *.fn *.ky *.pg *.vr *.tp + +clean: mostlyclean + - $(DEL) *.dvi $(infodir)/eintr* + +distclean: clean + +maintainer-clean: distclean + - $(DEL) *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: + +# arch-tag: d713164a-e683-4ce3-a39e-3bf82f2f82f4 diff --git a/lispintro/mkinstalldirs b/lispintro/mkinstalldirs index a01481be43..f945dbf2bc 100644 --- a/lispintro/mkinstalldirs +++ b/lispintro/mkinstalldirs @@ -4,8 +4,6 @@ # Created: 1993-05-16 # Public domain -# $Id: mkinstalldirs,v 1.10 1996/05/03 07:37:52 friedman Exp $ - errstatus=0 for file diff --git a/lispintro/texinfo.tex b/lispintro/texinfo.tex index 8ef3918f82..af648f19e1 100644 --- a/lispintro/texinfo.tex +++ b/lispintro/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2003-07-16.18} +\def\texinfoversion{2003-12-30.09} % % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. @@ -6771,3 +6771,7 @@ should work if nowhere else does.} @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: + +@ignore + arch-tag: 53261dd3-7df7-4ec3-9d90-af7a955d3c87 +@end ignore diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 003af091fb..3b69d95539 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,31 @@ +2004-01-12 Jan Dj,Ad(Brv + + * xlwmenuP.h (_XlwMenu_part): Added top_depth. + + * xlwmenu.h: Removed declaration of pop_up_menu + + * xlwmenu.c (Start): Get correct time if time in event is CurrentTime. + (find_first_selectable, find_next_selectable) + (find_prev_selectable): Add parameter skip_no_call_data to skip + over items with no call data (popup menu titles). + (Down, Up): Compare old_depth to top_depth instead of 2. + Pass True to find_*_selectable:s new parameter if this is a popup menu. + (Left, Right): Compare old_depth to top_depth instead of 2. + Pass 0 to find_*_selectable:s new parameter. + (pop_up_menu): Set top_depth to 1 for pop up menus and 2 for + menu bar menus, to enable keyboard traversal of popups. + + * lwlib-Xm.c (dialog_key_cb): New function. + (make_dialog): Add event handlers to dialog_key_cb for key press + so we can pop down on ESC. + + * lwlib-Xlw.c (xlw_popup_menu): Replace call to pop_up_menu with + XtCallActionProc ("start"). Use a full XEvent since "start" copies it. + + * lwlib-Xaw.c (make_dialog): Add override so dialog pops down + on ESC. + (wm_delete_window): If widget isn't a shell, use the parent. + 2003-05-22 Dave Love * xlwmenu.c: Include lisp.h, not ../src/lisp.h. @@ -8,7 +36,7 @@ (xlw_update_one_widget, xlw_pop_instance) [PROTOTYPES]: Provide ISO C arglists. -2003-04-30 Lute Kamstra +2003-04-30 Lute Kamstra * Makefile.in: Make things function properly in case both LessTif and Open Motif are installed. @@ -1184,3 +1212,5 @@ Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 0cd8ab87-d764-40d9-b86d-d00c71887a9e diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index 11368819f4..1e545949ea 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in @@ -67,3 +67,5 @@ TAGS: ../lib-src/etags $(srcdir)/*.[ch] tags: TAGS .PHONY: tags + +# arch-tag: a881fa74-b56a-44c6-80b4-28a4c65d88ff diff --git a/lwlib/lwlib-Xaw.c b/lwlib/lwlib-Xaw.c index 3ffc0d62f2..867193c7cc 100644 --- a/lwlib/lwlib-Xaw.c +++ b/lwlib/lwlib-Xaw.c @@ -277,6 +277,9 @@ xaw_pop_instance (instance, up) static char overrideTrans[] = "WM_PROTOCOLS: lwlib_delete_dialog()"; +/* Dialogs pop down on any key press */ +static char dialogOverride[] = + ": lwlib_delete_dialog()"; static void wm_delete_window(); static XtActionsRec xaw_actions [] = { {"lwlib_delete_dialog", wm_delete_window} @@ -333,6 +336,8 @@ make_dialog (name, parent, pop_up_p, shell_title, icon_name, text_input_slot, ra ac = 0; dialog = XtCreateManagedWidget (name, dialogWidgetClass, shell, av, ac); + override = XtParseTranslationTable (dialogOverride); + XtOverrideTranslations (dialog, override); bc = 0; button = 0; @@ -511,8 +516,8 @@ xaw_generic_callback (widget, closure, call_data) } static void -wm_delete_window (shell, closure, call_data) - Widget shell; +wm_delete_window (w, closure, call_data) + Widget w; XtPointer closure; XtPointer call_data; { @@ -520,7 +525,13 @@ wm_delete_window (shell, closure, call_data) Cardinal nkids; int i; Widget *kids = 0; - Widget widget; + Widget widget, shell; + + if (XtIsSubclass (w, dialogWidgetClass)) + shell = XtParent (w); + else + shell = w; + if (! XtIsSubclass (shell, shellWidgetClass)) abort (); XtVaGetValues (shell, XtNnumChildren, &nkids, NULL); @@ -670,3 +681,6 @@ xaw_creation_table [] = {"main", xaw_create_main}, {NULL, NULL} }; + +/* arch-tag: fbbd3589-ae1c-41a0-9142-f628cfee6564 + (do not change this comment) */ diff --git a/lwlib/lwlib-Xaw.h b/lwlib/lwlib-Xaw.h index 6c9d733575..41b8013ee6 100644 --- a/lwlib/lwlib-Xaw.h +++ b/lwlib/lwlib-Xaw.h @@ -27,3 +27,6 @@ void xaw_pop_instance __P ((widget_instance *, Boolean)); #endif /* LWLIB_XAW_H */ + +/* arch-tag: 7c0fb4de-afd9-4112-9214-24b663cc1870 + (do not change this comment) */ diff --git a/lwlib/lwlib-Xlw.c b/lwlib/lwlib-Xlw.c index 47939144ba..248e4e8be7 100644 --- a/lwlib/lwlib-Xlw.c +++ b/lwlib/lwlib-Xlw.c @@ -180,6 +180,7 @@ xlw_create_popup_menu (instance) XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance); XtAddCallback (widget, XtNhighlightCallback, highlight_hook, (XtPointer)instance); + return popup_shell; } @@ -251,7 +252,6 @@ xlw_popup_menu (widget, event) Widget widget; XEvent *event; { - XButtonPressedEvent dummy; XlwMenuWidget mw; if (!XtIsShell (widget)) @@ -260,21 +260,24 @@ xlw_popup_menu (widget, event) mw = (XlwMenuWidget)((CompositeWidget)widget)->composite.children [0]; if (event) - pop_up_menu (mw, (XButtonPressedEvent*) event); + XtCallActionProc ((Widget) mw, "start", event, NULL, 0); else { - dummy.type = ButtonPress; - dummy.serial = 0; - dummy.send_event = 0; - dummy.display = XtDisplay (widget); - dummy.window = XtWindow (XtParent (widget)); - dummy.time = CurrentTime; - dummy.button = 0; - XQueryPointer (dummy.display, dummy.window, &dummy.root, - &dummy.subwindow, &dummy.x_root, &dummy.y_root, - &dummy.x, &dummy.y, &dummy.state); - - pop_up_menu (mw, &dummy); + XEvent dummy; + XButtonPressedEvent *bd = &dummy.xbutton; + + bd->type = ButtonPress; + bd->serial = 0; + bd->send_event = 0; + bd->display = XtDisplay (widget); + bd->window = XtWindow (XtParent (widget)); + bd->time = CurrentTime; + bd->button = 0; + XQueryPointer (bd->display, bd->window, &bd->root, + &bd->subwindow, &bd->x_root, &bd->y_root, + &bd->x, &bd->y, &bd->state); + + XtCallActionProc ((Widget) mw, "start", &dummy, NULL, 0); } } @@ -287,3 +290,5 @@ xlw_destroy_instance (instance) XtDestroyWidget (instance->widget); } +/* arch-tag: 541e3912-477d-406e-9bf2-dbf2b7ff8c3b + (do not change this comment) */ diff --git a/lwlib/lwlib-Xlw.h b/lwlib/lwlib-Xlw.h index 26b848b6c8..36f8244101 100644 --- a/lwlib/lwlib-Xlw.h +++ b/lwlib/lwlib-Xlw.h @@ -27,3 +27,6 @@ void xlw_popup_menu __P ((Widget widget, XEvent * event)); #endif /* LWLIB_XLW_H */ + +/* arch-tag: e5b1511d-8992-4dad-b947-a2440d8f10a2 + (do not change this comment) */ diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c index b22c59a7a1..e57fa57f93 100644 --- a/lwlib/lwlib-Xm.c +++ b/lwlib/lwlib-Xm.c @@ -1035,6 +1035,33 @@ activate_button (widget, closure, call_data) /* creation functions */ +/* Called for key press in dialogs. Used to pop down dialog on ESC. */ +static void +dialog_key_cb (widget, closure, event, continue_to_dispatch) + Widget widget; + XtPointer closure; + XEvent *event; + Boolean *continue_to_dispatch; +{ + KeySym sym = 0; + Modifiers modif_ret; + + XtTranslateKeycode (event->xkey.display, event->xkey.keycode, 0, + &modif_ret, &sym); + + if (sym == osfXK_Cancel) + { + Widget w = *((Widget *) closure); + + while (w && ! XtIsShell (w)) + w = XtParent (w); + + if (XtIsShell (w)) XtPopdown (w); + } + + *continue_to_dispatch = TRUE; +} + /* dialogs */ static Widget make_dialog (name, parent, pop_up_p, shell_title, icon_name, text_input_slot, @@ -1123,6 +1150,8 @@ make_dialog (name, parent, pop_up_p, shell_title, icon_name, text_input_slot, XtSetArg(al[ac], XmNmarginWidth, 10); ac++; XtSetArg(al[ac], XmNnavigationType, XmTAB_GROUP); ac++; children [n_children] = XmCreatePushButton (row, button_name, al, ac); + XtAddEventHandler (children [n_children], + KeyPressMask, False, dialog_key_cb, result); if (i == 0) { @@ -1149,6 +1178,9 @@ make_dialog (name, parent, pop_up_p, shell_title, icon_name, text_input_slot, XtSetArg(al[ac], XmNmarginWidth, 10); ac++; XtSetArg(al[ac], XmNnavigationType, XmTAB_GROUP); ac++; children [n_children] = XmCreatePushButton (row, button_name, al, ac); + XtAddEventHandler (children [n_children], + KeyPressMask, False, dialog_key_cb, result); + if (! button) button = children [n_children]; n_children++; } @@ -1491,6 +1523,7 @@ xm_create_dialog (instance) XtAddCallback (widget, XmNpopdownCallback, xm_nosel_callback, (XtPointer) instance); + return widget; } @@ -1976,3 +2009,6 @@ xm_manage_resizing (w, flag) { XtVaSetValues (w, XtNallowShellResize, flag, NULL); } + +/* arch-tag: 73976f64-73b2-4600-aa13-d9ede20ee965 + (do not change this comment) */ diff --git a/lwlib/lwlib-Xm.h b/lwlib/lwlib-Xm.h index 79f03139f6..6a59a9d34d 100644 --- a/lwlib/lwlib-Xm.h +++ b/lwlib/lwlib-Xm.h @@ -38,3 +38,6 @@ void xm_manage_resizing __P ((Widget w, Boolean flag)); #endif /* LWLIB_XM_H */ + +/* arch-tag: 61561304-c146-437b-8ed3-dc33818703c6 + (do not change this comment) */ diff --git a/lwlib/lwlib-int.h b/lwlib/lwlib-int.h index a198d10551..3e9bee646c 100644 --- a/lwlib/lwlib-int.h +++ b/lwlib/lwlib-int.h @@ -51,3 +51,6 @@ widget_info *lw_get_widget_info __P ((LWLIB_ID)); widget_instance * lw_get_widget_instance __P ((Widget)); #endif /* LWLIB_INTERNAL_H */ + +/* arch-tag: ae02f67d-ef25-421c-b956-b01a4b0aac76 + (do not change this comment) */ diff --git a/lwlib/lwlib-utils.c b/lwlib/lwlib-utils.c index 3abff32579..1980a8261c 100644 --- a/lwlib/lwlib-utils.c +++ b/lwlib/lwlib-utils.c @@ -182,3 +182,6 @@ XtSafelyDestroyWidget (widget) abort (); #endif } + +/* arch-tag: f21f0a1f-2a4e-44e1-8715-7f234fe2d159 + (do not change this comment) */ diff --git a/lwlib/lwlib-utils.h b/lwlib/lwlib-utils.h index c2a7607b13..934b0b48f4 100644 --- a/lwlib/lwlib-utils.h +++ b/lwlib/lwlib-utils.h @@ -18,3 +18,6 @@ XtWidgetBeingDestroyedP __P ((Widget widget)); void XtSafelyDestroyWidget __P ((Widget)); #endif /* _LWLIB_UTILS_H_ */ + +/* arch-tag: 705efd86-9319-4447-80f6-16aa5b349809 + (do not change this comment) */ diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c index 624c758908..525bb9bde0 100644 --- a/lwlib/lwlib.c +++ b/lwlib/lwlib.c @@ -1611,3 +1611,5 @@ lw_separator_p (label, type, motif_p) return separator_p; } +/* arch-tag: 3d730f36-a441-4a71-9971-48ef3b5a4d9f + (do not change this comment) */ diff --git a/lwlib/lwlib.h b/lwlib/lwlib.h index 08aecd3e57..02560e4754 100644 --- a/lwlib/lwlib.h +++ b/lwlib/lwlib.h @@ -167,3 +167,6 @@ int lw_separator_p __P ((char *label, enum menu_separator *type, void lwlib_bcopy __P ((char*, char*, int)); #endif /* LWLIB_H */ + +/* arch-tag: 44d818d5-7eb2-4d87-acd7-b992bb0d5d20 + (do not change this comment) */ diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index 8ebdfe81fb..973fc6ec5d 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -197,6 +197,8 @@ static void Select(); static void Key(); static void Nothing(); static int separator_height __P ((enum menu_separator)); +static void pop_up_menu __P ((XlwMenuWidget, XButtonPressedEvent *)); + static XtActionsRec xlwMenuActionsList [] = @@ -2004,6 +2006,13 @@ Start (w, ev, params, num_params) if (!mw->menu.popped_up) { menu_post_event = *ev; + /* If event is set to CurrentTime, get the last known time stamp. + This is for calculating if (popup) menus should stay up after + a fast click. */ + if (menu_post_event.xbutton.time == CurrentTime) + menu_post_event.xbutton.time + = XtLastTimestampProcessed (XtDisplay (w)); + pop_up_menu (mw, (XButtonPressedEvent*) ev); } else @@ -2044,15 +2053,17 @@ Nothing (w, ev, params, num_params) { } -widget_value * -find_first_selectable (mw, item) +static widget_value * +find_first_selectable (mw, item, skip_no_call_data) XlwMenuWidget mw; widget_value *item; + int skip_no_call_data; { widget_value *current = item; enum menu_separator separator; - while (lw_separator_p (current->name, &separator, 0) || !current->enabled) + while (lw_separator_p (current->name, &separator, 0) || !current->enabled + || (skip_no_call_data && !current->call_data)) if (current->next) current=current->next; else @@ -2061,8 +2072,8 @@ find_first_selectable (mw, item) return current; } -widget_value * -find_next_selectable (mw, item) +static widget_value * +find_next_selectable (mw, item, skip_no_call_data) XlwMenuWidget mw; widget_value *item; { @@ -2070,7 +2081,8 @@ find_next_selectable (mw, item) enum menu_separator separator; while (current->next && (current=current->next) && - (lw_separator_p (current->name, &separator, 0) || !current->enabled)) + (lw_separator_p (current->name, &separator, 0) || !current->enabled + || (skip_no_call_data && !current->call_data))) ; if (current == item) @@ -2079,7 +2091,9 @@ find_next_selectable (mw, item) return current; current = mw->menu.old_stack [mw->menu.old_depth - 2]->contents; - while (lw_separator_p (current->name, &separator, 0) || !current->enabled) + while (lw_separator_p (current->name, &separator, 0) + || !current->enabled + || (skip_no_call_data && !current->call_data)) { if (current->next) current=current->next; @@ -2093,15 +2107,16 @@ find_next_selectable (mw, item) return current; } -widget_value * -find_prev_selectable (mw, item) +static widget_value * +find_prev_selectable (mw, item, skip_no_call_data) XlwMenuWidget mw; widget_value *item; { widget_value *current = item; widget_value *prev = item; - while ((current=find_next_selectable (mw, current)) != item) + while ((current=find_next_selectable (mw, current, skip_no_call_data)) + != item) { if (prev == current) break; @@ -2120,15 +2135,23 @@ Down (w, ev, params, num_params) { XlwMenuWidget mw = (XlwMenuWidget) w; widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1]; + int popup_menu_p = mw->menu.top_depth == 1; /* Inside top-level menu-bar? */ - if (mw->menu.old_depth == 2) + if (mw->menu.old_depth == mw->menu.top_depth) /* When in the menu-bar is pressed, display the corresponding - sub-menu and select the first selectable menu item there. */ - set_new_state (mw, find_first_selectable (mw, selected_item->contents), mw->menu.old_depth); + sub-menu and select the first selectable menu item there. + If this is a popup menu, skip items with zero call data (title of + the popup). */ + set_new_state (mw, + find_first_selectable (mw, + selected_item->contents, + popup_menu_p), + mw->menu.old_depth); else /* Highlight next possible (enabled and not separator) menu item. */ - set_new_state (mw, find_next_selectable (mw, selected_item), mw->menu.old_depth - 1); + set_new_state (mw, find_next_selectable (mw, selected_item, popup_menu_p), + mw->menu.old_depth - 1); remap_menubar (mw); } @@ -2142,27 +2165,39 @@ Up (w, ev, params, num_params) { XlwMenuWidget mw = (XlwMenuWidget) w; widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1]; + int popup_menu_p = mw->menu.top_depth == 1; /* Inside top-level menu-bar? */ - if (mw->menu.old_depth == 2) + if (mw->menu.old_depth == mw->menu.top_depth) { /* FIXME: this is tricky. in the menu-bar should select the last selectable item in the list. So we select the first selectable one and find the previous selectable item. Is there a better way? */ - set_new_state (mw, find_first_selectable (mw, selected_item->contents), mw->menu.old_depth); + /* If this is a popup menu, skip items with zero call data (title of + the popup). */ + set_new_state (mw, + find_first_selectable (mw, + selected_item->contents, + popup_menu_p), + mw->menu.old_depth); remap_menubar (mw); selected_item = mw->menu.old_stack [mw->menu.old_depth - 1]; - set_new_state (mw, find_prev_selectable (mw, selected_item), mw->menu.old_depth - 1); + set_new_state (mw, + find_prev_selectable (mw, + selected_item, + popup_menu_p), + mw->menu.old_depth - 1); } else /* Highlight previous (enabled and not separator) menu item. */ - set_new_state (mw, find_prev_selectable (mw, selected_item), mw->menu.old_depth - 1); + set_new_state (mw, find_prev_selectable (mw, selected_item, popup_menu_p), + mw->menu.old_depth - 1); remap_menubar (mw); } -static void +void Left (w, ev, params, num_params) Widget w; XEvent *ev; @@ -2173,31 +2208,36 @@ Left (w, ev, params, num_params) widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1]; /* Inside top-level menu-bar? */ - if (mw->menu.old_depth == 2) + if (mw->menu.old_depth == mw->menu.top_depth) /* When in the menu-bar is pressed, display the previous item on the menu-bar. If the current item is the first one, highlight the last item in the menubar (probably Help). */ - set_new_state (mw, find_prev_selectable (mw, selected_item), mw->menu.old_depth - 1); + set_new_state (mw, find_prev_selectable (mw, selected_item, 0), + mw->menu.old_depth - 1); else if (mw->menu.old_depth == 1 && selected_item->contents) /* Is this menu item expandable? */ { set_new_state (mw, selected_item->contents, mw->menu.old_depth); remap_menubar (mw); selected_item = mw->menu.old_stack [mw->menu.old_depth - 1]; - if (!selected_item->enabled && find_first_selectable (mw, selected_item)) - set_new_state (mw, find_first_selectable (mw, selected_item), mw->menu.old_depth - 1); + if (!selected_item->enabled && find_first_selectable (mw, + selected_item, + 0)) + set_new_state (mw, find_first_selectable (mw, selected_item, 0), + mw->menu.old_depth - 1); } else { pop_new_stack_if_no_contents (mw); - set_new_state (mw, mw->menu.old_stack [mw->menu.old_depth - 2], mw->menu.old_depth - 2); + set_new_state (mw, mw->menu.old_stack [mw->menu.old_depth - 2], + mw->menu.old_depth - 2); } remap_menubar (mw); } -static void +void Right (w, ev, params, num_params) Widget w; XEvent *ev; @@ -2208,23 +2248,28 @@ Right (w, ev, params, num_params) widget_value* selected_item = mw->menu.old_stack [mw->menu.old_depth - 1]; /* Inside top-level menu-bar? */ - if (mw->menu.old_depth == 2) + if (mw->menu.old_depth == mw->menu.top_depth) /* When in the menu-bar is pressed, display the next item on the menu-bar. If the current item is the last one, highlight the first item (probably File). */ - set_new_state (mw, find_next_selectable (mw, selected_item), mw->menu.old_depth - 1); + set_new_state (mw, find_next_selectable (mw, selected_item, 0), + mw->menu.old_depth - 1); else if (selected_item->contents) /* Is this menu item expandable? */ { set_new_state (mw, selected_item->contents, mw->menu.old_depth); remap_menubar (mw); selected_item = mw->menu.old_stack [mw->menu.old_depth - 1]; - if (!selected_item->enabled && find_first_selectable (mw, selected_item)) - set_new_state (mw, find_first_selectable (mw, selected_item), mw->menu.old_depth - 1); + if (!selected_item->enabled && find_first_selectable (mw, + selected_item, + 0)) + set_new_state (mw, find_first_selectable (mw, selected_item, 0), + mw->menu.old_depth - 1); } else { pop_new_stack_if_no_contents (mw); - set_new_state (mw, mw->menu.old_stack [mw->menu.old_depth - 2], mw->menu.old_depth - 2); + set_new_state (mw, mw->menu.old_stack [mw->menu.old_depth - 2], + mw->menu.old_depth - 2); } remap_menubar (mw); @@ -2305,7 +2350,7 @@ Select (w, ev, params, num_params) /* Special code to pop-up a menu */ -void +static void pop_up_menu (mw, event) XlwMenuWidget mw; XButtonPressedEvent* event; @@ -2349,6 +2394,7 @@ pop_up_menu (mw, event) display_menu (mw, 0, False, NULL, NULL, NULL, NULL, NULL); mw->menu.windows [0].x = x + borderwidth; mw->menu.windows [0].y = y + borderwidth; + mw->menu.top_depth = 1; /* Popup menus don't have a bar so top is 1 */ } else { @@ -2359,6 +2405,7 @@ pop_up_menu (mw, event) /* notes the absolute position of the menubar window */ mw->menu.windows [0].x = ev->xmotion.x_root - ev->xmotion.x; mw->menu.windows [0].y = ev->xmotion.y_root - ev->xmotion.y; + mw->menu.top_depth = 2; } #ifdef emacs @@ -2395,3 +2442,6 @@ pop_up_menu (mw, event) handle_motion_event (mw, (XMotionEvent*)event); } + +/* arch-tag: 657f43dd-dfd0-4cc9-910c-52935f01176e + (do not change this comment) */ diff --git a/lwlib/xlwmenu.h b/lwlib/xlwmenu.h index 1466724db0..c1f37b5617 100644 --- a/lwlib/xlwmenu.h +++ b/lwlib/xlwmenu.h @@ -53,7 +53,7 @@ typedef struct _XlwMenuClassRec *XlwMenuWidgetClass; extern WidgetClass xlwMenuWidgetClass; -void -pop_up_menu __P ((XlwMenuWidget, XButtonPressedEvent*)); - #endif /* _XlwMenu_h */ + +/* arch-tag: 0c019735-d61b-4080-be85-4fdd6e50ae07 + (do not change this comment) */ diff --git a/lwlib/xlwmenuP.h b/lwlib/xlwmenuP.h index 4dd623d02d..f6aa0f4a58 100644 --- a/lwlib/xlwmenuP.h +++ b/lwlib/xlwmenuP.h @@ -47,6 +47,7 @@ typedef struct _XlwMenu_part unsigned free_bottom_shadow_color_p : 1; /* State of the XlwMenu */ + int top_depth; int old_depth; widget_value** old_stack; int old_stack_length; @@ -97,3 +98,6 @@ typedef struct _XlwMenuClassRec extern XlwMenuClassRec xlwMenuClassRec; #endif /* _XlwMenuP_h */ + +/* arch-tag: 18d7fc41-ffa0-47a3-a49f-3469900c7a25 + (do not change this comment) */ diff --git a/mac/ChangeLog b/mac/ChangeLog index 6e8bff007e..aa6e9844fe 100644 --- a/mac/ChangeLog +++ b/mac/ChangeLog @@ -1,3 +1,22 @@ +2004-01-14 Stefan Monnier + + * src/Emacs.r: Update TOO_MUCH_RAM error message. + +2003-11-22 Lars Hansen + + * inc/grp.h: Added. + +2003-11-02 Andrew Choi + + * src/Emacs.r [!TARGET_API_MAC_CARBON]: Don't define hfdr resource. + * Emacs.app/Contents/Resources/Emacs.rsrc: Remove. + +2003-10-31 Andrew Choi + + * INSTALL: Add Nozomu Ando's changes to instructions for + installing on X Window (that static libraries are no longer + necessary after his changes to src/unexmacosx.c). + 2003-04-28 Andrew Choi * make-package: Allocate 5% extra space on disk image for @@ -619,3 +638,5 @@ Copyright (C) 2001 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: c6fd43f7-0e50-4c0a-ac82-1c8a9e45a9bf diff --git a/mac/INSTALL b/mac/INSTALL index 1c44aa529f..def7913f83 100644 --- a/mac/INSTALL +++ b/mac/INSTALL @@ -1,6 +1,6 @@ * BUILDING EMACS ON MAC OS 8/9 AND MAC OS X -*- outline -*- -Copyright (c) 2001, 2002 Free Software Foundation, Inc. +Copyright (c) 2001, 2002, 2004 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that @@ -58,16 +58,11 @@ must be typed to the shell to enable Emacs to locate its resources correctly. You may want to create a symlink or alias to this path to quickly access both the terminal and GUI versions. -If you are building Emacs to run on Mac OS X and X Window, you need to -create a directory containing statically-linked X libraries. +If you are building Emacs to run on Mac OS X and X Window, +instead of typing `./configure' above, type - sudo mkdir /usr/X11R6/libstatic - cd /usr/X11R6/libstatic - sudo ln -s ../lib/lib*.a ../lib/X11 . + ./configure --without-carbon --with-x -Instead of typing `./configure' above, type - - ./configure --without-carbon --with-x --x-libraries=/usr/X11R6/libstatic To use colors in a terminal, put the following lines in the file ~/.termcap and log in again. @@ -159,11 +154,6 @@ options to user $prefix/bin/emacs to reduce disk space. Note, this option may removed in the future. -If you are intending to build a binary distribution for X windows, you -will probably want to follow the directions above to create static -X11R6 libraries and run the make-package script like this - -./make-package --with-x -C,--x-libraries=/usr/X11R6/libstatic For usage of other options, use the --help option. @@ -215,7 +205,7 @@ Emacs should build and run on a PowerMac running Mac OS 8.6 - 10.2. You will need around 100 MB of disk space for the source files and intermediate files. -It will not run on machines running Mac OS 8/9 with more than 256 MB +It will not run on machines running Mac OS 8/9 with more than 512 MB of physical or virtual memory. It does not have this restriction when it is run under Mac OS X. But the usual 128MB buffer limit of a 32-bit Emacs still exists. diff --git a/mac/inc/alloca.h b/mac/inc/alloca.h index f0b1e76fbf..c216231eb4 100644 --- a/mac/inc/alloca.h +++ b/mac/inc/alloca.h @@ -27,3 +27,6 @@ void *__alloca(size_t size); #endif #endif + +/* arch-tag: 8d4114d1-633e-49e7-8f18-b5648f9c4511 + (do not change this comment) */ diff --git a/mac/inc/config.h b/mac/inc/config.h index beb8c0a637..b7257f35f3 100644 --- a/mac/inc/config.h +++ b/mac/inc/config.h @@ -570,3 +570,6 @@ extern char *getenv (); /* #define GLYPH_DEBUG 1 */ #define NO_RETURN /* nothing */ + +/* arch-tag: 2596b649-b569-448e-8880-373d2a9909b7 + (do not change this comment) */ diff --git a/mac/inc/defs-cw6.h b/mac/inc/defs-cw6.h index e8d8abb875..da8d442126 100644 --- a/mac/inc/defs-cw6.h +++ b/mac/inc/defs-cw6.h @@ -24,3 +24,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #define MAC_OS8 1 #define MAC_OS 1 + +/* arch-tag: 4aa4fcea-3a95-433d-a7d6-b029afca17f1 + (do not change this comment) */ diff --git a/mac/inc/dirent.h b/mac/inc/dirent.h index 59b0c44cc4..5e1b3a6660 100644 --- a/mac/inc/dirent.h +++ b/mac/inc/dirent.h @@ -46,3 +46,6 @@ extern int closedir(DIR *); extern struct dirent *readdir(DIR *); #endif /* _DIRENT_H */ + +/* arch-tag: ec3116df-70f9-4a4a-b6d0-1858aaa9ea22 + (do not change this comment) */ diff --git a/mac/inc/epaths.h b/mac/inc/epaths.h index 0ec9da70a2..8c9bbd2f8b 100644 --- a/mac/inc/epaths.h +++ b/mac/inc/epaths.h @@ -59,3 +59,6 @@ Boston, MA 02111-1307, USA. */ /* Where Emacs should look for the application default file. */ /* #define PATH_X_DEFAULTS "/usr/lib/X11/%L/%T/%N%C%S:/usr/lib/X11/%l/%T/%N%C%S:/usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S" */ + +/* arch-tag: 32e95134-dfe4-47be-be28-e8cbf78505b6 + (do not change this comment) */ diff --git a/mac/inc/grp.h b/mac/inc/grp.h new file mode 100755 index 0000000000..9c60d5ca2c --- /dev/null +++ b/mac/inc/grp.h @@ -0,0 +1,36 @@ +/* Replacement grp.h file for building GNU Emacs on the Macintosh. + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#ifndef _GRP_H +#define _GRP_H + +#include + +/* Emacs uses only gr_name */ +struct group { + char *gr_name; /* group name */ +}; + +struct group *getgrgid(gid_t); + +#endif /* _GRP_H */ + +/* arch-tag: 3b1d3315-05d5-4c7a-8404-3754bb40020c + (do not change this comment) */ diff --git a/mac/inc/m-mac.h b/mac/inc/m-mac.h index 9e257a3121..f3f6f084b3 100644 --- a/mac/inc/m-mac.h +++ b/mac/inc/m-mac.h @@ -138,3 +138,6 @@ Boston, MA 02111-1307, USA. */ extern int sign_extend_temp; #endif #endif + +/* arch-tag: 9e759031-ab7b-4c76-99d7-3ae94a98de38 + (do not change this comment) */ diff --git a/mac/inc/pwd.h b/mac/inc/pwd.h index dedc8091c4..b5eba30782 100644 --- a/mac/inc/pwd.h +++ b/mac/inc/pwd.h @@ -35,3 +35,6 @@ struct passwd *getpwuid(uid_t); struct passwd *getpwnam(const char *); #endif /* _PWD_H */ + +/* arch-tag: e169cad7-12ca-4660-a35e-36f80d5d345f + (do not change this comment) */ diff --git a/mac/inc/s-mac.h b/mac/inc/s-mac.h index 35143ddf26..c187944ae6 100644 --- a/mac/inc/s-mac.h +++ b/mac/inc/s-mac.h @@ -318,3 +318,6 @@ extern double atof (const char *); #define volatile #define SYMS_SYSTEM syms_of_mac() + +/* arch-tag: 6a941c4b-a419-4d25-80ac-9335053e58b2 + (do not change this comment) */ diff --git a/mac/inc/sys/file.h b/mac/inc/sys/file.h index b33f8aaa9c..0566b63cd5 100644 --- a/mac/inc/sys/file.h +++ b/mac/inc/sys/file.h @@ -57,3 +57,6 @@ int pause(void); char *getwd(char *); #endif /* _SYS_FILE_H */ + +/* arch-tag: c3a653d5-f228-4d62-a47c-0398015195de + (do not change this comment) */ diff --git a/mac/inc/sys/ioctl.h b/mac/inc/sys/ioctl.h index ae1a76b7a0..36a921f2a1 100644 --- a/mac/inc/sys/ioctl.h +++ b/mac/inc/sys/ioctl.h @@ -29,3 +29,6 @@ int ioctl(int, int, void *); #define TCGETA 2 #endif /* _SYS_IOCTL_H */ + +/* arch-tag: fa0c3dda-dbe0-4a49-86c4-7516c83c3c8c + (do not change this comment) */ diff --git a/mac/inc/sys/param.h b/mac/inc/sys/param.h index 247f3971a4..a0e3c6d6f2 100644 --- a/mac/inc/sys/param.h +++ b/mac/inc/sys/param.h @@ -26,3 +26,6 @@ Boston, MA 02111-1307, USA. */ #define MAXPATHLEN 255 #endif /* _SYS_PARAM_H */ + +/* arch-tag: dceae288-b9cf-4a8f-a780-bca2cadf0c47 + (do not change this comment) */ diff --git a/mac/inc/sys/stat.h b/mac/inc/sys/stat.h index 0f9ee79dab..b72385c1b4 100644 --- a/mac/inc/sys/stat.h +++ b/mac/inc/sys/stat.h @@ -84,3 +84,6 @@ struct stat { #endif /* __MRC__ */ #endif /* _SYS_STAT_H */ + +/* arch-tag: b7da83f5-3d3f-4b19-9cd2-790dd87145e4 + (do not change this comment) */ diff --git a/mac/inc/sys/time.h b/mac/inc/sys/time.h index b9936e9207..b80135b7b5 100644 --- a/mac/inc/sys/time.h +++ b/mac/inc/sys/time.h @@ -29,3 +29,6 @@ struct timeval { }; #endif /* _SYS_TYPES_H */ + +/* arch-tag: f85ed04d-0e99-4f97-892b-fe029d0e92f9 + (do not change this comment) */ diff --git a/mac/inc/sys/types.h b/mac/inc/sys/types.h index 9f358b2a4e..0d647d16c9 100644 --- a/mac/inc/sys/types.h +++ b/mac/inc/sys/types.h @@ -38,3 +38,6 @@ typedef unsigned long mode_t; #endif /* __MRC__ */ #endif /* _SYS_TYPES_H */ + +/* arch-tag: d4b69a6a-b2ff-4be2-a152-a162af81d823 + (do not change this comment) */ diff --git a/mac/inc/termio.h b/mac/inc/termio.h index 7d423630c9..3996351a79 100644 --- a/mac/inc/termio.h +++ b/mac/inc/termio.h @@ -66,3 +66,6 @@ struct termio { #define TCSETAF 5 #endif /* _SYS_TERMIO_H */ + +/* arch-tag: 0e7a100d-2ac0-412e-9dc4-52e39ef43e14 + (do not change this comment) */ diff --git a/mac/inc/utime.h b/mac/inc/utime.h index 1a7f925329..a6ce81af1e 100644 --- a/mac/inc/utime.h +++ b/mac/inc/utime.h @@ -35,3 +35,6 @@ struct utimbuf { int utime(const char *path, const struct utimbuf *buf); #endif + +/* arch-tag: 52dc3f6b-6122-4568-8f09-a5a56de6a324 + (do not change this comment) */ diff --git a/mac/inc/utsname.h b/mac/inc/utsname.h index 0469fcf9ea..e1fe3217ea 100644 --- a/mac/inc/utsname.h +++ b/mac/inc/utsname.h @@ -30,3 +30,6 @@ struct utsname { int uname(struct utsname *name); #endif + +/* arch-tag: 8a013744-4d43-4084-8e2f-d3fb66c83160 + (do not change this comment) */ diff --git a/mac/make-package b/mac/make-package index b3911afa0d..d918660538 100755 --- a/mac/make-package +++ b/mac/make-package @@ -425,4 +425,5 @@ rm ${builddir}/mac/EmacsRW.dmg echo "Cleaning up the staging directory" rm -rf ${builddir}/mac/Emacs.pkg ${removable_build_dir} +# arch-tag: 1b631d0d-9fde-4f71-80c0-33e0e5815515 ### make-package ends here diff --git a/mac/makefile.MPW b/mac/makefile.MPW index d170750679..063e63e175 100644 --- a/mac/makefile.MPW +++ b/mac/makefile.MPW @@ -1123,3 +1123,4 @@ Make-DocFile "{Source}chdir.c.x" Ä {Makefile} "{Source}chdir.c" {PPCC} "{Source}chdir.c" -o "{Source}chdir.c.x" {Make-DocFile-PPCCOptions} +# arch-tag: c9d9bc1a-142f-41da-b75e-79e0c44ffbb4 diff --git a/mac/src/Emacs.r b/mac/src/Emacs.r index 6163085873..1403a24721 100644 --- a/mac/src/Emacs.r +++ b/mac/src/Emacs.r @@ -1,5 +1,5 @@ /* Resource definitions for GNU Emacs on the Macintosh. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. */ #include "Types.r" /* added for finder icon balloon help --ben */ #include "Balloons.r" -#endif /* Define to use gnu icon */ /* #define GNU_ICON 1 */ @@ -57,7 +56,6 @@ resource 'hfdr' (-5696) { /*help for emacs icon*/ } }; -#ifndef TARGET_API_MAC_CARBON /* added for finder icon balloon help --ben */ resource 'STR ' (128) { /*help message for emacs icon*/ "GNU Emacs\0xd1the extensible, customizable, self-documenting real-time display editor." @@ -176,7 +174,7 @@ resource 'DITL' (129, purgeable) { {10, 60, 72, 278}, StaticText { disabled, - "Emacs does not run on a Macintosh with more than 256 MB of physical or virtual memory" + "Emacs does not run on a Macintosh with more than 512 MB of physical or virtual memory" } } }; diff --git a/mac/src/chdir.c b/mac/src/chdir.c index cfa77c8c44..a982e941f9 100644 --- a/mac/src/chdir.c +++ b/mac/src/chdir.c @@ -41,3 +41,6 @@ int chdir(const char *path) return error == noErr ? 0 : -1; } + +/* arch-tag: f567b034-fd9e-43d1-94cb-9012375237d1 + (do not change this comment) */ diff --git a/man/ChangeLog b/man/ChangeLog index 3b55fff5d1..66ff49e2ce 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,402 @@ +2004-04-05 Kim F. Storm + + * custom.texi (File Variables): Add safe-local-eval-forms. + +2004-04-05 Jesper Harder + + * info.texi (Info Search): Add info-apropos. + +2004-04-02 Luc Teirlinck + + * files.texi (Reverting): Correct description of revert-buffer's + handling of point. + +2004-03-22 Juri Linkov + + * emacs.texi (Top): Add `Misc X'. + + * faq.texi, trouble.texi: Fix help key bindings. + + * glossary.texi: Improve references. + + * help.texi: Sync keywords with finder.el. + + * mini.texi (Completion): Add description for menu items. + + * misc.texi (Browse-URL, FFAP): Add information about keywords. + + * sending.texi (Mail Methods): Fix xref to Message manual. + +2004-03-17 Luc Teirlinck + + * info.texi (Advanced): Replace @unnumberedsubsec by @subheading + (as suggested by Karl Berry). Update information about colored + stars in menus. Add new subheading describing M-n. + +2004-03-12 Richard M. Stallman + + * cl.texi (Top): Rename top node's title. + + * buffers.texi (Misc Buffer): Add index entry for rename-uniquely. + +2004-03-08 Karl Berry + + * info.texi: \input texinfo.tex instead of just texinfo, to avoid + problems making the texinfo distribution. + +2004-03-04 Richard M. Stallman + + * search.texi (Regexps): Explain that ^ and $ have their + special meanings only in certain contexts. + + * programs.texi (Expressions): Doc C-M-SPC as alias for C-M-@. + + * mule.texi (Specify Coding): Doc C-x RET F. + + * buffers.texi (Misc Buffer): Explain use of M-x rename-uniquely + for multiple compile and grep buffers. + (Indirect Buffers): Don't recommand clone-indirect-buffer + for multiple compile and grep buffers. + +2004-02-29 Simon Josefsson + + * smtpmail.texi (Authentication): Changed the list of supported + authentication mechanisms from CRAM-MD5, PLAIN and LOGIN-MD5 to + CRAM-MD5 and LOGIN, tiny patch from Andreas Voegele + . + +2004-02-29 Juanma Barranquero + + * makefile.w32-in (mostlyclean, clean, maintainer-clean): Use + $(DEL) instead of rm, and ignore exit code. + +2004-02-29 Kai Grossjohann + + Tramp version 2.0.39 released. + +2004-02-29 Michael Albinus + + * tramp.texi (Customizing Completion): Explain new functions + `tramp-parse-shostkeys' and `tramp-parse-sknownhosts'. + (all): Savannah URLs unified to "http://savannah.nongnu.org". + (Top): Refer to Savannah mailing list as the major one. Mention + older mailing lists in HTML mode only. + (Auto-save and Backup): Add auto-save. Based on wording of Kai. + (Frequently Asked Questions): Remote hosts must not be Unix-like + for "smb" method. + (Password caching): New node. + (External transfer methods): Refer to password caching for "smb" + method. + +2004-02-23 Nick Roberts + + * building.texi (Watch Expressions): Update. + +2004-02-21 Juri Linkov + + * cmdargs.texi (Action Arguments): Add alias --find-file. Add + --directory, --help, --version. Move text about command-line-args + to Command Arguments. + (Initial Options): Remove alias -batch. Add @cindex for --script. + Fix @cindex for -q. Add --no-desktop. Add alias --no-multibyte, + --no-unibyte. + (Window Size X): Join -g and --geometry. Add @cindex. + (Borders X): Fix @cindex for -ib. Add @cindex for -bw. + (Title X): Remove alias -title. + (Icons X): Remove alias -iconic. + (Misc X): New node. + +2004-02-17 Karl Berry + + * info.texi (Help-Int): mention the new line number feature. + +2004-02-15 Jan Dj,Ad(Brv + + * frames.texi (Drag and drop): Add Motif to list of supported + protocols. + +2004-02-14 Jonathan Yavner + + * ses.texi (Advanced Features): New functionality for + ses-set-header-row (defaults to current row unless C-u used). + (Acknowledgements): Added Stefan Monnier. + +2004-02-03 Jan Dj,Ad(Brv + + * frames.texi (Drag and drop): New section. + +2004-01-24 Richard M. Stallman + + * emacs.texi (Acknowledgments): Renamed from Acknowledgements. + Include it only @ifnotinfo. Patch the preceding and following + node headers to point to each other. + +2004-01-11 Glenn Morris + + * calendar.texi (Appointments): Update section. + +2003-12-29 Kevin Ryde + + * viper.texi (Vi Macros): Fix reference to the Emacs manual. + + * programs.texi (C Modes): Fix the xref. + +2003-12-23 Nick Roberts + + * building.texi (Watch Expressions): Update. + (Commands of GUD): Include use of toolbar + breakpoints set from + fringe/margin. + +2003-12-03 Andre Spiegel + + * files.texi: Say how to disable VC. Suggested by Alan Mackenzie + . + +2003-11-30 Kai Grossjohann + + Tramp version 2.0.38 released. + + * tramp.texi (Remote shell setup): Warn of environment variables + FRUMPLE if user frumple exists. Suggested by Sven Gabriel + . + (Configuration): Tramp now chooses base64/uuencode + automatically. Update wording accordingly. + (Top): More description for the `Default Method' menu entry. + (Default Method): Use @code, not @var, for Lisp variables. + (Default Method): New subsection `Which method is the right one + for me?' Suggested by Christian Kirsch. + (Configuration): Pointer to new subsection added. + (Default Method): Too many "use" in one sentence. + Rephrase. Reported by Christian Kirsch. + (Filename Syntax): Old `su' example is probably a left-over from + the sm/su method naming. Replace with `ssh', instead. + (External transfer methods, Auto-save and Backup): + Typo fixes. + +2003-11-02 Michael Albinus + + * tramp.texi (all): Harmonize all occurences of @tramp{}. + (Top): Mention japanese manual only if flag `jamanual' is set. + Insert section `Japanese manual' in menu. + +2003-11-29 Jan Dj,Ad(Brv + + * frames.texi (Dialog Boxes): Added use-file-dialog. + +2003-11-26 Thien-Thi Nguyen + + * eshell.texi (Known Problems): Add doc item. + +2003-11-22 Martin Stjernholm + + * ack.texi: Note that Alan Mackenzie contributed the AWK support + in CC Mode. + +2003-11-22 Martin Stjernholm + + * cc-mode.texi: Updated for CC Mode 5.30. + + Note: Please refrain from doing purely cosmetic changes like + removing trailing whitespace in this manual; it clobbers cvs + merging for no good reason. + +2003-11-02 Jesper Harder (tiny change) + + * man/ack.texi, man/basic.texi, man/cmdargs.texi: + * man/commands.texi, man/custom.texi, man/display.texi: + * man/ediff.texi, man/emacs.texi, man/faq.texi, man/files.texi: + * man/frames.texi, man/glossary.texi, man/killing.texi: + * man/macos.texi, man/mark.texi, man/misc.texi, man/msdog.texi: + * man/mule.texi, man/rmail.texi, man/search.texi: + * man/sending.texi, man/text.texi, man/tramp.texi: + * man/trouble.texi, man/vip.texi, man/viper.texi, man/widget.texi: + * man/woman.texi: Replace @sc{ascii} and ASCII with @acronym{ASCII}. + +2003-11-01 Alan Mackenzie + + * search.texi (Scrolling During Incremental Search): Document a + new scrolling facility in isearch mode. + +2003-10-26 Karl Berry + + * info.texi (Info Search): echo area, not echo are. From Debian + diff. + +2003-10-26 Per Abrahamsen + + * widget.texi (Defining New Widgets): Document new beavior of + :buttons and :children keywords. + +2003-10-22 Miles Bader + + * Makefile.in (info): Move before $(top_srcdir)/info. + +2003-10-22 Nick Roberts + + * building.texi (Watch Expressions): Update section on data display + to reflect code changes (GDB Graphical Interface). + +2003-10-17 Thien-Thi Nguyen + + * tramp.texi (Inline methods): Small grammar fix. + (External transfer methods): Likewise. + +2003-10-13 Richard M. Stallman + + * xresources.texi (GTK resources): Clean up previous change. + +2003-10-12 Jan Dj,Ad(Brv + + * xresources.texi (GTK resources): Added a note that some themes + disallow customizations. Added scroll theme example. + +2003-10-08 Nick Roberts + + * speedbar.texi: Remove paragraph for GUD that is no longer true. + +2003-10-06 Luc Teirlinck + + * texinfo.tex: Replace `%' in arch tagline by @ignore. + +2003-09-30 Richard M. Stallman + + * dired-x.texi (Miscellaneous Commands): Delete M-g, w, T. + + * widget.texi (User Interface): Fix typos. + + * pcl-cvs.texi, cl.texi, woman.texi, ediff.texi: Fix @strong{Note:}. + + * cmdargs.texi (General Variables): Remove MAILRC envvar. + + * misc.texi (Saving Emacs Sessions): Shorten the section, + collapsing back into one node. + +2003-09-30 Lars Hansen + + * misc.texi: Section "Saving Emacs Sessions" rewritten. + +2003-09-29 Jan D. + + * xresources.texi (GTK names in Emacs): Correct typo. + +2003-09-29 Thien-Thi Nguyen + + * pcl-cvs.texi (Selected Files): Fix typo. + +2003-09-24 Luc Teirlinck + + * cmdargs.texi (Font X): Mention new default font. More + fully describe long font names, wildcard patterns and the + problems involved. (Result of discussion on emacs-devel.) + +2003-09-22 Luc Teirlinck + + * emacs.texi (Acknowledgements): Correct typo. + +2003-09-22 Richard M. Stallman + + * dired.texi (Misc Dired Commands): New node. + (Dired Navigation): Add dired-goto-file. + + * files.texi (File Aliases, Misc File Ops): Add @cindex entries. + + * emacs.texi (Acknowledgements): New node, split from Distribution. + + * cmdargs.texi (Action Arguments): -f reads interactive args. + +2003-09-21 Karl Berry + + * info.texi (] and [ commands): no period at end of section title. + +2003-09-08 Lute Kamstra + + * screen.texi (Mode Line): Say that POS comes before LINE. + Mention `size-indication-mode'. + * display.texi (Optional Mode Line): Document + `size-indication-mode'. + * basic.texi (Position Info): Mention `size-indication-mode'. + +2003-09-07 Luc Teirlinck + + * xresources.texi (Resources): Refer to `editres' man page. + (Lucid Resources): Update defaults. Expand desciption of + `shadowThickness'. + +2003-09-04 Miles Bader + + * Makefile.in (top_srcdir): New variable. + ($(top_srcdir)/info): New rule. + (info): Depend on it. + +2003-09-03 Peter Runestig + + * makefile.w32-in: New file. + +2003-08-29 Richard M. Stallman + + * misc.texi (Saving Emacs Sessions): Correct previous change. + +2003-08-26 Per Abrahamsen + + * widget.texi (User Interface): Explain the need of static text + around an editable field. + +2003-08-19 Luc Teirlinck + + * widget.texi (Basic Types): The argument to `:help-echo' can now + be a form that evaluates to a string. + + * emacs.texi (Top): Update menu to reflect new Keyboard Macros + chapter. + (Intro): Include kmacro.texi after fixit.texi instead of after + custom.texi. (As suggested by Kim Storm.) + +2003-08-18 Luc Teirlinck + + * fixit.texi (Fixit): Update `Next' pointer. + * files.texi (Files): Update `Previous' pointer. + * kmacro.texi (Keyboard Macros): Remove redundant node and + section. + * emacs.texi (Intro): Include kmacro.texi after custom.texi. + (Suggested by Kim Storm.) + * Makefile (EMACSSOURCES): Add kmacro.texi. (Suggested by Kim + Storm.) + +2003-08-18 Kim F. Storm + + * kmacro.texi: New file describing enhanced keyboard macro + functionality. Replaces old description in custom.texi. + + * custom.texi (Customization): Add xref to Keyboard Macros chapter. + (Keyboard Macros): Move to new kmacro.texi file. + + * emacs.texi (Keyboard Macros): Reference new keyboard macro topics. + + * calc.texi (Queries in Macros): Update xref to keyboard macro query. + +2003-08-17 Edward M. Reingold + + * calendar.texi (Specified Dates): Add `calendar-goto-day-of-year'. + +2003-08-17 Alex Schroeder + + * misc.texi (Saving Emacs Sessions): Manual M-x desktop-save not + required. + +2003-08-16 Richard M. Stallman + + * dired-x.texi (Shell Command Guessing): Explain *. + +2003-08-16 Chunyu Wang (tiny change) + + * pcl-cvs.texi (Log Edit Mode): Fix key binding for + log-edit-insert-changelog. + +2003-08-05 Richard M. Stallman + + * programs.texi (Lisp Indent): Don't describe + lisp-indent-function property here. Use xref to Lisp Manual. + 2003-08-03 Karl Berry * info.texi: need @contents. @@ -12,6 +411,7 @@ * buffers.texi (List Buffers): Fix previous change. 2003-07-20 Kai Gro,A_(Bjohann + Tramp version 2.0.36 released. * tramp.texi (Remote shell setup): Explain about problems with @@ -118,7 +518,7 @@ * faq.texi: Update copyright and maintenance details. Update some package URLs, versions, and maintainers. Remove many references to the Emacs Lisp Archive. - + 2003-04-23 Simon Josefsson * smtpmail.texi: Fix license (the invariant sections mentioned has @@ -174,11 +574,11 @@ (Installation): Explain what to do if files from the tramp/contrib directory are needed. -2003-02-23 Alex Schroeder +2003-02-23 Alex Schroeder * smtpmail.texi (How Mail Works): New. -2003-02-22 Alex Schroeder +2003-02-22 Alex Schroeder * cmdargs.texi (General Variables): Document SMTPSERVER. @@ -190,7 +590,7 @@ * Makefile.in: Build SMTP manual. -2003-02-22 Alex Schroeder +2003-02-22 Alex Schroeder * sending.texi (Sending via SMTP): Explain MTA/MUA. @@ -285,7 +685,7 @@ 2002-08-27 Carsten Dominik - * reftex.texi: Update to RefTeX 4.19 + * reftex.texi: Update to RefTeX 4.19. 2002-06-17 Kai Gro,b_(Bjohann @@ -833,10 +1233,12 @@ University of Washington. ;; Local Variables: -;; coding: iso-2022-7bit-unix +;; coding: iso-2022-7bit ;; End: Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: f1d62776-3ed5-4811-9d96-267252577dbd diff --git a/man/Makefile.in b/man/Makefile.in index bb179e7d54..e1b971010b 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -25,6 +25,7 @@ # utility programs is expected to be in ${srcdir}/lib-src. This is # set by the configure script's `--srcdir' option. srcdir=@srcdir@ +top_srcdir=@top_srcdir@ # Tell make where to find source files; this is needed for the makefiles. VPATH=@srcdir@ @@ -99,9 +100,13 @@ EMACSSOURCES= \ ${srcdir}/msdog.texi \ ${srcdir}/gnu.texi \ ${srcdir}/glossary.texi \ - ${srcdir}/ack.texi + ${srcdir}/ack.texi \ + ${srcdir}/kmacro.texi -info: $(INFO_TARGETS) +info: $(top_srcdir)/info $(INFO_TARGETS) + +$(top_srcdir)/info: + mkdir $@ dvi: $(DVI_TARGETS) @@ -301,3 +306,5 @@ maintainer-clean: distclean # That caused trouble because this is run entirely in the source directory. # Since we expect to get texi2dvi from elsewhere, # it is ok to expect texindex from elsewhere also. + +# arch-tag: 19cdb89e-4acb-448e-b0cc-2ddc05948ee2 diff --git a/man/abbrevs.texi b/man/abbrevs.texi index 55f9712ef9..ce6465564f 100644 --- a/man/abbrevs.texi +++ b/man/abbrevs.texi @@ -445,3 +445,7 @@ customize dynamic abbreviation to handle optional prefixes by setting the variable @code{dabbrev-abbrev-skip-leading-regexp}. Its value should be a regular expression that matches the optional prefix that dynamic abbreviation should ignore. + +@ignore + arch-tag: 638e0079-9540-48ec-9166-414083e16445 +@end ignore diff --git a/man/ack.texi b/man/ack.texi index 0f8da05f45..5d64b38cdf 100644 --- a/man/ack.texi +++ b/man/ack.texi @@ -26,7 +26,7 @@ for news articles and @file{cpp.el} which hides or highlights parts of C programs according to preprocessor conditionals. @item -Tomas Abrahamsson wrote @file{artist.el}, a package for producing ASCII +Tomas Abrahamsson wrote @file{artist.el}, a package for producing @acronym{ASCII} art with a mouse or with keyboard keys. @item @@ -359,7 +359,7 @@ Odd Gripenstam wrote @file{dcl-mode.el} for editing DCL command files. @item Michael Gschwind wrote @file{iso-cvt.el}, a package to convert between -the ISO 8859-1 character set and the notations for non-ASCII +the ISO 8859-1 character set and the notations for non-@acronym{ASCII} characters used by @TeX{} and net tradition, and @file{latin-2.el}, code which sets up case-conversion and syntax tables for the ISO Latin-2 character set. @@ -374,10 +374,10 @@ Doug Gwyn wrote the portable @code{alloca} implementation. @item Ken'ichi Handa implemented most of the support for international character sets, and wrote @file{isearch-x.el}, a facility for searching -non-ASCII text. Together with Naoto Takahashi, he wrote -@file{quail.el}, a simple input facility for typing non-ASCII text from -an ASCII keyboard. Ken'ichi also wrote @file{ps-bdf.el}, a BDF font -support for printing non-ASCII text on a PostScript printer. +non-@acronym{ASCII} text. Together with Naoto Takahashi, he wrote +@file{quail.el}, a simple input facility for typing non-@acronym{ASCII} text from +an @acronym{ASCII} keyboard. Ken'ichi also wrote @file{ps-bdf.el}, a BDF font +support for printing non-@acronym{ASCII} text on a PostScript printer. @item Chris Hanson wrote @file{netuname.el}, a package to use HP-UX's Remote @@ -396,7 +396,7 @@ command loop and appropriate help facilities, @item @file{emacsbug.el}, a package for reporting Emacs bugs, @item -@file{picture.el}, a mode for editing ASCII pictures, and +@file{picture.el}, a mode for editing @acronym{ASCII} pictures, and @item @file{view.el}, a package for perusing files and buffers without editing them. @@ -618,6 +618,9 @@ typical word processors, Eric Ludlam wrote the Speedbar package and @file{checkdoc.el}, a package for checking doc strings in Emacs Lisp programs. +@item +Alan Mackenzie wrote the integrated AWK support in CC Mode. + @item Christopher J.@: Madsen wrote @file{decipher.el}, a package for cracking simple substitution ciphers. @@ -776,7 +779,7 @@ Erik Naggum wrote the time-conversion functions. He also wrote @file{disp-table.el}, a package for dealing with display tables, @file{latin-4.el} and @file{latin-5.el}, code which sets up case-conversion and syntax tables for the ISO Latin-4 and Latin-5 -character sets, @file{mailheader.el}, a pacakage for parsing email +character sets, @file{mailheader.el}, a package for parsing email headers, and @file{parse-time.el}, a package for parsing time strings. @item @@ -1139,7 +1142,7 @@ contexts. @item Martin Stjernholm co-authored CC Mode, a major editing mode for C, -C@t{++}, Objective-C, and Java code. +C@t{++}, Objective-C, Java, Pike, CORBA IDL, and AWK code. @item Steve Strassman did not write @file{spook.el}, and even if he did, he @@ -1412,3 +1415,7 @@ in the distribution.) We thank them for their generosity as well. This list intended to mention every contributor of a major package or feature we currently distribute; if you know of someone we have omitted, please report that as a manual bug. + +@ignore + arch-tag: bb1d0fa4-0240-4992-b5d4-8602d1e3d4ba +@end ignore diff --git a/man/ada-mode.texi b/man/ada-mode.texi index a1012b8fbf..a74150fe75 100644 --- a/man/ada-mode.texi +++ b/man/ada-mode.texi @@ -1279,3 +1279,7 @@ However, this would not work on vxworks, for instance, where @contents @bye + +@ignore + arch-tag: 68cf0d8a-55cc-4190-a28d-4984fa56ed1e +@end ignore diff --git a/man/anti.texi b/man/anti.texi index ff3f5db7ca..edf0031ee8 100644 --- a/man/anti.texi +++ b/man/anti.texi @@ -146,3 +146,7 @@ one, @kbd{C-x e}. To keep up with decreasing computer memory capacity and disk space, many other functions and files have been eliminated in Emacs 21.3. @end itemize + +@ignore + arch-tag: 32932bd9-46f5-41b2-8a0e-fb0cc4caeb29 +@end ignore diff --git a/man/autotype.texi b/man/autotype.texi index b8f5977724..e7df280f52 100644 --- a/man/autotype.texi +++ b/man/autotype.texi @@ -659,3 +659,7 @@ of the expansion possibilities. @setchapternewpage odd @contents @bye + +@ignore + arch-tag: 54001b27-5ef8-4a9d-a199-905d650fafba +@end ignore diff --git a/man/back.texi b/man/back.texi index c3372d30c7..d586b9afd6 100644 --- a/man/back.texi +++ b/man/back.texi @@ -66,3 +66,7 @@ } \eject\bye + +@ignore + arch-tag: e1830f4c-dc4a-4314-b706-a03c7e93f022 +@end ignore diff --git a/man/basic.texi b/man/basic.texi index 6029b76cfe..3ec6e47c5b 100644 --- a/man/basic.texi +++ b/man/basic.texi @@ -572,6 +572,9 @@ point, and column of point (@code{what-cursor-position}). @item M-x hl-line-mode Enable or disable highlighting of the current line. @xref{Cursor Display}. +@item M-x size-indication-mode +Toggle automatic display of the size of the buffer. +@xref{Optional Mode Line}. @end table @findex what-page @@ -620,7 +623,7 @@ Char: c (0143, 99, 0x63) point=21044 of 26883(78%) column 53 The four values after @samp{Char:} describe the character that follows point, first by showing it and then by giving its character code in -octal, decimal and hex. For a non-ASCII multibyte character, these are +octal, decimal and hex. For a non-@acronym{ASCII} multibyte character, these are followed by @samp{ext} and the character's representation, in hex, in the buffer's coding system, if that coding system encodes the character safely and with a single byte (@pxref{Coding Systems}). If the @@ -662,7 +665,7 @@ point=26957 of 26956(100%) column 0 @cindex text properties at point @w{@kbd{C-u C-x =}} displays additional information about a character, including the character set name and the codes that -identify the character within that character set; ASCII characters are +identify the character within that character set; @acronym{ASCII} characters are identified as belonging to the @code{ascii} character set. It also shows the character's syntax, categories, and encodings both internally in the buffer and externally if you save the file. It also @@ -810,3 +813,6 @@ additional times, to delete a total of 80 characters, by typing @kbd{C-x z z z}. The first @kbd{C-x z} repeats the command once, and each subsequent @kbd{z} repeats it once again. +@ignore + arch-tag: cda8952a-c439-41c1-aecf-4bc0d6482956 +@end ignore diff --git a/man/buffers.texi b/man/buffers.texi index 7bb6f519f4..c2d2a3f76e 100644 --- a/man/buffers.texi +++ b/man/buffers.texi @@ -217,14 +217,19 @@ the new name as a minibuffer argument. There is no default. If you specify a name that is in use for some other buffer, an error happens and no renaming is done. - @kbd{M-x rename-uniquely} renames the current buffer to a similar name -with a numeric suffix added to make it both different and unique. This -command does not need an argument. It is useful for creating multiple -shell buffers: if you rename the @samp{*Shell*} buffer, then do @kbd{M-x -shell} again, it makes a new shell buffer named @samp{*Shell*}; -meanwhile, the old shell buffer continues to exist under its new name. -This method is also good for mail buffers, compilation buffers, and most -Emacs features that create special buffers with particular names. +@findex rename-uniquely + @kbd{M-x rename-uniquely} renames the current buffer to a similar +name with a numeric suffix added to make it both different and unique. +This command does not need an argument. It is useful for creating +multiple shell buffers: if you rename the @samp{*Shell*} buffer, then +do @kbd{M-x shell} again, it makes a new shell buffer named +@samp{*Shell*}; meanwhile, the old shell buffer continues to exist +under its new name. This method is also good for mail buffers, +compilation buffers, and most Emacs features that create special +buffers with particular names. (With some of these features, such as +@kbd{M-x compile}, @kbd{M-x grep} an @kbd{M-x info}, you need to +switch to some other buffer before using the command, in order for it +to make a different buffer.) @findex view-buffer @kbd{M-x view-buffer} is much like @kbd{M-x view-file} (@pxref{Misc @@ -471,22 +476,21 @@ buffer, but killing an indirect buffer has no effect on its base buffer. One way to use indirect buffers is to display multiple views of an outline. @xref{Outline Views}. -@cindex multiple @samp{*info*} and @samp{*Help*} buffers A quick and handy way to make an indirect buffer is with the command @kbd{M-x clone-indirect-buffer}. It creates and selects an indirect buffer whose base buffer is the current buffer. With a numeric argument, it prompts for the name of the indirect buffer; otherwise it defaults to the name of the current buffer, modifying it by adding a -@samp{<@var{n}>} prefix if required. @kbd{C-x 4 c} +@samp{<@var{n}>} suffix if required. @kbd{C-x 4 c} (@code{clone-indirect-buffer-other-window}) works like @kbd{M-x -clone-indirect-buffer}, but it selects the cloned buffer in another -window. These commands come in handy if you want to create new -@samp{*info*} or @samp{*Help*} buffers, for example. +clone-indirect-buffer}, but it selects the new buffer in another +window. - The more general way is with the command @kbd{M-x -make-indirect-buffer}. It creates an indirect buffer from buffer -@var{base-buffer}, under the name @var{indirect-name}. It prompts for -both @var{base-buffer} and @var{indirect-name} using the minibuffer. + The more general way to make an indirect buffer is with the command +@kbd{M-x make-indirect-buffer}. It creates an indirect buffer from +buffer @var{base-buffer}, under the name @var{indirect-name}. It +prompts for both @var{base-buffer} and @var{indirect-name} using the +minibuffer. @node Buffer Convenience @section Convenience Features and Customization of Buffer Handling @@ -601,3 +605,7 @@ provides a different and customizable mouse buffer menu which you may prefer. It replaces the bindings of @code{mouse-buffer-menu}, normally on @kbd{C-Down-Mouse-1}, and the menu bar buffer menu. You can customize the menu in the @code{msb} Custom group. + +@ignore + arch-tag: 08c43460-f4f4-4b43-9cb5-1ea9ad991695 +@end ignore diff --git a/man/building.texi b/man/building.texi index 5cadfbcc55..2985a04895 100644 --- a/man/building.texi +++ b/man/building.texi @@ -398,7 +398,10 @@ commands of Shell mode are available (@pxref{Shell Mode}). GUD mode also provides commands for setting and clearing breakpoints, for selecting stack frames, and for stepping through the program. These commands are available both in the GUD buffer and globally, but with -different key bindings. +different key bindings. It also has its own toolbar from which you +can invoke the more common commands by clicking on the appropriate +icon. This is particularly useful for repetitive commands like +gud-next and gud-step and allows the user to hide the GUD buffer. The breakpoint commands are normally used in source file buffers, because that is the easiest way to specify where to set or clear the @@ -535,6 +538,12 @@ be bizarre. See the GDB manual entry regarding @code{jump} for details. @end table +If you started GDB with the command @code{gdba}, you can click +@kbd{Mouse-1} on a line of the source buffer, in the fringe or display +margin, to set a breakpoint there. If a breakpoint already exists on +that line, this action will remove it. +(@code{gdb-mouse-toggle-breakpoint}). + These commands interpret a numeric argument as a repeat count, when that makes sense. @@ -631,8 +640,7 @@ to know GDB commands. @menu * Breakpoints Buffer:: A breakpoint control panel. * Stack Buffer:: Select a frame from the call stack. -* Data Display:: Display and update expressions in their own buffer. -* Display Buffer:: Control the displayed expressions. +* Watch Expressions:: Monitor variable values in the speedbar. * Other Buffers:: Input/output, locals, registers and assembler buffers. * Layout:: Control the number of displayed buffers. @end menu @@ -681,59 +689,41 @@ associated source in the source buffer. Alternatively, click locals buffer is displayed then its contents update to display the variables that are local to the new frame. -@node Data Display -@subsubsection Data Display -@cindex displaying expressions in GDB +@node Watch Expressions +@subsubsection Watch Expressions +@cindex Watching expressions in GDB If you want to see how a variable changes each time your program stops -then place the cursor over the variable name and click on the display -icon in the toolbar (@code{gud-display}). - -Each displayed expression has its own frame on a graphical display and -its own buffer on a text-only terminal. Arrays and structures have -their own display formats. To display an array as a slice, at the top -of the display window, click @kbd{Mouse-2} on the array index that you -want to restrict and you will be prompted in the mini-buffer for a -start and a stop value. Click @kbd{Mouse-2} on a pointer to -dereference it in the same frame/buffer. Click @kbd{S-Mouse-2} there -to do the same thing but in a new frame/buffer. There are two special -commands for these buffers: - -@table @kbd -@item @kbd{v} -@kindex v @r{(GDB data buffer)} -@findex gdb-array-visualise -Visualise an array using the graph program from plotutils if this is -installed. This only works for one dimensional arrays -(@code{gdb-array-visualise}). - -@item @kbd{q} -@kindex q @r{(GDB data buffer)} -@findex gdb-delete-expression -Delete the displayed expression and the associated frame -(@code{gdb-delete-expression}). -@end table - -@node Display Buffer -@subsubsection Display Buffer - -The display buffer shows the list of displayed expressions -(@pxref{Auto Display,,, gdb, The GNU debugger}). As with the -breakpoints, you can enable/disable or delete the displayed -expressions: - -@table @kbd -@item @key{SPC} -@kindex SPC @r{(GDB display buffer)} -@findex gdb-toggle-display -Enable/disable the display at the current line -(@code{gdb-toggle-display}). - -@item @kbd{d} -@kindex d @r{(GDB display buffer)} -@findex gdb-delete-display -Delete the display at the current line (@code{gdb-delete-display}). -@end table +then place the cursor over the variable name and click on the watch +icon in the toolbar (@code{gud-watch}). + +Each watch expression is displayed in the speedbar. Complex data +types, such as arrays, structures and unions are represented in a tree +format. To expand or contract a complex data type, click @kbd{Mouse-2} +on the tag to the left of the expression. + +@kindex RET @r{(GDB speedbar)} +@findex gdb-var-delete +With the cursor over the root expression of a complex data type, type +@key{D} to delete it from the speedbar +(@code{gdb-var-delete}). + +@findex gdb-edit-value +With the cursor over a simple data type or an element of a complex +data type which holds a value, type @key{RET} or click @kbd{Mouse-2} to edit +its value. A prompt for a new value appears in the mini-buffer +(@code{gdb-edit-value}). + +If you set the variable @code{gdb-show-changed-values} to +non-@code{nil} (the default value), then Emacs will use +font-lock-warning-face to display values that have recently changed in +the speedbar. + +If you set the variable @code{gdb-use-colon-colon-notation} to a +non-@code{nil} value, then, in C, Emacs will use the +FUNCTION::VARIABLE format to display variables in the speedbar. +Since this does not work for variables defined in compound statements, +the default value is @code{nil}. @node Other Buffers @subsubsection Other Buffers @@ -750,7 +740,7 @@ current frame for simple data types (@pxref{Frame Info,,, gdb, The GNU debugger}). Arrays and structures display their type only. You must display them -separately to examine their values. @ref{Data Display}. +separately to examine their values. @ref{Watch Expressions}. @item Registers Buffer The registers buffer displays the values held by the registers @@ -761,18 +751,21 @@ The assembler buffer displays the current frame as machine code. An overlay arrow points to the current instruction and you can set and remove breakpoints as with the source buffer. Breakpoints also appear in the margin. + +@item Threads Buffer + +The threads buffer displays a summary of all threads currently in your +program.(@pxref{Threads,,, gdb, The GNU debugger}). Move point to +any thread in the list and type @key{RET} to make it become the +current thread (@code{gdb-threads-select}) and display the associated +source in the source buffer. Alternatively, click @kbd{Mouse-2} to +make the selected thread become the current one. + @end table @node Layout @subsubsection Layout @cindex GDB User Interface layout -You may choose to display the additional buffers described previously -either in the same frame or a different one. Select GDB-windows or -GDB-Frames from the menu-bar under the heading GUD. If the menu-bar -is unavailable, type @code{M-x -gdb-display-@var{buffertype}-buffer} or @code{M-x -gdb-frame-@var{buffertype}-buffer} respectively, where @var{buffertype} -is the relevant buffer type e.g breakpoints. @findex gdb-many-windows @vindex gdb-many-windows @@ -800,6 +793,14 @@ If you change the window layout, for example, while editing and re-compiling your program, then you can restore it with @code{gdb-restore-windows}. +You may also choose which additional buffers you want to display, +either in the same frame or a different one. Select GDB-windows or +GDB-Frames from the menu-bar under the heading GUD. If the menu-bar +is unavailable, type @code{M-x +gdb-display-@var{buffertype}-buffer} or @code{M-x +gdb-frame-@var{buffertype}-buffer} respectively, where @var{buffertype} +is the relevant buffer type e.g breakpoints. + @node Executing Lisp @section Executing Lisp Expressions @@ -1088,3 +1089,7 @@ programs to be run in Emacs): in both modes it has the effect of installing the function definition that point is in, but the way of doing so is different according to where the relevant Lisp environment is found. @xref{Executing Lisp}. + +@ignore + arch-tag: 9c3c2f71-b332-4144-8500-3ff9945a50ed +@end ignore diff --git a/man/calc.texi b/man/calc.texi index 5d43afefd2..2ada16ce1b 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -30801,7 +30801,7 @@ This command allows your keyboard macros to accept numbers or formulas as interactive input. All the normal conventions of algebraic input, including the use of @kbd{$} characters, are supported. -@xref{Kbd Macro Query, , , emacs, the Emacs Manual}, for a description of +@xref{Keyboard Macro Query, , , emacs, the Emacs Manual}, for a description of @kbd{C-x q} (@code{kbd-macro-query}), the standard Emacs way to accept keyboard input during a keyboard macro. In particular, you can use @kbd{C-x q} to enter a recursive edit, which allows the user to perform @@ -35612,3 +35612,6 @@ the corresponding full Lisp name is derived by adding a prefix of @bye +@ignore + arch-tag: 77a71809-fa4d-40be-b2cc-da3e8fb137c0 +@end ignore diff --git a/man/calendar.texi b/man/calendar.texi index b5695c8c88..3d3f84b4ba 100644 --- a/man/calendar.texi +++ b/man/calendar.texi @@ -183,6 +183,8 @@ specified in various ways. @table @kbd @item g d Move point to specified date (@code{calendar-goto-date}). +@item g D +Move point to specified day of year (@code{calendar-goto-day-of-year}). @item o Center calendar around specified month (@code{calendar-other-month}). @item . @@ -196,6 +198,12 @@ of the month, and then moves to that date. Because the calendar includes all dates from the beginning of the current era, you must type the year in its entirety; that is, type @samp{1990}, not @samp{90}. +@kindex g D @r{(Calendar mode)} +@findex calendar-goto-day-of-year + @kbd{g D} (@code{calendar-goto-day-of-year}) prompts for a year and +day number, and moves to that date. Negative day numbers count backward +from the end of the year. + @kindex o @r{(Calendar mode)} @findex calendar-other-month @kbd{o} (@code{calendar-other-month}) prompts for a month and year, @@ -1317,36 +1325,22 @@ Reference Manual}. @section Appointments @cindex appointment notification +@vindex appt-display-format +@vindex appt-audible If you have a diary entry for an appointment, and that diary entry begins with a recognizable time of day, Emacs can warn you several minutes beforehand that that appointment is pending. Emacs alerts you -to the appointment by displaying a message in the mode line. - -@vindex diary-hook -@findex appt-make-list - To enable appointment notification, you must enable the time display -feature of Emacs, @kbd{M-x display-time} (@pxref{Mode Line}). You must -also add the function @code{appt-make-list} to the -@code{diary-hook}, like this: - -@example -(add-hook 'diary-hook 'appt-make-list) -@end example - -@noindent -Adding this text to your @file{.emacs} file does the whole job: - -@example -(display-time) -(add-hook 'diary-hook 'appt-make-list) -(diary 0) -@end example - - With these preparations done, when you display the diary (either with -the @kbd{d} command in the calendar window or with the @kbd{M-x diary} -command), it sets up an appointment list of all the diary entries found -with recognizable times of day, and reminds you just before each of -them. +to the appointment by displaying a message in your chosen format, as +specified by the variable @code{appt-display-format}. If the value +of @code{appt-audible} is non-nil, an audible reminder is also given. + +@findex appt-activate + To enable appointment notification, call the function +@code{appt-activate} with a positive argument. This sets up an +appointment list for today from the diary file, giving all diary entries +found with recognizable times of day, and reminds you just before each +of them. Calling @code{appt-activate} with a negative argument disables +the appointment package. For example, suppose the diary file contains these lines: @@ -1356,19 +1350,26 @@ Monday 12:00pm Lunch @end example +@vindex appt-message-warning-time @noindent -Then on Mondays, after you have displayed the diary, you will be -reminded at 9:20am about your coffee break and at 11:50am about lunch. +Then on Mondays, you will be reminded at around 9:20am about your coffee +break and at around 11:50am about lunch. How many minutes in advance you +are first warned is determined by the value of +@code{appt-message-warning-time}. You can write times in am/pm style (with @samp{12:00am} standing for midnight and @samp{12:00pm} standing for noon), or 24-hour European/military style. You need not be consistent; your diary file -can have a mixture of the two styles. +can have a mixture of the two styles. Times must be at the beginning +of lines if they are to be recognized. @vindex appt-display-diary - Emacs updates the appointments list automatically just after -midnight. This also displays the next day's diary entries in the diary -buffer, unless you set @code{appt-display-diary} to @code{nil}. + Emacs updates the appointments list from the diary file automatically +just after midnight. An update can be forced at any time by +re-activating the appointment package. Both these actions also display +the day's diary buffer, unless you set @code{appt-display-diary} to +@code{nil}. The appointments list is also updated whenever the +diary file is saved. @findex appt-add @findex appt-delete @@ -1378,10 +1379,6 @@ clock. The command @kbd{M-x appt-add} adds entries to the appointment list without affecting your diary file. You delete entries from the appointment list with @kbd{M-x appt-delete}. -@vindex appt-issue-message - You can turn off the appointment notification feature at any time by -setting @code{appt-issue-message} to @code{nil}. - @node Daylight Savings @section Daylight Savings Time @cindex daylight savings time @@ -1498,3 +1495,7 @@ timeclock file manually, or if you change the value of any of timeclock's customizable variables, you should run the command @kbd{M-x timeclock-reread-log} to update the data in Emacs from the file. + +@ignore + arch-tag: 4531ef09-9df3-449d-9c52-2b5a4a337f92 +@end ignore diff --git a/man/cc-mode.texi b/man/cc-mode.texi index 25f39d75cd..0f1e65051d 100644 --- a/man/cc-mode.texi +++ b/man/cc-mode.texi @@ -1,5 +1,28 @@ \input texinfo +@c Notes to self regarding line handling: +@c +@c Empty lines are often significant before @end directives; avoid them. +@c +@c Empty lines before and after @example directives are significant in +@c info output but not in TeX. Empty lines inside @example directives +@c are significant. + +@c Conventions for formatting examples: +@c o If the example contains empty lines then put the surrounding empty +@c lines inside the @example directives. Put them outside otherwise. +@c o Use @group inside the example only if it shows indentation where +@c the relation between lines inside is relevant. +@c o Format line number columns like this: +@c 1: foo +@c 2: bar +@c ^ one space +@c ^^ two columns, right alignment +@c o Check line lengths in TeX output; they can typically be no longer +@c than 70 chars, 60 if the paragraph is indented. + +@comment TBD: Document the finer details of statement anchoring? + @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @comment %**start of header (This is for running Texinfo on a region) @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -18,7 +41,7 @@ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@comment +@comment @comment Texinfo manual for CC Mode @comment Generated from the original README file by Krishna Padmasola @comment @@ -28,14 +51,21 @@ @comment Martin Stjernholm @comment @comment Maintained by Martin Stjernholm -@comment +@comment @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@comment Define an index for syntactic symbols. +@defindex ss + +@comment Combine key, syntactic symbol and concept indices into one. +@syncodeindex ss cp +@syncodeindex ky cp + @copying This manual is for CC Mode in Emacs. -Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free -Software Foundation, Inc. +Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +2003 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -58,13 +88,12 @@ license to the document, as described in section 6 of the license. @end quotation @end copying - @comment Info directory entry for use by install-info. The indentation @comment here is by request from the FSF folks. @dircategory Emacs @direntry -* CC Mode: (ccmode). Emacs mode for editing C, C++, Objective-C, - Java, Pike, and IDL code. +* CC Mode: (ccmode). Emacs mode for editing C, C++, Objective-C, + Java, Pike, AWK, and CORBA IDL code. @end direntry @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -74,11 +103,11 @@ license to the document, as described in section 6 of the license. @titlepage @sp 10 -@center @titlefont{CC Mode 5.28} +@center @titlefont{CC Mode 5.30} @sp 2 @center @subtitlefont{A GNU Emacs mode for editing C and C-like languages} @sp 2 -@center Barry A. Warsaw, Martin Stjernholm +@center Barry A. Warsaw, Martin Stjernholm, Alan Mackenzie (AWK support) @page @vskip 0pt plus 1filll @@ -101,10 +130,12 @@ CC Mode @top @ccmode{} @ccmode{} is a GNU Emacs mode for editing files containing C, C++, -Objective-C, Java, CORBA IDL, and Pike code. It provides syntax-based -indentation and has several handy commands and some minor modes to make -the editing easier. Note that @ccmode{} does @emph{not} provide -font-locking; there are other Emacs packages for that. +Objective-C, Java, CORBA IDL (and the variants PSDL and CIDL), Pike +code and to a certain extent, AWK code @xref{AWK Mode}. It provides +syntax-based indentation, font locking, and has several handy commands +and some minor modes to make the editing easier. It does not provide +tools to look up and navigate between functions, classes etc - there are +other packages for that. @end ifinfo @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -113,13 +144,17 @@ font-locking; there are other Emacs packages for that. @menu * Introduction:: * Getting Connected:: -* New Indentation Engine:: +* Indentation Engine:: * Minor Modes:: * Text Filling and Line Breaking:: +* Macro Handling:: +* Font Locking:: * Commands:: * Customizing Indentation:: * Syntactic Symbols:: * Indentation Functions:: +* AWK Mode:: +* Odds and Ends:: * Performance Issues:: * Limitations and Known Bugs:: * Frequently Asked Questions:: @@ -129,14 +164,14 @@ font-locking; there are other Emacs packages for that. --- Indices --- -* Concept Index:: -* Command Index:: -* Key Index:: +* Command and Function Index:: * Variable Index:: +* Concept Index:: +@detailmenu --- The Detailed Node Listing --- -New Indentation Engine +Indentation Engine * Syntactic Analysis:: * Indentation Calculation:: @@ -146,11 +181,17 @@ Minor Modes * Auto-newline Insertion:: * Hungry-deletion of Whitespace:: +Font Locking + +* Font Locking Preliminaries:: +* Faces:: +* Documentation Comments:: + Auto-newline Insertion * Hanging Braces:: * Hanging Colons:: -* Hanging Semi-colons and Commas:: +* Hanging Semicolons and Commas:: * Other Electric Commands:: * Clean-ups:: @@ -171,6 +212,7 @@ Customizing Indentation Styles * Built-in Styles:: +* Choosing a Style:: * Adding Styles:: * File Styles:: @@ -178,59 +220,50 @@ Advanced Customizations * Custom Indentation Functions:: * Custom Brace and Colon Hanging:: -* Customizing Semi-colons and Commas:: +* Customizing Semicolons and Commas:: * Other Special Indentations:: + +AWK Mode + +* Initialising AWK Mode:: +* AWK Mode Font Locking:: +* AWK Mode Defuns:: +@end detailmenu @end menu @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Introduction, Getting Connected, Top, Top @comment node-name, next, previous, up -@chapter Introduction +@chapter Introduction @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @cindex BOCM Welcome to @ccmode{}, a GNU Emacs mode for editing files containing C, -C++, Objective-C, Java, CORBA IDL, and Pike code. This incarnation of -the mode is descendant from @file{c-mode.el} (also called "Boring Old C -Mode" or BOCM @t{:-)}, and @file{c++-mode.el} version 2, which Barry has -been maintaining since 1992. @ccmode{} represents a significant -milestone in the mode's life. It has been fully merged back with Emacs -19's @file{c-mode.el}. Also a new, more intuitive and flexible mechanism -for controlling indentation has been developed. Late in 1997, Martin +C++, Objective-C, Java, CORBA IDL (and the variants CORBA PSDL and +CIDL), Pike and to a certain extent, AWK code (@pxref{AWK Mode}). This +incarnation of the mode is descended from @file{c-mode.el} (also called +``Boring Old C Mode'' or BOCM @t{:-)}, and @file{c++-mode.el} version 2, +which Barry has been maintaining since 1992. Late in 1997, Martin joined the @ccmode{} Maintainers Team, and implemented the Pike support. -As of 2000 Martin has taken over as the sole maintainer. +As of 2000 Martin has taken over as the sole maintainer. @ccmode{} did +not originally contain the font lock support for its languages --- that +was added in version 5.30. AWK support was also added in 5.30 by Alan +Mackenzie. This manual describes @ccmode{} @comment The following line must appear on its own, so that the automated -version 5.28. +version 5.30. @comment Release.py script can update the version number automatically -@ccmode{} supports the editing of K&R and ANSI C, @dfn{ARM} -@footnote{@cite{The Annotated C++ Reference Manual}, by Ellis and -Stroustrup.} C++, Objective-C, Java, CORBA's Interface Definition -Language, and Pike@footnote{A C-like scripting language with its roots -in the LPC language used in some MUD engines. See -@uref{http://pike.idonex.se/}.} files. In this way, you can easily set -up consistent coding styles for use in editing all of these languages. -@ccmode{} does @emph{not} handle font-locking (a.k.a. syntax coloring, -keyword highlighting) or anything of that nature, for any of these -modes. Font-locking is handled by other Emacs packages. - -This manual will describe the following: - -@itemize @bullet -@item -How to get started using @ccmode{}. - -@item -How the new indentation engine works. - -@item -How to customize the new indentation engine. - -@end itemize +@ccmode{} supports the editing of K&R and ANSI C, C++, Objective-C, +Java, CORBA's Interface Definition Language, Pike@footnote{A C-like +scripting language with its roots in the LPC language used in some MUD +engines. See @uref{http://pike.ida.liu.se/}.} and AWK files. In this +way, you can easily set up consistent font locking and coding styles for +use in editing all of these languages, although AWK is not yet as +uniformly integrated as the other languages. @findex c-mode @findex c++-mode @@ -238,23 +271,24 @@ How to customize the new indentation engine. @findex java-mode @findex idl-mode @findex pike-mode +@findex awk-mode Note that the name of this package is ``@ccmode{},'' but there is no top level @code{cc-mode} entry point. All of the variables, commands, and -functions in @ccmode{} are prefixed with @code{c-@var{}}, and +functions in @ccmode{} are prefixed with @code{c-@var{thing}}, and @code{c-mode}, @code{c++-mode}, @code{objc-mode}, @code{java-mode}, -@code{idl-mode}, and @code{pike-mode} entry points are provided. This -package is intended to be a replacement for @file{c-mode.el} and -@file{c++-mode.el}. - -@cindex @file{cc-compat.el} file -This distribution also contains a file -called @file{cc-compat.el} which should ease your transition from BOCM -to @ccmode{}. If you have a BOCM configuration you are really happy -with, and want to postpone learning how to configure @ccmode{}, take a -look at that file. It maps BOCM configuration variables to @ccmode{}'s -new indentation model. It is not actively supported so for the long -run, you should learn how to customize @ccmode{} to support your coding -style. +@code{idl-mode}, @code{pike-mode}, and @code{awk-mode} entry points are +provided. This package is intended to be a replacement for +@file{c-mode.el}, @file{c++-mode.el} and @file{awk-mode.el}. + +@c @cindex @file{cc-compat.el} file +@c This distribution also contains a file +@c called @file{cc-compat.el} which should ease your transition from BOCM +@c to @ccmode{}. If you have a BOCM configuration you are really happy +@c with, and want to postpone learning how to configure @ccmode{}, take a +@c look at that file. It maps BOCM configuration variables to @ccmode{}'s +@c indentation model. It is not actively supported so for the long run, +@c you should learn how to customize @ccmode{} to support your coding +@c style. A special word of thanks goes to Krishna Padmasola for his work in converting the original @file{README} file to Texinfo format. I'd also @@ -263,9 +297,9 @@ early beta stages of @ccmode{}'s development. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Getting Connected, New Indentation Engine, Introduction, Top +@node Getting Connected, Indentation Engine, Introduction, Top @comment node-name, next, previous, up -@chapter Getting Connected +@chapter Getting Connected @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! If you got this version of @ccmode{} with Emacs or XEmacs, it should @@ -275,47 +309,53 @@ the latest @ccmode{} release and may want to upgrade your copy. If you are upgrading an existing @ccmode{} installation, please see the @file{README} file for installation details. @ccmode{} may not work with older versions of Emacs or XEmacs. See the @ccmode{} release notes -Web pages for the latest information on Emacs version and package -compatibility (@pxref{Getting the Latest CC Mode Release}). +at @uref{http://cc-mode.sourceforge.net} for the latest information on +Emacs version and package compatibility (@pxref{Getting the Latest CC +Mode Release}). -@cindex @file{cc-mode-18.el} file -@emph{Note that @ccmode{} no longer -works with Emacs 18!}, so if you haven't upgraded from Emacs 18 by now, -you are out of luck. - -@findex c-version +@deffn Command c-version @findex version (c-) You can find out what version of @ccmode{} you are using by visiting a C file and entering @kbd{M-x c-version RET}. You should see this message in the echo area: -@example +@example Using CC Mode version 5.XX - @end example @noindent where @samp{XX} is the minor release number. +@end deffn @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node New Indentation Engine, Minor Modes, Getting Connected, Top +@node Indentation Engine, Minor Modes, Getting Connected, Top @comment node-name, next, previous, up -@chapter New Indentation Engine -@cindex indentation engine +@chapter Indentation Engine @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@ccmode{} has a new indentation engine, providing a simplified, yet -flexible and general mechanism for customizing indentation. It separates -indentation calculation into two steps: first, @ccmode{} analyzes the -line of code being indented to determine the kind of language construct -it's looking at, then it applies user defined offsets to the current -line based on this analysis. +@ccmode{} has an indentation engine that provides a flexible and general +mechanism for customizing indentation. It separates indentation +calculation into two steps: first, @ccmode{} analyzes the line of code +being indented to determine the kind of language construct it's looking +at, then it applies user defined offsets to the current line based on +this analysis. This section will briefly cover how indentation is calculated in -@ccmode{}. It is important to understand the indentation model -being used so that you will know how to customize @ccmode{} for -your personal coding style. +@ccmode{}. It is important to understand the indentation model being +used so that you will know how to customize @ccmode{} for your personal +coding style. All the details are in @ref{Customizing Indentation}, and +later chapters. + +@defopt c-syntactic-indentation +@vindex syntactic-indentation (c-) +Syntactic analysis for indentation is done when this is non-@code{nil} +(which is the default). When it's @code{nil} every line is just +indented to the same level as the previous one, and @kbd{TAB} +(@code{c-indent-command}) adjusts the indentation in steps of +@code{c-basic-offset}. The indentation style has no effect, nor any of +the indentation associated variables, e.g. @code{c-special-indent-hook}. +@end defopt @menu * Syntactic Analysis:: @@ -324,23 +364,23 @@ your personal coding style. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Syntactic Analysis, Indentation Calculation, , New Indentation Engine +@node Syntactic Analysis, Indentation Calculation, , Indentation Engine @comment node-name, next, previous, up -@section Syntactic Analysis +@section Syntactic Analysis @cindex syntactic analysis @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @cindex relative buffer position -@cindex syntactic symbol +@cindex syntactic symbols @cindex syntactic component @cindex syntactic component list The first thing @ccmode{} does when indenting a line of code, is to analyze the line, determining the @dfn{syntactic component list} of the construct on that line. A syntactic component consists of a pair of -information (in lisp parlance, a @emph{cons cell}), where the first part -is a @dfn{syntactic symbol}, and the second part is a @dfn{relative +elements (in lisp parlance, a @emph{cons cell}), the first being +a @dfn{syntactic symbol}, the second being a @dfn{relative buffer position}. Syntactic symbols describe elements of C code -@footnote{Unless otherwise noted, the term ``C code'' to refers to all +@footnote{Unless otherwise noted, the term ``C code'' refers to all the C-like languages.}, e.g. @code{statement}, @code{substatement}, @code{class-open}, @code{class-close}, etc. @xref{Syntactic Symbols}, for a complete list of currently recognized syntactic symbols and their @@ -354,43 +394,37 @@ by the relative buffer position in the syntactic component. Here is an example. Suppose we had the following code as the only thing in a C++ buffer @footnote{The line numbers in this and future examples don't actually appear in the buffer, of course!}: -@example -@group - - 1: void swap( int& a, int& b ) - 2: @{ - 3: int tmp = a; - 4: a = b; - 5: b = tmp; - 6: @} -@end group +@example + 1: void swap( int& a, int& b ) + 2: @{ + 3: int tmp = a; + 4: a = b; + 5: b = tmp; + 6: @} @end example @kindex C-c C-s @findex c-show-syntactic-information @findex show-syntactic-information (c-) -We can use the command @kbd{C-c C-s} -(@code{c-show-syntactic-information}) to simply report what the +We can use the command @kbd{C-c C-s} (bound to +@code{c-show-syntactic-information}) to simply report what the syntactic analysis is for the current line. Running this command on -line 4 of this example, we'd see in the echo area@footnote{With a universal -argument (i.e. @kbd{C-u C-c C-s}) the analysis is inserted into the -buffer as a comment -on the current line.}: -@example - -((statement . 35)) +line 4 of this example, we'd see in the echo area@footnote{With a +universal argument (i.e. @kbd{C-u C-c C-s}) the analysis is inserted +into the buffer as a comment on the current line.}: +@example +((statement 35)) @end example This tells us that the line is a statement and it is indented relative to buffer position 35, which happens to be the @samp{i} in @code{int} on line 3. If you were to move point to line 3 and hit @kbd{C-c C-s}, you would see: -@example - -((defun-block-intro . 29)) +@example +((defun-block-intro 29)) @end example This indicates that the @samp{int} line is the first statement in a top @@ -398,27 +432,23 @@ level function block, and is indented relative to buffer position 29, which is the brace just after the function header. Here's another example: -@example -@group - 1: int add( int val, int incr, int doit ) - 2: @{ - 3: if( doit ) - 4: @{ - 5: return( val + incr ); - 6: @} - 7: return( val ); - 8: @} - -@end group +@example + 1: int add( int val, int incr, int doit ) + 2: @{ + 3: if( doit ) + 4: @{ + 5: return( val + incr ); + 6: @} + 7: return( val ); + 8: @} @end example @noindent Hitting @kbd{C-c C-s} on line 4 gives us: -@example - -((substatement-open . 46)) +@example +((substatement-open 46)) @end example @cindex substatement @@ -435,27 +465,23 @@ Syntactic component lists can contain more than one component, and individual syntactic components need not have relative buffer positions. The most common example of this is a line that contains a @dfn{comment only line}. -@example -@group - 1: void draw_list( List& drawables ) - 2: @{ - 3: // call the virtual draw() method on each element in list - 4: for( int i=0; i < drawables.count(), ++i ) - 5: @{ - 6: drawables[i].draw(); - 7: @} - 8: @} - -@end group +@example + 1: void draw_list( List& drawables ) + 2: @{ + 3: // call the virtual draw() method on each element in list + 4: for( int i=0; i < drawables.count(), ++i ) + 5: @{ + 6: drawables[i].draw(); + 7: @} + 8: @} @end example @noindent Hitting @kbd{C-c C-s} on line 3 of this example gives: -@example - -((comment-intro) (defun-block-intro . 46)) +@example +((comment-intro) (defun-block-intro 46)) @end example @noindent @@ -465,10 +491,10 @@ components. Also notice that the first component, @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Indentation Calculation, , Syntactic Analysis, New Indentation Engine +@node Indentation Calculation, , Syntactic Analysis, Indentation Engine @comment node-name, next, previous, up -@section Indentation Calculation -@cindex indentation calculation +@section Indentation Calculation +@cindex indentation @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Indentation for a line is calculated using the syntactic @@ -488,26 +514,22 @@ the final total indentation for the current line is computed. Let's use our two code examples above to see how this works. Here is our first example again: -@example -@group - 1: void swap( int& a, int& b ) - 2: @{ - 3: int tmp = a; - 4: a = b; - 5: b = tmp; - 6: @} - -@end group +@example + 1: void swap( int& a, int& b ) + 2: @{ + 3: int tmp = a; + 4: a = b; + 5: b = tmp; + 6: @} @end example -Let's say point is on line 3 and we hit the @kbd{TAB} key to re-indent +Let's say point is on line 3 and we hit the @kbd{TAB} key to reindent the line. Remember that the syntactic component list for that line is: -@example - -((defun-block-intro . 29)) +@example +((defun-block-intro 29)) @end example @noindent @@ -524,28 +546,24 @@ complete, and the total indentation for the line is 4 spaces. Here's another example: -@example -@group - 1: int add( int val, int incr, int doit ) - 2: @{ - 3: if( doit ) - 4: @{ - 5: return( val + incr ); - 6: @} - 7: return( val ); - 8: @} - -@end group +@example + 1: int add( int val, int incr, int doit ) + 2: @{ + 3: if( doit ) + 4: @{ + 5: return( val + incr ); + 6: @} + 7: return( val ); + 8: @} @end example If we were to hit @kbd{TAB} on line 4 in the above example, the same basic process is performed, despite the differences in the syntactic component list. Remember that the list for this line is: -@example - -((substatement-open . 46)) +@example +((substatement-open 46)) @end example Here, @ccmode{} first looks up the @code{substatement-open} symbol @@ -562,8 +580,6 @@ to think about it in this much detail. But when customizing indentation, it's helpful to understand the general indentation model being used. -@vindex c-echo-syntactic-information-p -@vindex echo-syntactic-information-p (c-) As you configure @ccmode{}, you might want to set the variable @code{c-echo-syntactic-information-p} to non-@code{nil} so that the syntactic component list and calculated offset will always be echoed in @@ -571,13 +587,13 @@ the minibuffer when you hit @kbd{TAB}. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Minor Modes, Text Filling and Line Breaking, New Indentation Engine, Top +@node Minor Modes, Text Filling and Line Breaking, Indentation Engine, Top @comment node-name, next, previous, up -@chapter Minor Modes +@chapter Minor Modes @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @ccmode{} contains two minor-mode-like features that you should -find useful while you enter new C code. The first is called +find useful while entering new C code. The first is called @dfn{auto-newline} mode, and the second is called @dfn{hungry-delete} mode. These minor modes can be toggled on and off independently, and @ccmode{} can be configured so that it starts up with any @@ -586,11 +602,11 @@ are turned off. The state of the minor modes is always reflected in the minor mode list on the modeline of the @ccmode{} buffer. When auto-newline mode is -enabled, you will see @samp{C/a} on the mode line @footnote{The @samp{C} -would be replaced with @samp{C++}, @samp{ObjC}, @samp{Java}, @samp{IDL}, -or @samp{Pike} for the respective languages.}. When hungry delete mode -is enabled you would see @samp{C/h} and when both modes are enabled, -you'd see @samp{C/ah}. +enabled, you will see @samp{C/a} on the mode line@footnote{The @samp{C} +would be replaced with the name of the language in question for the +other languages @ccmode{} supports.}. When hungry delete mode is +enabled you will see @samp{C/h} and if both modes were enabled, you'd +see @samp{C/ah}. @kindex C-c C-a @kindex C-c C-d @@ -603,11 +619,12 @@ you'd see @samp{C/ah}. @findex toggle-auto-hungry-state (c-) @ccmode{} provides key bindings which allow you to toggle the minor modes on the fly while editing code. To toggle just the auto-newline -state, hit @kbd{C-c C-a} (@code{c-toggle-auto-state}). When you do -this, you should see the @samp{a} indicator either appear or disappear -on the modeline. Similarly, to toggle just the hungry-delete state, use -@kbd{C-c C-d} (@code{c-toggle-hungry-state}), and to toggle both states, -use @kbd{C-c C-t} (@code{c-toggle-auto-hungry-state}). +state, hit @kbd{C-c C-a} (bound to @code{c-toggle-auto-state}). When +you do this, you should see the @samp{a} indicator either appear or +disappear on the modeline. Similarly, to toggle just the +hungry-delete state, use @kbd{C-c C-d} (@code{c-toggle-hungry-state}), +and to toggle both states, use @kbd{C-c C-t} +(@code{c-toggle-auto-hungry-state}). To set up the auto-newline and hungry-delete states to your preferred values, you would need to add some lisp to your @file{.emacs} file that @@ -619,16 +636,12 @@ mode, and zero toggles the current state of the mode. So for example, if you wanted to enable both auto-newline and hungry-delete for all your C file editing, you could add the following to your @file{.emacs} file: -@example +@example (add-hook 'c-mode-common-hook - (lambda () (c-toggle-auto-hungry-state 1))) - + (lambda () (c-toggle-auto-hungry-state 1))) @end example - -@cindex electric characters - @menu * Auto-newline Insertion:: * Hungry-deletion of Whitespace:: @@ -638,42 +651,40 @@ to your @file{.emacs} file: @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Auto-newline Insertion, Hungry-deletion of Whitespace, , Minor Modes @comment node-name, next, previous, up -@section Auto-newline Insertion -@cindex auto-newline insertion +@section Auto-newline Insertion +@cindex auto-newline @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@cindex electric commands +@cindex electric characters Auto-newline minor mode works by enabling certain @dfn{electric -commands}. Electric commands are typically bound to special characters -such as the left and right braces, colons, semi-colons, etc., which when -typed, perform some magic formatting in addition to inserting the typed -character. As a general rule, electric commands are only electric when -the following conditions apply: +characters}. Special characters such as the left and right braces, +colons, semicolons, etc., have been made electric to perform some +magic formatting in addition to inserting the typed character. As a +general rule, electric characters are only electric when the following +conditions apply: @itemize @bullet @item Auto-newline minor mode is enabled, as evidenced by a @samp{C/a} or @samp{C/ah} indicator on the modeline. +@item @cindex literal @cindex syntactic whitespace -@item The character was not typed inside of a literal @footnote{A -@dfn{literal} is defined as any comment, string, or C preprocessor macro +@dfn{literal} is defined as any comment, string, or preprocessor macro definition. These constructs are also known as @dfn{syntactic whitespace} since they are usually ignored when scanning C code.}. @item -@kindex C-u No numeric argument was supplied to the command (i.e. it was typed as normal, with no @kbd{C-u} prefix). - @end itemize @menu * Hanging Braces:: * Hanging Colons:: -* Hanging Semi-colons and Commas:: +* Hanging Semicolons and Commas:: * Other Electric Commands:: * Clean-ups:: @end menu @@ -688,89 +699,65 @@ normal, with no @kbd{C-u} prefix). @findex c-electric-brace @findex electric-brace (c-) -@vindex c-hanging-braces-alist -@vindex hanging-braces-alist (c-) +@kindex @{ +@kindex @} + When you type either an open or close brace (i.e. @kbd{@{} or @kbd{@}}), the electric command @code{c-electric-brace} gets run. This command has two electric formatting behaviors. First, it will perform some -re-indentation of the line the brace was typed on, and second, it will +reindentation of the line the brace was typed on, and second, it will add various newlines before and/or after the typed brace. -Re-indentation occurs automatically whenever the electric behavior is +Reindentation occurs automatically whenever the electric behavior is enabled. If the brace ends up on a line other than the one it was typed -on, then that line is also re-indented. - -@cindex class-open syntactic symbol -@cindex class-close syntactic symbol -@cindex defun-open syntactic symbol -@cindex defun-close syntactic symbol -@cindex inline-open syntactic symbol -@cindex inline-close syntactic symbol -@cindex brace-list-open syntactic symbol -@cindex brace-list-close syntactic symbol -@cindex brace-list-intro syntactic symbol -@cindex brace-entry-open syntactic symbol -@cindex block-open syntactic symbol -@cindex block-close syntactic symbol -@cindex substatement-open syntactic symbol -@cindex statement-case-open syntactic symbol -@cindex extern-lang-open syntactic symbol -@cindex extern-lang-close syntactic symbol -@cindex namespace-open syntactic symbol -@cindex namespace-close syntactic symbol -@cindex inexpr-class-open symbol -@cindex inexpr-class-close symbol +on, then that line is also reindented. The default in auto-newline mode is to insert newlines both before and after a brace, but that can be controlled by the -@code{c-hanging-braces-alist} style variable. This variable contains a -mapping between syntactic symbols related to braces, and a list of -places to insert a newline. The syntactic symbols that are useful for -this list are: @code{class-open}, @code{class-close}, @code{defun-open}, -@code{defun-close}, @code{inline-open}, @code{inline-close}, -@code{brace-list-open}, @code{brace-list-close}, -@code{brace-list-intro}, @code{brace-entry-open}, @code{block-open}, -@code{block-close}, @code{substatement-open}, -@code{statement-case-open}, @code{extern-lang-open}, -@code{extern-lang-close}, @code{namespace-open}, @code{namespace-close}, -@code{inexpr-class-open}, and @code{inexpr-class-close}@footnote{Note -that the aggregate constructs in Pike mode, @samp{(@{}, @samp{@})}, -@samp{([}, @samp{])}, and @samp{(<}, @samp{>)}, do not count as brace -lists in this regard, even though they do for normal indentation -purposes. It's currently not possible to set automatic newlines on -these constructs.}. @xref{Syntactic Symbols}, for a more detailed -description of these syntactic symbols, except for -@code{inexpr-class-open} and @code{inexpr-class-close}, which aren't -actual syntactic symbols. +@code{c-hanging-braces-alist} style variable. + +@defopt c-hanging-braces-alist +@vindex hanging-braces-alist (c-) + +This variable contains a mapping between syntactic symbols related to +braces, and a list of places to insert a newline. The syntactic symbols +that are useful for this list are @code{brace-list-intro}, +@code{statement-cont}, @code{inexpr-class-open}, +@code{inexpr-class-close}, and all the @code{*-open} and @code{*-close} +symbols. @xref{Syntactic Symbols}, for a more detailed description of +these syntactic symbols, except for @code{inexpr-class-open} and +@code{inexpr-class-close}, which aren't actual syntactic symbols. The braces of anonymous inner classes in Java are given the special symbols @code{inexpr-class-open} and @code{inexpr-class-close}, so that they can be distinguished from the braces of normal classes@footnote{The -braces of anonymous classes produces a combination of +braces of anonymous classes produce a combination of @code{inexpr-class}, and @code{class-open} or @code{class-close} in normal indentation analysis.}. +Note that the aggregate constructs in Pike mode, @samp{(@{}, @samp{@})}, +@samp{([}, @samp{])}, and @samp{(<}, @samp{>)}, do not count as brace +lists in this regard, even though they do for normal indentation +purposes. It's currently not possible to set automatic newlines on +these constructs. + The value associated with each syntactic symbol in this association list -is called an @var{ACTION} which can be either a function or a list. +is called an @var{action}, which can be either a function or a list. @xref{Custom Brace and Colon Hanging}, for a more detailed discussion of -using a function as a brace hanging @var{ACTION}. +using a function as a brace hanging @var{action}. -When the @var{ACTION} is a list, it can contain any combination of the +When the @var{action} is a list, it can contain any combination of the symbols @code{before} and @code{after}, directing @ccmode{} where to put newlines in relationship to the brace being inserted. Thus, if the list contains only the symbol @code{after}, then the brace is said to @dfn{hang} on the right side of the line, as in: -@example -@group +@example // here, open braces always `hang' void spam( int i ) @{ if( i == 7 ) @{ dosomething(i); @} @} - - -@end group @end example When the list contains both @code{after} and @code{before}, the braces @@ -780,71 +767,71 @@ are added either before or after the brace. If a syntactic symbol is missing entirely from @code{c-hanging-braces-alist}, it's treated in the same way as an -@var{ACTION} with a list containing @code{before} and @code{after}, so +@var{action} with a list containing @code{before} and @code{after}, so that braces by default end up on their own line. For example, the default value of @code{c-hanging-braces-alist} is: -@example -@group - ((brace-list-open) - (brace-entry-open) - (substatement-open after) - (block-close . c-snug-do-while) - (extern-lang-open after) - (inexpr-class-open after) - (inexpr-class-close before)) - -@end group +@example +((brace-list-open) + (brace-entry-open) + (statement-cont) + (substatement-open after) + (block-close . c-snug-do-while) + (extern-lang-open after) + (inexpr-class-open after) + (inexpr-class-close before)) @end example -@noindent which says that @code{brace-list-open} and -@code{brace-entry-open} braces should both hang on the right side, and -allow subsequent text to follow on the same line as the brace. Also, -@code{substatement-open}, @code{extern-lang-open}, and -@code{inexpr-class-open} braces should hang on the right side, but -subsequent text should follow on the next line. The opposite holds for -@code{inexpr-class-close} braces; they won't hang, but the following -text continues on the same line. Here, in the @code{block-close} entry, -you also see an example of using a function as an @var{ACTION}. In all -other cases, braces are put on a line by themselves. - -A word of caution: it is not a good idea to hang top-level construct -introducing braces, such as @code{class-open} or @code{defun-open}. -Emacs makes an assumption that such braces will always appear in column -zero, hanging them can introduce performance problems. -@xref{Performance Issues}, for more information. +@noindent which says that @code{brace-list-open}, +@code{brace-entry-open} and @code{statement-cont}@footnote{Brace lists +inside statements, such as initializers for static array variables +inside functions in C, are recognized as @code{statement-cont}. All +normal substatement blocks are recognized with other symbols.} braces +should both hang on the right side and allow subsequent text to follow +on the same line as the brace. Also, @code{substatement-open}, +@code{extern-lang-open}, and @code{inexpr-class-open} braces should hang +on the right side, but subsequent text should follow on the next line. +The opposite holds for @code{inexpr-class-close} braces; they won't +hang, but the following text continues on the same line. Here, in the +@code{block-close} entry, you also see an example of using a function as +an @var{action}. In all other cases, braces are put on a line by +themselves. +@end defopt @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Hanging Colons, Hanging Semi-colons and Commas, Hanging Braces, Auto-newline Insertion +@node Hanging Colons, Hanging Semicolons and Commas, Hanging Braces, Auto-newline Insertion @comment node-name, next, previous, up @subsection Hanging Colons @cindex hanging colons @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@vindex hanging-colons-alist (c-) -@vindex c-hanging-colons-alist Using a mechanism similar to brace hanging (@pxref{Hanging Braces}), colons can also be made to hang using the style variable -@code{c-hanging-colons-alist}. The syntactic symbols appropriate for -this association list are: @code{case-label}, @code{label}, -@code{access-label}, @code{member-init-intro}, and @code{inher-intro}. -Note however that for @code{c-hanging-colons-alist}, @var{ACTION}s as -functions are not supported. See also @ref{Custom Brace and Colon -Hanging} for details. +@code{c-hanging-colons-alist}. + +@defopt c-hanging-colons-alist +@vindex hanging-colons-alist (c-) + +The syntactic symbols appropriate for this association list are: +@code{case-label}, @code{label}, @code{access-label}, +@code{member-init-intro}, and @code{inher-intro}. Note however that for +@code{c-hanging-colons-alist}, @var{action}s as functions are not +supported. See also @ref{Custom Brace and Colon Hanging} for details. In C++, double-colons are used as a scope operator but because these colons always appear right next to each other, newlines before and after them are controlled by a different mechanism, called @dfn{clean-ups} in @ccmode{}. @xref{Clean-ups}, for details. +@end defopt @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Hanging Semi-colons and Commas, Other Electric Commands, Hanging Colons, Auto-newline Insertion +@node Hanging Semicolons and Commas, Other Electric Commands, Hanging Colons, Auto-newline Insertion @comment node-name, next, previous, up -@subsection Hanging Semi-colons and Commas -@cindex hanging semi-colons +@subsection Hanging Semicolons and Commas +@cindex hanging semicolons @cindex hanging commas @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -852,75 +839,128 @@ Semicolons and commas are also electric in @ccmode{}, but since these characters do not correspond directly to syntactic symbols, a different mechanism is used to determine whether newlines should be automatically inserted after these characters. @xref{Customizing -Semi-colons and Commas}, for details. +Semicolons and Commas}, for details. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Other Electric Commands, Clean-ups, Hanging Semi-colons and Commas, Auto-newline Insertion +@node Other Electric Commands, Clean-ups, Hanging Semicolons and Commas, Auto-newline Insertion @comment node-name, next, previous, up @subsection Other Electric Commands @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +A few other keys also provide electric behavior, often only to reindent +the line. Common to all of them is that they only reindent if used in +normal code (as opposed to in a string literal or comment), and +@code{c-syntactic-indentation} isn't @code{nil}. They are: + +@table @kbd +@item # @kindex # @findex c-electric-pound -@vindex c-electric-pound-behavior @findex electric-pound (c-) +@vindex c-electric-pound-behavior @vindex electric-pound-behavior (c-) -A few other keys also provide electric behavior. For example -@kbd{#} (@code{c-electric-pound}) is electric when typed as -the first non-whitespace character on a line. In this case, the -variable @code{c-electric-pound-behavior} is consulted for the electric -behavior. This variable takes a list value, although the only element -currently defined is @code{alignleft}, which tells this command to force -the @samp{#} character into column zero. This is useful for entering -C preprocessor macro definitions. +Pound (bound to @code{c-electric-pound}) is electric when typed as the +first non-whitespace character on a line and not within a macro +definition. In this case, the variable @code{c-electric-pound-behavior} +is consulted for the electric behavior. This variable takes a list +value, although the only element currently defined is @code{alignleft}, +which tells this command to force the @samp{#} character into column +zero. This is useful for entering preprocessor macro definitions. + +Pound is not electric in AWK buffers, where @samp{#} starts a comment, +and is bound to @code{self-insert-command} like any typical printable +character. +@item * +@kindex * +@itemx / +@kindex / @findex c-electric-star -@findex c-electric-slash @findex electric-star (c-) +@findex c-electric-slash @findex electric-slash (c-) -Stars and slashes (i.e. @kbd{*} and @kbd{/}, @code{c-electric-star} and -@code{c-electric-slash} respectively) are also electric under -certain circumstances. If a star is inserted as the second character of -a C style block comment on a comment-only line, then the comment -delimiter is indented as defined by @code{c-offsets-alist}. A -comment-only line is defined as a line which contains only a comment, as -in: +Stars and slashes (bound to @code{c-electric-star} and +@code{c-electric-slash} respectively) are also electric under certain +circumstances. If a @samp{*} is inserted as the second character of a C +style block comment on a comment-only line, then the comment delimiter +is indented as defined by @code{c-offsets-alist}. A comment-only line +is defined as a line which contains only a comment, as in: + @example @group - void spam( int i ) @{ - // this is a comment-only line... - if( i == 7 ) // but this is not + // this is a comment-only line... + if( i == 7 ) // but this is not @{ dosomething(i); @} @} - @end group @end example -Likewise, if a slash is inserted as the second slash in a C++ style line -comment (also only on a comment-only line), then the line is indented as -defined by @code{c-offsets-alist}. +Likewise, if a @samp{/} is inserted as the second slash in a C++ style +line comment (also only on a comment-only line), then the line is +indented as defined by @code{c-offsets-alist}. -@findex c-electric-lt-gt -@findex electric-lt-gt (c-) +In AWK mode, @samp{*} and @samp{/} do not delimit comments and are +bound to @code{self-insert-command}. + +@item < @kindex < +@itemx > @kindex > -Less-than and greater-than signs (@code{c-electric-lt-gt}) are also +@findex c-electric-lt-gt +@findex electric-lt-gt (c-) +Less-than and greater-than signs (bound to @code{c-electric-lt-gt}) are electric, but only in C++ mode. Hitting the second of two @kbd{<} or -@kbd{>} keys re-indents the line if it is a C++ style stream operator. +@kbd{>} keys reindents the line if it is a C++ style stream operator. -@findex c-electric-paren -@findex electric-paren (c-) +@item ( @kindex ( +@itemx ) @kindex ) -The normal parenthesis characters @samp{(} and @samp{)} also reindent -the current line if they are used in normal code. This is useful for -getting the closing parenthesis of an argument list aligned -automatically. +@findex c-electric-paren +@findex electric-paren (c-) +The normal parenthesis characters @samp{(} and @samp{)} reindent the +current line. This is useful for getting the closing parenthesis of an +argument list aligned automatically. +@end table + +@deffn Command c-electric-continued-statement +@findex electric-continued-statement (c-) + +Certain keywords, depending on language, are electric to cause +reindentation when they are preceded only by whitespace on the line. +The keywords are those that continue an earlier statement instead of +starting a new one: @code{else}, @code{while}, @code{catch} (only in C++ +and Java) and @code{finally} (only in Java). + +An example: + +@example +@group +for (i = 0; i < 17; i++) + if (a[i]) + res += a[i]->offset; +else +@end group +@end example + +Here, the @code{else} should be indented like the preceding @code{if}, +since it continues that statement. @ccmode{} will automatically reindent +it after the @code{else} has been typed in full, since it's not until +then it's possible to decide whether it's a new statement or a +continuation of the preceding @code{if}. + +@vindex abbrev-mode +@findex abbrev-mode +@cindex Abbrev mode +@ccmode{} uses Abbrev mode (@pxref{Abbrevs,,, emacs, The Emacs Editor}) +to accomplish this. It's therefore turned on by default in all language +modes except IDL mode, since CORBA IDL doesn't have any statements. +@end deffn @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -940,9 +980,10 @@ Most of the clean-ups are only applicable to counteract automatically inserted newlines, and will therefore only have any effect if the auto-newline minor mode is turned on. Others will work all the time. -@vindex c-cleanup-list +@defopt c-cleanup-list @vindex cleanup-list (c-) @cindex literal + You can configure @ccmode{}'s clean-ups by setting the style variable @code{c-cleanup-list}, which is a list of clean-up symbols. By default, @ccmode{} cleans up only the @code{scope-operator} construct, which is @@ -950,190 +991,180 @@ necessary for proper C++ support. Note that clean-ups are only performed when the construct does not occur within a literal (@pxref{Auto-newline Insertion}), and when there is nothing but whitespace appearing between the individual components of the construct. +@end defopt -These are the clean-ups that only are active in the auto-newline minor +These are the clean-ups that are only active in the auto-newline minor mode: -@itemize @bullet -@item -@code{brace-else-brace} --- Clean up @samp{@} else @{} constructs by -placing the entire construct on a single line. Clean-up occurs when the -open brace after the @samp{else} is typed. So for example, this: +@c TBD: Would like to use some sort of @deffoo here; @table indents a +@c bit too much in dvi output. +@table @code +@item brace-else-brace +Clean up @samp{@} else @{} constructs by placing the entire construct on +a single line. Clean-up occurs when the open brace after the +@samp{else} is typed. So for example, this: + @example @group - void spam(int i) @{ - if( i==7 ) - @{ + if( i==7 ) @{ dosomething(); @} else @{ - @end group @end example + @noindent -appears like this after the open brace is typed: +appears like this after the last open brace is typed: + @example @group - void spam(int i) @{ if( i==7 ) @{ dosomething(); @} else @{ - @end group @end example -@item -@code{brace-elseif-brace} --- Similar to the @code{brace-else-brace} -clean-up, but this cleans up @samp{@} else if (...) @{} constructs. For -example: +@item brace-elseif-brace +Similar to the @code{brace-else-brace} clean-up, but this cleans up +@samp{@} else if (...) @{} constructs. For example: + @example @group - void spam(int i) @{ - if( i==7 ) - @{ + if( i==7 ) @{ dosomething(); @} else if( i==3 ) @{ - @end group @end example + @noindent -appears like this after the open parenthesis is typed: +appears like this after the last open parenthesis is typed: + @example @group - void spam(int i) @{ if( i==7 ) @{ dosomething(); @} else if( i==3 ) @{ - @end group @end example + @noindent -and like this after the open brace is typed: +and like this after the last open brace is typed: + @example @group - void spam(int i) @{ if( i==7 ) @{ dosomething(); @} else if( i==3 ) @{ - @end group @end example -@item -@code{brace-catch-brace} --- Analogous to @code{brace-elseif-brace}, but -cleans up @samp{@} catch (...) @{} in C++ and Java mode. +@item brace-catch-brace +Analogous to @code{brace-elseif-brace}, but cleans up @samp{@} catch +(...) @{} in C++ and Java mode. + +@item empty-defun-braces +Clean up braces following a top-level function or class definition that +contains no body. Clean up occurs when the closing brace is typed. +Thus the following: -@item -@code{empty-defun-braces} --- Clean up braces following a top-level -function or class definition that contains no body. Clean up occurs -when the closing brace is typed. Thus the following: @example @group - class Spam @{ @} - @end group @end example + @noindent is transformed into this when the close brace is typed: + @example @group - class Spam @{@} - @end group @end example -@item -@code{defun-close-semi} --- Clean up the terminating semi-colon on -top-level function or class definitions when they follow a close -brace. Clean up occurs when the semi-colon is typed. -So for example, the following: +@item defun-close-semi +Clean up the terminating semicolon on top-level function or class +definitions when they follow a close brace. Clean up occurs when the +semicolon is typed. So for example, the following: + @example @group - class Spam @{ @} ; - @end group @end example + @noindent -is transformed into this when the semi-colon is typed: +is transformed into this when the semicolon is typed: @example @group - class Spam @{ @}; - @end group @end example -@item -@code{list-close-comma} --- Clean up commas following braces in array -and aggregate initializers. Clean up occurs when the comma is typed. - -@item -@code{scope-operator} --- Clean up double colons which may designate a -C++ scope operator split across multiple lines@footnote{Certain C++ -constructs introduce ambiguous situations, so @code{scope-operator} -clean-ups may not always be correct. This usually only occurs when -scoped identifiers appear in switch label tags.}. Clean up occurs when -the second colon is typed. You will always want @code{scope-operator} -in the @code{c-cleanup-list} when you are editing C++ code. - -@end itemize +@item list-close-comma +Clean up commas following braces in array and aggregate initializers. +Clean up occurs when the comma is typed. + +@item scope-operator +Clean up double colons which may designate a C++ scope operator split +across multiple lines@footnote{Certain C++ constructs introduce +ambiguous situations, so @code{scope-operator} clean-ups may not always +be correct. This usually only occurs when scoped identifiers appear in +switch label tags.}. Clean up occurs when the second colon is typed. +You will always want @code{scope-operator} in the @code{c-cleanup-list} +when you are editing C++ code. +@end table The following clean-ups are always active when they occur on @code{c-cleanup-list}, and are thus not affected by the auto-newline minor mode: -@itemize @bullet -@item -@code{space-before-funcall} --- Insert a space between the function name -and the opening parenthesis of a function call. This produces function -calls in the style mandated by the GNU coding standards, -e.g. @samp{signal (SIGINT, SIG_IGN)} and @samp{abort ()}. Clean up -occurs when the opening parenthesis is typed. - -@item -@code{compact-empty-funcall} --- Clean up any space between the function -name and the opening parenthesis of a function call that have no -arguments. This is typically used together with -@code{space-before-funcall} if you prefer the GNU function call style -for functions with arguments but think it looks ugly when it's only an -empty parenthesis pair. I.e. you will get @samp{signal (SIGINT, -SIG_IGN)}, but @samp{abort()}. Clean up occurs when the closing -parenthesis is typed. - -@end itemize +@table @code +@item space-before-funcall +Insert a space between the function name and the opening parenthesis of +a function call. This produces function calls in the style mandated by +the GNU coding standards, e.g. @samp{signal (SIGINT, SIG_IGN)} and +@samp{abort ()}. Clean up occurs when the opening parenthesis is typed. + +@item compact-empty-funcall +Clean up any space between the function name and the opening parenthesis +of a function call that has no arguments. This is typically used +together with @code{space-before-funcall} if you prefer the GNU function +call style for functions with arguments but think it looks ugly when +it's only an empty parenthesis pair. I.e. you will get @samp{signal +(SIGINT, SIG_IGN)}, but @samp{abort()}. Clean up occurs when the +closing parenthesis is typed. +@end table @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Hungry-deletion of Whitespace, , Auto-newline Insertion, Minor Modes @comment node-name, next, previous, up -@section Hungry-deletion of Whitespace -@cindex hungry-deletion of whitespace +@section Hungry-deletion of Whitespace +@cindex hungry-deletion @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Hungry deletion of whitespace, or as it more commonly called, @@ -1142,75 +1173,107 @@ extremely useful. In fact, you might find yourself wanting hungry-delete in @strong{all} your editing modes! @kindex DEL -@kindex Backspace -In a nutshell, when hungry-delete mode is enabled, hitting the -@key{Backspace} key@footnote{I say ``hit the @key{Backspace} key'' but -what I really mean is ``when Emacs receives the @code{BackSpace} key -event.'' The difference usually isn't significant to most users, but -advanced users will realize that under window systems such as X, any -physical key (keycap) on the keyboard can be configured to generate any -keysym, and thus any Emacs key event. Also, the use of Emacs on TTYs -will affect which keycap generates which key event. From a pedantic -point of view, here we are only concerned with the key event that -Emacs receives.} will consume all preceding whitespace, including -newlines and tabs. This can really cut down on the number of -@key{Backspace}'s you have to type if, for example you made a mistake on +@kindex C-d + +In a nutshell, when hungry-delete mode is enabled, hitting the @kbd{DEL} +or @kbd{C-d} keys will consume all preceding or following whitespace, +including newlines and tabs. This can really cut down on the number of +times you have to hit these keys if, for example, you made a mistake on the preceding line. -@findex c-electric-backspace +@deffn Command c-electric-backspace @findex electric-backspace (c-) -@vindex c-backspace-function +This command is run by default when you hit the @kbd{DEL} key. It +deletes any amount of whitespace in the backwards direction if +hungry-delete mode is enabled. When it's disabled, or when used with +a prefix argument or in a literal (@pxref{Auto-newline Insertion}), +the function contained in the @code{c-backspace-function} variable is +called with the prefix argument. +@end deffn + +@defvar c-backspace-function @vindex backspace-function (c-) +@findex backward-delete-char-untabify +Hook that gets called by @code{c-electric-backspace} when it doesn't +do an ``electric'' deletion of the preceding whitespace. The default +value is @code{backward-delete-char-untabify}. +@end defvar + +@deffn Command c-electric-delete-forward +@findex electric-delete-forward (c-) +This function, which is bound to @kbd{C-d} by default, works just like +@code{c-electric-backspace} but in the forward direction. When it +doesn't do an ``electric'' deletion of the following whitespace, it +calls the function in @code{c-delete-function} with its prefix +argument. +@end deffn + +@defvar c-delete-function +@vindex delete-function (c-) +@findex delete-char +Hook that gets called by @code{c-electric-delete-forward} when it +doesn't do an ``electric'' deletion of the following whitespace. The +default value is @code{delete-char}. +@end defvar + +Above we have only talked about the @kbd{DEL} and @kbd{C-d} key events, +without connecting them to the physical keys commonly known as +@key{Backspace} and @key{Delete}. The default behavior of those two +depends on the flavor of (X)Emacs you are using. @findex c-electric-delete @findex electric-delete (c-) -@vindex c-delete-function -@vindex delete-function (c-) -@cindex literal +@vindex delete-key-deletes-forward -@findex backward-delete-char-untabify +In XEmacs 20.3 and beyond, the @key{Backspace} key is bound to +@code{c-electric-backspace} and the @key{Delete} key is bound to +@code{c-electric-delete}. You control the direction it deletes in by +setting the variable @code{delete-key-deletes-forward}, a standard +XEmacs variable. When this variable is non-@code{nil}, +@code{c-electric-delete} will do forward deletion with +@code{c-electric-delete-forward}, otherwise it does backward deletion +with @code{c-electric-backspace}. + +In other Emacs versions, @ccmode{} doesn't bind either @key{Backspace} +or @key{Delete}. In XEmacs 19 and Emacs prior to 21 that means that +it's up to you to fix them. Emacs 21 automatically binds them as +appropriate to @kbd{DEL} and @kbd{C-d}. + +Another way to use hungry deletion is to bind +@code{c-hungry-backspace} and @code{c-hungry-delete-forward} directly +to keys, and not use the mode toggling. For example @kbd{C-c C-d} and +@kbd{C-c DEL} to match plain @kbd{C-d} and @kbd{DEL}, -By default, when you hit the @key{Backspace} key @ccmode{} runs the -command @code{c-electric-backspace}, which deletes text in the backwards -direction. When deleting a single character, or when @key{Backspace} is -hit in a literal (@pxref{Auto-newline Insertion}), or when hungry-delete -mode is disabled, the function contained in the -@code{c-backspace-function} variable is called with one argument (the -number of characters to delete). This variable is set to -@code{backward-delete-char-untabify} by default. +@example +(add-hook + 'c-mode-common-hook + (lambda () + (define-key c-mode-base-map + [?\C-c ?\d] 'c-hungry-backspace) + (define-key c-mode-base-map + [?\C-c ?\C-d] 'c-hungry-delete-forward))) +@end example -@vindex delete-key-deletes-forward -@findex delete-char +@deffn Command c-hungry-backspace +@findex hungry-backspace (c-) +Delete any amount of whitespace in the backwards direction (regardless +whether hungry-delete mode is enabled or not). +@end deffn -The default behavior of the @key{Delete} key depends on the flavor of -Emacs you are using. By default in XEmacs 20.3 and beyond, the -@key{Delete} key is bound to @code{c-electric-delete}. You control the -direction that the @key{Delete} key deletes by setting the variable -@code{delete-key-deletes-forward}, a standard XEmacs variable. When -this variable is non-@code{nil} and hungry-delete mode is enabled, -@code{c-electric-delete} will consume all whitespace @emph{following} -point. When @code{delete-key-deletes-forward} is @code{nil}, it deletes -all whitespace @emph{preceding} point@footnote{i.e. it literally calls -@code{c-electric-backspace}.} When deleting a single character, or if -@key{Delete} is hit in a literal, or hungry-delete mode is disabled, the -function contained in @code{c-delete-function} is called with one -argument: the number of characters to delete. This variable is set to -@code{delete-char} by default. - -In Emacs 19 or Emacs 20, both the @key{Delete} and @key{Backspace} keys -are bound to @code{c-electric-backspace}, however you can change this by -explicitly binding @code{[delete]}@footnote{E.g. to -@code{c-electric-delete} in your @file{.emacs} file. Note however, that -Emacs 20 does not have a standard variable such as -@code{delete-key-deletes-forward}.}. - -XEmacsen older than 20.3 behave similar to Emacs 19 and Emacs 20. +@deffn Command c-hungry-delete-forward +@findex hungry-delete-forward (c-) +Delete any amount of whitespace in the forward direction (regardless +whether hungry-delete mode is enabled or not). +@end deffn @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Text Filling and Line Breaking, Commands, Minor Modes, Top +@node Text Filling and Line Breaking, Macro Handling, Minor Modes, Top @comment node-name, next, previous, up -@chapter Text Filling and Line Breaking +@chapter Text Filling and Line Breaking +@cindex text filling +@cindex line breaking +@cindex comment handling @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Since there's a lot of normal text in comments and string literals, @@ -1242,42 +1305,51 @@ variables@footnote{@code{comment-start}, @code{comment-end}, @code{paragraph-separate}, @code{paragraph-ignore-fill-prefix}, @code{adaptive-fill-mode}, @code{adaptive-fill-regexp}, and @code{adaptive-fill-first-line-regexp}.} buffer local and modifies them -according to the language syntax and the style of line decoration that -starts every line in a comment. The style variable -@code{c-comment-prefix-regexp} contains the regexp used to recognize -this @dfn{comment line prefix}. The default is @samp{//+\\|\\**}, which +according to the language syntax and the comment line prefix. + +@defopt c-comment-prefix-regexp +@vindex comment-prefix-regexp (c-) +This style variable contains the regexp used to recognize the +@dfn{comment line prefix}, which is the line decoration that starts +every line in a comment. The default is @samp{//+\\|\\**}, which matches C++ style line comments like -@example +@example // blah blah - @end example @noindent with two or more slashes in front of them, and C style block comments like + @example @group - /* * blah blah */ - @end group @end example @noindent with zero or more stars at the beginning of every line. If you change -that variable, please make sure it still matches the comment starter +this variable, please make sure it still matches the comment starter (i.e. @code{//}) of line comments @emph{and} the line prefix inside -block comments. Also note that since @ccmode{} uses the value of +block comments. + +@findex c-setup-paragraph-variables +@findex setup-paragraph-variables (c-) +Also note that since @ccmode{} uses the value of @code{c-comment-prefix-regexp} to set up several other variables at mode -initialization, you need to reinitialize the program mode if you change -it inside a @ccmode{} buffer. +initialization, there won't have any effect if you change it inside a +@ccmode{} buffer. You need to call the command +@code{c-setup-paragraph-variables} to update those other variables with +the new value. That's also the case if you modify this variable in a +mode hook, since @ccmode{} sets up all variables before calling them. +@end defopt @findex auto-fill-mode -@cindex auto fill mode -@cindex paragraph fill +@cindex Auto Fill mode +@cindex paragraph filling Line breaks are by default handled (almost) the same regardless whether they are made by auto fill mode (@pxref{Auto Fill,,, emacs, The Emacs Editor}), paragraph filling (e.g. with @kbd{M-q}), or explicitly with @@ -1288,15 +1360,16 @@ same indentation as the previous nonempty line (may be changed with the lines in the comment. @vindex adaptive-fill-mode -@cindex adaptive fill mode +@cindex Adaptive Fill mode @ccmode{} uses adaptive fill mode (@pxref{Adaptive Fill,,, emacs, The Emacs Editor}) to make Emacs correctly keep the line prefix when filling paragraphs. That also makes Emacs preserve the text indentation @emph{inside} the comment line prefix. E.g. in the following comment, -both paragraphs will be filled with the left margins kept intact: +both paragraphs will be filled with the left margins of the texts kept +intact: + @example @group - /* Make a balanced b-tree of the nodes in the incoming * stream. But, to quote the famous words of Donald E. * Knuth, @@ -1304,7 +1377,6 @@ both paragraphs will be filled with the left margins kept intact: * Beware of bugs in the above code; I have only * proved it correct, not tried it. */ - @end group @end example @@ -1319,76 +1391,75 @@ E. Jones' Filladapt package@footnote{It's available from lack a feature that makes it work suboptimally when @code{c-comment-prefix-regexp} matches the empty string (which it does by default). A patch for that is available from -@uref{http://cc-mode.sourceforge.net/,, the CC Mode site}.}, +@uref{http://cc-mode.sourceforge.net/,, the CC Mode web site}.}, which handles things like bulleted lists nicely. There's a convenience function @code{c-setup-filladapt} that tunes the relevant variables in Filladapt for use in @ccmode{}. Call it from a mode hook, e.g. with something like this in your @file{.emacs}: -@example -@group +@example (defun my-c-mode-common-hook () (c-setup-filladapt) (filladapt-mode 1)) (add-hook 'c-mode-common-hook 'my-c-mode-common-hook) - -@end group @end example -@vindex c-block-comment-prefix +@defopt c-block-comment-prefix @vindex block-comment-prefix (c-) @vindex c-comment-continuation-stars @vindex comment-continuation-stars (c-) Normally the comment line prefix inserted for a new line inside a comment is deduced from other lines in it. However there's one -situation when there's no clue about how the prefix should look, namely -when a block comment is broken for the first time. The string in the -style variable @code{c-block-comment-prefix}@footnote{In versions before -5.26, this variable was called @code{c-comment-continuation-stars}. As -a compatibility measure, @ccmode{} still uses the value on that variable -if it's set.} is used in that case. It defaults to @samp{* }, which -makes a comment -@example +situation when there's no hint about what the prefix should look like, +namely when a block comment is broken for the first time. This style +variable@footnote{In versions before 5.26, this variable was called +@code{c-comment-continuation-stars}. As a compatibility measure, +@ccmode{} still uses the value on that variable if it's set.} is used +then as the comment prefix. It defaults to @samp{* }, which makes a +comment +@example /* Got O(n^2) here, which is a Bad Thing. */ - @end example @noindent break into + @example @group - /* Got O(n^2) here, * which is a Bad Thing. */ - @end group @end example -Note that it won't work to justify the indentation by putting leading -spaces in the @code{c-block-comment-prefix} string, since @ccmode{} -still uses the normal indentation engine to indent the line. Thus, the -right way to fix the indentation is by setting the @code{c} syntactic -symbol. It defaults to @code{c-lineup-C-comments}, which handles the -indentation of most common comment styles, see @ref{Indentation -Functions}. +Note that it won't work to adjust the indentation by putting leading +spaces in @code{c-block-comment-prefix}, since @ccmode{} still uses the +normal indentation engine to indent the line. Thus, the right way to +fix the indentation is by customizing the @code{c} syntactic symbol. It +defaults to @code{c-lineup-C-comments}, which handles the indentation of +most common comment styles, see @ref{Indentation Functions}. +@end defopt -@vindex c-ignore-auto-fill +@defopt c-ignore-auto-fill @vindex ignore-auto-fill (c-) When auto fill mode is enabled, @ccmode{} can selectively ignore it depending on the context the line break would occur in, e.g. to never -break a line automatically inside a string literal. This behavior can -be controlled with the @code{c-ignore-auto-fill} variable. It takes a -list of symbols for the different contexts where auto-filling never -should occur: +break a line automatically inside a string literal. This variable +takes a list of symbols for the different contexts where auto-filling +never should occur: -@itemize @bullet -@item @code{string} --- Inside a string or character literal. -@item @code{c} --- Inside a C style block comment. -@item @code{c++} --- Inside a C++ style line comment. -@item @code{cpp} --- Inside a preprocessor directive. -@item @code{code} --- Anywhere else, i.e. in normal code. -@end itemize +@table @code +@item string +Inside a string or character literal. +@item c +Inside a C style block comment. +@item c++ +Inside a C++ style line comment. +@item cpp +Inside a preprocessor directive. +@item code +Anywhere else, i.e. in normal code. +@end table By default, @code{c-ignore-auto-fill} is set to @code{'(string cpp code)}, which means that auto-filling only occurs in comments when @@ -1400,17 +1471,17 @@ code. In normal code, line breaks are normally dictated by some logical structure in the code rather than the last whitespace character, so automatic line breaks there will produce poor results in the current implementation. +@end defopt -The commands that does the actual work follows. +The commands that do the actual work follow. @table @asis - +@item @kbd{M-q} (@code{c-fill-paragraph}) @kindex M-q @findex c-fill-paragraph @findex fill-paragraph (c-) @cindex Javadoc markup @cindex Pike autodoc markup -@item @kbd{M-q} (@code{c-fill-paragraph}) This is the replacement for @code{fill-paragraph} in @ccmode{} buffers. It's used to fill multiline string literals and both block and line style comments. In Java buffers, the Javadoc markup words are @@ -1426,10 +1497,10 @@ starter is handled similarly@footnote{This means that the variables which controlled this behavior in earlier versions of @ccmode{}, are now obsolete.}. +@item @kbd{M-j} (@code{c-indent-new-comment-line}) @kindex M-j @findex c-indent-new-comment-line @findex indent-new-comment-line (c-) -@item @kbd{M-j} (@code{c-indent-new-comment-line}) This is the replacement for @code{indent-new-comment-line}. It breaks the line at point and indents the new line like the current one. @@ -1439,181 +1510,605 @@ indentation and line prefix are preserved. If inside a comment and @code{comment-multi-line} is @code{nil}, a new comment of the same type is started on the next line and indented as appropriate for comments. +Note that @ccmode{} sets @code{comment-multi-line} to @code{t} at +startup. The reason is that @kbd{M-j} could otherwise produce sequences +of single line block comments for texts that should logically be treated +as one comment, and the rest of the paragraph handling code +(e.g. @kbd{M-q} and @kbd{M-a}) can't cope with that, which would lead to +inconsistent behavior. + +@item @kbd{M-x c-context-line-break} @findex c-context-line-break @findex context-line-break (c-) -@item @kbd{M-x c-context-line-break} This is a function that works like @code{indent-new-comment-line} in comments and @code{newline-and-indent} elsewhere, thus combining those two in a way that uses each one in the context it's best suited for. -I.e. in comments the comment line prefix and indentation is kept for the -new line, and in normal code it's indented according to context by the -indentation engine. +I.e. in comments the comment line prefix and indentation is kept for +the new line, and in normal code it's indented according to context by +the indentation engine. + +In macros it acts like @code{newline-and-indent} but additionally +inserts and optionally aligns the line ending backslash so that the +macro remains unbroken. @xref{Macro Handling}, for details about the +backslash alignment. It's not bound to a key by default, but it's intended to be used on the @kbd{RET} key. If you like the behavior of @code{newline-and-indent} on -@kbd{RET}, you might consider switching to this function. - +@kbd{RET}, you should consider switching to this function. + +@item @kbd{M-x c-context-open-line} +@findex c-context-open-line +@findex context-open-line (c-) +This is to @kbd{C-o} (@kbd{M-x open-line}) as +@code{c-context-line-break} is to @kbd{RET}. I.e. it works just like +@code{c-context-line-break} but leaves the point before the inserted +line break. @end table @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Commands, Customizing Indentation, Text Filling and Line Breaking, Top +@node Macro Handling, Font Locking, Text Filling and Line Breaking, Top @comment node-name, next, previous, up -@chapter Commands +@chapter Macro Handling +@cindex macros +@cindex preprocessor directives @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@menu -* Indentation Commands:: -* Movement Commands:: -* Other Commands:: -@end menu +Preprocessor directives are handled as syntactic whitespace from other +code, i.e. they can be interspersed anywhere without affecting the +syntactic analysis, just like comments. -See also @ref{Text Filling and Line Breaking}, for commands concerning -that bit. +The code inside macro definitions is still analyzed syntactically so +that you get relative indentation there just as you'd get if the same +code was outside a macro. However, since there is no hint about the +syntactic context, i.e. whether the macro expands to an expression, to some +statements, or perhaps to whole functions, the syntactic recognition can be +wrong. @ccmode{} manages to figure it out correctly most of the time, +though. @xref{Syntactic Symbols}, for details about the indentation. +@defopt c-syntactic-indentation-in-macros +@vindex syntactic-indentation-in-macros (c-) +Enable syntactic analysis inside macros, which is the default. If this +is @code{nil}, all lines inside macro definitions are analyzed as +@code{cpp-macro-cont}. +@end defopt -@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@ccmode{} provides some tools to help keep the line continuation +backslashes in macros neat and tidy: + +@table @asis +@item @kbd{C-c C-\} (@code{c-backslash-region}) +@kindex C-c C-\ +@findex c-backslash-region +@findex backslash-region (c-) +This function inserts and aligns or deletes the end-of-line backslashes +in the current region. + +With no prefix argument, it inserts any missing backslashes and aligns +them according to the @code{c-backslash-column} and +@code{c-backslash-max-column} variables. With a prefix argument, it +deletes any backslashes. + +The function does not modify blank lines at the start of the region. If +the region ends at the start of a line, it always deletes the backslash +(if any) at the end of the previous line. +@end table + +@defopt c-backslash-column +@vindex backslash-column (c-) +@defoptx c-backslash-max-column +@vindex backslash-max-column (c-) +These variables control the alignment columns for line continuation +backslashes in multiline macros. They are used by the functions that +automatically insert or align such backslashes, +e.g. @code{c-backslash-region} and @code{c-context-line-break}. + +@code{c-backslash-column} specifies the minimum column for the +backslashes. If any line in the macro exceeds it then the next tab +stop from that line is used as the alignment column for all the +backslashes, so that they remain in a single column. However, if some +lines exceed @code{c-backslash-max-column} then the backslashes in the +rest of the macro will be kept at that column, so that the +lines which are too long ``stick out'' instead. +@end defopt + +@defopt c-auto-align-backslashes +@vindex auto-align-backslashes (c-) +Align automatically inserted line continuation backslashes if +non-@code{nil}. When line continuation backslashes are inserted +automatically for line breaks in multiline macros, e.g. by +@code{c-context-line-break}, they are aligned with the other backslashes +in the same macro if this flag is set. Otherwise the inserted +backslashes are preceded by a single space. +@end defopt + +The recommended line breaking function, @code{c-context-line-break} +(@pxref{Text Filling and Line Breaking}), is especially nice if you edit +multiline macros frequently. When used inside a macro, it automatically +inserts and adjusts the mandatory backslash at the end of the line to +keep the macro together, and it leaves the point at the right +indentation column for the code. Thus you can write code inside macros +almost exactly as you can elsewhere, without having to bother with the +trailing backslashes. + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Font Locking, Commands, Macro Handling, Top +@comment node-name, next, previous, up +@chapter Font Locking +@cindex font locking +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@strong{Note:} The font locking in AWK mode is currently not integrated +with the rest of @ccmode{}, so this section does not apply there. +@xref{AWK Mode Font Locking}, instead. + +@cindex Font Lock mode + +@ccmode{} provides font locking for its supported languages by supplying +patterns for use with Font Lock mode. This means that you get distinct +faces on the various syntactic parts such as comments, strings, keywords +and types, which is very helpful in telling them apart at a glance and +discovering syntactic errors. @xref{Font Lock,,, emacs, The Emacs +Editor}, for ways to enable font locking in @ccmode{} buffers. + +@menu +* Font Locking Preliminaries:: +* Faces:: +* Documentation Comments:: +@end menu + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Font Locking Preliminaries, Faces, , Font Locking +@comment node-name, next, previous, up +@section Font Locking Preliminaries +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +The font locking for most of the @ccmode{} languages were provided +directly by the Font Lock package prior to version 5.30 of @ccmode{}. +In the transition to @ccmode{} the patterns have been reworked +completely and are applied uniformly across all the languages except AWK +mode, just like the indentation rules (although each language still has +some pecularities of its own, of course). Since the languages +previously had completely separate font locking patterns, this means +that it's a bit different in most languages now. + +The main goal for the font locking in @ccmode{} is accuracy, to provide +a dependable aid in recognizing the various constructs. Some, like +strings and comments, are easy to recognize while others like +declarations and types can be very tricky. @ccmode{} can go to great +lengths to recognize declarations and casts correctly, especially when +the types aren't recognized by standard patterns. This is a fairly +demanding analysis which can be slow on older hardware, and it can +therefore be disabled by choosing a lower decoration level with the +variable @code{font-lock-maximum-decoration}. + +@vindex font-lock-maximum-decoration + +The decoration levels are used as follows: + +@enumerate +@comment 1 +@item +Minimal font locking: Fontify only comments, strings and preprocessor +directives (in the languages that use cpp). + +@comment 2 +@item +Fast normal font locking: In addition to level 1, fontify keywords, +simple types and declarations that are easy to recognize. The variables +@code{*-font-lock-extra-types} (where @samp{*} is the name of the +language) are used to recognize types (see below). Documentation +comments like Javadoc are fontified according to +@code{c-doc-comment-style} (@pxref{Documentation Comments}). + +Use this if you think the font locking is too slow. It's the closest +corresponding level to level 3 in the old font lock patterns. + +@comment 3 +@item +Accurate normal font locking: Like level 2 but uses a different approach +that can recognize types and declarations much more accurately. The +@code{*-font-lock-extra-types} variables are still used, but user +defined types are recognized correctly anyway in most cases. Therefore +those variables should be fairly restrictive and not contain patterns +that are uncertain. + +@cindex Lazy Lock mode +@cindex Just-in-time Lock mode + +This level is designed for fairly modern hardware and a font lock +support mode like Lazy Lock or Just-in-time Lock mode that only +fontifies the parts that are actually shown. +@end enumerate + +@cindex user defined types +@cindex types, user defined + +Since user defined types are hard to recognize you can provide +additional regexps to match those you use: + +@defopt c-font-lock-extra-types +@defoptx c++-font-lock-extra-types +@defoptx objc-font-lock-extra-types +@defoptx java-font-lock-extra-types +@defoptx idl-font-lock-extra-types +@defoptx pike-font-lock-extra-types +For each language there's a variable @code{*-font-lock-extra-types}, +where @samp{*} stands for the language in question. It contains a list +of regexps that matches identifiers that should be recognized as types, +e.g. @samp{\\sw+_t} to recognize all identifiers ending with @samp{_t} +as is customary in C code. Each regexp should not match more than a +single identifier. + +The default values contain regexps for many types in standard runtime +libraries that are otherwise difficult to recognize, and patterns for +standard type naming conventions like the @samp{_t} suffix in C and C++. +Java, Objective-C and Pike have as a convention to start class names +with capitals, so there are patterns for that in those languages. + +Despite the names of these variables, they are not only used for +fontification but in other places as well where @ccmode{} needs to +recognize types. +@end defopt + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Faces, Documentation Comments, Font Locking Preliminaries, Font Locking +@comment node-name, next, previous, up +@section Faces +@cindex faces +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@ccmode{} attempts to use the standard faces for programming languages +in accordance with their intended purposes as far as possible. No extra +faces are currently provided, with the exception of a replacement face +@code{c-invalid-face} for emacsen that don't provide +@code{font-lock-warning-face}. + +@itemize @bullet +@item +@vindex font-lock-comment-face +Normal comments are fontified in @code{font-lock-comment-face}. + +@item +@vindex font-lock-doc-face +@vindex font-lock-doc-string-face +@vindex font-lock-comment-face +Comments that are recognized as documentation (@pxref{Documentation +Comments}) get @code{font-lock-doc-face} (Emacs) or +@code{font-lock-doc-string-face} (XEmacs) if those faces exist. If they +don't then @code{font-lock-comment-face} is used. + +@item +@vindex font-lock-string-face +String and character literals are fontified in +@code{font-lock-string-face}. + +@item +@vindex font-lock-keyword-face +Keywords are fontified with @code{font-lock-keyword-face}. + +@item +@vindex font-lock-function-name-face +@code{font-lock-function-name-face} is used for function names in +declarations and definitions, and classes in those contexts. It's also +used for preprocessor defines with arguments. + +@item +@vindex font-lock-variable-name-face +Variables in declarations and definitions, and other identifiers in such +variable contexts, get @code{font-lock-variable-name-face}. It's also +used for preprocessor defines without arguments. + +@item +@vindex font-lock-constant-face +@vindex font-lock-reference-face +Builtin constants are fontified in @code{font-lock-constant-face} if it +exists, @code{font-lock-reference-face} otherwise. As opposed to the +preceding two faces, this is used on the names in expressions, and it's +not used in declarations, even if there happen to be a @samp{const} in +them somewhere. + +@item +@vindex font-lock-type-face +@code{font-lock-type-face} is put on types (both predefined and user +defined) and classes in type contexts. + +@item +@vindex font-lock-constant-face +@vindex font-lock-reference-face +Label identifiers get @code{font-lock-constant-face} if it exists, +@code{font-lock-reference-face} otherwise. + +@item +Name qualifiers and identifiers for scope constructs are fontified like +labels. + +@item +Special markup inside documentation comments are also fontified like +labels. + +@item +@vindex font-lock-preprocessor-face +@vindex font-lock-builtin-face +@vindex font-lock-reference-face +Preprocessor directives get @code{font-lock-preprocessor-face} if it +exists (i.e. XEmacs). In Emacs they get @code{font-lock-builtin-face} +or @code{font-lock-reference-face}, for lack of a closer equivalent. + +@item +@vindex font-lock-warning-face +@vindex c-invalid-face +@vindex invalid-face (c-) +Some kinds of syntactic errors are fontified with +@code{font-lock-warning-face} in Emacs. In older XEmacs versions +there's no corresponding standard face, so there a special +@code{c-invalid-face} is used, which is defined to stand out sharply by +default. + +Note that it's not used for @samp{#error} or @samp{#warning} directives, +since those aren't syntactic errors in themselves. +@end itemize + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Documentation Comments, , Faces, Font Locking +@comment node-name, next, previous, up +@section Documentation Comments +@cindex documentation comments +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +There are various tools to supply documentation in the source as +specially structured comments, e.g. the standard Javadoc tool in Java. +@ccmode{} provides an extensible mechanism to fontify such comments and +the special markup inside them. + +@defopt c-doc-comment-style +@vindex doc-comment-style (c-) +This is a style variable that specifies which documentation comment +style to recognize, e.g. @code{javadoc} for Javadoc comments. + +The value may also be a list of styles, in which case all of them are +recognized simultaneously (presumably with markup cues that don't +conflict). + +The value may also be an association list to specify different comment +styles for different languages. The symbol for the major mode is then +looked up in the alist, and the value of that element is interpreted as +above if found. If it isn't found then the symbol `other' is looked up +and its value is used instead. + +Note that @ccmode{} uses this variable to set other variables that +handle fontification etc. That's done at mode initialization or when +you switch to a style which sets this variable. Thus, if you change it +in some other way, e.g. interactively in a CC Mode buffer, you will need +to do @kbd{M-x java-mode} (or whatever mode you're currently using) to +reinitialize. + +@findex c-setup-doc-comment-style +@findex setup-doc-comment-style (c-) +Note also that when @ccmode{} starts up, the other variables are +modified before the mode hooks are run. If you change this variable in +a mode hook, you have to call @code{c-setup-doc-comment-style} +afterwards to redo that work. +@end defopt + +@ccmode{} currently provides handing of the following doc comment +styles: + +@table @code +@item javadoc +@cindex Javadoc markup +Javadoc comments, the standard tool in Java. + +@item autodoc +@cindex Pike autodoc markup +For Pike autodoc markup, the standard in Pike. +@end table + +The above is by no means complete. If you'd like to see support for +other doc comment styles, please let us know (@pxref{Mailing Lists and +Submitting Bug Reports}). + +You can also write your own doc comment fontification support to use +with @code{c-doc-comment-style}: Supply a variable or function +@code{*-font-lock-keywords} where @samp{*} is the name you want to use +in @code{c-doc-comment-style}. If it's a variable, it's prepended to +@code{font-lock-keywords}. If it's a function, it's called at mode +initialization and the result is prepended. For an example, see +@code{javadoc-font-lock-keywords} in @file{cc-fonts.el}. + +If you add support for another doc comment style, please consider +contributing it --- send a note to @email{bug-cc-mode@@gnu.org}. + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Commands, Customizing Indentation, Font Locking, Top +@comment node-name, next, previous, up +@chapter Commands +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@menu +* Indentation Commands:: +* Movement Commands:: +* Other Commands:: +@end menu + +See also @ref{Text Filling and Line Breaking} and @ref{Macro Handling}, +for commands concerning those bits. + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Indentation Commands, Movement Commands, , Commands @comment node-name, next, previous,up -@section Indentation Commands -@cindex indentation commands +@section Indentation Commands @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -The following list of commands re-indent C constructs. Note that when -you change your coding style, either interactively or through some other -means, your file does @emph{not} automatically get re-indented. You -will need to execute one of the following commands to see the effects of +The following list of commands reindent C constructs. Note that when +you change your coding style, either interactively or through some other +means, your file does @emph{not} automatically get reindented. You +will need to execute one of the following commands to see the effects of your changes. @cindex GNU indent program Also, variables like @code{c-hanging-*} and @code{c-cleanup-list} only affect how on-the-fly code is formatted. Changing the -``hanginess'' of a brace and then re-indenting, will not move the brace +``hanginess'' of a brace and then reindenting, will not move the brace to a different line. For this, you're better off getting an external -program like GNU @code{indent}, which will re-arrange brace location, +program like GNU @code{indent}, which will rearrange brace location, among other things. -Re-indenting large sections of code can take a long time. When +Reindenting large sections of code can take a long time. When @ccmode{} reindents a region of code, it is essentially equivalent to -hitting @kbd{TAB} on every line of the region. Especially vulnerable is -code generator output@footnote{In particular, I have had people -complain about the speed with which @code{lex(1)} output is re-indented. -Lex, yacc, and other code generators usually output some pretty -perversely formatted code. Re-indenting such code will be slow.}. +hitting @kbd{TAB} on every line of the region. These commands are useful when indenting code: @table @asis - +@item @kbd{TAB} (@code{c-indent-command}) @kindex TAB @findex c-indent-command @findex indent-command (c-) -@item @kbd{TAB} (@code{c-indent-command}) Indents the current line. The actual behavior is controlled by several variables, described below. See @code{c-tab-always-indent}, @code{c-insert-tab-function}, and @code{indent-tabs-mode}. With a numeric argument, this command rigidly indents the region, preserving the relative indentation among the lines. +@item @kbd{C-M-q} (@code{c-indent-exp}) @kindex C-M-q @findex c-indent-exp @findex indent-exp (c-) -@item @kbd{C-M-q} (@code{c-indent-exp}) Indent an entire balanced brace or parenthesis expression. Note that point must be on the opening brace or parenthesis of the expression you want to indent. +@item @kbd{C-c C-q} (@code{c-indent-defun}) @kindex C-c C-q @findex c-indent-defun @findex indent-defun (c-) -@item @kbd{C-c C-q} (@code{c-indent-defun}) -Indents the entire top-level function or class definition encompassing -point. It leaves point unchanged. This function can't be used to -re-indent a nested brace construct, such as a nested class or function, -or a Java method. The top-level construct being re-indented must be -complete, i.e. it must have both a beginning brace and an ending brace. +Indents the entire top-level function, class or macro definition +encompassing point. It leaves point unchanged. This function can't be +used to reindent a nested brace construct, such as a nested class or +function, or a Java method. The top-level construct being reindented +must be complete, i.e. it must have both a beginning brace and an ending +brace. +@item @kbd{C-M-\} (@code{indent-region}) @kindex C-M-\ @findex indent-region -@item @kbd{C-M-\} (@code{indent-region}) Indents an arbitrary region of code. This is a standard Emacs command, -tailored for C code in a @ccmode{} buffer. Note that of course, point +tailored for C code in a @ccmode{} buffer. Note, of course, that point and mark must delineate the region you want to indent. +@item @kbd{M-;} (@code{indent-for-comment}) +@kindex M-; +@findex indent-for-comment +Insert a comment at the end of the current line, if none is there already. +Then reindent the comment according to the variables +@code{c-indent-comment-alist}, @code{c-indent-comments-syntactically-p} +and @code{comment-column}. Then position the point after the comment +starter. This is a standard Emacs command, but @ccmode{} enhances it a +bit with two variables: + +@defopt c-indent-comment-alist +@vindex indent-comment-alist (c-) +@vindex comment-column +This style variable allows you to control which column @kbd{M-;} +indents the comment to, depending on the preceding code and the +indentation of a similar comment on the preceding line, if there is +any. It is an association list that maps different types of lines to +actions describing how they should be handled. If a certain line type +isn't present on the list then the line is indented to the column +specified by @code{comment-column}. See the documentation string for +@code{c-indent-comment-alist} for a full description of the available +line types and actions (use @kbd{C-h v c-indent-comment-alist}). +@end defopt + +@defopt c-indent-comments-syntactically-p +@vindex indent-comments-syntactically-p (c-) +Normally, when this variable is @code{nil}, @kbd{M-;} will indent +comment-only lines according to @code{c-indent-comment-alist}, just as +it does with lines where other code precede the comments. However, if +you want it to act just like @kbd{TAB} for comment-only lines you can +get that by setting @code{c-indent-comments-syntactically-p} to +non-@code{nil}. + +If @code{c-indent-comments-syntactically-p} is non-@code{nil} then +@code{c-indent-comment-alist} won't be consulted at all for comment-only +lines. +@end defopt + +@item @kbd{C-M-h} (@code{c-mark-function}) @kindex C-M-h @findex c-mark-function @findex mark-function (c-) -@item @kbd{C-M-h} (@code{c-mark-function}) While not strictly an indentation command, this is useful for marking the current top-level function or class definition as the current region. As with @code{c-indent-defun}, this command operates on top-level constructs, and can't be used to mark say, a Java method. - @end table These variables are also useful when indenting code: -@table @code - -@vindex c-tab-always-indent +@defopt c-tab-always-indent @vindex tab-always-indent (c-) @kindex TAB @cindex literal -@item c-tab-always-indent -This variable controls how @kbd{TAB} @code{c-indent-command} operates. -When this variable is @code{t}, @kbd{TAB} always just indents the -current line. When it is @code{nil}, the line is indented only if point -is at the left margin, or on or before the first non-whitespace -character on the line, otherwise some whitespace is inserted. If this -variable is the symbol @code{other}, then some whitespace is inserted -only within strings and comments (literals), an inside preprocessor -directives, but the line is always reindented. - -@vindex c-insert-tab-function +This variable controls how @kbd{TAB} (@code{c-indent-command}) operates. +When it is @code{t}, @kbd{TAB} always indents the current line. When it +is @code{nil}, the line is indented only if point is at the left margin, +or on or before the first non-whitespace character on the line, +otherwise some whitespace is inserted. If this variable is the symbol +@code{other}, then some whitespace is inserted only within strings and +comments (literals), and inside preprocessor directives, but the line is +always reindented. +@end defopt + +@defopt c-insert-tab-function @vindex insert-tab-function (c-) @findex tab-to-tab-stop -@item c-insert-tab-function When ``some whitespace'' is inserted as described above, what actually happens is that the function stored in @code{c-insert-tab-function} is called. Normally, this just inserts a real tab character, or the equivalent number of spaces, depending on @code{indent-tabs-mode}. Some people, however, set @code{c-insert-tab-function} to @code{tab-to-tab-stop} so as to get hard tab stops when indenting. +@end defopt -@vindex indent-tabs-mode -@item indent-tabs-mode -This is a standard Emacs variable that controls how line indentation is -composed. When this variable is non-@code{nil}, then tabs can be used -in a line's indentation, otherwise only spaces can be used. +@defopt indent-tabs-mode +This is a standard Emacs variable that controls how line indentation +is composed. When it's non-@code{nil}, tabs can be used in a line's +indentation, otherwise only spaces can be used. +@end defopt -@vindex c-progress-interval +@defopt c-progress-interval @vindex progress-interval (c-) -@item c-progress-interval When indenting large regions of code, this variable controls how often a progress message is displayed. Set this variable to @code{nil} to -inhibit the progress messages, or set it to an integer which is the -interval in seconds that progress messages are displayed. - -@end table +inhibit the progress messages, or set it to an integer which is how +often (in seconds) progress messages are to be displayed. +@end defopt @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Movement Commands, Other Commands, Indentation Commands, Commands @comment node-name, next, previous, up -@section Movement Commands -@cindex movement commands +@section Movement Commands +@cindex movement @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@ccmode{} contains some useful command for moving around in C +@ccmode{} contains some useful commands for moving around in C code. @table @asis - +@item @kbd{M-x c-beginning-of-defun} @findex c-beginning-of-defun @findex beginning-of-defun (c-) @findex beginning-of-defun -@item @kbd{M-x c-beginning-of-defun} -Moves point back to the least-enclosing brace. This function is +Move point back to the least-enclosing brace. This function is analogous to the Emacs built-in command @code{beginning-of-defun}, except it eliminates the constraint that the top-level opening brace must be in column zero. See @code{beginning-of-defun} for more @@ -1624,14 +2119,20 @@ Depending on the coding style being used, you might prefer consider binding @kbd{C-M-a} to the former instead. For backwards compatibility reasons, the default binding remains in effect. +In AWK mode, a defun doesn't necessarily have braces at all. AWK Mode +therefore has its own version of this function which is bound by +default to @kbd{C-M-a}. You can thus chose freely which function to +bind to @kbd{C-M-a} for the other modes without worrying about AWK +buffers. @xref{AWK Mode Defuns}. + +@item @kbd{M-x c-end-of-defun} @findex c-end-of-defun @findex end-of-defun (c-) @findex end-of-defun -@item @kbd{M-x c-end-of-defun} Moves point to the end of the current top-level definition. This function is analogous to the Emacs built-in command @code{end-of-defun}, except it eliminates the constraint that the top-level opening brace of -the defun must be in column zero. See @code{beginning-of-defun} for more +the defun must be in column zero. See @code{end-of-defun} for more information. Depending on the coding style being used, you might prefer @@ -1639,10 +2140,16 @@ Depending on the coding style being used, you might prefer consider binding @kbd{C-M-e} to the former instead. For backwards compatibility reasons, the default binding remains in effect. +In AWK Mode, a defun doesn't necessarily have braces at all. AWK Mode +therefore has its own version of this function which is bound by +default to @kbd{C-M-e}. You can thus chose freely which function to +bind to @kbd{C-M-e} for the other modes without worrying about AWK +buffers. @ref{AWK Mode Defuns}. + +@item @kbd{C-c C-u} (@code{c-up-conditional}) @kindex C-c C-u @findex c-up-conditional @findex up-conditional (c-) -@item @kbd{C-c C-u} (@code{c-up-conditional}) Move point back to the containing preprocessor conditional, leaving the mark behind. A prefix argument acts as a repeat count. With a negative argument, move point forward to the end of the containing @@ -1651,15 +2158,15 @@ preprocessor conditional. @samp{#elif} is treated like @samp{#else} followed by @samp{#if}, so the function stops at them when going backward, but not when going forward. +@item @kbd{M-x c-up-conditional-with-else} @findex c-up-conditional-with-else @findex up-conditional-with-else (c-) -@item @kbd{M-x c-up-conditional-with-else} A variety of @code{c-up-conditional} that also stops at @samp{#else} lines. Normally those lines are ignored. +@item @kbd{M-x c-down-conditional} @findex c-down-conditional @findex down-conditional (c-) -@item @kbd{M-x c-down-conditional} Move point forward into the next nested preprocessor conditional, leaving the mark behind. A prefix argument acts as a repeat count. With a negative argument, move point backward into the previous @@ -1668,32 +2175,32 @@ nested preprocessor conditional. @samp{#elif} is treated like @samp{#else} followed by @samp{#if}, so the function stops at them when going forward, but not when going backward. +@item @kbd{M-x c-down-conditional-with-else} @findex c-down-conditional-with-else @findex down-conditional-with-else (c-) -@item @kbd{M-x c-down-conditional-with-else} A variety of @code{c-down-conditional} that also stops at @samp{#else} lines. Normally those lines are ignored. +@item @kbd{C-c C-p} (@code{c-backward-conditional}) @kindex C-c C-p @findex c-backward-conditional @findex backward-conditional (c-) -@item @kbd{C-c C-p} (@code{c-backward-conditional}) Move point back over a preprocessor conditional, leaving the mark behind. A prefix argument acts as a repeat count. With a negative argument, move forward. +@item @kbd{C-c C-n} (@code{c-forward-conditional}) @kindex C-c C-n @findex c-forward-conditional @findex forward-conditional (c-) -@item @kbd{C-c C-n} (@code{c-forward-conditional}) Move point forward across a preprocessor conditional, leaving the mark behind. A prefix argument acts as a repeat count. With a negative argument, move backward. +@item @kbd{M-a} (@code{c-beginning-of-statement}) @kindex M-a @findex c-beginning-of-statement @findex beginning-of-statement (c-) -@item @kbd{M-a} (@code{c-beginning-of-statement}) Move point to the beginning of the innermost C statement. If point is already at the beginning of a statement, move to the beginning of the closest preceding statement, even if that means moving into a block (you @@ -1708,10 +2215,10 @@ arguments: the repetition count, a buffer position limit which is the farthest back to search for the syntactic context, and a flag saying whether to do sentence motion in or near comments and multiline strings. +@item @kbd{M-e} (@code{c-end-of-statement}) @kindex M-e @findex c-end-of-statement @findex end-of-statement (c-) -@item @kbd{M-e} (@code{c-end-of-statement}) Move point to the end of the innermost C statement. If point is at the end of a statement, move to the end of the next statement, even if it's inside a nested block (use @kbd{C-M-f} to move to the other side of the @@ -1726,9 +2233,9 @@ arguments: the repetition count, a buffer position limit which is the farthest back to search for the syntactic context, and a flag saying whether to do sentence motion in or near comments and multiline strings. +@item @kbd{M-x c-forward-into-nomenclature} @findex c-forward-into-nomenclature @findex forward-into-nomenclature (c-) -@item @kbd{M-x c-forward-into-nomenclature} A popular programming style, especially for object-oriented languages such as C++ is to write symbols in a mixed case format, where the first letter of each word is capitalized, and not separated by underscores. @@ -1737,69 +2244,51 @@ E.g. @samp{SymbolsWithMixedCaseAndNoUnderlines}. This command moves point forward to next capitalized word. With prefix argument @var{n}, move @var{n} times. +@item @kbd{M-x c-backward-into-nomenclature} @findex c-backward-into-nomenclature @findex backward-into-nomenclature (c-) -@item @kbd{M-x c-backward-into-nomenclature} Move point backward to beginning of the next capitalized word. With prefix argument @var{n}, move @var{n} times. If @var{n} is negative, move forward. - @end table @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Other Commands, , Movement Commands, Commands @comment node-name, next, previous, up -@section Other Commands +@section Other Commands @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@ccmode{} contains a few other useful commands: +Here are the various other commands that didn't fit anywhere else: @table @asis - +@item @kbd{C-c :} (@code{c-scope-operator}) @kindex C-c : @findex c-scope-operator @findex scope-operator (c-) -@item @kbd{C-c :} (@code{c-scope-operator}) In C++, it is also sometimes desirable to insert the double-colon scope operator without performing the electric behavior of colon insertion. @kbd{C-c :} does just this. - -@kindex C-c C-\ -@findex c-backslash-region -@findex backslash-region (c-) -@item @kbd{C-c C-\} (@code{c-backslash-region}) -This function is handy when editing macros split over several lines by -ending each line with a backslash. It inserts and aligns, or deletes -these end-of-line backslashes in the current region. - -@vindex c-backslash-column -@vindex backslash-column (c-) -With no prefix argument, it inserts any missing backslashes and aligns -them to the column specified by the @code{c-backslash-column} style -variable. With a prefix argument, it deletes any backslashes. - -The function does not modify blank lines at the start of the region. If -the region ends at the start of a line, it always deletes the backslash -(if any) at the end of the previous line. - @end table - @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Customizing Indentation, Syntactic Symbols, Commands, Top @comment node-name, next, previous, up -@chapter Customizing Indentation -@cindex customizing indentation +@chapter Customizing Indentation +@cindex customization, indentation +@cindex indentation @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@vindex c-offsets-alist +The context sensitive indentation is mainly controlled by the variable +@code{c-offsets-alist}: + +@defopt c-offsets-alist @vindex offsets-alist (c-) -The style variable @code{c-offsets-alist} contains the mappings between -syntactic symbols and the offsets to apply for those symbols. It's set -at mode initialization from a @emph{style} you may specify. Styles are +This special style variable contains the mappings between syntactic +symbols and the offsets to apply for those symbols. It's set at mode +initialization from a @emph{style} you may specify. Styles are groupings of syntactic symbol offsets and other style variable values. -Most likely, you'll find that one of the pre-defined styles will suit +Most likely, you'll find that one of the predefined styles will suit your needs. @xref{Styles}, for an explanation of how to set up named styles. @@ -1812,30 +2301,27 @@ XEmacs 19.15 and later.} to easily change indentation offsets without having to bother about styles. Initially @code{c-offsets-alist} is empty, so that all syntactic symbols are set by the style system. -@kindex C-c C-o -@findex c-set-offset -@findex set-offset (c-) -You can use the command @kbd{C-c C-o} (@code{c-set-offset}) as the way -to set offsets, both interactively and from your mode -hook@footnote{Obviously, you use the key binding interactively, and the -function call programmatically!}. +The offset associated with any particular syntactic symbol can be an +integer, a function or lambda expression, a variable name, a vector, a +list, or one of the following special symbols: @code{+}, @code{-}, +@code{++}, @code{--}, @code{*}, or @code{/}. The meaning of these +values are described in detail below. +@end defopt -@vindex c-basic-offset +The special symbols describe an offset in multiples of the value of +@code{c-basic-offset}: + +@defopt c-basic-offset @vindex basic-offset (c-) -The offset associated with any particular syntactic symbol can be any of -an integer, a function or lambda expression, a variable name, a vector, -a list, or one of the following symbols: @code{+}, @code{-}, @code{++}, -@code{--}, @code{*}, or @code{/}. - -Those last special symbols describe an offset in multiples of the value -of the style variable @code{c-basic-offset}. By defining a style's -indentation in terms of this fundamental variable, you can change the -amount of whitespace given to an indentation level while maintaining the -same basic shape of your code. Here are the values that the special -symbols correspond to: +Style variable that holds the basic offset between indentation levels. +@end defopt -@table @code +By defining a style's indentation in terms of @code{c-basic-offset}, +you can change the amount of whitespace given to an indentation level +while maintaining the same basic shape of your code. Here are the +values that the special symbols correspond to: +@table @code @item + @code{c-basic-offset} times 1 @item - @@ -1848,7 +2334,6 @@ symbols correspond to: @code{c-basic-offset} times 0.5 @item / @code{c-basic-offset} times -0.5 - @end table @cindex indentation functions @@ -1860,7 +2345,9 @@ syntactic symbol is needed to get the desired indentation. for details about them. If the offset is a vector, its first element sets the absolute -indentation column, which will override any relative indentation. +indentation column, which will override any previous relative +indentation. It won't override additional relative indentation for +nested constructs, though. @vindex c-strict-syntax-p @vindex strict-syntax-p (c-) @@ -1870,7 +2357,7 @@ returns a non-@code{nil} value succeeds and the evaluation stops. If none of the list elements return a non-@code{nil} value, then an offset of 0 (zero) is used@footnote{There is however a variable @code{c-strict-syntax-p} that, when set to non-@code{nil}, will cause an -error to be signaled in that case. It's now considered obsolete since +error to be signalled in that case. It's now considered obsolete since it doesn't work well with some of the alignment functions that now returns @code{nil} instead of zero to be more usable in lists. You should therefore leave @code{c-strict-syntax-p} set to @code{nil}.}. @@ -1881,19 +2368,18 @@ indentation style, but you use 4 spaces instead of 2 spaces per level, you can probably achieve your style just by changing @code{c-basic-offset} like so@footnote{You can try this interactively in a C buffer by typing the text that appears in italics.}: -@example +@example @emph{M-x set-variable RET} Set variable: @emph{c-basic-offset RET} Set c-basic-offset to value: @emph{4 RET} - @end example @noindent This would change + @example @group - int add( int val, int incr, int doit ) @{ if( doit ) @@ -1902,14 +2388,14 @@ int add( int val, int incr, int doit ) @} return( val ); @} - @end group @end example + @noindent to + @example @group - int add( int val, int incr, int doit ) @{ if( doit ) @@ -1918,7 +2404,6 @@ int add( int val, int incr, int doit ) @} return( val ); @} - @end group @end example @@ -1939,42 +2424,42 @@ your @file{.emacs} file so that your changes are more permanent. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Interactive Customization, Permanent Customization, , Customizing Indentation @comment node-name, next, previous, up -@section Interactive Customization +@section Interactive Customization +@cindex customization, interactive @cindex interactive customization @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! As an example of how to customize indentation, let's change the -style of this example@footnote{In this an subsequent examples, the +style of this example@footnote{In this and subsequent examples, the original code is formatted using the @samp{gnu} style unless otherwise indicated. @xref{Styles}.}: + @example @group - -1: int add( int val, int incr, int doit ) -2: @{ -3: if( doit ) -4: @{ -5: return( val + incr ); -6: @} -7: return( val ); -8: @} - + 1: int add( int val, int incr, int doit ) + 2: @{ + 3: if( doit ) + 4: @{ + 5: return( val + incr ); + 6: @} + 7: return( val ); + 8: @} @end group @end example + @noindent to: + @example @group - -1: int add( int val, int incr, int doit ) -2: @{ -3: if( doit ) -4: @{ -5: return( val + incr ); -6: @} -7: return( val ); -8: @} - + 1: int add( int val, int incr, int doit ) + 2: @{ + 3: if( doit ) + 4: @{ + 5: return( val + incr ); + 6: @} + 7: return( val ); + 8: @} @end group @end example @@ -1984,16 +2469,17 @@ conditional, instead of being indented. Notice that the construct we want to change starts on line 4. To change the indentation of a line, we need to see which syntactic components affect the offset calculations for that line. Hitting @kbd{C-c C-s} on line 4 yields: -@example - -((substatement-open . 44)) +@example +((substatement-open 44)) @end example @noindent so we know that to change the offset of the open brace, we need to change the indentation for the @code{substatement-open} syntactic -symbol. To do this interactively, just hit @kbd{C-c C-o}. This prompts +symbol. + +To do this interactively, just hit @kbd{C-c C-o}. This prompts you for the syntactic symbol to change, providing a reasonable default. In this case, the default is @code{substatement-open}, which is just the syntactic symbol we want to change! @@ -2007,18 +2493,17 @@ syntactic symbol @code{substatement-open}. To check your changes quickly, just hit @kbd{C-c C-q} (@code{c-indent-defun}) to reindent the entire function. The example should now look like: + @example @group - -1: int add( int val, int incr, int doit ) -2: @{ -3: if( doit ) -4: @{ -5: return( val + incr ); -6: @} -7: return( val ); -8: @} - + 1: int add( int val, int incr, int doit ) + 2: @{ + 3: if( doit ) + 4: @{ + 5: return( val + incr ); + 6: @} + 7: return( val ); + 8: @} @end group @end example @@ -2027,14 +2512,27 @@ needed to do. Since the other affected lines are indented relative to line 4, they are automatically indented the way you'd expect. For more complicated examples, this may not always work. The general approach to take is to always start adjusting offsets for lines higher up in the -file, then re-indent and see if any following lines need further +file, then reindent and see if any following lines need further adjustments. +@deffn Command c-set-offset symbol offset +@findex set-offset (c-) +@kindex C-c C-o +This is the command bound to @kbd{C-c C-o}. It provides a convenient +way to set offsets on @code{c-offsets-alist} both interactively (see +the example above) and from your mode hook. + +It takes two arguments when used programmatically: @var{symbol} is the +syntactic element symbol to change and @var{offset} is the new offset +for that syntactic element. +@end deffn + @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Permanent Customization, Hooks, Interactive Customization, Customizing Indentation @comment node-name, next, previous, up -@section Permanent Customization +@section Permanent Customization +@cindex customization, permanent @cindex permanent customization @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -2046,27 +2544,26 @@ precisely controlled way by using styles and hook functions. The simplest way of customizing @ccmode{} permanently is to set the variables in your @file{.emacs} with @code{setq} and similar commands. -So to make the setting of @code{substatement-open} permanent, add this -to the @file{.emacs} file: +So to make a permanent setting of @code{substatement-open} to 0, add +this to the @file{.emacs} file: + @example @group - -(require 'cc-mode) -(c-set-offset 'substatement-open 0) - +(setq c-offsets-alist + '((substatement-open . 0))) @end group @end example -The @code{require} line is only needed once in the beginning to make -sure @ccmode{} is loaded so that the @code{c-set-offset} function is -defined. +When @ccmode{} initializes a buffer, it will fill out +@code{c-offsets-alist} with the remaining syntactic symbols according to +the style system. You can also use the more user friendly Customization interface, but this manual does not cover how that works. Variables set like this at the top level in @file{.emacs} take effect in all @ccmode{} buffers, regardless of language. The indentation style -related variables, e.g. @code{c-basic-offset}, that you don't set this +related variables, e.g. @code{c-offsets-alist}, that you don't set this way get their value from the style system (@pxref{Styles}), and they therefore depend on the setting of @code{c-default-style}. Note that if you use Customize, this means that the greyed-out default values @@ -2075,73 +2572,55 @@ values depend on the style, which may very well be different for different languages. If you want to make more advanced configurations, e.g. language-specific -customization, global variable settings isn't enough. For that you can +customization, setting global variables isn't enough. For that you can use the language hooks, see @ref{Hooks}, and/or the style system, see @ref{Styles}. -@vindex c-style-variables-are-local-p +@defopt c-style-variables-are-local-p @vindex style-variables-are-local-p (c-) -By default, all style variables are global, so that every buffer will -share the same style settings. This is fine if you primarily edit one -style of code, but if you edit several languages and want to use -different styles for them, you need finer control by making the style -variables buffer local. The recommended way to do this is to set the -variable @code{c-style-variables-are-local-p} to @code{t}. The -variables will be made buffer local when @ccmode{} is activated in a -buffer for the first time in the Emacs session. Note that once the -style variables are made buffer local, they cannot be made global again, -without restarting Emacs. +By default, all style variables are buffer local, so that different +buffers can have different style settings. If you only use one style +in all the files you edit you might want to share them between buffers +so that a change take effect in all buffers. That's done by setting +this variable to @code{nil}. The value takes effect when @ccmode{} is +activated in a buffer for the first time in the Emacs session, so you +typically set it in your @file{.emacs} file and then restart Emacs. +@end defopt @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Hooks, Styles, Permanent Customization, Customizing Indentation @comment node-name, next, previous, up -@section Hooks -@cindex hooks +@section Hooks +@cindex mode hooks @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@vindex c-mode-common-hook -@vindex mode-common-hook (c-) -@vindex c-mode-hook -@vindex c++-mode-hook -@vindex objc-mode-hook -@vindex java-mode-hook -@vindex idl-mode-hook -@vindex pike-mode-hook -@vindex c-initialization-hook -@vindex initialization-hook (c-) @ccmode{} provides several hooks that you can use to customize the mode according to your coding style. Each language mode has its own hook, adhering to standard Emacs major mode conventions. There is also one general hook and one package initialization hook: -@itemize @bullet - -@item -@code{c-mode-hook} --- For C buffers only. -@item -@code{c++-mode-hook} --- For C++ buffers only. -@item -@code{objc-mode-hook} --- For Objective-C buffers only. -@item -@code{java-mode-hook} --- For Java buffers only. -@item -@code{idl-mode-hook} --- For CORBA IDL buffers only. -@item -@code{pike-mode-hook} --- For Pike buffers only. -@item -@code{c-mode-common-hook} --- Common across all languages. -@item -@code{c-initialization-hook} --- Hook run only once per Emacs session, -when @ccmode{} is initialized. - -@end itemize +@defvar c-initialization-hook +@vindex initialization-hook (c-) +Hook run only once per Emacs session, when @ccmode{} is initialized. +@end defvar -The language hooks get run as the last thing when you enter that -language mode. The @code{c-mode-common-hook} is run by all supported -modes @emph{before} the language specific hook, and thus can contain -customizations that are common across all languages. Most of the -examples in this section will assume you are using the common hook. +@defvar c-mode-common-hook +@vindex mode-common-hook (c-) +Common hook across all languages. It's run immediately before the +language specific hook. +@end defvar + +@defvar c-mode-hook +@defvarx c++-mode-hook +@defvarx objc-mode-hook +@defvarx java-mode-hook +@defvarx idl-mode-hook +@defvarx pike-mode-hook +@defvarx awk-mode-hook +The language specific mode hooks. The appropriate one is run as the +last thing when you enter that language mode. +@end defvar Note that all the language-specific mode setup that CC Mode does is done prior to both @code{c-mode-common-hook} and the language specific hook. @@ -2155,23 +2634,20 @@ file to do things whenever any @ccmode{} language is edited. See the Emacs manuals for more information on customizing Emacs via hooks. @xref{Sample .emacs File}, for a more complete sample @file{.emacs} file. -@example -@group +@example (defun my-c-mode-common-hook () ;; my customizations for all of c-mode and related modes (no-case-fold-search) ) (add-hook 'c-mode-common-hook 'my-c-mode-common-hook) - -@end group @end example @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Styles, Advanced Customizations, Hooks, Customizing Indentation @comment node-name, next, previous, up -@section Styles +@section Styles @cindex styles @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -2192,14 +2668,14 @@ variables}. They are handled specially in several ways: @itemize @bullet @item -Style variables are by default global variables, i.e. they have the same -value in all Emacs buffers. However, they can instead be made always -buffer local by setting @code{c-style-variables-are-local-p} to -non-@code{nil} before @ccmode{} is initialized. +Style variables are by default buffer local variables. However, they +can instead be made global by setting +@code{c-style-variables-are-local-p} to @code{nil} before @ccmode{} is +initialized. +@item @vindex c-old-style-variable-behavior @vindex old-style-variable-behavior (c-) -@item The default value of any style variable (with two exceptions --- see below) is the special symbol @code{set-from-style}. Variables that are still set to that symbol when a @ccmode{} buffer is initialized will be @@ -2232,7 +2708,6 @@ in version 5.26.}. The global settings of style variables get captured in the special @code{user} style, which is used as the base for all the other styles. @xref{Built-in Styles}, for details. - @end itemize The style variables are: @@ -2245,79 +2720,79 @@ The style variables are: @code{c-hanging-colons-alist}, @code{c-hanging-semi&comma-criteria}, @code{c-backslash-column}, +@code{c-backslash-max-column}, @code{c-special-indent-hook}, @code{c-label-minimum-indentation}, and @code{c-offsets-alist}. @menu * Built-in Styles:: +* Choosing a Style:: * Adding Styles:: * File Styles:: @end menu @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Built-in Styles, Adding Styles, , Styles +@node Built-in Styles, Choosing a Style, , Styles @comment node-name, next, previous, up @subsection Built-in Styles -@cindex built-in styles +@cindex styles, built-in @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! If you're lucky, one of @ccmode{}'s built-in styles might be just what you're looking for. These include: -@itemize @bullet +@table @code +@item gnu @cindex GNU style -@item -@code{gnu} --- Coding style blessed by the Free Software Foundation +Coding style blessed by the Free Software Foundation for C code in GNU programs. +@item k&r @cindex K&R style -@item -@code{k&r} --- The classic Kernighan and Ritchie style for C code. +The classic Kernighan and Ritchie style for C code. +@item bsd @cindex BSD style -@item -@code{bsd} --- Also known as ``Allman style'' after Eric Allman. +Also known as ``Allman style'' after Eric Allman. -@cindex Whitesmiths style -@item -@code{whitesmith} --- Popularized by the examples that came with -Whitesmiths C, an early commercial C compiler. +@item whitesmith +@cindex Whitesmith style +Popularized by the examples that came with Whitesmiths C, an early +commercial C compiler. +@item stroustrup @cindex Stroustrup style -@item -@code{stroustrup} --- The classic Stroustrup style for C++ code. +The classic Stroustrup style for C++ code. +@item ellemtel @cindex Ellemtel style -@item -@code{ellemtel} --- Popular C++ coding standards as defined by -``Programming in C++, Rules and Recommendations,'' Erik Nyquist and Mats -Henricson, Ellemtel@footnote{This document is available at +Popular C++ coding standards as defined by ``Programming in C++, Rules +and Recommendations,'' Erik Nyquist and Mats Henricson, +Ellemtel@footnote{This document is available at @uref{http://www.doc.ic.ac.uk/lab/cplus/c++.rules/} among other places.}. +@item linux @cindex Linux style -@item -@code{linux} --- C coding standard for Linux (the kernel). +C coding standard for Linux (the kernel). +@item python @cindex Python style -@item -@code{python} --- C coding standard for Python extension -modules@footnote{Python is a high level scripting language with a C/C++ -foreign function interface. For more information, see -@uref{http://www.python.org/}.}. +C coding standard for Python extension modules@footnote{Python is a +high level scripting language with a C/C++ foreign function interface. +For more information, see @uref{http://www.python.org/}.}. +@item java @cindex Java style -@findex java-mode -@item -@code{java} --- The style for editing Java code. Note that the default +The style for editing Java code. Note that the default value for @code{c-default-style} installs this style when you enter @code{java-mode}. +@item user @cindex User style -@item -@code{user} --- This is a special style for several reasons. First, the +This is a special style for several reasons. First, the @ccmode{} customizations you do by using either the Customization interface, or by writing @code{setq}'s at the top level of your @file{.emacs} file, will be captured in the @code{user} style. Also, @@ -2325,148 +2800,145 @@ all other styles implicitly inherit their settings from @code{user} style. This means that for any styles you add via @code{c-add-style} (@pxref{Adding Styles}) you need only define the differences between your new style and @code{user} style. +@end table -@end itemize -@vindex c-default-style -@vindex default-style (c-) -The default style in all newly created buffers is @code{gnu}, but you -can change this by setting variable @code{c-default-style}. Although -the @code{user} style is not the default style, any style variable -settings you do with the Customization interface or on the top level in -your @file{.emacs} file will by default override the style system, so -you don't need to set @code{c-default-style} to @code{user} to see the -effect of these settings. - -@code{c-default-style} takes either a style name string, or an -association list of major mode symbols to style names. Thus you can -control exactly which default style is used for which @ccmode{} language -mode. Here are the rules: - -@vindex c-style-alist -@vindex style-alist (c-) -@vindex c-mode-common-hook -@vindex mode-common-hook (c-) -@enumerate -@item -When @code{c-default-style} is a string, it must be an existing style -name as found in @code{c-style-alist}. This style is then used for all -modes. +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Choosing a Style, Adding Styles, Built-in Styles, Styles +@comment node-name, next, previous, up +@subsection Choosing a Style +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +Use @kbd{C-c .} to choose a style interactively: + +@deffn Command c-set-style style-name +@findex set-style (c-) +@kindex C-c . +Switch to the specified style in the current buffer. Use +interactively like this: + +@example +@kbd{C-c . @var{style-name} RET} +@end example + +Note that all style names are case insensitive, even the ones you +define. + +Setting a style in this way does @emph{not} automatically reindent your +file. For commands that you can use to view the effect of your changes, +see @ref{Commands}. +@end deffn + +The default style in all newly created buffers is @code{gnu}, except +in Java mode where it's @code{java}. Although the @code{user} style +is not the default style, any style variable settings you do with the +Customization interface or on the top level in your @file{.emacs} file +will by default override the style system, so you don't need to set +@code{c-default-style} to @code{user} to see the effect of such +settings. + +@defopt c-default-style +@vindex default-style (c-) +This variable specifies which style to install by default in new +buffers. It takes either a style name string, or an association list +of major mode symbols to style names: + +@enumerate +@item +When @code{c-default-style} is a string, it must be an existing style +name. This style is then used for all modes. @item -When @code{c-default-style} is an association list, the current major -mode is looked up to find a style name string. In this case, this style -is always used exactly as specified and an error will occur if the named -style does not exist. +When @code{c-default-style} is an association list, the mode language +is looked up to find a style name string. @item -If @code{c-default-style} is an association list, but the current major -mode isn't found, then the special symbol @samp{other} is looked up. If -this value is found, the associated style is used. +If @code{c-default-style} is an association list where the mode +language mode isn't found then the special symbol @samp{other} is +looked up. If it's found then the associated style is used. @item -If @samp{other} is not found, then the @samp{gnu} style is used. +If @samp{other} is not found then the @samp{gnu} style is used. @item -In all cases, the style described in @code{c-default-style} is installed +In all cases, the style described in @code{c-default-style} is installed @emph{before} the language hooks are run, so you can always override -this setting by including an explicit call to @code{c-set-style} in your +this setting by including an explicit call to @code{c-set-style} in your language mode hook, or in @code{c-mode-common-hook}. - @end enumerate +@end defopt -@findex c-set-style -@findex set-style (c-) -@kindex C-c . -If you'd like to experiment with these built-in styles you can simply -type the following in a @ccmode{} buffer: -@example -@group - -@kbd{C-c . @var{STYLE-NAME} RET} - -@end group -@end example -@noindent -@kbd{C-c .} runs the command @code{c-set-style}. Note that all style -names are case insensitive, even the ones you define. - -Setting a style in this way does @emph{not} automatically re-indent your -file. For commands that you can use to view the effect of your changes, -see @ref{Commands}. - -@vindex c-indentation-style +@defvar c-indentation-style @vindex indentation-style (c-) -Note that for BOCM compatibility, @samp{gnu} is the default style, and -any non-style based customizations you make (i.e. in -@code{c-mode-common-hook} in your @file{.emacs} file) will be based on -@samp{gnu} style unless you set @code{c-default-style} or do a -@code{c-set-style} as the first thing in your hook. The variable -@code{c-indentation-style} always contains the buffer's current style -name, as a string. +This variable always contains the buffer's current style name, as a +string. +@end defvar @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Adding Styles, File Styles, Built-in Styles, Styles +@node Adding Styles, File Styles, Choosing a Style, Styles @comment node-name, next, previous, up @subsection Adding Styles -@cindex adding styles @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@vindex c-style-alist -@vindex style-alist (c-) -@findex c-add-style -@findex add-style (c-) If none of the built-in styles is appropriate, you'll probably want to add a new @dfn{style definition}. Styles are kept in the -@code{c-style-alist} variable, but you should never modify this variable -directly. Instead, @ccmode{} provides the function +@code{c-style-alist} variable, but you should never modify this +variable directly. Instead, @ccmode{} provides the function @code{c-add-style} that you can use to easily add new styles or change -existing styles. This function takes two arguments, a @var{stylename} -string, and an association list @var{description} of style -customizations. If @var{stylename} is not already in -@code{c-style-alist}, the new style is added, otherwise the style is -changed to the new @var{description}. -This function also takes an optional third argument, which if -non-@code{nil}, automatically applies the new style to the current -buffer. +existing styles: + +@defun c-add-style stylename description &optional set-p +@findex add-style (c-) +Add or update a style. If @var{stylename} is not already in +@code{c-style-alist} then a new style according to @var{description} +is added, otherwise the existing style is changed. If the optional +@var{set-p} is non-@code{nil} then the new style is applied to the +current buffer as well. @comment TBD: The next paragraph is bogus. I really need to better @comment document adding styles, including setting up inherited styles. The sample @file{.emacs} file provides a concrete example of how a new style can be added and automatically set. @xref{Sample .emacs File}. +@end defun + +@defvar c-style-alist +@vindex style-alist (c-) +This is the variable that holds the definitions for the styles. It +should not be changed directly; use @code{c-add-style} instead. +@end defvar @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node File Styles, , Adding Styles, Styles @comment node-name, next, previous, up @subsection File Styles -@cindex file styles +@cindex styles, file local @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@cindex local variables +@cindex file local variables -The Emacs manual describes how you can customize certain variables on a -per-file basis by including a @dfn{Local Variable} block at the end of -the file. So far, you've only seen a functional interface to @ccmode{} -customization, which is highly inconvenient for use in a Local Variable -block. @ccmode{} provides two variables that make it easier for you to -customize your style on a per-file basis. +The Emacs manual describes how you can customize certain variables on +a per-file basis by including a @dfn{file local variable} block at the +end of the file. So far, you've only seen a functional interface to +@ccmode{} customization, which can't be used there. @ccmode{} +provides two variables allow customization of the indentation style on +a per-file basis: -@vindex c-file-style +@defvar c-file-style @vindex file-style (c-) -@vindex c-file-offsets -@vindex file-offsets (c-) +This variable can be set to a style name string. When the file is +visited, @ccmode{} will automatically set the file's style to this +one using @code{c-set-style}. +@end defvar -The variable @code{c-file-style} can be set to a style name string. -When the file is visited, @ccmode{} will automatically set the -file's style to this style using @code{c-set-style}. - -Another variable, @code{c-file-offsets}, takes an association list -similar to what is allowed in @code{c-offsets-alist}. When the file is -visited, @ccmode{} will automatically institute these offsets using -@code{c-set-offset}. +@defvar c-file-offsets +@vindex file-offsets (c-) +This variable takes an association list similar to what is allowed in +@code{c-offsets-alist}. When the file is visited, @ccmode{} will +automatically institute these offsets using @code{c-set-offset}. +@end defvar Note that file style settings (i.e. @code{c-file-style}) are applied before file offset settings (i.e. @code{c-file-offsets}). Also, if @@ -2477,26 +2949,24 @@ style variable values are made local to that buffer. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Advanced Customizations, , Styles, Customizing Indentation @comment node-name, next, previous, up -@section Advanced Customizations +@section Advanced Customizations @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@vindex c-style-alist -@vindex style-alist (c-) -For most users, @ccmode{} will support their coding styles with -very little need for more advanced customizations. Usually, one of the -standard styles defined in @code{c-style-alist} will do the trick. At -most, perhaps one of the syntactic symbol offsets will need to be -tweaked slightly, or maybe @code{c-basic-offset} will need to be -changed. However, some styles require a more flexible framework for -customization, and one of the real strengths of @ccmode{} is that -the syntactic analysis model provides just such a framework. This allows +For most users, @ccmode{} will support their coding styles with very +little need for more advanced customizations. Usually, one of the +standard styles (@pxref{Built-in Styles}) will do the trick. At most, +perhaps one of the syntactic symbol offsets will need to be tweaked +slightly, or maybe @code{c-basic-offset} will need to be changed. +However, some styles require a more flexible framework for +customization, and one of the real strengths of @ccmode{} is that the +syntactic analysis model provides just such a framework. This allows you to implement custom indentation calculations for situations not handled by the mode directly. @menu * Custom Indentation Functions:: * Custom Brace and Colon Hanging:: -* Customizing Semi-colons and Commas:: +* Customizing Semicolons and Commas:: * Other Special Indentations:: @end menu @@ -2504,7 +2974,7 @@ handled by the mode directly. @node Custom Indentation Functions, Custom Brace and Colon Hanging, , Advanced Customizations @comment node-name, next, previous, up @subsection Custom Indentation Functions -@cindex custom indentation functions +@cindex customization, indentation functions @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The most flexible way to customize @ccmode{} is by writing custom @@ -2512,17 +2982,16 @@ indentation functions, and associating them with specific syntactic symbols (@pxref{Syntactic Symbols}). @ccmode{} itself uses indentation functions to provide more sophisticated indentation, for example when lining up C++ stream operator blocks: + @example @group - -1: void main(int argc, char**) -2: @{ -3: cout << "There were " -4: << argc -5: << "arguments passed to the program" -6: << endl; -7: @} - + 1: void main(int argc, char**) + 2: @{ + 3: cout << "There were " + 4: << argc + 5: << "arguments passed to the program" + 6: << endl; + 7: @} @end group @end example @@ -2532,67 +3001,53 @@ with a @code{c-basic-offset} of 2, you can see that lines 4 through 6 are simply indented two spaces to the right of line 3. But perhaps we'd like @ccmode{} to be a little more intelligent so that it aligns all the @samp{<<} symbols in lines 3 through 6. To do this, we have -to write a custom indentation function which finds the column of first -stream operator on the first line of the statement. Here is sample +to write a custom indentation function which finds the column of the first +stream operator on the first line of the statement. Here is sample lisp code implementing this: -@example -@group +@example (defun c-lineup-streamop (langelem) - ;; lineup stream operators (save-excursion - (let* ((relpos (cdr langelem)) - (curcol (progn (goto-char relpos) - (current-column)))) - (re-search-forward "<<\\|>>" (c-point 'eol) 'move) - (goto-char (match-beginning 0)) - (- (current-column) curcol)))) - -@end group + (goto-char (cdr langelem)) + (re-search-forward "<<\\|>>" (c-point 'eol) 'move) + (goto-char (match-beginning 0)) + (vector (current-column)))) @end example -@noindent + Indentation functions take a single argument, which is a syntactic -component cons cell (@pxref{Syntactic Analysis}). The function returns -an integer offset value that will be added to the running total -indentation for the line. Note that what actually gets returned is the -difference between the column that the first stream operator is on, and -the column of the buffer relative position passed in the function's -argument. Remember that @ccmode{} automatically adds in the column of -the component's relative buffer position and we don't the column offset -added in twice. +component cons cell (@pxref{Syntactic Analysis}). The function can +return an integer which is added to the running total indentation for +the line, or a vector containing an integer which is an absolute +column to align to. Usually an absolute column is wanted when +aligning to existing text, as in this example. The function should return @code{nil} if it's used in a situation where -it doesn't want to do any decision. If the function is used in a list +it doesn't want to make any decision. If the function is used in a list expression (@pxref{Customizing Indentation}), that will cause @ccmode{} to go on and check the next entry in the list. -@cindex stream-op syntactic symbol -@findex c-lineup-streamop -@findex lineup-streamop (c-) Now, to associate the function @code{c-lineup-streamop} with the @code{stream-op} syntactic symbol, we can add something like the following to our @code{c++-mode-hook}@footnote{It probably makes more sense to add this to @code{c++-mode-hook} than @code{c-mode-common-hook} since stream operators are only relevant for C++.}: -@example +@example (c-set-offset 'stream-op 'c-lineup-streamop) - @end example -Now the function looks like this after re-indenting (using @kbd{C-c +Now the function looks like this after reindenting (using @kbd{C-c C-q}): + @example @group - -1: void main(int argc, char**) -2: @{ -3: cout << "There were " -4: << argc -5: << " arguments passed to the program" -6: << endl; -7: @} - + 1: void main(int argc, char**) + 2: @{ + 3: cout << "There were " + 4: << argc + 5: << " arguments passed to the program" + 6: << endl; + 7: @} @end group @end example @@ -2609,7 +3064,7 @@ contribute it; please contact @email{bug-cc-mode@@gnu.org}. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Custom Brace and Colon Hanging, Customizing Semi-colons and Commas, Custom Indentation Functions, Advanced Customizations +@node Custom Brace and Colon Hanging, Customizing Semicolons and Commas, Custom Indentation Functions, Advanced Customizations @comment node-name, next, previous, up @subsection Custom Brace and Colon Hanging @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -2620,16 +3075,16 @@ Syntactic symbols aren't the only place where you can customize @ccmode{} with the lisp equivalent of callback functions. Brace ``hanginess'' can also be determined by custom functions associated with syntactic symbols on the @code{c-hanging-braces-alist} style variable. -Remember that @var{ACTION}'s are typically a list containing some +Remember that @var{action}'s are typically a list containing some combination of the symbols @code{before} and @code{after} -(@pxref{Hanging Braces}). However, an @var{ACTION} can also be a +(@pxref{Hanging Braces}). However, an @var{action} can also be a function which gets called when a brace matching that syntactic symbol is entered. -@cindex customizing brace hanging -These @var{ACTION} functions are called with two arguments: the +@cindex customization, brace hanging +These @var{action} functions are called with two arguments: the syntactic symbol for the brace, and the buffer position at which the -brace was inserted. The @var{ACTION} function is expected to return a +brace was inserted. The @var{action} function is expected to return a list containing some combination of @code{before} and @code{after}, including neither of them (i.e. @code{nil}). This return value has the normal brace hanging semantics. @@ -2637,9 +3092,8 @@ normal brace hanging semantics. As an example, @ccmode{} itself uses this feature to dynamically determine the hanginess of braces which close ``do-while'' constructs: -@example -@group +@example void do_list( int count, char** atleast_one_string ) @{ int i=0; @@ -2648,28 +3102,19 @@ void do_list( int count, char** atleast_one_string ) i++; @} while( i < count ); @} - -@end group @end example -@findex c-snug-do-while -@findex snug-do-while (c-) @ccmode{} assigns the @code{block-close} syntactic symbol to the brace that closes the @code{do} construct, and normally we'd like the line that follows a @code{block-close} brace to begin on a separate line. However, with ``do-while'' constructs, we want the @code{while} clause to follow the closing brace. To do this, we -associate the @code{block-close} symbol with the @var{ACTION} function +associate the @code{block-close} symbol with the @var{action} function @code{c-snug-do-while}: -@example +@example (defun c-snug-do-while (syntax pos) - "Dynamically calculate brace hanginess for do-while statements. -Using this function, `while' clauses that end a `do-while' block will -remain on the same line as the brace that closes that block. - -See `c-hanging-braces-alist' for how to utilize this function as an -ACTION associated with `block-close' syntax." + "Dynamically calculate brace hanginess for do-while statements." (save-excursion (let (langelem) (if (and (eq syntax 'block-close) @@ -2680,77 +3125,75 @@ ACTION associated with `block-close' syntax." (looking-at "\\[^_]"))) '(before) '(before after))))) - @end example +@findex c-snug-do-while +@findex snug-do-while (c-) This function simply looks to see if the brace closes a ``do-while'' clause and if so, returns the list @samp{(before)} indicating that a newline should be inserted before the brace, but not after it. In all other cases, it returns the list @samp{(before after)} so that the brace appears on a line by itself. -@vindex c-syntactic-context +@defvar c-syntactic-context @vindex syntactic-context (c-) -During the call to the brace hanging @var{ACTION} function, the variable -@code{c-syntactic-context} is bound to the full syntactic analysis list. +During the call to the indentation or brace hanging @var{action} +function, this variable is bound to the full syntactic analysis list. +@end defvar -@cindex customizing colon hanging -@vindex c-hanging-colon-alist -@vindex hanging-colon-alist (c-) +@cindex customization, colon hanging +@vindex c-hanging-colons-alist +@vindex hanging-colons-alist (c-) Note that for symmetry, colon hanginess should be customizable by -allowing function symbols as @var{ACTION}s on the -@code{c-hanging-colon-alist} style variable. Since no use has actually +allowing function symbols as @var{action}s on the +@code{c-hanging-colons-alist} style variable. Since no use has actually been found for this feature, it isn't currently implemented! @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Customizing Semi-colons and Commas, Other Special Indentations, Custom Brace and Colon Hanging, Advanced Customizations +@node Customizing Semicolons and Commas, Other Special Indentations, Custom Brace and Colon Hanging, Advanced Customizations @comment node-name, next, previous, up -@subsection Customizing Semi-colons and Commas -@cindex customizing semi-colons and commas +@subsection Customizing Semicolons and Commas +@cindex customization, semicolon newlines +@cindex customization, comma newlines @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@vindex c-hanging-semi&comma-criteria -@vindex hanging-semi&comma-criteria (c-) -You can also customize the insertion of newlines after semi-colons and -commas, when the auto-newline minor mode is enabled (@pxref{Minor -Modes}). This is controlled by the style variable -@code{c-hanging-semi&comma-criteria}, which contains a list of functions -that are called in the order they appear. Each function is called with -zero arguments, and is expected to return one of the following values: - -@itemize @bullet -@item -non-@code{nil} --- A newline is inserted, and no more functions from the -list are called. - -@item -@code{stop} --- No more functions from the list are called, but no -newline is inserted. +You can also customize the insertion of newlines after semicolons and +commas when the auto-newline minor mode is enabled (@pxref{Minor +Modes}). -@item -@code{nil} --- No determination is made, and the next function in the -list is called. +@defopt c-hanging-semi&comma-criteria +@vindex hanging-semi&comma-criteria (c-) +This style variable takes a list of hooks that get called when a +semicolon or comma is inserted. The hooks are called in order without +arguments, and are expected to return one of the following values: -@end itemize +@table @code +@item t +A newline is inserted, and no more functions from the list are called. +@item stop +No more functions from the list are called, but no newline is +inserted. +@item nil +No determination is made, and the next function in the list is called. +@end table If every function in the list is called without a determination being made, then no newline is added. The default value for this variable is a list containing a single function which inserts newlines only after -semi-colons which do not appear inside parenthesis lists (i.e. those +semicolons which do not appear inside parenthesis lists (i.e. those that separate @code{for}-clause statements). +@end defopt -@findex c-semi&comma-no-newlines-before-nonblanks +@defun c-semi&comma-no-newlines-before-nonblanks @findex semi&comma-no-newlines-before-nonblanks (c-) -Here's an example of a criteria function, provided by @ccmode{}, that -will prevent newlines from being inserted after semicolons when there is -a non-blank following line. Otherwise, it makes no determination. To -use, add this to the front of the @code{c-hanging-semi&comma-criteria} -list. +This is an example of a criteria function, provided by @ccmode{}. It +prevents newlines from being inserted after semicolons when there is a +non-blank following line. Otherwise, it makes no determination. To +use, add this function to the front of the +@code{c-hanging-semi&comma-criteria} list. @example -@group - (defun c-semi&comma-no-newlines-before-nonblanks () (save-excursion (if (and (eq last-command-char ?\;) @@ -2758,13 +3201,12 @@ list. (not (looking-at "^[ \t]*$"))) 'stop nil))) - -@end group @end example +@end defun -@findex c-semi&comma-inside-parenlist -@findex c-semi&comma-no-newlines-for-oneline-inliners +@defun c-semi&comma-inside-parenlist @findex semi&comma-inside-parenlist (c-) +@defunx c-semi&comma-no-newlines-for-oneline-inliners @findex semi&comma-no-newlines-for-oneline-inliners (c-) The function @code{c-semi&comma-inside-parenlist} is what prevents newlines from being inserted inside the parenthesis list of @code{for} @@ -2773,72 +3215,53 @@ statements. In addition to @ccmode{} also comes with the criteria function @code{c-semi&comma-no-newlines-for-oneline-inliners}, which suppresses newlines after semicolons inside one-line inline method definitions -(i.e. in C++ or Java). +(e.g. in C++ or Java). +@end defun @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Other Special Indentations, , Customizing Semi-colons and Commas, Advanced Customizations +@node Other Special Indentations, , Customizing Semicolons and Commas, Advanced Customizations @comment node-name, next, previous, up @subsection Other Special Indentations @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@vindex c-label-minimum-indentation +Here are the remaining odds and ends regarding indentation: + +@defopt c-label-minimum-indentation @vindex label-minimum-indentation (c-) In @samp{gnu} style (@pxref{Built-in Styles}), a minimum indentation is imposed on lines inside top-level constructs. This minimum -indentation is controlled by the style variable -@code{c-label-minimum-indentation}. The default value for this variable +indentation is controlled by this style variable. The default value is 1. +@end defopt -@vindex c-special-indent-hook +@defopt c-special-indent-hook @vindex special-indent-hook (c-) -One other customization variable is available in @ccmode{}: The style -variable @code{c-special-indent-hook}. This is a standard hook variable -that is called after every line is indented by @ccmode{}. You can use -it to do any special indentation or line adjustments your style -dictates, such as adding extra indentation to constructors or destructor -declarations in a class definition, etc. Note however, that you should -not change point or mark inside your @code{c-special-indent-hook} -functions (i.e. you'll probably want to wrap your function in a -@code{save-excursion}). - -Setting @code{c-special-indent-hook} in your style definition is handled -slightly differently than other variables. In your style definition, -you should set the value for -@code{c-special-indent-hook} to a function or list of functions, which -will be appended to @code{c-special-indent-hook} using @code{add-hook}. -That way, the current setting for the buffer local value of +This style variable is a standard hook variable that is called after +every line is indented by @ccmode{}. You can use it to do any special +indentation or line adjustments your style dictates, such as adding +extra indentation to constructors or destructor declarations in a +class definition, etc. Note that you should not change point or mark +inside your @code{c-special-indent-hook} functions, i.e. you'll +probably want to wrap your function in a @code{save-excursion}. + +Setting @code{c-special-indent-hook} in your style definition is +handled slightly differently than other variables. In your style +definition, you should set the value for @code{c-special-indent-hook} +to a function or list of functions, which will be appended to +@code{c-special-indent-hook} using @code{add-hook}. That way, the +current setting for the buffer local value of @code{c-special-indent-hook} won't be overridden. - -@kindex M-; -@findex indent-for-comment -@vindex c-indent-comments-syntactically-p -@vindex indent-comments-syntactically-p (c-) -@vindex comment-column -Normally, the standard Emacs command @kbd{M-;} -(@code{indent-for-comment}) will indent comment only lines to -@code{comment-column}. Some users however, prefer that @kbd{M-;} act -just like @kbd{TAB} for purposes of indenting comment-only lines; -i.e. they want the comments to always indent as they would for normal -code, regardless of whether @kbd{TAB} or @kbd{M-;} were used. This -behavior is controlled by the variable -@code{c-indent-comments-syntactically-p}. When @code{nil} (the -default), @kbd{M-;} indents comment-only lines to @code{comment-column}, -otherwise, they are indented just as they would be if @kbd{TAB} were -typed. - -Note that this has no effect for comment lines that are inserted with -@kbd{M-;} at the end of regular code lines. These comments will always -start at @code{comment-column}. +@end defopt @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Syntactic Symbols, Indentation Functions, Customizing Indentation, Top @comment node-name, next, previous, up -@chapter Syntactic Symbols -@cindex syntactic symbols +@chapter Syntactic Symbols @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@cindex syntactic symbols, brief list @vindex c-offsets-alist @vindex offsets-alist (c-) Here is a complete list of the recognized syntactic symbols as described @@ -2847,9 +3270,9 @@ description. More detailed descriptions follow. @table @code @item string -Inside a multi-line string. +Inside a multiline string. @item c -Inside a multi-line C style block comment. +Inside a multiline C style block comment. @item defun-open Brace that opens a top-level function definition. @item defun-close @@ -2877,7 +3300,9 @@ Subsequent lines in a K&R C argument declaration. @item topmost-intro The first line in a ``topmost'' definition. @item topmost-intro-cont -Topmost definition continuation lines. +Topmost definition continuation lines. This is only used in the parts +that aren't covered by other symbols such as @code{func-decl-cont} and +@code{knr-argdecl}. @item member-init-intro First line in a member initialization list. @item member-init-cont @@ -2915,12 +3340,14 @@ The first line in a case block that starts with a brace. The first line after a conditional or loop construct. @item substatement-open The brace that opens a substatement block. +@item substatement-label +The first line after a conditional or loop construct if it's a label. @item case-label -A @code{case} or @code{default} label. +A label in a @code{switch} block. @item access-label C++ access control label. @item label -Any non-special C label. +Any other label. @item do-while-closure The @code{while} line that ends a @code{do}-@code{while} construct. @item else-clause @@ -2945,31 +3372,41 @@ Lines continuing a stream operator (C++ only). @item inclass The line is nested inside a class definition. @item cpp-macro -The start of a C preprocessor macro definition. +The start of a preprocessor macro definition. +@item cpp-define-intro +The first line inside a multiline preproprocessor macro if +@code{c-syntactic-indentation-in-macros} is set. @item cpp-macro-cont -Subsequent lines of a multi-line C preprocessor macro definition. +All lines inside multiline preprocessor macros if +@code{c-syntactic-indentation-in-macros} is @code{nil}. @item friend A C++ friend declaration. @item objc-method-intro -The first line of an Objective-C method. definition. +The first line of an Objective-C method definition. @item objc-method-args-cont -Lines continuing an Objective-C method. definition +Lines continuing an Objective-C method definition. @item objc-method-call-cont Lines continuing an Objective-C method call. @item extern-lang-open -Brace that opens an external language block. +Brace that opens an @code{extern} block (e.g. @code{extern "C" @{...@}}). @item extern-lang-close -Brace that closes an external language block. +Brace that closes an @code{extern} block. @item inextern-lang -Analogous to @code{inclass} syntactic symbol, but used inside external -language blocks (e.g. @code{extern "C" @{}). +Analogous to @code{inclass} syntactic symbol, but used inside +@code{extern} blocks. @item namespace-open -Brace that opens a C++ namespace block. -@item namespace-close -Brace that closes a C++ namespace block. -@item innamespace -Analogous to @code{inextern-lang} syntactic symbol, but used inside C++ -namespace blocks. +@itemx namespace-close +@itemx innamespace +These are analogous to the three @code{extern-lang} symbols above, but +are returned for C++ namespace blocks. +@item module-open +@itemx module-close +@itemx inmodule +Analogous to the above, but for CORBA IDL @code{module} blocks. +@item composition-open +@itemx composition-close +@itemx incomposition +Analogous to the above, but for CORBA CIDL @code{composition} blocks. @item template-args-cont C++ template argument list continuations. @item inlambda @@ -2988,15 +3425,15 @@ classes in Java. It's also used for anonymous array initializers in Java. @end table -@cindex -open syntactic symbols -@cindex -close syntactic symbols +@ssindex -open symbols +@ssindex -close symbols Most syntactic symbol names follow a general naming convention. When a line begins with an open or close brace, the syntactic symbol will contain the suffix @code{-open} or @code{-close} respectively. -@cindex -intro syntactic symbols -@cindex -cont syntactic symbols -@cindex -block-intro syntactic symbols +@ssindex -intro symbols +@ssindex -cont symbols +@ssindex -block-intro symbols Usually, a distinction is made between the first line that introduces a construct and lines that continue a construct, and the syntactic symbols that represent these lines will contain the suffix @code{-intro} or @@ -3006,27 +3443,24 @@ contain the suffix @code{-block-intro}. Let's look at some examples to understand how this works. Remember that you can check the syntax of any line by using @kbd{C-c C-s}. -@example -@group - - 1: void - 2: swap( int& a, int& b ) - 3: @{ - 4: int tmp = a; - 5: a = b; - 6: b = tmp; - 7: int ignored = - 8: a + b; - 9: @} -@end group +@example + 1: void + 2: swap( int& a, int& b ) + 3: @{ + 4: int tmp = a; + 5: a = b; + 6: b = tmp; + 7: int ignored = + 8: a + b; + 9: @} @end example -@cindex topmost-intro syntactic symbol -@cindex topmost-intro-cont syntactic symbol -@cindex defun-open syntactic symbol -@cindex defun-close syntactic symbol -@cindex defun-block-intro syntactic symbol +@ssindex topmost-intro +@ssindex topmost-intro-cont +@ssindex defun-open +@ssindex defun-close +@ssindex defun-block-intro Line 1 shows a @code{topmost-intro} since it is the first line that introduces a top-level construct. Line 2 is a continuation of the top-level construct introduction so it has the syntax @@ -3038,8 +3472,8 @@ function definition. Line 4 is a @code{defun-block-intro}, i.e. it is the first line of a brace-block, enclosed in a top-level function definition. -@cindex statement syntactic symbol -@cindex statement-cont syntactic symbol +@ssindex statement +@ssindex statement-cont Lines 5, 6, and 7 are all given @code{statement} syntax since there isn't much special about them. Note however that line 8 is given @code{statement-cont} syntax since it continues the statement begun @@ -3047,33 +3481,30 @@ on the previous line. Here's another example, which illustrates some C++ class syntactic symbols: -@example -@group - 1: class Bass - 2: : public Guitar, - 3: public Amplifiable - 4: @{ - 5: public: - 6: Bass() - 7: : eString( new BassString( 0.105 )), - 8: aString( new BassString( 0.085 )), - 9: dString( new BassString( 0.065 )), - 10: gString( new BassString( 0.045 )) - 11: @{ - 12: eString.tune( 'E' ); - 13: aString.tune( 'A' ); - 14: dString.tune( 'D' ); - 15: gString.tune( 'G' ); - 16: @} - 17: friend class Luthier; - 18: @} - -@end group +@example + 1: class Bass + 2: : public Guitar, + 3: public Amplifiable + 4: @{ + 5: public: + 6: Bass() + 7: : eString( new BassString( 0.105 )), + 8: aString( new BassString( 0.085 )), + 9: dString( new BassString( 0.065 )), +10: gString( new BassString( 0.045 )) +11: @{ +12: eString.tune( 'E' ); +13: aString.tune( 'A' ); +14: dString.tune( 'D' ); +15: gString.tune( 'G' ); +16: @} +17: friend class Luthier; +18: @}; @end example -@cindex class-open syntactic symbol -@cindex class-close syntactic symbol +@ssindex class-open +@ssindex class-close As in the previous example, line 1 has the @code{topmost-intro} syntax. Here however, the brace that opens a C++ class definition on line 4 is assigned the @code{class-open} syntax. Note that in C++, classes, @@ -3086,22 +3517,18 @@ languages are syntactically equivalent to classes. Note however that the keyword @code{class} is meaningless in C and Objective-C.}. Similarly, line 18 is assigned @code{class-close} syntax. -@cindex inher-intro syntactic symbol -@cindex inher-cont syntactic symbol +@ssindex inher-intro +@ssindex inher-cont Line 2 introduces the inheritance list for the class so it is assigned the @code{inher-intro} syntax, and line 3, which continues the inheritance list is given @code{inher-cont} syntax. -@cindex access-label syntactic symbol -@cindex inclass syntactic symbol +@ssindex access-label +@ssindex inclass Hitting @kbd{C-c C-s} on line 5 shows the following analysis: @example -@group - -@code{((inclass . 58) (access-label . 67))} - -@end group +((inclass 58) (access-label 58)) @end example @noindent @@ -3114,15 +3541,11 @@ Similarly, line 6 is given both @code{inclass} and @code{topmost-intro} syntax: @example -@group - -@code{((inclass . 58) (topmost-intro . 60))} - -@end group +((inclass 58) (topmost-intro 60)) @end example -@cindex member-init-intro syntactic symbol -@cindex member-init-cont syntactic symbol +@ssindex member-init-intro +@ssindex member-init-cont Line 7 introduces a C++ member initialization list and as such is given @code{member-init-intro} syntax. Note that in this case it is @emph{not} assigned @code{inclass} since this is not considered a @@ -3131,16 +3554,12 @@ top-level construct. Lines 8 through 10 are all assigned list started on line 7. @cindex in-class inline methods -@cindex inline-open syntactic symbol -@cindex inline-close syntactic symbol +@ssindex inline-open +@ssindex inline-close Line 11's analysis is a bit more complicated: @example -@group - -@code{((inclass . 58) (inline-open))} - -@end group +((inclass 58) (inline-open)) @end example This line is assigned a syntax of both @code{inline-open} and @@ -3148,38 +3567,35 @@ This line is assigned a syntax of both @code{inline-open} and definition. This is distinct from, but related to, the C++ notion of an inline function in that its definition occurs inside an enclosing class definition, which in C++ implies that the function should be inlined. -If though, the definition of the @code{Bass} constructor appeared +However, if the definition of the @code{Bass} constructor appeared outside the class definition, the construct would be given the @code{defun-open} syntax, even if the keyword @code{inline} appeared before the method name, as in: -@example -@group - -class Bass - : public Guitar, - public Amplifiable -@{ -public: - Bass(); -@} - -inline -Bass::Bass() - : eString( new BassString( 0.105 )), - aString( new BassString( 0.085 )), - dString( new BassString( 0.065 )), - gString( new BassString( 0.045 )) -@{ - eString.tune( 'E' ); - aString.tune( 'A' ); - dString.tune( 'D' ); - gString.tune( 'G' ); -@} -@end group +@example + 1: class Bass + 2: : public Guitar, + 3: public Amplifiable + 4: @{ + 5: public: + 6: Bass(); + 7: @}; + 8: + 9: inline +10: Bass::Bass() +11: : eString( new BassString( 0.105 )), +12: aString( new BassString( 0.085 )), +13: dString( new BassString( 0.065 )), +14: gString( new BassString( 0.045 )) +15: @{ +16: eString.tune( 'E' ); +17: aString.tune( 'A' ); +18: dString.tune( 'D' ); +19: gString.tune( 'G' ); +20: @} @end example -@cindex friend syntactic symbol +@ssindex friend Returning to the previous example, line 16 is given @code{inline-close} syntax, while line 12 is given @code{defun-block-open} syntax, and lines 13 through 15 are all given @code{statement} syntax. Line 17 is @@ -3187,9 +3603,7 @@ interesting in that its syntactic analysis list contains three elements: @example - -@code{((friend) (inclass . 58) (topmost-intro . 380))} - +((inclass 58) (topmost-intro 380) (friend)) @end example The @code{friend} syntactic symbol is a modifier that typically does not @@ -3198,13 +3612,9 @@ have a relative buffer position. Template definitions introduce yet another syntactic symbol: @example -@group - - 1: ThingManager framework_callbacks; - -@end group + 1: ThingManager framework_callbacks; @end example Here, line 1 is analyzed as a @code{topmost-intro}, but lines 2 and 3 @@ -3212,98 +3622,89 @@ are both analyzed as @code{template-args-cont} lines. Here is another (totally contrived) example which illustrates how syntax is assigned to various conditional constructs: -@example -@group - - 1: void spam( int index ) - 2: @{ - 3: for( int i=0; i 0 ); - 16: @} - -@end group +@example + 1: void spam( int index ) + 2: @{ + 3: for( int i=0; i 0 ); +15: @} @end example -@noindent Only the lines that illustrate new syntactic symbols will be discussed. -@cindex substatement-open syntactic symbol -@cindex substatement-block-intro syntactic symbol -@cindex block-close syntactic symbol +@ssindex substatement-open +@ssindex substatement-block-intro +@ssindex block-close Line 4 has a brace which opens a conditional's substatement block. It is thus assigned @code{substatement-open} syntax, and since line 5 is the first line in the substatement block, it is assigned -@code{substatement-block-intro} syntax. Lines 6 and 7 are assigned -similar syntax. Line 8 contains the brace that closes the inner -substatement block. It is given the syntax @code{block-close}, -as are lines 11 and 14. - -@cindex else-clause syntactic symbol -@cindex catch-clause syntactic symbol -Line 9 is a little different --- since it contains the keyword -@code{else} matching the @code{if} statement introduced on line 5, it is -given the @code{else-clause} syntax. The @code{try}-@code{catch} -constructs in C++ and Java are treated this way too, with the only -difference that the @code{catch}, and in Java also @code{finally}, is -marked with @code{catch-clause}. - -@cindex substatement syntactic symbol -Line 10 is also slightly different. Because @code{else} is considered a -conditional introducing keyword @footnote{The list of conditional -keywords are (in C, C++, Objective-C, Java, and Pike): @code{for}, -@code{if}, @code{do}, @code{else}, @code{while}, and @code{switch}. C++ -and Java have two additional conditional keywords: @code{try} and -@code{catch}. Java also has the @code{finally} and @code{synchronized} -keywords.}, and because the following substatement is not a brace block, -line 10 is assigned the @code{substatement} syntax. - -@cindex do-while-closure syntactic symbol -One other difference is seen on line 15. The @code{while} construct -that closes a @code{do} conditional is given the special syntax -@code{do-while-closure} if it appears on a line by itself. Note that if -the @code{while} appeared on the same line as the preceding close brace, -that line would have been assigned @code{block-close} syntax instead. +@code{substatement-block-intro} syntax. Line 10 contains the brace that +closes the inner substatement block, and is therefore given the syntax +@code{block-close}. Line 13 is treated the same way. + +@ssindex substatement +Lines 6 and 9 are also substatements of conditionals, but since they +don't start blocks they are given @code{substatement} syntax +instead of @code{substatement-open}. + +@ssindex substatement-label +Line 8 contains a label, which is normally given @code{label} syntax. +This one is however a bit special since it's between a conditional and +its substatement. It's analyzed as @code{substatement-label} to let you +handle this rather odd case differently from normal labels. + +@ssindex else-clause +@ssindex catch-clause +Line 7 start with an @code{else} that matches the @code{if} statement on +line 5. It is therefore given the @code{else-clause} syntax and is +anchored on the matching @code{if}. The @code{try}-@code{catch} +constructs in C++ and Java are treated this way too, except that +@code{catch} and (in Java) @code{finally}, are marked with +@code{catch-clause}. + +@ssindex do-while-closure +The @code{while} construct on line 14 that closes a @code{do} +conditional is given the special syntax @code{do-while-closure} if it +appears on a line by itself. Note that if the @code{while} appeared on +the same line as the preceding close brace, that line would still have +@code{block-close} syntax. Switch statements have their own set of syntactic symbols. Here's an example: -@example -@group - 1: void spam( enum Ingredient i ) - 2: @{ - 3: switch( i ) @{ - 4: case Ham: - 5: be_a_pig(); - 6: break; - 7: case Salt: - 8: drink_some_water(); - 9: break; - 10: default: - 11: @{ - 12: what_is_it(); - 13: break; - 14: @} - 15: @} - 14: @} - -@end group +@example + 1: void spam( enum Ingredient i ) + 2: @{ + 3: switch( i ) @{ + 4: case Ham: + 5: be_a_pig(); + 6: break; + 7: case Salt: + 8: drink_some_water(); + 9: break; +10: default: +11: @{ +12: what_is_it(); +13: break; +14: @} +15: @} +14: @} @end example -@cindex case-label syntactic symbol -@cindex statement-case-intro syntactic symbol -@cindex statement-case-open syntactic symbol +@ssindex case-label +@ssindex statement-case-intro +@ssindex statement-case-open Here, lines 4, 7, and 10 are all assigned @code{case-label} syntax, while lines 5 and 8 are assigned @code{statement-case-intro}. Line 11 is treated slightly differently since it contains a brace that opens a @@ -3316,23 +3717,20 @@ constructs inside of brace lists. A brace list is defined as an initialize an array of structs. The three special aggregate constructs in Pike, @code{(@{ @})}, @code{([ ])} and @code{(< >)}, are treated as brace lists too. An example: -@example -@group - - 1: static char* ingredients[] = - 2: @{ - 3: "Ham", - 4: "Salt", - 5: NULL - 6: @} -@end group +@example + 1: static char* ingredients[] = + 2: @{ + 3: "Ham", + 4: "Salt", + 5: NULL + 6: @}; @end example -@cindex brace-list-open syntactic symbol -@cindex brace-list-intro syntactic symbol -@cindex brace-list-close syntactic symbol -@cindex brace-list-entry syntactic symbol +@ssindex brace-list-open +@ssindex brace-list-intro +@ssindex brace-list-close +@ssindex brace-list-entry Following convention, line 2 in this example is assigned @code{brace-list-open} syntax, and line 3 is assigned @code{brace-list-intro} syntax. Likewise, line 6 is assigned @@ -3340,25 +3738,22 @@ Following convention, line 2 in this example is assigned @code{brace-list-entry} syntax, as would all subsequent lines in this initializer list. -@cindex brace-entry-open syntactic symbol +@ssindex brace-entry-open Your static initializer might be initializing nested structures, for example: -@example -@group - 1: struct intpairs[] = - 2: @{ - 3: @{ 1, 2 @}, - 4: @{ - 5: 3, - 6: 4 - 7: @} - 8: @{ 1, - 9: 2 @}, - 10: @{ 3, 4 @} - 11: @} - -@end group +@example + 1: struct intpairs[] = + 2: @{ + 3: @{ 1, 2 @}, + 4: @{ + 5: 3, + 6: 4 + 7: @} + 8: @{ 1, + 9: 2 @}, +10: @{ 3, 4 @} +11: @}; @end example Here, you've already seen the analysis of lines 1, 2, 3, and 11. On @@ -3371,87 +3766,96 @@ line 10. External language definition blocks also have their own syntactic symbols. In this example: -@example -@group - - 1: extern "C" - 2: @{ - 3: int thing_one( int ); - 4: int thing_two( double ); - 5: @} -@end group +@example + 1: extern "C" + 2: @{ + 3: int thing_one( int ); + 4: int thing_two( double ); + 5: @} @end example -@cindex extern-lang-open syntactic symbol -@cindex extern-lang-close syntactic symbol -@cindex inextern-lang syntactic symbol -@cindex inclass syntactic symbol +@ssindex extern-lang-open +@ssindex extern-lang-close +@ssindex inextern-lang +@ssindex inclass @noindent line 2 is given the @code{extern-lang-open} syntax, while line 5 is given the @code{extern-lang-close} syntax. The analysis for line 3 yields: -@code{((inextern-lang) (topmost-intro . 14))}, where -@code{inextern-lang} is a modifier similar in purpose to @code{inclass}. -Similarly, C++ namespace constructs have their own associated syntactic -symbols. In this example: @example -@group - - 1: namespace foo - 2: @{ - 3: void xxx() @{@} - 4: @} - -@end group +((inextern-lang) (topmost-intro 14)) @end example -@cindex namespace-open syntactic symbol -@cindex namespace-close syntactic symbol -@cindex innamespace syntactic symbol @noindent -line 2 is given the @code{namespace-open} syntax, while line 4 is given -the @code{namespace-close} syntax. The analysis for line 3 yields: -@code{((innamespace) (topmost-intro . 17))}, where @code{innamespace} is -a modifier similar in purpose to @code{inextern-lang} and @code{inclass}. +where @code{inextern-lang} is a modifier similar in purpose to +@code{inclass}. + +There are various other top level blocks like @code{extern}, and they +are all treated in the same way except that the symbols are named after +the keyword that introduces the block. E.g. C++ namespace blocks get +the three symbols @code{namespace-open}, @code{namespace-close} and +@code{innamespace}. The currently recognized top level blocks are: + +@table @asis +@item @code{extern-lang-open}, @code{extern-lang-close}, @code{inextern-lang} +@code{extern} blocks in C and C++.@footnote{These should logically be +named @code{extern-open}, @code{extern-close} and @code{inextern}, but +that isn't the case for historical reasons.} + +@item @code{namespace-open}, @code{namespace-close}, @code{innamespace} +@ssindex namespace-open +@ssindex namespace-close +@ssindex innamespace +@code{namespace} blocks in C++. + +@item @code{module-open}, @code{module-close}, @code{inmodule} +@ssindex module-open +@ssindex module-close +@ssindex inmodule +@code{module} blocks in CORBA IDL. + +@item @code{composition-open}, @code{composition-close}, @code{incomposition} +@ssindex composition-open +@ssindex composition-close +@ssindex incomposition +@code{composition} blocks in CORBA CIDL. +@end table A number of syntactic symbols are associated with parenthesis lists, a.k.a argument lists, as found in function declarations and function calls. This example illustrates these: -@example -@group - - 1: void a_function( int line1, - 2: int line2 ); - 3: - 4: void a_longer_function( - 5: int line1, - 6: int line2 - 7: ); - 8: - 9: void call_them( int line1, int line2 ) - 10: @{ - 11: a_function( - 12: line1, - 13: line2 - 14: ); - 15: - 16: a_longer_function( line1, - 17: line2 ); - 18: @} -@end group +@example + 1: void a_function( int line1, + 2: int line2 ); + 3: + 4: void a_longer_function( + 5: int line1, + 6: int line2 + 7: ); + 8: + 9: void call_them( int line1, int line2 ) +10: @{ +11: a_function( +12: line1, +13: line2 +14: ); +15: +16: a_longer_function( line1, +17: line2 ); +18: @} @end example -@cindex arglist-intro syntactic symbol -@cindex arglist-close syntactic symbol +@ssindex arglist-intro +@ssindex arglist-close Lines 5 and 12 are assigned @code{arglist-intro} syntax since they are the first line following the open parenthesis, and lines 7 and 14 are assigned @code{arglist-close} syntax since they contain the parenthesis that closes the argument list. -@cindex arglist-cont-nonempty syntactic symbol -@cindex arglist-cont syntactic symbol +@ssindex arglist-cont-nonempty +@ssindex arglist-cont Lines that continue argument lists can be assigned one of two syntactic symbols. For example, Lines 2 and 17 are assigned @code{arglist-cont-nonempty} syntax. What this means @@ -3467,47 +3871,43 @@ is assigned the @code{statement-cont} syntax instead. A few miscellaneous syntactic symbols that haven't been previously covered are illustrated by this C++ example: -@example -@group - 1: void Bass::play( int volume ) - 2: const - 3: @{ - 4: /* this line starts a multi-line - 5: * comment. This line should get `c' syntax */ - 6: - 7: char* a_multiline_string = "This line starts a multi-line \ - 8: string. This line should get `string' syntax."; - 9: - 10: note: - 11: @{ - 12: #ifdef LOCK - 13: Lock acquire(); - 14: #endif // LOCK - 15: slap_pop(); - 16: cout << "I played " - 17: << "a note\n"; - 18: @} - 19: @} - -@end group +@example + 1: void Bass::play( int volume ) + 2: const + 3: @{ + 4: /* this line starts a multiline + 5: * comment. This line should get `c' syntax */ + 6: + 7: char* a_multiline_string = "This line starts a multiline \ + 8: string. This line should get `string' syntax."; + 9: +10: note: +11: @{ +12: #ifdef LOCK +13: Lock acquire(); +14: #endif // LOCK +15: slap_pop(); +16: cout << "I played " +17: << "a note\n"; +18: @} +19: @} @end example The lines to note in this example include: @itemize @bullet - -@cindex func-decl-cont syntactic symbol @item +@ssindex func-decl-cont Line 2 is assigned the @code{func-decl-cont} syntax. -@cindex comment-intro syntactic symbol @item +@ssindex comment-intro Line 4 is assigned both @code{defun-block-intro} @emph{and} @code{comment-intro} syntax. -@cindex c syntactic symbol @item +@ssindex c Line 5 is assigned @code{c} syntax. @item @@ -3519,21 +3919,20 @@ comment on lines 4 and 5 do not cause line 6 to be assigned @dfn{syntactic whitespace}, which are ignored when analyzing code. -@cindex string syntactic symbol @item +@ssindex string Line 8 is assigned @code{string} syntax. -@cindex label syntactic symbol @item +@ssindex label Line 10 is assigned @code{label} syntax. -@cindex block-open syntactic symbol @item +@ssindex block-open Line 11 is assigned @code{block-open} syntax. -@cindex cpp-macro syntactic symbol -@cindex cpp-macro-cont syntactic symbol @item +@ssindex cpp-macro Lines 12 and 14 are assigned @code{cpp-macro} syntax in addition to the normal syntactic symbols (@code{statement-block-intro} and @code{statement}, respectively). Normally @code{cpp-macro} is @@ -3542,77 +3941,80 @@ preprocessor directives stick to the first column, but that's easily changed if you want preprocessor directives to be indented like the rest of the code. -@cindex stream-op syntactic symbol @item +@ssindex stream-op Line 17 is assigned @code{stream-op} syntax. - @end itemize -@cindex multi-line macros +@cindex multiline macros @cindex syntactic whitespace -Multi-line C preprocessor macros are now (somewhat) supported. At least -@ccmode{} now recognizes the fact that it is inside a multi-line macro, -and it properly skips such macros as syntactic whitespace. In this -example: -@example -@group +@ssindex cpp-define-intro +Multiline preprocessor macro definitions are normally handled just like +other code, i.e. the lines inside them are indented according to the +syntactic analysis of the preceding lines inside the macro. The first +line inside a macro definition (i.e. the line after the starting line of +the cpp directive itself) gets @code{cpp-define-intro}. In this example: - 1: #define LIST_LOOP(cons, listp) \ - 2: for (cons = listp; !NILP (cons); cons = XCDR (cons)) \ - 3: if (!CONSP (cons)) \ - 4: signal_error ("Invalid list format", listp); \ - 5: else - -@end group +@example + 1: #define LIST_LOOP(cons, listp) \ + 2: for (cons = listp; !NILP (cons); cons = XCDR (cons)) \ + 3: if (!CONSP (cons)) \ + 4: signal_error ("Invalid list format", listp); \ + 5: else @end example + @noindent -line 1 is given the syntactic symbol @code{cpp-macro}. This first line -of a macro is always given this symbol. The second and subsequent lines -(e.g. lines 2 through 5) are given the @code{cpp-macro-cont} syntactic -symbol, with a relative buffer position pointing to the @code{#} which -starts the macro definition. +line 1 is given the syntactic symbol @code{cpp-macro}. The first line +of a cpp directive is always given that symbol. Line 2 is given +@code{cpp-define-intro}, so that you can give the macro body as a whole +some extra indentation. Lines 3 through 5 are then analyzed as normal +code, i.e. @code{substatement} on lines 3 and 4, and @code{else-clause} +on line 5. + +The syntactic analysis inside macros can be turned off with +@code{c-syntactic-indentation-in-macros}. In that case, lines 2 through +5 would all be given @code{cpp-macro-cont} with a relative buffer +position pointing to the @code{#} which starts the cpp +directive@footnote{This is how @ccmode{} 5.28 and earlier analyzed +macros.}. + +@xref{Macro Handling}, for more info about the treatment of macros. In Objective-C buffers, there are three additional syntactic symbols assigned to various message calling constructs. Here's an example illustrating these: -@example -@group - 1: - (void)setDelegate:anObject - 2: withStuff:stuff - 3: @{ - 4: [delegate masterWillRebind:self - 5: toDelegate:anObject - 6: withExtraStuff:stuff]; - 7: @} - -@end group +@example + 1: - (void)setDelegate:anObject + 2: withStuff:stuff + 3: @{ + 4: [delegate masterWillRebind:self + 5: toDelegate:anObject + 6: withExtraStuff:stuff]; + 7: @} @end example -@cindex objc-method-intro syntactic symbol -@cindex objc-method-args-cont syntactic symbol -@cindex objc-method-call-cont syntactic symbol +@ssindex objc-method-intro +@ssindex objc-method-args-cont +@ssindex objc-method-call-cont Here, line 1 is assigned @code{objc-method-intro} syntax, and line 2 is assigned @code{objc-method-args-cont} syntax. Lines 5 and 6 are both assigned @code{objc-method-call-cont} syntax. Java has a concept of anonymous classes, which may look something like this: -@example -@group - - 1: public void watch(Observable o) @{ - 2: o.addObserver(new Observer() @{ - 3: public void update(Observable o, Object arg) @{ - 4: history.addElement(arg); - 5: @} - 6: @}); - 7: @} -@end group +@example + 1: public void watch(Observable o) @{ + 2: o.addObserver(new Observer() @{ + 3: public void update(Observable o, Object arg) @{ + 4: history.addElement(arg); + 5: @} + 6: @}); + 7: @} @end example -@cindex inexpr-class syntactic symbol +@ssindex inexpr-class The brace following the @code{new} operator opens the anonymous class. Lines 3 and 6 are assigned the @code{inexpr-class} syntax, besides the @code{inclass} symbol used in normal classes. Thus, the class will be @@ -3621,19 +4023,16 @@ indented just like a normal class, with the added indentation given to There are a few occasions where a statement block may be used inside an expression. One is in C code using the gcc extension for this, e.g: -@example -@group - 1: int res = (@{ - 2: int y = foo (); int z; - 3: if (y > 0) z = y; else z = - y; - 4: z; - 5: @}); - -@end group +@example + 1: int res = (@{ + 2: int y = foo (); int z; + 3: if (y > 0) z = y; else z = - y; + 4: z; + 5: @}); @end example -@cindex inexpr-statement syntactic symbol +@ssindex inexpr-statement Lines 2 and 5 get the @code{inexpr-statement} syntax, besides the symbols they'd get in a normal block. Therefore, the indentation put on @code{inexpr-statement} is added to the normal statement block @@ -3641,27 +4040,24 @@ indentation. In Pike code, there are a few other situations where blocks occur inside statements, as illustrated here: -@example -@group - - 1: array itgob() - 2: @{ - 3: string s = map (backtrace()[-2][3..], - 4: lambda - 5: (mixed arg) - 6: @{ - 7: return sprintf ("%t", arg); - 8: @}) * ", " + "\n"; - 9: return catch @{ - 10: write (s + "\n"); - 11: @}; - 12: @} -@end group +@example + 1: array itgob() + 2: @{ + 3: string s = map (backtrace()[-2][3..], + 4: lambda + 5: (mixed arg) + 6: @{ + 7: return sprintf ("%t", arg); + 8: @}) * ", " + "\n"; + 9: return catch @{ +10: write (s + "\n"); +11: @}; +12: @} @end example -@cindex inlambda syntactic symbol -@cindex lambda-intro-cont syntactic symbol +@ssindex inlambda +@ssindex lambda-intro-cont Lines 4 through 8 contain a lambda function, which @ccmode{} recognizes by the @code{lambda} keyword. If the function argument list is put on a line of its own, as in line 5, it gets the @code{lambda-intro-cont} @@ -3674,29 +4070,26 @@ opening brace, which stands on its own line in this example. If the opening brace was hanging on the previous line, then the closing brace would get the @code{inlambda} syntax too to be indented correctly.}. -@cindex inexpr-statement syntactic symbol +@ssindex inexpr-statement On line 9, @code{catch} is a special function taking a statement block as its argument. The block is handled as an in-expression statement with the @code{inexpr-statement} syntax, just like the gcc extended C example above. The other similar special function, @code{gauge}, is handled like this too. -@cindex knr-argdecl-intro syntactic symbol -@cindex knr-argdecl syntactic symbol +@ssindex knr-argdecl-intro +@ssindex knr-argdecl Two other syntactic symbols can appear in old style, non-prototyped C code @footnote{a.k.a. K&R C, or Kernighan & Ritchie C}: -@example -@group - 1: int add_three_integers(a, b, c) - 2: int a; - 3: int b; - 4: int c; - 5: @{ - 6: return a + b + c; - 7: @} - -@end group +@example + 1: int add_three_integers(a, b, c) + 2: int a; + 3: int b; + 4: int c; + 5: @{ + 6: return a + b + c; + 7: @} @end example Here, line 2 is the first line in an argument declaration list and so is @@ -3706,17 +4099,17 @@ syntax. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Indentation Functions, Performance Issues, Syntactic Symbols, Top +@node Indentation Functions, AWK Mode, Syntactic Symbols, Top @comment node-name, next, previous, up -@chapter Indentation Functions -@cindex indentation functions -@cindex line-up functions +@chapter Indentation Functions @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -Often there are cases when a simple offset setting on a syntactic symbol -isn't enough to get the desired indentation. Therefore, it's also -possible to use a @dfn{indentation function} (a.k.a. line-up function) -for a syntactic symbol. +@cindex indentation function +@cindex line-up function +Often there are cases when a simple offset setting on a syntactic +symbol isn't enough to get the desired indentation. Therefore, it's +also possible to use an @dfn{indentation function} (a.k.a. @dfn{line-up +function}) for a syntactic symbol. @ccmode{} comes with many predefined indentation functions for common situations. If none of these does what you want, you can write your @@ -3737,336 +4130,690 @@ Works with: @end macro @end ifinfo -@table @code - -@findex c-lineup-arglist -@findex lineup-arglist (c-) -@item c-lineup-arglist -Line up the current argument line under the first argument. +@macro sssTBasicOffset +<--> @i{c-basic-offset}@c +@end macro -@workswith @code{arglist-cont-nonempty}. +@macro sssTsssTBasicOffset +<--><--> @i{c-basic-offset}@c +@end macro -@findex c-lineup-arglist-intro-after-paren -@findex lineup-arglist-intro-after-paren (c-) -@item c-lineup-arglist-intro-after-paren -Line up a line just after the open paren of the surrounding paren or -brace block. +@macro hereFn{func} +<- @i{\func\}@c +@end macro -@workswith @code{defun-block-intro}, @code{brace-list-intro}, -@code{statement-block-intro}, @code{statement-case-intro}, -@code{arglist-intro}. +@c The TeX backend seems to insert extra spaces around the argument. :P +@iftex +@unmacro hereFn +@macro hereFn{func} +<-@i{\func\}@c +@end macro +@end iftex -@findex c-lineup-arglist-close-under-paren -@findex lineup-arglist-close-under-paren (c-) -@item c-lineup-arglist-close-under-paren -Set e.g. your @code{arglist-close} syntactic symbol to this line-up -function so that parentheses that close argument lists will line up -under the parenthesis that opened the argument list. +@comment ------------------------------------------------------------ -@workswith @code{defun-close}, @code{class-close}, @code{inline-close}, -@code{block-close}, @code{brace-list-close}, @code{arglist-close}, -@code{extern-lang-close}, @code{namespace-close} (for most of these, a -zero offset will normally produce the same result, though). +@defun c-indent-one-line-block +@findex indent-one-line-block (c-) +Indent a one line block @code{c-basic-offset} extra. E.g: -@findex c-lineup-close-paren -@findex lineup-close-paren (c-) -@item c-lineup-close-paren -Line up the closing paren under its corresponding open paren if the -open paren is followed by code. If the open paren ends its line, no -indentation is added. E.g: @example @group - -main (int, - char ** - ) // c-lineup-close-paren - +if (n > 0) + @{m+=n; n=0;@} @hereFn{c-indent-one-line-block} +@sssTBasicOffset{} @end group @end example + @noindent and + @example @group - -main ( - int, char ** -) // c-lineup-close-paren - +if (n > 0) +@{ @hereFn{c-indent-one-line-block} + m+=n; n=0; +@} @end group @end example -@workswith @code{defun-close}, @code{class-close}, @code{inline-close}, -@code{block-close}, @code{brace-list-close}, @code{arglist-close}, -@code{extern-lang-close}, @code{namespace-close}. +The block may be surrounded by any kind of parenthesis characters. +@code{nil} is returned if the line doesn't start with a one line block, +which makes the function usable in list expressions. -@findex c-lineup-streamop -@findex lineup-streamop (c-) -@item c-lineup-streamop -Line up C++ stream operators (i.e. @samp{<<} and @samp{>>}). +@workswith Almost all syntactic symbols, but most useful on the +@code{-open} symbols. +@end defun -@workswith @code{stream-op}. +@comment ------------------------------------------------------------ + +@defun c-indent-multi-line-block +@findex indent-multi-line-block (c-) +Indent a multiline block @code{c-basic-offset} extra. E.g: -@findex c-lineup-multi-inher -@findex lineup-multi-inher (c-) -@item c-lineup-multi-inher -Line up the classes in C++ multiple inheritance clauses and member -initializers under each other. E.g: @example @group - -Foo::Foo (int a, int b): - Cyphr (a), - Bar (b) // c-lineup-multi-inher - +int *foo[] = @{ + NULL, + @{17@}, @hereFn{c-indent-multi-line-block} @end group @end example + @noindent and + @example @group +int *foo[] = @{ + NULL, + @{ @hereFn{c-indent-multi-line-block} + 17 + @}, + @sssTBasicOffset{} +@end group +@end example -class Foo - : public Cyphr, - public Bar // c-lineup-multi-inher +The block may be surrounded by any kind of parenthesis characters. +@code{nil} is returned if the line doesn't start with a multiline +block, which makes the function usable in list expressions. + +@workswith Almost all syntactic symbols, but most useful on the +@code{-open} symbols. +@end defun +@comment ------------------------------------------------------------ + +@defun c-lineup-argcont +@findex lineup-argcont (c-) +Line up a continued argument. E.g: + +@example +@group +foo (xyz, aaa + bbb + ccc + + ddd + eee + fff); @hereFn{c-lineup-argcont} @end group @end example -@noindent -and + +Only continuation lines like this are touched, @code{nil} is returned on +lines which are the start of an argument. + +Within a gcc @code{asm} block, @code{:} is recognised as an argument +separator, but of course only between operand specifications, not in the +expressions for the operands. + +@workswith @code{arglist-cont}, @code{arglist-cont-nonempty}. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-arglist +@findex lineup-arglist (c-) +Line up the current argument line under the first argument. + +As a special case, if an argument on the same line as the open +parenthesis starts with a brace block opener, the indentation is +@code{c-basic-offset} only. This is intended as a ``DWIM'' measure in +cases like macros that contains statement blocks, e.g: + @example @group +A_VERY_LONG_MACRO_NAME (@{ + some (code, with + long, lines * in[it]); + @}); +@sssTBasicOffset{} +@end group +@end example -Foo::Foo (int a, int b) - : Cyphr (a) - , Bar (b) // c-lineup-multi-inher +This is motivated partly because it's more in line with how code +blocks are handled, and partly since it approximates the behavior of +earlier CC Mode versions, which due to inaccurate analysis tended to +indent such cases this way. + +@workswith @code{arglist-cont-nonempty}, @code{arglist-close}. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-arglist-intro-after-paren +@findex lineup-arglist-intro-after-paren (c-) +Line up a line to just after the open paren of the surrounding paren or +brace block. + +@workswith @code{defun-block-intro}, @code{brace-list-intro}, +@code{statement-block-intro}, @code{statement-case-intro}, +@code{arglist-intro}. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-arglist-close-under-paren +@findex lineup-arglist-close-under-paren (c-) +Set your @code{arglist-close} syntactic symbol to this line-up function +so that parentheses that close argument lists will line up under the +parenthesis that opened the argument list. It can also be used with +@code{arglist-cont} and @code{arglist-cont-nonempty} to line up all +lines inside a parenthesis under the open paren. + +As a special case, if a brace block is opened at the same line as the +open parenthesis of the argument list, the indentation is +@code{c-basic-offset} only. See @code{c-lineup-arglist} for further +discussion of this ``DWIM'' measure. + +@workswith Almost all symbols, but are typically most useful on +@code{arglist-close}, @code{brace-list-close}, @code{arglist-cont} and +@code{arglist-cont-nonempty}. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-arglist-operators +@findex lineup-arglist-operators (c-) +Line up lines starting with an infix operator under the open paren. +Return @code{nil} on lines that don't start with an operator, to leave +those cases to other lineup functions. Example: +@example +@group +if ( x < 10 + || at_limit (x, @hereFn{c-lineup-arglist-operators} + list) @hereFn{c-lineup-arglist-operators@r{ returns nil}} + ) @end group @end example -@workswith @code{inher-cont}, @code{member-init-cont}. +Since this function doesn't do anything for lines without an infix +operator you typically want to use it together with some other lineup +settings, e.g. as follows (the @code{arglist-close} setting is just a +suggestion to get a consistent style): -@findex c-lineup-java-inher -@findex lineup-java-inher (c-) -@item c-lineup-java-inher -Line up Java implements and extends declarations. If class names -follows on the same line as the @samp{implements}/@samp{extends} -keyword, they are lined up under each other. Otherwise, they are -indented by adding @code{c-basic-offset} to the column of the keyword. -E.g: @example -@group +(c-set-offset 'arglist-cont + '(c-lineup-arglist-operators 0)) +(c-set-offset 'arglist-cont-nonempty + '(c-lineup-arglist-operators c-lineup-arglist)) +(c-set-offset 'arglist-close + '(c-lineup-arglist-close-under-paren)) +@end example -class Foo - extends - Bar // c-lineup-java-inher +@workswith @code{arglist-cont}, @code{arglist-cont-nonempty}. +@end defun + +@comment ------------------------------------------------------------ - <--> c-basic-offset +@defun c-lineup-C-comments +@findex lineup-C-comments (c-) +Line up C block comment continuation lines. Various heuristics are used +to handle most of the common comment styles. Some examples: +@example +@group +/* /** /* + * text * text text + */ */ */ @end group @end example -@noindent -and + @example @group +/* text /* /** + text ** text ** text +*/ */ */ +@end group +@end example -class Foo - extends Cyphr, - Bar // c-lineup-java-inher +@example +@group +/************************************************** + * text + *************************************************/ +@end group +@end example +@vindex comment-start-skip +@example +@group +/************************************************** + Free form text comments: + In comments with a long delimiter line at the + start, the indentation is kept unchanged for lines + that start with an empty comment line prefix. The + delimiter line is whatever matches the + @code{comment-start-skip} regexp. +**************************************************/ @end group @end example -@workswith @code{inher-cont}. +The style variable @code{c-comment-prefix-regexp} is used to recognize +the comment line prefix, e.g. the @samp{*} that usually starts every +line inside a comment. + +@workswith The @code{c} syntactic symbol. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-cascaded-calls +@findex lineup-cascaded-calls (c-) +Line up ``cascaded calls'' under each other. If the line begins with +@code{->} or @code{.} and the preceding line ends with one or more +function calls preceded by the same token, then the arrow is lined up +with the first of those tokens. E.g: -@findex c-lineup-java-throws -@findex lineup-java-throws (c-) -@item c-lineup-java-throws -Line up Java throws declarations. If exception names follows on the -same line as the throws keyword, they are lined up under each other. -Otherwise, they are indented by adding @code{c-basic-offset} to the -column of the @samp{throws} keyword. The @samp{throws} keyword itself -is also indented by @code{c-basic-offset} from the function declaration -start if it doesn't hang. E.g: @example @group +r = proc->add(17)->add(18) + ->add(19) + @hereFn{c-lineup-cascaded-calls} + offset; @hereFn{c-lineup-cascaded-calls@r{ (inactive)}} +@end group +@end example -int foo() - throws // c-lineup-java-throws - Bar // c-lineup-java-throws +In any other situation @code{nil} is returned to allow use in list +expressions. + +@workswith @code{topmost-intro-cont}, @code{statement-cont}, +@code{arglist-cont}, @code{arglist-cont-nonempty}. +@end defun -<--><--> c-basic-offset +@comment ------------------------------------------------------------ + +@defun c-lineup-close-paren +@findex lineup-close-paren (c-) +Line up the closing paren under its corresponding open paren if the +open paren is followed by code. If the open paren ends its line, no +indentation is added. E.g: +@example +@group +main (int, + char ** + ) @hereFn{c-lineup-close-paren} @end group @end example + @noindent and + @example @group +main ( + int, char ** +) @hereFn{c-lineup-close-paren} +@end group +@end example -int foo() throws Cyphr, - Bar, // c-lineup-java-throws - Vlod // c-lineup-java-throws +As a special case, if a brace block is opened at the same line as the +open parenthesis of the argument list, the indentation is +@code{c-basic-offset} instead of the open paren column. See +@code{c-lineup-arglist} for further discussion of this ``DWIM'' measure. + +@workswith All @code{*-close} symbols. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-comment +@findex lineup-comment (c-) +Line up a comment-only line according to the style variable +@code{c-comment-only-line-offset}. If the comment is lined up with a +comment starter on the previous line, that alignment is preserved. + +@defopt c-comment-only-line-offset +@vindex comment-only-line-offset (c-) +This style variable specifies the extra offset for the line. It can +contain an integer or a cons cell of the form + +@example +(@r{@var{non-anchored-offset}} . @r{@var{anchored-offset}}) +@end example + +@noindent +where @var{non-anchored-offset} is the amount of offset given to +non-column-zero anchored lines, and @var{anchored-offset} is the amount +of offset to give column-zero anchored lines. Just an integer as value +is equivalent to @code{(@r{@var{value}} . -1000)}. +@end defopt +@workswith @code{comment-intro}. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-cpp-define +@findex lineup-cpp-define (c-) +Line up macro continuation lines according to the indentation of the +construct preceding the macro. E.g: + +@example +@group +const char msg[] = @hereFn{@r{The beginning of the preceding construct.}} + \"Some text.\"; + +#define X(A, B) \ +do @{ \ @hereFn{c-lineup-cpp-define} + printf (A, B); \ +@} while (0) @end group @end example -@workswith @code{func-decl-cont}. +@noindent +and: -@findex c-indent-one-line-block -@findex indent-one-line-block (c-) -@item c-indent-one-line-block -Indent a one line block @code{c-basic-offset} extra. E.g: @example @group +int dribble() @{ + if (!running) @hereFn{@r{The beginning of the preceding construct.}} + error(\"Not running!\"); + +#define X(A, B) \ + do @{ \ @hereFn{c-lineup-cpp-define} + printf (A, B); \ + @} while (0) +@end group +@end example -if (n > 0) - @{m+=n; n=0;@} // c-indent-one-line-block +If @code{c-syntactic-indentation-in-macros} is non-@code{nil}, the +function returns the relative indentation to the macro start line to +allow accumulation with other offsets. E.g. in the following cases, +@code{cpp-define-intro} is combined with the +@code{statement-block-intro} that comes from the @samp{do @{} that hangs +on the @samp{#define} line: -<--> c-basic-offset +@example +@group +const char msg[] = + \"Some text.\"; +#define X(A, B) do @{ \ + printf (A, B); \ @hereFn{c-lineup-cpp-define} + this->refs++; \ +@} while (0) @hereFn{c-lineup-cpp-define} @end group @end example + @noindent -and +and: + @example @group +int dribble() @{ + if (!running) + error(\"Not running!\"); + +#define X(A, B) do @{ \ + printf (A, B); \ @hereFn{c-lineup-cpp-define} + this->refs++; \ + @} while (0) @hereFn{c-lineup-cpp-define} +@end group +@end example -if (n > 0) -@{ // c-indent-one-line-block - m+=n; n=0; -@} +The relative indentation returned by @code{c-lineup-cpp-define} is zero +and two, respectively, on the two lines in each of these examples. They +are then added to the two column indentation that +@code{statement-block-intro} gives in both cases here. + +If the relative indentation is zero, then @code{nil} is returned +instead. That is useful in a list expression to specify the default +indentation on the top level. + +If @code{c-syntactic-indentation-in-macros} is @code{nil} then this +function keeps the current indentation, except for empty lines (ignoring +the ending backslash) where it takes the indentation from the closest +preceding nonempty line in the macro. If there's no such line in the +macro then the indentation is taken from the construct preceding it, as +described above. + +@workswith @code{cpp-define-intro}. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-dont-change +@findex lineup-dont-change (c-) +This lineup function makes the line stay at whatever indentation it +already has; think of it as an identity function for lineups. + +@workswith Any syntactic symbol. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-gcc-asm-reg +@findex lineup-gcc-asm-reg (c-) +Line up a gcc asm register under one on a previous line. +@example +@group + asm ("foo %1, %0\n" + "bar %0, %1" + : "=r" (w), + "=r" (x) + : "0" (y), + "1" (z)); @end group @end example -The block may be surrounded by any kind of parenthesis characters. -@code{nil} is returned if the line doesn't start with a one line block, -which makes the function usable in list expressions. +The @samp{x} line is aligned to the text after the @samp{:} on the +@samp{w} line, and similarly @samp{z} under @samp{y}. -@workswith Almost all syntactic symbols, but most useful on the -@code{-open} symbols. +This is done only in an @samp{asm} or @samp{__asm__} block, and only to +those lines mentioned. Anywhere else @code{nil} is returned. The usual +arrangement is to have this routine as an extra feature at the start of +arglist lineups, e.g. -@findex c-indent-multi-line-block -@findex indent-multi-line-block (c-) -@item c-indent-multi-line-block -Indent a multi line block @code{c-basic-offset} extra. E.g: @example -@group +(c-lineup-gcc-asm-reg c-lineup-arglist) +@end example -int *foo[] = @{ - NULL, - @{17@}, // c-indent-multi-line-block +@workswith @code{arglist-cont}, @code{arglist-cont-nonempty}. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-inexpr-block +@findex lineup-inexpr-block (c-) +This can be used with the in-expression block symbols to indent the +whole block to the column where the construct is started. E.g. for Java +anonymous classes, this lines up the class under the @samp{new} keyword, +and in Pike it lines up the lambda function body under the @samp{lambda} +keyword. Returns @code{nil} if the block isn't part of such a +construct. + +@workswith @code{inlambda}, @code{inexpr-statement}, +@code{inexpr-class}. +@end defun + +@comment ------------------------------------------------------------ +@defun c-lineup-java-inher +@findex lineup-java-inher (c-) +Line up Java implements and extends declarations. If class names +follow on the same line as the @samp{implements}/@samp{extends} +keyword, they are lined up under each other. Otherwise, they are +indented by adding @code{c-basic-offset} to the column of the keyword. +E.g: + +@example +@group +class Foo + extends + Bar @hereFn{c-lineup-java-inher} + @sssTBasicOffset{} @end group @end example + @noindent and + @example @group +class Foo + extends Cyphr, + Bar @hereFn{c-lineup-java-inher} +@end group +@end example -int *foo[] = @{ - NULL, - @{ // c-indent-multi-line-block - 17 - @}, +@workswith @code{inher-cont}. +@end defun - <--> c-basic-offset +@comment ------------------------------------------------------------ +@defun c-lineup-java-throws +@findex lineup-java-throws (c-) +Line up Java throws declarations. If exception names follow on the +same line as the throws keyword, they are lined up under each other. +Otherwise, they are indented by adding @code{c-basic-offset} to the +column of the @samp{throws} keyword. The @samp{throws} keyword itself +is also indented by @code{c-basic-offset} from the function declaration +start if it doesn't hang. E.g: + +@example +@group +int foo() + throws @hereFn{c-lineup-java-throws} + Bar @hereFn{c-lineup-java-throws} +@sssTsssTBasicOffset{} @end group @end example -The block may be surrounded by any kind of parenthesis characters. -@code{nil} is returned if the line doesn't start with a multi line -block, which makes the function usable in list expressions. - -@workswith Almost all syntactic symbols, but most useful on the -@code{-open} symbols. +@noindent +and -@findex c-lineup-C-comments -@findex lineup-C-comments (c-) -@item c-lineup-C-comments -Line up C block comment continuation lines. Various heuristics are used -to handle most of the common comment styles. Some examples: @example - @group -/* /** /* - * text * text text - */ */ */ +int foo() throws Cyphr, + Bar, @hereFn{c-lineup-java-throws} + Vlod @hereFn{c-lineup-java-throws} @end group +@end example + +@workswith @code{func-decl-cont}. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-knr-region-comment +@findex lineup-knr-region-comment (c-) +Line up a comment in the ``K&R region'' with the declaration. That is +the region between the function or class header and the beginning of the +block. E.g: +@example @group -/* text /* /** - text ** text ** text -*/ */ */ +int main() +/* Called at startup. */ @hereFn{c-lineup-knr-region-comment} +@{ + return 0; +@} @end group +@end example + +Return @code{nil} if called in any other situation, to be useful in list +expressions. +@workswith @code{comment-intro}. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-math +@findex lineup-math (c-) +Line up the current line to after the equal sign on the first line in the +statement. If there isn't any, indent with @code{c-basic-offset}. If +the current line contains an equal sign too, try to align it with the +first one. + +@workswith @code{topmost-intro-cont}, @code{statement-cont}, +@code{arglist-cont}, @code{arglist-cont-nonempty}. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-multi-inher +@findex lineup-multi-inher (c-) +Line up the classes in C++ multiple inheritance clauses and member +initializers under each other. E.g: + +@example @group -/************************************************** - * text - *************************************************/ +Foo::Foo (int a, int b): + Cyphr (a), + Bar (b) @hereFn{c-lineup-multi-inher} @end group +@end example -@vindex comment-start-skip +@noindent +and + +@example @group -/************************************************** - Free form text comments: - In comments with a long delimiter line at the - start, the indentation is kept unchanged for lines - that start with an empty comment line prefix. The - delimiter line is whatever matches the - @code{comment-start-skip} regexp. -**************************************************/ +class Foo + : public Cyphr, + public Bar @hereFn{c-lineup-multi-inher} @end group +@end example + +@noindent +and +@example +@group +Foo::Foo (int a, int b) + : Cyphr (a) + , Bar (b) @hereFn{c-lineup-multi-inher} +@end group @end example -The style variable @code{c-comment-prefix-regexp} is used to recognize -the comment line prefix, e.g. the @samp{*} that usually starts every -line inside a comment. +@workswith @code{inher-cont}, @code{member-init-cont}. +@end defun -@workswith The @code{c} syntactic symbol. +@comment ------------------------------------------------------------ -@findex c-lineup-comment -@findex lineup-comment (c-) -@item c-lineup-comment -Line up a comment-only line according to the style variable -@code{c-comment-only-line-offset}. If the comment is lined up with a -comment starter on the previous line, that alignment is preserved. +@defun c-lineup-ObjC-method-call +@findex lineup-ObjC-method-call (c-) +For Objective-C code, line up selector args as Emacs Lisp mode does +with function args: go to the position right after the message receiver, +and if you are at the end of the line, indent the current line +c-basic-offset columns from the opening bracket; otherwise you are +looking at the first character of the first method call argument, so +lineup the current line with it. -@vindex c-comment-only-line-offset -@vindex comment-only-line-offset (c-) -@code{c-comment-only-line-offset} specifies the extra offset for the -line. It can contain an integer or a cons cell of the form -@example +@workswith @code{objc-method-call-cont}. +@end defun - (@r{} . @r{}) +@comment ------------------------------------------------------------ -@end example +@defun c-lineup-ObjC-method-args +@findex lineup-ObjC-method-args (c-) +For Objective-C code, line up the colons that separate args. The colon +on the current line is aligned with the one on the first line. -@noindent -where @var{non-anchored-offset} is the amount of offset given to -non-column-zero anchored lines, and @var{anchored-offset} is the amount -of offset to give column-zero anchored lines. Just an integer as value -is equivalent to @code{(@r{} . -1000)}. +@workswith @code{objc-method-args-cont}. +@end defun -@workswith @code{comment-intro}. +@comment ------------------------------------------------------------ + +@defun c-lineup-ObjC-method-args-2 +@findex lineup-ObjC-method-args-2 (c-) +Similar to @code{c-lineup-ObjC-method-args} but lines up the colon on +the current line with the colon on the previous line. + +@workswith @code{objc-method-args-cont}. +@end defun -@findex c-lineup-runin-statements +@comment ------------------------------------------------------------ + +@defun c-lineup-runin-statements @findex lineup-runin-statements (c-) -@item c-lineup-runin-statements Line up statements for coding standards which place the first statement in a block on the same line as the block opening brace@footnote{Run-in style doesn't really work too well. You might need to write your own custom indentation functions to better support this style.}. E.g: + @example @group - int main() -@{ puts (\"Hello world!\"); - return 0; // c-lineup-runin-statements +@{ puts ("Hello!"); + return 0; @hereFn{c-lineup-runin-statements} @} - @end group @end example @@ -4075,20 +4822,43 @@ If there is no statement after the opening brace to align with, expressions. @workswith The @code{statement} syntactic symbol. +@end defun -@findex c-lineup-math -@findex lineup-math (c-) -@item c-lineup-math -Line up the current line after the equal sign on the first line in the -statement. If there isn't any, indent with @code{c-basic-offset}. If -the current line contains an equal sign too, try to align it with the -first one. +@comment ------------------------------------------------------------ -@workswith @code{statement-cont}. +@defun c-lineup-streamop +@findex lineup-streamop (c-) +Line up C++ stream operators (i.e. @samp{<<} and @samp{>>}). + +@workswith @code{stream-op}. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-string-cont +@findex lineup-string-cont (c-) +Line up a continued string under the one it continues. A continued +string in this sense is where a string literal follows directly after +another one. E.g: + +@example +@group +result = prefix + "A message " + "string."; @hereFn{c-lineup-string-cont} +@end group +@end example + +@code{nil} is returned in other situations, to allow stacking with other +lineup functions. -@findex c-lineup-template-args +@workswith @code{topmost-intro-cont}, @code{statement-cont}, +@code{arglist-cont}, @code{arglist-cont-nonempty}. +@end defun + +@comment ------------------------------------------------------------ + +@defun c-lineup-template-args @findex lineup-template-args (c-) -@item c-lineup-template-args Line up the arguments of a template argument list under each other, but only in the case where the first argument is on the same line as the opening @samp{<}. @@ -4097,74 +4867,86 @@ To allow this function to be used in a list expression, @code{nil} is returned if there's no template argument on the first line. @workswith @code{template-args-cont}. +@end defun -@findex c-lineup-ObjC-method-call -@findex lineup-ObjC-method-call (c-) -@item c-lineup-ObjC-method-call -For Objective-C code, line up selector args as @code{elisp-mode} does -with function args: go to the position right after the message receiver, -and if you are at the end of the line, indent the current line -c-basic-offset columns from the opening bracket; otherwise you are -looking at the first character of the first method call argument, so -lineup the current line with it. +@comment ------------------------------------------------------------ -@workswith @code{objc-method-call-cont}. +@defun c-lineup-topmost-intro-cont +@findex lineup-topmost-intro-cont (c-) +Line up declaration continuation lines zero or one indentation +step@footnote{This function is mainly provided to mimic the behavior of +CC Mode 5.28 and earlier where this case wasn't handled consistently so +that those lines could be analyzed as either topmost-intro-cont or +statement-cont. It's used for @code{topmost-intro-cont} by default, but +you might consider using @code{+} instead.}. For lines preceding a +definition, zero is used. For other lines, @code{c-basic-offset} is +added to the indentation. E.g: -@findex c-lineup-ObjC-method-args -@findex lineup-ObjC-method-args (c-) -@item c-lineup-ObjC-method-args -For Objective-C code, line up the colons that separate args. The colon -on the current line is aligned with the one on the first line. +@example +@group +int +neg (int i) @hereFn{c-lineup-topmost-intro-cont} +@{ + return -i; +@} +@end group +@end example -@workswith @code{objc-method-args-cont}. +@noindent +and -@findex c-lineup-ObjC-method-args-2 -@findex lineup-ObjC-method-args-2 (c-) -@item c-lineup-ObjC-method-args-2 -Similar to @code{c-lineup-ObjC-method-args} but lines up the colon on -the current line with the colon on the previous line. +@example +@group +struct +larch @hereFn{c-lineup-topmost-intro-cont} +@{ + double height; +@} + the_larch, @hereFn{c-lineup-topmost-intro-cont} + another_larch; @hereFn{c-lineup-topmost-intro-cont} +@sssTBasicOffset{} +@end group +@end example -@workswith @code{objc-method-args-cont}. +@noindent +and -@findex c-lineup-inexpr-block -@findex lineup-inexpr-block (c-) -@item c-lineup-inexpr-block -This can be used with the in-expression block symbols to indent the -whole block to the column where the construct is started. E.g. for Java -anonymous classes, this lines up the class under the @samp{new} keyword, -and in Pike it lines up the lambda function body under the @samp{lambda} -keyword. Returns @code{nil} if the block isn't part of such a -construct. +@example +@group +struct larch +the_larch, @hereFn{c-lineup-topmost-intro-cont} + another_larch; @hereFn{c-lineup-topmost-intro-cont} +@end group +@end example -@workswith @code{inlambda}, @code{inexpr-statement}, -@code{inexpr-class}. +@workswith @code{topmost-intro-cont}. +@end defun -@findex c-lineup-whitesmith-in-block +@comment ------------------------------------------------------------ + +@defun c-lineup-whitesmith-in-block @findex lineup-whitesmith-in-block (c-) -@item c-lineup-whitesmith-in-block -Line up lines inside a block in Whitesmiths style. It's done in a way +Line up lines inside a block in Whitesmith style. It's done in a way that works both when the opening brace hangs and when it doesn't. E.g: + @example @group - something @{ - foo; // c-lineup-whitesmith-in-block + foo; @hereFn{c-lineup-whitesmith-in-block} @} - @end group @end example + @noindent and + @example @group - something @{ - foo; // c-lineup-whitesmith-in-block + foo; @hereFn{c-lineup-whitesmith-in-block} @} - -<--> c-basic-offset - +@sssTBasicOffset{} @end group @end example @@ -4173,43 +4955,339 @@ In the first case the indentation is kept unchanged, in the second @workswith @code{defun-close}, @code{defun-block-intro}, @code{block-close}, @code{brace-list-close}, @code{brace-list-intro}, -@code{statement-block-intro}, @code{inclass}, @code{inextern-lang}, -@code{innamespace}. +@code{statement-block-intro} and all @code{in*} symbols, +e.g. @code{inclass} and @code{inextern-lang}. +@end defun -@findex c-lineup-dont-change -@findex lineup-dont-change (c-) -@item c-lineup-dont-change -This lineup function makes the line stay at whatever indentation it -already has; think of it as an identity function for lineups. It is -used for @code{cpp-macro-cont} lines. -@workswith Any syntactic symbol. +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node AWK Mode, Odds and Ends, Indentation Functions, Top +@comment node-name, next, previous, up +@chapter Status of AWK Mode +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +@dfn{AWK mode} existed until recently in the file @file{awk-mode.el} +as a mode derived from c-mode. It had not been actively maintained to +keep pace with the newer @ccmode{}, and its indentation mechanism no +longer worked satisfactorally. + +The current AWK mode is based around the GNU implementation, +@emph{GAWK version 3.1.0}, though it should work pretty well with any +AWK. It has now been updated and integrated into @ccmode{} to a +substantial extent, though as yet not all the features of @ccmode{} +have been adapted to support it. + +If your (X)Emacs is set up to use the old file @file{awk-mode.elc} +(which will usually be the case if you have obtained this @ccmode{} +independently of (X)Emacs itself), or if you are not sure, insert the +following form into your @file{.emacs} or @file{init.el} so that the new +AWK mode will be used instead: + +@example +(autoload 'awk-mode "cc-mode" nil t) +@end example + +You can check which AWK mode you are running by displaying the mode +documentation string with @kbd{C-h m} from an AWK buffer. The newer +mode's doc string contains @code{To submit a problem report, enter +`C-c C-b'} near the top of the doc string where the older mode has +@code{This is much like C mode except ....}. + +Since this newer AWK mode makes essential use of a relatively new +Emacs Lisp feature@footnote{Specifically, the @code{syntax-table} text +property.}, you need either GNU Emacs 20.1 (or later) or XEmacs 21.4 +(or later) to use it. If your Emacs version is earlier than one of +these, the older @file{awk-mode.el} will get loaded and run in place +of the AWK mode described here, even when you have put the above +@code{autoload} form into your @file{.emacs} or @file{init.el}. +Upgrading your (X)Emacs is strongly recommended if this is the case. +Here is an overview of which @ccmode{} features currently work with +AWK mode and which don't: + +@table @asis +@item Indentation Engine +The @ccmode{} indentation engine fully supports AWK mode. +@xref{Indentation Engine}. + +AWK mode handles code formatted in the conventional AWK fashion: +@samp{@{}s which start actions, user-defined functions, or compound +statements are placed on the same line as the associated construct; the +matching @samp{@}}s are normally placed under the start of the +respective pattern, function definition, or structured statement. +@c Add in a bit about the @samp{@}} being on the same line when the +@c contents are short. + +The predefined indentation functions (@pxref{Indentation Functions}) +haven't yet been adapted for AWK mode, though some of them may work +serendipitously. There shouldn't be any problems writing custom +indentation functions for AWK mode. + +The command @kbd{C-c C-q} (@code{c-indent-defun}) hasn't yet been +adapted for AWK, though in practice it works properly nearly all the +time. Should it fail, explicitly set the region around the function +(using @kbd{C-u C-SPC}: @kbd{C-M-h} probably won't work either) then do +@kbd{C-M-\} (@code{indent-region}). + +@item Font Locking +There is a single level of font locking in AWK mode, rather than the +three distinct levels the other modes have. There are several +idiosyncrasies in AWK mode's font-locking due to the peculiarities of +the AWK language itself. @xref{AWK Mode Font Locking}. + +@item Comment Commands +@kbd{M-;} (@code{indent-for-comment}) works fine. None of the other +@ccmode{} comment formatting commands have yet been adapted for AWK +mode. @xref{Text Filling and Line Breaking}. + +@item Movement Commands +Most of the movement commands work in AWK mode. The most important +exceptions are @kbd{M-a} (@code{c-beginning-of-statement}) and +@kbd{M-e} (@code{c-end-of-statement}) which haven't yet been adapted. + +The notion of @dfn{defun} has been augmented to include pattern-action +pairs. See @ref{AWK Mode Defuns} for a description of commands which +work on AWK ``defuns''. + +Since there is no preprocessor in AWK, the commands which move to +preprocessor directives (e.g. @code{c-up-conditional}) are meaningless +in AWK mode and are not bound in the AWK mode keymap. + +@item Auto-newline Insertion and Clean-ups +Auto-newline insertion hasn't yet been adapted for AWK. Some of the +clean-ups can actually convert good AWK code into syntactically +invalid code. + +If auto-newline or its associated clean-ups are enabled generally for +the modes in @ccmode{}, you are strongly recommended to disable them +in the AWK Mode hook. @xref{Initialising AWK Mode}. + +The clean-up @code{space-before-funcall}, which is independent of +auto-newline, should never be active in AWK mode (since inserting a +space between a user function's name and its opening @samp{(} makes +the call syntactically invalid). If necessary, this should be +disabled in the AWK Mode hook. @xref{Initialising AWK Mode}. + +@end table + +@menu +* Initialising AWK Mode:: +* AWK Mode Font Locking:: +* AWK Mode Defuns:: +@end menu + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Initialising AWK Mode, AWK Mode Font Locking, , AWK Mode +@comment node-name, next, previous, up +@section AWK mode - What to put in your @file{.emacs} or @file{init.el} +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +Much of the AWK mode initialization can, of course, be done by the +@ccmode{} general initialization procedure. You may want to use certain +@ccmode{} features such as @code{auto-newline} and @code{clean-ups} in +the other modes, and you might thus have enabled them in a +@code{c-mode-common-hook} function, as described in @ref{Sample .emacs File}. +These features have not yet been amended for AWK mode, and far from +being useful, can be irritating in AWK mode or actually make AWK code +syntactically invalid. Adding the following code to your +@file{.emacs} or @file{init.el} file will disable them for AWK mode. + +@example +(defun my-awk-mode-hook () + "Disable certain @ccmode{} features which could impair AWK mode." + (c-toggle-auto-state -1) ; disable automatic insertions of newlines + (if (memq 'space-before-funcall c-cleanup-list) + (setq c-cleanup-list ; don't automatically insert a space into "foo(" + (remove 'space-before-funcall c-cleanup-list)))) +(add-hook 'awk-mode-hook 'my-awk-mode-hook) +@end example + +Naturally you can add your own AWK-specific customizations to this +function. @xref{Hooks}. + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node AWK Mode Font Locking, AWK Mode Defuns, Initialising AWK Mode, AWK Mode +@comment node-name, next, previous, up +@section AWK Mode Font Locking +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +The general appearance of font-locking in AWK mode is much like in any +other programming mode. @xref{Faces For Font Lock,,,elisp}. + +The following faces are, however, used in a non-standard fashion in +AWK mode: + +@table @asis +@item @code{font-lock-variable-name-face} +This face was intended for variable declarations. Since variables are +not declared in AWK, this face is used instead for AWK system +variables (such as @code{NF}) and ``Special File Names'' (such as +@code{"/dev/stderr"}). + +@item @code{font-lock-builtin-face} (Emacs)/@code{font-lock-preprocessor-face} (XEmacs) +This face is normally used for preprocessor directives in @ccmode{}. +There are no such things in AWK, so this face is used instead for +standard functions (such as @code{match}). + +@item @code{font-lock-string-face} +As well as being used for strings, including localizable strings, +(delimited by @samp{"} and @samp{_"}), this face is also used for AWK +regular expressions (delimited by @samp{/}). + +@item @code{font-lock-warning-face} (Emacs)/@code{c-invalid-face} (XEmacs) +This face highlights the following syntactically invalid AWK +constructs: + +@itemize @bullet +@item +An unterminated string or regular expression. Here the opening +delimiter (@samp{"} or @samp{/} or @samp{_"}) is displayed in +@code{font-lock-warning-face}. This is most noticeable when typing in a +new string/regular expression into a buffer, when the warning-face +serves as a continual reminder to terminate the construct. + +AWK mode fontifies unterminated strings/regular expressions +differently from other modes: Only the text up to the end of the line +is fontified as a string (escaped newlines being handled correctly), +rather than the text up to the next string quote. + +@item +A space between the function name and opening parenthesis when calling +a user function. The last character of the function name and the +opening parenthesis are highlighted. This font-locking rule will +spuriously highlight a valid concatenation expression where an +identifier precedes a parenthesised expression. Unfortunately. + +@item +Whitespace following the @samp{\} in what otherwise looks like an +escaped newline. The @samp{\} is highlighted. +@end itemize +@end table + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node AWK Mode Defuns, , AWK Mode Font Locking, AWK Mode +@comment node-name, next, previous, up +@section AWK Mode Defuns +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +In AWK mode, @dfn{defun} means either a user-defined function or a +pattern-action pair. Either the pattern or the action may be +implicit. + +The beginning of a defun is recognised heuristically as, more or less, +code which begins in column zero. Having the @samp{@{} in column zero, +as is suggested for some modes, is neither necessary nor helpful in AWK +mode. + +More precisely, the beginning of a defun is code which begins in +column zero, and which isn't a closing brace, a comment, or a +continuation of the previous line. Code is the @dfn{continuation of +the previous line} when that line is syntactically incomplete, for +example when it ends with @samp{@{} or an escaped newline. + +The end of a defun is the @samp{@}} which matches the @samp{@{} (if +any) at the beginning of the action or function body, or the EOL or +@samp{;} which marks an implicit action. Although this @samp{@}} is +usually placed in column zero, AWK mode doesn't need it to be placed +there. + +@table @asis +@item @kbd{C-M-a} @code{c-awk-beginning-of-defun} +@itemx @kbd{C-M-e} @code{c-awk-end-of-defun} +@findex c-awk-beginning-of-defun +@findex awk-beginning-of-defun (c-) +@findex c-awk-end-of-defun +@findex awk-end-of-defun (c-) +Move point back to the beginning or forward to the end of the current +AWK defun. These functions can take prefix-arguments, their +functionality being entirely equivalent to @code{beginning-of-defun} +and @code{end-of-defun}. @xref{Moving by Defuns,,,emacs}. + +@item @kbd{C-M-h} @code{c-mark-function} +This works fine with AWK defuns. @xref{Indentation Commands}. @end table @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Performance Issues, Limitations and Known Bugs, Indentation Functions, Top +@node Odds and Ends, Performance Issues, AWK Mode, Top +@comment node-name, next, previous, up +@chapter Odds and Ends +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +The stuff that didn't fit in anywhere else is documented here. + +@defopt c-require-final-newline +@vindex require-final-newline (c-) +Controls whether a final newline is ensured when the file is saved. The +value is an association list that for each language mode specifies the +value to give to @code{require-final-newline} at mode initialization; +see that variable for details about the value. If a language isn't +present on the association list, CC Mode won't set +@code{require-final-newline} in buffers for that language. + +The default is to set @code{require-final-newline} to @code{t} in the +languages that mandates that source files should end with newlines, +i.e. C, C++ and Objective-C. +@end defopt + +@defopt c-echo-syntactic-information-p +@vindex echo-syntactic-information-p (c-) +If non-@code{nil}, the syntactic analysis for the current line is shown +in the echo area when it's indented (unless +@code{c-syntactic-indentation} is @code{nil}). That's useful when +finding out which syntactic symbols to modify to get the indentation you +want. +@end defopt + +@defopt c-report-syntactic-errors +@vindex report-syntactic-errors (c-) +If non-@code{nil}, certain syntactic errors are reported with a ding and +a message, for example when an @code{else} is indented for which there +is no corresponding @code{if}. + +Note however that @ccmode{} doesn't make any special effort to check for +syntactic errors; that's the job of the compiler. The reason it can +report cases like the one above is that it can't find the correct +anchoring position to indent the line in that case. +@end defopt + + +@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@node Performance Issues, Limitations and Known Bugs, Odds and Ends, Top @comment node-name, next, previous, up -@chapter Performance Issues -@cindex performance issues +@chapter Performance Issues +@cindex performance @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@comment FIXME: (ACM, 2003/5/24). Check whether AWK needs mentioning here. + C and its derivative languages are highly complex creatures. Often, -ambiguous code situations arise that require @ccmode{} to scan -large portions of the buffer to determine syntactic context. Such -pathological code@footnote{such as the output of @code{lex(1)}!} -can cause @ccmode{} to perform fairly badly. -This section identifies some of the coding styles to watch out for, and -suggests some workarounds that you can use to improve performance. +ambiguous code situations arise that require @ccmode{} to scan large +portions of the buffer to determine syntactic context. Such +pathological code can cause @ccmode{} to perform fairly badly. This +section gives some insight in how @ccmode{} operates, how that interacts +with some coding styles, and what you can use to improve performance. + +The overall goal is that @ccmode{} shouldn't be overly slow (i.e. take +more than a fraction of a second) in any interactive operation. +I.e. it's tuned to limit the maximum response time in single operations, +which sometimes is at the expense of batch-like operations like +reindenting whole blocks. If you find that @ccmode{} gradually gets +slower and slower in certain situations, perhaps as the file grows in +size or as the macro or comment you're editing gets bigger, then chances +are that something isn't working right. You should consider reporting +it, unless it's something that's mentioned in this section. Because @ccmode{} has to scan the buffer backwards from the current insertion point, and because C's syntax is fairly difficult to parse in the backwards direction, @ccmode{} often tries to find the nearest -position higher up in the buffer from which to begin a forward scan. -The farther this position is from the current insertion point, the -slower the mode gets. Some coding styles can even force @ccmode{} -to scan from the beginning of the buffer for every line of code! +position higher up in the buffer from which to begin a forward scan +(it's typically an opening or closing parethesis of some kind). The +farther this position is from the current insertion point, the slower it +gets. @findex beginning-of-defun @findex defun-prompt-regexp @@ -4218,111 +5296,112 @@ any brace that opens a top-level construct@footnote{E.g. a function in C, or outermost class definition in C++ or Java.} always appears in the leftmost column. This is actually an Emacs constraint, as embodied in the @code{beginning-of-defun} function which @ccmode{} uses heavily. If -you insist on hanging top-level open braces on the right side of the -line, then you might want to set the variable @code{defun-prompt-regexp} -to something reasonable, however that ``something reasonable'' is -difficult to define, so @ccmode{} doesn't do it for you. +you hang top-level open braces on the right side of the line, then you +might want to set the variable @code{defun-prompt-regexp} to something +reasonable, however that ``something reasonable'' is difficult to +define, so @ccmode{} doesn't do it for you. @vindex c-Java-defun-prompt-regexp @vindex Java-defun-prompt-regexp (c-) -A special note about @code{defun-prompt-regexp} in Java mode: while much -of the early sample Java code seems to encourage a style where the brace -that opens a class is hung on the right side of the line, this is not a -good style to pursue in Emacs. @ccmode{} comes with a variable +A special note about @code{defun-prompt-regexp} in Java mode: The common +style is to hang the opening braces of functions and classes on the +right side of the line, and that doesn't work well with the Emacs +approach. @ccmode{} comes with a variable @code{c-Java-defun-prompt-regexp} which tries to define a regular expression usable for this style, but there are problems with it. In some cases it can cause @code{beginning-of-defun} to hang@footnote{This has been observed in Emacs 19.34 and XEmacs 19.15.}. For this reason, it is not used by default, but if you feel adventurous, you can set @code{defun-prompt-regexp} to it in your mode hook. In any event, -setting and rely on @code{defun-prompt-regexp} will definitely slow -things down anyway because you'll be doing regular expression searches -for every line you indent, so you're probably screwed either way! +setting and relying on @code{defun-prompt-regexp} will definitely slow +things down because (X)Emacs will be doing regular expression searches a +lot, so you'll probably be taking a hit either way! + +@ccmode{} maintains a cache of the opening parentheses of the blocks +surrounding the point, and it adapts that cache as the point is moved +around. That means that in bad cases it can take noticeable time to +indent a line in a new surrounding, but after that it gets fast as long +as the point isn't moved far off. The farther the point is moved, the +less useful is the cache. Since editing typically is done in ``chunks'' +rather than on single lines far apart from each other, the cache +typically gives good performance even when the code doesn't fit the +Emacs approach to finding the defun starts. @vindex c-enable-xemacs-performance-kludge-p @vindex enable-xemacs-performance-kludge-p (c-) -Another alternative for XEmacs users, is to set the variable +XEmacs users can set the variable @code{c-enable-xemacs-performance-kludge-p} to non-@code{nil}. This tells @ccmode{} to use XEmacs-specific built-in functions which, in some -circumstances, can locate the top-most opening brace much quicker than +circumstances, can locate the top-most opening brace much more quickly than @code{beginning-of-defun}. Preliminary testing has shown that for styles where these braces are hung (e.g. most JDK-derived Java styles), this hack can improve performance of the core syntax parsing routines from 3 to 60 times. However, for styles which @emph{do} conform to Emacs' recommended style of putting top-level braces in column zero, this hack can degrade performance by about as much. Thus this variable -is set to @code{nil} by default, since the Emacs-friendly styles -should be more common (and -encouraged!). Note that this variable has no effect in Emacs since the -necessary built-in functions don't exist (in Emacs 20.2 or 20.3 as of -this writing 27-Apr-1998). - -You will probably notice pathological behavior from @ccmode{} when -working in files containing large amounts of C preprocessor macros. -This is because Emacs cannot skip backwards over these lines as quickly -as it can comments. - -@vindex c-recognize-knr-p -@vindex recognize-knr-p (c-) -Previous versions of @ccmode{} had potential performance problems -when recognizing K&R style function argument declarations. This was -because there are ambiguities in the C syntax when K&R style argument -lists are used@footnote{It is hard to distinguish them from top-level -declarations.}. @ccmode{} has adopted BOCM's convention for -limiting the search: it assumes that argdecls are indented at least one -space, and that the function headers are not indented at all. With -current versions of @ccmode{}, user customization of -@code{c-recognize-knr-p} is deprecated. Just don't put argdecls in -column zero! - -@cindex @file{cc-lobotomy.el} file -@vindex cc-lobotomy-pith-list -You might want to investigate the speed-ups contained in the -file @file{cc-lobotomy.el}, which comes as part of the @ccmode{} -distribution, but is completely unsupported. -As mentioned previous, @ccmode{} always trades speed for accuracy, -however it is recognized that sometimes you need speed and can sacrifice -some accuracy in indentation. The file @file{cc-lobotomy.el} contains -hacks that will ``dumb down'' @ccmode{} in some specific ways, making -that trade-off of accuracy for speed. I won't go into details of its -use here; you should read the comments at the top of the file, and look -at the variable @code{cc-lobotomy-pith-list} for details. +is set to @code{nil} by default, since the Emacs-friendly styles should +be more common (and encouraged!). Note that this variable has no effect +in Emacs since the necessary built-in functions don't exist (in Emacs +21.3 as of this writing in May 2003). + +Text properties are used to speed up skipping over syntactic whitespace, +i.e. comments and preprocessor directives. Indenting a line after a +huge macro definition can be slow the first time, but after that the +text properties are in place and it should be fast (even after you've +edited other parts of the file and then moved back). + +Font locking can be a CPU hog, especially the font locking done on +decoration level 3 which tries to be very accurate. Note that that +level is designed to be used with a font lock support mode that only +fontifies the text that's actually shown, i.e. Lazy Lock or Just-in-time +Lock mode, so make sure you use one of them. Fontification of a whole +buffer with some thousand lines can often take over a minute. That is +a known weakness; the idea is that it never should happen. + +The most effective way to speed up font locking is to reduce the +decoration level to 2 by setting @code{font-lock-maximum-decoration} +appropriately. That level is designed to be as pretty as possible +without sacrificing performance. @xref{Font Locking Preliminaries}, for +more info. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Limitations and Known Bugs, Frequently Asked Questions, Performance Issues, Top @comment node-name, next, previous, up -@chapter Limitations and Known Bugs +@chapter Limitations and Known Bugs @cindex limitations @cindex bugs @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @itemize @bullet @item -Re-indenting large regions or expressions can be slow. +There is no way to apply auto newline settings (@pxref{Auto-newline +Insertion}) on already typed lines. That's only a feature to ease +interactive editing. -@findex c-indent-exp -@findex indent-exp (c-) -@item -@code{c-indent-exp} has not been fully optimized. It essentially -equivalent to hitting @kbd{TAB} (@code{c-indent-command}) on every -line. Some information is cached from line to line, but such caching -invariable causes inaccuracies in analysis in some bizarre situations. +To generalize this issue a bit: @ccmode{} is not intended to be used as +a reformatter for old code in some more or less batch-like way. With +the exception of some functions like @code{c-indent-region}, it's only +geared to be used interactively to edit new code. There's currently no +intention to change this goal. + +If you want to reformat old code, you're probably better off using some +other tool instead, e.g. @ref{Top, , GNU indent, indent, The `indent' +Manual}, which has more powerful reformatting capabilities than +@ccmode{}. -@vindex signal-error-on-buffer-boundary @item -XEmacs versions from 19.15 until (as of this writing 12-Mar-1998) 20.4 -contain a variable called @code{signal-error-on-buffer-boundary}. This -was intended as a solution to user interface problems associated with +@vindex signal-error-on-buffer-boundary +XEmacs has a variable called @code{signal-error-on-buffer-boundary}. +It's used as a solution to user interface problems associated with buffer movement and the @code{zmacs-region} deactivation on errors. -However, setting this variable to a non-default value had the -deleterious side effect of breaking many built-in primitive functions. -Most users will not be affected since they never change the value of -this variable. @strong{Do not set this variable to @code{nil}}; you -will cause serious problems in @ccmode{} and probably other XEmacs -packages! As of at least XEmacs 20.4, the effects this variable tried -to correct have been fixed in other, better ways. - +However, setting this variable to a non-default value in XEmacs 19 and +20 had the deleterious side effect of breaking many built-in primitive +functions. @strong{Do not set this variable to @code{nil} in XEmacs +19 and 20}; you will cause serious problems in @ccmode{} and probably +other XEmacs packages! In XEmacs 21 the effects of the variable is +limited to some functions that are only used interactively, so it's +not a problem there. @end itemize @@ -4330,104 +5409,82 @@ to correct have been fixed in other, better ways. @node Frequently Asked Questions, Getting the Latest CC Mode Release, Limitations and Known Bugs, Top @comment node-name, next, previous, up @appendix Frequently Asked Questions -@cindex frequently asked questions -@cindex FAQ @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +@itemize @bullet +@item @kindex C-x h @kindex C-M-\ -@kindex C-M-x -@kindex C-M-q -@kindex C-M-u -@kindex RET -@kindex C-j -@quotation - -@strong{Q.} @emph{How do I re-indent the whole file?} - -@strong{A.} Visit the file and hit @kbd{C-x h} to mark the whole -buffer. Then hit @kbd{C-M-\}. +@emph{How do I reindent the whole file?} -@sp 1 -@strong{Q.} @emph{How do I re-indent the entire function? -@kbd{C-M-x} doesn't work.} +Visit the file and hit @kbd{C-x h} to mark the whole buffer. Then hit +@kbd{C-M-\}. -@strong{A.} @kbd{C-M-x} is reserved for future Emacs use. -To re-indent the entire function hit @kbd{C-c C-q}. +@item +@kindex C-M-q +@kindex C-M-u +@emph{How do I reindent the current block?} -@sp 1 -@strong{Q.} @emph{How do I re-indent the current block?} +First move to the brace which opens the block with @kbd{C-M-u}, then +reindent that expression with @kbd{C-M-q}. -@strong{A.} First move to the brace which opens the block with -@kbd{C-M-u}, then re-indent that expression with -@kbd{C-M-q}. +@item +@kindex RET +@kindex C-j +@emph{Why doesn't the @kbd{RET} key indent the new line?} -@sp 1 -@strong{Q.} @emph{Why doesn't the @kbd{RET} key indent the new line?} +Emacs' convention is that @kbd{RET} just adds a newline, and that +@kbd{C-j} adds a newline and indents it. You can make @kbd{RET} do this +too by adding this to your @code{c-mode-common-hook}: -@strong{A.} Emacs' convention is that @kbd{RET} just adds a newline, -and that @kbd{C-j} adds a newline and indents it. You can make -@kbd{RET} do this too by adding this to your -@code{c-mode-common-hook}: @example - (define-key c-mode-base-map "\C-m" 'c-context-line-break) - @end example This is a very common question. If you want this to be the default behavior, don't lobby me, lobby RMS! @t{:-)} -@sp 1 -@strong{Q.} @emph{I put @code{(c-set-offset 'substatement-open 0)} -in my @file{.emacs} file but I get an error saying that -@code{c-set-offset}'s function definition is void.} - -@strong{A.} This means that @ccmode{} wasn't loaded into your -Emacs session by the time the @code{c-set-offset} call was reached, -most likely because @ccmode{} is being autoloaded. Instead -of putting the @code{c-set-offset} line in your top-level -@file{.emacs} file, put it in your @code{c-mode-common-hook}, or -simply modify @code{c-offsets-alist} directly: -@example +@item +@emph{I put @code{(c-set-offset 'substatement-open 0)} in my +@file{.emacs} file but I get an error saying that @code{c-set-offset}'s +function definition is void. What's wrong?} -(setq c-offsets-alist '((substatement-open . 0))) +This means that @ccmode{} wasn't loaded into your Emacs session by the +time the @code{c-set-offset} call was reached, most likely because +@ccmode{} is being autoloaded. Instead of putting the +@code{c-set-offset} line in your top-level @file{.emacs} file, put it in +your @code{c-mode-common-hook}, or simply modify @code{c-offsets-alist} +directly: +@example +(setq c-offsets-alist '((substatement-open . 0))) @end example -@sp 1 -@strong{Q.} @emph{How do I make strings, comments, keywords, and other -constructs appear in different colors, or in bold face, etc.?} - -@strong{A.} ``Syntax Colorization'' is a standard Emacs feature, -controlled by @code{font-lock-mode}. @ccmode{} does not contain -font-lock definitions for any of its supported languages. - -@sp 1 -@strong{Q.} @emph{@kbd{M-a} and @kbd{M-e} used to move over entire -balanced brace lists, but now they move into blocks. How do I get the -old behavior back?} - -@strong{A.} Use @kbd{C-M-f} and @kbd{C-M-b} to move over balanced brace -blocks. Use @kbd{M-a} and @kbd{M-e} to move by statements, which will -also move into blocks. - -@sp 1 -@strong{Q.} @emph{Whenever I try to indent a line or type an -``electric'' key such as @kbd{;}, @kbd{@{}, or @kbd{@}}, I get an error -that look like this: @code{Invalid function: (macro . #[...}. What -gives?} - -@strong{A.} This is a common error when @ccmode{} hasn't been compiled -correctly, especially under Emacs 19.34@footnote{Technically, it's -because some macros wasn't defined during the compilation, so the byte -compiler put in function calls instead of the macro expansions. Later, -when the interpreter tries to call the macros as functions, it shows -this (somewhat cryptic) error message.}. If you are using the standalone +@item +@kindex M-a +@kindex M-e +@emph{@kbd{M-a} and @kbd{M-e} used to move over entire balanced brace +lists, but now they move into blocks. How do I get the old behavior +back?} + +Use @kbd{C-M-f} and @kbd{C-M-b} to move over balanced brace blocks. Use +@kbd{M-a} and @kbd{M-e} to move by statements, which will also move into +blocks. + +@item +@emph{Whenever I try to indent a line or type an ``electric'' key such +as @kbd{;}, @kbd{@{}, or @kbd{@}}, I get an error that look like this: +@code{Invalid function: (macro . #[...}. What gives?} + +This is a common error when @ccmode{} hasn't been compiled correctly, +especially under Emacs 19.34@footnote{Technically, it's because some +macro wasn't defined during the compilation, so the byte compiler put +in function calls instead of the macro expansions. Later, when the +interpreter tries to call the macro as a function, it shows this +(somewhat cryptic) error message.}. If you are using the standalone @ccmode{} distribution, try recompiling it according to the instructions in the @file{README} file. - -@end quotation +@end itemize @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -4436,48 +5493,37 @@ in the @file{README} file. @appendix Getting the Latest CC Mode Release @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@ccmode{} is standard with all versions of Emacs since 19.34 and of -XEmacs since 19.16. +@ccmode{} has been standard with all versions of Emacs since 19.34 and +of XEmacs since 19.16. +@cindex web site Due to release schedule skew, it is likely that all of these Emacsen have old versions of @ccmode{} and so should be upgraded. Access to the @ccmode{} source code, as well as more detailed information on Emacsen -compatibility, etc. are all available via the Web at: - -@example -@group - - @uref{http://cc-mode.sourceforge.net/} - -@end group -@end example - -@emph{Old URLs, including the FTP URLs, should no longer be used.} +compatibility, etc. are all available on the web site: -There are many files under these directories; you can pick up the entire -distribution (named @code{cc-mode.tar.gz}; a gzip'd tar file), or any of -the individual files, including PostScript documentation. +@quotation +@uref{http://cc-mode.sourceforge.net/} +@end quotation @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @node Mailing Lists and Submitting Bug Reports, Sample .emacs File, Getting the Latest CC Mode Release, Top @comment node-name, next, previous, up @appendix Mailing Lists and Submitting Bug Reports -@cindex mailing lists -@cindex reporting bugs @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @kindex C-c C-b @findex c-submit-bug-report @findex submit-bug-report (c-) -To report bugs, use the @kbd{C-c C-b} (@code{c-submit-bug-report}) -command. This provides vital information we need to reproduce your -problem. Make sure you include a concise, but complete code example. -Please try to boil your example down to just the essential code needed -to reproduce the problem, and include an exact recipe of steps needed to -expose the bug. Be especially sure to include any code that appears -@emph{before} your bug example, if you think it might affect our ability -to reproduce it. +To report bugs, use the @kbd{C-c C-b} (bound to +@code{c-submit-bug-report}) command. This provides vital information +we need to reproduce your problem. Make sure you include a concise, +but complete code example. Please try to boil your example down to +just the essential code needed to reproduce the problem, and include +an exact recipe of steps needed to expose the bug. Be especially sure +to include any code that appears @emph{before} your bug example, if +you think it might affect our ability to reproduce it. Please try to produce the problem in an Emacs instance without any customizations loaded (i.e. start it with the @code{-q -no-site-file} @@ -4487,30 +5533,30 @@ that case, we'd appreciate if you isolate the Emacs Lisp code that trigs the bug and include it in your report. @cindex bug report mailing list -Bug reports are now sent to the following email addresses: -@email{bug-cc-mode@@gnu.org} and @email{bug-gnu-emacs@@gnu.org}; the -latter is mirrored on the Usenet newsgroup @code{gnu.emacs.bug}. You -can send other questions and suggestions (kudos? @t{;-)} to -@email{bug-cc-mode@@gnu.org}. +Bug reports are sent to @email{bug-cc-mode@@gnu.org}. You can also send +other questions and suggestions (kudos? @t{;-)} to that address. It's a +mailing list which you can join or browse an archive of; see the web +site at @uref{http://cc-mode.sourceforge.net/} for further details. @cindex announcement mailing list If you want to get announcements of new @ccmode{} releases, send the word @emph{subscribe} in the body of a message to -@email{cc-mode-announce-request@@lists.sourceforge.net}. Announcements -will also be posted to the Usenet newsgroups @code{gnu.emacs.sources}, -@code{comp.emacs} and @code{comp.emacs.xemacs}. +@email{cc-mode-announce-request@@lists.sourceforge.net}. It's possible +to subscribe from the web site too. Announcements will also be posted +to the Usenet newsgroups @code{gnu.emacs.sources}, @code{comp.emacs} and +@code{comp.emacs.xemacs}. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Sample .emacs File, Concept Index, Mailing Lists and Submitting Bug Reports, Top +@node Sample .emacs File, Command and Function Index, Mailing Lists and Submitting Bug Reports, Top @comment node-name, next, previous, up @appendix Sample .emacs file @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @example -;; Here's a sample .emacs file that might help you along the way. Just -;; copy this region and paste it into your .emacs file. You may want to -;; change some of the actual values. +;; Here's a sample .emacs file that might help you along the way. +;; Just copy this region and paste it into your .emacs file. You may +;; want to change some of the actual values. (defconst my-c-style '((c-tab-always-indent . t) @@ -4530,8 +5576,7 @@ will also be posted to the Usenet newsgroups @code{gnu.emacs.sources}, (case-label . 4) (block-open . 0) (knr-argdecl-intro . -))) - (c-echo-syntactic-information-p . t) - ) + (c-echo-syntactic-information-p . t)) "My C Programming Style") ;; offset customizations not in my-c-style @@ -4550,60 +5595,55 @@ will also be posted to the Usenet newsgroups @code{gnu.emacs.sources}, ;; key bindings for all supported languages. We can put these in ;; c-mode-base-map because c-mode-map, c++-mode-map, objc-mode-map, ;; java-mode-map, idl-mode-map, and pike-mode-map inherit from it. - (define-key c-mode-base-map "\C-m" 'c-context-line-break) - ) + (define-key c-mode-base-map "\C-m" 'c-context-line-break)) (add-hook 'c-mode-common-hook 'my-c-mode-common-hook) @end example @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Concept Index, Command Index, Sample .emacs File, Top +@node Command and Function Index, Variable Index, Sample .emacs File, Top @comment node-name, next, previous, up -@unnumbered Concept Index +@unnumbered Command and Function Index @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@printindex cp +Since most @ccmode{} commands are prepended with the string +@samp{c-}, each appears under its @code{c-@var{thing}} name and its +@code{@var{thing} (c-)} name. +@iftex +@sp 2 +@end iftex +@printindex fn @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Command Index, Key Index, Concept Index, Top +@node Variable Index, Concept Index, Command and Function Index, Top @comment node-name, next, previous, up -@unnumbered Command Index +@unnumbered Variable Index @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -Since most @ccmode{} commands are prepended with the string -@samp{c-}, each appears under its @code{c-@var{}} name and its -@code{@var{} (c-)} name. +Since most @ccmode{} variables are prepended with the string +@samp{c-}, each appears under its @code{c-@var{thing}} name and its +@code{@var{thing} (c-)} name. @iftex @sp 2 @end iftex -@printindex fn +@printindex vr @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Key Index, Variable Index, Command Index, Top +@node Concept Index, , Variable Index, Top @comment node-name, next, previous, up -@unnumbered Key Index +@unnumbered Concept Index @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@printindex ky +@printindex cp @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -@node Variable Index, , Key Index, Top -@comment node-name, next, previous, up -@unnumbered Variable Index +@comment Epilogue. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -Since most @ccmode{} variables are prepended with the string -@samp{c-}, each appears under its @code{c-@var{}} name and its -@code{@var{} (c-)} name. -@iftex -@sp 2 -@end iftex -@printindex vr - @iftex @page @summarycontents @@ -4611,3 +5651,7 @@ Since most @ccmode{} variables are prepended with the string @end iftex @bye + +@ignore + arch-tag: c4cab162-5e57-4366-bdce-4a9db2fc97f0 +@end ignore diff --git a/man/cl.texi b/man/cl.texi index eebd3ae4b5..bc4db1cb92 100644 --- a/man/cl.texi +++ b/man/cl.texi @@ -50,7 +50,7 @@ license to the document, as described in section 6 of the license. @end titlepage @node Top, Overview, (dir), (dir) -@chapter Common Lisp Extensions +@chapter Overview @noindent This document describes a set of Emacs Lisp facilities borrowed from @@ -3127,7 +3127,7 @@ and declare it inline all at once. (defsubst foo (...) ...) ; instead of defun @end example -@strong{Note:} This declaration remains in effect after the +@strong{Please note:} this declaration remains in effect after the containing source file is done. It is correct to use it to request that a function you have defined should be inlined, but it is impolite to use it to request inlining of an external @@ -5361,3 +5361,7 @@ recursion. @setchapternewpage odd @contents @bye + +@ignore + arch-tag: b61e7200-3bfa-4a70-a9d3-095e152696f8 +@end ignore diff --git a/man/cmdargs.texi b/man/cmdargs.texi index 7545f9baf7..3daf96f0d0 100644 --- a/man/cmdargs.texi +++ b/man/cmdargs.texi @@ -1,5 +1,5 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985,86,87,93,94,95,1997,2001, 2003 Free Software Foundation, Inc. +@c Copyright (C) 1985,86,87,93,94,95,97,2001,03,2004 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Command Arguments, X Resources, Service, Top @appendix Command Line Arguments @@ -46,27 +46,33 @@ and the tables below always show an equal sign. @cindex initial options (command line) @cindex action options (command line) +@vindex command-line-args Most options specify how to initialize Emacs, or set parameters for the Emacs session. We call them @dfn{initial options}. A few options specify things to do: for example, load libraries, call functions, or terminate Emacs. These are called @dfn{action options}. These and file names together are called @dfn{action arguments}. Emacs processes all -the action arguments in the order they are written. +the action arguments in the order they are written. The @file{.emacs} file +can access the values of the action arguments as the elements of a list in +the variable @code{command-line-args}. + + @menu -* Action Arguments:: Arguments to visit files, load libraries, - and call functions. +* Action Arguments:: Arguments to visit files, load libraries, + and call functions. * Initial Options:: Arguments that take effect while starting Emacs. * Command Example:: Examples of using command line arguments. -* Resume Arguments:: Specifying arguments when you resume a running Emacs. +* Resume Arguments:: Specifying arguments when you resume a running Emacs. * Environment:: Environment variables that Emacs uses. * Display X:: Changing the default display and using remote login. -* Font X:: Choosing a font for text, under X. -* Colors:: Choosing display colors. +* Font X:: Choosing a font for text, under X. +* Colors:: Choosing display colors. * Window Size X:: Start-up window size, under X. -* Borders X:: Internal and external borders, under X. +* Borders X:: Internal and external borders, under X. * Title X:: Specifying the initial frame's title. * Icons X:: Choosing what sort of icon to use, under X. +* Misc X:: Other display options. @end menu @node Action Arguments @@ -76,10 +82,12 @@ the action arguments in the order they are written. @table @samp @item @var{file} -@opindex --visit -@itemx --visit=@var{file} @opindex --file @itemx --file=@var{file} +@opindex --find-file +@itemx --find-file=@var{file} +@opindex --visit +@itemx --visit=@var{file} @cindex visiting files, command-line argument @vindex inhibit-startup-buffer-menu Visit @var{file} using @code{find-file}. @xref{Visiting}. @@ -107,12 +115,21 @@ Load a Lisp library named @var{file} with the function @code{load}. directory, or in the Emacs library search path as specified with @env{EMACSLOADPATH} (@pxref{General Variables}). +@item -L @var{dir} +@opindex -L +@itemx --directory=@var{dir} +@opindex --directory +Add directory @var{dir} to the variable @code{load-path}. + @item -f @var{function} @opindex -f @itemx --funcall=@var{function} @opindex --funcall @cindex call Lisp functions, command-line argument -Call Lisp function @var{function} with no arguments. +Call Lisp function @var{function}. If it is an interactive function +(a command), it reads the arguments interactively just as if you had +called the same function with a key sequence. Otherwise, it calls the +function with no arguments. @item --eval=@var{expression} @opindex --eval @@ -130,13 +147,16 @@ what @kbd{M-x insert-file} does. @xref{Misc File Ops}. @item --kill @opindex --kill Exit from Emacs without asking for confirmation. -@end table -@vindex command-line-args - The init file can access the values of the action arguments as the -elements of a list in the variable @code{command-line-args}. The init -file can override the normal processing of the action arguments, or -define new ones, by reading and setting this variable. +@item --help +@opindex --help +Print a usage message listing all available options, then exit +successfully. + +@item --version +@opindex --version +Print Emacs version, then exit successfully. +@end table @node Initial Options @appendixsec Initial Options @@ -159,6 +179,7 @@ of these files or substitute other files for them. @opindex --terminal @cindex device for Emacs terminal I/O Use @var{device} as the device for terminal input and output. +@samp{--terminal} implies @samp{--no-window-system}. @item -d @var{display} @opindex -d @@ -202,6 +223,7 @@ been explicitly requested. @item --script @var{file} @opindex --script +@cindex script mode Run Emacs in batch mode, like @samp{--batch}, and then read and execute the Lisp code in @var{file}. @@ -221,11 +243,12 @@ comment delimiter. @opindex -q @itemx --no-init-file @opindex --no-init-file -@cindex bypassing init and site-start file +@cindex bypassing init and @file{default.el} file @cindex init file, not loading @cindex @file{default.el} file, not loading Do not load your Emacs init file @file{~/.emacs}, or @file{default.el} -either. When invoked like this, Emacs does not allow saving options +either. Regardless of this switch, @file{site-start.el} is still loaded. +When invoked like this, Emacs does not allow saving options changed with the @kbd{M-x customize} command and its variants. @xref{Easy Customization}. @@ -233,7 +256,7 @@ changed with the @kbd{M-x customize} command and its variants. @opindex --no-site-file @cindex @file{site-start.el} file, not loading Do not load @file{site-start.el}. The options @samp{-q}, @samp{-u} -and @samp{-batch} have no effect on the loading of this file---this is +and @samp{--batch} have no effect on the loading of this file---this is the only option that blocks it. @item --no-splash @@ -242,6 +265,10 @@ the only option that blocks it. Do not display a splash screen on startup; this is equivalent to setting the variable @code{inhibit-startup-message} to non-@code{nil}. +@item --no-desktop +@opindex --no-desktop +Do not reload any saved desktop. @xref{Saving Emacs Sessions}. + @item -u @var{user} @opindex -u @itemx --user=@var{user} @@ -257,6 +284,8 @@ Enable the Emacs Lisp debugger for errors in the init file. @item --unibyte @opindex --unibyte +@itemx --no-multibyte +@opindex --no-multibyte @cindex unibyte operation, command-line argument Do almost everything with single-byte buffers and strings. All buffers and strings are unibyte unless you (or a Lisp program) @@ -267,6 +296,8 @@ variable @env{EMACS_UNIBYTE} has the same effect. @item --multibyte @opindex --multibyte +@itemx --no-unibyte +@opindex --no-unibyte Inhibit the effect of @env{EMACS_UNIBYTE}, so that Emacs uses multibyte characters by default, as usual. @end table @@ -287,7 +318,7 @@ emacs -batch foo.c -l hack-c -f save-buffer >& log This says to visit @file{foo.c}, load @file{hack-c.el} (which makes changes in the visited file), save @file{foo.c} (note that @code{save-buffer} is the function that @kbd{C-x C-s} is bound to), and -then exit back to the shell (because of @samp{-batch}). @samp{-batch} +then exit back to the shell (because of @samp{--batch}). @samp{--batch} also guarantees there will be no problem redirecting output to @file{log}, because Emacs will not assume that it has a display terminal to work with. @@ -469,9 +500,6 @@ environment and coding system. @xref{Language Environments}. The user's login name. See also @env{USER}. @item MAIL The name of the user's system mail inbox. -@item MAILRC -Name of file containing mail aliases. (The default is -@file{~/.mailrc}.) @item MH Name of setup file for the mh system. (The default is @file{~/.mh_profile}.) @item NAME @@ -671,7 +699,7 @@ emacs --display=glasperle:0 & @end smallexample You can inhibit the direct use of the window system and GUI with the -@samp{-nw} option. It tells Emacs to display using ordinary ASCII on +@samp{-nw} option. It tells Emacs to display using ordinary @acronym{ASCII} on its controlling terminal. This is also an initial option. Sometimes, security arrangements prevent a program on a remote system @@ -691,11 +719,10 @@ remote machine. @appendixsec Font Specification Options @cindex font name (X Window System) - By default, Emacs displays text in the font named @samp{9x15}, which -makes each character nine pixels wide and fifteen pixels high. You can -specify a different font on your command line through the option -@samp{-fn @var{name}} (or @samp{--font}, which is an alias for -@samp{-fn}). + By default, Emacs displays text in a twelve point Courier font (when +using X). You can specify a different font on your command line +through the option @samp{-fn @var{name}} (or @samp{--font}, which is +an alias for @samp{-fn}). @table @samp @item -fn @var{name} @@ -706,12 +733,19 @@ specify a different font on your command line through the option Use font @var{name} as the default font. @end table - Under X, each font has a long name which consists of eleven words or -numbers, separated by dashes. Some fonts also have shorter -nicknames---@samp{9x15} is such a nickname. You can use either kind of -name. You can use wildcard patterns for the font name; then Emacs lets -X choose one of the fonts that match the pattern. Here is an example, -which happens to specify the font whose nickname is @samp{6x13}: + Under X, each font has a long name which consists of fourteen words +or numbers, separated by dashes. Some fonts also have shorter +nicknames. For instance, @samp{9x15} is such a nickname. This font +makes each character nine pixels wide and fifteen pixels high. You +can use either kind of name. Case is insignificant in both kinds. +You can use wildcard patterns for the font name; then Emacs lets X +choose one of the fonts that match the pattern. The wildcard +character @samp{*} matches any sequence of characters (including none) +and @samp{?} matches any single character. However, matching is +implementation-dependent, and can be inaccurate when wildcards match +dashes in a long name. For reliable results, supply all 14 dashes and +use wildcards only within a field. Here is an example, which happens +to specify the font whose nickname is @samp{6x13}: @smallexample emacs -fn \ @@ -723,13 +757,25 @@ You can also specify the font in your @file{.Xdefaults} file: @smallexample emacs.font: -misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1 +@end smallexample + + Note that if you use a wildcard pattern on the command line, you +need to enclose it in single or double quotes, to prevent the shell +from accidentally expanding it into a list of file names. On the +other hand, you should not quote the name in the @file{.Xdefaults} +file. + +The default font used by Emacs (under X) is: + +@smallexample +-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1 @end smallexample A long font name has the following form: @smallexample -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{} -@dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{charset} +@dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{registry}-@var{encoding} @end smallexample @table @var @@ -770,9 +816,14 @@ This is @samp{m} (monospace), @samp{p} (proportional) or @samp{c} (character cell). @item width This is the average character width, in pixels, multiplied by ten. -@item charset -This is the character set that the font depicts. -Normally you should use @samp{iso8859-1}. +@item registry +@itemx encoding +These together make up the X font character set that the font depicts. +(X font character sets are not the same as Emacs charsets, but they +are solutions for the same problem.) You can use the +@command{xfontsel} program to check which choices you have. However, +normally you should use @samp{iso8859} for @var{registry} and @samp{1} +for @var{encoding}. @end table @cindex listing system fonts @@ -921,14 +972,13 @@ position of the initial Emacs frame: @table @samp @item -g @var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]} @opindex -g +@itemx --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]} +@opindex --geometry +@cindex geometry, command-line argument Specify the size @var{width} and @var{height} (measured in character columns and lines), and positions @var{xoffset} and @var{yoffset} (measured in pixels). This applies to all frames. -@item --geometry=@var{width}x@var{height}@r{[@{}+-@r{@}}@var{xoffset}@r{@{}+-@r{@}}@var{yoffset}@r{]]} -@opindex --geometry -This is another way of writing the same thing. - @item -fs @opindex -fs @itemx --fullscreen @@ -1006,7 +1056,7 @@ specification assuming there is a tool bar, and then your @file{~/.emacs} file disables the tool bar, you will end up with a frame geometry different from what you asked for. To get the intended size with no tool bar, use an X resource to specify ``no tool bar'' -(@pxref{Table of Resources});then Emacs will already know there's no +(@pxref{Table of Resources}); then Emacs will already know there's no tool bar when it processes the specified geometry. When using one of @samp{--fullscreen}, @samp{--fullwidth} or @@ -1034,13 +1084,15 @@ you can click on to move or iconify the window. @opindex -ib @itemx --internal-border=@var{width} @opindex --internal-border -@cindex border width, command-line argument -Specify @var{width} as the width of the internal border, in pixels. +@cindex internal border width, command-line argument +Specify @var{width} as the width of the internal border (between the text +and the main border), in pixels. @item -bw @var{width} @opindex -bw @itemx --border-width=@var{width} @opindex --border-width +@cindex main border width, command-line argument Specify @var{width} as the width of the main border, in pixels. @end table @@ -1068,11 +1120,10 @@ there is more than one frame). line option: @table @samp -@item -title @var{title} -@opindex --title -@itemx --title=@var{title} -@itemx -T @var{title} +@item -T @var{title} @opindex -T +@itemx --title=@var{title} +@opindex --title @cindex frame title, command-line argument Specify @var{title} as the title for the initial Emacs frame. @end table @@ -1114,3 +1165,36 @@ rectangle containing the frame's title. rather than showing a frame right away. In this situation, the icon is the only indication that Emacs has started; the text frame doesn't appear until you deiconify it. + +@node Misc X +@appendixsec Other Display Options + +@table @samp +@item -hb +@opindex -hb +@itemx --horizontal-scroll-bars +@opindex --horizontal-scroll-bars +@cindex horizontal scroll bars, command-line argument +Enable horizontal scroll bars. + +@item -vb +@opindex -vb +@itemx --vertical-scroll-bars +@opindex --vertical-scroll-bars +@cindex vertical scroll bars, command-line argument +Enable vertical scroll bars. + +@item -lsp @var{pixels} +@opindex -lsp +@itemx --line-spacing=@var{pixels} +@opindex --line-spacing +@cindex line spacing, command-line argument +Specify @var{pixels} as additional space to put between lines, in pixels. +@end table + + The @samp{--xrm} option (@pxref{Resources}) specifies additional +X resource values. + +@ignore + arch-tag: fffecd9e-7329-4a51-a3cc-dd4a9889340e +@end ignore diff --git a/man/commands.texi b/man/commands.texi index b0727cfa1e..ea14e36128 100644 --- a/man/commands.texi +++ b/man/commands.texi @@ -15,33 +15,33 @@ how Emacs interprets your keyboard and mouse input. @cindex input with the keyboard @cindex keyboard input @cindex character set (keyboard) -@cindex ASCII +@cindex @acronym{ASCII} @cindex C- @cindex Control @cindex control characters - GNU Emacs uses an extension of the ASCII character set for keyboard + GNU Emacs uses an extension of the @acronym{ASCII} character set for keyboard input; it also accepts non-character input events including function keys and mouse button actions. - ASCII consists of 128 character codes. Some of these codes are + @acronym{ASCII} consists of 128 character codes. Some of these codes are assigned graphic symbols such as @samp{a} and @samp{=}; the rest are control characters, such as @kbd{Control-a} (usually written @kbd{C-a} for short). @kbd{C-a} gets its name from the fact that you type it by holding down the @key{CTRL} key while pressing @kbd{a}. - Some ASCII control characters have special names, and most terminals + Some @acronym{ASCII} control characters have special names, and most terminals have special keys you can type them with: for example, @key{RET}, @key{TAB}, @key{DEL} and @key{ESC}. The space character is usually referred to below as @key{SPC}, even though strictly speaking it is a graphic character whose graphic happens to be blank. Some keyboards have a key labeled ``linefeed'' which is an alias for @kbd{C-j}. - Emacs extends the ASCII character set with thousands more printing + Emacs extends the @acronym{ASCII} character set with thousands more printing characters (@pxref{International}), additional control characters, and a few more modifiers that can be combined with any character. - On ASCII terminals, there are only 32 possible control characters. + On @acronym{ASCII} terminals, there are only 32 possible control characters. These are the control variants of letters and @samp{@@[]\^_}. In addition, the shift key is meaningless with control characters: @kbd{C-a} and @kbd{C-A} are the same character, and Emacs cannot @@ -117,8 +117,8 @@ Reference Manual}, for more information. If you are not doing Lisp programming, but simply want to redefine the meaning of some characters or non-character events, see @ref{Customization}. - ASCII terminals cannot really send anything to the computer except -ASCII characters. These terminals use a sequence of characters to + @acronym{ASCII} terminals cannot really send anything to the computer except +@acronym{ASCII} characters. These terminals use a sequence of characters to represent each function key. But that is invisible to the Emacs user, because the keyboard input routines recognize these special sequences and convert them to function key events before any other part of Emacs @@ -243,25 +243,29 @@ variables will make sense. @xref{Variables}. @cindex characters (in text) Text in Emacs buffers is a sequence of 8-bit bytes. Each byte can -hold a single ASCII character. Both ASCII control characters (octal -codes 000 through 037, and 0177) and ASCII printing characters (codes -040 through 0176) are allowed; however, non-ASCII control characters +hold a single @acronym{ASCII} character. Both @acronym{ASCII} control characters (octal +codes 000 through 037, and 0177) and @acronym{ASCII} printing characters (codes +040 through 0176) are allowed; however, non-@acronym{ASCII} control characters cannot appear in a buffer. The other modifier flags used in keyboard input, such as Meta, are not allowed in buffers either. - Some ASCII control characters serve special purposes in text, and have + Some @acronym{ASCII} control characters serve special purposes in text, and have special names. For example, the newline character (octal code 012) is used in the buffer to end a line, and the tab character (octal code 011) is used for indenting to the next tab stop column (normally every 8 columns). @xref{Text Display}. - Non-ASCII printing characters can also appear in buffers. When -multibyte characters are enabled, you can use any of the non-ASCII + Non-@acronym{ASCII} printing characters can also appear in buffers. When +multibyte characters are enabled, you can use any of the non-@acronym{ASCII} printing characters that Emacs supports. They have character codes starting at 256, octal 0400, and each one is represented as a sequence of two or more bytes. @xref{International}. Single-byte characters with codes 128 through 255 can also appear in multibyte buffers. If you disable multibyte characters, then you can use only one -alphabet of non-ASCII characters, but they all fit in one byte. They +alphabet of non-@acronym{ASCII} characters, but they all fit in one byte. They use codes 0200 through 0377. @xref{Single-Byte Character Support}. + +@ignore + arch-tag: 9be43eef-d1f4-4d03-a916-c741ea713a45 +@end ignore diff --git a/man/custom.texi b/man/custom.texi index 4a89f8f086..ab29bd83e0 100644 --- a/man/custom.texi +++ b/man/custom.texi @@ -19,15 +19,17 @@ between sessions unless you save the customization in a file such as customizations for future sessions, this actually works by editing @file{.emacs} for you. + Another means of customization is the keyboard macro, which is a +sequence of keystrokes to be replayed with a single command. +@xref{Keyboard Macros}, for full instruction how to record, manage, and +replay sequences of keys. + @menu * Minor Modes:: Each minor mode is one feature you can turn on independently of any others. * Variables:: Many Emacs commands examine Emacs variables to decide what to do; by setting variables, you can control their functioning. -* Keyboard Macros:: A keyboard macro records a sequence of - keystrokes to be replayed with a single - command. * Key Bindings:: The keymaps say what command each key runs. By changing them, you can "redefine keys". * Keyboard Translations:: @@ -1058,230 +1060,11 @@ value are @code{t}, @code{nil}, and anything else, just as for neither @code{t} nor @code{nil}, so normally Emacs does ask for confirmation about file settings for these variables. -@node Keyboard Macros -@section Keyboard Macros - -@cindex defining keyboard macros -@cindex keyboard macro - A @dfn{keyboard macro} is a command defined by the user to stand for -another sequence of keys. For example, if you discover that you are -about to type @kbd{C-n C-d} forty times, you can speed your work by -defining a keyboard macro to do @kbd{C-n C-d} and calling it with a -repeat count of forty. - -@table @kbd -@item C-x ( -Start defining a keyboard macro (@code{start-kbd-macro}). -@item C-x ) -End the definition of a keyboard macro (@code{end-kbd-macro}). -@item C-x e -Execute the most recent keyboard macro (@code{call-last-kbd-macro}). -@item C-u C-x ( -Re-execute last keyboard macro, then add more keys to its definition. -@item C-x q -When this point is reached during macro execution, ask for confirmation -(@code{kbd-macro-query}). -@item M-x name-last-kbd-macro -Give a command name (for the duration of the session) to the most -recently defined keyboard macro. -@item M-x insert-kbd-macro -Insert in the buffer a keyboard macro's definition, as Lisp code. -@item C-x C-k -Edit a previously defined keyboard macro (@code{edit-kbd-macro}). -@item M-x apply-macro-to-region-lines -Run the last keyboard macro on each complete line in the region. -@end table - - Keyboard macros differ from ordinary Emacs commands in that they are -written in the Emacs command language rather than in Lisp. This makes it -easier for the novice to write them, and makes them more convenient as -temporary hacks. However, the Emacs command language is not powerful -enough as a programming language to be useful for writing anything -intelligent or general. For such things, Lisp must be used. - - You define a keyboard macro while executing the commands which are the -definition. Put differently, as you define a keyboard macro, the -definition is being executed for the first time. This way, you can see -what the effects of your commands are, so that you don't have to figure -them out in your head. When you are finished, the keyboard macro is -defined and also has been, in effect, executed once. You can then do the -whole thing over again by invoking the macro. - -@menu -* Basic Kbd Macro:: Defining and running keyboard macros. -* Save Kbd Macro:: Giving keyboard macros names; saving them in files. -* Kbd Macro Query:: Making keyboard macros do different things each time. -@end menu - -@node Basic Kbd Macro -@subsection Basic Use - -@kindex C-x ( -@kindex C-x ) -@kindex C-x e -@findex start-kbd-macro -@findex end-kbd-macro -@findex call-last-kbd-macro - To start defining a keyboard macro, type the @kbd{C-x (} command -(@code{start-kbd-macro}). From then on, your keys continue to be -executed, but also become part of the definition of the macro. @samp{Def} -appears in the mode line to remind you of what is going on. When you are -finished, the @kbd{C-x )} command (@code{end-kbd-macro}) terminates the -definition (without becoming part of it!). For example, - -@example -C-x ( M-f foo C-x ) -@end example - -@noindent -defines a macro to move forward a word and then insert @samp{foo}. - - The macro thus defined can be invoked again with the @kbd{C-x e} -command (@code{call-last-kbd-macro}), which may be given a repeat count -as a numeric argument to execute the macro many times. @kbd{C-x )} can -also be given a repeat count as an argument, in which case it repeats -the macro that many times right after defining it, but defining the -macro counts as the first repetition (since it is executed as you define -it). Therefore, giving @kbd{C-x )} an argument of 4 executes the macro -immediately 3 additional times. An argument of zero to @kbd{C-x e} or -@kbd{C-x )} means repeat the macro indefinitely (until it gets an error -or you type @kbd{C-g} or, on MS-DOS, @kbd{C-@key{BREAK}}). - - If you wish to repeat an operation at regularly spaced places in the -text, define a macro and include as part of the macro the commands to move -to the next place you want to use it. For example, if you want to change -each line, you should position point at the start of a line, and define a -macro to change that line and leave point at the start of the next line. -Then repeating the macro will operate on successive lines. - - When a command reads an argument with the minibuffer, your -minibuffer input becomes part of the macro along with the command. So -when you replay the macro, the command gets the same argument as -when you entered the macro. For example, - -@example -C-x ( C-a C-@key{SPC} C-n M-w C-x b f o o @key{RET} C-y C-x b @key{RET} C-x ) -@end example - -@noindent -defines a macro that copies the current line into the buffer -@samp{foo}, then returns to the original buffer. - - You can use function keys in a keyboard macro, just like keyboard -keys. You can even use mouse events, but be careful about that: when -the macro replays the mouse event, it uses the original mouse position -of that event, the position that the mouse had while you were defining -the macro. The effect of this may be hard to predict. (Using the -current mouse position would be even less predictable.) - - One thing that doesn't always work well in a keyboard macro is the -command @kbd{C-M-c} (@code{exit-recursive-edit}). When this command -exits a recursive edit that started within the macro, it works as you'd -expect. But if it exits a recursive edit that started before you -invoked the keyboard macro, it also necessarily exits the keyboard macro -as part of the process. - - After you have terminated the definition of a keyboard macro, you can add -to the end of its definition by typing @kbd{C-u C-x (}. This is equivalent -to plain @kbd{C-x (} followed by retyping the whole definition so far. As -a consequence it re-executes the macro as previously defined. - -@findex edit-kbd-macro -@kindex C-x C-k - You can edit a keyboard macro already defined by typing @kbd{C-x C-k} -(@code{edit-kbd-macro}). Follow that with the keyboard input that you -would use to invoke the macro---@kbd{C-x e} or @kbd{M-x @var{name}} or -some other key sequence. This formats the macro definition in a buffer -and enters a specialized major mode for editing it. Type @kbd{C-h m} -once in that buffer to display details of how to edit the macro. When -you are finished editing, type @kbd{C-c C-c}. - -@findex apply-macro-to-region-lines - The command @kbd{M-x apply-macro-to-region-lines} repeats the last -defined keyboard macro on each complete line within the current region. -It does this line by line, by moving point to the beginning of the line -and then executing the macro. - -@node Save Kbd Macro -@subsection Naming and Saving Keyboard Macros - -@cindex saving keyboard macros -@findex name-last-kbd-macro - If you wish to save a keyboard macro for longer than until you define the -next one, you must give it a name using @kbd{M-x name-last-kbd-macro}. -This reads a name as an argument using the minibuffer and defines that name -to execute the macro. The macro name is a Lisp symbol, and defining it in -this way makes it a valid command name for calling with @kbd{M-x} or for -binding a key to with @code{global-set-key} (@pxref{Keymaps}). If you -specify a name that has a prior definition other than another keyboard -macro, an error message is shown and nothing is changed. - -@findex insert-kbd-macro - Once a macro has a command name, you can save its definition in a file. -Then it can be used in another editing session. First, visit the file -you want to save the definition in. Then use this command: - -@example -M-x insert-kbd-macro @key{RET} @var{macroname} @key{RET} -@end example - -@noindent -This inserts some Lisp code that, when executed later, will define the -same macro with the same definition it has now. (You need not -understand Lisp code to do this, because @code{insert-kbd-macro} writes -the Lisp code for you.) Then save the file. You can load the file -later with @code{load-file} (@pxref{Lisp Libraries}). If the file you -save in is your init file @file{~/.emacs} (@pxref{Init File}) then the -macro will be defined each time you run Emacs. - - If you give @code{insert-kbd-macro} a numeric argument, it makes -additional Lisp code to record the keys (if any) that you have bound to the -keyboard macro, so that the macro will be reassigned the same keys when you -load the file. - -@node Kbd Macro Query -@subsection Executing Macros with Variations - -@kindex C-x q -@findex kbd-macro-query - Using @kbd{C-x q} (@code{kbd-macro-query}), you can get an effect -similar to that of @code{query-replace}, where the macro asks you each -time around whether to make a change. While defining the macro, -type @kbd{C-x q} at the point where you want the query to occur. During -macro definition, the @kbd{C-x q} does nothing, but when you run the -macro later, @kbd{C-x q} asks you interactively whether to continue. - - The valid responses when @kbd{C-x q} asks are @key{SPC} (or @kbd{y}), -@key{DEL} (or @kbd{n}), @key{RET} (or @kbd{q}), @kbd{C-l} and @kbd{C-r}. -The answers are the same as in @code{query-replace}, though not all of -the @code{query-replace} options are meaningful. - - These responses include @key{SPC} to continue, and @key{DEL} to skip -the remainder of this repetition of the macro and start right away with -the next repetition. @key{RET} means to skip the remainder of this -repetition and cancel further repetitions. @kbd{C-l} redraws the screen -and asks you again for a character to say what to do. - - @kbd{C-r} enters a recursive editing level, in which you can perform -editing which is not part of the macro. When you exit the recursive -edit using @kbd{C-M-c}, you are asked again how to continue with the -keyboard macro. If you type a @key{SPC} at this time, the rest of the -macro definition is executed. It is up to you to leave point and the -text in a state such that the rest of the macro will do what you -want.@refill - - @kbd{C-u C-x q}, which is @kbd{C-x q} with a numeric argument, -performs a completely different function. It enters a recursive edit -reading input from the keyboard, both when you type it during the -definition of the macro, and when it is executed from the macro. During -definition, the editing you do inside the recursive edit does not become -part of the macro. During macro execution, the recursive edit gives you -a chance to do some particularized editing on each repetition. -@xref{Recursive Edit}. - - Another way to vary the behavior of a keyboard macro is to use a -register as a counter, incrementing it on each repetition of the macro. -@xref{RegNumbers}. +@findex safe-local-eval-forms + The @code{safe-local-eval-forms} is a customizable list of eval +forms which are safe to eval, so Emacs should not ask for +confirmation to evaluate these forms, even if +@code{enable-local-variables} says to ask for confirmation in general. @node Key Bindings @section Customizing Key Bindings @@ -1304,7 +1087,7 @@ name which usually consists of lower-case letters and hyphens. * Init Rebinding:: Rebinding keys with your init file, @file{.emacs}. * Function Keys:: Rebinding terminal function keys. * Named ASCII Chars:: Distinguishing @key{TAB} from @kbd{C-i}, and so on. -* Non-ASCII Rebinding:: Rebinding non-ASCII characters such as Latin-1. +* Non-ASCII Rebinding:: Rebinding non-@acronym{ASCII} characters such as Latin-1. * Mouse Buttons:: Rebinding mouse buttons in Emacs. * Disabling:: Disabling a command means confirmation is required before it can be executed. This is done to protect @@ -1628,8 +1411,8 @@ command is less work to invoke when you really want to. you can specify them in your @file{.emacs} file by using their Lisp syntax. (@xref{Init File}.) - The simplest method for doing this works for ASCII characters and -Meta-modified ASCII characters only. This method uses a string to + The simplest method for doing this works for @acronym{ASCII} characters and +Meta-modified @acronym{ASCII} characters only. This method uses a string to represent the key sequence you want to rebind. For example, here's how to bind @kbd{C-z} to @code{shell}: @@ -1659,7 +1442,7 @@ string, you can use the Emacs Lisp escape sequences, @samp{\t}, (global-set-key "\C-x\t" 'indent-rigidly) @end example - These examples show how to write some other special ASCII characters + These examples show how to write some other special @acronym{ASCII} characters in strings for key bindings: @example @@ -1669,7 +1452,7 @@ in strings for key bindings: @end example When the key sequence includes function keys or mouse button events, -or non-ASCII characters such as @code{C-=} or @code{H-a}, you must use +or non-@acronym{ASCII} characters such as @code{C-=} or @code{H-a}, you must use the more general method of rebinding, which uses a vector to specify the key sequence. @@ -1681,8 +1464,8 @@ character, write it as a Lisp character constant: @samp{?} followed by the character as it would appear in a string. Here are examples of using vectors to rebind @kbd{C-=} (a control -character not in ASCII), @kbd{C-M-=} (not in ASCII because @kbd{C-=} -is not), @kbd{H-a} (a Hyper character; ASCII doesn't have Hyper at +character not in @acronym{ASCII}), @kbd{C-M-=} (not in @acronym{ASCII} because @kbd{C-=} +is not), @kbd{H-a} (a Hyper character; @acronym{ASCII} doesn't have Hyper at all), @key{F7} (a function key), and @kbd{C-Mouse-1} (a keyboard-modified mouse button): @@ -1713,7 +1496,7 @@ by listing each of the characters within the square brackets that delimit the vector. Language and coding systems can cause problems with key bindings -for non-ASCII characters. @xref{Non-ASCII Rebinding}. +for non-@acronym{ASCII} characters. @xref{Non-ASCII Rebinding}. @node Function Keys @subsection Rebinding Function Keys @@ -1758,7 +1541,7 @@ given function key on your terminal, type @kbd{C-h c} followed by that key. A key sequence which contains function key symbols (or anything but -ASCII characters) must be a vector rather than a string. The vector +@acronym{ASCII} characters) must be a vector rather than a string. The vector syntax uses spaces between the elements, and square brackets around the whole vector. Thus, to bind function key @samp{f1} to the command @code{rmail}, write the following: @@ -1806,10 +1589,10 @@ word: @end example @node Named ASCII Chars -@subsection Named ASCII Control Characters +@subsection Named @acronym{ASCII} Control Characters @key{TAB}, @key{RET}, @key{BS}, @key{LFD}, @key{ESC} and @key{DEL} -started out as names for certain ASCII control characters, used so often +started out as names for certain @acronym{ASCII} control characters, used so often that they have special keys of their own. Later, users found it convenient to distinguish in Emacs between these keys and the ``same'' control characters typed with the @key{CTRL} key. @@ -1818,25 +1601,25 @@ control characters typed with the @key{CTRL} key. reports these keys to Emacs. It treats the ``special'' keys as function keys named @code{tab}, @code{return}, @code{backspace}, @code{linefeed}, @code{escape}, and @code{delete}. These function keys translate -automatically into the corresponding ASCII characters @emph{if} they +automatically into the corresponding @acronym{ASCII} characters @emph{if} they have no bindings of their own. As a result, neither users nor Lisp programs need to pay attention to the distinction unless they care to. If you do not want to distinguish between (for example) @key{TAB} and -@kbd{C-i}, make just one binding, for the ASCII character @key{TAB} +@kbd{C-i}, make just one binding, for the @acronym{ASCII} character @key{TAB} (octal code 011). If you do want to distinguish, make one binding for -this ASCII character, and another for the ``function key'' @code{tab}. +this @acronym{ASCII} character, and another for the ``function key'' @code{tab}. - With an ordinary ASCII terminal, there is no way to distinguish + With an ordinary @acronym{ASCII} terminal, there is no way to distinguish between @key{TAB} and @kbd{C-i} (and likewise for other such pairs), because the terminal sends the same character in both cases. @node Non-ASCII Rebinding -@subsection Non-ASCII Characters on the Keyboard -@cindex rebinding non-ASCII keys -@cindex non-ASCII keys, binding +@subsection Non-@acronym{ASCII} Characters on the Keyboard +@cindex rebinding non-@acronym{ASCII} keys +@cindex non-@acronym{ASCII} keys, binding -If your keyboard has keys that send non-ASCII characters, such as +If your keyboard has keys that send non-@acronym{ASCII} characters, such as accented letters, rebinding these keys is a bit tricky. There are two solutions you can use. One is to specify a keyboard coding system, using @code{set-keyboard-coding-system} (@pxref{Specify Coding}). @@ -1852,7 +1635,7 @@ Events,,,elisp, The Emacs Lisp Reference Manual}.}, like this: @noindent Type @kbd{C-q} followed by the key you want to bind, to insert @var{char}. -Since this puts a non-ASCII character in the @file{.emacs}, you should +Since this puts a non-@acronym{ASCII} character in the @file{.emacs}, you should specify the proper coding system for that file. @xref{Init Syntax}. Specify the same coding system for the file that you use for your keyboard. @@ -2091,8 +1874,8 @@ input processing; the keys that are looked up in keymaps contain the characters that result from keyboard translation. On a window system, the keyboard key named @key{DELETE} is a function -key and is distinct from the ASCII character named @key{DEL}. -@xref{Named ASCII Chars}. Keyboard translations affect only ASCII +key and is distinct from the @acronym{ASCII} character named @key{DEL}. +@xref{Named ASCII Chars}. Keyboard translations affect only @acronym{ASCII} character input, not function keys; thus, the above example used on a window system does not affect the @key{DELETE} key. However, the translation above isn't necessary on window systems, because Emacs can @@ -2225,17 +2008,17 @@ Backslash and double-quote are the only characters for which backslash sequences are mandatory. @samp{\C-} can be used as a prefix for a control character, as in -@samp{\C-s} for ASCII control-S, and @samp{\M-} can be used as a prefix for +@samp{\C-s} for @acronym{ASCII} control-S, and @samp{\M-} can be used as a prefix for a Meta character, as in @samp{\M-a} for @kbd{Meta-A} or @samp{\M-\C-a} for @kbd{Control-Meta-A}.@refill @cindex international characters in @file{.emacs} -@cindex non-ASCII characters in @file{.emacs} -If you want to include non-ASCII characters in strings in your init +@cindex non-@acronym{ASCII} characters in @file{.emacs} +If you want to include non-@acronym{ASCII} characters in strings in your init file, you should consider putting a @w{@samp{-*-coding: @var{coding-system}-*-}} tag on the first line which states the coding system used to save your @file{.emacs}, as explained in @ref{Recognize -Coding}. This is because the defaults for decoding non-ASCII text might +Coding}. This is because the defaults for decoding non-@acronym{ASCII} text might not yet be set up by the time Emacs reads those parts of your init file which use such strings, possibly leading Emacs to decode those strings incorrectly. @@ -2248,7 +2031,7 @@ strings and characters are not interchangeable in Lisp; some contexts require one and some contexts require the other. @xref{Non-ASCII Rebinding}, for information about binding commands to -keys which send non-ASCII characters. +keys which send non-@acronym{ASCII} characters. @item True: @code{t} stands for `true'. @@ -2510,3 +2293,7 @@ If that user name matches the real user-ID, then Emacs uses @env{HOME}; otherwise, it looks up the home directory corresponding to that user name in the system's data base of users. @c LocalWords: backtab + +@ignore + arch-tag: c68abddb-4410-4fb5-925f-63394e971d93 +@end ignore diff --git a/man/dired-x.texi b/man/dired-x.texi index a117201954..ad7711d10a 100644 --- a/man/dired-x.texi +++ b/man/dired-x.texi @@ -700,6 +700,9 @@ where each @var{command} can either be a string or a lisp expression that evaluates to a string. If several commands are given, all of them will temporarily be pushed onto the history. +If @samp{*} in the shell command, that means to substitute the file +name. + You can set this variable in your @file{~/.emacs}. For example, to add rules for @samp{.foo} and @samp{.bar} file extensions, write @@ -1105,11 +1108,6 @@ will toggle between those two. @end table @table @kbd -@findex dired-goto-file -@kindex M-g -@item M-g -(@code{dired-goto-file}) Go to the line of a file (or directory). - @findex dired-goto-subdir @kindex M-G @item M-G @@ -1118,43 +1116,6 @@ This command reads its argument, with completion derived from the names of the inserted subdirectories. @end table -@table @kbd -@item w -@cindex Adding to the kill ring in Dired. -@kindex w -@findex dired-copy-filename-as-kill -(@code{dired-copy-filename-as-kill}) The @kbd{w} command puts the names -of the marked (or next @var{N}) files into the kill ring, as if you had -killed them with @kbd{C-w}. With a zero prefix argument @var{N}=0, use the -complete pathname of each file. With a raw (just @kbd{C-u}) prefix argument, -use the relative pathname of each marked file. As a special case, if no -prefix argument is given and point is on a directory headerline, it -gives you the name of that directory, without looking for marked files. - -@vindex dired-marked-files -The list of names is also stored onto the variable @code{dired-marked-files} -for use, e.g., in the @kbd{M-:} (@code{eval-expression}) command. - -As this command also displays what was pushed onto the kill ring, you can -use it to display the list of currently marked files in the -echo area (unless you happen to be on a subdirectory headerline). - -You can then feed the file name to other Emacs commands with @kbd{C-y}. -For example, say you want to rename a file with a long name to a slightly -different name. First type @kbd{w} to push the old name onto the kill -ring. Then type @kbd{R} to rename it and use @kbd{C-y} inside @kbd{R}'s -minibuffer prompt to insert the old name at a convenient place. - -@item T -@kindex T -@cindex Toggling marks. -@findex dired-do-toggle -(@code{dired-do-toggle}) Toggle marks. That is, currently marked -files become unmarked and vice versa. Files marked with other flags -(such as @samp{D}) are not affected. The special directories @file{.} -and @file{..} are never toggled. -@end table - @table @code @item dired-smart-shell-command @findex dired-smart-shell-command @@ -1312,3 +1273,7 @@ Lawrence R. Dodd @bye @c dired-x.texi ends here. + +@ignore + arch-tag: 201727aa-9318-4c74-a0d7-4f51c550c4de +@end ignore diff --git a/man/dired.texi b/man/dired.texi index 40882d7ad2..88e994ed02 100644 --- a/man/dired.texi +++ b/man/dired.texi @@ -39,6 +39,7 @@ files. * Hiding Subdirectories:: Making subdirectories visible or invisible. * Updating: Dired Updating. Discarding lines for files of no interest. * Find: Dired and Find. Using `find' to choose the files for Dired. +* Misc: Misc Dired Commands. Various other features. @end menu @node Dired Enter @@ -85,6 +86,11 @@ to @kbd{C-n}. @kbd{p} is equivalent to @kbd{C-p}. (Moving by lines is so common in Dired that it deserves to be easy to type.) @key{DEL} (move up and unflag) is often useful simply for moving up. +@findex dired-goto-file +@kindex M-g + @kbd{M-g} (@code{dired-goto-file}) moves point to the line that +describes a specified file or directory. + Some additional navigation commands are available when the Dired buffer includes several directories. @xref{Subdirectory Motion}. @@ -329,7 +335,7 @@ those files. @item * @@ @kindex * @@ @r{(Dired)} @findex dired-mark-symlinks -@cindex marking symlinks (in Dired) +@cindex marking symbolic links (in Dired) Mark all symbolic links with @samp{*} (@code{dired-mark-symlinks}). With a numeric argument, unmark all those files. @@ -549,7 +555,7 @@ just one link) the name to give the link. @findex dired-do-symlink @kindex S @r{(Dired)} -@cindex symlinks (in Dired) +@cindex symbolic links (creation in Dired) @item S @var{new} @key{RET} Make symbolic links to the specified files (@code{dired-do-symlink}). The argument @var{new} is the directory to make the links in, or (if @@ -1086,3 +1092,33 @@ matching a given regular expression. variable @code{find-ls-option}, whose default value specifies using options @samp{-ld} for @code{ls}. If your listings are corrupted, you may need to change the value of this variable. + +@node Misc Dired Commands +@section Other Dired Commands + +@table @kbd +@item w +@cindex Adding to the kill ring in Dired. +@kindex w +@findex dired-copy-filename-as-kill +The @kbd{w} command (@code{dired-copy-filename-as-kill}) puts the +names of the marked (or next @var{n}) files into the kill ring, as if +you had killed them with @kbd{C-w}. With a zero prefix argument +@var{n}=0, use the absolute file name of each marked file. With just +@kbd{C-u} as the prefix argument, use the relative file name of each +marked file. As a special case, if no prefix argument is given and +point is on a directory headerline, @kbd{w} gives you the name of that +directory without looking for marked files. + +@vindex dired-marked-files +The main purpose of the @kbd{w} command is so that you can yank the +file names into arguments for other Emacs commands. It also displays +what was pushed onto the kill ring, so you can use it to display the +list of currently marked files in the echo area. It also stores the +list of names in the variable @code{dired-marked-files}, for use in +Lisp expressions. +@end table + +@ignore + arch-tag: d105f9b9-fc1b-4c5f-a949-9b2cf3ca2fc1 +@end ignore diff --git a/man/display.texi b/man/display.texi index b8ea515acf..2c530ec480 100644 --- a/man/display.texi +++ b/man/display.texi @@ -756,13 +756,35 @@ hidden lines. This variable becomes local automatically when set. @node Optional Mode Line @section Optional Mode Line Features +@cindex buffer size display +@cindex display of buffer size +@findex size-indication-mode + The buffer percentage @var{pos} indicates the percentage of the +buffer above the top of the window. You can additionally display the +size of the buffer by typing @kbd{M-x size-indication-mode} to turn on +Size Indication mode. The size will be displayed immediately +following the buffer percentage like this: + +@example +@var{POS} of @var{SIZE} +@end example + +@noindent +Here @var{SIZE} is the human readable representation of the number of +characters in the buffer, which means that @samp{k} for 10^3, @samp{M} +for 10^6, @samp{G} for 10^9, etc., are used to abbreviate. + +@cindex narrowing, and buffer size display + If you have narrowed the buffer (@pxref{Narrowing}), the size of the +accessible part of the buffer is shown. + @cindex line number display @cindex display of line number @findex line-number-mode The current line number of point appears in the mode line when Line Number mode is enabled. Use the command @kbd{M-x line-number-mode} to turn this mode on and off; normally it is on. The line number appears -before the buffer percentage @var{pos}, with the letter @samp{L} to +after the buffer percentage @var{pos}, with the letter @samp{L} to indicate what it is. @xref{Minor Modes}, for more information about minor modes and about how to use this command. @@ -866,20 +888,20 @@ lines are displayed in the @code{mode-line} face. @section How Text Is Displayed @cindex characters (in text) - ASCII printing characters (octal codes 040 through 0176) in Emacs + @acronym{ASCII} printing characters (octal codes 040 through 0176) in Emacs buffers are displayed with their graphics, as are non-ASCII multibyte printing characters (octal codes above 0400). - Some ASCII control characters are displayed in special ways. The + Some @acronym{ASCII} control characters are displayed in special ways. The newline character (octal code 012) is displayed by starting a new line. The tab character (octal code 011) is displayed by moving to the next tab stop column (normally every 8 columns). - Other ASCII control characters are normally displayed as a caret + Other @acronym{ASCII} control characters are normally displayed as a caret (@samp{^}) followed by the non-control version of the character; thus, control-A is displayed as @samp{^A}. - Non-ASCII characters 0200 through 0237 (octal) are displayed with + Non-@acronym{ASCII} characters 0200 through 0237 (octal) are displayed with octal escape sequences; thus, character code 0230 (octal) is displayed as @samp{\230}. The display of character codes 0240 through 0377 (octal) may be either as escape sequences or as graphics. They do not @@ -1037,3 +1059,7 @@ tab character. To enable this feature, set the variable a minor mode that highlights the line containing point. Use @kbd{M-x hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x global-hl-line-mode} enables or disables the same mode globally. + +@ignore + arch-tag: 2219f910-2ff0-4521-b059-1bd231a536c4 +@end ignore diff --git a/man/doclicense.texi b/man/doclicense.texi index 0369ea06bb..23ec98c202 100644 --- a/man/doclicense.texi +++ b/man/doclicense.texi @@ -366,3 +366,7 @@ If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. + +@ignore + arch-tag: c1679162-1d8a-4f02-bc52-2e71765f0165 +@end ignore diff --git a/man/ebrowse.texi b/man/ebrowse.texi index 8a500a0feb..8e3510242c 100644 --- a/man/ebrowse.texi +++ b/man/ebrowse.texi @@ -1451,3 +1451,7 @@ in on with the command @kbd{C-c b m}. @contents @bye + +@ignore + arch-tag: 52fe78ac-a1c4-48e7-815e-0a31acfad4bf +@end ignore diff --git a/man/ediff.texi b/man/ediff.texi index 7499f6d793..b1447386b0 100644 --- a/man/ediff.texi +++ b/man/ediff.texi @@ -641,7 +641,7 @@ user can always forcefully refine specific difference regions by typing @kindex h Cycles between full highlighting, the mode where fine differences are not highlighted (but computed), and the mode where highlighting is done with -ASCII strings. The latter is not really recommended, unless on a dumb TTY. +@acronym{ASCII} strings. The latter is not really recommended, unless on a dumb TTY. @item r @kindex r @@ -1558,7 +1558,7 @@ white space and newlines. This feature can be toggled on/off interactively, via the command @kbd{##}. @end table -@strong{Note:} In order for this feature to work, auto-refining of +@strong{Please note:} in order for this feature to work, auto-refining of difference regions must be on, since otherwise Ediff won't know if there are fine differences between regions. On devices where Emacs can display faces, auto-refining is a default, but it is not turned on by default on @@ -1693,8 +1693,8 @@ faces, you can modify them when Ediff is being loaded using ediff-current-diff-face-B))) @end smallexample -@strong{Note:} To set Ediff's faces, use only @code{copy-face} or -@code{set/make-face-@dots{}} as shown above. Emacs' low-level +@strong{Please note:} to set Ediff's faces, use only @code{copy-face} +or @code{set/make-face-@dots{}} as shown above. Emacs' low-level face-manipulation functions should be avoided. @node Narrowing, Refinement of Difference Regions, Highlighting Difference Regions, Customization @@ -2473,3 +2473,7 @@ Eli Zaretskii (eliz@@is.elta.co.il) @setchapternewpage odd @contents @bye + +@ignore + arch-tag: 165ecb88-d03c-44b1-a921-b93f50b05b46 +@end ignore diff --git a/man/emacs-mime.texi b/man/emacs-mime.texi index ab47e5a900..bdeea1f470 100644 --- a/man/emacs-mime.texi +++ b/man/emacs-mime.texi @@ -1380,3 +1380,7 @@ Content-Disposition Header Field @bye @c End: + +@ignore + arch-tag: c7ef2fd0-a91c-4e10-aa52-c1a2b11b1a8d +@end ignore diff --git a/man/emacs.texi b/man/emacs.texi index ca5ddf039b..3162cd1e16 100644 --- a/man/emacs.texi +++ b/man/emacs.texi @@ -166,13 +166,15 @@ Important Text-Changing Commands * Display:: Controlling what text is displayed. * Search:: Finding or replacing occurrences of a string. * Fixit:: Commands especially useful for fixing typos. +* Keyboard Macros:: A keyboard macro records a sequence of + keystrokes to be replayed with a single command. Major Structures of Emacs * Files:: All about handling files. * Buffers:: Multiple buffers; editing several files at once. * Windows:: Viewing two pieces of text at once. * Frames:: Running the same Emacs session in multiple X windows. -* International:: Using non-ASCII character sets (the MULE features). +* International:: Using non-@acronym{ASCII} character sets (the MULE features). Advanced Features * Major Modes:: Text mode vs. Lisp mode vs. C mode ... @@ -334,6 +336,16 @@ Commands for Fixing Typos * Fixing Case:: Correcting case of last word entered. * Spelling:: Apply spelling checker to a word or a whole buffer. +Keyboard Macros + +* Basic Keyboard Macro:: Defining and running keyboard macros. +* Keyboard Macro Ring:: Where previous keyboard macros are saved. +* Keyboard Macro Counter:: Inserting incrementing numbers in macros. +* Keyboard Macro Query:: Making keyboard macros do different things each time. +* Save Keyboard Macro:: Giving keyboard macros names; saving them in files. +* Edit Keyboard Macro:: Editing keyboard macros. +* Keyboard Macro Step-Edit:: Interactively executing and editing a keyboard macro. + File Handling * File Names:: How to type and edit file-name arguments. @@ -699,7 +711,7 @@ The Diary * Adding to Diary:: Commands to create diary entries. * Special Diary Entries:: Anniversaries, blocks of dates, cyclic entries, etc. -@sc{Gnus} +Gnus * Buffers of Gnus:: The group, summary, and article buffers. * Gnus Startup:: What you should know about starting Gnus. @@ -721,8 +733,6 @@ Customization * Variables:: Many Emacs commands examine Emacs variables to decide what to do; by setting variables, you can control their functioning. -* Keyboard Macros:: A keyboard macro records a sequence of - keystrokes to be replayed with a single command. * Key Bindings:: The keymaps say what command each key runs. By changing them, you can "redefine keys". * Keyboard Translations:: @@ -744,12 +754,6 @@ Variables * Locals:: Per-buffer values of variables. * File Variables:: How files can specify variable values. -Keyboard Macros - -* Basic Kbd Macro:: Defining and running keyboard macros. -* Save Kbd Macro:: Giving keyboard macros names; saving them in files. -* Kbd Macro Query:: Making keyboard macros do different things each time. - Customizing Key Bindings * Keymaps:: Generalities. The global keymap. @@ -806,6 +810,7 @@ Command Line Options and Arguments * Borders X:: Internal and external borders, under X. * Title X:: Specifying the initial frame's title. * Icons X:: Choosing what sort of icon to use, under X. +* Misc X:: Other display options. X Resources @@ -924,9 +929,9 @@ redistribute the GNU Emacs received from them under the usual terms of the General Public License. In other words, the program must be free for you when you get it, not just free for the manufacturer. -You can also order copies of GNU Emacs from the Free Software Foundation -on CD-ROM@. This is a convenient and reliable way to get a copy; it is -also a good way to help fund our work. (The Foundation has always +You can also order copies of GNU Emacs from the Free Software +Foundation. This is a convenient and reliable way to get a copy; it +is also a good way to help fund our work. (The Foundation has always received most of its funds in this way.) An order form is included in the file @file{etc/ORDERS} in the Emacs distribution, and on our web site in @url{http://www.gnu.org/order/order.html}. For further @@ -951,7 +956,10 @@ company policy is unsympathetic to the idea of donating to charity, you might instead suggest ordering a CD-ROM from the Foundation occasionally, or subscribing to periodic updates. -@iftex +@ifnotinfo +@node Acknowledgments, Copying, Distrib, Top +@section Acknowledgments + Contributors to GNU Emacs include Per Abrahamsen, Jay K. Adams, Joe Arceneaux, Boaz Ben-Zvi, Jim Blandy, Terrence Brannon, Frank Bresz, Peter Breton, Kevin Broadey, Vincent Broman, David M. Brown, Bill @@ -969,7 +977,7 @@ Heuer, Manabu Higashida, Anders Holst, Kurt Hornik, Tom Houlder, Lars Ingebrigtsen, Andrew Innes, Michael K. Johnson, Kyle Jones, Tomoji Kagatani, Brewster Kahle, David Kaufman, Henry Kautz, Howard Kaye, Michael Kifer, Richard King, Larry K. Kolodney, Robert Krawitz, -Sebastian Kremer, Geoff Kuenning, David K@aa gedal, Daniel LaLiberte, +Sebastian Kremer, Geoff Kuenning, David K@aa{}gedal, Daniel LaLiberte, Aaron Larson, James R. Larus, Frederic Lepied, Lars Lindberg, Eric Ludlam, Neil M. Mager, Ken Manheimer, Bill Mann, Brian Marick, Simon Marshall, Bengt Martensson, Charlie Martin, Thomas May, Roland McGrath, @@ -993,7 +1001,7 @@ Warsaw, Morten Welinder, Joseph Brian Wells, Rodney Whitby, Ed Wilkinson, Mike Williams, Steven A. Wood, Dale R. Worley, Felix S. T. Wu, Tom Wurgler, Eli Zaretskii, Jamie Zawinski, Ian T. Zimmermann, Reto Zimmermann, and Neal Ziring. -@end iftex +@end ifnotinfo @node Copying, GNU Free Documentation License, Distrib, Top @unnumbered GNU GENERAL PUBLIC LICENSE @@ -1463,6 +1471,7 @@ edit files while running shell commands. @include display.texi @include search.texi @include fixit.texi +@include kmacro.texi @include files.texi @include buffers.texi @include windows.texi @@ -1542,3 +1551,6 @@ edit files while running shell commands. @contents @bye +@ignore + arch-tag: ed48740a-410b-46ea-9387-c9a9252a3392 +@end ignore diff --git a/man/entering.texi b/man/entering.texi index 5b6c28472b..9200082328 100644 --- a/man/entering.texi +++ b/man/entering.texi @@ -149,3 +149,7 @@ inspired by the use of @kbd{C-z} and @kbd{C-c} on several operating systems as the characters for stopping or killing a program, but that is their only relationship with the operating system. You can customize these keys to run any commands of your choice (@pxref{Keymaps}). + +@ignore + arch-tag: df798d8b-f253-4113-b585-f528f078a944 +@end ignore diff --git a/man/eshell.texi b/man/eshell.texi index 188ac520a1..c909b6ebb4 100644 --- a/man/eshell.texi +++ b/man/eshell.texi @@ -1,5 +1,4 @@ \input texinfo @c -*-texinfo-*- -@c "@(#)$Name: $:$Id: eshell.texi,v 1.17 2002/12/10 13:16:31 pj Exp $" @c %**start of header @setfilename ../info/eshell @settitle Eshell: The Emacs Shell @@ -9,7 +8,7 @@ @copying This manual is for Eshell, the Emacs shell. -Copyright @copyright{} 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +Copyright @copyright{} 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -671,6 +670,8 @@ Below is complete list of known problems with Eshell version 2.4.1, which is the version included with Emacs 21.1. @table @asis +@item Documentation incomplete + @item Differentiate between aliases and functions Allow for a bash-compatible syntax, such as: @@ -1128,3 +1129,7 @@ Since it keeps the cursor up where the command was invoked. @printindex ky @bye + +@ignore + arch-tag: 776409ba-cb15-42b9-b2b6-d2bdc7ebad01 +@end ignore diff --git a/man/eudc.texi b/man/eudc.texi index 511069973d..aaf130eb48 100644 --- a/man/eudc.texi +++ b/man/eudc.texi @@ -973,3 +973,7 @@ in testing and proofreading the code and docs of @file{ph.el}. @setchapternewpage odd @contents @bye + +@ignore + arch-tag: 1b79460b-4ea1-441d-ab45-05ddd16ef241 +@end ignore diff --git a/man/faq.texi b/man/faq.texi index b25ef4bca6..6894918079 100644 --- a/man/faq.texi +++ b/man/faq.texi @@ -161,19 +161,19 @@ written inside quotes or on lines by themselves, like this: Any real spaces in such a key sequence should be ignored; only @key{SPC} really means press the space key. -The ASCII code sent by @kbd{C-x} (except for @kbd{C-?}) is the value +The @acronym{ASCII} code sent by @kbd{C-x} (except for @kbd{C-?}) is the value that would be sent by pressing just @key{x} minus 96 (or 64 for upper-case @key{X}) and will be from 0 to 31. On Unix and GNU/Linux -terminals, the ASCII code sent by @kbd{M-x} is the sum of 128 and the -ASCII code that would be sent by pressing just @key{x}. Essentially, +terminals, the @acronym{ASCII} code sent by @kbd{M-x} is the sum of 128 and the +@acronym{ASCII} code that would be sent by pressing just @key{x}. Essentially, @key{Control} turns off bits 5 and 6 and @key{Meta} turns on bit 7@footnote{ DOS and Windows terminals don't set bit 7 when the @key{Meta} key is pressed.}. -@kbd{C-?} (aka @key{DEL}) is ASCII code 127. It is a misnomer to call +@kbd{C-?} (aka @key{DEL}) is @acronym{ASCII} code 127. It is a misnomer to call @kbd{C-?} a ``control'' key, since 127 has both bits 5 and 6 turned ON. -Also, on very few keyboards does @kbd{C-?} generate ASCII code 127. +Also, on very few keyboards does @kbd{C-?} generate @acronym{ASCII} code 127. @inforef{Text Characters, Text Characters, emacs}, and @inforef{Keys, Keys, emacs}, for more information. (@xref{On-line manual}, for more @@ -613,7 +613,7 @@ command-apropos}). @cindex Command description in the manual @item -The command @kbd{C-h C-f} (@code{Info-goto-emacs-command-node}) prompts +The command @kbd{C-h F} (@code{Info-goto-emacs-command-node}) prompts for the name of a command, and then attempts to find the section in the Emacs manual where that command is described. @@ -980,7 +980,7 @@ The Emacs FAQ is available in several ways: @item Inside of Emacs itself. You can get it from selecting the @samp{Emacs FAQ} option from the @samp{Help} menu of the Emacs menu bar at the top -of any Emacs frame, or by typing @kbd{C-h F} (@kbd{M-x view-emacs-FAQ}). +of any Emacs frame, or by typing @kbd{C-h C-f} (@kbd{M-x view-emacs-FAQ}). @item Via USENET. If you can read news, the FAQ should be available in your @@ -1110,7 +1110,7 @@ Emacs @value{VER} is the current version as of this writing. @cindex Differences between Emacs 19 and Emacs 20 @cindex Emacs 20, new features in -To find out what has changed in recent versions, type @kbd{C-h n} +To find out what has changed in recent versions, type @kbd{C-h C-n} (@kbd{M-x view-emacs-news}). The oldest changes are at the bottom of the file, so you might want to read it starting there, rather than at the top. @@ -2687,7 +2687,7 @@ instructions how to do that. The file @file{etc/PROBLEMS} in the Emacs distribution lists various known problems with building and using Emacs on specific platforms; -type @kbd{C-h P} to read it. +type @kbd{C-h C-e} to read it. @menu * Problems with very large files:: @@ -4541,7 +4541,7 @@ actually behaves. @cindex Help invoked by Backspace @cindex DEL key does not delete -The @key{Backspace} key (on most keyboards) generates ASCII code 8. +The @key{Backspace} key (on most keyboards) generates @acronym{ASCII} code 8. @kbd{C-h} sends the same code. In Emacs by default @kbd{C-h} invokes help-command. This is intended to be easy to remember since the first letter of @samp{help} is @samp{h}. The easiest solution to this problem @@ -4739,7 +4739,7 @@ press @key{Meta} and @key{a} together, but with @key{ESC}, you press @cindex Lacking an Escape key @cindex Escape key, lacking -Type @kbd{C-[} instead. This should send ASCII code 27 just like an +Type @kbd{C-[} instead. This should send @acronym{ASCII} code 27 just like an Escape key would. @kbd{C-3} may also work on some terminal (but not under X). For many terminals (notably DEC terminals) @key{F11} generates @key{ESC}. If not, the following form can be used to bind it: @@ -4791,7 +4791,7 @@ is how to make @kbd{H-M-RIGHT} move forward a word: @item Not all modifiers are permitted in all situations. @key{Hyper}, @key{Super}, and @key{Alt} are not available on Unix character -terminals. Non-ASCII keys and mouse events (e.g. @kbd{C-=} and +terminals. Non-@acronym{ASCII} keys and mouse events (e.g. @kbd{C-=} and @kbd{Mouse-1}) also fall under this category. @end itemize @@ -4821,7 +4821,7 @@ For X11: Make sure it really is a @key{Meta} key. Use @code{xev} to find out what keysym your @key{Meta} key generates. It should be either @code{Meta_L} or @code{Meta_R}. If it isn't, use @file{xmodmap} to fix the situation. If @key{Meta} does generate @code{Meta_L} or -@code{Meta_R}, but @kbd{M-x} produces a non-ASCII character, put this in +@code{Meta_R}, but @kbd{M-x} produces a non-@acronym{ASCII} character, put this in your @file{~/.Xdefaults} file: @example @@ -4914,7 +4914,7 @@ Support, emacs}. On a Unix, when Emacs runs on a text-only terminal display or is invoked with @samp{emacs -nw}, you typically need to use @code{set-terminal-coding-system} to tell Emacs what the terminal can display, even after setting the language environment; otherwise -non-ASCII characters will display as @samp{?}. On other operating +non-@acronym{ASCII} characters will display as @samp{?}. On other operating systems, such as MS-DOS and MS-Windows, Emacs queries the OS about the character set supported by the display, and sets up the required terminal coding system automatically. @@ -5441,3 +5441,7 @@ part of the Gnus distribution. @contents @bye + +@ignore + arch-tag: fee0d62d-06cf-43d8-ac21-123408eaf10f +@end ignore diff --git a/man/files.texi b/man/files.texi index 2c18092286..f73d1370eb 100644 --- a/man/files.texi +++ b/man/files.texi @@ -2,7 +2,7 @@ @c Copyright (C) 1985,86,87,93,94,95,97,99, 2000, 2001 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. -@node Files, Buffers, Fixit, Top +@node Files, Buffers, Keyboard Macros, Top @chapter File Handling @cindex files @@ -139,7 +139,7 @@ literal @samp{~} should also be quoted with @samp{/:}. @code{substitute-in-file-name}. The substitution is performed only on file names read as such using the minibuffer. - You can include non-ASCII characters in file names if you set the + You can include non-@acronym{ASCII} characters in file names if you set the variable @code{file-name-coding-system} to a non-@code{nil} value. @xref{Specify Coding}. @@ -316,7 +316,7 @@ seek. This feature is available only when you are using a window system. @xref{Frames}. @findex find-file-literally - If you wish to edit a file as a sequence of ASCII characters with no special + If you wish to edit a file as a sequence of @acronym{ASCII} characters with no special encoding or conversion, use the @kbd{M-x find-file-literally} command. It visits a file, like @kbd{C-x C-f}, but does not do format conversion (@pxref{Formatted Text}), character code conversion (@pxref{Coding @@ -855,11 +855,10 @@ of the file. To do this, use @kbd{M-x revert-buffer}, which operates on the current buffer. Since reverting a buffer unintentionally could lose a lot of work, you must confirm this command with @kbd{yes}. - @code{revert-buffer} keeps point at the same distance (measured in -characters) from the beginning of the file. If the file was edited only -slightly, you will be at approximately the same piece of text after -reverting as before. If you have made drastic changes, the same value of -point in the old file may address a totally different piece of text. + @code{revert-buffer} tries to position point in such a way that, if +the file was edited only slightly, you will be at approximately the +same piece of text after reverting as before. However, if you have made +drastic changes, point may wind up in a totally different piece of text. Reverting marks the buffer as ``not modified'' until another change is made. @@ -1070,6 +1069,8 @@ file, sessions are not recorded for recovery. @node File Aliases @section File Name Aliases +@cindex symbolic links (visiting) +@cindex hard links (visiting) Symbolic links and hard links both make it possible for several file names to refer to the same file. Hard links are alternate names that @@ -1122,6 +1123,10 @@ from the Free Software Foundation. We also have free software to replace SCCS, known as CSSC; if you are using SCCS and don't want to make the incompatible change to RCS or CVS, you can switch to CSSC. + VC is enabled by default in Emacs. To disable it, set the +customizable variable @code{vc-handled-backends} to @code{nil} +(@pxref{Customizing VC}). + @menu * Introduction to VC:: How version control works in general. * VC Mode Line:: How the mode line shows version control status. @@ -1530,6 +1535,46 @@ range from red to blue spans the past 36 days instead of 360 days. A stretch factor greater than 1 means the color range spans more than a year. +From the annotate buffer, you can use the following keys to browse the +annotations of past revisions, view diffs, or view log entries: + +@itemize @bullet + +@item +Pressing @kbd{P} annotates the previous revision. It also takes a +numeric prefix argument, so for example @kbd{C-u 10 P} would take you +back 10 revisions. + +@item +Pressing @kbd{N} annotates the next revision. It also takes a numeric +prefix argument, so for example @kbd{C-u 10 N} would take you forward +10 revisions. + +@item +Pressing @kbd{J} annotates the revision at line (as denoted by the +version number on the same line). + +@item +Pressing @kbd{A} annotates the revision previous to line (as denoted +by the version number on the same line). This is useful to see the +state the file was in before the change on the current line was made. + +@item +Pressing @kbd{D} shows the diff of the revision at line with its +previous revision. This is useful to see what actually changed when +the revision denoted on the current line was committed. + +@item +Pressing @kbd{L} shows the log of the revision at line. This is +useful to see the author's description of the changes that occured +when the revision denoted on the current line was committed. + +@item +Pressing @kbd{W} annotates the workfile (most up to date) version. If +you used @kbd{P} and @kbd{N} to browse to other revisions, use this +key to return to the latest version. +@end itemize + @node Secondary VC Commands @subsection The Secondary Commands of VC @@ -2492,7 +2537,8 @@ The variable @code{vc-handled-backends} determines which version control systems VC should handle. The default value is @code{(RCS CVS SCCS)}, so it contains all three version systems that are currently supported. If you want VC to ignore one or more of these systems, -exclude its name from the list. +exclude its name from the list. To disable VC entirely, set this +variable to @code{nil}. The order of systems in the list is significant: when you visit a file registered in more than one system (@pxref{Local Version Control}), @@ -2859,6 +2905,7 @@ file system. On MS-DOS, it works by copying the file. the old contents of the file @var{new}. @findex make-symbolic-link +@cindex symbolic links (creation) @kbd{M-x make-symbolic-link} reads two file names @var{target} and @var{linkname}, then creates a symbolic link named @var{linkname}, which points at @var{target}. The effect is that future attempts to open file @@ -3186,3 +3233,7 @@ powerful heuristic defaults (@pxref{FFAP}), often based on the text at point. Partial Completion mode offers other features extending @code{find-file}, which can be used with @code{ffap}. @xref{Completion Options}. + +@ignore + arch-tag: 768d32cb-e15a-4cc1-b7bf-62c00ee12250 +@end ignore diff --git a/man/fixit.texi b/man/fixit.texi index 21f613a93a..75dde65868 100644 --- a/man/fixit.texi +++ b/man/fixit.texi @@ -1,7 +1,7 @@ @c This is part of the Emacs manual. @c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. -@node Fixit, Files, Search, Top +@node Fixit, Keyboard Macros, Search, Top @chapter Commands for Fixing Typos @cindex typos, fixing @cindex mistakes, correcting @@ -342,3 +342,7 @@ dictionary. The completion dictionary must be different because it cannot use employ root and affix information. For some languages there is a spell checking dictionary but no word completion dictionary. + +@ignore + arch-tag: 3359a443-96ed-448f-9f05-c8111ba8eac0 +@end ignore diff --git a/man/forms.texi b/man/forms.texi index 91a1f456f2..74876760cc 100644 --- a/man/forms.texi +++ b/man/forms.texi @@ -973,3 +973,7 @@ Software Foundation. Thanks, Richard! @contents @bye + +@ignore + arch-tag: 2ac9810b-aa49-4ea6-8030-d7f1ecd467ed +@end ignore diff --git a/man/frames.texi b/man/frames.texi index 57798a374d..7896adc41f 100644 --- a/man/frames.texi +++ b/man/frames.texi @@ -48,6 +48,7 @@ under X. * Frame Parameters:: Changing the colors and other modes of frames. * Scroll Bars:: How to enable and disable scroll bars; how to use them. * Wheeled Mice:: Using mouse wheels for scrolling. +* Drag and drop:: Using drag and drop to open files and insert text. * Menu Bars:: Enabling and disabling the menu bar. * Tool Bars:: Enabling and disabling the tool bar. * Dialog Boxes:: Controlling use of dialog boxes. @@ -69,7 +70,7 @@ commands for copying between Emacs and other X client programs. If you select a region with any of these mouse commands, and then immediately afterward type the @key{DELETE} function key, it deletes the region that you selected. The @key{BACKSPACE} function key and the -ASCII character @key{DEL} do not do this; if you type any other key +@acronym{ASCII} character @key{DEL} do not do this; if you type any other key in between the mouse command and @key{DELETE}, it does not do this. @findex mouse-set-region @@ -795,6 +796,40 @@ generating appropriate events for Emacs. @code{mouse-wheel-scroll-amount} determine where and by how much buffers are scrolled. +@node Drag and drop +@section Drag and drop in Emacs. + +@cindex drag and drop + Emacs supports drag and drop so that dropping of files and text is handeled. +Currently supported drag and drop protocols are XDND, Motif and the old +KDE 1.x protocol. There is no drag support yet. +When text is dropped on Emacs, Emacs inserts the text where it is dropped. +When a file is dragged from a file manager to Emacs, Emacs opens that file. +As a special case, if a file is dropped on a dired buffer the file is +copied or moved (depends on exactly how it is dragged and the application +it was dragged from) to the directory the dired buffer is displaying. + +@vindex x-dnd-open-file-other-window + A file is normally opened in the window it is dropped on, but if you +prefer the file to be opened in a new window you can customize the variable +@code{x-dnd-open-file-other-window}. + +@vindex x-dnd-types-alist + If you want to change the way Emacs handles drop of different types +or add a new type, you shall customize @code{x-dnd-types-alist}. This +requires detailed knowledge of what types other applications use +for drag and drop. + +@vindex x-dnd-protocol-alist + When an URL is dropped on Emacs it may be a file, but it may also be +another URL type (ftp, http, etc.). Emacs first checks +@code{x-dnd-protocol-alist} to determine what to do with the URL. If there +is no match there and if @code{browse-url-browser-function} is an alist, +Emacs looks for a match there. If no match is found the text for the URL +is inserted. If you want to alter Emacs behaviour you can customize these +variables. + + @node Menu Bars @section Menu Bars @cindex Menu Bar mode @@ -855,6 +890,16 @@ invoke the command to begin with. use of dialog boxes. This also controls whether to use file selection windows (but those are not supported on all platforms). +@vindex use-file-dialog + A file selection window is a special kind of dialog box for asking for +file names. + + You can customize the option @code{use-file-dialog} to suppress the +use of file selection windows even if you still want other kinds +of dialogs. This option has no effect if you have supressed all dialog +boxes with the option @code{use-dialog-box}. + + @node Tooltips @section Tooltips (or ``Balloon Help'') @@ -954,3 +999,7 @@ functionality is still available by holding down the @kbd{SHIFT} key when you press the mouse button. The Linux console supports this mode if it has support for the mouse enabled, e.g.@: using the @command{gpm} daemon. + +@ignore + arch-tag: 7dcf3a31-a43b-45d4-a900-445b10d77e49 +@end ignore diff --git a/man/glossary.texi b/man/glossary.texi index c347eb3f98..017630801a 100644 --- a/man/glossary.texi +++ b/man/glossary.texi @@ -27,16 +27,16 @@ Input, Alt}. @item Argument See `numeric argument.' -@item ASCII character -An ASCII character is either an ASCII control character or an ASCII +@item @acronym{ASCII} character +An @acronym{ASCII} character is either an @acronym{ASCII} control character or an @acronym{ASCII} printing character. @xref{User Input}. -@item ASCII control character -An ASCII control character is the Control version of an upper-case +@item @acronym{ASCII} control character +An @acronym{ASCII} control character is the Control version of an upper-case letter, or the Control version of one of the characters @samp{@@[\]^_?}. -@item ASCII printing character -ASCII printing characters include letters, digits, space, and these +@item @acronym{ASCII} printing character +@acronym{ASCII} printing characters include letters, digits, space, and these punctuation characters: @samp{!@@#$%^& *()_-+=|\~` @{@}[]:;"' <>,.?/}. @item Auto Fill Mode @@ -234,8 +234,8 @@ is typed. @xref{Completion}.@refill When a line of text is longer than the width of the window, it takes up more than one screen line when displayed. We say that the text line is continued, and all screen lines used for it after the -first are called continuation lines. @xref{Basic,Continuation,Basic -Editing}. A related Emacs feature is `filling' (q.v.@:). +first are called continuation lines. @xref{Continuation Lines}. +A related Emacs feature is `filling' (q.v.@:). @item Control Character A control character is a character that you type by holding down the @@ -280,7 +280,7 @@ The cursor is the rectangle on the screen which indicates the position called point (q.v.@:) at which insertion and deletion takes place. The cursor is on or under the character that follows point. Often people speak of `the cursor' when, strictly speaking, they mean -`point.' @xref{Basic,Cursor,Basic Editing}. +`point.' @xref{Point,Cursor}. @item Customization Customization is making minor changes in the way Emacs works. It is @@ -317,7 +317,7 @@ A defun is a major definition at the top level in a program. The name @key{DEL} is a character that runs the command to delete one character of text before the cursor. It is typically either the @key{DELETE} key or the @key{BACKSPACE} key, whichever one is easy to type. -@xref{Basic,DEL,Basic Editing}. +@xref{Erasing,DEL}. @item Deletion Deletion means erasing text without copying it into the kill ring @@ -547,7 +547,7 @@ just names. All the non-Meta (q.v.@:) characters except for the Control (q.v.@:) characters are graphic characters. These include letters, digits, punctuation, and spaces; they do not include @key{RET} or @key{ESC}. In Emacs, typing a graphic character inserts -that character (in ordinary editing modes). @xref{Basic,,Basic Editing}. +that character (in ordinary editing modes). @xref{Inserting Text}. @item Highlighting Highlighting text means displaying it with a different foreground and/or @@ -621,8 +621,8 @@ keys, pressing or releasing mouse buttons, and switching between Emacs frames. @xref{User Input}. @item Input Method -An input method is a system for entering non-ASCII text characters by -typing sequences of ASCII characters (q.v.@:). @xref{Input Methods}. +An input method is a system for entering non-@acronym{ASCII} text characters by +typing sequences of @acronym{ASCII} characters (q.v.@:). @xref{Input Methods}. @item Insertion Insertion means copying text into the buffer, either from the keyboard @@ -639,7 +639,7 @@ See `incremental search.' @item Justification Justification means adding extra spaces within lines of text to make them extend exactly to a specified width. -@xref{Filling,Justification}. +@xref{Format Justification}. @item Keyboard Macro Keyboard macros are a way of defining new Emacs commands from @@ -688,7 +688,7 @@ to exist. Any data within it, if not saved in a file, is lost. @item Language Environment Your choice of language environment specifies defaults for the input method (q.v.@:) and coding system (q.v.@:). @xref{Language -Environments}. These defaults are relevant if you edit non-ASCII text +Environments}. These defaults are relevant if you edit non-@acronym{ASCII} text (@pxref{International}). @item Line Wrapping @@ -730,7 +730,7 @@ A local value of a variable (q.v.@:) applies to only one buffer. @item @kbd{M-} @kbd{M-} in the name of a character is an abbreviation for @key{META}, one of the modifier keys that can accompany any character. -@xref{User Input}. +@xref{User Input,M-}. @item @kbd{M-C-} @kbd{M-C-} in the name of a character is an abbreviation for @@ -833,13 +833,13 @@ another. The usual way to move text by killing (q.v.@:) and then yanking (q.v.@:). @xref{Killing}. @item MULE -MULE refers to the Emacs features for editing multilingual non-ASCII text +MULE refers to the Emacs features for editing multilingual non-@acronym{ASCII} text using multibyte characters (q.v.@:). @xref{International}. @item Multibyte Character A multibyte character is a character that takes up several bytes in a -buffer. Emacs uses multibyte characters to represent non-ASCII text, -since the number of non-ASCII characters is much more than 256. +buffer. Emacs uses multibyte characters to represent non-@acronym{ASCII} text, +since the number of non-@acronym{ASCII} characters is much more than 256. @xref{International Chars, International Characters}. @item Named Mark @@ -875,7 +875,7 @@ characters replace the existing text after point rather than pushing it to the right. @xref{Minor Modes}. @item Page -A page is a unit of text, delimited by formfeed characters (ASCII +A page is a unit of text, delimited by formfeed characters (@acronym{ASCII} control-L, code 014) coming at the beginning of a line. Some Emacs commands are provided for moving over and operating on pages. @xref{Pages}. @@ -894,7 +894,7 @@ end of a word or expression. @xref{Syntax}. Point is the place in the buffer at which insertion and deletion occur. Point is considered to be between two characters, not at one character. The terminal's cursor (q.v.@:) indicates the location of -point. @xref{Basic,Point,Basic Editing}. +point. @xref{Point}. @item Prefix Argument See `numeric argument.' @@ -942,7 +942,7 @@ convention. For example, an ``ordinary'' character as an Emacs command inserts itself; so in this context, a special character is any character that does not normally insert itself (such as @key{DEL}, for example), and quoting it makes it insert itself as if it were not special. Not -all contexts allow quoting. @xref{Basic,Quoting,Basic Editing}. +all contexts allow quoting. @xref{Inserting Text,Quoting}. @item Quoting File Names Quoting a file name turns off the special significance of constructs @@ -1035,7 +1035,7 @@ systems. @xref{Scroll Bars}. @item Scrolling Scrolling means shifting the text in the Emacs window so as to see a -different part of the buffer. @xref{Display,Scrolling}. +different part of the buffer. @xref{Scrolling}. @item Searching Searching means moving point to the next occurrence of a specified @@ -1055,7 +1055,7 @@ using the secondary selection. @xref{Secondary Selection}. @item Selecting Selecting a buffer means making it the current (q.v.@:) buffer. -@xref{Buffers,Selecting}. +@xref{Select Buffer}. @item Selection Windowing systems allow an application program to specify @@ -1212,7 +1212,7 @@ two adjacent characters, words, balanced expressions (q.v.@:) or lines Truncating text lines in the display means leaving out any text on a line that does not fit within the right margin of the window displaying it. See also `continuation line.' -@xref{Basic,Truncation,Basic Editing}. +@xref{Continuation Lines,Truncation}. @item TTY See `text-only terminal.' @@ -1279,3 +1279,6 @@ undo a mistaken kill, or for copying or moving text. Some other systems call this ``pasting.'' @xref{Yanking}. @end table +@ignore + arch-tag: 0dd53ce1-5f09-4ac2-b13b-cf22b0f28d23 +@end ignore diff --git a/man/gnu.texi b/man/gnu.texi index e8b3bc482d..4185f8f911 100644 --- a/man/gnu.texi +++ b/man/gnu.texi @@ -542,3 +542,7 @@ this are bureaucracy and isometric struggles against competition. Free software will greatly reduce these drains in the area of software production. We must do this, in order for technical gains in productivity to translate into less work for us. + +@ignore + arch-tag: 21eb38f8-6fa0-480a-91cd-f3dab7148542 +@end ignore diff --git a/man/gnus-faq.texi b/man/gnus-faq.texi index acdb0edd5e..804da4cafc 100644 --- a/man/gnus-faq.texi +++ b/man/gnus-faq.texi @@ -671,3 +671,6 @@ Use an nnbabyl:all.SCORE (or nnmh, or nnml, or whatever) file containing: @end itemize +@ignore + arch-tag: 64dc5692-edb4-4848-a965-7aa0181acbb8 +@end ignore diff --git a/man/gnus.texi b/man/gnus.texi index b9e6dfc84a..9fa1285b91 100644 --- a/man/gnus.texi +++ b/man/gnus.texi @@ -22229,3 +22229,7 @@ former). The manual is unambiguous, but it can be confusing. @end iftex @c End: + +@ignore + arch-tag: c9fa47e7-78ca-4681-bda9-9fef45d1c819 +@end ignore diff --git a/man/help.texi b/man/help.texi index b6431c5ede..56fb9f542d 100644 --- a/man/help.texi +++ b/man/help.texi @@ -71,7 +71,7 @@ Similar, but searches for @var{topic} (which can be a regular expression) in the @emph{text} of the manual rather than in its indices. -@item C-h F +@item C-h C-f This brings up the Emacs FAQ, where you can use the usual search commands (@pxref{Search}) to find the information. @@ -343,38 +343,40 @@ use: @multitable {emulations} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} @item abbrev@tab abbreviation handling, typing shortcuts, macros. -@item bib@tab support for the bibliography processor @code{bib}. -@item c@tab C and C++ language support. +@item bib@tab code related to the @code{bib} bibliography processor. +@item c@tab support for the C language and related languages. @item calendar@tab calendar and time management support. @item comm@tab communications, networking, remote access to files. +@item convenience@tab convenience features for faster editing. @item data@tab support for editing files of data. @item docs@tab support for Emacs documentation. @item emulations@tab emulations of other editors. @item extensions@tab Emacs Lisp language extensions. -@item faces@tab support for using faces (fonts and colors; @pxref{Faces}). +@item faces@tab support for multiple fonts. +@item files@tab support for editing and manipulating files. @item frames@tab support for Emacs frames and window systems. @item games@tab games, jokes and amusements. @item hardware@tab support for interfacing with exotic hardware. @item help@tab support for on-line help systems. -@item hypermedia@tab support for links within text, or other media types. +@item hypermedia@tab support for links between text or other media types. @item i18n@tab internationalization and alternate character-set support. @item internal@tab code for Emacs internals, build process, defaults. @item languages@tab specialized modes for editing programming languages. -@item lisp@tab support for using Lisp (including Emacs Lisp). -@item local@tab libraries local to your site. +@item lisp@tab Lisp support, including Emacs Lisp. +@item local@tab code local to your site. @item maint@tab maintenance aids for the Emacs development group. @item mail@tab modes for electronic-mail handling. -@item matching@tab searching and matching. +@item matching@tab various sorts of searching and matching. +@item mouse@tab mouse support. +@item multimedia@tab images and sound support. @item news@tab support for netnews reading and posting. -@item non-text@tab support for editing files that are not ordinary text. @item oop@tab support for object-oriented programming. -@item outlines@tab hierarchical outlining. +@item outlines@tab support for hierarchical outlining. @item processes@tab process, subshell, compilation, and job control support. @item terminals@tab support for terminal types. -@item tex@tab support for the @TeX{} formatter. +@item tex@tab supporting code for the @TeX{} formatter. @item tools@tab programming tools. -@item unix@tab front-ends/assistants for, or emulators of, system features. -@item vms@tab support code for VMS. +@item unix@tab front-ends/assistants for, or emulators of, UNIX-like features. @item wp@tab word processing. @end multitable @@ -587,3 +589,7 @@ Areas of the mode line are examples. This help will normally be shown in the echo area when you move point into the active text. In a window system you can display the help text as a ``tooltip'' (sometimes known as ``balloon help''). @xref{Tooltips}. + +@ignore + arch-tag: 6f33ab62-bc75-4367-8057-fd67cc15c3a1 +@end ignore diff --git a/man/idlwave.texi b/man/idlwave.texi index 6cd3cb0f1b..fde5cd389d 100644 --- a/man/idlwave.texi +++ b/man/idlwave.texi @@ -3529,3 +3529,7 @@ instead. @printindex cp @bye + +@ignore + arch-tag: f1d73958-1423-4127-b8aa-f7b953d64492 +@end ignore diff --git a/man/indent.texi b/man/indent.texi index a940bc77a9..d213410324 100644 --- a/man/indent.texi +++ b/man/indent.texi @@ -245,3 +245,7 @@ preserving the columns of all nonblank text. @kbd{M-x tabify} scans the region for sequences of spaces, and converts sequences of at least three spaces to tabs if that can be done without changing indentation. @kbd{M-x untabify} changes all tabs in the region to appropriate numbers of spaces. + +@ignore + arch-tag: acc07de7-ae11-4ee8-a159-cb59c473f0fb +@end ignore diff --git a/man/info.texi b/man/info.texi index 26f23ac726..1d62c530bd 100644 --- a/man/info.texi +++ b/man/info.texi @@ -1,4 +1,7 @@ -\input texinfo @c -*-texinfo-*- +\input texinfo.tex @c -*-texinfo-*- +@c We must \input texinfo.tex instead of texinfo, otherwise make +@c distcheck in the Texinfo distribution fails, because the texinfo Info +@c file is made first, and texi2dvi must include . first in the path. @comment %**start of header @setfilename info.info @settitle Info @@ -6,13 +9,12 @@ @syncodeindex vr cp @syncodeindex ky cp @comment %**end of header -@comment $Id: info.texi,v 1.33 2003/07/16 22:17:40 karl Exp $ @copying This file describes how to use Info, the on-line, menu-driven GNU documentation system. -Copyright (C) 1989, 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +Copyright (C) 1989, 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. @quotation @@ -459,7 +461,7 @@ Now type @kbd{]}, to learn about the @kbd{]} and @kbd{[} commands. @end menu @node Help-], , , Help-Inv -@subsection The @kbd{]} and @kbd{[} commands. +@subsection The @kbd{]} and @kbd{[} commands If you type @kbd{n} now, you get an error message saying that this node has no next node. Similarly, if you type @kbd{p}, the error @@ -829,12 +831,16 @@ between local and remote links. The introductory course is almost over; please continue a little longer to learn some intermediate-level commands. - Most Info files have an index, which is actually a large node that -contains nothing but a menu. The menu has one menu item for each -topic listed in the index. You can find the index node from the main -menu of the file, with the @kbd{m} command; then you can use the -@kbd{m} command again in the index node to go to the node that -describes the topic. + Most Info files have an index, which is actually a large node +containing little but a menu. The menu has one menu item for each +topic listed in the index. (As a special feature, menus for indices +may also include the line number within the node of the index entry. +This allows Info readers to go to the exact line of an entry, not just +the start of the containing node.) + + You can get to the index from the main menu of the file with the +@kbd{m} command; then you can use the @kbd{m} command again in the +index node to go to the node that describes the topic you want. There is also a short-cut Info command, @kbd{i}, which does all of that for you. It searches the index for a given topic (a string) and @@ -933,7 +939,7 @@ Documentation Format}. Here are some more Info commands that make it easier to move around. -@unnumberedsubsec @kbd{g} goes to a node by name +@subheading @kbd{g} goes to a node by name @kindex g @r{(Info mode)} @findex Info-goto-node @@ -959,7 +965,7 @@ the node @samp{Top} in the Info file @file{dir}. Likewise, all of the current file by typing @kbd{g*@key{RET}} or all of any other file with @kbd{g(@var{filename})@key{RET}}. -@unnumberedsubsec @kbd{1} -- @kbd{9} choose a menu subtopic by its number +@subheading @kbd{1} -- @kbd{9} choose a menu subtopic by its number @kindex 1 @r{through} 9 @r{(Info mode)} @findex Info-nth-menu-item @@ -973,17 +979,18 @@ In the stand-alone reader, @kbd{0} goes through the last menu item; this is so you need not count how many entries are there. In Emacs, the digit keys run the command @code{Info-nth-menu-item}. - If your display supports multiple fonts, and you are using Emacs' -Info mode to read Info files, the @samp{*} for the fifth menu item -stands out, either in color or in some other attribute, such as -underline, and so is the @samp{*} for the ninth item; this makes it -easy to see at a glance which number to use for an item. + If your display supports multiple fonts, colors or underlining, and +you are using Emacs' Info mode to read Info files, the third, sixth +and ninth menu items have a @samp{*} that stands out, either in color +or in some other attribute, such as underline; this makes it easy to +see at a glance which number to use for an item. - Some terminals don't support colors or underlining. If you need to -actually count items, it is better to use @kbd{m} instead, and specify -the name, or use @key{TAB} to quickly move between menu items. + Some terminals don't support either multiple fonts, colors or +underlining. If you need to actually count items, it is better to use +@kbd{m} instead, and specify the name, or use @key{TAB} to quickly +move between menu items. -@unnumberedsubsec @kbd{e} makes Info document editable +@subheading @kbd{e} makes Info document editable @kindex e @r{(Info mode)} @findex Info-edit @@ -998,6 +1005,23 @@ only if the variable @code{Info-enable-edit} is non-@code{nil}. edit the Info file, so typing @kbd{e} there goes to the end of the current node. +@subheading @kbd{M-n} creates a new independent Info buffer in Emacs + +@kindex M-n @r{(Info mode)} +@findex clone-buffer +@cindex multiple Info buffers + If you are reading Info in Emacs, you can select a new independent +Info buffer in another window by typing @kbd{M-n}. The new buffer +starts out as an exact copy of the old one, but you will be able to +move independently between nodes in the two buffers. (In Info mode, +@kbd{M-n} runs the Emacs command @code{clone-buffer}.) + + In Emacs Info, you can also produce new Info buffers by giving a +numeric prefix argument to the @kbd{m} and @kbd{g} commands. @kbd{C-u +m} and @kbd{C-u g} go to a new node in exactly the same way that +@kbd{m} and @kbd{g} do, but they do so in a new Info buffer which they +select in another window. + @node Info Search, Add, Advanced, Expert Info @comment node-name, next, previous, up @section How to search Info documents for specific subjects @@ -1031,7 +1055,7 @@ you typed @emph{as a substring}. For each match, Info shows in the echo area the full index entry it found. Often, the text of the full index entry already gives you enough information to decide whether it is relevant to what you are looking for, so we recommend that you read -what Emacs shows in the echo are before looking at the node it +what Emacs shows in the echo area before looking at the node it displays. Since @kbd{i} looks for a substring, you can search for subjects even @@ -1046,12 +1070,18 @@ options, and key sequences that the program provides. If you are looking for a description of a command, an option, or a key, just type their names when @kbd{i} prompts you for a topic. For example, if you want to read the description of what the @kbd{C-f} key does, type -@kbd{iC-f@key{RET}}. Here @kbd{C-f} are 3 literal characters +@kbd{i C - f @key{RET}}. Here @kbd{C-f} are 3 literal characters @samp{C}, @samp{-}, and @samp{f}, not the ``Control-f'' command key you type inside Emacs to run the command bound to @kbd{C-f}. In Emacs, @kbd{i} runs the command @code{Info-index}. +@findex info-apropos +If you don't know what manual documents something, try the @kbd{M-x +info-apropos} command. It prompts for a string and then looks up that +string in all the indices of all the Info documents installed on your +system. + @kindex s @r{(Info mode)} @findex Info-search The @kbd{s} command allows you to search a whole file for a string. @@ -1456,3 +1486,7 @@ topics discussed in this document. @printindex cp @bye + +@ignore + arch-tag: 965c1638-01d6-4156-9227-b10418b9d8e8 +@end ignore diff --git a/man/killing.texi b/man/killing.texi index 4118a4c56f..60b5129389 100644 --- a/man/killing.texi +++ b/man/killing.texi @@ -152,8 +152,8 @@ what they ought to do, you need to tell Emacs which key to use for @findex normal-erase-is-backspace-mode On most text-only terminals, Emacs cannot tell which keys the keyboard really has, so it follows a uniform plan which may or may not -fit your keyboard. The uniform plan is that the ASCII @key{DEL} -character deletes, and the ASCII @key{BS} (backspace) character asks +fit your keyboard. The uniform plan is that the @acronym{ASCII} @key{DEL} +character deletes, and the @acronym{ASCII} @key{BS} (backspace) character asks for help (it is the same as @kbd{C-h}). If this is not right for your keyboard, such as if you find that the key which ought to delete backwards enters Help instead, see @ref{DEL Does Not Delete}. @@ -644,3 +644,7 @@ rectangle shifts right. The command @kbd{M-x string-insert-rectangle} is similar to @code{string-rectangle}, but inserts the string on each line, shifting the original text to the right. + +@ignore + arch-tag: d8da8f96-0928-449a-816e-ff2d3497866c +@end ignore diff --git a/man/m-x.texi b/man/m-x.texi index fca7d101a9..8881850d32 100644 --- a/man/m-x.texi +++ b/man/m-x.texi @@ -73,3 +73,7 @@ together with following arguments. @kbd{M-x} works by running the command @code{execute-extended-command}, which is responsible for reading the name of another command and invoking it. + +@ignore + arch-tag: b67bff53-9628-4666-b94e-eda972a7ba56 +@end ignore diff --git a/man/macos.texi b/man/macos.texi index 7a26669778..93045eb104 100644 --- a/man/macos.texi +++ b/man/macos.texi @@ -51,7 +51,7 @@ uses the @key{option} key as the @key{META} key. Most people should want to use the @key{command} key as the @key{META} key, so that dead-key processing with the @key{option} key will still work. This is -useful for entering non-ASCII Latin characters directly from the Mac +useful for entering non-@acronym{ASCII} Latin characters directly from the Mac keyboard, for example. Emacs recognizes the setting in the Keyboard control panel and @@ -244,3 +244,7 @@ returns the GNU or Unix equivalent. The function @code{posix-file-name-to-mac} performs the opposite conversion. They are useful for constructing AppleScript commands to be passed to @code{do-applescript}. + +@ignore + arch-tag: a822c2ab-4273-4997-927e-c153bb71dcf6 +@end ignore diff --git a/man/maintaining.texi b/man/maintaining.texi index 9683ffa62d..b5f13d5fb9 100644 --- a/man/maintaining.texi +++ b/man/maintaining.texi @@ -1273,3 +1273,7 @@ commands. @vindex emerge-startup-hook After setting up the merge, Emerge runs the hook @code{emerge-startup-hook} (@pxref{Hooks}). + +@ignore + arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb +@end ignore diff --git a/man/major.texi b/man/major.texi index 16887fe788..4c933b13db 100644 --- a/man/major.texi +++ b/man/major.texi @@ -169,3 +169,7 @@ However, this does not happen if the buffer contents specify a major mode, and certain ``special'' major modes do not allow the mode to change. You can turn off this mode-changing feature by setting @code{change-major-mode-with-file-name} to @code{nil}. + +@ignore + arch-tag: f2558800-cf32-4839-8acb-7d3b4df2a155 +@end ignore diff --git a/man/makefile.w32-in b/man/makefile.w32-in new file mode 100644 index 0000000000..c0f1a82abc --- /dev/null +++ b/man/makefile.w32-in @@ -0,0 +1,329 @@ +#### Makefile for the Emacs Manual and other documentation. + +# Copyright (C) 2003 +# Free Software Foundation, Inc. + +# This file is part of GNU Emacs. + +# GNU Emacs is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# GNU Emacs is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with GNU Emacs; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# Where to find the source code. The source code for Emacs's C kernel is +# expected to be in $(srcdir)/src, and the source code for Emacs's +# utility programs is expected to be in $(srcdir)/lib-src. This is +# set by the configure script's `--srcdir' option. +srcdir=. + +infodir = $(srcdir)/../info + +# The makeinfo program is part of the Texinfo distribution. +MAKEINFO = makeinfo +MULTI_INSTALL_INFO = $(srcdir)\..\nt\multi-install-info.bat +INFO_TARGETS = $(infodir)/emacs $(infodir)/ccmode \ + $(infodir)/cl $(infodir)/dired-x \ + $(infodir)/ediff $(infodir)/forms \ + $(infodir)/gnus $(infodir)/info \ + $(infodir)/message $(infodir)/mh-e \ + $(infodir)/reftex $(infodir)/sc \ + $(infodir)/vip $(infodir)/viper \ + $(infodir)/widget $(infodir)/efaq \ + $(infodir)/ada-mode $(infodir)/autotype \ + $(infodir)/calc $(infodir)/idlwave \ + $(infodir)/eudc $(infodir)/ebrowse \ + $(infodir)/pcl-cvs $(infodir)/woman \ + $(infodir)/emacs-mime $(infodir)/eshell \ + $(infodir)/speedbar $(infodir)/tramp \ + $(infodir)/ses $(infodir)/smtpmail +DVI_TARGETS = emacs.dvi calc.dvi cc-mode.dvi cl.dvi dired-x.dvi \ + ediff.dvi forms.dvi gnus.dvi message.dvi mh-e.dvi \ + reftex.dvi sc.dvi vip.dvi viper.dvi widget.dvi faq.dvi \ + ada-mode.dvi autotype.dvi idlwave.dvi eudc.dvi ebrowse.dvi \ + pcl-cvs.dvi woman.dvi emacs-mime.dvi eshell.dvi \ + speedbar.dvi tramp.dvi ses.dvi smtpmail.dvi +INFOSOURCES = info.texi + +# The following rule does not work with all versions of `make'. +.SUFFIXES: .texi .dvi +.texi.dvi: + texi2dvi $< + +TEXI2DVI = texi2dvi +ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \ + "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C + +EMACSSOURCES= \ + $(srcdir)/emacs.texi \ + $(srcdir)/doclicense.texi \ + $(srcdir)/screen.texi \ + $(srcdir)/commands.texi \ + $(srcdir)/entering.texi \ + $(srcdir)/basic.texi \ + $(srcdir)/mini.texi \ + $(srcdir)/m-x.texi \ + $(srcdir)/help.texi \ + $(srcdir)/mark.texi \ + $(srcdir)/killing.texi \ + $(srcdir)/regs.texi \ + $(srcdir)/display.texi \ + $(srcdir)/search.texi \ + $(srcdir)/fixit.texi \ + $(srcdir)/files.texi \ + $(srcdir)/buffers.texi \ + $(srcdir)/windows.texi \ + $(srcdir)/frames.texi \ + $(srcdir)/mule.texi \ + $(srcdir)/major.texi \ + $(srcdir)/indent.texi \ + $(srcdir)/text.texi \ + $(srcdir)/programs.texi \ + $(srcdir)/building.texi \ + $(srcdir)/maintaining.texi \ + $(srcdir)/abbrevs.texi \ + $(srcdir)/picture.texi \ + $(srcdir)/sending.texi \ + $(srcdir)/rmail.texi \ + $(srcdir)/dired.texi \ + $(srcdir)/calendar.texi \ + $(srcdir)/misc.texi \ + $(srcdir)/custom.texi \ + $(srcdir)/trouble.texi \ + $(srcdir)/cmdargs.texi \ + $(srcdir)/xresources.texi \ + $(srcdir)/anti.texi \ + $(srcdir)/macos.texi \ + $(srcdir)/msdog.texi \ + $(srcdir)/gnu.texi \ + $(srcdir)/glossary.texi \ + $(srcdir)/ack.texi \ + $(srcdir)/kmacro.texi + +info: $(INFO_TARGETS) + $(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS) + +dvi: $(DVI_TARGETS) + +# Note that all the Info targets build the Info files +# in srcdir. There is no provision for Info files +# to exist in the build directory. +# In a distribution of Emacs, the Info files should be up to date. + +# The following target uses an explicit -o switch to work around +# the @setfilename directive in info.texi, which is required for +# the Texinfo distribution. + +$(infodir)/info: $(INFOSOURCES) + $(MAKEINFO) --no-split info.texi -o $@ + +info.dvi: $(INFOSOURCES) + $(ENVADD) $(TEXI2DVI) $(srcdir)/info.texi + +$(infodir)/emacs: $(EMACSSOURCES) + $(MAKEINFO) emacs.texi + +emacs.dvi: $(EMACSSOURCES) + $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi + +# This target is here so you could easily get the list of the *.texi +# files which belong to the Emacs manual (as opposed to the separate +# manuals for CL, CC Mode, Ebrowse, etc.). With this target, you can +# say things like "grep foo `make emacsman`". +emacsman: + @echo $(EMACSSOURCES) + +$(infodir)/ccmode: cc-mode.texi + $(MAKEINFO) cc-mode.texi +cc-mode.dvi: cc-mode.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/cc-mode.texi + +$(infodir)/ada-mode: ada-mode.texi + $(MAKEINFO) ada-mode.texi +ada-mode.dvi: ada-mode.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/ada-mode.texi + +$(infodir)/pcl-cvs: pcl-cvs.texi + $(MAKEINFO) pcl-cvs.texi +pcl-cvs.dvi: pcl-cvs.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/pcl-cvs.texi + +$(infodir)/eshell: eshell.texi + $(MAKEINFO) eshell.texi +eshell.dvi: eshell.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/eshell.texi + +$(infodir)/cl: cl.texi + $(MAKEINFO) cl.texi +cl.dvi: cl.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/cl.texi + +$(infodir)/dired-x: dired-x.texi + $(MAKEINFO) dired-x.texi +dired-x.dvi: dired-x.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/dired-x.texi + +$(infodir)/ediff: ediff.texi + $(MAKEINFO) ediff.texi +ediff.dvi: ediff.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/ediff.texi + +$(infodir)/forms: forms.texi + $(MAKEINFO) forms.texi +forms.dvi: forms.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/forms.texi + +$(infodir)/gnus: gnus.texi + $(MAKEINFO) gnus.texi +gnus.dvi: gnus.texi + sed -e '/@iflatex/,/@end iflatex/d' $(srcdir)/gnus.texi > gnustmp.texi + $(ENVADD) $(TEXI2DVI) gnustmp.texi + cp gnustmp.dvi $*.dvi + rm gnustmp.* + +$(infodir)/message: message.texi + $(MAKEINFO) message.texi +message.dvi: message.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/message.texi + +$(infodir)/mh-e: mh-e.texi + $(MAKEINFO) mh-e.texi +mh-e.dvi: mh-e.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/mh-e.texi + +$(infodir)/reftex: reftex.texi + $(MAKEINFO) reftex.texi +reftex.dvi: reftex.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/reftex.texi + +$(infodir)/sc: sc.texi + $(MAKEINFO) sc.texi +sc.dvi: sc.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/sc.texi + +$(infodir)/vip: vip.texi + $(MAKEINFO) vip.texi +vip.dvi: vip.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/vip.texi + +$(infodir)/viper: viper.texi + $(MAKEINFO) viper.texi +viper.dvi: viper.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/viper.texi + +$(infodir)/widget: widget.texi + $(MAKEINFO) widget.texi +widget.dvi: widget.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/widget.texi + +$(infodir)/efaq: faq.texi + $(MAKEINFO) faq.texi +faq.dvi: faq.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/faq.texi + +../etc/GNU: gnu1.texi gnu.texi + $(MAKEINFO) --no-headers -o ../etc/GNU gnu1.texi + +$(infodir)/autotype: autotype.texi + $(MAKEINFO) autotype.texi +autotype.dvi: autotype.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/autotype.texi + +$(infodir)/calc: calc.texi + $(MAKEINFO) calc.texi + +calc.dvi: calc.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/calc.texi + +# This is produced with --no-split to avoid making files whose +# names clash on DOS 8+3 filesystems +$(infodir)/idlwave: idlwave.texi + $(MAKEINFO) --no-split idlwave.texi +idlwave.dvi: idlwave.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/idlwave.texi + +$(infodir)/eudc: eudc.texi + $(MAKEINFO) eudc.texi +eudc.dvi: eudc.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/eudc.texi + +$(infodir)/ebrowse: ebrowse.texi + $(MAKEINFO) ebrowse.texi +ebrowse.dvi: ebrowse.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/ebrowse.texi + +$(infodir)/woman: woman.texi + $(MAKEINFO) woman.texi +woman.dvi: woman.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/woman.texi + +$(infodir)/speedbar: speedbar.texi + $(MAKEINFO) speedbar.texi +speedbar.dvi: speedbar.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/speedbar.texi + +$(infodir)/emacs-mime: emacs-mime.texi + $(MAKEINFO) emacs-mime.texi +emacs-mime.dvi: emacs-mime.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-mime.texi + +$(infodir)/tramp: tramp.texi + $(MAKEINFO) tramp.texi +tramp.dvi: tramp.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/tramp.texi + +$(infodir)/ses: ses.texi + $(MAKEINFO) ses.texi +ses.dvi: ses.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/ses.texi + +$(infodir)/smtpmail: smtpmail.texi + $(MAKEINFO) smtpmail.texi +smtpmail.dvi: smtpmail.texi + $(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi + +mostlyclean: + - $(DEL) *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.* + +clean: mostlyclean + - $(DEL) *.dvi + - $(DEL) $(infodir)/emacs* $(infodir)/ccmode* \ + $(infodir)/cl* $(infodir)/dired-x* \ + $(infodir)/ediff* $(infodir)/forms* \ + $(infodir)/gnus* $(infodir)/info* \ + $(infodir)/message* $(infodir)/mh-e* \ + $(infodir)/reftex* $(infodir)/sc* \ + $(infodir)/vip* $(infodir)/viper* \ + $(infodir)/widget* $(infodir)/efaq* \ + $(infodir)/ada-mode* $(infodir)/autotype* \ + $(infodir)/calc* $(infodir)/idlwave* \ + $(infodir)/eudc* $(infodir)/ebrowse* \ + $(infodir)/pcl-cvs* $(infodir)/woman* \ + $(infodir)/emacs-mime* $(infodir)/eshell* \ + $(infodir)/speedbar* $(infodir)/tramp* \ + $(infodir)/ses* $(infodir)/smtpmail* + +distclean: clean + +maintainer-clean: distclean + - $(DEL) *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc +# Don't delete these, because they are outside the current directory. +# for file in $(INFO_TARGETS); do rm -f $${file}*; done + + +# Formerly this directory had texindex.c and getopt.c in it +# and this makefile built them to make texindex. +# That caused trouble because this is run entirely in the source directory. +# Since we expect to get texi2dvi from elsewhere, +# it is ok to expect texindex from elsewhere also. + +# arch-tag: 6e99da59-ad27-4816-82a0-cde9a101efae diff --git a/man/mark.texi b/man/mark.texi index ec91e66fb2..414fa47034 100644 --- a/man/mark.texi +++ b/man/mark.texi @@ -113,7 +113,7 @@ the new position with point back at its original position. @ref{Mark Ring}. @kindex C-@@ - There is no such character as @kbd{C-@key{SPC}} in ASCII; when you + There is no such character as @kbd{C-@key{SPC}} in @acronym{ASCII}; when you type @key{SPC} while holding down @key{CTRL}, what you get on most ordinary terminals is the character @kbd{C-@@}. This key is actually bound to @code{set-mark-command}. But unless you are unlucky enough to @@ -425,3 +425,6 @@ the buffer and position of the latest entry in the global ring. It also rotates the ring, so that successive uses of @kbd{C-x C-@key{SPC}} take you to earlier and earlier buffers. +@ignore + arch-tag: f35e4d82-911b-4cfc-a3d7-3c87b2abba20 +@end ignore diff --git a/man/message.texi b/man/message.texi index d26ae9a5e3..41c563ca38 100644 --- a/man/message.texi +++ b/man/message.texi @@ -1410,3 +1410,7 @@ basis of the new @code{Cc} header, except if this header is @bye @c End: + +@ignore + arch-tag: 16ab76af-a281-4e34-aed6-5624569f7601 +@end ignore diff --git a/man/mh-e.texi b/man/mh-e.texi index 406506d36a..77fcbbc725 100644 --- a/man/mh-e.texi +++ b/man/mh-e.texi @@ -1,5 +1,4 @@ \input texinfo @c -*-texinfo-*- -@c $Id: mh-e.texi,v 1.13 2002/10/02 23:24:31 karl Exp $ @c %**start of header @setfilename ../info/mh-e @settitle mh-e @@ -16,7 +15,7 @@ This is Edition @value{EDITION}, last updated @value{UPDATED}, of @cite{mh-e, The Emacs Interface to MH}, for mh-e, Version @value{VERSION}. -Copyright 1995, 2001, 2002 Free Software Foundation, Inc. +Copyright 1995, 2001, 2002, 2004 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -3952,3 +3951,7 @@ Public License instead of this License. @c XXX In the sections on customizing mh-e, you can add cross-references @c to the Emacs manual and the Emacs Lisp manual wherever they are @c useful. @pxref{node, , section, emacs, The GNU Emacs Manual} + +@ignore + arch-tag: b778477d-1a10-4a99-84de-f877a2ea6bef +@end ignore diff --git a/man/mini.texi b/man/mini.texi index 88aac3bdc7..040306ba04 100644 --- a/man/mini.texi +++ b/man/mini.texi @@ -206,10 +206,10 @@ Completion does ignore case distinctions for certain arguments in which case does not matter. @menu -* Example: Completion Example. -* Commands: Completion Commands. -* Strict Completion:: -* Options: Completion Options. +* Example: Completion Example. Examples of using completion. +* Commands: Completion Commands. A list of completion commands. +* Strict Completion:: Different types of completion. +* Options: Completion Options. Options for completion. @end menu @node Completion Example @@ -571,3 +571,7 @@ list in the variable @code{command-history}. Each element is a Lisp expression which describes one command and its arguments. Lisp programs can re-execute a command by calling @code{eval} with the @code{command-history} element. + +@ignore + arch-tag: ba913cfd-b70e-400f-b663-22b2c309227f +@end ignore diff --git a/man/misc.texi b/man/misc.texi index 520bcb6686..83c86a1867 100644 --- a/man/misc.texi +++ b/man/misc.texi @@ -526,9 +526,9 @@ before point in the shell buffer @item C-d @kindex C-d @r{(Shell mode)} @findex comint-delchar-or-maybe-eof -Either delete a character or send @sc{eof} +Either delete a character or send @acronym{EOF} (@code{comint-delchar-or-maybe-eof}). Typed at the end of the shell -buffer, @kbd{C-d} sends @sc{eof} to the subshell. Typed at any other +buffer, @kbd{C-d} sends @acronym{EOF} to the subshell. Typed at any other position in the buffer, @kbd{C-d} deletes a character as usual. @item C-c C-a @@ -1502,13 +1502,13 @@ printable using the fonts built into your printer. You can augment the fonts supplied with the printer with those from the GNU Intlfonts package, or you can instruct Emacs to use Intlfonts exclusively. The variable @code{ps-multibyte-buffer} controls this: the default value, -@code{nil}, is appropriate for printing ASCII and Latin-1 +@code{nil}, is appropriate for printing @acronym{ASCII} and Latin-1 characters; a value of @code{non-latin-printer} is for printers which -have the fonts for ASCII, Latin-1, Japanese, and Korean +have the fonts for @acronym{ASCII}, Latin-1, Japanese, and Korean characters built into them. A value of @code{bdf-font} arranges for the BDF fonts from the Intlfonts package to be used for @emph{all} characters. Finally, a value of @code{bdf-font-except-latin} -instructs the printer to use built-in fonts for ASCII and Latin-1 +instructs the printer to use built-in fonts for @acronym{ASCII} and Latin-1 characters, and Intlfonts BDF fonts for the rest. @vindex bdf-directory-list @@ -1531,7 +1531,7 @@ identify a @dfn{sort key} for each record, and then reorder the records into the order determined by the sort keys. The records are ordered so that their keys are in alphabetical order, or, for numeric sorting, in numeric order. In alphabetic sorting, all upper-case letters `A' through -`Z' come before lower-case `a', in accord with the ASCII character +`Z' come before lower-case `a', in accord with the @acronym{ASCII} character sequence. The various sort commands differ in how they divide the text into sort @@ -1875,55 +1875,44 @@ hexl-@key{RET}} for details. @cindex reload files @cindex desktop - You can use the Desktop library to save the state of Emacs from one -session to another. Saving the state means that Emacs starts up with -the same set of buffers, major modes, buffer positions, and so on that -the previous Emacs session had. + Use the desktop library to save the state of Emacs from one session +to another. Once you save the Emacs @dfn{desktop}---the buffers, +their file names, major modes, buffer positions, and so on---then +subsequent Emacs sessions reload the saved desktop. -@vindex desktop-enable - To use Desktop, you should use the Customization buffer (@pxref{Easy -Customization}) to set @code{desktop-enable} to a non-@code{nil} value, -or add these lines at the end of your @file{.emacs} file: +@findex desktop-save +@vindex desktop-save-mode + You can save the desktop manually with the command @kbd{M-x +desktop-save}. You can also enable automatical desktop saving when +you exit Emacs: use the Customization buffer (@pxref{Easy +Customization}) to set @code{desktop-save-mode} to @code{t} for future +sessions, or add this line in your @file{~/.emacs} file: @example -(desktop-load-default) -(desktop-read) +(desktop-save-mode 1) @end example -@noindent -@findex desktop-save -The first time you save the state of the Emacs session, you must do it -manually, with the command @kbd{M-x desktop-save}. Once you have done -that, exiting Emacs will save the state again---not only the present -Emacs session, but also subsequent sessions. You can also save the -state at any time, without exiting Emacs, by typing @kbd{M-x -desktop-save} again. - - In order for Emacs to recover the state from a previous session, you -must start it with the same current directory as you used when you -started the previous session. This is because @code{desktop-read} looks -in the current directory for the file to read. This means that you can -have separate saved sessions in different directories; the directory in -which you start Emacs will control which saved session to use. - -@vindex desktop-files-not-to-save - The variable @code{desktop-files-not-to-save} controls which files are -excluded from state saving. Its value is a regular expression that -matches the files to exclude. By default, remote (ftp-accessed) files -are excluded; this is because visiting them again in the subsequent -session would be slow. If you want to include these files in state -saving, set @code{desktop-files-not-to-save} to @code{"^$"}. -@xref{Remote Files}. - -@vindex save-place -@cindex Saveplace -@findex toggle-save-place - The Saveplace library provides a simpler feature that records your -position in each file when you kill its buffer (or kill Emacs), and -jumps to the same position when you visit the file again (even in -another Emacs session). Use @kbd{M-x toggle-save-place} to turn on -place-saving in a given file. Customize the option @code{save-place} -to turn it on for all files in each session. +@findex desktop-change-dir +@findex desktop-revert + When Emacs starts, it looks for a saved desktop in the current +directory. Thus, you can have separate saved desktops in different +directories, and the starting directory determines which one Emacs +reloads. You can save the current desktop and reload one saved in +another directory by typing @kbd{M-x desktop-change-dir}. Typing +@kbd{M-x desktop-revert} reverts to the desktop previously reloaded. + + Specify the option @samp{--no-desktop} on the command line when you +don't want it to reload any saved desktop. + +@findex desktop-clear +@vindex desktop-globals-to-clear +@vindex desktop-clear-preserve-buffers-regexp + Type @kbd{M-x desktop-clear} to empty the Emacs desktop. This kills +all buffers except for internal ones, and clears the global variables +listed in @code{desktop-globals-to-clear}. If you want this to +preserve certain buffers, customize the variable +@code{desktop-clear-preserve-buffers-regexp}, whose value is a regular +expression matching the names of buffers not to kill. @node Recursive Edit, Emulation, Saving Emacs Sessions, Top @section Recursive Editing Levels @@ -2183,9 +2172,10 @@ which you might like to bind to keys, such as @code{browse-url-browser-function}. You can invoke actions dependent on the type of URL by defining @code{browse-url-browser-function} as an association list. The package's commentary available via @kbd{C-h -p} provides more information. Packages with facilities for following -URLs should always go through Browse-URL, so that the customization -options for Browse-URL will affect all browsing in Emacs. +p} under the @samp{hypermedia} keyword provides more information. +Packages with facilities for following URLs should always go through +Browse-URL, so that the customization options for Browse-URL will +affect all browsing in Emacs. @node Goto-address @subsection Activating URLs @@ -2232,14 +2222,14 @@ view it. This feature is useful for following references in mail or news buffers, @file{README} files, @file{MANIFEST} files, and so on. The -@samp{ffap} package's commentary available via @kbd{C-h p} and the -@code{ffap} Custom group provide details. +@samp{ffap} package's commentary available via @kbd{C-h p} under the +@samp{files} keyword and the @code{ffap} Custom group provide details. @cindex FFAP minor mode @findex ffap-mode - You can turn on FFAP minor mode to make the following key bindings -and to install hooks for using @code{ffap} in Rmail, Gnus and VM -article buffers. + You can turn on FFAP minor mode by calling @code{ffap-bindings} to +make the following key bindings and to install hooks for using +@code{ffap} in Rmail, Gnus and VM article buffers. @table @kbd @item C-x C-f @var{filename} @key{RET} @@ -2450,3 +2440,7 @@ Likewise, @kbd{M-x snake} provides an implementation of Snake. @findex zone The command @kbd{M-x zone} plays games with the display when Emacs is idle. + +@ignore + arch-tag: 8f094220-c0d5-4e9e-af7d-3e0da8187474 +@end ignore diff --git a/man/msdog.texi b/man/msdog.texi index 6be4f703f7..e701ba9fc7 100644 --- a/man/msdog.texi +++ b/man/msdog.texi @@ -141,7 +141,7 @@ the clipboard, and displays in the echo area a message to that effect. @vindex dos-display-scancodes The variable @code{dos-display-scancodes}, when non-@code{nil}, -directs Emacs to display the ASCII value and the keyboard scan code of +directs Emacs to display the @acronym{ASCII} value and the keyboard scan code of each keystroke; this feature serves as a complement to the @code{view-lossage} command, for debugging. @@ -466,7 +466,7 @@ Windows to capture a specific printer port such as @code{"LPT2"}, and redirect it to a networked printer via the @w{@code{Control Panel->Printers}} applet instead of @samp{net use}. - Some printers expect DOS codepage encoding of non-ASCII text, even + Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even though they are connected to a Windows machine which uses a different encoding for the same locale. For example, in the Latin-1 locale, DOS uses codepage 850 whereas Windows uses codepage 1252. @xref{MS-DOS and @@ -594,7 +594,7 @@ Create a coding system for a certain DOS codepage. MS-DOS is designed to support one character set of 256 characters at any given time, but gives you a variety of character sets to choose from. The alternative character sets are known as @dfn{DOS codepages}. -Each codepage includes all 128 ASCII characters, but the other 128 +Each codepage includes all 128 @acronym{ASCII} characters, but the other 128 characters (codes 128 through 255) vary from one codepage to another. Each DOS codepage is identified by a 3-digit number, such as 850, 862, etc. @@ -614,7 +614,7 @@ executables on other systems such as MS-Windows. @cindex unibyte operation @r{(MS-DOS)} If you invoke Emacs on MS-DOS with the @samp{--unibyte} option (@pxref{Initial Options}), Emacs does not perform any conversion of -non-ASCII characters. Instead, it reads and writes any non-ASCII +non-@acronym{ASCII} characters. Instead, it reads and writes any non-@acronym{ASCII} characters verbatim, and sends their 8-bit codes to the display verbatim. Thus, unibyte Emacs on MS-DOS supports the current codepage, whatever it may be, but cannot even represent any other characters. @@ -668,7 +668,7 @@ language environment for that script (@pxref{Language Environments}). If a buffer contains a character belonging to some other ISO 8859 character set, not the one that the chosen DOS codepage supports, Emacs -displays it using a sequence of ASCII characters. For example, if the +displays it using a sequence of @acronym{ASCII} characters. For example, if the current codepage doesn't have a glyph for the letter @samp{@`o} (small @samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where the braces serve as a visual indication that this is a single character. @@ -843,3 +843,6 @@ subsequent commands. Many users find this frustrating. You can reenable Windows's default handling of tapping the @key{ALT} key by setting @code{w32-pass-alt-to-system} to a non-@code{nil} value. +@ignore + arch-tag: f39d2590-5dcc-4318-88d9-0eb73ca10fa2 +@end ignore diff --git a/man/mule.texi b/man/mule.texi index ccba75e932..86349c0b40 100644 --- a/man/mule.texi +++ b/man/mule.texi @@ -49,8 +49,8 @@ all the related activities: @itemize @bullet @item -You can visit files with non-ASCII characters, save non-ASCII text, and -pass non-ASCII text between Emacs and programs it invokes (such as +You can visit files with non-@acronym{ASCII} characters, save non-@acronym{ASCII} text, and +pass non-@acronym{ASCII} text between Emacs and programs it invokes (such as compilers, spell-checkers, and mailers). Setting your language environment (@pxref{Language Environments}) takes care of setting up the coding systems and other options for a specific language or culture. @@ -58,7 +58,7 @@ Alternatively, you can specify how Emacs should encode or decode text for each command; see @ref{Specify Coding}. @item -You can display non-ASCII characters encoded by the various scripts. +You can display non-@acronym{ASCII} characters encoded by the various scripts. This works by using appropriate fonts on X and similar graphics displays (@pxref{Defining Fontsets}), and by sending special codes to text-only displays (@pxref{Specify Coding}). If some characters are @@ -66,12 +66,12 @@ displayed incorrectly, refer to @ref{Undisplayable Characters}, which describes possible problems and explains how to solve them. @item -You can insert non-ASCII characters or search for them. To do that, +You can insert non-@acronym{ASCII} characters or search for them. To do that, you can specify an input method (@pxref{Select Input Method}) suitable for your language, or use the default input method set up when you set your language environment. (Emacs input methods are part of the Leim package, which must be installed for you to be able to use them.) If -your keyboard can produce non-ASCII characters, you can select an +your keyboard can produce non-@acronym{ASCII} characters, you can select an appropriate keyboard coding system (@pxref{Specify Coding}), and Emacs will accept those characters. Latin-1 characters can also be input by using the @kbd{C-x 8} prefix, see @ref{Single-Byte Character Support, @@ -110,7 +110,7 @@ correctly; see @ref{Language Environments, locales}. many more-or-less standard coding systems for storing files. Emacs internally uses a single multibyte character encoding, so that it can intermix characters from all these scripts in a single buffer or string. -This encoding represents each non-ASCII character as a sequence of bytes +This encoding represents each non-@acronym{ASCII} character as a sequence of bytes in the range 0200 through 0377. Emacs translates between the multibyte character encoding and various other coding systems when reading and writing files, when exchanging data with subprocesses, and (in some @@ -187,11 +187,11 @@ in that buffer. @cindex Lisp files, and multibyte operation @cindex multibyte operation, and Lisp files @cindex unibyte operation, and Lisp files -@cindex init file, and non-ASCII characters -@cindex environment variables, and non-ASCII characters +@cindex init file, and non-@acronym{ASCII} characters +@cindex environment variables, and non-@acronym{ASCII} characters With @samp{--unibyte}, multibyte strings are not created during initialization from the values of environment variables, -@file{/etc/passwd} entries etc.@: that contain non-ASCII 8-bit +@file{/etc/passwd} entries etc.@: that contain non-@acronym{ASCII} 8-bit characters. Emacs normally loads Lisp files as multibyte, regardless of whether @@ -282,7 +282,7 @@ and selects the corresponding language environment if a match is found. (The former variable overrides the latter.) It also adjusts the display table and terminal coding system, the locale coding system, the preferred coding system as needed for the locale, and---last but not -least---the way Emacs decodes non-ASCII characters sent by your keyboard. +least---the way Emacs decodes non-@acronym{ASCII} characters sent by your keyboard. If you modify the @env{LC_ALL}, @env{LC_CTYPE}, or @env{LANG} environment variables while running Emacs, you may want to invoke the @@ -346,14 +346,14 @@ has its own input method; sometimes several languages which use the same characters can share one input method. A few languages support several input methods. - The simplest kind of input method works by mapping ASCII letters + The simplest kind of input method works by mapping @acronym{ASCII} letters into another alphabet; this allows you to use one other alphabet -instead of ASCII. The Greek and Russian input methods +instead of @acronym{ASCII}. The Greek and Russian input methods work this way. A more powerful technique is composition: converting sequences of characters into one letter. Many European input methods use composition -to produce a single non-ASCII letter from a sequence that consists of a +to produce a single non-@acronym{ASCII} letter from a sequence that consists of a letter followed by accent characters (or vice versa). For example, some methods convert the sequence @kbd{a'} into a single accented letter. These input methods have no special commands of their own; all they do @@ -480,8 +480,8 @@ language environment that it is meant to be used with. The variable @findex toggle-input-method @kindex C-\ - Input methods use various sequences of ASCII characters to stand for -non-ASCII characters. Sometimes it is useful to turn off the input + Input methods use various sequences of @acronym{ASCII} characters to stand for +non-@acronym{ASCII} characters. Sometimes it is useful to turn off the input method temporarily. To do this, type @kbd{C-\} (@code{toggle-input-method}). To reenable the input method, type @kbd{C-\} again. @@ -534,11 +534,11 @@ list-input-methods}. The list gives information about each input method, including the string that stands for it in the mode line. @node Multibyte Conversion -@section Unibyte and Multibyte Non-ASCII characters +@section Unibyte and Multibyte Non-@acronym{ASCII} characters When multibyte characters are enabled, character codes 0240 (octal) through 0377 (octal) are not really legitimate in the buffer. The valid -non-ASCII printing characters have codes that start from 0400. +non-@acronym{ASCII} printing characters have codes that start from 0400. If you type a self-inserting character in the range 0240 through 0377, or if you use @kbd{C-q} to insert one, Emacs assumes you @@ -590,7 +590,7 @@ other coding system. For example, to visit a file encoded in codepage 850, type @kbd{C-x @key{RET} c cp850 @key{RET} C-x C-f @var{filename} @key{RET}}. - In addition to converting various representations of non-ASCII + In addition to converting various representations of non-@acronym{ASCII} characters, a coding system can perform end-of-line conversion. Emacs handles three different conventions for how to separate lines in a file: newline, carriage-return linefeed, and just carriage-return. @@ -661,8 +661,8 @@ variants @code{iso-latin-1-unix}, @code{iso-latin-1-dos} and @code{iso-latin-1-mac}. The coding system @code{raw-text} is good for a file which is mainly -ASCII text, but may contain byte values above 127 which are not meant to -encode non-ASCII characters. With @code{raw-text}, Emacs copies those +@acronym{ASCII} text, but may contain byte values above 127 which are not meant to +encode non-@acronym{ASCII} characters. With @code{raw-text}, Emacs copies those byte values unchanged, and sets @code{enable-multibyte-characters} to @code{nil} in the current buffer so that they will be interpreted properly. @code{raw-text} handles end-of-line conversion in the usual @@ -670,7 +670,7 @@ way, based on the data encountered, and has the usual three variants to specify the kind of end-of-line conversion to use. In contrast, the coding system @code{no-conversion} specifies no -character code conversion at all---none for non-ASCII byte values and +character code conversion at all---none for non-@acronym{ASCII} byte values and none for end of line. This is useful for reading or writing binary files, tar files, and other files that must be examined verbatim. It, too, sets @code{enable-multibyte-characters} to @code{nil}. @@ -681,7 +681,7 @@ the @kbd{M-x find-file-literally} command. This uses might convert the file contents before you see them. @xref{Visiting}. The coding system @code{emacs-mule} means that the file contains -non-ASCII characters stored with the internal Emacs encoding. It +non-@acronym{ASCII} characters stored with the internal Emacs encoding. It handles end-of-line conversion based on the data encountered, and has the usual three variants to specify the kind of end-of-line conversion. @@ -774,7 +774,7 @@ the buffer. The default value of @code{inhibit-iso-escape-detection} is @code{nil}. We recommend that you not change it permanently, only for one specific operation. That's because many Emacs Lisp source files -in the Emacs distribution contain non-ASCII characters encoded in the +in the Emacs distribution contain non-@acronym{ASCII} characters encoded in the coding system @code{iso-2022-7bit}, and they won't be decoded correctly when you visit those files if you suppress the escape sequence detection. @@ -817,7 +817,7 @@ of the mode line (@pxref{Mode Line}), or type @kbd{C-h C @key{RET}}. @findex unify-8859-on-decoding-mode The command @code{unify-8859-on-decoding-mode} enables a mode that ``unifies'' the Latin alphabets when decoding text. This works by -converting all non-ASCII Latin-@var{n} characters to either Latin-1 or +converting all non-@acronym{ASCII} Latin-@var{n} characters to either Latin-1 or Unicode characters. This way it is easier to use various Latin-@var{n} alphabets together. In a future Emacs version we hope to move towards full Unicode support and complete unification of @@ -837,7 +837,7 @@ Coding}). most coding systems can only handle some of the possible characters. This means that it is possible for you to insert characters that cannot be encoded with the coding system that will be used to save the -buffer. For example, you could start with an ASCII file and insert a +buffer. For example, you could start with an @acronym{ASCII} file and insert a few Latin-1 characters into it, or you could edit a text file in Polish encoded in @code{iso-8859-2} and add some Russian words to it. When you save the buffer, Emacs cannot use the current value of @@ -917,6 +917,12 @@ subprocess input and output in the current buffer. Use coding system @var{coding} for transferring selections to and from other programs through the window system. +@item C-x @key{RET} F @var{coding} @key{RET} +Use coding system @var{coding} for encoding and decoding file +@emph{names}. This affects the use of non-ASCII characters in file +names. It has no effect on reading and writing the @emph{contents} of +files. + @item C-x @key{RET} X @var{coding} @key{RET} Use coding system @var{coding} for transferring @emph{one} selection---the next one---to or from the window system. @@ -993,13 +999,13 @@ your locale specification (@pxref{Language Environments}). or the Custom option @code{keyboard-coding-system} specifies the coding system for keyboard input. Character-code translation of keyboard input is useful for terminals with keys that -send non-ASCII graphic characters---for example, some terminals designed +send non-@acronym{ASCII} graphic characters---for example, some terminals designed for ISO Latin-1 or subsets of it. By default, keyboard input is translated based on your system locale setting. If your terminal does not really support the encoding implied by your locale (for example, if you find it inserts a -non-ASCII character if you type @kbd{M-i}), you will need to set +non-@acronym{ASCII} character if you type @kbd{M-i}), you will need to set @code{keyboard-coding-system} to @code{nil} to turn off encoding. You can do this by putting @@ -1014,7 +1020,7 @@ in your @file{~/.emacs} file. keyboard input, and using an input method: both define sequences of keyboard input that translate into single characters. However, input methods are designed to be convenient for interactive use by humans, and -the sequences that are translated are typically sequences of ASCII +the sequences that are translated are typically sequences of @acronym{ASCII} printing characters. Coding systems typically translate sequences of non-graphic characters. @@ -1043,17 +1049,21 @@ corresponding buffer. current language environment. @vindex file-name-coding-system -@cindex file names with non-ASCII characters - The variable @code{file-name-coding-system} specifies a coding system -to use for encoding file names. If you set the variable to a coding -system name (as a Lisp symbol or a string), Emacs encodes file names -using that coding system for all file operations. This makes it -possible to use non-ASCII characters in file names---or, at least, those -non-ASCII characters which the specified coding system can encode. +@cindex file names with non-@acronym{ASCII} characters +@findex set-file-name-coding-system +@kindex C-x @key{RET} F + The variable @code{file-name-coding-system} specifies a coding +system to use for encoding file names. If you set the variable to a +coding system name (as a Lisp symbol or a string), Emacs encodes file +names using that coding system for all file operations. This makes it +possible to use non-@acronym{ASCII} characters in file names---or, at +least, those non-@acronym{ASCII} characters which the specified coding +system can encode. Use @kbd{C-x @key{RET} F} +(@code{set-file-name-coding-system}) to specify this interactively. If @code{file-name-coding-system} is @code{nil}, Emacs uses a default coding system determined by the selected language environment. In the -default language environment, any non-ASCII characters in file names are +default language environment, any non-@acronym{ASCII} characters in file names are not encoded specially; they appear in the file system using the internal Emacs representation. @@ -1067,11 +1077,11 @@ name, or it may get an error. If such a problem happens, use @kbd{C-x C-w} to specify a new file name for that buffer. @vindex locale-coding-system -@cindex decoding non-ASCII keyboard input on X +@cindex decoding non-@acronym{ASCII} keyboard input on X The variable @code{locale-coding-system} specifies a coding system to use when encoding and decoding system strings such as system error messages and @code{format-time-string} formats and time stamps. That -coding system is also used for decoding non-ASCII keyboard input on X +coding system is also used for decoding non-@acronym{ASCII} keyboard input on X Window systems. You should choose a coding system that is compatible with the underlying system's text representation, which is normally specified by one of the environment variables @env{LC_ALL}, @@ -1101,7 +1111,7 @@ additional font support.} Emacs creates two fontsets automatically: the @dfn{standard fontset} and the @dfn{startup fontset}. The standard fontset is most likely to -have fonts for a wide variety of non-ASCII characters; however, this is +have fonts for a wide variety of non-@acronym{ASCII} characters; however, this is not the default for Emacs to use. (By default, Emacs tries to find a font that has bold and italic variants.) You can specify use of the standard fontset with the @samp{-fn} option, or with the @samp{Font} X @@ -1137,7 +1147,7 @@ created automatically. Their names have @samp{bold} instead of @samp{medium}, or @samp{i} instead of @samp{r}, or both. @cindex startup fontset - If you specify a default ASCII font with the @samp{Font} resource or + If you specify a default @acronym{ASCII} font with the @samp{Font} resource or the @samp{-fn} argument, Emacs generates a fontset from it automatically. This is the @dfn{startup fontset} and its name is @code{fontset-startup}. It does this by replacing the @var{foundry}, @@ -1191,7 +1201,7 @@ number of times in defining one fontset. For the other character sets, Emacs chooses a font based on @var{fontpattern}. It replaces @samp{fontset-@var{alias}} with values -that describe the character set. For the ASCII character font, +that describe the character set. For the @acronym{ASCII} character font, @samp{fontset-@var{alias}} is replaced with @samp{ISO8859-1}. In addition, when several consecutive fields are wildcards, Emacs @@ -1208,7 +1218,7 @@ does. @end example @noindent -the font specification for ASCII characters would be this: +the font specification for @acronym{ASCII} characters would be this: @example -*-fixed-medium-r-normal-*-24-*-ISO8859-1 @@ -1247,7 +1257,7 @@ call this function explicitly to create a fontset. @node Undisplayable Characters @section Undisplayable Characters - There may be a some non-ASCII characters that your terminal cannot + There may be a some non-@acronym{ASCII} characters that your terminal cannot display. Most non-windowing terminals support just a single character set (use the variable @code{default-terminal-coding-system} (@pxref{Specify Coding}) to tell Emacs which one); characters which @@ -1259,15 +1269,15 @@ you may not have fonts installed for all of them; characters that have no font appear as a hollow box. If you use Latin-1 characters but your terminal can't display -Latin-1, you can arrange to display mnemonic ASCII sequences +Latin-1, you can arrange to display mnemonic @acronym{ASCII} sequences instead, e.g.@: @samp{"o} for o-umlaut. Load the library @file{iso-ascii} to do this. @vindex latin1-display If your terminal can display Latin-1, you can display characters from other European character sets using a mixture of equivalent -Latin-1 characters and ASCII mnemonics. Use the Custom option -@code{latin1-display} to enable this. The mnemonic ASCII +Latin-1 characters and @acronym{ASCII} mnemonics. Use the Custom option +@code{latin1-display} to enable this. The mnemonic @acronym{ASCII} sequences mostly correspond to those of the prefix input methods. @node Single-Byte Character Support @@ -1288,7 +1298,7 @@ such as @samp{Latin-@var{n}}. For more information about unibyte operation, see @ref{Enabling Multibyte}. Note particularly that you probably want to ensure that -your initialization files are read as unibyte if they contain non-ASCII +your initialization files are read as unibyte if they contain non-@acronym{ASCII} characters. @vindex unibyte-display-via-language-environment @@ -1302,7 +1312,7 @@ to a non-@code{nil} value. @cindex @code{iso-ascii} library If your terminal does not support display of the Latin-1 character -set, Emacs can display these characters as ASCII sequences which at +set, Emacs can display these characters as @acronym{ASCII} sequences which at least give you a clear idea of what the characters are. To do this, load the library @code{iso-ascii}. Similar libraries for other Latin-@var{n} character sets could be implemented, but we don't have @@ -1315,14 +1325,14 @@ inclusive) are displayed as octal escapes. You can change this for non-standard ``extended'' versions of ISO-8859 character sets by using the function @code{standard-display-8bit} in the @code{disp-table} library. - There are several ways you can input single-byte non-ASCII + There are several ways you can input single-byte non-@acronym{ASCII} characters: @itemize @bullet @cindex 8-bit input @item If your keyboard can generate character codes 128 (decimal) and up, -representing non-ASCII characters, you can type those character codes +representing non-@acronym{ASCII} characters, you can type those character codes directly. On a windowing terminal, you should not need to do anything special to @@ -1339,7 +1349,7 @@ arrange for Meta to be converted to @kbd{ESC} and still be able type @item You can use an input method for the selected language environment. @xref{Input Methods}. When you use an input method in a unibyte buffer, -the non-ASCII character you specify with it is converted to unibyte. +the non-@acronym{ASCII} character you specify with it is converted to unibyte. @kindex C-x 8 @cindex @code{iso-transl} library @@ -1348,7 +1358,7 @@ the non-ASCII character you specify with it is converted to unibyte. @item For Latin-1 only, you can use the key @kbd{C-x 8} as a ``compose character'' prefix for entry of -non-ASCII Latin-1 printing characters. @kbd{C-x 8} is good for +non-@acronym{ASCII} Latin-1 printing characters. @kbd{C-x 8} is good for insertion (in the minibuffer as well as other buffers), for searching, and in any other context where a key sequence is allowed. @@ -1380,7 +1390,7 @@ mode is buffer-local. It can be customized for various languages with Emacs groups all supported characters into disjoint @dfn{charsets}. Each character code belongs to one and only one charset. For historical reasons, Emacs typically divides an 8-bit character code -for an extended version of ASCII into two charsets: ASCII, which +for an extended version of @acronym{ASCII} into two charsets: @acronym{ASCII}, which covers the codes 0 through 127, plus another charset which covers the ``right-hand part'' (the codes 128 and up). For instance, the characters of Latin-1 include the Emacs charset @code{ascii} plus the @@ -1404,3 +1414,7 @@ its internal representation within Emacs. To find out which charset a character in the buffer belongs to, put point before it and type @kbd{C-u C-x =}. + +@ignore + arch-tag: 310ba60d-31ef-4ce7-91f1-f282dd57b6b3 +@end ignore diff --git a/man/pcl-cvs.texi b/man/pcl-cvs.texi index 04952efd3c..427707fe4b 100644 --- a/man/pcl-cvs.texi +++ b/man/pcl-cvs.texi @@ -1,5 +1,4 @@ \input texinfo @c -*-texinfo-*- -@c "@(#)$Name: $:$Id: pcl-cvs.texi,v 1.18 2002/12/07 13:38:26 pj Exp $" @c %**start of header @setfilename ../info/pcl-cvs @settitle PCL-CVS --- Emacs Front-End to CVS @@ -8,7 +7,7 @@ @copying Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -1999, 2000, 2002 Free Software Foundation, Inc. +1999, 2000, 2002, 2004 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -477,7 +476,7 @@ although it has not been @samp{cvs remove}d. Many of the commands work on the current set of @dfn{selected} files which can be either the set of marked files (if any file is marked and -marks are no ignored) or whichever file or directory the cursor is on. +marks are not ignored) or whichever file or directory the cursor is on. If a directory is selected but the command cannot be applied to a directory, then it will be applied to the set of files under this @@ -1088,7 +1087,7 @@ revision. This command use @code{ediff} (or @code{emerge}, see above) to allow you to do an interactive 3-way merge. -@strong{Note:} When the file status is @samp{Conflict}, +@strong{Please note:} when the file status is @samp{Conflict}, CVS has already performed a merge. The resulting file is not used in any way if you use this command. If you use the @kbd{q} command inside @samp{ediff} (to successfully terminate a merge) the file that CVS @@ -1193,7 +1192,7 @@ kill the contents of the buffer with @kbd{C-w}. If you work by writing entries in the @file{ChangeLog} (@pxref{(emacs)Change Log}) and then commit the change under revision control, you can generate the Log Edit text from the ChangeLog using -@kbd{C-a C-a} (@kbd{log-edit-insert-changelog}). This looks for +@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for entries for the file(s) concerned in the top entry in the ChangeLog and uses those paragraphs as the log text. This text is only inserted if the top entry was made under your user name on the current date. @@ -1443,3 +1442,7 @@ this manual. @summarycontents @contents @bye + +@ignore + arch-tag: 5c7178ce-56fa-40b0-abd7-f4a09758b235 +@end ignore diff --git a/man/picture.texi b/man/picture.texi index e792878ae4..e62962b0ff 100644 --- a/man/picture.texi +++ b/man/picture.texi @@ -261,3 +261,7 @@ other modes. @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts (by overwriting) the rectangle that was most recently killed, while @kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does likewise for the rectangle found in a specified register. + +@ignore + arch-tag: b7589747-683c-4f40-aed8-1b10403cb666 +@end ignore diff --git a/man/programs.texi b/man/programs.texi index a6fa49b2ec..84f3e6f14f 100644 --- a/man/programs.texi +++ b/man/programs.texi @@ -486,49 +486,10 @@ expression. @cindex @code{lisp-indent-function} property You can override the standard pattern in various ways for individual -functions, according to the @code{lisp-indent-function} property of the -function name. There are four possibilities for this property: - -@table @asis -@item @code{nil} -This is the same as no property---use the standard indentation pattern. -@item @code{defun} -Handle this function like a @samp{def} construct: treat the second -line as the start of a @dfn{body}. -@item a number, @var{number} -The first @var{number} arguments of the function are -@dfn{distinguished} arguments; the rest are considered the body -of the expression. A line in the expression is indented according to -whether the first argument on it is distinguished or not. If the -argument is part of the body, the line is indented @code{lisp-body-indent} -more columns than the open-parenthesis starting the containing -expression. If the argument is distinguished and is either the first -or second argument, it is indented @emph{twice} that many extra columns. -If the argument is distinguished and not the first or second argument, -the line uses the standard pattern. -@item a symbol, @var{symbol} -@var{symbol} should be a function name; that function is called to -calculate the indentation of a line within this expression. The -function receives two arguments: -@table @asis -@item @var{state} -The value returned by @code{parse-partial-sexp} (a Lisp primitive for -indentation and nesting computation) when it parses up to the -beginning of this line. -@item @var{pos} -The position at which the line being indented begins. -@end table -@noindent -It should return either a number, which is the number of columns of -indentation for that line, or a list whose car is such a number. The -difference between returning a number and returning a list is that a -number says that all following lines at the same nesting level should -be indented just like this one; a list says that following lines might -call for different indentations. This makes a difference when the -indentation is being computed by @kbd{C-M-q}; if the value is a -number, @kbd{C-M-q} need not recalculate indentation for the following -lines until the end of the list. -@end table +functions, according to the @code{lisp-indent-function} property of +the function name. Normally you would use this for macro definitions +and specify it using the @code{declare} construct (@pxref{Defining +Macros,,, elisp, the Emacs Lisp Reference Manual}). @node C Indent @subsection Commands for C Indentation @@ -680,6 +641,7 @@ Kill balanced expression forward (@code{kill-sexp}). @item C-M-t Transpose expressions (@code{transpose-sexps}). @item C-M-@@ +@itemx C-M-@key{SPC} Put mark after following expression (@code{mark-sexp}). @end table @@ -740,12 +702,14 @@ rather than doing nothing, transposes the balanced expressions ending at or after point and the mark. @kindex C-M-@@ +@kindex C-M-@key{SPC} @findex mark-sexp To set the region around the next balanced expression in the buffer, use @kbd{C-M-@@} (@code{mark-sexp}), which sets mark at the same place that @kbd{C-M-f} would move to. @kbd{C-M-@@} takes arguments like @kbd{C-M-f}. In particular, a negative argument is useful for putting the mark at the beginning of the previous balanced expression. +The alias @kbd{C-M-@key{SPC}} is equivalent to @kbd{C-M-@@}. In languages that use infix operators, such as C, it is not possible to recognize all balanced expressions as such because there can be @@ -1437,8 +1401,8 @@ Mode}). The Foldout package provides folding-editor features This section gives a brief description of the special features available in C, C++, Objective-C, Java, CORBA IDL, and Pike modes. -(These are called ``C mode and related modes.'') @xref{Top, CC Mode, -ccmode, , CC Mode}, for a more extensive description of these modes +(These are called ``C mode and related modes.'') @xref{Top, , CC Mode, +ccmode, CC Mode}, for a more extensive description of these modes and their special features. @menu @@ -2322,3 +2286,7 @@ Insert or align a comment. The variable @code{asm-comment-char} specifies which character starts comments in assembler syntax. + +@ignore + arch-tag: c7ee7409-40a4-45c7-bfb7-ae7f2c74d0c0 +@end ignore diff --git a/man/reftex.texi b/man/reftex.texi index 449efce9ce..b1c4ae561b 100644 --- a/man/reftex.texi +++ b/man/reftex.texi @@ -5591,3 +5591,6 @@ part does not reset the chapter counter. See new option @contents @bye +@ignore + arch-tag: 1e055774-0576-4b1b-b47f-550d0961fd43 +@end ignore diff --git a/man/regs.texi b/man/regs.texi index 1ec319e528..ab1ef42e2f 100644 --- a/man/regs.texi +++ b/man/regs.texi @@ -319,3 +319,7 @@ points to. Insert in the buffer the @emph{contents} of the file that bookmark @var{bookmark} points to. @end table + +@ignore + arch-tag: b00af991-ebc3-4b3a-8e82-a3ac81ff2e64 +@end ignore diff --git a/man/rmail.texi b/man/rmail.texi index 9e6db0b9df..23eef5abec 100644 --- a/man/rmail.texi +++ b/man/rmail.texi @@ -1007,7 +1007,7 @@ clicking on them with @kbd{Mouse-2} or by moving to one and typing @section Rmail and Coding Systems @cindex decoding mail messages (Rmail) - Rmail automatically decodes messages which contain non-ASCII + Rmail automatically decodes messages which contain non-@acronym{ASCII} characters, just as Emacs does with files you visit and with subprocess output. Rmail uses the standard @samp{charset=@var{charset}} header in the message, if any, to determine how the message was encoded by the @@ -1230,3 +1230,7 @@ this, and you would rather read your mail in the order in which it was received, you can tell @code{movemail} to reverse the order of downloaded messages by adding the @samp{-r} flag to @code{rmail-movemail-flags}. + +@ignore + arch-tag: 034965f6-38df-47a2-a9f1-b8bc8ab37e23 +@end ignore diff --git a/man/sc.texi b/man/sc.texi index c9f03d8f90..5e911e2df7 100644 --- a/man/sc.texi +++ b/man/sc.texi @@ -2521,3 +2521,7 @@ its @var{variable} name. @summarycontents @contents @bye + +@ignore + arch-tag: 0521847a-4680-44b6-ae6e-13ce20e18436 +@end ignore diff --git a/man/screen.texi b/man/screen.texi index 2f5b66936b..b2632fefd5 100644 --- a/man/screen.texi +++ b/man/screen.texi @@ -189,7 +189,7 @@ other windows; see @ref{Optional Mode Line}, for more about this. Normally, the mode line looks like this: @example --@var{cs}:@var{ch} @var{buf} @var{line} @var{pos} (@var{major} @var{minor})------ +-@var{cs}:@var{ch} @var{buf} @var{pos} @var{line} (@var{major} @var{minor})------ @end example @noindent @@ -211,19 +211,20 @@ cursor is in) is also Emacs's current buffer, the one that editing takes place in. When we speak of what some command does to ``the buffer,'' we are talking about the current buffer. - @var{line} is @samp{L} followed by the current line number of point. -This is present when Line Number mode is enabled (which it normally is). -You can optionally display the current column number too, by turning on -Column Number mode (which is not enabled by default because it is -somewhat slower). @xref{Optional Mode Line}. - @var{pos} tells you whether there is additional text above the top of the window, or below the bottom. If your buffer is small and it is all visible in the window, @var{pos} is @samp{All}. Otherwise, it is @samp{Top} if you are looking at the beginning of the buffer, @samp{Bot} if you are looking at the end of the buffer, or @samp{@var{nn}%}, where -@var{nn} is the percentage of the buffer above the top of the -window.@refill +@var{nn} is the percentage of the buffer above the top of the window. +With Size Indication mode, you can display the size of the buffer as +well. @xref{Optional Mode Line}. + + @var{line} is @samp{L} followed by the current line number of point. +This is present when Line Number mode is enabled (which it normally is). +You can optionally display the current column number too, by turning on +Column Number mode (which is not enabled by default because it is +somewhat slower). @xref{Optional Mode Line}. @var{major} is the name of the @dfn{major mode} in effect in the buffer. At any time, each buffer is in one and only one of the possible @@ -303,8 +304,9 @@ formats by setting each of the variables @code{eol-mnemonic-unix}, @xref{Variables}, for an explanation of how to set variables. @xref{Optional Mode Line}, for features that add other handy -information to the mode line, such as the current column number of -point, the current time, and whether new mail for you has arrived. +information to the mode line, such as the size of the buffer, the +current column number of point, the current time, and whether new mail +for you has arrived. The mode line is mouse-sensitive; when you move the mouse across various parts of it, Emacs displays help text to say what a click in @@ -347,3 +349,7 @@ can type the item's letter or digit to select the item. Some of the commands in the menu bar have ordinary key bindings as well; if so, the menu lists one equivalent key binding in parentheses after the item itself. + +@ignore + arch-tag: 104ba40e-d972-4866-a542-a98be94bdf2f +@end ignore diff --git a/man/search.texi b/man/search.texi index ea08626a6a..303074dcf0 100644 --- a/man/search.texi +++ b/man/search.texi @@ -19,14 +19,15 @@ more flexible replacement command called @code{query-replace}, which asks interactively which occurrences to replace. @menu -* Incremental Search:: Search happens as you type the string. -* Nonincremental Search:: Specify entire string and then search. -* Word Search:: Search for sequence of words. -* Regexp Search:: Search for match for a regexp. -* Regexps:: Syntax of regular expressions. -* Search Case:: To ignore case while searching, or not. -* Replace:: Search, and replace some or all matches. -* Other Repeating Search:: Operating on all matches for some regexp. +* Incremental Search:: Search happens as you type the string. +* Nonincremental Search:: Specify entire string and then search. +* Word Search:: Search for sequence of words. +* Regexp Search:: Search for match for a regexp. +* Regexps:: Syntax of regular expressions. +* Search Case:: To ignore case while searching, or not. +* Configuring Scrolling:: Scrolling within incremental search. +* Replace:: Search, and replace some or all matches. +* Other Repeating Search:: Operating on all matches for some regexp. @end menu @node Incremental Search, Nonincremental Search, Search, Search @@ -122,9 +123,9 @@ following character to be treated the way any ``ordinary'' character is treated in the same context. You can also specify a character by its octal code: enter @kbd{C-q} followed by a sequence of octal digits. -@cindex searching for non-ASCII characters +@cindex searching for non-@acronym{ASCII} characters @cindex input method, during incremental search - To search for non-ASCII characters, you must use an input method + To search for non-@acronym{ASCII} characters, you must use an input method (@pxref{Input Methods}). If an input method is enabled in the current buffer when you start the search, you can use it while you type the search string also. Emacs indicates that by including the @@ -226,6 +227,34 @@ alter their bindings in the keymap @code{isearch-mode-map}. For a list of bindings, look at the documentation of @code{isearch-mode} with @kbd{C-h f isearch-mode @key{RET}}. +@subsection Scrolling During Incremental Search + + Vertical scrolling during incremental search can be enabled by +setting the customizable variable @code{isearch-allow-scroll} to a +non-nil value. + + You can then use the vertical scroll-bar or certain keyboard +commands such as @kbd{@key{PRIOR}} (@code{scroll-down}), +@kbd{@key{NEXT}} (@code{scroll-up}) and @kbd{C-l} (@code{recenter}) +within the search, thus letting you see more of the text near the +current match. You must run these commands via their key sequences to +stay in the search - typing M-x @var{comand-name} will always +terminate a search. + + You can give prefix arguments to these commands in the usual way. +The current match cannot be scrolled out of the window - this is +intentional. + + Several other commands, such as @kbd{C-x 2} +(@code{split-window-vertically}) and @kbd{C-x ^} +(@code{enlarge-window}) which don't scroll the window, are +nevertheless made available under this rubric, since they are likewise +handy during a search. + + For a list of commands which are configured as scrolling commands by +default and instructions on how thus to configure other commands, see +@ref{Configuring Scrolling}. + @subsection Slow Terminal Incremental Search Incremental search on a slow terminal uses a modified style of display @@ -505,9 +534,9 @@ matches @samp{cr}, @samp{car}, @samp{cdr}, @samp{caddaar}, etc. You can also include character ranges in a character set, by writing the starting and ending characters with a @samp{-} between them. Thus, -@samp{[a-z]} matches any lower-case ASCII letter. Ranges may be +@samp{[a-z]} matches any lower-case @acronym{ASCII} letter. Ranges may be intermixed freely with individual characters, as in @samp{[a-z$%.]}, -which matches any lower-case ASCII letter or @samp{$}, @samp{%} or +which matches any lower-case @acronym{ASCII} letter or @samp{$}, @samp{%} or period. Note that the usual regexp special characters are not special inside a @@ -531,7 +560,7 @@ is somewhat ill-defined, and it may change in future Emacs versions. @item @kbd{[^ @dots{} ]} @samp{[^} begins a @dfn{complemented character set}, which matches any character except the ones specified. Thus, @samp{[^a-z0-9A-Z]} matches -all characters @emph{except} ASCII letters and digits. +all characters @emph{except} @acronym{ASCII} letters and digits. @samp{^} is not special in a character set unless it is the first character. The character following the @samp{^} is treated as if it @@ -547,10 +576,18 @@ beginning of a line in the text being matched. Otherwise it fails to match anything. Thus, @samp{^foo} matches a @samp{foo} that occurs at the beginning of a line. +For historical compatibility reasons, @samp{^} can be used with this +meaning only at the beginning of the regular expression, or after +@samp{\(} or @samp{\|}. + @item @kbd{$} is similar to @samp{^} but matches only at the end of a line. Thus, @samp{x+$} matches a string of one @samp{x} or more at the end of a line. +For historical compatibility reasons, @samp{$} can be used with this +meaning only at the end of the regular expression, or before @samp{\)} +or @samp{\|}. + @item @kbd{\} has two functions: it quotes the special characters (including @samp{\}), and it introduces additional special constructs. @@ -762,7 +799,7 @@ colors, Emacs blinks the cursor around the matched text, as it does for matching parens.) @end ignore -@node Search Case, Replace, Regexps, Search +@node Search Case, Configuring Scrolling, Regexps, Search @section Searching and Case Incremental searches in Emacs normally ignore the case of the text @@ -792,7 +829,82 @@ This variable applies to nonincremental searches also, including those performed by the replace commands (@pxref{Replace}) and the minibuffer history matching commands (@pxref{Minibuffer History}). -@node Replace, Other Repeating Search, Search Case, Search +@node Configuring Scrolling, Replace, Search Case, Search +@section Configuring Scrolling +@cindex scrolling in incremental search +@vindex isearch-allow-scroll + +Scrolling, etc., during incremental search is enabled by setting the +customizable variable @code{isearch-allow-scroll} to a non-nil value. + +@c See Subject: Info file: How do I get an itemized list without blank lines? +@c Date: Sat, 12 Apr 2003 09:45:31 +0000 in gnu.emacs.help +@subsection Standard scrolling commands +Here is the list of commands which are configured by default to be +``scrolling'' commands in an incremental search, together with their +usual bindings: +@subsubsection Commands which scroll the window: +@table @asis +@item @code{scroll-bar-toolkit-scroll} (@kbd{@key{vertical-scroll-bar}@key{mouse-1}} in X-Windows) +@itemx @code{mac-handle-scroll-bar-event} (@kbd{@key{vertical-scroll-bar}@key{mouse-1}} on a Mac) +@itemx @code{w32-handle-scroll-bar-event} (@kbd{@key{vertical-scroll-bar}@key{mouse-1}} in MS-Windows) +@item @code{recenter} (@kbd{C-l}) @xref{Scrolling}. +@itemx @code{reposition-window} (@kbd{C-M-l}) @xref{Scrolling}. +@itemx @code{scroll-up} (@kbd{@key{NEXT}}) @xref{Scrolling}. +@itemx @code{scroll-down} (@kbd{@key{PRIOR}}) @xref{Scrolling}. +@end table + +@subsubsection Commands which act on the other window: +@table @asis +@item @code{list-buffers} (@kbd{C-x C-b}) @xref{List Buffers}. +@itemx @code{scroll-other-window} (@kbd{C-M-v}) @xref{Other Window}. +@itemx @code{scroll-other-window-down} (@kbd{C-M-S-v}) @xref{Other Window}. +@itemx @code{beginning-of-buffer-other-window} (@kbd{M-@key{home}}) +@itemx @code{end-of-buffer-other-window} (@kbd{M-@key{end}}) +@end table + +@subsubsection Commands which change the window layout: +@table @asis +@item @code{delete-other-windows} (@kbd{C-x 1}) @xref{Change Window}. +@itemx @code{balance-windows} (@kbd{C-x +}) @xref{Change Window}. +@itemx @code{split-window-vertically} (@kbd{C-x 2}) @xref{Split Window}. +@itemx @code{enlarge-window} (@kbd{C-x ^}) @xref{Change Window}. +@end table + +@subsection Configuring other commands as scrolling commands +To do this, set a command's isearch-scroll property to the value t. +For example: + +@example +@code{(put 'my-command 'isearch-scroll t)} +@end example + +You should only thus configure commands which are ``safe'': i.e., they +won't leave emacs in an inconsistent state when executed within a +search - that is to say, the following things may be changed by a +command only temporarily, and must be restored before the command +finishes: + +@enumerate +@item +Point. +@item +The buffer contents. +@item +The selected window and selected frame. +@item +The current match-data @xref{Match Data,,,elisp}. +@end enumerate + +Additionally, the command must not delete the current window and must +not itself attempt an incremental search. It may, however, change the +window's size, or create or delete other windows and frames. + +Note that an attempt by a command to scroll the text +@emph{horizontally} won't work, although it will do no harm - any such +scrolling will be overriden and nullified by the display code. + +@node Replace, Other Repeating Search, Configuring Scrolling, Search @section Replacement Commands @cindex replacement @cindex search-and-replace commands @@ -814,10 +926,10 @@ parallel using the command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}). @menu -* Unconditional Replace:: Replacing all matches for a string. -* Regexp Replace:: Replacing all matches for a regexp. -* Replacement and Case:: How replacements preserve case of letters. -* Query Replace:: How to use querying. +* Unconditional Replace:: Replacing all matches for a string. +* Regexp Replace:: Replacing all matches for a regexp. +* Replacement and Case:: How replacements preserve case of letters. +* Query Replace:: How to use querying. @end menu @node Unconditional Replace, Regexp Replace, Replace, Replace @@ -1121,3 +1233,7 @@ instead. (@pxref{Tags Search}) or through Dired @kbd{A} command (@pxref{Operating on Files}), or ask the @code{grep} program to do it (@pxref{Grep Searching}). + +@ignore + arch-tag: fd9d8e77-66af-491c-b212-d80999613e3e +@end ignore diff --git a/man/sending.texi b/man/sending.texi index 502663a352..5bc54294cf 100644 --- a/man/sending.texi +++ b/man/sending.texi @@ -427,7 +427,7 @@ twice. @c This is indexed in mule.texi, node "Recognize Coding". @c @vindex sendmail-coding-system - When you send a message that contains non-ASCII characters, they need + When you send a message that contains non-@acronym{ASCII} characters, they need to be encoded with a coding system (@pxref{Coding Systems}). Usually the coding system is specified automatically by your chosen language environment (@pxref{Language Environments}). You can explicitly specify @@ -687,7 +687,7 @@ message into outgoing mail. To do this, add and sending mail---Mail mode. Emacs has alternative facilities for editing and sending mail, including MH-E and Message mode, not documented in this manual. -@xref{Top,,MH-E,mh-e, The Emacs Interface to MH}. @xref{Top,,,message, +@xref{Top,,MH-E,mh-e, The Emacs Interface to MH}. @xref{Top,,Message,message, Message Manual}. You can choose any of them as your preferred method. The commands @code{C-x m}, @code{C-x 4 m} and @code{C-x 5 m} use whichever agent you have specified, as do various other Emacs commands @@ -703,3 +703,7 @@ and facilities that send mail. in this chapter about the @samp{*mail*} buffer and Mail mode does not apply; the other methods use a different format of text in a different buffer, and their commands are different as well. + +@ignore + arch-tag: d8a3dfc3-5d87-45c5-a7f2-69871b8e4fd6 +@end ignore diff --git a/man/ses.texi b/man/ses.texi index d280b14cc2..e5f8059fd2 100644 --- a/man/ses.texi +++ b/man/ses.texi @@ -385,11 +385,11 @@ list. @code{ses-mode-hook} is a normal mode hook (list of functions to execute when starting SES mode for a buffer). -The variable @code{safe-functions} is a a list of possibly-unsafe +The variable @code{safe-functions} is a list of possibly-unsafe functions to be treated as safe when analysing formulas and printers. @xref{Virus protection}. Before customizing @code{safe-functions}, think about how much you trust the person who's suggesting this -change. The value t turns off all anti-virus protection. A +change. The value @code{t} turns off all anti-virus protection. A list-of-functions value might enable a ``gee whiz'' spreadsheet, but it also creates trapdoors in your anti-virus armor. In order for virus protection to work, you must always press @kbd{n} when presented with @@ -406,11 +406,15 @@ safety belts! @table @kbd @item C-c M-C-h -(@code{ses-read-header-row}). The header line at the top of the SES +(@code{ses-set-header-row}). The header line at the top of the SES window normally shows the column letter for each column. You can set it to show a copy of some row, such as a row of column titles, so that -row will always be visible. Set the header line to row 0 to show -column letters again. +row will always be visible. Default is to set the current row as the +header; use C-u to prompt for header row. Set the header to row 0 to +show column letters again. +@item [header-line mouse-3] +Pops up a menu to set the current row as the header, or revert to +column letters. @end table @menu @@ -816,6 +820,13 @@ cell. @node Acknowledgements, , For Gurus, Top @chapter Acknowledgements +Coding by: +@quotation +Jonathan Yavner @email{jyavner@@member.fsf.org}@* +Stefan Monnier @email{monnier@@gnu.org} +@end quotation + +Ideas from: @quotation Christoph Conrad @email{christoph.conrad@@gmx.de}@* CyberBob @email{cyberbob@@redneck.gacracker.org}@* @@ -824,7 +835,7 @@ Ami Fischman @email{fischman@@zion.bpnetworks.com}@* Thomas Gehrlein @email{Thomas.Gehrlein@@t-online.de}@* Chris F.A. Johnson @email{c.f.a.johnson@@rogers.com}@* Yusong Li @email{lyusong@@hotmail.com}@* -Yuri Linkov @email{link0ff@@yahoo.com}@* +Juri Linkov @email{juri@@jurta.org}@* Harald Maier @email{maierh@@myself.com}@* Alan Nash @email{anash@@san.rr.com}@* François Pinard @email{pinard@@iro.umontreal.ca}@* @@ -832,6 +843,7 @@ Pedro Pinto @email{ppinto@@cs.cmu.edu}@* Stefan Reichör @email{xsteve@@riic.at}@* Oliver Scholz @email{epameinondas@@gmx.de}@* Richard M. Stallman @email{rms@@gnu.org}@* +Luc Teirlinck @email{teirllm@@dms.auburn.edu}@* J. Otto Tennant @email{jotto@@pobox.com}@* Jean-Philippe Theberge @email{jphil@@acs.pagesjaunes.fr} @end quotation @@ -839,3 +851,7 @@ Jean-Philippe Theberge @email{jphil@@acs.pagesjaunes.fr} @c =================================================================== @bye + +@ignore + arch-tag: 10a4ee1c-7ef4-4c06-8b7a-f975e39f0dec +@end ignore diff --git a/man/smtpmail.texi b/man/smtpmail.texi index f1074dd100..08ce87ac99 100644 --- a/man/smtpmail.texi +++ b/man/smtpmail.texi @@ -3,7 +3,7 @@ @settitle Emacs SMTP Library @syncodeindex vr fn @copying -Copyright @copyright{} 2003 Free Software Foundation, Inc. +Copyright @copyright{} 2003, 2004 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -207,7 +207,6 @@ The following example illustrates what you could put in @cindex SASL @cindex CRAM-MD5 -@cindex PLAIN @cindex LOGIN @cindex STARTTLS Many environments require SMTP clients to authenticate themselves @@ -215,15 +214,14 @@ before they are allowed to route mail via a server. The two following variables contains the authentication information needed for this. The first variable, @code{smtpmail-auth-credentials}, instructs the SMTP library to use a SASL authentication step, currently only the -CRAM-MD5, PLAIN and LOGIN-MD5 mechanisms are supported and will be -selected in that order if the server supports them. The second -variable, @code{smtpmail-starttls-credentials}, instructs the SMTP -library to connect to the server using STARTTLS. This means the -protocol exchange can be integrity protected and confidential by using -TLS, and optionally also authentication of the client. It is common -to use both these mechanisms, e.g., to use STARTTLS to achieve -integrity and confidentiality and then use SASL for client -authentication. +CRAM-MD5 and LOGIN mechanisms are supported and will be selected in +that order if the server supports them. The second variable, +@code{smtpmail-starttls-credentials}, instructs the SMTP library to +connect to the server using STARTTLS. This means the protocol +exchange can be integrity protected and confidential by using TLS, and +optionally also authentication of the client. It is common to use +both these mechanisms, e.g., to use STARTTLS to achieve integrity and +confidentiality and then use SASL for client authentication. @table @code @item smtpmail-auth-credentials @@ -385,3 +383,7 @@ cannot accept mail. @contents @bye + +@ignore + arch-tag: 6316abdf-b366-4562-87a2-f37e8f894b6f +@end ignore diff --git a/man/speedbar.texi b/man/speedbar.texi index 3b5e827fdc..246aa1b7ca 100644 --- a/man/speedbar.texi +++ b/man/speedbar.texi @@ -1,12 +1,11 @@ \input texinfo @c -*-texinfo-*- -@c $Id: speedbar.texi,v 1.10 2002/03/16 19:33:21 eliz Exp $ @setfilename ../info/speedbar @settitle Speedbar: File/Tag summarizing utility @syncodeindex fn cp @copying -Copyright @copyright{} 1999, 2000, 2002 Free Software Foundation, Inc. +Copyright @copyright{} 1999, 2000, 2002, 2004 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -648,10 +647,6 @@ You can click on any stack element and gdb will move to that stack level. You can then check variables local to that level at the GDB prompt. -This mode has the unfortunate side-effect of breaking GDB's repeat -feature when you hit @kbd{RET} since your previous command is overridden -with a stack fetching command. - @node Customizing, Extending, Minor Modes, Top @comment node-name, next, previous, up @chapter Customizing @@ -1247,3 +1242,7 @@ Two good values are @code{nil} and @code{'statictag}. @bye @c LocalWords: speedbar's xref slowbar kbd subsubsection @c LocalWords: keybindings + +@ignore + arch-tag: e1fc85f0-1eeb-489f-a8d4-a2bfe711fa02 +@end ignore diff --git a/man/texinfo.tex b/man/texinfo.tex index 35b3020e62..27f804eb55 100644 --- a/man/texinfo.tex +++ b/man/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2002-06-04.06} +\def\texinfoversion{2003-10-06.16} % % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, % 2000, 01, 02 Free Software Foundation, Inc. @@ -6339,3 +6339,7 @@ should work if nowhere else does.} @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: + +@ignore + arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 +@end ignore diff --git a/man/text.texi b/man/text.texi index bf68558d86..45c7e504d8 100644 --- a/man/text.texi +++ b/man/text.texi @@ -312,7 +312,7 @@ pages. @cindex pages @cindex formfeed Files are often thought of as divided into @dfn{pages} by the -@dfn{formfeed} character (ASCII control-L, octal code 014). When you +@dfn{formfeed} character (@acronym{ASCII} control-L, octal code 014). When you print hardcopy for a file, this character forces a page break; thus, each page of the file goes on a separate page on paper. Most Emacs commands treat the page-separator character just like any other @@ -2198,7 +2198,7 @@ Make the region right-filled (@code{set-justification-right}). @kindex M-j f @r{(Enriched mode)} @findex set-justification-full @item M-j f -Make the region fully-justified (@code{set-justification-full}). +Make the region fully justified (@code{set-justification-full}). @kindex M-j c @r{(Enriched mode)} @kindex M-S @r{(Enriched mode)} @findex set-justification-center @@ -2277,3 +2277,6 @@ uncompression (@pxref{Compressed Files}). To disable format conversion but allow character code conversion and/or automatic uncompression if appropriate, use @code{format-find-file} with suitable arguments. +@ignore + arch-tag: 8db54ed8-2036-49ca-b0df-23811d03dc70 +@end ignore diff --git a/man/tramp.texi b/man/tramp.texi index 07cffe2613..7e21b9c691 100644 --- a/man/tramp.texi +++ b/man/tramp.texi @@ -30,10 +30,10 @@ @end macro @copying -Copyright @copyright{} 1999, 2000, 2001, 2002, 2003 Free Software +Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -@quotation +@quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no @@ -54,10 +54,10 @@ license to the document, as described in section 6 of the license. @end copying @c Entries for @command{install-info} to use -@dircategory Emacs +@dircategory @value{emacs-name} @direntry * TRAMP: (tramp). Transparent Remote Access, Multiple Protocol - Emacs remote file access via rsh and rcp. + @value{emacs-name} remote file access via rsh and rcp. @end direntry @tex @@ -102,22 +102,33 @@ You can find the latest version of this document on the web at @end ifset @ifhtml -This manual is also available as a @uref{tramp_ja.html, Japanese -translation}. +@ifset jamanual +This manual is also available as a @uref{@value{japanese-manual}, +Japanese translation}. +@end ifset The latest release of @tramp{} is available for -@uref{http://savannah.gnu.org/download/tramp/, +@uref{http://savannah.nongnu.org/download/tramp/, download}, or you may see @ref{Obtaining @tramp{}} for more details, including the CVS server details. -@tramp{} also has a @uref{https://savannah.gnu.org/projects/tramp/, +@tramp{} also has a @uref{http://savannah.nongnu.org/projects/tramp/, Savannah Project Page}. @end ifhtml There is a mailing list for @tramp{}, available at @email{tramp-devel@@mail.freesoftware.fsf.org}, and archived at -@uref{http://www.mail-archive.com/emacs-rcp@@ls6.cs.uni-dortmund.de/} as -well as the usual Savannah archives. +@uref{http://savannah.nongnu.org/mail/?group=tramp, Savannah Mail +Archive}. +@ifhtml +Older archives are located at +@uref{http://sourceforge.net/mailarchive/forum.php?forum=tramp-devel, +SourceForge Mail Archive} and +@uref{http://www.mail-archive.com/emacs-rcp@@ls6.cs.uni-dortmund.de/, +The Mail Archive}. +@c in HTML output, there's no new paragraph. +@*@* +@end ifhtml @insertcopying @@ -137,7 +148,7 @@ For the end user: * Usage:: An overview of the operation of @tramp{}. * Bug Reports:: Reporting Bugs and Problems. * Frequently Asked Questions:: Questions and answers from the mailing list. -* Concept Index:: An item for each concept +* Concept Index:: An item for each concept. For the developer: @@ -153,6 +164,7 @@ Installing @tramp{} with your @value{emacs-name} * Installation parameters:: Parameters in order to control installation. * Load paths:: How to plug-in @tramp{} into your environment. +* Japanese manual:: Japanese manual. @end ifset @@ -165,12 +177,13 @@ Configuring @tramp{} for use * Default Method:: Selecting a default method. * Customizing Methods:: Using Non-Standard Methods. * Customizing Completion:: Selecting config files for user/host name completion. +* Password caching:: Reusing passwords for several connections. * Remote Programs:: How @tramp{} finds and uses programs on the remote machine. * Remote shell setup:: Remote shell setup hints. * Windows setup hints:: Issues with Cygwin ssh. * Auto-save and Backup:: Auto-save and Backup. -Using @tramp +Using @tramp{} * Filename Syntax:: @tramp{} filename conventions. * Multi-hop filename syntax:: Multi-hop filename conventions. @@ -198,7 +211,7 @@ How file names, directories and localnames are mangled and managed @end menu @node Overview -@chapter An overview of @tramp +@chapter An overview of @tramp{} @cindex overview After the installation of @tramp{} into your @value{emacs-name}, you @@ -208,8 +221,8 @@ control, and @command{dired} are transparently enabled. Your access to the remote machine can be with the @command{rsh}, @command{rlogin}, @command{telnet} programs or with any similar -connection method. This connection must pass ASCII successfully to be -usable but need not be 8-bit clean. +connection method. This connection must pass @acronym{ASCII} +successfully to be usable but need not be 8-bit clean. The package provides support for @command{ssh} connections out of the box, one of the more common uses of the package. This allows @@ -359,7 +372,7 @@ behind the scenes when you open a file with @tramp{}. @c For the end user @node Obtaining @tramp{} @chapter Obtaining @tramp{}. -@cindex obtaining Tramp +@cindex obtaining @tramp{} @tramp{} is freely available on the Internet and the latest release may be downloaded from @@ -380,20 +393,15 @@ following URL and then clicking on the CVS link in the navigation bar at the top. @noindent -@uref{http://savannah.gnu.org/projects/tramp/} +@uref{http://savannah.nongnu.org/projects/tramp/} @noindent Or follow the example session below: @example ] @strong{cd ~/@value{emacs-dir}} -] @strong{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/tramp login} - -(Logging in to anoncvs@@subversions.gnu.org) -CVS password: @strong{(just hit RET here)} -@dots{} - -] @strong{cvs -z3 -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/tramp co tramp} +] @strong{export CVS_RSH="ssh"} +] @strong{cvs -z3 -d:ext:anoncvs@@savannah.nongnu.org:/cvsroot/tramp co tramp} @end example @noindent @@ -403,6 +411,7 @@ updates from the repository by issuing the command: @example ] @strong{cd ~/@value{emacs-dir}/tramp} +] @strong{export CVS_RSH="ssh"} ] @strong{cvs update -d} @end example @@ -445,11 +454,12 @@ filenames in July 2002. @cindex configuration @cindex default configuration -@tramp{} is (normally) fully functional when it is initially -installed. It is initially configured to use the @command{ssh} program -to connect to the remote host and to use base-64 encoding (on the -remote host, via @command{mimencode}, and on the local host via the -built-in support for base-64 encoding in Emacs). +@tramp{} is (normally) fully functional when it is initially installed. +It is initially configured to use the @command{ssh} program to connect +to the remote host and to use base64 or uu encoding to transfer the +files through that shell connection. So in the easiest case, you just +type @kbd{C-x C-f} and then enter the filename +@file{@value{tramp-prefix}@var{user}@@@var{machine}@value{tramp-postfix}@var{/path/to.file}}. On some hosts, there are problems with opening a connection. These are related to the behavior of the remote shell. See @xref{Remote shell @@ -457,10 +467,13 @@ setup}, for details on this. If you do not wish to use these commands to connect to the remote host, you should change the default connection and transfer method -that @tramp uses. There are several different methods that @tramp{} +that @tramp{} uses. There are several different methods that @tramp{} can use to connect to remote machines and transfer files (@pxref{Connection types}). +If you don't know which method is right for you, see @xref{Default +Method}. + @menu * Connection types:: Types of connections made to remote machines. @@ -468,8 +481,12 @@ can use to connect to remote machines and transfer files * External transfer methods:: External transfer methods. * Multi-hop Methods:: Connecting to a remote host using multiple hops. * Default Method:: Selecting a default method. + Here we also try to help those who + don't have the foggiest which method + is right for them. * Customizing Methods:: Using Non-Standard Methods. * Customizing Completion:: Selecting config files for user/host name completion. +* Password caching:: Reusing passwords for several connections. * Remote Programs:: How @tramp{} finds and uses programs on the remote machine. * Remote shell setup:: Remote shell setup hints. * Windows setup hints:: Issues with Cygwin ssh. @@ -486,7 +503,7 @@ advantages and limitations. Both types of connection make use of a remote shell access program such as @command{rsh}, @command{ssh} or @command{telnet} to connect to the remote machine. -This connection is used to perform many of the operations that @tramp +This connection is used to perform many of the operations that @tramp{} requires to make the remote file system transparently accessible from the local machine. It is only when visiting files that the methods differ. @@ -544,9 +561,9 @@ allow you to transfer files between @emph{user identities} rather than hosts, see below.) These methods depend on the existence of a suitable encoding and -decoding command on remote machine. Locally, @tramp{} may be able to use -features of Emacs to decode and encode the files or it may require -access to external commands to perform that task. +decoding command on remote machine. Locally, @tramp{} may be able to +use features of @value{emacs-name} to decode and encode the files or +it may require access to external commands to perform that task. @cindex uuencode @cindex mimencode @@ -635,7 +652,7 @@ easy to implement, so I haven't got around to it, yet. @cindex sshx method @cindex Cygwin (with sshx method) -As you expect, this is similar to @option{ssh}, only a little +As you would expect, this is similar to @option{ssh}, only a little different. Whereas @option{ssh} opens a normal interactive shell on the remote host, this option uses @samp{ssh -t -t @var{host} -l @var{user} /bin/sh} to open a connection. This is useful for users @@ -652,11 +669,11 @@ question (yet), therefore you will need to make sure that you can log in without such questions. This is also useful for Windows users where @command{ssh}, when -invoked from an Emacs buffer, tells them that it is not allocating a -pseudo tty. When this happens, the login shell is wont to not print -any shell prompt, which confuses @tramp{} mightily. For reasons -unknown, some Windows ports for @command{ssh} (maybe the Cygwin one) -require the doubled @samp{-t} option. +invoked from an @value{emacs-name} buffer, tells them that it is not +allocating a pseudo tty. When this happens, the login shell is wont +to not print any shell prompt, which confuses @tramp{} mightily. For +reasons unknown, some Windows ports for @command{ssh} (maybe the +Cygwin one) require the doubled @samp{-t} option. This supports the @samp{-p} kludge. @@ -760,7 +777,7 @@ call @samp{ssh -1} and @samp{ssh -2}, respectively. This way, you can explicitly select whether you want to use the SSH protocol version 1 or 2 to connect to the remote host. (You can also specify in @file{~/.ssh/config}, the SSH configuration file, which protocol -should be used, and use the regular @option{ssh} method.) +should be used, and use the regular @option{scp} method.) Two other variants, @option{scp1_old} and @option{scp2_old}, use the @command{ssh1} and @command{ssh2} commands explicitly. If you don't @@ -800,7 +817,7 @@ This method supports the @samp{-p} hack. @cindex ssh (with scpx method) @cindex Cygwin (with scpx method) -As you expect, this is similar to @option{scp}, only a little +As you would expect, this is similar to @option{scp}, only a little different. Whereas @option{scp} opens a normal interactive shell on the remote host, this option uses @samp{ssh -t -t @var{host} -l @var{user} /bin/sh} to open a connection. This is useful for users @@ -810,10 +827,10 @@ just gives @tramp{} a more-or-less `standard' login shell to work with. This is also useful for Windows users where @command{ssh}, when -invoked from an Emacs buffer, tells them that it is not allocating a -pseudo tty. When this happens, the login shell is wont to not print -any shell prompt, which confuses @tramp{} mightily. Maybe this -applies to the Cygwin port of SSH. +invoked from an @value{emacs-name} buffer, tells them that it is not +allocating a pseudo tty. When this happens, the login shell is wont +to not print any shell prompt, which confuses @tramp{} mightily. +Maybe this applies to the Cygwin port of SSH. This method supports the @samp{-p} hack. @@ -854,19 +871,21 @@ This method uses the command @samp{fsh @var{host} -l @var{user} @cindex method fsh @cindex fsh method + There is no inline method using @command{fsh} as the multiplexing provided by the program is not very useful in our context. @tramp{} opens just one connection to the remote host and then keeps it open, anyway. -@ifset emacs @item @option{ftp} @cindex method ftp @cindex ftp method This is not a native @tramp{} method. Instead of, it forwards all requests to @value{ftp-package-name}. +@ifset xemacs +This works only for unified filenames, see @ref{Issues}. @end ifset @@ -889,7 +908,7 @@ directory @code{/}), all available shares are listed. Since authorization is done on share level, you will be prompted always for a password if you access another share on the same host. -Due to security reasons, the password is not cached. +This can be suppressed by @ref{Password caching}. MS Windows uses for authorization both a user name and a domain name. Because of this, the @tramp{} syntax has been extended: you can @@ -907,10 +926,11 @@ methods, where in such a case the local user name is taken. The @option{smb} method supports the @samp{-p} hack. -@strong{Please note:} If Emacs runs locally under MS Windows, this -method isn't available. Instead of, you can use UNC file names like -@file{//melancholia/daniel$$/.emacs}. The only disadvantage is that -there's no possibility to specify another user name. +@strong{Please note:} If @value{emacs-name} runs locally under MS +Windows, this method isn't available. Instead of, you can use UNC +file names like @file{//melancholia/daniel$$/.emacs}. The only +disadvantage is that there's no possibility to specify another user +name. @end table @@ -1013,7 +1033,7 @@ the standard port. @vindex tramp-default-method When you select an appropriate transfer method for your typical usage -you should set the variable @var{tramp-default-method} to reflect that +you should set the variable @code{tramp-default-method} to reflect that choice. This variable controls which method will be used when a method is not specified in the @tramp{} file name. For example: @@ -1023,7 +1043,7 @@ is not specified in the @tramp{} file name. For example: @vindex tramp-default-method-alist You can also specify different methods for certain user/host -combinations, via the variable @var{tramp-default-method-alist}. For +combinations, via the variable @code{tramp-default-method-alist}. For example, the following two lines specify to use the @option{ssh} method for all user names matching @samp{john} and the @option{rsync} method for all host names matching @samp{lily}. The third line @@ -1039,7 +1059,7 @@ the machine @samp{localhost}. @noindent See the documentation for the variable -@var{tramp-default-method-alist} for more details. +@code{tramp-default-method-alist} for more details. External transfer methods are normally preferable to inline transfer methods, giving better performance. They may not be useful if you use @@ -1064,6 +1084,48 @@ methods to connect. These provide a much higher level of security, making it a non-trivial exercise for someone to obtain your password or read the content of the files you are editing. + +@subsection Which method is the right one for me? +@cindex choosing the right method + +Given all of the above, you are probably thinking that this is all fine +and good, but it's not helping you to choose a method! Right you are. +As a developer, we don't want to boss our users around but give them +maximum freedom instead. However, the reality is that some users would +like to have some guidance, so here I'll try to give you this guidance +without bossing you around. You tell me whether it works @dots{} + +My suggestion is to use an inline method. For large files, out-of-band +methods might be more efficient, but I guess that most people will want +to edit mostly small files. + +I guess that these days, most people can access a remote machine by +using @code{ssh}. So I suggest that you use the @code{ssh} method. +So, type @kbd{C-x C-f /ssh:root@@otherhost:/etc/motd @key{RET}} to +edit the @file{/etc/motd} file on the other host. + +If you can't use @code{ssh} to log in to the remote host, then select a +method that uses a program that works. For instance, Windows users +might like the @code{plink} method which uses the PuTTY implementation +of @code{ssh}. Or you use Kerberos and thus like @code{krlogin}. + +For the special case of editing files on the local host as another +user, see the @code{su} or @code{sudo} method. + +People who edit large files may want to consider @code{scp} instead of +@code{ssh}, or @code{pscp} instead of @code{plink}. These out-of-band +methods are faster than inline methods for large files. Note, however, +that out-of-band methods suffer from some limitations. Please try +first whether you really get a noticeable speed advantage from using an +out-of-band method! Maybe even for large files, inline methods are +fast enough. + +The reason why I'm suggesting to use inline methods is that they work +even if the remote end is asking you for a password. Out-of-band +methods don't work in this situation. Also, multi-hop methods are +inherently inline. + + @node Customizing Methods @section Using Non-Standard Methods @cindex customizing methods @@ -1109,7 +1171,7 @@ Example: @defun tramp-set-completion-function method function-list This function sets @var{function-list} as list of completion functions -for @var{method}. +for @var{method}. Example: @example @@ -1145,6 +1207,21 @@ in such files, it can return host names only. This function returns the host nicknames defined by @code{Host} entries in @file{~/.ssh/config} style files. +@item @code{tramp-parse-shostkeys} +@findex tramp-parse-shostkeys + +SSH2 parsing of directories @file{/etc/ssh2/hostkeys/*} and +@file{~/ssh2/hostkeys/*}. Hosts are coded in file names +@file{hostkey_PORTNUMBER_HOST-NAME.pub}. User names are always nil. + +@item @code{tramp-parse-sknownhosts} +@findex tramp-parse-shostkeys + +Another SSH2 style parsing of directories like +@file{/etc/ssh2/knownhosts/*} and @file{~/ssh2/knownhosts/*}. This +case, hosts names are coded in file names +@file{HOST-NAME.ALGORITHM.pub}. User names are always nil. + @item @code{tramp-parse-hosts} @findex tramp-parse-hosts @@ -1181,6 +1258,49 @@ Example: @end defun +@node Password caching +@section Reusing passwords for several connections. +@cindex passwords + +Sometimes it is necessary to connect to the same remote host several +times. Reentering passwords again and again would be annoying, when +the choosen method does not support access without password prompt +throught own configuration. + +By default, @tramp{} caches the passwords entered by you. They will +be reused next time if a connection needs them for the same user name +and host name, independant of the connection method. + +@vindex password-cache-expiry +Passwords are not saved permanently, that means the password caching +is limited to the lifetime of your @value{emacs-name} session. You +can influence the lifetime of password caching by customizing the +variable @code{password-cache-expiry}. The value is the number of +seconds how long passwords are cached. Setting it to @code{nil} +disables the expiration. + +@findex tramp-clear-passwd +A password is removed from the cache if a connection isn't established +successfully. You can remove a password from the cache also by +executing @kbd{M-x tramp-clear-passwd} in a buffer containing a +related remote file or directory. + +@vindex password-cache +If you don't like this feature for security reasons, password caching +can be disabled totally by customizing the variable +@code{password-cache} (setting it to @code{nil}). + +Implementation Note: password caching is based on the package +password.el in No Gnus. For the time being, it is activated only when +this package is seen in the @code{load-path} while loading @tramp{}. +@ifset tramp-inst +If you don't use No Gnus, you can take password.el from the @tramp{} +@file{contrib} directory, see @ref{Installation parameters}. +@end ifset +It will be activated mandatory once No Gnus has found its way into +@value{emacs-name}. + + @node Remote Programs @section How @tramp{} finds and uses programs on the remote machine. @@ -1241,7 +1361,7 @@ There are different possible strategies for pursuing this problem. One strategy is to enable @tramp{} to deal with all possible situations. This is a losing battle, since it is not possible to deal with @emph{all} situations. The other strategy is to require you to set up -the remote host such that it behaves like @tramp{} expect. This might +the remote host such that it behaves like @tramp{} expects. This might be inconvenient because you have to invest a lot of effort into shell setup before you can begin to use @tramp{}. @@ -1310,6 +1430,16 @@ The other approach is to teach @tramp{} about these questions. See the variables @code{tramp-actions-before-shell} and @code{tramp-multi-actions} (for multi-hop connections). + +@item Environment variables named like users in @file{.profile} + +If you have a user named frumple and set the variable @code{FRUMPLE} in +your shell environment, then this might cause trouble. Maybe rename +the variable to @code{FRUMPLE_DIR} or the like. + +This weird effect was actually reported by a @tramp{} user! + + @item Non-Bourne commands in @file{.profile} After logging in to the remote host, @tramp{} issues the command @@ -1364,22 +1494,21 @@ find out if the shell is Bourne-ish? @cindex backup @vindex backup-directory-alist -Explaining auto-save is still to do. - -Normally, Emacs writes backup files to the same directory as the -original files, but this behavior can be changed via the variable -@code{backup-directory-alist}. In connection with @tramp{}, this can -have unexpected side effects. Suppose that you specify that all backups -should go to the directory @file{~/.emacs.d/backups/}, and then you edit -the file @file{/su:root@@localhost:/etc/secretfile}. The effect is that -the backup file will be owned by you and not by root, thus possibly -enabling others to see it even if they were not intended to see it. +Normally, @value{emacs-name} writes backup files to the same directory +as the original files, but this behavior can be changed via the +variable @code{backup-directory-alist}. In connection with @tramp{}, +this can have unexpected side effects. Suppose that you specify that +all backups should go to the directory @file{~/.emacs.d/backups/}, and +then you edit the file @file{/su:root@@localhost:/etc/secretfile}. +The effect is that the backup file will be owned by you and not by +root, thus possibly enabling others to see it even if they were not +intended to see it. When @code{backup-directory-alist} is nil (the default), such problems do not occur. If you wish to customize the variable, the workaround is to include -special settings for Tramp files. For example, the following statement +special settings for @tramp{} files. For example, the following statement effectively `turns off' the effect of @code{backup-directory-alist} for @tramp{} files: @@ -1389,6 +1518,29 @@ effectively `turns off' the effect of @code{backup-directory-alist} for (cons tramp-file-name-regexp nil)) @end lisp +The same problem can happen with auto-saving files. +@ifset emacs +Since @value{emacs-name} 21, the variable +@code{auto-save-file-name-transforms} keeps information, on which +directory an auto-saved file should go. By default, it is initialized +for @tramp{} files to the local temporary directory. + +On some versions of @value{emacs-name}, namely the version built for +Debian Linux, the variable @code{auto-save-file-name-transforms} +contains the directory where @value{emacs-name} was built. A +workaround is to manually set the variable to a sane value. + +If auto-saved files should go into the same directory as the original +files, @code{auto-save-file-name-transforms} should be set to nil. + +Another possibility is to set the variable +@code{tramp-auto-save-directory} to a proper value. +@end ifset +@ifset xemacs +For this purpose you can set the variable +@code{tramp-auto-save-directory} to a proper value. +@end ifset + @node Windows setup hints @section Issues with Cygwin ssh @@ -1406,29 +1558,30 @@ setting up Cygwin in their FAQ at @uref{http://cygwin.com/faq/}. @cindex method scpx with Cygwin @cindex scpx method with Cygwin If you wish to use the @code{scpx} connection method, then you might -have the problem that Emacs calls @code{scp} with a Windows filename -such as @code{c:/foo}. The Cygwin version of @code{scp} does not know -about Windows filenames and interprets this as a remote filename on the -host @code{c}. +have the problem that @value{emacs-name} calls @code{scp} with a +Windows filename such as @code{c:/foo}. The Cygwin version of +@code{scp} does not know about Windows filenames and interprets this +as a remote filename on the host @code{c}. One possible workaround is to write a wrapper script for @code{scp} which converts the Windows filename to a Cygwinized filename. -I guess that another workaround is to run Emacs under Cygwin, or to run -a Cygwinized Emacs. +I guess that another workaround is to run @value{emacs-name} under +Cygwin, or to run a Cygwinized @value{emacs-name}. @cindex Cygwin and ssh-agent -@cindex SSH_AUTH_SOCK and Emacs on Windows +@cindex SSH_AUTH_SOCK and @value{emacs-name} on Windows If you want to use either @code{ssh} based method on Windows, then you might encounter problems with @code{ssh-agent}. Using this program, you can avoid typing the pass-phrase every time you log in (and the @code{scpx} method more or less requires you to use @code{ssh-agent} because it does not allow you to type a password or pass-phrase). -However, if you start Emacs from a desktop shortcut, then the -environment variable @code{SSH_AUTH_SOCK} is not set and so Emacs and -thus @tramp{} and thus @code{ssh} and @code{scp} started from @tramp{} -cannot communicate with @code{ssh-agent}. It works better to start -Emacs from the shell. +However, if you start @value{emacs-name} from a desktop shortcut, then +the environment variable @code{SSH_AUTH_SOCK} is not set and so +@value{emacs-name} and thus @tramp{} and thus @code{ssh} and +@code{scp} started from @tramp{} cannot communicate with +@code{ssh-agent}. It works better to start @value{emacs-name} from +the shell. If anyone knows how to start @code{ssh-agent} under Windows in such a way that desktop shortcuts can profit, please holler. I don't really @@ -1436,8 +1589,8 @@ know anything at all about Windows@dots{} @node Usage -@chapter Using @tramp -@cindex using @tramp +@chapter Using @tramp{} +@cindex using @tramp{} Once you have installed @tramp{} it will operate fairly transparently. You will be able to access files on any remote machine that you can log in @@ -1448,15 +1601,15 @@ details of the system to connect to. This is similar to the syntax used by the @value{ftp-package-name} package. @cindex type-ahead -Something that might happen which surprises you is that Emacs -remembers all your keystrokes, so if you see a password prompt from -Emacs, say, and hit @kbd{@key{RET}} twice instead of once, then the -second keystroke will be processed by Emacs after @tramp{} has done -its thing. Why, this type-ahead is normal behavior, you say. Right -you are, but be aware that opening a remote file might take quite a -while, maybe half a minute when a connection needs to be opened. -Maybe after half a minute you have already forgotten that you hit that -key! +Something that might happen which surprises you is that +@value{emacs-name} remembers all your keystrokes, so if you see a +password prompt from @value{emacs-name}, say, and hit @kbd{@key{RET}} +twice instead of once, then the second keystroke will be processed by +@value{emacs-name} after @tramp{} has done its thing. Why, this +type-ahead is normal behavior, you say. Right you are, but be aware +that opening a remote file might take quite a while, maybe half a +minute when a connection needs to be opened. Maybe after half a +minute you have already forgotten that you hit that key! @menu * Filename Syntax:: @tramp{} filename conventions. @@ -1532,9 +1685,9 @@ This is done by replacing the initial The user, machine and file specification remain the same. So, to connect to the machine @code{melancholia} as @code{daniel}, -using the @option{su} method to transfer files, and edit @file{.emacs} +using the @option{ssh} method to transfer files, and edit @file{.emacs} in my home directory I would specify the filename -@file{@value{tramp-prefix}su@value{tramp-postfix-single-hop}daniel@@melancholia@value{tramp-postfix}.emacs}. +@file{@value{tramp-prefix}ssh@value{tramp-postfix-single-hop}daniel@@melancholia@value{tramp-postfix}.emacs}. @node Multi-hop filename syntax @@ -1544,7 +1697,7 @@ in my home directory I would specify the filename The syntax of multi-hop file names is necessarily slightly different than the syntax of other @tramp{} file names. Here's an example -multi-hop file name, first in Emacs syntax and then in XEmacs syntax: +multi-hop file name: @example @value{tramp-prefix}multi@value{tramp-postfix-single-hop}rsh@value{tramp-postfix-multi-hop}out@@gate@value{tramp-postfix-single-hop}telnet@value{tramp-postfix-multi-hop}kai@@real.host@value{tramp-postfix}/path/to.file @@ -1618,7 +1771,7 @@ is a possible completion for the respective method, machine, @end ifset and @samp{@value{tramp-prefix-single-hop}toto@value{tramp-postfix}} -might be a host @tramp has detected in your @file{~/.ssh/known_hosts} +might be a host @tramp{} has detected in your @file{~/.ssh/known_hosts} file (given you're using default method @option{ssh}). If you go on to type @kbd{e @key{TAB}}, the minibuffer is completed to @@ -1707,7 +1860,7 @@ Where can I get the latest @tramp{}? There is also a Savannah project page. @noindent -@uref{https://savannah.gnu.org/projects/tramp/} +@uref{http://savannah.nongnu.org/projects/tramp/} @item Which systems does it work on? @@ -1717,8 +1870,9 @@ as XEmacs 21. XEmacs 20 is more problematic, see the notes in @file{tramp.el}. I don't think anybody has really tried it on Emacs 19. The package was intended to work on Unix, and it really expects a -Unix-like system on the remote end, but some people seemed to have some -success getting it to work on NT Emacs. +Unix-like system on the remote end (except the @option{smb} method), +but some people seemed to have some success getting it to work on NT +Emacs. There is some informations on @tramp{} on NT at the following URL; many thanks to Joe Stoy for providing the information: @@ -1744,7 +1898,7 @@ packages which make @value{ftp-package-name} file name handlers active. You can see it applying @kbd{C-h v file-name-handler-alist}: @example -file-name-handler-alist's value is +file-name-handler-alist's value is (("^/[^/:]*\\'" . ange-ftp-completion-hook-function) ("^/[^/:]*[^/:.]:" . ange-ftp-hook-function) ("^/[^/]*$" . tramp-completion-file-name-handler) @@ -1826,8 +1980,9 @@ work on NT with some tweaking. @item How can I get notified when @tramp{} file transfers are complete? -The following snippet can be put in your @file{~/.emacs} file. It makes -Emacs beep after reading from or writing to the remote host. +The following snippet can be put in your @file{~/.emacs} file. It +makes @value{emacs-name} beep after reading from or writing to the +remote host. @lisp (defadvice tramp-handle-write-region @@ -1931,7 +2086,7 @@ operations on files accessed via @tramp{}. In the case of a remote file, the @code{shell-command} interface is used, with some wrapper code, to provide the same functionality on the -remote machine as would be seen on the local machine. +remote machine as would be seen on the local machine. @node Changed workfiles @@ -1974,10 +2129,11 @@ Minor implementation details, &c. @node Remote File Ownership @subsection How VC determines who owns a workfile -Emacs provides the @code{user-full-name} function to return the login name -of the current user as well as mapping from arbitrary user id values -back to login names. The VC code uses this functionality to map from the -uid of the owner of a workfile to the login name in some circumstances. +@value{emacs-name} provides the @code{user-full-name} function to +return the login name of the current user as well as mapping from +arbitrary user id values back to login names. The VC code uses this +functionality to map from the uid of the owner of a workfile to the +login name in some circumstances. This will not, for obvious reasons, work if the remote system has a different set of logins. As such, it is necessary to delegate to the @@ -2095,6 +2251,29 @@ uses EFS for downloading new packages. So, obviously, EFS has to be installed from the start. If the filenames were unified, @tramp{} would have to be installed from the start, too. +@ifset xemacs +@strong{Note:} If you'ld like to use a similar syntax like +@value{ftp-package-name}, you need the following settings in your init +file: + +@lisp +(setq tramp-unified-filenames t) +(require 'tramp) +@end lisp + +The autoload of the @value{emacs-name} @tramp{} package must be +disabled. This can be achieved by setting file permissions @code{000} +to the files @file{.../xemacs-packages/lisp/tramp/auto-autoloads.el*}. + +In case of unified filenames, all @value{emacs-name} download sites +are added to @code{tramp-default-method-alist} with default method +@code{ftp} @xref{Default Method}. These settings shouldn't be touched +for proper working of the @value{emacs-name} package system. + +The syntax for unified filenames is described in the @tramp{} manual +for @value{emacs-other-name}. +@end ifset + @end itemize @node Concept Index @@ -2119,3 +2298,7 @@ would have to be installed from the start, too. @c ** Use `filename' resp. `file name' consistently. @c ** Use `host' resp. `machine' consistently. @c ** Consistent small or capitalized words especially in menues. + +@ignore + arch-tag: f96dd66e-6dd3-4c92-8d77-9c56205ba808 +@end ignore diff --git a/man/trampver.texi b/man/trampver.texi index f728531b9e..38862115ce 100644 --- a/man/trampver.texi +++ b/man/trampver.texi @@ -5,7 +5,7 @@ @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. @macro trampver{} -2.0.36 +2.0.39 @end macro @c Other flags from configuration @@ -32,6 +32,7 @@ @set tramp-postfix : @set tramp-postfix-single-hop : @set tramp-postfix-multi-hop : +@set japanese-manual tramp_ja-emacs.html @end ifset @c XEmacs counterparts. @@ -44,6 +45,7 @@ @set tramp-postfix ] @set tramp-postfix-single-hop / @set tramp-postfix-multi-hop : +@set japanese-manual tramp_ja-xemacs.html @end ifset @c Empty macro definitions in order to satisfy texi2dvi @@ -55,6 +57,8 @@ @c The installation chapter is needed only in case Tramp is installed @c standalone. That's why it is included from `trampinst.texi'. -@c Otherwise, '/dev/null/' is tken, which leaves this part empty. - +@c Otherwise, '/dev/null/' is taken, which leaves this part empty. +@ignore + arch-tag: e0fe322c-e06b-46eb-bb5b-d091b521f41c +@end ignore diff --git a/man/trouble.texi b/man/trouble.texi index 737fcf12fb..e7f6ae7608 100644 --- a/man/trouble.texi +++ b/man/trouble.texi @@ -124,8 +124,8 @@ about the undo facility. normally, and how to recognize them and correct them. For a list of additional problems you might encounter, see @ref{Bugs and problems, , Bugs and problems, efaq, GNU Emacs FAQ}, and the file @file{etc/PROBLEMS} -in the Emacs distribution. Type @kbd{C-h F} to read the FAQ; type -@kbd{C-h P} to read the @file{PROBLEMS} file. +in the Emacs distribution. Type @kbd{C-h C-f} to read the FAQ; type +@kbd{C-h C-e} to read the @file{PROBLEMS} file. @menu * DEL Does Not Delete:: What to do if @key{DEL} doesn't delete. @@ -426,7 +426,7 @@ to do so effectively, you must know when and how to do it. Before reporting a bug, it is a good idea to see if it is already known. You can find the list of known problems in the file -@file{etc/PROBLEMS} in the Emacs distribution; type @kbd{C-h P} to read +@file{etc/PROBLEMS} in the Emacs distribution; type @kbd{C-h C-e} to read it. Some additional user-level problems can be found in @ref{Bugs and problems, , Bugs and problems, efaq, GNU Emacs FAQ}. Looking up your problem in these two documents might provide you with a solution or a @@ -683,7 +683,7 @@ terminal-dependent bug without access to a terminal of the type that stimulates the bug.@refill @item -If non-ASCII text or internationalization is relevant, the locale that +If non-@acronym{ASCII} text or internationalization is relevant, the locale that was current when you started Emacs. On GNU/Linux and Unix systems, or if you use a Posix-style shell such as Bash, you can use this shell command to view the relevant values: @@ -1062,3 +1062,7 @@ Look in the service directory for someone who might help you for a fee. The service directory is found in the file named @file{etc/SERVICE} in the Emacs distribution. @end itemize + +@ignore + arch-tag: c9cba76d-b2cb-4e0c-ae3f-19d5ef35817c +@end ignore diff --git a/man/vip.texi b/man/vip.texi index fc34eacc86..cba1998f01 100644 --- a/man/vip.texi +++ b/man/vip.texi @@ -121,7 +121,7 @@ explained in more detail in the GNU Emacs Manual. @cindex end (of buffer) @cindex region -Conceptually, a @dfn{buffer} is just a string of ASCII characters and two +Conceptually, a @dfn{buffer} is just a string of @acronym{ASCII} characters and two special characters @key{PNT} (@dfn{point}) and @key{MRK} (@dfn{mark}) such that the character @key{PNT} occurs exactly once and @key{MRK} occurs at most once. The @dfn{text} of a buffer is obtained by deleting the @@ -1003,7 +1003,7 @@ The following commands are used to mark positions in the buffer. @item m @var{ch} @kindex 155 @kbd{m} (@code{vip-mark-point}) Store current point in the register @var{ch}. @var{ch} must be a -lower-case ASCII letter. +lower-case @acronym{ASCII} letter. @item m < Set mark at the beginning of current buffer. @item m > @@ -1944,3 +1944,7 @@ file. @setchapternewpage odd @contents @bye + +@ignore + arch-tag: 7c5d17b9-1d21-4261-a88a-b9fdbbf1020b +@end ignore diff --git a/man/viper.texi b/man/viper.texi index c0059da3a9..a31ce9a003 100644 --- a/man/viper.texi +++ b/man/viper.texi @@ -2779,7 +2779,7 @@ As if all that is not enough, Viper (through its interface to Emacs macros) lets the user define keyboard macros that ask for confirmation or even prompt the user for input and then continue. To do this, one should type @kbd{C-x q} (for confirmation) or @kbd{C-u C-x q} (for prompt). -For details, @pxref{Kbd Macro Query,,Customization,emacs,The GNU Emacs +For details, @pxref{Keyboard Macro Query,,Customization,emacs,The GNU Emacs Manual} @refill When the user finishes defining a macro (which is done by typing @kbd{C-x)} --- @@ -3140,7 +3140,7 @@ Return, Enter We also use @samp{word} for alphanumeric/non-alphanumeric words, and @samp{WORD} for whitespace delimited words. @samp{char} refers to any -ASCII character, @samp{CHAR} to non-whitespace character. +@acronym{ASCII} character, @samp{CHAR} to non-whitespace character. Brackets @samp{[]} indicate optional parameters; @samp{} also optional, usually defaulting to 1. Brackets are elided for @samp{} to eschew obfuscation. @@ -4542,3 +4542,7 @@ zapman@@cc.gatech.edu (Jason Zapman II), @setchapternewpage odd @contents @bye + +@ignore + arch-tag: f53e866a-15cf-4b1e-aead-77da9da1e864 +@end ignore diff --git a/man/widget.texi b/man/widget.texi index d1d7bae031..290c56c681 100644 --- a/man/widget.texi +++ b/man/widget.texi @@ -10,7 +10,7 @@ @c %**end of header @copying -Copyright @copyright{} 2000, 2002 Free Software Foundation, Inc. +Copyright @copyright{} 2000, 2002, 2003 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -112,7 +112,7 @@ supposed to fill out a number of fields, each of which has a specific meaning. The user is not supposed to change or delete any of the text between the fields. Examples of forms in Emacs are the @file{forms} package (of course), the customize buffers, the mail and news compose -modes, and the @sc{html} form support in the @file{w3} browser. +modes, and the @acronym{HTML} form support in the @file{w3} browser. @cindex widget library, why use it The advantages for a programmer of using the @code{widget} package to @@ -211,7 +211,16 @@ change you make must be contained within a single editable text field. For example, capitalizing all text from the middle of one field to the middle of another field is prohibited. -Editing text fields are created by the @code{editable-field} widget. +Editable text fields are created by the @code{editable-field} widget. + +An editable field must be surrounded by static text on both sides, that +is, text that does not change in the lifetime of the widget. If the +field extends to the end of the line, the terminating line-feed character +will count as the necessary static text on that end, but you will have +to provide the static text before the field yourself. The +@code{:format} keyword is useful for generating the static text; for +instance, if you give it a value of @code{"Name: %v"}, the "Name: " part +will count as the static text. The editing text fields are highlighted with the @code{widget-field-face} face, making them easy to find. @@ -573,8 +582,9 @@ Emacsen that supports it. Specifies how to display a message whenever you move to the widget with either @code{widget-forward} or @code{widget-backward} or move the mouse over it (using the standard @code{help-echo} mechanism). The argument -is either a string to display or a function of one argument, the widget, -which should return a string to display. +is either a string to display, a function of one argument, the widget, +which should return a string to display, or a form that evaluates to +such a string. @vindex indent@r{ keyword} @item :indent @@ -729,7 +739,7 @@ TYPE ::= (url-link [KEYWORD ARGUMENT]... URL) @end example @findex browse-url-browser-function@r{, and @code{url-link} widget} -When this link is invoked, the @sc{www} browser specified by +When this link is invoked, the @acronym{WWW} browser specified by @code{browse-url-browser-function} will be called with @var{url}. @node info-link, push-button, url-link, Basic Types @@ -1576,24 +1586,31 @@ in the buffer, and returns a widget object. Function to delete a widget. The function takes one argument, a widget, and should remove all traces of the widget from the buffer. +The default value is: + +@defun widget-default-delete widget +Remove @var{widget} from the buffer. +Delete all @code{:children} and @code{:buttons} in @var{widget}. +@end defun + +In most cases you should not change this value, but instead use +@code{:value-delete} to make any additional cleanup. + @vindex value-create@r{ keyword} @item :value-create Function to expand the @samp{%v} escape in the format string. It will be called with the widget as its argument and should insert a representation of the widget's value in the buffer. +Nested widgets should be listed in @code{:children} or @code{:buttons} +to make sure they are automatically deleted. + @vindex value-delete@r{ keyword} @item :value-delete Should remove the representation of the widget's value from the buffer. It will be called with the widget as its argument. It doesn't have to remove the text, but it should release markers and delete nested widgets -if such have been used. - -The following predefined function can be used here: - -@defun widget-children-value-delete widget -Delete all @code{:children} and @code{:buttons} in @var{widget}. -@end defun +if these are not listed in @code{:children} or @code{:buttons}. @vindex value-get@r{ keyword} @item :value-get @@ -1780,3 +1797,7 @@ variables, and widgets described in this manual. @setchapternewpage odd @contents @bye + +@ignore + arch-tag: 2b427731-4c61-4e72-85de-5ccec9c623f0 +@end ignore diff --git a/man/windows.texi b/man/windows.texi index bc6347c53e..100abaf3c9 100644 --- a/man/windows.texi +++ b/man/windows.texi @@ -400,3 +400,7 @@ windows together. You can also turn it on by customizing the variable scroll-all-scroll-down-all}, @kbd{M-x scroll-all-page-down-all} and their corresponding ``up'' equivalents. To make this mode useful, you should bind these commands to appropriate keys. + +@ignore + arch-tag: 8bea7453-d4b1-49b1-9bf4-cfe4383e1113 +@end ignore diff --git a/man/woman.texi b/man/woman.texi index 590b78022f..108225dbbf 100644 --- a/man/woman.texi +++ b/man/woman.texi @@ -1,5 +1,4 @@ \input texinfo @c -*-texinfo-*- -@c $Id: woman.texi,v 1.12 2002/10/02 23:24:31 karl Exp $ @c %**start of header @setfilename ../info/woman @settitle WoMan: Browse Unix Manual Pages ``W.O. (without) Man'' @@ -18,7 +17,7 @@ This file documents WoMan: A program to browse Unix manual pages `W.O. (without) man'. -Copyright @copyright{} 2001, 2002 Free Software Foundation, Inc. +Copyright @copyright{} 2001, 2002, 2004 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -196,7 +195,7 @@ requests. The distinction between @code{TROFF} and @code{NROFF} is that @code{TROFF} was designed to drive a phototypesetter whereas -@code{NROFF} was designed to produce essentially @sc{ascii} output for a +@code{NROFF} was designed to produce essentially @acronym{ASCII} output for a character-based device similar to a teletypewriter (usually abbreviated to ``teletype'' or ``tty''). Hence, @code{TROFF} supports much finer control over output positioning than does @code{NROFF} and can be seen @@ -298,8 +297,8 @@ WoMan is running byte code whereas most of the formatting done by @code{man} uses machine code, and is a testimony to the quality of the Emacs Lisp system. -@code{NROFF} simulates non-@sc{ascii} characters by using one or more -@sc{ascii} characters. WoMan should be able to do much better than +@code{NROFF} simulates non-@acronym{ASCII} characters by using one or more +@acronym{ASCII} characters. WoMan should be able to do much better than this. I have recently begun to add support for WoMan to use more of the characters in its default font and to use a symbol font, and it is an aspect that I intend to develop further in the near future. It should @@ -766,7 +765,7 @@ primarily used internally by WoMan. Emacs provides an interface to detect automatically the format of a file and decode it when it is visited. It is used primarily by the facilities for editing rich (i.e.@: formatted) text, as a way to store -formatting information transparently as @sc{ascii} markup. WoMan can in +formatting information transparently as @acronym{ASCII} markup. WoMan can in principle use this interface, but it must be configured explicitly. This use of WoMan does not seem to be particularly advantageous, so it @@ -1329,9 +1328,9 @@ The SysV standard man pages use two character suffixes, and this is becoming more common in the GNU world. For example, the man pages in the @code{ncurses} package include @file{toe.1m}, @file{form.3x}, etc. -@strong{Note:} an optional compression regexp will be appended, so this -regexp @emph{must not} end with any kind of string terminator such as -@code{$} or @code{\\'}. +@strong{Please note:} an optional compression regexp will be appended, +so this regexp @emph{must not} end with any kind of string terminator +such as @code{$} or @code{\\'}. @item woman-file-compression-regexp A regular match expression used to match compressed man file extensions @@ -1388,9 +1387,9 @@ ignored. Default is @code{t}. This gives the standard @code{ROFF} behavior. If @code{nil} then they are left in the buffer, which may aid debugging. @item woman-preserve-ascii -A boolean value. If non-@code{nil} then preserve @sc{ascii} characters in the -WoMan buffer. Otherwise, non-@sc{ascii} characters (that display as -@sc{ascii}) may remain, which is irrelevant unless the buffer is to be +A boolean value. If non-@code{nil} then preserve @acronym{ASCII} characters in the +WoMan buffer. Otherwise, non-@acronym{ASCII} characters (that display as +@acronym{ASCII}) may remain, which is irrelevant unless the buffer is to be saved to a file. Default is @code{nil}. @item woman-emulation @@ -1445,7 +1444,7 @@ This section currently applies @emph{only} to Microsoft Windows. WoMan provides partial experimental support for special symbols, initially only for MS-Windows and only for MS-Windows fonts. This -includes both non-@sc{ascii} characters from the main text font and use +includes both non-@acronym{ASCII} characters from the main text font and use of a separate symbol font. Later, support will be added for other font types (e.g.@: @code{bdf} fonts) and for the X Window System. In Emacs 20.7, the current support works partially under Windows 9x but may not @@ -1453,7 +1452,7 @@ work on any other platform. @vtable @code @item woman-use-extended-font -A boolean value. If non-@code{nil} then WoMan may use non-@sc{ascii} characters +A boolean value. If non-@code{nil} then WoMan may use non-@acronym{ASCII} characters from the default font. Default is @code{t}. @item woman-use-symbol-font @@ -1642,3 +1641,7 @@ Eli Zaretskii, @email{eliz@@is.elta.co.il} @printindex cp @bye + +@ignore + arch-tag: a1a6b715-396f-4378-9b94-0b2ca0aa5028 +@end ignore diff --git a/man/xresources.texi b/man/xresources.texi index 702c6feedc..515ad9f4b4 100644 --- a/man/xresources.texi +++ b/man/xresources.texi @@ -142,6 +142,7 @@ frame. Select one of them, such as @samp{menubar}, then select @samp{Show Resource Box} from the @samp{Commands} menu. This displays a list of all the meaningful X resources and allows you to edit them. Changes take effect immediately if you click on the @samp{Apply} button. +(See the @code{editres} man page for more details.) @node Table of Resources @appendixsec Table of X Resources for Emacs @@ -392,15 +393,22 @@ In the menu bar, the color of the foreground for a selected item. @item horizontalSpacing Horizontal spacing in pixels between items. Default is 3. @item verticalSpacing -Vertical spacing in pixels between items. Default is 1. +Vertical spacing in pixels between items. Default is 2. @item arrowSpacing Horizontal spacing between the arrow (which indicates a submenu) and the associated text. Default is 10. @item shadowThickness -Thickness of shadow line around the widget. +Thickness of shadow line around the widget. Default is 1. + +Also determines the thickness of shadow lines around other objects, +for instance 3D buttons and arrows. If you have the impression that +the arrows in the menus do not stand out clearly enough or that the +difference between ``in'' and ``out'' buttons is difficult to see, set +this to 2. If you have no problems with visibility, the default +probably looks better. The background color may also have some effect +on the contrast. @item margin -The margin of the menu bar, in characters. The default of 4 makes the -menu bar appear like the LessTif/Motif one. +The margin of the menu bar, in characters. Default is 1. @end table @node LessTif Resources @@ -551,7 +559,12 @@ the standard GTK @file{~/.gtkrc-2.0} file or with the Emacs specific customizing specific GTK widget features. To customize Emacs font, background, faces etc., use the normal X resources, see @ref{Resources}. -In these files you first defines a style and then how to apply that style + Some GTK themes override these mechanisms, which means that using +these mechanisms will not work to customize them. We recommend that +you use @file{~/.emacs.d/gtkrc} for customizations, since +@file{~/.gtkrc-2.0} seems to be ignored when running GConf with GNOME. + + In these files you first defines a style and then how to apply that style to widgets (@pxref{GTK widget names}). Here is an example of how to change the font for Emacs menus: @@ -564,6 +577,21 @@ style "menufont" widget "*emacs-menuitem*" style "menufont" +@end smallexample + + Here is a more elaborate example, showing how to change the parts of +the scroll bar: + +@smallexample +style "scroll" +@{ + fg[NORMAL] = "red"@ @ @ @ @ # The arrow color. + bg[NORMAL] = "yellow"@ @ # The thumb and background around the arrow. + bg[ACTIVE] = "blue"@ @ @ @ # The trough color. + bg[PRELIGHT] = "white"@ # The thumb color when the mouse is over it. +@} + +widget "*verticalScrollBar*" style "scroll" @end smallexample There are some things you can set without using any style or widget name, @@ -702,7 +730,7 @@ The names for the emacs widgets, and their classes, are: @tab @code{GtkVHbox} @item @code{emacs} @tab @code{GtkFixed} -@item @code{verticalScrollbar} +@item @code{verticalScrollBar} @tab @code{GtkVScrollbar} @item @code{emacs-toolbar} @tab @code{GtkToolbar} @@ -717,7 +745,7 @@ Thus, for Emacs you can write the two examples above as: @smallexample widget "Emacs.pane.menubar" style "my_style" -widget "Emacs.pane.emacs.verticalScrollbar" style "my_style" +widget "Emacs.pane.emacs.verticalScrollBar" style "my_style" @end smallexample GTK absolute names are quite strange when it comes to menus @@ -929,3 +957,7 @@ family. It corresponds to the fifth part of an X font name. It is one of @noindent @var{size} is a decimal number that describes the font size in points. + +@ignore + arch-tag: 9b6ff773-48b6-41f6-b2f9-f114b8bdd97f +@end ignore diff --git a/mkinstalldirs b/mkinstalldirs index ef5a91716a..9e4b309b36 100755 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -4,8 +4,6 @@ # Created: 1993-05-16 # Public domain -# $Id: mkinstalldirs,v 1.1 2001/02/02 13:04:53 gerd Exp $ - errstatus=0 for file diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 0408516855..2950be8843 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,3 +1,35 @@ +2003-09-22 Eli Zaretskii + + * mainmake.v2 (man lispref lispintro): Specify an explicit target + `info', like Makefile.in does. + +2003-08-31 Eli Zaretskii + + * sed3v2.inp (srcdir): Use "command.com /c cd" to produce an + absolute file name of the current working directory. This avoids + the warning from Make about circular dependencies. + +2003-08-30 Eli Zaretskii + + * sedlisp.inp: Set FNCASE=y for all targets in the lisp directory, + so that CVS etc. file names are filtered out of the list of + subdirectories. + +2003-08-28 Eli Zaretskii + + * sed6.inp (elisp.dvi, index.texi): Replace Unix shell commands + with equivalent COMMAND.COM commands. + +2003-08-24 Eli Zaretskii + + * sed3v2.inp (EXEEXT): Define to an empty string. + + * sed1v2.inp (EXEEXT): Define to an empty string. + Remove src/emacs after producing b-emacs.exe. + + * sed2v2.inp (HAVE_DIFFTIME, HAVE_MEMCMP, HAVE_MEMMOVE) + (HAVE_SIZE_T): Define. + 2002-04-16 Eli Zaretskii * sed2v2.inp: New file. @@ -530,3 +562,5 @@ Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: b602fbb5-3776-4053-8de2-03da33c29d44 diff --git a/msdos/is_exec.c b/msdos/is_exec.c index 899c574af0..4da0ec35c5 100644 --- a/msdos/is_exec.c +++ b/msdos/is_exec.c @@ -220,3 +220,6 @@ _is_executable(const char *filename, int fhandle, const char *extension) return 0; } + +/* arch-tag: b0965811-8c3e-4bc4-8d81-4447a3594785 + (do not change this comment) */ diff --git a/msdos/mainmake b/msdos/mainmake index 1111cdc506..da45817e1a 100644 --- a/msdos/mainmake +++ b/msdos/mainmake @@ -93,3 +93,5 @@ clean: cd oldxmenu -$(MAKE) clean cd .. + +# arch-tag: d5a489bc-818e-4c3c-8040-b5205ed0602f diff --git a/msdos/mainmake.v2 b/msdos/mainmake.v2 index 348e32f881..0952380a20 100644 --- a/msdos/mainmake.v2 +++ b/msdos/mainmake.v2 @@ -93,7 +93,7 @@ src: FRC man lispref lispintro: FRC cd $@ - $(MAKE) top_srcdir=${top_srcdir} + $(MAKE) top_srcdir=${top_srcdir} info cd .. install: all @@ -176,3 +176,5 @@ bootstrap-clean-before: FRC bootstrap-clean-after: cd src; $(MAKE) $(MFLAGS) mostlyclean; cd .. + +# arch-tag: 6fee5130-4c53-46c6-93d3-d0ea852298b9 diff --git a/msdos/sed1.inp b/msdos/sed1.inp index edc52b0e9c..67257d9c9f 100644 --- a/msdos/sed1.inp +++ b/msdos/sed1.inp @@ -53,3 +53,5 @@ ${libsrc}make-doc.exe:\ /^temacs:/s/prefix-args// /^temacs:/s/stamp-oldxmenu// /^ #/d + +# arch-tag: 246725c1-79de-4d03-a080-8f19329fa35e diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index 94c4ef8334..dc316819a5 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -36,6 +36,7 @@ s/\.h\.in/.h-in/ /^LIBOBJS *=/s/@[^@\n]*@/getloadavg.o/ /^GETLOADAVG_LIBS *=/s/@[^@\n]*@// /^LIBSOUND *=/s/@LIBSOUND@// +/^EXEEXT *=/s/@EXEEXT@// /^LN_S *=/s/@[^@\n]*@/ln -s/ /^M_FILE *=/s!@[^@\n]*@!m/intel386.h! /^S_FILE *=/s!@[^@\n]*@!s/msdos.h! @@ -60,5 +61,7 @@ s/bootstrap-doc/b-doc/ /^ mv -f emacs/a\ stubify b-emacs\ stubedit b-emacs.exe minstack=1024k\ - rm -f emacs.exe temacs.exe + rm -f emacs.exe temacs.exe emacs /^ rm -f/s/\\#/#/ + +# arch-tag: c7e3aacb-4162-460e-99f9-4252bca68d2c diff --git a/msdos/sed1x.inp b/msdos/sed1x.inp index dd9825de08..2a7ce82d52 100644 --- a/msdos/sed1x.inp +++ b/msdos/sed1x.inp @@ -6,3 +6,5 @@ s!^ @true *$! @rem! s/DOC/DOC-X/g #/^LIBXMENU *=/s!= *!= ../oldxmenu/! /^temacs *:/s!OLDXMENU!LIBXMENU! + +# arch-tag: 3e8a78f2-3dec-44f3-81f6-3785a562da19 diff --git a/msdos/sed2.inp b/msdos/sed2.inp index 9c3b8cbb3c..4580f0e623 100644 --- a/msdos/sed2.inp +++ b/msdos/sed2.inp @@ -52,3 +52,5 @@ s!^#undef config_opsysfile *$!#define config_opsysfile "s/msdos.h"! s!^#undef config_machfile *$!#define config_machfile "m/intel386.h"! s/^#undef PROTOTYPES *$/#define PROTOTYPES 1/ s/^#undef POINTER_TYPE *$/#define POINTER_TYPE void/ + +# arch-tag: 31840234-109a-41ab-a675-7a3844978299 diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index adf2b6150f..91df8a2122 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -37,12 +37,16 @@ /^#undef HAVE_FMOD *$/s/^.*$/#define HAVE_FMOD 1/ /^#undef HAVE_RINT *$/s/^.*$/#define HAVE_RINT 1/ /^#undef HAVE_CBRT *$/s/^.*$/#define HAVE_CBRT 1/ +/^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/ /^#undef HAVE_FPATHCONF *$/s/^.*$/#define HAVE_FPATHCONF 1/ +/^#undef HAVE_MEMCMP *$/s/^.*$/#define HAVE_MEMCMP 1/ +/^#undef HAVE_MEMMOVE *$/s/^.*$/#define HAVE_MEMMOVE 1/ /^#undef HAVE_SETRLIMIT *$/s/^.*$/#define HAVE_SETRLIMIT 1/ /^#undef HAVE_TM_GMTOFF *$/s/^.*$/#define HAVE_TM_GMTOFF 1/ /^#undef HAVE_MBLEN *$/s/^.*$/#define HAVE_MBLEN 1/ /^#undef HAVE_STRUCT_TIMEZONE *$/s/^.*$/#define HAVE_STRUCT_TIMEZONE 1/ /^#undef HAVE_INDEX *$/s/^.*$/#define HAVE_INDEX 1/ +/^#undef HAVE_SIZE_T *$/s/^.*$/#define HAVE_SIZE_T 1/ /^#undef HAVE_RINDEX *$/s/^.*$/#define HAVE_RINDEX 1/ /^#undef HAVE_MKSTEMP *$/s/^.*$/#define HAVE_MKSTEMP 1/ /^#undef HAVE_STRUCT_TM_TM_ZONE *$/s/^.*$/#define HAVE_STRUCT_TM_TM_ZONE 1/ @@ -84,3 +88,5 @@ s/^#undef POINTER_TYPE *$/#define POINTER_TYPE void/ # might be defined in sys/config.h we include at the top of config.h. /^#undef BSTRING/s|#undef|# undef| /^#undef .*$/s|^.*$|/* & */| + +# arch-tag: 2acb5571-ff53-4822-9175-95b864b59f7c diff --git a/msdos/sed2x.inp b/msdos/sed2x.inp index b702c0084e..a1af086077 100644 --- a/msdos/sed2x.inp +++ b/msdos/sed2x.inp @@ -22,3 +22,5 @@ /^#undef HAVE_XSCREENNUMBEROFSCREEN *$/s/undef/define/ /^#undef HAVE_XSETWMPROTOCOLS *$/s/undef/define/ /^#undef HAVE_SELECT *$/s/undef/define/ + +# arch-tag: 4a41c3ea-eb6c-4e17-8432-307516498e5a diff --git a/msdos/sed3.inp b/msdos/sed3.inp index a162e797bd..6ae9c54eea 100644 --- a/msdos/sed3.inp +++ b/msdos/sed3.inp @@ -42,3 +42,5 @@ s!^ \./! go32 ./! s!^ go32 ./test-distrib! go32 ./test-dis! /-o make-docfile/a\ coff2exe make-docfile + +# arch-tag: cac6f5c7-3dbf-4e84-9d0c-44f0126f0ea8 diff --git a/msdos/sed3v2.inp b/msdos/sed3v2.inp index 77f5137830..657c2d4e5f 100644 --- a/msdos/sed3v2.inp +++ b/msdos/sed3v2.inp @@ -24,15 +24,18 @@ /^archlibdir *=/s!=.*$!=/emacs/bin! /^bindir *=/s!=.*$!=/emacs/bin! /^libdir *=/s!=.*$!=/emacs/bin! -/^srcdir *=/s!=.*$!=.! +/^srcdir=/s!srcdir=@srcdir@!srcdir := $(subst \\,/,$(shell command.com /c cd))! /^VPATH *=/s!=.*$!=.! /^CFLAGS *=/s!=.*$!=-O2 -g! /^C_SWITCH_SYSTEM *=/s!=.*$!=-DMSDOS! /^LOADLIBES *=/s!=.*$!=! /^ALLOCA *=/s!@ALLOCA@!! +/^EXEEXT *=/s!@EXEEXT@!! /^INSTALLABLES/s/emacsclient *// s!^ \./! ! /^UTILITIES=/s/ wakeup// /^UTILITIES=/s/ movemail// /^UTILITIES=/s/ emacsserver// /^UTILITIES=/s/ timer// + +# arch-tag: 16f3be18-a45b-496c-b19c-e43840359de8 diff --git a/msdos/sed4.inp b/msdos/sed4.inp index 6f239277de..2258811538 100644 --- a/msdos/sed4.inp +++ b/msdos/sed4.inp @@ -20,3 +20,5 @@ /^#define *PATH_DATA/s/".*"/rootrelativepath ("etc")/ /^#define *PATH_DOC/s/".*"/rootrelativepath ("etc")/ /^#define *PATH_INFO/s/".*"/rootrelativepath ("info")/ + +# arch-tag: c84fa640-e434-4408-9e89-16d9e4ebe74e diff --git a/msdos/sed5x.inp b/msdos/sed5x.inp index 595017aaa8..6f05df8a26 100644 --- a/msdos/sed5x.inp +++ b/msdos/sed5x.inp @@ -24,3 +24,5 @@ /^CFLAGS *=/s/@[^@\n]*@/-O2 -g/ /^LN_S *=/s/@[^@\n]*@/ln -s/ s/|| true// + +# arch-tag: 612a79be-2a02-4cb0-8dec-779aac0a2f4f diff --git a/msdos/sed6.inp b/msdos/sed6.inp index eb82598bf5..686d3aa92a 100644 --- a/msdos/sed6.inp +++ b/msdos/sed6.inp @@ -27,3 +27,17 @@ export MAKEINFO := $(MAKEINFO) -I$(srcdir) texinputdir =\ export texinputdir := $(srcdir)";"$(TEXINPUTS) /^SHELL *=/s/^/# / +/^elisp.dvi:/,/^$/ { + /^ *if \[ *\a${permuted_index}/,/^ *fi *$/c\ + command.com /c 'if not a${permuted_index}==a sh ./permute-index' \ + command.com /c 'if not a${permuted_index}==a mv permuted.fns elisp.fns' \ + command.com /c 'if not a${permuted_index}==a texindex elisp.tp' \ + command.com /c 'if a${permuted_index}==a texindex elisp.??' +} +/^index.texi:/,/^$/ { + /^ *if \[ *\a${permuted_index}/,/^ *fi *$/c\ + command.com /c 'if not a${permuted_index}==a cp -p ./index.perm index.texi' \ + command.com /c 'if a${permuted_index}==a cp -p ./index.unperm index.texi' +} + +# arch-tag: defe1001-f35a-47f7-9635-3f5d33ee5e97 diff --git a/msdos/sedleim.inp b/msdos/sedleim.inp index af9cf9f3ed..ff9c6b7333 100644 --- a/msdos/sedleim.inp +++ b/msdos/sedleim.inp @@ -52,3 +52,5 @@ RUN-EMACS = ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte install: all\ /^ if test -f/d + +# arch-tag: 33c5eed1-78bc-4a6e-9d11-cbc7c541b763 diff --git a/msdos/sedlisp.inp b/msdos/sedlisp.inp index e2d2b75561..26ce208239 100644 --- a/msdos/sedlisp.inp +++ b/msdos/sedlisp.inp @@ -17,8 +17,13 @@ # # ---------------------------------------------------------------------- +/^SHELL *=/i\ +export FNCASE=y + /^lisp=/s|@srcdir@|.| /^VPATH=/s|@srcdir@|.| /^srcdir=/s|@srcdir@|.| /^bootstrap-clean:/a\ command.com /c dtou .../*.el + +# arch-tag: da7a3cff-4839-4ad7-bbe3-e2b61c84c38e diff --git a/msdos/sigaction.c b/msdos/sigaction.c index 5b3ae79081..0f4f09b2a9 100644 --- a/msdos/sigaction.c +++ b/msdos/sigaction.c @@ -36,3 +36,5 @@ sigaction(int _sig, const struct sigaction *_act, struct sigaction *_oact) +/* arch-tag: 39526405-3d3a-44fe-af28-82a515e0c8e8 + (do not change this comment) */ diff --git a/nt/.gitignore b/nt/.gitignore index 9aff5a7ca3..c577a6a341 100644 --- a/nt/.gitignore +++ b/nt/.gitignore @@ -1,2 +1,3 @@ *-spd *.pdb +.arch-inventory diff --git a/nt/ChangeLog b/nt/ChangeLog index 6b339a9458..0ad5e7b458 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,39 @@ +2004-04-10 Benjamin Riefenstahl + + * runemacs.c (WinMain): Let emacs environment default to parent. + +2004-03-11 Jason Rumney + + * paths.h: Remove PATH_LOCK, add PATH_BITMAPS. + +2004-03-10 Juanma Barranquero + + * makefile.w32-in (install): Don't try to copy + ../lib-src/fns-*.el, as it isn't used anymore. + +2004-01-28 Peter Runestig + + * gmake.defs, nmake.defs: Add linking to ``winspool.lib''. + +2003-12-24 Miles Bader + + * .cvsignore: Add `.arch-inventory'. + +2003-11-22 Lars Hansen + + * inc/grp.h: Added. + +2003-09-03 Peter Runestig + + * configure.bat: Create ``makefile'' in directories man, lispref + and lispintro. + + * makefile.w32-in (force-info, info): New targets. + + * envadd.bat: New file. + + * multi-install-info.bat: New file. + 2003-06-27 Jan D. * config.nt (my_strftime): New define. @@ -578,7 +614,7 @@ 1999-01-22 Geoff Voelker * icons: New directory with Davenport's icons. - icons/sink.ico: Renamed from emacs.ico. + * icons/sink.ico: Renamed from emacs.ico. * makefile.nt (install, fast_install): Install Windows icons into etc/icons. @@ -902,8 +938,8 @@ 1995-06-09 Geoff Voelker - * emacs.bat.in: Renamed from emacs.bat - (emacs_dir): Renamed from emacs_path + * emacs.bat.in: Renamed from emacs.bat. + (emacs_dir): Renamed from emacs_path. Definition removed. * addpm.c: New file. @@ -1020,3 +1056,5 @@ Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: b3d2c29c-04a0-45d0-b52d-57354711c414 diff --git a/nt/INSTALL b/nt/INSTALL index b465af6e40..273c6b1e16 100644 --- a/nt/INSTALL +++ b/nt/INSTALL @@ -11,6 +11,12 @@ directories, etc. We suggest to use djtarnt.exe from the GNU FTP site. + If you are building out of CVS, then some files in this directory + (.bat files, nmake.defs and makefile.w32-in) may need the line-ends + fixing first. The easiest way to do this and avoid future conflicts + is to run the following command in this (emacs/nt) directory: + cvs update -kb + To compile Emacs, you will need either Microsoft Visual C++ 2.0 or later and nmake, or a Windows port of GCC 2.95 or later with Mingw and W32 API support and a port of GNU make. You can use the Cygwin diff --git a/nt/addpm.c b/nt/addpm.c index fa0f4253ab..ccae76c1f2 100644 --- a/nt/addpm.c +++ b/nt/addpm.c @@ -203,3 +203,6 @@ main (argc, argv) return (0); } + +/* arch-tag: f923609d-b781-4ef4-abce-ca0da29cbbf0 + (do not change this comment) */ diff --git a/nt/addsection.c b/nt/addsection.c index f9eff2f73f..ae44c7f943 100644 --- a/nt/addsection.c +++ b/nt/addsection.c @@ -534,3 +534,6 @@ main (int argc, char **argv) } /* eof */ + +/* arch-tag: 17e2b0aa-8c17-4bd1-b24b-1cda689245fa + (do not change this comment) */ diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c index 9280f29c35..52760402f1 100644 --- a/nt/cmdproxy.c +++ b/nt/cmdproxy.c @@ -699,3 +699,6 @@ main (int argc, char ** argv) return 0; } + +/* arch-tag: 88678d93-07ac-4e2f-ad63-d4a740ca69ac + (do not change this comment) */ diff --git a/nt/config.nt b/nt/config.nt index e774fcbe29..56ec72a56a 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -468,3 +468,6 @@ extern char *getenv (); #define NO_RETURN /* nothing */ #endif #endif + +/* arch-tag: df720992-aa5a-499a-882d-958dc5eeb5e9 + (do not change this comment) */ diff --git a/nt/configure.bat b/nt/configure.bat index c6709ef8df..a27bbcd8cd 100755 --- a/nt/configure.bat +++ b/nt/configure.bat @@ -433,6 +433,9 @@ copy paths.h ..\src\epaths.h copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile +copy /b config.settings+%MAKECMD%.defs+..\man\makefile.w32-in ..\man\makefile +copy /b config.settings+%MAKECMD%.defs+..\lispref\makefile.w32-in ..\lispref\makefile +copy /b config.settings+%MAKECMD%.defs+..\lispintro\makefile.w32-in ..\lispintro\makefile if not exist ..\lisp\Makefile.unix rename ..\lisp\Makefile.in Makefile.unix if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile @@ -463,3 +466,7 @@ set COMPILER= set MAKECMD= set usercflags= set userldflags= + +goto skipArchTag + arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c +:skipArchTag diff --git a/nt/ddeclient.c b/nt/ddeclient.c index 3a82395ca3..712c28f1c3 100644 --- a/nt/ddeclient.c +++ b/nt/ddeclient.c @@ -74,3 +74,6 @@ main (argc, argv) return (0); } + +/* arch-tag: 360d7a99-2cae-447e-8d06-41ca41987e30 + (do not change this comment) */ diff --git a/nt/ebuild.bat b/nt/ebuild.bat index f4ae8eccb8..c7851779cc 100755 --- a/nt/ebuild.bat +++ b/nt/ebuild.bat @@ -1,3 +1,7 @@ @echo off if (%1) == () nmake -f makefile.nt all if not (%1) == () nmake -f makefile.nt %1 %2 %3 %4 %5 %6 %7 %8 %9 + +goto skipArchTag + arch-tag: f01be12a-fd17-448d-8275-c7f527c50a1f +:skipArchTag diff --git a/nt/fast-install.bat b/nt/fast-install.bat index 157c4ab875..11e969eb5a 100755 --- a/nt/fast-install.bat +++ b/nt/fast-install.bat @@ -1 +1,5 @@ nmake -f makefile.nt fast_install + +goto skipArchTag + arch-tag: 13c64379-e658-452f-92d3-90d0f230ca70 +:skipArchTag diff --git a/nt/ftime-nostartup.bat b/nt/ftime-nostartup.bat index 501e438407..40f0a37628 100755 --- a/nt/ftime-nostartup.bat +++ b/nt/ftime-nostartup.bat @@ -21,3 +21,7 @@ prep /m ..\src\obj\i386\pemacs if errorlevel 1 goto done plist ..\src\obj\i386\pemacs > %1 :done + +goto skipArchTag + arch-tag: 927c5199-a8a3-4cf0-ab56-62b66fc6520d +:skipArchTag diff --git a/nt/ftime.bat b/nt/ftime.bat index 7ad22afc2c..beb87af459 100644 --- a/nt/ftime.bat +++ b/nt/ftime.bat @@ -21,3 +21,7 @@ prep /m ..\src\obj\i386\pemacs if errorlevel 1 goto done plist ..\src\obj\i386\pemacs > %1 :done + +goto skipArchTag + arch-tag: d1c629de-9172-4d72-ab68-9d45ab9903cc +:skipArchTag diff --git a/nt/gmake.defs b/nt/gmake.defs index afa1b855d9..7fe580426a 100644 --- a/nt/gmake.defs +++ b/nt/gmake.defs @@ -177,6 +177,7 @@ SHELL32 = -lshell32 USER32 = -luser32 WSOCK32 = -lwsock32 WINMM = -lwinmm +WINSPOOL = -lwinspool ifdef NOOPT DEBUG_CFLAGS = -DEMACSDEBUG @@ -269,3 +270,5 @@ LINK_FLAGS = $(ARCH_LDFLAGS) $(DEBUG_LINK) $(NOCYGWIN) $(USER_LDFLAGS) $(BLD)/%.o: %.c $(CC) $(CFLAGS) $(CC_OUT)$@ $< + +# arch-tag: 35eb9662-8534-4bcf-b891-0730a09d657f diff --git a/nt/inc/arpa/inet.h b/nt/inc/arpa/inet.h index f5d197c06e..9074508a1d 100644 --- a/nt/inc/arpa/inet.h +++ b/nt/inc/arpa/inet.h @@ -1 +1,4 @@ /* null version of - has everything */ + +/* arch-tag: 13c7a7f7-40d0-49e8-bdfb-6dcf2f3a7340 + (do not change this comment) */ diff --git a/nt/inc/gettext.h b/nt/inc/gettext.h index 8b262f4cfd..148da8b36d 100755 --- a/nt/inc/gettext.h +++ b/nt/inc/gettext.h @@ -67,3 +67,6 @@ #define gettext_noop(String) String #endif /* _LIBGETTEXT_H */ + +/* arch-tag: 07b35a70-3531-4cda-9674-2968467143ec + (do not change this comment) */ diff --git a/nt/inc/grp.h b/nt/inc/grp.h new file mode 100755 index 0000000000..b0cac8b10e --- /dev/null +++ b/nt/inc/grp.h @@ -0,0 +1,36 @@ +/* Replacement grp.h file for building GNU Emacs on Windows. + Copyright (C) 2003 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#ifndef _GRP_H +#define _GRP_H + +#include /* gid_t defined here */ + +/* Emacs uses only gr_name */ +struct group { + char *gr_name; /* group name */ +}; + +struct group *getgrgid(gid_t); + +#endif /* _GRP_H */ + +/* arch-tag: 82840357-7946-4a87-9c97-c0281b49aca3 + (do not change this comment) */ diff --git a/nt/inc/netdb.h b/nt/inc/netdb.h index 5bf232e7f5..bdb1ce546c 100644 --- a/nt/inc/netdb.h +++ b/nt/inc/netdb.h @@ -1 +1,4 @@ /* null version of - has everything */ + +/* arch-tag: 237ba543-97e2-4bd5-9c9c-32271d955eb1 + (do not change this comment) */ diff --git a/nt/inc/netinet/in.h b/nt/inc/netinet/in.h index 46fb0facce..2e4f1e1a7e 100644 --- a/nt/inc/netinet/in.h +++ b/nt/inc/netinet/in.h @@ -1 +1,4 @@ /* null version of - has everything */ + +/* arch-tag: 49ff589e-100e-4f8f-8b2a-1c3b542590df + (do not change this comment) */ diff --git a/nt/inc/pwd.h b/nt/inc/pwd.h index ba3d32e70f..11f5669b0f 100644 --- a/nt/inc/pwd.h +++ b/nt/inc/pwd.h @@ -19,3 +19,6 @@ typedef int uid_t; typedef uid_t gid_t; #endif /* _PWD_H_ */ + +/* arch-tag: 68308424-cb2b-49ed-bb52-b347fee416bf + (do not change this comment) */ diff --git a/nt/inc/sys/dir.h b/nt/inc/sys/dir.h index 203e27f2fe..e317d008d2 100644 --- a/nt/inc/sys/dir.h +++ b/nt/inc/sys/dir.h @@ -3,3 +3,6 @@ */ #include "..\..\..\src\ndir.h" + +/* arch-tag: 090c9091-3b16-429b-9c40-8aecce1162be + (do not change this comment) */ diff --git a/nt/inc/sys/file.h b/nt/inc/sys/file.h index 6a3fcc13e8..4460da0927 100644 --- a/nt/inc/sys/file.h +++ b/nt/inc/sys/file.h @@ -9,3 +9,6 @@ #define R_OK 4 #define D_OK 8 #endif + +/* arch-tag: 7df3e73e-56bc-4ad9-b699-33149ea47959 + (do not change this comment) */ diff --git a/nt/inc/sys/ioctl.h b/nt/inc/sys/ioctl.h index dc0957873d..b3c6b3b107 100644 --- a/nt/inc/sys/ioctl.h +++ b/nt/inc/sys/ioctl.h @@ -3,3 +3,6 @@ * in many of the source files, we just extend the include path so that the * compiler will pick this up empty header instead. */ + +/* arch-tag: c6e9015a-930a-4ad3-b368-ac32f84475d7 + (do not change this comment) */ diff --git a/nt/inc/sys/param.h b/nt/inc/sys/param.h index 397c5ffae6..971d4b1075 100644 --- a/nt/inc/sys/param.h +++ b/nt/inc/sys/param.h @@ -8,3 +8,6 @@ #define NBPG 4096 #endif /* _PARAM_H_ */ + +/* arch-tag: b1d90296-ec38-4839-83bd-0ddfd2528435 + (do not change this comment) */ diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h index f5a17eafba..422a27d1b5 100644 --- a/nt/inc/sys/socket.h +++ b/nt/inc/sys/socket.h @@ -163,3 +163,6 @@ extern int h_errno; #endif /* _SOCKET_H_ */ /* end of socket.h */ + +/* arch-tag: e3b8b91c-aaa0-4bc4-be57-a85a1dd247b4 + (do not change this comment) */ diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h index 881808c532..a3808f4c5c 100644 --- a/nt/inc/sys/time.h +++ b/nt/inc/sys/time.h @@ -21,3 +21,6 @@ void gettimeofday (struct timeval *, struct timezone *); #endif /* SYS_TIME_H_INCLUDED */ /* end of sys/time.h */ + +/* arch-tag: bc525883-0c81-4bea-b83d-3325461f38b5 + (do not change this comment) */ diff --git a/nt/inc/unistd.h b/nt/inc/unistd.h index c1caa77a69..9bf9cb7597 100644 --- a/nt/inc/unistd.h +++ b/nt/inc/unistd.h @@ -1 +1,4 @@ /* Fake unistd.h: config.h already provides most of the relevant things. */ + +/* arch-tag: 68600bcd-3097-4501-a559-551db3cdb9fd + (do not change this comment) */ diff --git a/nt/install.bat b/nt/install.bat index be0e9045e5..1074c03454 100755 --- a/nt/install.bat +++ b/nt/install.bat @@ -6,3 +6,7 @@ if not (%1) == () shift nmake -f makefile.nt install %1 %2 %3 %4 %5 %6 %7 %8 %9 set INSTALL_DIR= set BUILD_TYPE= + +goto skipArchTag + arch-tag: 1db5223b-8fc9-4bdb-8ad1-9e3962bf034a +:skipArchTag diff --git a/nt/makefile.def b/nt/makefile.def index 24003eb309..224d4619b6 100644 --- a/nt/makefile.def +++ b/nt/makefile.def @@ -228,3 +228,5 @@ ARCH_LDFLAGS = -align:0x1000 $(SYS_LDFLAGS) .c{$(BLD)}.obj:: $(CC) $(CFLAGS) -Fo$(BLD)\ $< !ENDIF + +# arch-tag: a8aa26d5-5f28-4263-b42a-6f91acb7d824 diff --git a/nt/makefile.nt b/nt/makefile.nt index d9ca04dabd..4a92f7f3e1 100644 --- a/nt/makefile.nt +++ b/nt/makefile.nt @@ -210,3 +210,5 @@ clean: realclean: clean - $(DEL_TREE) ..\bin + +# arch-tag: b01debf7-6859-439e-b08e-f041aa03c32f diff --git a/nt/makefile.w32-in b/nt/makefile.w32-in index 4e8265f4da..915259ead6 100644 --- a/nt/makefile.w32-in +++ b/nt/makefile.w32-in @@ -179,7 +179,6 @@ install: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE) - $(CP) $(BLD)/ddeclient.exe $(INSTALL_DIR)/bin - $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin - $(CP) $(BLD)/runemacs.exe $(INSTALL_DIR)/bin - - $(CP) ../lib-src/fns-*.el $(INSTALL_DIR)/bin - "$(INSTALL_DIR)/bin/addpm" /q - $(DEL) ../same-dir.tst - $(DEL) $(INSTALL_DIR)/same-dir.tst @@ -214,6 +213,15 @@ install-other-dirs-gmake: $(MAKE) $(MFLAGS) -C ../lisp install $(MAKE) $(MFLAGS) -C ../leim install +force-info: +# Note that man/makefile knows how to +# put the info files in $(infodir), +# so we can do ok running make in the build dir. +info: force-info + (cd ..\man && $(MAKE) $(MFLAGS) info) + (cd ..\lispref && $(MAKE) $(MFLAGS) info) + (cd ..\lispintro && $(MAKE) $(MFLAGS) info) + # # Maintenance # @@ -229,8 +237,14 @@ clean-other-dirs-nmake: $(MAKE) $(MFLAGS) clean cd ..\lisp $(MAKE) $(MFLAGS) clean + cd ..\lispintro + $(MAKE) $(MFLAGS) clean + cd ..\lispref + $(MAKE) $(MFLAGS) clean cd ..\leim $(MAKE) $(MFLAGS) clean + cd ..\man + $(MAKE) $(MFLAGS) clean cd ..\nt clean-other-dirs-gmake: @@ -258,3 +272,5 @@ cleanall: clean cleanall-other-dirs-$(MAKETYPE) realclean: cleanall - $(DEL_TREE) ../bin + +# arch-tag: 6f5b23a6-774b-4598-9c29-58235b2b4219 diff --git a/nt/nmake.defs b/nt/nmake.defs index 99db4211f1..aef2b6cf47 100644 --- a/nt/nmake.defs +++ b/nt/nmake.defs @@ -124,6 +124,7 @@ SHELL32 = shell32.lib USER32 = user32.lib WSOCK32 = wsock32.lib WINMM = winmm.lib +WINSPOOL = winspool.lib !ifdef NOOPT DEBUG_CFLAGS = -DEMACSDEBUG @@ -230,3 +231,5 @@ EXTRA_LINK = -profile .c{$(BLD)}.obj:: $(CC) $(CFLAGS) -Fo$(BLD)\ $< !ENDIF + +# arch-tag: fefa49b0-c23c-46c7-9094-cab2a405058e diff --git a/nt/paths.h b/nt/paths.h index 9a730e3315..1e50953076 100644 --- a/nt/paths.h +++ b/nt/paths.h @@ -44,19 +44,19 @@ Boston, MA 02111-1307, USA. */ /* #define PATH_DATA "/usr/local/lib/emacs/data" */ #define PATH_DATA "C:/emacs/data" +/* Where Emacs should look for X bitmap files. + The lisp variable x-bitmap-file-path is set based on this value. */ +#define PATH_BITMAPS "" + /* Where Emacs should look for its docstring file. The lisp variable doc-directory is set to this value. */ #define PATH_DOC "C:/emacs/etc" -/* The name of the directory that contains lock files with which we - record what files are being modified in Emacs. This directory - should be writable by everyone. THE STRING MUST END WITH A - SLASH!!! */ -/* #define PATH_LOCK "/usr/local/lib/emacs/lock/" */ -#define PATH_LOCK "C:/emacs/lock/" - /* Where the configuration process believes the info tree lives. The lisp variable configure-info-directory gets its value from this macro, and is then used to set the Info-default-directory-list. */ /* #define PATH_INFO "/usr/local/info" */ #define PATH_INFO "C:/emacs/info" + +/* arch-tag: f6d46f3c-e1e9-436b-8629-edcaf6597973 + (do not change this comment) */ diff --git a/nt/preprep.c b/nt/preprep.c index 64cd1b7391..dfc6c7e6fa 100644 --- a/nt/preprep.c +++ b/nt/preprep.c @@ -827,3 +827,6 @@ main (int argc, char **argv) } /* eof */ + +/* arch-tag: 144ca747-168e-43a0-9736-3f4c0ba1657f + (do not change this comment) */ diff --git a/nt/runemacs.c b/nt/runemacs.c index 2f114aea65..afa5340ef5 100644 --- a/nt/runemacs.c +++ b/nt/runemacs.c @@ -126,7 +126,7 @@ WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int nShow) sec_attrs.bInheritHandle = FALSE; if (CreateProcess (NULL, new_cmdline, &sec_attrs, NULL, TRUE, priority_class, - GetEnvironmentStrings (), NULL, &start, &child)) + NULL, NULL, &start, &child)) { if (wait_for_child) { @@ -144,3 +144,6 @@ error: MessageBox (NULL, "Could not start Emacs.", "Error", MB_ICONSTOP); return 1; } + +/* arch-tag: 7e02df73-4df7-4aa0-baea-99c6d047a384 + (do not change this comment) */ diff --git a/oldXMenu/Activate.c b/oldXMenu/Activate.c index 8e1b3742d9..840c423471 100644 --- a/oldXMenu/Activate.c +++ b/oldXMenu/Activate.c @@ -1,4 +1,3 @@ -/* $Header: /cvs/emacs/oldXMenu/Activate.c,v 1.4 2002/04/22 18:27:03 jhd Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ #include "copyright.h" @@ -565,3 +564,6 @@ XMenuActivate(display, menu, p_num, s_num, x_pos, y_pos, event_mask, data, return(ret_val); } + +/* arch-tag: 6b90b578-ecea-4328-b460-a0c96963f872 + (do not change this comment) */ diff --git a/oldXMenu/AddPane.c b/oldXMenu/AddPane.c index ab8ed42b01..b7b52c0f64 100644 --- a/oldXMenu/AddPane.c +++ b/oldXMenu/AddPane.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/AddPane.c,v 1.1 1999/10/03 19:34:51 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -102,3 +101,6 @@ XMenuAddPane(display, menu, label, active) _XMErrorCode = XME_NO_ERROR; return((menu->p_count - 1)); } + +/* arch-tag: 62a26021-f29d-48ba-96ef-3b6c4ebd6547 + (do not change this comment) */ diff --git a/oldXMenu/AddSel.c b/oldXMenu/AddSel.c index 7807fb6651..40bbbde704 100644 --- a/oldXMenu/AddSel.c +++ b/oldXMenu/AddSel.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/AddSel.c,v 1.2 2000/01/27 15:30:18 gerd Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -103,3 +102,6 @@ XMenuAddSelection(display, menu, p_num, data, label, active, help) _XMErrorCode = XME_NO_ERROR; return((pane->s_count - 1)); } + +/* arch-tag: 0161f024-c739-440d-9498-050280c6c355 + (do not change this comment) */ diff --git a/oldXMenu/ChangeLog b/oldXMenu/ChangeLog index ca0c09ebb4..4bcd812055 100644 --- a/oldXMenu/ChangeLog +++ b/oldXMenu/ChangeLog @@ -435,3 +435,5 @@ Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 8b17c869-6677-40ce-be86-e62cf34061cf diff --git a/oldXMenu/ChgPane.c b/oldXMenu/ChgPane.c index e039507180..123f18dec5 100644 --- a/oldXMenu/ChgPane.c +++ b/oldXMenu/ChgPane.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/ChgPane.c,v 1.1 1992/04/11 22:10:17 jimb Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -64,3 +63,6 @@ XMenuChangePane(menu, p_num, label) _XMErrorCode = XME_NO_ERROR; return(p_num); } + +/* arch-tag: e267e9de-a3f0-4a0d-8c45-413afa176fd8 + (do not change this comment) */ diff --git a/oldXMenu/ChgSel.c b/oldXMenu/ChgSel.c index d436a480a1..7dce694c41 100644 --- a/oldXMenu/ChgSel.c +++ b/oldXMenu/ChgSel.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/ChgSel.c,v 1.1 1999/10/03 19:34:54 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -86,3 +85,6 @@ XMenuChangeSelection(display, menu, p_num, s_num, data, data_sw, label, label_sw _XMErrorCode = XME_NO_ERROR; return(s_num); } + +/* arch-tag: 229732a6-46bf-4a3a-ad90-3d8ed65c0841 + (do not change this comment) */ diff --git a/oldXMenu/Create.c b/oldXMenu/Create.c index e500e40634..bac3f079f6 100644 --- a/oldXMenu/Create.c +++ b/oldXMenu/Create.c @@ -1,4 +1,3 @@ -/* $Header: /cvs/emacs/oldXMenu/Create.c,v 1.1 1999/10/03 19:34:56 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ #include "copyright.h" @@ -759,3 +758,6 @@ XMenuCreate(display, parent, def_env) _XMErrorCode = XME_NO_ERROR; return(menu); } + +/* arch-tag: 6945b7d2-3b13-40b9-8b6e-56b1b20f3463 + (do not change this comment) */ diff --git a/oldXMenu/DelPane.c b/oldXMenu/DelPane.c index f656c32ea0..bdb084b36f 100644 --- a/oldXMenu/DelPane.c +++ b/oldXMenu/DelPane.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/DelPane.c,v 1.1 1999/10/03 19:34:57 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -86,3 +85,6 @@ XMenuDeletePane(display, menu, p_num) _XMErrorCode = XME_NO_ERROR; return(p_num); } + +/* arch-tag: 32a5bfd4-4bac-4090-bb53-844110f4908e + (do not change this comment) */ diff --git a/oldXMenu/DelSel.c b/oldXMenu/DelSel.c index 76adcc17f2..78b7311316 100644 --- a/oldXMenu/DelSel.c +++ b/oldXMenu/DelSel.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/DelSel.c,v 1.1 1999/10/03 19:34:58 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -70,3 +69,6 @@ XMenuDeleteSelection(display, menu, p_num, s_num) _XMErrorCode = XME_NO_ERROR; return(s_num); } + +/* arch-tag: 24ca2bc7-8a37-471a-8095-e6363fc1ed10 + (do not change this comment) */ diff --git a/oldXMenu/Destroy.c b/oldXMenu/Destroy.c index 588af2ad37..8d904a5387 100644 --- a/oldXMenu/Destroy.c +++ b/oldXMenu/Destroy.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/Destroy.c,v 1.1 1999/10/03 19:34:59 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -114,3 +113,6 @@ XMenuDestroy(display, menu) */ free(menu); } + +/* arch-tag: 44c9589f-5893-46fc-bc23-1b03a7f9c015 + (do not change this comment) */ diff --git a/oldXMenu/Error.c b/oldXMenu/Error.c index 80f227209a..1eb521b164 100644 --- a/oldXMenu/Error.c +++ b/oldXMenu/Error.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/Error.c,v 1.1 1992/04/11 22:10:18 jimb Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -28,3 +27,5 @@ XMenuError() return(message); } +/* arch-tag: 5fff4a23-40ca-40d0-8887-c50fc73dea9d + (do not change this comment) */ diff --git a/oldXMenu/EvHand.c b/oldXMenu/EvHand.c index 375ea44841..073d0ab90b 100644 --- a/oldXMenu/EvHand.c +++ b/oldXMenu/EvHand.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/EvHand.c,v 1.1 1992/04/11 22:10:19 jimb Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -24,3 +23,5 @@ XMenuEventHandler(handler) _XMEventHandler = handler; } +/* arch-tag: 8d614c8c-94d9-43c8-8e32-c438a3c8a8a3 + (do not change this comment) */ diff --git a/oldXMenu/FindPane.c b/oldXMenu/FindPane.c index af1ecce51b..945d4595ca 100644 --- a/oldXMenu/FindPane.c +++ b/oldXMenu/FindPane.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/FindPane.c,v 1.1 1999/10/03 19:35:02 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -62,3 +61,6 @@ XMenuFindPane(menu, label) _XMErrorCode = XME_P_NOT_FOUND; return (XM_FAILURE); } + +/* arch-tag: b6c94285-0d1d-4569-a071-b34b63c67a54 + (do not change this comment) */ diff --git a/oldXMenu/FindSel.c b/oldXMenu/FindSel.c index 97853fae05..1fed111473 100644 --- a/oldXMenu/FindSel.c +++ b/oldXMenu/FindSel.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/FindSel.c,v 1.1 1992/04/11 22:10:19 jimb Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -70,3 +69,6 @@ XMenuFindSelection(menu, p_num, label) _XMErrorCode = XME_S_NOT_FOUND; return (XM_FAILURE); } + +/* arch-tag: 564a4a95-9ab0-4580-b05f-6970c4b25dd4 + (do not change this comment) */ diff --git a/oldXMenu/Imakefile b/oldXMenu/Imakefile index 8f69bdbc5f..2637feb776 100644 --- a/oldXMenu/Imakefile +++ b/oldXMenu/Imakefile @@ -95,3 +95,6 @@ DebuggedLibraryTarget(XMenu11,$(OBJS)) DependTarget() NormalLintTarget($(SRCS)) + +/* arch-tag: bc7d2799-8343-4700-a415-847e7fa12540 + (do not change this comment) */ diff --git a/oldXMenu/InsPane.c b/oldXMenu/InsPane.c index 25fa339029..682423a4a0 100644 --- a/oldXMenu/InsPane.c +++ b/oldXMenu/InsPane.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/InsPane.c,v 1.1 1999/10/03 19:35:04 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -110,3 +109,6 @@ XMenuInsertPane(menu, p_num, label, active) _XMErrorCode = XME_NO_ERROR; return(p_num); } + +/* arch-tag: ab94d53d-f05b-4273-82d3-f1b01eb9dc9e + (do not change this comment) */ diff --git a/oldXMenu/InsSel.c b/oldXMenu/InsSel.c index b2c75c1043..f3e2c4d7fb 100644 --- a/oldXMenu/InsSel.c +++ b/oldXMenu/InsSel.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/InsSel.c,v 1.1 1999/10/03 19:35:05 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -114,3 +113,6 @@ XMenuInsertSelection(menu, p_num, s_num, data, label, active) _XMErrorCode = XME_NO_ERROR; return(s_num); } + +/* arch-tag: 8398626f-81cb-4e13-8ebc-aac1b9237663 + (do not change this comment) */ diff --git a/oldXMenu/Internal.c b/oldXMenu/Internal.c index a8941bf3ee..f1367a0735 100644 --- a/oldXMenu/Internal.c +++ b/oldXMenu/Internal.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/Internal.c,v 1.1 1999/10/03 19:35:07 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -1004,3 +1003,5 @@ _XMRefreshSelection(display, menu, select) } } +/* arch-tag: 3ac61957-0852-4e72-8b88-7dfab1a5dee9 + (do not change this comment) */ diff --git a/oldXMenu/Locate.c b/oldXMenu/Locate.c index 145812dc3b..47db7fa110 100644 --- a/oldXMenu/Locate.c +++ b/oldXMenu/Locate.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/Locate.c,v 1.1 1999/10/03 19:35:09 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -76,3 +75,6 @@ XMenuLocate(display, menu, p_num, s_num, x_pos, y_pos, ul_x, ul_y, width, height _XMErrorCode = XME_NO_ERROR; return(XM_SUCCESS); } + +/* arch-tag: 1ff94bab-cf67-4c92-bff4-dc0130153173 + (do not change this comment) */ diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in index e20a583514..82269282c0 100644 --- a/oldXMenu/Makefile.in +++ b/oldXMenu/Makefile.in @@ -107,3 +107,5 @@ maintainer-clean: distclean tags:: $(TAGS) -t *.[ch] + +# arch-tag: dbfc0b16-4e0c-4acb-a9c1-fc12ee76db06 diff --git a/oldXMenu/Post.c b/oldXMenu/Post.c index d10b04945d..3b39d79682 100644 --- a/oldXMenu/Post.c +++ b/oldXMenu/Post.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/Post.c,v 1.2 2000/01/27 15:30:47 gerd Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -83,3 +82,6 @@ XMenuPost(display, menu, p_num, s_num, x_pos, y_pos, event_mask) return(data); } } + +/* arch-tag: 7b6104e5-fa32-4342-aa17-05296a30dd70 + (do not change this comment) */ diff --git a/oldXMenu/Recomp.c b/oldXMenu/Recomp.c index 933a6bf9f3..b4bc4da3f7 100644 --- a/oldXMenu/Recomp.c +++ b/oldXMenu/Recomp.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/Recomp.c,v 1.1 1999/10/03 19:35:11 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -102,3 +101,6 @@ XMenuRecompute(display, menu) _XMErrorCode = XME_NO_ERROR; return(XM_SUCCESS); } + +/* arch-tag: 1fe99b82-3873-4aab-b2b3-f277c93e00d9 + (do not change this comment) */ diff --git a/oldXMenu/SetAEQ.c b/oldXMenu/SetAEQ.c index 7da7c11822..daddc1aa94 100644 --- a/oldXMenu/SetAEQ.c +++ b/oldXMenu/SetAEQ.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/SetAEQ.c,v 1.1 1992/04/11 22:10:20 jimb Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -27,3 +26,6 @@ XMenuSetAEQ(menu, aeq) */ menu->aeq = aeq; } + +/* arch-tag: 48fc22b4-0722-4852-a044-788444e4a9dc + (do not change this comment) */ diff --git a/oldXMenu/SetFrz.c b/oldXMenu/SetFrz.c index 0b5cb270f4..243cc64e0e 100644 --- a/oldXMenu/SetFrz.c +++ b/oldXMenu/SetFrz.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/SetFrz.c,v 1.1 1992/04/11 22:10:21 jimb Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -26,3 +25,6 @@ XMenuSetFreeze(menu, freeze) */ menu->freeze = freeze; } + +/* arch-tag: 69c5670b-3a46-4c78-8fdb-305936d79772 + (do not change this comment) */ diff --git a/oldXMenu/SetPane.c b/oldXMenu/SetPane.c index cdd9e37626..39a87ac5ce 100644 --- a/oldXMenu/SetPane.c +++ b/oldXMenu/SetPane.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/SetPane.c,v 1.1 1992/04/11 22:10:21 jimb Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -41,3 +40,6 @@ XMenuSetPane(menu, p_num, active) _XMErrorCode = XME_NO_ERROR; return(p_num); } + +/* arch-tag: 90bc8d90-031d-41a2-a2c6-04bf94efbc90 + (do not change this comment) */ diff --git a/oldXMenu/SetSel.c b/oldXMenu/SetSel.c index af812be31f..4fe0c82a13 100644 --- a/oldXMenu/SetSel.c +++ b/oldXMenu/SetSel.c @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/SetSel.c,v 1.1 1999/10/03 19:35:15 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -48,3 +47,6 @@ XMenuSetSelection(menu, p_num, s_num, active) _XMErrorCode = XME_NO_ERROR; return(s_num); } + +/* arch-tag: 79198ae0-c5a4-4d31-adb0-5747f833f56a + (do not change this comment) */ diff --git a/oldXMenu/X10.h b/oldXMenu/X10.h index b6ba06e85d..e1abcbbe6c 100644 --- a/oldXMenu/X10.h +++ b/oldXMenu/X10.h @@ -1,4 +1,3 @@ -/* $Header: /cvs/emacs/oldXMenu/X10.h,v 1.1 1999/10/03 19:35:16 fx Exp $ */ /* * Copyright 1985, 1986, 1987 by the Massachusetts Institute of Technology * @@ -76,3 +75,6 @@ XAssocTable *XCreateAssocTable(); char *XLookUpAssoc(); #endif /* _X10_H_ */ + +/* arch-tag: b0b749fb-757b-470b-b405-af7d033a5aad + (do not change this comment) */ diff --git a/oldXMenu/XCrAssoc.c b/oldXMenu/XCrAssoc.c index fae6defea0..67239a26d3 100644 --- a/oldXMenu/XCrAssoc.c +++ b/oldXMenu/XCrAssoc.c @@ -1,4 +1,3 @@ -/* $XConsortium: XCrAssoc.c,v 10.17 91/01/06 12:04:57 rws Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -66,3 +65,6 @@ XAssocTable *XCreateAssocTable(size) return(table); } + +/* arch-tag: 5df3237d-ada0-4345-a3ab-282cafb397aa + (do not change this comment) */ diff --git a/oldXMenu/XDelAssoc.c b/oldXMenu/XDelAssoc.c index df3bee6ee9..1c72447f93 100644 --- a/oldXMenu/XDelAssoc.c +++ b/oldXMenu/XDelAssoc.c @@ -1,4 +1,3 @@ -/* $XConsortium: XDelAssoc.c,v 10.19 91/01/06 12:06:39 rws Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -69,3 +68,5 @@ XDeleteAssoc(dpy, table, x_id) return; } +/* arch-tag: 90981a7e-601c-487a-b364-cdf55d6c475b + (do not change this comment) */ diff --git a/oldXMenu/XDestAssoc.c b/oldXMenu/XDestAssoc.c index d43b9c9576..137c49f613 100644 --- a/oldXMenu/XDestAssoc.c +++ b/oldXMenu/XDestAssoc.c @@ -1,4 +1,3 @@ -/* $XConsortium: XDestAssoc.c,v 10.17 91/02/08 13:11:50 rws Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -47,3 +46,5 @@ XDestroyAssocTable(table) free((char *)table); } +/* arch-tag: a536bf02-8d63-45f2-8c1a-c7f9fd4da2cf + (do not change this comment) */ diff --git a/oldXMenu/XLookAssoc.c b/oldXMenu/XLookAssoc.c index b3a98ca256..ea7303bad6 100644 --- a/oldXMenu/XLookAssoc.c +++ b/oldXMenu/XLookAssoc.c @@ -1,4 +1,3 @@ -/* $XConsortium: XLookAssoc.c,v 10.16 91/01/06 12:09:24 rws Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -66,3 +65,5 @@ caddr_t XLookUpAssoc(dpy, table, x_id) return(NULL); } +/* arch-tag: d5075d0c-4b71-467d-b33c-3f5c4c4afcf2 + (do not change this comment) */ diff --git a/oldXMenu/XMakeAssoc.c b/oldXMenu/XMakeAssoc.c index f6ce766a9a..ffe19adc41 100644 --- a/oldXMenu/XMakeAssoc.c +++ b/oldXMenu/XMakeAssoc.c @@ -1,4 +1,3 @@ -/* $XConsortium: XMakeAssoc.c,v 10.18 91/01/06 12:09:28 rws Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -100,3 +99,5 @@ XMakeAssoc(dpy, table, x_id, data) emacs_insque((struct qelem *)new_entry, (struct qelem *)Entry->prev); } +/* arch-tag: d7e3fb8a-f3b3-4c5d-a307-75ca67ec1b49 + (do not change this comment) */ diff --git a/oldXMenu/XMenu.h b/oldXMenu/XMenu.h index 3188f66fa4..fde2a95462 100644 --- a/oldXMenu/XMenu.h +++ b/oldXMenu/XMenu.h @@ -1,6 +1,5 @@ #include "copyright.h" -/* $Header: /cvs/emacs/oldXMenu/XMenu.h,v 1.2 2000/01/27 15:29:38 gerd Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -261,3 +260,6 @@ char *XMenuError(); #endif /* Don't add after this point. */ + +/* arch-tag: 7e57b5ac-9355-4057-9385-afbe6912d60f + (do not change this comment) */ diff --git a/oldXMenu/XMenuInt.h b/oldXMenu/XMenuInt.h index 3929f20bc7..e96dfb1e91 100644 --- a/oldXMenu/XMenuInt.h +++ b/oldXMenu/XMenuInt.h @@ -1,5 +1,4 @@ -/* $Header: /cvs/emacs/oldXMenu/XMenuInt.h,v 1.1 1999/10/03 19:35:24 fx Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ /* @@ -61,3 +60,6 @@ int _XMHighlightSelection(); /* No value actually returned. */ #endif /* Don't add stuff after this #endif */ + +/* arch-tag: 00640af1-9386-48b5-a4be-35620b8cd3aa + (do not change this comment) */ diff --git a/oldXMenu/copyright.h b/oldXMenu/copyright.h index 1cd0883c70..c5a4316043 100644 --- a/oldXMenu/copyright.h +++ b/oldXMenu/copyright.h @@ -1,4 +1,3 @@ -/* $Header: /u/src/emacs/19.0/oldXMenu/RCS/copyright.h,v 1.1 1992/04/11 22:10:22 jimb Exp $ */ /* Copyright 1985, 1986, 1987 by the Massachusetts Institute of Technology @@ -17,3 +16,5 @@ without express or implied warranty. */ +/* arch-tag: c689b1bc-a3ba-41a1-baa0-a3622b5445b2 + (do not change this comment) */ diff --git a/oldXMenu/insque.c b/oldXMenu/insque.c index e15db5d656..2b1f52bb02 100644 --- a/oldXMenu/insque.c +++ b/oldXMenu/insque.c @@ -36,3 +36,6 @@ emacs_remque (elem) if (prev) prev->q_forw = next; } + +/* arch-tag: a8719d1a-5c3f-4bce-b36b-173106d36165 + (do not change this comment) */ diff --git a/src/.gdbinit b/src/.gdbinit index ca6648e162..9e4e674c74 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -1,4 +1,4 @@ -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2003 +# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 2000, 01, 2004 # Free Software Foundation, Inc. # # This file is part of GNU Emacs. @@ -38,12 +38,22 @@ handle SIGALRM ignore # Set up a mask to use. # This should be EMACS_INT, but in some cases that is a macro. # long ought to work in all cases right now. -set $valmask = ((long)1 << gdb_valbits) - 1 -set $nonvalbits = gdb_emacs_intbits - gdb_valbits + +define xgetptr + set $ptr = (gdb_use_union ? $arg0.u.val : $arg0 & $valmask) | gdb_data_seg_bits +end + +define xgetint + set $int = gdb_use_union ? $arg0.s.val : (gdb_use_lsb ? $arg0 : $arg0 << gdb_gctypebits) >> gdb_gctypebits +end + +define xgettype + set $type = gdb_use_union ? $arg0.s.type : (enum Lisp_Type) (gdb_use_lsb ? $arg0 & $tagmask : $arg0 >> gdb_valbits) +end # Set up something to print out s-expressions. define pr -set debug_print ($) + set debug_print ($) end document pr Print the emacs s-expression which is $. @@ -51,115 +61,135 @@ Works only when an inferior emacs is executing. end define xtype -output (enum Lisp_Type) (($ >> gdb_valbits) & 0x7) -echo \n -output ((($ >> gdb_valbits) & 0x7) == Lisp_Misc ? (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($ & $valmask) | gdb_data_seg_bits))->type) : (($ >> gdb_valbits) & 0x7) == Lisp_Vectorlike ? ($size = ((struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits))->size, (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0)) : 0) -echo \n + xgettype $ + output $type + echo \n + if $type == Lisp_Misc + xmisctype + else + if $type == Lisp_Vectorlike + xvectype + end + end end document xtype Print the type of $, assuming it is an Emacs Lisp value. If the first type printed is Lisp_Vector or Lisp_Misc, -the second line gives the more precise type. -Otherwise the second line doesn't mean anything. +a second line gives the more precise type. end define xvectype -set $size = ((struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits))->size -output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0) -echo \n + xgetptr $ + set $size = ((struct Lisp_Vector *) $ptr)->size + output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size + echo \n end document xvectype -Print the vector subtype of $, assuming it is a vector or pseudovector. +Print the size or vector subtype of $, assuming it is a vector or pseudovector. end define xmisctype -output (enum Lisp_Misc_Type) (((struct Lisp_Free *) (($ & $valmask) | gdb_data_seg_bits))->type) -echo \n + xgetptr $ + output (enum Lisp_Misc_Type) (((struct Lisp_Free *) $ptr)->type) + echo \n end document xmisctype Print the specific type of $, assuming it is some misc type. end define xint -print (($ & $valmask) << $nonvalbits) >> $nonvalbits + xgetint $ + print $int end document xint Print $, assuming it is an Emacs Lisp integer. This gets the sign right. end define xptr -print (void *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (void *) $ptr end document xptr Print the pointer portion of $, assuming it is an Emacs Lisp value. end define xmarker -print (struct Lisp_Marker *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct Lisp_Marker *) $ptr end document xmarker Print $ as a marker pointer, assuming it is an Emacs Lisp marker value. end define xoverlay -print (struct Lisp_Overlay *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct Lisp_Overlay *) $ptr end document xoverlay Print $ as a overlay pointer, assuming it is an Emacs Lisp overlay value. end define xmiscfree -print (struct Lisp_Free *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct Lisp_Free *) $ptr end document xmiscfree Print $ as a misc free-cell pointer, assuming it is an Emacs Lisp Misc value. end define xintfwd -print (struct Lisp_Intfwd *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct Lisp_Intfwd *) $ptr end document xintfwd Print $ as an integer forwarding pointer, assuming it is an Emacs Lisp Misc value. end define xboolfwd -print (struct Lisp_Boolfwd *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct Lisp_Boolfwd *) $ptr end document xboolfwd Print $ as a boolean forwarding pointer, assuming it is an Emacs Lisp Misc value. end define xobjfwd -print (struct Lisp_Objfwd *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct Lisp_Objfwd *) $ptr end document xobjfwd Print $ as an object forwarding pointer, assuming it is an Emacs Lisp Misc value. end define xbufobjfwd -print (struct Lisp_Buffer_Objfwd *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct Lisp_Buffer_Objfwd *) $ptr end document xbufobjfwd Print $ as a buffer-local object forwarding pointer, assuming it is an Emacs Lisp Misc value. end define xkbobjfwd -print (struct Lisp_Kboard_Objfwd *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct Lisp_Kboard_Objfwd *) $ptr end document xkbobjfwd Print $ as a kboard-local object forwarding pointer, assuming it is an Emacs Lisp Misc value. end define xbuflocal -print (struct Lisp_Buffer_Local_Value *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct Lisp_Buffer_Local_Value *) $ptr end document xbuflocal Print $ as a buffer-local-value pointer, assuming it is an Emacs Lisp Misc value. end define xsymbol -print (struct Lisp_Symbol *) ((((int) $) & $valmask) | gdb_data_seg_bits) -xprintsym $ + xgetptr $ + print (struct Lisp_Symbol *) $ptr + xprintsym $ + echo \n end document xsymbol Print the name and address of the symbol $. @@ -167,9 +197,10 @@ This command assumes that $ is an Emacs Lisp symbol value. end define xstring -print (struct Lisp_String *) (($ & $valmask) | gdb_data_seg_bits) -output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte) -echo \n + xgetptr $ + print (struct Lisp_String *) $ptr + output ($->size > 1000) ? 0 : ($->data[0])@($->size_byte < 0 ? $->size : $->size_byte) + echo \n end document xstring Print the contents and address of the string $. @@ -177,8 +208,9 @@ This command assumes that $ is an Emacs Lisp string value. end define xvector -print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits) -output ($->size > 50) ? 0 : ($->contents[0])@($->size) + xgetptr $ + print (struct Lisp_Vector *) $ptr + output ($->size > 50) ? 0 : ($->contents[0])@($->size) echo \n end document xvector @@ -187,32 +219,36 @@ This command assumes that $ is an Emacs Lisp vector value. end define xprocess -print (struct Lisp_Process *) (($ & $valmask) | gdb_data_seg_bits) -output *$ -echo \n + xgetptr $ + print (struct Lisp_Process *) $ptr + output *$ + echo \n end document xprocess Print the address of the struct Lisp_process which the Lisp_Object $ points to. end define xframe -print (struct frame *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct frame *) $ptr end document xframe Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. end define xcompiled -print (struct Lisp_Vector *) (($ & $valmask) | gdb_data_seg_bits) -output ($->contents[0])@($->size & 0xff) + xgetptr $ + print (struct Lisp_Vector *) $ptr + output ($->contents[0])@($->size & 0xff) end document xcompiled Print $ as a compiled function pointer, assuming it is an Emacs Lisp compiled value. end define xwindow -print (struct window *) (($ & $valmask) | gdb_data_seg_bits) -printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top + xgetptr $ + print (struct window *) $ptr + printf "%dx%d+%d+%d\n", $->width, $->height, $->left, $->top end document xwindow Print $ as a window pointer, assuming it is an Emacs Lisp window value. @@ -220,27 +256,30 @@ Print the window's position as "WIDTHxHEIGHT+LEFT+TOP". end define xwinconfig -print (struct save_window_data *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct save_window_data *) $ptr end document xwinconfig Print $ as a window configuration pointer, assuming it is an Emacs Lisp window configuration value. end define xsubr -print (struct Lisp_Subr *) (($ & $valmask) | gdb_data_seg_bits) -output *$ -echo \n + xgetptr $ + print (struct Lisp_Subr *) $ptr + output *$ + echo \n end document xsubr Print the address of the subr which the Lisp_Object $ points to. end define xchartable -print (struct Lisp_Char_Table *) (($ & $valmask) | gdb_data_seg_bits) -printf " %d extra slots", ($->size & 0x1ff) - 68 -echo \n -printf "Purpose: " -xprintsym $->purpose + xgetptr $ + print (struct Lisp_Char_Table *) $ptr + printf "Purpose: " + xprintsym $->purpose + printf " %d extra slots", ($->size & 0x1ff) - 68 + echo \n end document xchartable Print the address of the char-table $, and its purpose. @@ -248,9 +287,10 @@ This command assumes that $ is an Emacs Lisp char-table value. end define xboolvector -print (struct Lisp_Bool_Vector *) (($ & $valmask) | gdb_data_seg_bits) -output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8) -echo \n + xgetptr $ + print (struct Lisp_Bool_Vector *) $ptr + output ($->size > 256) ? 0 : ($->data[0])@(($->size + 7)/ 8) + echo \n end document xboolvector Print the contents and address of the bool-vector $. @@ -258,9 +298,11 @@ This command assumes that $ is an Emacs Lisp bool-vector value. end define xbuffer -print (struct buffer *) (($ & $valmask) | gdb_data_seg_bits) -output ((struct Lisp_String *) ((($->name) & $valmask) | gdb_data_seg_bits))->data -echo \n + xgetptr $ + print (struct buffer *) $ptr + xgetptr $->name + output ((struct Lisp_String *) $ptr)->data + echo \n end document xbuffer Set $ as a buffer pointer, assuming it is an Emacs Lisp buffer value. @@ -268,24 +310,26 @@ Print the name of the buffer. end define xhashtable -print (struct Lisp_Hash_Table *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct Lisp_Hash_Table *) $ptr end document xhashtable Set $ as a hash table pointer, assuming it is an Emacs Lisp hash table value. end define xcons -print (struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits) -output/x *$ -echo \n + xgetptr $ + print (struct Lisp_Cons *) $ptr + output/x *$ + echo \n end document xcons Print the contents of $, assuming it is an Emacs Lisp cons. end define nextcons -p $.cdr -xcons + p $.cdr + xcons end document nextcons Print the contents of the next cell in a list. @@ -293,28 +337,34 @@ This assumes that the last thing you printed was a cons cell contents (type struct Lisp_Cons) or a pointer to one. end define xcar -print/x ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->car : 0) + xgetptr $ + xgettype $ + print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->car : 0) end document xcar Print the car of $, assuming it is an Emacs Lisp pair. end define xcdr -print/x ((($ >> gdb_valbits) & 0xf) == Lisp_Cons ? ((struct Lisp_Cons *) (($ & $valmask) | gdb_data_seg_bits))->cdr : 0) + xgetptr $ + xgettype $ + print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->cdr : 0) end document xcdr Print the cdr of $, assuming it is an Emacs Lisp pair. end define xfloat -print ((struct Lisp_Float *) (($ & $valmask) | gdb_data_seg_bits))->data + xgetptr $ + print ((struct Lisp_Float *) $ptr)->data end document xfloat Print $ assuming it is a lisp floating-point number. end define xscrollbar -print (struct scrollbar *) (($ & $valmask) | gdb_data_seg_bits) + xgetptr $ + print (struct scrollbar *) $ptr output *$ echo \n end @@ -323,10 +373,11 @@ Print $ as a scrollbar pointer. end define xprintsym - set $sym = (struct Lisp_Symbol *) ((((int) $arg0) & $valmask) | gdb_data_seg_bits) - set $sym_name = ((struct Lisp_String *)(($sym->xname & $valmask) | gdb_data_seg_bits)) + xgetptr $arg0 + set $sym = (struct Lisp_Symbol *) $ptr + xgetptr $sym->xname + set $sym_name = (struct Lisp_String *) $ptr output ($sym_name->data[0])@($sym_name->size_byte < 0 ? $sym_name->size : $sym_name->size_byte) - echo \n end document xprintsym Print argument as a symbol. @@ -358,14 +409,16 @@ end define xbacktrace set $bt = backtrace_list while $bt - set $type = (enum Lisp_Type) ((*$bt->function >> gdb_valbits) & 0x7) + xgettype (*$bt->function) if $type == Lisp_Symbol - xprintsym *$bt->function + xprintsym (*$bt->function) + echo \n else printf "0x%x ", *$bt->function if $type == Lisp_Vectorlike - set $size = ((struct Lisp_Vector *) ((*$bt->function & $valmask) | gdb_data_seg_bits))->size - output (enum pvec_type) (($size & PVEC_FLAG) ? $size & PVEC_TYPE_MASK : 0) + xgetptr (*$bt->function) + set $size = ((struct Lisp_Vector *) $ptr)->size + output ($size & PVEC_FLAG) ? (enum pvec_type) ($size & PVEC_TYPE_MASK) : $size else printf "Lisp type %d", $type end @@ -381,16 +434,17 @@ document xbacktrace end define xreload - set $valmask = ((long)1 << gdb_valbits) - 1 - set $nonvalbits = gdb_emacs_intbits - gdb_valbits + set $tagmask = (((long)1 << gdb_gctypebits) - 1) + set $valmask = gdb_use_lsb ? ~($tagmask) : ((long)1 << gdb_valbits) - 1 end document xreload When starting Emacs a second time in the same gdb session under - FreeBSD 2.2.5, gdb 4.13, $valmask and $nonvalbits have lost + FreeBSD 2.2.5, gdb 4.13, $valmask have lost their values. (The same happens on current (2000) versions of GNU/Linux with gdb 5.0.) This function reloads them. end +xreload define hook-run xreload @@ -416,3 +470,5 @@ break abort # before Emacs exits. Perhaps we should put the break somewhere else # instead... break x_error_quitter + +# arch-tag: 12f34321-7bfa-4240-b77a-3cd3a1696dfe diff --git a/src/.gitignore b/src/.gitignore index f1a15019c6..406ff7cd5e 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,18 +1,19 @@ +*-spd *.core +*.pdb +.gdb_history Makefile Makefile.c TAGS-LISP +_gdbinit bootstrap-emacs config.h config.stamp emacs emacs-* epaths.h +gdb.ini obj prefix-args stamp-oldxmenu temacs -_gdbinit -gdb.ini -*-spd -*.pdb diff --git a/src/ChangeLog b/src/ChangeLog index 6c92bf7cd8..c9cf12dc15 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,2703 @@ +2004-04-14 Luc Teirlinck + + * fileio.c (Fverify_visited_file_modtime, Fvisited_file_modtime): + Add hyperlink to Elisp manual to the docstring. + +2004-04-14 Stefan Monnier + + * callint.c (fix_command): Use XDCR. + +2004-04-14 Nick Roberts + + * window.c (Fget_lru_window): Doc fix. + +2004-04-14 Kim F. Storm + + * editfns.c (Fformat): Fix allocation size of precision array. + + * dispnew.c (update_window): Only set changed_p if + scrolling_window actually did scroll. + (scrolling_window): Only return 1 if we actually did scroll. + + * xdisp.c (get_glyph_string_clip_rect): Fix reduction of cursor + height to glyph height when cursor row is not fully visible. + (make_cursor_line_fully_visible): Add FORCE_P arg to return + failure in case row is higher than window. Callers changed. + (try_scrolling): Fix loop in scrolling if last_line_misfit (from Gerd). + Try to scroll partially visible, higher-than-window cursor row. + (redisplay_window): Always try to scroll partially visible, + higher-than-window cursor row - both initially and again with + centering_position = 0. + Clear desired matrix before retrying with centering_position = 0. + +2004-04-13 Joe Buehler + + * sheap.c, unexcw.c: New files. + +2004-04-12 Luc Teirlinck + + * buffer.c (Fmake_indirect_buffer): Throw an error if the intended + base buffer has been killed. Correct the error message if the + base buffer does not exist. + +2004-04-12 Joe Buehler + + * s/cygwin.h: Changes for Cygwin unexec() support, changes in + Cygwin itself. Add support for Xaw3d scrollbars. + + * puresize.h: Set up PURE_P() for Cygwin unexec() support. + + * lastfile.c: Define my_endbss[] for Cygwin unexec() support. + + * gmalloc.c (__default_morecore): Use bss_sbrk(), not __sbrk(), + before Cygwin unexec. + + * Makefile.in: Link changes for Cygwin unexec() support. + +2004-04-12 Andreas Schwab + + * buffer.c (Fmake_indirect_buffer): Check that NAME is a string. + +2004-04-11 Luc Teirlinck + + * buffer.c (Fgenerate_new_buffer_name): Return NAME argument if + IGNORE argument equals NAME. Doc fix. + +2004-04-11 Masatake YAMATO + + * buffer.c (fix_start_end_in_overlays): Make overlays + empty if they are backwards. + +2004-04-09 Stefan Monnier + + * xfaces.c (face_color_supported_p): Fix compilation without X11. + +2004-04-07 Stefan Monnier + + * doc.c (Fsnarf_documentation): Ignore new file name entries. + +2004-04-06 Kim F. Storm + + * msdos.c (clear_mouse_face): Only clear mouse highlight if not hidden. + (dos_rawgetc): Set mouse_face_hidden after clearing highlight. + + * w32term.c (w32_read_socket): Set mouse_face_hidden after + clearing highlight. + + * xdisp.c (clear_mouse_face): Only clear mouse highlight if not hidden. + + * xterm.c (handle_one_xevent): Set mouse_face_hidden after + clearing highlight. + + * indent.c (vmotion): Do not reserve one column for continuation + marks on window frames. + +2004-04-04 Eli Zaretskii + + * charset.h (SINGLE_BYTE_CHAR_P): Fix macro to avoid warnings + from GCC. + +2004-04-03 Stefan Monnier + + * .gdbinit-union: Remove. + + * .gdbinit: Make it work for USE_LSB_TAG and !NO_LISP_UNION. + (xgetptr, xgetint, xgettype): New funs. Use them everywhere. + ($nonvalbits): Remove. + ($valmask): Set it by calling xreload to avoid redundancy. + + * emacs.c (gdb_use_union, gdb_use_lsb): New vars. + (gdb_emacs_intbits): Remove. + +2004-03-31 Jan Dj,Ad(Brv + + * data.c (Fbyteorder): Make test work even if unsigned is not 4 bytes. + +2004-03-30 Kenichi Handa + + * editfns.c (Fformat): Fix initialization of the array info. + +2004-03-30 Kim F. Storm + + * xterm.c (x_mouse_click_focus_ignore_position): New var. + (syms_of_xterm): DEFVAR_BOOL it. + (ignore_next_mouse_click_timeout): New var. + (handle_one_xevent): Clear it on KeyPress, set it on EnterNotify. + Use it to filter mouse clicks following focus event. + +2004-03-29 David Ponce + + * callint.c (Fcall_interactively): Fix last change. + +2004-03-28 Stefan Monnier + + * eval.c (Fcommandp): Simplify. + + * data.c (Finteractive_form): Rename from Fsubr_interactive_form. + Extend to handle all kinds of functions. + + * lisp.h (Finteractive_form): Declare. + + * callint.c (Fcall_interactively): Use it. + +2004-03-26 Kim F. Storm + + * xdisp.c (syms_of_xdisp): Include `void-variable' in list_of_error + to catch errors in calc_pixel_width_or_height during redisplay. + +2004-03-26 Masatake YAMATO + + * buffer.c (fix_start_end_in_overlays): Rename fix_overlays_in_range. + + * lisp.h (fix_start_end_in_overlays): Likewise. + + * insdel.c (adjust_markers_for_insert): Call fix_start_end_in_overlays. + + * editfns.c (Ftranspose_regions): Likewise. + +2004-03-20 Jan Dj,Ad(Brv + + * xterm.c (handle_one_xevent): Do not pass key press events to GTK. + +2004-03-19 Richard M. Stallman + + * s/sol2-6.h: Delete previous change. + +2004-03-19 Kim F. Storm + + * xdisp.c (move_it_in_display_line_to): Fix MOVE_TO_POS case when + to_charpos corresponds to newline in right fringe. Use local + BUFFER_POS_REACHED_P macro. + +2004-03-19 Jan Dj,Ad(Brv + + * xdisp.c (calc_pixel_width_or_height): Add ifdef HAVE_WINDOW_SYSTEM + to compile on non-window system. + +2004-03-19 Kim F. Storm + + * dispextern.h (calc_pixel_width_or_height): Add prototype. + + * image.c (Qcenter): Move to xdisp.c. + + * xdisp.c (Qcenter): Declare here. + (syms_of_xdisp): Intern and staticpro it. + (handle_single_display_prop): Allow space display property on all + platforms. + (display_mode_line): Set mode_line_p before displaying line. + (calc_pixel_width_or_height): Declare extern. Add separate :align-to + handling. Remove complex cases for fringes and scroll-bars. + Add left, right, and center alignment positions. Add text (area) + width/height. Return width or height for image specs. + (produce_stretch_glyph): Improve handling of :align-to. Is now + relative to left of text area by default, but other base offsets + can be specified -- also for text lines. + + * term.c (produce_glyphs): Handle IT_STRETCH. + (produce_stretch_glyph): New function to handle space width and + align-to display properties on non-window systems. + +2004-03-17 Stefan Monnier + + * fileio.c (Fread_file_name): Set completion-ignore-case for + case-insensitive systems. + +2004-03-14 Masatake YAMATO + + * xdisp.c (note_mode_line_or_margin_highlight): Accept HEADER_LINE + when keymap and cursor are setup. + +2004-03-14 Steven Tamm + + * Makefile.in (XMENU_OBJ) [HAVE_CARBON]: Do not include xmenu.o. + +2004-03-14 Kim F. Storm + + * dispextern.h (x_find_image_file): Add prototype. + + * image.c (x_find_image_file): Make extern. + + * xfns.c (x_find_image_file): Remove prototype. + +2004-03-13 Eli Zaretskii + + * Makefile.in (XMENU_OBJ): Include xmenu.o if HAVE_MENUS is defined. + + * emacs.c (main): Call syms_of_xmenu only if HAVE_MENUS is defined. + +2004-03-12 Richard M. Stallman + + * fns.c (internal_equal): New arg PROPS controls comparing + text properties. All callers changed. + (Fequal_including_properties): New function. + (syms_of_fns): defsubr it. + +2004-03-12 Kim F. Storm + + Fix image support on MAC. From YAMAMOTO Mitsuharu. + + * dispextern.h (XImagePtr, XImagePtr_or_DC): Add typedefs. + (image_background, image_background_transparent): Fix prototypes. + + * image.c (XImagePtr, XImagePtr_or_DC): Move typedefs to dispextern.h. + + * macfns.c (x_list_fonts, x_get_font_info, x_load_font) + (x_query_font, x_find_ccl_program, x_set_window_size) + (x_make_frame_visible, mac_initialize, XCreatePixmap) + (XCreatePixmapFromBitmapData, XFreePixmap, XSetForeground) + (mac_draw_line_to_pixmap): Move prototypes to macterm.h. + + * macterm.h (x_list_fonts, x_get_font_info, x_load_font) + (x_query_font, x_find_ccl_program, x_set_window_size) + (x_make_frame_visible, mac_initialize, XCreatePixmap) + (XCreatePixmapFromBitmapData, XFreePixmap, XSetForeground) + (mac_draw_line_to_pixmap): Add prototypes. + +2004-03-12 YAMAMOTO Mitsuharu + + * macterm.c (XTread_socket): Fix mouse click on tool bar. + +2004-03-11 Kim F. Storm + + * dispextern.h: Move image related prototypes from xfns.c section + to image.c. Condition them by HAVE_WINDOW_SYSTEM rather than + HAVE_X_WINDOWS. + + * Makefile.in (XOBJ): Consolidate into one list. Add image.o. + Move gtkutil.o to new GTK_OBJ list. + (XMENU_OBJ) [HAVE_MENUS]: Move declaration to proper place. + (GTK_OBJ) [USE_GTK]: New declaration. + (obj): Add $(GTK_OBJ) to list. + +2004-03-11 Steven Tamm + + * image.c [MAC_OSX]: Include sys/stat.h + + * macfns.c (syms_of_macfns): Remove definitions of things now + defined in image.c + +2004-03-11 Kim F. Storm + + The following changes consolidates the identical/similar image + support code previously found in xfns.c, w32fns.c, and macfns.c + into a new file image.c. + + * makefile.w32-in (OBJ1): Add image.o. + ($(BLD)/image.$(O)): Add dependencies. + + * Makefile.in (XOBJ, MAC_OBJ): Add image.o. + (image.o): Add dependencies. + + * image.c: New file with consolidated image support code. + (COLOR_TABLE_SUPPORT): New define to control whether + color table support is available (X only). + (Bitmap_Record): Common name for x_bitmap_record, + w32_bitmap_record, and mac_bitmap_record. + (XImagePtr): Common name for pointer to XImage or equivalent. + (XImagePtr_or_DC): New type to simplify code sharing; equivalent + to XImagePtr on X+MAC, and to HDC on W32. + (GET_PIXEL): Wrapper for XGetPixel or equivalent. + (NO_PIXMAP): Common name for "None" or equivalent. + (PNG_BG_COLOR_SHIFT): Bits to shift PNG background colors. + (RGB_PIXEL_COLOR): Common type for an integer "pixel color" value. + (PIX_MASK_RETAIN, PIX_MASK_DRAW): Portability macros (from macfns.c). + (FRAME_X_VISUAL, x_defined_color, DefaultDepthOfScreen): + Define with suitable equivalents on W32 and MAC for code sharing. + (XDrawLine): Define on MAC for code sharing. + (Destroy_Image, Free_Pixmap): Wrappers for code sharing. + (IF_LIB_AVAILABLE): Macro to simplify code sharing. + (Vx_bitmap_file_path, Vimage_cache_eviction_delay) + (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap) + (x_reference_bitmap, x_create_bitmap_from_data) + (x_create_bitmap_from_file, x_destroy_bitmap) + (x_destroy_all_bitmaps, x_create_bitmap_mask) + (XGetImage, XPutPixel, XGetPixel, XDestroyImage) + (QCascent, QCmargin, QCrelief, QCconversion, QCcolor_symbols) + (QCheuristic_mask, QCindex, QCmatrix, QCcolor_adjustment, QCmask) + (Qlaplace, Qemboss, Qedge_detection, Qheuristic, Qcenter) + (define_image_type, lookup_image_type, valid_image_p) + (image_error, enum image_value_type, struct image_keyword) + (parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p) + (make_image, free_image, prepare_image_for_display, image_ascent) + (four_corners_best, image_background, image_background_transparent) + (x_clear_image_1, x_clear_image, x_alloc_image_color) + (make_image_cache, free_image_cache, clear_image_cache) + (Fclear_image_cache, postprocess_image, lookup_image, cache_image) + (forall_images_in_image_cache, x_create_x_image_and_pixmap) + (x_destroy_x_image, x_put_x_image, x_find_image_file, slurp_file) + (find_image_fsspec, image_load_qt_1, image_load_quicktime) + (init_image_func_pointer, image_load_quartz2d) + (struct ct_color, init_color_table, free_color_table) + (lookup_rgb_color, lookup_pixel_color, colors_in_color_table) + (cross_disabled_images, x_to_xcolors, x_from_xcolors) + (x_detect_edges, x_emboss, x_laplace, x_edge_detection) + (x_disable_image, x_build_heuristic_mask) + (XBM support, XPM support, PBM support, PNG support, JPEG support) + (TIFF support, GIF support, Ghostscript support): Consolidate image + code from xfns.c, w32fns.c, and macfns.c. + (syms_of_image): Consolidate image related symbol setup here. + (init_image): Consolidate image related initializations here. + + * emacs.c (main) [HAVE_WINDOW_SYSTEM]: Add calls to syms_of_image + and init_image. Remove call to init_xfns. + + * macterm.h (struct mac_bitmap_record): Add file member. + Not currently used, but simplifies code sharing. + + * macfns.c (Vx_bitmap_file_path, Vimage_cache_eviction_delay) + (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap) + (x_reference_bitmap, x_create_bitmap_from_data) + (x_create_bitmap_from_file, x_destroy_bitmap) + (x_destroy_all_bitmaps, x_create_bitmap_mask) + (XGetImage, XPutPixel, XGetPixel, XDestroyImage) + (QCascent, QCmargin, QCrelief, QCconversion, QCcolor_symbols) + (QCheuristic_mask, QCindex, QCmatrix, QCcolor_adjustment, QCmask) + (Qlaplace, Qemboss, Qedge_detection, Qheuristic, Qcenter) + (define_image_type, lookup_image_type, valid_image_p) + (image_error, enum image_value_type, struct image_keyword) + (parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p) + (make_image, free_image, prepare_image_for_display, image_ascent) + (four_corners_best, image_background, image_background_transparent) + (x_clear_image_1, x_clear_image, x_alloc_image_color) + (make_image_cache, free_image_cache, clear_image_cache) + (Fclear_image_cache, postprocess_image, lookup_image, cache_image) + (forall_images_in_image_cache, x_create_x_image_and_pixmap) + (x_destroy_x_image, x_put_x_image, x_find_image_file, slurp_file) + (find_image_fsspec, image_load_qt_1, image_load_quicktime) + (init_image_func_pointer, image_load_quartz2d) + (struct ct_color, init_color_table, free_color_table) + (lookup_rgb_color, lookup_pixel_color, colors_in_color_table) + (cross_disabled_images, x_to_xcolors, x_from_xcolors) + (x_detect_edges, x_emboss, x_laplace, x_edge_detection) + (x_disable_image, x_build_heuristic_mask) + (XBM support, XPM support, PBM support, PNG support, JPEG support) + (TIFF support, GIF support, Ghostscript support): Merge with image + code from xfns.c and macfns.c into image.c. + (syms_of_xfns): Move image related symbols to image.c. + (init_external_image_libraries, init_xfns): Remove; initialization + moved to init_image in image.c. + + * w32fns.c (Vx_bitmap_file_path, Vimage_cache_eviction_delay) + (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap) + (x_reference_bitmap, x_create_bitmap_from_data) + (x_create_bitmap_from_file, x_destroy_bitmap) + (x_destroy_all_bitmaps, x_create_bitmap_mask) + (QCascent, QCmargin, QCrelief, QCconversion, QCcolor_symbols) + (QCheuristic_mask, QCindex, QCmatrix, QCcolor_adjustment, QCmask) + (Qlaplace, Qemboss, Qedge_detection, Qheuristic, Qcenter) + (define_image_type, lookup_image_type, valid_image_p) + (image_error, enum image_value_type, struct image_keyword) + (parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p) + (make_image, free_image, prepare_image_for_display, image_ascent) + (four_corners_best, image_background, image_background_transparent) + (x_clear_image_1, x_clear_image, x_alloc_image_color) + (make_image_cache, free_image_cache, clear_image_cache) + (Fclear_image_cache, postprocess_image, lookup_image, cache_image) + (forall_images_in_image_cache, x_create_x_image_and_pixmap) + (x_destroy_x_image, x_put_x_image, x_find_image_file, slurp_file) + (struct ct_color, init_color_table, free_color_table) + (lookup_rgb_color, lookup_pixel_color, colors_in_color_table) + (cross_disabled_images, x_to_xcolors, x_from_xcolors) + (x_detect_edges, x_emboss, x_laplace, x_edge_detection) + (x_disable_image, x_build_heuristic_mask) + (XBM support, XPM support, PBM support, PNG support, JPEG support) + (TIFF support, GIF support, Ghostscript support): Merge with image + code from xfns.c and macfns.c into image.c. + (syms_of_xfns): Move image related symbols to image.c. + (init_external_image_libraries, init_xfns): Remove; initialization + moved to init_image in image.c. + + * xfns.c (Vx_bitmap_file_path, Vimage_cache_eviction_delay) + (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap) + (x_reference_bitmap, x_create_bitmap_from_data) + (x_create_bitmap_from_file, x_destroy_bitmap) + (x_destroy_all_bitmaps, x_create_bitmap_mask) + (QCascent, QCmargin, QCrelief, QCconversion, QCcolor_symbols) + (QCheuristic_mask, QCindex, QCmatrix, QCcolor_adjustment, QCmask) + (Qlaplace, Qemboss, Qedge_detection, Qheuristic, Qcenter) + (define_image_type, lookup_image_type, valid_image_p) + (image_error, enum image_value_type, struct image_keyword) + (parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p) + (make_image, free_image, prepare_image_for_display, image_ascent) + (four_corners_best, image_background, image_background_transparent) + (x_clear_image_1, x_clear_image, x_alloc_image_color) + (make_image_cache, free_image_cache, clear_image_cache) + (Fclear_image_cache, postprocess_image, lookup_image, cache_image) + (forall_images_in_image_cache, x_create_x_image_and_pixmap) + (x_destroy_x_image, x_put_x_image, x_find_image_file, slurp_file) + (struct ct_color, init_color_table, free_color_table) + (lookup_rgb_color, lookup_pixel_color, colors_in_color_table) + (cross_disabled_images, x_to_xcolors, x_from_xcolors) + (x_detect_edges, x_emboss, x_laplace, x_edge_detection) + (x_disable_image, x_build_heuristic_mask) + (XBM support, XPM support, PBM support, PNG support, JPEG support) + (TIFF support, GIF support, Ghostscript support): Merge with + w32fns.c and macfns.c image code into image.c. + (syms_of_xfns): Move image related symbols to image.c. + (init_xfns): Remove; initialization moved to init_image in image.c. + + * lisp.h (syms_of_image, init_image): Add protoypes. + (init_xfns): Remove prototype. + + * dispextern.h (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap) + (x_reference_bitmap, x_create_bitmap_from_data) + (x_create_bitmap_from_file, x_destroy_bitmap) + (x_create_bitmap_mask): Move prototypes from dispextern.h. + (gamma_correct) [MAC_OS]: Add prototype. + + * xterm.h (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap) + (x_reference_bitmap, x_create_bitmap_from_data) + (x_create_bitmap_from_file, x_destroy_bitmap) + (x_create_bitmap_mask): Move prototypes to dispextern.h. + +2004-03-09 Kenichi Handa + + * coding.c (decode_coding_emacs_mule): Handle insufficent source + correctly. + +2004-03-04 Richard M. Stallman + + * s/sol2-6.h (LD_SWITCH_SYSTEM_TEMACS): New definition. + + * window.c (Fdisplay_buffer): Doc fix. + + * buffer.c (Fpop_to_buffer): Doc fix. + +2004-03-03 Kim F. Storm + + * xdisp.c (display_line): Fix call to get_overlay_arrow_glyph_row. + +2004-03-02 Stefan Monnier + + * editfns.c (Ftranslate_region): Lisp_Object/int mixup. + +2004-03-02 Richard M. Stallman + + * indent.c (compute_motion): Save vpos in prev_vpos, like hpos etc. + +2004-03-02 Kenichi Handa + + * doc.c (Fsubstitute_command_keys): Fix counding bytes. + +2004-03-02 Kim F. Storm + + * window.h (struct window): New member overlay_arrow_bitmap. + + * window.c (make_window): Initialize overlay_arrow_bitmap. + + * xdisp.c (Voverlay_arrow_variable_list): New variable to properly + implement and integrate multiple overlay arrows with redisplay. + (syms_of_xdisp): DEFVAR_LISP and initialize it. + (last_arrow_position, last_arrow_string): Replace by properties. + (Qlast_arrow_position, Qlast_arrow_string) + (Qoverlay_arrow_string, Qoverlay_arrow_bitmap): New variables. + (syms_of_xdisp): Intern and staticpro them. + (overlay_arrow_string_or_property, update_overlay_arrows) + (overlay_arrow_in_current_buffer_p, overlay_arrows_changed_p) + (overlay_arrow_at_row): New functions for multiple overlay arrows. + (redisplay_internal): Use them instead of directly accessing + Voverlay_arrow_position etc. for multiple overlay arrows. + (mark_window_display_accurate): Use update_overlay_arrows. + (try_cursor_movement): Use overlay_arrow_in_current_buffer_p. + (try_window_id): Use overlay_arrows_changed_p. + (get_overlay_arrow_glyph_row): Add overlay_arrow_string arg. + (display_line): Use overlay_arrow_at_row to check multiple + overlay arrows, and get relevant overlay-arrow-string and + overlay-arrow-bitmap. Set w->overlay_arrow_bitmap accordingly. + (produce_image_glyph): Set pixel_width = 0 for fringe bitmap. + (syms_of_xdisp): Remove last_arrow_position and last_arrow_string. + + * fringe.c (draw_fringe_bitmap): Use w->overlay_arrow_bitmap if set. + (update_window_fringes): Remove unused code. + +2004-03-01 Jason Rumney + + * w32term.c (w32_read_socket): Fix last change to ButtonPress handling. + +2004-03-01 Juanma Barranquero + + * fringe.c (Fdefine_fringe_bitmap): Fix typo in docstring. + + * makefile.w32-in ($(BLD)/fringe.$(O)): Add dependencies. + +2004-03-01 Jan Dj,Ad(Brv + + * xfns.c (Fx_display_color_cells): Use number of planes to calculate + how many colors can be displayed. + +2004-03-01 Kenichi Handa + + * editfns.c (Ftranslate_region): Handle multibyte chars in TABLE + correctly. + +2004-02-28 Kim F. Storm + + * dispnew.c (update_window): Update header line also if there are + no other changes in window (move code after set_cursor label). + + * lisp.h (mark_window_display_accurate): Remove prototype. + + * window.c (window_loop, Fforce_window_update): Force mode line + updates by setting prevent_redisplay_optimizations_p and + update_mode_lines. + +2004-02-28 Jan Dj,Ad(Brv + + * xfns.c (x_window): Fix indentation. + + * xterm.c (x_calc_absolute_position): Call x_real_positions + to get WM window sizes and use those to calculate position. + (x_set_offset): Remove code commented out. + +2004-02-28 Miles Bader + + * keyboard.c (adjust_point_for_property): #ifdef-out dodgy xassert. + +2004-02-28 Kim F. Storm + + * keyboard.c (kbd_buffer_store_event_hold): New function to store + an event into kbd fifo, but with special handling of quit event; + a quit event is saved for later, and further events are discarded + until the saved quit event has been processed. + (kbd_buffer_store_event): Use kbd_buffer_store_event_hold. + (gen_help_event): Store help event in kbd fifo. + (NREAD_INPUT_EVENTS): Remove. + (read_avail_input): Adapt to new read_socket_hook interface. + Remove allocation and initialization of local input_event buffer, + as read_socket_hook stores events directly in fifo. Allocate and + initialize local hold_quit event to handle postponed quit event + (and store it if set by kbd_buffer_store_event_hold). + + * keyboard.h (kbd_buffer_store_event_hold): Add prototype. + (gen_help_event): Fix prototype. + + * macterm.c (XTread_socket): Remove bufp_r and + numcharsp args. Add hold_quit arg. + Rework to use just one, local, inev input_event. Store inev + directly in fifo using kbd_buffer_store_event_hold. + + * sysdep.c (BUFFER_SIZE_FACTOR): Remove. + (read_input_waiting): Adapt to new read_socket_hook interface. + Remove allocation and initialization of local input_event buffer, + as read_socket_hook stores events directly in fifo. Allocate and + initialize local hold_quit event to handle postponed quit event + (and store it if set by kbd_buffer_store_event_hold). + + * term.c (read_socket_hook): Fix arg list. + + * termhooks.h (read_socket_hook): Fix prototype. + + * w32inevt.c (w32_console_read_socket): Remove bufp_r and + numcharsp args. Add hold_quit arg. + Rework to use just one, local, inev input_event. Store inev + directly in fifo using kbd_buffer_store_event_hold. + + * w32inevt.h (w32_console_mouse_position): Fix prototype. + + * w32term.c (w32_read_socket): Remove bufp_r and numcharsp args. + Add hold_quit arg. Rework to use just one, local, inev + input_event. Store inev directly in fifo using + kbd_buffer_store_event_hold. Update count in one place. + Postpone call to gen_help_event until inev is stored; use new + local do_help for this. + Remove local emacs_event in handing of ButtonPress event; just use + inev instead (so no reason to copy it later). + + * xsmfns.c (x_session_check_input): Remove numchars arg. + + * xterm.c (x_focus_changed, x_detect_focus_change): + Remove numchars arg. Always store event into bufp arg. + Return nothing. Callers changed accordingly. + (glyph_rect): Simplify. + (STORE_KEYSYM_FOR_DEBUG): New macro. + (SET_SAVED_MENU_EVENT): Use inev instead of bufp, etc. + (current_bufp, current_numcharsp) [USE_GTK]: Remove. + (current_hold_quit) [USE_GTK]: Add. + (event_handler_gdk): Adapt to new handle_one_xevent. + (handle_one_xevent): Remove bufp_r and numcharsp args. + Add hold_quit arg. Rework to use just one, local, inev + input_event. Store inev directly in fifo using + kbd_buffer_store_event_hold. Update count in one place. + Postpone call to gen_help_event until inev is stored; use new + local do_help for this. + Simplify handling of keysyms (consolidate common code). Fix bug + where count was updated with nchars instead of nbytes. + Remove local emacs_event in handing of ButtonPress event; just use + inev instead (so no reason to copy it later). + Remove `out' label. Rename label `ret' to `done'; add various + `goto done' to clarify code flow in deeply nested blocks. + (x_dispatch_event): Simplify as handle_one_xevent now calls + kbd_buffer_store_event itself. + (XTread_socket): Remove bufp_r and numcharsp args. Add hold_quit + arg. Call handle_one_xevent with new arglist. Store event from + x_session_check_input in fifo. + [USE_GTK]: Setup current_hold_quit. + Decrement handling_signal before unblocking input. + (x_initialize) [USE_GTK]: Initialize current_count. + + * xterm.h (x_session_check_input): Fix prototype. + +2004-02-26 YAMAMOTO Mitsuharu + + * s/darwin.h (LD_SWITCH_SYSTEM_TEMACS): Add `-framework QuickTime'. + + * dispextern.h [MAC_OSX]: Do not include Carbon/Carbon.h (now in + macgui.h). + + * emacs.c (main) [HAVE_CARBON]: Call init_xfns. + + * macgui.h [MAC_OSX]: Include Carbon/Carbon.h. + (mktime, DEBUG, Z, free, malloc, realloc, max, min) + (init_process) [MAC_OSX] : Avoid conflicts with Carbon/Carbon.h. + [!MAC_OSX]: Include QDOffscreen.h and Controls.h. + (INFINITY) [MAC_OSX]: Avoid conflict with definition in math.h. + (Bitmap): Remove typedef. + (Pixmap): Change int to GWorldPtr. + + * macmenu.c [MAC_OSX]: Don't include Carbon/Carbon.h (now in macgui.h). + + * macterm.h [MAC_OSX]: Don't include Carbon/Carbon.h (now in macgui.h). + (RED16_FROM_ULONG, GREEN16_FROM_ULONG, BLUE16_FROM_ULONG): + New #define to extract 16-bit depth color components from unsigned + long representation. + (PIX_MASK_DRAW, PIX_MASK_RETAIN): New #define to represent pixel + colors used for masks. + (struct mac_display_info): Add color_p. Remove n_cbits. + + * macfns.c: Include sys/types.h and sys/stat.h. + [MAC_OSX]: Do not include Carbon/Carbon.h (now in macgui.h). + Include QuickTime/QuickTime.h. + (XCreatePixmap, XCreatePixmapFromBitmapData, XFreePixmap) + (XSetForeground, mac_draw_line_to_pixmap): Add externs for + functions defined in macterm.c. + (XImagePtr): New typedef. Corresponds to XImage * in xfns.c. + (ZPixmap): New #define for compatibility with xfns.c. + (XGetImage, XPutPixel, XGetPixel, XDestroyImage) + (x_create_x_image_and_pixmap, x_destroy_x_image, x_put_x_image) + (find_image_fsspec, image_load_qt_1, image_load_quicktime): + New functions. + (four_corners_best, x_create_x_image_and_pixmap) + (x_destroy_x_image, unwind_create_frame, x_disable_image) + (x_edge_detection, init_color_table, colors_in_color_table) + (lookup_rgb_color, lookup_pixel_color, postprocess_image) + (x_put_x_image, slurp_file, xbm_scan, xbm_load, xbm_load_image) + (xbm_image_p, xbm_read_bitmap_data, xbm_file_p, x_to_xcolors) + (x_from_xcolors, x_detect_edges): New declarations (from xfns.c). + (mac_color_map_lookup, x_to_mac_color): Fix Lisp_Object/unsigned + long mixup. + (mac_defined_color, x_to_x_colors): Use RED16_FROM_ULONG etc. + (x_decode_color): Don't use n_cbits (in struct mac_display_info). + (x_set_foreground_color, x_set_cursor_color): Sync with w32fns.c. + (x_set_cursor_type, Fxw_color_values, valid_image_p) + (image_value_type, parse_image_spec, image_ascent, x_clear_image) + (x_alloc_image_color, clear_image_cache, lookup_image) + (x_find_image_file, xbm_read_bitmap_file_data) + (enum xbm_keyword_index, xbm_format, xbm_image_p, xbm_scan) + (xbm_read_bitmap_data, xbm_load, pbm_image_p, pbm_scan_number) + (enum pbm_keyword_index, pbm_format, enum png_keyword_index) + (png_format, png_image_p, enum jpeg_keyword_index, jpeg_format) + (jpeg_image_p, enum tiff_keyword_index, tiff_format, tiff_image_p) + (enum gif_keyword_index, gif_format, gif_image_p): Sync with xfns.c. + (x_make_gc): Sync with xfns.c. Enclose unused `border_tile' with + #if 0. + (x_free_gcs): Sync with xfns.c. Enclose unused `border_tile' with + #if 0. Free white_relief.gc and black_relief.gc. + (unwind_create_frame, x_emboss, x_laplace, x_edge_detection): + New functions (from xfns.c). + (Fx_create_frame): Record unwind_create_frame. + (Fxw_display_color_p): Use dpyinfo->color_p. + (Fx_display_grayscale_p, Fx_display_planes): Don't use + dpyinfo->n_cbits. + (Fx_display_color_cells): Use dpyinfo->n_planes; + (QCmatrix, QCcolor_adjustment, QCmask, Qemboss, Qedge_detection) + (Qheuristic, cross_disabled_images, emboss_matrix) + (laplace_matrix): New variables (from xfns.c). + (Fimage_size, Fimage_mask_p, four_corners_best, image_background) + (x_clear_image_1, postprocess_image, slurp_file, xbm_load_image) + (xbm_file_p, x_to_xcolors, x_from_xcolors, x_detect_edges) + (image_background_transparent): New function (from xfns.c). + Use PIX_MASK_DRAW/PIX_MASK_RETAIN. + (image_load_quicktime): Add declaration. + [MAC_OSX] (image_load_quartz2d): Likewise. + [MAC_OSX] (CGImageCreateWithPNGDataProviderProcType): New typedef. + [MAC_OSX] (MyCGImageCreateWithPNGDataProvider): New variable. + [MAC_OSX] (init_image_func_pointer, image_load_quartz2d): New funs. + (xbm_load_image_from_file, x_laplace_read_row) + (x_laplace_write_row, pbm_read_file): Remove functions. + [HAVE_XPM] (enum xpm_keyword_index, xpm_format, xpm_image_p) + (xpm_load): Sync with xfns.c (although XPM is not supported yet). + (colors_in_color_table): Sync with xfns.c (although not used). + (lookup_rgb_color): Don't lookup color table. Just do gamma + correction. + (COLOR_INTENSITY): New #define (from xfns.c). + (x_disable_image): New function (from xfns.c). + Use PIX_MASK_DRAW/PIX_MASK_RETAIN. + (x_build_heuristic_mask): Sync with xfns.c. + Use PIX_MASK_DRAW/PIX_MASK_RETAIN. + (HAVE_PBM): Remove #ifdef. + (pbm_load): Sync with xfns.c. Set img->width and img->height + before IMAGE_BACKGROUND. + (png_image_p, png_load): Don't enclose declarations with #if HAVE_PNG. + (Qpng, enum png_keyword_index, png_format, png_type, png_image_p): + Don't enclose with #if HAVE_PNG. + [!HAVE_PNG] (png_load) [MAC_OSX]: Use image_load_quartz2d if a + symbol _CGImageCreateWithPNGDataProvider is defined. + Otherwise use image_load_quicktime. + [!HAVE_PNG] (png_load) [!MAC_OSX]: Use image_load_quicktime. + [HAVE_PNG] (png_load): Sync with xfns.c. + Use PIX_MASK_DRAW/PIX_MASK_RETAIN. + (jpeg_image_p, jpeg_load): Don't enclose declarations with #if + HAVE_JPEG. + (Qjpeg, enum jpeg_keyword_index, jpeg_format, jpeg_type) + (jpeg_image_p): Don't enclose with #if HAVE_JPEG. + [!HAVE_JPEG] (jpeg_load) [MAC_OSX]: Use image_load_quartz2d. + [!HAVE_JPEG] (jpeg_load) [!MAC_OSX]: Use image_load_quicktime. + [HAVE_JPEG] (jpeg_load): Sync with xfns.c. + (tiff_image_p, tiff_load): Don't enclose declarations with #if + HAVE_TIFF. + (Qtiff, enum tiff_keyword_index, tiff_format, tiff_type) + (tiff_image_p): Don't enclose with #if HAVE_TIFF. + [!HAVE_TIFF] (tiff_load): Use image_load_quicktime. + [HAVE_TIFF] (tiff_error_handler, tiff_warning_handler): + New functions (from xfns.c). + [HAVE_TIFF] (tiff_load): Sync with xfns.c. + (gif_image_p, gif_load): Don't enclose declarations with #if HAVE_GIF. + (Qgif, enum gif_keyword_index, gif_format, gif_type, gif_image_p): + Don't enclose with #if HAVE_GIF. + [!HAVE_GIF] (gif_load): Use Quicktime Movie Toolbox if it is + animated gif. Otherwise use image_load_quicktime. + [HAVE_GIF] (gif_lib.h): Temporarily define DrawText as + gif_DrawText to avoid conflict with QuickdrawText.h. + [HAVE_GIF] (gif_load): Sync with xfns.c. + (enum gs_keyword_index, gs_format, gs_image_p, gs_load) + [HAVE_GHOSTSCRIPT] (x_kill_gs_process): Sync with xfns.c (although + Ghostscript is not supported yet). + (syms_of_macfns): Initialize Qemboss, Qedge_detection, Qheuristic, + QCmatrix, QCcolor_adjustment, and QCmask. Add DEFVAR_BOOL + cross_disabled_images (from xfns.c). Remove #if 0 for supported + image types. Remove #if HAVE_JPEG, HAVE_TIFF, HAVE_GIF, and + HAVE_PNG. Add defsubr for Simage_size and Simage_mask_p. + (init_xfns): Remove #if HAVE_JPEG, HAVE_TIFF, HAVE_GIF, and + HAVE_PNG. Call EnterMovies to support animated gifs. + Call init_image_func_pointer to bind a symbol + _CGImageCreateWithPNGDataProvider if it is defined. + + * macterm.c [MAC_OSX]: Don't include Carbon/Carbon.h (now in macgui.h). + (x_draw_bar_cursor): Sync declaration with xterm.c. + (XFreePixmap, mac_draw_rectangle_to_pixmap, mac_copy_area) + (mac_copy_area_to_pixmap): Implementation with GWorld (offscreen + graphics). + (mac_set_forecolor, mac_set_backcolor): Use RED16_FROM_ULONG etc. + (mac_draw_line_to_pixmap, XCreatePixmap) + (XCreatePixmapFromBitmapData, mac_fill_rectangle_to_pixmap) + (mac_copy_area_with_mask, mac_copy_area_with_mask_to_pixmap): + New functions. + (mac_draw_bitmap) [TARGET_API_MAC_CARBON]: + Use GetPortBitMapForCopyBits instead of the cast to Bitmap *. + Cast bits to char *. + (reflect_byte): New function (from w32fns.c). + (mac_create_bitmap_from_bitmap_data): Use it and don't stuff bits + due to byte alignment. + (mac_scroll_area) [TARGET_API_MAC_CARBON]: + Use GetPortBitMapForCopyBits instead of the cast to Bitmap *. + (XSetForeground): Remove static (now used in macfns.c). + (HIGHLIGHT_COLOR_DARK_BOOST_LIMIT): New #define (from w32term.c). + (mac_alloc_lighter_color, x_destroy_window): Sync with w32term.c. + (x_setup_relief_color, x_setup_relief_colors, x_draw_box_rect) + (x_draw_glyph_string_box, x_draw_image_foreground) + (x_draw_image_foreground_1, x_draw_image_glyph_string) + (x_draw_stretch_glyph_string, x_draw_glyph_string) + (x_draw_hollow_cursor, x_draw_bar_cursor, mac_draw_window_cursor): + Sync with xterm.c. + (x_draw_relief_rect): Sync with xterm.c. Make 1 pixel shorter + than the xterm.c version when a strictly horizontal or vertical + line is drawn. + (XTset_terminal_window): Add static. + (x_make_frame_visible): Add UNBLOCK_INPUT. + (x_free_frame_resources): New funcion (from xterm.c). + (XTread_socket): Call handle_tool_bar_click if mouse up/down event + occurs in tool bar area. + (mac_initialize_display_info): Remove dpyinfo->n_cbits. + Set dpyinfo->color_p. Determine dpyinfo->n_planes using HasDepth. + Initialize image cache. + (stricmp, wildstrieq, mac_font_pattern_match, mac_font_match): + Enclose unused functions with #if 0. + (Qbig5, Qcn_gb, Qsjis, Qeuc_kr): New variables. + (decode_mac_font_name): New function to apply code conversions + from a mac font name to an XLFD font name according to its script code. + (x_font_name_to_mac_font_name): Apply code conversion from an XLFD + font name to a mac font name according to REGISTRY and ENCODING fields. + (init_font_name_table) [TARGET_API_MAC_CARBON]: Don't use a font + whose name starts with `.'. + (init_font_name_table): Use decode_mac_font_name. Add both + jisx0208.1983-sjis and jisx0201.1976-0 entries if the script code + of a font is smJapanese. + (mac_do_list_fonts): New function to list fonts that match a given + pattern. + (x_list_fonts, XLoadQueryFont): Use it. + (XLoadQueryFont): Set rbearing field for each variable width + character to avoid needless redraw. + (syms_of_macterm): Initialize Qbig5, Qcn_gb, Qsjis, and Qeuc_kr. + +2004-02-26 Kim F. Storm + + * keyboard.c (NREAD_INPUT_EVENTS): Temporarily increase to 512 + as read_socket_hook handler on X aborts if buffer is too small + and W32 handler doesn't always check buffer limit. + + * xdisp.c (handle_single_display_prop): Handle left-fringe and + right-fringe similar to a display margin image. Specifically, + the characters having the fringe prop are no longer shown, and + we use IT_IMAGE/next_element_from_image with image_id = -1 to + do this. Set fringe bitmap face_id in it->face_id. + (produce_image_glyph): Handle image_id < 0 as "no image" case, but + still realize it->face (i.e. the fringe bitmap face). + +2004-02-25 Miles Bader + + * xdisp.c (check_it): Check string/string_pos consistency. + (init_iterator): Initialize string-related fields properly. + +2004-02-11 Miles Bader + + * xdisp.c (produce_image_glyph): Force negative descents to zero. + +2004-02-10 Miles Bader + + * xfns.c (lookup_image): Remove xassert(!interrupt_input_blocked); + BLOCK_INPUT can be nested, so it doesn't make much sense. + +2004-02-24 Michael Mauger + + * w32fns.c (slurp_file, xbm_scan, xbm_load_image) + (xbm_read_bitmap_data): Use unsigned char for image data. + +2004-02-23 Luc Teirlinck + + * abbrev.c (Finsert_abbrev_table_description): Doc fix. + +2004-02-22 Jason Rumney + + * w32term.c (w32_draw_fringe_bitmap): Draw overlaid bitmaps + correctly over other bitmaps. + +2004-02-21 Eli Zaretskii + + * emacs.c (USAGE1): Split into two halves. + (USAGE2): Second half of the old USAGE1. + (USAGE3): Rename from USAGE2. + (USAGE4): Rename from USAGE3. + +2004-02-21 Juri Linkov + + * emacs.c (USAGE1): Add --no-desktop. Move --display from USAGE2. + Fix --multibyte. Move --help, --version to USAGE2. Add alias + --file. Fix -f, -l. Sort options. Untabify. + (USAGE2): Add -hb. Fix --name, --title. Sort options. Untabify. + +2004-02-19 Luc Teirlinck + + * category.c (Fdefine_category, Fcategory_docstring) + (Fget_unused_category, Fset_category_table) + (Fcategory_set_mnemonics): Doc fixes. + +2004-02-20 Kim F. Storm + + * keyboard.c: Undo 2004-02-16 and 2004-02-17 changes. + The following changes are relative to the 2004-01-21 revision. + (NREAD_INPUT_EVENTS): Define as max number of input events to read + in one call to read_socket_hook. Value is 8. + (read_avail_input): Separate and rework handling of read_socket_hook + and non-read_socket_hook cases. Use smaller input_event buffer + in read_socket_hook case, and repeat if full buffer is read. + Use new local variable 'discard' to skip input after C-g. + In non-read_socket_hook case, just use a single input_event, and + call kbd_buffer_store_event on the fly for each character. + +2004-02-19 Stefan Monnier + + * lisp.h (union Lisp_Object): Give a more precise type for `type'. + Remove unused `gu' alternative. + +2004-02-19 Andreas Schwab + + * fringe.c (Fdefine_fringe_bitmap): Use && instead of & to avoid + warning. + +2004-02-18 Kim F. Storm + + * xdisp.c (get_window_cursor_type, display_and_set_cursor): + Fix last change. + +2004-02-17 Kim F. Storm + + * xdisp.c (fast_find_position): Fix return value of new version; + it was inverted compared to the 21.1 version. + (get_window_cursor_type): Don't look at glyph if NULL. + (display_and_set_cursor): Set glyph to NULL if cursor in fringe. + + * keyboard.c: Rework previous change; it didn't consider that the + buf array was allocated on the stack. + (prev_read): Remove variable. + (read_avail_input_buf): New static event buffer array. + (in_read_avail_input): New static variable to handle re-entrancy. + (read_avail_input): Change buf to pinter to read_avail_input_buf. + Use in_read_avail_input to handle re-entrance; when re-entered, + fully initialize and use tmp_buf array instead of read_avail_input_buf. + Do not initialize read_avail_input_buf in full here; instead assume it + is always cleared on entry. To ensure that, we clear (just) the + entries that were used before we return. + (init_keyboard): Initialize read_avail_input_buf here. + +2004-02-16 Jesper Harder (tiny change) + + * cmds.c (Fend_of_line): Doc fix. + +2004-02-16 Dmitry Antipov (tiny change) + + * keyboard.c (prev_read): New static variable. + (read_avail_input): Use it to zero out only those slots in buf[] + that were used last time we were called. + +2004-02-16 Eli Zaretskii + + * Makefile.in (obj): Move fringe.o from here... + (XOBJ, MAC_OBJ): ...to here. + +2004-02-16 Stephen Eglen + + * fringe.c (init_fringe_bitmap): Define j in MAC_OS code. + +2004-02-15 Stefan Monnier + + * data.c (Fbyteorder): + * fringe.c (Fdefine_fringe_bitmap): + * xdisp.c (handle_single_display_prop): + * xselect.c (x_handle_dnd_message): Lisp_Object/int mixup. + +2004-02-16 Jason Rumney + + * w32term.c (w32_draw_fringe_bitmap): Handle overlay fringe bitmaps. + +2004-02-15 Steven Tamm + + * macterm.c (Vmac_emulate_three_button_mouse): New variable for + controlling emulation of a three button mouse with option and + command keys. + (Qreverse, mac_get_enumlated_btn): Handle the emulation + (mac_event_to_emacs_modifiers, XTread_socket): Ditto. + +2004-02-15 Kim F. Storm + + * buffer.c (syms_of_buffer): Doc fix for indicate-buffer-boundaries. + + * fringe.c (init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: + Perform byte-swapping. + +2004-02-14 Kim F. Storm + + * dispextern.h (struct draw_fringe_bitmap_params): Change member + bits from char to short to facilitate wider bitmaps. + (struct redisplay_interface): Fix prototype of define_fringe_bitmap + member. + + * fringe.c (struct fringe_bitmap): Change member bits from char to + short to facilitate 16 bits wide bitmaps. Modify all standard + bitmaps accordingly. + (BYTES_PER_BITMAP_ROW, STANDARD_BITMAP_HEIGHT): New macros. + (FRBITS): Use STANDARD_BITMAP_HEIGHT instead of just sizeof. + (draw_fringe_bitmap): Ditto. + (init_fringe_bitmap) [MAC_OS]: Don't bitswap. + (init_fringe_bitmap) [HAVE_X_WINDOWS]: Enhance bitswapping to + handle up to 16 bits wide bitmaps. + (Fdefine_fringe_bitmap): Doc fix. Handle wider bitmaps. + (Ffringe_bitmaps_at_pos): Add missing arg declarations. + + * macterm.c (mac_draw_bitmap): Handle 16 bits wide bitmaps directly. + (x_draw_fringe_bitmap): Use enhanced mac_draw_bitmap, so we no longer + need to call mac_create_bitmap_from_bitmap_data and mac_free_bitmap. + + * w32term.c (w32_define_fringe_bitmap): Bitmaps are now 16 bits wide, + so it is no longer necessary to expand them here. + + * xterm.c (x_draw_fringe_bitmap): Handle wider bitmaps (max 16 bits). + +2004-02-12 Kim F. Storm + + * window.c (Fwindow_fringes): Doc fix. + +2004-02-10 Jan Dj,Ad(Brv + + * xselect.c (x_get_foreign_selection): Add new optional parameter + time_stamp. + (Fx_get_selection_internal): Ditto, pass time_stamp to + x_get_foreign_selection. + + * data.c (Fbyteorder): New function. + +2004-02-09 Jan Dj,Ad(Brv + + * atimer.c: Move include stdio.h to same place as in other files. + + * region-cache.c: Ditto. + + * sysdep.c: Ditto. + + * xfaces.c: Ditto. + +2004-02-09 Sam Steingold + + * w32term.c (w32_draw_fringe_bitmap): Fixed a typo in the last patch. + +2004-02-09 Kim F. Storm + + * fringe.c: New file. Move original fringe related declarations + and code from dispextern.h and xdisp.c here. + Rework code to support user defined fringe bitmaps, redefining + standard bitmaps, ability to overlay user defined bitmap with + overlay arrow bitmap, and add faces to bitmaps. + (Voverflow_newline_into_fringe): Declare here. + (enum fringe_bitmap_align): New enum. + (..._bits): All bitmaps are now defined without bitswapping; that + is now done in init_fringe_once (if necessary). + (standard_bitmaps): New array with specifications for the + standard fringe bitmaps. + (fringe_faces): New array. + (valid_fringe_bitmap_id_p): New function. + (draw_fringe_bitmap_1): Rename from draw_fringe_bitmap. + (draw_fringe_bitmap): New function which draws fringe bitmap, + possibly overlaying bitmap with cursor in right fringe or the + overlay arrow in the left fringe. + (update_window_fringes): Do not handle overlay arrow here. + Compare and copy fringe bitmap faces. + (init_fringe_bitmap): New function. + (Fdefine_fringe_bitmap, Fdestroy_fringe_bitmap): New DEFUNs to + define and destroy user defined fringe bitmaps. + (Fset_fringe_bitmap_face): New DEFUN to set face for a fringe bitmap. + (Ffringe_bitmaps_at_pos): New DEFUN to read current fringe bitmaps. + (syms_of_fringe): New function. Defsubr new DEFUNs. + DEFVAR_LISP Voverflow_newline_into_fringe. + (init_fringe_once, init_fringe): New functions. + (w32_init_fringe, w32_reset_fringes) [WINDOWS_NT]: New functions. + + * Makefile.in (obj): Add fringe.o. + (fringe.o): New dependencies. + + * dispextern.h (FRINGE_ID_BITS): New definition for number of + bits allocated to hold a fringe number. Increase number of bits + from 4 to 8 to allow user defined fringe bitmaps. + (struct glyph_row, struct it): New members left_user_fringe_bitmap, + left_user_fringe_face_id, right_user_fringe_bitmap, + right_user_fringe_face_id. + (enum fringe_bitmap_type, struct fringe_bitmap, fringe_bitmaps): + Move to new file fringe.c. + (MAX_FRINGE_BITMAPS): Define here. + (struct draw_fringe_bitmap_params): New members bits, cursor_p, + and overlay_p. Change member which to int. + (struct redisplay_interface): New members define_fringe_bitmap + and destroy_fringe_bitmap. + (valid_fringe_bitmap_id_p): Add prototype. + (w32_init_fringe, w32_reset_fringes) [WINDOWS_NT]: Add prototypes. + + * dispnew.c (row_equal_p): Compare fringe bitmap faces and overlay + arrows. + (update_frame): Do flush_display if force_flush_display_p to + ensure display (specifically fringes) are updated in a timely + manner when resizing the frame by dragging the mouse. + (update_window_line): Update row if overlay arrow changed. + (scrolling_window): Redraw fringe bitmaps if fringe bitmap faces + or overlay arrow changed. + + * emacs.c (main) [HAVE_WINDOW_SYSTEM]: Call init_fringe_once, + syms_of_fringe, and init_fringe. + + * frame.h (struct frame): New member force_flush_display_p. + + * lisp.h (syms_of_fringe, init_fringe, init_fringe_once): + Add prototypes. + + * macterm.c (mac_draw_bitmap): Add overlay_p arg. + (x_draw_fringe_bitmap): Handle overlayed fringe bitmaps; + thanks to YAMAMOTO Mitsuharu for advice on how to do this. + Use cursor color for displaying cursor in fringe. + (x_redisplay_interface): Add null handlers for + define_fringe_bitmap and destroy_fringe_bitmap functions. + + * w32term.c (w32_draw_fringe_bitmap): Copy unadapted code from + xterm.c to handle overlayed fringe bitmaps and to use cursor color + for displaying cursor in fringe. + (w32_define_fringe_bitmap, w32_destroy_fringe_bitmap): New W32 + specific functions to define and destroy fringe bitmaps in fringe_bmp. + (w32_redisplay_interface): Add them to redisplay_interface. + (w32_term_init): Call w32_init_fringe instead of explicitly + defining fringe bitmaps in fringe_bmp array. + (x_delete_display): Call w32_reset_fringes instead of explicitly + destroying fringe bitmaps in fringe_bmp array. + + * xdisp.c (Voverflow_newline_into_fringe, syms_of_xdisp) + (left_bits, right_bits, up_arrow_bits, down_arrow_bits) + (continued_bits, continuation_bits, ov_bits, first_line_bits) + (last_line_bits, filled_box_cursor_bits, hollow_box_cursor_bits) + (bar_cursor_bits, hbar_cursor_bits, zv_bits, hollow_square_bits) + (fringe_bitmaps, draw_fringe_bitmap, draw_row_fringe_bitmaps) + (draw_window_fringes, compute_fringe_widths, update_window_fringes): + Move fringe handling vars and code to new file fringe.c. + (handle_display_prop): Handle left-fringe and right-fringe + display properties; store user fringe bitmaps in iterator. + (move_it_in_display_line_to): Handle cursor in fringe at eob. + (clear_garbaged_frames): Set force_flush_display_p if resized. + (redisplay_window): Redraw fringe bitmaps if not just_this_one_p. + (display_line): Handle cursor in fringe at eob. + (display_line): Set row user fringe bitmaps from iterator. + + * xterm.c (x_draw_fringe_bitmap): Handle overlayed fringe bitmaps. + Use cursor color for displaying cursor in fringe. + (x_redisplay_interface): Add null handlers for + define_fringe_bitmap and destroy_fringe_bitmap functions. + +2004-02-07 Jan Dj,Ad(Brv + + * macfns.c (Fx_change_window_property): Make doc string and + parameters same as for X version. + + * w32fns.c (Fx_change_window_property): Ditto. + +2004-02-07 Kim F. Storm + + * xdisp.c (hscroll_window_tree): Position cursor near to right + margin in hscrolled window when jumping to end of line (rather + than centering cursor). + + * process.c (wait_reading_process_input): Don't do adaptive read + buffering if waiting for a specific process. + +2004-02-05 Luc Teirlinck + + * minibuf.c (Fminibufferp, Fread_from_minibuffer) + (Fread_minibuffer, Feval_minibuffer) + (Fread_string, Fread_no_blanks_input) + (Fcompleting_read): Doc fixes. + (syms_of_minibuf): Doc fixes for minibuffer-completion-table and + completion-regexp-list. Define Qcase_fold_search and staticpro it. + (read_minibuf): Fix initial comment. + (Ftry_completion, Fall_completions, Ftest_completion): Bind + case-fold-serach to the value of completion-ignore-case when + checking completion-regexp-list. + (Fdisplay_completion_list): Make it handle arguments that are + symbols. Doc fix. + +2004-02-05 Jan Dj,Ad(Brv + + * xterm.h: Add declaration of free_frame_menubar. + + * xfns.c (x_create_bitmap_mask): Removed unused variable depth. + (x_set_menu_bar_lines): Added ! defined USE_GTK for olines. + (Fx_change_window_property): Add declaration of parameters type and + format. Remove unused variable cons. + + * xselect.c: Include stdio,h. + +2004-02-05 Kenichi Handa + + * fns.c (Fset_char_table_range): Fix previous change. + + * buffer.c (Fset_buffer_multibyte): Fix docstring. + +2004-02-04 Luc Teirlinck + + * editfns.c (Fchar_after, Fchar_before): Doc fixes. + +2004-02-04 Stefan Monnier + + * keymap.c (Vmouse_events): Rename from Vmenu_events. + (syms_of_keymap): Add mouse-[45], header-line, and mode-line to it. + +2004-02-04 Kenichi Handa + + * fns.c (Fset_char_table_range): Handle charsets ascii, + eight-bit-control, and eight-bit-graphic correctly. + +2004-02-03 Jason Rumney + + * w32select.c (Fw32_set_clipboard_data): Make coding iso2022 safe. + + * w32fns.c (x_to_w32_font): Likewise. + +2004-02-03 Jan Dj,Ad(Brv + + * xterm.h: Add x_handle_dnd_message, x_check_property_data, + x_fill_property_data, x_property_data_to_lisp and check_x_display_info. + + * xterm.c (handle_one_xevent): Call x_handle_dnd_message for + ClientMessages. + + * xselect.c: Include termhooks.h and X11/Xproto.h + (x_check_property_data, x_fill_property_data) + (x_property_data_to_lisp, mouse_position_for_drop) + (Fx_get_atom_name, x_handle_dnd_message): New functions for DND support. + (Fx_send_client_event): Move here from xfns.c. + (syms_of_xselect): Add Sx_get_atom_name and Sx_send_client_message. + + * xfns.c (x-send-client-message): Move to xselect.c + (Fx_change_window_property): Add optional arguments TYPE, FORMAT and + OUTER_P. + (Fx_window_property): Add optional arguments TYPE, SOURCE, DELETE_P, + VECTOR_RET_P. Handle AnyPropertyType. Call x_property_data_to_lisp + if vector_ret_p is true. + (syms_of_xfns): Sx_send_client_message moved to xselect.c. + +2004-02-02 Eli Zaretskii + + * fileio.c (Fcopy_file): If NEWNAME is a directory, expand the + basename of FILE relative to it, not FILE itself. + +2004-02-02 Kenichi Handa + + * coding.c (coding_restore_composition): Check invalid + composition data more rigidly. + +2004-01-30 Luc Teirlinck + + * fileio.c (Fread_file_name_internal): Correctly handle the case + where insert-default-directory is nil. + (Fread_file_name): Always return an empty string if the user exits + with an empty minibuffer. Adapt the docstring accordingly. + (syms_of_fileio): Adapt the docstring of insert-default-directory + to the change in Fread_file_name. + +2004-01-29 Eli Zaretskii + + * alloca.c [!alloca]: Fix the prototype for xfree. + +2004-01-29 Kenichi Handa + + * fns.c (string_char_to_byte): Optimize for ASCII only string. + (string_byte_to_char): Likewise. + +2004-01-28 Peter Runestig + + * makefile.w32-in, w32fns.c: Add `default-printer-name' function. + +2004-01-27 Steven Tamm + + * unexmacosx.c (unexec_copy): Do not copy more than was + requested to prevent overwriting during unexec. + +2004-01-27 Jan Dj,Ad(Brv + + * process.c (sigchld_handler): Add comment about not calling malloc. + + * process.h: Add extern to synch_process_termsig. + +2004-01-27 Steven Tamm + + * macterm.c (make_mac_frame, make_mac_terminal_frame): + Move setting of scroll bars from make_mac_frame to + make_mac_terminal_frame to prevent clobbering of scroll-bar-mode. + +2004-01-26 Richard M. Stallman + + * search.c (Freplace_match): Handle nonexistent + back-references properly. + +2004-01-03 Richard M. Stallman + + * window.c (decode_any_window): New function. + (Fwindow_height, Fwindow_width, Fwindow_edges) + (Fwindow_pixel_edges, Fwindow_inside_edges) + (Fwindow_inside_pixel_edges): Use decode_any_window. + +2004-01-27 Jan Dj,Ad(Brv + + * process.h: synch_process_termsig new variable. + + * callproc.c: Define synch_process_termsig. + (Fcall_process): Initiate synch_process_termsig to zero and + check if non-zero and get signal name after subprocess has ended. + + * process.c (sigchld_handler): Set synch_process_termsig + if terminated by a signal. synch_process_death setting removed. + + * sysdep.c (mkdir, rmdir): Also check synch_process_termsig. + +2004-01-26 Andreas Schwab + + * print.c (print_preprocess): Declare size as EMACS_INT to not + lose bits. + (print_object): Likewise. + * alloc.c (Fpurecopy): Likewise. + +2004-01-25 Luc Teirlinck + + * window.c (Fwindow_minibuffer_p): Doc fix. + +2004-01-24 Jonathan Yavner + + * editfns.c (Fformat): Make both passes accept the same set of flags. + +2004-01-23 Kenichi Handa + + * fns.c (Fmd5): If OBJECT is a buffer different from the current + one, set buffer to OBJECT temporarily. + +2004-01-21 Stefan Monnier + + * keyboard.c (kbd_buffer_gcpro): Remove. + (kbd_buffer_store_event, clear_event, Fdiscard_input) + (stuff_buffered_input, init_keyboard, syms_of_keyboard): + Don't initialize and/or maintain the variable any more. It was made + redundant by my commit of 2003-06-15. + + * lisp.h [USE_LSB_TAG && !DECL_ALIGN]: Signal an error. + +2004-01-21 Jan Dj,Ad(Brv + + * lisp.h: Add undef DECL_ALIGN. + +2004-01-21 Stefan Monnier + + * process.c (wait_reading_process_input) [SYNC_INPUT]: + Check interrupt_input_pending explicitly. + + * lisp.h (QUIT) [SYNC_INPUT]: Check interrupt_input_pending as well. + + * keyboard.c (handle_async_input): New fun, + extracted from input_available_signal. + (input_available_signal, reinvoke_input_signal): Use it. + +2004-01-20 Stefan Monnier + + * buffer.c (buffer_defaults, buffer_local_symbols): Use DECL_ALIGN. + + * lisp.h [USE_LSB_TAG]: Add definitions for Lisp_Object value + manipulation macros for when tags are in the lower bits. + (struct Lisp_Free) [USE_LSB_TAG]: Add padding. + (DECL_ALIGN): New macro. + (DEFUN): Use it. + + * lisp.h [ENABLE_CHECKING]: Don't force union type. + + * s/darwin.h (__attribute__): Remove outdated workaround. + + * macterm.c (main) [USE_LSB_TAG]: Don't range check the ram. + + * alloc.c (lisp_malloc, lisp_align_malloc) [USE_LSB_TAG]: + Don't check range of malloc address. + (pure_alloc) [USE_LSB_TAG]: Enforce alignment. + + * process.c (wait_reading_process_input): Lisp_Object/int mixup. + + * dired.c (Ffile_attributes): Lisp_Object/int mixup. + +2004-01-19 Kenichi Handa + + * fontset.c (fontset_font_pattern): Fix previous change. + +2004-01-16 Miles Bader + + * xdisp.c (Voverflow_newline_into_fringe) + (move_it_in_display_line_to, redisplay_internal) + (update_window_fringes, redisplay_window, display_line, window): + Add `#ifdef HAVE_WINDOW_SYSTEM' around fringe-drawing stuff, so + that it compiles without a window-system. + * dispnew.c (direct_output_for_insert, update_window): Likewise. + +2004-01-16 Kim F. Storm + + * buffer.h (struct buffer): New member indicate_buffer_boundaries. + + * buffer.c (init_buffer_once): Set buffer_defaults and + buffer_local_flags for indicate_buffer_boundaries. + (syms_of_buffer): Defvar_per_buffer it, and defvar_lisp_nopro + default- variable for it. + + * dispextern.h (struct glyph_row): New members left_fringe_bitmap, + right_fringe_bitmap, redraw_fringe_bitmaps_p for new fringe handling. + New members exact_window_width_line_p and cursor_in_fringe_p for + overflowing newlines into right fringe. + New members indicate_bob_p, indicate_top_line_p, indicate_eob_p, + and indicate_bottom_line_p for buffer boundaries and scrolling. + (enum fringe_bitmap_type): Add UP_ARROW_BITMAP, DOWN_ARROW_BITMAP, + FIRST_LINE_BITMAP, LAST_LINE_BITMAP, FILLED_BOX_CURSOR_BITMAP, + HOLLOW_BOX_CURSOR_BITMAP, BAR_CURSOR_BITMAP, HBAR_CURSOR_BITMAP, + and HOLLOW_SQUARE_BITMAP. + (draw_fringe_bitmap, draw_window_fringes, update_window_fringes): + Add prototypes. + + * dispnew.c (row_equal_p, update_window_line): Compare fringe bitmaps + instead of related indicator fields. + Compare exact_window_width_line_p and cursor_in_mouse_face_p indicators. + (direct_output_for_insert): Handle exact width lines like + contined lines. Call update_window_fringes. + (update_window): Call update_window_fringes. + (scrolling_window): Don't skip desired rows with changed bitmaps. + Check if fringe bitmaps changes when assigning scrolled rows. + + * xdisp.c (Voverflow_newline_into_fringe): New variable. + (IT_OVERFLOW_NEWLINE_INTO_FRINGE): New macro. + (move_it_in_display_line_to): Overflow newline into fringe for + rows that are exactly as wide as the window. + (up_arrow_bits, down_arrow_bits, first_line_bits, last_line_bits) + (filled_box_cursor_bits, hollow_box_cursor_bits, bar_cursor_bits) + (hbar_cursor_bits, hollow_square_bits): New fringe bitmaps. + (fringe_bitmaps): Add new bitmaps. + (draw_fringe_bitmap): Make extern. Remove WHICH arg. + Select proper bitmap for cursor in fringe when appropriate. + Handle alignment of bitmap to top or bottom of row. + (draw_row_fringe_bitmaps): Don't select bitmaps here; that is now + done by update_window_fringes. + (update_window_fringes, draw_window_fringes): New functions. + (redisplay_internal): Call update_window_fringes in case only + cursor row is updated. + (redisplay_window): Call update_window_fringes. + Explicitly call draw_window_fringes if redisplay was done using + the current matrix or the overlay arrow is in the window. + (try_window_reusing_current_matrix): Mark scrolled rows for + fringe update (to update buffer-boundaries / scrolling icons). + (find_last_unchanged_at_beg_row): Handle exact width lines line + continued lines. + (display_line): Overflow newline into fringe for rows that are + exactly as wide as the window. Don't append space for newline + in this case. + (notice_overwritten_cursor): Explicitly clear cursor bitmap + in fringe as if it had been overwritten. + (erase_phys_cursor): Erase cursor bitmap in fringe. + (syms_of_xdisp): Mark show-trailing-whitespace and + void-text-area-pointer as user options. + DEFVAR_LISP Voverflow_newline_into_fringe. Enable by default. + + * xterm.c (x_update_window_end): Call draw_window_fringes. + (x_after_update_window_line): Just set redraw_fringe_bitmaps_p + in row instead of actually drawing fringe bitmaps. + (x_draw_fringe_bitmap): Handle bottom aligned bitmaps. + (x_draw_window_cursor): Draw cursor in fringe. + + * w32term.c (x_update_window_end): Call draw_window_fringes. + (x_after_update_window_line): Just set redraw_fringe_bitmaps_p + in row instead of actually drawing fringe bitmaps. + (w32_draw_fringe_bitmap): Handle bottom aligned bitmaps. + (w32_draw_window_cursor): Draw cursor in fringe. + + * macterm.c (x_update_window_end): Call draw_window_fringes. + (x_after_update_window_line): Just set redraw_fringe_bitmaps_p + in row instead of actually drawing fringe bitmaps. + (x_draw_fringe_bitmap): Handle bottom aligned bitmaps. + (mac_draw_window_cursor): Draw cursor in fringe. + +2004-01-16 Jan Dj,Ad(Brv + + * xterm.c (handle_one_xevent): Don't handle characters that are part + of an old style (XLookupString) compose sequence. + +2004-01-15 Kenichi Handa + + * search.c (Freplace_match): Use make_multibyte_string or + make_unibyte_string according to the buffer multibyteness. + +2004-01-14 Stefan Monnier + + * alloc.c (struct interval_block, struct string_block) + (struct symbol_block, struct marker_block, live_string_p) + (live_cons_p, live_symbol_p, live_float_p, live_misc_p): + Better preserve alignment for objects in blocks. + (FLOAT_BLOCK_SIZE): Adjust for possible alignment padding. + + * lread.c (defvar_per_buffer): Remove dead declaration. + + * macterm.c (do_check_ram_size): Don't hardcode the lisp address + space size. + +2004-01-12 Jan Dj,Ad(Brv + + * xmenu.c (popup_get_selection): Check new parameter down_on_keypress + if a key press should pop down. Only pop down if a key is pressed + outside the menu/dialog. + (create_and_show_popup_menu): Pass 0 for down_on_keypress to + popup_get_selection. + (create_and_show_dialog): Pass 1 for down_on_keypress to + popup_get_selection. + +2004-01-11 Jan Dj,Ad(Brv + + * alloc.c (allocate_vectorlike): Surround calls to mallopt with + BLOCK/UNBLOCK_INPUT. + +2004-01-08 Jan Dj,Ad(Brv + + * xmenu.c (Fx_popup_dialog): Add an Ok button if no buttons are + specified. + +2004-01-08 Kenichi Handa + + * editfns.c (Fformat): Fix '&' to '&&'. + +2004-01-08 Andreas Schwab + + * print.c (print_preprocess) : Only mask + size if PSEUDOVECTOR_FLAG is set. + +2004-01-07 Kenichi Handa + + * charset.c (Fdeclare_equiv_charset): Fix docstring. + + * fontset.c (fontset_ref_via_base): Fix previous change. + +2004-01-07 Kim F. Storm + + * process.c (read_process_output): Only activate adaptive + buffering if we read less than 256 bytes at a time. + +2004-01-06 Kim F. Storm + + * dispnew.c (buffer_posn_from_coords): Return both buffer/string + object and image object. Return glyph width and height. + (mode_line_string, marginal_area_string): Ditto. + + * dispextern.h (buffer_posn_from_coords, mode_line_string) + (marginal_area_string): Fix prototypes. + + * keyboard.h (POSN_POSN, POSN_SET_POSN): Rename macros from + POSN_BUFFER_POSN and POSN_SET_BUFFER_POSN. All uses changed. + (POSN_INBUFFER_P, POSN_BUFFER_POSN): New macros. + + * keyboard.c (make_lispy_position): Use modified mode_line_string, + buffer_posn_from_coords, and marginal_area_string functions to + include both string object and image object in the lispy position. + Also add actual glyph width and height to position. + (read_key_sequence): Use real buffer position from mouse + event to find keymap property even when click is in marginal area. + + * xdisp.c (note_mode_line_or_margin_highlight): Use modified + mode_line_string and marginal_area_string functions to handle + both string object and image object properties. + +2004-01-06 Andreas Schwab + + * syntax.c (skip_chars): Treat '-' at end of string as ordinary + character. + +2004-01-02 Andreas Schwab + + * macterm.c (emacs_options, x_initialized, same_x_server): + Remove unused (and duplicated) definitions. + +2004-01-02 Kim F. Storm + + * process.h (struct Lisp_Process): New members for adaptive read + buffering: adaptive_read_buffering, read_output_delay, and + read_output_skip. + + * process.c (ADAPTIVE_READ_BUFFERING): New conditional. + (READ_OUTPUT_DELAY_INCREMENT, READ_OUTPUT_DELAY_MAX) + (READ_OUTPUT_DELAY_MAX_MAX): New constants. + (process_output_delay_count, process_output_skip): New vars. + (Vprocess_adaptive_read_buffering): New variable. + (make_process): Initialize adaptive read buffering members. + (Fstart_process): Set adaptive_read_buffering member. + (deactivate_process): Cleanup adaptive read buffering. + (wait_reading_process_input): Temporarily omit delayed + subprocesses from the set of file descriptors to read from; + adjust the select timeout if we skipped any subprocesses. + (read_process_output): Increase adaptive read buffering delay if + we read less than a full buffer; reduce delay when we read a + full buffer. + (send_process): Simplify using local Lisp_Process var. + Reset adaptive read buffering delay after write. + (init_process): Initialize process_output_delay_count and + process_output_skip. + (syms_of_process): DEFVAR_LISP Vprocess_adaptive_read_buffering. + +2004-01-01 Jason Rumney + + * w32term.c (w32_text_out): Use s->font, for consistency with callers. + +2003-12-30 Luc Teirlinck + + * print.c (Ferror_message_string): Add hyperlink in the docstring + to the definition of `signal' in the Elisp manual. + * eval.c (Fsignal): Ditto. + +2003-12-29 James Clark (tiny change) + + * fns.c (internal_equal): Return t for two NaN arguments. + +2003-12-29 Richard M. Stallman + + * data.c (store_symval_forwarding): Handle setting + default-fill-column, etc., by changing the value in + buffers that use the default. + + * minibuf.c (Fset_minibuffer_window): Doc fix. + + * fileio.c (choose_write_coding_system): Ignore auto_saving + if using the visited file for auto saves. + (Fwrite_region): Don't update SAVE_MODIFF + if auto-saving in visited file. + +2003-12-29 Kenichi Handa + + * dispextern.h (face_font_available_p): Extern it. + + * fontset.c (Voverriding_fontspec_alist): New variable. + (lookup_overriding_fontspec): New function. + (fontset_ref_via_base): Call lookup_overriding_fontspec if necessary. + (fontset_font_pattern): Likewise. + (regulalize_fontname): New function. + (Fset_fontset_font): Call regulalize_fontname. + (Fset_overriding_fontspec_internal): New function. + (syms_of_fontset): Initialize and staticpro Voverriding_fontspec_alist. + Defsubr Sset_overriding_fontspec_internal. + + * xfaces.c (face_font_available_p): New function. + +2003-12-28 Richard M. Stallman + + * buffer.c (Fother_buffer): Don't crash if BUF is nil + or if its name is nil. + + * buffer.c (Fkill_buffer): Don't delete auto-save file + if it's the same as the visited file. + +2003-12-28 Luc Teirlinck + + * coding.c (Fcheck_coding_system): Doc fix. + +2003-12-28 Kim F. Storm + + * Makefile.in (eval.o): Depend on dispextern.h. + + * dispnew.c (buffer_posn_from_coords): Fix calculation of dy for + image glyph using image's ascent. + (mode_line_string): Return image glyph as object clicked on. + Adjust y0 for image glyph using image's ascent. + + * dispextern.h (FACE_ID_BITS, MAX_FACE_ID): New defines. + (struct glyph): New members, ascent and descent. Used to save + this glyph's ascent and descent, instead of having. + (struct glyph): Declare member face_id using FACE_ID_BITS. + (find_hot_spot): Add prototype. + + * keyboard.c (Qimage): Remove extern (now in lisp.h). + (QCmap): Declare extern. + (make_lispy_position): When position is inside image hot-spot, + use hot-spot element's id as posn element. + + * lisp.h (IMAGEP): New macro to test for image object type. + (Qimage): Declare extern. + + * macfns.c (Qimage): Remove extern (now in lisp.h). + (valid_image_p, parse_image_spec): Use IMAGEP macro. + + * macterm.c (Qface, Qmouse_face): Remove unused externs. + + * w32fns.c (Qimage): Remove extern (now in lisp.h). + (valid_image_p, parse_image_spec): Use IMAGEP macro. + + * w32menu.c (Qmouse_click, Qevent_kind): Remove unused externs. + + * w32term.c (Qface, Qmouse_face): Remove unused externs. + + * xdisp.c (Qarrow, Qhand, Qtext, Qpointer): New variables for + pointer types. + (Qrelative_width, Qalign_to): Remove unused variables. + (Vvoid_text_area_pointer): Replace Vshow_text_cursor_in_void. + (QCmap, QCpointer, Qrect, Qcircle, Qpoly): New variables for + image maps. + (x_y_to_hpos_vpos): Return glyph relative coordinates through + new dx and dy args. + Remove buffer_only_p arg (always 0). Simplify code accordingly. + (get_glyph_string_clip_rect): Draw cursor using glyph's rather + than row's ascent and height, to get sensible height on tall rows. + (build_desired_tool_bar_string): Remove Qimage extern. + (get_tool_bar_item): Fix call to x_y_to_hpos_vpos. + (produce_image_glyph): Adjust it.ascent to minimum row ascent if + image glyph is alone on the last line. + (append_glyph, append_composite_glyph, produce_image_glyph) + (append_stretch_glyph): Set glyph's ascent and descent. + (on_hot_spot_p): New function to check if position is inside an + rectangular, circular, or polygon-shaped image hot-spot, + (find_hot_spot): New function to search for image hot-spot. + (Flookup_image_map): New defun to search for image hot-spot. + (define_frame_cursor1): New aux function to determine frame pointer. + (note_mode_line_or_margin_highlight, note_mouse_highlight): + Handle `pointer' text property and :pointer image property to + control frame pointer shape. Detect image hot-spots for pointer + and help_echo properties. Use define_frame_cursor1. + (note_mouse_highlight): Use Vvoid_text_area_pointer. + (syms_of_xdisp): Defsubr new defun. Intern and staticpro new variables. + DEFVAR_LISP Vvoid_text_area_pointer instead of Vshow_text_cursor_in_void. + + * xfaces.c (cache_face): Abort if c->size exceeds MAX_FACE_ID. + + * xfns.c (x_set_mouse_color): Remove bogus x_check_errors call. + (Qimage): Remove extern (now in lisp.h). + (valid_image_p, parse_image_spec): Use IMAGEP macro. + + * xmenu.c (show_help_event): Remove unused code. + + * xterm.c (Qface, Qmouse_face): Remove unused externs. + (x_draw_hollow_cursor): Draw cursor using glyph's rather than + row's ascent and descent, to get a sensible height on tall rows. + +2003-12-25 Luc Teirlinck + + * minibuf.c (Fcompleting_read): Undo previous change. + +2003-12-25 Lars Hansen + + * dired.c (Fdirectory_files, Fdirectory_files_and_attributes): + Arguments GCPRO'ed in call to file name handler. + +2003-12-25 Thien-Thi Nguyen + + * termcap.c (tgetst1): Scan for "%pN"; if all + N are continuous in [1,9], remove all "%pN". + +2003-12-24 Jan Dj,Ad(Brv + + * gtkutil.c (xg_frame_set_char_size): Call x_wm_set_size_hint. + + * xfaces.c (lface_fully_specified_p): Take into account that + MAC OS always have unspecified stipple. + +2003-12-24 Thien-Thi Nguyen + + * tparam.c (tparam1): Add handling for `%pN', which + means use param N for the next substitution. + +2003-12-24 Thien-Thi Nguyen + + * xfaces.c (Fcolor_gray_p): Fix omission bug: + In case `frame' is nil, consult the selected frame. + (Fcolor_supported_p): Likewise. + +2003-12-23 Luc Teirlinck + + * fns.c (Frandom, Fstring_make_multibyte, Fset_char_table_range): + Doc fixes. + + * minibuf.c (read_minibuf): Allow INITIAL to be a cons of a string + and an integer. Adapt the introductory comment accordingly. + (Fread_from_minibuffer): Delete code moved into read_minibuf. + Doc fix. + (Fread_minibuffer, Fread_no_blanks_input): Adapt to changes in + read_minibuf. + (Fcompleting_read): Delete code moved into read_minibuf. + (Ftest_completion): Make it handle obarrays and hash tables correctly. + +2003-12-03 Kenichi Handa + + * coding.c (decode_coding_iso2022): Fix for preserving UTF-8 + encoding sequence. + +2003-12-01 Kenichi Handa + + * composite.c (syms_of_composite): Don't make the compostion hash + table week. + +2003-11-30 Luc Teirlinck + + * intervals.h: Add EXFUN for Fget_char_property_and_overlay. + * textprop.c (Fget_char_property_and_overlay): New function. + (syms_of_textprop): Defsubr it. + +2003-11-29 Jan Dj,Ad(Brv + + * dispnew.c (buffer_posn_from_coords): Add ifdef HAVE_WINDOW_SYSTEM + to compile on terminal configuration. + + * fileio.c (Fread_file_name): Check use_file_dialog also before + calling Fx_file_dialog. + + * fns.c: use_file_dialog: New variable. + (syms_of_fns): DEFVAR_BOOL use-file-dialog. + +2003-11-29 Kim F. Storm + + * msdos.c (Qcursor_type, Qbar, Qhbar): Declare extern. + (syms_of_msdos): Don't intern and staticpro them. + +2003-11-27 Kim F. Storm + + * dispnew.c (buffer_posn_from_coords): Calculate and return pixel + coordinates relative to glyph at posn. If glyph is an image, + return that as object at posn. Callers changed. + (mode_line_string, marginal_area_string): Calculate and return + pixel coordinates relative to glyph. Callers changed. + + * dispextern.h (buffer_posn_from_coords, mode_line_string) + (marginal_area_string): Fix prototypes. + (window_box_left_offset, window_box_right_offset): Add prototypes. + + * frame.h (get_specified_cursor_type, get_window_cursor_type): + Remove prototypes. + + * keyboard.h (EVENT_CLICK_COUNT, POSN_SCROLLBAR_PART): Fix defines. + + * keyboard.c (make_lispy_position): Add x and y coordinates + relative to the current glyph as 7th element of position. + If glyph is an image, return it in the object element. + (read_key_sequence): Skip checks for keymap property in cases + where POSN_STRING is not a string (e.g. an image). + + * xdisp.c (Vdisplay_pixels_per_inch): New variable. + (Vshow_text_cursor_in_void): New variable. + (glyph_to_pixel_coords): Don't use negative hpos. + (x_y_to_hpos_vpos): Fix for partially visible first glyph. + (append_stretch_glyph): Change ascent arg to be actual value + in pixels rather than ratio to height. Callers changed. + (calc_pixel_width_or_height): New aux function, implementing + pixel based artihmetic for glyph widths and heights. + (produce_stretch_glyph): Use calc_pixel_width_or_height for + :width, :height, :align-to, and :ascent, thus allowing these to + be specified in pixels as well as multiples of characters. + Don't produce stretch glyphs with zero width or height. + (get_specified_cursor_type): Declare static. + (get_window_cursor_type): Declare static. Add glyph arg to be + able to know when cursor is on an image; always substitute + hollow-box cursor for filled-box cursor on images, to avoid + negative images and flicker when blinking the cursor. + (display_and_set_cursor): Pass glyph to get_window_cursor_type. + (note_mode_line_or_margin_highlight): Use non-text cursor rather + than vertical scroll-bar cursor in display margins. + (note_mouse_highlight): Use non-text cursor rather than text + cursor in fringes and over images in the text area. + Use non-text cursor when mouse pointer is outside editable text, + i.e. in the void after end-of-line or end-of-buffer; this was + already done for W32, but is now standard for all systems -- + user can toggle show-text-cursor-in-void to get old behaviour. + (syms_of_xdisp): DEFVAR_LISP Vshow_text_cursor_in_void and + Vdisplay_pixels_per_inch. + +2003-11-25 Andreas Schwab + + * fns.c (internal_equal) : Declare size as + EMACS_INT to not lose bits. + (Ffillarray): Don't set bits beyond the size of a bool vector. + +2003-11-25 Kim F. Storm + + * print.c (Fredirect_debugging_output) [!GNU_LINUX]: Do not + define this defun on systems that cannot use stderr as lvalue. + +2003-11-24 Gerd Moellmann + + * s/freebsd.h (LD_SWITCH_SYSTEM_TEMACS) + [__FreeBSD_version >= 500042]: Define as -znocombreloc because + ld's default is incompatible with unexec. + +2003-11-23 Kim F. Storm + + * window.c (enum window_loop): Add REDISPLAY_BUFFER_WINDOWS. + (window_loop): Handle REDISPLAY_BUFFER_WINDOWS. + (Fforce_window_update): New defun. + (syms_of_window): Defsubr it. + (Fset_window_margins, Fset_window_fringes): Doc fix. + + * print.c (Fredirect_debugging_output): New defun. + (syms_of_print): Defsubr it. + +2003-11-22 Luc Teirlinck + + * fns.c (Fset_char_table_parent): Doc fix. + +2003-11-22 Kim F. Storm + + * dispnew.c (buffer_posn_from_coords): Return actual row/column + for glyph clicked on, rather than (unused) pixel positions. + (mode_line_string, marginal_area_string): Change X and Y args to + pointers for returning actual row/column for glyph clicked on. + Simplify and optimize loops. + + * dispextern.h (mode_line_string, marginal_area_string): + Update prototypes. + + * keyboard.c (make_lispy_position): New function for generating + mouse click positions from frame and pixel coordinates. + Enhanced to return buffer position and actual row/column for + events outside the text area using updated mode_line_string and + marginal_area_string functions. + Return left-fringe and right-fringe clicks as such, rather than + clicks in text area. + (make_lispy_event) [USE_X_TOOLKIT, USE_GTK]: Don't call + pixel_to_glyph_coords, as we never use the results. + (make_lispy_event): Use make_lispy_position for MOUSE_CLICK_EVENT, + WHEEL_EVENT, and DRAG_N_DROP_EVENT to replace redundant code. + Eliminate unused code in WHEEL_EVENT handling. + (make_lispy_movement): Use make_lispy_position. + + * window.c (coordinates_in_window): Remove redundant tests. + Fix returned X pixel value for left-margin. + + * xdisp.c (note_mode_line_or_margin_highlight): Adapt to new + mode_line_string and marginal_area_string parameters. + +2003-11-22 Lars Hansen + + * w32.c (struct the_group, getgrgid): Add. + * mac.c (struct my_group, getgrgid): Add. + +2003-11-21 Luc Teirlinck + + * fns.c (Fassq, Fassoc, Frassq, Frassoc): Doc fixes. + +2003-11-21 Lars Hansen + + * dired.c (Ffile_attributes): Add parameter ID-FORMAT and + include in call to file name handler. Optionally translate numeric + UID and GID to strings. Update docstring. + (directory_files_internal): Add parameter ID-FORMAT. + (Fdirectory_files_and_attributes): Add parameter ID-FORMAT and + include in call to file name handler and call to + directory_files_internal. Update Docstring. + (Fdirectory_files): Add dummy parameter in call to + directory_files_internal. + * lisp.h (Qinteger): Add. + (Qinteger_or_floatp, Qinteger_or_float_or_marker_p): Remove. + (Ffile_attributes): Add parameter. + * data.c (Qinteger): Export. + +2003-11-21 Luc Teirlinck + + * fns.c (Freverse, Fnreverse): Doc fixes. + +2003-11-19 Kim F. Storm + + * xdisp.c (init_iterator): Initialize it->start to position + before reseating (in case start position is invisible). + (init_to_row_start): Set it->start to row-start. + (redisplay_window): Accept optional_new_start if start position + is invisible (in which case IT_CHARPOS overshoots PT). + (display_line): Setup row->start from it->start (rather than + it->current which is wrong if first char on line is invisible). + When done, reseat it->start to it->current (= start of next row). + (expose_area): Fix exposure of text area when first char (e.g. TAB) + is only partially visible. + + * dispextern.h (struct it): New member start. + +2003-11-17 Stefan Monnier + + * alloc.c (make_float, Fcons): Clear the markbit at init time. + (make_float, Fcons, Fmake_symbol, allocate_misc): Move the increment + of block_index outside of the macro call. + (Fgarbage_collect): Remove null code. + + * m/amdx86-64.h: Don't redefine XPNTR. + + * keyboard.c (parse_modifiers, apply_modifiers): Use INTMASK instead + of VALMASK. + + * fns.c (hashfn_eq, hashfn_eql, hashfn_equal, hash_put) + (sxhash_string, sxhash): Use INTMASK instead of VALMASK. + (maybe_resize_hash_table): Use MOST_POSITIVE_FIXNUM. + + * lisp.h (VALMASK): Only define for non-union type. + (MARKBIT): Remove. + (ARRAY_MARK_FLAG): Use previous value of MARKBIT. + (XTYPE): Define unconditionally. + (XSETTYPE): Remove one more remnant. + (EQ): Define differently for the union and non-union cases. + (INTMASK): New bit mask. + (struct Lisp_Marker): Move down to prepare for upcoming patch. + (GC_EQ): Delegate to EQ. + + * coding.c (coding_restore_composition): Lisp_Object/int mixup. + +2003-11-17 Jan Dj,Ad(Brv + + * xterm.c (x_window_to_scroll_bar): Move check of display to + where window_id is compared. + +2003-11-17 Kim F. Storm + + * dispextern.h (struct it): New member first_vpos. + + * xdisp.c (start_display): Set it->first_vpos. + (try_window_id): Use first_vpos to start display in first _text_ + line if no reusable lines at start of window with header line. + +2003-11-16 Jan Dj,Ad(Brv + + * w32fns.c (XPutPixel): + * w32bdf.c (w32_init_bdf_font): + * sunfns.c (sel_read): + * process.c (Fmake_network_process): + * frame.c (store_frame_param): + * fontset.c (Fset_fontset_font): + * emacs.c (shut_down_emacs): + * ccl.c (ccl_driver): Remove period at end of error message. + + * config.in: Regenerate. + + * xfns.c (x_window_to_frame, x_any_window_to_frame) + (x_non_menubar_window_to_frame, x_menubar_window_to_frame) + (x_top_window_to_frame): Add Display* argument to xg_win_to_widget. + (x_create_bitmap_mask, xg_set_icon, create_frame_xic) + (xic_set_statusarea, x_window, gif_load): Formatting adjustments. + + * xterm.h (struct x_display_info): New field xg_cursor for GTK. + + * xterm.c: Add Display * to x_window_to_scroll_bar declaration. + (XTmouse_position, handle_one_xevent): Pass Display* to + x_window_to_scroll_bar. + (x_window_to_scroll_bar): Take a Display* argument. + Check that display for frame is equal to Display* argument. + (event_handler_gdk): Remove current_dpyinfo. Get dpyinfo from + x_display_info_for_display instead. Use Display in xev instead + of GDK_DISPLAY. + (x_dispatch_event): Call x_display_info_for_display. + (XTread_socket): Move GTK part out of loop. current_dpyinfo removed. + (x_connection_closed): Call xg_display_close for GTK. + (x_term_init): Call xg_display_open for additional displays. + Initiate dpyinfo->xg_cursor with call to xg_create_default_cursor + for GTK. + + * xmenu.c (single_menu_item, mouse_position_for_popup) + (x_activate_menubar): Formatting adjustments. + + * xdisp.c (update_tool_bar, redisplay_tool_bar): Formatting + adjustments. + + * gtkutil.c (xg_get_gdk_display, xg_set_screen, xg_display_open) + (xg_display_close, xg_create_default_cursor) + (xg_get_gdk_pixmap_and_mask): New functions for multiple display + handling. + (xg_left_ptr_cursor): Remove. + (xg_set_cursor): Change cursor to GdkCursor*. Do not create + cursor here. + (xg_win_to_widget): Take Display* argument, call + gdk_xid_table_lookup_for_display. + (xg_create_frame_widgets, xg_get_file_name, create_menus) + (xg_create_widget, xg_modify_menubar_widgets): Call xg_set_screen. + (xg_create_widget, xg_create_scroll_bar): Use xg_cursor + in FRAME_X_DISPLAY_INFO. + (xg_get_scroll_id_for_window): Take Display* argument. + (update_frame_tool_bar): Call xg_get_gdk_pixmap_and_mask. + (xg_initialize): Remove xg_left_ptr_cursor. + + * gtkutil.h: xg_get_scroll_id_for_window, xg_win_to_widget takes + Display* argument also. Declare xg_display_open, + xg_display_close, xg_create_default_cursor. + +2003-11-14 Jan Dj,Ad(Brv + + * xterm.c (x_detect_focus_change): Do not change focus frame for + Enter/LeaveNotify if the current focus frame has explicit focus. + +2003-11-14 Kim F. Storm + + * dispnew.c (update_text_area): Fix redisplay error when hscroll + is active and first glyph is only partially visible. + +2003-11-13 Kenichi Handa + + * xdisp.c (select_frame_for_redisplay): New function. + (redisplay_internal): Record also selected_frame for + unwind_redisplay. Call select_frame_for_redisplay before + redrawing each frame. + (unwind_redisplay): Argument changed to a cons. + +2003-11-12 Luc Teirlinck + + * fns.c (Fstring_to_multibyte): Doc fix. + +2003-11-11 Kenichi Handa + + * xterm.c (x_list_fonts): Fix excluding of auto-scaled fonts. + +2003-11-09 Jan Dj,Ad(Brv + + * xfns.c (x_window): Set XtNx and XtNy in shell widget for + program specified positions. + +2003-11-08 Jan Dj,Ad(Brv + + * xterm.c (XAW_ARROW_SCROLLBARS): Define it for Xaw 1.5E. + +2003-11-08 Kenichi Handa + + * Makefile.in (lisp): Add kannada.el. + (shortlisp): Likewise. + +2003-11-07 Kenichi Handa + + * coding.c (coding_allocate_composition_data): + Reset coding->composing to COMPOSITION_NO. + (coding_restore_composition): Detect invalid composition data. + Give Fstring and Fvector a Lispy integer, not C int. + +2003-11-05 Stefan Monnier + + * floatfns.c (Flogb): Don't use VALMASK. + + * m/amdx86-64.h (VALBITS, XINT, XUINT): Remove. + * m/ia64.h (VALBITS, XINT, XUINT): Remove. + + * lisp.h (XINT): Move the cast to clarify what is going on. + (GCTYPEMASK, XSETTYPE): Remove. + (XGCTYPE): Make it an alias of XTYPE. + +2003-11-03 Jan Dj,Ad(Brv + + * xterm.c (x_term_init): Fix formatting. + +2003-11-02 Jan Dj,Ad(Brv + + * gtkutil.h: Declare xg_have_tear_offs, remove xg_keep_popup + and xg_did_tearoff. + + * gtkutil.c: Remove variable xg_did_tearoff. + (xg_have_tear_offs): New function. + (tearoff_remove): Just decrease xg_detached_menus. + (tearoff_activate): Increase xg_detached_menus and call + tearoff_remove when tearoff is removed. + (xg_keep_popup): Remove function. + (create_menus): Give add_tearoff_p as argument to recursive + call to create_menus. + (xg_create_widget): Use variables instead of multiple + strcmp. Tell create_menus to create tear off only for + menu bar menus. + (xg_update_menubar): Change title for a detached menu also. + (xg_modify_menubar_widgets): Always call xg_update_menubar, regardless + of deep_p. + (xg_initialize): Initialize xg_detached_menus, remove + initialization of xg_did_tearoff. + + * xmenu.c (set_frame_menubar): For GTK, set deep_p if + xg_have_tear_offs returns non-zero. + (create_and_show_popup_menu): Remove setting of xg_did_tearoff and + call to xg_keep_popup. + +2003-11-01 Andrew Choi + + * macterm.c (XTread_socket): Handle menubar selection and grow + window only for mouseDown events. + +2003-10-31 Jan Dj,Ad(Brv + + * xterm.c (x_term_init): For GTK part, increase x_initialized + to check for more than one display. Use error instead of return 0. + +2003-10-31 Andrew Choi + + * unexmacosx.c (unrelocate): New function (contributed by Nozomu Ando). + (copy_dysymtab): Call it. + +2003-10-31 Luc Teirlinck + + * eval.c (Fdefvaralias): Doc fix. + +2003-10-26 Luc Teirlinck + + * data.c (Fsetplist): Doc fix. + +2003-10-14 Lute Kamstra + + * window.c (Fset_window_fringes): Clarify docstring. + +2003-10-14 Kim F. Storm + + * window.c (Fset_window_margins): Simplify arg checking. + +2003-10-13 Richard M. Stallman + + * regex.c (MAX_BUF_SIZE): Reduce to 2**15. + (print_partial_compiled_pattern): Replace assert with a printout. + (skip_noops, mutually_exclusive_p): Change args, values to re_char *. + + * alloc.c (lisp_align_malloc): If BASE is 0, call memory_full. + + * window.c (Fset_window_margins): Allow only integers as args. + (syms_of_window) : + Doc fixes. + +2003-10-13 Lute Kamstra + + * window.c (Fset_window_fringes): Elaborate docstring. + +2003-10-12 Andrew Choi + + * macterm.c (XTread_socket): Call DragWindow only for mouseDown events. + + * s/darwin.h (GC_MARK_STACK): Define. + +2003-10-12 Jan Dj,Ad(Brv + + * window.c (shrink_windows): New function. + (size_window): Call shrink_windows to calculate window sizes when + shrinking frame with more than one window. + +2003-10-12 Kim F. Storm + + * xdisp.c (compute_fringe_widths): Doc fix. + +2003-10-08 Kenichi Handa + + * coding.c (Fcoding_system_p): Return t for auto-loading coding system. + +2003-10-07 Kenichi Handa + + * coding.c (Qcoding_system_define_form): New variable. + (syms_of_coding): Intern and staticpro it. + (Fcheck_coding_system): Try to autoload the definition of + CODING-SYSTEM. + +2003-10-05 Luc Teirlinck + + * fns.c (Frequire): Doc fix. + +2003-10-05 Jan Dj,Ad(Brv + + * xfns.c (Fx_send_client_event): New function as a base for + manipulating extended window manager hints. + (Fx_send_client_event): Remove unused variable s. + + * w32term.c (w32_read_socket): Remove call to x_check_fullscreen_move, + that function is removed. + + * xterm.c (x_set_offset): Use move_offset_left/top instead of + x/y_pixels_outer_diff. + (x_check_expected_move): Calculate move_offset_left/top. + + * xterm.h (struct x_output): New members: move_offset_top/left. + + * frame.c (x_set_frame_parameters): Remove x_fullscreen_move, + call x_set_offset directly. + + * frame.h (enum): FULLSCREEN_MOVE_WAIT removed. + + * frame.c (Fdelete_frame): Free decode_mode_spec_buffer. + + * xterm.c (x_delete_display): Free font names and font_encoder + in dpyinfo->font_table. + + * xfns.c (Fx_close_connection): Only call XFreeFont here. + Move xfree of font names to x_delete_display. + + * xterm.h (struct x_display_info): New member, wm_type. + (struct x_output): New members, expected_top/left and + check_expected_move. + + * xterm.c (handle_one_xevent): Reset wm_type when ReparentNotify + is received. + (handle_one_xevent): Rename x_check_expected_move from + x_check_fullscreen_move. + (x_set_offset): Only add WM decoration sizes to modified_top/left + for X_WMTYPE_A. Set check_expected_move when WM type is unknown. + (x_check_expected_move): Rename from x_check_fullscreen_move. + Removed fullscreen specific code. Use check_expected_move, + expected_left/top instead. Also, set wm_type. + (x_term_init): Initialize wm_type to unknown. + + * frame.c (x_fullscreen_move): Remove addition of WM decoration + sizes to move_x/y. + +2003-10-03 Kenichi Handa + + * macterm.c (x_load_font): Clear all members of FONTP before start + filling them. + +2003-10-02 Kenichi Handa + + * fontset.c (fs_load_font): Don't set fontp->font_encoder to NULL + before calling find_ccl_program_func. Call find_ccl_program_func + only when fontp->font_encoder is not NULL. + + * xterm.c (x_load_font): Clear all members of FONTP before start + filling them. + +2003-10-03 John Paul Wallington + + * keymap.c (map_keymap): Don't abort when binding is a vector. + +2003-10-02 Jason Rumney + + * makefile.w32-in (emacs.o, coding.o, bytecode.o): + Sync dependencies with Makefile.in. + (alloca.o): Remove. + + * w32fns.c (w32_load_system_font): Clear all members of FONTP before + filling them. + + * w32bdf.c (w32_load_bdf_font): Likewise. + +2003-09-30 Richard M. Stallman + + * term.c (set_tty_color_mode): Calculate current_mode_spec + regardless of value of VAL. + + * intervals.c (graft_intervals_into_buffer): + Set BUF_INTERVALS (buffer)->up_obj when appropriate. + Handle over_used when splitting UNDER. + +2003-09-30 YAMAMOTO Mitsuharu + + * regex.c (regex_compile): Free the stack when returning from function. + +2003-09-28 Kenichi Handa + + * fontset.c (Finternal_char_font): Change return value to + cons (FONT-NAME . GLYPH-CODE). + +2003-09-28 Eli Zaretskii + + * term.c (tty_setup_colors): Treat any negative argument as -1. + +2003-09-27 Gaute B Strokkenes (tiny change) + + * process.c (send_process): Delete unused temp_buf. + +2003-09-26 Dave Love + + * xterm.c (x_bitmap_mask): Declare. + +2003-09-25 Dave Love + + * Makefile.in (fns.o): Depend on md5.h. + +2003-09-25 Kim F. Storm + + * window.c (set_window_buffer): Fix redisplay problems when + switching between buffers with different display margin widths. + +2003-09-23 Kim F. Storm + + * process.c (set_socket_option): Fix :bindtodevice option. + (Fset_network_process_option): Update process contact list when + setting option succeeds. + (Fmake_network_process): Doc fix. + +2003-09-23 Dave Love + + * process.c (Fnetwork_interface_info): Use HAVE_STRUCT_IFREQ... macros. + +2003-09-22 Eli Zaretskii + + * term.c (set_tty_color_mode): Use INTEGERP to test whether a + color mode is an integer number (it could be -1). + +2003-09-22 Richard M. Stallman + + * intervals.c (graft_intervals_into_buffer): Correct the main loop + in the case where OVER is longer than UNDER. + +2003-09-22 Masatake YAMATO + + * window.c (Fset_window_scroll_bars): Validate the value of + `vertical_type'. + +2003-09-21 Kim F. Storm + + * frame.c (Vdefault_frame_scroll_bars): New variable. + (x_set_vertical_scroll_bars): Use it instead of hardcoded values. + (syms_of_frame): DEFVAR_LISP it, and initialize according to + window-system default scroll bar position. + + * window.c (Fwindow_scroll_bars): Doc fix. + +2003-09-19 Jan Dj,Ad(Brv + + * xterm.c (x_set_offset): Take window manager decorations into account. + +2003-09-19 Richard M. Stallman + + * atimer.h: Don't include lisp.h. + (P_): Define it here (as well as elsewhere). + + * print.c (Fprin1_to_string): Move the PRINTPREPARE + later, so that PRINTFINISH won't unbind Qinhibit_modification_hooks. + + * data.c (Fvariable_binding_locus): New function. + (syms_of_data): defsubr it. + (Flocal_variable_p): Delete duplicate call to indirect_variable. + +2003-09-18 Dave Love + + * alloc.c (GC_MALLOC_CHECK): Move conditional undef after lisp.h. + + * process.c (Fnetwork_interface_info): Fix type error. + (Fnetwork_interface_list): Doc fix. + (read_process_output, read_process_output): Delete unused var. + +2003-09-17 Kim F. Storm + + * process.c (Fnetwork_interface_list, Fnetwork_interface_info): + Require HAVE_NET_IF_H and HAVE_SYS_IOCTL_H to include these fns. + (Fnetwork_interface_info): Check that ifreq struct has required + fields before accessing them; this requires that those fields are + defined as macros, which may be too restrictive on some platforms, + but it is better than failing on other platforms. + (syms_of_process): Only defsubr above fns when included. + +2003-09-17 Dave Love + + * unexalpha.c: Don't include varargs.h. + +2003-09-17 Kim F. Storm + + * process.c (Fset_process_sentinel): Add sentinel to childp plist + for network process. + (socket_options): Add `:' prefix to option names. Add optbit field. + (set_socket_option): Remove no_error arg and special handling of s < 0. + Return 1< + + * Makefile.in: Depend on coding.h. + +2003-09-14 Kim F. Storm + + * process.c [HAVE_SOCKETS]: Include sys/ioctl.h and net/if.h. + (Fnetwork_interface_list, Fget_network_interface_info): New defuns. + (syms_of_process): Defsubr them. + + * config.in: Regenerate. + +2003-09-12 Stefan Monnier + + * m/sr2k.h (XMARKBIT, XUNMARK): Remove. + * m/news-r6.h (XUNMARK): Remove. + * m/mips.h (XUNMARK): Remove. + * m/mips-siemens.h (XUNMARK): Remove. + * m/iris4d.h (XUNMARK): Remove. + * m/hp800.h (XMARKBIT, XUNMARK): Remove. + +2003-09-11 Stefan Monnier + + * lisp.h (VALBITS): Don't remove 1 for the markbit. + (union Lisp_Object): Use unsigned int for types. Remove markbit. + (MARKBIT): Remove 1 from VALBITS so we still use same old val. + (XTYPE): Use unsigned right-shift. + (XMARKBIT, XMARK, XUNMARK): Remove. + + * alloc.c (init_intervals, init_symbol, init_marker): + Don't preallocate anything. + (Fgarbage_collect, mark_object): Ignore the markbit. + + * bytecode.c (mark_byte_stack, unmark_byte_stack): Ignore the markbit. + +2003-09-08 Lute Kamstra + + * xdisp.c (pint2hrstr): New function. + (decode_mode_spec): Add `%i' and `%I' specs. + * buffer.c (syms_of_buffer): Document `%i' and `%I' constructs + for `mode-line-format'. + +2003-09-07 Andreas Schwab + + * alloc.c: Use long instead of int when casting ABLOCKS_BUSY to + avoid warning. + +2003-09-07 Eli Zaretskii + + * editfns.c (region_limit): Support any non-zero value of BEGINNINGP. + +2003-09-03 Kim F. Storm + + * xdisp.c (get_window_cursor_type): Partially undo 2002-03-01 + change (superseded by 2002-08-30 change); the default blink-off + cursor is now again "no cursor". + +2003-09-01 Jason Rumney + + * makefile.w32-in (alloca.o): Remove. + (coding.o): Depend on intervals.h + (emacs.o, bytecode.o): Depend on window.h + +2003-09-01 Dave Love + + * Makefile.in (alloca.o): Remove commands. + (coding.o): Depend on intervals.h composite.h window.h. + (emacs.o): Depend on window.h keyboard.h keymap.h. + (gtkutil.o): Depend on keyboard.h charset.h coding.h. + (bytecode.o): Depend on window.h. + +2003-08-31 Jason Rumney + + * w32term.c (w32_per_char_metric): Allow cached metrics to be + returned even when font_type is unknown. + + * xdisp.c (init_iterator): Remove old WINDOWSNT conditional. + +2003-08-30 Jan Dj,Ad(Brv + + * xterm.c (x_term_init): Initialize new fields in x_display_info. + + * xterm.h (struct x_display_info): Add red/green/blue_bits and + *_offset. + + * xfns.c (lookup_rgb_color): Use new fields in x_display_info to + calculate pixel value. + +2003-08-29 Gerd Moellmann + + * xdisp.c (redisplay_internal): Fix change of 2003-04-30. + Don't tell redisplay display is accurate when it's actually been + paused for pending input. + +2003-08-29 Richard M. Stallman + + * dispnew.c (adjust_glyph_matrix): Call window_box + whenever W is nonzero. + + * data.c (Fmake_variable_buffer_local, Fmake_local_variable) + (Fkill_local_variable, Fmake_variable_frame_local) + (Flocal_variable_p, Flocal_variable_if_set_p): + Use indirect_variable to trace thru variable aliases. + + * config.in: Updated. + + * callint.c (Fcall_interactively): Save and restore + Vthis_command, Vthis_original_command, real_this_command, + and current_kboard->Vlast_command. + + * abbrev.c (Fexpand_abbrev): Insert before deleting. + +2003-08-29 Gerd Moellmann + + * xfns.c (lookup_rgb_color): Handle TrueColor visuals specially. + +2003-08-28 David Abrahams (tiny change) + + * coding.c (decode_coding_iso2022): Initialize local variable c2. + (decode_coding_sjis_big5): Likewise. + +2003-08-27 Jason Rumney + + * w32.c (sys_pipe): Protect against file descriptor overflow. + + * w32fns.c (syms_of_w32fns): Remove non-existent functions. + + * w32term.c (w32_read_socket): Fix WM_MOUSEWHEEL assignment. + +2003-08-26 Terje Rosten + + * xfns.c (Vgtk_version_string): New variable. + (syms_of_xfns): DEFVAR_LISP it. Provide gtk. + +2003-08-24 Eli Zaretskii + + * term.c (term_init): Remove `const' from buffer_size's declaration. + + * Makefile.in (msdos.o): Depend on intervals.h. + + * msdos.c: Include intervals.h, since STRING_INTERVALS requires that. + +2003-08-21 Jan Dj,Ad(Brv + + * xterm.h (struct x_display_info): New fields: client_leader_window + and Xatom_wm_client_leader. + + * xterm.c (x_initialize): Move call to x_session_initialize to ... + (x_term_init): ... here. Initialize client_leader fields in dpyinfo. + + * xsmfns.c (create_client_leader_window): New function. + (x_session_initialize): Call create_client_leader_window, take + dpyinfo as argument. + + * xfns.c (Fx_create_frame): Set property WM_CLIENT_LEADER. + + * Makefile.in (xsmfns.o): Add more depenedencies. + +2003-08-21 Dave Love + + * m/iris4d.h: Use _MIPS_SZLONG, not _LP64. + +2003-08-21 Kenichi Handa + + * term.c (term_init): Fix previous change; don't rely on the + length of `buffer' if TERMINFO is defined. + +2003-08-20 Dave Love + + * atimer.h: Include lisp.h. + + * lisp.h (EMACS_LISP_H): New. + (popup_activated_flag): Don't declare. + + * alloca.c: Some merging with gnulib. Change logic and doc + concerning (x)malloc/(x)free -- no longer Emacs-specific. + [DO_BLOCK_INPUT]: Don't include lisp.h. + (xmalloc, xfree): Declare. + (malloc): Don't declare. + + * Makefile.in (LWLIB_OPTIONS): Remove (unused). + (alloca.o): Remove obsolete stuff concerning alloca.s. Depend on + atimer.h, blockinput.h. + + * alloc.c (lisp_align_malloc): Change type of `aligned'. + + * alloca.s: Removed. + +2003-08-19 Gerd Moellmann + + * s/freebsd.h [__FreeBSD_version >= 400000]: Define TERMINFO, + use -lncurses. + + * term.c (term_init): Use a buffer of size 4096 for tgetent since + FreeBSD returns something longer than 2044. Abort if the end of + the buffer is overwritten. + +2003-08-19 Miles Bader + + * xterm.c (x_term_init): Correctly use result of Ffile_readable_p. + +2003-08-19 Gerd Moellmann + + * alloc.c (lisp_align_malloc): Check for memory full when + allocating ablocks, which also avoids freeing a pointer into an + ablocks structure. + + * puresize.h (BASE_PURESIZE): Increase to 1100000. + + * buffer.c (Fmove_overlay): Set overlay's next pointer unconditionally. + +2003-08-16 Richard M. Stallman + + * editfns.c (Fencode_time): Doc fix. + +2003-08-16 David Ponce + + * fileio.c (Fwrite_region): Fix conditional expression to issue + the right message. + +2003-08-16 Juri Linkov (tiny change) + + * syntax.c (Fforward_word): Argument changed to optional. + Set default value to 1. + +2003-08-15 Kenichi Handa + + * xfaces.c (better_font_p): Prefer a real scalable font; i.e. not + what autoscaled. + (best_matching_font): Once we find a better scalable font, set + non_scalable_has_exact_height_p to 1. + (try_font_list): Call try_alternative_families to try any family + with the given registry. + +2003-08-09 Andreas Schwab + + * alloc.c (mark_object): Handle Lisp_Misc_Save_Value. + + * print.c (print_string): Fix printing of multibyte string with + nontrivial printcharfun. + 2003-07-31 Jan Dj,Ad(Brv * xfns.c (xg_set_icon): Rewrite to compile with GTK 2.0 and 2.2. @@ -38,8 +2738,7 @@ 2003-07-28 KOBAYASHI Yasuhiro (tiny change) - * xfns.c (xic_set_preeditarea): Add the left fringe width to - spot.x. + * xfns.c (xic_set_preeditarea): Add the left fringe width to spot.x. 2003-07-22 Stefan Monnier @@ -600,7 +3299,7 @@ * gtkutil.c: Include keyboard.h, charset.h, coding.h. (xg_create_frame_widgets): Use ENCODE_UTF_8. - * xterm.c (Qutf_8): Moved to coding.c + * xterm.c (Qutf_8): Move to coding.c * xmenu.c (ENCODE_MENU_STRING): New. (list_of_panes, list_of_items, digest_single_submenu, xmenu_show): @@ -1181,11 +3880,11 @@ (draw_fringe_bitmap): Rework to handle per-window fringes and new fringe vs. display margin position. (hscroll_window_tree): Use window_box_width instead of window_box. - (redisplay_window): Adapt to per-window scroll bars. - (draw_glyphs): Rework to handle per-window fringes and scroll + (redisplay_window): Adapt to per-window scroll bars. + (draw_glyphs): Rework to handle per-window fringes and scroll bars, and new fringe vs. display margin position. Use WINDOW_LEFT_EDGE_X, WINDOW_TOTAL_WIDTH, and window_box_left. - (x_clear_end_of_line): Adapt to per-window fringes and scroll + (x_clear_end_of_line): Adapt to per-window fringes and scroll bars, and new fringe vs. display margin position. Fix bug which increased total width of full_width rows by width of scroll bars although window's total width already includes that. @@ -2252,7 +4951,7 @@ (w32_draw_window_cursor): New W32-specific functions for RIF. (w32_redisplay_interface): Add new members. - * w32gui.h (No_Cursor): Define as 0 for W32. + * w32gui.h (No_Cursor): Define as 0 for W32. (XRectangle): Add X compatible rectangle type. (NativeRectangle): Declare as RECT for W32. (CONVERT_TO_XRECT, CONVERT_FROM_XRECT, STORE_NATIVE_RECT): New macros. @@ -3340,7 +6039,7 @@ * lisp.h: Declare Vx_resource_name extern. - * keyboard.c (kbd_buffer_get_event): Check MENU_BAR_ACTIVATE_EVENT + * keyboard.c (kbd_buffer_get_event): Check MENU_BAR_ACTIVATE_EVENT for USE_GTK. (make_lispy_event): Check MENU_BAR_EVENT for USE_GTK. @@ -3727,12 +6426,12 @@ Its primary purpose at this time is to initialize the global variable track_mouse_event_fn. - * w32fns.c (w32_wnd_proc): Remove initialization of + * w32fns.c (w32_wnd_proc): Remove initialization of track_mouse_event_fn from the handler for the WM_SETFOCUS message. * w32fns.c (syms_of_w32fns): Call globals_of_w32fns. - * w32menu.c (globals_of_w32menu): New function. Used to + * w32menu.c (globals_of_w32menu): New function. Used to initialize those global variables that must always be initialized on startup even when the global variable initialized is non zero. Its primary purpose at this time is to initialize the global @@ -8919,7 +11618,7 @@ 2001-12-03 Pavel Jan,Am(Bk - * xdisp.c (syms_of_xdisp): Make `tool-bar-button-relief` an option. + * xdisp.c (syms_of_xdisp): Make `tool-bar-button-relief' an option. 2001-12-02 Pavel Jan,Am(Bk @@ -10512,3 +13211,5 @@ See ChangeLog.9 for earlier changes. Copyright (C) 2001, 2002 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 5dcc435f-4038-4141-b3bf-5be51cd76bd4 diff --git a/src/ChangeLog.1 b/src/ChangeLog.1 index 3ffbd61f60..94f1039f71 100644 --- a/src/ChangeLog.1 +++ b/src/ChangeLog.1 @@ -3525,3 +3525,5 @@ Copyright (C) 1985, 1986 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 2d2c1086-b0a5-437c-bc58-fb38ce2e0f9b diff --git a/src/ChangeLog.2 b/src/ChangeLog.2 index edbbfd3a7c..430cbc0f9d 100644 --- a/src/ChangeLog.2 +++ b/src/ChangeLog.2 @@ -4774,3 +4774,5 @@ See ChangeLog.1 for earlier changes. Copyright (C) 1986, 1987, 1988 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 3334fc8a-ec24-4601-99fc-4c8adc2b31bb diff --git a/src/ChangeLog.3 b/src/ChangeLog.3 index a93f4ab982..73f8779354 100644 --- a/src/ChangeLog.3 +++ b/src/ChangeLog.3 @@ -16534,3 +16534,5 @@ See ChangeLog.2 for earlier changes. Copyright (C) 1993 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 136a8e5c-4f83-403b-9132-874f1c47f8a9 diff --git a/src/ChangeLog.4 b/src/ChangeLog.4 index 36ec0081a6..b3d40b96b6 100644 --- a/src/ChangeLog.4 +++ b/src/ChangeLog.4 @@ -6906,3 +6906,5 @@ See ChangeLog.3 for earlier changes. Copyright (C) 1993, 1994 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 2e44924a-e45a-4129-ad93-1f7bb410b609 diff --git a/src/ChangeLog.5 b/src/ChangeLog.5 index 1f20b6812f..20fc488708 100644 --- a/src/ChangeLog.5 +++ b/src/ChangeLog.5 @@ -7147,3 +7147,5 @@ See ChangeLog.4 for earlier changes. Copyright (C) 1994, 1995 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: aea244d6-d513-4b51-8dba-5ecdf1aa5875 diff --git a/src/ChangeLog.6 b/src/ChangeLog.6 index 3cf30f682e..52e48cac27 100644 --- a/src/ChangeLog.6 +++ b/src/ChangeLog.6 @@ -5365,3 +5365,5 @@ See ChangeLog.5 for earlier changes. Copyright (C) 1995, 1996 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 66a98e1c-2268-45e8-8a57-286b9c85a4e9 diff --git a/src/ChangeLog.7 b/src/ChangeLog.7 index 99631e5eef..f1a2990371 100644 --- a/src/ChangeLog.7 +++ b/src/ChangeLog.7 @@ -11101,3 +11101,5 @@ See ChangeLog.6 for earlier changes. Copyright (C) 1997, 1998 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 3b03e091-1123-4031-b67d-41683932cc48 diff --git a/src/ChangeLog.8 b/src/ChangeLog.8 index 1c2f7820bb..91fcdd1c89 100644 --- a/src/ChangeLog.8 +++ b/src/ChangeLog.8 @@ -13994,3 +13994,5 @@ See ChangeLog.7 for earlier changes. Copyright (C) 1999 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 4d73444a-8f6e-4255-92a6-d3abc438b8d3 diff --git a/src/ChangeLog.9 b/src/ChangeLog.9 index 224b8384f5..9ce75696f5 100644 --- a/src/ChangeLog.9 +++ b/src/ChangeLog.9 @@ -13297,3 +13297,5 @@ See ChangeLog.8 for earlier changes. Copyright (C) 2001, 2002 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved. + +;;; arch-tag: 38875948-6e89-4f08-b0ca-ff328f1e8b72 diff --git a/src/Makefile.in b/src/Makefile.in index 3a4b0cf0ec..5e6f1e6222 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,5 +1,5 @@ # Makefile for GNU Emacs. -# Copyright (C) 1985, 87, 88, 93, 94, 95, 99, 2000, 2001, 2003 +# Copyright (C) 1985, 87, 88, 93, 94, 95, 99, 2000, 01, 03, 2004 # Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -305,14 +305,17 @@ ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(TOOLKIT_DEFINES) $(MYCPPFLAGS) -I. -I${srcd #endif #ifdef HAVE_X_WINDOWS + +XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o + #ifdef HAVE_MENUS -/* Include xmenu.o in the list of X object files. */ +#ifndef HAVE_CARBON +XMENU_OBJ = xmenu.o +#endif #ifdef USE_GTK -XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o gtkutil.o -#else -XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o +GTK_OBJ= gtkutil.o #endif /* The X Menu stuff is present in the X10 distribution, but missing @@ -332,9 +335,7 @@ LIBXMENU= -lXMenu #else /* not HAVE_MENUS */ -/* Otherwise, omit xmenu.o from the list of X object files, and - don't worry about the menu library at all. */ -XOBJ= xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o +/* Otherwise, don't worry about the menu library at all. */ LIBXMENU= #endif /* not HAVE_MENUS */ @@ -447,6 +448,10 @@ LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) LIBTIFF LIBJPEG LIBPNG LIBGIF LIBXPM L #else /* not HAVE_X11 */ LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM #endif /* not HAVE_X11 */ +#else /* not HAVE_X_WINDOWS */ +#if defined(HAVE_MENUS) && !defined(HAVE_CARBON) +XMENU_OBJ = xmenu.o +#endif #endif /* not HAVE_X_WINDOWS */ LIBSOUND= @LIBSOUND@ @@ -559,21 +564,22 @@ MSDOS_OBJ = dosfns.o msdos.o w16select.o #endif #endif +#ifdef CYGWIN +CYGWIN_OBJ = sheap.o +#endif + #ifdef HAVE_CARBON mac = $(dot)$(dot)/mac/ -XMENU_OBJ = -MAC_OBJ = mac.o macterm.o macfns.o macmenu.o fontset.o +MAC_OBJ = mac.o macterm.o macfns.o macmenu.o fontset.o fringe.o image.o emacsapp = $(PWD)/$(mac)Emacs.app/ emacsappsrc = ${srcdir}/../mac/Emacs.app/ -#else -XMENU_OBJ = xmenu.o #endif /* lastfile must follow all files whose initialized data areas should be dumped as pure by dump-emacs. */ obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \ charset.o coding.o category.o ccl.o character.o chartab.o \ - cm.o term.o xfaces.o $(XOBJ) \ + cm.o term.o xfaces.o $(XOBJ) $(GTK_OBJ)\ emacs.o keyboard.o macros.o keymap.o sysdep.o \ buffer.o filelock.o insdel.o marker.o \ minibuf.o fileio.o dired.o filemode.o \ @@ -584,7 +590,7 @@ obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \ process.o callproc.o \ region-cache.o sound.o atimer.o \ doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \ - $(MSDOS_OBJ) $(MAC_OBJ) + $(MSDOS_OBJ) $(MAC_OBJ) $(CYGWIN_OBJ) /* Object files used on some machine or other. These go in the DOC file on all machines @@ -641,7 +647,12 @@ widgetobj= /* define otherobj as list of object files that make-docfile should not be told about. */ +#ifdef CYGWIN +/* Cygwin differs because of its unexec(). */ +otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(allocaobj) $(widgetobj) $(LIBOBJS) +#else otherobj= $(termcapobj) lastfile.o $(mallocobj) $(allocaobj) $(widgetobj) $(LIBOBJS) +#endif #ifdef HAVE_MOUSE #define MOUSE_SUPPORT ${lispsource}mouse.elc \ @@ -722,6 +733,7 @@ lisp= \ ${lispsource}language/cyrillic.el \ ${lispsource}language/indian.el \ ${lispsource}language/devanagari.el \ + ${lispsource}language/kannada.el \ ${lispsource}language/malayalam.el \ ${lispsource}language/tamil.el \ ${lispsource}language/english.el \ @@ -802,6 +814,7 @@ shortlisp= \ ../lisp/language/cyrillic.el \ ../lisp/language/indian.el \ ../lisp/language/devanagari.el \ + ../lisp/language/kannada.el \ ../lisp/language/malayalam.el \ ../lisp/language/tamil.el \ ../lisp/language/english.el \ @@ -926,11 +939,6 @@ prefix-args${EXEEXT}: prefix-args.c $(config_h) #define OLDXMENU_OPTIONS #endif -/* Don't lose if this was not defined. */ -#ifndef LWLIB_OPTIONS -#define LWLIB_OPTIONS -#endif - #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) /* We use stamp-xmenu with these two deps @@ -954,7 +962,7 @@ C_SWITCH_X_SITE_1 = C_SWITCH_X_SITE C_SWITCH_X_MACHINE_1 = C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM really-lwlib: - cd ${lwlibdir}; ${MAKE} ${MFLAGS} LWLIB_OPTIONS \ + cd ${lwlibdir}; ${MAKE} ${MFLAGS} \ CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \ "C_SWITCH_X_SITE=$(C_SWITCH_X_SITE_1)" \ "C_SWITCH_X_MACHINE=$(C_SWITCH_X_MACHINE_1)" \ @@ -1005,40 +1013,10 @@ stamp-oldxmenu: exit 1 /* Some machines have alloca built-in. - They should define HAVE_ALLOCA, or may just let alloca.s - be used but generate no code. - Some have it written in assembler in alloca.s. + They should define HAVE_ALLOCA. Some use the C version in alloca.c (these define C_ALLOCA in config.h). */ - -#ifdef C_ALLOCA -/* We could put something in alloca.c to #define free and malloc - whenever emacs was #defined, but that's not appropriate for all - users of alloca in Emacs. Check out ../lib-src/getopt.c. */ -alloca.o : alloca.c - $(CC) -c $(CPPFLAGS) -DEMACS_FREE=xfree -DDO_BLOCK_INPUT \ - $(ALL_CFLAGS) ${srcdir}/alloca.c -#else -#ifndef HAVE_ALLOCA -alloca.o : alloca.s $(config_h) -/* $(CPP) is cc -E, which may get confused by filenames - that do not end in .c. So copy file to a safe name. */ - -rm -f allocatem.c - cp ${srcdir}/alloca.s allocatem.c -/* Remove any ^L, blank lines, and preprocessor comments, - since some assemblers barf on them. Use a different basename for the - output file, since some stupid compilers (Green Hill's) use that - name for the intermediate assembler file. */ - $(CPP) $(CPPFLAGS) $(ALL_CFLAGS) allocatem.c | \ - sed -e 's/ //' -e 's/^#.*//' | \ - sed -n -e '/^..*$$/p' > allocax.s - -rm -f alloca.o -/* Xenix, in particular, needs to run assembler via cc. */ - $(CC) -c allocax.s - mv allocax.o alloca.o - -rm -f allocax.s allocatem.c -#endif /* HAVE_ALLOCA */ -#endif /* ! defined (C_ALLOCA) */ +alloca.o: alloca.c blockinput.h atimer.h /* Nearly all the following files depend on lisp.h, but it is not included as a dependency because @@ -1065,8 +1043,7 @@ character.o: character.c character.h buffer.h charset.h composite.h disptab.h \ charset.o: charset.c charset.h character.h buffer.h coding.h composite.h \ disptab.h $(config_h) chartab.o: charset.h character.h $(config.h) -coding.o: coding.c coding.h ccl.h buffer.h character.h charset.h composite.h \ - $(config_h) +coding.o: coding.c coding.h ccl.h buffer.h character.h charset.h intervals.h composite.h window.h $(config_h) cm.o: cm.c cm.h termhooks.h $(config_h) cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h $(config_h) \ msdos.h dispextern.h @@ -1086,7 +1063,8 @@ dosfns.o: buffer.h termchar.h termhooks.h frame.h msdos.h dosfns.h $(config_h) editfns.o: editfns.c window.h buffer.h systime.h $(INTERVAL_SRC) character.h \ coding.h dispextern.h $(config_h) emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \ - termhooks.h buffer.h atimer.h systime.h $(INTERVAL_SRC) $(config_h) + termhooks.h buffer.h atimer.h systime.h $(INTERVAL_SRC) $(config_h) \ + window.h keyboard.h keymap.h fileio.o: fileio.c window.h buffer.h systime.h $(INTERVAL_SRC) character.h \ coding.h ccl.h msdos.h dispextern.h $(config_h) filelock.o: filelock.c buffer.h character.h charset.h coding.h systime.h \ @@ -1095,9 +1073,12 @@ filemode.o: filemode.c $(config_h) frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \ blockinput.h atimer.h systime.h buffer.h character.h fontset.h \ msdos.h dosfns.h dispextern.h $(config_h) +fringe.o: fringe.c dispextern.h frame.h window.h buffer.h $(config_h) fontset.o: dispextern.h fontset.h fontset.c ccl.h buffer.h character.h \ charset.h frame.h keyboard.h $(config_h) getloadavg.o: getloadavg.c $(config_h) +image.o: image.c frame.h window.h dispextern.h blockinput.h atimer.h \ + systime.h xterm.h w32term.h w32gui.h macterm.h macgui.h $(config_h) indent.o: indent.c frame.h window.h indent.h buffer.h $(config_h) termchar.h \ termopts.h disptab.h region-cache.h character.h category.h composite.h \ dispextern.h keyboard.h @@ -1123,7 +1104,7 @@ minibuf.o: minibuf.c syntax.h dispextern.h frame.h window.h keyboard.h \ mktime.o: mktime.c $(config_h) msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \ termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \ - keyboard.h $(config_h) + keyboard.h intervals.h $(config_h) process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \ commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \ blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \ @@ -1172,7 +1153,7 @@ xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h dispextern.h \ character.h charset.h coding.h gtkutil.h $(config_h) termhooks.h xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h buffer.h \ charset.h keyboard.h $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h \ - systime.h gtkutil.h msdos.h $(config_h) coding.h + systime.h gtkutil.h msdos.h coding.h $(config_h) xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h buffer.h \ dispextern.h frame.h disptab.h blockinput.h atimer.h systime.h syssignal.h \ keyboard.h gnu.h character.h charset.h ccl.h fontset.h composite.h \ @@ -1180,9 +1161,10 @@ xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h buffer.h \ xselect.o: xselect.c process.h dispextern.h frame.h xterm.h blockinput.h \ buffer.h atimer.h systime.h $(config_h) xrdb.o: xrdb.c $(config_h) epaths.h -xsmfns.o: xsmfns.c $(config_h) systime.h sysselect.h termhooks.h +xsmfns.o: xsmfns.c $(config_h) systime.h sysselect.h termhooks.h xterm.h \ + lisp.h termopts.h gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h $(config_h) \ - blockinput.h window.h atimer.h termhooks.h coding.h + blockinput.h window.h atimer.h termhooks.h keyboard.h charset.h coding.h hftctl.o: hftctl.c $(config_h) sound.o: sound.c dispextern.h $(config_h) @@ -1193,14 +1175,14 @@ atimer.o: atimer.c atimer.h systime.h $(config_h) alloc.o: alloc.c process.h frame.h window.h buffer.h puresize.h syssignal.h keyboard.h \ blockinput.h atimer.h systime.h character.h dispextern.h $(config_h) \ $(INTERVAL_SRC) -bytecode.o: bytecode.c buffer.h syntax.h character.h $(config_h) +bytecode.o: bytecode.c buffer.h syntax.h character.h window.h $(config_h) data.o: data.c buffer.h puresize.h character.h syssignal.h keyboard.h \ $(config_h) eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h \ - $(config_h) + dispextern.h $(config_h) floatfns.o: floatfns.c $(config_h) fns.o: fns.c commands.h $(config_h) frame.h buffer.h character.h keyboard.h \ - frame.h window.h dispextern.h $(INTERVAL_SRC) coding.h + frame.h window.h dispextern.h $(INTERVAL_SRC) coding.h md5.h print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \ $(config_h) dispextern.h msdos.h composite.h lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \ @@ -1341,3 +1323,5 @@ bootstrap-emacs${EXEEXT}: temacs${EXEEXT} mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT} #endif /* ! defined (CANNOT_DUMP) */ +/* arch-tag: 8e915ae5-d15d-4617-8c41-c5c267a23b00 + (do not change this comment) */ diff --git a/src/abbrev.c b/src/abbrev.c index e3e0e28210..54ea8f1128 100644 --- a/src/abbrev.c +++ b/src/abbrev.c @@ -356,10 +356,13 @@ Returns the abbrev symbol, if expansion took place. */) { SET_PT (wordstart); - del_range_both (wordstart, wordstart_byte, wordend, wordend_byte, 1); - insert_from_string (expansion, 0, 0, SCHARS (expansion), SBYTES (expansion), 1); + del_range_both (PT, PT_BYTE, + wordend + (PT - wordstart), + wordend_byte + (PT_BYTE - wordstart_byte), + 1); + SET_PT (PT + whitecnt); if (uccount && !lccount) @@ -543,7 +546,8 @@ is inserted. Otherwise the description is an expression, a call to `define-abbrev-table', which would define the abbrev table NAME exactly as it is currently defined. -Abbrevs marked as "system abbrevs" are omitted. */) +Abbrevs marked as "system abbrevs" are normally omitted. However, if +READABLE is non-nil, they are listed. */) (name, readable) Lisp_Object name, readable; { @@ -696,3 +700,6 @@ the current abbrev table before abbrev lookup happens. */); defsubr (&Sinsert_abbrev_table_description); defsubr (&Sdefine_abbrev_table); } + +/* arch-tag: b721db69-f633-44a8-a361-c275acbdad7d + (do not change this comment) */ diff --git a/src/acldef.h b/src/acldef.h index cc4085c6aa..eee3e72a3e 100644 --- a/src/acldef.h +++ b/src/acldef.h @@ -38,3 +38,6 @@ #define ACL$W_SIZE 8 #define ACL$B_TYPE 10 #define ACL$L_LIST 12 + +/* arch-tag: 7c11e99d-34df-41e8-98e2-20f152c4ad73 + (do not change this comment) */ diff --git a/src/alloc.c b/src/alloc.c index 8d74905728..e427c1f567 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1,5 +1,5 @@ /* Storage allocation and gc for GNU Emacs Lisp interpreter. - Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 2001, 2002, 2003 + Copyright (C) 1985,86,88,93,94,95,97,98,1999,2000,01,02,03,2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -31,13 +31,6 @@ Boston, MA 02111-1307, USA. */ #include -/* GC_MALLOC_CHECK defined means perform validity checks of malloc'd - memory. Can do this only if using gmalloc.c. */ - -#if defined SYSTEM_MALLOC || defined DOUG_LEA_MALLOC -#undef GC_MALLOC_CHECK -#endif - /* This file is part of the core Lisp implementation, and thus must deal with the real data structures. If the Lisp implementation is replaced, this file likely will not be used. */ @@ -56,6 +49,13 @@ Boston, MA 02111-1307, USA. */ #include "syssignal.h" #include +/* GC_MALLOC_CHECK defined means perform validity checks of malloc'd + memory. Can do this only if using gmalloc.c. */ + +#if defined SYSTEM_MALLOC || defined DOUG_LEA_MALLOC +#undef GC_MALLOC_CHECK +#endif + #ifdef HAVE_UNISTD_H #include #else @@ -598,6 +598,7 @@ lisp_malloc (nbytes, type) val = (void *) malloc (nbytes); +#ifndef USE_LSB_TAG /* If the memory just allocated cannot be addressed thru a Lisp object's pointer, and it needs to be, that's equivalent to running out of memory. */ @@ -612,6 +613,7 @@ lisp_malloc (nbytes, type) val = 0; } } +#endif #if GC_MARK_STACK && !defined GC_MALLOC_CHECK if (val && type != MEM_TYPE_NON_LISP) @@ -756,6 +758,11 @@ lisp_align_malloc (nbytes, type) #else base = malloc (ABLOCKS_BYTES); abase = ALIGN (base, BLOCK_ALIGN); + if (base == 0) + { + UNBLOCK_INPUT; + memory_full (); + } #endif aligned = (base == abase); @@ -767,6 +774,7 @@ lisp_align_malloc (nbytes, type) mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); #endif +#ifndef USE_LSB_TAG /* If the memory just allocated cannot be addressed thru a Lisp object's pointer, and it needs to be, that's equivalent to running out of memory. */ @@ -783,6 +791,7 @@ lisp_align_malloc (nbytes, type) memory_full (); } } +#endif /* Initialize the blocks and put them on the free list. Is `base' was not properly aligned, we can't use the last block. */ @@ -1099,8 +1108,9 @@ uninterrupt_malloc () struct interval_block { - struct interval_block *next; + /* Place `intervals' first, to preserve alignment. */ struct interval intervals[INTERVAL_BLOCK_SIZE]; + struct interval_block *next; }; /* Current interval block. Its `next' pointer points to older @@ -1338,8 +1348,9 @@ struct sblock struct string_block { - struct string_block *next; + /* Place `strings' first, to preserve alignment. */ struct Lisp_String strings[STRING_BLOCK_SIZE]; + struct string_block *next; }; /* Head and tail of the list of sblock structures holding Lisp string @@ -2120,8 +2131,10 @@ make_uninit_multibyte_string (nchars, nbytes) by GC are put on a free list to be reallocated before allocating any new float cells from the latest float_block. */ -#define FLOAT_BLOCK_SIZE \ - (((BLOCK_BYTES - sizeof (struct float_block *)) * CHAR_BIT) \ +#define FLOAT_BLOCK_SIZE \ + (((BLOCK_BYTES - sizeof (struct float_block *) \ + /* The compiler might add padding at the end. */ \ + - (sizeof (struct Lisp_Float) - sizeof (int))) * CHAR_BIT) \ / (sizeof (struct Lisp_Float) * CHAR_BIT + 1)) #define GETMARKBIT(block,n) \ @@ -2224,15 +2237,17 @@ make_float (float_value) new = (struct float_block *) lisp_align_malloc (sizeof *new, MEM_TYPE_FLOAT); new->next = float_block; + bzero ((char *) new->gcmarkbits, sizeof new->gcmarkbits); float_block = new; float_block_index = 0; n_float_blocks++; } - XSETFLOAT (val, &float_block->floats[float_block_index++]); + XSETFLOAT (val, &float_block->floats[float_block_index]); + float_block_index++; } XFLOAT_DATA (val) = float_value; - FLOAT_UNMARK (XFLOAT (val)); + eassert (!FLOAT_MARKED_P (XFLOAT (val))); consing_since_gc += sizeof (struct Lisp_Float); floats_consed++; return val; @@ -2340,17 +2355,19 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0, register struct cons_block *new; new = (struct cons_block *) lisp_align_malloc (sizeof *new, MEM_TYPE_CONS); + bzero ((char *) new->gcmarkbits, sizeof new->gcmarkbits); new->next = cons_block; cons_block = new; cons_block_index = 0; n_cons_blocks++; } - XSETCONS (val, &cons_block->conses[cons_block_index++]); + XSETCONS (val, &cons_block->conses[cons_block_index]); + cons_block_index++; } XSETCAR (val, car); XSETCDR (val, cdr); - CONS_UNMARK (XCONS (val)); + eassert (!CONS_MARKED_P (XCONS (val))); consing_since_gc += sizeof (struct Lisp_Cons); cons_cells_consed++; return val; @@ -2489,7 +2506,9 @@ allocate_vectorlike (len, type) /* Prevent mmap'ing the chunk. Lisp data may not be mmap'ed because mapped region contents are not preserved in a dumped Emacs. */ + BLOCK_INPUT; mallopt (M_MMAP_MAX, 0); + UNBLOCK_INPUT; #endif nbytes = sizeof *p + (len - 1) * sizeof p->contents[0]; @@ -2497,7 +2516,9 @@ allocate_vectorlike (len, type) #ifdef DOUG_LEA_MALLOC /* Back to a reasonable maximum of mmap'ed areas. */ + BLOCK_INPUT; mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); + UNBLOCK_INPUT; #endif consing_since_gc += nbytes; @@ -2697,8 +2718,9 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT struct symbol_block { - struct symbol_block *next; + /* Place `symbols' first, to preserve alignment. */ struct Lisp_Symbol symbols[SYMBOL_BLOCK_SIZE]; + struct symbol_block *next; }; /* Current symbol block and index of first unused Lisp_Symbol @@ -2756,7 +2778,8 @@ Its value and function definition are void, and its property list is nil. */) symbol_block_index = 0; n_symbol_blocks++; } - XSETSYMBOL (val, &symbol_block->symbols[symbol_block_index++]); + XSETSYMBOL (val, &symbol_block->symbols[symbol_block_index]); + symbol_block_index++; } p = XSYMBOL (val); @@ -2788,8 +2811,9 @@ Its value and function definition are void, and its property list is nil. */) struct marker_block { - struct marker_block *next; + /* Place `markers' first, to preserve alignment. */ union Lisp_Misc markers[MARKER_BLOCK_SIZE]; + struct marker_block *next; }; struct marker_block *marker_block; @@ -2834,7 +2858,8 @@ allocate_misc () marker_block_index = 0; n_marker_blocks++; } - XSETMISC (val, &marker_block->markers[marker_block_index++]); + XSETMISC (val, &marker_block->markers[marker_block_index]); + marker_block_index++; } consing_since_gc += sizeof (union Lisp_Misc); @@ -3369,6 +3394,7 @@ live_string_p (m, p) must not be on the free-list. */ return (offset >= 0 && offset % sizeof b->strings[0] == 0 + && offset < (STRING_BLOCK_SIZE * sizeof b->strings[0]) && ((struct Lisp_String *) p)->data != NULL); } else @@ -3393,8 +3419,8 @@ live_cons_p (m, p) one of the unused cells in the current cons block, and not be on the free-list. */ return (offset >= 0 - && offset < (CONS_BLOCK_SIZE * sizeof b->conses[0]) && offset % sizeof b->conses[0] == 0 + && offset < (CONS_BLOCK_SIZE * sizeof b->conses[0]) && (b != cons_block || offset / sizeof b->conses[0] < cons_block_index) && !EQ (((struct Lisp_Cons *) p)->car, Vdead)); @@ -3422,6 +3448,7 @@ live_symbol_p (m, p) and not be on the free-list. */ return (offset >= 0 && offset % sizeof b->symbols[0] == 0 + && offset < (SYMBOL_BLOCK_SIZE * sizeof b->symbols[0]) && (b != symbol_block || offset / sizeof b->symbols[0] < symbol_block_index) && !EQ (((struct Lisp_Symbol *) p)->function, Vdead)); @@ -3447,8 +3474,8 @@ live_float_p (m, p) /* P must point to the start of a Lisp_Float and not be one of the unused cells in the current float block. */ return (offset >= 0 - && offset < (FLOAT_BLOCK_SIZE * sizeof b->floats[0]) && offset % sizeof b->floats[0] == 0 + && offset < (FLOAT_BLOCK_SIZE * sizeof b->floats[0]) && (b != float_block || offset / sizeof b->floats[0] < float_block_index)); } @@ -3475,6 +3502,7 @@ live_misc_p (m, p) and not be on the free-list. */ return (offset >= 0 && offset % sizeof b->markers[0] == 0 + && offset < (MARKER_BLOCK_SIZE * sizeof b->markers[0]) && (b != marker_block || offset / sizeof b->markers[0] < marker_block_index) && ((union Lisp_Misc *) p)->u_marker.type != Lisp_Misc_Free); @@ -4009,6 +4037,9 @@ pure_alloc (size, type) int type; { POINTER_TYPE *result; +#ifdef USE_LSB_TAG + size_t alignment = (1 << GCTYPEBITS); +#else size_t alignment = sizeof (EMACS_INT); /* Give Lisp_Floats an extra alignment. */ @@ -4020,6 +4051,7 @@ pure_alloc (size, type) alignment = sizeof (struct Lisp_Float); #endif } +#endif again: result = ALIGN (purebeg + pure_bytes_used, alignment); @@ -4155,12 +4187,13 @@ Does not copy symbols. Copies strings without text properties. */) else if (COMPILEDP (obj) || VECTORP (obj)) { register struct Lisp_Vector *vec; - register int i, size; + register int i; + EMACS_INT size; size = XVECTOR (obj)->size; if (size & PSEUDOVECTOR_FLAG) size &= PSEUDOVECTOR_SIZE_MASK; - vec = XVECTOR (make_pure_vector ((EMACS_INT) size)); + vec = XVECTOR (make_pure_vector (size)); for (i = 0; i < size; i++) vec->contents[i] = Fpurecopy (XVECTOR (obj)->contents[i]); if (COMPILEDP (obj)) @@ -4446,13 +4479,6 @@ returns nil, because real GC can't be done. */) /* Clear the mark bits that we set in certain root slots. */ -#if (GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE \ - || GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES) - { - register struct gcpro *tail; - } -#endif - unmark_byte_stack (); VECTOR_UNMARK (&buffer_defaults); VECTOR_UNMARK (&buffer_local_symbols); diff --git a/src/alloca.c b/src/alloca.c index 4b574374bf..e8c8319adc 100644 --- a/src/alloca.c +++ b/src/alloca.c @@ -36,7 +36,6 @@ #endif #ifdef DO_BLOCK_INPUT -# include "lisp.h" # include "blockinput.h" #endif @@ -58,7 +57,10 @@ you lose -- must know STACK_DIRECTION at compile-time /* Using #error here is not wise since this file should work for - old and obscure compilers. */ + old and obscure compilers. + + As far as I know, using it is OK if it's indented -- at least for + pcc-based processors. -- fx */ # endif /* STACK_DIRECTION undefined */ # endif /* static */ # endif /* emacs */ @@ -73,38 +75,32 @@ long i00afunc (); # define ADDRESS_FUNCTION(arg) &(arg) # endif -# ifdef POINTER_TYPE +# ifndef POINTER_TYPE +# ifdef __STDC__ +# define POINTER_TYPE void +# else +# define POINTER_TYPE char +# endif +# endif typedef POINTER_TYPE *pointer; -# else /* not POINTER_TYPE */ -# if __STDC__ -typedef void *pointer; -# else /* not __STDC__ */ -typedef char *pointer; -# endif /* not __STDC__ */ -# endif /* not POINTER_TYPE */ # ifndef NULL # define NULL 0 # endif -/* Different portions of Emacs need to call different versions of - malloc. The Emacs executable needs alloca to call xmalloc, because - ordinary malloc isn't protected from input signals. On the other - hand, the utilities in lib-src need alloca to call malloc; some of - them are very simple, and don't have an xmalloc routine. - - Non-Emacs programs expect this to call xmalloc. +/* The Emacs executable needs alloca to call xmalloc, because ordinary + malloc isn't protected from input signals. xmalloc also checks for + out-of-memory errors, so we should use it generally. Callers below should use malloc. */ -# ifdef emacs -# undef malloc -# define malloc xmalloc -# ifdef EMACS_FREE -# define free EMACS_FREE -# endif -# endif -extern pointer malloc (); +# undef malloc +# define malloc xmalloc +# undef free +# define free xfree + +void *xmalloc _P ((size_t)); +void xfree _P ((void *)); /* Define STACK_DIRECTION if you know the direction of stack growth for your system; otherwise it will be automatically @@ -229,8 +225,8 @@ alloca (size) /* Allocate combined header + user data storage. */ { - register pointer new = malloc (sizeof (header) + size); /* Address of header. */ + register pointer new = malloc (sizeof (header) + size); if (new == 0) abort(); @@ -516,3 +512,6 @@ i00afunc (long address) # endif /* no alloca */ #endif /* not GCC version 2 */ + +/* arch-tag: 5c9901c8-3cd4-453e-bd66-d9035a175ee3 + (do not change this comment) */ diff --git a/src/atimer.c b/src/atimer.c index 25b48c5857..2ddc7427f5 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -19,13 +19,13 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include -#include #include +#include +#include #include #include #include #include -#include #ifdef HAVE_UNISTD_H #include @@ -433,3 +433,6 @@ init_atimer () pending_atimers = 0; signal (SIGALRM, alarm_signal_handler); } + +/* arch-tag: e6308261-eec6-404b-89fb-6e5909518d70 + (do not change this comment) */ diff --git a/src/atimer.h b/src/atimer.h index 4a487cdbb3..3ecc97e551 100644 --- a/src/atimer.h +++ b/src/atimer.h @@ -21,6 +21,13 @@ Boston, MA 02111-1307, USA. */ #ifndef EMACS_ATIMER_H #define EMACS_ATIMER_H +/* Declare the prototype for a general external function. */ +#if defined (PROTOTYPES) || defined (WINDOWSNT) +#define P_(proto) proto +#else +#define P_(proto) () +#endif + #include "systime.h" /* for EMACS_TIME */ /* Forward declaration. */ @@ -82,3 +89,6 @@ void run_all_atimers P_ ((void)); Lisp_Object unwind_stop_other_atimers P_ ((Lisp_Object)); #endif /* EMACS_ATIMER_H */ + +/* arch-tag: 02c7c1c8-45bd-4222-b874-4ca44662f60b + (do not change this comment) */ diff --git a/src/blockinput.h b/src/blockinput.h index c5485fa480..eba192c986 100644 --- a/src/blockinput.h +++ b/src/blockinput.h @@ -102,3 +102,6 @@ extern int pending_atimers; extern void reinvoke_input_signal (); #endif /* EMACS_BLOCKINPUT_H */ + +/* arch-tag: 51a9ec86-945a-4966-8f04-2d1341250e03 + (do not change this comment) */ diff --git a/src/buffer.c b/src/buffer.c index b7efdbe550..4c7e709adb 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1,5 +1,5 @@ /* Buffer manipulation primitives for GNU Emacs. - Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001, 02, 2003 + Copyright (C) 1985,86,87,88,89,93,94,95,97,98, 1999, 2000, 2001, 02, 03, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -67,7 +67,7 @@ struct buffer *all_buffers; Setting the default value also goes through the alist of buffers and stores into each buffer that does not say it has a local value. */ -struct buffer buffer_defaults; +DECL_ALIGN (struct buffer, buffer_defaults); /* A Lisp_Object pointer to the above, used for staticpro */ @@ -89,10 +89,6 @@ static Lisp_Object Vbuffer_defaults; If a slot is -2, then there is no DEFVAR_PER_BUFFER for it, but there is a default value which is copied into each buffer. - If a slot in this structure is negative, then even though there may - be a DEFVAR_PER_BUFFER for the slot, there is no default value for it; - and the corresponding slot in buffer_defaults is not used. - If a slot in this structure corresponding to a DEFVAR_PER_BUFFER is zero, that is a bug */ @@ -101,7 +97,8 @@ struct buffer buffer_local_flags; /* This structure holds the names of symbols whose values may be buffer-local. It is indexed and accessed in the same way as the above. */ -struct buffer buffer_local_symbols; +DECL_ALIGN (struct buffer, buffer_local_symbols); + /* A Lisp_Object pointer to the above, used for staticpro */ static Lisp_Object Vbuffer_local_symbols; @@ -525,7 +522,7 @@ DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, Smake_indirect_buffer, 2, 3, "bMake indirect buffer (to buffer): \nBName of indirect buffer: ", doc: /* Create and return an indirect buffer for buffer BASE-BUFFER, named NAME. -BASE-BUFFER should be an existing buffer (or buffer name). +BASE-BUFFER should be a live buffer, or the name of an existing buffer. NAME should be a string which is not the name of an existing buffer. Optional argument CLONE non-nil means preserve BASE-BUFFER's state, such as major and minor modes, in the indirect buffer. @@ -533,16 +530,20 @@ CLONE nil means the indirect buffer's state is reset to default values. */) (base_buffer, name, clone) Lisp_Object base_buffer, name, clone; { - Lisp_Object buf; + Lisp_Object buf, tem; struct buffer *b; + CHECK_STRING (name); buf = Fget_buffer (name); if (!NILP (buf)) error ("Buffer name `%s' is in use", SDATA (name)); + tem = base_buffer; base_buffer = Fget_buffer (base_buffer); if (NILP (base_buffer)) - error ("No such buffer: `%s'", SDATA (name)); + error ("No such buffer: `%s'", SDATA (tem)); + if (NILP (XBUFFER (base_buffer)->name)) + error ("Base buffer has been killed"); if (SCHARS (name) == 0) error ("Empty string for buffer name is not allowed"); @@ -656,7 +657,7 @@ delete_all_overlays (b) } /* Reinitialize everything about a buffer except its name and contents - and local variables. + and local variables. If called on an already-initialized buffer, the list of overlays should be deleted before calling this function, otherwise we end up with overlays that claim to belong to the buffer but the buffer @@ -770,7 +771,7 @@ DEFUN ("generate-new-buffer-name", Fgenerate_new_buffer_name, Sgenerate_new_buff doc: /* Return a string that is the name of no existing buffer based on NAME. If there is no live buffer named NAME, then return NAME. Otherwise modify name by appending `', incrementing NUMBER -until an unused name is found, and then return that name. +\(starting at 2) until an unused name is found, and then return that name. Optional second argument IGNORE specifies a name that is okay to use \(if it is in the sequence to be tried) even if a buffer with that name exists. */) @@ -783,6 +784,9 @@ even if a buffer with that name exists. */) CHECK_STRING (name); + tem = Fstring_equal (name, ignore); + if (!NILP (tem)) + return name; tem = Fget_buffer (name); if (NILP (tem)) return name; @@ -1203,6 +1207,10 @@ If BUFFER is omitted or nil, some interesting buffer is returned. */) buf = Fcdr (XCAR (tail)); if (EQ (buf, buffer)) continue; + if (NILP (buf)) + continue; + if (NILP (XBUFFER (buf)->name)) + continue; if (SREF (XBUFFER (buf)->name, 0) == ' ') continue; /* If the selected frame has a buffer_predicate, @@ -1430,7 +1438,8 @@ with SIGHUP. */) if (STRINGP (b->auto_save_file_name) && b->auto_save_modified != 0 && BUF_SAVE_MODIFF (b) < b->auto_save_modified - && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) + && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b) + && NILP (Fsymbol_value (intern ("auto-save-visited-file-name")))) { Lisp_Object tem; tem = Fsymbol_value (intern ("delete-auto-save-files")); @@ -1674,8 +1683,9 @@ DEFUN ("pop-to-buffer", Fpop_to_buffer, Spop_to_buffer, 1, 3, 0, doc: /* Select buffer BUFFER in some window, preferably a different one. If BUFFER is nil, then some other buffer is chosen. If `pop-up-windows' is non-nil, windows can be split to do this. -If optional second arg OTHER-WINDOW is non-nil, insist on finding another -window even if BUFFER is already visible in the selected window. +If optional second arg OTHER-WINDOW is nil, insist on finding another +window even if BUFFER is already visible in the selected window, +and ignore `same-window-regexps' and `same-window-buffer-names'. This uses the function `display-buffer' as a subroutine; see the documentation of `display-buffer' for additional customization information. @@ -2082,7 +2092,9 @@ If FLAG is nil, this makes the buffer a single-byte buffer. In these cases, the buffer contents remain unchanged as a sequence of bytes but the contents viewed as characters do change. If FLAG is `to', this makes the buffer a multibyte buffer by changing -all eight-bit bytes to eight-bit characters. */) +all eight-bit bytes to eight-bit characters. +If the multibyte flag was really changed, undo information of the +current buffer is cleared. */) (flag) Lisp_Object flag; { @@ -3301,10 +3313,9 @@ adjust_overlays_for_delete (pos, length) endpoint in this range will need to be unlinked from the overlay list and reinserted in its proper place. Such an overlay might even have negative size at this point. - If so, we'll reverse the endpoints. Can you think of anything - better to do in this situation? */ + If so, we'll make the overlay empty. */ void -fix_overlays_in_range (start, end) +fix_start_end_in_overlays (start, end) register int start, end; { Lisp_Object overlay; @@ -3329,23 +3340,24 @@ fix_overlays_in_range (start, end) for (parent = NULL, tail = current_buffer->overlays_before; tail;) { XSETMISC (overlay, tail); + endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); + startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); + + /* If the overlay is backwards, make it empty. */ + if (endpos < startpos) + { + startpos = endpos; + Fset_marker (OVERLAY_START (overlay), make_number (startpos), + Qnil); + } + if (endpos < start) break; - startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); + if (endpos < end || (startpos >= start && startpos < end)) { - /* If the overlay is backwards, fix that now. */ - if (startpos > endpos) - { - int tem; - Fset_marker (OVERLAY_START (overlay), make_number (endpos), - Qnil); - Fset_marker (OVERLAY_END (overlay), make_number (startpos), - Qnil); - tem = startpos; startpos = endpos; endpos = tem; - } /* Add it to the end of the wrong list. Later on, recenter_overlay_lists will move it to the right place. */ if (endpos < current_buffer->overlay_center) @@ -3376,22 +3388,24 @@ fix_overlays_in_range (start, end) for (parent = NULL, tail = current_buffer->overlays_after; tail;) { XSETMISC (overlay, tail); + startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); + endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); + + /* If the overlay is backwards, make it empty. */ + if (endpos < startpos) + { + startpos = endpos; + Fset_marker (OVERLAY_START (overlay), make_number (startpos), + Qnil); + } + if (startpos >= end) break; - endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); + if (startpos >= start || (endpos >= start && endpos < end)) { - if (startpos > endpos) - { - int tem; - Fset_marker (OVERLAY_START (overlay), make_number (endpos), - Qnil); - Fset_marker (OVERLAY_END (overlay), make_number (startpos), - Qnil); - tem = startpos; startpos = endpos; endpos = tem; - } if (endpos < current_buffer->overlay_center) { if (!afterp) @@ -4974,6 +4988,7 @@ init_buffer_once () buffer_defaults.scroll_bar_width = Qnil; buffer_defaults.vertical_scroll_bar_type = Qt; buffer_defaults.indicate_empty_lines = Qnil; + buffer_defaults.indicate_buffer_boundaries = Qnil; buffer_defaults.scroll_up_aggressively = Qnil; buffer_defaults.scroll_down_aggressively = Qnil; buffer_defaults.display_time = Qnil; @@ -5043,6 +5058,7 @@ init_buffer_once () XSETFASTINT (buffer_local_flags.scroll_bar_width, idx); ++idx; XSETFASTINT (buffer_local_flags.vertical_scroll_bar_type, idx); ++idx; XSETFASTINT (buffer_local_flags.indicate_empty_lines, idx); ++idx; + XSETFASTINT (buffer_local_flags.indicate_buffer_boundaries, idx); ++idx; XSETFASTINT (buffer_local_flags.scroll_up_aggressively, idx); ++idx; XSETFASTINT (buffer_local_flags.scroll_down_aggressively, idx); ++idx; XSETFASTINT (buffer_local_flags.header_line_format, idx); ++idx; @@ -5331,6 +5347,11 @@ This is the same as (default-value 'vertical-scroll-bar). */); doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. This is the same as (default-value 'indicate-empty-lines). */); + DEFVAR_LISP_NOPRO ("default-indicate-buffer-boundaries", + &buffer_defaults.indicate_buffer_boundaries, + doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it. +This is the same as (default-value 'indicate-buffer-boundaries). */); + DEFVAR_LISP_NOPRO ("default-scroll-up-aggressively", &buffer_defaults.scroll_up_aggressively, doc: /* Default value of `scroll-up-aggressively'. @@ -5388,6 +5409,8 @@ A string is printed verbatim in the mode line except for %-constructs: %c -- print the current column number (this makes editing slower). To make the column number update correctly in all cases, `column-number-mode' must be non-nil. + %i -- print the size of the buffer. + %I -- like %i, but use k, M, G, etc., to abbreviate. %p -- print percent of buffer above top of window, or Top, Bot or All. %P -- print percent of buffer above bottom of window, perhaps plus Top, or print Bottom or All. @@ -5639,6 +5662,24 @@ A value of t means to use the vertical scroll bar type from the window's frame. If non-nil, a bitmap is displayed in the left fringe of a window on window-systems. */); + DEFVAR_PER_BUFFER ("indicate-buffer-boundaries", + ¤t_buffer->indicate_buffer_boundaries, Qnil, + doc: /* *Visually indicate buffer boundaries and scrolling. +If non-nil, the first and last line of the buffer are marked in the fringe +of a window on window-systems with angle bitmaps, or if the window can be +scrolled, the top and bottom line of the window are marked with up and down +arrow bitmaps. +If value is `left' or `right', both angle and arrow bitmaps are displayed in +the left or right fringe, resp. Any other non-nil value causes the +bitmap on the top line to be displayed in the left fringe, and the +bitmap on the bottom line in the right fringe. +If value is a cons (ANGLES . ARROWS), the car specifies the position +of the angle bitmaps, and the cdr specifies the position of the arrow +bitmaps. For example, (t . right) places the top angle bitmap in left +fringe, the bottom angle bitmap in right fringe, and both arrow +bitmaps in right fringe. To show just the angle bitmaps in the left +fringe, but no arrow bitmaps, use (left . nil). */); + DEFVAR_PER_BUFFER ("scroll-up-aggressively", ¤t_buffer->scroll_up_aggressively, Qnil, doc: /* How far to scroll windows upward. @@ -5907,3 +5948,6 @@ keys_of_buffer () initialized when that function gets called. */ Fput (intern ("erase-buffer"), Qdisabled, Qt); } + +/* arch-tag: e48569bf-69a9-4b65-a23b-8e68769436e1 + (do not change this comment) */ diff --git a/src/buffer.h b/src/buffer.h index b52f83a6e0..0755db25f9 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -737,6 +737,9 @@ struct buffer like vi). */ Lisp_Object indicate_empty_lines; + /* Non-nil means indicate buffer boundaries and scrolling. */ + Lisp_Object indicate_buffer_boundaries; + /* Time stamp updated each time this buffer is displayed in a window. */ Lisp_Object display_time; @@ -911,8 +914,26 @@ extern int last_per_buffer_idx; (B)->local_flags[IDX] = (VAL); \ } while (0) -/* Return the index of the per-buffer variable at offset OFFSET in the - buffer structure. */ +/* Return the index value of the per-buffer variable at offset OFFSET + in the buffer structure. + + If the slot OFFSET has a corresponding default value in + buffer_defaults, the index value is positive and has only one + nonzero bit. When a buffer has its own local value for a slot, the + bit for that slot (found in the same slot in this structure) is + turned on in the buffer's local_flags array. + + If the index value is -1, even though there may be a + DEFVAR_PER_BUFFER for the slot, there is no default value for it; + and the corresponding slot in buffer_defaults is not used. + + If the index value is -2, then there is no DEFVAR_PER_BUFFER for + the slot, but there is a default value which is copied into each + new buffer. + + If a slot in this structure corresponding to a DEFVAR_PER_BUFFER is + zero, that is a bug */ + #define PER_BUFFER_IDX(OFFSET) \ XINT (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_flags)) @@ -940,3 +961,6 @@ extern int last_per_buffer_idx; #define PER_BUFFER_TYPE(OFFSET) \ (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_types)) + +/* arch-tag: 679305dd-d41c-4a50-b170-3caf5c97b2d1 + (do not change this comment) */ diff --git a/src/bytecode.c b/src/bytecode.c index f3a07dced3..659f79bca0 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -286,27 +286,13 @@ mark_byte_stack () The culprit is found in the frame of Fbyte_code where the address of its local variable `stack' is equal to the recorded value of `stack' here. */ - if (!stack->top) - abort (); + eassert (stack->top); for (obj = stack->bottom; obj <= stack->top; ++obj) - if (!XMARKBIT (*obj)) - { - mark_object (*obj); - XMARK (*obj); - } + mark_object (*obj); - if (!XMARKBIT (stack->byte_string)) - { - mark_object (stack->byte_string); - XMARK (stack->byte_string); - } - - if (!XMARKBIT (stack->constants)) - { - mark_object (stack->constants); - XMARK (stack->constants); - } + mark_object (stack->byte_string); + mark_object (stack->constants); } } @@ -318,16 +304,9 @@ void unmark_byte_stack () { struct byte_stack *stack; - Lisp_Object *obj; for (stack = byte_stack_list; stack; stack = stack->next) { - for (obj = stack->bottom; obj <= stack->top; ++obj) - XUNMARK (*obj); - - XUNMARK (stack->byte_string); - XUNMARK (stack->constants); - if (stack->byte_string_start != SDATA (stack->byte_string)) { int offset = stack->pc - stack->byte_string_start; @@ -1782,3 +1761,6 @@ integer, it is incremented each time that symbol's function is called. */); } #endif } + +/* arch-tag: b9803b6f-1ed6-4190-8adf-33fd3a9d10e9 + (do not change this comment) */ diff --git a/src/callint.c b/src/callint.c index 4edb4201fa..50090db8b2 100644 --- a/src/callint.c +++ b/src/callint.c @@ -1,5 +1,5 @@ /* Call a Lisp function interactively. - Copyright (C) 1985, 86, 93, 94, 95, 1997, 2000, 02, 2003 + Copyright (C) 1985, 86, 93, 94, 95, 1997, 2000, 02, 03, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -41,6 +41,7 @@ Lisp_Object Qcall_interactively; Lisp_Object Vcommand_history; extern Lisp_Object Vhistory_length; +extern Lisp_Object Vthis_original_command, real_this_command; Lisp_Object Vcommand_debug_status, Qcommand_debug_status; Lisp_Object Qenable_recursive_minibuffers; @@ -208,7 +209,7 @@ fix_command (input, values) Lisp_Object intail, valtail; for (intail = Fcdr (input), valtail = values; CONSP (valtail); - intail = Fcdr (intail), valtail = Fcdr (valtail)) + intail = Fcdr (intail), valtail = XCDR (valtail)) { Lisp_Object elt; elt = Fcar (intail); @@ -291,6 +292,14 @@ supply if the command inquires which events were used to invoke it. */) int key_count; int record_then_fail = 0; + Lisp_Object save_this_command, save_last_command; + Lisp_Object save_this_original_command, save_real_this_command; + + save_this_command = Vthis_command; + save_this_original_command = Vthis_original_command; + save_real_this_command = real_this_command; + save_last_command = current_kboard->Vlast_command; + if (NILP (keys)) keys = this_command_keys, key_count = this_command_key_count; else @@ -338,25 +347,17 @@ supply if the command inquires which events were used to invoke it. */) goto lose; specs = XVECTOR (fun)->contents[COMPILED_INTERACTIVE]; } - else if (!CONSP (fun)) - goto lose; - else if (funcar = XCAR (fun), EQ (funcar, Qautoload)) + else { + Lisp_Object form; GCPRO2 (function, prefix_arg); - do_autoload (fun, function); + form = Finteractive_form (function); UNGCPRO; - goto retry; - } - else if (EQ (funcar, Qlambda)) - { - specs = Fassq (Qinteractive, Fcdr (XCDR (fun))); - if (NILP (specs)) + if (CONSP (form)) + specs = filter_specs = Fcar (XCDR (form)); + else goto lose; - filter_specs = Fnth (make_number (1), specs); - specs = Fcar (Fcdr (specs)); } - else - goto lose; /* If either SPECS or STRING is set to a string, use it. */ if (STRINGP (specs)) @@ -395,6 +396,12 @@ supply if the command inquires which events were used to invoke it. */) XSETCDR (teml, Qnil); } } + + Vthis_command = save_this_command; + Vthis_original_command = save_this_original_command; + real_this_command= save_real_this_command; + current_kboard->Vlast_command = save_last_command; + single_kboard_state (); return apply1 (function, specs); } @@ -841,6 +848,11 @@ supply if the command inquires which events were used to invoke it. */) if (record_then_fail) Fbarf_if_buffer_read_only (); + Vthis_command = save_this_command; + Vthis_original_command = save_this_original_command; + real_this_command= save_real_this_command; + current_kboard->Vlast_command = save_last_command; + single_kboard_state (); { @@ -978,3 +990,6 @@ a way to turn themselves off when a mouse command switches windows. */); defsubr (&Scall_interactively); defsubr (&Sprefix_numeric_value); } + +/* arch-tag: a3a7cad7-bcac-42ce-916e-1bd2546ebf37 + (do not change this comment) */ diff --git a/src/callproc.c b/src/callproc.c index 20b3ee22ad..2b610d53a1 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -123,6 +123,9 @@ int synch_process_alive; /* Nonzero => this is a string explaining death of synchronous subprocess. */ char *synch_process_death; +/* Nonzero => this is the signal number that terminated the subprocess. */ +int synch_process_termsig; + /* If synch_process_death is zero, this is exit code of synchronous subprocess. */ int synch_process_retcode; @@ -502,6 +505,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) to avoid timing error if process terminates soon. */ synch_process_death = 0; synch_process_retcode = 0; + synch_process_termsig = 0; if (NILP (error_file)) fd_error = emacs_open (NULL_DEVICE, O_WRONLY, 0); @@ -861,6 +865,19 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) unbind_to (count, Qnil); + if (synch_process_termsig) + { + char *signame; + + synchronize_system_messages_locale (); + signame = strsignal (synch_process_termsig); + + if (signame == 0) + signame = "unknown"; + + synch_process_death = signame; + } + if (synch_process_death) return code_convert_string_norecord (build_string (synch_process_death), Vlocale_coding_system, 0); @@ -1567,3 +1584,6 @@ See `setenv' and `getenv'. */); #endif defsubr (&Scall_process_region); } + +/* arch-tag: 769b8045-1df7-4d2b-8968-e3fb49017f95 + (do not change this comment) */ diff --git a/src/casefiddle.c b/src/casefiddle.c index 1e502af9c0..341e3b313a 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -411,3 +411,6 @@ keys_of_casefiddle () initial_define_key (meta_map, 'l', "downcase-word"); initial_define_key (meta_map, 'c', "capitalize-word"); } + +/* arch-tag: 60a73c66-5489-47e7-a81f-cead4057c526 + (do not change this comment) */ diff --git a/src/casetab.c b/src/casetab.c index 9ee8f578a9..af0b238029 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -307,3 +307,6 @@ syms_of_casetab () defsubr (&Sset_case_table); defsubr (&Sset_standard_case_table); } + +/* arch-tag: e06388ad-99fe-40ec-ba67-9d010fcc4916 + (do not change this comment) */ diff --git a/src/ccl.c b/src/ccl.c index 528e7d5a43..5eac485bf2 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -1697,7 +1697,7 @@ ccl_driver (ccl, source, destination, src_size, dst_size, charset_list) break; default: - sprintf(msg, "\nCCL: Unknown error type (%d).", ccl->status); + sprintf(msg, "\nCCL: Unknown error type (%d)", ccl->status); } msglen = strlen (msg); @@ -2290,3 +2290,6 @@ used by CCL. */); defsubr (&Sregister_ccl_program); defsubr (&Sregister_code_conversion_map); } + +/* arch-tag: bb9a37be-68ce-4576-8d3d-15d750e4a860 + (do not change this comment) */ diff --git a/src/ccl.h b/src/ccl.h index e1b8285df1..5f57f1f771 100644 --- a/src/ccl.h +++ b/src/ccl.h @@ -112,3 +112,6 @@ EXFUN (Fccl_program_p, 1); } while (0); #endif /* EMACS_CCL_H */ + +/* arch-tag: 14681df7-876d-43de-bc71-6b78e23a4e3c + (do not change this comment) */ diff --git a/src/chartab.c b/src/chartab.c index c33ec0e7d0..71940761bf 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -512,7 +512,7 @@ then the actual applicable value is inherited from the parent char-table DEFUN ("set-char-table-parent", Fset_char_table_parent, Sset_char_table_parent, 2, 2, 0, doc: /* Set the parent char-table of CHAR-TABLE to PARENT. -PARENT must be either nil or another char-table. */) +Return PARENT. PARENT must be either nil or another char-table. */) (char_table, parent) Lisp_Object char_table, parent; { @@ -597,10 +597,10 @@ a cons of character codes (for characters in the range), or a character code. * DEFUN ("set-char-table-range", Fset_char_table_range, Sset_char_table_range, 3, 3, 0, - doc: /* -Set the value in CHAR-TABLE for characters specified by RANGE to VALUE. + doc: /* Set the value in CHAR-TABLE for a range of characters RANGE to VALUE. RANGE should be t (for all characters), nil (for the default value), -a cons of character codes (for characters in the range), or a character code. */) +a cons of character codes (for characters in the range), +or a character code. Return VALUE. */) (char_table, range, value) Lisp_Object char_table, range, value; { diff --git a/src/chpdef.h b/src/chpdef.h index 43f7bbf434..a1bdfb7ff8 100644 --- a/src/chpdef.h +++ b/src/chpdef.h @@ -36,3 +36,6 @@ #define CHP$V_READ 0 #define CHP$V_WRITE 1 #define CHP$V_USEREADALL 2 + +/* arch-tag: a7117984-e927-4f8e-932e-35d5fd524f12 + (do not change this comment) */ diff --git a/src/cm.c b/src/cm.c index 5657062b5b..dcff504846 100644 --- a/src/cm.c +++ b/src/cm.c @@ -460,3 +460,6 @@ Wcm_init () return - 2; return 0; } + +/* arch-tag: bcf64c02-00f6-44ef-94b6-c56eab5b3dc4 + (do not change this comment) */ diff --git a/src/cm.h b/src/cm.h index 5619ab2814..5500c5ce58 100644 --- a/src/cm.h +++ b/src/cm.h @@ -168,3 +168,6 @@ extern void cmcostinit (); extern void cmgoto (); extern void Wcm_clear (); extern int Wcm_init (); + +/* arch-tag: acc1535a-7136-49d6-b22d-9bc85702251b + (do not change this comment) */ diff --git a/src/cmds.c b/src/cmds.c index 2e63b2fbb5..1ac81af45a 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -181,7 +181,7 @@ DEFUN ("end-of-line", Fend_of_line, Send_of_line, 0, 1, "p", doc: /* Move point to end of current line. With argument N not nil or 1, move forward N - 1 lines first. If point reaches the beginning or end of buffer, it stops there. -To ignore intangibility, bind `inhibit-text-motion-hooks' to t. +To ignore intangibility, bind `inhibit-point-motion-hooks' to t. This command does not move point across a field boundary unless doing so would move beyond there to a different line; if N is nil or 1, and @@ -627,3 +627,6 @@ keys_of_cmds () initial_define_key (global_map, Ctl ('F'), "forward-char"); initial_define_key (global_map, 0177, "delete-backward-char"); } + +/* arch-tag: 022ba3cd-67f9-4978-9c5d-7d2b18d8644e + (do not change this comment) */ diff --git a/src/commands.h b/src/commands.h index d830573b58..f7831bc36a 100644 --- a/src/commands.h +++ b/src/commands.h @@ -90,3 +90,6 @@ extern int update_mode_lines; so put cursor on minibuffer after the prompt. */ extern int cursor_in_echo_area; + +/* arch-tag: 4f7ca0b7-6a56-4b20-8bf5-b67a99921d1d + (do not change this comment) */ diff --git a/src/composite.h b/src/composite.h index d8c1fed433..5d4dd024ce 100644 --- a/src/composite.h +++ b/src/composite.h @@ -224,3 +224,6 @@ extern void compose_text P_ ((int, int, Lisp_Object, Lisp_Object, extern void compose_chars_in_text P_ ((int, int, Lisp_Object)); #endif /* not EMACS_COMPOSITE_H */ + +/* arch-tag: 59524d89-c645-47bd-b5e6-65e861690118 + (do not change this comment) */ diff --git a/src/config.in b/src/config.in index 5507ded42e..0fb4b3f344 100644 --- a/src/config.in +++ b/src/config.in @@ -163,6 +163,9 @@ Boston, MA 02111-1307, USA. */ /* Define to 1 if you have the `gai_strerror' function. */ #undef HAVE_GAI_STRERROR +/* Define to 1 if you have the `gdk_display_open' function. */ +#undef HAVE_GDK_DISPLAY_OPEN + /* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO @@ -214,6 +217,9 @@ Boston, MA 02111-1307, USA. */ /* Define to 1 if using GTK. */ #undef HAVE_GTK +/* Define to 1 if GTK can handle more than one display. */ +#undef HAVE_GTK_MULTIDISPLAY + /* Define to 1 if netdb.h declares h_errno. */ #undef HAVE_H_ERRNO @@ -399,6 +405,9 @@ Boston, MA 02111-1307, USA. */ /* Define to 1 if you have the `mremap' function. */ #undef HAVE_MREMAP +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_IF_H + /* Define to 1 if you have the header file. */ #undef HAVE_NLIST_H @@ -498,6 +507,21 @@ Boston, MA 02111-1307, USA. */ /* Define to 1 if you have the `strsignal' function. */ #undef HAVE_STRSIGNAL +/* Define to 1 if `ifr_addr' is member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_ADDR + +/* Define to 1 if `ifr_broadaddr' is member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_BROADADDR + +/* Define to 1 if `ifr_flags' is member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_FLAGS + +/* Define to 1 if `ifr_hwaddr' is member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_HWADDR + +/* Define to 1 if `ifr_netmask' is member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_NETMASK + /* Define to 1 if `n_un.n_name' is member of `struct nlist'. */ #undef HAVE_STRUCT_NLIST_N_UN_N_NAME @@ -510,6 +534,9 @@ Boston, MA 02111-1307, USA. */ /* Define to 1 if you have the `sysinfo' function. */ #undef HAVE_SYSINFO +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H @@ -522,6 +549,9 @@ Boston, MA 02111-1307, USA. */ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOUNDCARD_H @@ -721,9 +751,9 @@ Boston, MA 02111-1307, USA. */ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ diff --git a/src/cxux-crt0.s b/src/cxux-crt0.s index cf973b1708..615837eaeb 100644 --- a/src/cxux-crt0.s +++ b/src/cxux-crt0.s @@ -36,3 +36,6 @@ __start: .data .globl _data_start _data_start: .space 4 + +/* arch-tag: ba84e4dc-615d-4a81-898c-f5b98ec71c9d + (do not change this comment) */ diff --git a/src/data.c b/src/data.c index 0e2a704f52..92e1c75dee 100644 --- a/src/data.c +++ b/src/data.c @@ -1,5 +1,5 @@ /* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter. - Copyright (C) 1985,86,88,93,94,95,97,98,99, 2000, 2001, 2003 + Copyright (C) 1985,86,88,93,94,95,97,98,99, 2000, 2001, 03, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -71,6 +71,7 @@ Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch; Lisp_Object Qend_of_file, Qarith_error, Qmark_inactive; Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only; Lisp_Object Qtext_read_only; + Lisp_Object Qintegerp, Qnatnump, Qwholenump, Qsymbolp, Qlistp, Qconsp; Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp; @@ -87,7 +88,8 @@ Lisp_Object Qoverflow_error, Qunderflow_error; Lisp_Object Qfloatp; Lisp_Object Qnumberp, Qnumber_or_marker_p; -static Lisp_Object Qinteger, Qsymbol, Qstring, Qcons, Qmarker, Qoverlay; +Lisp_Object Qinteger; +static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay; static Lisp_Object Qfloat, Qwindow_configuration, Qwindow; Lisp_Object Qprocess; static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector; @@ -728,7 +730,7 @@ determined by DEFINITION. */) } DEFUN ("setplist", Fsetplist, Ssetplist, 2, 2, 0, - doc: /* Set SYMBOL's property list to NEWVAL, and return NEWVAL. */) + doc: /* Set SYMBOL's property list to NEWPLIST, and return NEWPLIST. */) (symbol, newplist) register Lisp_Object symbol, newplist; { @@ -759,17 +761,39 @@ function with `&rest' args, or `unevalled' for a special form. */) return Fcons (make_number (minargs), make_number (maxargs)); } -DEFUN ("subr-interactive-form", Fsubr_interactive_form, Ssubr_interactive_form, 1, 1, 0, - doc: /* Return the interactive form of SUBR or nil if none. -SUBR must be a built-in function. Value, if non-nil, is a list +DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, + doc: /* Return the interactive form of CMD or nil if none. +CMD must be a command. Value, if non-nil, is a list \(interactive SPEC). */) - (subr) - Lisp_Object subr; + (cmd) + Lisp_Object cmd; { - if (!SUBRP (subr)) - wrong_type_argument (Qsubrp, subr); - if (XSUBR (subr)->prompt) - return list2 (Qinteractive, build_string (XSUBR (subr)->prompt)); + Lisp_Object fun = indirect_function (cmd); + + if (SUBRP (fun)) + { + if (XSUBR (fun)->prompt) + return list2 (Qinteractive, build_string (XSUBR (fun)->prompt)); + } + else if (COMPILEDP (fun)) + { + if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) > COMPILED_INTERACTIVE) + return list2 (Qinteractive, AREF (fun, COMPILED_INTERACTIVE)); + } + else if (CONSP (fun)) + { + Lisp_Object funcar = XCAR (fun); + if (EQ (funcar, Qlambda)) + return Fassq (Qinteractive, Fcdr (XCDR (fun))); + else if (EQ (funcar, Qautoload)) + { + struct gcpro gcpro1; + GCPRO1 (cmd); + do_autoload (fun, cmd); + UNGCPRO; + return Finteractive_form (cmd); + } + } return Qnil; } @@ -871,6 +895,8 @@ store_symval_forwarding (symbol, valcontents, newval, buf) register Lisp_Object valcontents, newval; struct buffer *buf; { + int offset; + switch (SWITCH_ENUM_CAST (XTYPE (valcontents))) { case Lisp_Misc: @@ -890,6 +916,36 @@ store_symval_forwarding (symbol, valcontents, newval, buf) case Lisp_Misc_Objfwd: *XOBJFWD (valcontents)->objvar = newval; + + /* If this variable is a default for something stored + in the buffer itself, such as default-fill-column, + find the buffers that don't have local values for it + and update them. */ + if (XOBJFWD (valcontents)->objvar > (Lisp_Object *) &buffer_defaults + && XOBJFWD (valcontents)->objvar < (Lisp_Object *) (&buffer_defaults + 1)) + { + int offset = ((char *) XOBJFWD (valcontents)->objvar + - (char *) &buffer_defaults); + int idx = PER_BUFFER_IDX (offset); + + Lisp_Object tail, buf; + + if (idx <= 0) + break; + + for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) + { + Lisp_Object buf; + struct buffer *b; + + buf = Fcdr (XCAR (tail)); + if (!BUFFERP (buf)) continue; + b = XBUFFER (buf); + + if (! PER_BUFFER_VALUE_P (b, idx)) + PER_BUFFER_VALUE (b, offset) = newval; + } + } break; case Lisp_Misc_Buffer_Objfwd: @@ -1449,6 +1505,7 @@ The function `default-value' gets the default value and `set-default' sets it. register Lisp_Object tem, valcontents, newval; CHECK_SYMBOL (variable); + variable = indirect_variable (variable); valcontents = SYMBOL_VALUE (variable); if (EQ (variable, Qnil) || EQ (variable, Qt) || KBOARD_OBJFWDP (valcontents)) @@ -1502,6 +1559,7 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) register Lisp_Object tem, valcontents; CHECK_SYMBOL (variable); + variable = indirect_variable (variable); valcontents = SYMBOL_VALUE (variable); if (EQ (variable, Qnil) || EQ (variable, Qt) || KBOARD_OBJFWDP (valcontents)) @@ -1581,6 +1639,7 @@ From now on the default value will apply in this buffer. Return VARIABLE. */) register Lisp_Object tem, valcontents; CHECK_SYMBOL (variable); + variable = indirect_variable (variable); valcontents = SYMBOL_VALUE (variable); @@ -1645,6 +1704,7 @@ See `modify-frame-parameters' for how to set frame parameters. */) register Lisp_Object tem, valcontents, newval; CHECK_SYMBOL (variable); + variable = indirect_variable (variable); valcontents = SYMBOL_VALUE (variable); if (EQ (variable, Qnil) || EQ (variable, Qt) || KBOARD_OBJFWDP (valcontents) @@ -1694,6 +1754,7 @@ BUFFER defaults to the current buffer. */) } CHECK_SYMBOL (variable); + variable = indirect_variable (variable); valcontents = SYMBOL_VALUE (variable); if (BUFFER_LOCAL_VALUEP (valcontents) @@ -1701,7 +1762,6 @@ BUFFER defaults to the current buffer. */) { Lisp_Object tail, elt; - variable = indirect_variable (variable); for (tail = buf->local_var_alist; CONSP (tail); tail = XCDR (tail)) { elt = XCAR (tail); @@ -1738,6 +1798,7 @@ BUFFER defaults to the current buffer. */) } CHECK_SYMBOL (variable); + variable = indirect_variable (variable); valcontents = SYMBOL_VALUE (variable); @@ -1759,6 +1820,41 @@ BUFFER defaults to the current buffer. */) } return Qnil; } + +DEFUN ("variable-binding-locus", Fvariable_binding_locus, Svariable_binding_locus, + 1, 1, 0, + doc: /* Return a value indicating where VARIABLE's current binding comes from. +If the current binding is buffer-local, the value is the current buffer. +If the current binding is frame-local, the value is the selected frame. +If the current binding is global (the default), the value is nil. */) + (variable) + register Lisp_Object variable; +{ + Lisp_Object valcontents; + + CHECK_SYMBOL (variable); + variable = indirect_variable (variable); + + /* Make sure the current binding is actually swapped in. */ + find_symbol_value (variable); + + valcontents = XSYMBOL (variable)->value; + + if (BUFFER_LOCAL_VALUEP (valcontents) + || SOME_BUFFER_LOCAL_VALUEP (valcontents) + || BUFFER_OBJFWDP (valcontents)) + { + /* For a local variable, record both the symbol and which + buffer's or frame's value we are saving. */ + if (!NILP (Flocal_variable_p (variable, Qnil))) + return Fcurrent_buffer (); + else if (!BUFFER_OBJFWDP (valcontents) + && XBUFFER_LOCAL_VALUE (valcontents)->found_for_frame) + return XBUFFER_LOCAL_VALUE (valcontents)->frame; + } + + return Qnil; +} /* Find the function at the end of a chain of symbol function indirections. */ @@ -2701,6 +2797,20 @@ DEFUN ("lognot", Flognot, Slognot, 1, 1, 0, XSETINT (number, ~XINT (number)); return number; } + +DEFUN ("byteorder", Fbyteorder, Sbyteorder, 0, 0, 0, + doc: /* Return the byteorder for the machine. +Returns 66 (ASCII uppercase B) for big endian machines or 108 (ASCII +lowercase l) for small endian machines. */) + () +{ + unsigned i = 0x04030201; + int order = *(char *)&i == 1 ? 108 : 66; + + return make_number (order); +} + + void syms_of_data () @@ -3017,7 +3127,7 @@ syms_of_data () staticpro (&Qhash_table); defsubr (&Sindirect_variable); - defsubr (&Ssubr_interactive_form); + defsubr (&Sinteractive_form); defsubr (&Seq); defsubr (&Snull); defsubr (&Stype_of); @@ -3075,6 +3185,7 @@ syms_of_data () defsubr (&Smake_variable_frame_local); defsubr (&Slocal_variable_p); defsubr (&Slocal_variable_if_set_p); + defsubr (&Svariable_binding_locus); defsubr (&Saref); defsubr (&Saset); defsubr (&Snumber_to_string); @@ -3102,6 +3213,7 @@ syms_of_data () defsubr (&Sadd1); defsubr (&Ssub1); defsubr (&Slognot); + defsubr (&Sbyteorder); defsubr (&Ssubr_arity); XSYMBOL (Qwholenump)->function = XSYMBOL (Qnatnump)->function; @@ -3154,3 +3266,6 @@ init_data () signal (SIGEMT, arith_error); #endif /* uts */ } + +/* arch-tag: 25879798-b84d-479a-9c89-7d148e2109f7 + (do not change this comment) */ diff --git a/src/dired.c b/src/dired.c index bcb0be12f8..71597ebc9e 100644 --- a/src/dired.c +++ b/src/dired.c @@ -1,5 +1,5 @@ /* Lisp functions for making directory listings. - Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001 + Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -26,6 +26,13 @@ Boston, MA 02111-1307, USA. */ #include #include +#ifdef VMS +#include "vms-pwd.h" +#else +#include +#include +#endif + #include "systime.h" #include @@ -133,12 +140,14 @@ directory_files_internal_unwind (dh) /* Function shared by Fdirectory_files and Fdirectory_files_and_attributes. When ATTRS is zero, return a list of directory filenames; when - non-zero, return a list of directory filenames and their attributes. */ + non-zero, return a list of directory filenames and their attributes. + In the latter case, ID_FORMAT is passed to Ffile_attributes. */ Lisp_Object -directory_files_internal (directory, full, match, nosort, attrs) +directory_files_internal (directory, full, match, nosort, attrs, id_format) Lisp_Object directory, full, match, nosort; int attrs; + Lisp_Object id_format; { DIR *d; int directory_nbytes; @@ -296,7 +305,7 @@ directory_files_internal (directory, full, match, nosort, attrs) /* Both Fexpand_file_name and Ffile_attributes can GC. */ decoded_fullname = Fexpand_file_name (name, directory); - fileattrs = Ffile_attributes (decoded_fullname); + fileattrs = Ffile_attributes (decoded_fullname, id_format); list = Fcons (Fcons (finalname, fileattrs), list); UNGCPRO; @@ -351,32 +360,25 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. call the corresponding file handler. */ handler = Ffind_file_name_handler (directory, Qdirectory_files); if (!NILP (handler)) - { - Lisp_Object args[6]; - - args[0] = handler; - args[1] = Qdirectory_files; - args[2] = directory; - args[3] = full; - args[4] = match; - args[5] = nosort; - return Ffuncall (6, args); - } + return call5 (handler, Qdirectory_files, directory, + full, match, nosort); - return directory_files_internal (directory, full, match, nosort, 0); + return directory_files_internal (directory, full, match, nosort, 0, Qnil); } DEFUN ("directory-files-and-attributes", Fdirectory_files_and_attributes, - Sdirectory_files_and_attributes, 1, 4, 0, + Sdirectory_files_and_attributes, 1, 5, 0, doc: /* Return a list of names of files and their attributes in DIRECTORY. -There are three optional arguments: +There are four optional arguments: If FULL is non-nil, return absolute file names. Otherwise return names that are relative to the specified directory. If MATCH is non-nil, mention only file names that match the regexp MATCH. If NOSORT is non-nil, the list is not sorted--its order is unpredictable. - NOSORT is useful if you plan to sort the result yourself. */) - (directory, full, match, nosort) - Lisp_Object directory, full, match, nosort; + NOSORT is useful if you plan to sort the result yourself. +ID-FORMAT specifies the preferred format of attributes uid and gid, see +`file-attributes' for further documentation. */) + (directory, full, match, nosort, id_format) + Lisp_Object directory, full, match, nosort, id_format; { Lisp_Object handler; directory = Fexpand_file_name (directory, Qnil); @@ -385,19 +387,10 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. call the corresponding file handler. */ handler = Ffind_file_name_handler (directory, Qdirectory_files_and_attributes); if (!NILP (handler)) - { - Lisp_Object args[6]; - - args[0] = handler; - args[1] = Qdirectory_files_and_attributes; - args[2] = directory; - args[3] = full; - args[4] = match; - args[5] = nosort; - return Ffuncall (6, args); - } + return call6 (handler, Qdirectory_files_and_attributes, + directory, full, match, nosort, id_format); - return directory_files_internal (directory, full, match, nosort, 1); + return directory_files_internal (directory, full, match, nosort, 1, id_format); } @@ -873,14 +866,21 @@ make_time (time) Fcons (make_number (time & 0177777), Qnil)); } -DEFUN ("file-attributes", Ffile_attributes, Sfile_attributes, 1, 1, 0, +DEFUN ("file-attributes", Ffile_attributes, Sfile_attributes, 1, 2, 0, doc: /* Return a list of attributes of file FILENAME. Value is nil if specified file cannot be opened. -Otherwise, list elements are: + +ID-FORMAT specifies the preferred format of attributes uid and gid (see +below) - valid values are 'string and 'integer. The latter is the default, +but we plan to change that, so you should specify a non-nil value for +ID-FORMAT if you use the returned uid or gid. + +Elements of the attribute list are: 0. t for directory, string (name linked to) for symbolic link, or nil. 1. Number of links to file. - 2. File uid. - 3. File gid. + 2. File uid as a string or an integer. If a string value cannot be + looked up, the integer value is returned. + 3. File gid, likewise. 4. Last access time, as a list of two integers. First integer has high-order 16 bits of time, second has low 16 bits. 5. Last modification time, likewise. @@ -893,15 +893,15 @@ Otherwise, list elements are: this is a cons cell containing two integers: first the high part, then the low 16 bits. 11. Device number. If it is larger than the Emacs integer, this is - a cons cell, similar to the inode number. - -If file does not exist, returns nil. */) - (filename) - Lisp_Object filename; + a cons cell, similar to the inode number. */) + (filename, id_format) + Lisp_Object filename, id_format; { Lisp_Object values[12]; Lisp_Object encoded; struct stat s; + struct passwd *pw; + struct group *gr; #if defined (BSD4_2) || defined (BSD4_3) Lisp_Object dirname; struct stat sdir; @@ -915,7 +915,13 @@ If file does not exist, returns nil. */) call the corresponding file handler. */ handler = Ffind_file_name_handler (filename, Qfile_attributes); if (!NILP (handler)) - return call2 (handler, Qfile_attributes, filename); + { /* Only pass the extra arg if it is used to help backward compatibility + with old file handlers which do not implement the new arg. --Stef */ + if (NILP (id_format)) + return call2 (handler, Qfile_attributes, filename); + else + return call3 (handler, Qfile_attributes, filename, id_format); + } encoded = ENCODE_FILE (filename); @@ -934,8 +940,18 @@ If file does not exist, returns nil. */) #endif } values[1] = make_number (s.st_nlink); - values[2] = make_number (s.st_uid); - values[3] = make_number (s.st_gid); + if (NILP (id_format) || EQ (id_format, Qinteger)) + { + values[2] = make_number (s.st_uid); + values[3] = make_number (s.st_gid); + } + else + { + pw = (struct passwd *) getpwuid (s.st_uid); + values[2] = (pw ? build_string (pw->pw_name) : make_number (s.st_uid)); + gr = (struct group *) getgrgid (s.st_gid); + values[3] = (gr ? build_string (gr->gr_name) : make_number (s.st_gid)); + } values[4] = make_time (s.st_atime); values[5] = make_time (s.st_mtime); values[6] = make_time (s.st_ctime); @@ -1030,3 +1046,6 @@ This variable does not affect lists of possible completions, but does affect the commands that actually do completions. */); Vcompletion_ignored_extensions = Qnil; } + +/* arch-tag: 1ac8deca-4d8f-4d41-ade9-089154d98c03 + (do not change this comment) */ diff --git a/src/dispextern.h b/src/dispextern.h index 03eda50d71..f2cd03e968 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -50,54 +50,30 @@ typedef struct { #ifdef HAVE_X_WINDOWS typedef struct x_display_info Display_Info; +typedef XImage * XImagePtr; +typedef XImagePtr XImagePtr_or_DC; #define NativeRectangle XRectangle #endif #ifdef HAVE_NTGUI #include "w32gui.h" typedef struct w32_display_info Display_Info; +typedef XImage *XImagePtr; +typedef HDC XImagePtr_or_DC; #endif #ifdef HAVE_CARBON #include "macgui.h" typedef struct mac_display_info Display_Info; - -/* Include Carbon.h to define Cursor and Rect. */ -#undef mktime -#undef DEBUG -#undef Z -#undef free -#undef malloc -#undef realloc -/* Macros max and min defined in lisp.h conflict with those in - precompiled header Carbon.h. */ -#undef max -#undef min -#undef init_process -#include -#undef Z -#define Z (current_buffer->text->z) -#undef free -#define free unexec_free -#undef malloc -#define malloc unexec_malloc -#undef realloc -#define realloc unexec_realloc -#undef min -#define min(a, b) ((a) < (b) ? (a) : (b)) -#undef max -#define max(a, b) ((a) > (b) ? (a) : (b)) -#undef init_process -#define init_process emacs_init_process - +/* Mac equivalent of XImage. */ +typedef Pixmap XImagePtr; +typedef XImagePtr XImagePtr_or_DC; #endif - #ifndef NativeRectangle #define NativeRectangle int #endif - /* Structure forward declarations. Some are here because function prototypes below reference structure types before their definition in this file. Some are here because not every file including @@ -126,6 +102,9 @@ enum window_part ON_RIGHT_MARGIN }; +/* Number of bits allocated to store fringe bitmap numbers. */ +#define FRINGE_ID_BITS 8 + /*********************************************************************** @@ -321,6 +300,9 @@ struct glyph /* Width in pixels. */ short pixel_width; + /* Ascent and descent in pixels. */ + short ascent, descent; + /* Vertical offset. If < 0, the glyph is displayed raised, if > 0 the glyph is displayed lowered. */ short voffset; @@ -359,8 +341,10 @@ struct glyph doesn't have a glyph in a font. */ unsigned glyph_not_available_p : 1; +#define FACE_ID_BITS 21 + /* Face of the glyph. */ - unsigned face_id : 21; + unsigned face_id : FACE_ID_BITS; /* Type of font used to display the character glyph. May be used to determine which set of functions to use to obtain font metrics @@ -704,6 +688,33 @@ struct glyph_row position of the next row. */ struct display_pos end; + /* Left fringe bitmap number (enum fringe_bitmap_type). */ + unsigned left_user_fringe_bitmap : FRINGE_ID_BITS; + + /* Face of the left fringe glyph. */ + unsigned left_user_fringe_face_id : FACE_ID_BITS; + + /* Right fringe bitmap number (enum fringe_bitmap_type). */ + unsigned right_user_fringe_bitmap : FRINGE_ID_BITS; + + /* Face of the right fringe glyph. */ + unsigned right_user_fringe_face_id : FACE_ID_BITS; + + /* Left fringe bitmap number (enum fringe_bitmap_type). */ + unsigned left_fringe_bitmap : FRINGE_ID_BITS; + + /* Face of the left fringe glyph. */ + unsigned left_fringe_face_id : FACE_ID_BITS; + + /* Right fringe bitmap number (enum fringe_bitmap_type). */ + unsigned right_fringe_bitmap : FRINGE_ID_BITS; + + /* Face of the right fringe glyph. */ + unsigned right_fringe_face_id : FACE_ID_BITS; + + /* 1 means that we must draw the bitmaps of this row. */ + unsigned redraw_fringe_bitmaps_p : 1; + /* In a desired matrix, 1 means that this row must be updated. In a current matrix, 0 means that the row has been invalidated, i.e. the row's contents do not agree with what is visible on the @@ -772,6 +783,29 @@ struct glyph_row /* 1 means this row was ended by a newline from a string. */ unsigned ends_in_newline_from_string_p : 1; + /* 1 means this row width is exactly the width of the window, and the + final newline character is hidden in the right fringe. */ + unsigned exact_window_width_line_p : 1; + + /* 1 means this row currently shows the cursor in the right fringe. */ + unsigned cursor_in_fringe_p : 1; + + /* Non-zero means display a bitmap on X frames indicating that this + the first line of the buffer. */ + unsigned indicate_bob_p : 1; + + /* Non-zero means display a bitmap on X frames indicating that this + the top line of the window, but not start of the buffer. */ + unsigned indicate_top_line_p : 1; + + /* Non-zero means display a bitmap on X frames indicating that this + the last line of the buffer. */ + unsigned indicate_eob_p : 1; + + /* Non-zero means display a bitmap on X frames indicating that this + the bottom line of the window, but not end of the buffer. */ + unsigned indicate_bottom_line_p : 1; + /* Continuation lines width at the start of the row. */ int continuation_lines_width; }; @@ -1486,6 +1520,7 @@ enum face_id BASIC_FACE_ID_SENTINEL }; +#define MAX_FACE_ID ((1 << FACE_ID_BITS) - 1) /* A cache of realized faces. Each frame has its own cache because Emacs allows different frame-local face definitions. */ @@ -1564,26 +1599,6 @@ extern int face_change_count; Fringes ***********************************************************************/ -enum fringe_bitmap_type -{ - NO_FRINGE_BITMAP = 0, - LEFT_TRUNCATION_BITMAP, - RIGHT_TRUNCATION_BITMAP, - CONTINUED_LINE_BITMAP, - CONTINUATION_LINE_BITMAP, - OVERLAY_ARROW_BITMAP, - ZV_LINE_BITMAP, - MAX_FRINGE_BITMAPS -}; - -struct fringe_bitmap -{ - int width; - int height; - int period; - unsigned char *bits; -}; - /* Structure used to describe where and how to draw a fringe bitmap. WHICH is the fringe bitmap to draw. WD and H is the (adjusted) width and height of the bitmap, DH is the height adjustment (if @@ -1594,14 +1609,17 @@ struct fringe_bitmap struct draw_fringe_bitmap_params { - enum fringe_bitmap_type which; + int which; /* enum fringe_bitmap_type */ + unsigned short *bits; int wd, h, dh; int x, y; int bx, nx, by, ny; + unsigned cursor_p : 1; + unsigned overlay_p : 1; struct face *face; }; -extern struct fringe_bitmap fringe_bitmaps[MAX_FRINGE_BITMAPS]; +#define MAX_FRINGE_BITMAPS (1<header_line_p; } matrix->header_line_p = header_line_p; - /* Do nothing if MATRIX' size, position, vscroll, and marginal areas + /* If POOL is null, MATRIX is a window matrix for window-based redisplay. + Do nothing if MATRIX' size, position, vscroll, and marginal areas haven't changed. This optimization is important because preserving the matrix means preventing redisplay. */ if (matrix->pool == NULL) { - window_box (w, -1, 0, 0, &window_width, &window_height); left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_cols); right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_cols); xassert (left >= 0 && right >= 0); @@ -723,7 +726,8 @@ adjust_glyph_matrix (w, matrix, x, y, dim) else { /* If MATRIX->pool is null, MATRIX is responsible for managing - its own memory. Allocate glyph memory from the heap. */ + its own memory. It is a window matrix for window-based redisplay. + Allocate glyph memory from the heap. */ if (dim.width > matrix->matrix_w || new_rows || header_line_changed_p @@ -1509,12 +1513,14 @@ row_equal_p (w, a, b, mouse_face_p) return 0; } - if (a->truncated_on_left_p != b->truncated_on_left_p - || a->fill_line_p != b->fill_line_p - || a->truncated_on_right_p != b->truncated_on_right_p + if (a->fill_line_p != b->fill_line_p + || a->cursor_in_fringe_p != b->cursor_in_fringe_p + || a->left_fringe_bitmap != b->left_fringe_bitmap + || a->left_fringe_face_id != b->left_fringe_face_id + || a->right_fringe_bitmap != b->right_fringe_bitmap + || a->right_fringe_face_id != b->right_fringe_face_id || a->overlay_arrow_p != b->overlay_arrow_p - || a->continued_p != b->continued_p - || a->indicate_empty_line_p != b->indicate_empty_line_p + || a->exact_window_width_line_p != b->exact_window_width_line_p || a->overlapped_p != b->overlapped_p || (MATRIX_ROW_CONTINUATION_LINE_P (a) != MATRIX_ROW_CONTINUATION_LINE_P (b)) @@ -3432,6 +3438,7 @@ direct_output_for_insert (g) /* Can't do it in a continued line because continuation lines would change. */ (glyph_row->continued_p + || glyph_row->exact_window_width_line_p /* Can't use this method if the line overlaps others or is overlapped by others because these other lines would have to be redisplayed. */ @@ -3637,6 +3644,10 @@ direct_output_for_insert (g) cursor_to (y, x); } +#ifdef HAVE_WINDOW_SYSTEM + update_window_fringes (w, 0); +#endif + if (rif) rif->update_window_end_hook (w, 1, 0); update_end (f); @@ -3804,10 +3815,15 @@ update_frame (f, force_p, inhibit_hairy_id_p) paused_p = update_window_tree (root_window, force_p); update_end (f); -#if 0 /* This flush is a performance bottleneck under X, - and it doesn't seem to be necessary anyway. */ - rif->flush_display (f); -#endif + /* This flush is a performance bottleneck under X, + and it doesn't seem to be necessary anyway (in general). + It is necessary when resizing the window with the mouse, or + at least the fringes are not redrawn in a timely manner. ++kfs */ + if (f->force_flush_display_p) + { + rif->flush_display (f); + f->force_flush_display_p = 0; + } } else { @@ -4100,19 +4116,11 @@ update_window (w, force_p) goto set_cursor; } else if (rc > 0) - /* We've scrolled the display. */ - force_p = 1; - changed_p = 1; - } - - /* Update the header line after scrolling because a new header - line would otherwise overwrite lines at the top of the window - that can be scrolled. */ - if (header_line_row && header_line_row->enabled_p) - { - header_line_row->y = 0; - update_window_line (w, 0, &mouse_face_overwritten_p); - changed_p = 1; + { + /* We've scrolled the display. */ + force_p = 1; + changed_p = 1; + } } /* Update the rest of the lines. */ @@ -4151,6 +4159,16 @@ update_window (w, force_p) set_cursor: + /* Update the header line after scrolling because a new header + line would otherwise overwrite lines at the top of the window + that can be scrolled. */ + if (header_line_row && header_line_row->enabled_p) + { + header_line_row->y = 0; + update_window_line (w, 0, &mouse_face_overwritten_p); + changed_p = 1; + } + /* Fix the appearance of overlapping/overlapped rows. */ if (!paused_p && !w->pseudo_window_p) { @@ -4174,6 +4192,10 @@ update_window (w, force_p) strcpy (w->current_matrix->method, w->desired_matrix->method); #endif +#ifdef HAVE_WINDOW_SYSTEM + update_window_fringes (w, 0); +#endif + /* End the update of window W. Don't set the cursor if we paused updating the display because in this case, set_window_cursor_after_update hasn't been called, and @@ -4403,7 +4425,7 @@ update_text_area (w, vpos) /* If old row extends to the end of the text area, clear. */ if (i >= desired_row->used[TEXT_AREA]) rif->cursor_to (vpos, i, desired_row->y, - desired_row->x + desired_row->pixel_width); + desired_row->pixel_width); rif->clear_end_of_line (-1); changed_p = 1; } @@ -4415,7 +4437,7 @@ update_text_area (w, vpos) if (i >= desired_row->used[TEXT_AREA]) rif->cursor_to (vpos, i, desired_row->y, - desired_row->x + desired_row->pixel_width); + desired_row->pixel_width); /* If cursor is displayed at the end of the line, make sure it's cleared. Nowadays we don't have a phys_cursor_glyph @@ -4429,7 +4451,7 @@ update_text_area (w, vpos) x = -1; } else - x = current_row->x + current_row->pixel_width; + x = current_row->pixel_width; rif->clear_end_of_line (x); changed_p = 1; } @@ -4492,13 +4514,11 @@ update_window_line (w, vpos, mouse_face_overwritten_p) if (!current_row->enabled_p || desired_row->y != current_row->y || desired_row->visible_height != current_row->visible_height + || desired_row->cursor_in_fringe_p != current_row->cursor_in_fringe_p || desired_row->overlay_arrow_p != current_row->overlay_arrow_p - || desired_row->truncated_on_left_p != current_row->truncated_on_left_p - || desired_row->truncated_on_right_p != current_row->truncated_on_right_p - || desired_row->continued_p != current_row->continued_p + || current_row->redraw_fringe_bitmaps_p || desired_row->mode_line_p != current_row->mode_line_p - || (desired_row->indicate_empty_line_p - != current_row->indicate_empty_line_p) + || desired_row->exact_window_width_line_p != current_row->exact_window_width_line_p || (MATRIX_ROW_CONTINUATION_LINE_P (desired_row) != MATRIX_ROW_CONTINUATION_LINE_P (current_row))) rif->after_update_window_line_hook (desired_row); @@ -4751,6 +4771,7 @@ scrolling_window (w, header_line_p) if (c->enabled_p && d->enabled_p + && !d->redraw_fringe_bitmaps_p && c->y == d->y && MATRIX_ROW_BOTTOM_Y (c) <= yb && MATRIX_ROW_BOTTOM_Y (d) <= yb @@ -4806,6 +4827,7 @@ scrolling_window (w, header_line_p) && MATRIX_ROW (current_matrix, i - 1)->enabled_p && (MATRIX_ROW (current_matrix, i - 1)->y == MATRIX_ROW (desired_matrix, j - 1)->y) + && !MATRIX_ROW (desired_matrix, j - 1)->redraw_fringe_bitmaps_p && row_equal_p (w, MATRIX_ROW (desired_matrix, i - 1), MATRIX_ROW (current_matrix, j - 1), 1)) @@ -4998,6 +5020,13 @@ scrolling_window (w, header_line_p) to = MATRIX_ROW (current_matrix, r->desired_vpos + j); from = MATRIX_ROW (desired_matrix, r->desired_vpos + j); to_overlapped_p = to->overlapped_p; + if (!from->mode_line_p && !w->pseudo_window_p + && (to->left_fringe_bitmap != from->left_fringe_bitmap + || to->right_fringe_bitmap != from->right_fringe_bitmap + || to->left_fringe_face_id != from->left_fringe_face_id + || to->right_fringe_face_id != from->right_fringe_face_id + || to->overlay_arrow_p != from->overlay_arrow_p)) + from->redraw_fringe_bitmaps_p = 1; assign_row (to, from); to->enabled_p = 1, from->enabled_p = 0; to->overlapped_p = to_overlapped_p; @@ -5008,8 +5037,8 @@ scrolling_window (w, header_line_p) for (i = 0; i < row_entry_idx; ++i) row_table[row_entry_pool[i].bucket] = NULL; - /* Value is non-zero to indicate that we scrolled the display. */ - return 1; + /* Value is > 0 to indicate that we scrolled the display. */ + return nruns; } @@ -5669,21 +5698,25 @@ update_frame_line (f, vpos) ***********************************************************************/ /* Determine what's under window-relative pixel position (*X, *Y). - Return in *OBJECT the object (string or buffer) that's there. - Return in *POS the position in that object. Adjust *X and *Y - to character boundaries. */ + Return the object (string or buffer) that's there. + Return in *POS the position in that object. + Adjust *X and *Y to character positions. */ -void -buffer_posn_from_coords (w, x, y, object, pos) +Lisp_Object +buffer_posn_from_coords (w, x, y, pos, object, dx, dy, width, height) struct window *w; int *x, *y; - Lisp_Object *object; struct display_pos *pos; + Lisp_Object *object; + int *dx, *dy; + int *width, *height; { struct it it; struct buffer *old_current_buffer = current_buffer; struct text_pos startp; - int left_area_width; + Lisp_Object string; + struct glyph_row *row; + int x0, x1; current_buffer = XBUFFER (w->buffer); SET_TEXT_POS_FROM_MARKER (startp, w->start); @@ -5691,40 +5724,91 @@ buffer_posn_from_coords (w, x, y, object, pos) BYTEPOS (startp) = min (ZV_BYTE, max (BEGV_BYTE, BYTEPOS (startp))); start_display (&it, w, startp); - left_area_width = WINDOW_LEFT_MARGIN_WIDTH (w); - move_it_to (&it, -1, *x + it.first_visible_x - left_area_width, *y, -1, + x0 = *x - WINDOW_LEFT_MARGIN_WIDTH (w); + move_it_to (&it, -1, x0 + it.first_visible_x, *y, -1, MOVE_TO_X | MOVE_TO_Y); - *x = it.current_x - it.first_visible_x + left_area_width; - *y = it.current_y; current_buffer = old_current_buffer; - *object = STRINGP (it.string) ? it.string : w->buffer; + *dx = x0 + it.first_visible_x - it.current_x; + *dy = *y - it.current_y; + + string = w->buffer; + if (STRINGP (it.string)) + string = it.string; *pos = it.current; + +#ifdef HAVE_WINDOW_SYSTEM + if (it.what == IT_IMAGE) + { + struct image *img; + if ((img = IMAGE_FROM_ID (it.f, it.image_id)) != NULL + && !NILP (img->spec)) + *object = img->spec; + } +#endif + + row = MATRIX_ROW (w->current_matrix, it.vpos); + if (row->enabled_p) + { + if (it.hpos < row->used[TEXT_AREA]) + { + struct glyph *glyph = row->glyphs[TEXT_AREA] + it.hpos; + *width = glyph->pixel_width; + *height = glyph->ascent + glyph->descent; +#ifdef HAVE_WINDOW_SYSTEM + if (glyph->type == IMAGE_GLYPH) + *dy -= row->ascent - glyph->ascent; +#endif + } + else + { + *width = 0; + *height = row->height; + } + } + else + { + *width = *height = 0; + } + + /* Add extra (default width) columns if clicked after EOL. */ + x1 = max(0, it.current_x + it.pixel_width - it.first_visible_x); + if (x0 > x1) + it.hpos += (x0 - x1) / WINDOW_FRAME_COLUMN_WIDTH (w); + + *x = it.hpos; + *y = it.vpos; + + return string; } /* Value is the string under window-relative coordinates X/Y in the - mode or header line of window W, or nil if none. MODE_LINE_P non-zero - means look at the mode line. *CHARPOS is set to the position in - the string returned. */ + mode line or header line (PART says which) of window W, or nil if none. + *CHARPOS is set to the position in the string returned. */ Lisp_Object -mode_line_string (w, x, y, part, charpos) +mode_line_string (w, part, x, y, charpos, object, dx, dy, width, height) struct window *w; - int x, y; enum window_part part; + int *x, *y; int *charpos; + Lisp_Object *object; + int *dx, *dy; + int *width, *height; { struct glyph_row *row; struct glyph *glyph, *end; - int x0; + int x0, y0; Lisp_Object string = Qnil; if (part == ON_MODE_LINE) row = MATRIX_MODE_LINE_ROW (w->current_matrix); else row = MATRIX_HEADER_LINE_ROW (w->current_matrix); + y0 = *y - row->y; + *y = row - MATRIX_FIRST_TEXT_ROW (w->current_matrix); if (row->mode_line_p && row->enabled_p) { @@ -5732,15 +5816,44 @@ mode_line_string (w, x, y, part, charpos) it's the one we were looking for. */ glyph = row->glyphs[TEXT_AREA]; end = glyph + row->used[TEXT_AREA]; - for (x0 = 0; glyph < end; x0 += glyph->pixel_width, ++glyph) - if (x >= x0 && x < x0 + glyph->pixel_width) - { - string = glyph->object; - *charpos = glyph->charpos; - break; - } + for (x0 = *x; glyph < end && x0 > glyph->pixel_width; ++glyph) + x0 -= glyph->pixel_width; + *x = glyph - row->glyphs[TEXT_AREA]; + if (glyph < end) + { + string = glyph->object; + *charpos = glyph->charpos; + *width = glyph->pixel_width; + *height = glyph->ascent + glyph->descent; +#ifdef HAVE_WINDOW_SYSTEM + if (glyph->type == IMAGE_GLYPH) + { + struct image *img; + img = IMAGE_FROM_ID (WINDOW_XFRAME (w), glyph->u.img_id); + if (img != NULL) + *object = img->spec; + y0 -= row->ascent - glyph->ascent; + } +#endif + } + else + { + /* Add extra (default width) columns if clicked after EOL. */ + *x += x0 / WINDOW_FRAME_COLUMN_WIDTH (w); + *width = 0; + *height = row->height; + } + } + else + { + *x = 0; + x0 = 0; + *width = *height = 0; } + *dx = x0; + *dy = y0; + return string; } @@ -5750,15 +5863,18 @@ mode_line_string (w, x, y, part, charpos) the string returned. */ Lisp_Object -marginal_area_string (w, x, y, part, charpos) +marginal_area_string (w, part, x, y, charpos, object, dx, dy, width, height) struct window *w; - int x, y; enum window_part part; + int *x, *y; int *charpos; + Lisp_Object *object; + int *dx, *dy; + int *width, *height; { struct glyph_row *row = w->current_matrix->rows; struct glyph *glyph, *end; - int x0, i, wy = y; + int x0, y0, i, wy = *y; int area; Lisp_Object string = Qnil; @@ -5772,33 +5888,63 @@ marginal_area_string (w, x, y, part, charpos) for (i = 0; row->enabled_p && i < w->current_matrix->nrows; ++i, ++row) if (wy >= row->y && wy < MATRIX_ROW_BOTTOM_Y (row)) break; + y0 = *y - row->y; + *y = row - MATRIX_FIRST_TEXT_ROW (w->current_matrix); if (row->enabled_p) { /* Find the glyph under X. If we find one with a string object, it's the one we were looking for. */ - glyph = row->glyphs[area]; - end = glyph + row->used[area]; - if (area == RIGHT_MARGIN_AREA) x0 = ((WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) - ? WINDOW_LEFT_FRINGE_WIDTH (w) + ? WINDOW_LEFT_FRINGE_WIDTH (w) : WINDOW_TOTAL_FRINGE_WIDTH (w)) + window_box_width (w, LEFT_MARGIN_AREA) + window_box_width (w, TEXT_AREA)); else x0 = (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) - ? WINDOW_LEFT_FRINGE_WIDTH (w) + ? WINDOW_LEFT_FRINGE_WIDTH (w) : 0); - for (; glyph < end; x0 += glyph->pixel_width, ++glyph) - if (x >= x0 && x < x0 + glyph->pixel_width) - { - string = glyph->object; - *charpos = glyph->charpos; - break; - } + glyph = row->glyphs[area]; + end = glyph + row->used[area]; + for (x0 = *x - x0; glyph < end && x0 > glyph->pixel_width; ++glyph) + x0 -= glyph->pixel_width; + *x = glyph - row->glyphs[area]; + if (glyph < end) + { + string = glyph->object; + *charpos = glyph->charpos; + *width = glyph->pixel_width; + *height = glyph->ascent + glyph->descent; +#ifdef HAVE_WINDOW_SYSTEM + if (glyph->type == IMAGE_GLYPH) + { + struct image *img; + img = IMAGE_FROM_ID (WINDOW_XFRAME (w), glyph->u.img_id); + if (img != NULL) + *object = img->spec; + y0 -= row->ascent - glyph->ascent; + } +#endif + } + else + { + /* Add extra (default width) columns if clicked after EOL. */ + *x += x0 / WINDOW_FRAME_COLUMN_WIDTH (w); + *width = 0; + *height = row->height; + } } + else + { + x0 = 0; + *x = 0; + *width = *height = 0; + } + + *dx = x0; + *dy = y0; return string; } @@ -6707,3 +6853,6 @@ See `buffer-display-table' for more information. */); Vwindow_system_version = Qnil; } } + +/* arch-tag: 8d812b1f-04a2-4195-a9c4-381f8457a413 + (do not change this comment) */ diff --git a/src/disptab.h b/src/disptab.h index 9b387ba688..e9c9805ea6 100644 --- a/src/disptab.h +++ b/src/disptab.h @@ -105,3 +105,6 @@ extern Lisp_Object Vglyph_table; #define NULL_GLYPH 00 #define GLYPH_FROM_CHAR(c) (c) + +/* arch-tag: d7f792d2-f59c-4904-a91e-91522e3ab349 + (do not change this comment) */ diff --git a/src/doc.c b/src/doc.c index af5707474c..e670ad1797 100644 --- a/src/doc.c +++ b/src/doc.c @@ -1,5 +1,6 @@ /* Record indices of function doc strings stored in a file. - Copyright (C) 1985, 86,93,94,95,97,98,99, 2000 Free Software Foundation, Inc. + Copyright (C) 1985, 86,93,94,95,97,98,99,2000,04 + Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -612,8 +613,7 @@ the same file name is found in the `data-directory'. */) *p = '_'; p++; } -#endif /* not VMS4_4 */ -#ifdef VMS4_4 +#else /* VMS4_4 */ strcpy (name, sys_translate_unix (name)); #endif /* VMS4_4 */ #endif /* VMS */ @@ -660,6 +660,9 @@ the same file name is found in the `data-directory'. */) else if (p[1] == 'F') store_function_docstring (sym, pos + end + 1 - buf); + else if (p[1] == 'S') + ; /* Just a source file name boundary marker. Ignore it. */ + else error ("DOC file invalid at position %d", pos); } diff --git a/src/doprnt.c b/src/doprnt.c index 3bf8248c35..873adca34e 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -334,3 +334,6 @@ doprnt1 (lispstrings, buffer, bufsize, format, format_end, nargs, args) *bufptr = 0; /* Make sure our string end with a '\0' */ return bufptr - buffer; } + +/* arch-tag: aa0ab528-7c5f-4c73-894c-aa2526a1efb3 + (do not change this comment) */ diff --git a/src/dosfns.c b/src/dosfns.c index f220a442dc..a64dc31b23 100644 --- a/src/dosfns.c +++ b/src/dosfns.c @@ -651,3 +651,6 @@ If zero, the decimal point key returns the country code specific value. */); dos_decimal_point = 0; } #endif /* MSDOS */ + +/* arch-tag: f5ea8847-a014-42c9-83f5-7738ad640b17 + (do not change this comment) */ diff --git a/src/dosfns.h b/src/dosfns.h index 00e2e1ed1a..24d214fc1b 100644 --- a/src/dosfns.h +++ b/src/dosfns.h @@ -43,3 +43,6 @@ extern Lisp_Object Vdos_display_scancodes; extern int msdos_stdcolor_idx P_ ((const char *)); extern Lisp_Object msdos_stdcolor_name P_ ((int)); #endif + +/* arch-tag: a83b8c4c-63c8-451e-9e94-bc72e3e2f8bc + (do not change this comment) */ diff --git a/src/ecrt0.c b/src/ecrt0.c index 17bd484100..209748c8c9 100644 --- a/src/ecrt0.c +++ b/src/ecrt0.c @@ -610,3 +610,6 @@ char *__progname; char *__progname; #endif #endif /* __bsdi__ */ + +/* arch-tag: 4025c2fb-d6b1-4d29-b1b6-8100b6bd1e74 + (do not change this comment) */ diff --git a/src/editfns.c b/src/editfns.c index ace0f1f883..e7a01b24b7 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3376,7 +3376,7 @@ usage: (format STRING &rest OBJECTS) */) string itself, will not be used. Element NARGS, corresponding to no argument, *will* be assigned to in the case that a `%' and `.' occur after the final format specifier. */ - int *precision = (int *) (alloca(nargs * sizeof (int))); + int *precision = (int *) (alloca((nargs + 1) * sizeof (int))); int longest_format; Lisp_Object val; int arg_intervals = 0; @@ -3430,7 +3430,7 @@ usage: (format STRING &rest OBJECTS) */) /* Make room in result for all the non-%-codes in the control string. */ total = 5 + CONVERTED_BYTE_SIZE (multibyte, args[0]); - /* Allocate the info and discarded tables. */ + /* Allocate the info and discarded tables. */ { int nbytes = nargs * sizeof *info; int i; @@ -4325,7 +4325,7 @@ Transposing beyond buffer boundaries is an error. */) transpose_markers (start1, end1, start2, end2, start1_byte, start1_byte + len1_byte, start2_byte, start2_byte + len2_byte); - fix_overlays_in_range (start1, end2); + fix_start_end_in_overlays (start1, end2); } return Qnil; diff --git a/src/emacs.c b/src/emacs.c index ea68ed24cd..b27b460fba 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1,5 +1,5 @@ /* Fully extensible Emacs, running on Unix, intended for GNU. - Copyright (C) 1985,86,87,93,94,95,97,98,1999,2001,02,2003 + Copyright (C) 1985,86,87,93,94,95,97,98,1999,2001,02,03,2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -86,9 +86,18 @@ extern char *index P_ ((const char *, int)); /* Make these values available in GDB, which doesn't see macros. */ +#ifdef USE_LSB_TAG +int gdb_use_lsb = 1; +#else +int gdb_use_lsb = 0; +#endif +#ifdef NO_UNION_TYPE +int gdb_use_union = 0; +#else +int gdb_use_union = 1; +#endif EMACS_INT gdb_valbits = VALBITS; EMACS_INT gdb_gctypebits = GCTYPEBITS; -EMACS_INT gdb_emacs_intbits = sizeof (EMACS_INT) * BITS_PER_CHAR; #ifdef DATA_SEG_BITS EMACS_INT gdb_data_seg_bits = DATA_SEG_BITS; #else @@ -220,6 +229,8 @@ int initial_argc; static void sort_args (); void syms_of_emacs (); +/* MSVC needs each string be shorter than 2048 bytes, so the usage + strings below are split to not overflow this limit. */ #define USAGE1 "\ Usage: %s [OPTION-OR-FILENAME]...\n\ \n\ @@ -232,66 +243,71 @@ read the main documentation for these command-line arguments.\n\ \n\ Initialization options:\n\ \n\ ---batch do not do interactive display; implies -q\n\ ---script FILE run FILE as an Emacs Lisp script.\n\ ---debug-init enable Emacs Lisp debugger during init file\n\ ---help display this help message and exit\n\ ---multibyte, --no-unibyte run Emacs in multibyte mode\n\ ---no-init-file, -q load neither ~/.emacs nor default.el\n\ ---no-shared-memory, -nl do not use shared memory\n\ ---no-site-file do not load site-start.el\n\ ---no-splash do not display a splash screen on startup\n\ ---no-window-system, -nw don't communicate with X, ignoring $DISPLAY\n\ ---terminal, -t DEVICE use DEVICE for terminal I/O\n\ +--batch do not do interactive display; implies -q\n\ +--debug-init enable Emacs Lisp debugger for init file\n\ +--display, -d DISPLAY use X server DISPLAY\n\ +--multibyte, --no-unibyte inhibit the effect of EMACS_UNIBYTE\n\ +--no-desktop do not load a saved desktop\n\ +--no-init-file, -q load neither ~/.emacs nor default.el\n\ +--no-shared-memory, -nl do not use shared memory\n\ +--no-site-file do not load site-start.el\n\ +--no-splash do not display a splash screen on startup\n\ +--no-window-system, -nw don't communicate with X, ignoring $DISPLAY\n\ +--script FILE run FILE as an Emacs Lisp script\n\ +--terminal, -t DEVICE use DEVICE for terminal I/O\n\ --unibyte, --no-multibyte run Emacs in unibyte mode\n\ ---user, -u USER load ~USER/.emacs instead of your own\n\ ---version display version information and exit\n\ -\n\ +--user, -u USER load ~USER/.emacs instead of your own\n\ +\n%s" + +#define USAGE2 "\ Action options:\n\ \n\ -FILE visit FILE using find-file\n\ -+LINE FILE visit FILE using find-file, then go to line LINE\n\ -+LINE:COLUMN FILE visit FILE using find-file, then go to line LINE,\n\ - column COLUMN\n\ ---directory, -L DIR add DIR to variable load-path\n\ ---eval EXPR evaluate Emacs Lisp expression EXPR\n\ ---execute EXPR evaluate Emacs Lisp expression EXPR\n\ ---find-file FILE visit FILE\n\ ---funcall, -f FUNC call Emacs function FUNC with no arguments\n\ ---insert FILE insert contents of FILE into current buffer\n\ ---kill exit without asking for confirmation\n\ ---load, -l FILE load FILE of Emacs Lisp code using the load function\n\ ---visit FILE visit FILE\n\ +FILE visit FILE using find-file\n\ ++LINE FILE visit FILE using find-file, then go to line LINE\n\ ++LINE:COLUMN FILE visit FILE using find-file, then go to line LINE,\n\ + column COLUMN\n\ +--directory, -L DIR add DIR to variable load-path\n\ +--eval EXPR evaluate Emacs Lisp expression EXPR\n\ +--execute EXPR evaluate Emacs Lisp expression EXPR\n\ +--file FILE visit FILE using find-file\n\ +--find-file FILE visit FILE using find-file\n\ +--funcall, -f FUNC call Emacs Lisp function FUNC with no arguments\n\ +--insert FILE insert contents of FILE into current buffer\n\ +--kill exit without asking for confirmation\n\ +--load, -l FILE load Emacs Lisp FILE using the load function\n\ +--visit FILE visit FILE using find-file\n\ \n" -#define USAGE2 "\ +#define USAGE3 "\ Display options:\n\ \n\ ---background-color, -bg COLOR window background color\n\ ---border-color, -bd COLOR main border color\n\ ---border-width, -bw WIDTH width of main border\n\ ---color=MODE color mode for character terminals;\n\ - MODE defaults to `auto', and can also\n\ - be `never', `auto', `always',\n\ - or a mode name like `ansi8'\n\ ---cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\ ---display, -d DISPLAY use X server DISPLAY\n\ ---font, -fn FONT default font; must be fixed-width\n\ ---foreground-color, -fg COLOR window foreground color\n\ ---fullscreen, -fs make first frame fullscreen\n\ ---fullwidth, -fw make the first frame wide as the screen\n\ ---fullheight, -fh make the first frame high as the screen\n\ ---geometry, -g GEOMETRY window geometry\n\ ---iconic start Emacs in iconified state\n\ ---icon-type, -i use picture of gnu for Emacs icon\n\ ---internal-border, -ib WIDTH width between text and main border\n\ ---line-spacing, -lsp PIXELS additional space to put between lines\n\ ---mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ ---name NAME title of main Emacs window\n\ ---reverse-video, -r, -rv switch foreground and background\n\ ---title, -T, -wn TITLE title for Emacs windows\n\ ---vertical-scroll-bars, -vb enable vertical scroll bars\n\ ---xrm XRESOURCES set additional X resources\n\ +--background-color, -bg COLOR window background color\n\ +--border-color, -bd COLOR main border color\n\ +--border-width, -bw WIDTH width of main border\n\ +--color MODE color mode for character terminals;\n\ + MODE defaults to `auto', and can also\n\ + be `never', `auto', `always',\n\ + or a mode name like `ansi8'\n\ +--cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\ +--font, -fn FONT default font; must be fixed-width\n\ +--foreground-color, -fg COLOR window foreground color\n\ +--fullheight, -fh make the first frame high as the screen\n\ +--fullscreen, -fs make first frame fullscreen\n\ +--fullwidth, -fw make the first frame wide as the screen\n\ +--geometry, -g GEOMETRY window geometry\n\ +--horizontal-scroll-bars, -hb enable horizontal scroll bars\n\ +--icon-type, -i use picture of gnu for Emacs icon\n\ +--iconic start Emacs in iconified state\n\ +--internal-border, -ib WIDTH width between text and main border\n\ +--line-spacing, -lsp PIXELS additional space to put between lines\n\ +--mouse-color, -ms COLOR mouse cursor color in Emacs window\n\ +--name NAME title for initial Emacs frame\n\ +--reverse-video, -r, -rv switch foreground and background\n\ +--title, -T TITLE title for initial Emacs frame\n\ +--vertical-scroll-bars, -vb enable vertical scroll bars\n\ +--xrm XRESOURCES set additional X resources\n\ +--help display this help and exit\n\ +--version output version information and exit\n\ \n\ You can generally also specify long option names with a single -; for\n\ example, -batch as well as --batch. You can use any unambiguous\n\ @@ -301,7 +317,7 @@ Various environment variables and window system resources also affect\n\ Emacs' operation. See the main documentation.\n\ \n" -#define USAGE3 "\ +#define USAGE4 "\ Report bugs to %s. First, please see the Bugs\n\ section of the Emacs manual or the file BUGS.\n" @@ -1061,9 +1077,9 @@ main (argc, argv /* Handle the --help option, which gives a usage message. */ if (argmatch (argv, argc, "-help", "--help", 3, NULL, &skip_args)) { - printf (USAGE1, argv[0]); - printf (USAGE2); - printf (USAGE3, bug_reporting_address ()); + printf (USAGE1, argv[0], USAGE2); + printf (USAGE3); + printf (USAGE4, bug_reporting_address ()); exit (0); } @@ -1236,6 +1252,9 @@ main (argc, argv init_window_once (); /* Init the window system. */ init_fileio_once (); /* Must precede any path manipulation. */ +#ifdef HAVE_WINDOW_SYSTEM + init_fringe_once (); /* Swap bitmaps if necessary. */ +#endif /* HAVE_WINDOW_SYSTEM */ } init_alloc (); @@ -1505,6 +1524,10 @@ main (argc, argv #endif /* WINDOWSNT */ syms_of_window (); syms_of_xdisp (); +#ifdef HAVE_WINDOW_SYSTEM + syms_of_fringe (); + syms_of_image (); +#endif /* HAVE_WINDOW_SYSTEM */ #ifdef HAVE_X_WINDOWS syms_of_xterm (); syms_of_xfns (); @@ -1517,12 +1540,14 @@ main (argc, argv #endif #endif /* HAVE_X_WINDOWS */ +#ifdef HAVE_MENUS #ifndef HAVE_NTGUI #ifndef MAC_OS /* Called before init_window_once for Mac OS Classic. */ syms_of_xmenu (); #endif #endif +#endif #ifdef HAVE_NTGUI syms_of_w32term (); @@ -1584,11 +1609,12 @@ main (argc, argv init_vmsproc (); /* And this too. */ #endif /* VMS */ init_sys_modes (); /* Init system terminal modes (RAW or CBREAK, etc.). */ -#if defined (HAVE_X_WINDOWS) || defined (WINDOWSNT) - init_xfns (); -#endif /* HAVE_X_WINDOWS */ init_fns (); init_xdisp (); +#ifdef HAVE_WINDOW_SYSTEM + init_fringe (); + init_image (); +#endif /* HAVE_WINDOW_SYSTEM */ init_macros (); init_editfns (); init_floatfns (); @@ -2002,7 +2028,7 @@ shut_down_emacs (sig, no_x, stuff) fflush (stdout); reset_sys_modes (); if (sig && sig != SIGTERM) - fprintf (stderr, "Fatal error (%d).", sig); + fprintf (stderr, "Fatal error (%d)", sig); } } #else @@ -2407,3 +2433,6 @@ near where the Emacs executable was found. */); doc: /* Most recently used system locale for time. */); Vprevious_system_time_locale = Qnil; } + +/* arch-tag: 7bfd356a-c720-4612-8ab6-aa4222931c2e + (do not change this comment) */ diff --git a/src/epaths.in b/src/epaths.in index 2e7126c328..00a1a1d04f 100644 --- a/src/epaths.in +++ b/src/epaths.in @@ -59,3 +59,6 @@ Boston, MA 02111-1307, USA. */ /* Where Emacs should look for the application default file. */ #define PATH_X_DEFAULTS "/usr/lib/X11/%L/%T/%N%C%S:/usr/lib/X11/%l/%T/%N%C%S:/usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S" + +/* arch-tag: d30686c4-629c-4666-9499-beaa69f1641e + (do not change this comment) */ diff --git a/src/eval.c b/src/eval.c index 5061cbc766..0326a828a8 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1,5 +1,5 @@ /* Evaluator for GNU Emacs Lisp interpreter. - Copyright (C) 1985, 86, 87, 93, 94, 95, 99, 2000, 2001, 2002 + Copyright (C) 1985, 86, 87, 93, 94, 95, 99, 2000, 2001, 02, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -701,8 +701,8 @@ DEFUN ("defvaralias", Fdefvaralias, Sdefvaralias, 2, 3, 0, doc: /* Make SYMBOL a variable alias for symbol ALIASED. Setting the value of SYMBOL will subsequently set the value of ALIASED, and getting the value of SYMBOL will return the value ALIASED has. -ALIASED nil means remove the alias; SYMBOL is unbound after that. -Third arg DOCSTRING, if non-nil, is documentation for SYMBOL. */) +Third arg DOCSTRING, if non-nil, is documentation for SYMBOL. +The return value is ALIASED. */) (symbol, aliased, docstring) Lisp_Object symbol, aliased, docstring; { @@ -1436,6 +1436,8 @@ A handler for any of those names will get to handle this signal. The symbol `error' should normally be one of them. DATA should be a list. Its elements are printed as part of the error message. +See Info anchor `(elisp)Definition of signal' for some details on how this +error message is constructed. If the signal is handled, DATA is made available to the handler. See also the function `condition-case'. */) (error_symbol, data) @@ -1810,13 +1812,11 @@ then strings and vectors are not accepted. */) /* Lists may represent commands. */ if (!CONSP (fun)) return Qnil; - funcar = Fcar (fun); - if (!SYMBOLP (funcar)) - return Fsignal (Qinvalid_function, Fcons (fun, Qnil)); + funcar = XCAR (fun); if (EQ (funcar, Qlambda)) - return Fassq (Qinteractive, Fcdr (Fcdr (fun))); + return Fassq (Qinteractive, Fcdr (XCDR (fun))); if (EQ (funcar, Qautoload)) - return Fcar (Fcdr (Fcdr (Fcdr (fun)))); + return Fcar (Fcdr (Fcdr (XCDR (fun)))); else return Qnil; } @@ -2641,6 +2641,8 @@ call6 (fn, arg1, arg2, arg3, arg4, arg5, arg6) #endif /* not NO_ARG_ARRAY */ } +/* The caller should GCPRO all the elements of ARGS. */ + DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0, doc: /* Call first argument as a function, passing remaining arguments to it. Return the value that function returns. @@ -3432,3 +3434,6 @@ The value the function returns is not used. */); defsubr (&Sbacktrace); defsubr (&Sbacktrace_frame); } + +/* arch-tag: 014a07aa-33ab-4a8f-a3d2-ee8a4a9ff7fb + (do not change this comment) */ diff --git a/src/fileio.c b/src/fileio.c index 1454ca921b..17be7bf4d9 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -134,6 +134,7 @@ extern int errno; #include "commands.h" extern int use_dialog_box; +extern int use_file_dialog; #ifndef O_WRONLY #define O_WRONLY 1 @@ -2407,7 +2408,7 @@ Also set the file modes of the target file to match the source file. */) CHECK_STRING (newname); if (!NILP (Ffile_directory_p (newname))) - newname = Fexpand_file_name (file, newname); + newname = Fexpand_file_name (Ffile_name_nondirectory (file), newname); else newname = Fexpand_file_name (newname, Qnil); @@ -4654,7 +4655,9 @@ choose_write_coding_system (start, end, filename, { Lisp_Object val; - if (auto_saving) + if (auto_saving + && NILP (Fstring_equal (current_buffer->filename, + current_buffer->auto_save_file_name))) val = Qutf_8_emacs; else if (!NILP (Vcoding_system_for_write)) { @@ -5161,10 +5164,17 @@ This does code conversion according to the value of update_mode_lines++; } else if (quietly) - return Qnil; + { + if (auto_saving + && ! NILP (Fstring_equal (current_buffer->filename, + current_buffer->auto_save_file_name))) + SAVE_MODIFF = MODIFF; + + return Qnil; + } if (!auto_saving) - message_with_string ((! INTEGERP (append) + message_with_string ((INTEGERP (append) ? "Updated %s" : ! NILP (append) ? "Added to %s" @@ -5381,7 +5391,8 @@ e_write (desc, string, start, end, coding) DEFUN ("verify-visited-file-modtime", Fverify_visited_file_modtime, Sverify_visited_file_modtime, 1, 1, 0, doc: /* Return t if last mod time of BUF's visited file matches what BUF records. -This means that the file has not been changed since it was visited or saved. */) +This means that the file has not been changed since it was visited or saved. +See Info node `(elisp)Modification Time' for more details. */) (buf) Lisp_Object buf; { @@ -5437,7 +5448,9 @@ DEFUN ("visited-file-modtime", Fvisited_file_modtime, Svisited_file_modtime, 0, 0, 0, doc: /* Return the current buffer's recorded visited file modification time. The value is a list of the form (HIGH . LOW), like the time values -that `file-attributes' returns. */) +that `file-attributes' returns. If the current buffer has no recorded +file modification time, this function returns 0. +See Info node `(elisp)Modification Time' for more details. */) () { return long_to_cons ((unsigned long) current_buffer->modtime); @@ -5657,11 +5670,14 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */) minibuffer_auto_raise = 0; auto_saving = 1; - /* First, save all files which don't have handlers. If Emacs is - crashing, the handlers may tweak what is causing Emacs to crash - in the first place, and it would be a shame if Emacs failed to - autosave perfectly ordinary files because it couldn't handle some - ange-ftp'd file. */ + /* On first pass, save all files that don't have handlers. + On second pass, save all files that do have handlers. + + If Emacs is crashing, the handlers may tweak what is causing + Emacs to crash in the first place, and it would be a shame if + Emacs failed to autosave perfectly ordinary files because it + couldn't handle some ange-ftp'd file. */ + for (do_handled_files = 0; do_handled_files < 2; do_handled_files++) for (tail = Vbuffer_alist; GC_CONSP (tail); tail = XCDR (tail)) { @@ -5964,6 +5980,7 @@ DEFUN ("read-file-name-internal", Fread_file_name_internal, Sread_file_name_inte if (SCHARS (name) == 0) return Qt; #endif /* VMS */ + string = Fexpand_file_name (string, dir); if (!NILP (Vread_file_name_predicate)) return call1 (Vread_file_name_predicate, string); return Ffile_exists_p (string); @@ -5972,15 +5989,20 @@ DEFUN ("read-file-name-internal", Fread_file_name_internal, Sread_file_name_inte DEFUN ("read-file-name", Fread_file_name, Sread_file_name, 1, 6, 0, doc: /* Read file name, prompting with PROMPT and completing in directory DIR. Value is not expanded---you must call `expand-file-name' yourself. -Default name to DEFAULT-FILENAME if user enters a null string. +Default name to DEFAULT-FILENAME if user exits the minibuffer with +the same non-empty string that was inserted by this function. (If DEFAULT-FILENAME is omitted, the visited file name is used, except that if INITIAL is specified, that combined with DIR is used.) +If the user exits with an empty minibuffer, this function returns +an empty string. (This can only happen if the user erased the +pre-inserted contents or if `insert-default-directory' is nil.) Fourth arg MUSTMATCH non-nil means require existing file's name. Non-nil and non-t means also require confirmation after completion. Fifth arg INITIAL specifies text to start with. -If optional sixth arg PREDICATE is non-nil, possible completions and the -resulting file name must satisfy (funcall PREDICATE NAME). -DIR defaults to current buffer's directory default. +If optional sixth arg PREDICATE is non-nil, possible completions and +the resulting file name must satisfy (funcall PREDICATE NAME). +DIR should be an absolute directory name. It defaults to the value of +`default-directory'. If this command was invoked with the mouse, use a file dialog box if `use-dialog-box' is non-nil, and the window system or X toolkit in use @@ -6081,7 +6103,7 @@ provides a file dialog box. */) } count = SPECPDL_INDEX (); -#ifdef VMS +#if defined VMS || defined DOS_NT || defined MAC_OSX specbind (intern ("completion-ignore-case"), Qt); #endif @@ -6094,6 +6116,7 @@ provides a file dialog box. */) #if defined (USE_MOTIF) || defined (HAVE_NTGUI) || defined (USE_GTK) if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) && use_dialog_box + && use_file_dialog && have_menus_p ()) { /* If DIR contains a file name, split it. */ @@ -6143,13 +6166,6 @@ provides a file dialog box. */) if (!NILP (tem) && !NILP (default_filename)) val = default_filename; - else if (SCHARS (val) == 0 && NILP (insdef)) - { - if (!NILP (default_filename)) - val = default_filename; - else - error ("No default file name"); - } val = Fsubstitute_in_file_name (val); if (replace_in_history) @@ -6325,7 +6341,20 @@ same format as a regular save would use. */); Vread_file_name_predicate = Qnil; DEFVAR_BOOL ("insert-default-directory", &insert_default_directory, - doc: /* *Non-nil means when reading a filename start with default dir in minibuffer. */); + doc: /* *Non-nil means when reading a filename start with default dir in minibuffer. +If the initial minibuffer contents are non-empty, you can usually +request a default filename by typing RETURN without editing. For some +commands, exiting with an empty minibuffer has a special meaning, +such as making the current buffer visit no file in the case of +`set-visited-file-name'. +If this variable is non-nil, the minibuffer contents are always +initially non-empty and typing RETURN without editing will fetch the +default name, if one is provided. Note however that this default name +is not necessarily the name originally inserted in the minibuffer, if +that is just the default directory. +If this variable is nil, the minibuffer often starts out empty. In +that case you may have to explicitly fetch the next history element to +request the default name. */); insert_default_directory = 1; DEFVAR_BOOL ("vms-stmlf-recfm", &vms_stmlf_recfm, @@ -6473,3 +6502,6 @@ a non-nil value. */); defsubr (&Sunix_sync); #endif } + +/* arch-tag: 64ba3fd7-f844-4fb2-ba4b-427eb928786c + (do not change this comment) */ diff --git a/src/filelock.c b/src/filelock.c index f6108942ba..b802d0e2a5 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -770,3 +770,6 @@ syms_of_filelock () } #endif /* CLASH_DETECTION */ + +/* arch-tag: e062676d-50b2-4be0-ab96-197c81b181a1 + (do not change this comment) */ diff --git a/src/filemode.c b/src/filemode.c index d804e94d73..058880d669 100644 --- a/src/filemode.c +++ b/src/filemode.c @@ -254,3 +254,6 @@ setst (bits, chars) } #endif } + +/* arch-tag: 4340830c-15a5-47d2-b45f-1d43c45a91bb + (do not change this comment) */ diff --git a/src/firstfile.c b/src/firstfile.c index 295c9b7ff6..faa192257b 100644 --- a/src/firstfile.c +++ b/src/firstfile.c @@ -33,3 +33,5 @@ extern int initialized; static int * dummy = &initialized; #endif +/* arch-tag: a6c0d2dd-00c3-4ba5-95a5-9c8ab82f39b2 + (do not change this comment) */ diff --git a/src/floatfns.c b/src/floatfns.c index b7d6412fdb..61879eabe3 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -1,5 +1,5 @@ /* Primitive operations on floating point for GNU Emacs Lisp interpreter. - Copyright (C) 1988, 1993, 1994, 1999 Free Software Foundation, Inc. + Copyright (C) 1988, 1993, 1994, 1999, 2003 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -692,7 +692,7 @@ This is the same as the exponent of a float. */) double f = extract_float (arg); if (f == 0.0) - value = -(VALMASK >> 1); + value = MOST_NEGATIVE_FIXNUM; else { #ifdef HAVE_LOGB @@ -1075,3 +1075,6 @@ syms_of_floatfns () defsubr (&Sround); defsubr (&Struncate); } + +/* arch-tag: be05bf9d-049e-4e31-91b9-e6153d483ae7 + (do not change this comment) */ diff --git a/src/fns.c b/src/fns.c index ea45b9d8db..017f812401 100644 --- a/src/fns.c +++ b/src/fns.c @@ -59,6 +59,10 @@ Boston, MA 02111-1307, USA. */ asked by mouse commands. */ int use_dialog_box; +/* Nonzero enables use of a file dialog for file name + questions asked by mouse commands. */ +int use_file_dialog; + extern int minibuffer_auto_raise; extern Lisp_Object minibuf_window; extern Lisp_Object Vlocale_coding_system; @@ -91,7 +95,7 @@ DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0, DEFUN ("random", Frandom, Srandom, 0, 1, 0, doc: /* Return a pseudo-random number. All integers representable in Lisp are equally likely. - On most systems, this is 28 bits' worth. + On most systems, this is 29 bits' worth. With positive integer argument N, return random number in interval [0,N). With argument t, set the random number seed from the current time and pid. */) (n) @@ -1004,8 +1008,14 @@ string_make_unibyte (string) DEFUN ("string-make-multibyte", Fstring_make_multibyte, Sstring_make_multibyte, 1, 1, 0, doc: /* Return the multibyte equivalent of STRING. -The function `unibyte-char-to-multibyte' is used to convert -each unibyte character to a multibyte character. */) +If STRING is unibyte and contains non-ASCII characters, the function +`unibyte-char-to-multibyte' is used to convert each unibyte character +to a multibyte character. In this case, the returned string is a +newly created string with no text properties. If STRING is multibyte +or entirely ASCII, it is returned unchanged. In particular, when +STRING is unibyte and entirely ASCII, the returned string is unibyte. +\(When the characters are all ASCII, Emacs primitives will treat the +string the same way whether it is unibyte or multibyte.) */) (string) Lisp_Object string; { @@ -1035,8 +1045,7 @@ DEFUN ("string-as-unibyte", Fstring_as_unibyte, Sstring_as_unibyte, If STRING is unibyte, the result is STRING itself. Otherwise it is a newly created string, with no text properties. If STRING is multibyte and contains a character of charset -`eight-bit-control' or `eight-bit-graphic', it is converted to the -corresponding single byte. */) +`eight-bit', it is converted to the corresponding single byte. */) (string) Lisp_Object string; { @@ -1408,7 +1417,7 @@ whose car is ELT. */) DEFUN ("assq", Fassq, Sassq, 2, 2, 0, doc: /* Return non-nil if KEY is `eq' to the car of an element of LIST. -The value is actually the element of LIST whose car is KEY. +The value is actually the first element of LIST whose car is KEY. Elements of LIST that are not conses are ignored. */) (key, list) Lisp_Object key, list; @@ -1465,7 +1474,7 @@ assq_no_quit (key, list) DEFUN ("assoc", Fassoc, Sassoc, 2, 2, 0, doc: /* Return non-nil if KEY is `equal' to the car of an element of LIST. -The value is actually the element of LIST whose car equals KEY. */) +The value is actually the first element of LIST whose car equals KEY. */) (key, list) Lisp_Object key, list; { @@ -1509,7 +1518,7 @@ The value is actually the element of LIST whose car equals KEY. */) DEFUN ("rassq", Frassq, Srassq, 2, 2, 0, doc: /* Return non-nil if KEY is `eq' to the cdr of an element of LIST. -The value is actually the element of LIST whose cdr is KEY. */) +The value is actually the first element of LIST whose cdr is KEY. */) (key, list) register Lisp_Object key; Lisp_Object list; @@ -1551,7 +1560,7 @@ The value is actually the element of LIST whose cdr is KEY. */) DEFUN ("rassoc", Frassoc, Srassoc, 2, 2, 0, doc: /* Return non-nil if KEY is `equal' to the cdr of an element of LIST. -The value is actually the element of LIST whose cdr equals KEY. */) +The value is actually the first element of LIST whose cdr equals KEY. */) (key, list) Lisp_Object key, list; { @@ -1754,7 +1763,7 @@ to be sure of changing the value of `foo'. */) DEFUN ("nreverse", Fnreverse, Snreverse, 1, 1, 0, doc: /* Reverse LIST by modifying cdr pointers. -Returns the beginning of the reversed list. */) +Return the reversed list. */) (list) Lisp_Object list; { @@ -1777,7 +1786,7 @@ Returns the beginning of the reversed list. */) } DEFUN ("reverse", Freverse, Sreverse, 1, 1, 0, - doc: /* Reverse LIST, copying. Returns the beginning of the reversed list. + doc: /* Reverse LIST, copying. Return the reversed list. See also the function `nreverse', which is used more often. */) (list) Lisp_Object list; @@ -2052,13 +2061,27 @@ Symbols must match exactly. */) (o1, o2) register Lisp_Object o1, o2; { - return internal_equal (o1, o2, 0) ? Qt : Qnil; + return internal_equal (o1, o2, 0, 0) ? Qt : Qnil; +} + +DEFUN ("equal-including-properties", Fequal_including_properties, Sequal_including_properties, 2, 2, 0, + doc: /* Return t if two Lisp objects have similar structure and contents. +This is like `equal' except that it compares the text properties +of strings. (`equal' ignores text properties.) */) + (o1, o2) + register Lisp_Object o1, o2; +{ + return internal_equal (o1, o2, 0, 1) ? Qt : Qnil; } +/* DEPTH is current depth of recursion. Signal an error if it + gets too deep. + PROPS, if non-nil, means compare string text properties too. */ + static int -internal_equal (o1, o2, depth) +internal_equal (o1, o2, depth, props) register Lisp_Object o1, o2; - int depth; + int depth, props; { if (depth > 200) error ("Stack overflow in equal"); @@ -2073,10 +2096,18 @@ internal_equal (o1, o2, depth) switch (XTYPE (o1)) { case Lisp_Float: - return (extract_float (o1) == extract_float (o2)); + { + double d1, d2; + + d1 = extract_float (o1); + d2 = extract_float (o2); + /* If d is a NaN, then d != d. Two NaNs should be `equal' even + though they are not =. */ + return d1 == d2 || (d1 != d1 && d2 != d2); + } case Lisp_Cons: - if (!internal_equal (XCAR (o1), XCAR (o2), depth + 1)) + if (!internal_equal (XCAR (o1), XCAR (o2), depth + 1, props)) return 0; o1 = XCDR (o1); o2 = XCDR (o2); @@ -2088,7 +2119,7 @@ internal_equal (o1, o2, depth) if (OVERLAYP (o1)) { if (!internal_equal (OVERLAY_START (o1), OVERLAY_START (o2), - depth + 1) + depth + 1, props) || !internal_equal (OVERLAY_END (o1), OVERLAY_END (o2), depth + 1)) return 0; @@ -2106,8 +2137,8 @@ internal_equal (o1, o2, depth) case Lisp_Vectorlike: { - register int i, size; - size = XVECTOR (o1)->size; + register int i; + EMACS_INT size = XVECTOR (o1)->size; /* Pseudovectors have the type encoded in the size field, so this test actually checks that the objects have the same type as well as the same size. */ @@ -2143,7 +2174,7 @@ internal_equal (o1, o2, depth) Lisp_Object v1, v2; v1 = XVECTOR (o1)->contents [i]; v2 = XVECTOR (o2)->contents [i]; - if (!internal_equal (v1, v2, depth + 1)) + if (!internal_equal (v1, v2, depth + 1, props)) return 0; } return 1; @@ -2158,6 +2189,8 @@ internal_equal (o1, o2, depth) if (bcmp (SDATA (o1), SDATA (o2), SBYTES (o1))) return 0; + if (props && !compare_string_intervals (o1, o2)) + return 0; return 1; case Lisp_Int: @@ -2230,8 +2263,15 @@ ARRAY is a vector, string, char-table, or bool-vector. */) = (XBOOL_VECTOR (array)->size + BITS_PER_CHAR - 1) / BITS_PER_CHAR; charval = (! NILP (item) ? -1 : 0); - for (index = 0; index < size_in_chars; index++) + for (index = 0; index < size_in_chars - 1; index++) p[index] = charval; + if (index < size_in_chars) + { + /* Mask out bits beyond the vector size. */ + if (XBOOL_VECTOR (array)->size % BITS_PER_CHAR) + charval &= (1 << (XBOOL_VECTOR (array)->size % BITS_PER_CHAR)) - 1; + p[index] = charval; + } } else { @@ -2798,8 +2838,8 @@ DEFUN ("require", Frequire, Srequire, 1, 3, 0, If FEATURE is not a member of the list `features', then the feature is not loaded; so load the file FILENAME. If FILENAME is omitted, the printname of FEATURE is used as the file name, -and `load' will try to load this name appended with the suffix `.elc', -`.el' or the unmodified name, in that order. +and `load' will try to load this name appended with the suffix `.elc' or +`.el', in that order. The name without appended suffix will not be used. If the optional third argument NOERROR is non-nil, then return nil if the file is not found instead of signaling an error. Normally the return value is FEATURE. @@ -3749,7 +3789,7 @@ hashfn_eq (h, key) Lisp_Object key; { unsigned hash = XUINT (key) ^ XGCTYPE (key); - xassert ((hash & ~VALMASK) == 0); + xassert ((hash & ~INTMASK) == 0); return hash; } @@ -3768,7 +3808,7 @@ hashfn_eql (h, key) hash = sxhash (key, 0); else hash = XUINT (key) ^ XGCTYPE (key); - xassert ((hash & ~VALMASK) == 0); + xassert ((hash & ~INTMASK) == 0); return hash; } @@ -3783,7 +3823,7 @@ hashfn_equal (h, key) Lisp_Object key; { unsigned hash = sxhash (key, 0); - xassert ((hash & ~VALMASK) == 0); + xassert ((hash & ~INTMASK) == 0); return hash; } @@ -3970,7 +4010,7 @@ maybe_resize_hash_table (h) index_size = next_almost_prime ((int) (new_size / XFLOATINT (h->rehash_threshold))); - if (max (index_size, 2 * new_size) & ~VALMASK) + if (max (index_size, 2 * new_size) > MOST_POSITIVE_FIXNUM) error ("Hash table too large to resize"); h->key_and_value = larger_vector (h->key_and_value, 2 * new_size, Qnil); @@ -4060,7 +4100,7 @@ hash_put (h, key, value, hash) { int start_of_bucket, i; - xassert ((hash & ~VALMASK) == 0); + xassert ((hash & ~INTMASK) == 0); /* Increment count after resizing because resizing may fail. */ maybe_resize_hash_table (h); @@ -4345,7 +4385,7 @@ sxhash_string (ptr, len) hash = ((hash << 3) + (hash >> 28) + c); } - return hash & VALMASK; + return hash & INTMASK; } @@ -4413,7 +4453,7 @@ sxhash_bool_vector (vec) /* Return a hash code for OBJ. DEPTH is the current depth in the Lisp - structure. Value is an unsigned integer clipped to VALMASK. */ + structure. Value is an unsigned integer clipped to INTMASK. */ unsigned sxhash (obj, depth) @@ -4477,7 +4517,7 @@ sxhash (obj, depth) abort (); } - return hash & VALMASK; + return hash & INTMASK; } @@ -4903,12 +4943,18 @@ guesswork fails. Normally, an error is signaled in such case. */) } else { + struct buffer *prev = current_buffer; + + record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); + CHECK_BUFFER (object); bp = XBUFFER (object); + if (bp != current_buffer) + set_buffer_internal (bp); if (NILP (start)) - b = BUF_BEGV (bp); + b = BEGV; else { CHECK_NUMBER_COERCE_MARKER (start); @@ -4916,7 +4962,7 @@ guesswork fails. Normally, an error is signaled in such case. */) } if (NILP (end)) - e = BUF_ZV (bp); + e = ZV; else { CHECK_NUMBER_COERCE_MARKER (end); @@ -4926,7 +4972,7 @@ guesswork fails. Normally, an error is signaled in such case. */) if (b > e) temp = b, b = e, e = temp; - if (!(BUF_BEGV (bp) <= b && e <= BUF_ZV (bp))) + if (!(BEGV <= b && e <= ZV)) args_out_of_range (start, end); if (NILP (coding_system)) @@ -4993,6 +5039,11 @@ guesswork fails. Normally, an error is signaled in such case. */) } object = make_buffer_string (b, e, 0); + if (prev != current_buffer) + set_buffer_internal (prev); + /* Discard the unwind protect for recovering the current + buffer. */ + specpdl_ptr--; if (STRING_MULTIBYTE (object)) object = code_convert_string (object, coding_system, Qnil, 1, 0, 0); @@ -5105,6 +5156,13 @@ This applies to `y-or-n-p' and `yes-or-no-p' questions asked by commands invoked by mouse clicks and mouse menu items. */); use_dialog_box = 1; + DEFVAR_BOOL ("use-file-dialog", &use_file_dialog, + doc: /* *Non-nil means mouse commands use a file dialog to ask for files. +This applies to commands from menus and tool bar buttons. The value of +`use-dialog-box' takes precedence over this variable, so a file dialog is only +used if both `use-dialog-box' and this variable are non-nil. */); + use_file_dialog = 1; + defsubr (&Sidentity); defsubr (&Srandom); defsubr (&Slength); @@ -5146,6 +5204,7 @@ invoked by mouse clicks and mouse menu items. */); defsubr (&Slax_plist_get); defsubr (&Slax_plist_put); defsubr (&Sequal); + defsubr (&Sequal_including_properties); defsubr (&Sfillarray); defsubr (&Sclear_string); defsubr (&Snconc); @@ -5176,3 +5235,6 @@ init_fns () { Vweak_hash_tables = Qnil; } + +/* arch-tag: 787f8219-5b74-46bd-8469-7e1cc475fa31 + (do not change this comment) */ diff --git a/src/frame.c b/src/frame.c index 546c56eab9..c515b56567 100644 --- a/src/frame.c +++ b/src/frame.c @@ -114,6 +114,7 @@ Lisp_Object Qface_set_after_frame_default; Lisp_Object Vterminal_frame; Lisp_Object Vdefault_frame_alist; +Lisp_Object Vdefault_frame_scroll_bars; Lisp_Object Vmouse_position_function; Lisp_Object Vmouse_highlight; Lisp_Object Vdelete_frame_functions; @@ -1278,6 +1279,8 @@ The functions are run with one arg, the frame to be deleted. */) if (f->namebuf) xfree (f->namebuf); + if (f->decode_mode_spec_buffer) + xfree (f->decode_mode_spec_buffer); if (FRAME_INSERT_COST (f)) xfree (FRAME_INSERT_COST (f)); if (FRAME_DELETEN_COST (f)) @@ -2015,7 +2018,7 @@ store_frame_param (f, prop, val) if (EQ (prop, Qminibuffer) && WINDOWP (val)) { if (! MINI_WINDOW_P (XWINDOW (val))) - error ("Surrogate minibuffer windows must be minibuffer windows."); + error ("Surrogate minibuffer windows must be minibuffer windows"); if ((FRAME_HAS_MINIBUF_P (f) || FRAME_MINIBUF_ONLY_P (f)) && !EQ (val, f->minibuffer_window)) @@ -2590,32 +2593,6 @@ x_fullscreen_adjust (f, width, height, top_pos, left_pos) } -/* Really try to move where we want to be in case of fullscreen. Some WMs - moves the window where we tell them. Some (mwm, twm) moves the outer - window manager window there instead. - Try to compensate for those WM here. */ - -static void -x_fullscreen_move (f, new_top, new_left) - struct frame *f; - int new_top; - int new_left; -{ - if (new_top != f->top_pos || new_left != f->left_pos) - { - int move_x = new_left; - int move_y = new_top; - -#ifdef HAVE_X_WINDOWS - move_x += FRAME_X_OUTPUT (f)->x_pixels_outer_diff; - move_y += FRAME_X_OUTPUT (f)->y_pixels_outer_diff; -#endif - - f->want_fullscreen |= FULLSCREEN_MOVE_WAIT; - x_set_offset (f, move_x, move_y, 1); - } -} - /* Change the parameters of frame F as specified by ALIST. If a parameter is not specially recognized, do nothing special; otherwise call the `x_set_...' function for that parameter. @@ -2811,7 +2788,8 @@ x_set_frame_parameters (f, alist) int new_left, new_top; x_fullscreen_adjust (f, &width, &height, &new_top, &new_left); - x_fullscreen_move (f, new_top, new_left); + if (new_top != f->top_pos || new_left != f->left_pos) + x_set_offset (f, new_left, new_top, 1); } #endif @@ -3217,13 +3195,11 @@ x_set_vertical_scroll_bars (f, arg, oldval) ? vertical_scroll_bar_left : EQ (Qright, arg) ? vertical_scroll_bar_right -#ifdef HAVE_NTGUI - /* MS-Windows has scroll bars on the right by default. */ - : vertical_scroll_bar_right -#else - : vertical_scroll_bar_left -#endif - ); + : EQ (Qleft, Vdefault_frame_scroll_bars) + ? vertical_scroll_bar_left + : EQ (Qright, Vdefault_frame_scroll_bars) + ? vertical_scroll_bar_right + : vertical_scroll_bar_none); /* We set this parameter before creating the X window for the frame, so we can get the geometry right from the start. @@ -4032,6 +4008,19 @@ The `menu-bar-lines' element of the list controls whether new frames Setting this variable does not affect existing frames, only new ones. */); Vdefault_frame_alist = Qnil; + DEFVAR_LISP ("default-frame-scroll-bars", &Vdefault_frame_scroll_bars, + doc: /* Default position of scroll bars on this window-system. */); +#ifdef HAVE_WINDOW_SYSTEM +#if defined(HAVE_NTGUI) || defined(HAVE_CARBON) + /* MS-Windows has scroll bars on the right by default. */ + Vdefault_frame_scroll_bars = Qright; +#else + Vdefault_frame_scroll_bars = Qleft; +#endif +#else + Vdefault_frame_scroll_bars = Qnil; +#endif + Qinhibit_default_face_x_resources = intern ("inhibit-default-face-x-resources"); staticpro (&Qinhibit_default_face_x_resources); @@ -4134,3 +4123,6 @@ This variable is local to the current terminal and cannot be buffer-local. */); #endif } + +/* arch-tag: 7dbf2c69-9aad-45f8-8296-db893d6dd039 + (do not change this comment) */ diff --git a/src/frame.h b/src/frame.h index b4ddf5136d..42227d59fe 100644 --- a/src/frame.h +++ b/src/frame.h @@ -452,6 +452,10 @@ struct frame Clear the frame in clear_garbaged_frames if set. */ unsigned resized_p : 1; + /* Set to non-zero in when we want for force a flush_display in + update_frame, usually after resizing the frame. */ + unsigned force_flush_display_p : 1; + /* Set to non-zero if the default face for the frame has been realized. Reset to zero whenever the default face changes. Used to see the difference between a font change and face change. */ @@ -795,9 +799,6 @@ extern Lisp_Object Vdefault_frame_alist; extern Lisp_Object Vterminal_frame; extern Lisp_Object Vmouse_highlight; - -enum text_cursor_kinds get_specified_cursor_type P_ ((Lisp_Object, int *)); -enum text_cursor_kinds get_window_cursor_type P_ ((struct window *, int *, int *)); /* The currently selected frame. */ @@ -1023,7 +1024,6 @@ enum FULLSCREEN_HEIGHT = 2, FULLSCREEN_BOTH = 3, FULLSCREEN_WAIT = 4, - FULLSCREEN_MOVE_WAIT = 8, }; @@ -1078,3 +1078,6 @@ extern void validate_x_resource_name P_ ((void)); #endif /* HAVE_WINDOW_SYSTEM */ #endif /* not EMACS_FRAME_H */ + +/* arch-tag: 0df048ee-e6bf-4f48-bd56-e3cd055dd8c4 + (do not change this comment) */ diff --git a/src/fringe.c b/src/fringe.c new file mode 100644 index 0000000000..3f04069900 --- /dev/null +++ b/src/fringe.c @@ -0,0 +1,1358 @@ +/* Fringe handling (split from xdisp.c). + Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03,04 + Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include +#include + +#include "lisp.h" +#include "frame.h" +#include "window.h" +#include "dispextern.h" +#include "buffer.h" +#include "blockinput.h" + +#ifdef HAVE_WINDOW_SYSTEM + +extern Lisp_Object Qtop, Qbottom, Qcenter; + +/* Non-nil means that newline may flow into the right fringe. */ + +Lisp_Object Voverflow_newline_into_fringe; + + +enum fringe_bitmap_type +{ + NO_FRINGE_BITMAP = 0, + UNDEF_FRINGE_BITMAP, + LEFT_TRUNCATION_BITMAP, + RIGHT_TRUNCATION_BITMAP, + UP_ARROW_BITMAP, + DOWN_ARROW_BITMAP, + CONTINUED_LINE_BITMAP, + CONTINUATION_LINE_BITMAP, + OVERLAY_ARROW_BITMAP, + TOP_LEFT_ANGLE_BITMAP, + TOP_RIGHT_ANGLE_BITMAP, + BOTTOM_LEFT_ANGLE_BITMAP, + BOTTOM_RIGHT_ANGLE_BITMAP, + LEFT_BRACKET_BITMAP, + RIGHT_BRACKET_BITMAP, + FILLED_BOX_CURSOR_BITMAP, + HOLLOW_BOX_CURSOR_BITMAP, + HOLLOW_SQUARE_BITMAP, + BAR_CURSOR_BITMAP, + HBAR_CURSOR_BITMAP, + ZV_LINE_BITMAP, + MAX_STANDARD_FRINGE_BITMAPS +}; + +enum fringe_bitmap_align +{ + ALIGN_BITMAP_CENTER = 0, + ALIGN_BITMAP_TOP, + ALIGN_BITMAP_BOTTOM +}; + +struct fringe_bitmap +{ + unsigned short *bits; + unsigned height : 8; + unsigned width : 8; + unsigned period : 8; + unsigned align : 2; + unsigned dynamic : 1; +}; + + +/*********************************************************************** + Fringe bitmaps + ***********************************************************************/ + +/* Undefined bitmap. A question mark. */ +/* + ..xxxx.. + .xxxxxx. + xx....xx + xx....xx + ....xx.. + ...xx... + ...xx... + ........ + ...xx... + ...xx... +*/ +static unsigned short unknown_bits[] = { + 0x3c, 0x7e, 0x7e, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x18}; + +/* An arrow like this: `<-'. */ +/* + ...xx... + ..xx.... + .xx..... + xxxxxx.. + xxxxxx.. + .xx..... + ..xx.... + ...xx... +*/ +static unsigned short left_arrow_bits[] = { + 0x18, 0x30, 0x60, 0xfc, 0xfc, 0x60, 0x30, 0x18}; + + +/* Right truncation arrow bitmap `->'. */ +/* + ...xx... + ....xx.. + .....xx. + ..xxxxxx + ..xxxxxx + .....xx. + ....xx.. + ...xx... +*/ +static unsigned short right_arrow_bits[] = { + 0x18, 0x0c, 0x06, 0x3f, 0x3f, 0x06, 0x0c, 0x18}; + + +/* Up arrow bitmap. */ +/* + ...xx... + ..xxxx.. + .xxxxxx. + xxxxxxxx + ...xx... + ...xx... + ...xx... + ...xx... +*/ +static unsigned short up_arrow_bits[] = { + 0x18, 0x3c, 0x7e, 0xff, 0x18, 0x18, 0x18, 0x18}; + + +/* Down arrow bitmap. */ +/* + ...xx... + ...xx... + ...xx... + ...xx... + xxxxxxxx + .xxxxxx. + ..xxxx.. + ...xx... +*/ +static unsigned short down_arrow_bits[] = { + 0x18, 0x18, 0x18, 0x18, 0xff, 0x7e, 0x3c, 0x18}; + +/* Marker for continued lines. */ +/* + ..xxxx.. + ..xxxxx. + ......xx + ..x..xxx + ..xxxxxx + ..xxxxx. + ..xxxx.. + ..xxxxx. +*/ +static unsigned short continued_bits[] = { + 0x3c, 0x3e, 0x03, 0x27, 0x3f, 0x3e, 0x3c, 0x3e}; + +/* Marker for continuation lines. */ +/* + ..xxxx.. + .xxxxx.. + xx...... + xxx..x.. + xxxxxx.. + .xxxxx.. + ..xxxx.. + .xxxxx.. +*/ +static unsigned short continuation_bits[] = { + 0x3c, 0x7c, 0xc0, 0xe4, 0xfc, 0x7c, 0x3c, 0x7c}; + +/* Overlay arrow bitmap. A triangular arrow. */ +/* + xx...... + xxxx.... + xxxxx... + xxxxxx.. + xxxxxx.. + xxxxx... + xxxx.... + xx...... +*/ +static unsigned short ov_bits[] = { + 0xc0, 0xf0, 0xf8, 0xfc, 0xfc, 0xf8, 0xf0, 0xc0}; + +#if 0 +/* Reverse Overlay arrow bitmap. A triangular arrow. */ +/* + ......xx + ....xxxx + ...xxxxx + ..xxxxxx + ..xxxxxx + ...xxxxx + ....xxxx + ......xx +*/ +static unsigned short rev_ov_bits[] = { + 0x03, 0x0f, 0x1f, 0x3f, 0x3f, 0x1f, 0x0f, 0x03}; +#endif + +/* First line bitmap. An top-left angle. */ +/* + xxxxxx.. + xxxxxx.. + xx...... + xx...... + xx...... + xx...... + xx...... + ........ +*/ +static unsigned short top_left_angle_bits[] = { + 0xfc, 0xfc, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00}; + +/* First line bitmap. An right-up angle. */ +/* + ..xxxxxx + ..xxxxxx + ......xx + ......xx + ......xx + ......xx + ......xx + ........ +*/ +static unsigned short top_right_angle_bits[] = { + 0x3f, 0x3f, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00}; + +/* Last line bitmap. An left-down angle. */ +/* + ........ + xx...... + xx...... + xx...... + xx...... + xx...... + xxxxxx.. + xxxxxx.. +*/ +static unsigned short bottom_left_angle_bits[] = { + 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xfc}; + +/* Last line bitmap. An right-down angle. */ +/* + ........ + ......xx + ......xx + ......xx + ......xx + ......xx + ..xxxxxx + ..xxxxxx +*/ +static unsigned short bottom_right_angle_bits[] = { + 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x3f, 0x3f}; + +/* First/last line bitmap. An left bracket. */ +/* + xxxxxx.. + xxxxxx.. + xx...... + xx...... + xx...... + xx...... + xx...... + xx...... + xxxxxx.. + xxxxxx.. +*/ +static unsigned short left_bracket_bits[] = { + 0xfc, 0xfc, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xfc}; + +/* First/last line bitmap. An right bracket. */ +/* + ..xxxxxx + ..xxxxxx + ......xx + ......xx + ......xx + ......xx + ......xx + ......xx + ..xxxxxx + ..xxxxxx +*/ +static unsigned short right_bracket_bits[] = { + 0x3f, 0x3f, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x3f, 0x3f}; + +/* Filled box cursor bitmap. A filled box; max 13 pixels high. */ +/* + xxxxxxx. + xxxxxxx. + xxxxxxx. + xxxxxxx. + xxxxxxx. + xxxxxxx. + xxxxxxx. + xxxxxxx. + xxxxxxx. + xxxxxxx. + xxxxxxx. + xxxxxxx. + xxxxxxx. +*/ +static unsigned short filled_box_cursor_bits[] = { + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe}; + +/* Hollow box cursor bitmap. A hollow box; max 13 pixels high. */ +/* + xxxxxxx. + x.....x. + x.....x. + x.....x. + x.....x. + x.....x. + x.....x. + x.....x. + x.....x. + x.....x. + x.....x. + x.....x. + xxxxxxx. +*/ +static unsigned short hollow_box_cursor_bits[] = { + 0xfe, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xfe}; + +/* Bar cursor bitmap. A vertical bar; max 13 pixels high. */ +/* + xx...... + xx...... + xx...... + xx...... + xx...... + xx...... + xx...... + xx...... + xx...... + xx...... + xx...... + xx...... + xx...... +*/ +static unsigned short bar_cursor_bits[] = { + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0}; + +/* HBar cursor bitmap. A horisontal bar; 2 pixels high. */ +/* + xxxxxxx. + xxxxxxx. +*/ +static unsigned short hbar_cursor_bits[] = { + 0xfe, 0xfe}; + + +/* Bitmap drawn to indicate lines not displaying text if + `indicate-empty-lines' is non-nil. */ +/* + ........ + ..xxxx.. + ........ + ........ + ..xxxx.. + ........ +*/ +static unsigned short zv_bits[] = { + 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, + 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00}; + +/* Hollow square bitmap. */ +/* + .xxxxxx. + .x....x. + .x....x. + .x....x. + .x....x. + .xxxxxx. +*/ +static unsigned short hollow_square_bits[] = { + 0x7e, 0x42, 0x42, 0x42, 0x42, 0x7e}; + + +#define BYTES_PER_BITMAP_ROW (sizeof (unsigned short)) +#define STANDARD_BITMAP_HEIGHT(bits) (sizeof (bits)/BYTES_PER_BITMAP_ROW) +#define FRBITS(bits) bits, STANDARD_BITMAP_HEIGHT (bits) + +struct fringe_bitmap standard_bitmaps[MAX_STANDARD_FRINGE_BITMAPS] = +{ + { NULL, 0, 0, 0, 0, 0 }, /* NO_FRINGE_BITMAP */ + { FRBITS (unknown_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, + { FRBITS (left_arrow_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, + { FRBITS (right_arrow_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, + { FRBITS (up_arrow_bits), 8, 0, ALIGN_BITMAP_TOP, 0 }, + { FRBITS (down_arrow_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 }, + { FRBITS (continued_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, + { FRBITS (continuation_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, + { FRBITS (ov_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, + { FRBITS (top_left_angle_bits), 8, 0, ALIGN_BITMAP_TOP, 0 }, + { FRBITS (top_right_angle_bits), 8, 0, ALIGN_BITMAP_TOP, 0 }, + { FRBITS (bottom_left_angle_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 }, + { FRBITS (bottom_right_angle_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 }, + { FRBITS (left_bracket_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, + { FRBITS (right_bracket_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, + { FRBITS (filled_box_cursor_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, + { FRBITS (hollow_box_cursor_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, + { FRBITS (hollow_square_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, + { FRBITS (bar_cursor_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, + { FRBITS (hbar_cursor_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 }, + { FRBITS (zv_bits), 8, 3, ALIGN_BITMAP_TOP, 0 }, +}; + +static struct fringe_bitmap *fringe_bitmaps[MAX_FRINGE_BITMAPS]; +static unsigned fringe_faces[MAX_FRINGE_BITMAPS]; + +static int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS; + +/* Return 1 if FRINGE_ID is a valid fringe bitmap id. */ + +int +valid_fringe_bitmap_id_p (fringe_id) + int fringe_id; +{ + return (fringe_id >= NO_FRINGE_BITMAP + && fringe_id < max_used_fringe_bitmap + && (fringe_id < MAX_STANDARD_FRINGE_BITMAPS + || fringe_bitmaps[fringe_id] != NULL)); +} + +/* Draw the bitmap WHICH in one of the left or right fringes of + window W. ROW is the glyph row for which to display the bitmap; it + determines the vertical position at which the bitmap has to be + drawn. + LEFT_P is 1 for left fringe, 0 for right fringe. +*/ + +void +draw_fringe_bitmap_1 (w, row, left_p, overlay, which) + struct window *w; + struct glyph_row *row; + int left_p, overlay; + enum fringe_bitmap_type which; +{ + struct frame *f = XFRAME (WINDOW_FRAME (w)); + struct draw_fringe_bitmap_params p; + struct fringe_bitmap *fb; + int period; + int face_id = DEFAULT_FACE_ID; + + p.cursor_p = 0; + p.overlay_p = (overlay & 1) == 1; + p.cursor_p = (overlay & 2) == 2; + + if (which != NO_FRINGE_BITMAP) + { + } + else if (left_p) + { + which = row->left_fringe_bitmap; + face_id = row->left_fringe_face_id; + } + else + { + which = row->right_fringe_bitmap; + face_id = row->right_fringe_face_id; + } + + if (face_id == DEFAULT_FACE_ID) + face_id = fringe_faces[which]; + + fb = fringe_bitmaps[which]; + if (fb == NULL) + fb = &standard_bitmaps[which < MAX_STANDARD_FRINGE_BITMAPS + ? which : UNDEF_FRINGE_BITMAP]; + + period = fb->period; + + /* Convert row to frame coordinates. */ + p.y = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); + + p.which = which; + p.bits = fb->bits; + p.wd = fb->width; + + p.h = fb->height; + p.dh = (period > 0 ? (p.y % period) : 0); + p.h -= p.dh; + /* Clip bitmap if too high. */ + if (p.h > row->height) + p.h = row->height; + + p.face = FACE_FROM_ID (f, face_id); + + if (p.face == NULL) + { + /* Why does this happen? ++kfs */ + return; + } + + PREPARE_FACE_FOR_DISPLAY (f, p.face); + + /* Clear left fringe if no bitmap to draw or if bitmap doesn't fill + the fringe. */ + p.bx = -1; + if (left_p) + { + int wd = WINDOW_LEFT_FRINGE_WIDTH (w); + int x = window_box_left (w, (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) + ? LEFT_MARGIN_AREA + : TEXT_AREA)); + if (p.wd > wd) + p.wd = wd; + p.x = x - p.wd - (wd - p.wd) / 2; + + if (p.wd < wd || row->height > p.h) + { + /* If W has a vertical border to its left, don't draw over it. */ + wd -= ((!WINDOW_LEFTMOST_P (w) + && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) + ? 1 : 0); + p.bx = x - wd; + p.nx = wd; + } + } + else + { + int x = window_box_right (w, + (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) + ? RIGHT_MARGIN_AREA + : TEXT_AREA)); + int wd = WINDOW_RIGHT_FRINGE_WIDTH (w); + if (p.wd > wd) + p.wd = wd; + p.x = x + (wd - p.wd) / 2; + /* Clear right fringe if no bitmap to draw of if bitmap doesn't fill + the fringe. */ + if (p.wd < wd || row->height > p.h) + { + p.bx = x; + p.nx = wd; + } + } + + if (p.bx >= 0) + { + int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); + + p.by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, row->y)); + p.ny = row->visible_height; + } + + /* Adjust y to the offset in the row to start drawing the bitmap. */ + switch (fb->align) + { + case ALIGN_BITMAP_CENTER: + p.y += (row->height - p.h) / 2; + break; + case ALIGN_BITMAP_BOTTOM: + p.h = fb->height; + p.y += (row->visible_height - p.h); + break; + case ALIGN_BITMAP_TOP: + break; + } + + rif->draw_fringe_bitmap (w, row, &p); +} + +void +draw_fringe_bitmap (w, row, left_p) + struct window *w; + struct glyph_row *row; + int left_p; +{ + int overlay = 0; + + if (!left_p && row->cursor_in_fringe_p) + { + int cursor = NO_FRINGE_BITMAP; + + switch (w->phys_cursor_type) + { + case HOLLOW_BOX_CURSOR: + if (row->visible_height >= STANDARD_BITMAP_HEIGHT (hollow_box_cursor_bits)) + cursor = HOLLOW_BOX_CURSOR_BITMAP; + else + cursor = HOLLOW_SQUARE_BITMAP; + break; + case FILLED_BOX_CURSOR: + cursor = FILLED_BOX_CURSOR_BITMAP; + break; + case BAR_CURSOR: + cursor = BAR_CURSOR_BITMAP; + break; + case HBAR_CURSOR: + cursor = HBAR_CURSOR_BITMAP; + break; + case NO_CURSOR: + default: + w->phys_cursor_on_p = 0; + row->cursor_in_fringe_p = 0; + break; + } + if (cursor != NO_FRINGE_BITMAP) + { + draw_fringe_bitmap_1 (w, row, 0, 2, cursor); + overlay = cursor == FILLED_BOX_CURSOR_BITMAP ? 3 : 1; + } + } + + draw_fringe_bitmap_1 (w, row, left_p, overlay, NO_FRINGE_BITMAP); + + if (left_p && row->overlay_arrow_p) + draw_fringe_bitmap_1 (w, row, 1, 1, + (w->overlay_arrow_bitmap + ? w->overlay_arrow_bitmap + : OVERLAY_ARROW_BITMAP)); +} + + +/* Draw fringe bitmaps for glyph row ROW on window W. Call this + function with input blocked. */ + +void +draw_row_fringe_bitmaps (w, row) + struct window *w; + struct glyph_row *row; +{ + xassert (interrupt_input_blocked); + + /* If row is completely invisible, because of vscrolling, we + don't have to draw anything. */ + if (row->visible_height <= 0) + return; + + if (WINDOW_LEFT_FRINGE_WIDTH (w) != 0) + draw_fringe_bitmap (w, row, 1); + + if (WINDOW_RIGHT_FRINGE_WIDTH (w) != 0) + draw_fringe_bitmap (w, row, 0); +} + +/* Draw the fringes of window W. Only fringes for rows marked for + update in redraw_fringe_bitmaps_p are drawn. */ + +void +draw_window_fringes (w) + struct window *w; +{ + struct glyph_row *row; + int yb = window_text_bottom_y (w); + int nrows = w->current_matrix->nrows; + int y = 0, rn; + + if (w->pseudo_window_p) + return; + + for (y = 0, rn = 0, row = w->current_matrix->rows; + y < yb && rn < nrows; + y += row->height, ++row, ++rn) + { + if (!row->redraw_fringe_bitmaps_p) + continue; + draw_row_fringe_bitmaps (w, row); + row->redraw_fringe_bitmaps_p = 0; + } +} + + +/* Recalculate the bitmaps to show in the fringes of window W. + If FORCE_P is 0, only mark rows with modified bitmaps for update in + redraw_fringe_bitmaps_p; else mark all rows for update. */ + +int +update_window_fringes (w, force_p) + struct window *w; + int force_p; +{ + struct glyph_row *row, *cur = 0; + int yb = window_text_bottom_y (w); + int rn, nrows = w->current_matrix->nrows; + int y; + int redraw_p = 0; + Lisp_Object ind; + int boundary_pos = 0, arrow_pos = 0; + int empty_pos = 0; + + if (w->pseudo_window_p) + return 0; + + if (!MINI_WINDOW_P (w) + && (ind = XBUFFER (w->buffer)->indicate_buffer_boundaries, !NILP (ind))) + { + int do_eob = 1, do_bob = 1; + Lisp_Object arrows; + + if (CONSP (ind)) + arrows = XCDR (ind), ind = XCAR (ind); + else + arrows = ind; + + if (EQ (ind, Qleft)) + boundary_pos = -1; + else if (EQ (ind, Qright)) + boundary_pos = 1; + + if (EQ (arrows, Qleft)) + arrow_pos = -1; + else if (EQ (arrows, Qright)) + arrow_pos = 1; + + for (y = 0, rn = 0; + y < yb && rn < nrows; + y += row->height, ++rn) + { + unsigned indicate_bob_p, indicate_top_line_p; + unsigned indicate_eob_p, indicate_bottom_line_p; + + row = w->desired_matrix->rows + rn; + if (!row->enabled_p) + row = w->current_matrix->rows + rn; + + indicate_bob_p = row->indicate_bob_p; + indicate_top_line_p = row->indicate_top_line_p; + indicate_eob_p = row->indicate_eob_p; + indicate_bottom_line_p = row->indicate_bottom_line_p; + + row->indicate_bob_p = row->indicate_top_line_p = 0; + row->indicate_eob_p = row->indicate_bottom_line_p = 0; + + if (!NILP (ind) + && MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer))) + row->indicate_bob_p = do_bob, do_bob = 0; + else if (!NILP (arrows) + && (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0) == rn) + row->indicate_top_line_p = 1; + + if (!NILP (ind) + && MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer))) + row->indicate_eob_p = do_eob, do_eob = 0; + else if (!NILP (arrows) + && y + row->height >= yb) + row->indicate_bottom_line_p = 1; + + if (indicate_bob_p != row->indicate_bob_p + || indicate_top_line_p != row->indicate_top_line_p + || indicate_eob_p != row->indicate_eob_p + || indicate_bottom_line_p != row->indicate_bottom_line_p) + row->redraw_fringe_bitmaps_p = 1; + } + } + + if (EQ (XBUFFER (w->buffer)->indicate_empty_lines, Qright)) + empty_pos = 1; + else if (EQ (XBUFFER (w->buffer)->indicate_empty_lines, Qleft)) + empty_pos = -1; + + for (y = 0, rn = 0; + y < yb && rn < nrows; + y += row->height, rn++) + { + enum fringe_bitmap_type left, right; + unsigned left_face_id, right_face_id; + + row = w->desired_matrix->rows + rn; + cur = w->current_matrix->rows + rn; + if (!row->enabled_p) + row = cur; + + left_face_id = right_face_id = DEFAULT_FACE_ID; + + /* Decide which bitmap to draw in the left fringe. */ + if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) + left = NO_FRINGE_BITMAP; + else if (row->left_user_fringe_bitmap != NO_FRINGE_BITMAP) + { + left = row->left_user_fringe_bitmap; + left_face_id = row->left_user_fringe_face_id; + } + else if (row->indicate_bob_p && boundary_pos <= 0) + left = ((row->indicate_eob_p && boundary_pos < 0) + ? LEFT_BRACKET_BITMAP : TOP_LEFT_ANGLE_BITMAP); + else if (row->indicate_eob_p && boundary_pos < 0) + left = BOTTOM_LEFT_ANGLE_BITMAP; + else if (row->truncated_on_left_p) + left = LEFT_TRUNCATION_BITMAP; + else if (MATRIX_ROW_CONTINUATION_LINE_P (row)) + left = CONTINUATION_LINE_BITMAP; + else if (row->indicate_empty_line_p && empty_pos <= 0) + left = ZV_LINE_BITMAP; + else if (row->indicate_top_line_p && arrow_pos <= 0) + left = UP_ARROW_BITMAP; + else if (row->indicate_bottom_line_p && arrow_pos < 0) + left = DOWN_ARROW_BITMAP; + else + left = NO_FRINGE_BITMAP; + + /* Decide which bitmap to draw in the right fringe. */ + if (WINDOW_RIGHT_FRINGE_WIDTH (w) == 0) + right = NO_FRINGE_BITMAP; + else if (row->right_user_fringe_bitmap != NO_FRINGE_BITMAP) + { + right = row->right_user_fringe_bitmap; + right_face_id = row->right_user_fringe_face_id; + } + else if (row->indicate_bob_p && boundary_pos > 0) + right = ((row->indicate_eob_p && boundary_pos >= 0) + ? RIGHT_BRACKET_BITMAP : TOP_RIGHT_ANGLE_BITMAP); + else if (row->indicate_eob_p && boundary_pos >= 0) + right = BOTTOM_RIGHT_ANGLE_BITMAP; + else if (row->truncated_on_right_p) + right = RIGHT_TRUNCATION_BITMAP; + else if (row->continued_p) + right = CONTINUED_LINE_BITMAP; + else if (row->indicate_top_line_p && arrow_pos > 0) + right = UP_ARROW_BITMAP; + else if (row->indicate_bottom_line_p && arrow_pos >= 0) + right = DOWN_ARROW_BITMAP; + else if (row->indicate_empty_line_p + && (empty_pos > 0 + || (WINDOW_LEFT_FRINGE_WIDTH (w) == 0 && empty_pos == 0))) + right = ZV_LINE_BITMAP; + else + right = NO_FRINGE_BITMAP; + + if (force_p + || row->y != cur->y + || row->visible_height != cur->visible_height + || left != cur->left_fringe_bitmap + || right != cur->right_fringe_bitmap + || left_face_id != cur->left_fringe_face_id + || right_face_id != cur->right_fringe_face_id + || cur->redraw_fringe_bitmaps_p) + { + redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1; + cur->left_fringe_bitmap = left; + cur->right_fringe_bitmap = right; + cur->left_fringe_face_id = left_face_id; + cur->right_fringe_face_id = right_face_id; + } + + if (row->overlay_arrow_p != cur->overlay_arrow_p) + { + redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1; + cur->overlay_arrow_p = row->overlay_arrow_p; + } + + row->left_fringe_bitmap = left; + row->right_fringe_bitmap = right; + row->left_fringe_face_id = left_face_id; + row->right_fringe_face_id = right_face_id; + } + + return redraw_p; +} + + +/* Compute actual fringe widths for frame F. + + If REDRAW is 1, redraw F if the fringe settings was actually + modified and F is visible. + + Since the combined left and right fringe must occupy an integral + number of columns, we may need to add some pixels to each fringe. + Typically, we add an equal amount (+/- 1 pixel) to each fringe, + but a negative width value is taken literally (after negating it). + + We never make the fringes narrower than specified. It is planned + to make fringe bitmaps customizable and expandable, and at that + time, the user will typically specify the minimum number of pixels + needed for his bitmaps, so we shouldn't select anything less than + what is specified. +*/ + +void +compute_fringe_widths (f, redraw) + struct frame *f; + int redraw; +{ + int o_left = FRAME_LEFT_FRINGE_WIDTH (f); + int o_right = FRAME_RIGHT_FRINGE_WIDTH (f); + int o_cols = FRAME_FRINGE_COLS (f); + + Lisp_Object left_fringe = Fassq (Qleft_fringe, f->param_alist); + Lisp_Object right_fringe = Fassq (Qright_fringe, f->param_alist); + int left_fringe_width, right_fringe_width; + + if (!NILP (left_fringe)) + left_fringe = Fcdr (left_fringe); + if (!NILP (right_fringe)) + right_fringe = Fcdr (right_fringe); + + left_fringe_width = ((NILP (left_fringe) || !INTEGERP (left_fringe)) ? 8 : + XINT (left_fringe)); + right_fringe_width = ((NILP (right_fringe) || !INTEGERP (right_fringe)) ? 8 : + XINT (right_fringe)); + + if (left_fringe_width || right_fringe_width) + { + int left_wid = left_fringe_width >= 0 ? left_fringe_width : -left_fringe_width; + int right_wid = right_fringe_width >= 0 ? right_fringe_width : -right_fringe_width; + int conf_wid = left_wid + right_wid; + int font_wid = FRAME_COLUMN_WIDTH (f); + int cols = (left_wid + right_wid + font_wid-1) / font_wid; + int real_wid = cols * font_wid; + if (left_wid && right_wid) + { + if (left_fringe_width < 0) + { + /* Left fringe width is fixed, adjust right fringe if necessary */ + FRAME_LEFT_FRINGE_WIDTH (f) = left_wid; + FRAME_RIGHT_FRINGE_WIDTH (f) = real_wid - left_wid; + } + else if (right_fringe_width < 0) + { + /* Right fringe width is fixed, adjust left fringe if necessary */ + FRAME_LEFT_FRINGE_WIDTH (f) = real_wid - right_wid; + FRAME_RIGHT_FRINGE_WIDTH (f) = right_wid; + } + else + { + /* Adjust both fringes with an equal amount. + Note that we are doing integer arithmetic here, so don't + lose a pixel if the total width is an odd number. */ + int fill = real_wid - conf_wid; + FRAME_LEFT_FRINGE_WIDTH (f) = left_wid + fill/2; + FRAME_RIGHT_FRINGE_WIDTH (f) = right_wid + fill - fill/2; + } + } + else if (left_fringe_width) + { + FRAME_LEFT_FRINGE_WIDTH (f) = real_wid; + FRAME_RIGHT_FRINGE_WIDTH (f) = 0; + } + else + { + FRAME_LEFT_FRINGE_WIDTH (f) = 0; + FRAME_RIGHT_FRINGE_WIDTH (f) = real_wid; + } + FRAME_FRINGE_COLS (f) = cols; + } + else + { + FRAME_LEFT_FRINGE_WIDTH (f) = 0; + FRAME_RIGHT_FRINGE_WIDTH (f) = 0; + FRAME_FRINGE_COLS (f) = 0; + } + + if (redraw && FRAME_VISIBLE_P (f)) + if (o_left != FRAME_LEFT_FRINGE_WIDTH (f) || + o_right != FRAME_RIGHT_FRINGE_WIDTH (f) || + o_cols != FRAME_FRINGE_COLS (f)) + redraw_frame (f); +} + +DEFUN ("destroy-fringe-bitmap", Fdestroy_fringe_bitmap, Sdestroy_fringe_bitmap, + 1, 1, 0, + doc: /* Destroy fringe bitmap WHICH. +If WHICH overrides a standard fringe bitmap, the original bitmap is restored. */) + (which) + Lisp_Object which; +{ + int n; + struct fringe_bitmap **fbp; + + CHECK_NUMBER (which); + if (n = XINT (which), n >= max_used_fringe_bitmap) + return Qnil; + + fringe_faces[n] = FRINGE_FACE_ID; + + fbp = &fringe_bitmaps[n]; + if (*fbp && (*fbp)->dynamic) + { + if (rif->destroy_fringe_bitmap) + rif->destroy_fringe_bitmap (n); + xfree (*fbp); + *fbp = NULL; + } + + while (max_used_fringe_bitmap > MAX_STANDARD_FRINGE_BITMAPS + && fringe_bitmaps[max_used_fringe_bitmap - 1] == NULL) + max_used_fringe_bitmap--; + + return Qnil; +} + + +/* Initialize bitmap bit. + + On X, we bit-swap the built-in bitmaps and reduce bitmap + from short to char array if width is <= 8 bits. + + On MAC with big-endian CPU, we need to byte-swap each short. + + On W32 and MAC (little endian), there's no need to do this. +*/ + +void +init_fringe_bitmap (which, fb, once_p) + enum fringe_bitmap_type which; + struct fringe_bitmap *fb; + int once_p; +{ + if (once_p || fb->dynamic) + { +#if defined (HAVE_X_WINDOWS) + static unsigned char swap_nibble[16] + = { 0x0, 0x8, 0x4, 0xc, /* 0000 1000 0100 1100 */ + 0x2, 0xa, 0x6, 0xe, /* 0010 1010 0110 1110 */ + 0x1, 0x9, 0x5, 0xd, /* 0001 1001 0101 1101 */ + 0x3, 0xb, 0x7, 0xf }; /* 0011 1011 0111 1111 */ + unsigned short *bits = fb->bits; + int j; + + if (fb->width <= 8) + { + unsigned char *cbits = (unsigned char *)fb->bits; + for (j = 0; j < fb->height; j++) + { + unsigned short b = *bits++; + unsigned char c; + c = (unsigned char)((swap_nibble[b & 0xf] << 4) + | (swap_nibble[(b>>4) & 0xf])); + *cbits++ = (c >> (8 - fb->width)); + } + } + else + { + for (j = 0; j < fb->height; j++) + { + unsigned short b = *bits; + b = (unsigned short)((swap_nibble[b & 0xf] << 12) + | (swap_nibble[(b>>4) & 0xf] << 8) + | (swap_nibble[(b>>8) & 0xf] << 4) + | (swap_nibble[(b>>12) & 0xf])); + *bits++ = (b >> (16 - fb->width)); + } + } +#endif /* HAVE_X_WINDOWS */ + +#if defined (MAC_OS) && defined (WORDS_BIG_ENDIAN) + unsigned short *bits = fb->bits; + int j; + for (j = 0; j < fb->height; j++) + { + unsigned short b = *bits; + *bits++ = ((b >> 8) & 0xff) | ((b & 0xff) << 8); + } +#endif /* MAC_OS && WORDS_BIG_ENDIAN */ + } + + if (!once_p) + { + Fdestroy_fringe_bitmap (make_number (which)); + + if (rif->define_fringe_bitmap) + rif->define_fringe_bitmap (which, fb->bits, fb->height, fb->width); + + fringe_bitmaps[which] = fb; + if (which >= max_used_fringe_bitmap) + max_used_fringe_bitmap = which + 1; + } +} + + +DEFUN ("define-fringe-bitmap", Fdefine_fringe_bitmap, Sdefine_fringe_bitmap, + 1, 5, 0, + doc: /* Define a fringe bitmap from BITS of height HEIGHT and width WIDTH. +BITS is either a string or a vector of integers. +HEIGHT is height of bitmap. If HEIGHT is nil, use length of BITS. +WIDTH must be an integer between 1 and 16, or nil which defaults to 8. +Optional fourth arg ALIGN may be one of `top', `center', or `bottom', +indicating the positioning of the bitmap relative to the rows where it +is used; the default is to center the bitmap. Fourth arg may also be a +list (ALIGN PERIODIC) where PERIODIC non-nil specifies that the bitmap +should be repeated. +Optional fifth argument WHICH is bitmap number to redefine. +Return new bitmap number, or nil of no more free bitmap slots. */) + (bits, height, width, align, which) + Lisp_Object bits, height, width, align, which; +{ + Lisp_Object len; + int n, h, i, j; + unsigned short *b; + struct fringe_bitmap fb, *xfb; + int fill1 = 0, fill2 = 0; + + if (!STRINGP (bits) && !VECTORP (bits)) + bits = wrong_type_argument (Qstringp, bits); + + len = Flength (bits); + + if (NILP (height)) + h = fb.height = XINT (len); + else + { + CHECK_NUMBER (height); + fb.height = min (XINT (height), 255); + if (fb.height > XINT (len)) + { + h = XINT (len); + fill1 = (fb.height - h) / 2; + fill2 = fb.height - h - fill1; + } + } + + if (NILP (width)) + fb.width = 8; + else + { + CHECK_NUMBER (width); + fb.width = min (XINT (width), 255); + } + + fb.period = 0; + fb.align = ALIGN_BITMAP_CENTER; + + if (CONSP (align)) + { + Lisp_Object period = XCDR (align); + if (CONSP (period)) + { + period = XCAR (period); + if (!NILP (period)) + { + fb.period = fb.height; + fb.height = 255; + } + } + align = XCAR (align); + } + if (EQ (align, Qtop)) + fb.align = ALIGN_BITMAP_TOP; + else if (EQ (align, Qbottom)) + fb.align = ALIGN_BITMAP_BOTTOM; + else if (!NILP (align) && !EQ (align, Qcenter)) + error ("Bad align argument"); + + if (NILP (which)) + { + if (max_used_fringe_bitmap < MAX_FRINGE_BITMAPS) + n = max_used_fringe_bitmap++; + else + { + for (n = MAX_STANDARD_FRINGE_BITMAPS; + n < MAX_FRINGE_BITMAPS; + n++) + if (fringe_bitmaps[n] == NULL) + break; + if (n == MAX_FRINGE_BITMAPS) + return Qnil; + } + which = make_number (n); + } + else + { + CHECK_NUMBER (which); + n = XINT (which); + if (n <= NO_FRINGE_BITMAP || n >= MAX_FRINGE_BITMAPS) + error ("Invalid fringe bitmap number"); + } + + fb.dynamic = 1; + + xfb = (struct fringe_bitmap *) xmalloc (sizeof fb + + fb.height * BYTES_PER_BITMAP_ROW); + fb.bits = b = (unsigned short *) (xfb + 1); + bzero (b, fb.height); + + j = 0; + while (j < fb.height) + { + for (i = 0; i < fill1 && j < fb.height; i++) + b[j++] = 0; + for (i = 0; i < h && j < fb.height; i++) + { + Lisp_Object elt = Faref (bits, make_number (i)); + b[j++] = NUMBERP (elt) ? XINT (elt) : 0; + } + for (i = 0; i < fill2 && j < fb.height; i++) + b[j++] = 0; + } + + *xfb = fb; + + init_fringe_bitmap (n, xfb, 0); + + return which; +} + +DEFUN ("set-fringe-bitmap-face", Fset_fringe_bitmap_face, Sset_fringe_bitmap_face, + 1, 2, 0, + doc: /* Set face for fringe bitmap FRINGE-ID to FACE. +If FACE is nil, reset face to default fringe face. */) + (fringe_id, face) + Lisp_Object fringe_id, face; +{ + int face_id; + + CHECK_NUMBER (fringe_id); + if (!valid_fringe_bitmap_id_p (XINT (fringe_id))) + error ("Invalid fringe id"); + + if (!NILP (face)) + { + face_id = lookup_named_face (SELECTED_FRAME (), face); + if (face_id < 0) + error ("No such face"); + } + else + face_id = FRINGE_FACE_ID; + + fringe_faces [XINT (fringe_id)] = face_id; + + return Qnil; +} + +DEFUN ("fringe-bitmaps-at-pos", Ffringe_bitmaps_at_pos, Sfringe_bitmaps_at_pos, + 0, 2, 0, + doc: /* Return fringe bitmaps of row containing position POS in window WINDOW. +If WINDOW is nil, use selected window. If POS is nil, use value of point +in that window. Return value is a cons (LEFT . RIGHT) where LEFT and RIGHT +are the fringe bitmap numbers for the bitmaps in the left and right fringe, +resp. Return nil if POS is not visible in WINDOW. */) + (pos, window) + Lisp_Object pos, window; +{ + struct window *w; + struct buffer *old_buffer = NULL; + struct glyph_row *row; + int textpos; + + if (NILP (window)) + window = selected_window; + CHECK_WINDOW (window); + w = XWINDOW (window); + + if (!NILP (pos)) + { + CHECK_NUMBER_COERCE_MARKER (pos); + textpos = XINT (pos); + } + else if (w == XWINDOW (selected_window)) + textpos = PT; + else + textpos = XMARKER (w->pointm)->charpos; + + row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); + row = row_containing_pos (w, textpos, row, NULL, 0); + if (row) + return Fcons (make_number (row->left_fringe_bitmap), + make_number (row->right_fringe_bitmap)); + else + return Qnil; +} + + +/*********************************************************************** + Initialization + ***********************************************************************/ + +void +syms_of_fringe () +{ + + defsubr (&Sdestroy_fringe_bitmap); + defsubr (&Sdefine_fringe_bitmap); + defsubr (&Sfringe_bitmaps_at_pos); + defsubr (&Sset_fringe_bitmap_face); + + DEFVAR_LISP ("overflow-newline-into-fringe", &Voverflow_newline_into_fringe, + doc: /* *Non-nil means that newline may flow into the right fringe. +This means that display lines which are exactly as wide as the window +(not counting the final newline) will only occupy one screen line, by +showing (or hiding) the final newline in the right fringe; when point +is at the final newline, the cursor is shown in the right fringe. +If nil, also continue lines which are exactly as wide as the window. */); + Voverflow_newline_into_fringe = Qt; + +} + +/* Initialize this module when Emacs starts. */ + +void +init_fringe_once () +{ + enum fringe_bitmap_type bt; + + for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++) + init_fringe_bitmap(bt, &standard_bitmaps[bt], 1); +} + +void +init_fringe () +{ + int i; + + bzero (fringe_bitmaps, sizeof fringe_bitmaps); + for (i = 0; i < MAX_FRINGE_BITMAPS; i++) + fringe_faces[i] = FRINGE_FACE_ID; +} + +#ifdef HAVE_NTGUI + +void +w32_init_fringe () +{ + enum fringe_bitmap_type bt; + + for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++) + { + struct fringe_bitmap *fb = &standard_bitmaps[bt]; + rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width); + } +} + +void +w32_reset_fringes () +{ + /* Destroy row bitmaps. */ + int bt; + + for (bt = NO_FRINGE_BITMAP + 1; bt < max_used_fringe_bitmap; bt++) + rif->destroy_fringe_bitmap (bt); +} + +#endif /* HAVE_NTGUI */ + +#endif /* HAVE_WINDOW_SYSTEM */ + +/* arch-tag: 04596920-43eb-473d-b319-82712338162d + (do not change this comment) */ diff --git a/src/getloadavg.c b/src/getloadavg.c index 462ee16fa5..9a104cee7d 100644 --- a/src/getloadavg.c +++ b/src/getloadavg.c @@ -1036,3 +1036,6 @@ main (argc, argv) exit (0); } #endif /* TEST */ + +/* arch-tag: 2b37a242-6289-41f4-8cd5-0e73fd615db1 + (do not change this comment) */ diff --git a/src/getpagesize.h b/src/getpagesize.h index 4d52618339..269a2ff17f 100644 --- a/src/getpagesize.h +++ b/src/getpagesize.h @@ -57,3 +57,6 @@ Boston, MA 02111-1307, USA. */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ + +/* arch-tag: ff6206e3-97e2-4763-923a-e84bf28eabbc + (do not change this comment) */ diff --git a/src/gmalloc.c b/src/gmalloc.c index 7c654e1ece..eae83a74eb 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -352,6 +352,10 @@ Cambridge, MA 02139, USA. #include /* How to really get more memory. */ +#if defined(CYGWIN) +extern __ptr_t bss_sbrk PP ((ptrdiff_t __size)); +extern int bss_sbrk_did_unexec; +#endif __ptr_t (*__morecore) PP ((ptrdiff_t __size)) = __default_morecore; /* Debugging hook for `malloc'. */ @@ -1572,7 +1576,14 @@ __ptr_t __default_morecore (increment) __malloc_ptrdiff_t increment; { - __ptr_t result = (__ptr_t) __sbrk (increment); + __ptr_t result; +#if defined(CYGWIN) + if (!bss_sbrk_did_unexec) + { + return bss_sbrk (increment); + } +#endif + result = (__ptr_t) __sbrk (increment); if (result == (__ptr_t) -1) return NULL; return result; @@ -1978,3 +1989,6 @@ mprobe (__ptr_t ptr) } #endif /* GC_MCHECK */ + +/* arch-tag: 93dce5c0-f49a-41b5-86b1-f91c4169c02e + (do not change this comment) */ diff --git a/src/gnu.h b/src/gnu.h index b5cf7261f7..1d623431af 100644 --- a/src/gnu.h +++ b/src/gnu.h @@ -31,3 +31,6 @@ static unsigned char gnu_bits[] = { 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + +/* arch-tag: b57020c7-c937-4d77-8ca6-3875178d9828 + (do not change this comment) */ diff --git a/src/gtkutil.c b/src/gtkutil.c index 1f92040ff6..4d0b50573f 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -36,9 +36,128 @@ Boston, MA 02111-1307, USA. */ #include "coding.h" #include + #define FRAME_TOTAL_PIXEL_HEIGHT(f) \ (FRAME_PIXEL_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f)) + +/*********************************************************************** + Display handling functions + ***********************************************************************/ + +#ifdef HAVE_GTK_MULTIDISPLAY + +/* Return the GdkDisplay that corresponds to the X display DPY. */ +static GdkDisplay * +xg_get_gdk_display (dpy) + Display *dpy; +{ + return gdk_x11_lookup_xdisplay (dpy); +} + +/* When the GTK widget W is to be created on a display for F that + is not the default display, set the display for W. + W can be a GtkMenu or a GtkWindow widget. */ +static void +xg_set_screen (w, f) + GtkWidget *w; + FRAME_PTR f; +{ + if (FRAME_X_DISPLAY (f) != GDK_DISPLAY ()) + { + GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); + GdkScreen *gscreen = gdk_display_get_default_screen (gdpy); + + if (GTK_IS_MENU (w)) + gtk_menu_set_screen (GTK_MENU (w), gscreen); + else + gtk_window_set_screen (GTK_WINDOW (w), gscreen); + } +} + + +#else /* not HAVE_GTK_MULTIDISPLAY */ + +/* Make some defines so we can use the GTK 2.2 functions when + compiling with GTK 2.0. */ +#define xg_set_screen(w, f) +#define gdk_xid_table_lookup_for_display(dpy, w) gdk_xid_table_lookup (w) +#define gdk_pixmap_foreign_new_for_display(dpy, p) gdk_pixmap_foreign_new (p) +#define gdk_cursor_new_for_display(dpy, c) gdk_cursor_new (c) +#define gdk_x11_lookup_xdisplay(dpy) 0 +#define GdkDisplay void + +#endif /* not HAVE_GTK_MULTIDISPLAY */ + +/* Open a display named by DISPLAY_NAME. The display is returned in *DPY. + *DPY is set to NULL if the display can't be opened. + + Returns non-zero if display could be opened, zero if display could not + be opened, and less than zero if the GTK version doesn't support + multipe displays. */ +int +xg_display_open (display_name, dpy) + char *display_name; + Display **dpy; +{ +#ifdef HAVE_GTK_MULTIDISPLAY + GdkDisplay *gdpy; + + gdpy = gdk_display_open (display_name); + *dpy = gdpy ? GDK_DISPLAY_XDISPLAY (gdpy) : NULL; + + return gdpy != NULL; + +#else /* not HAVE_GTK_MULTIDISPLAY */ + + return -1; +#endif /* not HAVE_GTK_MULTIDISPLAY */ +} + + +void +xg_display_close (Display *dpy) +{ +#ifdef HAVE_GTK_MULTIDISPLAY + GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpy); + + /* GTK 2.2 has a bug that makes gdk_display_close crash (bug + http://bugzilla.gnome.org/show_bug.cgi?id=85715). This way + we can continue running, but there will be memory leaks. */ + +#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 4 + + /* If this is the default display, we must change it before calling + dispose, otherwise it will crash. */ + if (gdk_display_get_default () == gdpy) + { + struct x_display_info *dpyinfo; + Display *new_dpy = 0; + GdkDisplay *gdpy_new; + + /* Find another display. */ + for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next) + if (dpyinfo->display != dpy) + { + new_dpy = dpyinfo->display; + break; + } + + if (! new_dpy) return; /* Emacs will exit anyway. */ + + gdpy_new = gdk_x11_lookup_xdisplay (new_dpy); + gdk_display_manager_set_default_display (gdk_display_manager_get (), + gdpy_new); + } + + g_object_run_dispose (G_OBJECT (gdpy)); + +#else + /* I hope this will be fixed in GTK 2.4. It is what bug 85715 says. */ + gdk_display_close (gdpy); +#endif +#endif /* HAVE_GTK_MULTIDISPLAY */ +} /*********************************************************************** @@ -48,10 +167,6 @@ Boston, MA 02111-1307, USA. */ NULL if no timer is started. */ static struct atimer *xg_timer; -/* The cursor used for scroll bars and popup menus. - We only have one cursor for all scroll bars and all popup menus. */ -static GdkCursor *xg_left_ptr_cursor; - /* The next two variables and functions are taken from lwlib. */ static widget_value *widget_value_free_list; @@ -103,24 +218,48 @@ free_widget_value (wv) } } -/* Set *CURSOR on W and all widgets W contain. We must do like this - for scroll bars and menu because they create widgets internally, - and it is those widgets that are visible. - If *CURSOR is NULL, create a GDK_LEFT_PTR cursor and set *CURSOR to - the created cursor. */ -void +/* Create and return the cursor to be used for popup menus and + scroll bars on display DPY. */ +GdkCursor * +xg_create_default_cursor (dpy) + Display *dpy; +{ + GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpy); + return gdk_cursor_new_for_display (gdpy, GDK_LEFT_PTR); +} + +/* For the image defined in IMG, make and return a GdkPixmap for + the pixmap in *GPIX, and a GdkBitmap for the mask in *GMASK. + If IMG has no mask, *GMASK is set to NULL. + The image is defined on the display where frame F is. */ +static void +xg_get_gdk_pixmap_and_mask (f, img, gpix, gmask) + FRAME_PTR f; + struct image *img; + GdkPixmap **gpix; + GdkBitmap **gmask; +{ + GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); + + *gpix = gdk_pixmap_foreign_new_for_display (gdpy, img->pixmap); + *gmask = img->mask ? + (GdkBitmap*) gdk_pixmap_foreign_new_for_display (gdpy, img->mask) + : 0; +} + + +/* Set CURSOR on W and all widgets W contain. We must do like this + for scroll bars and menu because they create widgets internally, + and it is those widgets that are visible. */ +static void xg_set_cursor (w, cursor) GtkWidget *w; - GdkCursor **cursor; + GdkCursor *cursor; { GList *children = gdk_window_peek_children (w->window); - /* Create the cursor unless already created. */ - if (! *cursor) - *cursor = gdk_cursor_new (GDK_LEFT_PTR); - - gdk_window_set_cursor (w->window, *cursor); + gdk_window_set_cursor (w->window, cursor); /* The scroll bar widget has more than one GDK window (had to look at the source to figure this out), and there is no way to set cursor @@ -128,7 +267,7 @@ xg_set_cursor (w, cursor) Ditto for menus. */ for ( ; children; children = g_list_next (children)) - gdk_window_set_cursor (GDK_WINDOW (children->data), *cursor); + gdk_window_set_cursor (GDK_WINDOW (children->data), cursor); } /* Timer function called when a timeout occurs for xg_timer. @@ -376,25 +515,28 @@ xg_frame_set_char_size (f, cols, rows) gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), pixelwidth, pixelheight); xg_resize_widgets (f, pixelwidth, pixelheight); - + x_wm_set_size_hint (f, 0, 0); SET_FRAME_GARBAGED (f); cancel_mouse_face (f); } -/* Convert an X Window WSESC to its corresponding GtkWidget. +/* Convert an X Window WSESC on display DPY to its corresponding GtkWidget. Must be done like this, because GtkWidget:s can have "hidden" X Window that aren't accessible. Return 0 if no widget match WDESC. */ GtkWidget * -xg_win_to_widget (wdesc) +xg_win_to_widget (dpy, wdesc) + Display *dpy; Window wdesc; { gpointer gdkwin; GtkWidget *gwdesc = 0; BLOCK_INPUT; - gdkwin = gdk_xid_table_lookup (wdesc); + + gdkwin = gdk_xid_table_lookup_for_display (gdk_x11_lookup_xdisplay (dpy), + wdesc); if (gdkwin) { GdkEvent event; @@ -429,9 +571,9 @@ xg_pix_to_gcolor (w, pixel, c) Return TRUE to tell GTK that this expose event has been fully handeled and that GTK shall do nothing more with it. */ static gboolean -xg_fixed_handle_expose(GtkWidget *widget, - GdkEventExpose *event, - gpointer user_data) +xg_fixed_handle_expose (GtkWidget *widget, + GdkEventExpose *event, + gpointer user_data) { GList *iter; @@ -483,6 +625,8 @@ xg_create_frame_widgets (f) BLOCK_INPUT; wtop = gtk_window_new (GTK_WINDOW_TOPLEVEL); + xg_set_screen (wtop, f); + wvbox = gtk_vbox_new (FALSE, 0); wfixed = gtk_fixed_new (); /* Must have this to place scroll bars */ @@ -512,7 +656,8 @@ xg_create_frame_widgets (f) gtk_fixed_set_has_window (GTK_FIXED (wfixed), TRUE); - gtk_widget_set_size_request (wfixed, FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f)); + gtk_widget_set_size_request (wfixed, FRAME_PIXEL_WIDTH (f), + FRAME_PIXEL_HEIGHT (f)); gtk_container_add (GTK_CONTAINER (wtop), wvbox); gtk_box_pack_end (GTK_BOX (wvbox), wfixed, TRUE, TRUE, 0); @@ -963,6 +1108,8 @@ xg_get_file_name (f, prompt, default_filename, mustmatch_p) filewin = gtk_file_selection_new (prompt); filesel = GTK_FILE_SELECTION (filewin); + xg_set_screen (filewin, f); + gtk_widget_set_name (filewin, "emacs-filedialog"); gtk_window_set_transient_for (GTK_WINDOW (filewin), @@ -1333,27 +1480,29 @@ xg_separator_p (char *label) return 0; } -GtkWidget *xg_did_tearoff; +static int xg_detached_menus; + +/* Returns non-zero if there are detached menus. */ +int +xg_have_tear_offs () +{ + return xg_detached_menus > 0; +} /* Callback invoked when a detached menu window is removed. Here we - delete the popup menu. + decrease the xg_detached_menus count. WIDGET is the top level window that is removed (the parent of the menu). - EVENT is the event that triggers the window removal. - CLIENT_DATA points to the menu that is detached. - - Returns TRUE to tell GTK to stop processing this event. */ -static gboolean -tearoff_remove (widget, event, client_data) + CLIENT_DATA is not used. */ +static void +tearoff_remove (widget, client_data) GtkWidget *widget; - GdkEvent *event; gpointer client_data; { - gtk_widget_destroy (GTK_WIDGET (client_data)); - return TRUE; + if (xg_detached_menus > 0) --xg_detached_menus; } -/* Callback invoked when a menu is detached. It sets the xg_did_tearoff - variable. +/* Callback invoked when a menu is detached. It increases the + xg_detached_menus count. WIDGET is the GtkTearoffMenuItem. CLIENT_DATA is not used. */ static void @@ -1362,31 +1511,15 @@ tearoff_activate (widget, client_data) gpointer client_data; { GtkWidget *menu = gtk_widget_get_parent (widget); - if (! gtk_menu_get_tearoff_state (GTK_MENU (menu))) - return; - - xg_did_tearoff = menu; + if (gtk_menu_get_tearoff_state (GTK_MENU (menu))) + { + ++xg_detached_menus; + g_signal_connect (G_OBJECT (gtk_widget_get_toplevel (widget)), + "destroy", + G_CALLBACK (tearoff_remove), 0); + } } -/* If a detach of a popup menu is done, this function should be called - to keep the menu around until the detached window is removed. - MENU is the top level menu for the popup, - SUBMENU is the menu that got detached (that is MENU or a - submenu of MENU), see the xg_did_tearoff variable. */ -void -xg_keep_popup (menu, submenu) - GtkWidget *menu; - GtkWidget *submenu; -{ - GtkWidget *p; - - /* Find the top widget for the detached menu. */ - p = gtk_widget_get_toplevel (submenu); - - /* Delay destroying the menu until the detached menu is removed. */ - g_signal_connect (G_OBJECT (p), "unmap_event", - G_CALLBACK (tearoff_remove), menu); -} /* Create a menu item widget, and connect the callbacks. ITEM decribes the menu item. @@ -1514,7 +1647,11 @@ create_menus (data, f, select_cb, deactivate_cb, highlight_cb, if (! topmenu) { - if (! menu_bar_p) wmenu = gtk_menu_new (); + if (! menu_bar_p) + { + wmenu = gtk_menu_new (); + xg_set_screen (wmenu, f); + } else wmenu = gtk_menu_bar_new (); /* Put cl_data on the top menu for easier access. */ @@ -1585,7 +1722,7 @@ create_menus (data, f, select_cb, deactivate_cb, highlight_cb, highlight_cb, 0, 0, - 1, + add_tearoff_p, 0, cl_data, 0); @@ -1626,37 +1763,39 @@ xg_create_widget (type, name, f, val, GCallback highlight_cb; { GtkWidget *w = 0; + int menu_bar_p = strcmp (type, "menubar") == 0; + int pop_up_p = strcmp (type, "popup") == 0; + if (strcmp (type, "dialog") == 0) { w = create_dialog (val, select_cb, deactivate_cb); + xg_set_screen (w, f); gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f))); gtk_window_set_destroy_with_parent (GTK_WINDOW (w), TRUE); - - if (w) - gtk_widget_set_name (w, "emacs-dialog"); + gtk_widget_set_name (w, "emacs-dialog"); } - else if (strcmp (type, "menubar") == 0 || strcmp (type, "popup") == 0) + else if (menu_bar_p || pop_up_p) { w = create_menus (val->contents, f, select_cb, deactivate_cb, highlight_cb, - strcmp (type, "popup") == 0, - strcmp (type, "menubar") == 0, - 1, + pop_up_p, + menu_bar_p, + menu_bar_p, 0, 0, name); /* Set the cursor to an arrow for popup menus when they are mapped. This is done by default for menu bar menus. */ - if (strcmp (type, "popup") == 0) + if (pop_up_p) { /* Must realize so the GdkWindow inside the widget is created. */ gtk_widget_realize (w); - xg_set_cursor (w, &xg_left_ptr_cursor); + xg_set_cursor (w, FRAME_X_DISPLAY_INFO (f)->xg_cursor); } } else @@ -1834,9 +1973,16 @@ xg_update_menubar (menubar, f, list, iter, pos, val, is up to date when leaving the minibuffer. */ GtkLabel *wlabel = GTK_LABEL (gtk_bin_get_child (GTK_BIN (witem))); char *utf8_label = get_utf8_string (val->name); + GtkWidget *submenu = gtk_menu_item_get_submenu (witem); gtk_label_set_text (wlabel, utf8_label); + /* If this item has a submenu that has been detached, change + the title in the WM decorations also. */ + if (submenu && gtk_menu_get_tearoff_state (GTK_MENU (submenu))) + /* Set the title of the detached window. */ + gtk_menu_set_title (GTK_MENU (submenu), utf8_label); + iter = g_list_next (iter); val = val->next; ++pos; @@ -2222,18 +2368,15 @@ xg_modify_menubar_widgets (menubar, f, val, deep_p, cl_data = (xg_menu_cb_data*) g_object_get_data (G_OBJECT (menubar), XG_FRAME_DATA); - if (! deep_p) - { - widget_value *cur = val->contents; - xg_update_menubar (menubar, f, &list, list, 0, cur, - select_cb, highlight_cb, cl_data); - } - else + xg_update_menubar (menubar, f, &list, list, 0, val->contents, + select_cb, highlight_cb, cl_data); + + if (deep_p); { widget_value *cur; /* Update all sub menus. - We must keep the submenu names (GTK menu item widgets) since the + We must keep the submenus (GTK menu item widgets) since the X Window in the XEvent that activates the menu are those widgets. */ /* Update cl_data, menu_item things in F may have changed. */ @@ -2268,8 +2411,10 @@ xg_modify_menubar_widgets (menubar, f, val, deep_p, a new menu bar item, it has no sub menu yet. So we set the newly created sub menu under witem. */ if (newsub != sub) - gtk_menu_item_set_submenu (witem, newsub); - + { + xg_set_screen (newsub, f); + gtk_menu_item_set_submenu (witem, newsub); + } } } @@ -2425,16 +2570,17 @@ xg_get_widget_from_map (idx) return 0; } -/* Return the scrollbar id for X Window WID. +/* Return the scrollbar id for X Window WID on display DPY. Return -1 if WID not in id_to_widget. */ int -xg_get_scroll_id_for_window (wid) +xg_get_scroll_id_for_window (dpy, wid) + Display *dpy; Window wid; { int idx; GtkWidget *w; - w = xg_win_to_widget (wid); + w = xg_win_to_widget (dpy, wid); if (w) { @@ -2541,7 +2687,7 @@ xg_create_scroll_bar (f, bar, scroll_callback, scroll_bar_name) wscroll, -1, -1); /* Set the cursor to an arrow. */ - xg_set_cursor (wscroll, &xg_left_ptr_cursor); + xg_set_cursor (wscroll, FRAME_X_DISPLAY_INFO (f)->xg_cursor); SET_SCROLL_BAR_X_WINDOW (bar, scroll_id); } @@ -2960,8 +3106,8 @@ xg_tool_bar_item_expose_callback (w, event, client_data) event->area.x -= width > event->area.width ? width-event->area.width : 0; event->area.y -= height > event->area.height ? height-event->area.height : 0; - event->area.x = max(0, event->area.x); - event->area.y = max(0, event->area.y); + event->area.x = max (0, event->area.x); + event->area.y = max (0, event->area.y); event->area.width = max (width, event->area.width); event->area.height = max (height, event->area.height); @@ -2983,7 +3129,7 @@ xg_tool_bar_expose_callback (w, event, client_data) GdkEventExpose *event; gpointer client_data; { - update_frame_tool_bar((FRAME_PTR)client_data); + update_frame_tool_bar ((FRAME_PTR) client_data); return FALSE; } @@ -3116,11 +3262,12 @@ update_frame_tool_bar (f) if (! wicon) { - GdkPixmap *gpix = gdk_pixmap_foreign_new (img->pixmap); - GdkBitmap *gmask = img->mask ? - (GdkBitmap*) gdk_pixmap_foreign_new (img->mask) : 0; + GdkPixmap *gpix; + GdkBitmap *gmask; + GtkWidget *w; - GtkWidget *w = gtk_image_new_from_pixmap (gpix, gmask); + xg_get_gdk_pixmap_and_mask (f, img, &gpix, &gmask); + w = gtk_image_new_from_pixmap (gpix, gmask); gtk_toolbar_append_item (GTK_TOOLBAR (x->toolbar_widget), 0, 0, 0, w, @@ -3178,10 +3325,10 @@ update_frame_tool_bar (f) if (old_img != img->pixmap) { - GdkPixmap *gpix = gdk_pixmap_foreign_new (img->pixmap); - GdkBitmap *gmask = img->mask ? - (GdkBitmap*) gdk_pixmap_foreign_new (img->mask) : 0; + GdkPixmap *gpix; + GdkBitmap *gmask; + xg_get_gdk_pixmap_and_mask (f, img, &gpix, &gmask); gtk_image_set_from_pixmap (wimage, gpix, gmask); } @@ -3249,9 +3396,7 @@ void xg_initialize () { xg_ignore_gtk_scrollbar = 0; - xg_left_ptr_cursor = 0; - xg_did_tearoff = 0; - + xg_detached_menus = 0; xg_menu_cb_list.prev = xg_menu_cb_list.next = xg_menu_item_cb_list.prev = xg_menu_item_cb_list.next = 0; @@ -3275,3 +3420,6 @@ xg_initialize () } #endif /* USE_GTK */ + +/* arch-tag: fe7104da-bc1e-4aba-9bd1-f349c528f7e3 + (do not change this comment) */ diff --git a/src/gtkutil.h b/src/gtkutil.h index a53a3fd5bd..b31ec8c2a1 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h @@ -150,9 +150,9 @@ extern void xg_modify_menubar_widgets P_ ((GtkWidget *menubar, extern int xg_update_frame_menubar P_ ((FRAME_PTR f)); -extern void xg_keep_popup P_ ((GtkWidget *menu, GtkWidget *submenu)); +extern int xg_have_tear_offs P_ ((void)); -extern int xg_get_scroll_id_for_window P_ ((Window wid)); +extern int xg_get_scroll_id_for_window P_ ((Display *dpy, Window wid)); extern void xg_create_scroll_bar P_ ((FRAME_PTR f, struct scroll_bar *bar, @@ -184,7 +184,12 @@ extern void xg_resize_widgets P_ ((FRAME_PTR f, int pixelheight)); extern void xg_frame_cleared P_ ((FRAME_PTR f)); extern void xg_frame_set_char_size P_ ((FRAME_PTR f, int cols, int rows)); -extern GtkWidget * xg_win_to_widget P_ ((Window)); +extern GtkWidget * xg_win_to_widget P_ ((Display *dpy, Window wdesc)); + +extern int xg_display_open P_ ((char *display_name, Display **dpy)); +extern void xg_display_close P_ ((Display *dpy)); +extern GdkCursor * xg_create_default_cursor P_ ((Display *dpy)); + extern int xg_create_frame_widgets P_ ((FRAME_PTR f)); extern void x_wm_set_size_hint P_ ((FRAME_PTR f, long flags, @@ -201,11 +206,8 @@ extern void xg_initialize P_ ((void)); to indicate that the callback should do nothing. */ extern int xg_ignore_gtk_scrollbar; -/* If a detach of a menu is done, this is the menu widget that got - detached. Must be set to NULL before popping up popup menus. - Used with xg_keep_popup to delay deleting popup menus when they - have been detached. */ -extern GtkWidget *xg_did_tearoff; - #endif /* USE_GTK */ #endif /* GTKUTIL_H */ + +/* arch-tag: 0757f3dc-00c7-4cee-9e4c-282cf1d34c72 + (do not change this comment) */ diff --git a/src/hftctl.c b/src/hftctl.c index 272f7bad7f..0609f840e2 100644 --- a/src/hftctl.c +++ b/src/hftctl.c @@ -337,3 +337,6 @@ WR_REQ (fd, request, cmdlen, cmd, resplen) return (0); } + +/* arch-tag: cfd4f3bd-fd49-44e6-9f69-c8abdf367650 + (do not change this comment) */ diff --git a/src/image.c b/src/image.c new file mode 100644 index 0000000000..34db5e5336 --- /dev/null +++ b/src/image.c @@ -0,0 +1,7532 @@ +/* Functions for image support on window system. + Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000,01,02,03,04 + Free Software Foundation. + +This file is part of GNU Emacs. + +GNU Emacs is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include + +#ifdef HAVE_UNISTD_H +#include +#endif + +/* This makes the fields of a Display accessible, in Xlib header files. */ + +#define XLIB_ILLEGAL_ACCESS + +#include "lisp.h" +#include "frame.h" +#include "window.h" +#include "dispextern.h" +#include "blockinput.h" +#include "systime.h" +#include + + +#ifdef HAVE_X_WINDOWS +#include "xterm.h" +#include +#include + +#define COLOR_TABLE_SUPPORT 1 + +typedef struct x_bitmap_record Bitmap_Record; +#define GET_PIXEL(ximg, x, y) XGetPixel(ximg, x, y) +#define NO_PIXMAP None +#define PNG_BG_COLOR_SHIFT 0 + +#define RGB_PIXEL_COLOR unsigned long + +#define PIX_MASK_RETAIN(f) 0 +#define PIX_MASK_DRAW(f) 1 +#endif /* HAVE_X_WINDOWS */ + + +#ifdef HAVE_NTGUI +#include "w32term.h" + +/* W32_TODO : Color tables on W32. */ +#undef COLOR_TABLE_SUPPORT + +typedef struct w32_bitmap_record Bitmap_Record; +#define GET_PIXEL(ximg, x, y) GetPixel(ximg, x, y) +#define NO_PIXMAP 0 +#define PNG_BG_COLOR_SHIFT 0 + +#define RGB_PIXEL_COLOR COLORREF + +#define PIX_MASK_RETAIN(f) 0 +#define PIX_MASK_DRAW(f) 1 + +#define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual +#define x_defined_color w32_defined_color +#define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits) +#endif /* HAVE_NTGUI */ + + +#ifdef MAC_OS +#include "macterm.h" +#ifndef MAC_OSX +#include +#endif +#ifdef MAC_OSX +#include +#include +#else /* not MAC_OSX */ +#include +#include +#include +#endif /* not MAC_OSX */ + +/* MAC_TODO : Color tables on Mac. */ +#undef COLOR_TABLE_SUPPORT + +#define ZPixmap 0 /* arbitrary */ +typedef struct mac_bitmap_record Bitmap_Record; + +#define GET_PIXEL(ximg, x, y) XGetPixel(ximg, x, y) +#define NO_PIXMAP 0 +#define PNG_BG_COLOR_SHIFT 8 + +#define RGB_PIXEL_COLOR unsigned long + +#define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual +#define x_defined_color mac_defined_color +#define DefaultDepthOfScreen(screen) (one_mac_display_info.n_planes) +#define XDrawLine(display, w, gc, x1, y1, x2, y2) \ + mac_draw_line_to_pixmap(display, w, gc, x1, y1, x2, y2) + +#endif /* MAC_OS */ + + +/* Search path for bitmap files. */ + +Lisp_Object Vx_bitmap_file_path; + + +static void x_disable_image P_ ((struct frame *, struct image *)); +static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object, + Lisp_Object)); + +static void init_color_table P_ ((void)); +static unsigned long lookup_rgb_color P_ ((struct frame *f, int r, int g, int b)); +#ifdef COLOR_TABLE_SUPPORT +static void free_color_table P_ ((void)); +static unsigned long *colors_in_color_table P_ ((int *n)); +static unsigned long lookup_pixel_color P_ ((struct frame *f, unsigned long p)); +#endif + +/* Code to deal with bitmaps. Bitmaps are referenced by their bitmap + id, which is just an int that this section returns. Bitmaps are + reference counted so they can be shared among frames. + + Bitmap indices are guaranteed to be > 0, so a negative number can + be used to indicate no bitmap. + + If you use x_create_bitmap_from_data, then you must keep track of + the bitmaps yourself. That is, creating a bitmap from the same + data more than once will not be caught. */ + +#ifdef MAC_OS + +static XImagePtr +XGetImage (display, pixmap, x, y, width, height, plane_mask, format) + Display *display; /* not used */ + Pixmap pixmap; + int x, y; /* not used */ + unsigned int width, height; /* not used */ + unsigned long plane_mask; /* not used */ + int format; /* not used */ +{ +#if GLYPH_DEBUG + xassert (x == 0 && y == 0); + { + Rect ri, rp; + SetRect (&ri, 0, 0, width, height); + xassert (EqualRect (&ri, GetPixBounds (GetGWorldPixMap (pixmap), &rp))); + } + xassert (! (pixelsLocked & GetPixelsState (GetGWorldPixMap (pixmap)))); +#endif + + LockPixels (GetGWorldPixMap (pixmap)); + + return pixmap; +} + +static void +XPutPixel (ximage, x, y, pixel) + XImagePtr ximage; + int x, y; + unsigned long pixel; +{ + RGBColor color; + + SetGWorld (ximage, NULL); + + color.red = RED16_FROM_ULONG (pixel); + color.green = GREEN16_FROM_ULONG (pixel); + color.blue = BLUE16_FROM_ULONG (pixel); + SetCPixel (x, y, &color); +} + +static unsigned long +XGetPixel (ximage, x, y) + XImagePtr ximage; + int x, y; +{ + RGBColor color; + + SetGWorld (ximage, NULL); + + GetCPixel (x, y, &color); + return RGB_TO_ULONG (color.red >> 8, color.green >> 8, color.blue >> 8); +} + +static void +XDestroyImage (ximg) + XImagePtr ximg; +{ + UnlockPixels (GetGWorldPixMap (ximg)); +} +#endif + + +/* Functions to access the contents of a bitmap, given an id. */ + +int +x_bitmap_height (f, id) + FRAME_PTR f; + int id; +{ + return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height; +} + +int +x_bitmap_width (f, id) + FRAME_PTR f; + int id; +{ + return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width; +} + +#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI) +int +x_bitmap_pixmap (f, id) + FRAME_PTR f; + int id; +{ + return (int) FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap; +} +#endif + +#ifdef HAVE_X_WINDOWS +int +x_bitmap_mask (f, id) + FRAME_PTR f; + int id; +{ + return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask; +} +#endif + +/* Allocate a new bitmap record. Returns index of new record. */ + +static int +x_allocate_bitmap_record (f) + FRAME_PTR f; +{ + Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + int i; + + if (dpyinfo->bitmaps == NULL) + { + dpyinfo->bitmaps_size = 10; + dpyinfo->bitmaps + = (Bitmap_Record *) xmalloc (dpyinfo->bitmaps_size * sizeof (Bitmap_Record)); + dpyinfo->bitmaps_last = 1; + return 1; + } + + if (dpyinfo->bitmaps_last < dpyinfo->bitmaps_size) + return ++dpyinfo->bitmaps_last; + + for (i = 0; i < dpyinfo->bitmaps_size; ++i) + if (dpyinfo->bitmaps[i].refcount == 0) + return i + 1; + + dpyinfo->bitmaps_size *= 2; + dpyinfo->bitmaps + = (Bitmap_Record *) xrealloc (dpyinfo->bitmaps, + dpyinfo->bitmaps_size * sizeof (Bitmap_Record)); + return ++dpyinfo->bitmaps_last; +} + +/* Add one reference to the reference count of the bitmap with id ID. */ + +void +x_reference_bitmap (f, id) + FRAME_PTR f; + int id; +{ + ++FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].refcount; +} + +/* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS. */ + +int +x_create_bitmap_from_data (f, bits, width, height) + struct frame *f; + char *bits; + unsigned int width, height; +{ + Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + int id; + +#ifdef HAVE_X_WINDOWS + Pixmap bitmap; + bitmap = XCreateBitmapFromData (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + bits, width, height); + if (! bitmap) + return -1; +#endif /* HAVE_X_WINDOWS */ + +#ifdef HAVE_NTGUI + Pixmap bitmap; + bitmap = CreateBitmap (width, height, + FRAME_X_DISPLAY_INFO (XFRAME (frame))->n_planes, + FRAME_X_DISPLAY_INFO (XFRAME (frame))->n_cbits, + bits); + if (! bitmap) + return -1; +#endif /* HAVE_NTGUI */ + +#ifdef MAC_OS + /* MAC_TODO: for now fail if width is not mod 16 (toolbox requires it) */ + if (width % 16 != 0) + return -1; +#endif + + id = x_allocate_bitmap_record (f); +#ifdef MAC_OS + dpyinfo->bitmaps[id - 1].bitmap_data = (char *) xmalloc (height * width); + if (! dpyinfo->bitmaps[id - 1].bitmap_data) + return -1; + bcopy (bits, dpyinfo->bitmaps[id - 1].bitmap_data, height * width); +#endif /* MAC_OS */ + + dpyinfo->bitmaps[id - 1].file = NULL; + dpyinfo->bitmaps[id - 1].height = height; + dpyinfo->bitmaps[id - 1].width = width; + dpyinfo->bitmaps[id - 1].refcount = 1; + +#ifdef HAVE_X_WINDOWS + dpyinfo->bitmaps[id - 1].pixmap = bitmap; + dpyinfo->bitmaps[id - 1].have_mask = 0; + dpyinfo->bitmaps[id - 1].depth = 1; +#endif /* HAVE_X_WINDOWS */ + +#ifdef HAVE_NTGUI + dpyinfo->bitmaps[id - 1].pixmap = bitmap; + dpyinfo->bitmaps[id - 1].hinst = NULL; + dpyinfo->bitmaps[id - 1].depth = 1; +#endif /* HAVE_NTGUI */ + + return id; +} + +/* Create bitmap from file FILE for frame F. */ + +int +x_create_bitmap_from_file (f, file) + struct frame *f; + Lisp_Object file; +{ +#ifdef MAC_OS + return -1; /* MAC_TODO : bitmap support */ +#endif /* MAC_OS */ + +#ifdef HAVE_NTGUI + return -1; /* W32_TODO : bitmap support */ +#endif /* HAVE_NTGUI */ + +#ifdef HAVE_X_WINDOWS + Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + unsigned int width, height; + Pixmap bitmap; + int xhot, yhot, result, id; + Lisp_Object found; + int fd; + char *filename; + + /* Look for an existing bitmap with the same name. */ + for (id = 0; id < dpyinfo->bitmaps_last; ++id) + { + if (dpyinfo->bitmaps[id].refcount + && dpyinfo->bitmaps[id].file + && !strcmp (dpyinfo->bitmaps[id].file, (char *) SDATA (file))) + { + ++dpyinfo->bitmaps[id].refcount; + return id + 1; + } + } + + /* Search bitmap-file-path for the file, if appropriate. */ + fd = openp (Vx_bitmap_file_path, file, Qnil, &found, Qnil); + if (fd < 0) + return -1; + emacs_close (fd); + + filename = (char *) SDATA (found); + + result = XReadBitmapFile (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + filename, &width, &height, &bitmap, &xhot, &yhot); + if (result != BitmapSuccess) + return -1; + + id = x_allocate_bitmap_record (f); + dpyinfo->bitmaps[id - 1].pixmap = bitmap; + dpyinfo->bitmaps[id - 1].have_mask = 0; + dpyinfo->bitmaps[id - 1].refcount = 1; + dpyinfo->bitmaps[id - 1].file = (char *) xmalloc (SBYTES (file) + 1); + dpyinfo->bitmaps[id - 1].depth = 1; + dpyinfo->bitmaps[id - 1].height = height; + dpyinfo->bitmaps[id - 1].width = width; + strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file)); + + return id; +#endif /* HAVE_X_WINDOWS */ +} + +/* Free bitmap B. */ + +static void +Free_Bitmap_Record (dpyinfo, bm) + Display_Info *dpyinfo; + Bitmap_Record *bm; +{ +#ifdef HAVE_X_WINDOWS + XFreePixmap (dpyinfo->display, bm->pixmap); + if (bm->have_mask) + XFreePixmap (dpyinfo->display, bm->mask); +#endif /* HAVE_X_WINDOWS */ + +#ifdef HAVE_NTGUI + DeleteObject (bm->pixmap); +#endif /* HAVE_NTGUI */ + +#ifdef MAC_OS + xfree (bm->bitmap_data); /* Added ++kfs */ + bm->bitmap_data = NULL; +#endif /* MAC_OS */ + + if (bm->file) + { + xfree (bm->file); + bm->file = NULL; + } +} + +/* Remove reference to bitmap with id number ID. */ + +void +x_destroy_bitmap (f, id) + FRAME_PTR f; + int id; +{ + Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + + if (id > 0) + { + Bitmap_Record *bm = &dpyinfo->bitmaps[id - 1]; + + if (--bm->refcount == 0) + { + BLOCK_INPUT; + Free_Bitmap_Record (dpyinfo, bm); + UNBLOCK_INPUT; + } + } +} + +/* Free all the bitmaps for the display specified by DPYINFO. */ + +void +x_destroy_all_bitmaps (dpyinfo) + Display_Info *dpyinfo; +{ + int i; + Bitmap_Record *bm = dpyinfo->bitmaps; + + for (i = 0; i < dpyinfo->bitmaps_last; i++, bm++) + if (bm->refcount > 0) + Free_Bitmap_Record (dpyinfo, bm); + + dpyinfo->bitmaps_last = 0; +} + + +#ifdef HAVE_X_WINDOWS + +/* Useful functions defined in the section + `Image type independent image structures' below. */ + +static unsigned long four_corners_best P_ ((XImagePtr ximg, unsigned long width, + unsigned long height)); + +static int x_create_x_image_and_pixmap P_ ((struct frame *f, int width, int height, + int depth, XImagePtr *ximg, + Pixmap *pixmap)); + +static void x_destroy_x_image P_ ((XImagePtr ximg)); + + +/* Create a mask of a bitmap. Note is this not a perfect mask. + It's nicer with some borders in this context */ + +int +x_create_bitmap_mask (f, id) + struct frame *f; + int id; +{ + Pixmap pixmap, mask; + XImagePtr ximg, mask_img; + unsigned long width, height; + int result; + unsigned long bg; + unsigned long x, y, xp, xm, yp, ym; + GC gc; + + Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + + if (!(id > 0)) + return -1; + + pixmap = x_bitmap_pixmap (f, id); + width = x_bitmap_width (f, id); + height = x_bitmap_height (f, id); + + BLOCK_INPUT; + ximg = XGetImage (FRAME_X_DISPLAY (f), pixmap, 0, 0, width, height, + ~0, ZPixmap); + + if (!ximg) + { + UNBLOCK_INPUT; + return -1; + } + + result = x_create_x_image_and_pixmap (f, width, height, 1, &mask_img, &mask); + + UNBLOCK_INPUT; + if (!result) + { + XDestroyImage (ximg); + return -1; + } + + bg = four_corners_best (ximg, width, height); + + for (y = 0; y < ximg->height; ++y) + { + for (x = 0; x < ximg->width; ++x) + { + xp = x != ximg->width - 1 ? x + 1 : 0; + xm = x != 0 ? x - 1 : ximg->width - 1; + yp = y != ximg->height - 1 ? y + 1 : 0; + ym = y != 0 ? y - 1 : ximg->height - 1; + if (XGetPixel (ximg, x, y) == bg + && XGetPixel (ximg, x, yp) == bg + && XGetPixel (ximg, x, ym) == bg + && XGetPixel (ximg, xp, y) == bg + && XGetPixel (ximg, xp, yp) == bg + && XGetPixel (ximg, xp, ym) == bg + && XGetPixel (ximg, xm, y) == bg + && XGetPixel (ximg, xm, yp) == bg + && XGetPixel (ximg, xm, ym) == bg) + XPutPixel (mask_img, x, y, 0); + else + XPutPixel (mask_img, x, y, 1); + } + } + + xassert (interrupt_input_blocked); + gc = XCreateGC (FRAME_X_DISPLAY (f), mask, 0, NULL); + XPutImage (FRAME_X_DISPLAY (f), mask, gc, mask_img, 0, 0, 0, 0, + width, height); + XFreeGC (FRAME_X_DISPLAY (f), gc); + + dpyinfo->bitmaps[id - 1].have_mask = 1; + dpyinfo->bitmaps[id - 1].mask = mask; + + XDestroyImage (ximg); + x_destroy_x_image (mask_img); + + return 0; +} + +#endif /* HAVE_X_WINDOWS */ + + +/*********************************************************************** + Image types + ***********************************************************************/ + +/* Value is the number of elements of vector VECTOR. */ + +#define DIM(VECTOR) (sizeof (VECTOR) / sizeof *(VECTOR)) + +/* List of supported image types. Use define_image_type to add new + types. Use lookup_image_type to find a type for a given symbol. */ + +static struct image_type *image_types; + +/* The symbol `xbm' which is used as the type symbol for XBM images. */ + +Lisp_Object Qxbm; + +/* Keywords. */ + +extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile; +extern Lisp_Object QCdata, QCtype; +extern Lisp_Object Qcenter; +Lisp_Object QCascent, QCmargin, QCrelief; +Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask; +Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask; + +/* Other symbols. */ + +Lisp_Object Qlaplace, Qemboss, Qedge_detection, Qheuristic; + +/* Time in seconds after which images should be removed from the cache + if not displayed. */ + +Lisp_Object Vimage_cache_eviction_delay; + +/* Function prototypes. */ + +static void define_image_type P_ ((struct image_type *type)); +static struct image_type *lookup_image_type P_ ((Lisp_Object symbol)); +static void image_error P_ ((char *format, Lisp_Object, Lisp_Object)); +static void x_laplace P_ ((struct frame *, struct image *)); +static void x_emboss P_ ((struct frame *, struct image *)); +static int x_build_heuristic_mask P_ ((struct frame *, struct image *, + Lisp_Object)); + + +/* Define a new image type from TYPE. This adds a copy of TYPE to + image_types and adds the symbol *TYPE->type to Vimage_types. */ + +static void +define_image_type (type) + struct image_type *type; +{ + /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. + The initialized data segment is read-only. */ + struct image_type *p = (struct image_type *) xmalloc (sizeof *p); + bcopy (type, p, sizeof *p); + p->next = image_types; + image_types = p; + Vimage_types = Fcons (*p->type, Vimage_types); +} + + +/* Look up image type SYMBOL, and return a pointer to its image_type + structure. Value is null if SYMBOL is not a known image type. */ + +static INLINE struct image_type * +lookup_image_type (symbol) + Lisp_Object symbol; +{ + struct image_type *type; + + for (type = image_types; type; type = type->next) + if (EQ (symbol, *type->type)) + break; + + return type; +} + + +/* Value is non-zero if OBJECT is a valid Lisp image specification. A + valid image specification is a list whose car is the symbol + `image', and whose rest is a property list. The property list must + contain a value for key `:type'. That value must be the name of a + supported image type. The rest of the property list depends on the + image type. */ + +int +valid_image_p (object) + Lisp_Object object; +{ + int valid_p = 0; + + if (IMAGEP (object)) + { + Lisp_Object tem; + + for (tem = XCDR (object); CONSP (tem); tem = XCDR (tem)) + if (EQ (XCAR (tem), QCtype)) + { + tem = XCDR (tem); + if (CONSP (tem) && SYMBOLP (XCAR (tem))) + { + struct image_type *type; + type = lookup_image_type (XCAR (tem)); + if (type) + valid_p = type->valid_p (object); + } + + break; + } + } + + return valid_p; +} + + +/* Log error message with format string FORMAT and argument ARG. + Signaling an error, e.g. when an image cannot be loaded, is not a + good idea because this would interrupt redisplay, and the error + message display would lead to another redisplay. This function + therefore simply displays a message. */ + +static void +image_error (format, arg1, arg2) + char *format; + Lisp_Object arg1, arg2; +{ + add_to_log (format, arg1, arg2); +} + + + +/*********************************************************************** + Image specifications + ***********************************************************************/ + +enum image_value_type +{ + IMAGE_DONT_CHECK_VALUE_TYPE, + IMAGE_STRING_VALUE, + IMAGE_STRING_OR_NIL_VALUE, + IMAGE_SYMBOL_VALUE, + IMAGE_POSITIVE_INTEGER_VALUE, + IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, + IMAGE_NON_NEGATIVE_INTEGER_VALUE, + IMAGE_ASCENT_VALUE, + IMAGE_INTEGER_VALUE, + IMAGE_FUNCTION_VALUE, + IMAGE_NUMBER_VALUE, + IMAGE_BOOL_VALUE +}; + +/* Structure used when parsing image specifications. */ + +struct image_keyword +{ + /* Name of keyword. */ + char *name; + + /* The type of value allowed. */ + enum image_value_type type; + + /* Non-zero means key must be present. */ + int mandatory_p; + + /* Used to recognize duplicate keywords in a property list. */ + int count; + + /* The value that was found. */ + Lisp_Object value; +}; + + +static int parse_image_spec P_ ((Lisp_Object, struct image_keyword *, + int, Lisp_Object)); +static Lisp_Object image_spec_value P_ ((Lisp_Object, Lisp_Object, int *)); + + +/* Parse image spec SPEC according to KEYWORDS. A valid image spec + has the format (image KEYWORD VALUE ...). One of the keyword/ + value pairs must be `:type TYPE'. KEYWORDS is a vector of + image_keywords structures of size NKEYWORDS describing other + allowed keyword/value pairs. Value is non-zero if SPEC is valid. */ + +static int +parse_image_spec (spec, keywords, nkeywords, type) + Lisp_Object spec; + struct image_keyword *keywords; + int nkeywords; + Lisp_Object type; +{ + int i; + Lisp_Object plist; + + if (!IMAGEP (spec)) + return 0; + + plist = XCDR (spec); + while (CONSP (plist)) + { + Lisp_Object key, value; + + /* First element of a pair must be a symbol. */ + key = XCAR (plist); + plist = XCDR (plist); + if (!SYMBOLP (key)) + return 0; + + /* There must follow a value. */ + if (!CONSP (plist)) + return 0; + value = XCAR (plist); + plist = XCDR (plist); + + /* Find key in KEYWORDS. Error if not found. */ + for (i = 0; i < nkeywords; ++i) + if (strcmp (keywords[i].name, SDATA (SYMBOL_NAME (key))) == 0) + break; + + if (i == nkeywords) + continue; + + /* Record that we recognized the keyword. If a keywords + was found more than once, it's an error. */ + keywords[i].value = value; + ++keywords[i].count; + + if (keywords[i].count > 1) + return 0; + + /* Check type of value against allowed type. */ + switch (keywords[i].type) + { + case IMAGE_STRING_VALUE: + if (!STRINGP (value)) + return 0; + break; + + case IMAGE_STRING_OR_NIL_VALUE: + if (!STRINGP (value) && !NILP (value)) + return 0; + break; + + case IMAGE_SYMBOL_VALUE: + if (!SYMBOLP (value)) + return 0; + break; + + case IMAGE_POSITIVE_INTEGER_VALUE: + if (!INTEGERP (value) || XINT (value) <= 0) + return 0; + break; + + case IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR: + if (INTEGERP (value) && XINT (value) >= 0) + break; + if (CONSP (value) + && INTEGERP (XCAR (value)) && INTEGERP (XCDR (value)) + && XINT (XCAR (value)) >= 0 && XINT (XCDR (value)) >= 0) + break; + return 0; + + case IMAGE_ASCENT_VALUE: + if (SYMBOLP (value) && EQ (value, Qcenter)) + break; + else if (INTEGERP (value) + && XINT (value) >= 0 + && XINT (value) <= 100) + break; + return 0; + + case IMAGE_NON_NEGATIVE_INTEGER_VALUE: + if (!INTEGERP (value) || XINT (value) < 0) + return 0; + break; + + case IMAGE_DONT_CHECK_VALUE_TYPE: + break; + + case IMAGE_FUNCTION_VALUE: + value = indirect_function (value); + if (SUBRP (value) + || COMPILEDP (value) + || (CONSP (value) && EQ (XCAR (value), Qlambda))) + break; + return 0; + + case IMAGE_NUMBER_VALUE: + if (!INTEGERP (value) && !FLOATP (value)) + return 0; + break; + + case IMAGE_INTEGER_VALUE: + if (!INTEGERP (value)) + return 0; + break; + + case IMAGE_BOOL_VALUE: + if (!NILP (value) && !EQ (value, Qt)) + return 0; + break; + + default: + abort (); + break; + } + + if (EQ (key, QCtype) && !EQ (type, value)) + return 0; + } + + /* Check that all mandatory fields are present. */ + for (i = 0; i < nkeywords; ++i) + if (keywords[i].mandatory_p && keywords[i].count == 0) + return 0; + + return NILP (plist); +} + + +/* Return the value of KEY in image specification SPEC. Value is nil + if KEY is not present in SPEC. if FOUND is not null, set *FOUND + to 1 if KEY was found in SPEC, set it to 0 otherwise. */ + +static Lisp_Object +image_spec_value (spec, key, found) + Lisp_Object spec, key; + int *found; +{ + Lisp_Object tail; + + xassert (valid_image_p (spec)); + + for (tail = XCDR (spec); + CONSP (tail) && CONSP (XCDR (tail)); + tail = XCDR (XCDR (tail))) + { + if (EQ (XCAR (tail), key)) + { + if (found) + *found = 1; + return XCAR (XCDR (tail)); + } + } + + if (found) + *found = 0; + return Qnil; +} + + +DEFUN ("image-size", Fimage_size, Simage_size, 1, 3, 0, + doc: /* Return the size of image SPEC as pair (WIDTH . HEIGHT). +PIXELS non-nil means return the size in pixels, otherwise return the +size in canonical character units. +FRAME is the frame on which the image will be displayed. FRAME nil +or omitted means use the selected frame. */) + (spec, pixels, frame) + Lisp_Object spec, pixels, frame; +{ + Lisp_Object size; + + size = Qnil; + if (valid_image_p (spec)) + { + struct frame *f = check_x_frame (frame); + int id = lookup_image (f, spec); + struct image *img = IMAGE_FROM_ID (f, id); + int width = img->width + 2 * img->hmargin; + int height = img->height + 2 * img->vmargin; + + if (NILP (pixels)) + size = Fcons (make_float ((double) width / FRAME_COLUMN_WIDTH (f)), + make_float ((double) height / FRAME_LINE_HEIGHT (f))); + else + size = Fcons (make_number (width), make_number (height)); + } + else + error ("Invalid image specification"); + + return size; +} + + +DEFUN ("image-mask-p", Fimage_mask_p, Simage_mask_p, 1, 2, 0, + doc: /* Return t if image SPEC has a mask bitmap. +FRAME is the frame on which the image will be displayed. FRAME nil +or omitted means use the selected frame. */) + (spec, frame) + Lisp_Object spec, frame; +{ + Lisp_Object mask; + + mask = Qnil; + if (valid_image_p (spec)) + { + struct frame *f = check_x_frame (frame); + int id = lookup_image (f, spec); + struct image *img = IMAGE_FROM_ID (f, id); + if (img->mask) + mask = Qt; + } + else + error ("Invalid image specification"); + + return mask; +} + + +/*********************************************************************** + Image type independent image structures + ***********************************************************************/ + +static struct image *make_image P_ ((Lisp_Object spec, unsigned hash)); +static void free_image P_ ((struct frame *f, struct image *img)); + + +/* Allocate and return a new image structure for image specification + SPEC. SPEC has a hash value of HASH. */ + +static struct image * +make_image (spec, hash) + Lisp_Object spec; + unsigned hash; +{ + struct image *img = (struct image *) xmalloc (sizeof *img); + + xassert (valid_image_p (spec)); + bzero (img, sizeof *img); + img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL)); + xassert (img->type != NULL); + img->spec = spec; + img->data.lisp_val = Qnil; + img->ascent = DEFAULT_IMAGE_ASCENT; + img->hash = hash; + return img; +} + + +/* Free image IMG which was used on frame F, including its resources. */ + +static void +free_image (f, img) + struct frame *f; + struct image *img; +{ + if (img) + { + struct image_cache *c = FRAME_X_IMAGE_CACHE (f); + + /* Remove IMG from the hash table of its cache. */ + if (img->prev) + img->prev->next = img->next; + else + c->buckets[img->hash % IMAGE_CACHE_BUCKETS_SIZE] = img->next; + + if (img->next) + img->next->prev = img->prev; + + c->images[img->id] = NULL; + + /* Free resources, then free IMG. */ + img->type->free (f, img); + xfree (img); + } +} + + +/* Prepare image IMG for display on frame F. Must be called before + drawing an image. */ + +void +prepare_image_for_display (f, img) + struct frame *f; + struct image *img; +{ + EMACS_TIME t; + + /* We're about to display IMG, so set its timestamp to `now'. */ + EMACS_GET_TIME (t); + img->timestamp = EMACS_SECS (t); + + /* If IMG doesn't have a pixmap yet, load it now, using the image + type dependent loader function. */ + if (img->pixmap == NO_PIXMAP && !img->load_failed_p) + img->load_failed_p = img->type->load (f, img) == 0; +} + + +/* Value is the number of pixels for the ascent of image IMG when + drawn in face FACE. */ + +int +image_ascent (img, face) + struct image *img; + struct face *face; +{ + int height = img->height + img->vmargin; + int ascent; + + if (img->ascent == CENTERED_IMAGE_ASCENT) + { + if (face->font) + { +#ifdef HAVE_NTGUI + /* W32 specific version. Why?. ++kfs */ + ascent = height / 2 - (FONT_DESCENT(face->font) + - FONT_BASE(face->font)) / 2; +#else + /* This expression is arranged so that if the image can't be + exactly centered, it will be moved slightly up. This is + because a typical font is `top-heavy' (due to the presence + uppercase letters), so the image placement should err towards + being top-heavy too. It also just generally looks better. */ + ascent = (height + face->font->ascent - face->font->descent + 1) / 2; +#endif /* HAVE_NTGUI */ + } + else + ascent = height / 2; + } + else + ascent = (int) (height * img->ascent / 100.0); + + return ascent; +} + + +/* Image background colors. */ + +/* Find the "best" corner color of a bitmap. + On W32, XIMG is assumed to a device context with the bitmap selected. */ + +static RGB_PIXEL_COLOR +four_corners_best (ximg, width, height) + XImagePtr_or_DC ximg; + unsigned long width, height; +{ + RGB_PIXEL_COLOR corners[4], best; + int i, best_count; + + /* Get the colors at the corners of ximg. */ + corners[0] = GET_PIXEL (ximg, 0, 0); + corners[1] = GET_PIXEL (ximg, width - 1, 0); + corners[2] = GET_PIXEL (ximg, width - 1, height - 1); + corners[3] = GET_PIXEL (ximg, 0, height - 1); + + /* Choose the most frequently found color as background. */ + for (i = best_count = 0; i < 4; ++i) + { + int j, n; + + for (j = n = 0; j < 4; ++j) + if (corners[i] == corners[j]) + ++n; + + if (n > best_count) + best = corners[i], best_count = n; + } + + return best; +} + +/* Portability macros */ + +#ifdef HAVE_NTGUI + +#define Destroy_Image(img_dc, prev) \ + do { SelectObject (img_dc, prev); DeleteDC (img_dc); } while (0) + +#define Free_Pixmap(display, pixmap) \ + DeleteObject (pixmap) + +#else + +#define Destroy_Image(ximg, dummy) \ + XDestroyImage (ximg) + +#define Free_Pixmap(display, pixmap) \ + XFreePixmap (display, pixmap) + +#endif /* HAVE_NTGUI */ + + +/* Return the `background' field of IMG. If IMG doesn't have one yet, + it is guessed heuristically. If non-zero, XIMG is an existing + XImage object (or device context with the image selected on W32) to + use for the heuristic. */ + +RGB_PIXEL_COLOR +image_background (img, f, ximg) + struct image *img; + struct frame *f; + XImagePtr_or_DC ximg; +{ + if (! img->background_valid) + /* IMG doesn't have a background yet, try to guess a reasonable value. */ + { + int free_ximg = !ximg; +#ifdef HAVE_NTGUI + HGDIOBJ prev; +#endif /* HAVE_NTGUI */ + + if (free_ximg) + { +#ifndef HAVE_NTGUI + ximg = XGetImage (FRAME_X_DISPLAY (f), img->pixmap, + 0, 0, img->width, img->height, ~0, ZPixmap); +#else + HDC frame_dc = get_frame_dc (f); + ximg = CreateCompatibleDC (frame_dc); + release_frame_dc (f, frame_dc); + prev = SelectObject (ximg, img->pixmap); +#endif /* !HAVE_NTGUI */ + } + + img->background = four_corners_best (ximg, img->width, img->height); + + if (free_ximg) + Destroy_Image (ximg, prev); + + img->background_valid = 1; + } + + return img->background; +} + +/* Return the `background_transparent' field of IMG. If IMG doesn't + have one yet, it is guessed heuristically. If non-zero, MASK is an + existing XImage object to use for the heuristic. */ + +int +image_background_transparent (img, f, mask) + struct image *img; + struct frame *f; + XImagePtr_or_DC mask; +{ + if (! img->background_transparent_valid) + /* IMG doesn't have a background yet, try to guess a reasonable value. */ + { + if (img->mask) + { + int free_mask = !mask; +#ifdef HAVE_NTGUI + HGDIOBJ prev; +#endif /* HAVE_NTGUI */ + + if (free_mask) + { +#ifndef HAVE_NTGUI + mask = XGetImage (FRAME_X_DISPLAY (f), img->mask, + 0, 0, img->width, img->height, ~0, ZPixmap); +#else + HDC frame_dc = get_frame_dc (f); + mask = CreateCompatibleDC (frame_dc); + release_frame_dc (f, frame_dc); + prev = SelectObject (mask, img->mask); +#endif /* HAVE_NTGUI */ + } + + img->background_transparent + = (four_corners_best (mask, img->width, img->height) == PIX_MASK_RETAIN (f)); + + if (free_mask) + Destroy_Image (mask, prev); + } + else + img->background_transparent = 0; + + img->background_transparent_valid = 1; + } + + return img->background_transparent; +} + + +/*********************************************************************** + Helper functions for X image types + ***********************************************************************/ + +static void x_clear_image_1 P_ ((struct frame *, struct image *, int, + int, int)); +static void x_clear_image P_ ((struct frame *f, struct image *img)); +static unsigned long x_alloc_image_color P_ ((struct frame *f, + struct image *img, + Lisp_Object color_name, + unsigned long dflt)); + + +/* Clear X resources of image IMG on frame F. PIXMAP_P non-zero means + free the pixmap if any. MASK_P non-zero means clear the mask + pixmap if any. COLORS_P non-zero means free colors allocated for + the image, if any. */ + +static void +x_clear_image_1 (f, img, pixmap_p, mask_p, colors_p) + struct frame *f; + struct image *img; + int pixmap_p, mask_p, colors_p; +{ + if (pixmap_p && img->pixmap) + { + Free_Pixmap (FRAME_X_DISPLAY (f), img->pixmap); + img->pixmap = NO_PIXMAP; + img->background_valid = 0; + } + + if (mask_p && img->mask) + { + Free_Pixmap (FRAME_X_DISPLAY (f), img->mask); + img->mask = NO_PIXMAP; + img->background_transparent_valid = 0; + } + + if (colors_p && img->ncolors) + { + /* MAC_TODO: color table support. */ + /* W32_TODO: color table support. */ +#ifdef HAVE_X_WINDOWS + x_free_colors (f, img->colors, img->ncolors); +#endif /* HAVE_X_WINDOWS */ + xfree (img->colors); + img->colors = NULL; + img->ncolors = 0; + } +} + +/* Free X resources of image IMG which is used on frame F. */ + +static void +x_clear_image (f, img) + struct frame *f; + struct image *img; +{ + BLOCK_INPUT; + x_clear_image_1 (f, img, 1, 1, 1); + UNBLOCK_INPUT; +} + + +/* Allocate color COLOR_NAME for image IMG on frame F. If color + cannot be allocated, use DFLT. Add a newly allocated color to + IMG->colors, so that it can be freed again. Value is the pixel + color. */ + +static unsigned long +x_alloc_image_color (f, img, color_name, dflt) + struct frame *f; + struct image *img; + Lisp_Object color_name; + unsigned long dflt; +{ + XColor color; + unsigned long result; + + xassert (STRINGP (color_name)); + + if (x_defined_color (f, SDATA (color_name), &color, 1)) + { + /* This isn't called frequently so we get away with simply + reallocating the color vector to the needed size, here. */ + ++img->ncolors; + img->colors = + (unsigned long *) xrealloc (img->colors, + img->ncolors * sizeof *img->colors); + img->colors[img->ncolors - 1] = color.pixel; + result = color.pixel; + } + else + result = dflt; + + return result; +} + + + +/*********************************************************************** + Image Cache + ***********************************************************************/ + +static void cache_image P_ ((struct frame *f, struct image *img)); +static void postprocess_image P_ ((struct frame *, struct image *)); + +/* Return a new, initialized image cache that is allocated from the + heap. Call free_image_cache to free an image cache. */ + +struct image_cache * +make_image_cache () +{ + struct image_cache *c = (struct image_cache *) xmalloc (sizeof *c); + int size; + + bzero (c, sizeof *c); + c->size = 50; + c->images = (struct image **) xmalloc (c->size * sizeof *c->images); + size = IMAGE_CACHE_BUCKETS_SIZE * sizeof *c->buckets; + c->buckets = (struct image **) xmalloc (size); + bzero (c->buckets, size); + return c; +} + + +/* Free image cache of frame F. Be aware that X frames share images + caches. */ + +void +free_image_cache (f) + struct frame *f; +{ + struct image_cache *c = FRAME_X_IMAGE_CACHE (f); + if (c) + { + int i; + + /* Cache should not be referenced by any frame when freed. */ + xassert (c->refcount == 0); + + for (i = 0; i < c->used; ++i) + free_image (f, c->images[i]); + xfree (c->images); + xfree (c->buckets); + xfree (c); + FRAME_X_IMAGE_CACHE (f) = NULL; + } +} + + +/* Clear image cache of frame F. FORCE_P non-zero means free all + images. FORCE_P zero means clear only images that haven't been + displayed for some time. Should be called from time to time to + reduce the number of loaded images. If image-eviction-seconds is + non-nil, this frees images in the cache which weren't displayed for + at least that many seconds. */ + +void +clear_image_cache (f, force_p) + struct frame *f; + int force_p; +{ + struct image_cache *c = FRAME_X_IMAGE_CACHE (f); + + if (c && INTEGERP (Vimage_cache_eviction_delay)) + { + EMACS_TIME t; + unsigned long old; + int i, nfreed; + + EMACS_GET_TIME (t); + old = EMACS_SECS (t) - XFASTINT (Vimage_cache_eviction_delay); + + /* Block input so that we won't be interrupted by a SIGIO + while being in an inconsistent state. */ + BLOCK_INPUT; + + for (i = nfreed = 0; i < c->used; ++i) + { + struct image *img = c->images[i]; + if (img != NULL + && (force_p || img->timestamp < old)) + { + free_image (f, img); + ++nfreed; + } + } + + /* We may be clearing the image cache because, for example, + Emacs was iconified for a longer period of time. In that + case, current matrices may still contain references to + images freed above. So, clear these matrices. */ + if (nfreed) + { + Lisp_Object tail, frame; + + FOR_EACH_FRAME (tail, frame) + { + struct frame *f = XFRAME (frame); + if (FRAME_WINDOW_P (f) + && FRAME_X_IMAGE_CACHE (f) == c) + clear_current_matrices (f); + } + + ++windows_or_buffers_changed; + } + + UNBLOCK_INPUT; + } +} + + +DEFUN ("clear-image-cache", Fclear_image_cache, Sclear_image_cache, + 0, 1, 0, + doc: /* Clear the image cache of FRAME. +FRAME nil or omitted means use the selected frame. +FRAME t means clear the image caches of all frames. */) + (frame) + Lisp_Object frame; +{ + if (EQ (frame, Qt)) + { + Lisp_Object tail; + + FOR_EACH_FRAME (tail, frame) + if (FRAME_WINDOW_P (XFRAME (frame))) + clear_image_cache (XFRAME (frame), 1); + } + else + clear_image_cache (check_x_frame (frame), 1); + + return Qnil; +} + + +/* Compute masks and transform image IMG on frame F, as specified + by the image's specification, */ + +static void +postprocess_image (f, img) + struct frame *f; + struct image *img; +{ + /* Manipulation of the image's mask. */ + if (img->pixmap) + { + Lisp_Object conversion, spec; + Lisp_Object mask; + + spec = img->spec; + + /* `:heuristic-mask t' + `:mask heuristic' + means build a mask heuristically. + `:heuristic-mask (R G B)' + `:mask (heuristic (R G B))' + means build a mask from color (R G B) in the + image. + `:mask nil' + means remove a mask, if any. */ + + mask = image_spec_value (spec, QCheuristic_mask, NULL); + if (!NILP (mask)) + x_build_heuristic_mask (f, img, mask); + else + { + int found_p; + + mask = image_spec_value (spec, QCmask, &found_p); + + if (EQ (mask, Qheuristic)) + x_build_heuristic_mask (f, img, Qt); + else if (CONSP (mask) + && EQ (XCAR (mask), Qheuristic)) + { + if (CONSP (XCDR (mask))) + x_build_heuristic_mask (f, img, XCAR (XCDR (mask))); + else + x_build_heuristic_mask (f, img, XCDR (mask)); + } + else if (NILP (mask) && found_p && img->mask) + { + Free_Pixmap (FRAME_X_DISPLAY (f), img->mask); + img->mask = NO_PIXMAP; + } + } + + + /* Should we apply an image transformation algorithm? */ + conversion = image_spec_value (spec, QCconversion, NULL); + if (EQ (conversion, Qdisabled)) + x_disable_image (f, img); + else if (EQ (conversion, Qlaplace)) + x_laplace (f, img); + else if (EQ (conversion, Qemboss)) + x_emboss (f, img); + else if (CONSP (conversion) + && EQ (XCAR (conversion), Qedge_detection)) + { + Lisp_Object tem; + tem = XCDR (conversion); + if (CONSP (tem)) + x_edge_detection (f, img, + Fplist_get (tem, QCmatrix), + Fplist_get (tem, QCcolor_adjustment)); + } + } +} + + +/* Return the id of image with Lisp specification SPEC on frame F. + SPEC must be a valid Lisp image specification (see valid_image_p). */ + +int +lookup_image (f, spec) + struct frame *f; + Lisp_Object spec; +{ + struct image_cache *c = FRAME_X_IMAGE_CACHE (f); + struct image *img; + int i; + unsigned hash; + struct gcpro gcpro1; + EMACS_TIME now; + + /* F must be a window-system frame, and SPEC must be a valid image + specification. */ + xassert (FRAME_WINDOW_P (f)); + xassert (valid_image_p (spec)); + + GCPRO1 (spec); + + /* Look up SPEC in the hash table of the image cache. */ + hash = sxhash (spec, 0); + i = hash % IMAGE_CACHE_BUCKETS_SIZE; + + for (img = c->buckets[i]; img; img = img->next) + if (img->hash == hash && !NILP (Fequal (img->spec, spec))) + break; + + /* If not found, create a new image and cache it. */ + if (img == NULL) + { + extern Lisp_Object Qpostscript; + + BLOCK_INPUT; + img = make_image (spec, hash); + cache_image (f, img); + img->load_failed_p = img->type->load (f, img) == 0; + + /* If we can't load the image, and we don't have a width and + height, use some arbitrary width and height so that we can + draw a rectangle for it. */ + if (img->load_failed_p) + { + Lisp_Object value; + + value = image_spec_value (spec, QCwidth, NULL); + img->width = (INTEGERP (value) + ? XFASTINT (value) : DEFAULT_IMAGE_WIDTH); + value = image_spec_value (spec, QCheight, NULL); + img->height = (INTEGERP (value) + ? XFASTINT (value) : DEFAULT_IMAGE_HEIGHT); + } + else + { + /* Handle image type independent image attributes + `:ascent ASCENT', `:margin MARGIN', `:relief RELIEF', + `:background COLOR'. */ + Lisp_Object ascent, margin, relief, bg; + + ascent = image_spec_value (spec, QCascent, NULL); + if (INTEGERP (ascent)) + img->ascent = XFASTINT (ascent); + else if (EQ (ascent, Qcenter)) + img->ascent = CENTERED_IMAGE_ASCENT; + + margin = image_spec_value (spec, QCmargin, NULL); + if (INTEGERP (margin) && XINT (margin) >= 0) + img->vmargin = img->hmargin = XFASTINT (margin); + else if (CONSP (margin) && INTEGERP (XCAR (margin)) + && INTEGERP (XCDR (margin))) + { + if (XINT (XCAR (margin)) > 0) + img->hmargin = XFASTINT (XCAR (margin)); + if (XINT (XCDR (margin)) > 0) + img->vmargin = XFASTINT (XCDR (margin)); + } + + relief = image_spec_value (spec, QCrelief, NULL); + if (INTEGERP (relief)) + { + img->relief = XINT (relief); + img->hmargin += abs (img->relief); + img->vmargin += abs (img->relief); + } + + if (! img->background_valid) + { + bg = image_spec_value (img->spec, QCbackground, NULL); + if (!NILP (bg)) + { + img->background + = x_alloc_image_color (f, img, bg, + FRAME_BACKGROUND_PIXEL (f)); + img->background_valid = 1; + } + } + + /* Do image transformations and compute masks, unless we + don't have the image yet. */ + if (!EQ (*img->type->type, Qpostscript)) + postprocess_image (f, img); + } + + UNBLOCK_INPUT; + } + + /* We're using IMG, so set its timestamp to `now'. */ + EMACS_GET_TIME (now); + img->timestamp = EMACS_SECS (now); + + UNGCPRO; + + /* Value is the image id. */ + return img->id; +} + + +/* Cache image IMG in the image cache of frame F. */ + +static void +cache_image (f, img) + struct frame *f; + struct image *img; +{ + struct image_cache *c = FRAME_X_IMAGE_CACHE (f); + int i; + + /* Find a free slot in c->images. */ + for (i = 0; i < c->used; ++i) + if (c->images[i] == NULL) + break; + + /* If no free slot found, maybe enlarge c->images. */ + if (i == c->used && c->used == c->size) + { + c->size *= 2; + c->images = (struct image **) xrealloc (c->images, + c->size * sizeof *c->images); + } + + /* Add IMG to c->images, and assign IMG an id. */ + c->images[i] = img; + img->id = i; + if (i == c->used) + ++c->used; + + /* Add IMG to the cache's hash table. */ + i = img->hash % IMAGE_CACHE_BUCKETS_SIZE; + img->next = c->buckets[i]; + if (img->next) + img->next->prev = img; + img->prev = NULL; + c->buckets[i] = img; +} + + +/* Call FN on every image in the image cache of frame F. Used to mark + Lisp Objects in the image cache. */ + +void +forall_images_in_image_cache (f, fn) + struct frame *f; + void (*fn) P_ ((struct image *img)); +{ + if (FRAME_LIVE_P (f) && FRAME_WINDOW_P (f)) + { + struct image_cache *c = FRAME_X_IMAGE_CACHE (f); + if (c) + { + int i; + for (i = 0; i < c->used; ++i) + if (c->images[i]) + fn (c->images[i]); + } + } +} + + + +/*********************************************************************** + X / MAC / W32 support code + ***********************************************************************/ + +#ifdef HAVE_NTGUI + +/* Macro for defining functions that will be loaded from image DLLs. */ +#define DEF_IMGLIB_FN(func) FARPROC fn_##func + +/* Macro for loading those image functions from the library. */ +#define LOAD_IMGLIB_FN(lib,func) { \ + fn_##func = (void *) GetProcAddress (lib, #func); \ + if (!fn_##func) return 0; \ + } + +#endif /* HAVE_NTGUI */ + +static int x_create_x_image_and_pixmap P_ ((struct frame *, int, int, int, + XImagePtr *, Pixmap *)); +static void x_destroy_x_image P_ ((XImagePtr)); +static void x_put_x_image P_ ((struct frame *, XImagePtr, Pixmap, int, int)); + + +/* Create an XImage and a pixmap of size WIDTH x HEIGHT for use on + frame F. Set *XIMG and *PIXMAP to the XImage and Pixmap created. + Set (*XIMG)->data to a raster of WIDTH x HEIGHT pixels allocated + via xmalloc. Print error messages via image_error if an error + occurs. Value is non-zero if successful. + + On W32, a DEPTH of zero signifies a 24 bit image, otherwise DEPTH + should indicate the bit depth of the image. */ + +static int +x_create_x_image_and_pixmap (f, width, height, depth, ximg, pixmap) + struct frame *f; + int width, height, depth; + XImagePtr *ximg; + Pixmap *pixmap; +{ +#ifdef HAVE_X_WINDOWS + Display *display = FRAME_X_DISPLAY (f); + Window window = FRAME_X_WINDOW (f); + Screen *screen = FRAME_X_SCREEN (f); + + xassert (interrupt_input_blocked); + + if (depth <= 0) + depth = DefaultDepthOfScreen (screen); + *ximg = XCreateImage (display, DefaultVisualOfScreen (screen), + depth, ZPixmap, 0, NULL, width, height, + depth > 16 ? 32 : depth > 8 ? 16 : 8, 0); + if (*ximg == NULL) + { + image_error ("Unable to allocate X image", Qnil, Qnil); + return 0; + } + + /* Allocate image raster. */ + (*ximg)->data = (char *) xmalloc ((*ximg)->bytes_per_line * height); + + /* Allocate a pixmap of the same size. */ + *pixmap = XCreatePixmap (display, window, width, height, depth); + if (*pixmap == NO_PIXMAP) + { + x_destroy_x_image (*ximg); + *ximg = NULL; + image_error ("Unable to create X pixmap", Qnil, Qnil); + return 0; + } + + return 1; +#endif /* HAVE_X_WINDOWS */ + +#ifdef HAVE_NTGUI + + BITMAPINFOHEADER *header; + HDC hdc; + int scanline_width_bits; + int remainder; + int palette_colors = 0; + + if (depth == 0) + depth = 24; + + if (depth != 1 && depth != 4 && depth != 8 + && depth != 16 && depth != 24 && depth != 32) + { + image_error ("Invalid image bit depth specified", Qnil, Qnil); + return 0; + } + + scanline_width_bits = width * depth; + remainder = scanline_width_bits % 32; + + if (remainder) + scanline_width_bits += 32 - remainder; + + /* Bitmaps with a depth less than 16 need a palette. */ + /* BITMAPINFO structure already contains the first RGBQUAD. */ + if (depth < 16) + palette_colors = 1 << depth - 1; + + *ximg = xmalloc (sizeof (XImage) + palette_colors * sizeof (RGBQUAD)); + if (*ximg == NULL) + { + image_error ("Unable to allocate memory for XImage", Qnil, Qnil); + return 0; + } + + header = &((*ximg)->info.bmiHeader); + bzero (&((*ximg)->info), sizeof (BITMAPINFO)); + header->biSize = sizeof (*header); + header->biWidth = width; + header->biHeight = -height; /* negative indicates a top-down bitmap. */ + header->biPlanes = 1; + header->biBitCount = depth; + header->biCompression = BI_RGB; + header->biClrUsed = palette_colors; + + /* TODO: fill in palette. */ + if (depth == 1) + { + (*ximg)->info.bmiColors[0].rgbBlue = 0; + (*ximg)->info.bmiColors[0].rgbGreen = 0; + (*ximg)->info.bmiColors[0].rgbRed = 0; + (*ximg)->info.bmiColors[0].rgbReserved = 0; + (*ximg)->info.bmiColors[1].rgbBlue = 255; + (*ximg)->info.bmiColors[1].rgbGreen = 255; + (*ximg)->info.bmiColors[1].rgbRed = 255; + (*ximg)->info.bmiColors[1].rgbReserved = 0; + } + + hdc = get_frame_dc (f); + + /* Create a DIBSection and raster array for the bitmap, + and store its handle in *pixmap. */ + *pixmap = CreateDIBSection (hdc, &((*ximg)->info), + (depth < 16) ? DIB_PAL_COLORS : DIB_RGB_COLORS, + &((*ximg)->data), NULL, 0); + + /* Realize display palette and garbage all frames. */ + release_frame_dc (f, hdc); + + if (*pixmap == NULL) + { + DWORD err = GetLastError(); + Lisp_Object errcode; + /* All system errors are < 10000, so the following is safe. */ + XSETINT (errcode, (int) err); + image_error ("Unable to create bitmap, error code %d", errcode, Qnil); + x_destroy_x_image (*ximg); + return 0; + } + + return 1; + +#endif /* HAVE_NTGUI */ + +#ifdef MAC_OS + Display *display = FRAME_X_DISPLAY (f); + Window window = FRAME_X_WINDOW (f); + + xassert (interrupt_input_blocked); + + /* Allocate a pixmap of the same size. */ + *pixmap = XCreatePixmap (display, window, width, height, depth); + if (*pixmap == NO_PIXMAP) + { + x_destroy_x_image (*ximg); + *ximg = NULL; + image_error ("Unable to create X pixmap", Qnil, Qnil); + return 0; + } + + LockPixels (GetGWorldPixMap (*pixmap)); + *ximg = *pixmap; + return 1; + +#endif /* MAC_OS */ +} + + +/* Destroy XImage XIMG. Free XIMG->data. */ + +static void +x_destroy_x_image (ximg) + XImagePtr ximg; +{ + xassert (interrupt_input_blocked); + if (ximg) + { +#ifdef HAVE_X_WINDOWS + xfree (ximg->data); + ximg->data = NULL; + XDestroyImage (ximg); +#endif /* HAVE_X_WINDOWS */ +#ifdef HAVE_NTGUI + /* Data will be freed by DestroyObject. */ + ximg->data = NULL; + xfree (ximg); +#endif /* HAVE_NTGUI */ +#ifdef MAC_OS + XDestroyImage (ximg); +#endif /* MAC_OS */ + } +} + + +/* Put XImage XIMG into pixmap PIXMAP on frame F. WIDTH and HEIGHT + are width and height of both the image and pixmap. */ + +static void +x_put_x_image (f, ximg, pixmap, width, height) + struct frame *f; + XImagePtr ximg; + Pixmap pixmap; + int width, height; +{ +#ifdef HAVE_X_WINDOWS + GC gc; + + xassert (interrupt_input_blocked); + gc = XCreateGC (FRAME_X_DISPLAY (f), pixmap, 0, NULL); + XPutImage (FRAME_X_DISPLAY (f), pixmap, gc, ximg, 0, 0, 0, 0, width, height); + XFreeGC (FRAME_X_DISPLAY (f), gc); +#endif /* HAVE_X_WINDOWS */ + +#ifdef HAVE_NTGUI +#if 0 /* I don't think this is necessary looking at where it is used. */ + HDC hdc = get_frame_dc (f); + SetDIBits (hdc, pixmap, 0, height, ximg->data, &(ximg->info), DIB_RGB_COLORS); + release_frame_dc (f, hdc); +#endif +#endif /* HAVE_NTGUI */ + +#ifdef MAC_OS + xassert (ximg == pixmap); +#endif /* MAC_OS */ +} + + +/*********************************************************************** + File Handling + ***********************************************************************/ + +static unsigned char *slurp_file P_ ((char *, int *)); + + +/* Find image file FILE. Look in data-directory, then + x-bitmap-file-path. Value is the full name of the file found, or + nil if not found. */ + +Lisp_Object +x_find_image_file (file) + Lisp_Object file; +{ + Lisp_Object file_found, search_path; + struct gcpro gcpro1, gcpro2; + int fd; + + file_found = Qnil; + search_path = Fcons (Vdata_directory, Vx_bitmap_file_path); + GCPRO2 (file_found, search_path); + + /* Try to find FILE in data-directory, then x-bitmap-file-path. */ + fd = openp (search_path, file, Qnil, &file_found, Qnil); + + if (fd == -1) + file_found = Qnil; + else + close (fd); + + UNGCPRO; + return file_found; +} + + +/* Read FILE into memory. Value is a pointer to a buffer allocated + with xmalloc holding FILE's contents. Value is null if an error + occurred. *SIZE is set to the size of the file. */ + +static unsigned char * +slurp_file (file, size) + char *file; + int *size; +{ + FILE *fp = NULL; + unsigned char *buf = NULL; + struct stat st; + + if (stat (file, &st) == 0 + && (fp = fopen (file, "rb")) != NULL + && (buf = (char *) xmalloc (st.st_size), + fread (buf, 1, st.st_size, fp) == st.st_size)) + { + *size = st.st_size; + fclose (fp); + } + else + { + if (fp) + fclose (fp); + if (buf) + { + xfree (buf); + buf = NULL; + } + } + + return buf; +} + + + +#ifdef MAC_OS + +/*********************************************************************** + MAC Image Load Functions + ***********************************************************************/ + +static int image_load_quicktime P_ ((struct frame *, struct image *img, + OSType)); +#ifdef MAC_OSX +static int image_load_quartz2d P_ ((struct frame *, struct image *img, int)); +#endif + +static OSErr +find_image_fsspec (specified_file, file, fss) + Lisp_Object specified_file, *file; + FSSpec *fss; +{ +#if TARGET_API_MAC_CARBON + FSRef fsr; +#else + Str255 mac_pathname; +#endif + OSErr err; + + *file = x_find_image_file (specified_file); + if (!STRINGP (*file)) + return fnfErr; /* file or directory not found; + incomplete pathname */ + /* Try to open the image file. */ +#if TARGET_API_MAC_CARBON + err = FSPathMakeRef (SDATA (*file), &fsr, NULL); + if (err == noErr) + err = FSGetCatalogInfo (&fsr, kFSCatInfoNone, NULL, NULL, fss, NULL); +#else + if (posix_to_mac_pathname (SDATA (*file), mac_pathname, MAXPATHLEN+1) == 0) + return fnfErr; + c2pstr (mac_pathname); + err = FSMakeFSSpec (0, 0, mac_pathname, fss); +#endif + return err; +} + +static int +image_load_qt_1 (f, img, type, fss, dh) + struct frame *f; + struct image *img; + OSType type; + FSSpec *fss; + Handle dh; +{ + OSErr err; + GraphicsImportComponent gi; + Rect rect; + int width, height; + short draw_all_pixels; + Lisp_Object specified_bg; + XColor color; + XImagePtr ximg; + RGBColor bg_color; + + err = OpenADefaultComponent (GraphicsImporterComponentType, + type, &gi); + if (err != noErr) + { + image_error ("Cannot get importer component for `%s'", img->spec, Qnil); + return 0; + } + if (dh == NULL) + { + /* read from file system spec */ + err = GraphicsImportSetDataFile (gi, fss); + if (err != noErr) + { + image_error ("Cannot set fsspec to graphics importer for '%s'", + img->spec, Qnil); + goto error; + } + } + else + { + /* read from data handle */ + err = GraphicsImportSetDataHandle (gi, dh); + if (err != noErr) + { + image_error ("Cannot set data handle to graphics importer for `%s'", + img->spec, Qnil); + goto error; + } + } + err = GraphicsImportGetNaturalBounds (gi, &rect); + if (err != noErr) + { + image_error ("Error reading `%s'", img->spec, Qnil); + goto error; + } + width = img->width = rect.right - rect.left; + height = img->height = rect.bottom - rect.top; + err = GraphicsImportDoesDrawAllPixels (gi, &draw_all_pixels); +#if 0 + /* Don't check the error code here. It may have an undocumented + value -32766. */ + if (err != noErr) + { + image_error ("Error reading `%s'", img->spec, Qnil); + goto error; + } +#endif + if (draw_all_pixels != graphicsImporterDrawsAllPixels) + { + specified_bg = image_spec_value (img->spec, QCbackground, NULL); + if (!STRINGP (specified_bg) || + !mac_defined_color (f, SDATA (specified_bg), &color, 0)) + { + color.pixel = FRAME_BACKGROUND_PIXEL (f); + color.red = RED16_FROM_ULONG (color.pixel); + color.green = GREEN16_FROM_ULONG (color.pixel); + color.blue = BLUE16_FROM_ULONG (color.pixel); + } + } + + if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) + goto error; + if (draw_all_pixels != graphicsImporterDrawsAllPixels) + { + SetGWorld (ximg, NULL); + bg_color.red = color.red; + bg_color.green = color.green; + bg_color.blue = color.blue; + RGBBackColor (&bg_color); +#if TARGET_API_MAC_CARBON + GetPortBounds (ximg, &rect); + EraseRect (&rect); +#else + EraseRect (&(ximg->portRect)); +#endif + } + GraphicsImportSetGWorld (gi, ximg, NULL); + GraphicsImportDraw (gi); + CloseComponent (gi); + + /* Maybe fill in the background field while we have ximg handy. */ + if (NILP (image_spec_value (img->spec, QCbackground, NULL))) + IMAGE_BACKGROUND (img, f, ximg); + + /* Put the image into the pixmap. */ + x_put_x_image (f, ximg, img->pixmap, width, height); + x_destroy_x_image (ximg); + return 1; + + error: + CloseComponent (gi); + return 0; +} + + +/* Load an image using the QuickTime Graphics Importer. + Note: The alpha channel does not work for PNG images. */ +static int +image_load_quicktime (f, img, type) + struct frame *f; + struct image *img; + OSType type; +{ + Lisp_Object specified_file; + Lisp_Object specified_data; + OSErr err; + + specified_file = image_spec_value (img->spec, QCfile, NULL); + specified_data = image_spec_value (img->spec, QCdata, NULL); + + if (NILP (specified_data)) + { + /* Read from a file */ + Lisp_Object file; + FSSpec fss; + + err = find_image_fsspec (specified_file, &file, &fss); + if (err != noErr) + { + if (err == fnfErr) + image_error ("Cannot find image file `%s'", specified_file, Qnil); + else + image_error ("Cannot open `%s'", file, Qnil); + return 0; + } + return image_load_qt_1 (f, img, type, &fss, NULL); + } + else + { + /* Memory source! */ + int success_p; + Handle dh; + + err = PtrToHand (SDATA (specified_data), &dh, SBYTES (specified_data)); + if (err != noErr) + { + image_error ("Cannot allocate data handle for `%s'", + img->spec, Qnil); + return 0; + } + success_p = image_load_qt_1 (f, img, type, NULL, dh); + DisposeHandle (dh); + return success_p; + } +} + + +#ifdef MAC_OSX +/* Load a PNG/JPEG image using Quartz 2D decoding routines. + CGImageCreateWithPNGDataProvider is provided after Mac OS X 10.2. + So don't use this function directly but determine at runtime + whether it exists. */ +typedef CGImageRef (*CGImageCreateWithPNGDataProviderProcType) + (CGDataProviderRef, const float [], bool, CGColorRenderingIntent); +static CGImageCreateWithPNGDataProviderProcType MyCGImageCreateWithPNGDataProvider; + + +static void +init_image_func_pointer () +{ + if (NSIsSymbolNameDefined ("_CGImageCreateWithPNGDataProvider")) + { + MyCGImageCreateWithPNGDataProvider + = (CGImageCreateWithPNGDataProviderProcType) + NSAddressOfSymbol (NSLookupAndBindSymbol + ("_CGImageCreateWithPNGDataProvider")); + } + else + MyCGImageCreateWithPNGDataProvider = NULL; +} + + +static int +image_load_quartz2d (f, img, png_p) + struct frame *f; + struct image *img; + int png_p; +{ + Lisp_Object file, specified_file; + Lisp_Object specified_data, specified_bg; + struct gcpro gcpro1; + CGDataProviderRef source; + CGImageRef image; + int width, height; + XColor color; + XImagePtr ximg = NULL; + CGContextRef context; + CGRect rectangle; + + /* Open the file. */ + specified_file = image_spec_value (img->spec, QCfile, NULL); + specified_data = image_spec_value (img->spec, QCdata, NULL); + + file = Qnil; + GCPRO1 (file); + + if (NILP (specified_data)) + { + CFStringRef path; + CFURLRef url; + + file = x_find_image_file (specified_file); + if (!STRINGP (file)) + { + image_error ("Cannot find image file `%s'", specified_file, Qnil); + UNGCPRO; + return 0; + } + path = CFStringCreateWithCString (NULL, SDATA (file), + kCFStringEncodingUTF8); + url = CFURLCreateWithFileSystemPath (NULL, path, + kCFURLPOSIXPathStyle, 0); + CFRelease (path); + source = CGDataProviderCreateWithURL (url); + CFRelease (url); + } + else + source = CGDataProviderCreateWithData (NULL, SDATA (specified_data), + SBYTES (specified_data), NULL); + + if (png_p) + image = (*MyCGImageCreateWithPNGDataProvider) (source, NULL, FALSE, + kCGRenderingIntentDefault); + else + image = CGImageCreateWithJPEGDataProvider (source, NULL, FALSE, + kCGRenderingIntentDefault); + + CGDataProviderRelease (source); + if (image == NULL) + { + UNGCPRO; + image_error ("Error reading image `%s'", img->spec, Qnil); + return 0; + } + + if (png_p) + { + specified_bg = image_spec_value (img->spec, QCbackground, NULL); + if (!STRINGP (specified_bg) || + !mac_defined_color (f, SDATA (specified_bg), &color, 0)) + { + color.pixel = FRAME_BACKGROUND_PIXEL (f); + color.red = RED16_FROM_ULONG (color.pixel); + color.green = GREEN16_FROM_ULONG (color.pixel); + color.blue = BLUE16_FROM_ULONG (color.pixel); + } + } + width = img->width = CGImageGetWidth (image); + height = img->height = CGImageGetHeight (image); + if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) + { + CGImageRelease (image); + UNGCPRO; + return 0; + } + rectangle = CGRectMake (0, 0, width, height); + QDBeginCGContext (ximg, &context); + if (png_p) + { + CGContextSetRGBFillColor (context, color.red / 65535.0, + color.green / 65535.0, + color.blue / 65535.0, 1.0); + CGContextFillRect (context, rectangle); + } + CGContextDrawImage (context, rectangle, image); + QDEndCGContext (ximg, &context); + CGImageRelease (image); + + /* Maybe fill in the background field while we have ximg handy. */ + if (NILP (image_spec_value (img->spec, QCbackground, NULL))) + IMAGE_BACKGROUND (img, f, ximg); + + /* Put the image into the pixmap. */ + x_put_x_image (f, ximg, img->pixmap, width, height); + x_destroy_x_image (ximg); + UNGCPRO; + return 1; +} +#endif + +#endif /* MAC_OS */ + + +/*********************************************************************** + XBM images + ***********************************************************************/ + +static int xbm_scan P_ ((unsigned char **, unsigned char *, char *, int *)); +static int xbm_load P_ ((struct frame *f, struct image *img)); +static int xbm_load_image P_ ((struct frame *f, struct image *img, + unsigned char *, unsigned char *)); +static int xbm_image_p P_ ((Lisp_Object object)); +static int xbm_read_bitmap_data P_ ((unsigned char *, unsigned char *, + int *, int *, unsigned char **)); +static int xbm_file_p P_ ((Lisp_Object)); + + +/* Indices of image specification fields in xbm_format, below. */ + +enum xbm_keyword_index +{ + XBM_TYPE, + XBM_FILE, + XBM_WIDTH, + XBM_HEIGHT, + XBM_DATA, + XBM_FOREGROUND, + XBM_BACKGROUND, + XBM_ASCENT, + XBM_MARGIN, + XBM_RELIEF, + XBM_ALGORITHM, + XBM_HEURISTIC_MASK, + XBM_MASK, + XBM_LAST +}; + +/* Vector of image_keyword structures describing the format + of valid XBM image specifications. */ + +static struct image_keyword xbm_format[XBM_LAST] = +{ + {":type", IMAGE_SYMBOL_VALUE, 1}, + {":file", IMAGE_STRING_VALUE, 0}, + {":width", IMAGE_POSITIVE_INTEGER_VALUE, 0}, + {":height", IMAGE_POSITIVE_INTEGER_VALUE, 0}, + {":data", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":foreground", IMAGE_STRING_OR_NIL_VALUE, 0}, + {":background", IMAGE_STRING_OR_NIL_VALUE, 0}, + {":ascent", IMAGE_ASCENT_VALUE, 0}, + {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, + {":relief", IMAGE_INTEGER_VALUE, 0}, + {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} +}; + +/* Structure describing the image type XBM. */ + +static struct image_type xbm_type = +{ + &Qxbm, + xbm_image_p, + xbm_load, + x_clear_image, + NULL +}; + +/* Tokens returned from xbm_scan. */ + +enum xbm_token +{ + XBM_TK_IDENT = 256, + XBM_TK_NUMBER +}; + + +/* Return non-zero if OBJECT is a valid XBM-type image specification. + A valid specification is a list starting with the symbol `image' + The rest of the list is a property list which must contain an + entry `:type xbm.. + + If the specification specifies a file to load, it must contain + an entry `:file FILENAME' where FILENAME is a string. + + If the specification is for a bitmap loaded from memory it must + contain `:width WIDTH', `:height HEIGHT', and `:data DATA', where + WIDTH and HEIGHT are integers > 0. DATA may be: + + 1. a string large enough to hold the bitmap data, i.e. it must + have a size >= (WIDTH + 7) / 8 * HEIGHT + + 2. a bool-vector of size >= WIDTH * HEIGHT + + 3. a vector of strings or bool-vectors, one for each line of the + bitmap. + + 4. A string containing an in-memory XBM file. WIDTH and HEIGHT + may not be specified in this case because they are defined in the + XBM file. + + Both the file and data forms may contain the additional entries + `:background COLOR' and `:foreground COLOR'. If not present, + foreground and background of the frame on which the image is + displayed is used. */ + +static int +xbm_image_p (object) + Lisp_Object object; +{ + struct image_keyword kw[XBM_LAST]; + + bcopy (xbm_format, kw, sizeof kw); + if (!parse_image_spec (object, kw, XBM_LAST, Qxbm)) + return 0; + + xassert (EQ (kw[XBM_TYPE].value, Qxbm)); + + if (kw[XBM_FILE].count) + { + if (kw[XBM_WIDTH].count || kw[XBM_HEIGHT].count || kw[XBM_DATA].count) + return 0; + } + else if (kw[XBM_DATA].count && xbm_file_p (kw[XBM_DATA].value)) + { + /* In-memory XBM file. */ + if (kw[XBM_WIDTH].count || kw[XBM_HEIGHT].count || kw[XBM_FILE].count) + return 0; + } + else + { + Lisp_Object data; + int width, height; + + /* Entries for `:width', `:height' and `:data' must be present. */ + if (!kw[XBM_WIDTH].count + || !kw[XBM_HEIGHT].count + || !kw[XBM_DATA].count) + return 0; + + data = kw[XBM_DATA].value; + width = XFASTINT (kw[XBM_WIDTH].value); + height = XFASTINT (kw[XBM_HEIGHT].value); + + /* Check type of data, and width and height against contents of + data. */ + if (VECTORP (data)) + { + int i; + + /* Number of elements of the vector must be >= height. */ + if (XVECTOR (data)->size < height) + return 0; + + /* Each string or bool-vector in data must be large enough + for one line of the image. */ + for (i = 0; i < height; ++i) + { + Lisp_Object elt = XVECTOR (data)->contents[i]; + + if (STRINGP (elt)) + { + if (SCHARS (elt) + < (width + BITS_PER_CHAR - 1) / BITS_PER_CHAR) + return 0; + } + else if (BOOL_VECTOR_P (elt)) + { + if (XBOOL_VECTOR (elt)->size < width) + return 0; + } + else + return 0; + } + } + else if (STRINGP (data)) + { + if (SCHARS (data) + < (width + BITS_PER_CHAR - 1) / BITS_PER_CHAR * height) + return 0; + } + else if (BOOL_VECTOR_P (data)) + { + if (XBOOL_VECTOR (data)->size < width * height) + return 0; + } + else + return 0; + } + + return 1; +} + + +/* Scan a bitmap file. FP is the stream to read from. Value is + either an enumerator from enum xbm_token, or a character for a + single-character token, or 0 at end of file. If scanning an + identifier, store the lexeme of the identifier in SVAL. If + scanning a number, store its value in *IVAL. */ + +static int +xbm_scan (s, end, sval, ival) + unsigned char **s, *end; + char *sval; + int *ival; +{ + unsigned int c; + + loop: + + /* Skip white space. */ + while (*s < end && (c = *(*s)++, isspace (c))) + ; + + if (*s >= end) + c = 0; + else if (isdigit (c)) + { + int value = 0, digit; + + if (c == '0' && *s < end) + { + c = *(*s)++; + if (c == 'x' || c == 'X') + { + while (*s < end) + { + c = *(*s)++; + if (isdigit (c)) + digit = c - '0'; + else if (c >= 'a' && c <= 'f') + digit = c - 'a' + 10; + else if (c >= 'A' && c <= 'F') + digit = c - 'A' + 10; + else + break; + value = 16 * value + digit; + } + } + else if (isdigit (c)) + { + value = c - '0'; + while (*s < end + && (c = *(*s)++, isdigit (c))) + value = 8 * value + c - '0'; + } + } + else + { + value = c - '0'; + while (*s < end + && (c = *(*s)++, isdigit (c))) + value = 10 * value + c - '0'; + } + + if (*s < end) + *s = *s - 1; + *ival = value; + c = XBM_TK_NUMBER; + } + else if (isalpha (c) || c == '_') + { + *sval++ = c; + while (*s < end + && (c = *(*s)++, (isalnum (c) || c == '_'))) + *sval++ = c; + *sval = 0; + if (*s < end) + *s = *s - 1; + c = XBM_TK_IDENT; + } + else if (c == '/' && **s == '*') + { + /* C-style comment. */ + ++*s; + while (**s && (**s != '*' || *(*s + 1) != '/')) + ++*s; + if (**s) + { + *s += 2; + goto loop; + } + } + + return c; +} + +#ifdef HAVE_NTGUI + +/* Create a Windows bitmap from X bitmap data. */ +static HBITMAP +w32_create_pixmap_from_bitmap_data (int width, int height, char *data) +{ + static unsigned char swap_nibble[16] + = { 0x0, 0x8, 0x4, 0xc, /* 0000 1000 0100 1100 */ + 0x2, 0xa, 0x6, 0xe, /* 0010 1010 0110 1110 */ + 0x1, 0x9, 0x5, 0xd, /* 0001 1001 0101 1101 */ + 0x3, 0xb, 0x7, 0xf }; /* 0011 1011 0111 1111 */ + int i, j, w1, w2; + unsigned char *bits, *p; + HBITMAP bmp; + + w1 = (width + 7) / 8; /* nb of 8bits elt in X bitmap */ + w2 = ((width + 15) / 16) * 2; /* nb of 16bits elt in W32 bitmap */ + bits = (unsigned char *) alloca (height * w2); + bzero (bits, height * w2); + for (i = 0; i < height; i++) + { + p = bits + i*w2; + for (j = 0; j < w1; j++) + { + /* Bitswap XBM bytes to match how Windows does things. */ + unsigned char c = *data++; + *p++ = (unsigned char)((swap_nibble[c & 0xf] << 4) + | (swap_nibble[(c>>4) & 0xf])); + } + } + bmp = CreateBitmap (width, height, 1, 1, (char *) bits); + + return bmp; +} + +static void convert_mono_to_color_image (f, img, foreground, background) + struct frame *f; + struct image *img; + COLORREF foreground, background; +{ + HDC hdc, old_img_dc, new_img_dc; + HGDIOBJ old_prev, new_prev; + HBITMAP new_pixmap; + + hdc = get_frame_dc (f); + old_img_dc = CreateCompatibleDC (hdc); + new_img_dc = CreateCompatibleDC (hdc); + new_pixmap = CreateCompatibleBitmap (hdc, img->width, img->height); + release_frame_dc (f, hdc); + old_prev = SelectObject (old_img_dc, img->pixmap); + new_prev = SelectObject (new_img_dc, new_pixmap); + SetTextColor (new_img_dc, foreground); + SetBkColor (new_img_dc, background); + + BitBlt (new_img_dc, 0, 0, img->width, img->height, old_img_dc, + 0, 0, SRCCOPY); + + SelectObject (old_img_dc, old_prev); + SelectObject (new_img_dc, new_prev); + DeleteDC (old_img_dc); + DeleteDC (new_img_dc); + DeleteObject (img->pixmap); + if (new_pixmap == 0) + fprintf (stderr, "Failed to convert image to color.\n"); + else + img->pixmap = new_pixmap; +} + +#define XBM_BIT_SHUFFLE(b) (~(b)) + +#else + +#define XBM_BIT_SHUFFLE(b) (b) + +#endif /* HAVE_NTGUI */ + + +static void +Create_Pixmap_From_Bitmap_Data(f, img, data, fg, bg, non_default_colors) + struct frame *f; + struct image *img; + char *data; + RGB_PIXEL_COLOR fg, bg; + int non_default_colors; +{ +#ifdef HAVE_NTGUI + img->pixmap + = w32_create_pixmap_from_bitmap_data (img->width, img->height, data); + + /* If colors were specified, transfer the bitmap to a color one. */ + if (non_default_colors) + convert_mono_to_color_image (f, img, fg, bg); +#else + img->pixmap + = XCreatePixmapFromBitmapData (FRAME_X_DISPLAY (f), + FRAME_X_WINDOW (f), + data, + img->width, img->height, + fg, bg, + DefaultDepthOfScreen (FRAME_X_SCREEN (f))); +#endif /* HAVE_NTGUI */ +} + + + +/* Replacement for XReadBitmapFileData which isn't available under old + X versions. CONTENTS is a pointer to a buffer to parse; END is the + buffer's end. Set *WIDTH and *HEIGHT to the width and height of + the image. Return in *DATA the bitmap data allocated with xmalloc. + Value is non-zero if successful. DATA null means just test if + CONTENTS looks like an in-memory XBM file. */ + +static int +xbm_read_bitmap_data (contents, end, width, height, data) + unsigned char *contents, *end; + int *width, *height; + unsigned char **data; +{ + unsigned char *s = contents; + char buffer[BUFSIZ]; + int padding_p = 0; + int v10 = 0; + int bytes_per_line, i, nbytes; + unsigned char *p; + int value; + int LA1; + +#define match() \ + LA1 = xbm_scan (&s, end, buffer, &value) + +#define expect(TOKEN) \ + if (LA1 != (TOKEN)) \ + goto failure; \ + else \ + match () + +#define expect_ident(IDENT) \ + if (LA1 == XBM_TK_IDENT && strcmp (buffer, (IDENT)) == 0) \ + match (); \ + else \ + goto failure + + *width = *height = -1; + if (data) + *data = NULL; + LA1 = xbm_scan (&s, end, buffer, &value); + + /* Parse defines for width, height and hot-spots. */ + while (LA1 == '#') + { + match (); + expect_ident ("define"); + expect (XBM_TK_IDENT); + + if (LA1 == XBM_TK_NUMBER); + { + char *p = strrchr (buffer, '_'); + p = p ? p + 1 : buffer; + if (strcmp (p, "width") == 0) + *width = value; + else if (strcmp (p, "height") == 0) + *height = value; + } + expect (XBM_TK_NUMBER); + } + + if (*width < 0 || *height < 0) + goto failure; + else if (data == NULL) + goto success; + + /* Parse bits. Must start with `static'. */ + expect_ident ("static"); + if (LA1 == XBM_TK_IDENT) + { + if (strcmp (buffer, "unsigned") == 0) + { + match (); + expect_ident ("char"); + } + else if (strcmp (buffer, "short") == 0) + { + match (); + v10 = 1; + if (*width % 16 && *width % 16 < 9) + padding_p = 1; + } + else if (strcmp (buffer, "char") == 0) + match (); + else + goto failure; + } + else + goto failure; + + expect (XBM_TK_IDENT); + expect ('['); + expect (']'); + expect ('='); + expect ('{'); + + bytes_per_line = (*width + 7) / 8 + padding_p; + nbytes = bytes_per_line * *height; + p = *data = (char *) xmalloc (nbytes); + + if (v10) + { + for (i = 0; i < nbytes; i += 2) + { + int val = value; + expect (XBM_TK_NUMBER); + + *p++ = XBM_BIT_SHUFFLE (val); + if (!padding_p || ((i + 2) % bytes_per_line)) + *p++ = XBM_BIT_SHUFFLE (value >> 8); + + if (LA1 == ',' || LA1 == '}') + match (); + else + goto failure; + } + } + else + { + for (i = 0; i < nbytes; ++i) + { + int val = value; + expect (XBM_TK_NUMBER); + + *p++ = XBM_BIT_SHUFFLE (val); + + if (LA1 == ',' || LA1 == '}') + match (); + else + goto failure; + } + } + + success: + return 1; + + failure: + + if (data && *data) + { + xfree (*data); + *data = NULL; + } + return 0; + +#undef match +#undef expect +#undef expect_ident +} + + +/* Load XBM image IMG which will be displayed on frame F from buffer + CONTENTS. END is the end of the buffer. Value is non-zero if + successful. */ + +static int +xbm_load_image (f, img, contents, end) + struct frame *f; + struct image *img; + unsigned char *contents, *end; +{ + int rc; + unsigned char *data; + int success_p = 0; + + rc = xbm_read_bitmap_data (contents, end, &img->width, &img->height, &data); + if (rc) + { + unsigned long foreground = FRAME_FOREGROUND_PIXEL (f); + unsigned long background = FRAME_BACKGROUND_PIXEL (f); + int non_default_colors = 0; + Lisp_Object value; + + xassert (img->width > 0 && img->height > 0); + + /* Get foreground and background colors, maybe allocate colors. */ + value = image_spec_value (img->spec, QCforeground, NULL); + if (!NILP (value)) + { + foreground = x_alloc_image_color (f, img, value, foreground); + non_default_colors = 1; + } + value = image_spec_value (img->spec, QCbackground, NULL); + if (!NILP (value)) + { + background = x_alloc_image_color (f, img, value, background); + img->background = background; + img->background_valid = 1; + non_default_colors = 1; + } + + Create_Pixmap_From_Bitmap_Data (f, img, data, + foreground, background, + non_default_colors); + xfree (data); + + if (img->pixmap == NO_PIXMAP) + { + x_clear_image (f, img); + image_error ("Unable to create X pixmap for `%s'", img->spec, Qnil); + } + else + success_p = 1; + } + else + image_error ("Error loading XBM image `%s'", img->spec, Qnil); + + return success_p; +} + + +/* Value is non-zero if DATA looks like an in-memory XBM file. */ + +static int +xbm_file_p (data) + Lisp_Object data; +{ + int w, h; + return (STRINGP (data) + && xbm_read_bitmap_data (SDATA (data), + (SDATA (data) + + SBYTES (data)), + &w, &h, NULL)); +} + + +/* Fill image IMG which is used on frame F with pixmap data. Value is + non-zero if successful. */ + +static int +xbm_load (f, img) + struct frame *f; + struct image *img; +{ + int success_p = 0; + Lisp_Object file_name; + + xassert (xbm_image_p (img->spec)); + + /* If IMG->spec specifies a file name, create a non-file spec from it. */ + file_name = image_spec_value (img->spec, QCfile, NULL); + if (STRINGP (file_name)) + { + Lisp_Object file; + unsigned char *contents; + int size; + struct gcpro gcpro1; + + file = x_find_image_file (file_name); + GCPRO1 (file); + if (!STRINGP (file)) + { + image_error ("Cannot find image file `%s'", file_name, Qnil); + UNGCPRO; + return 0; + } + + contents = slurp_file (SDATA (file), &size); + if (contents == NULL) + { + image_error ("Error loading XBM image `%s'", img->spec, Qnil); + UNGCPRO; + return 0; + } + + success_p = xbm_load_image (f, img, contents, contents + size); + UNGCPRO; + } + else + { + struct image_keyword fmt[XBM_LAST]; + Lisp_Object data; + unsigned long foreground = FRAME_FOREGROUND_PIXEL (f); + unsigned long background = FRAME_BACKGROUND_PIXEL (f); + int non_default_colors = 0; + char *bits; + int parsed_p; + int in_memory_file_p = 0; + + /* See if data looks like an in-memory XBM file. */ + data = image_spec_value (img->spec, QCdata, NULL); + in_memory_file_p = xbm_file_p (data); + + /* Parse the image specification. */ + bcopy (xbm_format, fmt, sizeof fmt); + parsed_p = parse_image_spec (img->spec, fmt, XBM_LAST, Qxbm); + xassert (parsed_p); + + /* Get specified width, and height. */ + if (!in_memory_file_p) + { + img->width = XFASTINT (fmt[XBM_WIDTH].value); + img->height = XFASTINT (fmt[XBM_HEIGHT].value); + xassert (img->width > 0 && img->height > 0); + } + + /* Get foreground and background colors, maybe allocate colors. */ + if (fmt[XBM_FOREGROUND].count + && STRINGP (fmt[XBM_FOREGROUND].value)) + { + foreground = x_alloc_image_color (f, img, fmt[XBM_FOREGROUND].value, + foreground); + non_default_colors = 1; + } + + if (fmt[XBM_BACKGROUND].count + && STRINGP (fmt[XBM_BACKGROUND].value)) + { + background = x_alloc_image_color (f, img, fmt[XBM_BACKGROUND].value, + background); + non_default_colors = 1; + } + + if (in_memory_file_p) + success_p = xbm_load_image (f, img, SDATA (data), + (SDATA (data) + + SBYTES (data))); + else + { + if (VECTORP (data)) + { + int i; + char *p; + int nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR; + + p = bits = (char *) alloca (nbytes * img->height); + for (i = 0; i < img->height; ++i, p += nbytes) + { + Lisp_Object line = XVECTOR (data)->contents[i]; + if (STRINGP (line)) + bcopy (SDATA (line), p, nbytes); + else + bcopy (XBOOL_VECTOR (line)->data, p, nbytes); + } + } + else if (STRINGP (data)) + bits = SDATA (data); + else + bits = XBOOL_VECTOR (data)->data; + + /* Create the pixmap. */ + + Create_Pixmap_From_Bitmap_Data (f, img, bits, + foreground, background, + non_default_colors); + if (img->pixmap) + success_p = 1; + else + { + image_error ("Unable to create pixmap for XBM image `%s'", + img->spec, Qnil); + x_clear_image (f, img); + } + } + } + + return success_p; +} + + + +/*********************************************************************** + XPM images + ***********************************************************************/ + +#ifdef HAVE_XPM + +static int xpm_image_p P_ ((Lisp_Object object)); +static int xpm_load P_ ((struct frame *f, struct image *img)); +static int xpm_valid_color_symbols_p P_ ((Lisp_Object)); + +#ifdef HAVE_NTGUI +/* Indicate to xpm.h that we don't have Xlib. */ +#define FOR_MSW +/* simx.h in xpm defines XColor and XImage differently than Emacs. */ +#define XColor xpm_XColor +#define XImage xpm_XImage +#define PIXEL_ALREADY_TYPEDEFED +#include "X11/xpm.h" +#undef FOR_MSW +#undef XColor +#undef XImage +#undef PIXEL_ALREADY_TYPEDEFED +#else +#include "X11/xpm.h" +#endif /* HAVE_NTGUI */ + +/* The symbol `xpm' identifying XPM-format images. */ + +Lisp_Object Qxpm; + +/* Indices of image specification fields in xpm_format, below. */ + +enum xpm_keyword_index +{ + XPM_TYPE, + XPM_FILE, + XPM_DATA, + XPM_ASCENT, + XPM_MARGIN, + XPM_RELIEF, + XPM_ALGORITHM, + XPM_HEURISTIC_MASK, + XPM_MASK, + XPM_COLOR_SYMBOLS, + XPM_BACKGROUND, + XPM_LAST +}; + +/* Vector of image_keyword structures describing the format + of valid XPM image specifications. */ + +static struct image_keyword xpm_format[XPM_LAST] = +{ + {":type", IMAGE_SYMBOL_VALUE, 1}, + {":file", IMAGE_STRING_VALUE, 0}, + {":data", IMAGE_STRING_VALUE, 0}, + {":ascent", IMAGE_ASCENT_VALUE, 0}, + {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, + {":relief", IMAGE_INTEGER_VALUE, 0}, + {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":color-symbols", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":background", IMAGE_STRING_OR_NIL_VALUE, 0} +}; + +/* Structure describing the image type XPM. */ + +static struct image_type xpm_type = +{ + &Qxpm, + xpm_image_p, + xpm_load, + x_clear_image, + NULL +}; + +#ifdef HAVE_X_WINDOWS + +/* Define ALLOC_XPM_COLORS if we can use Emacs' own color allocation + functions for allocating image colors. Our own functions handle + color allocation failures more gracefully than the ones on the XPM + lib. */ + +#if defined XpmAllocColor && defined XpmFreeColors && defined XpmColorClosure +#define ALLOC_XPM_COLORS +#endif +#endif /* HAVE_X_WINDOWS */ + +#ifdef ALLOC_XPM_COLORS + +static void xpm_init_color_cache P_ ((struct frame *, XpmAttributes *)); +static void xpm_free_color_cache P_ ((void)); +static int xpm_lookup_color P_ ((struct frame *, char *, XColor *)); +static int xpm_color_bucket P_ ((char *)); +static struct xpm_cached_color *xpm_cache_color P_ ((struct frame *, char *, + XColor *, int)); + +/* An entry in a hash table used to cache color definitions of named + colors. This cache is necessary to speed up XPM image loading in + case we do color allocations ourselves. Without it, we would need + a call to XParseColor per pixel in the image. */ + +struct xpm_cached_color +{ + /* Next in collision chain. */ + struct xpm_cached_color *next; + + /* Color definition (RGB and pixel color). */ + XColor color; + + /* Color name. */ + char name[1]; +}; + +/* The hash table used for the color cache, and its bucket vector + size. */ + +#define XPM_COLOR_CACHE_BUCKETS 1001 +struct xpm_cached_color **xpm_color_cache; + +/* Initialize the color cache. */ + +static void +xpm_init_color_cache (f, attrs) + struct frame *f; + XpmAttributes *attrs; +{ + size_t nbytes = XPM_COLOR_CACHE_BUCKETS * sizeof *xpm_color_cache; + xpm_color_cache = (struct xpm_cached_color **) xmalloc (nbytes); + memset (xpm_color_cache, 0, nbytes); + init_color_table (); + + if (attrs->valuemask & XpmColorSymbols) + { + int i; + XColor color; + + for (i = 0; i < attrs->numsymbols; ++i) + if (XParseColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), + attrs->colorsymbols[i].value, &color)) + { + color.pixel = lookup_rgb_color (f, color.red, color.green, + color.blue); + xpm_cache_color (f, attrs->colorsymbols[i].name, &color, -1); + } + } +} + +/* Free the color cache. */ + +static void +xpm_free_color_cache () +{ + struct xpm_cached_color *p, *next; + int i; + + for (i = 0; i < XPM_COLOR_CACHE_BUCKETS; ++i) + for (p = xpm_color_cache[i]; p; p = next) + { + next = p->next; + xfree (p); + } + + xfree (xpm_color_cache); + xpm_color_cache = NULL; + free_color_table (); +} + +/* Return the bucket index for color named COLOR_NAME in the color + cache. */ + +static int +xpm_color_bucket (color_name) + char *color_name; +{ + unsigned h = 0; + char *s; + + for (s = color_name; *s; ++s) + h = (h << 2) ^ *s; + return h %= XPM_COLOR_CACHE_BUCKETS; +} + + +/* On frame F, cache values COLOR for color with name COLOR_NAME. + BUCKET, if >= 0, is a precomputed bucket index. Value is the cache + entry added. */ + +static struct xpm_cached_color * +xpm_cache_color (f, color_name, color, bucket) + struct frame *f; + char *color_name; + XColor *color; + int bucket; +{ + size_t nbytes; + struct xpm_cached_color *p; + + if (bucket < 0) + bucket = xpm_color_bucket (color_name); + + nbytes = sizeof *p + strlen (color_name); + p = (struct xpm_cached_color *) xmalloc (nbytes); + strcpy (p->name, color_name); + p->color = *color; + p->next = xpm_color_cache[bucket]; + xpm_color_cache[bucket] = p; + return p; +} + +/* Look up color COLOR_NAME for frame F in the color cache. If found, + return the cached definition in *COLOR. Otherwise, make a new + entry in the cache and allocate the color. Value is zero if color + allocation failed. */ + +static int +xpm_lookup_color (f, color_name, color) + struct frame *f; + char *color_name; + XColor *color; +{ + struct xpm_cached_color *p; + int h = xpm_color_bucket (color_name); + + for (p = xpm_color_cache[h]; p; p = p->next) + if (strcmp (p->name, color_name) == 0) + break; + + if (p != NULL) + *color = p->color; + else if (XParseColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), + color_name, color)) + { + color->pixel = lookup_rgb_color (f, color->red, color->green, + color->blue); + p = xpm_cache_color (f, color_name, color, h); + } + /* You get `opaque' at least from ImageMagick converting pbm to xpm + with transparency, and it's useful. */ + else if (strcmp ("opaque", color_name) == 0) + { + bzero (color, sizeof (XColor)); /* Is this necessary/correct? */ + color->pixel = FRAME_FOREGROUND_PIXEL (f); + p = xpm_cache_color (f, color_name, color, h); + } + + return p != NULL; +} + + +/* Callback for allocating color COLOR_NAME. Called from the XPM lib. + CLOSURE is a pointer to the frame on which we allocate the + color. Return in *COLOR the allocated color. Value is non-zero + if successful. */ + +static int +xpm_alloc_color (dpy, cmap, color_name, color, closure) + Display *dpy; + Colormap cmap; + char *color_name; + XColor *color; + void *closure; +{ + return xpm_lookup_color ((struct frame *) closure, color_name, color); +} + + +/* Callback for freeing NPIXELS colors contained in PIXELS. CLOSURE + is a pointer to the frame on which we allocate the color. Value is + non-zero if successful. */ + +static int +xpm_free_colors (dpy, cmap, pixels, npixels, closure) + Display *dpy; + Colormap cmap; + Pixel *pixels; + int npixels; + void *closure; +{ + return 1; +} + +#endif /* ALLOC_XPM_COLORS */ + + +#ifdef HAVE_NTGUI + +/* XPM library details. */ + +DEF_IMGLIB_FN (XpmFreeAttributes); +DEF_IMGLIB_FN (XpmCreateImageFromBuffer); +DEF_IMGLIB_FN (XpmReadFileToImage); +DEF_IMGLIB_FN (XImageFree); + + +static int +init_xpm_functions (void) +{ + HMODULE library; + + if (!(library = LoadLibrary ("libXpm.dll"))) + return 0; + + LOAD_IMGLIB_FN (library, XpmFreeAttributes); + LOAD_IMGLIB_FN (library, XpmCreateImageFromBuffer); + LOAD_IMGLIB_FN (library, XpmReadFileToImage); + LOAD_IMGLIB_FN (library, XImageFree); + return 1; +} + +#endif /* HAVE_NTGUI */ + + +/* Value is non-zero if COLOR_SYMBOLS is a valid color symbols list + for XPM images. Such a list must consist of conses whose car and + cdr are strings. */ + +static int +xpm_valid_color_symbols_p (color_symbols) + Lisp_Object color_symbols; +{ + while (CONSP (color_symbols)) + { + Lisp_Object sym = XCAR (color_symbols); + if (!CONSP (sym) + || !STRINGP (XCAR (sym)) + || !STRINGP (XCDR (sym))) + break; + color_symbols = XCDR (color_symbols); + } + + return NILP (color_symbols); +} + + +/* Value is non-zero if OBJECT is a valid XPM image specification. */ + +static int +xpm_image_p (object) + Lisp_Object object; +{ + struct image_keyword fmt[XPM_LAST]; + bcopy (xpm_format, fmt, sizeof fmt); + return (parse_image_spec (object, fmt, XPM_LAST, Qxpm) + /* Either `:file' or `:data' must be present. */ + && fmt[XPM_FILE].count + fmt[XPM_DATA].count == 1 + /* Either no `:color-symbols' or it's a list of conses + whose car and cdr are strings. */ + && (fmt[XPM_COLOR_SYMBOLS].count == 0 + || xpm_valid_color_symbols_p (fmt[XPM_COLOR_SYMBOLS].value))); +} + + +/* Load image IMG which will be displayed on frame F. Value is + non-zero if successful. */ + +static int +xpm_load (f, img) + struct frame *f; + struct image *img; +{ + int rc; + XpmAttributes attrs; + Lisp_Object specified_file, color_symbols; +#ifdef HAVE_NTGUI + HDC hdc; + xpm_XImage * xpm_image = NULL, * xpm_mask = NULL; +#endif /* HAVE_NTGUI */ + + /* Configure the XPM lib. Use the visual of frame F. Allocate + close colors. Return colors allocated. */ + bzero (&attrs, sizeof attrs); + +#ifndef HAVE_NTGUI + attrs.visual = FRAME_X_VISUAL (f); + attrs.colormap = FRAME_X_COLORMAP (f); + attrs.valuemask |= XpmVisual; + attrs.valuemask |= XpmColormap; +#endif /* HAVE_NTGUI */ + +#ifdef ALLOC_XPM_COLORS + /* Allocate colors with our own functions which handle + failing color allocation more gracefully. */ + attrs.color_closure = f; + attrs.alloc_color = xpm_alloc_color; + attrs.free_colors = xpm_free_colors; + attrs.valuemask |= XpmAllocColor | XpmFreeColors | XpmColorClosure; +#else /* not ALLOC_XPM_COLORS */ + /* Let the XPM lib allocate colors. */ + attrs.valuemask |= XpmReturnAllocPixels; +#ifdef XpmAllocCloseColors + attrs.alloc_close_colors = 1; + attrs.valuemask |= XpmAllocCloseColors; +#else /* not XpmAllocCloseColors */ + attrs.closeness = 600; + attrs.valuemask |= XpmCloseness; +#endif /* not XpmAllocCloseColors */ +#endif /* ALLOC_XPM_COLORS */ + + /* If image specification contains symbolic color definitions, add + these to `attrs'. */ + color_symbols = image_spec_value (img->spec, QCcolor_symbols, NULL); + if (CONSP (color_symbols)) + { + Lisp_Object tail; + XpmColorSymbol *xpm_syms; + int i, size; + + attrs.valuemask |= XpmColorSymbols; + + /* Count number of symbols. */ + attrs.numsymbols = 0; + for (tail = color_symbols; CONSP (tail); tail = XCDR (tail)) + ++attrs.numsymbols; + + /* Allocate an XpmColorSymbol array. */ + size = attrs.numsymbols * sizeof *xpm_syms; + xpm_syms = (XpmColorSymbol *) alloca (size); + bzero (xpm_syms, size); + attrs.colorsymbols = xpm_syms; + + /* Fill the color symbol array. */ + for (tail = color_symbols, i = 0; + CONSP (tail); + ++i, tail = XCDR (tail)) + { + Lisp_Object name = XCAR (XCAR (tail)); + Lisp_Object color = XCDR (XCAR (tail)); + xpm_syms[i].name = (char *) alloca (SCHARS (name) + 1); + strcpy (xpm_syms[i].name, SDATA (name)); + xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1); + strcpy (xpm_syms[i].value, SDATA (color)); + } + } + + /* Create a pixmap for the image, either from a file, or from a + string buffer containing data in the same format as an XPM file. */ +#ifdef ALLOC_XPM_COLORS + xpm_init_color_cache (f, &attrs); +#endif + + specified_file = image_spec_value (img->spec, QCfile, NULL); + +#ifdef HAVE_NTGUI + { + HDC frame_dc = get_frame_dc (f); + hdc = CreateCompatibleDC (frame_dc); + release_frame_dc (f, frame_dc); + } +#endif /* HAVE_NTGUI */ + + if (STRINGP (specified_file)) + { + Lisp_Object file = x_find_image_file (specified_file); + if (!STRINGP (file)) + { + image_error ("Cannot find image file `%s'", specified_file, Qnil); + return 0; + } + +#ifdef HAVE_NTGUI + /* XpmReadFileToPixmap is not available in the Windows port of + libxpm. But XpmReadFileToImage almost does what we want. */ + rc = fn_XpmReadFileToImage (&hdc, SDATA (file), + &xpm_image, &xpm_mask, + &attrs); +#else + rc = XpmReadFileToPixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + SDATA (file), &img->pixmap, &img->mask, + &attrs); +#endif /* HAVE_NTGUI */ + } + else + { + Lisp_Object buffer = image_spec_value (img->spec, QCdata, NULL); +#ifdef HAVE_NTGUI + /* XpmCreatePixmapFromBuffer is not available in the Windows port + of libxpm. But XpmCreateImageFromBuffer almost does what we want. */ + rc = fn_XpmCreateImageFromBuffer (&hdc, SDATA (buffer), + &xpm_image, &xpm_mask, + &attrs); +#else + rc = XpmCreatePixmapFromBuffer (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + SDATA (buffer), + &img->pixmap, &img->mask, + &attrs); +#endif /* HAVE_NTGUI */ + } + + if (rc == XpmSuccess) + { +#if defined (COLOR_TABLE_SUPPORT) && defined (ALLOC_XPM_COLORS) + img->colors = colors_in_color_table (&img->ncolors); +#else /* not ALLOC_XPM_COLORS */ + int i; + +#ifdef HAVE_NTGUI + /* W32 XPM uses XImage to wrap what W32 Emacs calls a Pixmap, + plus some duplicate attributes. */ + if (xpm_image && xpm_image->bitmap) + { + img->pixmap = xpm_image->bitmap; + /* XImageFree in libXpm frees XImage struct without destroying + the bitmap, which is what we want. */ + fn_XImageFree (xpm_image); + } + if (xpm_mask && xpm_mask->bitmap) + { + /* The mask appears to be inverted compared with what we expect. + TODO: invert our expectations. See other places where we + have to invert bits because our idea of masks is backwards. */ + HGDIOBJ old_obj; + old_obj = SelectObject (hdc, xpm_mask->bitmap); + + PatBlt (hdc, 0, 0, xpm_mask->width, xpm_mask->height, DSTINVERT); + SelectObject (hdc, old_obj); + + img->mask = xpm_mask->bitmap; + fn_XImageFree (xpm_mask); + DeleteDC (hdc); + } + + DeleteDC (hdc); +#endif /* HAVE_NTGUI */ + + /* Remember allocated colors. */ + img->ncolors = attrs.nalloc_pixels; + img->colors = (unsigned long *) xmalloc (img->ncolors + * sizeof *img->colors); + for (i = 0; i < attrs.nalloc_pixels; ++i) + { + img->colors[i] = attrs.alloc_pixels[i]; +#ifdef DEBUG_X_COLORS + register_color (img->colors[i]); +#endif + } +#endif /* not ALLOC_XPM_COLORS */ + + img->width = attrs.width; + img->height = attrs.height; + xassert (img->width > 0 && img->height > 0); + + /* The call to XpmFreeAttributes below frees attrs.alloc_pixels. */ +#ifdef HAVE_NTGUI + fn_XpmFreeAttributes (&attrs); +#else + XpmFreeAttributes (&attrs); +#endif /* HAVE_NTGUI */ + } + else + { +#ifdef HAVE_NTGUI + DeleteDC (hdc); +#endif /* HAVE_NTGUI */ + + switch (rc) + { + case XpmOpenFailed: + image_error ("Error opening XPM file (%s)", img->spec, Qnil); + break; + + case XpmFileInvalid: + image_error ("Invalid XPM file (%s)", img->spec, Qnil); + break; + + case XpmNoMemory: + image_error ("Out of memory (%s)", img->spec, Qnil); + break; + + case XpmColorFailed: + image_error ("Color allocation error (%s)", img->spec, Qnil); + break; + + default: + image_error ("Unknown error (%s)", img->spec, Qnil); + break; + } + } + +#ifdef ALLOC_XPM_COLORS + xpm_free_color_cache (); +#endif + return rc == XpmSuccess; +} + +#endif /* HAVE_XPM */ + + +/*********************************************************************** + Color table + ***********************************************************************/ + +#ifdef COLOR_TABLE_SUPPORT + +/* An entry in the color table mapping an RGB color to a pixel color. */ + +struct ct_color +{ + int r, g, b; + unsigned long pixel; + + /* Next in color table collision list. */ + struct ct_color *next; +}; + +/* The bucket vector size to use. Must be prime. */ + +#define CT_SIZE 101 + +/* Value is a hash of the RGB color given by R, G, and B. */ + +#define CT_HASH_RGB(R, G, B) (((R) << 16) ^ ((G) << 8) ^ (B)) + +/* The color hash table. */ + +struct ct_color **ct_table; + +/* Number of entries in the color table. */ + +int ct_colors_allocated; + +/* Initialize the color table. */ + +static void +init_color_table () +{ + int size = CT_SIZE * sizeof (*ct_table); + ct_table = (struct ct_color **) xmalloc (size); + bzero (ct_table, size); + ct_colors_allocated = 0; +} + + +/* Free memory associated with the color table. */ + +static void +free_color_table () +{ + int i; + struct ct_color *p, *next; + + for (i = 0; i < CT_SIZE; ++i) + for (p = ct_table[i]; p; p = next) + { + next = p->next; + xfree (p); + } + + xfree (ct_table); + ct_table = NULL; +} + + +/* Value is a pixel color for RGB color R, G, B on frame F. If an + entry for that color already is in the color table, return the + pixel color of that entry. Otherwise, allocate a new color for R, + G, B, and make an entry in the color table. */ + +static unsigned long +lookup_rgb_color (f, r, g, b) + struct frame *f; + int r, g, b; +{ + unsigned hash = CT_HASH_RGB (r, g, b); + int i = hash % CT_SIZE; + struct ct_color *p; + Display_Info *dpyinfo; + + /* Handle TrueColor visuals specially, which improves performance by + two orders of magnitude. Freeing colors on TrueColor visuals is + a nop, and pixel colors specify RGB values directly. See also + the Xlib spec, chapter 3.1. */ + dpyinfo = FRAME_X_DISPLAY_INFO (f); + if (dpyinfo->red_bits > 0) + { + unsigned long pr, pg, pb; + + /* Apply gamma-correction like normal color allocation does. */ + if (f->gamma) + { + XColor color; + color.red = r, color.green = g, color.blue = b; + gamma_correct (f, &color); + r = color.red, g = color.green, b = color.blue; + } + + /* Scale down RGB values to the visual's bits per RGB, and shift + them to the right position in the pixel color. Note that the + original RGB values are 16-bit values, as usual in X. */ + pr = (r >> (16 - dpyinfo->red_bits)) << dpyinfo->red_offset; + pg = (g >> (16 - dpyinfo->green_bits)) << dpyinfo->green_offset; + pb = (b >> (16 - dpyinfo->blue_bits)) << dpyinfo->blue_offset; + + /* Assemble the pixel color. */ + return pr | pg | pb; + } + + for (p = ct_table[i]; p; p = p->next) + if (p->r == r && p->g == g && p->b == b) + break; + + if (p == NULL) + { + +#ifdef HAVE_X_WINDOWS + XColor color; + Colormap cmap; + int rc; + + color.red = r; + color.green = g; + color.blue = b; + + cmap = FRAME_X_COLORMAP (f); + rc = x_alloc_nearest_color (f, cmap, &color); + if (rc) + { + ++ct_colors_allocated; + p = (struct ct_color *) xmalloc (sizeof *p); + p->r = r; + p->g = g; + p->b = b; + p->pixel = color.pixel; + p->next = ct_table[i]; + ct_table[i] = p; + } + else + return FRAME_FOREGROUND_PIXEL (f); + +#else + COLORREF color; +#ifdef HAVE_NTGUI + color = PALETTERGB (r, g, b); +#else + color = RGB_TO_ULONG (r, g, b); +#endif /* HAVE_NTGUI */ + ++ct_colors_allocated; + p = (struct ct_color *) xmalloc (sizeof *p); + p->r = r; + p->g = g; + p->b = b; + p->pixel = color; + p->next = ct_table[i]; + ct_table[i] = p; +#endif /* HAVE_X_WINDOWS */ + + } + + return p->pixel; +} + + +/* Look up pixel color PIXEL which is used on frame F in the color + table. If not already present, allocate it. Value is PIXEL. */ + +static unsigned long +lookup_pixel_color (f, pixel) + struct frame *f; + unsigned long pixel; +{ + int i = pixel % CT_SIZE; + struct ct_color *p; + + for (p = ct_table[i]; p; p = p->next) + if (p->pixel == pixel) + break; + + if (p == NULL) + { + XColor color; + Colormap cmap; + int rc; + +#ifdef HAVE_X_WINDOWS + cmap = FRAME_X_COLORMAP (f); + color.pixel = pixel; + x_query_color (f, &color); + rc = x_alloc_nearest_color (f, cmap, &color); +#else + BLOCK_INPUT; + cmap = DefaultColormapOfScreen (FRAME_X_SCREEN (f)); + color.pixel = pixel; + XQueryColor (NULL, cmap, &color); + rc = x_alloc_nearest_color (f, cmap, &color); + UNBLOCK_INPUT; +#endif /* HAVE_X_WINDOWS */ + + if (rc) + { + ++ct_colors_allocated; + + p = (struct ct_color *) xmalloc (sizeof *p); + p->r = color.red; + p->g = color.green; + p->b = color.blue; + p->pixel = pixel; + p->next = ct_table[i]; + ct_table[i] = p; + } + else + return FRAME_FOREGROUND_PIXEL (f); + } + return p->pixel; +} + + +/* Value is a vector of all pixel colors contained in the color table, + allocated via xmalloc. Set *N to the number of colors. */ + +static unsigned long * +colors_in_color_table (n) + int *n; +{ + int i, j; + struct ct_color *p; + unsigned long *colors; + + if (ct_colors_allocated == 0) + { + *n = 0; + colors = NULL; + } + else + { + colors = (unsigned long *) xmalloc (ct_colors_allocated + * sizeof *colors); + *n = ct_colors_allocated; + + for (i = j = 0; i < CT_SIZE; ++i) + for (p = ct_table[i]; p; p = p->next) + colors[j++] = p->pixel; + } + + return colors; +} + +#else /* COLOR_TABLE_SUPPORT */ + +static unsigned long +lookup_rgb_color (f, r, g, b) + struct frame *f; + int r, g, b; +{ + unsigned long pixel; + +#ifdef MAC_OS + pixel = RGB_TO_ULONG (r >> 8, g >> 8, b >> 8); + gamma_correct (f, &pixel); +#endif /* MAC_OS */ + +#ifdef HAVE_NTGUI + pixel = PALETTERGB (r >> 8, g >> 8, b >> 8); +#endif /* HAVE_NTGUI */ + + return pixel; +} + +static void +init_color_table () +{ +} +#endif /* COLOR_TABLE_SUPPORT */ + + +/*********************************************************************** + Algorithms + ***********************************************************************/ + +static XColor *x_to_xcolors P_ ((struct frame *, struct image *, int)); +static void x_from_xcolors P_ ((struct frame *, struct image *, XColor *)); +static void x_detect_edges P_ ((struct frame *, struct image *, int[9], int)); + +#ifdef HAVE_NTGUI +static void XPutPixel (XImagePtr , int, int, COLORREF); +#endif /* HAVE_NTGUI */ + +/* Non-zero means draw a cross on images having `:conversion + disabled'. */ + +int cross_disabled_images; + +/* Edge detection matrices for different edge-detection + strategies. */ + +static int emboss_matrix[9] = { + /* x - 1 x x + 1 */ + 2, -1, 0, /* y - 1 */ + -1, 0, 1, /* y */ + 0, 1, -2 /* y + 1 */ +}; + +static int laplace_matrix[9] = { + /* x - 1 x x + 1 */ + 1, 0, 0, /* y - 1 */ + 0, 0, 0, /* y */ + 0, 0, -1 /* y + 1 */ +}; + +/* Value is the intensity of the color whose red/green/blue values + are R, G, and B. */ + +#define COLOR_INTENSITY(R, G, B) ((2 * (R) + 3 * (G) + (B)) / 6) + + +/* On frame F, return an array of XColor structures describing image + IMG->pixmap. Each XColor structure has its pixel color set. RGB_P + non-zero means also fill the red/green/blue members of the XColor + structures. Value is a pointer to the array of XColors structures, + allocated with xmalloc; it must be freed by the caller. */ + +static XColor * +x_to_xcolors (f, img, rgb_p) + struct frame *f; + struct image *img; + int rgb_p; +{ + int x, y; + XColor *colors, *p; + XImagePtr_or_DC ximg; +#ifdef HAVE_NTGUI + HDC hdc; + HGDIOBJ prev; +#endif /* HAVE_NTGUI */ + + colors = (XColor *) xmalloc (img->width * img->height * sizeof *colors); + +#ifndef HAVE_NTGUI + /* Get the X image IMG->pixmap. */ + ximg = XGetImage (FRAME_X_DISPLAY (f), img->pixmap, + 0, 0, img->width, img->height, ~0, ZPixmap); +#else + /* Load the image into a memory device context. */ + hdc = get_frame_dc (f); + ximg = CreateCompatibleDC (hdc); + release_frame_dc (f, hdc); + prev = SelectObject (ximg, img->pixmap); +#endif /* HAVE_NTGUI */ + + /* Fill the `pixel' members of the XColor array. I wished there + were an easy and portable way to circumvent XGetPixel. */ + p = colors; + for (y = 0; y < img->height; ++y) + { + XColor *row = p; + +#ifdef HAVE_X_WINDOWS + for (x = 0; x < img->width; ++x, ++p) + p->pixel = XGetPixel (ximg, x, y); + if (rgb_p) + x_query_colors (f, row, img->width); + +#else + + for (x = 0; x < img->width; ++x, ++p) + { + /* W32_TODO: palette support needed here? */ + p->pixel = GET_PIXEL (ximg, x, y); + if (rgb_p) + { +#ifdef MAC_OS + p->red = RED16_FROM_ULONG (p->pixel); + p->green = GREEN16_FROM_ULONG (p->pixel); + p->blue = BLUE16_FROM_ULONG (p->pixel); +#endif /* MAC_OS */ +#ifdef HAVE_NTGUI + p->red = 256 * GetRValue (p->pixel); + p->green = 256 * GetGValue (p->pixel); + p->blue = 256 * GetBValue (p->pixel); +#endif /* HAVE_NTGUI */ + } + } +#endif /* HAVE_X_WINDOWS */ + } + + Destroy_Image (ximg, prev); + + return colors; +} + +#ifdef HAVE_NTGUI + +/* Put a pixel of COLOR at position X, Y in XIMG. XIMG must have been + created with CreateDIBSection, with the pointer to the bit values + stored in ximg->data. */ + +static void XPutPixel (ximg, x, y, color) + XImagePtr ximg; + int x, y; + COLORREF color; +{ + int width = ximg->info.bmiHeader.biWidth; + int height = ximg->info.bmiHeader.biHeight; + unsigned char * pixel; + + /* True color images. */ + if (ximg->info.bmiHeader.biBitCount == 24) + { + int rowbytes = width * 3; + /* Ensure scanlines are aligned on 4 byte boundaries. */ + if (rowbytes % 4) + rowbytes += 4 - (rowbytes % 4); + + pixel = ximg->data + y * rowbytes + x * 3; + /* Windows bitmaps are in BGR order. */ + *pixel = GetBValue (color); + *(pixel + 1) = GetGValue (color); + *(pixel + 2) = GetRValue (color); + } + /* Monochrome images. */ + else if (ximg->info.bmiHeader.biBitCount == 1) + { + int rowbytes = width / 8; + /* Ensure scanlines are aligned on 4 byte boundaries. */ + if (rowbytes % 4) + rowbytes += 4 - (rowbytes % 4); + pixel = ximg->data + y * rowbytes + x / 8; + /* Filter out palette info. */ + if (color & 0x00ffffff) + *pixel = *pixel | (1 << x % 8); + else + *pixel = *pixel & ~(1 << x % 8); + } + else + image_error ("XPutPixel: palette image not supported", Qnil, Qnil); +} + +#endif /* HAVE_NTGUI */ + +/* Create IMG->pixmap from an array COLORS of XColor structures, whose + RGB members are set. F is the frame on which this all happens. + COLORS will be freed; an existing IMG->pixmap will be freed, too. */ + +static void +x_from_xcolors (f, img, colors) + struct frame *f; + struct image *img; + XColor *colors; +{ + int x, y; + XImagePtr oimg; + Pixmap pixmap; + XColor *p; + + init_color_table (); + + x_create_x_image_and_pixmap (f, img->width, img->height, 0, + &oimg, &pixmap); + p = colors; + for (y = 0; y < img->height; ++y) + for (x = 0; x < img->width; ++x, ++p) + { + unsigned long pixel; + pixel = lookup_rgb_color (f, p->red, p->green, p->blue); + XPutPixel (oimg, x, y, pixel); + } + + xfree (colors); + x_clear_image_1 (f, img, 1, 0, 1); + + x_put_x_image (f, oimg, pixmap, img->width, img->height); + x_destroy_x_image (oimg); + img->pixmap = pixmap; +#ifdef COLOR_TABLE_SUPPORT + img->colors = colors_in_color_table (&img->ncolors); + free_color_table (); +#endif /* COLOR_TABLE_SUPPORT */ +} + + +/* On frame F, perform edge-detection on image IMG. + + MATRIX is a nine-element array specifying the transformation + matrix. See emboss_matrix for an example. + + COLOR_ADJUST is a color adjustment added to each pixel of the + outgoing image. */ + +static void +x_detect_edges (f, img, matrix, color_adjust) + struct frame *f; + struct image *img; + int matrix[9], color_adjust; +{ + XColor *colors = x_to_xcolors (f, img, 1); + XColor *new, *p; + int x, y, i, sum; + + for (i = sum = 0; i < 9; ++i) + sum += abs (matrix[i]); + +#define COLOR(A, X, Y) ((A) + (Y) * img->width + (X)) + + new = (XColor *) xmalloc (img->width * img->height * sizeof *new); + + for (y = 0; y < img->height; ++y) + { + p = COLOR (new, 0, y); + p->red = p->green = p->blue = 0xffff/2; + p = COLOR (new, img->width - 1, y); + p->red = p->green = p->blue = 0xffff/2; + } + + for (x = 1; x < img->width - 1; ++x) + { + p = COLOR (new, x, 0); + p->red = p->green = p->blue = 0xffff/2; + p = COLOR (new, x, img->height - 1); + p->red = p->green = p->blue = 0xffff/2; + } + + for (y = 1; y < img->height - 1; ++y) + { + p = COLOR (new, 1, y); + + for (x = 1; x < img->width - 1; ++x, ++p) + { + int r, g, b, y1, x1; + + r = g = b = i = 0; + for (y1 = y - 1; y1 < y + 2; ++y1) + for (x1 = x - 1; x1 < x + 2; ++x1, ++i) + if (matrix[i]) + { + XColor *t = COLOR (colors, x1, y1); + r += matrix[i] * t->red; + g += matrix[i] * t->green; + b += matrix[i] * t->blue; + } + + r = (r / sum + color_adjust) & 0xffff; + g = (g / sum + color_adjust) & 0xffff; + b = (b / sum + color_adjust) & 0xffff; + p->red = p->green = p->blue = COLOR_INTENSITY (r, g, b); + } + } + + xfree (colors); + x_from_xcolors (f, img, new); + +#undef COLOR +} + + +/* Perform the pre-defined `emboss' edge-detection on image IMG + on frame F. */ + +static void +x_emboss (f, img) + struct frame *f; + struct image *img; +{ + x_detect_edges (f, img, emboss_matrix, 0xffff / 2); +} + + +/* Transform image IMG which is used on frame F with a Laplace + edge-detection algorithm. The result is an image that can be used + to draw disabled buttons, for example. */ + +static void +x_laplace (f, img) + struct frame *f; + struct image *img; +{ + x_detect_edges (f, img, laplace_matrix, 45000); +} + + +/* Perform edge-detection on image IMG on frame F, with specified + transformation matrix MATRIX and color-adjustment COLOR_ADJUST. + + MATRIX must be either + + - a list of at least 9 numbers in row-major form + - a vector of at least 9 numbers + + COLOR_ADJUST nil means use a default; otherwise it must be a + number. */ + +static void +x_edge_detection (f, img, matrix, color_adjust) + struct frame *f; + struct image *img; + Lisp_Object matrix, color_adjust; +{ + int i = 0; + int trans[9]; + + if (CONSP (matrix)) + { + for (i = 0; + i < 9 && CONSP (matrix) && NUMBERP (XCAR (matrix)); + ++i, matrix = XCDR (matrix)) + trans[i] = XFLOATINT (XCAR (matrix)); + } + else if (VECTORP (matrix) && ASIZE (matrix) >= 9) + { + for (i = 0; i < 9 && NUMBERP (AREF (matrix, i)); ++i) + trans[i] = XFLOATINT (AREF (matrix, i)); + } + + if (NILP (color_adjust)) + color_adjust = make_number (0xffff / 2); + + if (i == 9 && NUMBERP (color_adjust)) + x_detect_edges (f, img, trans, (int) XFLOATINT (color_adjust)); +} + + +/* Transform image IMG on frame F so that it looks disabled. */ + +static void +x_disable_image (f, img) + struct frame *f; + struct image *img; +{ + Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); +#ifdef HAVE_NTGUI + int n_planes = dpyinfo->n_planes * dpyinfo->n_cbits; +#else + int n_planes = dpyinfo->n_planes; +#endif /* HAVE_NTGUI */ + + if (n_planes >= 2) + { + /* Color (or grayscale). Convert to gray, and equalize. Just + drawing such images with a stipple can look very odd, so + we're using this method instead. */ + XColor *colors = x_to_xcolors (f, img, 1); + XColor *p, *end; + const int h = 15000; + const int l = 30000; + + for (p = colors, end = colors + img->width * img->height; + p < end; + ++p) + { + int i = COLOR_INTENSITY (p->red, p->green, p->blue); + int i2 = (0xffff - h - l) * i / 0xffff + l; + p->red = p->green = p->blue = i2; + } + + x_from_xcolors (f, img, colors); + } + + /* Draw a cross over the disabled image, if we must or if we + should. */ + if (n_planes < 2 || cross_disabled_images) + { +#ifndef HAVE_NTGUI + Display *dpy = FRAME_X_DISPLAY (f); + GC gc; + +#ifdef MAC_OS +#define XCreateGC_pixmap(dpy, pixmap) XCreateGC (dpy, NULL, 0, NULL) +#define MaskForeground(f) PIX_MASK_DRAW (f) +#else +#define XCreateGC_pixmap(dpy, pixmap) XCreateGC (dpy, pixmap, 0, NULL) +#define MaskForeground(f) WHITE_PIX_DEFAULT (f) +#endif + + gc = XCreateGC_pixmap (dpy, img->pixmap); + XSetForeground (dpy, gc, BLACK_PIX_DEFAULT (f)); + XDrawLine (dpy, img->pixmap, gc, 0, 0, + img->width - 1, img->height - 1); + XDrawLine (dpy, img->pixmap, gc, 0, img->height - 1, + img->width - 1, 0); + XFreeGC (dpy, gc); + + if (img->mask) + { + gc = XCreateGC_pixmap (dpy, img->mask); + XSetForeground (dpy, gc, MaskForeground (f)); + XDrawLine (dpy, img->mask, gc, 0, 0, + img->width - 1, img->height - 1); + XDrawLine (dpy, img->mask, gc, 0, img->height - 1, + img->width - 1, 0); + XFreeGC (dpy, gc); + } +#else + HDC hdc, bmpdc; + HGDIOBJ prev; + + hdc = get_frame_dc (f); + bmpdc = CreateCompatibleDC (hdc); + release_frame_dc (f, hdc); + + prev = SelectObject (bmpdc, img->pixmap); + + SetTextColor (bmpdc, BLACK_PIX_DEFAULT (f)); + MoveToEx (bmpdc, 0, 0, NULL); + LineTo (bmpdc, img->width - 1, img->height - 1); + MoveToEx (bmpdc, 0, img->height - 1, NULL); + LineTo (bmpdc, img->width - 1, 0); + + if (img->mask) + { + SelectObject (bmpdc, img->mask); + SetTextColor (bmpdc, WHITE_PIX_DEFAULT (f)); + MoveToEx (bmpdc, 0, 0, NULL); + LineTo (bmpdc, img->width - 1, img->height - 1); + MoveToEx (bmpdc, 0, img->height - 1, NULL); + LineTo (bmpdc, img->width - 1, 0); + } + SelectObject (bmpdc, prev); + DeleteDC (bmpdc); +#endif /* HAVE_NTGUI */ + } +} + + +/* Build a mask for image IMG which is used on frame F. FILE is the + name of an image file, for error messages. HOW determines how to + determine the background color of IMG. If it is a list '(R G B)', + with R, G, and B being integers >= 0, take that as the color of the + background. Otherwise, determine the background color of IMG + heuristically. Value is non-zero if successful. */ + +static int +x_build_heuristic_mask (f, img, how) + struct frame *f; + struct image *img; + Lisp_Object how; +{ + XImagePtr_or_DC ximg; +#ifndef HAVE_NTGUI + XImagePtr mask_img; +#else + HDC frame_dc; + HGDIOBJ prev; + char *mask_img; + int row_width; +#endif /* HAVE_NTGUI */ + int x, y, rc, use_img_background; + unsigned long bg = 0; + + if (img->mask) + { + Free_Pixmap (FRAME_X_DISPLAY (f), img->mask); + img->mask = NO_PIXMAP; + img->background_transparent_valid = 0; + } + +#ifndef HAVE_NTGUI + /* Create an image and pixmap serving as mask. */ + rc = x_create_x_image_and_pixmap (f, img->width, img->height, 1, + &mask_img, &img->mask); + if (!rc) + return 0; + + /* Get the X image of IMG->pixmap. */ + ximg = XGetImage (FRAME_X_DISPLAY (f), img->pixmap, 0, 0, + img->width, img->height, + ~0, ZPixmap); +#else + /* Create the bit array serving as mask. */ + row_width = (img->width + 7) / 8; + mask_img = xmalloc (row_width * img->height); + bzero (mask_img, row_width * img->height); + + /* Create a memory device context for IMG->pixmap. */ + frame_dc = get_frame_dc (f); + ximg = CreateCompatibleDC (frame_dc); + release_frame_dc (f, frame_dc); + prev = SelectObject (ximg, img->pixmap); +#endif /* HAVE_NTGUI */ + + /* Determine the background color of ximg. If HOW is `(R G B)' + take that as color. Otherwise, use the image's background color. */ + use_img_background = 1; + + if (CONSP (how)) + { + int rgb[3], i; + + for (i = 0; i < 3 && CONSP (how) && NATNUMP (XCAR (how)); ++i) + { + rgb[i] = XFASTINT (XCAR (how)) & 0xffff; + how = XCDR (how); + } + + if (i == 3 && NILP (how)) + { + char color_name[30]; + sprintf (color_name, "#%04x%04x%04x", rgb[0], rgb[1], rgb[2]); + bg = ( +#ifdef HAVE_NTGUI + 0x00ffffff & /* Filter out palette info. */ +#endif /* HAVE_NTGUI */ + x_alloc_image_color (f, img, build_string (color_name), 0)); + use_img_background = 0; + } + } + + if (use_img_background) + bg = four_corners_best (ximg, img->width, img->height); + + /* Set all bits in mask_img to 1 whose color in ximg is different + from the background color bg. */ +#ifndef HAVE_NTGUI + for (y = 0; y < img->height; ++y) + for (x = 0; x < img->width; ++x) + XPutPixel (mask_img, x, y, (XGetPixel (ximg, x, y) != bg + ? PIX_MASK_DRAW (f) : PIX_MASK_RETAIN (f))); + + /* Fill in the background_transparent field while we have the mask handy. */ + image_background_transparent (img, f, mask_img); + + /* Put mask_img into img->mask. */ + x_put_x_image (f, mask_img, img->mask, img->width, img->height); + x_destroy_x_image (mask_img); + +#else + for (y = 0; y < img->height; ++y) + for (x = 0; x < img->width; ++x) + { + COLORREF p = GetPixel (ximg, x, y); + if (p != bg) + mask_img[y * row_width + x / 8] |= 1 << (x % 8); + } + + /* Create the mask image. */ + img->mask = w32_create_pixmap_from_bitmap_data (img->width, img->height, + mask_img); + /* Fill in the background_transparent field while we have the mask handy. */ + SelectObject (ximg, img->mask); + image_background_transparent (img, f, ximg); + + /* Was: x_destroy_x_image ((XImagePtr )mask_img); which seems bogus ++kfs */ + xfree (mask_img); +#endif /* HAVE_NTGUI */ + + Destroy_Image (ximg, prev); + + return 1; +} + + +/*********************************************************************** + PBM (mono, gray, color) + ***********************************************************************/ + +static int pbm_image_p P_ ((Lisp_Object object)); +static int pbm_load P_ ((struct frame *f, struct image *img)); +static int pbm_scan_number P_ ((unsigned char **, unsigned char *)); + +/* The symbol `pbm' identifying images of this type. */ + +Lisp_Object Qpbm; + +/* Indices of image specification fields in gs_format, below. */ + +enum pbm_keyword_index +{ + PBM_TYPE, + PBM_FILE, + PBM_DATA, + PBM_ASCENT, + PBM_MARGIN, + PBM_RELIEF, + PBM_ALGORITHM, + PBM_HEURISTIC_MASK, + PBM_MASK, + PBM_FOREGROUND, + PBM_BACKGROUND, + PBM_LAST +}; + +/* Vector of image_keyword structures describing the format + of valid user-defined image specifications. */ + +static struct image_keyword pbm_format[PBM_LAST] = +{ + {":type", IMAGE_SYMBOL_VALUE, 1}, + {":file", IMAGE_STRING_VALUE, 0}, + {":data", IMAGE_STRING_VALUE, 0}, + {":ascent", IMAGE_ASCENT_VALUE, 0}, + {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, + {":relief", IMAGE_INTEGER_VALUE, 0}, + {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":foreground", IMAGE_STRING_OR_NIL_VALUE, 0}, + {":background", IMAGE_STRING_OR_NIL_VALUE, 0} +}; + +/* Structure describing the image type `pbm'. */ + +static struct image_type pbm_type = +{ + &Qpbm, + pbm_image_p, + pbm_load, + x_clear_image, + NULL +}; + + +/* Return non-zero if OBJECT is a valid PBM image specification. */ + +static int +pbm_image_p (object) + Lisp_Object object; +{ + struct image_keyword fmt[PBM_LAST]; + + bcopy (pbm_format, fmt, sizeof fmt); + + if (!parse_image_spec (object, fmt, PBM_LAST, Qpbm)) + return 0; + + /* Must specify either :data or :file. */ + return fmt[PBM_DATA].count + fmt[PBM_FILE].count == 1; +} + + +/* Scan a decimal number from *S and return it. Advance *S while + reading the number. END is the end of the string. Value is -1 at + end of input. */ + +static int +pbm_scan_number (s, end) + unsigned char **s, *end; +{ + int c = 0, val = -1; + + while (*s < end) + { + /* Skip white-space. */ + while (*s < end && (c = *(*s)++, isspace (c))) + ; + + if (c == '#') + { + /* Skip comment to end of line. */ + while (*s < end && (c = *(*s)++, c != '\n')) + ; + } + else if (isdigit (c)) + { + /* Read decimal number. */ + val = c - '0'; + while (*s < end && (c = *(*s)++, isdigit (c))) + val = 10 * val + c - '0'; + break; + } + else + break; + } + + return val; +} + + +#ifdef HAVE_NTGUI +#if 0 /* Unused. ++kfs */ + +/* Read FILE into memory. Value is a pointer to a buffer allocated + with xmalloc holding FILE's contents. Value is null if an error + occurred. *SIZE is set to the size of the file. */ + +static char * +pbm_read_file (file, size) + Lisp_Object file; + int *size; +{ + FILE *fp = NULL; + char *buf = NULL; + struct stat st; + + if (stat (SDATA (file), &st) == 0 + && (fp = fopen (SDATA (file), "rb")) != NULL + && (buf = (char *) xmalloc (st.st_size), + fread (buf, 1, st.st_size, fp) == st.st_size)) + { + *size = st.st_size; + fclose (fp); + } + else + { + if (fp) + fclose (fp); + if (buf) + { + xfree (buf); + buf = NULL; + } + } + + return buf; +} +#endif +#endif /* HAVE_NTGUI */ + +/* Load PBM image IMG for use on frame F. */ + +static int +pbm_load (f, img) + struct frame *f; + struct image *img; +{ + int raw_p, x, y; + int width, height, max_color_idx = 0; + XImagePtr ximg; + Lisp_Object file, specified_file; + enum {PBM_MONO, PBM_GRAY, PBM_COLOR} type; + struct gcpro gcpro1; + unsigned char *contents = NULL; + unsigned char *end, *p; + int size; + + specified_file = image_spec_value (img->spec, QCfile, NULL); + file = Qnil; + GCPRO1 (file); + + if (STRINGP (specified_file)) + { + file = x_find_image_file (specified_file); + if (!STRINGP (file)) + { + image_error ("Cannot find image file `%s'", specified_file, Qnil); + UNGCPRO; + return 0; + } + + contents = slurp_file (SDATA (file), &size); + if (contents == NULL) + { + image_error ("Error reading `%s'", file, Qnil); + UNGCPRO; + return 0; + } + + p = contents; + end = contents + size; + } + else + { + Lisp_Object data; + data = image_spec_value (img->spec, QCdata, NULL); + p = SDATA (data); + end = p + SBYTES (data); + } + + /* Check magic number. */ + if (end - p < 2 || *p++ != 'P') + { + image_error ("Not a PBM image: `%s'", img->spec, Qnil); + error: + xfree (contents); + UNGCPRO; + return 0; + } + + switch (*p++) + { + case '1': + raw_p = 0, type = PBM_MONO; + break; + + case '2': + raw_p = 0, type = PBM_GRAY; + break; + + case '3': + raw_p = 0, type = PBM_COLOR; + break; + + case '4': + raw_p = 1, type = PBM_MONO; + break; + + case '5': + raw_p = 1, type = PBM_GRAY; + break; + + case '6': + raw_p = 1, type = PBM_COLOR; + break; + + default: + image_error ("Not a PBM image: `%s'", img->spec, Qnil); + goto error; + } + + /* Read width, height, maximum color-component. Characters + starting with `#' up to the end of a line are ignored. */ + width = pbm_scan_number (&p, end); + height = pbm_scan_number (&p, end); + + if (type != PBM_MONO) + { + max_color_idx = pbm_scan_number (&p, end); + if (raw_p && max_color_idx > 255) + max_color_idx = 255; + } + + if (width < 0 + || height < 0 + || (type != PBM_MONO && max_color_idx < 0)) + goto error; + + if (!x_create_x_image_and_pixmap (f, width, height, 0, + &ximg, &img->pixmap)) + goto error; + + /* Initialize the color hash table. */ + init_color_table (); + + if (type == PBM_MONO) + { + int c = 0, g; + struct image_keyword fmt[PBM_LAST]; + unsigned long fg = FRAME_FOREGROUND_PIXEL (f); + unsigned long bg = FRAME_BACKGROUND_PIXEL (f); + + /* Parse the image specification. */ + bcopy (pbm_format, fmt, sizeof fmt); + parse_image_spec (img->spec, fmt, PBM_LAST, Qpbm); + + /* Get foreground and background colors, maybe allocate colors. */ + if (fmt[PBM_FOREGROUND].count + && STRINGP (fmt[PBM_FOREGROUND].value)) + fg = x_alloc_image_color (f, img, fmt[PBM_FOREGROUND].value, fg); + if (fmt[PBM_BACKGROUND].count + && STRINGP (fmt[PBM_BACKGROUND].value)) + { + bg = x_alloc_image_color (f, img, fmt[PBM_BACKGROUND].value, bg); + img->background = bg; + img->background_valid = 1; + } + + for (y = 0; y < height; ++y) + for (x = 0; x < width; ++x) + { + if (raw_p) + { + if ((x & 7) == 0) + c = *p++; + g = c & 0x80; + c <<= 1; + } + else + g = pbm_scan_number (&p, end); + + XPutPixel (ximg, x, y, g ? fg : bg); + } + } + else + { + for (y = 0; y < height; ++y) + for (x = 0; x < width; ++x) + { + int r, g, b; + + if (type == PBM_GRAY) + r = g = b = raw_p ? *p++ : pbm_scan_number (&p, end); + else if (raw_p) + { + r = *p++; + g = *p++; + b = *p++; + } + else + { + r = pbm_scan_number (&p, end); + g = pbm_scan_number (&p, end); + b = pbm_scan_number (&p, end); + } + + if (r < 0 || g < 0 || b < 0) + { + x_destroy_x_image (ximg); + image_error ("Invalid pixel value in image `%s'", + img->spec, Qnil); + goto error; + } + + /* RGB values are now in the range 0..max_color_idx. + Scale this to the range 0..0xffff supported by X. */ + r = (double) r * 65535 / max_color_idx; + g = (double) g * 65535 / max_color_idx; + b = (double) b * 65535 / max_color_idx; + XPutPixel (ximg, x, y, lookup_rgb_color (f, r, g, b)); + } + } + +#ifdef COLOR_TABLE_SUPPORT + /* Store in IMG->colors the colors allocated for the image, and + free the color table. */ + img->colors = colors_in_color_table (&img->ncolors); + free_color_table (); +#endif /* COLOR_TABLE_SUPPORT */ + + img->width = width; + img->height = height; + + /* Maybe fill in the background field while we have ximg handy. */ + + if (NILP (image_spec_value (img->spec, QCbackground, NULL))) + IMAGE_BACKGROUND (img, f, ximg); + + /* Put the image into a pixmap. */ + x_put_x_image (f, ximg, img->pixmap, width, height); + x_destroy_x_image (ximg); + + /* X and W32 versions did it here, MAC version above. ++kfs + img->width = width; + img->height = height; */ + + UNGCPRO; + xfree (contents); + return 1; +} + + +/*********************************************************************** + PNG + ***********************************************************************/ + +#if defined (HAVE_PNG) || defined (MAC_OS) + +/* Function prototypes. */ + +static int png_image_p P_ ((Lisp_Object object)); +static int png_load P_ ((struct frame *f, struct image *img)); + +/* The symbol `png' identifying images of this type. */ + +Lisp_Object Qpng; + +/* Indices of image specification fields in png_format, below. */ + +enum png_keyword_index +{ + PNG_TYPE, + PNG_DATA, + PNG_FILE, + PNG_ASCENT, + PNG_MARGIN, + PNG_RELIEF, + PNG_ALGORITHM, + PNG_HEURISTIC_MASK, + PNG_MASK, + PNG_BACKGROUND, + PNG_LAST +}; + +/* Vector of image_keyword structures describing the format + of valid user-defined image specifications. */ + +static struct image_keyword png_format[PNG_LAST] = +{ + {":type", IMAGE_SYMBOL_VALUE, 1}, + {":data", IMAGE_STRING_VALUE, 0}, + {":file", IMAGE_STRING_VALUE, 0}, + {":ascent", IMAGE_ASCENT_VALUE, 0}, + {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, + {":relief", IMAGE_INTEGER_VALUE, 0}, + {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":background", IMAGE_STRING_OR_NIL_VALUE, 0} +}; + +/* Structure describing the image type `png'. */ + +static struct image_type png_type = +{ + &Qpng, + png_image_p, + png_load, + x_clear_image, + NULL +}; + +/* Return non-zero if OBJECT is a valid PNG image specification. */ + +static int +png_image_p (object) + Lisp_Object object; +{ + struct image_keyword fmt[PNG_LAST]; + bcopy (png_format, fmt, sizeof fmt); + + if (!parse_image_spec (object, fmt, PNG_LAST, Qpng)) + return 0; + + /* Must specify either the :data or :file keyword. */ + return fmt[PNG_FILE].count + fmt[PNG_DATA].count == 1; +} + +#endif /* HAVE_PNG || MAC_OS */ + + +#ifdef HAVE_PNG + +#if defined HAVE_LIBPNG_PNG_H +# include +#else +# include +#endif + +#ifdef HAVE_NTGUI +/* PNG library details. */ + +DEF_IMGLIB_FN (png_get_io_ptr); +DEF_IMGLIB_FN (png_check_sig); +DEF_IMGLIB_FN (png_create_read_struct); +DEF_IMGLIB_FN (png_create_info_struct); +DEF_IMGLIB_FN (png_destroy_read_struct); +DEF_IMGLIB_FN (png_set_read_fn); +DEF_IMGLIB_FN (png_init_io); +DEF_IMGLIB_FN (png_set_sig_bytes); +DEF_IMGLIB_FN (png_read_info); +DEF_IMGLIB_FN (png_get_IHDR); +DEF_IMGLIB_FN (png_get_valid); +DEF_IMGLIB_FN (png_set_strip_16); +DEF_IMGLIB_FN (png_set_expand); +DEF_IMGLIB_FN (png_set_gray_to_rgb); +DEF_IMGLIB_FN (png_set_background); +DEF_IMGLIB_FN (png_get_bKGD); +DEF_IMGLIB_FN (png_read_update_info); +DEF_IMGLIB_FN (png_get_channels); +DEF_IMGLIB_FN (png_get_rowbytes); +DEF_IMGLIB_FN (png_read_image); +DEF_IMGLIB_FN (png_read_end); +DEF_IMGLIB_FN (png_error); + +static int +init_png_functions (void) +{ + HMODULE library; + + /* Ensure zlib is loaded. Try debug version first. */ + if (!LoadLibrary ("zlibd.dll") + && !LoadLibrary ("zlib.dll")) + return 0; + + /* Try loading libpng under probable names. */ + if (!(library = LoadLibrary ("libpng13d.dll")) + && !(library = LoadLibrary ("libpng13.dll")) + && !(library = LoadLibrary ("libpng12d.dll")) + && !(library = LoadLibrary ("libpng12.dll")) + && !(library = LoadLibrary ("libpng.dll"))) + return 0; + + LOAD_IMGLIB_FN (library, png_get_io_ptr); + LOAD_IMGLIB_FN (library, png_check_sig); + LOAD_IMGLIB_FN (library, png_create_read_struct); + LOAD_IMGLIB_FN (library, png_create_info_struct); + LOAD_IMGLIB_FN (library, png_destroy_read_struct); + LOAD_IMGLIB_FN (library, png_set_read_fn); + LOAD_IMGLIB_FN (library, png_init_io); + LOAD_IMGLIB_FN (library, png_set_sig_bytes); + LOAD_IMGLIB_FN (library, png_read_info); + LOAD_IMGLIB_FN (library, png_get_IHDR); + LOAD_IMGLIB_FN (library, png_get_valid); + LOAD_IMGLIB_FN (library, png_set_strip_16); + LOAD_IMGLIB_FN (library, png_set_expand); + LOAD_IMGLIB_FN (library, png_set_gray_to_rgb); + LOAD_IMGLIB_FN (library, png_set_background); + LOAD_IMGLIB_FN (library, png_get_bKGD); + LOAD_IMGLIB_FN (library, png_read_update_info); + LOAD_IMGLIB_FN (library, png_get_channels); + LOAD_IMGLIB_FN (library, png_get_rowbytes); + LOAD_IMGLIB_FN (library, png_read_image); + LOAD_IMGLIB_FN (library, png_read_end); + LOAD_IMGLIB_FN (library, png_error); + return 1; +} +#else + +#define fn_png_get_io_ptr png_get_io_ptr +#define fn_png_check_sig png_check_sig +#define fn_png_create_read_struct png_create_read_struct +#define fn_png_create_info_struct png_create_info_struct +#define fn_png_destroy_read_struct png_destroy_read_struct +#define fn_png_set_read_fn png_set_read_fn +#define fn_png_init_io png_init_io +#define fn_png_set_sig_bytes png_set_sig_bytes +#define fn_png_read_info png_read_info +#define fn_png_get_IHDR png_get_IHDR +#define fn_png_get_valid png_get_valid +#define fn_png_set_strip_16 png_set_strip_16 +#define fn_png_set_expand png_set_expand +#define fn_png_set_gray_to_rgb png_set_gray_to_rgb +#define fn_png_set_background png_set_background +#define fn_png_get_bKGD png_get_bKGD +#define fn_png_read_update_info png_read_update_info +#define fn_png_get_channels png_get_channels +#define fn_png_get_rowbytes png_get_rowbytes +#define fn_png_read_image png_read_image +#define fn_png_read_end png_read_end +#define fn_png_error png_error + +#endif /* HAVE_NTGUI */ + +/* Error and warning handlers installed when the PNG library + is initialized. */ + +static void +my_png_error (png_ptr, msg) + png_struct *png_ptr; + char *msg; +{ + xassert (png_ptr != NULL); + image_error ("PNG error: %s", build_string (msg), Qnil); + longjmp (png_ptr->jmpbuf, 1); +} + + +static void +my_png_warning (png_ptr, msg) + png_struct *png_ptr; + char *msg; +{ + xassert (png_ptr != NULL); + image_error ("PNG warning: %s", build_string (msg), Qnil); +} + +/* Memory source for PNG decoding. */ + +struct png_memory_storage +{ + unsigned char *bytes; /* The data */ + size_t len; /* How big is it? */ + int index; /* Where are we? */ +}; + + +/* Function set as reader function when reading PNG image from memory. + PNG_PTR is a pointer to the PNG control structure. Copy LENGTH + bytes from the input to DATA. */ + +static void +png_read_from_memory (png_ptr, data, length) + png_structp png_ptr; + png_bytep data; + png_size_t length; +{ + struct png_memory_storage *tbr + = (struct png_memory_storage *) fn_png_get_io_ptr (png_ptr); + + if (length > tbr->len - tbr->index) + fn_png_error (png_ptr, "Read error"); + + bcopy (tbr->bytes + tbr->index, data, length); + tbr->index = tbr->index + length; +} + +/* Load PNG image IMG for use on frame F. Value is non-zero if + successful. */ + +static int +png_load (f, img) + struct frame *f; + struct image *img; +{ + Lisp_Object file, specified_file; + Lisp_Object specified_data; + int x, y, i; + XImagePtr ximg, mask_img = NULL; + struct gcpro gcpro1; + png_struct *png_ptr = NULL; + png_info *info_ptr = NULL, *end_info = NULL; + FILE *volatile fp = NULL; + png_byte sig[8]; + png_byte * volatile pixels = NULL; + png_byte ** volatile rows = NULL; + png_uint_32 width, height; + int bit_depth, color_type, interlace_type; + png_byte channels; + png_uint_32 row_bytes; + int transparent_p; + double screen_gamma; + struct png_memory_storage tbr; /* Data to be read */ + + /* Find out what file to load. */ + specified_file = image_spec_value (img->spec, QCfile, NULL); + specified_data = image_spec_value (img->spec, QCdata, NULL); + file = Qnil; + GCPRO1 (file); + + if (NILP (specified_data)) + { + file = x_find_image_file (specified_file); + if (!STRINGP (file)) + { + image_error ("Cannot find image file `%s'", specified_file, Qnil); + UNGCPRO; + return 0; + } + + /* Open the image file. */ + fp = fopen (SDATA (file), "rb"); + if (!fp) + { + image_error ("Cannot open image file `%s'", file, Qnil); + UNGCPRO; + fclose (fp); + return 0; + } + + /* Check PNG signature. */ + if (fread (sig, 1, sizeof sig, fp) != sizeof sig + || !fn_png_check_sig (sig, sizeof sig)) + { + image_error ("Not a PNG file: `%s'", file, Qnil); + UNGCPRO; + fclose (fp); + return 0; + } + } + else + { + /* Read from memory. */ + tbr.bytes = SDATA (specified_data); + tbr.len = SBYTES (specified_data); + tbr.index = 0; + + /* Check PNG signature. */ + if (tbr.len < sizeof sig + || !fn_png_check_sig (tbr.bytes, sizeof sig)) + { + image_error ("Not a PNG image: `%s'", img->spec, Qnil); + UNGCPRO; + return 0; + } + + /* Need to skip past the signature. */ + tbr.bytes += sizeof (sig); + } + + /* Initialize read and info structs for PNG lib. */ + png_ptr = fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, + my_png_error, my_png_warning); + if (!png_ptr) + { + if (fp) fclose (fp); + UNGCPRO; + return 0; + } + + info_ptr = fn_png_create_info_struct (png_ptr); + if (!info_ptr) + { + fn_png_destroy_read_struct (&png_ptr, NULL, NULL); + if (fp) fclose (fp); + UNGCPRO; + return 0; + } + + end_info = fn_png_create_info_struct (png_ptr); + if (!end_info) + { + fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL); + if (fp) fclose (fp); + UNGCPRO; + return 0; + } + + /* Set error jump-back. We come back here when the PNG library + detects an error. */ + if (setjmp (png_ptr->jmpbuf)) + { + error: + if (png_ptr) + fn_png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); + xfree (pixels); + xfree (rows); + if (fp) fclose (fp); + UNGCPRO; + return 0; + } + + /* Read image info. */ + if (!NILP (specified_data)) + fn_png_set_read_fn (png_ptr, (void *) &tbr, png_read_from_memory); + else + fn_png_init_io (png_ptr, fp); + + fn_png_set_sig_bytes (png_ptr, sizeof sig); + fn_png_read_info (png_ptr, info_ptr); + fn_png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, + &interlace_type, NULL, NULL); + + /* If image contains simply transparency data, we prefer to + construct a clipping mask. */ + if (fn_png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) + transparent_p = 1; + else + transparent_p = 0; + + /* This function is easier to write if we only have to handle + one data format: RGB or RGBA with 8 bits per channel. Let's + transform other formats into that format. */ + + /* Strip more than 8 bits per channel. */ + if (bit_depth == 16) + fn_png_set_strip_16 (png_ptr); + + /* Expand data to 24 bit RGB, or 8 bit grayscale, with alpha channel + if available. */ + fn_png_set_expand (png_ptr); + + /* Convert grayscale images to RGB. */ + if (color_type == PNG_COLOR_TYPE_GRAY + || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + fn_png_set_gray_to_rgb (png_ptr); + + screen_gamma = (f->gamma ? 1 / f->gamma / 0.45455 : 2.2); + +#if 0 /* Avoid double gamma correction for PNG images. */ + { /* Tell the PNG lib to handle gamma correction for us. */ + int intent; + double image_gamma; +#if defined(PNG_READ_sRGB_SUPPORTED) || defined(PNG_WRITE_sRGB_SUPPORTED) + if (png_get_sRGB (png_ptr, info_ptr, &intent)) + /* The libpng documentation says this is right in this case. */ + png_set_gamma (png_ptr, screen_gamma, 0.45455); + else +#endif + if (png_get_gAMA (png_ptr, info_ptr, &image_gamma)) + /* Image contains gamma information. */ + png_set_gamma (png_ptr, screen_gamma, image_gamma); + else + /* Use the standard default for the image gamma. */ + png_set_gamma (png_ptr, screen_gamma, 0.45455); + } +#endif /* if 0 */ + + /* Handle alpha channel by combining the image with a background + color. Do this only if a real alpha channel is supplied. For + simple transparency, we prefer a clipping mask. */ + if (!transparent_p) + { + png_color_16 *image_bg; + Lisp_Object specified_bg + = image_spec_value (img->spec, QCbackground, NULL); + + if (STRINGP (specified_bg)) + /* The user specified `:background', use that. */ + { + /* W32 version incorrectly used COLORREF here!! ++kfs */ + XColor color; + if (x_defined_color (f, SDATA (specified_bg), &color, 0)) + { + png_color_16 user_bg; + + bzero (&user_bg, sizeof user_bg); + user_bg.red = color.red >> PNG_BG_COLOR_SHIFT; + user_bg.green = color.green >> PNG_BG_COLOR_SHIFT; + user_bg.blue = color.blue >> PNG_BG_COLOR_SHIFT; + + fn_png_set_background (png_ptr, &user_bg, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); + } + } + else if (fn_png_get_bKGD (png_ptr, info_ptr, &image_bg)) + /* Image contains a background color with which to + combine the image. */ + fn_png_set_background (png_ptr, image_bg, + PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + else + { + /* Image does not contain a background color with which + to combine the image data via an alpha channel. Use + the frame's background instead. */ +#ifdef HAVE_X_WINDOWS + XColor color; + png_color_16 frame_background; + + color.pixel = FRAME_BACKGROUND_PIXEL (f); + x_query_color (f, &color); + + bzero (&frame_background, sizeof frame_background); + frame_background.red = color.red; + frame_background.green = color.green; + frame_background.blue = color.blue; +#endif /* HAVE_X_WINDOWS */ + +#ifdef HAVE_NTGUI + COLORREF color; + png_color_16 frame_background; + color = FRAME_BACKGROUND_PIXEL (f); +#if 0 /* W32 TODO : Colormap support. */ + x_query_color (f, &color); +#endif + bzero (&frame_background, sizeof frame_background); + frame_background.red = 256 * GetRValue (color); + frame_background.green = 256 * GetGValue (color); + frame_background.blue = 256 * GetBValue (color); +#endif /* HAVE_NTGUI */ + +#ifdef MAC_OS + unsigned long color; + png_color_16 frame_background; + color = FRAME_BACKGROUND_PIXEL (f); +#if 0 /* MAC/W32 TODO : Colormap support. */ + x_query_color (f, &color); +#endif + bzero (&frame_background, sizeof frame_background); + frame_background.red = RED_FROM_ULONG (color); + frame_background.green = GREEN_FROM_ULONG (color); + frame_background.blue = BLUE_FROM_ULONG (color); +#endif /* MAC_OS */ + + fn_png_set_background (png_ptr, &frame_background, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); + } + } + + /* Update info structure. */ + fn_png_read_update_info (png_ptr, info_ptr); + + /* Get number of channels. Valid values are 1 for grayscale images + and images with a palette, 2 for grayscale images with transparency + information (alpha channel), 3 for RGB images, and 4 for RGB + images with alpha channel, i.e. RGBA. If conversions above were + sufficient we should only have 3 or 4 channels here. */ + channels = fn_png_get_channels (png_ptr, info_ptr); + xassert (channels == 3 || channels == 4); + + /* Number of bytes needed for one row of the image. */ + row_bytes = fn_png_get_rowbytes (png_ptr, info_ptr); + + /* Allocate memory for the image. */ + pixels = (png_byte *) xmalloc (row_bytes * height * sizeof *pixels); + rows = (png_byte **) xmalloc (height * sizeof *rows); + for (i = 0; i < height; ++i) + rows[i] = pixels + i * row_bytes; + + /* Read the entire image. */ + fn_png_read_image (png_ptr, rows); + fn_png_read_end (png_ptr, info_ptr); + if (fp) + { + fclose (fp); + fp = NULL; + } + + /* Create the X image and pixmap. */ + if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, + &img->pixmap)) + goto error; + + /* Create an image and pixmap serving as mask if the PNG image + contains an alpha channel. */ + if (channels == 4 + && !transparent_p + && !x_create_x_image_and_pixmap (f, width, height, 1, + &mask_img, &img->mask)) + { + x_destroy_x_image (ximg); + Free_Pixmap (FRAME_X_DISPLAY (f), img->pixmap); + img->pixmap = NO_PIXMAP; + goto error; + } + + /* Fill the X image and mask from PNG data. */ + init_color_table (); + + for (y = 0; y < height; ++y) + { + png_byte *p = rows[y]; + + for (x = 0; x < width; ++x) + { + unsigned r, g, b; + + r = *p++ << 8; + g = *p++ << 8; + b = *p++ << 8; + XPutPixel (ximg, x, y, lookup_rgb_color (f, r, g, b)); + /* An alpha channel, aka mask channel, associates variable + transparency with an image. Where other image formats + support binary transparency---fully transparent or fully + opaque---PNG allows up to 254 levels of partial transparency. + The PNG library implements partial transparency by combining + the image with a specified background color. + + I'm not sure how to handle this here nicely: because the + background on which the image is displayed may change, for + real alpha channel support, it would be necessary to create + a new image for each possible background. + + What I'm doing now is that a mask is created if we have + boolean transparency information. Otherwise I'm using + the frame's background color to combine the image with. */ + + if (channels == 4) + { + if (mask_img) + XPutPixel (mask_img, x, y, *p > 0 ? PIX_MASK_DRAW (f) : PIX_MASK_RETAIN (f)); + ++p; + } + } + } + + if (NILP (image_spec_value (img->spec, QCbackground, NULL))) + /* Set IMG's background color from the PNG image, unless the user + overrode it. */ + { + png_color_16 *bg; + if (fn_png_get_bKGD (png_ptr, info_ptr, &bg)) + { + img->background = lookup_rgb_color (f, bg->red, bg->green, bg->blue); + img->background_valid = 1; + } + } + +#ifdef COLOR_TABLE_SUPPORT + /* Remember colors allocated for this image. */ + img->colors = colors_in_color_table (&img->ncolors); + free_color_table (); +#endif /* COLOR_TABLE_SUPPORT */ + + /* Clean up. */ + fn_png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); + xfree (rows); + xfree (pixels); + + img->width = width; + img->height = height; + + /* Maybe fill in the background field while we have ximg handy. */ + IMAGE_BACKGROUND (img, f, ximg); + + /* Put the image into the pixmap, then free the X image and its buffer. */ + x_put_x_image (f, ximg, img->pixmap, width, height); + x_destroy_x_image (ximg); + + /* Same for the mask. */ + if (mask_img) + { + /* Fill in the background_transparent field while we have the mask + handy. */ + image_background_transparent (img, f, mask_img); + + x_put_x_image (f, mask_img, img->mask, img->width, img->height); + x_destroy_x_image (mask_img); + } + + UNGCPRO; + return 1; +} + +#else /* HAVE_PNG */ + +#ifdef MAC_OS +static int +png_load (f, img) + struct frame *f; + struct image *img; +{ +#ifdef MAC_OSX + if (MyCGImageCreateWithPNGDataProvider) + return image_load_quartz2d (f, img, 1); + else +#endif + return image_load_quicktime (f, img, kQTFileTypePNG); +} +#endif /* MAC_OS */ + +#endif /* !HAVE_PNG */ + + + +/*********************************************************************** + JPEG + ***********************************************************************/ + +#if defined (HAVE_JPEG) || defined (MAC_OS) + +static int jpeg_image_p P_ ((Lisp_Object object)); +static int jpeg_load P_ ((struct frame *f, struct image *img)); + +/* The symbol `jpeg' identifying images of this type. */ + +Lisp_Object Qjpeg; + +/* Indices of image specification fields in gs_format, below. */ + +enum jpeg_keyword_index +{ + JPEG_TYPE, + JPEG_DATA, + JPEG_FILE, + JPEG_ASCENT, + JPEG_MARGIN, + JPEG_RELIEF, + JPEG_ALGORITHM, + JPEG_HEURISTIC_MASK, + JPEG_MASK, + JPEG_BACKGROUND, + JPEG_LAST +}; + +/* Vector of image_keyword structures describing the format + of valid user-defined image specifications. */ + +static struct image_keyword jpeg_format[JPEG_LAST] = +{ + {":type", IMAGE_SYMBOL_VALUE, 1}, + {":data", IMAGE_STRING_VALUE, 0}, + {":file", IMAGE_STRING_VALUE, 0}, + {":ascent", IMAGE_ASCENT_VALUE, 0}, + {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, + {":relief", IMAGE_INTEGER_VALUE, 0}, + {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":background", IMAGE_STRING_OR_NIL_VALUE, 0} +}; + +/* Structure describing the image type `jpeg'. */ + +static struct image_type jpeg_type = +{ + &Qjpeg, + jpeg_image_p, + jpeg_load, + x_clear_image, + NULL +}; + +/* Return non-zero if OBJECT is a valid JPEG image specification. */ + +static int +jpeg_image_p (object) + Lisp_Object object; +{ + struct image_keyword fmt[JPEG_LAST]; + + bcopy (jpeg_format, fmt, sizeof fmt); + + if (!parse_image_spec (object, fmt, JPEG_LAST, Qjpeg)) + return 0; + + /* Must specify either the :data or :file keyword. */ + return fmt[JPEG_FILE].count + fmt[JPEG_DATA].count == 1; +} + +#endif /* HAVE_JPEG || MAC_OS */ + +#ifdef HAVE_JPEG + +/* Work around a warning about HAVE_STDLIB_H being redefined in + jconfig.h. */ +#ifdef HAVE_STDLIB_H +#define HAVE_STDLIB_H_1 +#undef HAVE_STDLIB_H +#endif /* HAVE_STLIB_H */ + +#include +#include +#include + +#ifdef HAVE_STLIB_H_1 +#define HAVE_STDLIB_H 1 +#endif + +#ifdef HAVE_NTGUI + +/* JPEG library details. */ +DEF_IMGLIB_FN (jpeg_CreateDecompress); +DEF_IMGLIB_FN (jpeg_start_decompress); +DEF_IMGLIB_FN (jpeg_finish_decompress); +DEF_IMGLIB_FN (jpeg_destroy_decompress); +DEF_IMGLIB_FN (jpeg_read_header); +DEF_IMGLIB_FN (jpeg_read_scanlines); +DEF_IMGLIB_FN (jpeg_stdio_src); +DEF_IMGLIB_FN (jpeg_std_error); +DEF_IMGLIB_FN (jpeg_resync_to_restart); + +static int +init_jpeg_functions (void) +{ + HMODULE library; + + if (!(library = LoadLibrary ("libjpeg.dll")) + && !(library = LoadLibrary ("jpeg-62.dll")) + && !(library = LoadLibrary ("jpeg.dll"))) + return 0; + + LOAD_IMGLIB_FN (library, jpeg_finish_decompress); + LOAD_IMGLIB_FN (library, jpeg_read_scanlines); + LOAD_IMGLIB_FN (library, jpeg_start_decompress); + LOAD_IMGLIB_FN (library, jpeg_read_header); + LOAD_IMGLIB_FN (library, jpeg_stdio_src); + LOAD_IMGLIB_FN (library, jpeg_CreateDecompress); + LOAD_IMGLIB_FN (library, jpeg_destroy_decompress); + LOAD_IMGLIB_FN (library, jpeg_std_error); + LOAD_IMGLIB_FN (library, jpeg_resync_to_restart); + return 1; +} + +/* Wrapper since we can't directly assign the function pointer + to another function pointer that was declared more completely easily. */ +static boolean +jpeg_resync_to_restart_wrapper(cinfo, desired) + j_decompress_ptr cinfo; + int desired; +{ + return fn_jpeg_resync_to_restart (cinfo, desired); +} + +#else + +#define fn_jpeg_CreateDecompress(a,b,c) jpeg_create_decompress(a) +#define fn_jpeg_start_decompress jpeg_start_decompress +#define fn_jpeg_finish_decompress jpeg_finish_decompress +#define fn_jpeg_destroy_decompress jpeg_destroy_decompress +#define fn_jpeg_read_header jpeg_read_header +#define fn_jpeg_read_scanlines jpeg_read_scanlines +#define fn_jpeg_stdio_src jpeg_stdio_src +#define fn_jpeg_std_error jpeg_std_error +#define jpeg_resync_to_restart_wrapper jpeg_resync_to_restart + +#endif /* HAVE_NTGUI */ + +struct my_jpeg_error_mgr +{ + struct jpeg_error_mgr pub; + jmp_buf setjmp_buffer; +}; + + +static void +my_error_exit (cinfo) + j_common_ptr cinfo; +{ + struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; + longjmp (mgr->setjmp_buffer, 1); +} + + +/* Init source method for JPEG data source manager. Called by + jpeg_read_header() before any data is actually read. See + libjpeg.doc from the JPEG lib distribution. */ + +static void +our_init_source (cinfo) + j_decompress_ptr cinfo; +{ +} + + +/* Fill input buffer method for JPEG data source manager. Called + whenever more data is needed. We read the whole image in one step, + so this only adds a fake end of input marker at the end. */ + +static boolean +our_fill_input_buffer (cinfo) + j_decompress_ptr cinfo; +{ + /* Insert a fake EOI marker. */ + struct jpeg_source_mgr *src = cinfo->src; + static JOCTET buffer[2]; + + buffer[0] = (JOCTET) 0xFF; + buffer[1] = (JOCTET) JPEG_EOI; + + src->next_input_byte = buffer; + src->bytes_in_buffer = 2; + return TRUE; +} + + +/* Method to skip over NUM_BYTES bytes in the image data. CINFO->src + is the JPEG data source manager. */ + +static void +our_skip_input_data (cinfo, num_bytes) + j_decompress_ptr cinfo; + long num_bytes; +{ + struct jpeg_source_mgr *src = (struct jpeg_source_mgr *) cinfo->src; + + if (src) + { + if (num_bytes > src->bytes_in_buffer) + ERREXIT (cinfo, JERR_INPUT_EOF); + + src->bytes_in_buffer -= num_bytes; + src->next_input_byte += num_bytes; + } +} + + +/* Method to terminate data source. Called by + jpeg_finish_decompress() after all data has been processed. */ + +static void +our_term_source (cinfo) + j_decompress_ptr cinfo; +{ +} + + +/* Set up the JPEG lib for reading an image from DATA which contains + LEN bytes. CINFO is the decompression info structure created for + reading the image. */ + +static void +jpeg_memory_src (cinfo, data, len) + j_decompress_ptr cinfo; + JOCTET *data; + unsigned int len; +{ + struct jpeg_source_mgr *src; + + if (cinfo->src == NULL) + { + /* First time for this JPEG object? */ + cinfo->src = (struct jpeg_source_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + sizeof (struct jpeg_source_mgr)); + src = (struct jpeg_source_mgr *) cinfo->src; + src->next_input_byte = data; + } + + src = (struct jpeg_source_mgr *) cinfo->src; + src->init_source = our_init_source; + src->fill_input_buffer = our_fill_input_buffer; + src->skip_input_data = our_skip_input_data; + src->resync_to_restart = jpeg_resync_to_restart_wrapper; /* Use default method. */ + src->term_source = our_term_source; + src->bytes_in_buffer = len; + src->next_input_byte = data; +} + + +/* Load image IMG for use on frame F. Patterned after example.c + from the JPEG lib. */ + +static int +jpeg_load (f, img) + struct frame *f; + struct image *img; +{ + struct jpeg_decompress_struct cinfo; + struct my_jpeg_error_mgr mgr; + Lisp_Object file, specified_file; + Lisp_Object specified_data; + FILE * volatile fp = NULL; + JSAMPARRAY buffer; + int row_stride, x, y; + XImagePtr ximg = NULL; + int rc; + unsigned long *colors; + int width, height; + struct gcpro gcpro1; + + /* Open the JPEG file. */ + specified_file = image_spec_value (img->spec, QCfile, NULL); + specified_data = image_spec_value (img->spec, QCdata, NULL); + file = Qnil; + GCPRO1 (file); + + if (NILP (specified_data)) + { + file = x_find_image_file (specified_file); + if (!STRINGP (file)) + { + image_error ("Cannot find image file `%s'", specified_file, Qnil); + UNGCPRO; + return 0; + } + + fp = fopen (SDATA (file), "rb"); + if (fp == NULL) + { + image_error ("Cannot open `%s'", file, Qnil); + UNGCPRO; + return 0; + } + } + + /* Customize libjpeg's error handling to call my_error_exit when an + error is detected. This function will perform a longjmp. */ + cinfo.err = fn_jpeg_std_error (&mgr.pub); + mgr.pub.error_exit = my_error_exit; + + if ((rc = setjmp (mgr.setjmp_buffer)) != 0) + { + if (rc == 1) + { + /* Called from my_error_exit. Display a JPEG error. */ + char buffer[JMSG_LENGTH_MAX]; + cinfo.err->format_message ((j_common_ptr) &cinfo, buffer); + image_error ("Error reading JPEG image `%s': %s", img->spec, + build_string (buffer)); + } + + /* Close the input file and destroy the JPEG object. */ + if (fp) + fclose ((FILE *) fp); + fn_jpeg_destroy_decompress (&cinfo); + + /* If we already have an XImage, free that. */ + x_destroy_x_image (ximg); + + /* Free pixmap and colors. */ + x_clear_image (f, img); + + UNGCPRO; + return 0; + } + + /* Create the JPEG decompression object. Let it read from fp. + Read the JPEG image header. */ + fn_jpeg_CreateDecompress (&cinfo, JPEG_LIB_VERSION, sizeof (cinfo)); + + if (NILP (specified_data)) + fn_jpeg_stdio_src (&cinfo, (FILE *) fp); + else + jpeg_memory_src (&cinfo, SDATA (specified_data), + SBYTES (specified_data)); + + fn_jpeg_read_header (&cinfo, TRUE); + + /* Customize decompression so that color quantization will be used. + Start decompression. */ + cinfo.quantize_colors = TRUE; + fn_jpeg_start_decompress (&cinfo); + width = img->width = cinfo.output_width; + height = img->height = cinfo.output_height; + + /* Create X image and pixmap. */ + if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) + longjmp (mgr.setjmp_buffer, 2); + + /* Allocate colors. When color quantization is used, + cinfo.actual_number_of_colors has been set with the number of + colors generated, and cinfo.colormap is a two-dimensional array + of color indices in the range 0..cinfo.actual_number_of_colors. + No more than 255 colors will be generated. */ + { + int i, ir, ig, ib; + + if (cinfo.out_color_components > 2) + ir = 0, ig = 1, ib = 2; + else if (cinfo.out_color_components > 1) + ir = 0, ig = 1, ib = 0; + else + ir = 0, ig = 0, ib = 0; + + /* Use the color table mechanism because it handles colors that + cannot be allocated nicely. Such colors will be replaced with + a default color, and we don't have to care about which colors + can be freed safely, and which can't. */ + init_color_table (); + colors = (unsigned long *) alloca (cinfo.actual_number_of_colors + * sizeof *colors); + + for (i = 0; i < cinfo.actual_number_of_colors; ++i) + { + /* Multiply RGB values with 255 because X expects RGB values + in the range 0..0xffff. */ + int r = cinfo.colormap[ir][i] << 8; + int g = cinfo.colormap[ig][i] << 8; + int b = cinfo.colormap[ib][i] << 8; + colors[i] = lookup_rgb_color (f, r, g, b); + } + +#ifdef COLOR_TABLE_SUPPORT + /* Remember those colors actually allocated. */ + img->colors = colors_in_color_table (&img->ncolors); + free_color_table (); +#endif /* COLOR_TABLE_SUPPORT */ + } + + /* Read pixels. */ + row_stride = width * cinfo.output_components; + buffer = cinfo.mem->alloc_sarray ((j_common_ptr) &cinfo, JPOOL_IMAGE, + row_stride, 1); + for (y = 0; y < height; ++y) + { + fn_jpeg_read_scanlines (&cinfo, buffer, 1); + for (x = 0; x < cinfo.output_width; ++x) + XPutPixel (ximg, x, y, colors[buffer[0][x]]); + } + + /* Clean up. */ + fn_jpeg_finish_decompress (&cinfo); + fn_jpeg_destroy_decompress (&cinfo); + if (fp) + fclose ((FILE *) fp); + + /* Maybe fill in the background field while we have ximg handy. */ + if (NILP (image_spec_value (img->spec, QCbackground, NULL))) + IMAGE_BACKGROUND (img, f, ximg); + + /* Put the image into the pixmap. */ + x_put_x_image (f, ximg, img->pixmap, width, height); + x_destroy_x_image (ximg); + UNGCPRO; + return 1; +} + +#else /* HAVE_JPEG */ + +#ifdef MAC_OS +static int +jpeg_load (f, img) + struct frame *f; + struct image *img; +{ +#ifdef MAC_OSX + return image_load_quartz2d (f, img, 0); +#else + return image_load_quicktime (f, img, kQTFileTypeJPEG); +#endif +} +#endif /* MAC_OS */ + +#endif /* !HAVE_JPEG */ + + + +/*********************************************************************** + TIFF + ***********************************************************************/ + +#if defined (HAVE_TIFF) || defined (MAC_OS) + +static int tiff_image_p P_ ((Lisp_Object object)); +static int tiff_load P_ ((struct frame *f, struct image *img)); + +/* The symbol `tiff' identifying images of this type. */ + +Lisp_Object Qtiff; + +/* Indices of image specification fields in tiff_format, below. */ + +enum tiff_keyword_index +{ + TIFF_TYPE, + TIFF_DATA, + TIFF_FILE, + TIFF_ASCENT, + TIFF_MARGIN, + TIFF_RELIEF, + TIFF_ALGORITHM, + TIFF_HEURISTIC_MASK, + TIFF_MASK, + TIFF_BACKGROUND, + TIFF_LAST +}; + +/* Vector of image_keyword structures describing the format + of valid user-defined image specifications. */ + +static struct image_keyword tiff_format[TIFF_LAST] = +{ + {":type", IMAGE_SYMBOL_VALUE, 1}, + {":data", IMAGE_STRING_VALUE, 0}, + {":file", IMAGE_STRING_VALUE, 0}, + {":ascent", IMAGE_ASCENT_VALUE, 0}, + {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, + {":relief", IMAGE_INTEGER_VALUE, 0}, + {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":background", IMAGE_STRING_OR_NIL_VALUE, 0} +}; + +/* Structure describing the image type `tiff'. */ + +static struct image_type tiff_type = +{ + &Qtiff, + tiff_image_p, + tiff_load, + x_clear_image, + NULL +}; + +/* Return non-zero if OBJECT is a valid TIFF image specification. */ + +static int +tiff_image_p (object) + Lisp_Object object; +{ + struct image_keyword fmt[TIFF_LAST]; + bcopy (tiff_format, fmt, sizeof fmt); + + if (!parse_image_spec (object, fmt, TIFF_LAST, Qtiff)) + return 0; + + /* Must specify either the :data or :file keyword. */ + return fmt[TIFF_FILE].count + fmt[TIFF_DATA].count == 1; +} + +#endif /* HAVE_TIFF || MAC_OS */ + +#ifdef HAVE_TIFF + +#include + +#ifdef HAVE_NTGUI + +/* TIFF library details. */ +DEF_IMGLIB_FN (TIFFSetErrorHandler); +DEF_IMGLIB_FN (TIFFSetWarningHandler); +DEF_IMGLIB_FN (TIFFOpen); +DEF_IMGLIB_FN (TIFFClientOpen); +DEF_IMGLIB_FN (TIFFGetField); +DEF_IMGLIB_FN (TIFFReadRGBAImage); +DEF_IMGLIB_FN (TIFFClose); + +static int +init_tiff_functions (void) +{ + HMODULE library; + + if (!(library = LoadLibrary ("libtiff.dll"))) + return 0; + + LOAD_IMGLIB_FN (library, TIFFSetErrorHandler); + LOAD_IMGLIB_FN (library, TIFFSetWarningHandler); + LOAD_IMGLIB_FN (library, TIFFOpen); + LOAD_IMGLIB_FN (library, TIFFClientOpen); + LOAD_IMGLIB_FN (library, TIFFGetField); + LOAD_IMGLIB_FN (library, TIFFReadRGBAImage); + LOAD_IMGLIB_FN (library, TIFFClose); + return 1; +} + +#else + +#define fn_TIFFSetErrorHandler TIFFSetErrorHandler +#define fn_TIFFSetWarningHandler TIFFSetWarningHandler +#define fn_TIFFOpen TIFFOpen +#define fn_TIFFClientOpen TIFFClientOpen +#define fn_TIFFGetField TIFFGetField +#define fn_TIFFReadRGBAImage TIFFReadRGBAImage +#define fn_TIFFClose TIFFClose + +#endif /* HAVE_NTGUI */ + + +/* Reading from a memory buffer for TIFF images Based on the PNG + memory source, but we have to provide a lot of extra functions. + Blah. + + We really only need to implement read and seek, but I am not + convinced that the TIFF library is smart enough not to destroy + itself if we only hand it the function pointers we need to + override. */ + +typedef struct +{ + unsigned char *bytes; + size_t len; + int index; +} +tiff_memory_source; + +static size_t +tiff_read_from_memory (data, buf, size) + thandle_t data; + tdata_t buf; + tsize_t size; +{ + tiff_memory_source *src = (tiff_memory_source *) data; + + if (size > src->len - src->index) + return (size_t) -1; + bcopy (src->bytes + src->index, buf, size); + src->index += size; + return size; +} + +static size_t +tiff_write_from_memory (data, buf, size) + thandle_t data; + tdata_t buf; + tsize_t size; +{ + return (size_t) -1; +} + +static toff_t +tiff_seek_in_memory (data, off, whence) + thandle_t data; + toff_t off; + int whence; +{ + tiff_memory_source *src = (tiff_memory_source *) data; + int idx; + + switch (whence) + { + case SEEK_SET: /* Go from beginning of source. */ + idx = off; + break; + + case SEEK_END: /* Go from end of source. */ + idx = src->len + off; + break; + + case SEEK_CUR: /* Go from current position. */ + idx = src->index + off; + break; + + default: /* Invalid `whence'. */ + return -1; + } + + if (idx > src->len || idx < 0) + return -1; + + src->index = idx; + return src->index; +} + +static int +tiff_close_memory (data) + thandle_t data; +{ + /* NOOP */ + return 0; +} + +static int +tiff_mmap_memory (data, pbase, psize) + thandle_t data; + tdata_t *pbase; + toff_t *psize; +{ + /* It is already _IN_ memory. */ + return 0; +} + +static void +tiff_unmap_memory (data, base, size) + thandle_t data; + tdata_t base; + toff_t size; +{ + /* We don't need to do this. */ +} + +static toff_t +tiff_size_of_memory (data) + thandle_t data; +{ + return ((tiff_memory_source *) data)->len; +} + + +static void +tiff_error_handler (title, format, ap) + const char *title, *format; + va_list ap; +{ + char buf[512]; + int len; + + len = sprintf (buf, "TIFF error: %s ", title); + vsprintf (buf + len, format, ap); + add_to_log (buf, Qnil, Qnil); +} + + +static void +tiff_warning_handler (title, format, ap) + const char *title, *format; + va_list ap; +{ + char buf[512]; + int len; + + len = sprintf (buf, "TIFF warning: %s ", title); + vsprintf (buf + len, format, ap); + add_to_log (buf, Qnil, Qnil); +} + + +/* Load TIFF image IMG for use on frame F. Value is non-zero if + successful. */ + +static int +tiff_load (f, img) + struct frame *f; + struct image *img; +{ + Lisp_Object file, specified_file; + Lisp_Object specified_data; + TIFF *tiff; + int width, height, x, y; + uint32 *buf; + int rc; + XImagePtr ximg; + struct gcpro gcpro1; + tiff_memory_source memsrc; + + specified_file = image_spec_value (img->spec, QCfile, NULL); + specified_data = image_spec_value (img->spec, QCdata, NULL); + file = Qnil; + GCPRO1 (file); + + fn_TIFFSetErrorHandler (tiff_error_handler); + fn_TIFFSetWarningHandler (tiff_warning_handler); + + if (NILP (specified_data)) + { + /* Read from a file */ + file = x_find_image_file (specified_file); + if (!STRINGP (file)) + { + image_error ("Cannot find image file `%s'", specified_file, Qnil); + UNGCPRO; + return 0; + } + + /* Try to open the image file. */ + tiff = fn_TIFFOpen (SDATA (file), "r"); + if (tiff == NULL) + { + image_error ("Cannot open `%s'", file, Qnil); + UNGCPRO; + return 0; + } + } + else + { + /* Memory source! */ + memsrc.bytes = SDATA (specified_data); + memsrc.len = SBYTES (specified_data); + memsrc.index = 0; + + tiff = fn_TIFFClientOpen ("memory_source", "r", &memsrc, + (TIFFReadWriteProc) tiff_read_from_memory, + (TIFFReadWriteProc) tiff_write_from_memory, + tiff_seek_in_memory, + tiff_close_memory, + tiff_size_of_memory, + tiff_mmap_memory, + tiff_unmap_memory); + + if (!tiff) + { + image_error ("Cannot open memory source for `%s'", img->spec, Qnil); + UNGCPRO; + return 0; + } + } + + /* Get width and height of the image, and allocate a raster buffer + of width x height 32-bit values. */ + fn_TIFFGetField (tiff, TIFFTAG_IMAGEWIDTH, &width); + fn_TIFFGetField (tiff, TIFFTAG_IMAGELENGTH, &height); + buf = (uint32 *) xmalloc (width * height * sizeof *buf); + + rc = fn_TIFFReadRGBAImage (tiff, width, height, buf, 0); + fn_TIFFClose (tiff); + if (!rc) + { + image_error ("Error reading TIFF image `%s'", img->spec, Qnil); + xfree (buf); + UNGCPRO; + return 0; + } + + /* Create the X image and pixmap. */ + if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) + { + xfree (buf); + UNGCPRO; + return 0; + } + + /* Initialize the color table. */ + init_color_table (); + + /* Process the pixel raster. Origin is in the lower-left corner. */ + for (y = 0; y < height; ++y) + { + uint32 *row = buf + y * width; + + for (x = 0; x < width; ++x) + { + uint32 abgr = row[x]; + int r = TIFFGetR (abgr) << 8; + int g = TIFFGetG (abgr) << 8; + int b = TIFFGetB (abgr) << 8; + XPutPixel (ximg, x, height - 1 - y, lookup_rgb_color (f, r, g, b)); + } + } + +#ifdef COLOR_TABLE_SUPPORT + /* Remember the colors allocated for the image. Free the color table. */ + img->colors = colors_in_color_table (&img->ncolors); + free_color_table (); +#endif /* COLOR_TABLE_SUPPORT */ + + img->width = width; + img->height = height; + + /* Maybe fill in the background field while we have ximg handy. */ + if (NILP (image_spec_value (img->spec, QCbackground, NULL))) + IMAGE_BACKGROUND (img, f, ximg); + + /* Put the image into the pixmap, then free the X image and its buffer. */ + x_put_x_image (f, ximg, img->pixmap, width, height); + x_destroy_x_image (ximg); + xfree (buf); + + UNGCPRO; + return 1; +} + +#else /* HAVE_TIFF */ + +#ifdef MAC_OS +static int +tiff_load (f, img) + struct frame *f; + struct image *img; +{ + return image_load_quicktime (f, img, kQTFileTypeTIFF); +} +#endif /* MAC_OS */ + +#endif /* !HAVE_TIFF */ + + + +/*********************************************************************** + GIF + ***********************************************************************/ + +#if defined (HAVE_GIF) || defined (MAC_OS) + +static int gif_image_p P_ ((Lisp_Object object)); +static int gif_load P_ ((struct frame *f, struct image *img)); + +/* The symbol `gif' identifying images of this type. */ + +Lisp_Object Qgif; + +/* Indices of image specification fields in gif_format, below. */ + +enum gif_keyword_index +{ + GIF_TYPE, + GIF_DATA, + GIF_FILE, + GIF_ASCENT, + GIF_MARGIN, + GIF_RELIEF, + GIF_ALGORITHM, + GIF_HEURISTIC_MASK, + GIF_MASK, + GIF_IMAGE, + GIF_BACKGROUND, + GIF_LAST +}; + +/* Vector of image_keyword structures describing the format + of valid user-defined image specifications. */ + +static struct image_keyword gif_format[GIF_LAST] = +{ + {":type", IMAGE_SYMBOL_VALUE, 1}, + {":data", IMAGE_STRING_VALUE, 0}, + {":file", IMAGE_STRING_VALUE, 0}, + {":ascent", IMAGE_ASCENT_VALUE, 0}, + {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, + {":relief", IMAGE_INTEGER_VALUE, 0}, + {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":image", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, + {":background", IMAGE_STRING_OR_NIL_VALUE, 0} +}; + +/* Structure describing the image type `gif'. */ + +static struct image_type gif_type = +{ + &Qgif, + gif_image_p, + gif_load, + x_clear_image, + NULL +}; + +/* Return non-zero if OBJECT is a valid GIF image specification. */ + +static int +gif_image_p (object) + Lisp_Object object; +{ + struct image_keyword fmt[GIF_LAST]; + bcopy (gif_format, fmt, sizeof fmt); + + if (!parse_image_spec (object, fmt, GIF_LAST, Qgif)) + return 0; + + /* Must specify either the :data or :file keyword. */ + return fmt[GIF_FILE].count + fmt[GIF_DATA].count == 1; +} + +#endif /* HAVE_GIF || MAC_OS */ + +#ifdef HAVE_GIF + +#if defined (HAVE_NTGUI) || defined (MAC_OS) +/* avoid conflict with QuickdrawText.h */ +#define DrawText gif_DrawText +#include +#undef DrawText + +#else /* HAVE_NTGUI || MAC_OS */ + +#include + +#endif /* HAVE_NTGUI || MAC_OS */ + + +#ifdef HAVE_NTGUI + +/* GIF library details. */ +DEF_IMGLIB_FN (DGifCloseFile); +DEF_IMGLIB_FN (DGifSlurp); +DEF_IMGLIB_FN (DGifOpen); +DEF_IMGLIB_FN (DGifOpenFileName); + +static int +init_gif_functions (void) +{ + HMODULE library; + + if (!(library = LoadLibrary ("libungif.dll"))) + return 0; + + LOAD_IMGLIB_FN (library, DGifCloseFile); + LOAD_IMGLIB_FN (library, DGifSlurp); + LOAD_IMGLIB_FN (library, DGifOpen); + LOAD_IMGLIB_FN (library, DGifOpenFileName); + return 1; +} + +#else + +#define fn_DGifCloseFile DGifCloseFile +#define fn_DGifSlurp DGifSlurp +#define fn_DGifOpen DGifOpen +#define fn_DGifOpenFileName DGifOpenFileName + +#endif /* HAVE_NTGUI */ + +/* Reading a GIF image from memory + Based on the PNG memory stuff to a certain extent. */ + +typedef struct +{ + unsigned char *bytes; + size_t len; + int index; +} +gif_memory_source; + +/* Make the current memory source available to gif_read_from_memory. + It's done this way because not all versions of libungif support + a UserData field in the GifFileType structure. */ +static gif_memory_source *current_gif_memory_src; + +static int +gif_read_from_memory (file, buf, len) + GifFileType *file; + GifByteType *buf; + int len; +{ + gif_memory_source *src = current_gif_memory_src; + + if (len > src->len - src->index) + return -1; + + bcopy (src->bytes + src->index, buf, len); + src->index += len; + return len; +} + + +/* Load GIF image IMG for use on frame F. Value is non-zero if + successful. */ + +static int +gif_load (f, img) + struct frame *f; + struct image *img; +{ + Lisp_Object file, specified_file; + Lisp_Object specified_data; + int rc, width, height, x, y, i; + XImagePtr ximg; + ColorMapObject *gif_color_map; + unsigned long pixel_colors[256]; + GifFileType *gif; + struct gcpro gcpro1; + Lisp_Object image; + int ino, image_left, image_top, image_width, image_height; + gif_memory_source memsrc; + unsigned char *raster; + + specified_file = image_spec_value (img->spec, QCfile, NULL); + specified_data = image_spec_value (img->spec, QCdata, NULL); + file = Qnil; + GCPRO1 (file); + + if (NILP (specified_data)) + { + file = x_find_image_file (specified_file); + if (!STRINGP (file)) + { + image_error ("Cannot find image file `%s'", specified_file, Qnil); + UNGCPRO; + return 0; + } + + /* Open the GIF file. */ + gif = fn_DGifOpenFileName (SDATA (file)); + if (gif == NULL) + { + image_error ("Cannot open `%s'", file, Qnil); + UNGCPRO; + return 0; + } + } + else + { + /* Read from memory! */ + current_gif_memory_src = &memsrc; + memsrc.bytes = SDATA (specified_data); + memsrc.len = SBYTES (specified_data); + memsrc.index = 0; + + gif = fn_DGifOpen(&memsrc, gif_read_from_memory); + if (!gif) + { + image_error ("Cannot open memory source `%s'", img->spec, Qnil); + UNGCPRO; + return 0; + } + } + + /* Read entire contents. */ + rc = fn_DGifSlurp (gif); + if (rc == GIF_ERROR) + { + image_error ("Error reading `%s'", img->spec, Qnil); + fn_DGifCloseFile (gif); + UNGCPRO; + return 0; + } + + image = image_spec_value (img->spec, QCindex, NULL); + ino = INTEGERP (image) ? XFASTINT (image) : 0; + if (ino >= gif->ImageCount) + { + image_error ("Invalid image number `%s' in image `%s'", + image, img->spec); + fn_DGifCloseFile (gif); + UNGCPRO; + return 0; + } + + width = img->width = max (gif->SWidth, gif->Image.Left + gif->Image.Width); + height = img->height = max (gif->SHeight, gif->Image.Top + gif->Image.Height); + + /* Create the X image and pixmap. */ + if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) + { + fn_DGifCloseFile (gif); + UNGCPRO; + return 0; + } + + /* Allocate colors. */ + gif_color_map = gif->SavedImages[ino].ImageDesc.ColorMap; + if (!gif_color_map) + gif_color_map = gif->SColorMap; + init_color_table (); + bzero (pixel_colors, sizeof pixel_colors); + + for (i = 0; i < gif_color_map->ColorCount; ++i) + { + int r = gif_color_map->Colors[i].Red << 8; + int g = gif_color_map->Colors[i].Green << 8; + int b = gif_color_map->Colors[i].Blue << 8; + pixel_colors[i] = lookup_rgb_color (f, r, g, b); + } + +#ifdef COLOR_TABLE_SUPPORT + img->colors = colors_in_color_table (&img->ncolors); + free_color_table (); +#endif /* COLOR_TABLE_SUPPORT */ + + /* Clear the part of the screen image that are not covered by + the image from the GIF file. Full animated GIF support + requires more than can be done here (see the gif89 spec, + disposal methods). Let's simply assume that the part + not covered by a sub-image is in the frame's background color. */ + image_top = gif->SavedImages[ino].ImageDesc.Top; + image_left = gif->SavedImages[ino].ImageDesc.Left; + image_width = gif->SavedImages[ino].ImageDesc.Width; + image_height = gif->SavedImages[ino].ImageDesc.Height; + + for (y = 0; y < image_top; ++y) + for (x = 0; x < width; ++x) + XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); + + for (y = image_top + image_height; y < height; ++y) + for (x = 0; x < width; ++x) + XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); + + for (y = image_top; y < image_top + image_height; ++y) + { + for (x = 0; x < image_left; ++x) + XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); + for (x = image_left + image_width; x < width; ++x) + XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); + } + + /* Read the GIF image into the X image. We use a local variable + `raster' here because RasterBits below is a char *, and invites + problems with bytes >= 0x80. */ + raster = (unsigned char *) gif->SavedImages[ino].RasterBits; + + if (gif->SavedImages[ino].ImageDesc.Interlace) + { + static int interlace_start[] = {0, 4, 2, 1}; + static int interlace_increment[] = {8, 8, 4, 2}; + int pass; + int row = interlace_start[0]; + + pass = 0; + + for (y = 0; y < image_height; y++) + { + if (row >= image_height) + { + row = interlace_start[++pass]; + while (row >= image_height) + row = interlace_start[++pass]; + } + + for (x = 0; x < image_width; x++) + { + int i = raster[(y * image_width) + x]; + XPutPixel (ximg, x + image_left, row + image_top, + pixel_colors[i]); + } + + row += interlace_increment[pass]; + } + } + else + { + for (y = 0; y < image_height; ++y) + for (x = 0; x < image_width; ++x) + { + int i = raster[y * image_width + x]; + XPutPixel (ximg, x + image_left, y + image_top, pixel_colors[i]); + } + } + + fn_DGifCloseFile (gif); + + /* Maybe fill in the background field while we have ximg handy. */ + if (NILP (image_spec_value (img->spec, QCbackground, NULL))) + IMAGE_BACKGROUND (img, f, ximg); + + /* Put the image into the pixmap, then free the X image and its buffer. */ + x_put_x_image (f, ximg, img->pixmap, width, height); + x_destroy_x_image (ximg); + + UNGCPRO; + return 1; +} + +#else + +#ifdef MAC_OS +static int +gif_load (f, img) + struct frame *f; + struct image *img; +{ + Lisp_Object specified_file, file; + Lisp_Object specified_data; + OSErr err; + Boolean graphic_p, movie_p, prefer_graphic_p; + Handle dh = NULL; + Movie movie = NULL; + Lisp_Object image; + Track track = NULL; + Media media = NULL; + long nsamples; + Rect rect; + Lisp_Object specified_bg; + XColor color; + RGBColor bg_color; + int width, height; + XImagePtr ximg; + TimeValue time; + struct gcpro gcpro1; + int ino; + + specified_file = image_spec_value (img->spec, QCfile, NULL); + specified_data = image_spec_value (img->spec, QCdata, NULL); + + if (NILP (specified_data)) + { + /* Read from a file */ + FSSpec fss; + short refnum; + + err = find_image_fsspec (specified_file, &file, &fss); + if (err != noErr) + { + if (err == fnfErr) + image_error ("Cannot find image file `%s'", specified_file, Qnil); + else + goto open_error; + } + + err = CanQuickTimeOpenFile (&fss, kQTFileTypeGIF, 0, + &graphic_p, &movie_p, &prefer_graphic_p, 0); + if (err != noErr) + goto open_error; + + if (!graphic_p && !movie_p) + goto open_error; + if (prefer_graphic_p) + return image_load_qt_1 (f, img, kQTFileTypeGIF, &fss, NULL); + err = OpenMovieFile (&fss, &refnum, fsRdPerm); + if (err != noErr) + goto open_error; + err = NewMovieFromFile (&movie, refnum, NULL, NULL, 0, NULL); + CloseMovieFile (refnum); + if (err != noErr) + { + image_error ("Error reading `%s'", file, Qnil); + return 0; + } + } + else + { + /* Memory source! */ + Handle dref = NULL; + long file_type_atom[3]; + + err = PtrToHand (SDATA (specified_data), &dh, SBYTES (specified_data)); + if (err != noErr) + { + image_error ("Cannot allocate data handle for `%s'", + img->spec, Qnil); + goto error; + } + + file_type_atom[0] = EndianU32_NtoB (sizeof (long) * 3); + file_type_atom[1] = EndianU32_NtoB (kDataRefExtensionMacOSFileType); + file_type_atom[2] = EndianU32_NtoB (kQTFileTypeGIF); + err = PtrToHand (&dh, &dref, sizeof (Handle)); + if (err == noErr) + /* no file name */ + err = PtrAndHand ("\p", dref, 1); + if (err == noErr) + err = PtrAndHand (file_type_atom, dref, sizeof (long) * 3); + if (err != noErr) + { + image_error ("Cannot allocate handle data ref for `%s'", img->spec, Qnil); + goto error; + } + err = CanQuickTimeOpenDataRef (dref, HandleDataHandlerSubType, &graphic_p, + &movie_p, &prefer_graphic_p, 0); + if (err != noErr) + goto open_error; + + if (!graphic_p && !movie_p) + goto open_error; + if (prefer_graphic_p) + { + int success_p; + + DisposeHandle (dref); + success_p = image_load_qt_1 (f, img, kQTFileTypeGIF, NULL, dh); + DisposeHandle (dh); + return success_p; + } + err = NewMovieFromDataRef (&movie, 0, NULL, dref, + HandleDataHandlerSubType); + DisposeHandle (dref); + if (err != noErr) + goto open_error; + } + + image = image_spec_value (img->spec, QCindex, NULL); + ino = INTEGERP (image) ? XFASTINT (image) : 0; + track = GetMovieIndTrack (movie, 1); + media = GetTrackMedia (track); + nsamples = GetMediaSampleCount (media); + if (ino >= nsamples) + { + image_error ("Invalid image number `%s' in image `%s'", + image, img->spec); + goto error; + } + + specified_bg = image_spec_value (img->spec, QCbackground, NULL); + if (!STRINGP (specified_bg) || + !mac_defined_color (f, SDATA (specified_bg), &color, 0)) + { + color.pixel = FRAME_BACKGROUND_PIXEL (f); + color.red = RED16_FROM_ULONG (color.pixel); + color.green = GREEN16_FROM_ULONG (color.pixel); + color.blue = BLUE16_FROM_ULONG (color.pixel); + } + GetMovieBox (movie, &rect); + width = img->width = rect.right - rect.left; + height = img->height = rect.bottom - rect.top; + if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) + goto error; + + SetGWorld (ximg, NULL); + bg_color.red = color.red; + bg_color.green = color.green; + bg_color.blue = color.blue; + RGBBackColor (&bg_color); + SetMovieActive (movie, TRUE); + SetMovieGWorld (movie, ximg, NULL); + SampleNumToMediaTime (media, ino + 1, &time, NULL); + SetMovieTimeValue (movie, time); + MoviesTask (movie, 0L); + DisposeTrackMedia (media); + DisposeMovieTrack (track); + DisposeMovie (movie); + if (dh) + DisposeHandle (dh); + /* Maybe fill in the background field while we have ximg handy. */ + if (NILP (image_spec_value (img->spec, QCbackground, NULL))) + IMAGE_BACKGROUND (img, f, ximg); + + /* Put the image into the pixmap. */ + x_put_x_image (f, ximg, img->pixmap, width, height); + x_destroy_x_image (ximg); + return 1; + + open_error: + image_error ("Cannot open `%s'", file, Qnil); + error: + if (media) + DisposeTrackMedia (media); + if (track) + DisposeMovieTrack (track); + if (movie) + DisposeMovie (movie); + if (dh) + DisposeHandle (dh); + return 0; +} +#endif /* MAC_OS */ + +#endif /* HAVE_GIF */ + + + +/*********************************************************************** + Ghostscript + ***********************************************************************/ + +#ifdef HAVE_X_WINDOWS +#define HAVE_GHOSTSCRIPT 1 +#endif /* HAVE_X_WINDOWS */ + +/* The symbol `postscript' identifying images of this type. */ + +Lisp_Object Qpostscript; + +#ifdef HAVE_GHOSTSCRIPT + +static int gs_image_p P_ ((Lisp_Object object)); +static int gs_load P_ ((struct frame *f, struct image *img)); +static void gs_clear_image P_ ((struct frame *f, struct image *img)); + +/* Keyword symbols. */ + +Lisp_Object QCloader, QCbounding_box, QCpt_width, QCpt_height; + +/* Indices of image specification fields in gs_format, below. */ + +enum gs_keyword_index +{ + GS_TYPE, + GS_PT_WIDTH, + GS_PT_HEIGHT, + GS_FILE, + GS_LOADER, + GS_BOUNDING_BOX, + GS_ASCENT, + GS_MARGIN, + GS_RELIEF, + GS_ALGORITHM, + GS_HEURISTIC_MASK, + GS_MASK, + GS_BACKGROUND, + GS_LAST +}; + +/* Vector of image_keyword structures describing the format + of valid user-defined image specifications. */ + +static struct image_keyword gs_format[GS_LAST] = +{ + {":type", IMAGE_SYMBOL_VALUE, 1}, + {":pt-width", IMAGE_POSITIVE_INTEGER_VALUE, 1}, + {":pt-height", IMAGE_POSITIVE_INTEGER_VALUE, 1}, + {":file", IMAGE_STRING_VALUE, 1}, + {":loader", IMAGE_FUNCTION_VALUE, 0}, + {":bounding-box", IMAGE_DONT_CHECK_VALUE_TYPE, 1}, + {":ascent", IMAGE_ASCENT_VALUE, 0}, + {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, + {":relief", IMAGE_INTEGER_VALUE, 0}, + {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, + {":background", IMAGE_STRING_OR_NIL_VALUE, 0} +}; + +/* Structure describing the image type `ghostscript'. */ + +static struct image_type gs_type = +{ + &Qpostscript, + gs_image_p, + gs_load, + gs_clear_image, + NULL +}; + + +/* Free X resources of Ghostscript image IMG which is used on frame F. */ + +static void +gs_clear_image (f, img) + struct frame *f; + struct image *img; +{ + /* IMG->data.ptr_val may contain a recorded colormap. */ + xfree (img->data.ptr_val); + x_clear_image (f, img); +} + + +/* Return non-zero if OBJECT is a valid Ghostscript image + specification. */ + +static int +gs_image_p (object) + Lisp_Object object; +{ + struct image_keyword fmt[GS_LAST]; + Lisp_Object tem; + int i; + + bcopy (gs_format, fmt, sizeof fmt); + + if (!parse_image_spec (object, fmt, GS_LAST, Qpostscript)) + return 0; + + /* Bounding box must be a list or vector containing 4 integers. */ + tem = fmt[GS_BOUNDING_BOX].value; + if (CONSP (tem)) + { + for (i = 0; i < 4; ++i, tem = XCDR (tem)) + if (!CONSP (tem) || !INTEGERP (XCAR (tem))) + return 0; + if (!NILP (tem)) + return 0; + } + else if (VECTORP (tem)) + { + if (XVECTOR (tem)->size != 4) + return 0; + for (i = 0; i < 4; ++i) + if (!INTEGERP (XVECTOR (tem)->contents[i])) + return 0; + } + else + return 0; + + return 1; +} + + +/* Load Ghostscript image IMG for use on frame F. Value is non-zero + if successful. */ + +static int +gs_load (f, img) + struct frame *f; + struct image *img; +{ + char buffer[100]; + Lisp_Object window_and_pixmap_id = Qnil, loader, pt_height, pt_width; + struct gcpro gcpro1, gcpro2; + Lisp_Object frame; + double in_width, in_height; + Lisp_Object pixel_colors = Qnil; + + /* Compute pixel size of pixmap needed from the given size in the + image specification. Sizes in the specification are in pt. 1 pt + = 1/72 in, xdpi and ydpi are stored in the frame's X display + info. */ + pt_width = image_spec_value (img->spec, QCpt_width, NULL); + in_width = XFASTINT (pt_width) / 72.0; + img->width = in_width * FRAME_X_DISPLAY_INFO (f)->resx; + pt_height = image_spec_value (img->spec, QCpt_height, NULL); + in_height = XFASTINT (pt_height) / 72.0; + img->height = in_height * FRAME_X_DISPLAY_INFO (f)->resy; + + /* Create the pixmap. */ + xassert (img->pixmap == NO_PIXMAP); + + /* Only W32 version did BLOCK_INPUT here. ++kfs */ + BLOCK_INPUT; + img->pixmap = XCreatePixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + img->width, img->height, + DefaultDepthOfScreen (FRAME_X_SCREEN (f))); + UNBLOCK_INPUT; + + if (!img->pixmap) + { + image_error ("Unable to create pixmap for `%s'", img->spec, Qnil); + return 0; + } + + /* Call the loader to fill the pixmap. It returns a process object + if successful. We do not record_unwind_protect here because + other places in redisplay like calling window scroll functions + don't either. Let the Lisp loader use `unwind-protect' instead. */ + GCPRO2 (window_and_pixmap_id, pixel_colors); + + sprintf (buffer, "%lu %lu", + (unsigned long) FRAME_X_WINDOW (f), + (unsigned long) img->pixmap); + window_and_pixmap_id = build_string (buffer); + + sprintf (buffer, "%lu %lu", + FRAME_FOREGROUND_PIXEL (f), + FRAME_BACKGROUND_PIXEL (f)); + pixel_colors = build_string (buffer); + + XSETFRAME (frame, f); + loader = image_spec_value (img->spec, QCloader, NULL); + if (NILP (loader)) + loader = intern ("gs-load-image"); + + img->data.lisp_val = call6 (loader, frame, img->spec, + make_number (img->width), + make_number (img->height), + window_and_pixmap_id, + pixel_colors); + UNGCPRO; + return PROCESSP (img->data.lisp_val); +} + + +/* Kill the Ghostscript process that was started to fill PIXMAP on + frame F. Called from XTread_socket when receiving an event + telling Emacs that Ghostscript has finished drawing. */ + +void +x_kill_gs_process (pixmap, f) + Pixmap pixmap; + struct frame *f; +{ + struct image_cache *c = FRAME_X_IMAGE_CACHE (f); + int class, i; + struct image *img; + + /* Find the image containing PIXMAP. */ + for (i = 0; i < c->used; ++i) + if (c->images[i]->pixmap == pixmap) + break; + + /* Should someone in between have cleared the image cache, for + instance, give up. */ + if (i == c->used) + return; + + /* Kill the GS process. We should have found PIXMAP in the image + cache and its image should contain a process object. */ + img = c->images[i]; + xassert (PROCESSP (img->data.lisp_val)); + Fkill_process (img->data.lisp_val, Qnil); + img->data.lisp_val = Qnil; + +#if defined (HAVE_X_WINDOWS) + + /* On displays with a mutable colormap, figure out the colors + allocated for the image by looking at the pixels of an XImage for + img->pixmap. */ + class = FRAME_X_VISUAL (f)->class; + if (class != StaticColor && class != StaticGray && class != TrueColor) + { + XImagePtr ximg; + + BLOCK_INPUT; + + /* Try to get an XImage for img->pixmep. */ + ximg = XGetImage (FRAME_X_DISPLAY (f), img->pixmap, + 0, 0, img->width, img->height, ~0, ZPixmap); + if (ximg) + { + int x, y; + + /* Initialize the color table. */ + init_color_table (); + + /* For each pixel of the image, look its color up in the + color table. After having done so, the color table will + contain an entry for each color used by the image. */ + for (y = 0; y < img->height; ++y) + for (x = 0; x < img->width; ++x) + { + unsigned long pixel = XGetPixel (ximg, x, y); + lookup_pixel_color (f, pixel); + } + + /* Record colors in the image. Free color table and XImage. */ +#ifdef COLOR_TABLE_SUPPORT + img->colors = colors_in_color_table (&img->ncolors); + free_color_table (); +#endif + XDestroyImage (ximg); + +#if 0 /* This doesn't seem to be the case. If we free the colors + here, we get a BadAccess later in x_clear_image when + freeing the colors. */ + /* We have allocated colors once, but Ghostscript has also + allocated colors on behalf of us. So, to get the + reference counts right, free them once. */ + if (img->ncolors) + x_free_colors (f, img->colors, img->ncolors); +#endif + } + else + image_error ("Cannot get X image of `%s'; colors will not be freed", + img->spec, Qnil); + + UNBLOCK_INPUT; + } +#endif /* HAVE_X_WINDOWS */ + + /* Now that we have the pixmap, compute mask and transform the + image if requested. */ + BLOCK_INPUT; + postprocess_image (f, img); + UNBLOCK_INPUT; +} + +#endif /* HAVE_GHOSTSCRIPT */ + + +/*********************************************************************** + Tests + ***********************************************************************/ + +#if GLYPH_DEBUG + +DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0, + doc: /* Value is non-nil if SPEC is a valid image specification. */) + (spec) + Lisp_Object spec; +{ + return valid_image_p (spec) ? Qt : Qnil; +} + + +DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "") + (spec) + Lisp_Object spec; +{ + int id = -1; + + if (valid_image_p (spec)) + id = lookup_image (SELECTED_FRAME (), spec); + + debug_print (spec); + return make_number (id); +} + +#endif /* GLYPH_DEBUG != 0 */ + + +/*********************************************************************** + Initialization + ***********************************************************************/ + +void +syms_of_image () +{ + QCascent = intern (":ascent"); + staticpro (&QCascent); + QCmargin = intern (":margin"); + staticpro (&QCmargin); + QCrelief = intern (":relief"); + staticpro (&QCrelief); + QCconversion = intern (":conversion"); + staticpro (&QCconversion); + QCcolor_symbols = intern (":color-symbols"); + staticpro (&QCcolor_symbols); + QCheuristic_mask = intern (":heuristic-mask"); + staticpro (&QCheuristic_mask); + QCindex = intern (":index"); + staticpro (&QCindex); + QCmatrix = intern (":matrix"); + staticpro (&QCmatrix); + QCcolor_adjustment = intern (":color-adjustment"); + staticpro (&QCcolor_adjustment); + QCmask = intern (":mask"); + staticpro (&QCmask); + + Qlaplace = intern ("laplace"); + staticpro (&Qlaplace); + Qemboss = intern ("emboss"); + staticpro (&Qemboss); + Qedge_detection = intern ("edge-detection"); + staticpro (&Qedge_detection); + Qheuristic = intern ("heuristic"); + staticpro (&Qheuristic); + + Qpostscript = intern ("postscript"); + staticpro (&Qpostscript); +#ifdef HAVE_GHOSTSCRIPT + QCloader = intern (":loader"); + staticpro (&QCloader); + QCbounding_box = intern (":bounding-box"); + staticpro (&QCbounding_box); + QCpt_width = intern (":pt-width"); + staticpro (&QCpt_width); + QCpt_height = intern (":pt-height"); + staticpro (&QCpt_height); +#endif /* HAVE_GHOSTSCRIPT */ + + Qpbm = intern ("pbm"); + staticpro (&Qpbm); + + Qxbm = intern ("xbm"); + staticpro (&Qxbm); + +#ifdef HAVE_XPM + Qxpm = intern ("xpm"); + staticpro (&Qxpm); +#endif + +#if defined (HAVE_JPEG) || defined (MAC_OS) + Qjpeg = intern ("jpeg"); + staticpro (&Qjpeg); +#endif + +#if defined (HAVE_TIFF) || defined (MAC_OS) + Qtiff = intern ("tiff"); + staticpro (&Qtiff); +#endif + +#if defined (HAVE_GIF) || defined (MAC_OS) + Qgif = intern ("gif"); + staticpro (&Qgif); +#endif + +#if defined (HAVE_PNG) || defined (MAC_OS) + Qpng = intern ("png"); + staticpro (&Qpng); +#endif + + defsubr (&Sclear_image_cache); + defsubr (&Simage_size); + defsubr (&Simage_mask_p); + +#if GLYPH_DEBUG + defsubr (&Simagep); + defsubr (&Slookup_image); +#endif + + DEFVAR_BOOL ("cross-disabled-images", &cross_disabled_images, + doc: /* Non-nil means always draw a cross over disabled images. +Disabled images are those having an `:conversion disabled' property. +A cross is always drawn on black & white displays. */); + cross_disabled_images = 0; + + DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, + doc: /* List of directories to search for window system bitmap files. */); + Vx_bitmap_file_path = decode_env_path ((char *) 0, PATH_BITMAPS); + + DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay, + doc: /* Time after which cached images are removed from the cache. +When an image has not been displayed this many seconds, remove it +from the image cache. Value must be an integer or nil with nil +meaning don't clear the cache. */); + Vimage_cache_eviction_delay = make_number (30 * 60); +} + + +#ifdef HAVE_NTGUI +/* Image types that rely on external libraries are loaded dynamically + if the library is available. */ +#define IF_LIB_AVAILABLE(init_lib_fn) if (init_lib_fn()) +#else +#define IF_LIB_AVAILABLE(init_func) /* Load unconditionally */ +#endif /* HAVE_NTGUI */ + +void +init_image () +{ + image_types = NULL; + Vimage_types = Qnil; + + define_image_type (&xbm_type); + define_image_type (&pbm_type); + +#ifdef HAVE_XPM + IF_LIB_AVAILABLE(init_xpm_functions) + define_image_type (&xpm_type); +#endif + +#if defined (HAVE_JPEG) || defined (MAC_OS) + IF_LIB_AVAILABLE(init_jpeg_functions) + define_image_type (&jpeg_type); +#endif + +#if defined (HAVE_TIFF) || defined (MAC_OS) + IF_LIB_AVAILABLE(init_tiff_functions) + define_image_type (&tiff_type); +#endif + +#if defined (HAVE_GIF) || defined (MAC_OS) + IF_LIB_AVAILABLE(init_gif_functions) + define_image_type (&gif_type); +#endif + +#if defined (HAVE_PNG) || defined (MAC_OS) + IF_LIB_AVAILABLE(init_png_functions) + define_image_type (&png_type); +#endif + +#ifdef HAVE_GHOSTSCRIPT + define_image_type (&gs_type); +#endif + +#ifdef MAC_OS + /* Animated gifs use QuickTime Movie Toolbox. So initialize it here. */ + EnterMovies (); +#ifdef MAC_OSX + init_image_func_pointer (); +#endif +#endif +} + +/* arch-tag: 123c2a5e-14a8-4c53-ab95-af47d7db49b9 + (do not change this comment) */ diff --git a/src/indent.c b/src/indent.c index ff5eb2f06b..15e433b03d 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1197,7 +1197,6 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, = (INTEGERP (current_buffer->selective_display) ? XINT (current_buffer->selective_display) : !NILP (current_buffer->selective_display) ? -1 : 0); - int prev_hpos = 0; int selective_rlen = (selective && dp && VECTORP (DISP_INVIS_VECTOR (dp)) ? XVECTOR (DISP_INVIS_VECTOR (dp))->size : 0); @@ -1225,6 +1224,8 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, int wide_column_end_hpos = 0; int prev_pos; /* Previous buffer position. */ int prev_pos_byte; /* Previous buffer position. */ + int prev_hpos = 0; + int prev_vpos = 0; int contin_hpos; /* HPOS of last column of continued line. */ int prev_tab_offset; /* Previous tab offset. */ @@ -1273,6 +1274,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, pos = prev_pos; pos_byte = prev_pos_byte; hpos = prev_hpos; + vpos = prev_vpos; tab_offset = prev_tab_offset; } break; @@ -1382,6 +1384,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, if (pos >= next_boundary) next_boundary = pos + 1; prev_hpos = width; + prev_vpos = vpos; prev_tab_offset = tab_offset; } } @@ -1414,6 +1417,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, pos = prev_pos; pos_byte = prev_pos_byte; hpos = prev_hpos; + vpos = prev_vpos; tab_offset = prev_tab_offset; /* NOTE on contin_hpos, hpos, and prev_hpos. @@ -1434,10 +1438,6 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, hpos = contin_hpos; vpos = vpos - 1; } - else if (c == '\n') - /* If previous character is NEWLINE, - set VPOS back to previous line */ - vpos = vpos - 1; break; } @@ -1455,6 +1455,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, pos = prev_pos; pos_byte = prev_pos_byte; hpos = prev_hpos; + vpos = prev_vpos; tab_offset = prev_tab_offset; } break; @@ -1463,6 +1464,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, break; prev_hpos = hpos; + prev_vpos = vpos; prev_pos = pos; prev_pos_byte = pos_byte; wide_column_end_hpos = 0; @@ -1834,9 +1836,7 @@ vmotion (from, vtarget, w) register int from, vtarget; struct window *w; { - /* We don't need to make room for continuation marks (we have fringes now), - so hould we really subtract 1 here if FRAME_WINDOW_P ? ++KFS */ - int width = window_box_text_cols (w) - 1; + int width = window_box_text_cols (w); int hscroll = XINT (w->hscroll); struct position pos; /* vpos is cumulative vertical position, changed as from is changed */ @@ -1857,6 +1857,12 @@ vmotion (from, vtarget, w) XSETWINDOW (window, w); + /* We must make room for continuation marks if we don't have fringes. */ +#ifdef HAVE_WINDOW_SYSTEM + if (!FRAME_WINDOW_P (XFRAME (w->frame))) +#endif + width -= 1; + /* If the window contains this buffer, use it for getting text properties. Otherwise use the current buffer as arg for doing that. */ if (EQ (w->buffer, Fcurrent_buffer ())) @@ -2063,3 +2069,6 @@ Setting this variable automatically makes it local to the current buffer. */); defsubr (&Svertical_motion); defsubr (&Scompute_motion); } + +/* arch-tag: 9adfea44-71f7-4988-8ee3-96da15c502cc + (do not change this comment) */ diff --git a/src/indent.h b/src/indent.h index 0ce7238ec7..8c2d1f36ad 100644 --- a/src/indent.h +++ b/src/indent.h @@ -71,3 +71,5 @@ void recompute_width_table P_ ((struct buffer *buf, struct Lisp_Char_Table *disptab)); +/* arch-tag: f9feb373-5bff-4f4f-9198-94805d00cfd7 + (do not change this comment) */ diff --git a/src/insdel.c b/src/insdel.c index 405b383521..b1ba5a554a 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -441,9 +441,13 @@ adjust_markers_for_insert (from, from_byte, to, to_byte, before_markers) } /* Adjusting only markers whose insertion-type is t may result in - disordered overlays in the slot `overlays_before'. */ + - disordered start and end in overlays, and + - disordered overlays in the slot `overlays_before' of current_buffer. */ if (adjusted) - fix_overlays_before (current_buffer, from, to); + { + fix_start_end_in_overlays(from, to); + fix_overlays_before (current_buffer, from, to); + } } /* Adjust point for an insertion of NBYTES bytes, which are NCHARS characters. @@ -2314,3 +2318,6 @@ as well as hooks attached to text properties and overlays. */); defsubr (&Scombine_after_change_execute); } + +/* arch-tag: 9b34b886-47d7-465e-a234-299af411b23d + (do not change this comment) */ diff --git a/src/intervals.c b/src/intervals.c index e19f09609b..d87b361a22 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -1712,6 +1712,7 @@ graft_intervals_into_buffer (source, position, length, buffer, inherit) { register INTERVAL under, over, this, prev; register INTERVAL tree; + int over_used; tree = BUF_INTERVALS (buffer); @@ -1745,6 +1746,7 @@ graft_intervals_into_buffer (source, position, length, buffer, inherit) XSETBUFFER (buf, buffer); BUF_INTERVALS (buffer) = reproduce_tree_obj (source, buf); BUF_INTERVALS (buffer)->position = BEG; + BUF_INTERVALS (buffer)->up_obj = 1; /* Explicitly free the old tree here? */ @@ -1767,6 +1769,7 @@ graft_intervals_into_buffer (source, position, length, buffer, inherit) { BUF_INTERVALS (buffer) = reproduce_tree (source, INTERVAL_PARENT (tree)); BUF_INTERVALS (buffer)->position = BEG; + BUF_INTERVALS (buffer)->up_obj = 1; /* Explicitly free the old tree here. */ return; @@ -1814,21 +1817,42 @@ graft_intervals_into_buffer (source, position, length, buffer, inherit) adjust_intervals_for_insertion, so stickiness has already been taken care of. */ + /* OVER is the interval we are copying from next. + OVER_USED says how many characters' worth of OVER + have already been copied into target intervals. + UNDER is the next interval in the target. */ + over_used = 0; while (! NULL_INTERVAL_P (over)) { - if (LENGTH (over) < LENGTH (under)) + /* If UNDER is longer than OVER, split it. */ + if (LENGTH (over) - over_used < LENGTH (under)) { - this = split_interval_left (under, LENGTH (over)); + this = split_interval_left (under, LENGTH (over) - over_used); copy_properties (under, this); } else this = under; - copy_properties (over, this); + + /* THIS is now the interval to copy or merge into. + OVER covers all of it. */ if (inherit) merge_properties (over, this); else copy_properties (over, this); - over = next_interval (over); + + /* If THIS and OVER end at the same place, + advance OVER to a new source interval. */ + if (LENGTH (this) == LENGTH (over) - over_used) + { + over = next_interval (over); + over_used = 0; + } + else + /* Otherwise just record that more of OVER has been used. */ + over_used += LENGTH (this); + + /* Always advance to a new target interval. */ + under = next_interval (this); } if (! NULL_INTERVAL_P (BUF_INTERVALS (buffer))) @@ -2587,3 +2611,6 @@ set_intervals_multibyte (multi_flag) set_intervals_multibyte_1 (BUF_INTERVALS (current_buffer), multi_flag, BEG, BEG_BYTE, Z, Z_BYTE); } + +/* arch-tag: 3d402b60-083c-4271-b4a3-ebd9a74bfe27 + (do not change this comment) */ diff --git a/src/intervals.h b/src/intervals.h index 6affe8216b..a8b011f4d9 100644 --- a/src/intervals.h +++ b/src/intervals.h @@ -328,6 +328,7 @@ extern Lisp_Object Vtext_property_default_nonsticky; extern Lisp_Object Qfront_sticky, Qrear_nonsticky; EXFUN (Fget_char_property, 3); +EXFUN (Fget_char_property_and_overlay, 3); EXFUN (Fget_text_property, 3); EXFUN (Ftext_properties_at, 2); EXFUN (Fnext_property_change, 3); @@ -361,3 +362,6 @@ extern Lisp_Object get_pos_property P_ ((Lisp_Object pos, Lisp_Object prop, extern void syms_of_textprop P_ ((void)); #include "composite.h" + +/* arch-tag: f0bc16c0-b084-498d-9de4-21cc8f077795 + (do not change this comment) */ diff --git a/src/ioctl.h b/src/ioctl.h index 0366f6d6bd..34f2a9aa64 100644 --- a/src/ioctl.h +++ b/src/ioctl.h @@ -1 +1,4 @@ /* Emacs ioctl emulation for VMS */ + +/* arch-tag: 48595931-af6e-407d-95c7-484059087767 + (do not change this comment) */ diff --git a/src/keyboard.c b/src/keyboard.c index f78c57715d..62017cec7b 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1,5 +1,5 @@ /* Keyboard and mouse input; editor command loop. - Copyright (C) 1985,86,87,88,89,93,94,95,96,97,99,2000,01,02,03 + Copyright (C) 1985,86,87,88,89,93,94,95,96,97,99,2000,01,02,03,04 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -479,36 +479,6 @@ extern char *pending_malloc_warning; static struct input_event kbd_buffer[KBD_BUFFER_SIZE]; -/* Vector to GCPRO the Lisp objects referenced from kbd_buffer. - - The interrupt-level event handlers will never enqueue an event on a - frame which is not in Vframe_list, and once an event is dequeued, - internal_last_event_frame or the event itself points to the frame. - So that's all fine. - - But while the event is sitting in the queue, it's completely - unprotected. Suppose the user types one command which will run for - a while and then delete a frame, and then types another event at - the frame that will be deleted, before the command gets around to - it. Suppose there are no references to this frame elsewhere in - Emacs, and a GC occurs before the second event is dequeued. Now we - have an event referring to a freed frame, which will crash Emacs - when it is dequeued. - - Similar things happen when an event on a scroll bar is enqueued; the - window may be deleted while the event is in the queue. - - So, we use this vector to protect the Lisp_Objects in the event - queue. That way, they'll be dequeued as dead frames or windows, - but still valid Lisp objects. - - If kbd_buffer[i].kind != NO_EVENT, then - - AREF (kbd_buffer_gcpro, 2 * i) == kbd_buffer[i].frame_or_window. - AREF (kbd_buffer_gcpro, 2 * i + 1) == kbd_buffer[i].arg. */ - -static Lisp_Object kbd_buffer_gcpro; - /* Pointer to next available character in kbd_buffer. If kbd_fetch_ptr == kbd_store_ptr, the buffer is empty. This may be kbd_buffer + KBD_BUFFER_SIZE, meaning that the @@ -586,6 +556,8 @@ Lisp_Object Qvertical_line; Lisp_Object Qvertical_scroll_bar; Lisp_Object Qmenu_bar; extern Lisp_Object Qleft_margin, Qright_margin; +extern Lisp_Object Qleft_fringe, Qright_fringe; +extern Lisp_Object QCmap; Lisp_Object recursive_edit_unwind (), command_loop (); Lisp_Object Fthis_command_keys (); @@ -1957,7 +1929,12 @@ adjust_point_for_property (last_pt, modified) : (PT < last_pt ? beg : end)); check_composition = check_display = 1; } +#if 0 /* This assertion isn't correct, because SET_PT may end up setting + the point to something other than its argument, due to + point-motion hooks, intangibility, etc. */ xassert (PT == beg || PT == end); +#endif + /* Pretend the area doesn't exist if the buffer is not modified. */ if (!modified && !ellipsis && beg < end) @@ -2941,13 +2918,13 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) { Lisp_Object posn; - posn = POSN_BUFFER_POSN (EVENT_START (c)); + posn = POSN_POSN (EVENT_START (c)); /* Handle menu-bar events: insert the dummy prefix event `menu-bar'. */ if (EQ (posn, Qmenu_bar) || EQ (posn, Qtool_bar)) { /* Change menu-bar to (menu-bar) as the event "position". */ - POSN_BUFFER_SET_POSN (EVENT_START (c), Fcons (posn, Qnil)); + POSN_SET_POSN (EVENT_START (c), Fcons (posn, Qnil)); also_record = c; Vunread_command_events = Fcons (c, Vunread_command_events); @@ -3546,10 +3523,33 @@ event_to_kboard (event) void kbd_buffer_store_event (event) register struct input_event *event; +{ + kbd_buffer_store_event_hold (event, 0); +} + +/* Store EVENT obtained at interrupt level into kbd_buffer, fifo. + + If HOLD_QUIT is 0, just stuff EVENT into the fifo. + Else, if HOLD_QUIT.kind != NO_EVENT, discard EVENT. + Else, if EVENT is a quit event, store the quit event + in HOLD_QUIT, and return (thus ignoring further events). + + This is used in read_avail_input to postpone the processing + of the quit event until all subsequent input events have been + parsed (and discarded). + */ + +void +kbd_buffer_store_event_hold (event, hold_quit) + register struct input_event *event; + struct input_event *hold_quit; { if (event->kind == NO_EVENT) abort (); + if (hold_quit && hold_quit->kind != NO_EVENT) + return; + if (event->kind == ASCII_KEYSTROKE_EVENT) { register int c = event->code & 0377; @@ -3591,6 +3591,12 @@ kbd_buffer_store_event (event) } #endif + if (hold_quit) + { + bcopy (event, (char *) hold_quit, sizeof (*event)); + return; + } + /* If this results in a quit_char being returned to Emacs as input, set Vlast_event_frame properly. If this doesn't get returned to Emacs as an event, the next event read @@ -3620,7 +3626,9 @@ kbd_buffer_store_event (event) Just ignore the second one. */ else if (event->kind == BUFFER_SWITCH_EVENT && kbd_fetch_ptr != kbd_store_ptr - && kbd_store_ptr->kind == BUFFER_SWITCH_EVENT) + && ((kbd_store_ptr == kbd_buffer + ? kbd_buffer + KBD_BUFFER_SIZE - 1 + : kbd_store_ptr - 1)->kind) == BUFFER_SWITCH_EVENT) return; if (kbd_store_ptr - kbd_buffer == KBD_BUFFER_SIZE) @@ -3632,7 +3640,6 @@ kbd_buffer_store_event (event) Discard the event if it would fill the last slot. */ if (kbd_fetch_ptr - 1 != kbd_store_ptr) { - int idx; #if 0 /* The SELECTION_REQUEST_EVENT case looks bogus, and it's error prone to assign individual members for other events, in case @@ -3662,9 +3669,6 @@ kbd_buffer_store_event (event) *kbd_store_ptr = *event; #endif - idx = 2 * (kbd_store_ptr - kbd_buffer); - ASET (kbd_buffer_gcpro, idx, event->frame_or_window); - ASET (kbd_buffer_gcpro, idx + 1, event->arg); ++kbd_store_ptr; } } @@ -3683,24 +3687,22 @@ kbd_buffer_store_event (event) Value is the number of input_events generated. */ -int -gen_help_event (bufp, size, help, frame, window, object, pos) - struct input_event *bufp; - int size; +void +gen_help_event (help, frame, window, object, pos) Lisp_Object help, frame, object, window; int pos; { - if (size >= 1) - { - bufp->kind = HELP_EVENT; - bufp->frame_or_window = frame; - bufp->arg = object; - bufp->x = WINDOWP (window) ? window : frame; - bufp->y = help; - bufp->code = pos; - return 1; - } - return 0; + struct input_event event; + + EVENT_INIT (event); + + event.kind = HELP_EVENT; + event.frame_or_window = frame; + event.arg = object; + event.x = WINDOWP (window) ? window : frame; + event.y = help; + event.code = pos; + kbd_buffer_store_event (&event); } @@ -3780,9 +3782,6 @@ static INLINE void clear_event (event) struct input_event *event; { - int idx = 2 * (event - kbd_buffer); - ASET (kbd_buffer_gcpro, idx, Qnil); - ASET (kbd_buffer_gcpro, idx + 1, Qnil); event->kind = NO_EVENT; } @@ -4955,6 +4954,169 @@ EMACS_INT double_click_fuzz; int double_click_count; +/* Return position of a mouse click or wheel event */ + +static Lisp_Object +make_lispy_position (f, x, y, time) + struct frame *f; + Lisp_Object *x, *y; + unsigned long time; +{ + Lisp_Object window; + enum window_part part; + Lisp_Object posn = Qnil; + Lisp_Object extra_info = Qnil; + int wx, wy; + + /* Set `window' to the window under frame pixel coordinates (x,y) */ + if (f) + window = window_from_coordinates (f, XINT (*x), XINT (*y), + &part, &wx, &wy, 0); + else + window = Qnil; + + if (WINDOWP (window)) + { + /* It's a click in window window at frame coordinates (x,y) */ + struct window *w = XWINDOW (window); + Lisp_Object string_info = Qnil; + int textpos = -1, rx = -1, ry = -1; + int dx = -1, dy = -1; + int width = -1, height = -1; + Lisp_Object object = Qnil; + + /* Set event coordinates to window-relative coordinates + for constructing the Lisp event below. */ + XSETINT (*x, wx); + XSETINT (*y, wy); + + if (part == ON_MODE_LINE || part == ON_HEADER_LINE) + { + /* Mode line or header line. Look for a string under + the mouse that may have a `local-map' property. */ + Lisp_Object string; + int charpos; + + posn = part == ON_MODE_LINE ? Qmode_line : Qheader_line; + rx = wx, ry = wy; + string = mode_line_string (w, part, &rx, &ry, &charpos, + &object, &dx, &dy, &width, &height); + if (STRINGP (string)) + string_info = Fcons (string, make_number (charpos)); + if (w == XWINDOW (selected_window)) + textpos = PT; + else + textpos = XMARKER (w->pointm)->charpos; + } + else if (part == ON_VERTICAL_BORDER) + { + posn = Qvertical_line; + wx = -1; + dx = 0; + width = 1; + } + else if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN) + { + Lisp_Object string; + int charpos; + + posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin; + rx = wx, ry = wy; + string = marginal_area_string (w, part, &rx, &ry, &charpos, + &object, &dx, &dy, &width, &height); + if (STRINGP (string)) + string_info = Fcons (string, make_number (charpos)); + } + else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE) + { + posn = (part == ON_LEFT_FRINGE) ? Qleft_fringe : Qright_fringe; + rx = 0; + dx = wx; + if (part == ON_RIGHT_FRINGE) + dx -= (window_box_width (w, LEFT_MARGIN_AREA) + + window_box_width (w, TEXT_AREA) + + (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) + ? window_box_width (w, RIGHT_MARGIN_AREA) + : 0)); + else if (!WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)) + dx -= window_box_width (w, LEFT_MARGIN_AREA); + } + + if (textpos < 0) + { + Lisp_Object string2, object2 = Qnil; + struct display_pos p; + int dx2, dy2; + int width2, height2; + wx = max (WINDOW_LEFT_MARGIN_WIDTH (w), wx); + string2 = buffer_posn_from_coords (w, &wx, &wy, &p, + &object2, &dx2, &dy2, + &width2, &height2); + textpos = CHARPOS (p.pos); + if (rx < 0) rx = wx; + if (ry < 0) ry = wy; + if (dx < 0) dx = dx2; + if (dy < 0) dy = dy2; + if (width < 0) width = width2; + if (height < 0) height = height2; + + if (NILP (posn)) + { + posn = make_number (textpos); + if (STRINGP (string2)) + string_info = Fcons (string2, + make_number (CHARPOS (p.string_pos))); + } + if (NILP (object)) + object = object2; + } + +#ifdef HAVE_WINDOW_SYSTEM + if (IMAGEP (object)) + { + Lisp_Object image_map, hotspot; + if ((image_map = Fplist_get (XCDR (object), QCmap), + !NILP (image_map)) + && (hotspot = find_hot_spot (image_map, dx, dy), + CONSP (hotspot)) + && (hotspot = XCDR (hotspot), CONSP (hotspot))) + posn = XCAR (hotspot); + } +#endif + + /* Object info */ + extra_info = Fcons (object, + Fcons (Fcons (make_number (dx), + make_number (dy)), + Fcons (Fcons (make_number (width), + make_number (height)), + Qnil))); + + /* String info */ + extra_info = Fcons (string_info, + Fcons (make_number (textpos), + Fcons (Fcons (make_number (rx), + make_number (ry)), + extra_info))); + } + else if (f != 0) + { + XSETFRAME (window, f); + } + else + { + window = Qnil; + XSETFASTINT (*x, 0); + XSETFASTINT (*y, 0); + } + + return Fcons (window, + Fcons (posn, + Fcons (Fcons (*x, *y), + Fcons (make_number (time), + extra_info)))); +} + /* Given a struct input_event, build the lisp event which represents it. If EVENT is 0, build a mouse movement event from the mouse movement buffer, which should have a movement event in it. @@ -5089,25 +5251,23 @@ make_lispy_event (event) Lisp_Object position; Lisp_Object *start_pos_ptr; Lisp_Object start_pos; - Lisp_Object window; position = Qnil; /* Build the position as appropriate for this mouse click. */ if (event->kind == MOUSE_CLICK_EVENT) { - enum window_part part; struct frame *f = XFRAME (event->frame_or_window); - Lisp_Object posn; - Lisp_Object string_info = Qnil; +#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) int row, column; - int wx, wy; +#endif /* Ignore mouse events that were made on frame that have been deleted. */ if (! FRAME_LIVE_P (f)) return Qnil; +#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) /* EVENT->x and EVENT->y are frame-relative pixel coordinates at this place. Under old redisplay, COLUMN and ROW are set to frame relative glyph coordinates @@ -5116,7 +5276,6 @@ make_lispy_event (event) pixel_to_glyph_coords (f, XINT (event->x), XINT (event->y), &column, &row, NULL, 1); -#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) /* In the non-toolkit version, clicks on the menu bar are ordinary button events in the event buffer. Distinguish them, and invoke the menu. @@ -5170,77 +5329,14 @@ make_lispy_event (event) } #endif /* not USE_X_TOOLKIT && not USE_GTK */ - /* Set `window' to the window under frame pixel coordinates - event->x/event->y. */ - window = window_from_coordinates (f, XINT (event->x), - XINT (event->y), - &part, &wx, &wy, 0); - - if (!WINDOWP (window)) - { - window = event->frame_or_window; - posn = Qnil; - } - else - { - /* It's a click in window window at frame coordinates - event->x/ event->y. */ - struct window *w = XWINDOW (window); - - /* Set event coordinates to window-relative coordinates - for constructing the Lisp event below. */ - XSETINT (event->x, wx); - XSETINT (event->y, wy); - - if (part == ON_MODE_LINE || part == ON_HEADER_LINE) - { - /* Mode line or header line. Look for a string under - the mouse that may have a `local-map' property. */ - Lisp_Object string; - int charpos; - - posn = part == ON_MODE_LINE ? Qmode_line : Qheader_line; - string = mode_line_string (w, wx, wy, part, &charpos); - if (STRINGP (string)) - string_info = Fcons (string, make_number (charpos)); - } - else if (part == ON_VERTICAL_BORDER) - posn = Qvertical_line; - else if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN) - { - int charpos; - Lisp_Object object = marginal_area_string (w, wx, wy, part, - &charpos); - posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin; - if (STRINGP (object)) - string_info = Fcons (object, make_number (charpos)); - } - else - { - Lisp_Object object; - struct display_pos p; - buffer_posn_from_coords (w, &wx, &wy, &object, &p); - posn = make_number (CHARPOS (p.pos)); - if (STRINGP (object)) - string_info - = Fcons (object, - make_number (CHARPOS (p.string_pos))); - } - } - - position - = Fcons (window, - Fcons (posn, - Fcons (Fcons (event->x, event->y), - Fcons (make_number (event->timestamp), - (NILP (string_info) - ? Qnil - : Fcons (string_info, Qnil)))))); + position = make_lispy_position (f, &event->x, &event->y, + event->timestamp); } #ifndef USE_TOOLKIT_SCROLL_BARS else { /* It's a scrollbar click. */ + Lisp_Object window; Lisp_Object portion_whole; Lisp_Object part; @@ -5405,97 +5501,18 @@ make_lispy_event (event) case WHEEL_EVENT: { Lisp_Object position; - Lisp_Object window; Lisp_Object head; - + /* Build the position as appropriate for this mouse click. */ - enum window_part part; struct frame *f = XFRAME (event->frame_or_window); - Lisp_Object posn; - Lisp_Object string_info = Qnil; - int row, column; - int wx, wy; - position = Qnil; /* Ignore wheel events that were made on frame that have been deleted. */ if (! FRAME_LIVE_P (f)) return Qnil; - /* EVENT->x and EVENT->y are frame-relative pixel - coordinates at this place. Under old redisplay, COLUMN - and ROW are set to frame relative glyph coordinates - which are then used to determine whether this click is - in a menu (non-toolkit version). */ - pixel_to_glyph_coords (f, XINT (event->x), XINT (event->y), - &column, &row, NULL, 1); - - /* Set `window' to the window under frame pixel coordinates - event->x/event->y. */ - window = window_from_coordinates (f, XINT (event->x), - XINT (event->y), - &part, &wx, &wy, 0); - - if (!WINDOWP (window)) - { - window = event->frame_or_window; - posn = Qnil; - } - else - { - /* It's a click in window window at frame coordinates - event->x/ event->y. */ - struct window *w = XWINDOW (window); - - /* Set event coordinates to window-relative coordinates - for constructing the Lisp event below. */ - XSETINT (event->x, wx); - XSETINT (event->y, wy); - - if (part == ON_MODE_LINE || part == ON_HEADER_LINE) - { - /* Mode line or header line. Look for a string under - the mouse that may have a `local-map' property. */ - Lisp_Object string; - int charpos; - - posn = part == ON_MODE_LINE ? Qmode_line : Qheader_line; - string = mode_line_string (w, wx, wy, part, &charpos); - if (STRINGP (string)) - string_info = Fcons (string, make_number (charpos)); - } - else if (part == ON_VERTICAL_BORDER) - posn = Qvertical_line; - else if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN) - { - int charpos; - Lisp_Object object = marginal_area_string (w, wx, wy, part, - &charpos); - posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin; - if (STRINGP (object)) - string_info = Fcons (object, make_number (charpos)); - } - else - { - Lisp_Object object; - struct display_pos p; - buffer_posn_from_coords (w, &wx, &wy, &object, &p); - posn = make_number (CHARPOS (p.pos)); - if (STRINGP (object)) - string_info - = Fcons (object, - make_number (CHARPOS (p.string_pos))); - } - } - - position - = Fcons (window, - Fcons (posn, - Fcons (Fcons (event->x, event->y), - Fcons (make_number (event->timestamp), - (NILP (string_info) - ? Qnil - : Fcons (string_info, Qnil)))))); + position = make_lispy_position (f, &event->x, &event->y, + event->timestamp); /* Set double or triple modifiers to indicate the wheel speed. */ { @@ -5689,12 +5706,9 @@ make_lispy_event (event) case DRAG_N_DROP_EVENT: { - enum window_part part; FRAME_PTR f; - Lisp_Object window; - Lisp_Object posn; + Lisp_Object head, position; Lisp_Object files; - int wx, wy; /* The frame_or_window field should be a cons of the frame in which the event occurred and a list of the filenames @@ -5710,60 +5724,17 @@ make_lispy_event (event) if (! FRAME_LIVE_P (f)) return Qnil; - window = window_from_coordinates (f, XINT (event->x), - XINT (event->y), - &part, &wx, &wy, 0); - - if (!WINDOWP (window)) - { - window = XCAR (event->frame_or_window); - posn = Qnil; - } - else - { - /* It's an event in window `window' at frame coordinates - event->x/ event->y. */ - struct window *w = XWINDOW (window); - - /* Set event coordinates to window-relative coordinates - for constructing the Lisp event below. */ - XSETINT (event->x, wx); - XSETINT (event->y, wy); - - if (part == ON_MODE_LINE) - posn = Qmode_line; - else if (part == ON_VERTICAL_BORDER) - posn = Qvertical_line; - else if (part == ON_HEADER_LINE) - posn = Qheader_line; - else - { - Lisp_Object object; - struct display_pos p; - buffer_posn_from_coords (w, &wx, &wy, &object, &p); - posn = make_number (CHARPOS (p.pos)); - } - } - - { - Lisp_Object head, position; - - position - = Fcons (window, - Fcons (posn, - Fcons (Fcons (event->x, event->y), - Fcons (make_number (event->timestamp), - Qnil)))); - - head = modify_event_symbol (0, event->modifiers, - Qdrag_n_drop, Qnil, - lispy_drag_n_drop_names, - &drag_n_drop_syms, 1); - return Fcons (head, - Fcons (position, - Fcons (files, - Qnil))); - } + position = make_lispy_position (f, &event->x, &event->y, + event->timestamp); + + head = modify_event_symbol (0, event->modifiers, + Qdrag_n_drop, Qnil, + lispy_drag_n_drop_names, + &drag_n_drop_syms, 1); + return Fcons (head, + Fcons (position, + Fcons (files, + Qnil))); } #endif /* HAVE_MOUSE */ @@ -5836,59 +5807,12 @@ make_lispy_movement (frame, bar_window, part, x, y, time) /* Or is it an ordinary mouse movement? */ else { - enum window_part area; - Lisp_Object window; - Lisp_Object posn; - int wx, wy; + Lisp_Object position; - if (frame) - /* It's in a frame; which window on that frame? */ - window = window_from_coordinates (frame, XINT (x), XINT (y), - &area, &wx, &wy, 0); - else - window = Qnil; - - if (WINDOWP (window)) - { - struct window *w = XWINDOW (window); - - /* Set window relative coordinates. */ - XSETINT (x, wx); - XSETINT (y, wy); - - if (area == ON_MODE_LINE) - posn = Qmode_line; - else if (area == ON_VERTICAL_BORDER) - posn = Qvertical_line; - else if (area == ON_HEADER_LINE) - posn = Qheader_line; - else - { - Lisp_Object object; - struct display_pos p; - buffer_posn_from_coords (w, &wx, &wy, &object, &p); - posn = make_number (CHARPOS (p.pos)); - } - } - else if (frame != 0) - { - XSETFRAME (window, frame); - posn = Qnil; - } - else - { - window = Qnil; - posn = Qnil; - XSETFASTINT (x, 0); - XSETFASTINT (y, 0); - } + position = make_lispy_position (frame, &x, &y, time); return Fcons (Qmouse_movement, - Fcons (Fcons (window, - Fcons (posn, - Fcons (Fcons (x, y), - Fcons (make_number (time), - Qnil)))), + Fcons (position, Qnil)); } } @@ -6126,7 +6050,7 @@ parse_modifiers (symbol) SBYTES (SYMBOL_NAME (symbol)) - end), Qnil); - if (modifiers & ~VALMASK) + if (modifiers & ~INTMASK) abort (); XSETFASTINT (mask, modifiers); elements = Fcons (unmodified, Fcons (mask, Qnil)); @@ -6163,7 +6087,7 @@ apply_modifiers (modifiers, base) Lisp_Object cache, index, entry, new_symbol; /* Mask out upper bits. We don't know where this value's been. */ - modifiers &= VALMASK; + modifiers &= INTMASK; /* The click modifier never figures into cache indices. */ cache = Fget (base, Qmodifier_cache); @@ -6684,16 +6608,27 @@ static int read_avail_input (expected) int expected; { - struct input_event buf[KBD_BUFFER_SIZE]; register int i; - int nread; - - for (i = 0; i < KBD_BUFFER_SIZE; i++) - EVENT_INIT (buf[i]); + int nread = 0; if (read_socket_hook) - /* No need for FIONREAD or fcntl; just say don't wait. */ - nread = (*read_socket_hook) (input_fd, buf, KBD_BUFFER_SIZE, expected); + { + int discard = 0; + int nr; + struct input_event hold_quit; + + EVENT_INIT (hold_quit); + hold_quit.kind = NO_EVENT; + + /* No need for FIONREAD or fcntl; just say don't wait. */ + while (nr = (*read_socket_hook) (input_fd, expected, &hold_quit), nr > 0) + { + nread += nr; + expected = 0; + } + if (hold_quit.kind != NO_EVENT) + kbd_buffer_store_event (&hold_quit); + } else { /* Using KBD_BUFFER_SIZE - 1 here avoids reading more than @@ -6794,34 +6729,56 @@ read_avail_input (expected) #endif /* no FIONREAD */ for (i = 0; i < nread; i++) { - buf[i].kind = ASCII_KEYSTROKE_EVENT; - buf[i].modifiers = 0; + struct input_event buf; + EVENT_INIT (buf); + buf.kind = ASCII_KEYSTROKE_EVENT; + buf.modifiers = 0; if (meta_key == 1 && (cbuf[i] & 0x80)) - buf[i].modifiers = meta_modifier; + buf.modifiers = meta_modifier; if (meta_key != 2) cbuf[i] &= ~0x80; - buf[i].code = cbuf[i]; - buf[i].frame_or_window = selected_frame; - buf[i].arg = Qnil; - } - } + buf.code = cbuf[i]; + buf.frame_or_window = selected_frame; + buf.arg = Qnil; - /* Scan the chars for C-g and store them in kbd_buffer. */ - for (i = 0; i < nread; i++) - { - kbd_buffer_store_event (&buf[i]); - /* Don't look at input that follows a C-g too closely. - This reduces lossage due to autorepeat on C-g. */ - if (buf[i].kind == ASCII_KEYSTROKE_EVENT - && buf[i].code == quit_char) - break; + kbd_buffer_store_event (&buf); + /* Don't look at input that follows a C-g too closely. + This reduces lossage due to autorepeat on C-g. */ + if (buf.kind == ASCII_KEYSTROKE_EVENT + && buf.code == quit_char) + break; + } } return nread; } #endif /* not VMS */ +void +handle_async_input () +{ +#ifdef BSD4_1 + extern int select_alarmed; +#endif + interrupt_input_pending = 0; + + while (1) + { + int nread; + nread = read_avail_input (1); + /* -1 means it's not ok to read the input now. + UNBLOCK_INPUT will read it later; now, avoid infinite loop. + 0 means there was no keyboard input available. */ + if (nread <= 0) + break; + +#ifdef BSD4_1 + select_alarmed = 1; /* Force the select emulator back to life */ +#endif + } +} + #ifdef SIGIO /* for entire page */ /* Note SIGIO has been undef'd if FIONREAD is missing. */ @@ -6831,9 +6788,6 @@ input_available_signal (signo) { /* Must preserve main program's value of errno. */ int old_errno = errno; -#ifdef BSD4_1 - extern int select_alarmed; -#endif #if defined (USG) && !defined (POSIX_SIGNALS) /* USG systems forget handlers when they are used; @@ -6848,20 +6802,11 @@ input_available_signal (signo) if (input_available_clear_time) EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); - while (1) - { - int nread; - nread = read_avail_input (1); - /* -1 means it's not ok to read the input now. - UNBLOCK_INPUT will read it later; now, avoid infinite loop. - 0 means there was no keyboard input available. */ - if (nread <= 0) - break; - -#ifdef BSD4_1 - select_alarmed = 1; /* Force the select emulator back to life */ +#ifdef SYNC_INPUT + interrupt_input_pending = 1; +#else + handle_async_input (); #endif - } #ifdef BSD4_1 sigfree (); @@ -6880,7 +6825,7 @@ void reinvoke_input_signal () { #ifdef SIGIO - kill (getpid (), SIGIO); + handle_async_input (); #endif } @@ -8338,7 +8283,7 @@ access_keymap_keyremap (map, key, prompt, do_funcall) int do_funcall; { Lisp_Object next; - + next = access_keymap (map, key, 1, 0, 1); /* Handle symbol with autoload definition. */ @@ -8353,7 +8298,7 @@ access_keymap_keyremap (map, key, prompt, do_funcall) && (!NILP (Farrayp (XSYMBOL (next)->function)) || KEYMAPP (XSYMBOL (next)->function))) next = XSYMBOL (next)->function; - + /* If the keymap gives a function, not an array, then call the function with one arg and use its value instead. */ @@ -8935,6 +8880,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, if (EVENT_HAS_PARAMETERS (key)) { Lisp_Object kind; + Lisp_Object string; kind = EVENT_HEAD_KIND (EVENT_HEAD (key)); if (EQ (kind, Qmouse_click)) @@ -8942,7 +8888,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, Lisp_Object window, posn; window = POSN_WINDOW (EVENT_START (key)); - posn = POSN_BUFFER_POSN (EVENT_START (key)); + posn = POSN_POSN (EVENT_START (key)); if (CONSP (posn) || (!NILP (fake_prefixed_keys) @@ -9000,7 +8946,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, localized_local_map = 1; start = EVENT_START (key); - if (CONSP (start) && CONSP (XCDR (start))) + if (CONSP (start) && POSN_INBUFFER_P (start)) { pos = POSN_BUFFER_POSN (start); if (INTEGERP (pos) @@ -9051,11 +8997,11 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, /* If on a mode line string with a local keymap, reconsider the key sequence with that keymap. */ - if (CONSP (POSN_STRING (EVENT_START (key)))) + if (string = POSN_STRING (EVENT_START (key)), + (CONSP (string) && STRINGP (XCAR (string)))) { - Lisp_Object string, pos, map, map2; + Lisp_Object pos, map, map2; - string = POSN_STRING (EVENT_START (key)); pos = XCDR (string); string = XCAR (string); if (XINT (pos) >= 0 @@ -9074,16 +9020,16 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, goto replay_key; } - else if (CONSP (POSN_STRING (EVENT_START (key))) - && NILP (from_string)) + else if (NILP (from_string) + && (string = POSN_STRING (EVENT_START (key)), + (CONSP (string) && STRINGP (XCAR (string))))) { /* For a click on a string, i.e. overlay string or a string displayed via the `display' property, consider `local-map' and `keymap' properties of that string. */ - Lisp_Object string, pos, map, map2; + Lisp_Object pos, map, map2; - string = POSN_STRING (EVENT_START (key)); pos = XCDR (string); string = XCAR (string); if (XINT (pos) >= 0 @@ -9110,7 +9056,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, { Lisp_Object posn; - posn = POSN_BUFFER_POSN (EVENT_START (key)); + posn = POSN_POSN (EVENT_START (key)); /* Handle menu-bar events: insert the dummy prefix event `menu-bar'. */ if (EQ (posn, Qmenu_bar) || EQ (posn, Qtool_bar)) @@ -9122,8 +9068,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, /* Zap the position in key, so we know that we've expanded it, and don't try to do so again. */ - POSN_BUFFER_SET_POSN (EVENT_START (key), - Fcons (posn, Qnil)); + POSN_SET_POSN (EVENT_START (key), + Fcons (posn, Qnil)); mock_input = t + 2; goto replay_sequence; @@ -9366,7 +9312,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, /* Adjust the function-key-map counters. */ fkey.end += diff; fkey.start += diff; - + goto replay_sequence; } } @@ -10134,7 +10080,6 @@ Also end any kbd macro being defined. */) discard_tty_input (); kbd_fetch_ptr = kbd_store_ptr; - Ffillarray (kbd_buffer_gcpro, Qnil); input_pending = 0; return Qnil; @@ -10225,17 +10170,13 @@ stuff_buffered_input (stuffstring) Should we ignore anything that was typed in at the "wrong" kboard? */ for (; kbd_fetch_ptr != kbd_store_ptr; kbd_fetch_ptr++) { - int idx; if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE) kbd_fetch_ptr = kbd_buffer; if (kbd_fetch_ptr->kind == ASCII_KEYSTROKE_EVENT) stuff_char (kbd_fetch_ptr->code); - kbd_fetch_ptr->kind = NO_EVENT; - idx = 2 * (kbd_fetch_ptr - kbd_buffer); - ASET (kbd_buffer_gcpro, idx, Qnil); - ASET (kbd_buffer_gcpro, idx + 1, Qnil); + clear_event (kbd_fetch_ptr); } input_pending = 0; @@ -10635,7 +10576,6 @@ init_keyboard () recent_keys_index = 0; kbd_fetch_ptr = kbd_buffer; kbd_store_ptr = kbd_buffer; - kbd_buffer_gcpro = Fmake_vector (make_number (2 * KBD_BUFFER_SIZE), Qnil); #ifdef HAVE_MOUSE do_mouse_tracking = Qnil; #endif @@ -10926,9 +10866,6 @@ syms_of_keyboard () Fset (Qextended_command_history, Qnil); staticpro (&Qextended_command_history); - kbd_buffer_gcpro = Fmake_vector (make_number (2 * KBD_BUFFER_SIZE), Qnil); - staticpro (&kbd_buffer_gcpro); - accent_key_syms = Qnil; staticpro (&accent_key_syms); @@ -11382,7 +11319,7 @@ keys_of_keyboard () /* Handling it at such a low-level causes read_key_sequence to get * confused because it doesn't realize that the current_buffer was * changed by read_char. - * + * * initial_define_lispy_key (Vspecial_event_map, "select-window", * "handle-select-window"); */ initial_define_lispy_key (Vspecial_event_map, "save-session", @@ -11427,3 +11364,6 @@ mark_kboards () } } } + +/* arch-tag: 774e34d7-6d31-42f3-8397-e079a4e4c9ca + (do not change this comment) */ diff --git a/src/keyboard.h b/src/keyboard.h index 9d77d21ec7..d92f13a505 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -250,21 +250,25 @@ extern Lisp_Object item_properties; #define EVENT_END(event) (XCAR (XCDR (XCDR (event)))) /* Extract the click count from a multi-click event. */ -#define EVENT_CLICK_COUNT(event) (Fnth ((event), make_number (2))) +#define EVENT_CLICK_COUNT(event) (Fnth (make_number (2), (event))) /* Extract the fields of a position. */ #define POSN_WINDOW(posn) (XCAR (posn)) -#define POSN_BUFFER_POSN(posn) (XCAR (XCDR (posn))) -#define POSN_BUFFER_SET_POSN(posn,x) (XSETCAR (XCDR (posn), (x))) +#define POSN_POSN(posn) (XCAR (XCDR (posn))) +#define POSN_SET_POSN(posn,x) (XSETCAR (XCDR (posn), (x))) #define POSN_WINDOW_POSN(posn) (XCAR (XCDR (XCDR (posn)))) -#define POSN_TIMESTAMP(posn) \ - (XCAR (XCDR (XCDR (XCDR (posn))))) -#define POSN_SCROLLBAR_PART(posn) (Fnth ((posn), make_number (4))) +#define POSN_TIMESTAMP(posn) (XCAR (XCDR (XCDR (XCDR (posn))))) +#define POSN_SCROLLBAR_PART(posn) (Fnth (make_number (4), (posn))) /* A cons (STRING . STRING-CHARPOS), or nil in mouse-click events. It's a cons if the click is over a string in the mode line. */ -#define POSN_STRING(POSN) Fnth (make_number (4), (POSN)) +#define POSN_STRING(posn) (Fnth (make_number (4), (posn))) + +/* If POSN_STRING is nil, event refers to buffer location. */ + +#define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn))) +#define POSN_BUFFER_POSN(posn) (Fnth (make_number (5), (posn))) /* Some of the event heads. */ extern Lisp_Object Qswitch_frame; @@ -325,13 +329,18 @@ extern void timer_start_idle P_ ((void)); extern void timer_stop_idle P_ ((void)); extern int lucid_event_type_list_p P_ ((Lisp_Object)); extern void kbd_buffer_store_event P_ ((struct input_event *)); +extern void kbd_buffer_store_event_hold P_ ((struct input_event *, + struct input_event *)); #ifdef POLL_FOR_INPUT extern void poll_for_input_1 P_ ((void)); #endif extern void show_help_echo P_ ((Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, int)); -extern int gen_help_event P_ ((struct input_event *, int, Lisp_Object, - Lisp_Object, Lisp_Object, Lisp_Object, int)); +extern void gen_help_event P_ ((Lisp_Object, Lisp_Object, Lisp_Object, + Lisp_Object, int)); extern void kbd_buffer_store_help_event P_ ((Lisp_Object, Lisp_Object)); extern Lisp_Object menu_item_eval_property P_ ((Lisp_Object)); extern int kbd_buffer_events_waiting P_ ((int)); + +/* arch-tag: 769cbade-1ba9-4950-b886-db265b061aa3 + (do not change this comment) */ diff --git a/src/keymap.c b/src/keymap.c index 7fa4d9a6f7..62ea237b85 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1,5 +1,5 @@ /* Manipulation of keymaps - Copyright (C) 1985, 86,87,88,93,94,95,98,99, 2000, 2001 + Copyright (C) 1985, 86,87,88,93,94,95,98,99, 2000, 01, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -672,7 +672,6 @@ map_keymap (map, fun, args, data, autoload) /* Loop over the char values represented in the vector. */ int len = ASIZE (binding); int c; - abort(); for (c = 0; c < len; c++) { Lisp_Object character; @@ -2312,7 +2311,7 @@ shadow_lookup (shadow, key, flag) return Qnil; } -static Lisp_Object Vmenu_events; +static Lisp_Object Vmouse_events; /* This function can GC if Flookup_key autoloads any keymaps. */ @@ -2369,7 +2368,7 @@ where_is_internal (definition, keymaps, firstonly, noindirect, no_remap) /* if (nomenus && !ascii_sequence_p (this)) */ if (nomenus && XINT (last) >= 0 && SYMBOLP (tem = Faref (this, make_number (0))) - && !NILP (Fmemq (XCAR (parse_modifiers (tem)), Vmenu_events))) + && !NILP (Fmemq (XCAR (parse_modifiers (tem)), Vmouse_events))) /* If no menu entries should be returned, skip over the keymaps bound to `menu-bar' and `tool-bar' and other non-ascii prefixes like `C-down-mouse-2'. */ @@ -3551,13 +3550,17 @@ This keymap works like `function-key-map', but comes after that, and applies even for keys that have ordinary bindings. */); Vkey_translation_map = Qnil; - staticpro (&Vmenu_events); - Vmenu_events = Fcons (intern ("menu-bar"), - Fcons (intern ("tool-bar"), - Fcons (intern ("mouse-1"), - Fcons (intern ("mouse-2"), - Fcons (intern ("mouse-3"), - Qnil))))); + staticpro (&Vmouse_events); + Vmouse_events = Fcons (intern ("menu-bar"), + Fcons (intern ("tool-bar"), + Fcons (intern ("header-line"), + Fcons (intern ("mode-line"), + Fcons (intern ("mouse-1"), + Fcons (intern ("mouse-2"), + Fcons (intern ("mouse-3"), + Fcons (intern ("mouse-4"), + Fcons (intern ("mouse-5"), + Qnil))))))))); Qsingle_key_description = intern ("single-key-description"); @@ -3624,3 +3627,6 @@ keys_of_keymap () initial_define_key (global_map, 033, "ESC-prefix"); initial_define_key (global_map, Ctl('X'), "Control-X-prefix"); } + +/* arch-tag: 6dd15c26-7cf1-41c4-b904-f42f7ddda463 + (do not change this comment) */ diff --git a/src/keymap.h b/src/keymap.h index 39265fe865..2a34061593 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -52,3 +52,6 @@ typedef void (*map_keymap_function_t) extern void map_keymap P_ ((Lisp_Object map, map_keymap_function_t fun, Lisp_Object largs, void* cargs, int autoload)); #endif + +/* arch-tag: 7400d5a1-ef0b-43d0-b366-f4d678bf3ba2 + (do not change this comment) */ diff --git a/src/lastfile.c b/src/lastfile.c index e93bbc6c6a..df678b4287 100644 --- a/src/lastfile.c +++ b/src/lastfile.c @@ -40,7 +40,7 @@ Boston, MA 02111-1307, USA. */ char my_edata[] = "End of Emacs initialized data"; -#ifdef WINDOWSNT +#if defined(WINDOWSNT) || defined(CYGWIN) /* Help unexec locate the end of the .bss area used by Emacs (which isn't always a separate section in NT executables). */ char my_endbss[1]; @@ -51,3 +51,6 @@ char my_endbss[1]; static char _my_endbss[1]; char * my_endbss_static = _my_endbss; #endif + +/* arch-tag: 67e81ab4-e14f-44b2-8875-c0c12252223e + (do not change this comment) */ diff --git a/src/lisp.h b/src/lisp.h index 0a3fd96584..6f248df0a3 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1,5 +1,5 @@ /* Fundamental definitions for GNU Emacs Lisp interpreter. - Copyright (C) 1985,86,87,93,94,95,97,98,1999,2000, 2001, 2002, 2003 + Copyright (C) 1985,86,87,93,94,95,97,98,1999,2000,01,02,03,2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -19,6 +19,9 @@ along with GNU Emacs; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef EMACS_LISP_H +#define EMACS_LISP_H + /* Declare the prototype for a general external function. */ #if defined (PROTOTYPES) || defined (WINDOWSNT) #define P_(proto) proto @@ -64,10 +67,6 @@ extern void die P_((const char *, const char *, int)); ? (void) 0 \ : die ((msg), __FILE__, __LINE__)), \ 0) - -/* Let's get some compile-time checking too. */ -#undef NO_UNION_TYPE - #else /* Produce same side effects and result, but don't complain. */ @@ -160,8 +159,7 @@ enum Lisp_Misc_Type /* These values are overridden by the m- file on some machines. */ #ifndef VALBITS -/* The -1 is for the markbit. */ -#define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS - 1) +#define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS) #endif #ifndef NO_UNION_TYPE @@ -180,21 +178,13 @@ union Lisp_Object struct { EMACS_INT val : VALBITS; - EMACS_INT type : GCTYPEBITS + 1; + enum Lisp_Type type : GCTYPEBITS; } s; struct { EMACS_UINT val : VALBITS; - EMACS_INT type : GCTYPEBITS + 1; + enum Lisp_Type type : GCTYPEBITS; } u; - struct - { - EMACS_UINT val : VALBITS; - enum Lisp_Type type : GCTYPEBITS; - /* The markbit is not really part of the value of a Lisp_Object, - and is always zero except during garbage collection. */ - EMACS_UINT markbit : 1; - } gu; } Lisp_Object; @@ -209,22 +199,14 @@ union Lisp_Object struct { - EMACS_INT type : GCTYPEBITS+1; + enum Lisp_Type type : GCTYPEBITS; EMACS_INT val : VALBITS; } s; struct { - EMACS_INT type : GCTYPEBITS+1; + enum Lisp_Type type : GCTYPEBITS; EMACS_UINT val : VALBITS; } u; - struct - { - /* The markbit is not really part of the value of a Lisp_Object, - and is always zero except during garbage collection. */ - EMACS_UINT markbit : 1; - enum Lisp_Type type : GCTYPEBITS; - EMACS_UINT val : VALBITS; - } gu; } Lisp_Object; @@ -254,25 +236,13 @@ LISP_MAKE_RVALUE (Lisp_Object o) #define LISP_MAKE_RVALUE(o) (0+(o)) #endif /* NO_UNION_TYPE */ -#ifndef VALMASK -#define VALMASK ((((EMACS_INT) 1)<> 1) & ~MARKBIT) +#define ARRAY_MARK_FLAG ((EMACS_INT) ((EMACS_UINT) 1 << (VALBITS + GCTYPEBITS - 1))) #endif /* no ARRAY_MARK_FLAG */ /* In the size word of a struct Lisp_Vector, this bit means it's really @@ -310,38 +280,74 @@ enum pvec_type /* For convenience, we also store the number of elements in these bits. */ #define PSEUDOVECTOR_SIZE_MASK 0x1ff +/***** Select the tagging scheme. *****/ + +/* First, try and define DECL_ALIGN(type,var) which declares a static + variable VAR of type TYPE with the added requirement that it be + TYPEBITS-aligned. */ +#if defined USE_LSB_TAG && !defined DECL_ALIGN +/* What compiler directive should we use for non-gcc compilers? -stef */ +# if defined (__GNUC__) +# define DECL_ALIGN(type, var) \ + type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var +# else +# error "USE_LSB_TAG used without defining DECL_ALIGN" +# endif +#endif + +#ifndef USE_LSB_TAG +/* Just remove the alignment annotation if we don't use it. */ +#undef DECL_ALIGN +#define DECL_ALIGN(type, var) type var +#endif + + /* These macros extract various sorts of values from a Lisp_Object. For example, if tem is a Lisp_Object whose type is Lisp_Cons, XCONS (tem) is the struct Lisp_Cons * pointing to the memory for that cons. */ #ifdef NO_UNION_TYPE +#ifdef USE_LSB_TAG + +#define TYPEMASK ((((EMACS_INT) 1) << GCTYPEBITS) - 1) +#define XTYPE(a) ((enum Lisp_Type) (((EMACS_UINT) (a)) & TYPEMASK)) +#define XINT(a) (((EMACS_INT) (a)) >> GCTYPEBITS) +#define XUINT(a) (((EMACS_UINT) (a)) >> GCTYPEBITS) +#define XSET(var, type, ptr) \ + (eassert (XTYPE (ptr) == 0), /* Check alignment. */ \ + (var) = ((EMACS_INT) (type)) | ((EMACS_INT) (ptr))) +#define make_number(N) (((EMACS_INT) (N)) << GCTYPEBITS) + +/* XFASTINT and XSETFASTINT are for use when the integer is known to be + positive, in which case the implementation can sometimes be faster + depending on the tagging scheme. With USE_LSB_TAG, there's no benefit. */ +#define XFASTINT(a) XINT (a) +#define XSETFASTINT(a, b) ((a) = make_number (b)) + +#define XPNTR(a) ((EMACS_INT) ((a) & ~TYPEMASK)) + +#else /* not USE_LSB_TAG */ + +#define VALMASK ((((EMACS_INT) 1) << VALBITS) - 1) + /* One need to override this if there must be high bits set in data space (doing the result of the below & ((1 << (GCTYPE + 1)) - 1) would work on all machines, but would penalize machines which don't need it) */ -#ifndef XTYPE -#define XTYPE(a) ((enum Lisp_Type) ((a) >> VALBITS)) -#endif - -#ifndef XSETTYPE -#define XSETTYPE(a, b) ((a) = XUINT (a) | ((EMACS_INT)(b) << VALBITS)) -#endif +#define XTYPE(a) ((enum Lisp_Type) (((EMACS_UINT) (a)) >> VALBITS)) /* For integers known to be positive, XFASTINT provides fast retrieval and XSETFASTINT provides fast storage. This takes advantage of the - fact that Lisp_Int is 0. - Beware: XFASTINT applied to a non-positive integer or to something - else than an integer should return something that preserves all the - info that was in the Lisp_Object, because it is used in EQ. */ + fact that Lisp_Int is 0. */ #define XFASTINT(a) ((a) + 0) #define XSETFASTINT(a, b) ((a) = (b)) /* Extract the value of a Lisp_Object as a signed integer. */ #ifndef XINT /* Some machines need to do this differently. */ -#define XINT(a) ((EMACS_INT) (((a) << (BITS_PER_EMACS_INT - VALBITS)) \ - >> (BITS_PER_EMACS_INT - VALBITS))) +#define XINT(a) ((((EMACS_INT) (a)) << (BITS_PER_EMACS_INT - VALBITS)) \ + >> (BITS_PER_EMACS_INT - VALBITS)) #endif /* Extract the value as an unsigned integer. This is a basis @@ -361,41 +367,13 @@ enum pvec_type #define make_number(N) \ ((((EMACS_INT) (N)) & VALMASK) | ((EMACS_INT) Lisp_Int) << VALBITS) -/* During garbage collection, XGCTYPE must be used for extracting types - so that the mark bit is ignored. XMARKBIT accesses the markbit. - Markbits are used only in particular slots of particular structure types. - Other markbits are always zero. - Outside of garbage collection, all mark bits are always zero. */ - -#ifndef XGCTYPE -#define XGCTYPE(a) ((enum Lisp_Type) (((a) >> VALBITS) & GCTYPEMASK)) -#endif - -#if VALBITS + GCTYPEBITS == BITS_PER_EMACS_INT - 1 -/* Make XMARKBIT faster if mark bit is sign bit. */ -#ifndef XMARKBIT -#define XMARKBIT(a) ((a) < 0) -#endif -#endif /* markbit is sign bit */ - -#ifndef XMARKBIT -#define XMARKBIT(a) ((a) & MARKBIT) -#endif - -#ifndef XMARK -#define XMARK(a) ((a) |= MARKBIT) -#endif +#endif /* not USE_LSB_TAG */ -#ifndef XUNMARK -#define XUNMARK(a) ((a) &= ~MARKBIT) -#endif +#define EQ(x, y) ((x) == (y)) -#endif /* NO_UNION_TYPE */ - -#ifndef NO_UNION_TYPE +#else /* not NO_UNION_TYPE */ #define XTYPE(a) ((enum Lisp_Type) (a).u.type) -#define XSETTYPE(a, b) ((a).u.type = (char) (b)) /* For integers known to be positive, XFASTINT provides fast retrieval and XSETFASTINT provides fast storage. This takes advantage of the @@ -423,18 +401,20 @@ enum pvec_type extern Lisp_Object make_number (); #endif +#define EQ(x, y) ((x).s.val == (y).s.val) + +#endif /* NO_UNION_TYPE */ + /* During garbage collection, XGCTYPE must be used for extracting types - so that the mark bit is ignored. XMARKBIT access the markbit. + so that the mark bit is ignored. XMARKBIT accesses the markbit. Markbits are used only in particular slots of particular structure types. Other markbits are always zero. Outside of garbage collection, all mark bits are always zero. */ -#define XGCTYPE(a) ((a).gu.type) -#define XMARKBIT(a) ((a).gu.markbit) -#define XMARK(a) (XMARKBIT(a) = 1) -#define XUNMARK(a) (XMARKBIT(a) = 0) - -#endif /* NO_UNION_TYPE */ +#ifndef XGCTYPE +/* The distinction does not exist now that the MARKBIT has been eliminated. */ +#define XGCTYPE(a) XTYPE (a) +#endif #ifndef XPNTR #ifdef HAVE_SHM @@ -461,6 +441,9 @@ extern size_t pure_size; #define MOST_NEGATIVE_FIXNUM - ((EMACS_INT) 1 << (VALBITS - 1)) #define MOST_POSITIVE_FIXNUM (((EMACS_INT) 1 << (VALBITS - 1)) - 1) +/* Mask indicating the significant bits of a Lisp_Int. + I.e. (x & INTMASK) == XUINT (make_number (x)). */ +#define INTMASK ((((EMACS_INT) 1) << VALBITS) - 1) /* Value is non-zero if C integer I doesn't fit into a Lisp fixnum. */ @@ -1031,15 +1014,6 @@ struct Lisp_Hash_Table /* These structures are used for various misc types. */ -/* A miscellaneous object, when it's on the free list. */ -struct Lisp_Free - { - int type : 16; /* = Lisp_Misc_Free */ - unsigned gcmarkbit : 1; - int spacer : 15; - union Lisp_Misc *chain; - }; - struct Lisp_Marker { int type : 16; /* = Lisp_Misc_Marker */ @@ -1204,6 +1178,22 @@ struct Lisp_Save_Value }; +/* A miscellaneous object, when it's on the free list. */ +struct Lisp_Free + { + int type : 16; /* = Lisp_Misc_Free */ + unsigned gcmarkbit : 1; + int spacer : 15; + union Lisp_Misc *chain; +#ifdef USE_LSB_TAG + /* Try to make sure that sizeof(Lisp_Misc) preserves TYPEBITS-alignment. + This assumes that Lisp_Marker is the largest of the alternatives and + that Lisp_Intfwd has the same size as "Lisp_Free w/o padding". */ + char padding[((((sizeof (struct Lisp_Marker) - 1) >> GCTYPEBITS) + 1) + << GCTYPEBITS) - sizeof (struct Lisp_Intfwd)]; +#endif + }; + /* To get the type field of a union Lisp_Misc, use XMISCTYPE. It uses one of these struct subtypes to get the type field. */ @@ -1363,7 +1353,7 @@ typedef unsigned char UCHAR; #define GC_NATNUMP(x) (GC_INTEGERP (x) && XINT (x) >= 0) #define INTEGERP(x) (XTYPE ((x)) == Lisp_Int) -#define GC_INTEGERP(x) (XGCTYPE ((x)) == Lisp_Int) +#define GC_INTEGERP(x) INTEGERP (x) #define SYMBOLP(x) (XTYPE ((x)) == Lisp_Symbol) #define GC_SYMBOLP(x) (XGCTYPE ((x)) == Lisp_Symbol) #define MISCP(x) (XTYPE ((x)) == Lisp_Misc) @@ -1434,9 +1424,11 @@ typedef unsigned char UCHAR; #define FRAMEP(x) PSEUDOVECTORP (x, PVEC_FRAME) #define GC_FRAMEP(x) GC_PSEUDOVECTORP (x, PVEC_FRAME) +/* Test for image (image . spec) */ +#define IMAGEP(x) (CONSP (x) && EQ (XCAR (x), Qimage)) + -#define EQ(x, y) (XFASTINT (x) == XFASTINT (y)) -#define GC_EQ(x, y) (XGCTYPE (x) == XGCTYPE (y) && XPNTR (x) == XPNTR (y)) +#define GC_EQ(x, y) EQ (x, y) #define CHECK_LIST(x) \ do { if (!CONSP ((x)) && !NILP (x)) x = wrong_type_argument (Qlistp, (x)); } while (0) @@ -1581,7 +1573,7 @@ typedef unsigned char UCHAR; #define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \ Lisp_Object fnname (); \ - struct Lisp_Subr sname = \ + DECL_ALIGN (struct Lisp_Subr, sname) = \ { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ fnname, minargs, maxargs, lname, prompt, 0}; \ Lisp_Object fnname @@ -1592,7 +1584,7 @@ typedef unsigned char UCHAR; arguments, so we can catch errors with maxargs at compile-time. */ #define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \ Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ - struct Lisp_Subr sname = \ + DECL_ALIGN (struct Lisp_Subr, sname) = \ { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ fnname, minargs, maxargs, lname, prompt, 0}; \ Lisp_Object fnname @@ -1739,6 +1731,22 @@ extern char *stack_bottom; This is a good thing to do around a loop that has no side effects and (in particular) cannot call arbitrary Lisp code. */ +#ifdef SYNC_INPUT +extern void handle_async_input P_ ((void)); +extern int interrupt_input_pending; +#define QUIT \ + do { \ + if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ + { \ + Vquit_flag = Qnil; \ + Fsignal (Qquit, Qnil); \ + } \ + else if (interrupt_input_pending) \ + handle_async_input (); \ + } while (0) + +#else /* not SYNC_INPUT */ + #define QUIT \ do { \ if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ @@ -1748,6 +1756,9 @@ extern char *stack_bottom; } \ } while (0) +#endif /* not SYNC_INPUT */ + + /* Nonzero if ought to quit now. */ #define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) @@ -2019,28 +2030,32 @@ extern Lisp_Object Qerror, Qquit, Qwrong_type_argument, Qargs_out_of_range; extern Lisp_Object Qvoid_variable, Qvoid_function; extern Lisp_Object Qsetting_constant, Qinvalid_read_syntax; extern Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch; -extern Lisp_Object Qend_of_file, Qarith_error; +extern Lisp_Object Qend_of_file, Qarith_error, Qmark_inactive; extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only; -extern Lisp_Object Qmark_inactive, Qtext_read_only; - -extern Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error; -extern Lisp_Object Qoverflow_error, Qunderflow_error; +extern Lisp_Object Qtext_read_only; -extern Lisp_Object Qintegerp, Qnumberp, Qnatnump, Qwholenump; -extern Lisp_Object Qsymbolp, Qlistp, Qconsp; +extern Lisp_Object Qintegerp, Qnatnump, Qwholenump, Qsymbolp, Qlistp, Qconsp; extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp; -extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qvectorp; -extern Lisp_Object Qinteger_or_marker_p, Qnumber_or_marker_p; -extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p; -extern Lisp_Object Qboundp, Qfboundp; +extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp; extern Lisp_Object Qbuffer_or_string_p; +extern Lisp_Object Qboundp, Qfboundp; +extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p; + extern Lisp_Object Qcdr; -extern Lisp_Object Qfloatp, Qinteger_or_floatp, Qinteger_or_float_or_marker_p; +extern Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error; +extern Lisp_Object Qoverflow_error, Qunderflow_error; -extern Lisp_Object Qframep; +extern Lisp_Object Qfloatp; +extern Lisp_Object Qnumberp, Qnumber_or_marker_p; + +extern Lisp_Object Qinteger; extern void circular_list_error P_ ((Lisp_Object)); +EXFUN (Finteractive_form, 1); + +/* Defined in frame.c */ +extern Lisp_Object Qframep; EXFUN (Feq, 2); EXFUN (Fnull, 1); @@ -2293,6 +2308,15 @@ EXFUN (Ftruncate, 2); extern void init_floatfns P_ ((void)); extern void syms_of_floatfns P_ ((void)); +/* Defined in fringe.c */ +extern void syms_of_fringe P_ ((void)); +extern void init_fringe P_ ((void)); +extern void init_fringe_once P_ ((void)); + +/* Defined in image.c */ +extern void syms_of_image P_ ((void)); +extern void init_image P_ ((void)); + /* Defined in insdel.c */ extern Lisp_Object Qinhibit_modification_hooks; extern void move_gap P_ ((int)); @@ -2347,6 +2371,7 @@ extern Lisp_Object Qinhibit_point_motion_hooks; extern Lisp_Object Qinhibit_redisplay, Qdisplay; extern Lisp_Object Qinhibit_eval_during_redisplay; extern Lisp_Object Qmessage_truncate_lines; +extern Lisp_Object Qimage; extern Lisp_Object Vmessage_log_max; extern int message_enable_multibyte; extern Lisp_Object echo_area_buffer[2]; @@ -2377,7 +2402,6 @@ extern void redisplay P_ ((void)); extern int check_point_in_composition P_ ((struct buffer *, int, struct buffer *, int)); extern void redisplay_preserve_echo_area P_ ((int)); -extern void mark_window_display_accurate P_ ((Lisp_Object, int)); extern void prepare_menu_bars P_ ((void)); void set_frame_cursor_types P_ ((struct frame *, Lisp_Object)); @@ -2673,7 +2697,7 @@ EXFUN (Foverlay_start, 1); EXFUN (Foverlay_end, 1); extern void adjust_overlays_for_insert P_ ((EMACS_INT, EMACS_INT)); extern void adjust_overlays_for_delete P_ ((EMACS_INT, EMACS_INT)); -extern void fix_overlays_in_range P_ ((int, int)); +extern void fix_start_end_in_overlays P_ ((int, int)); extern void report_overlay_modification P_ ((Lisp_Object, Lisp_Object, int, Lisp_Object, Lisp_Object, Lisp_Object)); extern int overlay_touches_p P_ ((int)); @@ -3019,7 +3043,6 @@ extern Lisp_Object next_single_char_property_change P_ ((Lisp_Object, EXFUN (Fx_popup_menu, 2); EXFUN (Fx_popup_dialog, 2); extern void syms_of_xmenu P_ ((void)); -extern int popup_activated_flag; /* defined in sysdep.c */ extern void stuff_char P_ ((char c)); @@ -3069,7 +3092,7 @@ extern void syms_of_category P_ ((void)); extern void syms_of_ccl P_ ((void)); /* Defined in dired.c */ -EXFUN (Ffile_attributes, 1); +EXFUN (Ffile_attributes, 2); extern void syms_of_dired P_ ((void)); /* Defined in term.c */ @@ -3092,7 +3115,6 @@ extern int getloadavg P_ ((double *, int)); #ifdef HAVE_X_WINDOWS /* Defined in xfns.c */ extern void syms_of_xfns P_ ((void)); -extern void init_xfns P_ ((void)); extern Lisp_Object Vx_resource_name; extern Lisp_Object Vx_resource_class; EXFUN (Fxw_display_color_p, 1); @@ -3205,3 +3227,8 @@ extern Lisp_Object Vdirectory_sep_char; (FIXNUM_OVERFLOW_P (val) \ ? make_float (val) \ : make_number ((EMACS_INT)(val))) + +#endif /* EMACS_LISP_H */ + +/* arch-tag: 9b2ed020-70eb-47ac-94ee-e1c2a5107d5e + (do not change this comment) */ diff --git a/src/lread.c b/src/lread.c index 256df2776a..dd6e3f322a 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1,5 +1,5 @@ /* Lisp parsing and input streams. - Copyright (C) 1985, 86, 87, 88, 89, 93, 94, 95, 97, 98, 99, 2000, 01, 2003 + Copyright (C) 1985,86,87,88,89,93,94,95,97,98,99,2000,01,03,2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -3633,7 +3633,6 @@ defvar_per_buffer (namestring, address, type, doc) { Lisp_Object sym, val; int offset; - extern struct buffer buffer_local_symbols; sym = intern (namestring); val = allocate_misc (); @@ -4114,3 +4113,6 @@ to load. See also `load-dangerous-libraries'. */); Vloads_in_progress = Qnil; staticpro (&Vloads_in_progress); } + +/* arch-tag: a0d02733-0f96-4844-a659-9fd53c4f414d + (do not change this comment) */ diff --git a/src/m/7300.h b/src/m/7300.h index 3db16e67fb..17dde0c918 100644 --- a/src/m/7300.h +++ b/src/m/7300.h @@ -92,3 +92,6 @@ Boston, MA 02111-1307, USA. */ /* Insist on using cc when compiling this. GCC may have been configured to use GAS syntax, which causes problems. */ #define CRT0_COMPILE cc -c -O -Demacs + +/* arch-tag: 66219dc7-ef45-4f0c-bb98-f35421f39c8d + (do not change this comment) */ diff --git a/src/m/acorn.h b/src/m/acorn.h index 38b148b3d2..6f0a77be44 100644 --- a/src/m/acorn.h +++ b/src/m/acorn.h @@ -179,3 +179,6 @@ do this yet #endif + +/* arch-tag: acee2955-8c49-4b40-813c-579f76f4c0c3 + (do not change this comment) */ diff --git a/src/m/alliant-2800.h b/src/m/alliant-2800.h index dabad592c3..213af43266 100644 --- a/src/m/alliant-2800.h +++ b/src/m/alliant-2800.h @@ -124,3 +124,6 @@ unexec_text_start = hdr.a_text_addr;} /* Use the K&R version of the DEFUN macro. */ #define USE_NONANSI_DEFUN + +/* arch-tag: 8ba70b15-d082-40f6-931d-14adfd7f9dbd + (do not change this comment) */ diff --git a/src/m/alliant.h b/src/m/alliant.h index 3b79a3c170..c9c1c70cc9 100644 --- a/src/m/alliant.h +++ b/src/m/alliant.h @@ -117,3 +117,6 @@ unexec_text_start = hdr.a_text_addr;} a variable name causes errors when compiling under ANSI C. */ #define vector xxvector + +/* arch-tag: 0ad5f932-f29a-4458-a24c-496cafdfd50d + (do not change this comment) */ diff --git a/src/m/alliant1.h b/src/m/alliant1.h index 2e061227b4..ca597ac276 100644 --- a/src/m/alliant1.h +++ b/src/m/alliant1.h @@ -7,3 +7,6 @@ #define ALLIANT_1 #include "alliant.h" + +/* arch-tag: 516688f9-4b94-4356-9bf0-92b2d72e664e + (do not change this comment) */ diff --git a/src/m/alliant4.h b/src/m/alliant4.h index 7e24c53eb8..2ab0a6bde1 100644 --- a/src/m/alliant4.h +++ b/src/m/alliant4.h @@ -22,3 +22,6 @@ /* include for the definition of LOADAVG_SCALE, and also LOADAVG_SIZE, the number of items in the Loadavg array. */ + +/* arch-tag: cf917b55-c95e-4079-a4d1-d31e00c61b66 + (do not change this comment) */ diff --git a/src/m/alpha.h b/src/m/alpha.h index b37116b0d4..3e1d378b29 100644 --- a/src/m/alpha.h +++ b/src/m/alpha.h @@ -149,3 +149,6 @@ NOTE-END Define DBL_MIN_REPLACEMENT to be the next value larger than DBL_MIN: this avoids the assembler bug. */ #define DBL_MIN_REPLACEMENT 2.2250738585072019e-308 + +/* arch-tag: 978cb578-1e25-4a60-819b-adae0972aa78 + (do not change this comment) */ diff --git a/src/m/altos.h b/src/m/altos.h index 654acc1d5c..b71d006f24 100644 --- a/src/m/altos.h +++ b/src/m/altos.h @@ -53,3 +53,6 @@ Boston, MA 02111-1307, USA. */ #ifdef __GNUC__ #define COFF_ENCAPSULATE #endif + +/* arch-tag: 4572d0ff-70bb-445f-80f1-2bbac3cf47cb + (do not change this comment) */ diff --git a/src/m/amdahl.h b/src/m/amdahl.h index 4e64d0dca8..37cb8c0d36 100644 --- a/src/m/amdahl.h +++ b/src/m/amdahl.h @@ -134,3 +134,6 @@ extern int sign_extend_temp; /* Compensate for error in signal.h. */ #define NSIG_MINIMUM 20 + +/* arch-tag: cf665976-ddb1-49b0-b383-371e17f36acf + (do not change this comment) */ diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h index 8043ca0178..0192afc9d4 100644 --- a/src/m/amdx86-64.h +++ b/src/m/amdx86-64.h @@ -97,20 +97,14 @@ Boston, MA 02111-1307, USA. */ #define PNTR_COMPARISON_TYPE unsigned long -/* On the 64 bit architecture, we can use 60 bits for addresses */ - -#define VALBITS 60 - -/* Define XINT and XUINT so that they can take arguments of type int */ -#define XINT(a) (((long) (a) << (BITS_PER_LONG - VALBITS)) >> (BITS_PER_LONG - VALBITS)) -#define XUINT(a) ((long) (a) & VALMASK) - /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */ - -#define XPNTR(a) XUINT (a) +#undef DATA_SEG_BITS #undef START_FILES #define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o #undef LIB_STANDARD #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o + +/* arch-tag: 8a5e001d-e12e-4692-a3a6-0b15ba271c6e + (do not change this comment) */ diff --git a/src/m/apollo.h b/src/m/apollo.h index 83af7496e0..e28ffef337 100644 --- a/src/m/apollo.h +++ b/src/m/apollo.h @@ -90,3 +90,6 @@ Boston, MA 02111-1307, USA. */ /* In SR10.4, unistd.h has bad prototype for getpgrp, so we don't include it. */ #undef HAVE_UNISTD_H + +/* arch-tag: 33336588-6242-4e2e-a194-e38848b12813 + (do not change this comment) */ diff --git a/src/m/arm.h b/src/m/arm.h index 4dafe6819f..d3a95521e7 100644 --- a/src/m/arm.h +++ b/src/m/arm.h @@ -48,3 +48,6 @@ Boston, MA 02111-1307, USA. */ #define NO_UNION_TYPE #define NO_REMAP + +/* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42 + (do not change this comment) */ diff --git a/src/m/att3b.h b/src/m/att3b.h index 46b101dfa4..559ac2f3c6 100644 --- a/src/m/att3b.h +++ b/src/m/att3b.h @@ -144,3 +144,6 @@ extern int sign_extend_temp; /* This affects filemode.c. */ #define NO_MODE_T + +/* arch-tag: 07441a37-d630-447f-94fa-7da19645c97a + (do not change this comment) */ diff --git a/src/m/aviion-intel.h b/src/m/aviion-intel.h index 1f422ac071..eb93a43214 100644 --- a/src/m/aviion-intel.h +++ b/src/m/aviion-intel.h @@ -17,3 +17,6 @@ #endif #undef m88k /* It sure is NOT a Motorola machine */ + +/* arch-tag: 7cbf89ef-237c-4da5-bdd0-8d569ae5f3ce + (do not change this comment) */ diff --git a/src/m/aviion.h b/src/m/aviion.h index c86eb85d02..7705ef645f 100644 --- a/src/m/aviion.h +++ b/src/m/aviion.h @@ -121,3 +121,5 @@ Boston, MA 02111-1307, USA. */ #define SECTION_ALIGNMENT 0x7 +/* arch-tag: 9de8e6ed-ddd8-4480-8308-17ddd7c86559 + (do not change this comment) */ diff --git a/src/m/celerity.h b/src/m/celerity.h index c38d144d9b..55beedb7c4 100644 --- a/src/m/celerity.h +++ b/src/m/celerity.h @@ -54,3 +54,6 @@ Boston, MA 02111-1307, USA. */ /* (short) negative-int doesn't sign-extend correctly */ #define SHORT_CAST_BUG + +/* arch-tag: b4df1828-fab6-48f8-97bc-b8998c200eea + (do not change this comment) */ diff --git a/src/m/clipper.h b/src/m/clipper.h index 8391d7237e..dc4dd0c2df 100644 --- a/src/m/clipper.h +++ b/src/m/clipper.h @@ -92,3 +92,6 @@ Boston, MA 02111-1307, USA. */ #endif /* USG */ #define LD_TEXT_START_ADDR 8000 + +/* arch-tag: 2f7981c1-7018-4a1e-b7b6-b2900de36a04 + (do not change this comment) */ diff --git a/src/m/cnvrgnt.h b/src/m/cnvrgnt.h index 5f76da4bb2..d44eff6700 100644 --- a/src/m/cnvrgnt.h +++ b/src/m/cnvrgnt.h @@ -91,3 +91,6 @@ Boston, MA 02111-1307, USA. */ Cause crt0.c to define errno. */ #define NEED_ERRNO + +/* arch-tag: 1a227f79-37e4-43af-a186-53c61296b0be + (do not change this comment) */ diff --git a/src/m/convex.h b/src/m/convex.h index 29797fc131..a871d4ac21 100644 --- a/src/m/convex.h +++ b/src/m/convex.h @@ -183,3 +183,6 @@ Boston, MA 02111-1307, USA. */ /* There is some indication that the convex has sys/wait.h but it does not work right. */ #undef HAVE_SYS_WAIT_H + +/* arch-tag: 127e5ae1-4f03-40c0-a87e-d2cb02c59de8 + (do not change this comment) */ diff --git a/src/m/cydra5.h b/src/m/cydra5.h index 7f227e36df..12b757305b 100644 --- a/src/m/cydra5.h +++ b/src/m/cydra5.h @@ -111,3 +111,6 @@ Boston, MA 02111-1307, USA. */ /* We can't do interrupt-driven input, so don't let user try. */ #define BROKEN_SIGIO + +/* arch-tag: ad70aae4-1f54-4e67-8677-6eeafb9bcbd9 + (do not change this comment) */ diff --git a/src/m/delta88k.h b/src/m/delta88k.h index 0b574ef0ca..89889824fd 100644 --- a/src/m/delta88k.h +++ b/src/m/delta88k.h @@ -157,3 +157,6 @@ Boston, MA 02111-1307, USA. */ #define NO_PTY_H #define USE_GETOBAUD + +/* arch-tag: c8ea1965-99d7-43df-ba32-29b66fc069be + (do not change this comment) */ diff --git a/src/m/dpx2.h b/src/m/dpx2.h index 282c4bd877..1a2b99cdff 100644 --- a/src/m/dpx2.h +++ b/src/m/dpx2.h @@ -217,3 +217,5 @@ Boston, MA 02111-1307, USA. */ /* end of dpx2.h */ +/* arch-tag: 8cfdf817-aec7-4d99-a00d-0e77615e8e1b + (do not change this comment) */ diff --git a/src/m/dual.h b/src/m/dual.h index d00a30d934..392cb64eb4 100644 --- a/src/m/dual.h +++ b/src/m/dual.h @@ -67,3 +67,6 @@ NOTE-END */ /* Change some things to avoid bugs in compiler */ #define SWITCH_ENUM_BUG 1 + +/* arch-tag: 7208d63c-9a23-469e-a9b1-908ac912c743 + (do not change this comment) */ diff --git a/src/m/elxsi.h b/src/m/elxsi.h index b392e07c5f..1795d9815d 100644 --- a/src/m/elxsi.h +++ b/src/m/elxsi.h @@ -127,3 +127,6 @@ Boston, MA 02111-1307, USA. */ extern int _init_brk;\ _init_brk = bss_start;\ } + +/* arch-tag: 73bf1120-a994-4c29-8d60-af425d8bf10c + (do not change this comment) */ diff --git a/src/m/ews4800.h b/src/m/ews4800.h index 5f5f9cae00..b782542348 100644 --- a/src/m/ews4800.h +++ b/src/m/ews4800.h @@ -36,3 +36,6 @@ Boston, MA 02111-1307, USA. */ #undef C_DEBUG_SWITCH #define C_DEBUG_SWITCH -O -KOlimit=3000 -ZXNd=5000 #endif /* !__GNUC__ */ + +/* arch-tag: 27f72f54-45cd-40a3-b182-345127f04955 + (do not change this comment) */ diff --git a/src/m/f301.h b/src/m/f301.h index 1ec0b22138..c427c19e05 100644 --- a/src/m/f301.h +++ b/src/m/f301.h @@ -5,3 +5,6 @@ USUAL-OPSYS="uxpv" */ #include "delta88k.h" + +/* arch-tag: a0ed4f18-ecf2-4d9a-853b-36e0f6b45945 + (do not change this comment) */ diff --git a/src/m/gould-np1.h b/src/m/gould-np1.h index fcbeac3b6c..145d682afb 100644 --- a/src/m/gould-np1.h +++ b/src/m/gould-np1.h @@ -103,3 +103,5 @@ Boston, MA 02111-1307, USA. */ #endif +/* arch-tag: cdfd3dbf-a5e4-464d-8cef-985fb7872873 + (do not change this comment) */ diff --git a/src/m/gould.h b/src/m/gould.h index af77843a9f..eeac2aef2f 100644 --- a/src/m/gould.h +++ b/src/m/gould.h @@ -183,3 +183,6 @@ NOTE-END */ with `environ' the way most standard crt0.o's do. */ #define START_FILES pre-crt0.o /lib/crt0.o + +/* arch-tag: 930cb9ef-f56f-4c06-aea0-5e81103bbf58 + (do not change this comment) */ diff --git a/src/m/hp800.h b/src/m/hp800.h index bc51b31836..8f08ed3b61 100644 --- a/src/m/hp800.h +++ b/src/m/hp800.h @@ -67,12 +67,6 @@ Boston, MA 02111-1307, USA. */ #define XSET(var, type, ptr) \ ((var) = ((int)(type) << VALBITS) + (((unsigned) (ptr) << BITS_PER_INT-VALBITS) >> BITS_PER_INT-VALBITS)) - -#define XMARKBIT(a) ((a) < 0) - -#if 0 /* Loses when sign bit of type field is set. */ -#define XUNMARK(a) ((a) = (((a) << BITS_PER_INT-GCTYPEBITS-VALBITS) >> BITS_PER_INT-GCTYPEBITS-VALBITS)) -#endif /* Common definitions for HPUX and GNU/Linux. */ @@ -179,3 +173,6 @@ Boston, MA 02111-1307, USA. */ #define rindex strrchr #endif /* __hpux */ + +/* arch-tag: 809436e6-1645-4b92-b40d-2de5d6e7227c + (do not change this comment) */ diff --git a/src/m/hp9000s300.h b/src/m/hp9000s300.h index ad4ca11166..24c9a521d0 100644 --- a/src/m/hp9000s300.h +++ b/src/m/hp9000s300.h @@ -222,3 +222,6 @@ NOTE-END */ #endif #endif /* not BSD4_3 */ + +/* arch-tag: 6e0001a5-ed62-4258-9235-204348f6bdb9 + (do not change this comment) */ diff --git a/src/m/i860.h b/src/m/i860.h index 4822253838..9d56b886f6 100644 --- a/src/m/i860.h +++ b/src/m/i860.h @@ -95,3 +95,6 @@ Boston, MA 02111-1307, USA. */ #define SVR4 #endif #endif + +/* arch-tag: 99f3a078-95e1-49d6-8666-04726eb25647 + (do not change this comment) */ diff --git a/src/m/ia64.h b/src/m/ia64.h index a765fab154..7114382d51 100644 --- a/src/m/ia64.h +++ b/src/m/ia64.h @@ -119,15 +119,6 @@ Boston, MA 02111-1307, USA. */ #define PNTR_COMPARISON_TYPE unsigned long -/* On the 64 bit architecture, we can use 60 bits for addresses */ - -#define VALBITS 60 - -/* Define XINT and XUINT so that they can take arguments of type int */ - -#define XINT(a) (((long) (a) << (BITS_PER_LONG - VALBITS)) >> (BITS_PER_LONG - VALBITS)) -#define XUINT(a) ((long) (a) & VALMASK) - #ifndef NOT_C_CODE #ifdef REL_ALLOC @@ -145,3 +136,6 @@ extern void r_alloc_free (); #define DATA_SEG_BITS 0x6000000000000000 #define HAVE_TEXT_START + +/* arch-tag: 9b8e9fb2-2e49-4c22-b68f-11a488e77c66 + (do not change this comment) */ diff --git a/src/m/ibm370aix.h b/src/m/ibm370aix.h index 32dc30089a..3fb228afa1 100644 --- a/src/m/ibm370aix.h +++ b/src/m/ibm370aix.h @@ -53,3 +53,6 @@ Boston, MA 02111-1307, USA. */ #undef LD_SWITCH_MACHINE #define LD_SWITCH_MACHINE -xa + +/* arch-tag: 8605b600-0580-4e49-9ba9-8b4a977f860a + (do not change this comment) */ diff --git a/src/m/ibmps2-aix.h b/src/m/ibmps2-aix.h index a29d916451..eb843ffe71 100644 --- a/src/m/ibmps2-aix.h +++ b/src/m/ibmps2-aix.h @@ -230,3 +230,6 @@ so disable it for them. */ #define LD_SWITCH_MACHINE -shlib #endif #endif + +/* arch-tag: 2e7f44df-6a61-4a47-aa53-f7961bfeff11 + (do not change this comment) */ diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h index 650530bf4c..5be14b0488 100644 --- a/src/m/ibmrs6000.h +++ b/src/m/ibmrs6000.h @@ -182,3 +182,6 @@ Boston, MA 02111-1307, USA. */ #define NLIST_STRUCT #endif #endif /* USG5_4 */ + +/* arch-tag: 028318ee-a7ae-4a08-804d-cc1e6588d003 + (do not change this comment) */ diff --git a/src/m/ibmrs6000.inp b/src/m/ibmrs6000.inp index d28a3aedae..d7f3fddaf6 100644 --- a/src/m/ibmrs6000.inp +++ b/src/m/ibmrs6000.inp @@ -1,2 +1,4 @@ #! pthread_yield + +# arch-tag: fc6d01ea-c488-4862-bbdb-e8d3e0f6fdb3 diff --git a/src/m/ibmrt-aix.h b/src/m/ibmrt-aix.h index 2680323895..8bce9fb6f6 100644 --- a/src/m/ibmrt-aix.h +++ b/src/m/ibmrt-aix.h @@ -159,3 +159,6 @@ Boston, MA 02111-1307, USA. */ /* rocky@watson.ibm.com says this is needed. */ #define HAVE_FTIME + +/* arch-tag: eea85307-0ca9-4a9c-a4f6-89fad7591d28 + (do not change this comment) */ diff --git a/src/m/ibmrt.h b/src/m/ibmrt.h index 587729e141..9c26264057 100644 --- a/src/m/ibmrt.h +++ b/src/m/ibmrt.h @@ -117,3 +117,6 @@ Boston, MA 02111-1307, USA. */ /* Use the bitmap files that come with Emacs. */ #define EMACS_BITMAP_FILES + +/* arch-tag: 89aa7e7d-593e-432c-966a-3db6aa2ad665 + (do not change this comment) */ diff --git a/src/m/ibms390.h b/src/m/ibms390.h index 711681267a..8797a49d30 100644 --- a/src/m/ibms390.h +++ b/src/m/ibms390.h @@ -111,3 +111,6 @@ Boston, MA 02111-1307, USA. */ If you've just fixed a problem in an existing configuration file, you should also check `etc/MACHINES' to make sure its descriptions of known problems in that configuration should be updated. */ + +/* arch-tag: d8a0ffa4-a8f0-4736-90d3-7fd7b21b8314 + (do not change this comment) */ diff --git a/src/m/intel386.h b/src/m/intel386.h index 7f9f616d25..e240beb91a 100644 --- a/src/m/intel386.h +++ b/src/m/intel386.h @@ -212,3 +212,6 @@ NOTE-END */ #define SEGMENT_MASK ((SEGMENT_SIZE)-1) #endif + +/* arch-tag: 746338f0-cb7b-4f49-a98c-cb50817cf2ec + (do not change this comment) */ diff --git a/src/m/iris4d.h b/src/m/iris4d.h index 457f359463..8d3b7a883b 100644 --- a/src/m/iris4d.h +++ b/src/m/iris4d.h @@ -1,5 +1,5 @@ /* machine description file for Iris-4D machines. Use with s/irix*.h. - Copyright (C) 1987, 2002 Free Software Foundation, Inc. + Copyright (C) 1987, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -159,7 +159,10 @@ Boston, MA 02111-1307, USA. */ #undef FIRST_PTY_LETTER #define FIRST_PTY_LETTER 'q' -#ifndef _LP64 +#if _MIPS_SZLONG != 64 +/* fixme: should there be 64-bit defiitions? (The ones below aren't + OK.) */ + /* The standard definitions of these macros would work ok, but these are faster because the constants are short. */ @@ -167,8 +170,6 @@ Boston, MA 02111-1307, USA. */ #define XSET(var, type, ptr) \ ((var) = ((int)(type) << VALBITS) + (((unsigned) (ptr) << BITS_PER_INT-VALBITS) >> BITS_PER_INT-VALBITS)) - -#define XUNMARK(a) ((a) = (((unsigned)(a) << BITS_PER_INT-GCTYPEBITS-VALBITS) >> BITS_PER_INT-GCTYPEBITS-VALBITS)) #endif /* _LP64 */ #ifndef __GNUC__ @@ -185,3 +186,6 @@ Boston, MA 02111-1307, USA. */ #endif #endif /* not __GNUC__ */ + +/* arch-tag: fff5e139-9ae0-465d-afec-837c41ea0aa6 + (do not change this comment) */ diff --git a/src/m/irist.h b/src/m/irist.h index b365371324..d2b9dd2831 100644 --- a/src/m/irist.h +++ b/src/m/irist.h @@ -130,3 +130,6 @@ NOTE-END */ #define internal_with_output_to_temp_buffer stupid_long_name1 #define Finsert_abbrev_table_description stupid_long_name2 + +/* arch-tag: 4076b26c-1fe6-4c28-94f3-3c863f074767 + (do not change this comment) */ diff --git a/src/m/is386.h b/src/m/is386.h index 0c89fdf91c..02fe12d93e 100644 --- a/src/m/is386.h +++ b/src/m/is386.h @@ -25,3 +25,6 @@ NOTE-END */ #define LIBX11_MACHINE -lnsl_s #define LIBS_DEBUG -lg + +/* arch-tag: b6b7e6ec-8b6c-440b-b9c8-961e4bebf0cf + (do not change this comment) */ diff --git a/src/m/isi-ov.h b/src/m/isi-ov.h index a1ab808923..ef481e13f2 100644 --- a/src/m/isi-ov.h +++ b/src/m/isi-ov.h @@ -90,3 +90,6 @@ NOTE-END */ #define LIB_STANDARD -lmc -lc #define C_DEBUG_SWITCH -20 -O -X23 #endif + +/* arch-tag: 3bfb5a11-d94e-4372-923b-9f47d0851f42 + (do not change this comment) */ diff --git a/src/m/m68k.h b/src/m/m68k.h index 3391bb1780..ce7b268bbe 100644 --- a/src/m/m68k.h +++ b/src/m/m68k.h @@ -81,3 +81,6 @@ Boston, MA 02111-1307, USA. */ #define NO_REMAP #define TEXT_START 0 #endif + +/* arch-tag: 4eadd161-b4e8-4b82-82a1-e4ce7f42969d + (do not change this comment) */ diff --git a/src/m/macppc.h b/src/m/macppc.h index 6f8f841a46..21ba90ad10 100644 --- a/src/m/macppc.h +++ b/src/m/macppc.h @@ -104,3 +104,6 @@ Boston, MA 02111-1307, USA. */ #endif #endif #endif /* 0 */ + +/* arch-tag: 41913e4e-e7d1-4023-aadb-210cc31712ed + (do not change this comment) */ diff --git a/src/m/masscomp.h b/src/m/masscomp.h index 0b045794e4..34ea78696c 100644 --- a/src/m/masscomp.h +++ b/src/m/masscomp.h @@ -116,3 +116,6 @@ Boston, MA 02111-1307, USA. */ #define ADJUST_EXEC_HEADER \ hdr.a_stamp = STAMP13; /* really want the latest stamp, whatever it is */ + +/* arch-tag: 572bf8d1-7a94-48c6-b188-bf69754e0cd2 + (do not change this comment) */ diff --git a/src/m/mega68.h b/src/m/mega68.h index fccd495e0d..e86a504868 100644 --- a/src/m/mega68.h +++ b/src/m/mega68.h @@ -47,3 +47,6 @@ Boston, MA 02111-1307, USA. */ /* Convert that into an integer that is 100 for a load average of 1.0 */ #define LOAD_AVE_CVT(x) ((int) ((x) * 100.0)) + +/* arch-tag: 61e6deb4-a93e-444b-bbd5-9887a83f1bbc + (do not change this comment) */ diff --git a/src/m/mg1.h b/src/m/mg1.h index bf6e708bd7..5a6250c3c3 100644 --- a/src/m/mg1.h +++ b/src/m/mg1.h @@ -101,3 +101,6 @@ NOTE-END */ /* Avoids a compiler bug */ /* borrowed from sequent.h */ + +/* arch-tag: e15d9072-9e1a-44bf-8add-966be535967b + (do not change this comment) */ diff --git a/src/m/mips-siemens.h b/src/m/mips-siemens.h index d0935ce616..11b1f971d2 100644 --- a/src/m/mips-siemens.h +++ b/src/m/mips-siemens.h @@ -1,5 +1,5 @@ /* m- file for Mips machines. - Copyright (C) 1987, 1992, 1993, 1995, 2002 Free Software Foundation, Inc. + Copyright (C) 1987,1992,1993,95,2002,03 Free Software Foundation, Inc. This file contains some changes for our SVR4 based SINIX-Mips 5.4. I hope this is helpful to port the emacs to our RM?00 series and @@ -158,8 +158,5 @@ NOTE-END */ ((int)(type) << VALBITS) \ + (((unsigned) (ptr) << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS))) -#define XUNMARK(a) \ - ((a) = \ - (((unsigned)(a) << (BITS_PER_INT-GCTYPEBITS-VALBITS)) \ - >> (BITS_PER_INT-GCTYPEBITS-VALBITS))) - +/* arch-tag: a4f5c090-0bd5-48f0-9724-b7d531f9b6c8 + (do not change this comment) */ diff --git a/src/m/mips.h b/src/m/mips.h index 3948cb6855..cca4586817 100644 --- a/src/m/mips.h +++ b/src/m/mips.h @@ -1,5 +1,5 @@ /* m- file for Mips machines. - Copyright (C) 1987, 1992, 1999, 2002 Free Software Foundation, Inc. + Copyright (C) 1987, 1992, 1999, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -170,11 +170,6 @@ NOTE-END */ ((var) = \ ((int)(type) << VALBITS) \ + (((unsigned) (ptr) << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS))) - -#define XUNMARK(a) \ - ((a) = \ - (((unsigned)(a) << (BITS_PER_INT-GCTYPEBITS-VALBITS)) \ - >> (BITS_PER_INT-GCTYPEBITS-VALBITS))) #if !defined (NEWSOS5) && !defined (__linux__) #ifdef USG @@ -217,3 +212,6 @@ NOTE-END */ #endif /* BSD_SYSTEM */ #endif /* not NEWSOS5 && not __linux__ */ + +/* arch-tag: 8fd020ee-78a7-4d87-96ce-6129f52f7bee + (do not change this comment) */ diff --git a/src/m/mips4.h b/src/m/mips4.h index 5371fc0320..4b79e466fb 100644 --- a/src/m/mips4.h +++ b/src/m/mips4.h @@ -57,3 +57,6 @@ NOTE-END */ #undef HAVE_XSCREENRESOURCESTRING #undef HAVE_SETSID #endif + +/* arch-tag: 56050454-0df5-4de9-b1b7-0c6ab400313c + (do not change this comment) */ diff --git a/src/m/ncr386.h b/src/m/ncr386.h index 2599456a87..f98566a295 100644 --- a/src/m/ncr386.h +++ b/src/m/ncr386.h @@ -13,3 +13,6 @@ #define LD_SWITCH_X_DEFAULT -Xlinker LD_SWITCH_X_SITE_AUX #endif /* __GNUC__ */ + +/* arch-tag: 79c76283-7d50-499b-b910-8ef980357758 + (do not change this comment) */ diff --git a/src/m/news-r6.h b/src/m/news-r6.h index 7018dc9571..cf6e019fd0 100644 --- a/src/m/news-r6.h +++ b/src/m/news-r6.h @@ -49,7 +49,5 @@ ((int)(type) << VALBITS) \ + (((unsigned) (ptr) << (BITS_PER_INT-VALBITS)) >> (BITS_PER_INT-VALBITS))) -#define XUNMARK(a) \ - ((a) = \ - (((unsigned)(a) << (BITS_PER_INT-GCTYPEBITS-VALBITS)) \ - >> (BITS_PER_INT-GCTYPEBITS-VALBITS))) +/* arch-tag: b9fd7b75-ba3c-46d4-8966-24381b13001b + (do not change this comment) */ diff --git a/src/m/news-risc.h b/src/m/news-risc.h index cba5bbc568..2ecaff41cb 100644 --- a/src/m/news-risc.h +++ b/src/m/news-risc.h @@ -57,3 +57,6 @@ #define BROKEN_PROTOTYPES #endif /* not NEWSOS5 */ + +/* arch-tag: cf17300c-dd34-4b9d-a657-2de718469662 + (do not change this comment) */ diff --git a/src/m/news.h b/src/m/news.h index 812432d8f3..1a594ad82a 100644 --- a/src/m/news.h +++ b/src/m/news.h @@ -60,3 +60,5 @@ NOTE-END */ #define LIBS_TERMCAP -ltermcap +/* arch-tag: 79bfd831-874a-4339-85fa-b8cbdc29bdab + (do not change this comment) */ diff --git a/src/m/next.h b/src/m/next.h index b2ceb49f43..1e8a3d3a31 100644 --- a/src/m/next.h +++ b/src/m/next.h @@ -121,3 +121,6 @@ Boston, MA 02111-1307, USA. */ /* This should be true for recent NeXT systems. At least since 3.2. */ #define HAVE_MACH_MACH_H + +/* arch-tag: 1155cdcb-1f6c-4208-a2da-22c7473060a1 + (do not change this comment) */ diff --git a/src/m/nh3000.h b/src/m/nh3000.h index 4df55957d9..d6c09bd65b 100644 --- a/src/m/nh3000.h +++ b/src/m/nh3000.h @@ -103,3 +103,6 @@ Boston, MA 02111-1307, USA. */ */ /* #define NO_SOCK_SIGIO */ + +/* arch-tag: 1529f2bc-50d9-42e7-ae72-6f40afadf09e + (do not change this comment) */ diff --git a/src/m/nh4000.h b/src/m/nh4000.h index d002405fe1..70804ef2c3 100644 --- a/src/m/nh4000.h +++ b/src/m/nh4000.h @@ -102,3 +102,6 @@ Boston, MA 02111-1307, USA. */ */ /* #define NO_SOCK_SIGIO */ + +/* arch-tag: d9e12769-ae79-4c25-953f-70db5b7ef5dd + (do not change this comment) */ diff --git a/src/m/ns16000.h b/src/m/ns16000.h index f684c3dcc6..549f648c7f 100644 --- a/src/m/ns16000.h +++ b/src/m/ns16000.h @@ -89,3 +89,6 @@ NOTE-END */ #define static #endif /* USG */ + +/* arch-tag: 4210db3c-e35c-4b96-9399-1dbde3e00a57 + (do not change this comment) */ diff --git a/src/m/ns32000.h b/src/m/ns32000.h index c318386235..214954b631 100644 --- a/src/m/ns32000.h +++ b/src/m/ns32000.h @@ -96,3 +96,6 @@ Boston, MA 02111-1307, USA. */ #define START_FILES pre-crt0.o /lib/crt0.o #endif + +/* arch-tag: 13dde0e0-8ed5-4bc3-a0dc-5456c9db5f94 + (do not change this comment) */ diff --git a/src/m/nu.h b/src/m/nu.h index 8eb9374e6d..44abc92905 100644 --- a/src/m/nu.h +++ b/src/m/nu.h @@ -69,3 +69,6 @@ Boston, MA 02111-1307, USA. */ in the executable file. */ #define SECTION_ALIGNMENT pagemask + +/* arch-tag: 7d2d9b6d-75d4-4c0d-96a9-a41f06212f35 + (do not change this comment) */ diff --git a/src/m/orion.h b/src/m/orion.h index 2a89251e23..76519f6fe6 100644 --- a/src/m/orion.h +++ b/src/m/orion.h @@ -64,3 +64,6 @@ Boston, MA 02111-1307, USA. */ #define FSCALE 1.0 #endif #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) + +/* arch-tag: 4fcf38ad-d6b0-434b-bc10-16647d5a7fb6 + (do not change this comment) */ diff --git a/src/m/orion105.h b/src/m/orion105.h index 7e5fb34b31..c58f922206 100644 --- a/src/m/orion105.h +++ b/src/m/orion105.h @@ -66,3 +66,6 @@ Boston, MA 02111-1307, USA. */ /* Arguments to ignore before argc in crt0.c. */ #define DUMMIES dummy1, dummy2, + +/* arch-tag: 32fed6e3-8cae-4882-b327-a68c2af6db7a + (do not change this comment) */ diff --git a/src/m/paragon.h b/src/m/paragon.h index 5c00f7d8d9..11b98dea7e 100644 --- a/src/m/paragon.h +++ b/src/m/paragon.h @@ -8,3 +8,6 @@ #define KEEP_OLD_TEXT_SCNPTR #define KEEP_OLD_PADDR #define drem fmod + +/* arch-tag: c1bc280c-25e5-4993-9b91-333c52ab3674 + (do not change this comment) */ diff --git a/src/m/pfa50.h b/src/m/pfa50.h index c417a1d58a..c6762a9312 100644 --- a/src/m/pfa50.h +++ b/src/m/pfa50.h @@ -87,3 +87,6 @@ Boston, MA 02111-1307, USA. */ #define NO_SIOCTL_H #define BROKEN_SIGIO + +/* arch-tag: f3a127d5-790b-4c78-b6be-837139fb12c4 + (do not change this comment) */ diff --git a/src/m/plexus.h b/src/m/plexus.h index 22dbffa16f..b7012c750d 100644 --- a/src/m/plexus.h +++ b/src/m/plexus.h @@ -103,3 +103,6 @@ Boston, MA 02111-1307, USA. */ /* This triggers some stuff to avoid a compiler bug */ #define TAHOE_REGISTER_BUG + +/* arch-tag: 78c607eb-b4f8-4750-b575-39670d979448 + (do not change this comment) */ diff --git a/src/m/pmax.h b/src/m/pmax.h index 54f246fed6..911f84d3c8 100644 --- a/src/m/pmax.h +++ b/src/m/pmax.h @@ -105,3 +105,6 @@ NOTE-END */ /* Enable a fix in process.c. */ #define SET_CHILD_PTY_PGRP + +/* arch-tag: 45d5070e-d2b7-479f-b336-3fd497c36e15 + (do not change this comment) */ diff --git a/src/m/powermac.h b/src/m/powermac.h index 0ab535dfd2..dc698675ea 100644 --- a/src/m/powermac.h +++ b/src/m/powermac.h @@ -109,3 +109,6 @@ Boston, MA 02111-1307, USA. */ If you've just fixed a problem in an existing configuration file, you should also check `etc/MACHINES' to make sure its descriptions of known problems in that configuration should be updated. */ + +/* arch-tag: d8af08a6-48b3-4c8a-94a0-0b4acae5e1f0 + (do not change this comment) */ diff --git a/src/m/powerpcle.h b/src/m/powerpcle.h index 2c01acb843..4733156337 100644 --- a/src/m/powerpcle.h +++ b/src/m/powerpcle.h @@ -56,3 +56,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Control a conditional in unexelf.c. */ #define SOLARIS_POWERPC + +/* arch-tag: dc2c3cb6-4683-45ae-961f-0a4f2bda3c61 + (do not change this comment) */ diff --git a/src/m/pyramid.h b/src/m/pyramid.h index 7abd4f88b3..7ba6a9e058 100644 --- a/src/m/pyramid.h +++ b/src/m/pyramid.h @@ -61,3 +61,6 @@ Boston, MA 02111-1307, USA. */ /* Reenable this #define for old versions of the Pyramid system. */ /* #define PYRAMID_OLD */ + +/* arch-tag: b9097bc9-92be-46d4-acb1-13c2b966d581 + (do not change this comment) */ diff --git a/src/m/pyrmips.h b/src/m/pyrmips.h index 1489ddaa66..67705fb661 100644 --- a/src/m/pyrmips.h +++ b/src/m/pyrmips.h @@ -6,3 +6,5 @@ #define SYSTEM_MALLOC #define CANNOT_DUMP +/* arch-tag: 82559148-25a8-466d-bbb3-f903f7666b7a + (do not change this comment) */ diff --git a/src/m/sequent-ptx.h b/src/m/sequent-ptx.h index 2c815ff97b..a72c705578 100644 --- a/src/m/sequent-ptx.h +++ b/src/m/sequent-ptx.h @@ -127,3 +127,5 @@ Boston, MA 02111-1307, USA. */ /* Use terminfo library. */ #define LIBS_TERMCAP -ltermlib +/* arch-tag: 0494629b-7e11-4f6f-865f-62254ac46099 + (do not change this comment) */ diff --git a/src/m/sequent.h b/src/m/sequent.h index 404bbf5466..7e45c4f4fd 100644 --- a/src/m/sequent.h +++ b/src/m/sequent.h @@ -163,3 +163,6 @@ NOTE-END */ sprintf (ptyname, "/dev/pty%c%c", PTY_MAJOR[ma], PTY_MINOR[mi]); #define PTY_TTY_NAME_SPRINTF \ sprintf (ptyname, "/dev/tty%c%c", PTY_MAJOR[ma], PTY_MINOR[mi]); + +/* arch-tag: 81caea48-aa64-4021-9544-e969dea71ee8 + (do not change this comment) */ diff --git a/src/m/sparc.h b/src/m/sparc.h index 8e22ccb2b2..8656152fb7 100644 --- a/src/m/sparc.h +++ b/src/m/sparc.h @@ -97,3 +97,6 @@ NOTE-END */ should be here. -- fx */ #endif #endif + +/* arch-tag: 0a6f7882-33fd-4811-9832-7466c51e50f7 + (do not change this comment) */ diff --git a/src/m/sps7.h b/src/m/sps7.h index 1589f2cbfb..ba4eae1851 100644 --- a/src/m/sps7.h +++ b/src/m/sps7.h @@ -112,3 +112,6 @@ Boston, MA 02111-1307, USA. */ #define ADJUST_EXEC_HEADER f_hdr.f_magic = SMROMAGIC;\ f_ohdr.stsize = 0; #endif + +/* arch-tag: 2240f71c-6f3b-4a82-80fc-4d56c682d7ad + (do not change this comment) */ diff --git a/src/m/sr2k.h b/src/m/sr2k.h index 579432aa3b..088ea23d94 100644 --- a/src/m/sr2k.h +++ b/src/m/sr2k.h @@ -67,12 +67,6 @@ Boston, MA 02111-1307, USA. */ #define XSET(var, type, ptr) \ ((var) = ((int)(type) << VALBITS) + (((unsigned) (ptr) << BITS_PER_INT-VALBITS) >> BITS_PER_INT-VALBITS)) - -#define XMARKBIT(a) ((a) < 0) - -#if 0 /* Loses when sign bit of type field is set. */ -#define XUNMARK(a) ((a) = (((a) << BITS_PER_INT-GCTYPEBITS-VALBITS) >> BITS_PER_INT-GCTYPEBITS-VALBITS)) -#endif /* #ifdef __hpux */ /* Now define a symbol for the cpu type, if your compiler @@ -160,3 +154,6 @@ Boston, MA 02111-1307, USA. */ #define rindex strrchr /* #endif */ + +/* arch-tag: 4ced5b51-ffe6-4be1-9954-eb40657023a5 + (do not change this comment) */ diff --git a/src/m/stride.h b/src/m/stride.h index 4e1fd18dc9..941b9d7cc9 100644 --- a/src/m/stride.h +++ b/src/m/stride.h @@ -115,3 +115,6 @@ Boston, MA 02111-1307, USA. */ /* Define this macro if system defines a type `union wait'. */ #define HAVE_UNION_WAIT + +/* arch-tag: 65c635ed-5bc7-4ace-ab20-f3442429c8ba + (do not change this comment) */ diff --git a/src/m/sun1.h b/src/m/sun1.h index 6bff1d2167..54d51106e6 100644 --- a/src/m/sun1.h +++ b/src/m/sun1.h @@ -74,3 +74,6 @@ NOTE-END */ /* Mask for address bits within a memory segment */ #define SEGMENT_MASK (SEGSIZ - 1) + +/* arch-tag: 58ec9c79-48bd-4d1b-aad1-65a09a6b0d10 + (do not change this comment) */ diff --git a/src/m/sun2.h b/src/m/sun2.h index 5107f3c47d..33f811aea0 100644 --- a/src/m/sun2.h +++ b/src/m/sun2.h @@ -95,3 +95,6 @@ NOTE-END */ #define SYMS_MACHINE syms_of_sunfns () #define PURESIZE 132000 #endif + +/* arch-tag: 543c3570-74ca-4099-aa47-db7c7b691c8e + (do not change this comment) */ diff --git a/src/m/sun3-68881.h b/src/m/sun3-68881.h index 1210bef630..33b9c2bd52 100644 --- a/src/m/sun3-68881.h +++ b/src/m/sun3-68881.h @@ -26,3 +26,6 @@ NOTE-END */ #define sun_68881 #define START_FILES crt0.o /usr/lib/Mcrt1.o + +/* arch-tag: f8659e89-5f5e-4921-940c-814a5786b901 + (do not change this comment) */ diff --git a/src/m/sun3-fpa.h b/src/m/sun3-fpa.h index 1b2c084e01..b78adaf737 100644 --- a/src/m/sun3-fpa.h +++ b/src/m/sun3-fpa.h @@ -26,3 +26,6 @@ NOTE-END */ #define sun_fpa #define START_FILES crt0.o /usr/lib/Wcrt1.o + +/* arch-tag: db287fbb-966f-4a70-a3f4-a6768c09326b + (do not change this comment) */ diff --git a/src/m/sun3-soft.h b/src/m/sun3-soft.h index 0913e875d8..32b2558c01 100644 --- a/src/m/sun3-soft.h +++ b/src/m/sun3-soft.h @@ -27,3 +27,6 @@ NOTE-END */ #define sun_soft #define START_FILES crt0.o /usr/lib/Fcrt1.o + +/* arch-tag: 76e9d7e6-66a8-4c4f-b0a5-335d082e5720 + (do not change this comment) */ diff --git a/src/m/sun3.h b/src/m/sun3.h index 24f84d8e2d..b271370341 100644 --- a/src/m/sun3.h +++ b/src/m/sun3.h @@ -48,3 +48,6 @@ NOTE-END */ For maximum cleanliness, don't edit this file; instead, insert this line in config.h. */ /* #define START_FILES crt0.o /usr/lib/Mcrt1.o */ + +/* arch-tag: d0559a79-2285-4a78-ad68-9694264d0d8a + (do not change this comment) */ diff --git a/src/m/sun386.h b/src/m/sun386.h index 61468f9987..d3866e8f17 100644 --- a/src/m/sun386.h +++ b/src/m/sun386.h @@ -80,3 +80,6 @@ NOTE-END */ on the 386 needs this. */ #define LIBS_MACHINE -lkvm #endif + +/* arch-tag: 861af4b4-ce5f-475e-876e-ebff6436a1fe + (do not change this comment) */ diff --git a/src/m/symmetry.h b/src/m/symmetry.h index a3e89c5849..ca584c9c6e 100644 --- a/src/m/symmetry.h +++ b/src/m/symmetry.h @@ -89,3 +89,6 @@ Boston, MA 02111-1307, USA. */ sprintf (pty_name, "/dev/pty%c%c", PTY_MAJOR[ma], PTY_MINOR[mi]); #define PTY_TTY_NAME_SPRINTF \ sprintf (pty_name, "/dev/tty%c%c", PTY_MAJOR[ma], PTY_MINOR[mi]); + +/* arch-tag: 4169a89e-3764-4147-98df-1ba3bdd45a5b + (do not change this comment) */ diff --git a/src/m/tad68k.h b/src/m/tad68k.h index 4aa142fbd9..084e432223 100644 --- a/src/m/tad68k.h +++ b/src/m/tad68k.h @@ -109,3 +109,6 @@ Boston, MA 02111-1307, USA. */ #define HAVE_PTYS /* we do have PTYs if we have TCP */ #define HAVE_SOCKETS /* we do have sockets if we have TCP */ #define LIBS_SYSTEM -lsocket /* get TCP networking functions */ + +/* arch-tag: e0c09754-b0f2-48da-a8a5-aee3c94838f4 + (do not change this comment) */ diff --git a/src/m/tahoe.h b/src/m/tahoe.h index 343247d052..42741e25cb 100644 --- a/src/m/tahoe.h +++ b/src/m/tahoe.h @@ -66,3 +66,6 @@ NOTE-END */ /* This triggers some stuff to avoid a compiler bug */ #define TAHOE_REGISTER_BUG + +/* arch-tag: dd452693-80e1-413f-a164-0141eb68d831 + (do not change this comment) */ diff --git a/src/m/tandem-s2.h b/src/m/tandem-s2.h index 92e9ebfbb3..b22f9bb66a 100644 --- a/src/m/tandem-s2.h +++ b/src/m/tandem-s2.h @@ -19,3 +19,6 @@ /* Correct some library file names. */ #define START_FILES pre-crt0.o /usr/lib/crt1.o1.31 #define LIB_STANDARD -lbsd -lc /usr/lib/crtn.o1.31 + +/* arch-tag: ae34a1a6-6408-4b23-a6d3-ce4e8f124916 + (do not change this comment) */ diff --git a/src/m/targon31.h b/src/m/targon31.h index 7c44f12e17..afc72f4e0e 100644 --- a/src/m/targon31.h +++ b/src/m/targon31.h @@ -92,3 +92,6 @@ Boston, MA 02111-1307, USA. */ #define SEGMENT_MASK 0xffff #define SWITCH_ENUM_BUG 1 + +/* arch-tag: f2438018-7d4e-4be5-b368-4bf342b7785b + (do not change this comment) */ diff --git a/src/m/tek4300.h b/src/m/tek4300.h index d402022a03..34b160ba6d 100644 --- a/src/m/tek4300.h +++ b/src/m/tek4300.h @@ -99,3 +99,6 @@ Boston, MA 02111-1307, USA. */ /* Process groups work in the traditional BSD manner. */ #define BSD_PGRPS + +/* arch-tag: afa06e53-094c-4a19-9219-155f8ba4bbcc + (do not change this comment) */ diff --git a/src/m/tekxd88.h b/src/m/tekxd88.h index 2e1fa20d37..a30bbdd8d6 100644 --- a/src/m/tekxd88.h +++ b/src/m/tekxd88.h @@ -111,3 +111,6 @@ Boston, MA 02111-1307, USA. */ /* We need this to get dumping to work */ #define KEEP_OLD_TEXT_SCNPTR + +/* arch-tag: fd3cebc3-2aed-4f8c-be9b-f37331c6e0ff + (do not change this comment) */ diff --git a/src/m/template.h b/src/m/template.h index 6def690cd9..914daa3047 100644 --- a/src/m/template.h +++ b/src/m/template.h @@ -109,3 +109,6 @@ Boston, MA 02111-1307, USA. */ If you've just fixed a problem in an existing configuration file, you should also check `etc/MACHINES' to make sure its descriptions of known problems in that configuration should be updated. */ + +/* arch-tag: d7dae0a9-4f99-4939-bef9-5738e1f33955 + (do not change this comment) */ diff --git a/src/m/tower32.h b/src/m/tower32.h index 307d2b93e3..947e495aa2 100644 --- a/src/m/tower32.h +++ b/src/m/tower32.h @@ -109,3 +109,6 @@ Boston, MA 02111-1307, USA. */ #include #define EXEC_MAGIC AOUT1MAGIC #define EXEC_PAGESIZE DATACLICK + +/* arch-tag: a08e7dea-d48e-44cc-b60d-c7f2e5187ff5 + (do not change this comment) */ diff --git a/src/m/tower32v3.h b/src/m/tower32v3.h index 3d54366aa9..fbd7e032a3 100644 --- a/src/m/tower32v3.h +++ b/src/m/tower32v3.h @@ -107,3 +107,6 @@ Boston, MA 02111-1307, USA. */ /* The OS needs stream.h+ptem.h included in sysdep.c. */ #define NO_SIOCTL_H #define NEED_PTEM_H + +/* arch-tag: 3dff1355-7cb6-49e3-8834-85a369e4ea8f + (do not change this comment) */ diff --git a/src/m/ustation.h b/src/m/ustation.h index 17d59df0d0..b03a355535 100644 --- a/src/m/ustation.h +++ b/src/m/ustation.h @@ -126,3 +126,6 @@ Boston, MA 02111-1307, USA. */ #define BROKEN_SIGIO #define BROKEN_SIGTSTP + +/* arch-tag: 797f1d3e-3077-4eee-a81b-03fcf3a988fe + (do not change this comment) */ diff --git a/src/m/vax.h b/src/m/vax.h index eace9f7e14..2e9d4738b6 100644 --- a/src/m/vax.h +++ b/src/m/vax.h @@ -113,3 +113,6 @@ NOTE-END */ #ifdef BSD4_2 #define HAVE_FTIME #endif + +/* arch-tag: 508bdf7a-01a0-4ce0-8eba-0704d0df55a0 + (do not change this comment) */ diff --git a/src/m/wicat.h b/src/m/wicat.h index 0a9596cd15..bca10df352 100644 --- a/src/m/wicat.h +++ b/src/m/wicat.h @@ -131,3 +131,6 @@ Boston, MA 02111-1307, USA. */ #undef TERMINFO #define LIBS_TERMCAP select.o -ltermlib #endif + +/* arch-tag: b181c512-0275-4d25-9bbc-be0c8ca7bcad + (do not change this comment) */ diff --git a/src/m/windowsnt.h b/src/m/windowsnt.h index 4188a7032e..701e6e21e1 100644 --- a/src/m/windowsnt.h +++ b/src/m/windowsnt.h @@ -119,3 +119,6 @@ Boston, MA 02111-1307, USA. */ If you've just fixed a problem in an existing configuration file, you should also check `etc/MACHINES' to make sure its descriptions of known problems in that configuration should be updated. */ + +/* arch-tag: ed6dc0c1-5c01-49df-befd-c25dfadfb8cf + (do not change this comment) */ diff --git a/src/m/xps100.h b/src/m/xps100.h index 26cec52374..617b0a9c1d 100644 --- a/src/m/xps100.h +++ b/src/m/xps100.h @@ -92,3 +92,6 @@ Boston, MA 02111-1307, USA. */ #define LIB_STANDARD -lc #define LD_SWITCH_MACHINE -X #define SECTION_ALIGNMENT (0x3ff) + +/* arch-tag: 42316eb5-74b2-4762-970a-e372c6a2783d + (do not change this comment) */ diff --git a/src/mac.c b/src/mac.c index ce2e424249..9f3455ab5d 100644 --- a/src/mac.c +++ b/src/mac.c @@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#include #include #include #include @@ -1164,6 +1165,13 @@ static struct passwd my_passwd = my_passwd_dir, }; +static struct group my_group = +{ + /* There are no groups on the mac, so we just return "root" as the + group name. */ + "root", +}; + /* Initialized by main () in macterm.c to pathname of emacs directory. */ @@ -1258,6 +1266,13 @@ getpwuid (uid_t uid) } +struct group * +getgrgid (gid_t gid) +{ + return &my_group; +} + + struct passwd * getpwnam (const char *name) { @@ -2988,3 +3003,6 @@ syms_of_mac () defsubr (&Smac_file_name_to_posix); defsubr (&Sposix_file_name_to_mac); } + +/* arch-tag: 29d30c1f-0c6b-4f88-8a6d-0558d7f9dbff + (do not change this comment) */ diff --git a/src/macfns.c b/src/macfns.c index 003ae084c2..dbb8adb3fe 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -54,6 +54,8 @@ static unsigned char gray_bits[] = { /*#include #include */ #include +#include +#include #include #include @@ -62,32 +64,7 @@ static unsigned char gray_bits[] = { #endif #ifdef MAC_OSX -#undef mktime -#undef DEBUG -#undef Z -#undef free -#undef malloc -#undef realloc -/* Macros max and min defined in lisp.h conflict with those in - precompiled header Carbon.h. */ -#undef max -#undef min -#undef init_process -#include -#undef Z -#define Z (current_buffer->text->z) -#undef free -#define free unexec_free -#undef malloc -#define malloc unexec_malloc -#undef realloc -#define realloc unexec_realloc -#undef min -#define min(a, b) ((a) < (b) ? (a) : (b)) -#undef max -#define max(a, b) ((a) > (b) ? (a) : (b)) -#undef init_process -#define init_process emacs_init_process +#include #else /* not MAC_OSX */ #include #include @@ -140,10 +117,6 @@ static int mac_in_use; Lisp_Object Vx_no_window_manager; -/* Search path for bitmap files. */ - -Lisp_Object Vx_bitmap_file_path; - /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ Lisp_Object Vx_pixel_size_width_font_regexp; @@ -186,7 +159,6 @@ Lisp_Object Vx_pixel_size_width_font_regexp; Lisp_Object Qnone; Lisp_Object Qsuppress_icon; Lisp_Object Qundefined_color; -Lisp_Object Qcenter; Lisp_Object Qcancel_timer; Lisp_Object Qhyper; Lisp_Object Qsuper; @@ -200,15 +172,6 @@ extern Lisp_Object Vwindow_system_version; extern int mac_initialized; -/* Functions in macterm.c. */ -extern void x_set_window_size (struct frame *, int, int, int); -extern void x_make_frame_visible (struct frame *); -extern struct mac_display_info *mac_term_init (Lisp_Object, char *, char *); -extern struct font_info *x_get_font_info (FRAME_PTR, int); -extern struct font_info *x_load_font (struct frame *, char *, int); -extern void x_find_ccl_program (struct font_info *); -extern struct font_info *x_query_font (struct frame *, char *); -extern void mac_initialize (); /* compare two strings ignoring case */ @@ -338,227 +301,7 @@ x_window_to_frame (dpyinfo, wdesc) } - -/* Code to deal with bitmaps. Bitmaps are referenced by their bitmap - id, which is just an int that this section returns. Bitmaps are - reference counted so they can be shared among frames. - - Bitmap indices are guaranteed to be > 0, so a negative number can - be used to indicate no bitmap. - - If you use x_create_bitmap_from_data, then you must keep track of - the bitmaps yourself. That is, creating a bitmap from the same - data more than once will not be caught. */ - - -/* Functions to access the contents of a bitmap, given an id. */ - -int -x_bitmap_height (f, id) - FRAME_PTR f; - int id; -{ - return FRAME_MAC_DISPLAY_INFO (f)->bitmaps[id - 1].height; -} - -int -x_bitmap_width (f, id) - FRAME_PTR f; - int id; -{ - return FRAME_MAC_DISPLAY_INFO (f)->bitmaps[id - 1].width; -} - -#if 0 /* MAC_TODO : not used anywhere (?) */ -int -x_bitmap_pixmap (f, id) - FRAME_PTR f; - int id; -{ - return (int) FRAME_MAC_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap; -} -#endif - -/* Allocate a new bitmap record. Returns index of new record. */ - -static int -x_allocate_bitmap_record (f) - FRAME_PTR f; -{ - struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f); - int i; - - if (dpyinfo->bitmaps == NULL) - { - dpyinfo->bitmaps_size = 10; - dpyinfo->bitmaps = (struct mac_bitmap_record *) - xmalloc (dpyinfo->bitmaps_size * sizeof (struct mac_bitmap_record)); - dpyinfo->bitmaps_last = 1; - return 1; - } - - if (dpyinfo->bitmaps_last < dpyinfo->bitmaps_size) - return ++dpyinfo->bitmaps_last; - - for (i = 0; i < dpyinfo->bitmaps_size; ++i) - if (dpyinfo->bitmaps[i].refcount == 0) - return i + 1; - - dpyinfo->bitmaps_size *= 2; - dpyinfo->bitmaps = (struct mac_bitmap_record *) - xrealloc (dpyinfo->bitmaps, - dpyinfo->bitmaps_size * sizeof (struct mac_bitmap_record)); - return ++dpyinfo->bitmaps_last; -} - -/* Add one reference to the reference count of the bitmap with id - ID. */ - -void -x_reference_bitmap (f, id) - FRAME_PTR f; - int id; -{ - ++FRAME_MAC_DISPLAY_INFO (f)->bitmaps[id - 1].refcount; -} - -/* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at - BITS. */ - -int -x_create_bitmap_from_data (f, bits, width, height) - struct frame *f; - char *bits; - unsigned int width, height; -{ - struct x_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f); - int id; - - /* MAC_TODO: for now fail if width is not mod 16 (toolbox requires it) */ - - id = x_allocate_bitmap_record (f); - - if (width % 16 != 0) - return -1; - - dpyinfo->bitmaps[id - 1].bitmap_data = (char *) xmalloc (height * width); - if (! dpyinfo->bitmaps[id - 1].bitmap_data) - return -1; - - bcopy (bits, dpyinfo->bitmaps[id - 1].bitmap_data, height * width); - - dpyinfo->bitmaps[id - 1].refcount = 1; - dpyinfo->bitmaps[id - 1].height = height; - dpyinfo->bitmaps[id - 1].width = width; - - return id; -} - -/* Create bitmap from file FILE for frame F. */ - -int -x_create_bitmap_from_file (f, file) - struct frame *f; - Lisp_Object file; -{ - return -1; -#if 0 /* MAC_TODO : bitmap support */ - struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); - unsigned int width, height; - HBITMAP bitmap; - int xhot, yhot, result, id; - Lisp_Object found; - int fd; - char *filename; - HINSTANCE hinst; - - /* Look for an existing bitmap with the same name. */ - for (id = 0; id < dpyinfo->bitmaps_last; ++id) - { - if (dpyinfo->bitmaps[id].refcount - && dpyinfo->bitmaps[id].file - && !strcmp (dpyinfo->bitmaps[id].file, (char *) SDATA (file))) - { - ++dpyinfo->bitmaps[id].refcount; - return id + 1; - } - } - - /* Search bitmap-file-path for the file, if appropriate. */ - fd = openp (Vx_bitmap_file_path, file, "", &found, Qnil); - if (fd < 0) - return -1; - /* LoadLibraryEx won't handle special files handled by Emacs handler. */ - if (fd == 0) - return -1; - emacs_close (fd); - - filename = (char *) SDATA (found); - - hinst = LoadLibraryEx (filename, NULL, LOAD_LIBRARY_AS_DATAFILE); - - if (hinst == NULL) - return -1; - - - result = XReadBitmapFile (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), - filename, &width, &height, &bitmap, &xhot, &yhot); - if (result != BitmapSuccess) - return -1; - - id = x_allocate_bitmap_record (f); - dpyinfo->bitmaps[id - 1].pixmap = bitmap; - dpyinfo->bitmaps[id - 1].refcount = 1; - dpyinfo->bitmaps[id - 1].file = (char *) xmalloc (SCHARS (file) + 1); - dpyinfo->bitmaps[id - 1].depth = 1; - dpyinfo->bitmaps[id - 1].height = height; - dpyinfo->bitmaps[id - 1].width = width; - strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file)); - - return id; -#endif /* MAC_TODO */ -} - -/* Remove reference to bitmap with id number ID. */ - -void -x_destroy_bitmap (f, id) - FRAME_PTR f; - int id; -{ - struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f); - - if (id > 0) - { - --dpyinfo->bitmaps[id - 1].refcount; - if (dpyinfo->bitmaps[id - 1].refcount == 0) - { - BLOCK_INPUT; - dpyinfo->bitmaps[id - 1].bitmap_data = NULL; - UNBLOCK_INPUT; - } - } -} - -/* Free all the bitmaps for the display specified by DPYINFO. */ - -static void -x_destroy_all_bitmaps (dpyinfo) - struct mac_display_info *dpyinfo; -{ - int i; - for (i = 0; i < dpyinfo->bitmaps_last; i++) - if (dpyinfo->bitmaps[i].refcount > 0) - xfree (dpyinfo->bitmaps[i].bitmap_data); - dpyinfo->bitmaps_last = 0; -} - -/* Connect the frame-parameter names for W32 frames - to the ways of passing the parameter values to the window system. - - The name of a parameter, as a Lisp symbol, - has an `x-frame-parameter' property which is an integer in Lisp - but can be interpreted as an `enum x_frame_parm' in C. */ +static Lisp_Object unwind_create_frame P_ ((Lisp_Object)); void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); @@ -581,7 +324,6 @@ static Lisp_Object x_default_scroll_bar_color_parameter P_ ((struct frame *, Lisp_Object, char *, char *, int)); - /* Store the screen positions of frame F into XPTR and YPTR. These are the positions of the containing window manager window, not Emacs's own window. */ @@ -1382,7 +1124,7 @@ colormap_t mac_color_map[] = { RGB_TO_ULONG(144, 238, 144), "LightGreen" } }; -unsigned long +Lisp_Object mac_color_map_lookup (colorname) char *colorname; { @@ -1394,7 +1136,7 @@ mac_color_map_lookup (colorname) for (i = 0; i < sizeof (mac_color_map) / sizeof (mac_color_map[0]); i++) if (stricmp (colorname, mac_color_map[i].name) == 0) { - ret = mac_color_map[i].color; + ret = make_number (mac_color_map[i].color); break; } @@ -1463,7 +1205,7 @@ x_to_mac_color (colorname) if (i == 2) { UNBLOCK_INPUT; - return (colorval); + return make_number (colorval); } color = end; } @@ -1516,7 +1258,7 @@ x_to_mac_color (colorname) if (*end != '\0') break; UNBLOCK_INPUT; - return (colorval); + return make_number (colorval); } if (*end != '/') break; @@ -1557,7 +1299,7 @@ x_to_mac_color (colorname) if (*end != '\0') break; UNBLOCK_INPUT; - return (colorval); + return make_number (colorval); } if (*end != '/') break; @@ -1616,9 +1358,9 @@ mac_defined_color (f, color, color_def, alloc) } color_def->pixel = mac_color_ref; - color_def->red = RED_FROM_ULONG (mac_color_ref); - color_def->green = GREEN_FROM_ULONG (mac_color_ref); - color_def->blue = BLUE_FROM_ULONG (mac_color_ref); + color_def->red = RED16_FROM_ULONG (mac_color_ref); + color_def->green = GREEN16_FROM_ULONG (mac_color_ref); + color_def->blue = BLUE16_FROM_ULONG (mac_color_ref); return 1; } @@ -1649,8 +1391,7 @@ x_decode_color (f, arg, def) return WHITE_PIX_DEFAULT (f); #if 0 - if ((FRAME_MAC_DISPLAY_INFO (f)->n_planes - * FRAME_MAC_DISPLAY_INFO (f)->n_cbits) == 1) + if (FRAME_MAC_DISPLAY_INFO (f)->n_planes) == 1) return def; #endif @@ -1674,8 +1415,11 @@ x_set_foreground_color (f, arg, oldval) struct frame *f; Lisp_Object arg, oldval; { - FRAME_FOREGROUND_PIXEL (f) - = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); + unsigned long fg, old_fg; + + fg = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); + old_fg = FRAME_FOREGROUND_PIXEL (f); + FRAME_FOREGROUND_PIXEL (f) = fg; if (FRAME_MAC_WINDOW (f) != 0) { @@ -1856,36 +1600,42 @@ x_set_cursor_color (f, arg, oldval) struct frame *f; Lisp_Object arg, oldval; { - unsigned long fore_pixel; + unsigned long fore_pixel, pixel; if (!NILP (Vx_cursor_fore_pixel)) fore_pixel = x_decode_color (f, Vx_cursor_fore_pixel, WHITE_PIX_DEFAULT (f)); else fore_pixel = FRAME_BACKGROUND_PIXEL (f); - f->output_data.mac->cursor_pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); + + pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); /* Make sure that the cursor color differs from the background color. */ - if (f->output_data.mac->cursor_pixel == FRAME_BACKGROUND_PIXEL (f)) + if (pixel == FRAME_BACKGROUND_PIXEL (f)) { - f->output_data.mac->cursor_pixel = f->output_data.mac->mouse_pixel; - if (f->output_data.mac->cursor_pixel == fore_pixel) + pixel = f->output_data.mac->mouse_pixel; + if (pixel == fore_pixel) fore_pixel = FRAME_BACKGROUND_PIXEL (f); } - FRAME_FOREGROUND_PIXEL (f) = fore_pixel; -#if 0 /* MAC_TODO: cannot figure out what to do (wrong number of params) */ + f->output_data.mac->cursor_foreground_pixel = fore_pixel; + f->output_data.mac->cursor_pixel = pixel; + if (FRAME_MAC_WINDOW (f) != 0) { + BLOCK_INPUT; + /* Update frame's cursor_gc. */ + f->output_data.mac->cursor_gc->foreground = fore_pixel; + f->output_data.mac->cursor_gc->background = pixel; + + UNBLOCK_INPUT; + if (FRAME_VISIBLE_P (f)) { - BLOCK_INPUT; - display_and_set_cursor (f, 0); - display_and_set_cursor (f, 1); - UNBLOCK_INPUT; + x_update_cursor (f, 0); + x_update_cursor (f, 1); } } -#endif update_face_from_frame_parameter (f, Qcursor_color, arg); } @@ -1893,11 +1643,13 @@ x_set_cursor_color (f, arg, oldval) /* Set the border-color of frame F to pixel value PIX. Note that this does not fully take effect if done before F has a window. */ + void x_set_border_pixel (f, pix) struct frame *f; int pix; { + f->output_data.mac->border_pixel = pix; if (FRAME_MAC_WINDOW (f) != 0 && f->border_width > 0) @@ -1926,6 +1678,7 @@ x_set_border_color (f, arg, oldval) update_face_from_frame_parameter (f, Qborder_color, arg); } + void x_set_cursor_type (f, arg, oldval) FRAME_PTR f; @@ -1933,9 +1686,8 @@ x_set_cursor_type (f, arg, oldval) { set_frame_cursor_types (f, arg); - /* Make sure the cursor gets redrawn. This is overkill, but how - often do people change cursor types? */ - update_mode_lines++; + /* Make sure the cursor gets redrawn. */ + cursor_type_changed = 1; } #if 0 /* MAC_TODO: really no icon for Mac */ @@ -2597,7 +2349,7 @@ x_make_gc (f) BLOCK_INPUT; - /* Create the GC's of this frame. + /* Create the GCs of this frame. Note that many default values are used. */ /* Normal video */ @@ -2629,10 +2381,104 @@ x_make_gc (f) f->output_data.mac->white_relief.gc = 0; f->output_data.mac->black_relief.gc = 0; +#if 0 + /* Create the gray border tile used when the pointer is not in + the frame. Since this depends on the frame's pixel values, + this must be done on a per-frame basis. */ + f->output_data.x->border_tile + = (XCreatePixmapFromBitmapData + (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window, + gray_bits, gray_width, gray_height, + f->output_data.x->foreground_pixel, + f->output_data.x->background_pixel, + DefaultDepth (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f)))); +#endif + + UNBLOCK_INPUT; +} + + +/* Free what was was allocated in x_make_gc. */ + +void +x_free_gcs (f) + struct frame *f; +{ + Display *dpy = FRAME_MAC_DISPLAY (f); + + BLOCK_INPUT; + + if (f->output_data.mac->normal_gc) + { + XFreeGC (dpy, f->output_data.mac->normal_gc); + f->output_data.mac->normal_gc = 0; + } + + if (f->output_data.mac->reverse_gc) + { + XFreeGC (dpy, f->output_data.mac->reverse_gc); + f->output_data.mac->reverse_gc = 0; + } + + if (f->output_data.mac->cursor_gc) + { + XFreeGC (dpy, f->output_data.mac->cursor_gc); + f->output_data.mac->cursor_gc = 0; + } + +#if 0 + if (f->output_data.mac->border_tile) + { + XFreePixmap (dpy, f->output_data.mac->border_tile); + f->output_data.mac->border_tile = 0; + } +#endif + + if (f->output_data.mac->white_relief.gc) + { + XFreeGC (dpy, f->output_data.mac->white_relief.gc); + f->output_data.mac->white_relief.gc = 0; + } + + if (f->output_data.mac->black_relief.gc) + { + XFreeGC (dpy, f->output_data.mac->black_relief.gc); + f->output_data.mac->black_relief.gc = 0; + } + UNBLOCK_INPUT; } +/* Handler for signals raised during x_create_frame and + x_create_top_frame. FRAME is the frame which is partially + constructed. */ + +static Lisp_Object +unwind_create_frame (frame) + Lisp_Object frame; +{ + struct frame *f = XFRAME (frame); + + /* If frame is ``official'', nothing to do. */ + if (!CONSP (Vframe_list) || !EQ (XCAR (Vframe_list), frame)) + { +#if GLYPH_DEBUG + struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); +#endif + + x_free_frame_resources (f); + + /* Check that reference counts are indeed correct. */ + xassert (dpyinfo->reference_count == dpyinfo_refcount); + xassert (dpyinfo->image_cache->refcount == image_cache_refcount); + return Qt; + } + + return Qnil; +} + + DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, 1, 1, 0, doc: /* Make a new window, which is called a \"frame\" in Emacs terms. @@ -2736,10 +2582,7 @@ This function is an internal primitive--use `make-frame' instead. */) FRAME_FONTSET (f) = -1; f->output_data.mac->scroll_bar_foreground_pixel = -1; f->output_data.mac->scroll_bar_background_pixel = -1; - -#if 0 - FRAME_FONTSET (f) = -1; -#endif + record_unwind_protect (unwind_create_frame, frame); f->icon_name = mac_get_arg (parms, Qicon_name, "iconName", "Title", RES_TYPE_STRING); @@ -2790,17 +2633,18 @@ This function is an internal primitive--use `make-frame' instead. */) /* First, try whatever font the caller has specified. */ if (STRINGP (font)) { - tem = Fquery_fontset (font, Qnil); - if (STRINGP (tem)) - font = x_new_fontset (f, SDATA (tem)); - else - font = x_new_font (f, SDATA (font)); + tem = Fquery_fontset (font, Qnil); + if (STRINGP (tem)) + font = x_new_fontset (f, SDATA (tem)); + else + font = x_new_font (f, SDATA (font)); } + /* Try out a font which we hope has bold and italic variations. */ if (! STRINGP (font)) font = x_new_font (f, "-ETL-fixed-medium-r-*--*-160-*-*-*-*-iso8859-1"); /* If those didn't work, look for something which will at least work. */ - if (!STRINGP (font)) + if (! STRINGP (font)) font = x_new_font (f, "-*-monaco-*-12-*-mac-roman"); if (! STRINGP (font)) font = x_new_font (f, "-*-courier-*-10-*-mac-roman"); @@ -3011,12 +2855,9 @@ DEFUN ("xw-color-values", Fxw_color_values, Sxw_color_values, 1, 2, 0, { Lisp_Object rgb[3]; - rgb[0] = make_number ((RED_FROM_ULONG (foo.pixel) << 8) - | RED_FROM_ULONG (foo.pixel)); - rgb[1] = make_number ((GREEN_FROM_ULONG (foo.pixel) << 8) - | GREEN_FROM_ULONG (foo.pixel)); - rgb[2] = make_number ((BLUE_FROM_ULONG (foo.pixel) << 8) - | BLUE_FROM_ULONG (foo.pixel)); + rgb[0] = make_number (foo.red); + rgb[1] = make_number (foo.green); + rgb[2] = make_number (foo.blue); return Flist (3, rgb); } else @@ -3030,7 +2871,7 @@ DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, { struct mac_display_info *dpyinfo = check_x_display_info (display); - if ((dpyinfo->n_planes * dpyinfo->n_cbits) <= 2) + if (!dpyinfo->color_p) return Qnil; return Qt; @@ -3048,7 +2889,7 @@ If omitted or nil, that stands for the selected frame's display. */) { struct mac_display_info *dpyinfo = check_x_display_info (display); - if ((dpyinfo->n_planes * dpyinfo->n_cbits) <= 1) + if (dpyinfo->n_planes <= 1) return Qnil; return Qt; @@ -3093,7 +2934,7 @@ If omitted or nil, that stands for the selected frame's display. */) { struct mac_display_info *dpyinfo = check_x_display_info (display); - return make_number (dpyinfo->n_planes * dpyinfo->n_cbits); + return make_number (dpyinfo->n_planes); } DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells, @@ -3108,7 +2949,7 @@ If omitted or nil, that stands for the selected frame's display. */) struct mac_display_info *dpyinfo = check_x_display_info (display); /* MAC_TODO: check whether this is right */ - return make_number ((unsigned long) (pow (2, dpyinfo->n_cbits))); + return make_number (dpyinfo->n_planes >= 8 ? 256 : 1 << dpyinfo->n_planes - 1); } DEFUN ("x-server-max-request-size", Fx_server_max_request_size, @@ -3448,4421 +3289,89 @@ If DISPLAY is omitted or nil, that stands for the selected frame's display. */) /*********************************************************************** - Image types + Window properties ***********************************************************************/ -/* Value is the number of elements of vector VECTOR. */ - -#define DIM(VECTOR) (sizeof (VECTOR) / sizeof *(VECTOR)) - -/* List of supported image types. Use define_image_type to add new - types. Use lookup_image_type to find a type for a given symbol. */ - -static struct image_type *image_types; - -/* The symbol `image' which is the car of the lists used to represent - images in Lisp. */ - -extern Lisp_Object Qimage; - -/* The symbol `xbm' which is used as the type symbol for XBM images. */ - -Lisp_Object Qxbm; - -/* Keywords. */ - -extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile; -extern Lisp_Object QCdata, QCtype; -Lisp_Object QCascent, QCmargin, QCrelief; -Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask; -Lisp_Object QCindex; - -/* Other symbols. */ - -Lisp_Object Qlaplace; - -/* Time in seconds after which images should be removed from the cache - if not displayed. */ - -Lisp_Object Vimage_cache_eviction_delay; - -/* Function prototypes. */ - -static void define_image_type P_ ((struct image_type *type)); -static struct image_type *lookup_image_type P_ ((Lisp_Object symbol)); -static void image_error P_ ((char *format, Lisp_Object, Lisp_Object)); -static void x_laplace P_ ((struct frame *, struct image *)); -static int x_build_heuristic_mask P_ ((struct frame *, struct image *, - Lisp_Object)); - - -/* Define a new image type from TYPE. This adds a copy of TYPE to - image_types and adds the symbol *TYPE->type to Vimage_types. */ - -static void -define_image_type (type) - struct image_type *type; +DEFUN ("x-change-window-property", Fx_change_window_property, + Sx_change_window_property, 2, 6, 0, + doc: /* Change window property PROP to VALUE on the X window of FRAME. +VALUE may be a string or a list of conses, numbers and/or strings. +If an element in the list is a string, it is converted to +an Atom and the value of the Atom is used. If an element is a cons, +it is converted to a 32 bit number where the car is the 16 top bits and the +cdr is the lower 16 bits. +FRAME nil or omitted means use the selected frame. +If TYPE is given and non-nil, it is the name of the type of VALUE. +If TYPE is not given or nil, the type is STRING. +FORMAT gives the size in bits of each element if VALUE is a list. +It must be one of 8, 16 or 32. +If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8. +If OUTER_P is non-nil, the property is changed for the outer X window of +FRAME. Default is to change on the edit X window. + +Value is VALUE. */) + (prop, value, frame, type, format, outer_p) + Lisp_Object prop, value, frame, type, format, outer_p; { - /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. - The initialized data segment is read-only. */ - struct image_type *p = (struct image_type *) xmalloc (sizeof *p); - bcopy (type, p, sizeof *p); - p->next = image_types; - image_types = p; - Vimage_types = Fcons (*p->type, Vimage_types); -} +#if 0 /* MAC_TODO : port window properties to Mac */ + struct frame *f = check_x_frame (frame); + Atom prop_atom; + CHECK_STRING (prop); + CHECK_STRING (value); -/* Look up image type SYMBOL, and return a pointer to its image_type - structure. Value is null if SYMBOL is not a known image type. */ + BLOCK_INPUT; + prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), SDATA (prop), False); + XChangeProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), + prop_atom, XA_STRING, 8, PropModeReplace, + SDATA (value), SCHARS (value)); -static INLINE struct image_type * -lookup_image_type (symbol) - Lisp_Object symbol; -{ - struct image_type *type; + /* Make sure the property is set when we return. */ + XFlush (FRAME_W32_DISPLAY (f)); + UNBLOCK_INPUT; - for (type = image_types; type; type = type->next) - if (EQ (symbol, *type->type)) - break; +#endif /* MAC_TODO */ - return type; + return value; } -/* Value is non-zero if OBJECT is a valid Lisp image specification. A - valid image specification is a list whose car is the symbol - `image', and whose rest is a property list. The property list must - contain a value for key `:type'. That value must be the name of a - supported image type. The rest of the property list depends on the - image type. */ - -int -valid_image_p (object) - Lisp_Object object; +DEFUN ("x-delete-window-property", Fx_delete_window_property, + Sx_delete_window_property, 1, 2, 0, + doc: /* Remove window property PROP from X window of FRAME. +FRAME nil or omitted means use the selected frame. Value is PROP. */) + (prop, frame) + Lisp_Object prop, frame; { - int valid_p = 0; - - if (CONSP (object) && EQ (XCAR (object), Qimage)) - { - Lisp_Object symbol = Fplist_get (XCDR (object), QCtype); - struct image_type *type = lookup_image_type (symbol); - - if (type) - valid_p = type->valid_p (object); - } +#if 0 /* MAC_TODO : port window properties to Mac */ - return valid_p; -} + struct frame *f = check_x_frame (frame); + Atom prop_atom; + CHECK_STRING (prop); + BLOCK_INPUT; + prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), SDATA (prop), False); + XDeleteProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), prop_atom); -/* Log error message with format string FORMAT and argument ARG. - Signaling an error, e.g. when an image cannot be loaded, is not a - good idea because this would interrupt redisplay, and the error - message display would lead to another redisplay. This function - therefore simply displays a message. */ + /* Make sure the property is removed when we return. */ + XFlush (FRAME_W32_DISPLAY (f)); + UNBLOCK_INPUT; +#endif /* MAC_TODO */ -static void -image_error (format, arg1, arg2) - char *format; - Lisp_Object arg1, arg2; -{ - add_to_log (format, arg1, arg2); + return prop; } - -/*********************************************************************** - Image specifications - ***********************************************************************/ - -enum image_value_type +DEFUN ("x-window-property", Fx_window_property, Sx_window_property, + 1, 2, 0, + doc: /* Value is the value of window property PROP on FRAME. +If FRAME is nil or omitted, use the selected frame. Value is nil +if FRAME hasn't a property with name PROP or if PROP has no string +value. */) + (prop, frame) + Lisp_Object prop, frame; { - IMAGE_DONT_CHECK_VALUE_TYPE, - IMAGE_STRING_VALUE, - IMAGE_SYMBOL_VALUE, - IMAGE_POSITIVE_INTEGER_VALUE, - IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, - IMAGE_NON_NEGATIVE_INTEGER_VALUE, - IMAGE_ASCENT_VALUE, - IMAGE_INTEGER_VALUE, - IMAGE_FUNCTION_VALUE, - IMAGE_NUMBER_VALUE, - IMAGE_BOOL_VALUE -}; - -/* Structure used when parsing image specifications. */ - -struct image_keyword -{ - /* Name of keyword. */ - char *name; - - /* The type of value allowed. */ - enum image_value_type type; - - /* Non-zero means key must be present. */ - int mandatory_p; - - /* Used to recognize duplicate keywords in a property list. */ - int count; - - /* The value that was found. */ - Lisp_Object value; -}; - - -static int parse_image_spec P_ ((Lisp_Object, struct image_keyword *, - int, Lisp_Object)); -static Lisp_Object image_spec_value P_ ((Lisp_Object, Lisp_Object, int *)); - - -/* Parse image spec SPEC according to KEYWORDS. A valid image spec - has the format (image KEYWORD VALUE ...). One of the keyword/ - value pairs must be `:type TYPE'. KEYWORDS is a vector of - image_keywords structures of size NKEYWORDS describing other - allowed keyword/value pairs. Value is non-zero if SPEC is valid. */ - -static int -parse_image_spec (spec, keywords, nkeywords, type) - Lisp_Object spec; - struct image_keyword *keywords; - int nkeywords; - Lisp_Object type; -{ - int i; - Lisp_Object plist; - - if (!CONSP (spec) || !EQ (XCAR (spec), Qimage)) - return 0; - - plist = XCDR (spec); - while (CONSP (plist)) - { - Lisp_Object key, value; - - /* First element of a pair must be a symbol. */ - key = XCAR (plist); - plist = XCDR (plist); - if (!SYMBOLP (key)) - return 0; - - /* There must follow a value. */ - if (!CONSP (plist)) - return 0; - value = XCAR (plist); - plist = XCDR (plist); - - /* Find key in KEYWORDS. Error if not found. */ - for (i = 0; i < nkeywords; ++i) - if (strcmp (keywords[i].name, SDATA (SYMBOL_NAME (key))) == 0) - break; - - if (i == nkeywords) - continue; - - /* Record that we recognized the keyword. If a keywords - was found more than once, it's an error. */ - keywords[i].value = value; - ++keywords[i].count; - - if (keywords[i].count > 1) - return 0; - - /* Check type of value against allowed type. */ - switch (keywords[i].type) - { - case IMAGE_STRING_VALUE: - if (!STRINGP (value)) - return 0; - break; - - case IMAGE_SYMBOL_VALUE: - if (!SYMBOLP (value)) - return 0; - break; - - case IMAGE_POSITIVE_INTEGER_VALUE: - if (!INTEGERP (value) || XINT (value) <= 0) - return 0; - break; - - case IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR: - if (INTEGERP (value) && XINT (value) >= 0) - break; - if (CONSP (value) - && INTEGERP (XCAR (value)) && INTEGERP (XCDR (value)) - && XINT (XCAR (value)) >= 0 && XINT (XCDR (value)) >= 0) - break; - return 0; - - case IMAGE_ASCENT_VALUE: - if (SYMBOLP (value) && EQ (value, Qcenter)) - break; - else if (INTEGERP (value) - && XINT (value) >= 0 - && XINT (value) <= 100) - break; - return 0; - - case IMAGE_NON_NEGATIVE_INTEGER_VALUE: - if (!INTEGERP (value) || XINT (value) < 0) - return 0; - break; - - case IMAGE_DONT_CHECK_VALUE_TYPE: - break; - - case IMAGE_FUNCTION_VALUE: - value = indirect_function (value); - if (SUBRP (value) - || COMPILEDP (value) - || (CONSP (value) && EQ (XCAR (value), Qlambda))) - break; - return 0; - - case IMAGE_NUMBER_VALUE: - if (!INTEGERP (value) && !FLOATP (value)) - return 0; - break; - - case IMAGE_INTEGER_VALUE: - if (!INTEGERP (value)) - return 0; - break; - - case IMAGE_BOOL_VALUE: - if (!NILP (value) && !EQ (value, Qt)) - return 0; - break; - - default: - abort (); - break; - } - - if (EQ (key, QCtype) && !EQ (type, value)) - return 0; - } - - /* Check that all mandatory fields are present. */ - for (i = 0; i < nkeywords; ++i) - if (keywords[i].mandatory_p && keywords[i].count == 0) - return 0; - - return NILP (plist); -} - - -/* Return the value of KEY in image specification SPEC. Value is nil - if KEY is not present in SPEC. if FOUND is not null, set *FOUND - to 1 if KEY was found in SPEC, set it to 0 otherwise. */ - -static Lisp_Object -image_spec_value (spec, key, found) - Lisp_Object spec, key; - int *found; -{ - Lisp_Object tail; - - xassert (valid_image_p (spec)); - - for (tail = XCDR (spec); - CONSP (tail) && CONSP (XCDR (tail)); - tail = XCDR (XCDR (tail))) - { - if (EQ (XCAR (tail), key)) - { - if (found) - *found = 1; - return XCAR (XCDR (tail)); - } - } - - if (found) - *found = 0; - return Qnil; -} - - - - -/*********************************************************************** - Image type independent image structures - ***********************************************************************/ - -static struct image *make_image P_ ((Lisp_Object spec, unsigned hash)); -static void free_image P_ ((struct frame *f, struct image *img)); - - -/* Allocate and return a new image structure for image specification - SPEC. SPEC has a hash value of HASH. */ - -static struct image * -make_image (spec, hash) - Lisp_Object spec; - unsigned hash; -{ - struct image *img = (struct image *) xmalloc (sizeof *img); - - xassert (valid_image_p (spec)); - bzero (img, sizeof *img); - img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL)); - xassert (img->type != NULL); - img->spec = spec; - img->data.lisp_val = Qnil; - img->ascent = DEFAULT_IMAGE_ASCENT; - img->hash = hash; - return img; -} - - -/* Free image IMG which was used on frame F, including its resources. */ - -static void -free_image (f, img) - struct frame *f; - struct image *img; -{ - if (img) - { - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - - /* Remove IMG from the hash table of its cache. */ - if (img->prev) - img->prev->next = img->next; - else - c->buckets[img->hash % IMAGE_CACHE_BUCKETS_SIZE] = img->next; - - if (img->next) - img->next->prev = img->prev; - - c->images[img->id] = NULL; - - /* Free resources, then free IMG. */ - img->type->free (f, img); - xfree (img); - } -} - - -/* Prepare image IMG for display on frame F. Must be called before - drawing an image. */ - -void -prepare_image_for_display (f, img) - struct frame *f; - struct image *img; -{ - EMACS_TIME t; - - /* We're about to display IMG, so set its timestamp to `now'. */ - EMACS_GET_TIME (t); - img->timestamp = EMACS_SECS (t); - - /* If IMG doesn't have a pixmap yet, load it now, using the image - type dependent loader function. */ - if (img->pixmap == 0 && !img->load_failed_p) - img->load_failed_p = img->type->load (f, img) == 0; -} - - -/* Value is the number of pixels for the ascent of image IMG when - drawn in face FACE. */ - -int -image_ascent (img, face) - struct image *img; - struct face *face; -{ - int height = img->height + img->vmargin; - int ascent; - - if (img->ascent == CENTERED_IMAGE_ASCENT) - { - if (face->font) - ascent = height / 2 - (FONT_DESCENT(face->font) - - FONT_BASE(face->font)) / 2; - else - ascent = height / 2; - } - else - ascent = height * img->ascent / 100.0; - - return ascent; -} - - - -/*********************************************************************** - Helper functions for X image types - ***********************************************************************/ - -static void x_clear_image P_ ((struct frame *f, struct image *img)); -static unsigned long x_alloc_image_color P_ ((struct frame *f, - struct image *img, - Lisp_Object color_name, - unsigned long dflt)); - -/* Free X resources of image IMG which is used on frame F. */ - -static void -x_clear_image (f, img) - struct frame *f; - struct image *img; -{ -#if 0 /* MAC_TODO: W32 image support */ - - if (img->pixmap) - { - BLOCK_INPUT; - XFreePixmap (NULL, img->pixmap); - img->pixmap = 0; - UNBLOCK_INPUT; - } - - if (img->ncolors) - { - int class = FRAME_W32_DISPLAY_INFO (f)->visual->class; - - /* If display has an immutable color map, freeing colors is not - necessary and some servers don't allow it. So don't do it. */ - if (class != StaticColor - && class != StaticGray - && class != TrueColor) - { - Colormap cmap; - BLOCK_INPUT; - cmap = DefaultColormapOfScreen (FRAME_W32_DISPLAY_INFO (f)->screen); - XFreeColors (FRAME_W32_DISPLAY (f), cmap, img->colors, - img->ncolors, 0); - UNBLOCK_INPUT; - } - - xfree (img->colors); - img->colors = NULL; - img->ncolors = 0; - } -#endif /* MAC_TODO */ -} - - -/* Allocate color COLOR_NAME for image IMG on frame F. If color - cannot be allocated, use DFLT. Add a newly allocated color to - IMG->colors, so that it can be freed again. Value is the pixel - color. */ - -static unsigned long -x_alloc_image_color (f, img, color_name, dflt) - struct frame *f; - struct image *img; - Lisp_Object color_name; - unsigned long dflt; -{ -#if 0 /* MAC_TODO: allocing colors. */ - XColor color; - unsigned long result; - - xassert (STRINGP (color_name)); - - if (w32_defined_color (f, SDATA (color_name), &color, 1)) - { - /* This isn't called frequently so we get away with simply - reallocating the color vector to the needed size, here. */ - ++img->ncolors; - img->colors = - (unsigned long *) xrealloc (img->colors, - img->ncolors * sizeof *img->colors); - img->colors[img->ncolors - 1] = color.pixel; - result = color.pixel; - } - else - result = dflt; - return result; -#endif /* MAC_TODO */ - return 0; -} - - - -/*********************************************************************** - Image Cache - ***********************************************************************/ - -static void cache_image P_ ((struct frame *f, struct image *img)); - - -/* Return a new, initialized image cache that is allocated from the - heap. Call free_image_cache to free an image cache. */ - -struct image_cache * -make_image_cache () -{ - struct image_cache *c = (struct image_cache *) xmalloc (sizeof *c); - int size; - - bzero (c, sizeof *c); - c->size = 50; - c->images = (struct image **) xmalloc (c->size * sizeof *c->images); - size = IMAGE_CACHE_BUCKETS_SIZE * sizeof *c->buckets; - c->buckets = (struct image **) xmalloc (size); - bzero (c->buckets, size); - return c; -} - - -/* Free image cache of frame F. Be aware that X frames share images - caches. */ - -void -free_image_cache (f) - struct frame *f; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - if (c) - { - int i; - - /* Cache should not be referenced by any frame when freed. */ - xassert (c->refcount == 0); - - for (i = 0; i < c->used; ++i) - free_image (f, c->images[i]); - xfree (c->images); - xfree (c->buckets); - xfree (c); - FRAME_X_IMAGE_CACHE (f) = NULL; - } -} - - -/* Clear image cache of frame F. FORCE_P non-zero means free all - images. FORCE_P zero means clear only images that haven't been - displayed for some time. Should be called from time to time to - reduce the number of loaded images. If image-eviction-seconds is - non-nil, this frees images in the cache which weren't displayed for - at least that many seconds. */ - -void -clear_image_cache (f, force_p) - struct frame *f; - int force_p; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - - if (c && INTEGERP (Vimage_cache_eviction_delay)) - { - EMACS_TIME t; - unsigned long old; - int i, any_freed_p = 0; - - EMACS_GET_TIME (t); - old = EMACS_SECS (t) - XFASTINT (Vimage_cache_eviction_delay); - - for (i = 0; i < c->used; ++i) - { - struct image *img = c->images[i]; - if (img != NULL - && (force_p - || (img->timestamp > old))) - { - free_image (f, img); - any_freed_p = 1; - } - } - - /* We may be clearing the image cache because, for example, - Emacs was iconified for a longer period of time. In that - case, current matrices may still contain references to - images freed above. So, clear these matrices. */ - if (any_freed_p) - { - clear_current_matrices (f); - ++windows_or_buffers_changed; - } - } -} - - -DEFUN ("clear-image-cache", Fclear_image_cache, Sclear_image_cache, - 0, 1, 0, - doc: /* Clear the image cache of FRAME. -FRAME nil or omitted means use the selected frame. -FRAME t means clear the image caches of all frames. */) - (frame) - Lisp_Object frame; -{ - if (EQ (frame, Qt)) - { - Lisp_Object tail; - - FOR_EACH_FRAME (tail, frame) - if (FRAME_MAC_P (XFRAME (frame))) - clear_image_cache (XFRAME (frame), 1); - } - else - clear_image_cache (check_x_frame (frame), 1); - - return Qnil; -} - - -/* Return the id of image with Lisp specification SPEC on frame F. - SPEC must be a valid Lisp image specification (see valid_image_p). */ - -int -lookup_image (f, spec) - struct frame *f; - Lisp_Object spec; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - struct image *img; - int i; - unsigned hash; - struct gcpro gcpro1; - EMACS_TIME now; - - /* F must be a window-system frame, and SPEC must be a valid image - specification. */ - xassert (FRAME_WINDOW_P (f)); - xassert (valid_image_p (spec)); - - GCPRO1 (spec); - - /* Look up SPEC in the hash table of the image cache. */ - hash = sxhash (spec, 0); - i = hash % IMAGE_CACHE_BUCKETS_SIZE; - - for (img = c->buckets[i]; img; img = img->next) - if (img->hash == hash && !NILP (Fequal (img->spec, spec))) - break; - - /* If not found, create a new image and cache it. */ - if (img == NULL) - { - BLOCK_INPUT; - img = make_image (spec, hash); - cache_image (f, img); - img->load_failed_p = img->type->load (f, img) == 0; - xassert (!interrupt_input_blocked); - - /* If we can't load the image, and we don't have a width and - height, use some arbitrary width and height so that we can - draw a rectangle for it. */ - if (img->load_failed_p) - { - Lisp_Object value; - - value = image_spec_value (spec, QCwidth, NULL); - img->width = (INTEGERP (value) - ? XFASTINT (value) : DEFAULT_IMAGE_WIDTH); - value = image_spec_value (spec, QCheight, NULL); - img->height = (INTEGERP (value) - ? XFASTINT (value) : DEFAULT_IMAGE_HEIGHT); - } - else - { - /* Handle image type independent image attributes - `:ascent PERCENT', `:margin MARGIN', `:relief RELIEF'. */ - Lisp_Object ascent, margin, relief; - - ascent = image_spec_value (spec, QCascent, NULL); - if (INTEGERP (ascent)) - img->ascent = XFASTINT (ascent); - else if (EQ (ascent, Qcenter)) - img->ascent = CENTERED_IMAGE_ASCENT; - - margin = image_spec_value (spec, QCmargin, NULL); - if (INTEGERP (margin) && XINT (margin) >= 0) - img->vmargin = img->hmargin = XFASTINT (margin); - else if (CONSP (margin) && INTEGERP (XCAR (margin)) - && INTEGERP (XCDR (margin))) - { - if (XINT (XCAR (margin)) > 0) - img->hmargin = XFASTINT (XCAR (margin)); - if (XINT (XCDR (margin)) > 0) - img->vmargin = XFASTINT (XCDR (margin)); - } - - relief = image_spec_value (spec, QCrelief, NULL); - if (INTEGERP (relief)) - { - img->relief = XINT (relief); - img->hmargin += abs (img->relief); - img->vmargin += abs (img->relief); - } - } - } - - /* We're using IMG, so set its timestamp to `now'. */ - EMACS_GET_TIME (now); - img->timestamp = EMACS_SECS (now); - - UNGCPRO; - - /* Value is the image id. */ - return img->id; -} - - -/* Cache image IMG in the image cache of frame F. */ - -static void -cache_image (f, img) - struct frame *f; - struct image *img; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - int i; - - /* Find a free slot in c->images. */ - for (i = 0; i < c->used; ++i) - if (c->images[i] == NULL) - break; - - /* If no free slot found, maybe enlarge c->images. */ - if (i == c->used && c->used == c->size) - { - c->size *= 2; - c->images = (struct image **) xrealloc (c->images, - c->size * sizeof *c->images); - } - - /* Add IMG to c->images, and assign IMG an id. */ - c->images[i] = img; - img->id = i; - if (i == c->used) - ++c->used; - - /* Add IMG to the cache's hash table. */ - i = img->hash % IMAGE_CACHE_BUCKETS_SIZE; - img->next = c->buckets[i]; - if (img->next) - img->next->prev = img; - img->prev = NULL; - c->buckets[i] = img; -} - - -/* Call FN on every image in the image cache of frame F. Used to mark - Lisp Objects in the image cache. */ - -void -forall_images_in_image_cache (f, fn) - struct frame *f; - void (*fn) P_ ((struct image *img)); -{ - if (FRAME_LIVE_P (f) && FRAME_MAC_P (f)) - { - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - if (c) - { - int i; - for (i = 0; i < c->used; ++i) - if (c->images[i]) - fn (c->images[i]); - } - } -} - - - -/*********************************************************************** - Mac support code - ***********************************************************************/ - -#if 0 /* MAC_TODO: Mac specific image code. */ - -static int x_create_x_image_and_pixmap P_ ((struct frame *, int, int, int, - XImage **, Pixmap *)); -static void x_destroy_x_image P_ ((XImage *)); -static void x_put_x_image P_ ((struct frame *, XImage *, Pixmap, int, int)); - - -/* Create an XImage and a pixmap of size WIDTH x HEIGHT for use on - frame F. Set *XIMG and *PIXMAP to the XImage and Pixmap created. - Set (*XIMG)->data to a raster of WIDTH x HEIGHT pixels allocated - via xmalloc. Print error messages via image_error if an error - occurs. Value is non-zero if successful. */ - -static int -x_create_x_image_and_pixmap (f, width, height, depth, ximg, pixmap) - struct frame *f; - int width, height, depth; - XImage **ximg; - Pixmap *pixmap; -{ -#if 0 /* MAC_TODO: Image support for Mac */ - Display *display = FRAME_W32_DISPLAY (f); - Screen *screen = FRAME_X_SCREEN (f); - Window window = FRAME_W32_WINDOW (f); - - xassert (interrupt_input_blocked); - - if (depth <= 0) - depth = DefaultDepthOfScreen (screen); - *ximg = XCreateImage (display, DefaultVisualOfScreen (screen), - depth, ZPixmap, 0, NULL, width, height, - depth > 16 ? 32 : depth > 8 ? 16 : 8, 0); - if (*ximg == NULL) - { - image_error ("Unable to allocate X image", Qnil, Qnil); - return 0; - } - - /* Allocate image raster. */ - (*ximg)->data = (char *) xmalloc ((*ximg)->bytes_per_line * height); - - /* Allocate a pixmap of the same size. */ - *pixmap = XCreatePixmap (display, window, width, height, depth); - if (*pixmap == 0) - { - x_destroy_x_image (*ximg); - *ximg = NULL; - image_error ("Unable to create X pixmap", Qnil, Qnil); - return 0; - } -#endif /* MAC_TODO */ - return 1; -} - - -/* Destroy XImage XIMG. Free XIMG->data. */ - -static void -x_destroy_x_image (ximg) - XImage *ximg; -{ - xassert (interrupt_input_blocked); - if (ximg) - { - xfree (ximg->data); - ximg->data = NULL; - XDestroyImage (ximg); - } -} - - -/* Put XImage XIMG into pixmap PIXMAP on frame F. WIDTH and HEIGHT - are width and height of both the image and pixmap. */ - -static void -x_put_x_image (f, ximg, pixmap, width, height) - struct frame *f; - XImage *ximg; - Pixmap pixmap; -{ - GC gc; - - xassert (interrupt_input_blocked); - gc = XCreateGC (NULL, pixmap, 0, NULL); - XPutImage (NULL, pixmap, gc, ximg, 0, 0, 0, 0, width, height); - XFreeGC (NULL, gc); -} - -#endif /* MAC_TODO */ - - -/*********************************************************************** - Searching files - ***********************************************************************/ - -static Lisp_Object x_find_image_file P_ ((Lisp_Object)); - -/* Find image file FILE. Look in data-directory, then - x-bitmap-file-path. Value is the full name of the file found, or - nil if not found. */ - -static Lisp_Object -x_find_image_file (file) - Lisp_Object file; -{ - Lisp_Object file_found, search_path; - struct gcpro gcpro1, gcpro2; - int fd; - - file_found = Qnil; - search_path = Fcons (Vdata_directory, Vx_bitmap_file_path); - GCPRO2 (file_found, search_path); - - /* Try to find FILE in data-directory, then x-bitmap-file-path. */ - fd = openp (search_path, file, Qnil, &file_found, Qnil); - - if (fd < 0) - file_found = Qnil; - else - close (fd); - - UNGCPRO; - return file_found; -} - - -/*********************************************************************** - XBM images - ***********************************************************************/ - -static int xbm_load P_ ((struct frame *f, struct image *img)); -static int xbm_load_image_from_file P_ ((struct frame *f, struct image *img, - Lisp_Object file)); -static int xbm_image_p P_ ((Lisp_Object object)); -static int xbm_read_bitmap_file_data P_ ((char *, int *, int *, - unsigned char **)); - - -/* Indices of image specification fields in xbm_format, below. */ - -enum xbm_keyword_index -{ - XBM_TYPE, - XBM_FILE, - XBM_WIDTH, - XBM_HEIGHT, - XBM_DATA, - XBM_FOREGROUND, - XBM_BACKGROUND, - XBM_ASCENT, - XBM_MARGIN, - XBM_RELIEF, - XBM_ALGORITHM, - XBM_HEURISTIC_MASK, - XBM_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid XBM image specifications. */ - -static struct image_keyword xbm_format[XBM_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":file", IMAGE_STRING_VALUE, 0}, - {":width", IMAGE_POSITIVE_INTEGER_VALUE, 0}, - {":height", IMAGE_POSITIVE_INTEGER_VALUE, 0}, - {":data", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":foreground", IMAGE_STRING_VALUE, 0}, - {":background", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} -}; - -/* Structure describing the image type XBM. */ - -static struct image_type xbm_type = -{ - &Qxbm, - xbm_image_p, - xbm_load, - x_clear_image, - NULL -}; - -/* Tokens returned from xbm_scan. */ - -enum xbm_token -{ - XBM_TK_IDENT = 256, - XBM_TK_NUMBER -}; - - -/* Return non-zero if OBJECT is a valid XBM-type image specification. - A valid specification is a list starting with the symbol `image' - The rest of the list is a property list which must contain an - entry `:type xbm.. - - If the specification specifies a file to load, it must contain - an entry `:file FILENAME' where FILENAME is a string. - - If the specification is for a bitmap loaded from memory it must - contain `:width WIDTH', `:height HEIGHT', and `:data DATA', where - WIDTH and HEIGHT are integers > 0. DATA may be: - - 1. a string large enough to hold the bitmap data, i.e. it must - have a size >= (WIDTH + 7) / 8 * HEIGHT - - 2. a bool-vector of size >= WIDTH * HEIGHT - - 3. a vector of strings or bool-vectors, one for each line of the - bitmap. - - Both the file and data forms may contain the additional entries - `:background COLOR' and `:foreground COLOR'. If not present, - foreground and background of the frame on which the image is - displayed, is used. */ - -static int -xbm_image_p (object) - Lisp_Object object; -{ - struct image_keyword kw[XBM_LAST]; - - bcopy (xbm_format, kw, sizeof kw); - if (!parse_image_spec (object, kw, XBM_LAST, Qxbm)) - return 0; - - xassert (EQ (kw[XBM_TYPE].value, Qxbm)); - - if (kw[XBM_FILE].count) - { - if (kw[XBM_WIDTH].count || kw[XBM_HEIGHT].count || kw[XBM_DATA].count) - return 0; - } - else - { - Lisp_Object data; - int width, height; - - /* Entries for `:width', `:height' and `:data' must be present. */ - if (!kw[XBM_WIDTH].count - || !kw[XBM_HEIGHT].count - || !kw[XBM_DATA].count) - return 0; - - data = kw[XBM_DATA].value; - width = XFASTINT (kw[XBM_WIDTH].value); - height = XFASTINT (kw[XBM_HEIGHT].value); - - /* Check type of data, and width and height against contents of - data. */ - if (VECTORP (data)) - { - int i; - - /* Number of elements of the vector must be >= height. */ - if (XVECTOR (data)->size < height) - return 0; - - /* Each string or bool-vector in data must be large enough - for one line of the image. */ - for (i = 0; i < height; ++i) - { - Lisp_Object elt = XVECTOR (data)->contents[i]; - - if (STRINGP (elt)) - { - if (SCHARS (elt) - < (width + BITS_PER_CHAR - 1) / BITS_PER_CHAR) - return 0; - } - else if (BOOL_VECTOR_P (elt)) - { - if (XBOOL_VECTOR (elt)->size < width) - return 0; - } - else - return 0; - } - } - else if (STRINGP (data)) - { - if (SCHARS (data) - < (width + BITS_PER_CHAR - 1) / BITS_PER_CHAR * height) - return 0; - } - else if (BOOL_VECTOR_P (data)) - { - if (XBOOL_VECTOR (data)->size < width * height) - return 0; - } - else - return 0; - } - - /* Baseline must be a value between 0 and 100 (a percentage). */ - if (kw[XBM_ASCENT].count - && XFASTINT (kw[XBM_ASCENT].value) > 100) - return 0; - - return 1; -} - - -/* Scan a bitmap file. FP is the stream to read from. Value is - either an enumerator from enum xbm_token, or a character for a - single-character token, or 0 at end of file. If scanning an - identifier, store the lexeme of the identifier in SVAL. If - scanning a number, store its value in *IVAL. */ - -static int -xbm_scan (fp, sval, ival) - FILE *fp; - char *sval; - int *ival; -{ - int c; - - /* Skip white space. */ - while ((c = fgetc (fp)) != EOF && isspace (c)) - ; - - if (c == EOF) - c = 0; - else if (isdigit (c)) - { - int value = 0, digit; - - if (c == '0') - { - c = fgetc (fp); - if (c == 'x' || c == 'X') - { - while ((c = fgetc (fp)) != EOF) - { - if (isdigit (c)) - digit = c - '0'; - else if (c >= 'a' && c <= 'f') - digit = c - 'a' + 10; - else if (c >= 'A' && c <= 'F') - digit = c - 'A' + 10; - else - break; - value = 16 * value + digit; - } - } - else if (isdigit (c)) - { - value = c - '0'; - while ((c = fgetc (fp)) != EOF - && isdigit (c)) - value = 8 * value + c - '0'; - } - } - else - { - value = c - '0'; - while ((c = fgetc (fp)) != EOF - && isdigit (c)) - value = 10 * value + c - '0'; - } - - if (c != EOF) - ungetc (c, fp); - *ival = value; - c = XBM_TK_NUMBER; - } - else if (isalpha (c) || c == '_') - { - *sval++ = c; - while ((c = fgetc (fp)) != EOF - && (isalnum (c) || c == '_')) - *sval++ = c; - *sval = 0; - if (c != EOF) - ungetc (c, fp); - c = XBM_TK_IDENT; - } - - return c; -} - - -/* Replacement for XReadBitmapFileData which isn't available under old - X versions. FILE is the name of the bitmap file to read. Set - *WIDTH and *HEIGHT to the width and height of the image. Return in - *DATA the bitmap data allocated with xmalloc. Value is non-zero if - successful. */ - -static int -xbm_read_bitmap_file_data (file, width, height, data) - char *file; - int *width, *height; - unsigned char **data; -{ - FILE *fp; - char buffer[BUFSIZ]; - int padding_p = 0; - int v10 = 0; - int bytes_per_line, i, nbytes; - unsigned char *p; - int value; - int LA1; - -#define match() \ - LA1 = xbm_scan (fp, buffer, &value) - -#define expect(TOKEN) \ - if (LA1 != (TOKEN)) \ - goto failure; \ - else \ - match () - -#define expect_ident(IDENT) \ - if (LA1 == XBM_TK_IDENT && strcmp (buffer, (IDENT)) == 0) \ - match (); \ - else \ - goto failure - - fp = fopen (file, "r"); - if (fp == NULL) - return 0; - - *width = *height = -1; - *data = NULL; - LA1 = xbm_scan (fp, buffer, &value); - - /* Parse defines for width, height and hot-spots. */ - while (LA1 == '#') - { - match (); - expect_ident ("define"); - expect (XBM_TK_IDENT); - - if (LA1 == XBM_TK_NUMBER); - { - char *p = strrchr (buffer, '_'); - p = p ? p + 1 : buffer; - if (strcmp (p, "width") == 0) - *width = value; - else if (strcmp (p, "height") == 0) - *height = value; - } - expect (XBM_TK_NUMBER); - } - - if (*width < 0 || *height < 0) - goto failure; - - /* Parse bits. Must start with `static'. */ - expect_ident ("static"); - if (LA1 == XBM_TK_IDENT) - { - if (strcmp (buffer, "unsigned") == 0) - { - match (); - expect_ident ("char"); - } - else if (strcmp (buffer, "short") == 0) - { - match (); - v10 = 1; - if (*width % 16 && *width % 16 < 9) - padding_p = 1; - } - else if (strcmp (buffer, "char") == 0) - match (); - else - goto failure; - } - else - goto failure; - - expect (XBM_TK_IDENT); - expect ('['); - expect (']'); - expect ('='); - expect ('{'); - - bytes_per_line = (*width + 7) / 8 + padding_p; - nbytes = bytes_per_line * *height; - p = *data = (char *) xmalloc (nbytes); - - if (v10) - { - - for (i = 0; i < nbytes; i += 2) - { - int val = value; - expect (XBM_TK_NUMBER); - - *p++ = val; - if (!padding_p || ((i + 2) % bytes_per_line)) - *p++ = value >> 8; - - if (LA1 == ',' || LA1 == '}') - match (); - else - goto failure; - } - } - else - { - for (i = 0; i < nbytes; ++i) - { - int val = value; - expect (XBM_TK_NUMBER); - - *p++ = val; - - if (LA1 == ',' || LA1 == '}') - match (); - else - goto failure; - } - } - - fclose (fp); - return 1; - - failure: - - fclose (fp); - if (*data) - { - xfree (*data); - *data = NULL; - } - return 0; - -#undef match -#undef expect -#undef expect_ident -} - - -/* Load XBM image IMG which will be displayed on frame F from file - SPECIFIED_FILE. Value is non-zero if successful. */ - -static int -xbm_load_image_from_file (f, img, specified_file) - struct frame *f; - struct image *img; - Lisp_Object specified_file; -{ - int rc; - unsigned char *data; - int success_p = 0; - Lisp_Object file; - struct gcpro gcpro1; - - xassert (STRINGP (specified_file)); - file = Qnil; - GCPRO1 (file); - - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - rc = xbm_read_bitmap_file_data (SDATA (file), &img->width, - &img->height, &data); - if (rc) - { - int depth = one_mac_display_info.n_cbits; - unsigned long foreground = FRAME_FOREGROUND_PIXEL (f); - unsigned long background = FRAME_BACKGROUND_PIXEL (f); - Lisp_Object value; - - xassert (img->width > 0 && img->height > 0); - - /* Get foreground and background colors, maybe allocate colors. */ - value = image_spec_value (img->spec, QCforeground, NULL); - if (!NILP (value)) - foreground = x_alloc_image_color (f, img, value, foreground); - - value = image_spec_value (img->spec, QCbackground, NULL); - if (!NILP (value)) - background = x_alloc_image_color (f, img, value, background); - -#if 0 /* MAC_TODO : Port image display to Mac */ - BLOCK_INPUT; - img->pixmap - = XCreatePixmapFromBitmapData (FRAME_W32_DISPLAY (f), - FRAME_W32_WINDOW (f), - data, - img->width, img->height, - foreground, background, - depth); - xfree (data); - - if (img->pixmap == 0) - { - x_clear_image (f, img); - image_error ("Unable to create X pixmap for `%s'", file, Qnil); - } - else - success_p = 1; - - UNBLOCK_INPUT; -#endif /* MAC_TODO */ - } - else - image_error ("Error loading XBM image `%s'", img->spec, Qnil); - - UNGCPRO; - return success_p; -} - - -/* Fill image IMG which is used on frame F with pixmap data. Value is - non-zero if successful. */ - -static int -xbm_load (f, img) - struct frame *f; - struct image *img; -{ - int success_p = 0; - Lisp_Object file_name; - - xassert (xbm_image_p (img->spec)); - - /* If IMG->spec specifies a file name, create a non-file spec from it. */ - file_name = image_spec_value (img->spec, QCfile, NULL); - if (STRINGP (file_name)) - success_p = xbm_load_image_from_file (f, img, file_name); - else - { - struct image_keyword fmt[XBM_LAST]; - Lisp_Object data; - int depth; - unsigned long foreground = FRAME_FOREGROUND_PIXEL (f); - unsigned long background = FRAME_BACKGROUND_PIXEL (f); - char *bits; - int parsed_p; - - /* Parse the list specification. */ - bcopy (xbm_format, fmt, sizeof fmt); - parsed_p = parse_image_spec (img->spec, fmt, XBM_LAST, Qxbm); - xassert (parsed_p); - - /* Get specified width, and height. */ - img->width = XFASTINT (fmt[XBM_WIDTH].value); - img->height = XFASTINT (fmt[XBM_HEIGHT].value); - xassert (img->width > 0 && img->height > 0); - - BLOCK_INPUT; - - if (fmt[XBM_ASCENT].count) - img->ascent = XFASTINT (fmt[XBM_ASCENT].value); - - /* Get foreground and background colors, maybe allocate colors. */ - if (fmt[XBM_FOREGROUND].count) - foreground = x_alloc_image_color (f, img, fmt[XBM_FOREGROUND].value, - foreground); - if (fmt[XBM_BACKGROUND].count) - background = x_alloc_image_color (f, img, fmt[XBM_BACKGROUND].value, - background); - - /* Set bits to the bitmap image data. */ - data = fmt[XBM_DATA].value; - if (VECTORP (data)) - { - int i; - char *p; - int nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR; - - p = bits = (char *) alloca (nbytes * img->height); - for (i = 0; i < img->height; ++i, p += nbytes) - { - Lisp_Object line = XVECTOR (data)->contents[i]; - if (STRINGP (line)) - bcopy (SDATA (line), p, nbytes); - else - bcopy (XBOOL_VECTOR (line)->data, p, nbytes); - } - } - else if (STRINGP (data)) - bits = SDATA (data); - else - bits = XBOOL_VECTOR (data)->data; - -#if 0 /* MAC_TODO : port Mac display code */ - /* Create the pixmap. */ - depth = DefaultDepthOfScreen (FRAME_X_SCREEN (f)); - img->pixmap - = XCreatePixmapFromBitmapData (FRAME_W32_DISPLAY (f), - FRAME_W32_WINDOW (f), - bits, - img->width, img->height, - foreground, background, - depth); -#endif /* MAC_TODO */ - - if (img->pixmap) - success_p = 1; - else - { - image_error ("Unable to create pixmap for XBM image `%s'", - img->spec, Qnil); - x_clear_image (f, img); - } - - UNBLOCK_INPUT; - } - - return success_p; -} - - - -/*********************************************************************** - XPM images - ***********************************************************************/ - -#if HAVE_XPM - -static int xpm_image_p P_ ((Lisp_Object object)); -static int xpm_load P_ ((struct frame *f, struct image *img)); -static int xpm_valid_color_symbols_p P_ ((Lisp_Object)); - -#include "X11/xpm.h" - -/* The symbol `xpm' identifying XPM-format images. */ - -Lisp_Object Qxpm; - -/* Indices of image specification fields in xpm_format, below. */ - -enum xpm_keyword_index -{ - XPM_TYPE, - XPM_FILE, - XPM_DATA, - XPM_ASCENT, - XPM_MARGIN, - XPM_RELIEF, - XPM_ALGORITHM, - XPM_HEURISTIC_MASK, - XPM_COLOR_SYMBOLS, - XPM_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid XPM image specifications. */ - -static struct image_keyword xpm_format[XPM_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":file", IMAGE_STRING_VALUE, 0}, - {":data", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":color-symbols", IMAGE_DONT_CHECK_VALUE_TYPE, 0} -}; - -/* Structure describing the image type XBM. */ - -static struct image_type xpm_type = -{ - &Qxpm, - xpm_image_p, - xpm_load, - x_clear_image, - NULL -}; - - -/* Value is non-zero if COLOR_SYMBOLS is a valid color symbols list - for XPM images. Such a list must consist of conses whose car and - cdr are strings. */ - -static int -xpm_valid_color_symbols_p (color_symbols) - Lisp_Object color_symbols; -{ - while (CONSP (color_symbols)) - { - Lisp_Object sym = XCAR (color_symbols); - if (!CONSP (sym) - || !STRINGP (XCAR (sym)) - || !STRINGP (XCDR (sym))) - break; - color_symbols = XCDR (color_symbols); - } - - return NILP (color_symbols); -} - - -/* Value is non-zero if OBJECT is a valid XPM image specification. */ - -static int -xpm_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[XPM_LAST]; - bcopy (xpm_format, fmt, sizeof fmt); - return (parse_image_spec (object, fmt, XPM_LAST, Qxpm) - /* Either `:file' or `:data' must be present. */ - && fmt[XPM_FILE].count + fmt[XPM_DATA].count == 1 - /* Either no `:color-symbols' or it's a list of conses - whose car and cdr are strings. */ - && (fmt[XPM_COLOR_SYMBOLS].count == 0 - || xpm_valid_color_symbols_p (fmt[XPM_COLOR_SYMBOLS].value)) - && (fmt[XPM_ASCENT].count == 0 - || XFASTINT (fmt[XPM_ASCENT].value) < 100)); -} - - -/* Load image IMG which will be displayed on frame F. Value is - non-zero if successful. */ - -static int -xpm_load (f, img) - struct frame *f; - struct image *img; -{ - int rc, i; - XpmAttributes attrs; - Lisp_Object specified_file, color_symbols; - - /* Configure the XPM lib. Use the visual of frame F. Allocate - close colors. Return colors allocated. */ - bzero (&attrs, sizeof attrs); - attrs.visual = FRAME_X_VISUAL (f); - attrs.colormap = FRAME_X_COLORMAP (f); - attrs.valuemask |= XpmVisual; - attrs.valuemask |= XpmColormap; - attrs.valuemask |= XpmReturnAllocPixels; -#ifdef XpmAllocCloseColors - attrs.alloc_close_colors = 1; - attrs.valuemask |= XpmAllocCloseColors; -#else - attrs.closeness = 600; - attrs.valuemask |= XpmCloseness; -#endif - - /* If image specification contains symbolic color definitions, add - these to `attrs'. */ - color_symbols = image_spec_value (img->spec, QCcolor_symbols, NULL); - if (CONSP (color_symbols)) - { - Lisp_Object tail; - XpmColorSymbol *xpm_syms; - int i, size; - - attrs.valuemask |= XpmColorSymbols; - - /* Count number of symbols. */ - attrs.numsymbols = 0; - for (tail = color_symbols; CONSP (tail); tail = XCDR (tail)) - ++attrs.numsymbols; - - /* Allocate an XpmColorSymbol array. */ - size = attrs.numsymbols * sizeof *xpm_syms; - xpm_syms = (XpmColorSymbol *) alloca (size); - bzero (xpm_syms, size); - attrs.colorsymbols = xpm_syms; - - /* Fill the color symbol array. */ - for (tail = color_symbols, i = 0; - CONSP (tail); - ++i, tail = XCDR (tail)) - { - Lisp_Object name = XCAR (XCAR (tail)); - Lisp_Object color = XCDR (XCAR (tail)); - xpm_syms[i].name = (char *) alloca (SCHARS (name) + 1); - strcpy (xpm_syms[i].name, SDATA (name)); - xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1); - strcpy (xpm_syms[i].value, SDATA (color)); - } - } - - /* Create a pixmap for the image, either from a file, or from a - string buffer containing data in the same format as an XPM file. */ - BLOCK_INPUT; - specified_file = image_spec_value (img->spec, QCfile, NULL); - if (STRINGP (specified_file)) - { - Lisp_Object file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNBLOCK_INPUT; - return 0; - } - - rc = XpmReadFileToPixmap (NULL, FRAME_W32_WINDOW (f), - SDATA (file), &img->pixmap, &img->mask, - &attrs); - } - else - { - Lisp_Object buffer = image_spec_value (img->spec, QCdata, NULL); - rc = XpmCreatePixmapFromBuffer (NULL, FRAME_W32_WINDOW (f), - SDATA (buffer), - &img->pixmap, &img->mask, - &attrs); - } - UNBLOCK_INPUT; - - if (rc == XpmSuccess) - { - /* Remember allocated colors. */ - img->ncolors = attrs.nalloc_pixels; - img->colors = (unsigned long *) xmalloc (img->ncolors - * sizeof *img->colors); - for (i = 0; i < attrs.nalloc_pixels; ++i) - img->colors[i] = attrs.alloc_pixels[i]; - - img->width = attrs.width; - img->height = attrs.height; - xassert (img->width > 0 && img->height > 0); - - /* The call to XpmFreeAttributes below frees attrs.alloc_pixels. */ - BLOCK_INPUT; - XpmFreeAttributes (&attrs); - UNBLOCK_INPUT; - } - else - { - switch (rc) - { - case XpmOpenFailed: - image_error ("Error opening XPM file (%s)", img->spec, Qnil); - break; - - case XpmFileInvalid: - image_error ("Invalid XPM file (%s)", img->spec, Qnil); - break; - - case XpmNoMemory: - image_error ("Out of memory (%s)", img->spec, Qnil); - break; - - case XpmColorFailed: - image_error ("Color allocation error (%s)", img->spec, Qnil); - break; - - default: - image_error ("Unknown error (%s)", img->spec, Qnil); - break; - } - } - - return rc == XpmSuccess; -} - -#endif /* HAVE_XPM != 0 */ - - -#if 0 /* MAC_TODO : Color tables on Mac. */ -/*********************************************************************** - Color table - ***********************************************************************/ - -/* An entry in the color table mapping an RGB color to a pixel color. */ - -struct ct_color -{ - int r, g, b; - unsigned long pixel; - - /* Next in color table collision list. */ - struct ct_color *next; -}; - -/* The bucket vector size to use. Must be prime. */ - -#define CT_SIZE 101 - -/* Value is a hash of the RGB color given by R, G, and B. */ - -#define CT_HASH_RGB(R, G, B) (((R) << 16) ^ ((G) << 8) ^ (B)) - -/* The color hash table. */ - -struct ct_color **ct_table; - -/* Number of entries in the color table. */ - -int ct_colors_allocated; - -/* Function prototypes. */ - -static void init_color_table P_ ((void)); -static void free_color_table P_ ((void)); -static unsigned long *colors_in_color_table P_ ((int *n)); -static unsigned long lookup_rgb_color P_ ((struct frame *f, int r, int g, int b)); -static unsigned long lookup_pixel_color P_ ((struct frame *f, unsigned long p)); - - -/* Initialize the color table. */ - -static void -init_color_table () -{ - int size = CT_SIZE * sizeof (*ct_table); - ct_table = (struct ct_color **) xmalloc (size); - bzero (ct_table, size); - ct_colors_allocated = 0; -} - - -/* Free memory associated with the color table. */ - -static void -free_color_table () -{ - int i; - struct ct_color *p, *next; - - for (i = 0; i < CT_SIZE; ++i) - for (p = ct_table[i]; p; p = next) - { - next = p->next; - xfree (p); - } - - xfree (ct_table); - ct_table = NULL; -} - - -/* Value is a pixel color for RGB color R, G, B on frame F. If an - entry for that color already is in the color table, return the - pixel color of that entry. Otherwise, allocate a new color for R, - G, B, and make an entry in the color table. */ - -static unsigned long -lookup_rgb_color (f, r, g, b) - struct frame *f; - int r, g, b; -{ - unsigned hash = CT_HASH_RGB (r, g, b); - int i = hash % CT_SIZE; - struct ct_color *p; - - for (p = ct_table[i]; p; p = p->next) - if (p->r == r && p->g == g && p->b == b) - break; - - if (p == NULL) - { - COLORREF color; - Colormap cmap; - int rc; - - color = RGB_TO_ULONG (r, g, b); - - ++ct_colors_allocated; - - p = (struct ct_color *) xmalloc (sizeof *p); - p->r = r; - p->g = g; - p->b = b; - p->pixel = color; - p->next = ct_table[i]; - ct_table[i] = p; - } - - return p->pixel; -} - - -/* Look up pixel color PIXEL which is used on frame F in the color - table. If not already present, allocate it. Value is PIXEL. */ - -static unsigned long -lookup_pixel_color (f, pixel) - struct frame *f; - unsigned long pixel; -{ - int i = pixel % CT_SIZE; - struct ct_color *p; - - for (p = ct_table[i]; p; p = p->next) - if (p->pixel == pixel) - break; - - if (p == NULL) - { - XColor color; - Colormap cmap; - int rc; - - BLOCK_INPUT; - - cmap = DefaultColormapOfScreen (FRAME_X_SCREEN (f)); - color.pixel = pixel; - XQueryColor (NULL, cmap, &color); - rc = x_alloc_nearest_color (f, cmap, &color); - UNBLOCK_INPUT; - - if (rc) - { - ++ct_colors_allocated; - - p = (struct ct_color *) xmalloc (sizeof *p); - p->r = color.red; - p->g = color.green; - p->b = color.blue; - p->pixel = pixel; - p->next = ct_table[i]; - ct_table[i] = p; - } - else - return FRAME_FOREGROUND_PIXEL (f); - } - return p->pixel; -} - - -/* Value is a vector of all pixel colors contained in the color table, - allocated via xmalloc. Set *N to the number of colors. */ - -static unsigned long * -colors_in_color_table (n) - int *n; -{ - int i, j; - struct ct_color *p; - unsigned long *colors; - - if (ct_colors_allocated == 0) - { - *n = 0; - colors = NULL; - } - else - { - colors = (unsigned long *) xmalloc (ct_colors_allocated - * sizeof *colors); - *n = ct_colors_allocated; - - for (i = j = 0; i < CT_SIZE; ++i) - for (p = ct_table[i]; p; p = p->next) - colors[j++] = p->pixel; - } - - return colors; -} - -#endif /* MAC_TODO */ - - -/*********************************************************************** - Algorithms - ***********************************************************************/ - -#if 0 /* MAC_TODO : Mac versions of low level algorithms */ -static void x_laplace_write_row P_ ((struct frame *, long *, - int, XImage *, int)); -static void x_laplace_read_row P_ ((struct frame *, Colormap, - XColor *, int, XImage *, int)); - - -/* Fill COLORS with RGB colors from row Y of image XIMG. F is the - frame we operate on, CMAP is the color-map in effect, and WIDTH is - the width of one row in the image. */ - -static void -x_laplace_read_row (f, cmap, colors, width, ximg, y) - struct frame *f; - Colormap cmap; - XColor *colors; - int width; - XImage *ximg; - int y; -{ - int x; - - for (x = 0; x < width; ++x) - colors[x].pixel = XGetPixel (ximg, x, y); - - XQueryColors (NULL, cmap, colors, width); -} - - -/* Write row Y of image XIMG. PIXELS is an array of WIDTH longs - containing the pixel colors to write. F is the frame we are - working on. */ - -static void -x_laplace_write_row (f, pixels, width, ximg, y) - struct frame *f; - long *pixels; - int width; - XImage *ximg; - int y; -{ - int x; - - for (x = 0; x < width; ++x) - XPutPixel (ximg, x, y, pixels[x]); -} -#endif /* MAC_TODO */ - -/* Transform image IMG which is used on frame F with a Laplace - edge-detection algorithm. The result is an image that can be used - to draw disabled buttons, for example. */ - -static void -x_laplace (f, img) - struct frame *f; - struct image *img; -{ -#if 0 /* MAC_TODO : Mac version */ - Colormap cmap = DefaultColormapOfScreen (FRAME_X_SCREEN (f)); - XImage *ximg, *oimg; - XColor *in[3]; - long *out; - Pixmap pixmap; - int x, y, i; - long pixel; - int in_y, out_y, rc; - int mv2 = 45000; - - BLOCK_INPUT; - - /* Get the X image IMG->pixmap. */ - ximg = XGetImage (NULL, img->pixmap, - 0, 0, img->width, img->height, ~0, ZPixmap); - - /* Allocate 3 input rows, and one output row of colors. */ - for (i = 0; i < 3; ++i) - in[i] = (XColor *) alloca (img->width * sizeof (XColor)); - out = (long *) alloca (img->width * sizeof (long)); - - /* Create an X image for output. */ - rc = x_create_x_image_and_pixmap (f, img->width, img->height, 0, - &oimg, &pixmap); - - /* Fill first two rows. */ - x_laplace_read_row (f, cmap, in[0], img->width, ximg, 0); - x_laplace_read_row (f, cmap, in[1], img->width, ximg, 1); - in_y = 2; - - /* Write first row, all zeros. */ - init_color_table (); - pixel = lookup_rgb_color (f, 0, 0, 0); - for (x = 0; x < img->width; ++x) - out[x] = pixel; - x_laplace_write_row (f, out, img->width, oimg, 0); - out_y = 1; - - for (y = 2; y < img->height; ++y) - { - int rowa = y % 3; - int rowb = (y + 2) % 3; - - x_laplace_read_row (f, cmap, in[rowa], img->width, ximg, in_y++); - - for (x = 0; x < img->width - 2; ++x) - { - int r = in[rowa][x].red + mv2 - in[rowb][x + 2].red; - int g = in[rowa][x].green + mv2 - in[rowb][x + 2].green; - int b = in[rowa][x].blue + mv2 - in[rowb][x + 2].blue; - - out[x + 1] = lookup_rgb_color (f, r & 0xffff, g & 0xffff, - b & 0xffff); - } - - x_laplace_write_row (f, out, img->width, oimg, out_y++); - } - - /* Write last line, all zeros. */ - for (x = 0; x < img->width; ++x) - out[x] = pixel; - x_laplace_write_row (f, out, img->width, oimg, out_y); - - /* Free the input image, and free resources of IMG. */ - XDestroyImage (ximg); - x_clear_image (f, img); - - /* Put the output image into pixmap, and destroy it. */ - x_put_x_image (f, oimg, pixmap, img->width, img->height); - x_destroy_x_image (oimg); - - /* Remember new pixmap and colors in IMG. */ - img->pixmap = pixmap; - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - - UNBLOCK_INPUT; -#endif /* MAC_TODO */ -} - - -/* Build a mask for image IMG which is used on frame F. FILE is the - name of an image file, for error messages. HOW determines how to - determine the background color of IMG. If it is a list '(R G B)', - with R, G, and B being integers >= 0, take that as the color of the - background. Otherwise, determine the background color of IMG - heuristically. Value is non-zero if successful. */ - -static int -x_build_heuristic_mask (f, img, how) - struct frame *f; - struct image *img; - Lisp_Object how; -{ -#if 0 /* MAC_TODO : Mac version */ - Display *dpy = FRAME_W32_DISPLAY (f); - XImage *ximg, *mask_img; - int x, y, rc, look_at_corners_p; - unsigned long bg; - - BLOCK_INPUT; - - /* Create an image and pixmap serving as mask. */ - rc = x_create_x_image_and_pixmap (f, img->width, img->height, 1, - &mask_img, &img->mask); - if (!rc) - { - UNBLOCK_INPUT; - return 0; - } - - /* Get the X image of IMG->pixmap. */ - ximg = XGetImage (dpy, img->pixmap, 0, 0, img->width, img->height, - ~0, ZPixmap); - - /* Determine the background color of ximg. If HOW is `(R G B)' - take that as color. Otherwise, try to determine the color - heuristically. */ - look_at_corners_p = 1; - - if (CONSP (how)) - { - int rgb[3], i = 0; - - while (i < 3 - && CONSP (how) - && NATNUMP (XCAR (how))) - { - rgb[i] = XFASTINT (XCAR (how)) & 0xffff; - how = XCDR (how); - } - - if (i == 3 && NILP (how)) - { - char color_name[30]; - XColor exact, color; - Colormap cmap; - - sprintf (color_name, "#%04x%04x%04x", rgb[0], rgb[1], rgb[2]); - - cmap = DefaultColormapOfScreen (FRAME_X_SCREEN (f)); - if (XLookupColor (dpy, cmap, color_name, &exact, &color)) - { - bg = color.pixel; - look_at_corners_p = 0; - } - } - } - - if (look_at_corners_p) - { - unsigned long corners[4]; - int i, best_count; - - /* Get the colors at the corners of ximg. */ - corners[0] = XGetPixel (ximg, 0, 0); - corners[1] = XGetPixel (ximg, img->width - 1, 0); - corners[2] = XGetPixel (ximg, img->width - 1, img->height - 1); - corners[3] = XGetPixel (ximg, 0, img->height - 1); - - /* Choose the most frequently found color as background. */ - for (i = best_count = 0; i < 4; ++i) - { - int j, n; - - for (j = n = 0; j < 4; ++j) - if (corners[i] == corners[j]) - ++n; - - if (n > best_count) - bg = corners[i], best_count = n; - } - } - - /* Set all bits in mask_img to 1 whose color in ximg is different - from the background color bg. */ - for (y = 0; y < img->height; ++y) - for (x = 0; x < img->width; ++x) - XPutPixel (mask_img, x, y, XGetPixel (ximg, x, y) != bg); - - /* Put mask_img into img->mask. */ - x_put_x_image (f, mask_img, img->mask, img->width, img->height); - x_destroy_x_image (mask_img); - XDestroyImage (ximg); - - UNBLOCK_INPUT; -#endif /* MAC_TODO */ - - return 1; -} - - - -/*********************************************************************** - PBM (mono, gray, color) - ***********************************************************************/ -#ifdef HAVE_PBM - -static int pbm_image_p P_ ((Lisp_Object object)); -static int pbm_load P_ ((struct frame *f, struct image *img)); -static int pbm_scan_number P_ ((unsigned char **, unsigned char *)); - -/* The symbol `pbm' identifying images of this type. */ - -Lisp_Object Qpbm; - -/* Indices of image specification fields in gs_format, below. */ - -enum pbm_keyword_index -{ - PBM_TYPE, - PBM_FILE, - PBM_DATA, - PBM_ASCENT, - PBM_MARGIN, - PBM_RELIEF, - PBM_ALGORITHM, - PBM_HEURISTIC_MASK, - PBM_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword pbm_format[PBM_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":file", IMAGE_STRING_VALUE, 0}, - {":data", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} -}; - -/* Structure describing the image type `pbm'. */ - -static struct image_type pbm_type = -{ - &Qpbm, - pbm_image_p, - pbm_load, - x_clear_image, - NULL -}; - - -/* Return non-zero if OBJECT is a valid PBM image specification. */ - -static int -pbm_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[PBM_LAST]; - - bcopy (pbm_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, PBM_LAST, Qpbm) - || (fmt[PBM_ASCENT].count - && XFASTINT (fmt[PBM_ASCENT].value) > 100)) - return 0; - - /* Must specify either :data or :file. */ - return fmt[PBM_DATA].count + fmt[PBM_FILE].count == 1; -} - - -/* Scan a decimal number from *S and return it. Advance *S while - reading the number. END is the end of the string. Value is -1 at - end of input. */ - -static int -pbm_scan_number (s, end) - unsigned char **s, *end; -{ - int c, val = -1; - - while (*s < end) - { - /* Skip white-space. */ - while (*s < end && (c = *(*s)++, isspace (c))) - ; - - if (c == '#') - { - /* Skip comment to end of line. */ - while (*s < end && (c = *(*s)++, c != '\n')) - ; - } - else if (isdigit (c)) - { - /* Read decimal number. */ - val = c - '0'; - while (*s < end && (c = *(*s)++, isdigit (c))) - val = 10 * val + c - '0'; - break; - } - else - break; - } - - return val; -} - - -/* Read FILE into memory. Value is a pointer to a buffer allocated - with xmalloc holding FILE's contents. Value is null if an error - occurred. *SIZE is set to the size of the file. */ - -static char * -pbm_read_file (file, size) - Lisp_Object file; - int *size; -{ - FILE *fp = NULL; - char *buf = NULL; - struct stat st; - - if (stat (SDATA (file), &st) == 0 - && (fp = fopen (SDATA (file), "r")) != NULL - && (buf = (char *) xmalloc (st.st_size), - fread (buf, 1, st.st_size, fp) == st.st_size)) - { - *size = st.st_size; - fclose (fp); - } - else - { - if (fp) - fclose (fp); - if (buf) - { - xfree (buf); - buf = NULL; - } - } - - return buf; -} - - -/* Load PBM image IMG for use on frame F. */ - -static int -pbm_load (f, img) - struct frame *f; - struct image *img; -{ - int raw_p, x, y; - int width, height, max_color_idx = 0; - XImage *ximg; - Lisp_Object file, specified_file; - enum {PBM_MONO, PBM_GRAY, PBM_COLOR} type; - struct gcpro gcpro1; - unsigned char *contents = NULL; - unsigned char *end, *p; - int size; - - specified_file = image_spec_value (img->spec, QCfile, NULL); - file = Qnil; - GCPRO1 (file); - - if (STRINGP (specified_file)) - { - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - contents = pbm_read_file (file, &size); - if (contents == NULL) - { - image_error ("Error reading `%s'", file, Qnil); - UNGCPRO; - return 0; - } - - p = contents; - end = contents + size; - } - else - { - Lisp_Object data; - data = image_spec_value (img->spec, QCdata, NULL); - p = SDATA (data); - end = p + SBYTES (data); - } - - /* Check magic number. */ - if (end - p < 2 || *p++ != 'P') - { - image_error ("Not a PBM image: `%s'", img->spec, Qnil); - error: - xfree (contents); - UNGCPRO; - return 0; - } - - switch (*p++) - { - case '1': - raw_p = 0, type = PBM_MONO; - break; - - case '2': - raw_p = 0, type = PBM_GRAY; - break; - - case '3': - raw_p = 0, type = PBM_COLOR; - break; - - case '4': - raw_p = 1, type = PBM_MONO; - break; - - case '5': - raw_p = 1, type = PBM_GRAY; - break; - - case '6': - raw_p = 1, type = PBM_COLOR; - break; - - default: - image_error ("Not a PBM image: `%s'", img->spec, Qnil); - goto error; - } - - /* Read width, height, maximum color-component. Characters - starting with `#' up to the end of a line are ignored. */ - width = pbm_scan_number (&p, end); - height = pbm_scan_number (&p, end); - - if (type != PBM_MONO) - { - max_color_idx = pbm_scan_number (&p, end); - if (raw_p && max_color_idx > 255) - max_color_idx = 255; - } - - if (width < 0 - || height < 0 - || (type != PBM_MONO && max_color_idx < 0)) - goto error; - - BLOCK_INPUT; - if (!x_create_x_image_and_pixmap (f, width, height, 0, - &ximg, &img->pixmap)) - { - UNBLOCK_INPUT; - goto error; - } - - /* Initialize the color hash table. */ - init_color_table (); - - if (type == PBM_MONO) - { - int c = 0, g; - - for (y = 0; y < height; ++y) - for (x = 0; x < width; ++x) - { - if (raw_p) - { - if ((x & 7) == 0) - c = *p++; - g = c & 0x80; - c <<= 1; - } - else - g = pbm_scan_number (&p, end); - - XPutPixel (ximg, x, y, (g - ? FRAME_FOREGROUND_PIXEL (f) - : FRAME_BACKGROUND_PIXEL (f))); - } - } - else - { - for (y = 0; y < height; ++y) - for (x = 0; x < width; ++x) - { - int r, g, b; - - if (type == PBM_GRAY) - r = g = b = raw_p ? *p++ : pbm_scan_number (&p, end); - else if (raw_p) - { - r = *p++; - g = *p++; - b = *p++; - } - else - { - r = pbm_scan_number (&p, end); - g = pbm_scan_number (&p, end); - b = pbm_scan_number (&p, end); - } - - if (r < 0 || g < 0 || b < 0) - { - xfree (ximg->data); - ximg->data = NULL; - XDestroyImage (ximg); - UNBLOCK_INPUT; - image_error ("Invalid pixel value in image `%s'", - img->spec, Qnil); - goto error; - } - - /* RGB values are now in the range 0..max_color_idx. - Scale this to the range 0..0xffff supported by X. */ - r = (double) r * 65535 / max_color_idx; - g = (double) g * 65535 / max_color_idx; - b = (double) b * 65535 / max_color_idx; - XPutPixel (ximg, x, y, lookup_rgb_color (f, r, g, b)); - } - } - - /* Store in IMG->colors the colors allocated for the image, and - free the color table. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - - /* Put the image into a pixmap. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - UNBLOCK_INPUT; - - img->width = width; - img->height = height; - - UNGCPRO; - xfree (contents); - return 1; -} -#endif /* HAVE_PBM */ - - -/*********************************************************************** - PNG - ***********************************************************************/ - -#if HAVE_PNG - -#include - -/* Function prototypes. */ - -static int png_image_p P_ ((Lisp_Object object)); -static int png_load P_ ((struct frame *f, struct image *img)); - -/* The symbol `png' identifying images of this type. */ - -Lisp_Object Qpng; - -/* Indices of image specification fields in png_format, below. */ - -enum png_keyword_index -{ - PNG_TYPE, - PNG_DATA, - PNG_FILE, - PNG_ASCENT, - PNG_MARGIN, - PNG_RELIEF, - PNG_ALGORITHM, - PNG_HEURISTIC_MASK, - PNG_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword png_format[PNG_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":data", IMAGE_STRING_VALUE, 0}, - {":file", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} -}; - -/* Structure describing the image type `png'. */ - -static struct image_type png_type = -{ - &Qpng, - png_image_p, - png_load, - x_clear_image, - NULL -}; - - -/* Return non-zero if OBJECT is a valid PNG image specification. */ - -static int -png_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[PNG_LAST]; - bcopy (png_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, PNG_LAST, Qpng) - || (fmt[PNG_ASCENT].count - && XFASTINT (fmt[PNG_ASCENT].value) > 100)) - return 0; - - /* Must specify either the :data or :file keyword. */ - return fmt[PNG_FILE].count + fmt[PNG_DATA].count == 1; -} - - -/* Error and warning handlers installed when the PNG library - is initialized. */ - -static void -my_png_error (png_ptr, msg) - png_struct *png_ptr; - char *msg; -{ - xassert (png_ptr != NULL); - image_error ("PNG error: %s", build_string (msg), Qnil); - longjmp (png_ptr->jmpbuf, 1); -} - - -static void -my_png_warning (png_ptr, msg) - png_struct *png_ptr; - char *msg; -{ - xassert (png_ptr != NULL); - image_error ("PNG warning: %s", build_string (msg), Qnil); -} - -/* Memory source for PNG decoding. */ - -struct png_memory_storage -{ - unsigned char *bytes; /* The data */ - size_t len; /* How big is it? */ - int index; /* Where are we? */ -}; - - -/* Function set as reader function when reading PNG image from memory. - PNG_PTR is a pointer to the PNG control structure. Copy LENGTH - bytes from the input to DATA. */ - -static void -png_read_from_memory (png_ptr, data, length) - png_structp png_ptr; - png_bytep data; - png_size_t length; -{ - struct png_memory_storage *tbr - = (struct png_memory_storage *) png_get_io_ptr (png_ptr); - - if (length > tbr->len - tbr->index) - png_error (png_ptr, "Read error"); - - bcopy (tbr->bytes + tbr->index, data, length); - tbr->index = tbr->index + length; -} - -/* Load PNG image IMG for use on frame F. Value is non-zero if - successful. */ - -static int -png_load (f, img) - struct frame *f; - struct image *img; -{ - Lisp_Object file, specified_file; - Lisp_Object specified_data; - int x, y, i; - XImage *ximg, *mask_img = NULL; - struct gcpro gcpro1; - png_struct *png_ptr = NULL; - png_info *info_ptr = NULL, *end_info = NULL; - FILE *fp = NULL; - png_byte sig[8]; - png_byte *pixels = NULL; - png_byte **rows = NULL; - png_uint_32 width, height; - int bit_depth, color_type, interlace_type; - png_byte channels; - png_uint_32 row_bytes; - int transparent_p; - char *gamma_str; - double screen_gamma, image_gamma; - int intent; - struct png_memory_storage tbr; /* Data to be read */ - - /* Find out what file to load. */ - specified_file = image_spec_value (img->spec, QCfile, NULL); - specified_data = image_spec_value (img->spec, QCdata, NULL); - file = Qnil; - GCPRO1 (file); - - if (NILP (specified_data)) - { - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - /* Open the image file. */ - fp = fopen (SDATA (file), "rb"); - if (!fp) - { - image_error ("Cannot open image file `%s'", file, Qnil); - UNGCPRO; - fclose (fp); - return 0; - } - - /* Check PNG signature. */ - if (fread (sig, 1, sizeof sig, fp) != sizeof sig - || !png_check_sig (sig, sizeof sig)) - { - image_error ("Not a PNG file:` %s'", file, Qnil); - UNGCPRO; - fclose (fp); - return 0; - } - } - else - { - /* Read from memory. */ - tbr.bytes = SDATA (specified_data); - tbr.len = SBYTES (specified_data); - tbr.index = 0; - - /* Check PNG signature. */ - if (tbr.len < sizeof sig - || !png_check_sig (tbr.bytes, sizeof sig)) - { - image_error ("Not a PNG image: `%s'", img->spec, Qnil); - UNGCPRO; - return 0; - } - - /* Need to skip past the signature. */ - tbr.bytes += sizeof (sig); - } - - /* Initialize read and info structs for PNG lib. */ - png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, - my_png_error, my_png_warning); - if (!png_ptr) - { - if (fp) fclose (fp); - UNGCPRO; - return 0; - } - - info_ptr = png_create_info_struct (png_ptr); - if (!info_ptr) - { - png_destroy_read_struct (&png_ptr, NULL, NULL); - if (fp) fclose (fp); - UNGCPRO; - return 0; - } - - end_info = png_create_info_struct (png_ptr); - if (!end_info) - { - png_destroy_read_struct (&png_ptr, &info_ptr, NULL); - if (fp) fclose (fp); - UNGCPRO; - return 0; - } - - /* Set error jump-back. We come back here when the PNG library - detects an error. */ - if (setjmp (png_ptr->jmpbuf)) - { - error: - if (png_ptr) - png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); - xfree (pixels); - xfree (rows); - if (fp) fclose (fp); - UNGCPRO; - return 0; - } - - /* Read image info. */ - if (!NILP (specified_data)) - png_set_read_fn (png_ptr, (void *) &tbr, png_read_from_memory); - else - png_init_io (png_ptr, fp); - - png_set_sig_bytes (png_ptr, sizeof sig); - png_read_info (png_ptr, info_ptr); - png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); - - /* If image contains simply transparency data, we prefer to - construct a clipping mask. */ - if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) - transparent_p = 1; - else - transparent_p = 0; - - /* This function is easier to write if we only have to handle - one data format: RGB or RGBA with 8 bits per channel. Let's - transform other formats into that format. */ - - /* Strip more than 8 bits per channel. */ - if (bit_depth == 16) - png_set_strip_16 (png_ptr); - - /* Expand data to 24 bit RGB, or 8 bit grayscale, with alpha channel - if available. */ - png_set_expand (png_ptr); - - /* Convert grayscale images to RGB. */ - if (color_type == PNG_COLOR_TYPE_GRAY - || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb (png_ptr); - - /* The value 2.2 is a guess for PC monitors from PNG example.c. */ - gamma_str = getenv ("SCREEN_GAMMA"); - screen_gamma = gamma_str ? atof (gamma_str) : 2.2; - - /* Tell the PNG lib to handle gamma correction for us. */ - -#if defined(PNG_READ_sRGB_SUPPORTED) || defined(PNG_WRITE_sRGB_SUPPORTED) - if (png_get_sRGB (png_ptr, info_ptr, &intent)) - /* There is a special chunk in the image specifying the gamma. */ - png_set_sRGB (png_ptr, info_ptr, intent); - else -#endif - if (png_get_gAMA (png_ptr, info_ptr, &image_gamma)) - /* Image contains gamma information. */ - png_set_gamma (png_ptr, screen_gamma, image_gamma); - else - /* Use a default of 0.5 for the image gamma. */ - png_set_gamma (png_ptr, screen_gamma, 0.5); - - /* Handle alpha channel by combining the image with a background - color. Do this only if a real alpha channel is supplied. For - simple transparency, we prefer a clipping mask. */ - if (!transparent_p) - { - png_color_16 *image_background; - - if (png_get_bKGD (png_ptr, info_ptr, &image_background)) - /* Image contains a background color with which to - combine the image. */ - png_set_background (png_ptr, image_background, - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - else - { - /* Image does not contain a background color with which - to combine the image data via an alpha channel. Use - the frame's background instead. */ - XColor color; - Colormap cmap; - png_color_16 frame_background; - - BLOCK_INPUT; - cmap = DefaultColormapOfScreen (FRAME_X_SCREEN (f)); - color.pixel = FRAME_BACKGROUND_PIXEL (f); - XQueryColor (FRAME_W32_DISPLAY (f), cmap, &color); - UNBLOCK_INPUT; - - bzero (&frame_background, sizeof frame_background); - frame_background.red = color.red; - frame_background.green = color.green; - frame_background.blue = color.blue; - - png_set_background (png_ptr, &frame_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - } - } - - /* Update info structure. */ - png_read_update_info (png_ptr, info_ptr); - - /* Get number of channels. Valid values are 1 for grayscale images - and images with a palette, 2 for grayscale images with transparency - information (alpha channel), 3 for RGB images, and 4 for RGB - images with alpha channel, i.e. RGBA. If conversions above were - sufficient we should only have 3 or 4 channels here. */ - channels = png_get_channels (png_ptr, info_ptr); - xassert (channels == 3 || channels == 4); - - /* Number of bytes needed for one row of the image. */ - row_bytes = png_get_rowbytes (png_ptr, info_ptr); - - /* Allocate memory for the image. */ - pixels = (png_byte *) xmalloc (row_bytes * height * sizeof *pixels); - rows = (png_byte **) xmalloc (height * sizeof *rows); - for (i = 0; i < height; ++i) - rows[i] = pixels + i * row_bytes; - - /* Read the entire image. */ - png_read_image (png_ptr, rows); - png_read_end (png_ptr, info_ptr); - if (fp) - { - fclose (fp); - fp = NULL; - } - - BLOCK_INPUT; - - /* Create the X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, - &img->pixmap)) - { - UNBLOCK_INPUT; - goto error; - } - - /* Create an image and pixmap serving as mask if the PNG image - contains an alpha channel. */ - if (channels == 4 - && !transparent_p - && !x_create_x_image_and_pixmap (f, width, height, 1, - &mask_img, &img->mask)) - { - x_destroy_x_image (ximg); - XFreePixmap (FRAME_W32_DISPLAY (f), img->pixmap); - img->pixmap = 0; - UNBLOCK_INPUT; - goto error; - } - - /* Fill the X image and mask from PNG data. */ - init_color_table (); - - for (y = 0; y < height; ++y) - { - png_byte *p = rows[y]; - - for (x = 0; x < width; ++x) - { - unsigned r, g, b; - - r = *p++ << 8; - g = *p++ << 8; - b = *p++ << 8; - XPutPixel (ximg, x, y, lookup_rgb_color (f, r, g, b)); - - /* An alpha channel, aka mask channel, associates variable - transparency with an image. Where other image formats - support binary transparency---fully transparent or fully - opaque---PNG allows up to 254 levels of partial transparency. - The PNG library implements partial transparency by combining - the image with a specified background color. - - I'm not sure how to handle this here nicely: because the - background on which the image is displayed may change, for - real alpha channel support, it would be necessary to create - a new image for each possible background. - - What I'm doing now is that a mask is created if we have - boolean transparency information. Otherwise I'm using - the frame's background color to combine the image with. */ - - if (channels == 4) - { - if (mask_img) - XPutPixel (mask_img, x, y, *p > 0); - ++p; - } - } - } - - /* Remember colors allocated for this image. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - - /* Clean up. */ - png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); - xfree (rows); - xfree (pixels); - - img->width = width; - img->height = height; - - /* Put the image into the pixmap, then free the X image and its buffer. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - - /* Same for the mask. */ - if (mask_img) - { - x_put_x_image (f, mask_img, img->mask, img->width, img->height); - x_destroy_x_image (mask_img); - } - - UNBLOCK_INPUT; - UNGCPRO; - return 1; -} - -#endif /* HAVE_PNG != 0 */ - - - -/*********************************************************************** - JPEG - ***********************************************************************/ - -#if HAVE_JPEG - -/* Work around a warning about HAVE_STDLIB_H being redefined in - jconfig.h. */ -#ifdef HAVE_STDLIB_H -#define HAVE_STDLIB_H_1 -#undef HAVE_STDLIB_H -#endif /* HAVE_STLIB_H */ - -#include -#include -#include - -#ifdef HAVE_STLIB_H_1 -#define HAVE_STDLIB_H 1 -#endif - -static int jpeg_image_p P_ ((Lisp_Object object)); -static int jpeg_load P_ ((struct frame *f, struct image *img)); - -/* The symbol `jpeg' identifying images of this type. */ - -Lisp_Object Qjpeg; - -/* Indices of image specification fields in gs_format, below. */ - -enum jpeg_keyword_index -{ - JPEG_TYPE, - JPEG_DATA, - JPEG_FILE, - JPEG_ASCENT, - JPEG_MARGIN, - JPEG_RELIEF, - JPEG_ALGORITHM, - JPEG_HEURISTIC_MASK, - JPEG_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword jpeg_format[JPEG_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":data", IMAGE_STRING_VALUE, 0}, - {":file", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} -}; - -/* Structure describing the image type `jpeg'. */ - -static struct image_type jpeg_type = -{ - &Qjpeg, - jpeg_image_p, - jpeg_load, - x_clear_image, - NULL -}; - - -/* Return non-zero if OBJECT is a valid JPEG image specification. */ - -static int -jpeg_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[JPEG_LAST]; - - bcopy (jpeg_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, JPEG_LAST, Qjpeg) - || (fmt[JPEG_ASCENT].count - && XFASTINT (fmt[JPEG_ASCENT].value) > 100)) - return 0; - - /* Must specify either the :data or :file keyword. */ - return fmt[JPEG_FILE].count + fmt[JPEG_DATA].count == 1; -} - - -struct my_jpeg_error_mgr -{ - struct jpeg_error_mgr pub; - jmp_buf setjmp_buffer; -}; - -static void -my_error_exit (cinfo) - j_common_ptr cinfo; -{ - struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; - longjmp (mgr->setjmp_buffer, 1); -} - -/* Init source method for JPEG data source manager. Called by - jpeg_read_header() before any data is actually read. See - libjpeg.doc from the JPEG lib distribution. */ - -static void -our_init_source (cinfo) - j_decompress_ptr cinfo; -{ -} - - -/* Fill input buffer method for JPEG data source manager. Called - whenever more data is needed. We read the whole image in one step, - so this only adds a fake end of input marker at the end. */ - -static boolean -our_fill_input_buffer (cinfo) - j_decompress_ptr cinfo; -{ - /* Insert a fake EOI marker. */ - struct jpeg_source_mgr *src = cinfo->src; - static JOCTET buffer[2]; - - buffer[0] = (JOCTET) 0xFF; - buffer[1] = (JOCTET) JPEG_EOI; - - src->next_input_byte = buffer; - src->bytes_in_buffer = 2; - return TRUE; -} - - -/* Method to skip over NUM_BYTES bytes in the image data. CINFO->src - is the JPEG data source manager. */ - -static void -our_skip_input_data (cinfo, num_bytes) - j_decompress_ptr cinfo; - long num_bytes; -{ - struct jpeg_source_mgr *src = (struct jpeg_source_mgr *) cinfo->src; - - if (src) - { - if (num_bytes > src->bytes_in_buffer) - ERREXIT (cinfo, JERR_INPUT_EOF); - - src->bytes_in_buffer -= num_bytes; - src->next_input_byte += num_bytes; - } -} - - -/* Method to terminate data source. Called by - jpeg_finish_decompress() after all data has been processed. */ - -static void -our_term_source (cinfo) - j_decompress_ptr cinfo; -{ -} - - -/* Set up the JPEG lib for reading an image from DATA which contains - LEN bytes. CINFO is the decompression info structure created for - reading the image. */ - -static void -jpeg_memory_src (cinfo, data, len) - j_decompress_ptr cinfo; - JOCTET *data; - unsigned int len; -{ - struct jpeg_source_mgr *src; - - if (cinfo->src == NULL) - { - /* First time for this JPEG object? */ - cinfo->src = (struct jpeg_source_mgr *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - sizeof (struct jpeg_source_mgr)); - src = (struct jpeg_source_mgr *) cinfo->src; - src->next_input_byte = data; - } - - src = (struct jpeg_source_mgr *) cinfo->src; - src->init_source = our_init_source; - src->fill_input_buffer = our_fill_input_buffer; - src->skip_input_data = our_skip_input_data; - src->resync_to_restart = jpeg_resync_to_restart; /* Use default method. */ - src->term_source = our_term_source; - src->bytes_in_buffer = len; - src->next_input_byte = data; -} - - -/* Load image IMG for use on frame F. Patterned after example.c - from the JPEG lib. */ - -static int -jpeg_load (f, img) - struct frame *f; - struct image *img; -{ - struct jpeg_decompress_struct cinfo; - struct my_jpeg_error_mgr mgr; - Lisp_Object file, specified_file; - Lisp_Object specified_data; - FILE *fp = NULL; - JSAMPARRAY buffer; - int row_stride, x, y; - XImage *ximg = NULL; - int rc; - unsigned long *colors; - int width, height; - struct gcpro gcpro1; - - /* Open the JPEG file. */ - specified_file = image_spec_value (img->spec, QCfile, NULL); - specified_data = image_spec_value (img->spec, QCdata, NULL); - file = Qnil; - GCPRO1 (file); - - if (NILP (specified_data)) - { - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - fp = fopen (SDATA (file), "r"); - if (fp == NULL) - { - image_error ("Cannot open `%s'", file, Qnil); - UNGCPRO; - return 0; - } - } - - /* Customize libjpeg's error handling to call my_error_exit when an - error is detected. This function will perform a longjmp. */ - mgr.pub.error_exit = my_error_exit; - cinfo.err = jpeg_std_error (&mgr.pub); - - if ((rc = setjmp (mgr.setjmp_buffer)) != 0) - { - if (rc == 1) - { - /* Called from my_error_exit. Display a JPEG error. */ - char buffer[JMSG_LENGTH_MAX]; - cinfo.err->format_message ((j_common_ptr) &cinfo, buffer); - image_error ("Error reading JPEG image `%s': %s", img->spec, - build_string (buffer)); - } - - /* Close the input file and destroy the JPEG object. */ - if (fp) - fclose (fp); - jpeg_destroy_decompress (&cinfo); - - BLOCK_INPUT; - - /* If we already have an XImage, free that. */ - x_destroy_x_image (ximg); - - /* Free pixmap and colors. */ - x_clear_image (f, img); - - UNBLOCK_INPUT; - UNGCPRO; - return 0; - } - - /* Create the JPEG decompression object. Let it read from fp. - Read the JPEG image header. */ - jpeg_create_decompress (&cinfo); - - if (NILP (specified_data)) - jpeg_stdio_src (&cinfo, fp); - else - jpeg_memory_src (&cinfo, SDATA (specified_data), - SBYTES (specified_data)); - - jpeg_read_header (&cinfo, TRUE); - - /* Customize decompression so that color quantization will be used. - Start decompression. */ - cinfo.quantize_colors = TRUE; - jpeg_start_decompress (&cinfo); - width = img->width = cinfo.output_width; - height = img->height = cinfo.output_height; - - BLOCK_INPUT; - - /* Create X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, - &img->pixmap)) - { - UNBLOCK_INPUT; - longjmp (mgr.setjmp_buffer, 2); - } - - /* Allocate colors. When color quantization is used, - cinfo.actual_number_of_colors has been set with the number of - colors generated, and cinfo.colormap is a two-dimensional array - of color indices in the range 0..cinfo.actual_number_of_colors. - No more than 255 colors will be generated. */ - { - int i, ir, ig, ib; - - if (cinfo.out_color_components > 2) - ir = 0, ig = 1, ib = 2; - else if (cinfo.out_color_components > 1) - ir = 0, ig = 1, ib = 0; - else - ir = 0, ig = 0, ib = 0; - - /* Use the color table mechanism because it handles colors that - cannot be allocated nicely. Such colors will be replaced with - a default color, and we don't have to care about which colors - can be freed safely, and which can't. */ - init_color_table (); - colors = (unsigned long *) alloca (cinfo.actual_number_of_colors - * sizeof *colors); - - for (i = 0; i < cinfo.actual_number_of_colors; ++i) - { - /* Multiply RGB values with 255 because X expects RGB values - in the range 0..0xffff. */ - int r = cinfo.colormap[ir][i] << 8; - int g = cinfo.colormap[ig][i] << 8; - int b = cinfo.colormap[ib][i] << 8; - colors[i] = lookup_rgb_color (f, r, g, b); - } - - /* Remember those colors actually allocated. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - } - - /* Read pixels. */ - row_stride = width * cinfo.output_components; - buffer = cinfo.mem->alloc_sarray ((j_common_ptr) &cinfo, JPOOL_IMAGE, - row_stride, 1); - for (y = 0; y < height; ++y) - { - jpeg_read_scanlines (&cinfo, buffer, 1); - for (x = 0; x < cinfo.output_width; ++x) - XPutPixel (ximg, x, y, colors[buffer[0][x]]); - } - - /* Clean up. */ - jpeg_finish_decompress (&cinfo); - jpeg_destroy_decompress (&cinfo); - if (fp) - fclose (fp); - - /* Put the image into the pixmap. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - UNBLOCK_INPUT; - UNGCPRO; - return 1; -} - -#endif /* HAVE_JPEG */ - - - -/*********************************************************************** - TIFF - ***********************************************************************/ - -#if HAVE_TIFF - -#include - -static int tiff_image_p P_ ((Lisp_Object object)); -static int tiff_load P_ ((struct frame *f, struct image *img)); - -/* The symbol `tiff' identifying images of this type. */ - -Lisp_Object Qtiff; - -/* Indices of image specification fields in tiff_format, below. */ - -enum tiff_keyword_index -{ - TIFF_TYPE, - TIFF_DATA, - TIFF_FILE, - TIFF_ASCENT, - TIFF_MARGIN, - TIFF_RELIEF, - TIFF_ALGORITHM, - TIFF_HEURISTIC_MASK, - TIFF_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword tiff_format[TIFF_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":data", IMAGE_STRING_VALUE, 0}, - {":file", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} -}; - -/* Structure describing the image type `tiff'. */ - -static struct image_type tiff_type = -{ - &Qtiff, - tiff_image_p, - tiff_load, - x_clear_image, - NULL -}; - - -/* Return non-zero if OBJECT is a valid TIFF image specification. */ - -static int -tiff_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[TIFF_LAST]; - bcopy (tiff_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, TIFF_LAST, Qtiff) - || (fmt[TIFF_ASCENT].count - && XFASTINT (fmt[TIFF_ASCENT].value) > 100)) - return 0; - - /* Must specify either the :data or :file keyword. */ - return fmt[TIFF_FILE].count + fmt[TIFF_DATA].count == 1; -} - - -/* Reading from a memory buffer for TIFF images Based on the PNG - memory source, but we have to provide a lot of extra functions. - Blah. - - We really only need to implement read and seek, but I am not - convinced that the TIFF library is smart enough not to destroy - itself if we only hand it the function pointers we need to - override. */ - -typedef struct -{ - unsigned char *bytes; - size_t len; - int index; -} -tiff_memory_source; - -static size_t -tiff_read_from_memory (data, buf, size) - thandle_t data; - tdata_t buf; - tsize_t size; -{ - tiff_memory_source *src = (tiff_memory_source *) data; - - if (size > src->len - src->index) - return (size_t) -1; - bcopy (src->bytes + src->index, buf, size); - src->index += size; - return size; -} - -static size_t -tiff_write_from_memory (data, buf, size) - thandle_t data; - tdata_t buf; - tsize_t size; -{ - return (size_t) -1; -} - -static toff_t -tiff_seek_in_memory (data, off, whence) - thandle_t data; - toff_t off; - int whence; -{ - tiff_memory_source *src = (tiff_memory_source *) data; - int idx; - - switch (whence) - { - case SEEK_SET: /* Go from beginning of source. */ - idx = off; - break; - - case SEEK_END: /* Go from end of source. */ - idx = src->len + off; - break; - - case SEEK_CUR: /* Go from current position. */ - idx = src->index + off; - break; - - default: /* Invalid `whence'. */ - return -1; - } - - if (idx > src->len || idx < 0) - return -1; - - src->index = idx; - return src->index; -} - -static int -tiff_close_memory (data) - thandle_t data; -{ - /* NOOP */ - return 0; -} - -static int -tiff_mmap_memory (data, pbase, psize) - thandle_t data; - tdata_t *pbase; - toff_t *psize; -{ - /* It is already _IN_ memory. */ - return 0; -} - -static void -tiff_unmap_memory (data, base, size) - thandle_t data; - tdata_t base; - toff_t size; -{ - /* We don't need to do this. */ -} - -static toff_t -tiff_size_of_memory (data) - thandle_t data; -{ - return ((tiff_memory_source *) data)->len; -} - -/* Load TIFF image IMG for use on frame F. Value is non-zero if - successful. */ - -static int -tiff_load (f, img) - struct frame *f; - struct image *img; -{ - Lisp_Object file, specified_file; - Lisp_Object specified_data; - TIFF *tiff; - int width, height, x, y; - uint32 *buf; - int rc; - XImage *ximg; - struct gcpro gcpro1; - tiff_memory_source memsrc; - - specified_file = image_spec_value (img->spec, QCfile, NULL); - specified_data = image_spec_value (img->spec, QCdata, NULL); - file = Qnil; - GCPRO1 (file); - - if (NILP (specified_data)) - { - /* Read from a file */ - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", file, Qnil); - UNGCPRO; - return 0; - } - - /* Try to open the image file. */ - tiff = TIFFOpen (SDATA (file), "r"); - if (tiff == NULL) - { - image_error ("Cannot open `%s'", file, Qnil); - UNGCPRO; - return 0; - } - } - else - { - /* Memory source! */ - memsrc.bytes = SDATA (specified_data); - memsrc.len = SBYTES (specified_data); - memsrc.index = 0; - - tiff = TIFFClientOpen ("memory_source", "r", &memsrc, - (TIFFReadWriteProc) tiff_read_from_memory, - (TIFFReadWriteProc) tiff_write_from_memory, - tiff_seek_in_memory, - tiff_close_memory, - tiff_size_of_memory, - tiff_mmap_memory, - tiff_unmap_memory); - - if (!tiff) - { - image_error ("Cannot open memory source for `%s'", img->spec, Qnil); - UNGCPRO; - return 0; - } - } - - /* Get width and height of the image, and allocate a raster buffer - of width x height 32-bit values. */ - TIFFGetField (tiff, TIFFTAG_IMAGEWIDTH, &width); - TIFFGetField (tiff, TIFFTAG_IMAGELENGTH, &height); - buf = (uint32 *) xmalloc (width * height * sizeof *buf); - - rc = TIFFReadRGBAImage (tiff, width, height, buf, 0); - TIFFClose (tiff); - if (!rc) - { - image_error ("Error reading TIFF image `%s'", img->spec, Qnil); - xfree (buf); - UNGCPRO; - return 0; - } - - BLOCK_INPUT; - - /* Create the X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) - { - UNBLOCK_INPUT; - xfree (buf); - UNGCPRO; - return 0; - } - - /* Initialize the color table. */ - init_color_table (); - - /* Process the pixel raster. Origin is in the lower-left corner. */ - for (y = 0; y < height; ++y) - { - uint32 *row = buf + y * width; - - for (x = 0; x < width; ++x) - { - uint32 abgr = row[x]; - int r = TIFFGetR (abgr) << 8; - int g = TIFFGetG (abgr) << 8; - int b = TIFFGetB (abgr) << 8; - XPutPixel (ximg, x, height - 1 - y, lookup_rgb_color (f, r, g, b)); - } - } - - /* Remember the colors allocated for the image. Free the color table. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - - /* Put the image into the pixmap, then free the X image and its buffer. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - xfree (buf); - UNBLOCK_INPUT; - - img->width = width; - img->height = height; - - UNGCPRO; - return 1; -} - -#endif /* HAVE_TIFF != 0 */ - - - -/*********************************************************************** - GIF - ***********************************************************************/ - -#if HAVE_GIF - -#include - -static int gif_image_p P_ ((Lisp_Object object)); -static int gif_load P_ ((struct frame *f, struct image *img)); - -/* The symbol `gif' identifying images of this type. */ - -Lisp_Object Qgif; - -/* Indices of image specification fields in gif_format, below. */ - -enum gif_keyword_index -{ - GIF_TYPE, - GIF_DATA, - GIF_FILE, - GIF_ASCENT, - GIF_MARGIN, - GIF_RELIEF, - GIF_ALGORITHM, - GIF_HEURISTIC_MASK, - GIF_IMAGE, - GIF_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword gif_format[GIF_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":data", IMAGE_STRING_VALUE, 0}, - {":file", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":image", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0} -}; - -/* Structure describing the image type `gif'. */ - -static struct image_type gif_type = -{ - &Qgif, - gif_image_p, - gif_load, - x_clear_image, - NULL -}; - -/* Return non-zero if OBJECT is a valid GIF image specification. */ - -static int -gif_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[GIF_LAST]; - bcopy (gif_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, GIF_LAST, Qgif) - || (fmt[GIF_ASCENT].count - && XFASTINT (fmt[GIF_ASCENT].value) > 100)) - return 0; - - /* Must specify either the :data or :file keyword. */ - return fmt[GIF_FILE].count + fmt[GIF_DATA].count == 1; -} - -/* Reading a GIF image from memory - Based on the PNG memory stuff to a certain extent. */ - -typedef struct -{ - unsigned char *bytes; - size_t len; - int index; -} -gif_memory_source; - -/* Make the current memory source available to gif_read_from_memory. - It's done this way because not all versions of libungif support - a UserData field in the GifFileType structure. */ -static gif_memory_source *current_gif_memory_src; - -static int -gif_read_from_memory (file, buf, len) - GifFileType *file; - GifByteType *buf; - int len; -{ - gif_memory_source *src = current_gif_memory_src; - - if (len > src->len - src->index) - return -1; - - bcopy (src->bytes + src->index, buf, len); - src->index += len; - return len; -} - - -/* Load GIF image IMG for use on frame F. Value is non-zero if - successful. */ - -static int -gif_load (f, img) - struct frame *f; - struct image *img; -{ - Lisp_Object file, specified_file; - Lisp_Object specified_data; - int rc, width, height, x, y, i; - XImage *ximg; - ColorMapObject *gif_color_map; - unsigned long pixel_colors[256]; - GifFileType *gif; - struct gcpro gcpro1; - Lisp_Object image; - int ino, image_left, image_top, image_width, image_height; - gif_memory_source memsrc; - unsigned char *raster; - - specified_file = image_spec_value (img->spec, QCfile, NULL); - specified_data = image_spec_value (img->spec, QCdata, NULL); - file = Qnil; - GCPRO1 (file); - - if (NILP (specified_data)) - { - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - /* Open the GIF file. */ - gif = DGifOpenFileName (SDATA (file)); - if (gif == NULL) - { - image_error ("Cannot open `%s'", file, Qnil); - UNGCPRO; - return 0; - } - } - else - { - /* Read from memory! */ - current_gif_memory_src = &memsrc; - memsrc.bytes = SDATA (specified_data); - memsrc.len = SBYTES (specified_data); - memsrc.index = 0; - - gif = DGifOpen(&memsrc, gif_read_from_memory); - if (!gif) - { - image_error ("Cannot open memory source `%s'", img->spec, Qnil); - UNGCPRO; - return 0; - } - } - - /* Read entire contents. */ - rc = DGifSlurp (gif); - if (rc == GIF_ERROR) - { - image_error ("Error reading `%s'", img->spec, Qnil); - DGifCloseFile (gif); - UNGCPRO; - return 0; - } - - image = image_spec_value (img->spec, QCindex, NULL); - ino = INTEGERP (image) ? XFASTINT (image) : 0; - if (ino >= gif->ImageCount) - { - image_error ("Invalid image number `%s' in image `%s'", - image, img->spec); - DGifCloseFile (gif); - UNGCPRO; - return 0; - } - - width = img->width = gif->SWidth; - height = img->height = gif->SHeight; - - BLOCK_INPUT; - - /* Create the X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) - { - UNBLOCK_INPUT; - DGifCloseFile (gif); - UNGCPRO; - return 0; - } - - /* Allocate colors. */ - gif_color_map = gif->SavedImages[ino].ImageDesc.ColorMap; - if (!gif_color_map) - gif_color_map = gif->SColorMap; - init_color_table (); - bzero (pixel_colors, sizeof pixel_colors); - - for (i = 0; i < gif_color_map->ColorCount; ++i) - { - int r = gif_color_map->Colors[i].Red << 8; - int g = gif_color_map->Colors[i].Green << 8; - int b = gif_color_map->Colors[i].Blue << 8; - pixel_colors[i] = lookup_rgb_color (f, r, g, b); - } - - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - - /* Clear the part of the screen image that are not covered by - the image from the GIF file. Full animated GIF support - requires more than can be done here (see the gif89 spec, - disposal methods). Let's simply assume that the part - not covered by a sub-image is in the frame's background color. */ - image_top = gif->SavedImages[ino].ImageDesc.Top; - image_left = gif->SavedImages[ino].ImageDesc.Left; - image_width = gif->SavedImages[ino].ImageDesc.Width; - image_height = gif->SavedImages[ino].ImageDesc.Height; - - for (y = 0; y < image_top; ++y) - for (x = 0; x < width; ++x) - XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); - - for (y = image_top + image_height; y < height; ++y) - for (x = 0; x < width; ++x) - XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); - - for (y = image_top; y < image_top + image_height; ++y) - { - for (x = 0; x < image_left; ++x) - XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); - for (x = image_left + image_width; x < width; ++x) - XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); - } - - /* Read the GIF image into the X image. We use a local variable - `raster' here because RasterBits below is a char *, and invites - problems with bytes >= 0x80. */ - raster = (unsigned char *) gif->SavedImages[ino].RasterBits; - - if (gif->SavedImages[ino].ImageDesc.Interlace) - { - static int interlace_start[] = {0, 4, 2, 1}; - static int interlace_increment[] = {8, 8, 4, 2}; - int pass, inc; - int row = interlace_start[0]; - - pass = 0; - - for (y = 0; y < image_height; y++) - { - if (row >= image_height) - { - row = interlace_start[++pass]; - while (row >= image_height) - row = interlace_start[++pass]; - } - - for (x = 0; x < image_width; x++) - { - int i = raster[(y * image_width) + x]; - XPutPixel (ximg, x + image_left, row + image_top, - pixel_colors[i]); - } - - row += interlace_increment[pass]; - } - } - else - { - for (y = 0; y < image_height; ++y) - for (x = 0; x < image_width; ++x) - { - int i = raster[y* image_width + x]; - XPutPixel (ximg, x + image_left, y + image_top, pixel_colors[i]); - } - } - - DGifCloseFile (gif); - - /* Put the image into the pixmap, then free the X image and its buffer. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - UNBLOCK_INPUT; - - UNGCPRO; - return 1; -} - -#endif /* HAVE_GIF != 0 */ - - - -/*********************************************************************** - Ghostscript - ***********************************************************************/ - -#ifdef HAVE_GHOSTSCRIPT -static int gs_image_p P_ ((Lisp_Object object)); -static int gs_load P_ ((struct frame *f, struct image *img)); -static void gs_clear_image P_ ((struct frame *f, struct image *img)); - -/* The symbol `postscript' identifying images of this type. */ - -Lisp_Object Qpostscript; - -/* Keyword symbols. */ - -Lisp_Object QCloader, QCbounding_box, QCpt_width, QCpt_height; - -/* Indices of image specification fields in gs_format, below. */ - -enum gs_keyword_index -{ - GS_TYPE, - GS_PT_WIDTH, - GS_PT_HEIGHT, - GS_FILE, - GS_LOADER, - GS_BOUNDING_BOX, - GS_ASCENT, - GS_MARGIN, - GS_RELIEF, - GS_ALGORITHM, - GS_HEURISTIC_MASK, - GS_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword gs_format[GS_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":pt-width", IMAGE_POSITIVE_INTEGER_VALUE, 1}, - {":pt-height", IMAGE_POSITIVE_INTEGER_VALUE, 1}, - {":file", IMAGE_STRING_VALUE, 1}, - {":loader", IMAGE_FUNCTION_VALUE, 0}, - {":bounding-box", IMAGE_DONT_CHECK_VALUE_TYPE, 1}, - {":ascent", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} -}; - -/* Structure describing the image type `ghostscript'. */ - -static struct image_type gs_type = -{ - &Qpostscript, - gs_image_p, - gs_load, - gs_clear_image, - NULL -}; - - -/* Free X resources of Ghostscript image IMG which is used on frame F. */ - -static void -gs_clear_image (f, img) - struct frame *f; - struct image *img; -{ - /* IMG->data.ptr_val may contain a recorded colormap. */ - xfree (img->data.ptr_val); - x_clear_image (f, img); -} - - -/* Return non-zero if OBJECT is a valid Ghostscript image - specification. */ - -static int -gs_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[GS_LAST]; - Lisp_Object tem; - int i; - - bcopy (gs_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, GS_LAST, Qpostscript) - || (fmt[GS_ASCENT].count - && XFASTINT (fmt[GS_ASCENT].value) > 100)) - return 0; - - /* Bounding box must be a list or vector containing 4 integers. */ - tem = fmt[GS_BOUNDING_BOX].value; - if (CONSP (tem)) - { - for (i = 0; i < 4; ++i, tem = XCDR (tem)) - if (!CONSP (tem) || !INTEGERP (XCAR (tem))) - return 0; - if (!NILP (tem)) - return 0; - } - else if (VECTORP (tem)) - { - if (XVECTOR (tem)->size != 4) - return 0; - for (i = 0; i < 4; ++i) - if (!INTEGERP (XVECTOR (tem)->contents[i])) - return 0; - } - else - return 0; - - return 1; -} - - -/* Load Ghostscript image IMG for use on frame F. Value is non-zero - if successful. */ - -static int -gs_load (f, img) - struct frame *f; - struct image *img; -{ - char buffer[100]; - Lisp_Object window_and_pixmap_id = Qnil, loader, pt_height, pt_width; - struct gcpro gcpro1, gcpro2; - Lisp_Object frame; - double in_width, in_height; - Lisp_Object pixel_colors = Qnil; - - /* Compute pixel size of pixmap needed from the given size in the - image specification. Sizes in the specification are in pt. 1 pt - = 1/72 in, xdpi and ydpi are stored in the frame's X display - info. */ - pt_width = image_spec_value (img->spec, QCpt_width, NULL); - in_width = XFASTINT (pt_width) / 72.0; - img->width = in_width * FRAME_W32_DISPLAY_INFO (f)->resx; - pt_height = image_spec_value (img->spec, QCpt_height, NULL); - in_height = XFASTINT (pt_height) / 72.0; - img->height = in_height * FRAME_W32_DISPLAY_INFO (f)->resy; - - /* Create the pixmap. */ - BLOCK_INPUT; - xassert (img->pixmap == 0); - img->pixmap = XCreatePixmap (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), - img->width, img->height, - DefaultDepthOfScreen (FRAME_X_SCREEN (f))); - UNBLOCK_INPUT; - - if (!img->pixmap) - { - image_error ("Unable to create pixmap for `%s'", img->spec, Qnil); - return 0; - } - - /* Call the loader to fill the pixmap. It returns a process object - if successful. We do not record_unwind_protect here because - other places in redisplay like calling window scroll functions - don't either. Let the Lisp loader use `unwind-protect' instead. */ - GCPRO2 (window_and_pixmap_id, pixel_colors); - - sprintf (buffer, "%lu %lu", - (unsigned long) FRAME_W32_WINDOW (f), - (unsigned long) img->pixmap); - window_and_pixmap_id = build_string (buffer); - - sprintf (buffer, "%lu %lu", - FRAME_FOREGROUND_PIXEL (f), - FRAME_BACKGROUND_PIXEL (f)); - pixel_colors = build_string (buffer); - - XSETFRAME (frame, f); - loader = image_spec_value (img->spec, QCloader, NULL); - if (NILP (loader)) - loader = intern ("gs-load-image"); - - img->data.lisp_val = call6 (loader, frame, img->spec, - make_number (img->width), - make_number (img->height), - window_and_pixmap_id, - pixel_colors); - UNGCPRO; - return PROCESSP (img->data.lisp_val); -} - - -/* Kill the Ghostscript process that was started to fill PIXMAP on - frame F. Called from XTread_socket when receiving an event - telling Emacs that Ghostscript has finished drawing. */ - -void -x_kill_gs_process (pixmap, f) - Pixmap pixmap; - struct frame *f; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - int class, i; - struct image *img; - - /* Find the image containing PIXMAP. */ - for (i = 0; i < c->used; ++i) - if (c->images[i]->pixmap == pixmap) - break; - - /* Kill the GS process. We should have found PIXMAP in the image - cache and its image should contain a process object. */ - xassert (i < c->used); - img = c->images[i]; - xassert (PROCESSP (img->data.lisp_val)); - Fkill_process (img->data.lisp_val, Qnil); - img->data.lisp_val = Qnil; - - /* On displays with a mutable colormap, figure out the colors - allocated for the image by looking at the pixels of an XImage for - img->pixmap. */ - class = FRAME_W32_DISPLAY_INFO (f)->visual->class; - if (class != StaticColor && class != StaticGray && class != TrueColor) - { - XImage *ximg; - - BLOCK_INPUT; - - /* Try to get an XImage for img->pixmep. */ - ximg = XGetImage (FRAME_W32_DISPLAY (f), img->pixmap, - 0, 0, img->width, img->height, ~0, ZPixmap); - if (ximg) - { - int x, y; - - /* Initialize the color table. */ - init_color_table (); - - /* For each pixel of the image, look its color up in the - color table. After having done so, the color table will - contain an entry for each color used by the image. */ - for (y = 0; y < img->height; ++y) - for (x = 0; x < img->width; ++x) - { - unsigned long pixel = XGetPixel (ximg, x, y); - lookup_pixel_color (f, pixel); - } - - /* Record colors in the image. Free color table and XImage. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - XDestroyImage (ximg); - -#if 0 /* This doesn't seem to be the case. If we free the colors - here, we get a BadAccess later in x_clear_image when - freeing the colors. */ - /* We have allocated colors once, but Ghostscript has also - allocated colors on behalf of us. So, to get the - reference counts right, free them once. */ - if (img->ncolors) - { - Colormap cmap = DefaultColormapOfScreen (FRAME_X_SCREEN (f)); - XFreeColors (FRAME_W32_DISPLAY (f), cmap, - img->colors, img->ncolors, 0); - } -#endif - } - else - image_error ("Cannot get X image of `%s'; colors will not be freed", - img->spec, Qnil); - - UNBLOCK_INPUT; - } -} - -#endif /* HAVE_GHOSTSCRIPT */ - - -/*********************************************************************** - Window properties - ***********************************************************************/ - -DEFUN ("x-change-window-property", Fx_change_window_property, - Sx_change_window_property, 2, 3, 0, - doc: /* Change window property PROP to VALUE on the X window of FRAME. -PROP and VALUE must be strings. FRAME nil or omitted means use the -selected frame. Value is VALUE. */) - (prop, value, frame) - Lisp_Object frame, prop, value; -{ -#if 0 /* MAC_TODO : port window properties to Mac */ - struct frame *f = check_x_frame (frame); - Atom prop_atom; - - CHECK_STRING (prop); - CHECK_STRING (value); - - BLOCK_INPUT; - prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), SDATA (prop), False); - XChangeProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), - prop_atom, XA_STRING, 8, PropModeReplace, - SDATA (value), SCHARS (value)); - - /* Make sure the property is set when we return. */ - XFlush (FRAME_W32_DISPLAY (f)); - UNBLOCK_INPUT; - -#endif /* MAC_TODO */ - - return value; -} - - -DEFUN ("x-delete-window-property", Fx_delete_window_property, - Sx_delete_window_property, 1, 2, 0, - doc: /* Remove window property PROP from X window of FRAME. -FRAME nil or omitted means use the selected frame. Value is PROP. */) - (prop, frame) - Lisp_Object prop, frame; -{ -#if 0 /* MAC_TODO : port window properties to Mac */ - - struct frame *f = check_x_frame (frame); - Atom prop_atom; - - CHECK_STRING (prop); - BLOCK_INPUT; - prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), SDATA (prop), False); - XDeleteProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), prop_atom); - - /* Make sure the property is removed when we return. */ - XFlush (FRAME_W32_DISPLAY (f)); - UNBLOCK_INPUT; -#endif /* MAC_TODO */ - - return prop; -} - - -DEFUN ("x-window-property", Fx_window_property, Sx_window_property, - 1, 2, 0, - doc: /* Value is the value of window property PROP on FRAME. -If FRAME is nil or omitted, use the selected frame. Value is nil -if FRAME hasn't a property with name PROP or if PROP has no string -value. */) - (prop, frame) - Lisp_Object prop, frame; -{ -#if 0 /* MAC_TODO : port window properties to Mac */ +#if 0 /* MAC_TODO : port window properties to Mac */ struct frame *f = check_x_frame (frame); Atom prop_atom; @@ -8685,38 +4194,6 @@ selection dialog's entry field, if MUSTMATCH is non-nil. */) -/*********************************************************************** - Tests - ***********************************************************************/ - -#if GLYPH_DEBUG - -DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0, - doc: /* Value is non-nil if SPEC is a valid image specification. */) - (spec) - Lisp_Object spec; -{ - return valid_image_p (spec) ? Qt : Qnil; -} - - -DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "") - (spec) - Lisp_Object spec; -{ - int id = -1; - - if (valid_image_p (spec)) - id = lookup_image (SELECTED_FRAME (), spec); - - debug_print (spec); - return make_number (id); -} - -#endif /* GLYPH_DEBUG != 0 */ - - - /*********************************************************************** Initialization ***********************************************************************/ @@ -8772,8 +4249,6 @@ syms_of_macfns () staticpro (&Qsuppress_icon); Qundefined_color = intern ("undefined-color"); staticpro (&Qundefined_color); - Qcenter = intern ("center"); - staticpro (&Qcenter); /* This is the end of symbol initialization. */ Qhyper = intern ("hyper"); @@ -8795,10 +4270,6 @@ syms_of_macfns () Vtext_property_default_nonsticky = Fcons (Fcons (Qdisplay, Qt), Vtext_property_default_nonsticky); - - Qlaplace = intern ("laplace"); - staticpro (&Qlaplace); - Qface_set_after_frame_default = intern ("face-set-after-frame-default"); staticpro (&Qface_set_after_frame_default); @@ -8807,10 +4278,6 @@ syms_of_macfns () Fput (Qundefined_color, Qerror_message, build_string ("Undefined color")); - DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, - doc: /* List of directories to search for window system bitmap files. */); - Vx_bitmap_file_path = decode_env_path ((char *) 0, "PATH"); - DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape, doc: /* The shape of the pointer when over text. Changing the value does not affect existing frames @@ -8865,16 +4332,11 @@ such a font. This is especially effective for such large fonts as Chinese, Japanese, and Korean. */); Vx_pixel_size_width_font_regexp = Qnil; - DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay, - doc: /* Time after which cached images are removed from the cache. -When an image has not been displayed this many seconds, remove it -from the image cache. Value must be an integer or nil with nil -meaning don't clear the cache. */); - Vimage_cache_eviction_delay = make_number (30 * 60); - + /* X window properties. */ defsubr (&Sx_change_window_property); defsubr (&Sx_delete_window_property); defsubr (&Sx_window_property); + defsubr (&Sxw_display_color_p); defsubr (&Sx_display_grayscale_p); defsubr (&Sxw_color_defined_p); @@ -8911,118 +4373,23 @@ meaning don't clear the cache. */); load_font_func = x_load_font; find_ccl_program_func = x_find_ccl_program; query_font_func = x_query_font; - set_frame_fontset_func = x_set_font; check_window_system_func = check_mac; -#if 0 /* MAC_TODO: Image support for Mac Images. */ - Qxbm = intern ("xbm"); - staticpro (&Qxbm); - QCtype = intern (":type"); - staticpro (&QCtype); - QCconversion = intern (":conversion"); - staticpro (&QCconversion); - QCheuristic_mask = intern (":heuristic-mask"); - staticpro (&QCheuristic_mask); - QCcolor_symbols = intern (":color-symbols"); - staticpro (&QCcolor_symbols); - QCascent = intern (":ascent"); - staticpro (&QCascent); - QCmargin = intern (":margin"); - staticpro (&QCmargin); - QCrelief = intern (":relief"); - staticpro (&QCrelief); - Qpostscript = intern ("postscript"); - staticpro (&Qpostscript); - QCloader = intern (":loader"); - staticpro (&QCloader); - QCbounding_box = intern (":bounding-box"); - staticpro (&QCbounding_box); - QCpt_width = intern (":pt-width"); - staticpro (&QCpt_width); - QCpt_height = intern (":pt-height"); - staticpro (&QCpt_height); - QCindex = intern (":index"); - staticpro (&QCindex); - Qpbm = intern ("pbm"); - staticpro (&Qpbm); - -#if HAVE_XPM - Qxpm = intern ("xpm"); - staticpro (&Qxpm); -#endif - -#if HAVE_JPEG - Qjpeg = intern ("jpeg"); - staticpro (&Qjpeg); -#endif - -#if HAVE_TIFF - Qtiff = intern ("tiff"); - staticpro (&Qtiff); -#endif - -#if HAVE_GIF - Qgif = intern ("gif"); - staticpro (&Qgif); -#endif - -#if HAVE_PNG - Qpng = intern ("png"); - staticpro (&Qpng); -#endif - - defsubr (&Sclear_image_cache); - -#if GLYPH_DEBUG - defsubr (&Simagep); - defsubr (&Slookup_image); -#endif -#endif /* MAC_TODO */ - hourglass_atimer = NULL; hourglass_shown_p = 0; defsubr (&Sx_show_tip); defsubr (&Sx_hide_tip); - staticpro (&tip_timer); tip_timer = Qnil; + staticpro (&tip_timer); + tip_frame = Qnil; + staticpro (&tip_frame); #if 0 /* MAC_TODO */ defsubr (&Sx_file_dialog); #endif } - -void -init_xfns () -{ - image_types = NULL; - Vimage_types = Qnil; - - define_image_type (&xbm_type); -#if 0 /* NTEMACS_TODO : Image support for W32 */ - define_image_type (&gs_type); - define_image_type (&pbm_type); - -#if HAVE_XPM - define_image_type (&xpm_type); -#endif - -#if HAVE_JPEG - define_image_type (&jpeg_type); -#endif - -#if HAVE_TIFF - define_image_type (&tiff_type); -#endif - -#if HAVE_GIF - define_image_type (&gif_type); -#endif - -#if HAVE_PNG - define_image_type (&png_type); -#endif -#endif /* NTEMACS_TODO */ -} +/* arch-tag: d7591289-f374-4377-b245-12f5dbbb8edc + (do not change this comment) */ diff --git a/src/macgui.h b/src/macgui.h index e04cf448b4..2bb346e9d3 100644 --- a/src/macgui.h +++ b/src/macgui.h @@ -23,9 +23,6 @@ Boston, MA 02111-1307, USA. */ #ifndef EMACS_MACGUI_H #define EMACS_MACGUI_H -typedef int Pixmap; -typedef int Bitmap; - typedef int Display; /* fix later */ typedef char * XrmDatabase; /* fix later */ @@ -33,12 +30,43 @@ typedef char * XrmDatabase; /* fix later */ typedef unsigned long Time; #if MAC_OSX +#undef mktime +#undef DEBUG +#undef Z +#undef free +#undef malloc +#undef realloc +/* Macros max and min defined in lisp.h conflict with those in + precompiled header Carbon.h. */ +#undef max +#undef min +#undef init_process +#include +#undef Z +#define Z (current_buffer->text->z) +#undef free +#define free unexec_free +#undef malloc +#define malloc unexec_malloc +#undef realloc +#define realloc unexec_realloc +#undef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#undef max +#define max(a, b) ((a) > (b) ? (a) : (b)) +#undef init_process +#define init_process emacs_init_process +#undef INFINITY typedef struct OpaqueWindowPtr* Window; #else -#include +#include /* for WindowPtr */ +#include /* for GWorldPtr */ +#include /* for ControlHandle in xdisp.c */ typedef WindowPtr Window; #endif +typedef GWorldPtr Pixmap; + #define FACE_DEFAULT (~0) @@ -198,3 +226,5 @@ typedef struct { #endif /* EMACS_MACGUI_H */ +/* arch-tag: 5a0da49a-35e2-418b-a58c-8a55778ae849 + (do not change this comment) */ diff --git a/src/macmenu.c b/src/macmenu.c index 72fb95fbaa..06b1b16cf4 100644 --- a/src/macmenu.c +++ b/src/macmenu.c @@ -35,34 +35,7 @@ Boston, MA 02111-1307, USA. */ #include "charset.h" #include "coding.h" -#ifdef MAC_OSX -#undef mktime -#undef DEBUG -#undef Z -#undef free -#undef malloc -#undef realloc -/* Macros max and min defined in lisp.h conflict with those in - precompiled header Carbon.h. */ -#undef max -#undef min -#undef init_process -#include -#undef Z -#define Z (current_buffer->text->z) -#undef free -#define free unexec_free -#undef malloc -#define malloc unexec_malloc -#undef realloc -#define realloc unexec_realloc -#undef min -#define min(a, b) ((a) < (b) ? (a) : (b)) -#undef max -#define max(a, b) ((a) > (b) ? (a) : (b)) -#undef init_process -#define init_process emacs_init_process -#else /* not MAC_OSX */ +#ifndef MAC_OSX #include #include #include @@ -2374,3 +2347,6 @@ The enable predicate for a menu command should check this variable. */); defsubr (&Sx_popup_dialog); #endif } + +/* arch-tag: 40b2c6c7-b8a9-4a49-b930-1b2707184cce + (do not change this comment) */ diff --git a/src/macros.c b/src/macros.c index 1b23f4b3c8..d0219a3be0 100644 --- a/src/macros.c +++ b/src/macros.c @@ -406,3 +406,6 @@ syms_of_macros () DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro, doc: /* Last kbd macro defined, as a string or vector; nil if none defined. */); } + +/* arch-tag: d293fcc9-2266-4163-9198-7fa0de12ec9e + (do not change this comment) */ diff --git a/src/macros.h b/src/macros.h index 3f2629c661..41a32efe2e 100644 --- a/src/macros.h +++ b/src/macros.h @@ -52,3 +52,6 @@ extern void finalize_kbd_macro_chars P_ ((void)); /* Store a character into kbd macro being defined */ extern void store_kbd_macro_char P_ ((Lisp_Object)); + +/* arch-tag: 8edb7088-682f-4d1f-a4d9-0fbb7284234e + (do not change this comment) */ diff --git a/src/macterm.c b/src/macterm.c index ea4d5b98a8..44029032bb 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -1,5 +1,5 @@ /* Implementation of GUI terminal on the Mac OS. - Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -35,29 +35,6 @@ Boston, MA 02111-1307, USA. */ #endif #ifdef MAC_OSX -#undef mktime -#undef DEBUG -#undef free -#undef malloc -#undef realloc -/* Macros max and min defined in lisp.h conflict with those in - precompiled header Carbon.h. */ -#undef max -#undef min -#undef init_process -#include -#undef free -#define free unexec_free -#undef malloc -#define malloc unexec_malloc -#undef realloc -#define realloc unexec_realloc -#undef min -#define min(a, b) ((a) < (b) ? (a) : (b)) -#undef max -#define max(a, b) ((a) > (b) ? (a) : (b)) -#undef init_process -#define init_process emacs_init_process /* USE_CARBON_EVENTS determines if the Carbon Event Manager is used to obtain events from the event queue. If set to 0, WaitNextEvent is used instead. */ @@ -253,8 +230,6 @@ extern Lisp_Object Vcommand_line_args, Vsystem_name; extern Lisp_Object Vx_no_window_manager; -extern Lisp_Object Qface, Qmouse_face; - extern int errno; /* A mask of extra modifier bits to put into every keyboard char. */ @@ -305,7 +280,9 @@ static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *)); static void XTframe_rehighlight P_ ((struct frame *)); static void x_frame_rehighlight P_ ((struct x_display_info *)); static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *)); -static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int)); +static void x_draw_bar_cursor P_ ((struct window *, struct glyph_row *, int, + enum text_cursor_kinds)); + static void x_clip_to_row P_ ((struct window *, struct glyph_row *, GC)); static void x_flush P_ ((struct frame *f)); static void x_update_begin P_ ((struct frame *)); @@ -329,15 +306,12 @@ extern void set_frame_menubar (FRAME_PTR, int, int); /* X display function emulation */ -static void +void XFreePixmap (display, pixmap) - Display *display; + Display *display; /* not used */ Pixmap pixmap; { - PixMap *p = (PixMap *) pixmap; - - xfree (p->baseAddr); - xfree (p); + DisposeGWorld (pixmap); } @@ -349,9 +323,9 @@ mac_set_forecolor (unsigned long color) { RGBColor fg_color; - fg_color.red = RED_FROM_ULONG (color) * 256; - fg_color.green = GREEN_FROM_ULONG (color) * 256; - fg_color.blue = BLUE_FROM_ULONG (color) * 256; + fg_color.red = RED16_FROM_ULONG (color); + fg_color.green = GREEN16_FROM_ULONG (color); + fg_color.blue = BLUE16_FROM_ULONG (color); RGBForeColor (&fg_color); } @@ -365,9 +339,9 @@ mac_set_backcolor (unsigned long color) { RGBColor bg_color; - bg_color.red = RED_FROM_ULONG (color) * 256; - bg_color.green = GREEN_FROM_ULONG (color) * 256; - bg_color.blue = BLUE_FROM_ULONG (color) * 256; + bg_color.red = RED16_FROM_ULONG (color); + bg_color.green = GREEN16_FROM_ULONG (color); + bg_color.blue = BLUE16_FROM_ULONG (color); RGBBackColor (&bg_color); } @@ -403,6 +377,23 @@ XDrawLine (display, w, gc, x1, y1, x2, y2) LineTo (x2, y2); } +void +mac_draw_line_to_pixmap (display, p, gc, x1, y1, x2, y2) + Display *display; + Pixmap p; + GC gc; + int x1, y1, x2, y2; +{ + SetGWorld (p, NULL); + + mac_set_colors (gc); + + LockPixels (GetGWorldPixMap (p)); + MoveTo (x1, y1); + LineTo (x2, y2); + UnlockPixels (GetGWorldPixMap (p)); +} + /* Mac version of XClearArea. */ void @@ -469,15 +460,21 @@ XClearWindow (display, w) /* Mac replacement for XCopyArea. */ static void -mac_draw_bitmap (display, w, gc, x, y, bitmap) +mac_draw_bitmap (display, w, gc, x, y, width, height, bits, overlay_p) Display *display; WindowPtr w; GC gc; - int x, y; - BitMap *bitmap; + int x, y, width, height; + unsigned short *bits; + int overlay_p; { + BitMap bitmap; Rect r; + bitmap.rowBytes = sizeof(unsigned short); + bitmap.baseAddr = (char *)bits; + SetRect (&(bitmap.bounds), 0, 0, width, height); + #if TARGET_API_MAC_CARBON SetPort (GetWindowPort (w)); #else @@ -485,19 +482,16 @@ mac_draw_bitmap (display, w, gc, x, y, bitmap) #endif mac_set_colors (gc); - SetRect (&r, x, y, x + bitmap->bounds.right, y + bitmap->bounds.bottom); + SetRect (&r, x, y, x + width, y + height); #if TARGET_API_MAC_CARBON - { - PixMapHandle pmh; - - LockPortBits (GetWindowPort (w)); - pmh = GetPortPixMap (GetWindowPort (w)); - CopyBits (bitmap, (BitMap *) *pmh, &(bitmap->bounds), &r, srcCopy, 0); - UnlockPortBits (GetWindowPort (w)); - } + LockPortBits (GetWindowPort (w)); + CopyBits (&bitmap, GetPortBitMapForCopyBits (GetWindowPort (w)), + &(bitmap.bounds), &r, overlay_p ? srcOr : srcCopy, 0); + UnlockPortBits (GetWindowPort (w)); #else /* not TARGET_API_MAC_CARBON */ - CopyBits (bitmap, &(w->portBits), &(bitmap->bounds), &r, srcCopy, 0); + CopyBits (&bitmap, &(w->portBits), &(bitmap.bounds), &r, + overlay_p ? srcOr : srcCopy, 0); #endif /* not TARGET_API_MAC_CARBON */ } @@ -540,6 +534,23 @@ mac_reset_clipping (display, w) } +/* XBM bits seem to be backward within bytes compared with how + Mac does things. */ +static unsigned char +reflect_byte (orig) + unsigned char orig; +{ + int i; + unsigned char reflected = 0x00; + for (i = 0; i < 8; i++) + { + if (orig & (0x01 << i)) + reflected |= 0x80 >> i; + } + return reflected; +} + + /* Mac replacement for XCreateBitmapFromBitmapData. */ static void @@ -548,18 +559,19 @@ mac_create_bitmap_from_bitmap_data (bitmap, bits, w, h) char *bits; int w, h; { - int bytes_per_row, i, j; + int i, j, w1; + char *p; - bitmap->rowBytes = (w + 15) / 16 * 2; /* must be on word boundary */ + w1 = (w + 7) / 8; /* nb of 8bits elt in X bitmap */ + bitmap->rowBytes = ((w + 15) / 16) * 2; /* nb of 16bits elt in Mac bitmap */ bitmap->baseAddr = xmalloc (bitmap->rowBytes * h); - if (!bitmap->baseAddr) - abort (); - bzero (bitmap->baseAddr, bitmap->rowBytes * h); for (i = 0; i < h; i++) - for (j = 0; j < w; j++) - if (BitTst (bits, i * w + j)) - BitSet (bitmap->baseAddr, i * bitmap->rowBytes * 8 + j); + { + p = bitmap->baseAddr + i * bitmap->rowBytes; + for (j = 0; j < w1; j++) + *p++ = reflect_byte (*bits++); + } SetRect (&(bitmap->bounds), 0, 0, w, h); } @@ -572,6 +584,67 @@ mac_free_bitmap (bitmap) xfree (bitmap->baseAddr); } + +Pixmap +XCreatePixmap (display, w, width, height, depth) + Display *display; /* not used */ + WindowPtr w; + unsigned int width, height; + unsigned int depth; /* not used */ +{ + Pixmap pixmap; + Rect r; + QDErr err; + +#if TARGET_API_MAC_CARBON + SetPort (GetWindowPort (w)); +#else + SetPort (w); +#endif + + SetRect (&r, 0, 0, width, height); + err = NewGWorld (&pixmap, depth, &r, NULL, NULL, 0); + if (err != noErr) + return NULL; + return pixmap; +} + + +Pixmap +XCreatePixmapFromBitmapData (display, w, data, width, height, fg, bg, depth) + Display *display; /* not used */ + WindowPtr w; + char *data; + unsigned int width, height; + unsigned long fg, bg; + unsigned int depth; /* not used */ +{ + Pixmap pixmap; + BitMap bitmap; + + pixmap = XCreatePixmap (display, w, width, height, depth); + if (pixmap == NULL) + return NULL; + + SetGWorld (pixmap, NULL); + mac_create_bitmap_from_bitmap_data (&bitmap, data, width, height); + mac_set_forecolor (fg); + mac_set_backcolor (bg); + LockPixels (GetGWorldPixMap (pixmap)); +#if TARGET_API_MAC_CARBON + CopyBits (&bitmap, GetPortBitMapForCopyBits (pixmap), + &bitmap.bounds, &bitmap.bounds, srcCopy, 0); +#else /* not TARGET_API_MAC_CARBON */ + CopyBits (&bitmap, &(((GrafPtr)pixmap)->portBits), + &bitmap.bounds, &bitmap.bounds, srcCopy, 0); +#endif /* not TARGET_API_MAC_CARBON */ + UnlockPixels (GetGWorldPixMap (pixmap)); + mac_free_bitmap (&bitmap); + + return pixmap; +} + + /* Mac replacement for XFillRectangle. */ static void @@ -597,6 +670,26 @@ XFillRectangle (display, w, gc, x, y, width, height) } +static void +mac_fill_rectangle_to_pixmap (display, p, gc, x, y, width, height) + Display *display; + Pixmap p; + GC gc; + int x, y; + unsigned int width, height; +{ + Rect r; + + SetGWorld (p, NULL); + mac_set_colors (gc); + SetRect (&r, x, y, x + width, y + height); + + LockPixels (GetGWorldPixMap (p)); + PaintRect (&r); /* using foreground color of gc */ + UnlockPixels (GetGWorldPixMap (p)); +} + + /* Mac replacement for XDrawRectangle: dest is a window. */ static void @@ -632,20 +725,15 @@ mac_draw_rectangle_to_pixmap (display, p, gc, x, y, width, height) int x, y; unsigned int width, height; { -#if 0 /* MAC_TODO: draw a rectangle in a PixMap */ Rect r; -#if TARGET_API_MAC_CARBON - SetPort (GetWindowPort (w)); -#else - SetPort (w); -#endif - + SetGWorld (p, NULL); mac_set_colors (gc); - SetRect (&r, x, y, x + width, y + height); + SetRect (&r, x, y, x + width + 1, y + height + 1); + LockPixels (GetGWorldPixMap (p)); FrameRect (&r); /* using foreground color of gc */ -#endif /* 0 */ + UnlockPixels (GetGWorldPixMap (p)); } @@ -760,23 +848,66 @@ mac_copy_area (display, src, dest, gc, src_x, src_y, width, height, dest_x, SetPort (dest); #endif - mac_set_colors (gc); - SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height); + ForeColor (blackColor); + BackColor (whiteColor); + + LockPixels (GetGWorldPixMap (src)); #if TARGET_API_MAC_CARBON - { - PixMapHandle pmh; + LockPortBits (GetWindowPort (dest)); + CopyBits (GetPortBitMapForCopyBits (src), + GetPortBitMapForCopyBits (GetWindowPort (dest)), + &src_r, &dest_r, srcCopy, 0); + UnlockPortBits (GetWindowPort (dest)); +#else /* not TARGET_API_MAC_CARBON */ + CopyBits (&(((GrafPtr)src)->portBits), &(dest->portBits), + &src_r, &dest_r, srcCopy, 0); +#endif /* not TARGET_API_MAC_CARBON */ + UnlockPixels (GetGWorldPixMap (src)); +} - LockPortBits (GetWindowPort (dest)); - pmh = GetPortPixMap (GetWindowPort (dest)); - CopyBits ((BitMap *) &src, (BitMap *) *pmh, &src_r, &dest_r, srcCopy, 0); - UnlockPortBits (GetWindowPort (dest)); - } + +static void +mac_copy_area_with_mask (display, src, mask, dest, gc, src_x, src_y, + width, height, dest_x, dest_y) + Display *display; + Pixmap src, mask; + WindowPtr dest; + GC gc; + int src_x, src_y; + unsigned int width, height; + int dest_x, dest_y; +{ + Rect src_r, dest_r; + +#if TARGET_API_MAC_CARBON + SetPort (GetWindowPort (dest)); +#else + SetPort (dest); +#endif + + SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); + SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height); + + ForeColor (blackColor); + BackColor (whiteColor); + + LockPixels (GetGWorldPixMap (src)); + LockPixels (GetGWorldPixMap (mask)); +#if TARGET_API_MAC_CARBON + LockPortBits (GetWindowPort (dest)); + CopyMask (GetPortBitMapForCopyBits (src), GetPortBitMapForCopyBits (mask), + GetPortBitMapForCopyBits (GetWindowPort (dest)), + &src_r, &src_r, &dest_r); + UnlockPortBits (GetWindowPort (dest)); #else /* not TARGET_API_MAC_CARBON */ - CopyBits ((BitMap *) &src, &(dest->portBits), &src_r, &dest_r, srcCopy, 0); + CopyMask (&(((GrafPtr)src)->portBits), &(((GrafPtr)mask)->portBits), + &(dest->portBits), &src_r, &src_r, &dest_r); #endif /* not TARGET_API_MAC_CARBON */ + UnlockPixels (GetGWorldPixMap (mask)); + UnlockPixels (GetGWorldPixMap (src)); } @@ -811,7 +942,6 @@ mac_scroll_area (display, w, gc, src_x, src_y, width, height, dest_x, dest_y) { #if TARGET_API_MAC_CARBON Rect gw_r, src_r, dest_r; - PixMapHandle pmh; SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height); @@ -822,8 +952,10 @@ mac_scroll_area (display, w, gc, src_x, src_y, width, height, dest_x, dest_y) BackColor (whiteColor); LockPortBits (GetWindowPort (w)); - pmh = GetPortPixMap (GetWindowPort (w)); - CopyBits ((BitMap *) *pmh, (BitMap *) *pmh, &src_r, &dest_r, srcCopy, 0); + { + const BitMap *bitmap = GetPortBitMapForCopyBits (GetWindowPort (w)); + CopyBits (bitmap, bitmap, &src_r, &dest_r, srcCopy, 0); + } UnlockPortBits (GetWindowPort (w)); mac_set_colors (gc); @@ -866,25 +998,67 @@ static void mac_copy_area_to_pixmap (display, src, dest, gc, src_x, src_y, width, height, dest_x, dest_y) Display *display; - Pixmap src; - Pixmap dest; + Pixmap src, dest; GC gc; int src_x, src_y; unsigned int width, height; int dest_x, dest_y; { Rect src_r, dest_r; - int src_right = ((PixMap *) src)->bounds.right; - int src_bottom = ((PixMap *) src)->bounds.bottom; - int w = src_right - src_x; - int h = src_bottom - src_y; - mac_set_colors (gc); + SetGWorld (dest, NULL); + ForeColor (blackColor); + BackColor (whiteColor); - SetRect (&src_r, src_x, src_y, src_right, src_bottom); - SetRect (&dest_r, dest_x, dest_y, dest_x + w, dest_y + h); + SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); + SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height); - CopyBits ((BitMap *) &src, (BitMap *) &dest, &src_r, &dest_r, srcCopy, 0); + LockPixels (GetGWorldPixMap (src)); + LockPixels (GetGWorldPixMap (dest)); +#if TARGET_API_MAC_CARBON + CopyBits (GetPortBitMapForCopyBits (src), GetPortBitMapForCopyBits (dest), + &src_r, &dest_r, srcCopy, 0); +#else /* not TARGET_API_MAC_CARBON */ + CopyBits (&(((GrafPtr)src)->portBits), &(((GrafPtr)dest)->portBits), + &src_r, &dest_r, srcCopy, 0); +#endif /* not TARGET_API_MAC_CARBON */ + UnlockPixels (GetGWorldPixMap (dest)); + UnlockPixels (GetGWorldPixMap (src)); +} + + +static void +mac_copy_area_with_mask_to_pixmap (display, src, mask, dest, gc, src_x, src_y, + width, height, dest_x, dest_y) + Display *display; + Pixmap src, mask, dest; + GC gc; + int src_x, src_y; + unsigned int width, height; + int dest_x, dest_y; +{ + Rect src_r, dest_r; + + SetGWorld (dest, NULL); + ForeColor (blackColor); + BackColor (whiteColor); + + SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); + SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height); + + LockPixels (GetGWorldPixMap (src)); + LockPixels (GetGWorldPixMap (mask)); + LockPixels (GetGWorldPixMap (dest)); +#if TARGET_API_MAC_CARBON + CopyMask (GetPortBitMapForCopyBits (src), GetPortBitMapForCopyBits (mask), + GetPortBitMapForCopyBits (dest), &src_r, &src_r, &dest_r); +#else /* not TARGET_API_MAC_CARBON */ + CopyMask (&(((GrafPtr)src)->portBits), &(((GrafPtr)mask)->portBits), + &(((GrafPtr)dest)->portBits), &src_r, &src_r, &dest_r); +#endif /* not TARGET_API_MAC_CARBON */ + UnlockPixels (GetGWorldPixMap (dest)); + UnlockPixels (GetGWorldPixMap (mask)); + UnlockPixels (GetGWorldPixMap (src)); } @@ -941,7 +1115,7 @@ XGetGCValues (void* ignore, XGCValues *gc, /* Mac replacement for XSetForeground. */ -static void +void XSetForeground (display, gc, color) Display *display; GC gc; @@ -1145,6 +1319,9 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) output_cursor.x, output_cursor.y); x_draw_vertical_border (w); + + draw_window_fringes (w); + UNBLOCK_INPUT; } @@ -1241,11 +1418,7 @@ x_after_update_window_line (desired_row) xassert (w); if (!desired_row->mode_line_p && !w->pseudo_window_p) - { - BLOCK_INPUT; - draw_row_fringe_bitmaps (w, desired_row); - UNBLOCK_INPUT; - } + desired_row->redraw_fringe_bitmaps_p = 1; /* When a window has disappeared, make sure that no rest of full-width rows stays visible in the internal border. Could @@ -1297,11 +1470,26 @@ x_draw_fringe_bitmap (w, row, p) XGCValues gcv; GC gc = f->output_data.mac->normal_gc; struct face *face = p->face; + int rowY; /* Must clip because of partially visible lines. */ - x_clip_to_row (w, row, gc); + rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); + if (p->y < rowY) + { + /* Adjust position of "bottom aligned" bitmap on partially + visible last row. */ + int oldY = row->y; + int oldVH = row->visible_height; + row->visible_height = p->h; + row->y -= rowY - p->y; + x_clip_to_row (w, row, gc); + row->y = oldY; + row->visible_height = oldVH; + } + else + x_clip_to_row (w, row, gc); - if (p->bx >= 0) + if (p->bx >= 0 && !p->overlay_p) { XGCValues gcv; gcv.foreground = face->background; @@ -1327,18 +1515,18 @@ x_draw_fringe_bitmap (w, row, p) #endif } - if (p->which != NO_FRINGE_BITMAP) + if (p->which) { - unsigned char *bits = fringe_bitmaps[p->which].bits + p->dh; - BitMap bitmap; + unsigned short *bits = p->bits + p->dh; - mac_create_bitmap_from_bitmap_data (&bitmap, bits, p->wd, p->h); - gcv.foreground = face->foreground; + gcv.foreground = (p->cursor_p + ? (p->overlay_p ? face->background + : f->output_data.mac->cursor_pixel) + : face->foreground); gcv.background = face->background; - mac_draw_bitmap (display, window, &gcv, p->x, p->y, &bitmap); - - mac_free_bitmap (&bitmap); + mac_draw_bitmap (display, window, &gcv, p->x, p->y, + p->wd, p->h, bits, p->overlay_p); } mac_reset_clipping (display, window); @@ -2119,6 +2307,21 @@ x_copy_dpy_color (dpy, cmap, pixel) #endif /* MAC_TODO */ + +/* Brightness beyond which a color won't have its highlight brightness + boosted. + + Nominally, highlight colors for `3d' faces are calculated by + brightening an object's color by a constant scale factor, but this + doesn't yield good results for dark colors, so for colors who's + brightness is less than this value (on a scale of 0-255) have to + use an additional additive factor. + + The value here is set so that the default menu-bar/mode-line color + (grey75) will not have its highlights changed at all. */ +#define HIGHLIGHT_COLOR_DARK_BOOST_LIMIT 187 + + /* Allocate a color which is lighter or darker than *COLOR by FACTOR or DELTA. Try a color with RGB values multiplied by FACTOR first. If this produces the same color as COLOR, try a color where all RGB @@ -2134,12 +2337,42 @@ mac_alloc_lighter_color (f, color, factor, delta) int delta; { unsigned long new; + long bright; + + /* On Mac, RGB values are 0-255, not 0-65535, so scale delta. */ + delta /= 256; /* Change RGB values by specified FACTOR. Avoid overflow! */ xassert (factor >= 0); new = RGB_TO_ULONG (min (0xff, (int) (factor * RED_FROM_ULONG (*color))), min (0xff, (int) (factor * GREEN_FROM_ULONG (*color))), min (0xff, (int) (factor * BLUE_FROM_ULONG (*color)))); + + /* Calculate brightness of COLOR. */ + bright = (2 * RED_FROM_ULONG (*color) + 3 * GREEN_FROM_ULONG (*color) + + BLUE_FROM_ULONG (*color)) / 6; + + /* We only boost colors that are darker than + HIGHLIGHT_COLOR_DARK_BOOST_LIMIT. */ + if (bright < HIGHLIGHT_COLOR_DARK_BOOST_LIMIT) + /* Make an additive adjustment to NEW, because it's dark enough so + that scaling by FACTOR alone isn't enough. */ + { + /* How far below the limit this color is (0 - 1, 1 being darker). */ + double dimness = 1 - (double)bright / HIGHLIGHT_COLOR_DARK_BOOST_LIMIT; + /* The additive adjustment. */ + int min_delta = delta * dimness * factor / 2; + + if (factor < 1) + new = RGB_TO_ULONG (max (0, min (0xff, (int) (RED_FROM_ULONG (*color)) - min_delta)), + max (0, min (0xff, (int) (GREEN_FROM_ULONG (*color)) - min_delta)), + max (0, min (0xff, (int) (BLUE_FROM_ULONG (*color)) - min_delta))); + else + new = RGB_TO_ULONG (max (0, min (0xff, (int) (min_delta + RED_FROM_ULONG (*color)))), + max (0, min (0xff, (int) (min_delta + GREEN_FROM_ULONG (*color)))), + max (0, min (0xff, (int) (min_delta + BLUE_FROM_ULONG (*color))))); + } + if (new == *color) new = RGB_TO_ULONG (max (0, min (0xff, (int) (delta + RED_FROM_ULONG (*color)))), max (0, min (0xff, (int) (delta + GREEN_FROM_ULONG (*color)))), @@ -2184,7 +2417,8 @@ x_setup_relief_color (f, relief, factor, delta, default_pixel) /* Allocate new color. */ xgcv.foreground = default_pixel; pixel = background; - if (mac_alloc_lighter_color (f, &pixel, factor, delta)) + if (dpyinfo->n_planes != 1 + && mac_alloc_lighter_color (f, &pixel, factor, delta)) { relief->allocated_p = 1; xgcv.foreground = relief->pixel = pixel; @@ -2214,6 +2448,10 @@ x_setup_relief_colors (s) if (s->face->use_box_color_for_shadows_p) color = s->face->box_color; + else if (s->first_glyph->type == IMAGE_GLYPH + && s->img->pixmap + && !IMAGE_BACKGROUND_TRANSPARENT (s->img, s->f, 0)) + color = IMAGE_BACKGROUND (s->img, s->f, 0); else { XGCValues xgcv; @@ -2247,9 +2485,11 @@ static void x_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width, raised_p, left_p, right_p, clip_rect) struct frame *f; - int left_x, top_y, right_x, bottom_y, left_p, right_p, raised_p; + int left_x, top_y, right_x, bottom_y, width, left_p, right_p, raised_p; Rect *clip_rect; { + Display *dpy = FRAME_MAC_DISPLAY (f); + Window window = FRAME_MAC_WINDOW (f); int i; GC gc; @@ -2257,41 +2497,41 @@ x_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width, gc = f->output_data.mac->white_relief.gc; else gc = f->output_data.mac->black_relief.gc; - mac_set_clip_rectangle (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), clip_rect); + mac_set_clip_rectangle (dpy, window, clip_rect); /* Top. */ for (i = 0; i < width; ++i) - XDrawLine (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), gc, + XDrawLine (dpy, window, gc, left_x + i * left_p, top_y + i, - right_x + 1 - i * right_p, top_y + i); + right_x - i * right_p, top_y + i); /* Left. */ if (left_p) for (i = 0; i < width; ++i) - XDrawLine (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), gc, + XDrawLine (dpy, window, gc, left_x + i, top_y + i, left_x + i, bottom_y - i); - mac_reset_clipping (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f)); + mac_reset_clipping (dpy, window); if (raised_p) gc = f->output_data.mac->black_relief.gc; else gc = f->output_data.mac->white_relief.gc; - mac_set_clip_rectangle (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), + mac_set_clip_rectangle (dpy, window, clip_rect); /* Bottom. */ for (i = 0; i < width; ++i) - XDrawLine (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), gc, + XDrawLine (dpy, window, gc, left_x + i * left_p, bottom_y - i, - right_x + 1 - i * right_p, bottom_y - i); + right_x - i * right_p, bottom_y - i); /* Right. */ if (right_p) for (i = 0; i < width; ++i) - XDrawLine (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), gc, - right_x - i, top_y + i + 1, right_x - i, bottom_y - i); + XDrawLine (dpy, window, gc, + right_x - i, top_y + i + 1, right_x - i, bottom_y - i - 1); - mac_reset_clipping (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f)); + mac_reset_clipping (dpy, window); } @@ -2306,7 +2546,7 @@ static void x_draw_box_rect (s, left_x, top_y, right_x, bottom_y, width, left_p, right_p, clip_rect) struct glyph_string *s; - int left_x, top_y, right_x, bottom_y, left_p, right_p; + int left_x, top_y, right_x, bottom_y, width, left_p, right_p; Rect *clip_rect; { XGCValues xgcv; @@ -2316,21 +2556,21 @@ x_draw_box_rect (s, left_x, top_y, right_x, bottom_y, width, /* Top. */ XFillRectangle (s->display, s->window, &xgcv, - left_x, top_y, right_x - left_x, width); + left_x, top_y, right_x - left_x + 1, width); /* Left. */ if (left_p) XFillRectangle (s->display, s->window, &xgcv, - left_x, top_y, width, bottom_y - top_y); + left_x, top_y, width, bottom_y - top_y + 1); /* Bottom. */ XFillRectangle (s->display, s->window, &xgcv, - left_x, bottom_y - width, right_x - left_x, width); + left_x, bottom_y - width + 1, right_x - left_x + 1, width); /* Right. */ if (right_p) XFillRectangle (s->display, s->window, &xgcv, - right_x - width, top_y, width, bottom_y - top_y); + right_x - width + 1, top_y, width, bottom_y - top_y + 1); mac_reset_clipping (s->display, s->window); } @@ -2365,9 +2605,9 @@ x_draw_glyph_string_box (s) width = abs (s->face->box_line_width); raised_p = s->face->box == FACE_RAISED_BOX; left_x = s->x; - right_x = ((s->row->full_width_p && s->extends_to_end_of_line_p - ? last_x - 1 - : min (last_x, s->x + s->background_width) - 1)); + right_x = (s->row->full_width_p && s->extends_to_end_of_line_p + ? last_x - 1 + : min (last_x, s->x + s->background_width) - 1); top_y = s->y; bottom_y = top_y + s->height - 1; @@ -2418,39 +2658,36 @@ x_draw_image_foreground (s) if (s->img->pixmap) { -#if 0 /* MAC_TODO: image mask */ if (s->img->mask) { - /* We can't set both a clip mask and use XSetClipRectangles - because the latter also sets a clip mask. We also can't - trust on the shape extension to be available - (XShapeCombineRegion). So, compute the rectangle to draw - manually. */ - unsigned long mask = (GCClipMask | GCClipXOrigin | GCClipYOrigin - | GCFunction); - XGCValues xgcv; + Rect nr; XRectangle clip_rect, image_rect, r; - xgcv.clip_mask = s->img->mask; - xgcv.clip_x_origin = x; - xgcv.clip_y_origin = y; - xgcv.function = GXcopy; - XChangeGC (s->display, s->gc, mask, &xgcv); - - get_glyph_string_clip_rect (s, &clip_rect); + get_glyph_string_clip_rect (s, &nr); + CONVERT_TO_XRECT (clip_rect, nr); image_rect.x = x; image_rect.y = y; image_rect.width = s->img->width; image_rect.height = s->img->height; if (x_intersect_rectangles (&clip_rect, &image_rect, &r)) - XCopyArea (s->display, s->img->pixmap, s->window, s->gc, - r.x - x, r.y - y, r.width, r.height, r.x, r.y); + mac_copy_area_with_mask (s->display, s->img->pixmap, s->img->mask, + s->window, s->gc, r.x - x, r.y - y, + r.width, r.height, r.x, r.y); } else -#endif /* MAC_TODO */ { - mac_copy_area (s->display, s->img->pixmap, s->window, s->gc, - 0, 0, s->img->width, s->img->height, x, y); + Rect nr; + XRectangle clip_rect, image_rect, r; + + get_glyph_string_clip_rect (s, &nr); + CONVERT_TO_XRECT (clip_rect, nr); + image_rect.x = x; + image_rect.y = y; + image_rect.width = s->img->width; + image_rect.height = s->img->height; + if (x_intersect_rectangles (&clip_rect, &image_rect, &r)) + mac_copy_area (s->display, s->img->pixmap, s->window, s->gc, + r.x - x, r.y - y, r.width, r.height, r.x, r.y); /* When the image has a mask, we can expect that at least part of a mouse highlight or a block cursor will @@ -2474,7 +2711,6 @@ x_draw_image_foreground (s) } - /* Draw a relief around the image glyph string S. */ static void @@ -2547,30 +2783,12 @@ x_draw_image_foreground_1 (s, pixmap) if (s->img->pixmap) { -#if 0 /* MAC_TODO: image mask */ if (s->img->mask) - { - /* We can't set both a clip mask and use XSetClipRectangles - because the latter also sets a clip mask. We also can't - trust on the shape extension to be available - (XShapeCombineRegion). So, compute the rectangle to draw - manually. */ - unsigned long mask = (GCClipMask | GCClipXOrigin | GCClipYOrigin - | GCFunction); - XGCValues xgcv; - - xgcv.clip_mask = s->img->mask; - xgcv.clip_x_origin = x; - xgcv.clip_y_origin = y; - xgcv.function = GXcopy; - XChangeGC (s->display, s->gc, mask, &xgcv); - - XCopyArea (s->display, s->img->pixmap, pixmap, s->gc, - 0, 0, s->img->width, s->img->height, x, y); - XSetClipMask (s->display, s->gc, None); - } + mac_copy_area_with_mask_to_pixmap (s->display, s->img->pixmap, + s->img->mask, pixmap, s->gc, + 0, 0, s->img->width, s->img->height, + x, y); else -#endif /* MAC_TODO */ { mac_copy_area_to_pixmap (s->display, s->img->pixmap, pixmap, s->gc, 0, 0, s->img->width, s->img->height, x, y); @@ -2585,15 +2803,16 @@ x_draw_image_foreground_1 (s, pixmap) { int r = s->img->relief; if (r < 0) r = -r; - mac_draw_rectangle_to_pixmap (s->display, pixmap, s->gc, x - r, y - r, - s->img->width + r*2 - 1, s->img->height + r*2 - 1); + mac_draw_rectangle (s->display, s->window, s->gc, x - r, y - r, + s->img->width + r*2 - 1, + s->img->height + r*2 - 1); } } } else /* Draw a rectangle if image could not be loaded. */ mac_draw_rectangle_to_pixmap (s->display, pixmap, s->gc, x, y, - s->img->width - 1, s->img->height - 1); + s->img->width - 1, s->img->height - 1); } @@ -2626,7 +2845,7 @@ x_draw_glyph_string_bg_rect (s, x, y, w, h) | s->face->box | | +------------------------- - | | s->img->vmargin + | | s->img->margin | | | | +------------------- | | | the image @@ -2645,6 +2864,7 @@ x_draw_image_glyph_string (s) height = s->height - 2 * box_line_vwidth; + /* Fill background with face under the image. Do it only if row is taller than image or if image has a clip mask to reduce flickering. */ @@ -2652,9 +2872,7 @@ x_draw_image_glyph_string (s) if (height > s->img->height || s->img->hmargin || s->img->vmargin -#if 0 /* TODO: image mask */ || s->img->mask -#endif || s->img->pixmap == 0 || s->width != s->background_width) { @@ -2664,25 +2882,21 @@ x_draw_image_glyph_string (s) x = s->x; y = s->y + box_line_vwidth; -#if 0 /* TODO: image mask */ + if (s->img->mask) { /* Create a pixmap as large as the glyph string. Fill it with the background color. Copy the image to it, using its mask. Copy the temporary pixmap to the display. */ - Screen *screen = FRAME_X_SCREEN (s->f); - int depth = DefaultDepthOfScreen (screen); + int depth = one_mac_display_info.n_planes; /* Create a pixmap as large as the glyph string. */ pixmap = XCreatePixmap (s->display, s->window, s->background_width, s->height, depth); - /* Don't clip in the following because we're working on the - pixmap. */ - XSetClipMask (s->display, s->gc, None); - /* Fill the pixmap with the background color/stipple. */ +#if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ @@ -2692,18 +2906,19 @@ x_draw_image_glyph_string (s) XSetFillStyle (s->display, s->gc, FillSolid); } else +#endif { XGCValues xgcv; XGetGCValues (s->display, s->gc, GCForeground | GCBackground, &xgcv); XSetForeground (s->display, s->gc, xgcv.background); - XFillRectangle (s->display, pixmap, s->gc, - 0, 0, s->background_width, s->height); + mac_fill_rectangle_to_pixmap (s->display, pixmap, s->gc, + 0, 0, s->background_width, + s->height); XSetForeground (s->display, s->gc, xgcv.foreground); } } else -#endif x_draw_glyph_string_bg_rect (s, x, y, s->background_width, height); s->background_filled_p = 1; @@ -2715,7 +2930,7 @@ x_draw_image_glyph_string (s) x_draw_image_foreground_1 (s, pixmap); x_set_glyph_string_clipping (s); mac_copy_area (s->display, pixmap, s->window, s->gc, - 0, 0, s->background_width, s->height, s->x, s->y); + 0, 0, s->background_width, s->height, s->x, s->y); mac_reset_clipping (s->display, s->window); XFreePixmap (s->display, pixmap); } @@ -2752,10 +2967,10 @@ x_draw_stretch_glyph_string (s) /* Clear rest using the GC of the original non-cursor face. */ if (width < s->background_width) { - GC gc = s->face->gc; int x = s->x + width, y = s->y; int w = s->background_width - width, h = s->height; Rect r; + GC gc; if (s->row->mouse_face_p && cursor_in_mouse_face_p (s->w)) @@ -2815,7 +3030,6 @@ x_draw_glyph_string (s) x_set_glyph_string_gc (s->next); x_set_glyph_string_clipping (s->next); x_draw_glyph_string_background (s->next, 1); - } /* Set up S->gc, set clipping and draw S. */ @@ -2852,7 +3066,7 @@ x_draw_glyph_string (s) if (s->for_overlaps_p) s->background_filled_p = 1; else - x_draw_glyph_string_background (s, 0); + x_draw_glyph_string_background (s, 0); x_draw_glyph_string_foreground (s); break; @@ -2929,9 +3143,9 @@ x_draw_glyph_string (s) } } - /* Draw relief. */ + /* Draw relief if not yet drawn. */ if (!relief_drawn_p && s->face->box != FACE_NO_BOX) - x_draw_glyph_string_box (s); + x_draw_glyph_string_box (s); } /* Reset clipping. */ @@ -2951,7 +3165,6 @@ mac_shift_glyphs_for_insert (f, x, y, width, height, shift_by) x + shift_by, y); } - /* Delete N glyphs at the nominal cursor position. Not implemented for X frames. */ @@ -3006,6 +3219,7 @@ x_clear_frame () #if defined (HAVE_TIMEVAL) && defined (HAVE_SELECT) + /* Subtract the `struct timeval' values X and Y, storing the result in *RESULT. Return 1 if the difference is negative, otherwise 0. */ @@ -3109,7 +3323,7 @@ XTring_bell () This, and those operations, are used only within an update that is bounded by calls to x_update_begin and x_update_end. */ -void +static void XTset_terminal_window (n) register int n; { @@ -3145,7 +3359,7 @@ x_scroll_run (w, run) /* Get frame-relative bounding box of the text display area of W, without mode lines. Include in this box the left and right - fringes of W. */ + fringe of W. */ window_box (w, -1, &x, &y, &width, &height); from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); @@ -3267,8 +3481,6 @@ static void XTframe_rehighlight (frame) struct frame *frame; { - - x_frame_rehighlight (FRAME_X_DISPLAY_INFO (frame)); } @@ -4409,13 +4621,6 @@ x_draw_hollow_cursor (w, row) struct glyph *cursor_glyph; GC gc; - /* Compute frame-relative coordinates from window-relative - coordinates. */ - x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); - y = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y) - + row->ascent - w->phys_cursor_ascent); - h = row->height - 1; - /* Get the glyph the cursor is on. If we can't tell because the current matrix is invalid or such, give up. */ cursor_glyph = get_phys_cursor_glyph (w); @@ -4430,6 +4635,20 @@ x_draw_hollow_cursor (w, row) if (cursor_glyph->type == STRETCH_GLYPH && !x_stretch_cursor_p) wd = min (FRAME_COLUMN_WIDTH (f), wd); + w->phys_cursor_width = wd; + + /* Compute frame-relative coordinates from window-relative + coordinates. */ + x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); + y = WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y); + + /* Compute the proper height and ascent of the rectangle, based + on the actual glyph. Using the full height of the row looks + bad when there are tall images on that row. */ + h = max (FRAME_LINE_HEIGHT (f), cursor_glyph->ascent + cursor_glyph->descent); + if (h < row->height) + y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h; + h--; /* The foreground of cursor_gc is typically the same as the normal background color, which can cause the cursor box to be invisible. */ @@ -4456,35 +4675,49 @@ x_draw_hollow_cursor (w, row) --gerd. */ static void -x_draw_bar_cursor (w, row, width) +x_draw_bar_cursor (w, row, width, kind) struct window *w; struct glyph_row *row; int width; + enum text_cursor_kinds kind; { - /* If cursor hpos is out of bounds, don't draw garbage. This can - happen in mini-buffer windows when switching between echo area - glyphs and mini-buffer. */ - if (w->phys_cursor.hpos < row->used[TEXT_AREA]) + struct frame *f = XFRAME (w->frame); + struct glyph *cursor_glyph; + + /* If cursor is out of bounds, don't draw garbage. This can happen + in mini-buffer windows when switching between echo area glyphs + and mini-buffer. */ + cursor_glyph = get_phys_cursor_glyph (w); + if (cursor_glyph == NULL) + return; + + /* If on an image, draw like a normal cursor. That's usually better + visible than drawing a bar, esp. if the image is large so that + the bar might not be in the window. */ + if (cursor_glyph->type == IMAGE_GLYPH) { - struct frame *f = XFRAME (w->frame); - struct glyph *cursor_glyph; - GC gc; - int x; - unsigned long mask; + struct glyph_row *row; + row = MATRIX_ROW (w->current_matrix, w->phys_cursor.vpos); + draw_phys_cursor_glyph (w, row, DRAW_CURSOR); + } + else + { + Display *dpy = FRAME_MAC_DISPLAY (f); + Window window = FRAME_MAC_WINDOW (f); + GC gc = FRAME_MAC_DISPLAY_INFO (f)->scratch_cursor_gc; + unsigned long mask = GCForeground | GCBackground; + struct face *face = FACE_FROM_ID (f, cursor_glyph->face_id); XGCValues xgcv; - Display *dpy; - Window window; - cursor_glyph = get_phys_cursor_glyph (w); - if (cursor_glyph == NULL) - return; - - xgcv.background = f->output_data.mac->cursor_pixel; - xgcv.foreground = f->output_data.mac->cursor_pixel; - mask = GCForeground | GCBackground; - dpy = FRAME_MAC_DISPLAY (f); - window = FRAME_MAC_WINDOW (f); - gc = FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc; + /* If the glyph's background equals the color we normally draw + the bar cursor in, the bar cursor in its normal color is + invisible. Use the glyph's foreground color instead in this + case, on the assumption that the glyph's colors are chosen so + that the glyph is legible. */ + if (face->background == f->output_data.mac->cursor_pixel) + xgcv.background = xgcv.foreground = face->foreground; + else + xgcv.background = xgcv.foreground = f->output_data.mac->cursor_pixel; if (gc) XChangeGC (dpy, gc, mask, &xgcv); @@ -4496,14 +4729,24 @@ x_draw_bar_cursor (w, row, width) if (width < 0) width = FRAME_CURSOR_WIDTH (f); + width = min (cursor_glyph->pixel_width, width); - x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); + w->phys_cursor_width = width; x_clip_to_row (w, row, gc); - XFillRectangle (dpy, window, gc, - x, - WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), - min (cursor_glyph->pixel_width, width), - row->height); + + if (kind == BAR_CURSOR) + XFillRectangle (dpy, window, gc, + WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x), + WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), + width, row->height); + else + XFillRectangle (dpy, window, gc, + WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x), + WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y + + row->height - width), + cursor_glyph->pixel_width, + width); + mac_reset_clipping (dpy, FRAME_MAC_WINDOW (f)); } } @@ -4545,9 +4788,15 @@ mac_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, act if (on_p) { w->phys_cursor_type = cursor_type; - w->phys_cursor_width = cursor_width; w->phys_cursor_on_p = 1; + if (glyph_row->exact_window_width_line_p + && w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA]) + { + glyph_row->cursor_in_fringe_p = 1; + draw_fringe_bitmap (w, glyph_row, 0); + } + else switch (cursor_type) { case HOLLOW_BOX_CURSOR: @@ -4558,13 +4807,16 @@ mac_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, act draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR); break; - case HBAR_CURSOR: - /* TODO. For now, just draw bar cursor. */ case BAR_CURSOR: - x_draw_bar_cursor (w, glyph_row, cursor_width); + x_draw_bar_cursor (w, glyph_row, cursor_width, BAR_CURSOR); + break; + + case HBAR_CURSOR: + x_draw_bar_cursor (w, glyph_row, cursor_width, HBAR_CURSOR); break; case NO_CURSOR: + w->phys_cursor_width = 0; break; default: @@ -5089,6 +5341,8 @@ x_make_frame_visible (f) FRAME_SAMPLE_VISIBILITY (f); } } +#else + UNBLOCK_INPUT; #endif /* MAC_TODO */ } @@ -5145,10 +5399,10 @@ x_iconify_frame (f) } -/* Destroy the X window of frame F. */ +/* Free X resources of frame F. */ void -x_destroy_window (f) +x_free_frame_resources (f) struct frame *f; { struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f); @@ -5158,10 +5412,15 @@ x_destroy_window (f) DisposeWindow (FRAME_MAC_WINDOW (f)); free_frame_menubar (f); - free_frame_faces (f); + + if (FRAME_FACE_CACHE (f)) + free_frame_faces (f); + + x_free_gcs (f); xfree (f->output_data.mac); - f->output_data.mac = 0; + f->output_data.mac = NULL; + if (f == dpyinfo->x_focus_frame) dpyinfo->x_focus_frame = 0; if (f == dpyinfo->x_focus_event_frame) @@ -5169,8 +5428,6 @@ x_destroy_window (f) if (f == dpyinfo->x_highlight_frame) dpyinfo->x_highlight_frame = 0; - dpyinfo->reference_count--; - if (f == dpyinfo->mouse_face_mouse_frame) { dpyinfo->mouse_face_beg_row @@ -5184,6 +5441,21 @@ x_destroy_window (f) UNBLOCK_INPUT; } + + +/* Destroy the X window of frame F. */ + +void +x_destroy_window (f) + struct frame *f; +{ + struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f); + + x_free_frame_resources (f); + + dpyinfo->reference_count--; +} + /* Setting window manager hints. */ @@ -5450,6 +5722,7 @@ char **font_name_table = NULL; int font_name_table_size = 0; int font_name_count = 0; +#if 0 /* compare two strings ignoring case */ static int stricmp (const char *s, const char *t) @@ -5529,13 +5802,53 @@ mac_font_match (char *mf, char *xf) && wildstrieq (m_charset, x_charset)) || mac_font_pattern_match (mf, xf); } +#endif + +static Lisp_Object Qbig5, Qcn_gb, Qsjis, Qeuc_kr; + +static void +decode_mac_font_name (char *name, int size, short scriptcode) +{ + Lisp_Object coding_system; + struct coding_system coding; + char *buf; + + switch (scriptcode) + { + case smTradChinese: + coding_system = Qbig5; + break; + case smSimpChinese: + coding_system = Qcn_gb; + break; + case smJapanese: + coding_system = Qsjis; + break; + case smKorean: + coding_system = Qeuc_kr; + break; + default: + return; + } + + setup_coding_system (coding_system, &coding); + coding.src_multibyte = 0; + coding.dst_multibyte = 1; + coding.mode |= CODING_MODE_LAST_BLOCK; + coding.composing = COMPOSITION_DISABLED; + buf = (char *) alloca (size); + + decode_coding (&coding, name, buf, strlen (name), size - 1); + bcopy (buf, name, coding.produced); + name[coding.produced] = '\0'; +} static char * mac_to_x_fontname (char *name, int size, Style style, short scriptcode) { char foundry[32], family[32], cs[32]; - char xf[255], *result, *p; + char xf[256], *result, *p; if (sscanf (name, "%31[^-]-%31[^-]-%31s", foundry, family, cs) != 3) { @@ -5594,6 +5907,8 @@ static void x_font_name_to_mac_font_name (char *xf, char *mf) { char foundry[32], family[32], weight[20], slant[2], cs[32]; + Lisp_Object coding_system = Qnil; + struct coding_system coding; strcpy (mf, ""); @@ -5603,13 +5918,29 @@ x_font_name_to_mac_font_name (char *xf, char *mf) foundry, family, weight, slant, cs) != 5) return; - if (strcmp (cs, "big5-0") == 0 || strcmp (cs, "gb2312.1980-0") == 0 - || strcmp (cs, "jisx0208.1983-sjis") == 0 - || strcmp (cs, "jisx0201.1976-0") == 0 - || strcmp (cs, "ksc5601.1989-0") == 0 || strcmp (cs, "mac-roman") == 0) - strcpy(mf, family); + if (strcmp (cs, "big5-0") == 0) + coding_system = Qbig5; + else if (strcmp (cs, "gb2312.1980-0") == 0) + coding_system = Qcn_gb; + else if (strcmp (cs, "jisx0208.1983-sjis") == 0 + || strcmp (cs, "jisx0201.1976-0") == 0) + coding_system = Qsjis; + else if (strcmp (cs, "ksc5601.1989-0") == 0) + coding_system = Qeuc_kr; + else if (strcmp (cs, "mac-roman") == 0) + strcpy (mf, family); else - sprintf(mf, "%s-%s-%s", foundry, family, cs); + sprintf (mf, "%s-%s-%s", foundry, family, cs); + + if (!NILP (coding_system)) + { + setup_coding_system (coding_system, &coding); + coding.src_multibyte = 1; + coding.dst_multibyte = 1; + coding.mode |= CODING_MODE_LAST_BLOCK; + encode_coding (&coding, family, mf, strlen (family), sizeof (Str32) - 1); + mf[coding.produced] = '\0'; + } } @@ -5673,36 +6004,45 @@ init_font_name_table () if (FMGetFontFamilyName (ff, name) != noErr) break; p2cstr (name); + if (*name == '.') + continue; sc = FontToScript (ff); + decode_mac_font_name (name, sizeof (name), sc); /* Point the instance iterator at the current font family. */ - if (FMResetFontFamilyInstanceIterator(ff, &ffii) != noErr) + if (FMResetFontFamilyInstanceIterator (ff, &ffii) != noErr) break; while (FMGetNextFontFamilyInstance (&ffii, &font, &style, &size) == noErr) - if (size == 0) - { - add_font_name_table_entry (mac_to_x_fontname (name, size, - style, sc)); - add_font_name_table_entry (mac_to_x_fontname (name, size, - italic, sc)); - add_font_name_table_entry (mac_to_x_fontname (name, size, - bold, sc)); - add_font_name_table_entry (mac_to_x_fontname (name, size, - italic | bold, - sc)); - } - else - { + { + /* Both jisx0208.1983-sjis and jisx0201.1976-0 parts are + contained in Apple Japanese (SJIS) font. */ + again: + if (size == 0) + { + add_font_name_table_entry (mac_to_x_fontname (name, size, + style, sc)); + add_font_name_table_entry (mac_to_x_fontname (name, size, + italic, sc)); + add_font_name_table_entry (mac_to_x_fontname (name, size, + bold, sc)); + add_font_name_table_entry (mac_to_x_fontname (name, size, + italic | bold, + sc)); + } + else add_font_name_table_entry (mac_to_x_fontname (name, size, style, sc)); - if (smJapanese == sc) - add_font_name_table_entry (mac_to_x_fontname (name, size, - style, - -smJapanese)); - } + if (sc == smJapanese) + { + sc = -smJapanese; + goto again; + } + else if (sc == -smJapanese) + sc = smJapanese; + } } /* Dispose of the iterators. */ @@ -5744,6 +6084,7 @@ init_font_name_table () TextFont (fontnum); scriptcode = FontToScript (fontnum); + decode_mac_font_name (name, sizeof (name), scriptcode); do { HLock (font_handle); @@ -5778,9 +6119,9 @@ init_font_name_table () assc_entry->fontSize, assc_entry->fontStyle, scriptcode); - /* Both jisx0208.1983-sjis and - jisx0201.1976-sjis parts are contained in - Apple Japanese (SJIS) font. */ + /* Both jisx0208.1983-sjis and jisx0201.1976-0 + parts are contained in Apple Japanese (SJIS) + font. */ if (smJapanese == scriptcode) { font_name_table[font_name_count++] @@ -5807,6 +6148,145 @@ init_font_name_table () } +enum xlfd_scalable_field_index + { + XLFD_SCL_PIXEL_SIZE, + XLFD_SCL_POINT_SIZE, + XLFD_SCL_AVGWIDTH, + XLFD_SCL_LAST + }; + +static int xlfd_scalable_fields[] = + { + 6, /* PIXEL_SIZE */ + 7, /* POINT_SIZE */ + 11, /* AVGWIDTH */ + -1 + }; + +static Lisp_Object +mac_do_list_fonts (pattern, maxnames) + char *pattern; + int maxnames; +{ + int i, n_fonts = 0; + Lisp_Object font_list = Qnil, pattern_regex, fontname; + char *regex = (char *) alloca (strlen (pattern) * 2 + 3); + char scaled[256]; + char *ptr; + int scl_val[XLFD_SCL_LAST], *field, *val; + + for (i = 0; i < XLFD_SCL_LAST; i++) + scl_val[i] = -1; + + /* If the pattern contains 14 dashes and one of PIXEL_SIZE, + POINT_SIZE, and AVGWIDTH fields is explicitly specified, scalable + fonts are scaled according to the specified size. */ + ptr = pattern; + i = 0; + field = xlfd_scalable_fields; + val = scl_val; + if (*ptr == '-') + do + { + ptr++; + if (i == *field) + { + if ('1' <= *ptr && *ptr <= '9') + { + *val = *ptr++ - '0'; + while ('0' <= *ptr && *ptr <= '9' && *val < 10000) + *val = *val * 10 + *ptr++ - '0'; + if (*ptr != '-') + *val = -1; + } + field++; + val++; + } + ptr = strchr (ptr, '-'); + i++; + } + while (ptr && i < 14); + + if (i == 14 && ptr == NULL) + { + if (scl_val[XLFD_SCL_POINT_SIZE] > 0) + { + scl_val[XLFD_SCL_PIXEL_SIZE] = scl_val[XLFD_SCL_POINT_SIZE] / 10; + scl_val[XLFD_SCL_AVGWIDTH] = scl_val[XLFD_SCL_POINT_SIZE]; + } + else if (scl_val[XLFD_SCL_PIXEL_SIZE] > 0) + { + scl_val[XLFD_SCL_POINT_SIZE] = + scl_val[XLFD_SCL_AVGWIDTH] = scl_val[XLFD_SCL_PIXEL_SIZE] * 10; + } + else if (scl_val[XLFD_SCL_AVGWIDTH] > 0) + { + scl_val[XLFD_SCL_PIXEL_SIZE] = scl_val[XLFD_SCL_AVGWIDTH] / 10; + scl_val[XLFD_SCL_POINT_SIZE] = scl_val[XLFD_SCL_AVGWIDTH]; + } + } + else + scl_val[XLFD_SCL_PIXEL_SIZE] = -1; + + ptr = regex; + *ptr++ = '^'; + + /* Turn pattern into a regexp and do a regexp match. */ + for (; *pattern; pattern++) + { + if (*pattern == '?') + *ptr++ = '.'; + else if (*pattern == '*') + { + *ptr++ = '.'; + *ptr++ = '*'; + } + else + *ptr++ = tolower (*pattern); + } + *ptr = '$'; + *(ptr + 1) = '\0'; + + pattern_regex = build_string (regex); + + for (i = 0; i < font_name_count; i++) + { + fontname = build_string (font_name_table[i]); + if (fast_string_match (pattern_regex, fontname) >= 0) + { + font_list = Fcons (fontname, font_list); + + n_fonts++; + if (maxnames > 0 && n_fonts >= maxnames) + break; + } + else if (scl_val[XLFD_SCL_PIXEL_SIZE] > 0 + && (ptr = strstr (font_name_table[i], "-0-0-75-75-m-0-"))) + { + int former_len = ptr - font_name_table[i]; + + memcpy (scaled, font_name_table[i], former_len); + sprintf (scaled + former_len, + "-%d-%d-75-75-m-%d-%s", + scl_val[XLFD_SCL_PIXEL_SIZE], + scl_val[XLFD_SCL_POINT_SIZE], + scl_val[XLFD_SCL_AVGWIDTH], + ptr + sizeof ("-0-0-75-75-m-0-") - 1); + fontname = build_string (scaled); + if (fast_string_match (pattern_regex, fontname) >= 0) + { + font_list = Fcons (fontname, font_list); + + n_fonts++; + if (maxnames > 0 && n_fonts >= maxnames) + break; + } + } + } + return font_list; +} + /* Return a list of at most MAXNAMES font specs matching the one in PATTERN. Cache matching fonts for patterns in dpyinfo->name_list_element to avoid looking them up again by @@ -5819,11 +6299,7 @@ x_list_fonts (struct frame *f, int size, int maxnames) { - char *ptnstr; Lisp_Object newlist = Qnil, tem, key; - int n_fonts = 0; - int i; - struct gcpro gcpro1, gcpro2; struct mac_display_info *dpyinfo = f ? FRAME_MAC_DISPLAY_INFO (f) : NULL; if (font_name_table == NULL) /* Initialize when first used. */ @@ -5842,27 +6318,10 @@ x_list_fonts (struct frame *f, } } - ptnstr = SDATA (pattern); - - GCPRO2 (pattern, newlist); - - /* Scan and matching bitmap fonts. */ - for (i = 0; i < font_name_count; i++) - { - if (mac_font_pattern_match (font_name_table[i], ptnstr)) - { - newlist = Fcons (build_string (font_name_table[i]), newlist); - - n_fonts++; - if (maxnames > 0 && n_fonts >= maxnames) - break; - } - } + newlist = mac_do_list_fonts (SDATA (pattern), maxnames); /* MAC_TODO: add code for matching outline fonts here */ - UNGCPRO; - if (dpyinfo) { XSETCDR (dpyinfo->name_list_element, @@ -6022,14 +6481,12 @@ XLoadQueryFont (Display *dpy, char *fontname) name = fontname; else { - for (i = 0; i < font_name_count; i++) - if (mac_font_pattern_match (font_name_table[i], fontname)) - break; + Lisp_Object matched_fonts; - if (i >= font_name_count) - return NULL; - - name = font_name_table[i]; + matched_fonts = mac_do_list_fonts (fontname, 1); + if (NILP (matched_fonts)) + return NULL; + name = SDATA (XCAR (matched_fonts)); } GetPort (&port); /* save the current font number used */ @@ -6151,7 +6608,8 @@ XLoadQueryFont (Display *dpy, char *fontname) for (c = 0x20; c <= 0xff; c++) { font->per_char[c - 0x20] = font->max_bounds; - font->per_char[c - 0x20].width = CharWidth (c); + font->per_char[c - 0x20].width = + font->per_char[c - 0x20].rbearing = CharWidth (c); } } } @@ -6240,6 +6698,7 @@ x_load_font (f, fontname, size) /* Now fill in the slots of *FONTP. */ BLOCK_INPUT; + bzero (fontp, sizeof (*fontp)); fontp->font = font; fontp->font_idx = i; fontp->name = (char *) xmalloc (strlen (font->fontname) + 1); @@ -6373,81 +6832,6 @@ x_find_ccl_program (fontp) -/*********************************************************************** - Initialization - ***********************************************************************/ - -#ifdef USE_X_TOOLKIT -static XrmOptionDescRec emacs_options[] = { - {"-geometry", ".geometry", XrmoptionSepArg, NULL}, - {"-iconic", ".iconic", XrmoptionNoArg, (XtPointer) "yes"}, - - {"-internal-border-width", "*EmacsScreen.internalBorderWidth", - XrmoptionSepArg, NULL}, - {"-ib", "*EmacsScreen.internalBorderWidth", XrmoptionSepArg, NULL}, - - {"-T", "*EmacsShell.title", XrmoptionSepArg, (XtPointer) NULL}, - {"-wn", "*EmacsShell.title", XrmoptionSepArg, (XtPointer) NULL}, - {"-title", "*EmacsShell.title", XrmoptionSepArg, (XtPointer) NULL}, - {"-iconname", "*EmacsShell.iconName", XrmoptionSepArg, (XtPointer) NULL}, - {"-in", "*EmacsShell.iconName", XrmoptionSepArg, (XtPointer) NULL}, - {"-mc", "*pointerColor", XrmoptionSepArg, (XtPointer) NULL}, - {"-cr", "*cursorColor", XrmoptionSepArg, (XtPointer) NULL} -}; -#endif /* USE_X_TOOLKIT */ - -static int x_initialized; - -#ifdef MULTI_KBOARD -/* Test whether two display-name strings agree up to the dot that separates - the screen number from the server number. */ -static int -same_x_server (name1, name2) - char *name1, *name2; -{ - int seen_colon = 0; - unsigned char *system_name = SDATA (Vsystem_name); - int system_name_length = strlen (system_name); - int length_until_period = 0; - - while (system_name[length_until_period] != 0 - && system_name[length_until_period] != '.') - length_until_period++; - - /* Treat `unix' like an empty host name. */ - if (! strncmp (name1, "unix:", 5)) - name1 += 4; - if (! strncmp (name2, "unix:", 5)) - name2 += 4; - /* Treat this host's name like an empty host name. */ - if (! strncmp (name1, system_name, system_name_length) - && name1[system_name_length] == ':') - name1 += system_name_length; - if (! strncmp (name2, system_name, system_name_length) - && name2[system_name_length] == ':') - name2 += system_name_length; - /* Treat this host's domainless name like an empty host name. */ - if (! strncmp (name1, system_name, length_until_period) - && name1[length_until_period] == ':') - name1 += length_until_period; - if (! strncmp (name2, system_name, length_until_period) - && name2[length_until_period] == ':') - name2 += length_until_period; - - for (; *name1 != '\0' && *name1 == *name2; name1++, name2++) - { - if (*name1 == ':') - seen_colon++; - if (seen_colon && *name1 == '.') - return 1; - } - return (seen_colon - && (*name1 == '.' || *name1 == '\0') - && (*name2 == '.' || *name2 == '\0')); -} -#endif - - /* The Mac Event loop code */ #ifndef MAC_OSX @@ -6509,12 +6893,19 @@ static long app_sleep_time = WNE_SLEEP_AT_RESUME; Boolean terminate_flag = false; +/* Contains the string "reverse", which is a constant for mouse button emu.*/ +Lisp_Object Qreverse; + /* True if using command key as meta key. */ Lisp_Object Vmac_command_key_is_meta; /* True if the ctrl and meta keys should be reversed. */ Lisp_Object Vmac_reverse_ctrl_meta; +/* True if the option and command modifiers should be used to emulate + a three button mouse */ +Lisp_Object Vmac_emulate_three_button_mouse; + #if USE_CARBON_EVENTS /* True if the mouse wheel button (i.e. button 4) should map to mouse-2, instead of mouse-3. */ @@ -6587,6 +6978,20 @@ mac_to_emacs_modifiers (EventModifiers mods) return result; } +static int +mac_get_emulated_btn ( UInt32 modifiers ) +{ + int result = 0; + if (Vmac_emulate_three_button_mouse != Qnil) { + int cmdIs3 = (Vmac_emulate_three_button_mouse != Qreverse); + if (modifiers & controlKey) + result = cmdIs3 ? 2 : 1; + else if (modifiers & optionKey) + result = cmdIs3 ? 1 : 2; + } + return result; +} + #if USE_CARBON_EVENTS /* Obtains the event modifiers from the event ref and then calls mac_to_emacs_modifiers. */ @@ -6596,6 +7001,11 @@ mac_event_to_emacs_modifiers (EventRef eventRef) UInt32 mods = 0; GetEventParameter (eventRef, kEventParamKeyModifiers, typeUInt32, NULL, sizeof (UInt32), NULL, &mods); + if (Vmac_emulate_three_button_mouse != Qnil && + GetEventClass(eventRef) == kEventClassMouse) + { + mods &= ~(optionKey & cmdKey); + } return mac_to_emacs_modifiers (mods); } @@ -6610,7 +7020,14 @@ mac_get_mouse_btn (EventRef ref) switch (result) { case kEventMouseButtonPrimary: - return 0; + if (Vmac_emulate_three_button_mouse == Qnil) + return 0; + else { + UInt32 mods = 0; + GetEventParameter (ref, kEventParamKeyModifiers, typeUInt32, NULL, + sizeof (UInt32), NULL, &mods); + return mac_get_emulated_btn(mods); + } case kEventMouseButtonSecondary: return NILP (Vmac_wheel_button_is_mouse_2) ? 1 : 2; case kEventMouseButtonTertiary: @@ -6719,8 +7136,8 @@ do_check_ram_size (void) if (Gestalt (gestaltPhysicalRAMSize, &physical_ram_size) != noErr || Gestalt (gestaltLogicalRAMSize, &logical_ram_size) != noErr - || physical_ram_size > 256 * 1024 * 1024 - || logical_ram_size > 256 * 1024 * 1024) + || physical_ram_size > (1 << VALBITS) + || logical_ram_size > (1 << VALBITS)) { StopAlert (RAM_TOO_LARGE_ALERT_ID, NULL); exit (1); @@ -7519,7 +7936,9 @@ main (void) do_get_menus (); +#ifndef USE_LSB_TAG do_check_ram_size (); +#endif init_emacs_passwd_dir (); @@ -7597,8 +8016,9 @@ keycode_to_xkeysym (int keyCode, int *xKeySym) /* Emacs calls this whenever it wants to read an input event from the user. */ int -XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) +XTread_socket (int sd, int expected, struct input_event *hold_quit) { + struct input_event inev; int count = 0; #if USE_CARBON_EVENTS OSStatus rneResult; @@ -7623,9 +8043,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) /* So people can tell when we have read the available input. */ input_signal_count++; - if (numchars <= 0) - abort (); - /* Don't poll for events to process (specifically updateEvt) if window update currently already in progress. A call to redisplay (in do_window_update) can be preempted by another call to @@ -7644,7 +8061,9 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) event to nil because keyboard.c protects incompletely processed event from being garbage collected by placing them in the kbd_buffer_gcpro vector. */ - bufp->arg = Qnil; + EVENT_INIT (inev); + inev.kind = NO_EVENT; + inev.arg = Qnil; event_mask = everyEvent; if (NILP (Fboundp (Qmac_ready_for_drag_n_drop))) @@ -7682,18 +8101,17 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) GetEventParameter(eventRef, kEventParamMouseLocation, typeQDPoint, NULL, sizeof (Point), NULL, &point); - bufp->kind = WHEEL_EVENT; - bufp->code = 0; - bufp->modifiers = (mac_event_to_emacs_modifiers(eventRef) - | ((delta < 0) ? down_modifier - : up_modifier)); + inev.kind = WHEEL_EVENT; + inev.code = 0; + inev.modifiers = (mac_event_to_emacs_modifiers(eventRef) + | ((delta < 0) ? down_modifier + : up_modifier)); SetPort (GetWindowPort (window_ptr)); GlobalToLocal (&point); - XSETINT (bufp->x, point.h); - XSETINT (bufp->y, point.v); - XSETFRAME (bufp->frame_or_window, mwp->mFP); - bufp->timestamp = EventTimeToTicks (GetEventTime (eventRef))*(1000/60); - count++; + XSETINT (inev.x, point.h); + XSETINT (inev.y, point.v); + XSETFRAME (inev.frame_or_window, mwp->mFP); + inev.timestamp = EventTimeToTicks (GetEventTime (eventRef))*(1000/60); } else SendEventToEventTarget (eventRef, GetEventDispatcherTarget ()); @@ -7742,28 +8160,27 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) GlobalToLocal (&mouse_loc); #if USE_CARBON_EVENTS - bufp->code = mac_get_mouse_btn (eventRef); + inev.code = mac_get_mouse_btn (eventRef); #else - bufp->code = 0; /* only one mouse button */ + inev.code = mac_get_emulate_btn (er.modifiers); #endif - bufp->kind = SCROLL_BAR_CLICK_EVENT; - bufp->frame_or_window = tracked_scroll_bar->window; - bufp->part = scroll_bar_handle; + inev.kind = SCROLL_BAR_CLICK_EVENT; + inev.frame_or_window = tracked_scroll_bar->window; + inev.part = scroll_bar_handle; #if USE_CARBON_EVENTS - bufp->modifiers = mac_event_to_emacs_modifiers (eventRef); + inev.modifiers = mac_event_to_emacs_modifiers (eventRef); #else - bufp->modifiers = mac_to_emacs_modifiers (er.modifiers); + inev.modifiers = mac_to_emacs_modifiers (er.modifiers); #endif - bufp->modifiers |= up_modifier; - bufp->timestamp = er.when * (1000 / 60); + inev.modifiers |= up_modifier; + inev.timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ - XSETINT (bufp->x, tracked_scroll_bar->left + 2); - XSETINT (bufp->y, mouse_loc.v - 24); + XSETINT (inev.x, tracked_scroll_bar->left + 2); + XSETINT (inev.y, mouse_loc.v - 24); tracked_scroll_bar->dragging = Qnil; mouse_tracking_in_progress = mouse_tracking_none; tracked_scroll_bar = NULL; - count++; break; } @@ -7772,14 +8189,14 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) switch (part_code) { case inMenuBar: - { - struct frame *f = ((mac_output *) - GetWRefCon (FrontWindow ()))->mFP; - saved_menu_event_location = er.where; - bufp->kind = MENU_BAR_ACTIVATE_EVENT; - XSETFRAME (bufp->frame_or_window, f); - count++; - } + if (er.what == mouseDown) + { + struct frame *f = ((mac_output *) + GetWRefCon (FrontWindow ()))->mFP; + saved_menu_event_location = er.where; + inev.kind = MENU_BAR_ACTIVATE_EVENT; + XSETFRAME (inev.frame_or_window, f); + } break; case inContent: @@ -7809,13 +8226,13 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) #endif #if USE_CARBON_EVENTS - bufp->code = mac_get_mouse_btn (eventRef); + inev.code = mac_get_mouse_btn (eventRef); #else - bufp->code = 0; /* only one mouse button */ + inev.code = mac_get_emulate_btn (er.modifiers); #endif - XSETINT (bufp->x, mouse_loc.h); - XSETINT (bufp->y, mouse_loc.v); - bufp->timestamp = er.when * (1000 / 60); + XSETINT (inev.x, mouse_loc.h); + XSETINT (inev.y, mouse_loc.v); + inev.timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ #if TARGET_API_MAC_CARBON @@ -7827,7 +8244,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) struct scroll_bar *bar = (struct scroll_bar *) GetControlReference (ch); x_scroll_bar_handle_click (bar, control_part_code, &er, - bufp); + &inev); if (er.what == mouseDown && control_part_code == kControlIndicatorPart) { @@ -7843,43 +8260,61 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) } else { - bufp->kind = MOUSE_CLICK_EVENT; - XSETFRAME (bufp->frame_or_window, mwp->mFP); + Lisp_Object window; + + XSETFRAME (inev.frame_or_window, mwp->mFP); if (er.what == mouseDown) - mouse_tracking_in_progress + mouse_tracking_in_progress = mouse_tracking_mouse_movement; else - mouse_tracking_in_progress = mouse_tracking_none; - } + mouse_tracking_in_progress = mouse_tracking_none; + window = window_from_coordinates (mwp->mFP, inev.x, inev.y, 0, 0, 0, 1); + + if (EQ (window, mwp->mFP->tool_bar_window)) + { + if (er.what == mouseDown) + handle_tool_bar_click (mwp->mFP, inev.x, inev.y, 1, 0); + else + handle_tool_bar_click (mwp->mFP, inev.x, inev.y, 0, +#if USE_CARBON_EVENTS + mac_event_to_emacs_modifiers (eventRef) +#else + er.modifiers +#endif + ); + break; + } + else + inev.kind = MOUSE_CLICK_EVENT; + } #if USE_CARBON_EVENTS - bufp->modifiers = mac_event_to_emacs_modifiers (eventRef); + inev.modifiers = mac_event_to_emacs_modifiers (eventRef); #else - bufp->modifiers = mac_to_emacs_modifiers (er.modifiers); + inev.modifiers = mac_to_emacs_modifiers (er.modifiers); #endif switch (er.what) { case mouseDown: - bufp->modifiers |= down_modifier; + inev.modifiers |= down_modifier; break; case mouseUp: - bufp->modifiers |= up_modifier; + inev.modifiers |= up_modifier; break; } - - count++; } break; case inDrag: #if TARGET_API_MAC_CARBON - { - BitMap bm; - - GetQDGlobalsScreenBits (&bm); - DragWindow (window_ptr, er.where, &bm.bounds); - } + if (er.what == mouseDown) + { + BitMap bm; + + GetQDGlobalsScreenBits (&bm); + DragWindow (window_ptr, er.where, &bm.bounds); + } #else /* not TARGET_API_MAC_CARBON */ DragWindow (window_ptr, er.where, &qd.screenBits.bounds); #endif /* not TARGET_API_MAC_CARBON */ @@ -7888,17 +8323,19 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) case inGoAway: if (TrackGoAway (window_ptr, er.where)) { - bufp->kind = DELETE_WINDOW_EVENT; - XSETFRAME (bufp->frame_or_window, + inev.kind = DELETE_WINDOW_EVENT; + XSETFRAME (inev.frame_or_window, ((mac_output *) GetWRefCon (window_ptr))->mFP); - count++; } break; /* window resize handling added --ben */ case inGrow: - do_grow_window(window_ptr, &er); - break; + if (er.what == mouseDown) + { + do_grow_window(window_ptr, &er); + break; + } /* window zoom handling added --ben */ case inZoomIn: @@ -7957,8 +8394,8 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) if (keycode_to_xkeysym (keycode, &xkeysym)) { - bufp->code = 0xff00 | xkeysym; - bufp->kind = NON_ASCII_KEYSTROKE_EVENT; + inev.code = 0xff00 | xkeysym; + inev.kind = NON_ASCII_KEYSTROKE_EVENT; } else { @@ -7977,12 +8414,12 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) int new_keycode = keycode | new_modifiers; Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache); unsigned long some_state = 0; - bufp->code = KeyTranslate (kchr_ptr, new_keycode, - &some_state) & 0xff; + inev.code = KeyTranslate (kchr_ptr, new_keycode, + &some_state) & 0xff; } else - bufp->code = er.message & charCodeMask; - bufp->kind = ASCII_KEYSTROKE_EVENT; + inev.code = er.message & charCodeMask; + inev.kind = ASCII_KEYSTROKE_EVENT; } } @@ -7993,7 +8430,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) Mac keyboard to be used to enter non-ASCII iso-latin-1 characters directly. */ if (mac_keyboard_text_encoding != kTextEncodingMacRoman - && bufp->kind == ASCII_KEYSTROKE_EVENT && bufp->code >= 128) + && inev.kind == ASCII_KEYSTROKE_EVENT && inev.code >= 128) { static TECObjectRef converter = NULL; OSStatus the_err = noErr; @@ -8022,7 +8459,7 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) if (the_err == noErr) { - unsigned char ch = bufp->code; + unsigned char ch = inev.code; ByteCount actual_input_length, actual_output_length; unsigned char outch; @@ -8033,25 +8470,23 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) if (convert_status == noErr && actual_input_length == 1 && actual_output_length == 1) - bufp->code = outch; + inev.code = outch; } } #if USE_CARBON_EVENTS - bufp->modifiers = mac_event_to_emacs_modifiers (eventRef); + inev.modifiers = mac_event_to_emacs_modifiers (eventRef); #else - bufp->modifiers = mac_to_emacs_modifiers (er.modifiers); + inev.modifiers = mac_to_emacs_modifiers (er.modifiers); #endif { mac_output *mwp = (mac_output *) GetWRefCon (FrontNonFloatingWindow ()); - XSETFRAME (bufp->frame_or_window, mwp->mFP); + XSETFRAME (inev.frame_or_window, mwp->mFP); } - bufp->timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ - - count++; + inev.timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ break; case kHighLevelEvent: @@ -8079,21 +8514,21 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) if (wp && is_emacs_window(wp)) f = ((mac_output *) GetWRefCon (wp))->mFP; - bufp->kind = DRAG_N_DROP_EVENT; - bufp->code = 0; - bufp->timestamp = er.when * (1000 / 60); + inev.kind = DRAG_N_DROP_EVENT; + inev.code = 0; + inev.timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ #if USE_CARBON_EVENTS - bufp->modifiers = mac_event_to_emacs_modifiers (eventRef); + inev.modifiers = mac_event_to_emacs_modifiers (eventRef); #else - bufp->modifiers = mac_to_emacs_modifiers (er.modifiers); + inev.modifiers = mac_to_emacs_modifiers (er.modifiers); #endif - XSETINT (bufp->x, 0); - XSETINT (bufp->y, 0); + XSETINT (inev.x, 0); + XSETINT (inev.y, 0); XSETFRAME (frame, f); - bufp->frame_or_window = Fcons (frame, drag_and_drop_file_list); + inev.frame_or_window = Fcons (frame, drag_and_drop_file_list); /* Regardless of whether Emacs was suspended or in the foreground, ask it to redraw its entire screen. @@ -8110,8 +8545,6 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) #else /* not TARGET_API_MAC_CARBON */ InvalRect (&(wp->portRect)); #endif /* not TARGET_API_MAC_CARBON */ - - count++; } default: break; @@ -8180,8 +8613,13 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) } } - UNBLOCK_INPUT; + if (inev.kind != NO_EVENT) + { + kbd_buffer_store_event_hold (&inev, hold_quit); + count++; + } + UNBLOCK_INPUT; return count; } @@ -8252,9 +8690,6 @@ NewMacWindow (FRAME_PTR fp) void make_mac_frame (struct frame *f) { - FRAME_CAN_HAVE_SCROLL_BARS (f) = 1; - FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_right; - FRAME_DESIRED_CURSOR (f) = FILLED_BOX_CURSOR; NewMacWindow(f); @@ -8303,6 +8738,9 @@ make_mac_terminal_frame (struct frame *f) FRAME_COLS (f) = 96; FRAME_LINES (f) = 4; + FRAME_CAN_HAVE_SCROLL_BARS (f) = 1; + FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_right; + make_mac_frame (f); x_make_gc (f); @@ -8326,74 +8764,6 @@ make_mac_terminal_frame (struct frame *f) Initialization ***********************************************************************/ -#ifdef USE_X_TOOLKIT -static XrmOptionDescRec emacs_options[] = { - {"-geometry", ".geometry", XrmoptionSepArg, NULL}, - {"-iconic", ".iconic", XrmoptionNoArg, (XtPointer) "yes"}, - - {"-internal-border-width", "*EmacsScreen.internalBorderWidth", - XrmoptionSepArg, NULL}, - {"-ib", "*EmacsScreen.internalBorderWidth", XrmoptionSepArg, NULL}, - - {"-T", "*EmacsShell.title", XrmoptionSepArg, (XtPointer) NULL}, - {"-wn", "*EmacsShell.title", XrmoptionSepArg, (XtPointer) NULL}, - {"-title", "*EmacsShell.title", XrmoptionSepArg, (XtPointer) NULL}, - {"-iconname", "*EmacsShell.iconName", XrmoptionSepArg, (XtPointer) NULL}, - {"-in", "*EmacsShell.iconName", XrmoptionSepArg, (XtPointer) NULL}, - {"-mc", "*pointerColor", XrmoptionSepArg, (XtPointer) NULL}, - {"-cr", "*cursorColor", XrmoptionSepArg, (XtPointer) NULL} -}; -#endif /* USE_X_TOOLKIT */ - -#ifdef MULTI_KBOARD -/* Test whether two display-name strings agree up to the dot that separates - the screen number from the server number. */ -static int -same_x_server (name1, name2) - char *name1, *name2; -{ - int seen_colon = 0; - unsigned char *system_name = SDATA (Vsystem_name); - int system_name_length = strlen (system_name); - int length_until_period = 0; - - while (system_name[length_until_period] != 0 - && system_name[length_until_period] != '.') - length_until_period++; - - /* Treat `unix' like an empty host name. */ - if (! strncmp (name1, "unix:", 5)) - name1 += 4; - if (! strncmp (name2, "unix:", 5)) - name2 += 4; - /* Treat this host's name like an empty host name. */ - if (! strncmp (name1, system_name, system_name_length) - && name1[system_name_length] == ':') - name1 += system_name_length; - if (! strncmp (name2, system_name, system_name_length) - && name2[system_name_length] == ':') - name2 += system_name_length; - /* Treat this host's domainless name like an empty host name. */ - if (! strncmp (name1, system_name, length_until_period) - && name1[length_until_period] == ':') - name1 += length_until_period; - if (! strncmp (name2, system_name, length_until_period) - && name2[length_until_period] == ':') - name2 += length_until_period; - - for (; *name1 != '\0' && *name1 == *name2; name1++, name2++) - { - if (*name1 == ':') - seen_colon++; - if (seen_colon && *name1 == '.') - return 1; - } - return (seen_colon - && (*name1 == '.' || *name1 == '\0') - && (*name2 == '.' || *name2 == '\0')); -} -#endif - int mac_initialized = 0; void @@ -8426,12 +8796,16 @@ mac_initialize_display_info () dpyinfo->reference_count = 0; dpyinfo->resx = 75.0; dpyinfo->resy = 75.0; - dpyinfo->n_planes = 1; - dpyinfo->n_cbits = 16; + dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType); + for (dpyinfo->n_planes = 32; dpyinfo->n_planes > 0; dpyinfo->n_planes >>= 1) + if (HasDepth (main_device_handle, dpyinfo->n_planes, + gdDevType, dpyinfo->color_p)) + break; dpyinfo->height = (**main_device_handle).gdRect.bottom; dpyinfo->width = (**main_device_handle).gdRect.right; dpyinfo->grabbed = 0; dpyinfo->root_window = NULL; + dpyinfo->image_cache = make_image_cache (); dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1; @@ -8632,6 +9006,8 @@ static struct redisplay_interface x_redisplay_interface = x_get_glyph_overhangs, x_fix_overlapping_area, x_draw_fringe_bitmap, + 0, /* define_fringe_bitmap */ + 0, /* destroy_fringe_bitmap */ mac_per_char_metric, mac_encode_char, NULL, /* mac_compute_glyph_string_overhangs */ @@ -8750,6 +9126,9 @@ syms_of_macterm () Fprovide (intern ("mac-carbon"), Qnil); + staticpro (&Qreverse); + Qreverse = intern ("reverse"); + staticpro (&x_display_name_list); x_display_name_list = Qnil; @@ -8765,6 +9144,18 @@ syms_of_macterm () Qmac_ready_for_drag_n_drop = intern ("mac-ready-for-drag-n-drop"); staticpro (&Qmac_ready_for_drag_n_drop); + Qbig5 = intern ("big5"); + staticpro (&Qbig5); + + Qcn_gb = intern ("cn-gb"); + staticpro (&Qcn_gb); + + Qsjis = intern ("sjis"); + staticpro (&Qsjis); + + Qeuc_kr = intern ("euc-kr"); + staticpro (&Qeuc_kr); + DEFVAR_BOOL ("x-autoselect-window", &x_autoselect_window_p, doc: /* *Non-nil means autoselect window with mouse pointer. */); x_autoselect_window_p = 0; @@ -8794,6 +9185,17 @@ Otherwise the option key is used. */); useful for non-standard keyboard layouts. */); Vmac_reverse_ctrl_meta = Qnil; + DEFVAR_LISP ("mac-emulate-three-button-mouse", + &Vmac_emulate_three_button_mouse, + doc: /* t means that when the option-key is held down while pressing the + mouse button, the click will register as mouse-2 and while the + command-key is held down, the click will register as mouse-3. + 'reverse means that the the option-key will register for mouse-3 + and the command-key will register for mouse-2. nil means that + not emulation should be done and the modifiers should be placed + on the mouse-1 event. */); + Vmac_emulate_three_button_mouse = Qnil; + #if USE_CARBON_EVENTS DEFVAR_LISP ("mac-wheel-button-is-mouse-2", &Vmac_wheel_button_is_mouse_2, doc: /* Non-nil means that the wheel button will be treated as mouse-2 and @@ -8827,3 +9229,6 @@ command, this enables the Mac keyboard to be used to enter non-ASCII characters directly. */); mac_keyboard_text_encoding = kTextEncodingMacRoman; } + +/* arch-tag: f2259165-4454-4c04-a029-a133c8af7b5b + (do not change this comment) */ diff --git a/src/macterm.h b/src/macterm.h index 6592533462..868ce88318 100644 --- a/src/macterm.h +++ b/src/macterm.h @@ -23,45 +23,26 @@ Boston, MA 02111-1307, USA. */ #include "macgui.h" #include "frame.h" -/* Include Carbon.h to define Cursor and Rect. */ -#ifdef HAVE_CARBON -#undef mktime -#undef DEBUG -#undef Z -#undef free -#undef malloc -#undef realloc -/* Macros max and min defined in lisp.h conflict with those in - precompiled header Carbon.h. */ -#undef max -#undef min -#undef init_process -#include -#undef Z -#define Z (current_buffer->text->z) -#undef free -#define free unexec_free -#undef malloc -#define malloc unexec_malloc -#undef realloc -#define realloc unexec_realloc -#undef min -#define min(a, b) ((a) < (b) ? (a) : (b)) -#undef max -#define max(a, b) ((a) > (b) ? (a) : (b)) -#undef init_process -#define init_process emacs_init_process -#endif /* MAC_OSX */ - #define RGB_TO_ULONG(r, g, b) (((r) << 16) | ((g) << 8) | (b)) #define RED_FROM_ULONG(color) ((color) >> 16) #define GREEN_FROM_ULONG(color) (((color) >> 8) & 0xff) #define BLUE_FROM_ULONG(color) ((color) & 0xff) +/* Do not change `* 0x101' in the following lines to `<< 8'. If + changed, image masks in 1-bit depth will not work. */ +#define RED16_FROM_ULONG(color) (RED_FROM_ULONG(color) * 0x101) +#define GREEN16_FROM_ULONG(color) (GREEN_FROM_ULONG(color) * 0x101) +#define BLUE16_FROM_ULONG(color) (BLUE_FROM_ULONG(color) * 0x101) + #define BLACK_PIX_DEFAULT(f) RGB_TO_ULONG(0,0,0) #define WHITE_PIX_DEFAULT(f) RGB_TO_ULONG(255,255,255) +/* A black pixel in a mask bitmap/pixmap means ``draw a source + pixel''. A white pixel means ``retain the current pixel''. */ +#define PIX_MASK_DRAW(f) BLACK_PIX_DEFAULT(f) +#define PIX_MASK_RETAIN(f) WHITE_PIX_DEFAULT(f) + #define FONT_WIDTH(f) ((f)->max_bounds.width) #define FONT_HEIGHT(f) ((f)->ascent + (f)->descent) #define FONT_BASE(f) ((f)->ascent) @@ -75,6 +56,7 @@ Boston, MA 02111-1307, USA. */ struct mac_bitmap_record { char *bitmap_data; + char *file; int refcount; int height, width; }; @@ -101,8 +83,13 @@ struct mac_display_info /* Number of planes on this screen. */ int n_planes; + /* Whether the screen supports color */ + int color_p; + +#if 0 /* Number of bits per pixel on this screen. */ int n_cbits; +#endif /* Dimensions of this screen. */ int height, width; @@ -253,6 +240,12 @@ extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object)); extern struct mac_display_info *mac_term_init (); +extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int)); +extern struct font_info *x_get_font_info P_ ((struct frame *f, int)); +extern struct font_info *x_load_font P_ ((struct frame *, char *, int)); +extern struct font_info *x_query_font P_ ((struct frame *, char *)); +extern void x_find_ccl_program P_ ((struct font_info *)); + /* When Emacs uses a tty window, tty_display in frame.c points to an x_output struct . */ struct x_output @@ -578,6 +571,24 @@ struct frame * check_x_frame (Lisp_Object); void activate_scroll_bars (FRAME_PTR); void deactivate_scroll_bars (FRAME_PTR); +/* Defined in macterm.c. */ + +extern void x_set_window_size P_ ((struct frame *, int, int, int)); +extern void x_make_frame_visible P_ ((struct frame *)); +extern void mac_initialize P_ ((void)); +extern Pixmap XCreatePixmap P_ ((Display *, WindowPtr, unsigned int, + unsigned int, unsigned int)); +extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *, + unsigned int, unsigned int, + unsigned long, unsigned long, + unsigned int)); +extern void XFreePixmap P_ ((Display *, Pixmap)); +extern void XSetForeground P_ ((Display *, GC, unsigned long)); +extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int, + int, int)); + #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 +/* arch-tag: 6b4ca125-5bef-476d-8ee8-31ed808b7e79 + (do not change this comment) */ diff --git a/src/makefile.nt b/src/makefile.nt index e3d05846cc..0cf08f3710 100644 --- a/src/makefile.nt +++ b/src/makefile.nt @@ -1228,3 +1228,5 @@ $(BLD)\w32bdf.obj: \ $(SRC)\w32.h \ $(SRC)\frame.h \ $(SRC)\blockinput.h + +# arch-tag: ee9a97ba-19b7-4b50-a127-aaf4efe494dc diff --git a/src/makefile.w32-in b/src/makefile.w32-in index b93b328a6e..99a04ecc17 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -120,7 +120,10 @@ OBJ1 = $(BLD)/abbrev.$(O) \ $(BLD)/coding.$(O) \ $(BLD)/category.$(O) \ $(BLD)/ccl.$(O) \ - $(BLD)/fontset.$(O) + $(BLD)/fontset.$(O) \ + $(BLD)/fringe.$(O) \ + $(BLD)/image.$(O) + WIN32OBJ = $(BLD)/w32term.$(O) \ $(BLD)/w32xfns.$(O) \ @@ -142,6 +145,7 @@ LIBS = $(TLIB0) \ $(USER32) \ $(MPR) \ $(SHELL32) \ + $(WINSPOOL) \ $(libc) # @@ -764,6 +768,21 @@ $(BLD)/frame.$(O) : \ $(SRC)/w32term.h \ $(SRC)/window.h +$(BLD)/fringe.$(O) : \ + $(SRC)/fringe.c \ + $(EMACS_ROOT)/src/s/ms-w32.h \ + $(EMACS_ROOT)/src/m/intel386.h \ + $(EMACS_ROOT)/src/config.h \ + $(SRC)/atimer.h \ + $(SRC)/blockinput.h \ + $(SRC)/buffer.h \ + $(SRC)/dispextern.h \ + $(SRC)/frame.h \ + $(SRC)/systime.h \ + $(SRC)/w32bdf.h \ + $(SRC)/w32gui.h \ + $(SRC)/window.h + $(BLD)/gmalloc.$(O) : \ $(SRC)/gmalloc.c \ $(EMACS_ROOT)/src/s/ms-w32.h \ @@ -772,6 +791,24 @@ $(BLD)/gmalloc.$(O) : \ $(EMACS_ROOT)/nt/inc/sys/param.h \ $(SRC)/getpagesize.h +$(BLD)/image.$(O): \ + $(SRC)/image.c \ + $(EMACS_ROOT)/src/s/ms-w32.h \ + $(EMACS_ROOT)/src/m/intel386.h \ + $(EMACS_ROOT)/src/config.h \ + $(SRC)/atimer.h \ + $(SRC)/blockinput.h \ + $(SRC)/dispextern.h \ + $(SRC)/epaths.h \ + $(SRC)/frame.h \ + $(SRC)/systime.h \ + $(SRC)/termhooks.h \ + $(SRC)/w32bdf.h \ + $(SRC)/w32gui.h \ + $(SRC)/w32heap.h \ + $(SRC)/w32term.h \ + $(SRC)/window.h + $(BLD)/indent.$(O) : \ $(SRC)/indent.c \ $(EMACS_ROOT)/src/s/ms-w32.h \ @@ -1500,3 +1537,5 @@ $(BLD)/w32bdf.$(O): \ $(SRC)/w32bdf.h \ $(SRC)/w32gui.h \ $(SRC)/w32term.h + +# arch-tag: 9fd7aba8-f826-4111-b3c0-497a8e7db9a0 diff --git a/src/marker.c b/src/marker.c index c20ca8d2e8..691bf6177c 100644 --- a/src/marker.c +++ b/src/marker.c @@ -921,3 +921,6 @@ syms_of_marker () doc: /* Non-nil enables debugging checks in byte/char position conversions. */); byte_debug_flag = 0; } + +/* arch-tag: 50aa418f-cdd0-4838-b64b-94aa4b2a3b74 + (do not change this comment) */ diff --git a/src/md5.c b/src/md5.c index a27d67b04f..c8df5616fa 100644 --- a/src/md5.c +++ b/src/md5.c @@ -441,3 +441,6 @@ md5_process_block (buffer, len, ctx) ctx->C = C; ctx->D = D; } + +/* arch-tag: 60084f04-b434-42cb-9d2b-e91df01f4325 + (do not change this comment) */ diff --git a/src/md5.h b/src/md5.h index c4788cacab..e1cb3dd2e5 100644 --- a/src/md5.h +++ b/src/md5.h @@ -144,3 +144,6 @@ extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock)); #endif /* md5.h */ + +/* arch-tag: 7cd389f3-6c40-4950-999d-0b2ebd1d20d7 + (do not change this comment) */ diff --git a/src/mem-limits.h b/src/mem-limits.h index fb3dae2eb8..578cf59f12 100644 --- a/src/mem-limits.h +++ b/src/mem-limits.h @@ -194,3 +194,6 @@ get_lim_data () #endif /* not WINDOWSNT */ #endif /* not USG */ #endif /* not NO_LIM_DATA */ + +/* arch-tag: fe39244e-e54f-4208-b7aa-02556f7841c5 + (do not change this comment) */ diff --git a/src/minibuf.c b/src/minibuf.c index 0ccab2707d..2feac10f2b 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -131,6 +131,8 @@ Lisp_Object Qminibuffer_default; Lisp_Object Qcurrent_input_method, Qactivate_input_method; +Lisp_Object Qcase_fold_search; + extern Lisp_Object Qmouse_face; extern Lisp_Object Qfield; @@ -189,7 +191,7 @@ choose_minibuf_frame_1 (ignore) DEFUN ("set-minibuffer-window", Fset_minibuffer_window, Sset_minibuffer_window, 1, 1, 0, doc: /* Specify which minibuffer window to use for the minibuffer. -This effects where the minibuffer is displayed if you put text in it +This affects where the minibuffer is displayed if you put text in it without invoking the usual minibuffer commands. */) (window) Lisp_Object window; @@ -321,7 +323,8 @@ read_minibuf_noninteractive (map, initial, prompt, backup_n, expflag, DEFUN ("minibufferp", Fminibufferp, Sminibufferp, 0, 1, 0, doc: /* Return t if BUFFER is a minibuffer. -No argument or nil as argument means use current buffer as BUFFER.*/) +No argument or nil as argument means use current buffer as BUFFER. +BUFFER can be a buffer or a buffer name. */) (buffer) Lisp_Object buffer; { @@ -404,10 +407,15 @@ minibuffer_completion_contents () return make_buffer_string (prompt_end, PT, 1); } -/* Read from the minibuffer using keymap MAP, initial contents INITIAL - (a string), putting point minus BACKUP_N bytes from the end of INITIAL, +/* Read from the minibuffer using keymap MAP and initial contents INITIAL, + putting point minus BACKUP_N bytes from the end of INITIAL, prompting with PROMPT (a string), using history list HISTVAR - with initial position HISTPOS. (BACKUP_N should be <= 0.) + with initial position HISTPOS. INITIAL should be a string or a + cons of a string and an integer. BACKUP_N should be <= 0, or + Qnil, which is equivalent to 0. If INITIAL is a cons, BACKUP_N is + ignored and replaced with an integer that puts point at one-indexed + position N in INITIAL, where N is the CDR of INITIAL, or at the + beginning of INITIAL if N <= 0. Normally return the result as a string (the text that was read), but if EXPFLAG is nonzero, read it and return the object read. @@ -419,7 +427,7 @@ minibuffer_completion_contents () If ALLOW_PROPS is nonzero, we do not throw away text properties. - if INHERIT_INPUT_METHOD is nonzeor, the minibuffer inherit the + if INHERIT_INPUT_METHOD is nonzero, the minibuffer inherits the current input method. */ static Lisp_Object @@ -441,6 +449,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag, Lisp_Object mini_frame, ambient_dir, minibuffer, input_method; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; Lisp_Object enable_multibyte; + int pos = INTEGERP (backup_n) ? XINT (backup_n) : 0; /* String to add to the history. */ Lisp_Object histstring; @@ -456,6 +465,27 @@ read_minibuf (map, initial, prompt, backup_n, expflag, cancel_hourglass (); #endif + if (!NILP (initial)) + { + if (CONSP (initial)) + { + backup_n = Fcdr (initial); + initial = Fcar (initial); + CHECK_STRING (initial); + if (!NILP (backup_n)) + { + CHECK_NUMBER (backup_n); + /* Convert to distance from end of input. */ + if (XINT (backup_n) < 1) + /* A number too small means the beginning of the string. */ + pos = - SCHARS (initial); + else + pos = XINT (backup_n) - 1 - SCHARS (initial); + } + } + else + CHECK_STRING (initial); + } val = Qnil; ambient_dir = current_buffer->directory; input_method = Qnil; @@ -482,7 +512,8 @@ read_minibuf (map, initial, prompt, backup_n, expflag, if (noninteractive) { - val = read_minibuf_noninteractive (map, initial, prompt, backup_n, + val = read_minibuf_noninteractive (map, initial, prompt, + make_number (pos), expflag, histvar, histpos, defalt, allow_props, inherit_input_method); UNGCPRO; @@ -633,8 +664,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag, if (!NILP (initial)) { Finsert (1, &initial); - if (INTEGERP (backup_n)) - Fforward_char (backup_n); + Fforward_char (make_number (pos)); } clear_message (1, 1); @@ -866,62 +896,51 @@ read_minibuf_unwind (data) DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 7, 0, doc: /* Read a string from the minibuffer, prompting with string PROMPT. -If optional second arg INITIAL-CONTENTS is non-nil, it is a string - to be inserted into the minibuffer before reading input. - If INITIAL-CONTENTS is (STRING . POSITION), the initial input - is STRING, but point is placed at position POSITION in the minibuffer. +The optional second arg INITIAL-CONTENTS is an obsolete alternative to + DEFAULT-VALUE. It normally should be nil in new code, except when + HIST is a cons. It is discussed in more detail below. Third arg KEYMAP is a keymap to use whilst reading; if omitted or nil, the default is `minibuffer-local-map'. If fourth arg READ is non-nil, then interpret the result as a Lisp object and return that object: in other words, do `(car (read-from-string INPUT-STRING))' -Fifth arg HIST, if non-nil, specifies a history list - and optionally the initial position in the list. - It can be a symbol, which is the history list variable to use, - or it can be a cons cell (HISTVAR . HISTPOS). - In that case, HISTVAR is the history list variable to use, - and HISTPOS is the initial position (the position in the list - which INITIAL-CONTENTS corresponds to). - Positions are counted starting from 1 at the beginning of the list. +Fifth arg HIST, if non-nil, specifies a history list and optionally + the initial position in the list. It can be a symbol, which is the + history list variable to use, or it can be a cons cell + (HISTVAR . HISTPOS). In that case, HISTVAR is the history list variable + to use, and HISTPOS is the initial position for use by the minibuffer + history commands. For consistency, you should also specify that + element of the history as the value of INITIAL-CONTENTS. Positions + are counted starting from 1 at the beginning of the list. Sixth arg DEFAULT-VALUE is the default value. If non-nil, it is available - for history commands; but `read-from-minibuffer' does NOT return DEFAULT-VALUE - if the user enters empty input! It returns the empty string. + for history commands; but, unless READ is non-nil, `read-from-minibuffer' + does NOT return DEFAULT-VALUE if the user enters empty input! It returns + the empty string. Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits the current input method and the setting of `enable-multibyte-characters'. If the variable `minibuffer-allow-text-properties' is non-nil, then the string which is returned includes whatever text properties - were present in the minibuffer. Otherwise the value has no text properties. */) + were present in the minibuffer. Otherwise the value has no text properties. + +The remainder of this documentation string describes the +INITIAL-CONTENTS argument in more detail. It is only relevant when +studying existing code, or when HIST is a cons. If non-nil, +INITIAL-CONTENTS is a string to be inserted into the minibuffer before +reading input. Normally, point is put at the end of that string. +However, if INITIAL-CONTENTS is \(STRING . POSITION), the initial +input is STRING, but point is placed at _one-indexed_ position +POSITION in the minibuffer. Any integer value less than or equal to +one puts point at the beginning of the string. *Note* that this +behavior differs from the way such arguments are used in `completing-read' +and some related functions, which use zero-indexing for POSITION. */) (prompt, initial_contents, keymap, read, hist, default_value, inherit_input_method) Lisp_Object prompt, initial_contents, keymap, read, hist, default_value; Lisp_Object inherit_input_method; { - int pos = 0; - Lisp_Object histvar, histpos, position, val; + Lisp_Object histvar, histpos, val; struct gcpro gcpro1; - position = Qnil; - CHECK_STRING (prompt); - if (!NILP (initial_contents)) - { - if (CONSP (initial_contents)) - { - position = Fcdr (initial_contents); - initial_contents = Fcar (initial_contents); - } - CHECK_STRING (initial_contents); - if (!NILP (position)) - { - CHECK_NUMBER (position); - /* Convert to distance from end of input. */ - if (XINT (position) < 1) - /* A number too small means the beginning of the string. */ - pos = - SCHARS (initial_contents); - else - pos = XINT (position) - 1 - SCHARS (initial_contents); - } - } - if (NILP (keymap)) keymap = Vminibuffer_local_map; else @@ -944,7 +963,7 @@ If the variable `minibuffer-allow-text-properties' is non-nil, GCPRO1 (default_value); val = read_minibuf (keymap, initial_contents, prompt, - make_number (pos), !NILP (read), + Qnil, !NILP (read), histvar, histpos, default_value, minibuffer_allow_text_properties, !NILP (inherit_input_method)); @@ -953,15 +972,15 @@ If the variable `minibuffer-allow-text-properties' is non-nil, } DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0, - doc: /* Return a Lisp object read using the minibuffer. + doc: /* Return a Lisp object read using the minibuffer, unevaluated. Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS -is a string to insert in the minibuffer before reading. */) +is a string to insert in the minibuffer before reading. +\(INITIAL-CONTENTS can also be a cons of a string and an integer. Such +arguments are used as in `read-from-minibuffer') */) (prompt, initial_contents) Lisp_Object prompt, initial_contents; { CHECK_STRING (prompt); - if (!NILP (initial_contents)) - CHECK_STRING (initial_contents); return read_minibuf (Vminibuffer_local_map, initial_contents, prompt, Qnil, 1, Qminibuffer_history, make_number (0), Qnil, 0, 0); @@ -970,7 +989,9 @@ is a string to insert in the minibuffer before reading. */) DEFUN ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0, doc: /* Return value of Lisp expression read using the minibuffer. Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS -is a string to insert in the minibuffer before reading. */) +is a string to insert in the minibuffer before reading. +\(INITIAL-CONTENTS can also be a cons of a string and an integer. Such +arguments are used as in `read-from-minibuffer') */) (prompt, initial_contents) Lisp_Object prompt, initial_contents; { @@ -982,6 +1003,9 @@ is a string to insert in the minibuffer before reading. */) DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, doc: /* Read a string from the minibuffer, prompting with string PROMPT. If non-nil, second arg INITIAL-INPUT is a string to insert before reading. + This argument has been superseded by DEFAULT-VALUE and should normally + be nil in new code. It behaves as in `read-from-minibuffer'. See the + documentation string of that function for details. The third arg HISTORY, if non-nil, specifies a history list and optionally the initial position in the list. See `read-from-minibuffer' for details of HISTORY argument. @@ -1005,16 +1029,18 @@ Fifth arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits DEFUN ("read-no-blanks-input", Fread_no_blanks_input, Sread_no_blanks_input, 1, 3, 0, doc: /* Read a string from the terminal, not allowing blanks. -Prompt with PROMPT, and provide INITIAL as an initial value of the input string. +Prompt with PROMPT. Whitespace terminates the input. If INITIAL is +non-nil, it should be a string, which is used as initial input, with +point positioned at the end, so that SPACE will accept the input. +\(Actually, INITIAL can also be a cons of a string and an integer. +Such values are treated as in `read-from-minibuffer', but are normally +not useful in this function.) Third arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits -the current input method and the setting of `enable-multibyte-characters'. */) +the current input method and the setting of`enable-multibyte-characters'. */) (prompt, initial, inherit_input_method) Lisp_Object prompt, initial, inherit_input_method; { CHECK_STRING (prompt); - if (! NILP (initial)) - CHECK_STRING (initial); - return read_minibuf (Vminibuffer_local_ns_map, initial, prompt, Qnil, 0, Qminibuffer_history, make_number (0), Qnil, 0, !NILP (inherit_input_method)); @@ -1238,7 +1264,7 @@ is used to further constrain the set of candidates. */) && (tem = Fcompare_strings (eltstring, make_number (0), make_number (SCHARS (string)), string, make_number (0), Qnil, - completion_ignore_case ?Qt : Qnil), + completion_ignore_case ? Qt : Qnil), EQ (Qt, tem))) { /* Yes. */ @@ -1247,15 +1273,20 @@ is used to further constrain the set of candidates. */) XSETFASTINT (zero, 0); /* Ignore this element if it fails to match all the regexps. */ - for (regexps = Vcompletion_regexp_list; CONSP (regexps); - regexps = XCDR (regexps)) - { - tem = Fstring_match (XCAR (regexps), eltstring, zero); - if (NILP (tem)) - break; - } - if (CONSP (regexps)) - continue; + { + int count = SPECPDL_INDEX (); + specbind (Qcase_fold_search, completion_ignore_case ? Qt : Qnil); + for (regexps = Vcompletion_regexp_list; CONSP (regexps); + regexps = XCDR (regexps)) + { + tem = Fstring_match (XCAR (regexps), eltstring, zero); + if (NILP (tem)) + break; + } + unbind_to (count, Qnil); + if (CONSP (regexps)) + continue; + } /* Ignore this element if there is a predicate and the predicate doesn't like it. */ @@ -1493,15 +1524,20 @@ are ignored unless STRING itself starts with a space. */) XSETFASTINT (zero, 0); /* Ignore this element if it fails to match all the regexps. */ - for (regexps = Vcompletion_regexp_list; CONSP (regexps); - regexps = XCDR (regexps)) - { - tem = Fstring_match (XCAR (regexps), eltstring, zero); - if (NILP (tem)) - break; - } - if (CONSP (regexps)) - continue; + { + int count = SPECPDL_INDEX (); + specbind (Qcase_fold_search, completion_ignore_case ? Qt : Qnil); + for (regexps = Vcompletion_regexp_list; CONSP (regexps); + regexps = XCDR (regexps)) + { + tem = Fstring_match (XCAR (regexps), eltstring, zero); + if (NILP (tem)) + break; + } + unbind_to (count, Qnil); + if (CONSP (regexps)) + continue; + } /* Ignore this element if there is a predicate and the predicate doesn't like it. */ @@ -1537,7 +1573,7 @@ Lisp_Object Vminibuffer_completing_file_name; DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, doc: /* Read a string in the minibuffer, with completion. PROMPT is a string to prompt with; normally it ends in a colon and a space. -TABLE is an alist whose elements' cars are strings, or an obarray. +TABLE can be an list of strings, an alist, an obarray or a hash table. TABLE can also be a function to do the completion itself. PREDICATE limits completion to a subset of TABLE. See `try-completion' and `all-completions' for more details @@ -1546,26 +1582,30 @@ See `try-completion' and `all-completions' for more details If REQUIRE-MATCH is non-nil, the user is not allowed to exit unless the input is (or completes to) an element of TABLE or is null. If it is also not t, typing RET does not exit if it does non-null completion. -If the input is null, `completing-read' returns an empty string, - regardless of the value of REQUIRE-MATCH. - -If INITIAL-INPUT is non-nil, insert it in the minibuffer initially. - If it is (STRING . POSITION), the initial input - is STRING, but point is placed POSITION characters into the string. - This feature is deprecated--it is best to pass nil for INITIAL-INPUT - and supply the default value DEF instead. The user can yank the - default value into the minibuffer easily using \\[next-history-element]. - -HIST, if non-nil, specifies a history list - and optionally the initial position in the list. - It can be a symbol, which is the history list variable to use, - or it can be a cons cell (HISTVAR . HISTPOS). - In that case, HISTVAR is the history list variable to use, - and HISTPOS is the initial position (the position in the list - which INITIAL-INPUT corresponds to). - Positions are counted starting from 1 at the beginning of the list. - The variable `history-length' controls the maximum length of a - history list. +If the input is null, `completing-read' returns DEF, or an empty string + if DEF is nil, regardless of the value of REQUIRE-MATCH. + +If INITIAL-INPUT is non-nil, insert it in the minibuffer initially, + with point positioned at the end. + If it is (STRING . POSITION), the initial input is STRING, but point + is placed at _zero-indexed_ position POSITION in STRING. (*Note* + that this is different from `read-from-minibuffer' and related + functions, which use one-indexing for POSITION.) This feature is + deprecated--it is best to pass nil for INITIAL-INPUT and supply the + default value DEF instead. The user can yank the default value into + the minibuffer easily using \\[next-history-element]. + +HIST, if non-nil, specifies a history list and optionally the initial + position in the list. It can be a symbol, which is the history list + variable to use, or it can be a cons cell (HISTVAR . HISTPOS). In + that case, HISTVAR is the history list variable to use, and HISTPOS + is the initial position (the position in the list used by the + minibuffer history commands). For consistency, you should also + specify that element of the history as the value of + INITIAL-CONTENTS. (This is the only case in which you should use + INITIAL-INPUT instead of DEF.) Positions are counted starting from + 1 at the beginning of the list. The variable `history-length' + controls the maximum length of a history list. DEF, if non-nil, is the default value. @@ -1650,7 +1690,7 @@ the values STRING, PREDICATE and `lambda'. */) (string, alist, predicate) Lisp_Object string, alist, predicate; { - Lisp_Object regexps, tem = Qnil; + Lisp_Object regexps, tail, tem = Qnil; int i = 0; CHECK_STRING (string); @@ -1676,40 +1716,83 @@ the values STRING, PREDICATE and `lambda'. */) else string = Fstring_make_multibyte (string); - tem = oblookup (Vminibuffer_completion_table, + tem = oblookup (alist, SDATA (string), SCHARS (string), SBYTES (string)); - if (!SYMBOLP (tem)) - return Qnil; } + + if (completion_ignore_case && !SYMBOLP (tem)) + { + for (i = XVECTOR (alist)->size - 1; i >= 0; i--) + { + tail = XVECTOR (alist)->contents[i]; + if (SYMBOLP (tail)) + while (1) + { + if (EQ((Fcompare_strings (string, make_number (0), Qnil, + Fsymbol_name (tail), + make_number (0) , Qnil, Qt)), + Qt)) + { + tem = tail; + break; + } + if (XSYMBOL (tail)->next == 0) + break; + XSETSYMBOL (tail, XSYMBOL (tail)->next); + } + } + } + + if (!SYMBOLP (tem)) + return Qnil; } else if (HASH_TABLE_P (alist)) { - i = hash_lookup (XHASH_TABLE (alist), string, NULL); + struct Lisp_Hash_Table *h = XHASH_TABLE (alist); + i = hash_lookup (h, string, NULL); if (i >= 0) - tem = HASH_KEY (XHASH_TABLE (alist), i); + tem = HASH_KEY (h, i); else + for (i = 0; i < HASH_TABLE_SIZE (h); ++i) + if (!NILP (HASH_HASH (h, i)) && + EQ (Fcompare_strings (string, make_number (0), Qnil, + HASH_KEY (h, i), make_number (0) , Qnil, + completion_ignore_case ? Qt : Qnil), + Qt)) + { + tem = HASH_KEY (h, i); + break; + } + if (!STRINGP (tem)) return Qnil; } else return call3 (alist, string, predicate, Qlambda); /* Reject this element if it fails to match all the regexps. */ - for (regexps = Vcompletion_regexp_list; CONSP (regexps); - regexps = XCDR (regexps)) - { - if (NILP (Fstring_match (XCAR (regexps), - SYMBOLP (tem) ? string : tem, - Qnil))) - return Qnil; - } + { + int count = SPECPDL_INDEX (); + specbind (Qcase_fold_search, completion_ignore_case ? Qt : Qnil); + for (regexps = Vcompletion_regexp_list; CONSP (regexps); + regexps = XCDR (regexps)) + { + if (NILP (Fstring_match (XCAR (regexps), + SYMBOLP (tem) ? string : tem, + Qnil))) + return unbind_to (count, Qnil); + } + unbind_to (count, Qnil); + } /* Finally, check the predicate. */ if (!NILP (predicate)) - return HASH_TABLE_P (alist) - ? call2 (predicate, tem, HASH_VALUE (XHASH_TABLE (alist), i)) - : call1 (predicate, tem); + { + return HASH_TABLE_P (alist) + ? call2 (predicate, tem, HASH_VALUE (XHASH_TABLE (alist), i)) + : call1 (predicate, tem); + } else return Qt; } @@ -2161,6 +2244,8 @@ DEFUN ("display-completion-list", Fdisplay_completion_list, Sdisplay_completion_ doc: /* Display the list of completions, COMPLETIONS, using `standard-output'. Each element may be just a symbol or string or may be a list of two strings to be printed as if concatenated. +If it is a list of two strings, the first is the actual completion +alternative, the second serves as annotation. `standard-output' must be a buffer. The actual completion alternatives, as inserted, are given `mouse-face' properties of `highlight'. @@ -2201,6 +2286,8 @@ It can find the completion buffer in `standard-output'. */) startpos = Qnil; elt = Fcar (tail); + if (SYMBOLP (elt)) + elt = SYMBOL_NAME (elt); /* Compute the length of this element. */ if (CONSP (elt)) { @@ -2512,6 +2599,9 @@ syms_of_minibuf () Qactivate_input_method = intern ("activate-input-method"); staticpro (&Qactivate_input_method); + Qcase_fold_search = intern ("case-fold-search"); + staticpro (&Qcase_fold_search); + DEFVAR_LISP ("read-buffer-function", &Vread_buffer_function, doc: /* If this is non-nil, `read-buffer' does its work by calling this function. */); Vread_buffer_function = Qnil; @@ -2546,7 +2636,8 @@ This variable makes a difference whenever the minibuffer window is active. */); DEFVAR_LISP ("minibuffer-completion-table", &Vminibuffer_completion_table, doc: /* Alist or obarray used for completion in the minibuffer. -This becomes the ALIST argument to `try-completion' and `all-completion'. +This becomes the ALIST argument to `try-completion' and `all-completions'. +The value can also be a list of strings or a hash table. The value may alternatively be a function, which is given three arguments: STRING, the current buffer contents; @@ -2593,7 +2684,12 @@ Some uses of the echo area also raise that frame (since they use it too). */); minibuffer_auto_raise = 0; DEFVAR_LISP ("completion-regexp-list", &Vcompletion_regexp_list, - doc: /* List of regexps that should restrict possible completions. */); + doc: /* List of regexps that should restrict possible completions. +The basic completion functions only consider a completion acceptable +if it matches all regular expressions in this list, with +`case-fold-search' bound to the value of `completion-ignore-case'. +See Info node `(elisp)Basic Completion', for a description of these +functions. */); Vcompletion_regexp_list = Qnil; DEFVAR_BOOL ("minibuffer-allow-text-properties", @@ -2677,3 +2773,6 @@ keys_of_minibuf () initial_define_key (Vminibuffer_local_must_match_map, Ctl ('j'), "minibuffer-complete-and-exit"); } + +/* arch-tag: 8f69b601-fba3-484c-a6dd-ceaee54a7a73 + (do not change this comment) */ diff --git a/src/mktime.c b/src/mktime.c index fa9c9911ed..cd8f025403 100644 --- a/src/mktime.c +++ b/src/mktime.c @@ -564,3 +564,6 @@ Local Variables: compile-command: "gcc -DDEBUG -DHAVE_LIMITS_H -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime" End: */ + +/* arch-tag: 9456752f-7ddd-47cb-8286-fa807b1355ae + (do not change this comment) */ diff --git a/src/msdos.c b/src/msdos.c index 5bf608dc6a..c4e9197ab4 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -64,6 +64,7 @@ Boston, MA 02111-1307, USA. */ #include "commands.h" #include "blockinput.h" #include "keyboard.h" +#include "intervals.h" #include #include #include @@ -412,7 +413,8 @@ static unsigned short screen_virtual_offset = 0; /* A flag to control how to display unibyte 8-bit characters. */ extern int unibyte_display_via_language_environment; -Lisp_Object Qbar, Qhbar; +extern Lisp_Object Qcursor_type; +extern Lisp_Object Qbar, Qhbar; /* The screen colors of the current frame, which serve as the default colors for newly-created frames. */ @@ -1327,7 +1329,7 @@ show_mouse_face (struct display_info *dpyinfo, int hl) static void clear_mouse_face (struct display_info *dpyinfo) { - if (! NILP (dpyinfo->mouse_face_window)) + if (!dpyinfo->mouse_face_hidden && ! NILP (dpyinfo->mouse_face_window)) show_mouse_face (dpyinfo, 0); dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1; @@ -1435,7 +1437,7 @@ IT_note_mode_line_highlight (struct window *w, int x, int mode_line_p) /* Find the glyph under X. */ glyph = (row->glyphs[TEXT_AREA] + x - /* Does MS-DOG really support scroll-bars?? ++KFS */ + /* in case someone implements scroll bars some day... */ - WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w)); end = glyph + row->used[TEXT_AREA]; if (glyph < end @@ -1992,8 +1994,6 @@ IT_update_end (struct frame *f) FRAME_X_DISPLAY_INFO (f)->mouse_face_defer = 0; } -Lisp_Object Qcursor_type; - static void IT_frame_up_to_date (struct frame *f) { @@ -3131,7 +3131,7 @@ dos_rawgetc () union REGS regs; struct display_info *dpyinfo = FRAME_X_DISPLAY_INFO (SELECTED_FRAME()); EVENT_INIT (event); - + #ifndef HAVE_X_WINDOWS /* Maybe put the cursor where it should be. */ IT_cmgoto (SELECTED_FRAME()); @@ -3342,8 +3342,8 @@ dos_rawgetc () if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) { - dpyinfo->mouse_face_hidden = 1; clear_mouse_face (dpyinfo); + dpyinfo->mouse_face_hidden = 1; } if (code >= 0x100) @@ -5266,18 +5266,11 @@ syms_of_msdos () #ifndef HAVE_X_WINDOWS /* The following two are from xfns.c: */ - Qbar = intern ("bar"); - staticpro (&Qbar); - Qhbar = intern ("hbar"); - staticpro (&Qhbar); - Qcursor_type = intern ("cursor-type"); - staticpro (&Qcursor_type); Qreverse = intern ("reverse"); staticpro (&Qreverse); DEFVAR_LISP ("dos-unsupported-char-glyph", &Vdos_unsupported_char_glyph, doc: /* *Glyph to display instead of chars not supported by current codepage. - This variable is used only by MSDOS terminals. */); Vdos_unsupported_char_glyph = '\177'; @@ -5297,3 +5290,6 @@ nil means don't delete them until `list-processes' is run. */); } #endif /* MSDOS */ + +/* arch-tag: db404e92-52a5-475f-9eb2-1cb78dd05f30 + (do not change this comment) */ diff --git a/src/msdos.h b/src/msdos.h index 40d01a8bba..a07979d2f6 100644 --- a/src/msdos.h +++ b/src/msdos.h @@ -159,3 +159,6 @@ void XMenuDestroy (Display *, XMenu *); #endif /* not HAVE_X_WINDOWS */ #endif /* not EMACS_MSDOS_H */ + +/* arch-tag: ad21eeed-8fdb-4357-8007-36368a6bdbf3 + (do not change this comment) */ diff --git a/src/ndir.h b/src/ndir.h index f02dfbd670..bcf52c902f 100644 --- a/src/ndir.h +++ b/src/ndir.h @@ -53,3 +53,6 @@ extern void seekdir(); extern void closedir(); #define rewinddir( dirp ) seekdir( dirp, 0L ) + +/* arch-tag: aea50570-ffb7-43fd-b423-7743b10fbe6e + (do not change this comment) */ diff --git a/src/param.h b/src/param.h index 1b27b50a27..5e80bf9e54 100644 --- a/src/param.h +++ b/src/param.h @@ -1,2 +1,5 @@ /* This is so that Emacs can run on VMS... */ #define EXEC_PAGESIZE 512 + +/* arch-tag: a6daea28-33a6-4dd3-97d8-5ee1a12f09d3 + (do not change this comment) */ diff --git a/src/point.h b/src/point.h index 7bae693f2d..0156e1baed 100644 --- a/src/point.h +++ b/src/point.h @@ -3,3 +3,6 @@ static char point_bits[] = { 0x1f, 0x0e, 0x0e, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0e, 0x0e, 0x1f}; + +/* arch-tag: a8dad510-7254-4964-b71e-bb6f81cce572 + (do not change this comment) */ diff --git a/src/pre-crt0.c b/src/pre-crt0.c index 67fd31cd6a..8abc954541 100644 --- a/src/pre-crt0.c +++ b/src/pre-crt0.c @@ -7,3 +7,6 @@ /* Create a label to appear at the beginning of data space. */ int data_start = 0; + +/* arch-tag: 2e260272-0790-495f-9362-55abd56b5c5a + (do not change this comment) */ diff --git a/src/prefix-args.c b/src/prefix-args.c index 4f5b620a2f..eeeb1038a4 100644 --- a/src/prefix-args.c +++ b/src/prefix-args.c @@ -71,3 +71,6 @@ Echo each ARG preceded by PREFIX and a space.\n", progname); exit (0); } + +/* arch-tag: 08136d70-e5c0-49c7-bcd8-b4850233977a + (do not change this comment) */ diff --git a/src/print.c b/src/print.c index 1d4df43447..8d0a5e2bb3 100644 --- a/src/print.c +++ b/src/print.c @@ -511,7 +511,7 @@ print_string (string, printcharfun) for (i = 0; i < size; i++) PRINTCHAR (SREF (string, i)); else - for (i = 0; i < size_byte; i++) + for (i = 0; i < size_byte; ) { /* Here, we must convert each multi-byte form to the corresponding character code before handing it to PRINTCHAR. */ @@ -758,33 +758,42 @@ A printed representation of an object is text which describes that object. */) (object, noescape) Lisp_Object object, noescape; { - PRINTDECLARE; Lisp_Object printcharfun; /* struct gcpro gcpro1, gcpro2; */ Lisp_Object save_deactivate_mark; int count = specpdl_ptr - specpdl; + struct buffer *previous; specbind (Qinhibit_modification_hooks, Qt); - /* Save and restore this--we are altering a buffer - but we don't want to deactivate the mark just for that. - No need for specbind, since errors deactivate the mark. */ - save_deactivate_mark = Vdeactivate_mark; - /* GCPRO2 (object, save_deactivate_mark); */ - abort_on_gc++; + { + PRINTDECLARE; + + /* Save and restore this--we are altering a buffer + but we don't want to deactivate the mark just for that. + No need for specbind, since errors deactivate the mark. */ + save_deactivate_mark = Vdeactivate_mark; + /* GCPRO2 (object, save_deactivate_mark); */ + abort_on_gc++; + + printcharfun = Vprin1_to_string_buffer; + PRINTPREPARE; + print (object, printcharfun, NILP (noescape)); + /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINSH */ + PRINTFINISH; + } - printcharfun = Vprin1_to_string_buffer; - PRINTPREPARE; - print (object, printcharfun, NILP (noescape)); - /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINSH */ - PRINTFINISH; + previous = current_buffer; set_buffer_internal (XBUFFER (Vprin1_to_string_buffer)); object = Fbuffer_string (); if (SBYTES (object) == SCHARS (object)) STRING_SET_UNIBYTE (object); + /* Note that this won't make prepare_to_modify_buffer call + ask-user-about-supersession-threat because this buffer + does not visit a file. */ Ferase_buffer (); - set_buffer_internal (old); + set_buffer_internal (previous); Vdeactivate_mark = save_deactivate_mark; /* UNGCPRO; */ @@ -902,6 +911,49 @@ to make it write to the debugging output. */) return character; } + +#if defined(GNU_LINUX) + +/* This functionality is not vitally important in general, so we rely on + non-portable ability to use stderr as lvalue. */ + +#define WITH_REDIRECT_DEBUGGING_OUTPUT 1 + +FILE *initial_stderr_stream = NULL; + +DEFUN ("redirect-debugging-output", Fredirect_debugging_output, Sredirect_debugging_output, + 1, 2, + "FDebug output file: \nP", + doc: /* Redirect debugging output (stderr stream) to file FILE. +If FILE is nil, reset target to the initial stderr stream. +Optional arg APPEND non-nil (interactively, with prefix arg) means +append to existing target file. */) + (file, append) + Lisp_Object file, append; +{ + if (initial_stderr_stream != NULL) + fclose(stderr); + stderr = initial_stderr_stream; + initial_stderr_stream = NULL; + + if (STRINGP (file)) + { + file = Fexpand_file_name (file, Qnil); + initial_stderr_stream = stderr; + stderr = fopen(SDATA (file), NILP (append) ? "w" : "a"); + if (stderr == NULL) + { + stderr = initial_stderr_stream; + initial_stderr_stream = NULL; + report_file_error ("Cannot open debugging output stream", + Fcons (file, Qnil)); + } + } + return Qnil; +} +#endif /* GNU_LINUX */ + + /* This is the interface for debugging printing. */ void @@ -914,7 +966,9 @@ debug_print (arg) DEFUN ("error-message-string", Ferror_message_string, Serror_message_string, 1, 1, 0, - doc: /* Convert an error value (ERROR-SYMBOL . DATA) to an error message. */) + doc: /* Convert an error value (ERROR-SYMBOL . DATA) to an error message. +See Info anchor `(elisp)Definition of signal' for some details on how this +error message is constructed. */) (obj) Lisp_Object obj; { @@ -1222,7 +1276,8 @@ static void print_preprocess (obj) Lisp_Object obj; { - int i, size; + int i; + EMACS_INT size; loop: if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) @@ -1288,7 +1343,9 @@ print_preprocess (obj) goto loop; case Lisp_Vectorlike: - size = XVECTOR (obj)->size & PSEUDOVECTOR_SIZE_MASK; + size = XVECTOR (obj)->size; + if (size & PSEUDOVECTOR_FLAG) + size &= PSEUDOVECTOR_SIZE_MASK; for (i = 0; i < size; i++) print_preprocess (XVECTOR (obj)->contents[i]); break; @@ -1938,7 +1995,7 @@ print_object (obj, printcharfun, escapeflag) } else { - int size = XVECTOR (obj)->size; + EMACS_INT size = XVECTOR (obj)->size; if (COMPILEDP (obj)) { PRINTCHAR ('#'); @@ -2273,6 +2330,9 @@ priorities. */); defsubr (&Sterpri); defsubr (&Swrite_char); defsubr (&Sexternal_debugging_output); +#ifdef WITH_REDIRECT_DEBUGGING_OUTPUT + defsubr (&Sredirect_debugging_output); +#endif Qexternal_debugging_output = intern ("external-debugging-output"); staticpro (&Qexternal_debugging_output); @@ -2291,3 +2351,6 @@ priorities. */); defsubr (&Swith_output_to_temp_buffer); } + +/* arch-tag: bc797170-94ae-41de-86e3-75e20f8f7a39 + (do not change this comment) */ diff --git a/src/process.c b/src/process.c index 419d108b71..1e2bcc3c2a 100644 --- a/src/process.c +++ b/src/process.c @@ -1,6 +1,6 @@ /* Asynchronous subprocess control for GNU Emacs. Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 96, 98, 1999, - 2001, 2002, 2003 Free Software Foundation, Inc. + 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -98,6 +98,17 @@ Boston, MA 02111-1307, USA. */ #include #endif +/* Can we use SIOCGIFCONF and/or SIOCGIFADDR */ +#ifdef HAVE_SOCKETS +#if defined(HAVE_SYS_IOCTL_H) && defined(HAVE_NET_IF_H) +/* sys/ioctl.h may have been included already */ +#ifndef SIOCGIFADDR +#include +#endif +#include +#endif +#endif + #ifdef IRIS #include /* for "minor" */ #endif /* not IRIS */ @@ -249,6 +260,33 @@ int update_tick; #undef DATAGRAM_SOCKETS #endif +#if !defined (ADAPTIVE_READ_BUFFERING) && !defined (NO_ADAPTIVE_READ_BUFFERING) +#ifdef EMACS_HAS_USECS +#define ADAPTIVE_READ_BUFFERING +#endif +#endif + +#ifdef ADAPTIVE_READ_BUFFERING +#define READ_OUTPUT_DELAY_INCREMENT 10000 +#define READ_OUTPUT_DELAY_MAX (READ_OUTPUT_DELAY_INCREMENT * 5) +#define READ_OUTPUT_DELAY_MAX_MAX (READ_OUTPUT_DELAY_INCREMENT * 7) + +/* Number of processes which might be delayed. */ + +static int process_output_delay_count; + +/* Non-zero if any process has non-nil process_output_skip. */ + +static int process_output_skip; + +/* Non-nil means to delay reading process output to improve buffering. + A value of t means that delay is reset after each send, any other + non-nil value does not reset the delay. */ +static Lisp_Object Vprocess_adaptive_read_buffering; +#else +#define process_output_delay_count 0 +#endif + #include "sysselect.h" @@ -562,6 +600,12 @@ make_process (name) p->status = Qrun; p->mark = Fmake_marker (); +#ifdef ADAPTIVE_READ_BUFFERING + p->adaptive_read_buffering = Qnil; + XSETFASTINT (p->read_output_delay, 0); + p->read_output_skip = Qnil; +#endif + /* If name is already in use, modify it until it is unused. */ name1 = name; @@ -955,8 +999,14 @@ It gets two arguments: the process, and a string describing the change. */) (process, sentinel) register Lisp_Object process, sentinel; { + struct Lisp_Process *p; + CHECK_PROCESS (process); - XPROCESS (process)->sentinel = sentinel; + p = XPROCESS (process); + + p->sentinel = sentinel; + if (NETCONN1_P (p)) + p->childp = Fplist_put (p->childp, QCsentinel, sentinel); return sentinel; } @@ -1485,6 +1535,10 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) = buffer_defaults.enable_multibyte_characters; XPROCESS (proc)->command = Flist (nargs - 2, args + 2); +#ifdef ADAPTIVE_READ_BUFFERING + XPROCESS (proc)->adaptive_read_buffering = Vprocess_adaptive_read_buffering; +#endif + /* Make the process marker point into the process buffer (if any). */ if (!NILP (buffer)) set_marker_both (XPROCESS (proc)->mark, buffer, @@ -2298,233 +2352,172 @@ static struct socket_options { /* The name of this option. Should be lowercase version of option name without SO_ prefix. */ char *name; - /* Length of name. */ - int nlen; /* Option level SOL_... */ int optlevel; /* Option number SO_... */ int optnum; - enum { SOPT_UNKNOWN, SOPT_BOOL, SOPT_INT, SOPT_STR, SOPT_LINGER } opttype; + enum { SOPT_UNKNOWN, SOPT_BOOL, SOPT_INT, SOPT_IFNAME, SOPT_LINGER } opttype; + enum { OPIX_NONE=0, OPIX_MISC=1, OPIX_REUSEADDR=2 } optbit; } socket_options[] = { #ifdef SO_BINDTODEVICE - { "bindtodevice", 12, SOL_SOCKET, SO_BINDTODEVICE, SOPT_STR }, + { ":bindtodevice", SOL_SOCKET, SO_BINDTODEVICE, SOPT_IFNAME, OPIX_MISC }, #endif #ifdef SO_BROADCAST - { "broadcast", 9, SOL_SOCKET, SO_BROADCAST, SOPT_BOOL }, + { ":broadcast", SOL_SOCKET, SO_BROADCAST, SOPT_BOOL, OPIX_MISC }, #endif #ifdef SO_DONTROUTE - { "dontroute", 9, SOL_SOCKET, SO_DONTROUTE, SOPT_BOOL }, + { ":dontroute", SOL_SOCKET, SO_DONTROUTE, SOPT_BOOL, OPIX_MISC }, #endif #ifdef SO_KEEPALIVE - { "keepalive", 9, SOL_SOCKET, SO_KEEPALIVE, SOPT_BOOL }, + { ":keepalive", SOL_SOCKET, SO_KEEPALIVE, SOPT_BOOL, OPIX_MISC }, #endif #ifdef SO_LINGER - { "linger", 6, SOL_SOCKET, SO_LINGER, SOPT_LINGER }, + { ":linger", SOL_SOCKET, SO_LINGER, SOPT_LINGER, OPIX_MISC }, #endif #ifdef SO_OOBINLINE - { "oobinline", 9, SOL_SOCKET, SO_OOBINLINE, SOPT_BOOL }, + { ":oobinline", SOL_SOCKET, SO_OOBINLINE, SOPT_BOOL, OPIX_MISC }, #endif #ifdef SO_PRIORITY - { "priority", 8, SOL_SOCKET, SO_PRIORITY, SOPT_INT }, + { ":priority", SOL_SOCKET, SO_PRIORITY, SOPT_INT, OPIX_MISC }, #endif #ifdef SO_REUSEADDR - { "reuseaddr", 9, SOL_SOCKET, SO_REUSEADDR, SOPT_BOOL }, + { ":reuseaddr", SOL_SOCKET, SO_REUSEADDR, SOPT_BOOL, OPIX_REUSEADDR }, #endif - { 0, 0, 0, 0, SOPT_UNKNOWN } + { 0, 0, 0, SOPT_UNKNOWN, OPIX_NONE } }; -/* Process list of socket options OPTS on socket S. - Only check if options are supported is S < 0. - If NO_ERROR is non-zero, continue silently if an option - cannot be set. +/* Set option OPT to value VAL on socket S. - Each element specifies one option. An element is either a string - "OPTION=VALUE" or a cons (OPTION . VALUE) where OPTION is a string - or a symbol. */ + Returns (1<name; sopt++) + if (strcmp (name, sopt->name) == 0) + break; - arg = 0; - for (sopt = socket_options; sopt->name; sopt++) - if (strncmp (name, sopt->name, sopt->nlen) == 0) - { - if (name[sopt->nlen] == 0) - break; - if (name[sopt->nlen] == '=') - { - arg = name + sopt->nlen + 1; - break; - } - } + switch (sopt->opttype) + { + case SOPT_BOOL: + { + int optval; + optval = NILP (val) ? 0 : 1; + ret = setsockopt (s, sopt->optlevel, sopt->optnum, + &optval, sizeof (optval)); + break; + } - switch (sopt->opttype) - { - case SOPT_BOOL: - { - int optval; - if (s < 0) - return 1; - if (arg) - optval = (*arg == '0' || *arg == 'n') ? 0 : 1; - else if (INTEGERP (val)) - optval = XINT (val) == 0 ? 0 : 1; - else - optval = NILP (val) ? 0 : 1; - ret = setsockopt (s, sopt->optlevel, sopt->optnum, - &optval, sizeof (optval)); - break; - } + case SOPT_INT: + { + int optval; + if (INTEGERP (val)) + optval = XINT (val); + else + error ("Bad option value for %s", name); + ret = setsockopt (s, sopt->optlevel, sopt->optnum, + &optval, sizeof (optval)); + break; + } - case SOPT_INT: - { - int optval; - if (arg) - optval = atoi(arg); - else if (INTEGERP (val)) - optval = XINT (val); - else - error ("Bad option argument for %s", name); - if (s < 0) - return 1; - ret = setsockopt (s, sopt->optlevel, sopt->optnum, - &optval, sizeof (optval)); - break; - } +#ifdef SO_BINDTODEVICE + case SOPT_IFNAME: + { + char devname[IFNAMSIZ+1]; - case SOPT_STR: + /* This is broken, at least in the Linux 2.4 kernel. + To unbind, the arg must be a zero integer, not the empty string. + This should work on all systems. KFS. 2003-09-23. */ + bzero (devname, sizeof devname); + if (STRINGP (val)) { - if (!arg) - { - if (NILP (val)) - arg = ""; - else if (STRINGP (val)) - arg = (char *) SDATA (val); - else if (XSYMBOL (val)) - arg = (char *) SDATA (SYMBOL_NAME (val)); - else - error ("Invalid argument to %s option", name); - } - ret = setsockopt (s, sopt->optlevel, sopt->optnum, - arg, strlen (arg)); + char *arg = (char *) SDATA (val); + int len = min (strlen (arg), IFNAMSIZ); + bcopy (arg, devname, len); } + else if (!NILP (val)) + error ("Bad option value for %s", name); + ret = setsockopt (s, sopt->optlevel, sopt->optnum, + devname, IFNAMSIZ); + break; + } +#endif #ifdef SO_LINGER - case SOPT_LINGER: - { - struct linger linger; - - linger.l_onoff = 1; - linger.l_linger = 0; - - if (s < 0) - return 1; + case SOPT_LINGER: + { + struct linger linger; - if (arg) - { - if (*arg == 'n' || *arg == 't' || *arg == 'y') - linger.l_onoff = (*arg == 'n') ? 0 : 1; - else - linger.l_linger = atoi(arg); - } - else if (INTEGERP (val)) - linger.l_linger = XINT (val); - else - linger.l_onoff = NILP (val) ? 0 : 1; - ret = setsockopt (s, sopt->optlevel, sopt->optnum, - &linger, sizeof (linger)); - break; - } + linger.l_onoff = 1; + linger.l_linger = 0; + if (INTEGERP (val)) + linger.l_linger = XINT (val); + else + linger.l_onoff = NILP (val) ? 0 : 1; + ret = setsockopt (s, sopt->optlevel, sopt->optnum, + &linger, sizeof (linger)); + break; + } #endif - default: - if (s < 0) - return 0; - if (no_error) - continue; - error ("Unsupported option: %s", name); - } - if (ret < 0 && ! no_error) - report_file_error ("Cannot set network option: %s", opt); + + default: + return 0; } - return 1; + + if (ret < 0) + report_file_error ("Cannot set network option", + Fcons (opt, Fcons (val, Qnil))); + return (1 << sopt->optbit); } -DEFUN ("set-network-process-options", - Fset_network_process_options, Sset_network_process_options, - 1, MANY, 0, - doc: /* Set one or more options for network process PROCESS. -Each option is either a string "OPT=VALUE" or a cons (OPT . VALUE). -A boolean value is false if it either zero or nil, true otherwise. - -The following options are known. Consult the relevant system manual -pages for more information. - -bindtodevice=NAME -- bind to interface NAME, or remove binding if nil. -broadcast=BOOL -- Allow send and receive of datagram broadcasts. -dontroute=BOOL -- Only send to directly connected hosts. -keepalive=BOOL -- Send keep-alive messages on network stream. -linger=BOOL or TIMEOUT -- Send queued messages before closing. -oobinline=BOOL -- Place out-of-band data in receive data stream. -priority=INT -- Set protocol defined priority for sent packets. -reuseaddr=BOOL -- Allow reusing a recently used address. - -usage: (set-network-process-options PROCESS &rest OPTIONS) */) - (nargs, args) - int nargs; - Lisp_Object *args; + +DEFUN ("set-network-process-option", + Fset_network_process_option, Sset_network_process_option, + 3, 4, 0, + doc: /* For network process PROCESS set option OPTION to value VALUE. +See `make-network-process' for a list of options and values. +If optional fourth arg NO-ERROR is non-nil, don't signal an error if +OPTION is not a supported option, return nil instead; otherwise return t. */) + (process, option, value, no_error) + Lisp_Object process, option, value; + Lisp_Object no_error; { - Lisp_Object process; - Lisp_Object opts; + int s; + struct Lisp_Process *p; - process = args[0]; CHECK_PROCESS (process); - if (nargs > 1 && XINT (XPROCESS (process)->infd) >= 0) + p = XPROCESS (process); + if (!NETCONN1_P (p)) + error ("Process is not a network process"); + + s = XINT (p->infd); + if (s < 0) + error ("Process is not running"); + + if (set_socket_option (s, option, value)) { - opts = Flist (nargs, args); - set_socket_options (XINT (XPROCESS (process)->infd), opts, 0); + p->childp = Fplist_put (p->childp, option, value); + return Qt; } - return process; + + if (NILP (no_error)) + error ("Unknown or unsupported option"); + + return Qnil; } + /* A version of request_sigio suitable for a record_unwind_protect. */ @@ -2604,10 +2597,10 @@ address data with one element per address data byte. Do not rely on this format in portable code, as it may depend on implementation defined constants, data sizes, and data structure alignment. -:coding CODING -- CODING is coding system for this process. - -:options OPTIONS -- Set the specified options for the network process. -See `set-network-process-options' for details. +:coding CODING -- If CODING is a symbol, it specifies the coding +system used for both reading and writing for this process. If CODING +is a cons (DECODING . ENCODING), DECODING is used for reading, and +ENCODING is used for writing. :nowait BOOL -- If BOOL is non-nil for a stream type client process, return without waiting for the connection to complete; instead, the @@ -2641,13 +2634,33 @@ and MESSAGE is a string. :plist PLIST -- Install PLIST as the new process' initial plist. -:server BOOL -- if BOOL is non-nil, create a server process for the +:server QLEN -- if QLEN is non-nil, create a server process for the specified FAMILY, SERVICE, and connection type (stream or datagram). -Default is a client process. +If QLEN is an integer, it is used as the max. length of the server's +pending connection queue (also known as the backlog); the default +queue length is 5. Default is to create a client process. + +The following network options can be specified for this connection: + +:broadcast BOOL -- Allow send and receive of datagram broadcasts. +:dontroute BOOL -- Only send to directly connected hosts. +:keepalive BOOL -- Send keep-alive messages on network stream. +:linger BOOL or TIMEOUT -- Send queued messages before closing. +:oobinline BOOL -- Place out-of-band data in receive data stream. +:priority INT -- Set protocol defined priority for sent packets. +:reuseaddr BOOL -- Allow reusing a recently used local address + (this is allowed by default for a server process). +:bindtodevice NAME -- bind to interface NAME. Using this may require + special privileges on some systems. + +Consult the relevant system programmer's manual pages for more +information on using these options. + + +A server process will listen for and accept connections from clients. +When a client connection is accepted, a new network process is created +for the connection with the following parameters: -A server process will listen for and accept connections from -clients. When a client connection is accepted, a new network process -is created for the connection with the following parameters: - The client's process name is constructed by concatenating the server process' NAME and a client identification string. - If the FILTER argument is non-nil, the client process will not get a @@ -2708,7 +2721,7 @@ usage: (make-network-process &rest ARGS) */) Lisp_Object name, buffer, host, service, address; Lisp_Object filter, sentinel; int is_non_blocking_client = 0; - int is_server = 0; + int is_server = 0, backlog = 5; int socktype; int family = -1; @@ -2745,6 +2758,8 @@ usage: (make-network-process &rest ARGS) */) error ("Network servers not supported"); #else is_server = 1; + if (INTEGERP (tem)) + backlog = XINT (tem); #endif } @@ -2997,6 +3012,8 @@ usage: (make-network-process &rest ARGS) */) for (lres = res; lres; lres = lres->ai_next) { + int optn, optbits; + s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol); if (s < 0) { @@ -3030,17 +3047,27 @@ usage: (make-network-process &rest ARGS) */) /* Make us close S if quit. */ record_unwind_protect (close_file_unwind, make_number (s)); + /* Parse network options in the arg list. + We simply ignore anything which isn't a known option (including other keywords). + An error is signalled if setting a known option fails. */ + for (optn = optbits = 0; optn < nargs-1; optn += 2) + optbits |= set_socket_option (s, args[optn], args[optn+1]); + if (is_server) { /* Configure as a server socket. */ + + /* SO_REUSEADDR = 1 is default for server sockets; must specify + explicit :reuseaddr key to override this. */ #ifdef HAVE_LOCAL_SOCKETS if (family != AF_LOCAL) #endif - { - int optval = 1; - if (setsockopt (s, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval)) - report_file_error ("Cannot set reuse option on server socket.", Qnil); - } + if (!(optbits & (1 << OPIX_REUSEADDR))) + { + int optval = 1; + if (setsockopt (s, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval)) + report_file_error ("Cannot set reuse option on server socket", Qnil); + } if (bind (s, lres->ai_addr, lres->ai_addrlen)) report_file_error ("Cannot bind server socket", Qnil); @@ -3059,7 +3086,7 @@ usage: (make-network-process &rest ARGS) */) } #endif - if (socktype == SOCK_STREAM && listen (s, 5)) + if (socktype == SOCK_STREAM && listen (s, backlog)) report_file_error ("Cannot listen on server socket", Qnil); break; @@ -3195,10 +3222,6 @@ usage: (make-network-process &rest ARGS) */) report_file_error ("make client process failed", contact); } - tem = Fplist_get (contact, QCoptions); - if (!NILP (tem)) - set_socket_options (s, tem, 1); - #endif /* not TERM */ inch = s; @@ -3280,7 +3303,11 @@ usage: (make-network-process &rest ARGS) */) Lisp_Object args[5], val; if (!NILP (tem)) - val = XCAR (XCDR (tem)); + { + val = XCAR (XCDR (tem)); + if (CONSP (val)) + val = XCAR (val); + } else if (!NILP (Vcoding_system_for_read)) val = Vcoding_system_for_read; else if ((!NILP (buffer) && NILP (XBUFFER (buffer)->enable_multibyte_characters)) @@ -3312,7 +3339,11 @@ usage: (make-network-process &rest ARGS) */) p->decode_coding_system = val; if (!NILP (tem)) - val = XCAR (XCDR (tem)); + { + val = XCAR (XCDR (tem)); + if (CONSP (val)) + val = XCDR (val); + } else if (!NILP (Vcoding_system_for_write)) val = Vcoding_system_for_write; else if (NILP (current_buffer->enable_multibyte_characters)) @@ -3357,6 +3388,234 @@ usage: (make-network-process &rest ARGS) */) } #endif /* HAVE_SOCKETS */ + +#if defined(HAVE_SOCKETS) && defined(HAVE_NET_IF_H) && defined(HAVE_SYS_IOCTL_H) + +#ifdef SIOCGIFCONF +DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_list, 0, 0, 0, + doc: /* Return an alist of all network interfaces and their network address. +Each element is a cons, the car of which is a string containing the +interface name, and the cdr is the network address in internal +format; see the description of ADDRESS in `make-network-process'. */) + () +{ + struct ifconf ifconf; + struct ifreq *ifreqs = NULL; + int ifaces = 0; + int buf_size, s; + Lisp_Object res; + + s = socket (AF_INET, SOCK_STREAM, 0); + if (s < 0) + return Qnil; + + again: + ifaces += 25; + buf_size = ifaces * sizeof(ifreqs[0]); + ifreqs = (struct ifreq *)xrealloc(ifreqs, buf_size); + if (!ifreqs) + { + close (s); + return Qnil; + } + + ifconf.ifc_len = buf_size; + ifconf.ifc_req = ifreqs; + if (ioctl (s, SIOCGIFCONF, &ifconf)) + { + close (s); + return Qnil; + } + + if (ifconf.ifc_len == buf_size) + goto again; + + close (s); + ifaces = ifconf.ifc_len / sizeof (ifreqs[0]); + + res = Qnil; + while (--ifaces >= 0) + { + struct ifreq *ifq = &ifreqs[ifaces]; + char namebuf[sizeof (ifq->ifr_name) + 1]; + if (ifq->ifr_addr.sa_family != AF_INET) + continue; + bcopy (ifq->ifr_name, namebuf, sizeof (ifq->ifr_name)); + namebuf[sizeof (ifq->ifr_name)] = 0; + res = Fcons (Fcons (build_string (namebuf), + conv_sockaddr_to_lisp (&ifq->ifr_addr, + sizeof (struct sockaddr))), + res); + } + + return res; +} +#endif /* SIOCGIFCONF */ + +#if defined(SIOCGIFADDR) || defined(SIOCGIFHWADDR) || defined(SIOCGIFFLAGS) + +struct ifflag_def { + int flag_bit; + char *flag_sym; +}; + +static struct ifflag_def ifflag_table[] = { +#ifdef IFF_UP + { IFF_UP, "up" }, +#endif +#ifdef IFF_BROADCAST + { IFF_BROADCAST, "broadcast" }, +#endif +#ifdef IFF_DEBUG + { IFF_DEBUG, "debug" }, +#endif +#ifdef IFF_LOOPBACK + { IFF_LOOPBACK, "loopback" }, +#endif +#ifdef IFF_POINTOPOINT + { IFF_POINTOPOINT, "pointopoint" }, +#endif +#ifdef IFF_RUNNING + { IFF_RUNNING, "running" }, +#endif +#ifdef IFF_NOARP + { IFF_NOARP, "noarp" }, +#endif +#ifdef IFF_PROMISC + { IFF_PROMISC, "promisc" }, +#endif +#ifdef IFF_NOTRAILERS + { IFF_NOTRAILERS, "notrailers" }, +#endif +#ifdef IFF_ALLMULTI + { IFF_ALLMULTI, "allmulti" }, +#endif +#ifdef IFF_MASTER + { IFF_MASTER, "master" }, +#endif +#ifdef IFF_SLAVE + { IFF_SLAVE, "slave" }, +#endif +#ifdef IFF_MULTICAST + { IFF_MULTICAST, "multicast" }, +#endif +#ifdef IFF_PORTSEL + { IFF_PORTSEL, "portsel" }, +#endif +#ifdef IFF_AUTOMEDIA + { IFF_AUTOMEDIA, "automedia" }, +#endif +#ifdef IFF_DYNAMIC + { IFF_DYNAMIC, "dynamic" }, +#endif + { 0, 0 } +}; + +DEFUN ("network-interface-info", Fnetwork_interface_info, Snetwork_interface_info, 1, 1, 0, + doc: /* Return information about network interface named IFNAME. +The return value is a list (ADDR BCAST NETMASK HWADDR FLAGS), +where ADDR is the layer 3 address, BCAST is the layer 3 broadcast address, +NETMASK is the layer 3 network mask, HWADDR is the layer 2 addres, and +FLAGS is the current flags of the interface. */) + (ifname) + Lisp_Object ifname; +{ + struct ifreq rq; + Lisp_Object res = Qnil; + Lisp_Object elt; + int s; + int any = 0; + + CHECK_STRING (ifname); + + bzero (rq.ifr_name, sizeof rq.ifr_name); + strncpy (rq.ifr_name, SDATA (ifname), sizeof (rq.ifr_name)); + + s = socket (AF_INET, SOCK_STREAM, 0); + if (s < 0) + return Qnil; + + elt = Qnil; +#if defined(SIOCGIFFLAGS) && defined(HAVE_STRUCT_IFREQ_IFR_FLAGS) + if (ioctl (s, SIOCGIFFLAGS, &rq) == 0) + { + int flags = rq.ifr_flags; + struct ifflag_def *fp; + int fnum; + + any++; + for (fp = ifflag_table; flags != 0 && fp; fp++) + { + if (flags & fp->flag_bit) + { + elt = Fcons (intern (fp->flag_sym), elt); + flags -= fp->flag_bit; + } + } + for (fnum = 0; flags && fnum < 32; fnum++) + { + if (flags & (1 << fnum)) + { + elt = Fcons (make_number (fnum), elt); + } + } + } +#endif + res = Fcons (elt, res); + + elt = Qnil; +#if defined(SIOCGIFHWADDR) && defined(HAVE_STRUCT_IFREQ_IFR_HWADDR) + if (ioctl (s, SIOCGIFHWADDR, &rq) == 0) + { + Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil); + register struct Lisp_Vector *p = XVECTOR (hwaddr); + int n; + + any++; + for (n = 0; n < 6; n++) + p->contents[n] = make_number (((unsigned char *)&rq.ifr_hwaddr.sa_data[0])[n]); + elt = Fcons (make_number (rq.ifr_hwaddr.sa_family), hwaddr); + } +#endif + res = Fcons (elt, res); + + elt = Qnil; +#if defined(SIOCGIFNETMASK) && defined(ifr_netmask) + if (ioctl (s, SIOCGIFNETMASK, &rq) == 0) + { + any++; + elt = conv_sockaddr_to_lisp (&rq.ifr_netmask, sizeof (rq.ifr_netmask)); + } +#endif + res = Fcons (elt, res); + + elt = Qnil; +#if defined(SIOCGIFBRDADDR) && defined(HAVE_STRUCT_IFREQ_IFR_BROADADDR) + if (ioctl (s, SIOCGIFBRDADDR, &rq) == 0) + { + any++; + elt = conv_sockaddr_to_lisp (&rq.ifr_broadaddr, sizeof (rq.ifr_broadaddr)); + } +#endif + res = Fcons (elt, res); + + elt = Qnil; +#if defined(SIOCGIFADDR) && defined(HAVE_STRUCT_IFREQ_IFR_ADDR) + if (ioctl (s, SIOCGIFADDR, &rq) == 0) + { + any++; + elt = conv_sockaddr_to_lisp (&rq.ifr_addr, sizeof (rq.ifr_addr)); + } +#endif + res = Fcons (elt, res); + + close (s); + + return any ? res : Qnil; +} +#endif +#endif /* HAVE_SOCKETS */ + void deactivate_process (proc) Lisp_Object proc; @@ -3367,6 +3626,16 @@ deactivate_process (proc) inchannel = XINT (p->infd); outchannel = XINT (p->outfd); +#ifdef ADAPTIVE_READ_BUFFERING + if (XINT (p->read_output_delay) > 0) + { + if (--process_output_delay_count < 0) + process_output_delay_count = 0; + XSETINT (p->read_output_delay, 0); + p->read_output_skip = Qnil; + } +#endif + if (inchannel >= 0) { /* Beware SIGCHLD hereabouts. */ @@ -3752,7 +4021,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) register int channel, nfds; static SELECT_TYPE Available; static SELECT_TYPE Connecting; - int check_connect, no_avail; + int check_connect, check_delay, no_avail; int xerrno; Lisp_Object proc; EMACS_TIME timeout, end_time; @@ -3812,6 +4081,10 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) Otherwise, do pending quit if requested. */ if (XINT (read_kbd) >= 0) QUIT; +#ifdef SYNC_INPUT + else if (interrupt_input_pending) + handle_async_input (); +#endif /* Exit now if the cell we're waiting for became non-nil. */ if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) @@ -3981,7 +4254,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) if (!NILP (wait_for_cell)) { Available = non_process_wait_mask; - check_connect = 0; + check_connect = check_delay = 0; } else { @@ -3990,6 +4263,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) else Available = input_wait_mask; check_connect = (num_pending_connects > 0); + check_delay = wait_channel >= 0 ? 0 : process_output_delay_count; } /* If frame size has changed or the window is newly mapped, @@ -4015,6 +4289,34 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) { if (check_connect) Connecting = connect_wait_mask; + +#ifdef ADAPTIVE_READ_BUFFERING + if (process_output_skip && check_delay > 0) + { + int usecs = EMACS_USECS (timeout); + if (EMACS_SECS (timeout) > 0 || usecs > READ_OUTPUT_DELAY_MAX) + usecs = READ_OUTPUT_DELAY_MAX; + for (channel = 0; check_delay > 0 && channel <= max_process_desc; channel++) + { + proc = chan_process[channel]; + if (NILP (proc)) + continue; + if (XINT (XPROCESS (proc)->read_output_delay) > 0) + { + check_delay--; + if (NILP (XPROCESS (proc)->read_output_skip)) + continue; + FD_CLR (channel, &Available); + XPROCESS (proc)->read_output_skip = Qnil; + if (XINT (XPROCESS (proc)->read_output_delay) < usecs) + usecs = XINT (XPROCESS (proc)->read_output_delay); + } + } + EMACS_SET_SECS_USECS (timeout, 0, usecs); + process_output_skip = 0; + } +#endif + nfds = select (max (max_process_desc, max_keyboard_desc) + 1, &Available, (check_connect ? &Connecting : (SELECT_TYPE *)0), @@ -4468,7 +4770,36 @@ read_process_output (proc, channel) else #endif if (proc_buffered_char[channel] < 0) - nbytes = emacs_read (channel, chars + carryover, readmax - carryover); + { + nbytes = emacs_read (channel, chars + carryover, readmax - carryover); +#ifdef ADAPTIVE_READ_BUFFERING + if (!NILP (p->adaptive_read_buffering)) + { + int delay = XINT (p->read_output_delay); + if (nbytes < 256) + { + if (delay < READ_OUTPUT_DELAY_MAX_MAX) + { + if (delay == 0) + process_output_delay_count++; + delay += READ_OUTPUT_DELAY_INCREMENT * 2; + } + } + else if (delay > 0 && (nbytes == readmax - carryover)) + { + delay -= READ_OUTPUT_DELAY_INCREMENT; + if (delay == 0) + process_output_delay_count--; + } + XSETINT (p->read_output_delay, delay); + if (delay) + { + p->read_output_skip = Qt; + process_output_skip = 1; + } + } +#endif + } else { chars[carryover] = proc_buffered_char[channel]; @@ -4774,6 +5105,7 @@ send_process (proc, buf, len, object) volatile Lisp_Object object; { /* Use volatile to protect variables from being clobbered by longjmp. */ + struct Lisp_Process *p = XPROCESS (proc); int rv; struct coding_system *coding; struct gcpro gcpro1; @@ -4781,20 +5113,17 @@ send_process (proc, buf, len, object) GCPRO1 (object); #ifdef VMS - struct Lisp_Process *p = XPROCESS (proc); VMS_PROC_STUFF *vs, *get_vms_process_pointer(); #endif /* VMS */ - if (! NILP (XPROCESS (proc)->raw_status_low)) - update_status (XPROCESS (proc)); - if (! EQ (XPROCESS (proc)->status, Qrun)) - error ("Process %s not running", - SDATA (XPROCESS (proc)->name)); - if (XINT (XPROCESS (proc)->outfd) < 0) - error ("Output file descriptor of %s is closed", - SDATA (XPROCESS (proc)->name)); + if (! NILP (p->raw_status_low)) + update_status (p); + if (! EQ (p->status, Qrun)) + error ("Process %s not running", SDATA (p->name)); + if (XINT (p->outfd) < 0) + error ("Output file descriptor of %s is closed", SDATA (p->name)); - coding = proc_encode_coding_system[XINT (XPROCESS (proc)->outfd)]; + coding = proc_encode_coding_system[XINT (p->outfd)]; Vlast_coding_system_used = CODING_ID_NAME (coding->id); if ((STRINGP (object) && STRING_MULTIBYTE (object)) @@ -4802,14 +5131,12 @@ send_process (proc, buf, len, object) && !NILP (XBUFFER (object)->enable_multibyte_characters)) || EQ (object, Qt)) { - if (!EQ (Vlast_coding_system_used, - XPROCESS (proc)->encode_coding_system)) + if (!EQ (Vlast_coding_system_used, p->encode_coding_system)) /* The coding system for encoding was changed to raw-text because we sent a unibyte text previously. Now we are sending a multibyte text, thus we must encode it by the - original coding system specified for the current - process. */ - setup_coding_system (XPROCESS (proc)->encode_coding_system, coding); + original coding system specified for the current process. */ + setup_coding_system (p->encode_coding_system, coding); coding->src_multibyte = 1; } else @@ -4880,8 +5207,7 @@ send_process (proc, buf, len, object) if (pty_max_bytes == 0) { #if defined (HAVE_FPATHCONF) && defined (_PC_MAX_CANON) - pty_max_bytes = fpathconf (XFASTINT (XPROCESS (proc)->outfd), - _PC_MAX_CANON); + pty_max_bytes = fpathconf (XFASTINT (p->outfd), _PC_MAX_CANON); if (pty_max_bytes < 0) pty_max_bytes = 250; #else @@ -4904,7 +5230,7 @@ send_process (proc, buf, len, object) /* Decide how much data we can send in one batch. Long lines need to be split into multiple batches. */ - if (!NILP (XPROCESS (proc)->pty_flag)) + if (!NILP (p->pty_flag)) { /* Starting this at zero is always correct when not the first iteration because the previous iteration ended by sending C-d. @@ -4933,7 +5259,7 @@ send_process (proc, buf, len, object) /* Send this batch, using one or more write calls. */ while (this > 0) { - int outfd = XINT (XPROCESS (proc)->outfd); + int outfd = XINT (p->outfd); old_sigpipe = (SIGTYPE (*) ()) signal (SIGPIPE, send_process_trap); #ifdef DATAGRAM_SOCKETS if (DATAGRAM_CHAN_P (outfd)) @@ -4946,7 +5272,18 @@ send_process (proc, buf, len, object) } else #endif - rv = emacs_write (outfd, (char *) buf, this); + { + rv = emacs_write (outfd, (char *) buf, this); +#ifdef ADAPTIVE_READ_BUFFERING + if (XINT (p->read_output_delay) > 0 + && EQ (p->adaptive_read_buffering, Qt)) + { + XSETFASTINT (p->read_output_delay, 0); + process_output_delay_count--; + p->read_output_skip = Qnil; + } +#endif + } signal (SIGPIPE, old_sigpipe); if (rv < 0) @@ -4987,8 +5324,7 @@ send_process (proc, buf, len, object) if (errno == EAGAIN) { int flags = FWRITE; - ioctl (XINT (XPROCESS (proc)->outfd), TIOCFLUSH, - &flags); + ioctl (XINT (p->outfd), TIOCFLUSH, &flags); } #endif /* BROKEN_PTY_READ_AFTER_EAGAIN */ @@ -5033,18 +5369,17 @@ send_process (proc, buf, len, object) { #ifndef VMS proc = process_sent_to; + p = XPROCESS (proc); #endif - XPROCESS (proc)->raw_status_low = Qnil; - XPROCESS (proc)->raw_status_high = Qnil; - XPROCESS (proc)->status = Fcons (Qexit, Fcons (make_number (256), Qnil)); - XSETINT (XPROCESS (proc)->tick, ++process_tick); + p->raw_status_low = Qnil; + p->raw_status_high = Qnil; + p->status = Fcons (Qexit, Fcons (make_number (256), Qnil)); + XSETINT (p->tick, ++process_tick); deactivate_process (proc); #ifdef VMS - error ("Error writing to process %s; closed it", - SDATA (XPROCESS (proc)->name)); + error ("Error writing to process %s; closed it", SDATA (p->name)); #else - error ("SIGPIPE raised on process %s; closed it", - SDATA (XPROCESS (proc)->name)); + error ("SIGPIPE raised on process %s; closed it", SDATA (p->name)); #endif } @@ -5758,7 +6093,10 @@ kill_buffer_processes (buffer) queued and the signal-catching function will be continually reentered until the queue is empty". Invoking signal() causes the kernel to reexamine the SIGCLD queue. Fred Fish, UniSoft Systems - Inc. */ + Inc. + + ** Malloc WARNING: This should never call malloc either directly or + indirectly; if it does, that is a bug */ SIGTYPE sigchld_handler (signo) @@ -5876,18 +6214,7 @@ sigchld_handler (signo) if (WIFEXITED (w)) synch_process_retcode = WRETCODE (w); else if (WIFSIGNALED (w)) - { - int code = WTERMSIG (w); - char *signame; - - synchronize_system_messages_locale (); - signame = strsignal (code); - - if (signame == 0) - signame = "unknown"; - - synch_process_death = signame; - } + synch_process_termsig = WTERMSIG (w); /* Tell wait_reading_process_input that it needs to wake up and look around. */ @@ -6281,6 +6608,11 @@ init_process () FD_ZERO (&non_process_wait_mask); max_process_desc = 0; +#ifdef ADAPTIVE_READ_BUFFERING + process_output_delay_count = 0; + process_output_skip = 0; +#endif + FD_SET (0, &input_wait_mask); Vprocess_alist = Qnil; @@ -6298,6 +6630,8 @@ init_process () #ifdef HAVE_SOCKETS { Lisp_Object subfeatures = Qnil; + struct socket_options *sopt; + #define ADD_SUBFEATURE(key, val) \ subfeatures = Fcons (Fcons (key, Fcons (val, Qnil)), subfeatures) @@ -6316,30 +6650,10 @@ init_process () #if !defined(TERM) && (defined(O_NONBLOCK) || defined(O_NDELAY)) ADD_SUBFEATURE (QCserver, Qt); #endif -#ifdef SO_BINDTODEVICE - ADD_SUBFEATURE (QCoptions, intern ("bindtodevice")); -#endif -#ifdef SO_BROADCAST - ADD_SUBFEATURE (QCoptions, intern ("broadcast")); -#endif -#ifdef SO_DONTROUTE - ADD_SUBFEATURE (QCoptions, intern ("dontroute")); -#endif -#ifdef SO_KEEPALIVE - ADD_SUBFEATURE (QCoptions, intern ("keepalive")); -#endif -#ifdef SO_LINGER - ADD_SUBFEATURE (QCoptions, intern ("linger")); -#endif -#ifdef SO_OOBINLINE - ADD_SUBFEATURE (QCoptions, intern ("oobinline")); -#endif -#ifdef SO_PRIORITY - ADD_SUBFEATURE (QCoptions, intern ("priority")); -#endif -#ifdef SO_REUSEADDR - ADD_SUBFEATURE (QCoptions, intern ("reuseaddr")); -#endif + + for (sopt = socket_options; sopt->name; sopt++) + subfeatures = Fcons (intern (sopt->name), subfeatures); + Fprovide (intern ("make-network-process"), subfeatures); } #endif /* HAVE_SOCKETS */ @@ -6432,6 +6746,20 @@ then a pipe is used in any case. The value takes effect when `start-process' is called. */); Vprocess_connection_type = Qt; +#ifdef ADAPTIVE_READ_BUFFERING + DEFVAR_LISP ("process-adaptive-read-buffering", &Vprocess_adaptive_read_buffering, + doc: /* If non-nil, improve receive buffering by delaying after short reads. +On some systems, when emacs reads the output from a subprocess, the output data +is read in very small blocks, potentially resulting in very poor performance. +This behaviour can be remedied to some extent by setting this variable to a +non-nil value, as it will automatically delay reading from such processes, to +allowing them to produce more output before emacs tries to read it. +If the value is t, the delay is reset after each write to the process; any other +non-nil value means that the delay is not reset on write. +The variable takes effect when `start-process' is called. */); + Vprocess_adaptive_read_buffering = Qt; +#endif + defsubr (&Sprocessp); defsubr (&Sget_process); defsubr (&Sget_buffer_process); @@ -6461,10 +6789,18 @@ The value takes effect when `start-process' is called. */); defsubr (&Sprocess_list); defsubr (&Sstart_process); #ifdef HAVE_SOCKETS - defsubr (&Sset_network_process_options); + defsubr (&Sset_network_process_option); defsubr (&Smake_network_process); defsubr (&Sformat_network_address); #endif /* HAVE_SOCKETS */ +#if defined(HAVE_SOCKETS) && defined(HAVE_NET_IF_H) && defined(HAVE_SYS_IOCTL_H) +#ifdef SIOCGIFCONF + defsubr (&Snetwork_interface_list); +#endif +#if defined(SIOCGIFADDR) || defined(SIOCGIFHWADDR) || defined(SIOCGIFFLAGS) + defsubr (&Snetwork_interface_info); +#endif +#endif /* HAVE_SOCKETS ... */ #ifdef DATAGRAM_SOCKETS defsubr (&Sprocess_datagram_address); defsubr (&Sset_process_datagram_address); @@ -6796,3 +7132,6 @@ syms_of_process () #endif /* not subprocesses */ + +/* arch-tag: 3706c011-7b9a-4117-bd4f-59e7f701a4c4 + (do not change this comment) */ diff --git a/src/process.h b/src/process.h index 6ad7f7ddf5..6e2641d6b0 100644 --- a/src/process.h +++ b/src/process.h @@ -101,6 +101,18 @@ struct Lisp_Process generated, and can be changed by the function `set-process-fileter-multibyte'. */ Lisp_Object filter_multibyte; + /* Should we delay reading output from this process. + Initialized from `Vprocess_adaptive_read_buffering'. */ + Lisp_Object adaptive_read_buffering; + /* Hysteresis to try to read process output in larger blocks. + On some systems, e.g. the Linux kernel, emacs is seen as + an interactive app also when reading process output, meaning + that process output can be read in as little as 1 byte at a + time. Value is micro-seconds to delay reading output from + this process. Range is 0 .. 50000. */ + Lisp_Object read_output_delay; + /* Skip reading this process on next read. */ + Lisp_Object read_output_skip; }; /* Every field in the preceding structure except for the first two @@ -124,6 +136,9 @@ extern int synch_process_alive; /* Nonzero => this is a string explaining death of synchronous subprocess. */ extern char *synch_process_death; +/* Nonzero => this is the signal number that terminated the subprocess. */ +extern int synch_process_termsig; + /* If synch_process_death is zero, this is exit code of synchronous subprocess. */ extern int synch_process_retcode; @@ -133,3 +148,6 @@ extern int synch_process_retcode; #ifndef NULL_DEVICE #define NULL_DEVICE "/dev/null" #endif + +/* arch-tag: dffedfc4-d7bc-4b58-a26f-c16155449c72 + (do not change this comment) */ diff --git a/src/puresize.h b/src/puresize.h index cc91da7d9f..8088a37476 100644 --- a/src/puresize.h +++ b/src/puresize.h @@ -68,7 +68,7 @@ extern void pure_write_error P_ ((void)); /* Define PURE_P. */ -#ifdef VIRT_ADDR_VARIES +#if defined(VIRT_ADDR_VARIES) || defined(CYGWIN) /* For machines like APOLLO where text and data can go anywhere in virtual memory. */ @@ -96,3 +96,6 @@ extern char my_edata[]; #endif /* PNTR_COMPARISON_TYPE */ #endif /* VIRT_ADDRESS_VARIES */ + +/* arch-tag: fd9b0a91-a70e-4729-a75a-6bb4ca1ce14f + (do not change this comment) */ diff --git a/src/ralloc.c b/src/ralloc.c index f710cfdc2b..75c25258a9 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -1286,3 +1286,6 @@ r_alloc_init () use_relocatable_buffers = 1; } + +/* arch-tag: 6a524a15-faff-44c8-95d4-a5da6f55110f + (do not change this comment) */ diff --git a/src/region-cache.c b/src/region-cache.c index b5b5202653..251382a5a0 100644 --- a/src/region-cache.c +++ b/src/region-cache.c @@ -21,12 +21,12 @@ Boston, MA 02111-1307, USA. */ #include +#include + #include "lisp.h" #include "buffer.h" #include "region-cache.h" -#include - /* Data structures. */ @@ -832,3 +832,6 @@ pp_cache (c) fprintf (stderr, "%d : %d\n", pos, BOUNDARY_VALUE (c, i)); } } + +/* arch-tag: 98c29f3f-2ca2-4e3a-92f0-f2249200a17d + (do not change this comment) */ diff --git a/src/region-cache.h b/src/region-cache.h index 073d26b6bf..9c104b51a1 100644 --- a/src/region-cache.h +++ b/src/region-cache.h @@ -110,3 +110,6 @@ extern int region_cache_backward P_ ((struct buffer *BUF, struct region_cache *CACHE, int POS, int *NEXT)); + +/* arch-tag: 70f79125-ef22-4f58-9aec-a48ca2791435 + (do not change this comment) */ diff --git a/src/s/386-ix.h b/src/s/386-ix.h index dc17281df0..33658dd65e 100644 --- a/src/s/386-ix.h +++ b/src/s/386-ix.h @@ -13,3 +13,6 @@ /* This is said to be needed as a result of having _insque rather than insque in -loldX. This may not always be the right thing. */ #define WRONG_NAME_INSQUE + +/* arch-tag: c2fc2d64-46fd-4a87-933b-85eff622829c + (do not change this comment) */ diff --git a/src/s/386bsd.h b/src/s/386bsd.h index 427dc2003d..706fbf23ac 100644 --- a/src/s/386bsd.h +++ b/src/s/386bsd.h @@ -22,3 +22,6 @@ /* This affects a declaration in xrdb.c. */ #define DECLARE_GETPWUID_WITH_UID_T + +/* arch-tag: 8a114892-0863-4285-a4cb-3d66ba2d8e7b + (do not change this comment) */ diff --git a/src/s/aix3-1.h b/src/s/aix3-1.h index 330cbae427..b96bf4373b 100644 --- a/src/s/aix3-1.h +++ b/src/s/aix3-1.h @@ -213,3 +213,5 @@ Boston, MA 02111-1307, USA. */ /* For unexaix.c. */ #define ALIGN_DATA_RELOC +/* arch-tag: bfff798c-542d-4290-91f2-267394c85b7b + (do not change this comment) */ diff --git a/src/s/aix3-2-5.h b/src/s/aix3-2-5.h index 04c8ccf44a..6c8458cc8a 100644 --- a/src/s/aix3-2-5.h +++ b/src/s/aix3-2-5.h @@ -28,3 +28,6 @@ /* Bill Woodward says: libIM *must* precede libXm, to avoid getting aixLoadIM error messages. */ #define LIB_MOTIF -lIM -lXm + +/* arch-tag: 692b3acb-5383-4cfb-93f6-378b5c48c75e + (do not change this comment) */ diff --git a/src/s/aix3-2.h b/src/s/aix3-2.h index b8e5bd6d65..6dfbe5d751 100644 --- a/src/s/aix3-2.h +++ b/src/s/aix3-2.h @@ -49,3 +49,6 @@ lose declaring char * rindex without this. It is just a guess which versions of AIX need this definition. */ #undef HAVE_STRING_H + +/* arch-tag: 0935754d-67e1-4697-978a-3e9976da05c3 + (do not change this comment) */ diff --git a/src/s/aix4-1.h b/src/s/aix4-1.h index e179684f3b..21d05cb154 100644 --- a/src/s/aix4-1.h +++ b/src/s/aix4-1.h @@ -40,3 +40,6 @@ /* Unfortunately without libXmu we cannot support EditRes. */ #define NO_EDITRES #endif + +/* arch-tag: 72d598e1-bc3e-48e0-bfd2-693917c3738e + (do not change this comment) */ diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h index fbc20b24a5..66b7d322b5 100644 --- a/src/s/aix4-2.h +++ b/src/s/aix4-2.h @@ -1,3 +1,6 @@ #include "aix4-1.h" #undef ALIGN_DATA_RELOC + +/* arch-tag: 38fe75ea-6aef-42bd-8449-bc34d921a562 + (do not change this comment) */ diff --git a/src/s/aix4.h b/src/s/aix4.h index 5e1be65241..b2ed15f75e 100644 --- a/src/s/aix4.h +++ b/src/s/aix4.h @@ -12,3 +12,6 @@ /* Specify the type that the 3rd arg of `accept' points to. It is just a guess which versions of AIX need this definition. */ #define SOCKLEN_TYPE int + +/* arch-tag: b9471dfc-ccdc-4980-a8a1-80c7627ec6b2 + (do not change this comment) */ diff --git a/src/s/bsd386.h b/src/s/bsd386.h index 99280daf83..30833b5ff9 100644 --- a/src/s/bsd386.h +++ b/src/s/bsd386.h @@ -43,3 +43,6 @@ #endif #define GETPGRP_NO_ARG 1 + +/* arch-tag: 867e3bb8-e9df-4763-9c82-8f4accb8209e + (do not change this comment) */ diff --git a/src/s/bsd4-1.h b/src/s/bsd4-1.h index fc797755c0..624f7090f8 100644 --- a/src/s/bsd4-1.h +++ b/src/s/bsd4-1.h @@ -127,3 +127,6 @@ Boston, MA 02111-1307, USA. */ /* Special library needed for linking for 4.1. */ #define LIBS_SYSTEM -ljobs + +/* arch-tag: de56716a-ed9b-4851-a5c5-c882efaf9931 + (do not change this comment) */ diff --git a/src/s/bsd4-2.h b/src/s/bsd4-2.h index 27ad9a5fe6..e39a8c8194 100644 --- a/src/s/bsd4-2.h +++ b/src/s/bsd4-2.h @@ -118,3 +118,6 @@ Boston, MA 02111-1307, USA. */ /* Process groups work in the traditional BSD manner. */ #define BSD_PGRPS + +/* arch-tag: 38ca640f-549e-4726-a257-71048ab4c480 + (do not change this comment) */ diff --git a/src/s/bsd4-3.h b/src/s/bsd4-3.h index 46cb3a5352..f5db6fbb5c 100644 --- a/src/s/bsd4-3.h +++ b/src/s/bsd4-3.h @@ -118,3 +118,5 @@ Boston, MA 02111-1307, USA. */ #define SIGNALS_VIA_CHARACTERS +/* arch-tag: 0c367245-bde3-492e-9029-3ff6898beb95 + (do not change this comment) */ diff --git a/src/s/bsdos2-1.h b/src/s/bsdos2-1.h index 7a8b6630d0..244d58f513 100644 --- a/src/s/bsdos2-1.h +++ b/src/s/bsdos2-1.h @@ -4,3 +4,6 @@ #undef LIB_X11_LIB #define LIB_X11_LIB -L/usr/X11/lib -lX11 -lipc + +/* arch-tag: cf1ada4a-cdbf-452b-a264-ff84dd523e97 + (do not change this comment) */ diff --git a/src/s/bsdos2.h b/src/s/bsdos2.h index a6970b6549..9e1e82fd75 100644 --- a/src/s/bsdos2.h +++ b/src/s/bsdos2.h @@ -9,3 +9,6 @@ #undef KERNEL_FILE #define KERNEL_FILE "/bsd" + +/* arch-tag: 25ce1827-1511-4305-9058-24dd2118b5b4 + (do not change this comment) */ diff --git a/src/s/bsdos3.h b/src/s/bsdos3.h index faa5f821e2..20a9704e14 100644 --- a/src/s/bsdos3.h +++ b/src/s/bsdos3.h @@ -4,3 +4,6 @@ #undef LIBS_SYSTEM #define LIBS_SYSTEM -lkvm + +/* arch-tag: 726766f3-5a62-48bf-8e21-3b21ec6abe6f + (do not change this comment) */ diff --git a/src/s/bsdos4.h b/src/s/bsdos4.h index 6c3e498deb..540e4a7d79 100644 --- a/src/s/bsdos4.h +++ b/src/s/bsdos4.h @@ -21,3 +21,6 @@ #define LIB_GCC #endif /* not __ELF__ */ + +/* arch-tag: 7659632a-a879-4153-bb8b-3765a1463ca1 + (do not change this comment) */ diff --git a/src/s/cxux.h b/src/s/cxux.h index c39f2413cc..fd8b00ff2b 100644 --- a/src/s/cxux.h +++ b/src/s/cxux.h @@ -230,3 +230,6 @@ Boston, MA 02111-1307, USA. */ Note that emacs carefully avoids static vars inside functions. */ /* #define static */ + +/* arch-tag: 5febe5fe-f0b0-49cb-9280-9d5a9fa43710 + (do not change this comment) */ diff --git a/src/s/cxux7.h b/src/s/cxux7.h index 83323a9864..b9ecf45f6b 100644 --- a/src/s/cxux7.h +++ b/src/s/cxux7.h @@ -5,3 +5,6 @@ #define USING_CX_UX_7 #include "cxux.h" + +/* arch-tag: 520cfbad-fd5c-4b3b-ace4-66e9bcd31a60 + (do not change this comment) */ diff --git a/src/s/cygwin.h b/src/s/cygwin.h index d10a726405..38e346ac51 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h @@ -115,10 +115,8 @@ Boston, MA 02111-1307, USA. */ #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) #define GETPGRP_NO_ARG 1 #define SYSV_SYSTEM_DIR 1 -/* -lutil comes from inetutils and has pty functions in it */ -#define LIBS_SYSTEM -lutil -/* undumping is not implemented yet */ -#define CANNOT_DUMP 1 +#define LIB_STANDARD_LIBSRC +#define UNEXEC unexcw.o #define POSIX_SIGNALS 1 /* force the emacs image to start high in memory, so dll relocation can put things in low memory without causing all sorts of grief for @@ -137,10 +135,13 @@ Boston, MA 02111-1307, USA. */ /*#define HAVE_VFORK*/ /* Xaw3d causes problems -- might have been fixed by NARROWPROTO above, but I haven't tried it */ -#undef HAVE_XAW3D +/*#undef HAVE_XAW3D*/ /* vfork() interacts badly with setsid(), causing ptys to fail to change their controlling terminal */ #define vfork fork /* the end */ + +/* arch-tag: 5ae7ba00-83b0-4ab3-806a-3e845779191b + (do not change this comment) */ diff --git a/src/s/darwin.h b/src/s/darwin.h index e9faa6605c..814de2c2c5 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h @@ -1,5 +1,5 @@ /* System description header file for Darwin (Mac OS X). - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 02, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -203,9 +203,6 @@ Boston, MA 02111-1307, USA. */ /* Fix compilation problem for regex.c. */ #define __restrict -/* Fix compilation problem for md5.c. */ -#define __attribute__(x) - /* Used in dispnew.c. Copied from freebsd.h. */ #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) @@ -250,7 +247,7 @@ Boston, MA 02111-1307, USA. */ page) to leave room at the end of the header for adding load commands. Needed for dumping. 0x690 is the total size of 30 segment load commands (at 56 each). */ -#define LD_SWITCH_SYSTEM_TEMACS -prebind -framework Carbon -lstdc++ -Xlinker -headerpad -Xlinker 690 +#define LD_SWITCH_SYSTEM_TEMACS -prebind -framework Carbon -framework QuickTime -lstdc++ -Xlinker -headerpad -Xlinker 690 #define C_SWITCH_SYSTEM_TEMACS -Dtemacs @@ -316,3 +313,10 @@ struct kboard; #if defined (HAVE_CARBON) && (defined (emacs) || defined (temacs)) #define select sys_select #endif + +/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the + stack. */ +#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS + +/* arch-tag: 481d443d-4f89-43ea-b5fb-49706d95fa41 + (do not change this comment) */ diff --git a/src/s/dgux.h b/src/s/dgux.h index 95dee6b257..4c4a84d999 100644 --- a/src/s/dgux.h +++ b/src/s/dgux.h @@ -349,3 +349,6 @@ extern struct sigaction act, oact; /* Process groups work in the traditional BSD manner. */ #define BSD_PGRPS + +/* arch-tag: 1b6d117d-82d2-4480-a6d0-3f7a8360f658 + (do not change this comment) */ diff --git a/src/s/dgux4.h b/src/s/dgux4.h index 188429c1ae..7a1eaf4210 100644 --- a/src/s/dgux4.h +++ b/src/s/dgux4.h @@ -137,3 +137,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define PENDING_OUTPUT_COUNT(FILE) (1) #endif /* NOT_C_CODE */ + +/* arch-tag: c7013e7b-6e2e-44f2-ba61-90b6d5e2ea45 + (do not change this comment) */ diff --git a/src/s/dgux5-4-3.h b/src/s/dgux5-4-3.h index 8091b9f88c..3d4c4775c9 100644 --- a/src/s/dgux5-4-3.h +++ b/src/s/dgux5-4-3.h @@ -62,3 +62,6 @@ Boston, MA 02111-1307, USA. */ /* This is needed according to Ehud Karni for m88k-dg-dgux5.4R3.10. */ #undef BSD_PGRPS + +/* arch-tag: c11938c9-0cb0-4652-88aa-7eb80bf1cda9 + (do not change this comment) */ diff --git a/src/s/dgux5-4r2.h b/src/s/dgux5-4r2.h index 1eaeccdf26..7121f5e18a 100644 --- a/src/s/dgux5-4r2.h +++ b/src/s/dgux5-4r2.h @@ -45,3 +45,6 @@ Boston, MA 02111-1307, USA. */ caused trouble on DGUX 5.4.2. */ #define LIBS_SYSTEM -ldgc #endif + +/* arch-tag: a14f4043-6caa-4f01-a9b9-ae0fb0d2c96e + (do not change this comment) */ diff --git a/src/s/domain.h b/src/s/domain.h index dc57f8ff9a..ebcdc7ea36 100644 --- a/src/s/domain.h +++ b/src/s/domain.h @@ -2,3 +2,6 @@ /* Inhibit using -X, which is the default. */ #define LD_SWITCH_SYSTEM + +/* arch-tag: 08941c4f-d0b6-4ad6-b7e3-7e7fe76c0e94 + (do not change this comment) */ diff --git a/src/s/esix.h b/src/s/esix.h index 64d0822bf5..357e773647 100644 --- a/src/s/esix.h +++ b/src/s/esix.h @@ -22,3 +22,6 @@ #define NO_SIOCTL_H #define NEED_PTEM_H #define BROKEN_FIONREAD + +/* arch-tag: d66e6a70-0812-437d-aa35-9b01bd474941 + (do not change this comment) */ diff --git a/src/s/esix5r4.h b/src/s/esix5r4.h index d8cf0184f3..4240f3d7f4 100644 --- a/src/s/esix5r4.h +++ b/src/s/esix5r4.h @@ -22,3 +22,6 @@ /* zircon!joe says this makes X windows work. */ # define BROKEN_FIONREAD #endif + +/* arch-tag: 2d314ae9-0357-4ddf-96e5-cf821071ba4b + (do not change this comment) */ diff --git a/src/s/freebsd.h b/src/s/freebsd.h index 94336835f5..dbd08f5b3b 100644 --- a/src/s/freebsd.h +++ b/src/s/freebsd.h @@ -68,6 +68,9 @@ Boston, MA 02111-1307, USA. */ #define LIBS_SYSTEM -lutil #if __FreeBSD_version < 400000 #define LIBS_TERMCAP -ltermcap +#else +#define TERMINFO +#define LIBS_TERMCAP -lncurses #endif #define SYSV_SYSTEM_DIR @@ -216,3 +219,14 @@ Boston, MA 02111-1307, USA. */ of sigblock says it is obsolete. */ #define POSIX_SIGNALS 1 + +/* The `combreloc' setting became the default, and it seems to be + incompatible with unexec. Symptom is an immediate SEGV in + XtInitializeWidget when starting Emacs under X11. */ + +#if defined __FreeBSD_version && __FreeBSD_version >= 500042 +#define LD_SWITCH_SYSTEM_TEMACS -znocombreloc +#endif + +/* arch-tag: 426529ca-b7c4-448f-b10a-d4dcdc9c78eb + (do not change this comment) */ diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index ac0ad0b014..efdc2bc00e 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h @@ -362,3 +362,6 @@ Boston, MA 02111-1307, USA. */ #define GC_LISP_OBJECT_ALIGNMENT 2 #endif #endif + +/* arch-tag: 6244ea2a-abd0-44ec-abec-ff3dcc9afea9 + (do not change this comment) */ diff --git a/src/s/gnu.h b/src/s/gnu.h index 807ff80378..f7fb4899db 100644 --- a/src/s/gnu.h +++ b/src/s/gnu.h @@ -92,3 +92,6 @@ Boston, MA 02111-1307, USA. */ ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) #endif /* !_IO_STDIO_H */ #endif /* emacs */ + +/* arch-tag: 577983d9-87a6-4922-b8f8-ff2b563714a4 + (do not change this comment) */ diff --git a/src/s/hiuxmpp.h b/src/s/hiuxmpp.h index 5175bd10bf..04e0bd4f72 100644 --- a/src/s/hiuxmpp.h +++ b/src/s/hiuxmpp.h @@ -42,3 +42,5 @@ #undef LDAV_SYMBOL #define LDAV_SYMBOL "avenrun" +/* arch-tag: c5422584-cd86-4e10-8089-9f604523dab7 + (do not change this comment) */ diff --git a/src/s/hiuxwe2.h b/src/s/hiuxwe2.h index 5175bd10bf..004ddd9504 100644 --- a/src/s/hiuxwe2.h +++ b/src/s/hiuxwe2.h @@ -42,3 +42,5 @@ #undef LDAV_SYMBOL #define LDAV_SYMBOL "avenrun" +/* arch-tag: c56449e1-6d1b-4537-a596-0b08b8e4ec73 + (do not change this comment) */ diff --git a/src/s/hpux.h b/src/s/hpux.h index 9a2e7e845f..debf6aad6d 100644 --- a/src/s/hpux.h +++ b/src/s/hpux.h @@ -221,3 +221,6 @@ Boston, MA 02111-1307, USA. */ /* It's possible that HPUX 7 has sys/wait.h but it does not work right. */ #undef HAVE_SYS_WAIT_H #endif + +/* arch-tag: 75c1239f-fedb-4f64-8f86-7893e75699e8 + (do not change this comment) */ diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h index 8e661188d7..a15b81a5e9 100644 --- a/src/s/hpux10-20.h +++ b/src/s/hpux10-20.h @@ -9,3 +9,5 @@ don't exist from 10.20 on (see process.c) */ #undef POLL_INTERRUPTED_SYS_CALL +/* arch-tag: 8d8dcbf1-ca9b-48a1-94be-b750de18a5c6 + (do not change this comment) */ diff --git a/src/s/hpux10.h b/src/s/hpux10.h index ba0a11ff60..3612cfe002 100644 --- a/src/s/hpux10.h +++ b/src/s/hpux10.h @@ -60,3 +60,6 @@ Causes "poll: interrupted system call" messages when Emacs is run in an X window (see process.c) */ #define POLL_INTERRUPTED_SYS_CALL + +/* arch-tag: 1b95d569-a3c1-4fb0-8f69-fef264c17c24 + (do not change this comment) */ diff --git a/src/s/hpux11.h b/src/s/hpux11.h index 1d49d6eedc..7bd4afb116 100644 --- a/src/s/hpux11.h +++ b/src/s/hpux11.h @@ -13,3 +13,6 @@ /* It does work on HPUX to open the pty's tty in the parent (Emacs), then close and reopen it in the child. */ #define USG_SUBTTY_WORKS + +/* arch-tag: f5a3d780-82cd-4a9a-832e-a4031aab788b + (do not change this comment) */ diff --git a/src/s/hpux8.h b/src/s/hpux8.h index a151769fcf..e73c630e82 100644 --- a/src/s/hpux8.h +++ b/src/s/hpux8.h @@ -69,3 +69,6 @@ /* Enable a special hack in XTread_socket. */ #define X_IO_BUG + +/* arch-tag: 25fafe5c-b26c-43ab-8144-1629d59207ee + (do not change this comment) */ diff --git a/src/s/hpux9-x11r4.h b/src/s/hpux9-x11r4.h index 7d321162ea..6a701d5a41 100644 --- a/src/s/hpux9-x11r4.h +++ b/src/s/hpux9-x11r4.h @@ -8,3 +8,5 @@ #undef LD_SWITCH_X_DEFAULT #define LD_SWITCH_X_DEFAULT -L/usr/lib/Motif1.1 +/* arch-tag: 47664d7b-23ce-43e6-acdd-044a4be08da3 + (do not change this comment) */ diff --git a/src/s/hpux9.h b/src/s/hpux9.h index d73d3b7ce8..7562c6ae7e 100644 --- a/src/s/hpux9.h +++ b/src/s/hpux9.h @@ -71,3 +71,5 @@ #undef HAVE_RINT +/* arch-tag: 0a5e9f05-012c-4962-a222-a7a3a7fe0ab7 + (do not change this comment) */ diff --git a/src/s/hpux9shr.h b/src/s/hpux9shr.h index 41ef98741c..d273d2e778 100644 --- a/src/s/hpux9shr.h +++ b/src/s/hpux9shr.h @@ -11,3 +11,6 @@ #define C_DEBUG_SWITCH #endif #endif + +/* arch-tag: 1b259627-c5f6-4260-866f-781b06d72f6b + (do not change this comment) */ diff --git a/src/s/hpux9shxr4.h b/src/s/hpux9shxr4.h index 7f59f64b77..6381027369 100644 --- a/src/s/hpux9shxr4.h +++ b/src/s/hpux9shxr4.h @@ -6,3 +6,5 @@ #undef LD_SWITCH_X_DEFAULT #define LD_SWITCH_X_DEFAULT -L/usr/lib/Motif1.1 +/* arch-tag: 7f68b8b6-c733-4e6c-81df-39d8d13fb656 + (do not change this comment) */ diff --git a/src/s/iris3-5.h b/src/s/iris3-5.h index 1b8e045ce7..51391d56e9 100644 --- a/src/s/iris3-5.h +++ b/src/s/iris3-5.h @@ -160,3 +160,6 @@ Boston, MA 02111-1307, USA. */ /* This is how to get the device name of the tty end of a pty. */ #define PTY_TTY_NAME_SPRINTF \ sprintf (ptyname, "/dev/ttyq%d", minor (stb.st_rdev)); + +/* arch-tag: 41161051-477f-44be-bb2a-0eead3142157 + (do not change this comment) */ diff --git a/src/s/iris3-6.h b/src/s/iris3-6.h index 56e0e06fef..50d0962e48 100644 --- a/src/s/iris3-6.h +++ b/src/s/iris3-6.h @@ -157,3 +157,6 @@ Boston, MA 02111-1307, USA. */ /* This is how to get the device name of the tty end of a pty. */ #define PTY_TTY_NAME_SPRINTF \ sprintf (ptyname, "/dev/ttyq%d", minor (stb.st_rdev)); + +/* arch-tag: cdf2033e-a2d5-43e1-a1a2-a7243cf41a11 + (do not change this comment) */ diff --git a/src/s/irix3-3.h b/src/s/irix3-3.h index 1d02c5c327..fad50aa20f 100644 --- a/src/s/irix3-3.h +++ b/src/s/irix3-3.h @@ -150,3 +150,6 @@ Boston, MA 02111-1307, USA. */ /* This was formerly in LIBS_MACHINE in iris4d.h, but it is not needed for newer system versions. */ #define LIBS_SYSTEM -lsun + +/* arch-tag: cccdd761-2ae9-4e71-a33e-749681c01889 + (do not change this comment) */ diff --git a/src/s/irix4-0.h b/src/s/irix4-0.h index 4144c34d9a..215cbdc32d 100644 --- a/src/s/irix4-0.h +++ b/src/s/irix4-0.h @@ -51,3 +51,6 @@ return -1; \ strcpy (pty_name, name); \ } + +/* arch-tag: cfd7e200-a4dc-4f67-9a32-4184c10b0c57 + (do not change this comment) */ diff --git a/src/s/irix5-0.h b/src/s/irix5-0.h index 1bdd479eb9..91017fb56d 100644 --- a/src/s/irix5-0.h +++ b/src/s/irix5-0.h @@ -113,3 +113,6 @@ char *_getpty(); #define NARROWPROTO 1 #define USE_MMAP_FOR_BUFFERS 1 + +/* arch-tag: ad0660e0-acf8-46ae-b866-4f3df5b1101b + (do not change this comment) */ diff --git a/src/s/irix5-2.h b/src/s/irix5-2.h index a9056fae8c..b9cca67acd 100644 --- a/src/s/irix5-2.h +++ b/src/s/irix5-2.h @@ -16,3 +16,6 @@ for jpff@maths.bath.ac.uk. Note that irix6-0.h does not include this file, only irix5-0.h. */ #define NO_WTMP_FILE + +/* arch-tag: e2f820c1-2a3e-4cee-b5f1-6ce8ab21f439 + (do not change this comment) */ diff --git a/src/s/irix6-0.h b/src/s/irix6-0.h index ef86c97557..e60120d3f6 100644 --- a/src/s/irix6-0.h +++ b/src/s/irix6-0.h @@ -35,3 +35,6 @@ /* Tested on Irix 6.5. SCM worked on earlier versions. */ #define GC_SETJMP_WORKS 1 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS + +/* arch-tag: a775e465-a619-4655-a58f-5982aad0c624 + (do not change this comment) */ diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h index 7e29dc284b..c1cc42a8c0 100644 --- a/src/s/irix6-5.h +++ b/src/s/irix6-5.h @@ -32,3 +32,6 @@ #undef ospeed #undef TIOCSIGSEND /* defined in usg5-4.h */ + +/* arch-tag: d7ad9ec2-54ad-4b2f-adf2-0070c5c63e83 + (do not change this comment) */ diff --git a/src/s/isc2-2.h b/src/s/isc2-2.h index f669fc2c14..88f216b77d 100644 --- a/src/s/isc2-2.h +++ b/src/s/isc2-2.h @@ -75,3 +75,6 @@ /* Some versions of ISC are said to define S_IFLNK even tho they don't really support symlinks. */ #undef S_IFLNK + +/* arch-tag: 4de02713-eac5-4360-9d36-fd82c7a3ae44 + (do not change this comment) */ diff --git a/src/s/isc3-0.h b/src/s/isc3-0.h index 327f605ff7..bbd4e8609d 100644 --- a/src/s/isc3-0.h +++ b/src/s/isc3-0.h @@ -44,3 +44,6 @@ It won't be needed for 4.1. */ #define EXTRA_INITIALIZE __setostype (0) #endif + +/* arch-tag: c1aca3f2-813d-4c1c-ad64-ca6c20ec9bfb + (do not change this comment) */ diff --git a/src/s/isc4-0.h b/src/s/isc4-0.h index ccd6cb0627..d180b5d182 100644 --- a/src/s/isc4-0.h +++ b/src/s/isc4-0.h @@ -28,3 +28,6 @@ sigprocmask (SIG_SETMASK, &sigprocmask_set, NULL)) #endif #endif /* not POSIX_SIGNALS */ + +/* arch-tag: 1278f86f-17f2-462d-88c9-85e4b5faa5c3 + (do not change this comment) */ diff --git a/src/s/isc4-1.h b/src/s/isc4-1.h index df549b9fb7..c37537e629 100644 --- a/src/s/isc4-1.h +++ b/src/s/isc4-1.h @@ -30,3 +30,6 @@ /* ISC 4.1 has sys/wait.h but it does not work right. */ #undef HAVE_SYS_WAIT_H + +/* arch-tag: ec5c77d9-a330-4d93-8117-d2b374531c67 + (do not change this comment) */ diff --git a/src/s/lynxos.h b/src/s/lynxos.h index 576c4093c5..017e1892c1 100644 --- a/src/s/lynxos.h +++ b/src/s/lynxos.h @@ -54,3 +54,6 @@ Boston, MA 02111-1307, USA. */ /* warning messages */ #define C_SWITCH_SYSTEM -D__NO_INCLUDE_WARN__ #define LIBS_SYSTEM -lbsd + +/* arch-tag: fbc81ec9-1c45-416b-a368-799ae7c094a1 + (do not change this comment) */ diff --git a/src/s/mach-bsd4-3.h b/src/s/mach-bsd4-3.h index df4640b3fc..e012679c5f 100644 --- a/src/s/mach-bsd4-3.h +++ b/src/s/mach-bsd4-3.h @@ -3,3 +3,6 @@ you're in deep shit. */ #include "bsd4-3.h" + +/* arch-tag: 7f7f00f6-ae34-413e-9e6a-1d3b3e3d07e8 + (do not change this comment) */ diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 6d38d4fa59..09d31ed2e0 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h @@ -492,3 +492,6 @@ extern void _DebPrint (const char *fmt, ...); /* ============================================================ */ + +/* arch-tag: 5d4a3a1c-40dc-4dea-9c7c-38fed9ae0eae + (do not change this comment) */ diff --git a/src/s/msdos.h b/src/s/msdos.h index 9c9205a33a..cef2184a37 100644 --- a/src/s/msdos.h +++ b/src/s/msdos.h @@ -275,3 +275,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ #define GC_SETJMP_WORKS 1 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS + +/* arch-tag: d184f860-815d-4ff4-8187-d05c0f3c37d0 + (do not change this comment) */ diff --git a/src/s/netbsd.h b/src/s/netbsd.h index c48ac6d32f..206ff55c85 100644 --- a/src/s/netbsd.h +++ b/src/s/netbsd.h @@ -138,3 +138,5 @@ #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS +/* arch-tag: e80f364a-04e9-4faf-93cb-f36a0fe95c81 + (do not change this comment) */ diff --git a/src/s/newsos5.h b/src/s/newsos5.h index 7c782a40cd..f4ab0597ee 100644 --- a/src/s/newsos5.h +++ b/src/s/newsos5.h @@ -47,3 +47,6 @@ Boston, MA 02111-1307, USA. */ #ifndef HAVE_SOCKETS #define HAVE_SOCKETS #endif + +/* arch-tag: 2bb78fcd-fbc4-46dd-a14b-e4a9be957fe0 + (do not change this comment) */ diff --git a/src/s/newsos6.h b/src/s/newsos6.h index d4e67f7e4c..ca3dbe706d 100644 --- a/src/s/newsos6.h +++ b/src/s/newsos6.h @@ -4,3 +4,6 @@ #define NEWSOS6 #define HAVE_TEXT_START + +/* arch-tag: a0db9cb0-43bb-4f9e-85fa-384e30f02d74 + (do not change this comment) */ diff --git a/src/s/nextstep.h b/src/s/nextstep.h index e40cdb56ec..36549e88bf 100644 --- a/src/s/nextstep.h +++ b/src/s/nextstep.h @@ -110,3 +110,6 @@ Boston, MA 02111-1307, USA. */ /* Tell emacs.c not to define abort. */ #define NO_ABORT + +/* arch-tag: 5cd6fed4-a0be-4402-9349-85a80bc01d57 + (do not change this comment) */ diff --git a/src/s/openbsd.h b/src/s/openbsd.h index 7273f48e20..d3730324ce 100644 --- a/src/s/openbsd.h +++ b/src/s/openbsd.h @@ -23,3 +23,6 @@ #define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp #endif + +/* arch-tag: 7e3f65ca-3f48-4237-933f-2b208b21e8e2 + (do not change this comment) */ diff --git a/src/s/osf1.h b/src/s/osf1.h index e05f429a74..61ac04c5f1 100644 --- a/src/s/osf1.h +++ b/src/s/osf1.h @@ -72,3 +72,6 @@ emacs_close (dummy); \ } \ while (0) + +/* arch-tag: 65eaea67-fcc3-4de7-8574-d46beb82d4ed + (do not change this comment) */ diff --git a/src/s/osf5-0.h b/src/s/osf5-0.h index eef028a6e3..4f22f6d641 100644 --- a/src/s/osf5-0.h +++ b/src/s/osf5-0.h @@ -20,3 +20,6 @@ #define GC_SETJMP_WORKS 1 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS + +/* arch-tag: 89580064-dd8c-4533-a47c-0f92d8090945 + (do not change this comment) */ diff --git a/src/s/ptx.h b/src/s/ptx.h index ae76c35f3e..dab0f0f205 100644 --- a/src/s/ptx.h +++ b/src/s/ptx.h @@ -169,3 +169,6 @@ struct timezone /* Kenneth Stailey says this is needed. */ #define POSIX_SIGNALS + +/* arch-tag: 4f5e3abc-643b-413a-bae6-ed212d3af997 + (do not change this comment) */ diff --git a/src/s/ptx4-2.h b/src/s/ptx4-2.h index cc8e2111cf..3940093c28 100644 --- a/src/s/ptx4-2.h +++ b/src/s/ptx4-2.h @@ -15,3 +15,6 @@ #ifdef _MALLOC_INTERNAL #define _POSIX_SOURCE #endif + +/* arch-tag: 10a9fab3-9e84-4e9e-9535-6ff42baf9e77 + (do not change this comment) */ diff --git a/src/s/ptx4.h b/src/s/ptx4.h index 2505a5dfa0..295cb27d1a 100644 --- a/src/s/ptx4.h +++ b/src/s/ptx4.h @@ -35,3 +35,6 @@ fatal ("ioctl I_PUSH ldterm", errno); \ if (ioctl (xforkin, I_PUSH, "ttcompat") == -1 && errno != EINVAL) \ fatal ("ioctl I_PUSH ttcompat", errno); + +/* arch-tag: 14621824-8dca-432b-a97a-049fc4ce0e9f + (do not change this comment) */ diff --git a/src/s/riscix1-1.h b/src/s/riscix1-1.h index 605ed688bc..15092f59ad 100644 --- a/src/s/riscix1-1.h +++ b/src/s/riscix1-1.h @@ -23,3 +23,6 @@ Boston, MA 02111-1307, USA. */ #define RISCiX 11 #define CRT0_O /lib/crt0.o #include "bsd4-3.h" + +/* arch-tag: 382df034-9843-4a82-8a3a-2e50a4dd532c + (do not change this comment) */ diff --git a/src/s/riscix12.h b/src/s/riscix12.h index cbc78d58b9..988fbd61ba 100644 --- a/src/s/riscix12.h +++ b/src/s/riscix12.h @@ -23,3 +23,6 @@ Boston, MA 02111-1307, USA. */ #define RISCiX 12 #define CRT0_O /usr/lib/crt0.o #include "bsd4-3.h" + +/* arch-tag: f6b21e0a-f676-418a-9c8a-10fa8cd9dba7 + (do not change this comment) */ diff --git a/src/s/riscos5.h b/src/s/riscos5.h index c4b1919bf0..6ebf412c1d 100644 --- a/src/s/riscos5.h +++ b/src/s/riscos5.h @@ -9,3 +9,6 @@ extern double atof (); #define LD_SWITCH_SYSTEM -non_shared #define GETPGRP_NO_ARG + +/* arch-tag: e8ddf21d-72a0-476d-b33e-364f8b20e3b7 + (do not change this comment) */ diff --git a/src/s/rtu.h b/src/s/rtu.h index 80dccaafc8..afe63b5efc 100644 --- a/src/s/rtu.h +++ b/src/s/rtu.h @@ -144,3 +144,6 @@ Boston, MA 02111-1307, USA. */ /* Process groups work in the traditional BSD manner. */ #define BSD_PGRPS + +/* arch-tag: 0908970b-1cc0-4d57-b866-61b9bd029a0d + (do not change this comment) */ diff --git a/src/s/sco4.h b/src/s/sco4.h index 67b96eee59..b39c7a7545 100644 --- a/src/s/sco4.h +++ b/src/s/sco4.h @@ -141,3 +141,6 @@ Boston, MA 02111-1307, USA. */ #define NO_SOCKETS_IN_FILE_SYSTEM #define NARROWPROTO 1 + +/* arch-tag: 4dd6fe94-bcb7-4be0-942a-ff4bc3cd914e + (do not change this comment) */ diff --git a/src/s/sco5.h b/src/s/sco5.h index 8b091f63b5..096944b833 100644 --- a/src/s/sco5.h +++ b/src/s/sco5.h @@ -171,3 +171,6 @@ extern SIGMASKTYPE sigprocmask_set; #define LIB_STANDARD -lc /usr/ccs/lib/crtn.o #define NARROWPROTO 1 + +/* arch-tag: 930541b5-52d9-4cbe-b73c-f4c72091f5df + (do not change this comment) */ diff --git a/src/s/sol2-3.h b/src/s/sol2-3.h index a4fc609790..b45ec57ef1 100644 --- a/src/s/sol2-3.h +++ b/src/s/sol2-3.h @@ -48,3 +48,6 @@ strncpy (pty_name, ptyname, sizeof (pty_name)); \ pty_name[sizeof (pty_name) - 1] = 0; \ } + +/* arch-tag: a8fe2e15-e517-49cb-a863-f346b80885fe + (do not change this comment) */ diff --git a/src/s/sol2-4.h b/src/s/sol2-4.h index ad4fb0c5fd..8ac97eaa6d 100644 --- a/src/s/sol2-4.h +++ b/src/s/sol2-4.h @@ -33,3 +33,5 @@ are in this directory on Solaris 2.4. */ #define C_SWITCH_X_SYSTEM -I/usr/dt/include +/* arch-tag: 6f0de37b-cfda-427a-a5ae-b83ed54aaae7 + (do not change this comment) */ diff --git a/src/s/sol2-5.h b/src/s/sol2-5.h index 600ab99948..e02f0b82bc 100644 --- a/src/s/sol2-5.h +++ b/src/s/sol2-5.h @@ -31,3 +31,6 @@ /* Probably OK also on earlier versions. */ #define GC_SETJMP_WORKS 1 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS + +/* arch-tag: 96d65526-21c9-4547-a797-2bd575c05be7 + (do not change this comment) */ diff --git a/src/s/sol2-6.h b/src/s/sol2-6.h index 9465139765..a43443e48c 100644 --- a/src/s/sol2-6.h +++ b/src/s/sol2-6.h @@ -6,3 +6,6 @@ #undef UNEXEC #define UNEXEC unexsol.o #endif + +/* arch-tag: 71ea3857-89dc-4395-9623-77964e6ed3ca + (do not change this comment) */ diff --git a/src/s/sol2.h b/src/s/sol2.h index ed82812bc6..5f7d781f3e 100644 --- a/src/s/sol2.h +++ b/src/s/sol2.h @@ -51,3 +51,6 @@ #endif #define USE_MMAP_FOR_BUFFERS 1 + +/* arch-tag: b0640f78-5ad5-4093-97c3-5b3abbf5a2be + (do not change this comment) */ diff --git a/src/s/sunos4-0.h b/src/s/sunos4-0.h index 0b192f8ae0..d108df6864 100644 --- a/src/s/sunos4-0.h +++ b/src/s/sunos4-0.h @@ -47,3 +47,6 @@ #define GC_SETJMP_WORKS 1 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS + +/* arch-tag: 362f3bfc-810d-4f6e-9b83-5a32f8f1a926 + (do not change this comment) */ diff --git a/src/s/sunos4-1.h b/src/s/sunos4-1.h index 9c6b9cede2..2e41c55bbf 100644 --- a/src/s/sunos4-1.h +++ b/src/s/sunos4-1.h @@ -31,3 +31,6 @@ /* Define dlopen, dlclose, dlsym. */ #define USE_DL_STUBS + +/* arch-tag: 154e2eb2-2180-4d66-90b9-7e56a22004f2 + (do not change this comment) */ diff --git a/src/s/sunos413.h b/src/s/sunos413.h index 5dedb2947f..9f40f2fa3a 100644 --- a/src/s/sunos413.h +++ b/src/s/sunos413.h @@ -11,3 +11,6 @@ #endif #define USE_MMAP_FOR_BUFFERS 1 + +/* arch-tag: ebd184b0-9084-4306-8e71-c0437330e1e1 + (do not change this comment) */ diff --git a/src/s/sunos4shr.h b/src/s/sunos4shr.h index d6335326bb..8427201cda 100644 --- a/src/s/sunos4shr.h +++ b/src/s/sunos4shr.h @@ -57,3 +57,6 @@ #endif #endif /* not HAVE_X11R6 */ + +/* arch-tag: cb54321a-ed45-4c17-a23e-1c157758da78 + (do not change this comment) */ diff --git a/src/s/template.h b/src/s/template.h index f4d806de14..e969c72e0a 100644 --- a/src/s/template.h +++ b/src/s/template.h @@ -184,3 +184,6 @@ Boston, MA 02111-1307, USA. */ If you've just fixed a problem in an existing configuration file, you should also check `etc/MACHINES' to make sure its descriptions of known problems in that configuration should be updated. */ + +/* arch-tag: 4b426b11-cb2e-4c0e-a488-e663f76a0515 + (do not change this comment) */ diff --git a/src/s/ultrix4-3.h b/src/s/ultrix4-3.h index c8d5e4a324..2b4f379d3d 100644 --- a/src/s/ultrix4-3.h +++ b/src/s/ultrix4-3.h @@ -11,3 +11,6 @@ /* The address of this is used, but Ultrix header files don't declare it. */ extern double rint (); #endif + +/* arch-tag: 927a396a-d50f-494b-960b-533671184ce1 + (do not change this comment) */ diff --git a/src/s/umax.h b/src/s/umax.h index eaa9b6c4bb..36f5499a4b 100644 --- a/src/s/umax.h +++ b/src/s/umax.h @@ -164,3 +164,6 @@ Boston, MA 02111-1307, USA. */ /* Process groups work in the traditional BSD manner. */ #define BSD_PGRPS + +/* arch-tag: 2860edda-ce9e-4cfa-943d-3a06c7045854 + (do not change this comment) */ diff --git a/src/s/umips.h b/src/s/umips.h index 1b573842ea..3d497892c4 100644 --- a/src/s/umips.h +++ b/src/s/umips.h @@ -69,3 +69,6 @@ /* High order bit must be stripped off nlist return values */ #define FIXUP_KERNEL_SYMBOL_ADDR(NL) (NL)[0].n_value &= 0x7fffffff; + +/* arch-tag: 9b816c7d-6ee2-40d9-b6dc-42c0aeccfbec + (do not change this comment) */ diff --git a/src/s/unipl5-2.h b/src/s/unipl5-2.h index 9e61d3fac7..0a395b22a0 100644 --- a/src/s/unipl5-2.h +++ b/src/s/unipl5-2.h @@ -154,3 +154,6 @@ Boston, MA 02111-1307, USA. */ /* A system-specific loader switch is needed. */ #define LD_SWITCH_SYSTEM -N -L/lib/libg /usr/lib/unshared.ld + +/* arch-tag: d3f952a9-fef5-45d5-9c1e-c1c32bfef86c + (do not change this comment) */ diff --git a/src/s/unixware.h b/src/s/unixware.h index a4b02531bc..934821dd16 100644 --- a/src/s/unixware.h +++ b/src/s/unixware.h @@ -1,3 +1,6 @@ #include "usg5-4-2.h" #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base) + +/* arch-tag: d82e92e7-9443-4a60-a581-7f293cbae8a3 + (do not change this comment) */ diff --git a/src/s/usg5-0.h b/src/s/usg5-0.h index 885ad00b1b..ecce9d92c7 100644 --- a/src/s/usg5-0.h +++ b/src/s/usg5-0.h @@ -151,3 +151,6 @@ Boston, MA 02111-1307, USA. */ /* Prevent -lg from being used for debugging. Not implemented? */ #define LIBS_DEBUG + +/* arch-tag: a18bdba9-506d-40ed-9877-49fc27ce8cac + (do not change this comment) */ diff --git a/src/s/usg5-2-2.h b/src/s/usg5-2-2.h index 0c8e3c3d2d..a360fd64d7 100644 --- a/src/s/usg5-2-2.h +++ b/src/s/usg5-2-2.h @@ -154,3 +154,6 @@ Boston, MA 02111-1307, USA. */ /* Use terminfo instead of termcap. */ #define TERMINFO + +/* arch-tag: 56923f22-9e2b-4814-b922-88c87657ff6b + (do not change this comment) */ diff --git a/src/s/usg5-2.h b/src/s/usg5-2.h index e6f586da28..375dba75f5 100644 --- a/src/s/usg5-2.h +++ b/src/s/usg5-2.h @@ -154,3 +154,6 @@ Boston, MA 02111-1307, USA. */ /* Use terminfo instead of termcap. */ #define TERMINFO + +/* arch-tag: cfd9500f-0284-4a88-8f07-3f56b42db13b + (do not change this comment) */ diff --git a/src/s/usg5-3.h b/src/s/usg5-3.h index 5323bb694a..de1a20d265 100644 --- a/src/s/usg5-3.h +++ b/src/s/usg5-3.h @@ -205,3 +205,6 @@ Boston, MA 02111-1307, USA. */ /* On USG systems signal handlers return void */ #define SIGTYPE void + +/* arch-tag: 2bca65fd-f015-44b9-a2aa-9f8170ce89ca + (do not change this comment) */ diff --git a/src/s/usg5-4-2.h b/src/s/usg5-4-2.h index 351d51fe29..8b11bc54ea 100644 --- a/src/s/usg5-4-2.h +++ b/src/s/usg5-4-2.h @@ -54,3 +54,6 @@ /* ryanr@ellingtn.ftc.nrcs.usda.gov (Richard Anthony Ryan) says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. */ #define LIB_MOTIF -lXm -lXimp + +/* arch-tag: 9bbfcfc1-19be-45a1-9699-af57b87da2c6 + (do not change this comment) */ diff --git a/src/s/usg5-4-3.h b/src/s/usg5-4-3.h index f7773cb0a1..8d05e8b3fa 100644 --- a/src/s/usg5-4-3.h +++ b/src/s/usg5-4-3.h @@ -6,3 +6,6 @@ on start up for an i486-ncr-sysv4.3 (running the X toolkit): _XipOpenIM() Unable to find Atom _XIM_INPUTMETHOD */ #define X11R5_INHIBIT_I18N + +/* arch-tag: 03ac8b3a-c3d4-4441-a773-1c1d9f111f1a + (do not change this comment) */ diff --git a/src/s/usg5-4.h b/src/s/usg5-4.h index 49554b9456..719b8c389a 100644 --- a/src/s/usg5-4.h +++ b/src/s/usg5-4.h @@ -193,3 +193,6 @@ Boston, MA 02111-1307, USA. */ SINIX. */ #undef LIBS_SYSTEM #define LIBS_SYSTEM -lgen + +/* arch-tag: 1a0ed909-5faa-434b-b7c3-9d86c63d53a6 + (do not change this comment) */ diff --git a/src/s/ux4800.h b/src/s/ux4800.h index 6544bfdebe..1c8729f416 100644 --- a/src/s/ux4800.h +++ b/src/s/ux4800.h @@ -15,3 +15,6 @@ #ifndef __GNUC__ #define C_DEBUG_SWITCH -O -KOlimit=3000 -ZXNd=5000 #endif + +/* arch-tag: e42eeb13-028a-490b-8427-0b57010f2ab9 + (do not change this comment) */ diff --git a/src/s/uxpds.h b/src/s/uxpds.h index 0b823aaab0..c3ddf1039c 100644 --- a/src/s/uxpds.h +++ b/src/s/uxpds.h @@ -6,3 +6,6 @@ #define XOS_NEEDS_TIME_H #define FSCALE 256 + +/* arch-tag: c02db2a6-c725-4a6b-adee-66e0303df2a8 + (do not change this comment) */ diff --git a/src/s/uxpv.h b/src/s/uxpv.h index 94ea91eb1a..9571545598 100644 --- a/src/s/uxpv.h +++ b/src/s/uxpv.h @@ -9,3 +9,6 @@ #undef SYSTEM_TYPE #define SYSTEM_TYPE "uxpv" + +/* arch-tag: 3f00cfe7-f44c-45ce-a2fe-2b17fc411a1e + (do not change this comment) */ diff --git a/src/s/vms.h b/src/s/vms.h index 9f718099ee..dc7877eaa6 100644 --- a/src/s/vms.h +++ b/src/s/vms.h @@ -246,3 +246,6 @@ globalref char sdata[]; /* What separator do we use in paths? */ #define SEPCHAR ',' + +/* arch-tag: 76bc2b70-46d1-4334-8f12-955c0d0ca6d4 + (do not change this comment) */ diff --git a/src/s/vms4-0.h b/src/s/vms4-0.h index 3f11a3de30..c7e0c7be58 100644 --- a/src/s/vms4-0.h +++ b/src/s/vms4-0.h @@ -1,2 +1,5 @@ #include "vms.h" #define VMS4_0 + +/* arch-tag: 734e1c69-d514-4441-bbcd-8b5db8ab1892 + (do not change this comment) */ diff --git a/src/s/vms4-2.h b/src/s/vms4-2.h index e632b87e09..01ee788dd6 100644 --- a/src/s/vms4-2.h +++ b/src/s/vms4-2.h @@ -1,3 +1,5 @@ #include "vms.h" #define VMS4_2 +/* arch-tag: d9ff67bc-a899-44b2-a618-a73c821bb559 + (do not change this comment) */ diff --git a/src/s/vms4-4.h b/src/s/vms4-4.h index c0f60900d5..0abd825914 100644 --- a/src/s/vms4-4.h +++ b/src/s/vms4-4.h @@ -1,3 +1,5 @@ #include "vms.h" #define VMS4_4 +/* arch-tag: 2e65c7ad-0d17-45a0-b4cb-3e76c72ea9d5 + (do not change this comment) */ diff --git a/src/s/vms5-5.h b/src/s/vms5-5.h index e51fedf631..ac0ba9461a 100644 --- a/src/s/vms5-5.h +++ b/src/s/vms5-5.h @@ -6,3 +6,6 @@ And defining it causes lossage because sys_errlist has a different number of elements. */ #undef SHARABLE_LIB_BUG + +/* arch-tag: 92acc416-61fe-44ae-b0e0-710cb9e38ec6 + (do not change this comment) */ diff --git a/src/s/windows95.h b/src/s/windows95.h index 62340c3744..cf7f3f13c8 100644 --- a/src/s/windows95.h +++ b/src/s/windows95.h @@ -3,3 +3,6 @@ #include "windowsnt.h" #define WINDOWS95 + +/* arch-tag: 8a37be6f-312c-4b2a-919e-58a71a0fb4b3 + (do not change this comment) */ diff --git a/src/s/xenix.h b/src/s/xenix.h index be742120b6..c0840bcd3b 100644 --- a/src/s/xenix.h +++ b/src/s/xenix.h @@ -206,3 +206,6 @@ Boston, MA 02111-1307, USA. */ are not declared. */ #define BROKEN_TIOCGETC + +/* arch-tag: 71d3985d-4e53-4572-8276-5dce26bbd076 + (do not change this comment) */ diff --git a/src/scroll.c b/src/scroll.c index d753550900..6c6aa4abf9 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -1069,3 +1069,6 @@ do_line_insertion_deletion_costs (frame, FRAME_DELETE_COST (frame), FRAME_DELETEN_COST (frame), coefficient); } + +/* arch-tag: cdb7149c-48e7-4793-a948-2786c8e45485 + (do not change this comment) */ diff --git a/src/sound.c b/src/sound.c index c43cb49d3c..134b69dc81 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1143,3 +1143,6 @@ init_sound () } #endif /* HAVE_SOUND */ + +/* arch-tag: dd850ad8-0433-4e2c-9cba-b7aeeccc0dbd + (do not change this comment) */ diff --git a/src/strftime.c b/src/strftime.c index 4ca6023aa4..4d3a9d1d31 100644 --- a/src/strftime.c +++ b/src/strftime.c @@ -1491,3 +1491,6 @@ emacs_strftimeu (s, maxsize, format, tp, ut) return my_strftime (s, maxsize, format, tp, ut, 0); } #endif + +/* arch-tag: 662bc9c4-f8e2-41b6-bf96-b8346d0ce0d8 + (do not change this comment) */ diff --git a/src/sunfns.c b/src/sunfns.c index 8f8bb10276..13fdfd3a1b 100644 --- a/src/sunfns.c +++ b/src/sunfns.c @@ -299,7 +299,7 @@ sel_read (sel, file) error("fread botch in sel_read"); return(-1); } else if (n < 0) { - error("Error reading selection."); + error("Error reading selection"); return(-1); } /* @@ -513,3 +513,6 @@ syms_of_sunfns() defsubr(&Ssun_get_selection); defsubr(&Ssun_menu_internal); } + +/* arch-tag: 2d7decb7-58f6-41aa-b45b-077ccfab7158 + (do not change this comment) */ diff --git a/src/syntax.c b/src/syntax.c index 680a4bcaf8..22a34c40fb 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -2584,8 +2584,8 @@ scan_lists (from, count, depth, sexpflag) case Sstring_fence: while (1) { - DEC_BOTH (from, from_byte); if (from == stop) goto lose; + DEC_BOTH (from, from_byte); UPDATE_SYNTAX_TABLE_BACKWARD (from); if (!char_quoted (from, from_byte) && (c = FETCH_CHAR_AS_MULTIBYTE (from_byte), @@ -2600,19 +2600,14 @@ scan_lists (from, count, depth, sexpflag) while (1) { if (from == stop) goto lose; - temp_pos = from_byte; - if (! NILP (current_buffer->enable_multibyte_characters)) - DEC_POS (temp_pos); - else - temp_pos--; - UPDATE_SYNTAX_TABLE_BACKWARD (from - 1); - if (!char_quoted (from - 1, temp_pos) - && stringterm == (c = FETCH_CHAR_AS_MULTIBYTE (temp_pos)) + DEC_BOTH (from, from_byte); + UPDATE_SYNTAX_TABLE_BACKWARD (from); + if (!char_quoted (from, from_byte) + && (stringterm + == (c = FETCH_CHAR_AS_MULTIBYTE (from_byte))) && SYNTAX_WITH_MULTIBYTE_CHECK (c) == Sstring) break; - DEC_BOTH (from, from_byte); } - DEC_BOTH (from, from_byte); if (!depth && sexpflag) goto done2; break; default: diff --git a/src/sysdep.c b/src/sysdep.c index 193f0630cb..5ede3d2720 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */ #endif #include +#include #include #ifdef HAVE_UNISTD_H #include @@ -80,7 +81,6 @@ static int delete_exited_processes; #undef fwrite #endif -#include #include #include #include @@ -2614,13 +2614,6 @@ sys_select (nfds, rfds, wfds, efds, timeout) /* Read keyboard input into the standard buffer, waiting for at least one character. */ -/* Make all keyboard buffers much bigger when using a window system. */ -#ifdef HAVE_WINDOW_SYSTEM -#define BUFFER_SIZE_FACTOR 16 -#else -#define BUFFER_SIZE_FACTOR 1 -#endif - void read_input_waiting () { @@ -2629,26 +2622,19 @@ read_input_waiting () if (read_socket_hook) { - struct input_event buf[256]; - for (i = 0; i < 256; i++) - EVENT_INIT (buf[i]); - + struct input_event hold_quit; + + EVENT_INIT (hold_quit); + hold_quit.kind = NO_EVENT; + read_alarm_should_throw = 0; if (! setjmp (read_alarm_throw)) - nread = (*read_socket_hook) (0, buf, 256, 1); + nread = (*read_socket_hook) (0, 1, &hold_quit); else nread = -1; - /* Scan the chars for C-g and store them in kbd_buffer. */ - for (i = 0; i < nread; i++) - { - kbd_buffer_store_event (&buf[i]); - /* Don't look at input that follows a C-g too closely. - This reduces lossage due to autorepeat on C-g. */ - if (buf[i].kind == ASCII_KEYSTROKE_EVENT - && buf[i].code == quit_char) - break; - } + if (hold_quit.kind != NO_EVENT) + kbd_buffer_store_event (&hold_quit); } else { @@ -3741,7 +3727,8 @@ mkdir (dpath, dmode) wait_for_termination (cpid); } - if (synch_process_death != 0 || synch_process_retcode != 0) + if (synch_process_death != 0 || synch_process_retcode != 0 + || synch_process_termsig != 0) { errno = EIO; /* We don't know why, but */ return -1; /* /bin/mkdir failed */ @@ -3787,7 +3774,8 @@ rmdir (dpath) wait_for_termination (cpid); } - if (synch_process_death != 0 || synch_process_retcode != 0) + if (synch_process_death != 0 || synch_process_retcode != 0 + || synch_process_termsig != 0) { errno = EIO; /* We don't know why, but */ return -1; /* /bin/rmdir failed */ @@ -5298,3 +5286,5 @@ strsignal (code) } #endif /* HAVE_STRSIGNAL */ +/* arch-tag: edb43589-4e09-4544-b325-978b5b121dcf + (do not change this comment) */ diff --git a/src/sysselect.h b/src/sysselect.h index 5a392c381a..5aa9eb4aee 100644 --- a/src/sysselect.h +++ b/src/sysselect.h @@ -43,3 +43,6 @@ Boston, MA 02111-1307, USA. */ #if !defined (HAVE_SELECT) || defined (BROKEN_SELECT_NON_X) #define select sys_select #endif + +/* arch-tag: 36d05500-8cf6-4847-8e78-6721f18c06ef + (do not change this comment) */ diff --git a/src/syssignal.h b/src/syssignal.h index 2a579f3ba4..2b536758e2 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -196,3 +196,6 @@ extern SIGMASKTYPE sigprocmask_set; /* strsignal is in sysdep.c */ char *strsignal (); #endif + +/* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152 + (do not change this comment) */ diff --git a/src/systime.h b/src/systime.h index d05b5a7de9..778e555c97 100644 --- a/src/systime.h +++ b/src/systime.h @@ -172,3 +172,6 @@ extern int set_file_times __P ((const char *, EMACS_TIME, EMACS_TIME)); #define EMACS_TIME_LE(T1, T2) (EMACS_TIME_CMP (T1, T2) <= 0) #endif /* EMACS_SYSTIME_H */ + +/* arch-tag: dcb79915-cf99-4bce-9778-aade71d07651 + (do not change this comment) */ diff --git a/src/systty.h b/src/systty.h index 39ae61be1c..a975bcd13a 100644 --- a/src/systty.h +++ b/src/systty.h @@ -387,3 +387,6 @@ extern int emacs_set_tty P_ ((int, struct emacs_tty *, int)); #endif /* not def VMS */ #endif /* not def HAVE_TERMIO */ #endif /* not def HAVE_TERMIOS */ + +/* arch-tag: cf4b90bc-be41-401c-be98-40619178a712 + (do not change this comment) */ diff --git a/src/syswait.h b/src/syswait.h index 9b0a6899f8..066f4e5a48 100644 --- a/src/syswait.h +++ b/src/syswait.h @@ -152,3 +152,6 @@ Boston, MA 02111-1307, USA. */ #endif /* VMS */ #endif /* EMACS_SYSWAIT_H */ + +/* arch-tag: 7e5d9719-ec66-4b6f-89bb-563eea16a899 + (do not change this comment) */ diff --git a/src/term.c b/src/term.c index d4432a2631..609efcb843 100644 --- a/src/term.c +++ b/src/term.c @@ -81,6 +81,10 @@ static void tty_hide_cursor P_ ((void)); #define OUTPUT1_IF(a) do { if (a) tputs (a, 1, cmputc); } while (0) +/* Display space properties */ + +extern Lisp_Object Qspace, QCalign_to, QCwidth; + /* Function to use to ring the bell. */ Lisp_Object Vring_bell_function; @@ -133,7 +137,7 @@ void (*insert_glyphs_hook) P_ ((struct glyph *, int)); void (*write_glyphs_hook) P_ ((struct glyph *, int)); void (*delete_glyphs_hook) P_ ((int)); -int (*read_socket_hook) P_ ((int, struct input_event *, int, int)); +int (*read_socket_hook) P_ ((int, int, struct input_event *)); void (*frame_up_to_date_hook) P_ ((struct frame *)); @@ -1584,6 +1588,7 @@ term_get_fkeys_1 () ***********************************************************************/ static void append_glyph P_ ((struct it *)); +static void produce_stretch_glyph P_ ((struct it *)); /* Append glyphs to IT's glyph_row. Called from produce_glyphs for @@ -1647,9 +1652,14 @@ produce_glyphs (it) /* If a hook is installed, let it do the work. */ xassert (it->what == IT_CHARACTER || it->what == IT_COMPOSITION - || it->what == IT_IMAGE || it->what == IT_STRETCH); + if (it->what == IT_STRETCH) + { + produce_stretch_glyph (it); + goto done; + } + /* Nothing but characters are supported on terminal frames. For a composition sequence, it->c is the first character of the sequence. */ @@ -1716,6 +1726,7 @@ produce_glyphs (it) append_glyph (it); } + done: /* Advance current_x by the pixel width as a convenience for the caller. */ if (it->area == TEXT_AREA) @@ -1725,6 +1736,81 @@ produce_glyphs (it) } +/* Produce a stretch glyph for iterator IT. IT->object is the value + of the glyph property displayed. The value must be a list + `(space KEYWORD VALUE ...)' with the following KEYWORD/VALUE pairs + being recognized: + + 1. `:width WIDTH' specifies that the space should be WIDTH * + canonical char width wide. WIDTH may be an integer or floating + point number. + + 2. `:align-to HPOS' specifies that the space should be wide enough + to reach HPOS, a value in canonical character units. */ + +static void +produce_stretch_glyph (it) + struct it *it; +{ + /* (space :width WIDTH ...) */ + Lisp_Object prop, plist; + int width = 0, align_to = -1; + int zero_width_ok_p = 0; + double tem; + + /* List should start with `space'. */ + xassert (CONSP (it->object) && EQ (XCAR (it->object), Qspace)); + plist = XCDR (it->object); + + /* Compute the width of the stretch. */ + if ((prop = Fplist_get (plist, QCwidth), !NILP (prop)) + && calc_pixel_width_or_height (&tem, it, prop, 0, 1, 0)) + { + /* Absolute width `:width WIDTH' specified and valid. */ + zero_width_ok_p = 1; + width = (int)(tem + 0.5); + } + else if ((prop = Fplist_get (plist, QCalign_to), !NILP (prop)) + && calc_pixel_width_or_height (&tem, it, prop, 0, 1, &align_to)) + { + if (it->glyph_row == NULL || !it->glyph_row->mode_line_p) + align_to = (align_to < 0 + ? 0 + : align_to - window_box_left_offset (it->w, TEXT_AREA)); + else if (align_to < 0) + align_to = window_box_left_offset (it->w, TEXT_AREA); + width = max (0, (int)(tem + 0.5) + align_to - it->current_x); + zero_width_ok_p = 1; + } + else + /* Nothing specified -> width defaults to canonical char width. */ + width = FRAME_COLUMN_WIDTH (it->f); + + if (width <= 0 && (width < 0 || !zero_width_ok_p)) + width = 1; + + if (width > 0 && it->glyph_row) + { + Lisp_Object o_object = it->object; + Lisp_Object object = it->stack[it->sp - 1].string; + int n = width; + int c = it->c; + + if (!STRINGP (object)) + object = it->w->buffer; + it->object = object; + it->c = ' '; + it->pixel_width = it->len = 1; + while (n--) + append_glyph (it); + it->object = o_object; + it->c = c; + } + it->pixel_width = width; + it->nglyphs = width; +} + + /* Get information about special display element WHAT in an environment described by IT. WHAT is one of IT_TRUNCATION or IT_CONTINUATION. Maybe produce glyphs for WHAT if IT has a @@ -2048,6 +2134,10 @@ void tty_setup_colors (mode) int mode; { + /* Canonicalize all negative values of MODE. */ + if (mode < -1) + mode = -1; + switch (mode) { case -1: /* no colors at all */ @@ -2090,7 +2180,7 @@ set_tty_color_mode (f, val) tty_color_mode_alist = Fintern_soft (build_string ("tty-color-mode-alist"), Qnil); - if (NATNUMP (val)) + if (INTEGERP (val)) color_mode = val; else { @@ -2098,22 +2188,24 @@ set_tty_color_mode (f, val) color_mode_spec = Qnil; else color_mode_spec = Fassq (val, XSYMBOL (tty_color_mode_alist)->value); - current_mode_spec = assq_no_quit (Qtty_color_mode, f->param_alist); if (CONSP (color_mode_spec)) color_mode = XCDR (color_mode_spec); else color_mode = Qnil; } + + current_mode_spec = assq_no_quit (Qtty_color_mode, f->param_alist); + if (CONSP (current_mode_spec)) current_mode = XCDR (current_mode_spec); else current_mode = Qnil; - if (NATNUMP (color_mode)) + if (INTEGERP (color_mode)) mode = XINT (color_mode); else mode = 0; /* meaning default */ - if (NATNUMP (current_mode)) + if (INTEGERP (current_mode)) old_mode = XINT (current_mode); else old_mode = 0; @@ -2141,7 +2233,8 @@ term_init (terminal_type) { char *area; char **address = &area; - char buffer[2044]; + char *buffer = NULL; + int buffer_size = 4096; register char *p; int status; struct frame *sf = XFRAME (selected_frame); @@ -2153,9 +2246,6 @@ term_init (terminal_type) area = (char *) xmalloc (2044); - if (area == 0) - abort (); - FrameRows = FRAME_LINES (sf); FrameCols = FRAME_COLS (sf); specified_window = FRAME_LINES (sf); @@ -2184,6 +2274,7 @@ term_init (terminal_type) Wcm_clear (); + buffer = (char *) xmalloc (buffer_size); status = tgetent (buffer, terminal_type); if (status < 0) { @@ -2211,13 +2302,13 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.", terminal_type); #endif } -#ifdef TERMINFO - area = (char *) xmalloc (2044); -#else - area = (char *) xmalloc (strlen (buffer)); -#endif /* not TERMINFO */ - if (area == 0) + +#ifndef TERMINFO + if (strlen (buffer) >= buffer_size) abort (); + buffer_size = strlen (buffer); +#endif + area = (char *) xmalloc (buffer_size); TS_ins_line = tgetstr ("al", address); TS_ins_multi_lines = tgetstr ("AL", address); @@ -2550,6 +2641,8 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.", terminal_encode_buf_size = 1024; } #endif /* WINDOWSNT */ + + xfree (buffer); } /* VARARGS 1 */ @@ -2585,3 +2678,5 @@ The function should accept no arguments. */); defsubr (&Stty_display_color_cells); } +/* arch-tag: 498e7449-6f2e-45e2-91dd-b7d4ca488193 + (do not change this comment) */ diff --git a/src/termcap.c b/src/termcap.c index fa8d0ced0a..a1c068e096 100644 --- a/src/termcap.c +++ b/src/termcap.c @@ -284,6 +284,52 @@ tgetst1 (ptr, area) } *r++ = c; } + + /* Sometimes entries have "%pN" which means use parameter N in the + next %-substitution. If all such N are continuous in the range + [1,9] we can remove each "%pN" because they are redundant, thus + reducing bandwidth requirements. True, Emacs is well beyond the + days of 150baud teletypes, but some of its users aren't much so. + + This pass could probably be integrated into the one above but + abbreviation expansion makes that effort a little more hairy than + its worth; this is cleaner. */ + { + register int last_p_param = 0; + int remove_p_params = 1; + struct { char *beg; int len; } cut[11]; + + for (cut[0].beg = p = ret; p < r - 3; p++) + { + if (!remove_p_params) + break; + if (*p == '%' && *(p + 1) == 'p') + { + if (*(p + 2) - '0' == 1 + last_p_param) + { + cut[last_p_param].len = p - cut[last_p_param].beg; + last_p_param++; + p += 3; + cut[last_p_param].beg = p; + } + else /* not continuous: bail */ + remove_p_params = 0; + if (last_p_param > 10) /* too many: bail */ + remove_p_params = 0; + } + } + if (remove_p_params && last_p_param) + { + register int i; + char *wp; + + cut[last_p_param].len = r - cut[last_p_param].beg; + for (i = 0, wp = ret; i <= last_p_param; wp += cut[i++].len) + bcopy (cut[i].beg, wp, cut[i].len); + r = wp; + } + } + *r = '\0'; /* Update *AREA. */ if (area) @@ -828,3 +874,6 @@ tprint (cap) } #endif /* TEST */ + +/* arch-tag: c2e8d427-2271-4fac-95fe-411857238b80 + (do not change this comment) */ diff --git a/src/termchar.h b/src/termchar.h index da5413b8f9..b1d941adc2 100644 --- a/src/termchar.h +++ b/src/termchar.h @@ -44,3 +44,6 @@ extern int dont_calculate_costs; /* Nonzero means don't bother computing a suspended Emacs. This is useful on terminals with multiple pages, where one page is used for Emacs and another for all else. */ extern int no_redraw_on_reenter; + +/* arch-tag: bf9f0d49-842b-42fb-9348-ec8759b27193 + (do not change this comment) */ diff --git a/src/termhooks.h b/src/termhooks.h index da41266d98..83721f6591 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -374,7 +374,7 @@ struct input_event #define EVENT_INIT(event) bzero (&(event), sizeof (struct input_event)) /* Called to read input events. */ -extern int (*read_socket_hook) P_ ((int, struct input_event *, int, int)); +extern int (*read_socket_hook) P_ ((int, int, struct input_event *)); /* Called when a frame's display becomes entirely up to date. */ extern void (*frame_up_to_date_hook) P_ ((struct frame *)); @@ -430,3 +430,6 @@ enum { }; #endif + +/* arch-tag: 33a00ecc-52b5-4186-a410-8801ac9f087d + (do not change this comment) */ diff --git a/src/terminfo.c b/src/terminfo.c index 8b41de4e47..52acc5bdb4 100644 --- a/src/terminfo.c +++ b/src/terminfo.c @@ -49,3 +49,6 @@ tparam (string, outstring, len, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, strcpy (outstring, temp); return outstring; } + +/* arch-tag: a6f96a69-e68f-4e9d-a223-f0b0da26ead5 + (do not change this comment) */ diff --git a/src/termopts.h b/src/termopts.h index 0fd240bd00..2dc798ea2c 100644 --- a/src/termopts.h +++ b/src/termopts.h @@ -39,3 +39,6 @@ extern int meta_key; /* Nonzero means truncate lines in all windows less wide than the frame */ extern int truncate_partial_width_windows; + +/* arch-tag: 35d4d284-dc1a-4fff-97fa-0154a21aebdb + (do not change this comment) */ diff --git a/src/textprop.c b/src/textprop.c index d75e1cf202..4f13aefb1b 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -703,6 +703,30 @@ overlays are considered only if they are associated with OBJECT. */) { return get_char_property_and_overlay (position, prop, object, 0); } + +DEFUN ("get-char-property-and-overlay", Fget_char_property_and_overlay, + Sget_char_property_and_overlay, 2, 3, 0, + doc: /* Like `get-char-property', but with extra overlay information. +Return a cons whose car is the return value of `get-char-property' +with the same arguments, that is, the value of POSITION's property +PROP in OBJECT, and whose cdr is the overlay in which the property was +found, or nil, if it was found as a text property or not found at all. +OBJECT is optional and defaults to the current buffer. OBJECT may be +a string, a buffer or a window. For strings, the cdr of the return +value is always nil, since strings do not have overlays. If OBJECT is +a window, then that window's buffer is used, but window-specific +overlays are considered only if they are associated with OBJECT. If +POSITION is at the end of OBJECT, both car and cdr are nil. */) + (position, prop, object) + Lisp_Object position, object; + register Lisp_Object prop; +{ + Lisp_Object overlay; + Lisp_Object val + = get_char_property_and_overlay (position, prop, object, &overlay); + return Fcons(val, overlay); +} + DEFUN ("next-char-property-change", Fnext_char_property_change, Snext_char_property_change, 1, 2, 0, @@ -2277,6 +2301,7 @@ rear-nonsticky properties of the character overrides NONSTICKINESS. */); defsubr (&Stext_properties_at); defsubr (&Sget_text_property); defsubr (&Sget_char_property); + defsubr (&Sget_char_property_and_overlay); defsubr (&Snext_char_property_change); defsubr (&Sprevious_char_property_change); defsubr (&Snext_single_char_property_change); @@ -2295,3 +2320,6 @@ rear-nonsticky properties of the character overrides NONSTICKINESS. */); /* defsubr (&Serase_text_properties); */ /* defsubr (&Scopy_text_properties); */ } + +/* arch-tag: 454cdde8-5f86-4faa-a078-101e3625d479 + (do not change this comment) */ diff --git a/src/tparam.c b/src/tparam.c index fb71e05b3e..ea20869216 100644 --- a/src/tparam.c +++ b/src/tparam.c @@ -144,7 +144,9 @@ tparam1 (string, outstring, len, up, left, argp) int outlen = 0; register int tem; - int *old_argp = argp; + int *old_argp = argp; /* can move */ + int *fixed_argp = argp; /* never moves */ + int explicit_param_p = 0; /* set by %p */ int doleft = 0; int doup = 0; @@ -180,7 +182,10 @@ tparam1 (string, outstring, len, up, left, argp) if (c == '%') { c = *p++; - tem = *argp; + if (explicit_param_p) + explicit_param_p = 0; + else + tem = *argp; switch (c) { case 'd': /* %d means output in decimal. */ @@ -203,7 +208,10 @@ tparam1 (string, outstring, len, up, left, argp) *op++ = tem % 10 + '0'; argp++; break; - + case 'p': /* %pN means use param N for next subst. */ + tem = fixed_argp[(*p++) - '1']; + explicit_param_p = 1; + break; case 'C': /* For c-100: print quotient of value by 96, if nonzero, then do like %+. */ @@ -334,3 +342,6 @@ main (argc, argv) } #endif /* DEBUG */ + +/* arch-tag: 83f7b5ac-a808-4f75-b87a-123de009b402 + (do not change this comment) */ diff --git a/src/uaf.h b/src/uaf.h index 57615ab452..ae364b5f5e 100644 --- a/src/uaf.h +++ b/src/uaf.h @@ -294,3 +294,6 @@ struct UAF { }; #endif /* not UAF$K_LENGTH */ + +/* arch-tag: f95d73be-b0bf-46b7-adf7-89ce8846b062 + (do not change this comment) */ diff --git a/src/undo.c b/src/undo.c index fa802fe205..dd086db6c4 100644 --- a/src/undo.c +++ b/src/undo.c @@ -554,3 +554,6 @@ syms_of_undo () defsubr (&Sprimitive_undo); defsubr (&Sundo_boundary); } + +/* arch-tag: d546ee01-4aed-4ffb-bb8b-eefaae50d38a + (do not change this comment) */ diff --git a/src/unexaix.c b/src/unexaix.c index 3c629346bc..825209a5b3 100644 --- a/src/unexaix.c +++ b/src/unexaix.c @@ -676,3 +676,6 @@ unrelocate_symbols (int new, int a_out, char *a_name, char *new_name) } return 0; } + +/* arch-tag: 0783857a-7c2d-456f-a426-58b722d69fd0 + (do not change this comment) */ diff --git a/src/unexalpha.c b/src/unexalpha.c index a76654a127..97f8f383dd 100644 --- a/src/unexalpha.c +++ b/src/unexalpha.c @@ -540,3 +540,6 @@ fatal_unexec (s, arg) fputs (".\n", stderr); exit (1); } + +/* arch-tag: 46316c49-ee08-4aa3-942b-00798902f5bd + (do not change this comment) */ diff --git a/src/unexapollo.c b/src/unexapollo.c index 4a5ab60b25..adf72bb4f7 100644 --- a/src/unexapollo.c +++ b/src/unexapollo.c @@ -295,3 +295,6 @@ CopyData (target_file, source_file, total_byte_count) total_byte_count -= byte_count; } } + +/* arch-tag: 783ebbdf-7d26-4df8-9469-17a1747dce96 + (do not change this comment) */ diff --git a/src/unexconvex.c b/src/unexconvex.c index a040add122..10c0dfa953 100644 --- a/src/unexconvex.c +++ b/src/unexconvex.c @@ -600,3 +600,5 @@ first_pty_letter () return 'a'; } +/* arch-tag: 8199e06d-69b5-4f79-84d8-00f6ea929af9 + (do not change this comment) */ diff --git a/src/unexec.c b/src/unexec.c index aa4170019c..dadea560e0 100644 --- a/src/unexec.c +++ b/src/unexec.c @@ -1265,3 +1265,6 @@ adjust_lnnoptrs (writedesc, readdesc, new_name) #endif /* COFF */ #endif /* not CANNOT_DUMP */ + +/* arch-tag: 62409b69-e27a-4a7c-9413-0210d6b54e7f + (do not change this comment) */ diff --git a/src/unexelf.c b/src/unexelf.c index d88b8ec37c..ce773190d7 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -1284,3 +1284,6 @@ unexec (new_name, old_name, data_start, bss_start, entry_address) if (chmod (new_name, stat_buf.st_mode) == -1) fatal ("Can't chmod (%s): errno %d\n", new_name, errno); } + +/* arch-tag: e02e1512-95e2-4ef0-bba7-b6bce658f1e3 + (do not change this comment) */ diff --git a/src/unexenix.c b/src/unexenix.c index 2121c26839..a6d045d2e4 100644 --- a/src/unexenix.c +++ b/src/unexenix.c @@ -258,3 +258,6 @@ fatal_unexec (s, va_alist) fputs (".\n", stderr); exit (1); } + +/* arch-tag: ce26be27-370a-438d-83b4-766059749a02 + (do not change this comment) */ diff --git a/src/unexhp9k800.c b/src/unexhp9k800.c index 0948ccf9a1..146cc5707d 100644 --- a/src/unexhp9k800.c +++ b/src/unexhp9k800.c @@ -317,3 +317,6 @@ display_header (hdr, auxhdr) hdr->unloadable_sp_location, hdr->unloadable_sp_size); } #endif /* DEBUG */ + +/* arch-tag: d55a09ac-9427-4ec4-8496-cb9d7710774f + (do not change this comment) */ diff --git a/src/unexmacosx.c b/src/unexmacosx.c index c84e5c95d0..b41c586d2e 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -95,6 +95,10 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#include +#if defined (__ppc__) +#include +#endif #include #define VERBOSE 1 @@ -158,6 +162,11 @@ int in_dumped_exec = 0; malloc_zone_t *emacs_zone; +/* file offset of input file's data segment */ +off_t data_segment_old_fileoff; + +struct segment_command *data_segment_scp; + /* Read n bytes from infd into memory starting at address dest. Return true if successful, false otherwise. */ static int @@ -183,6 +192,7 @@ static int unexec_copy (off_t dest, off_t src, ssize_t count) { ssize_t bytes_read; + ssize_t bytes_to_read; char buf[UNEXEC_COPY_BUFSZ]; @@ -194,7 +204,8 @@ unexec_copy (off_t dest, off_t src, ssize_t count) while (count > 0) { - bytes_read = read (infd, buf, UNEXEC_COPY_BUFSZ); + bytes_to_read = count > UNEXEC_COPY_BUFSZ ? UNEXEC_COPY_BUFSZ : count; + bytes_read = read (infd, buf, bytes_to_read); if (bytes_read <= 0) return 0; if (write (outfd, buf, bytes_read) != bytes_read) @@ -763,6 +774,65 @@ copy_symtab (struct load_command *lc) curr_header_offset += lc->cmdsize; } +/* Fix up relocation entries. */ +static void +unrelocate (const char *name, off_t reloff, int nrel) +{ + int i, unreloc_count; + struct relocation_info reloc_info; + struct scattered_relocation_info *sc_reloc_info + = (struct scattered_relocation_info *) &reloc_info; + + for (unreloc_count = 0, i = 0; i < nrel; i++) + { + if (lseek (infd, reloff, L_SET) != reloff) + unexec_error ("unrelocate: %s:%d cannot seek to reloc_info", name, i); + if (!unexec_read (&reloc_info, sizeof (reloc_info))) + unexec_error ("unrelocate: %s:%d cannot read reloc_info", name, i); + reloff += sizeof (reloc_info); + + if (sc_reloc_info->r_scattered == 0) + switch (reloc_info.r_type) + { + case GENERIC_RELOC_VANILLA: + if (reloc_info.r_address >= data_segment_scp->vmaddr + && reloc_info.r_address < (data_segment_scp->vmaddr + + data_segment_scp->vmsize)) + { + off_t src_off = data_segment_old_fileoff + + reloc_info.r_address - data_segment_scp->vmaddr; + off_t dst_off = data_segment_scp->fileoff + + reloc_info.r_address - data_segment_scp->vmaddr; + + if (!unexec_copy (dst_off, src_off, 1 << reloc_info.r_length)) + unexec_error ("unrelocate: %s:%d cannot copy original value", + name, i); + unreloc_count++; + } + break; + default: + unexec_error ("unrelocate: %s:%d cannot handle type = %d", + name, i, reloc_info.r_type); + } + else + switch (sc_reloc_info->r_type) + { +#if defined (__ppc__) + case PPC_RELOC_PB_LA_PTR: + /* nothing to do for prebound lazy pointer */ + break; +#endif + default: + unexec_error ("unrelocate: %s:%d cannot handle scattered type = %d", + name, i, sc_reloc_info->r_type); + } + } + + if (nrel > 0) + printf ("Fixed up %d/%d %s relocation entries in data segment.\n", + unreloc_count, nrel, name); +} + /* Copy a LC_DYSYMTAB load command from the input file to the output file, adjusting the file offset fields. */ static void @@ -770,10 +840,8 @@ copy_dysymtab (struct load_command *lc) { struct dysymtab_command *dstp = (struct dysymtab_command *) lc; - /* If Mach-O executable is not prebound, relocation entries need - fixing up. This is not supported currently. */ - if (!(mh.flags & MH_PREBOUND) && (dstp->nextrel != 0 || dstp->nlocrel != 0)) - unexec_error ("cannot handle LC_DYSYMTAB with relocation entries"); + unrelocate ("local", dstp->locreloff, dstp->nlocrel); + unrelocate ("external", dstp->extreloff, dstp->nextrel); if (dstp->nextrel > 0) { dstp->extreloff += delta; @@ -845,6 +913,11 @@ dump_it () struct segment_command *scp = (struct segment_command *) lca[i]; if (strncmp (scp->segname, SEG_DATA, 16) == 0) { + /* save data segment file offset and segment_command for + unrelocate */ + data_segment_old_fileoff = scp->fileoff; + data_segment_scp = scp; + copy_data_segment (lca[i]); } else @@ -976,3 +1049,6 @@ unexec_free (void *ptr) else malloc_zone_free (emacs_zone, ptr); } + +/* arch-tag: 1a784f7b-a184-4c4f-9544-da8619593d72 + (do not change this comment) */ diff --git a/src/unexmips.c b/src/unexmips.c index cad42a1789..de3368ad18 100644 --- a/src/unexmips.c +++ b/src/unexmips.c @@ -359,3 +359,6 @@ fatal_unexec (s, va_alist) fputs (".\n", stderr); exit (1); } + +/* arch-tag: ebdd2058-3bbc-4de4-b5c7-5760379ab153 + (do not change this comment) */ diff --git a/src/unexnext.c b/src/unexnext.c index 649d0e0226..50a0448d7b 100644 --- a/src/unexnext.c +++ b/src/unexnext.c @@ -510,3 +510,6 @@ unexec( exit(1); } } + +/* arch-tag: 9796bdc3-c050-417a-b2f5-4cfd31032634 + (do not change this comment) */ diff --git a/src/unexsni.c b/src/unexsni.c index c9abec07e1..a99d51bc0c 100644 --- a/src/unexsni.c +++ b/src/unexsni.c @@ -919,3 +919,6 @@ unexec (new_name, old_name, data_start, bss_start, entry_address) if (chmod (new_name, stat_buf.st_mode) == -1) fatal ("Can't chmod(%s): errno %d\n", new_name, errno); } + +/* arch-tag: c784ead3-7a27-442b-83fe-7af8d08654d3 + (do not change this comment) */ diff --git a/src/unexsol.c b/src/unexsol.c index 382682e452..426a7f7cb9 100644 --- a/src/unexsol.c +++ b/src/unexsol.c @@ -27,3 +27,6 @@ unexec (char *new_name, char *old_name, unsigned int data_start, Fsignal (Qfile_error, Fcons (build_string ("Cannot unexec"), Fcons (errstring, data))); } + +/* arch-tag: d8ff72b3-8198-4011-8ef5-011b12027f59 + (do not change this comment) */ diff --git a/src/unexsunos4.c b/src/unexsunos4.c index 6ceab884a9..4534a32c32 100644 --- a/src/unexsunos4.c +++ b/src/unexsunos4.c @@ -375,3 +375,6 @@ is_it (filename) } return 0; } + +/* arch-tag: 30227420-2c6f-4700-a4f8-9e45e52f53b1 + (do not change this comment) */ diff --git a/src/unexw32.c b/src/unexw32.c index ece35459d6..b183864496 100644 --- a/src/unexw32.c +++ b/src/unexw32.c @@ -807,3 +807,6 @@ unexec (char *new_name, char *old_name, void *start_data, void *start_bss, } /* eof */ + +/* arch-tag: fe1d3d1c-ef88-4917-ab22-f12ab16b3254 + (do not change this comment) */ diff --git a/src/vlimit.h b/src/vlimit.h index c347dc74df..5885bee8d2 100644 --- a/src/vlimit.h +++ b/src/vlimit.h @@ -1,2 +1,5 @@ /* Dummy for Emacs so that we can run on VMS... */ #define LIM_DATA 0 + +/* arch-tag: 0c3436cb-5edc-447a-87af-acec402a65b9 + (do not change this comment) */ diff --git a/src/vm-limit.c b/src/vm-limit.c index c0bab2e48a..0dc89098af 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c @@ -145,3 +145,6 @@ memory_warnings (start, warnfun) lim_data = 0; #endif } + +/* arch-tag: eab04eda-1f69-447a-8d9f-95f0a3983ca5 + (do not change this comment) */ diff --git a/src/w16select.c b/src/w16select.c index 199f4363a6..f765b5c55f 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -764,3 +764,6 @@ set to nil. */); } #endif /* MSDOS */ + +/* arch-tag: 085a22c8-7324-436e-a6da-102464ce95d8 + (do not change this comment) */ diff --git a/src/w32.c b/src/w32.c index 744cc59313..98d630529e 100644 --- a/src/w32.c +++ b/src/w32.c @@ -66,6 +66,7 @@ Boston, MA 02111-1307, USA. #include "lisp.h" #include +#include #ifdef __GNUC__ #define _ANONYMOUS_UNION @@ -385,6 +386,13 @@ static struct passwd the_passwd = the_passwd_shell, }; +static struct group the_group = +{ + /* There are no groups on NT, so we just return "root" as the + group name. */ + "root", +}; + int getuid () { @@ -420,6 +428,12 @@ getpwuid (int uid) return NULL; } +struct group * +getgrgid (gid_t gid) +{ + return &the_group; +} + struct passwd * getpwnam (char *name) { @@ -3450,11 +3464,22 @@ sys_pipe (int * phandles) if (rc == 0) { - flags = FILE_PIPE | FILE_READ | FILE_BINARY; - fd_info[phandles[0]].flags = flags; + /* Protect against overflow, since Windows can open more handles than + our fd_info array has room for. */ + if (phandles[0] >= MAXDESC || phandles[1] >= MAXDESC) + { + _close (phandles[0]); + _close (phandles[1]); + rc = -1; + } + else + { + flags = FILE_PIPE | FILE_READ | FILE_BINARY; + fd_info[phandles[0]].flags = flags; - flags = FILE_PIPE | FILE_WRITE | FILE_BINARY; - fd_info[phandles[1]].flags = flags; + flags = FILE_PIPE | FILE_WRITE | FILE_BINARY; + fd_info[phandles[1]].flags = flags; + } } return rc; @@ -3955,3 +3980,6 @@ void globals_of_w32 () } /* end of nt.c */ + +/* arch-tag: 90442dd3-37be-482b-b272-ac752e3049f1 + (do not change this comment) */ diff --git a/src/w32.h b/src/w32.h index 845aca26e3..cce1f09436 100644 --- a/src/w32.h +++ b/src/w32.h @@ -134,3 +134,6 @@ extern void globals_of_w32menu (); extern void syms_of_fontset (); #endif /* EMACS_W32_H */ + +/* arch-tag: 02c36b00-312b-4c4d-a1d9-f905c5e968f0 + (do not change this comment) */ diff --git a/src/w32bdf.c b/src/w32bdf.c index 256310d2d3..a028d51d85 100644 --- a/src/w32bdf.c +++ b/src/w32bdf.c @@ -247,7 +247,7 @@ w32_init_bdf_font(char *filename) hbdf_bmp_heap = HeapCreate(0, BDF_BITMAP_HEAP_INITIAL_SIZE, 0); if (!hbdf_cp_heap || !hbdf_bmp_heap) - error("Fail to create heap for BDF."); + error("Fail to create heap for BDF"); hfile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); @@ -257,13 +257,13 @@ w32_init_bdf_font(char *filename) (fileinfo.nFileSizeLow > BDF_FILE_SIZE_MAX)) { CloseHandle(hfile); - error("Fail to open BDF file."); + error("Fail to open BDF file"); } hfilemap = CreateFileMapping(hfile, NULL, PAGE_READONLY, 0, 0, NULL); if (hfilemap == INVALID_HANDLE_VALUE) { CloseHandle(hfile); - error("Can't map font."); + error("Can't map font"); } font = MapViewOfFile(hfilemap, FILE_MAP_READ, 0, 0, 0); @@ -272,7 +272,7 @@ w32_init_bdf_font(char *filename) { CloseHandle(hfile); CloseHandle(hfilemap); - error("Can't view font."); + error("Can't view font"); } bdffontp = (bdffont *) xmalloc(sizeof(bdffont)); @@ -867,3 +867,6 @@ int w32_BDF_to_x_font (char *file, char* xstr, int len) CloseHandle (hfilemap); return retval; } + +/* arch-tag: 2e9a45de-0c54-4a0e-95c8-2d67b2b1fa32 + (do not change this comment) */ diff --git a/src/w32bdf.h b/src/w32bdf.h index 1786786b90..23939bfd7d 100644 --- a/src/w32bdf.h +++ b/src/w32bdf.h @@ -124,3 +124,6 @@ int w32_BDF_TextOut (bdffont *fontp, HDC hdc, int left, int w32_BDF_to_x_font (char *file, char* xstr, int len); #endif /* EMACS_W32BDF_H */ + +/* arch-tag: 7499e9f2-197e-44cc-9274-373f00b51eec + (do not change this comment) */ diff --git a/src/w32console.c b/src/w32console.c index 61b142db02..50cbfb281d 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -723,3 +723,6 @@ scroll-back buffer. */); defsubr (&Sset_cursor_size); defsubr (&Sset_message_beep); } + +/* arch-tag: a390a07f-f661-42bc-aeb4-e6d8bf860337 + (do not change this comment) */ diff --git a/src/w32fns.c b/src/w32fns.c index 5d6e88b62c..ebdf5c3ccc 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -52,13 +52,13 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#include #include #define FILE_NAME_TEXT_FIELD edt1 void syms_of_w32fns (); void globals_of_w32fns (); -static void init_external_image_libraries (); extern void free_frame_menubar (); extern double atof (); @@ -171,10 +171,6 @@ Lisp_Object Vx_cursor_fore_pixel; static int w32_in_use; -/* Search path for bitmap files. */ - -Lisp_Object Vx_bitmap_file_path; - /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ Lisp_Object Vx_pixel_size_width_font_regexp; @@ -200,7 +196,6 @@ Lisp_Object Vw32_charset_info_alist; Lisp_Object Qnone; Lisp_Object Qsuppress_icon; Lisp_Object Qundefined_color; -Lisp_Object Qcenter; Lisp_Object Qcancel_timer; Lisp_Object Qhyper; Lisp_Object Qsuper; @@ -396,225 +391,6 @@ x_window_to_frame (dpyinfo, wdesc) } - -/* Code to deal with bitmaps. Bitmaps are referenced by their bitmap - id, which is just an int that this section returns. Bitmaps are - reference counted so they can be shared among frames. - - Bitmap indices are guaranteed to be > 0, so a negative number can - be used to indicate no bitmap. - - If you use x_create_bitmap_from_data, then you must keep track of - the bitmaps yourself. That is, creating a bitmap from the same - data more than once will not be caught. */ - - -/* Functions to access the contents of a bitmap, given an id. */ - -int -x_bitmap_height (f, id) - FRAME_PTR f; - int id; -{ - return FRAME_W32_DISPLAY_INFO (f)->bitmaps[id - 1].height; -} - -int -x_bitmap_width (f, id) - FRAME_PTR f; - int id; -{ - return FRAME_W32_DISPLAY_INFO (f)->bitmaps[id - 1].width; -} - -int -x_bitmap_pixmap (f, id) - FRAME_PTR f; - int id; -{ - return (int) FRAME_W32_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap; -} - - -/* Allocate a new bitmap record. Returns index of new record. */ - -static int -x_allocate_bitmap_record (f) - FRAME_PTR f; -{ - struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); - int i; - - if (dpyinfo->bitmaps == NULL) - { - dpyinfo->bitmaps_size = 10; - dpyinfo->bitmaps - = (struct w32_bitmap_record *) xmalloc (dpyinfo->bitmaps_size * sizeof (struct w32_bitmap_record)); - dpyinfo->bitmaps_last = 1; - return 1; - } - - if (dpyinfo->bitmaps_last < dpyinfo->bitmaps_size) - return ++dpyinfo->bitmaps_last; - - for (i = 0; i < dpyinfo->bitmaps_size; ++i) - if (dpyinfo->bitmaps[i].refcount == 0) - return i + 1; - - dpyinfo->bitmaps_size *= 2; - dpyinfo->bitmaps - = (struct w32_bitmap_record *) xrealloc (dpyinfo->bitmaps, - dpyinfo->bitmaps_size * sizeof (struct w32_bitmap_record)); - return ++dpyinfo->bitmaps_last; -} - -/* Add one reference to the reference count of the bitmap with id ID. */ - -void -x_reference_bitmap (f, id) - FRAME_PTR f; - int id; -{ - ++FRAME_W32_DISPLAY_INFO (f)->bitmaps[id - 1].refcount; -} - -/* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS. */ - -int -x_create_bitmap_from_data (f, bits, width, height) - struct frame *f; - char *bits; - unsigned int width, height; -{ - struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); - Pixmap bitmap; - int id; - - bitmap = CreateBitmap (width, height, - FRAME_W32_DISPLAY_INFO (XFRAME (frame))->n_planes, - FRAME_W32_DISPLAY_INFO (XFRAME (frame))->n_cbits, - bits); - - if (! bitmap) - return -1; - - id = x_allocate_bitmap_record (f); - dpyinfo->bitmaps[id - 1].pixmap = bitmap; - dpyinfo->bitmaps[id - 1].file = NULL; - dpyinfo->bitmaps[id - 1].hinst = NULL; - dpyinfo->bitmaps[id - 1].refcount = 1; - dpyinfo->bitmaps[id - 1].depth = 1; - dpyinfo->bitmaps[id - 1].height = height; - dpyinfo->bitmaps[id - 1].width = width; - - return id; -} - -/* Create bitmap from file FILE for frame F. */ - -int -x_create_bitmap_from_file (f, file) - struct frame *f; - Lisp_Object file; -{ - return -1; -#if 0 /* TODO : bitmap support */ - struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); - unsigned int width, height; - HBITMAP bitmap; - int xhot, yhot, result, id; - Lisp_Object found; - int fd; - char *filename; - HINSTANCE hinst; - - /* Look for an existing bitmap with the same name. */ - for (id = 0; id < dpyinfo->bitmaps_last; ++id) - { - if (dpyinfo->bitmaps[id].refcount - && dpyinfo->bitmaps[id].file - && !strcmp (dpyinfo->bitmaps[id].file, (char *) SDATA (file))) - { - ++dpyinfo->bitmaps[id].refcount; - return id + 1; - } - } - - /* Search bitmap-file-path for the file, if appropriate. */ - fd = openp (Vx_bitmap_file_path, file, Qnil, &found, Qnil); - if (fd < 0) - return -1; - emacs_close (fd); - - filename = (char *) SDATA (found); - - hinst = LoadLibraryEx (filename, NULL, LOAD_LIBRARY_AS_DATAFILE); - - if (hinst == NULL) - return -1; - - - result = XReadBitmapFile (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), - filename, &width, &height, &bitmap, &xhot, &yhot); - if (result != BitmapSuccess) - return -1; - - id = x_allocate_bitmap_record (f); - dpyinfo->bitmaps[id - 1].pixmap = bitmap; - dpyinfo->bitmaps[id - 1].refcount = 1; - dpyinfo->bitmaps[id - 1].file = (char *) xmalloc (SCHARS (file) + 1); - dpyinfo->bitmaps[id - 1].depth = 1; - dpyinfo->bitmaps[id - 1].height = height; - dpyinfo->bitmaps[id - 1].width = width; - strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file)); - - return id; -#endif /* TODO */ -} - -/* Remove reference to bitmap with id number ID. */ - -void -x_destroy_bitmap (f, id) - FRAME_PTR f; - int id; -{ - struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); - - if (id > 0) - { - --dpyinfo->bitmaps[id - 1].refcount; - if (dpyinfo->bitmaps[id - 1].refcount == 0) - { - BLOCK_INPUT; - DeleteObject (dpyinfo->bitmaps[id - 1].pixmap); - if (dpyinfo->bitmaps[id - 1].file) - { - xfree (dpyinfo->bitmaps[id - 1].file); - dpyinfo->bitmaps[id - 1].file = NULL; - } - UNBLOCK_INPUT; - } - } -} - -/* Free all the bitmaps for the display specified by DPYINFO. */ - -static void -x_destroy_all_bitmaps (dpyinfo) - struct w32_display_info *dpyinfo; -{ - int i; - for (i = 0; i < dpyinfo->bitmaps_last; i++) - if (dpyinfo->bitmaps[i].refcount > 0) - { - DeleteObject (dpyinfo->bitmaps[i].pixmap); - if (dpyinfo->bitmaps[i].file) - xfree (dpyinfo->bitmaps[i].file); - } - dpyinfo->bitmaps_last = 0; -} - BOOL my_show_window P_ ((struct frame *, HWND, int)); void my_set_window_pos P_ ((HWND, HWND, int, int, int, int, UINT)); static Lisp_Object unwind_create_frame P_ ((Lisp_Object)); @@ -5618,6 +5394,10 @@ x_to_w32_font (lpxstr, lplogfont) coding.dst_multibyte = 1; coding.dst_bytes = strlen (name) * 2; coding.destination = (unsigned char *) xmalloc (coding.dst_bytes); + /* Disable composition/charset annotation. */ + coding.common_flags &= ~CODING_ANNOTATION_MASK; + if (coding.type == coding_type_iso2022) + coding.flags |= CODING_FLAG_ISO_SAFE; coding.mode |= CODING_MODE_LAST_BLOCK; encode_coding_object (&coding, build_string (name), 0, 0, strlen (name), coding.dst_bytes, Qnil); @@ -6987,5651 +6767,190 @@ DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0, return Qnil; } + /*********************************************************************** - Image types + Window properties ***********************************************************************/ -/* Value is the number of elements of vector VECTOR. */ - -#define DIM(VECTOR) (sizeof (VECTOR) / sizeof *(VECTOR)) - -/* List of supported image types. Use define_image_type to add new - types. Use lookup_image_type to find a type for a given symbol. */ - -static struct image_type *image_types; - -/* The symbol `image' which is the car of the lists used to represent - images in Lisp. */ - -extern Lisp_Object Qimage; - -/* The symbol `xbm' which is used as the type symbol for XBM images. */ - -Lisp_Object Qxbm; - -/* Keywords. */ - -extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile; -extern Lisp_Object QCdata, QCtype; -Lisp_Object QCascent, QCmargin, QCrelief; -Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask; -Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask; - -/* Other symbols. */ - -Lisp_Object Qlaplace, Qemboss, Qedge_detection, Qheuristic; +DEFUN ("x-change-window-property", Fx_change_window_property, + Sx_change_window_property, 2, 6, 0, + doc: /* Change window property PROP to VALUE on the X window of FRAME. +VALUE may be a string or a list of conses, numbers and/or strings. +If an element in the list is a string, it is converted to +an Atom and the value of the Atom is used. If an element is a cons, +it is converted to a 32 bit number where the car is the 16 top bits and the +cdr is the lower 16 bits. +FRAME nil or omitted means use the selected frame. +If TYPE is given and non-nil, it is the name of the type of VALUE. +If TYPE is not given or nil, the type is STRING. +FORMAT gives the size in bits of each element if VALUE is a list. +It must be one of 8, 16 or 32. +If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8. +If OUTER_P is non-nil, the property is changed for the outer X window of +FRAME. Default is to change on the edit X window. + +Value is VALUE. */) + (prop, value, frame, type, format, outer_p) + Lisp_Object prop, value, frame, type, format, outer_p; +{ +#if 0 /* TODO : port window properties to W32 */ + struct frame *f = check_x_frame (frame); + Atom prop_atom; -/* Time in seconds after which images should be removed from the cache - if not displayed. */ + CHECK_STRING (prop); + CHECK_STRING (value); -Lisp_Object Vimage_cache_eviction_delay; + BLOCK_INPUT; + prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), SDATA (prop), False); + XChangeProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), + prop_atom, XA_STRING, 8, PropModeReplace, + SDATA (value), SCHARS (value)); -/* Function prototypes. */ + /* Make sure the property is set when we return. */ + XFlush (FRAME_W32_DISPLAY (f)); + UNBLOCK_INPUT; -static void define_image_type P_ ((struct image_type *type)); -static struct image_type *lookup_image_type P_ ((Lisp_Object symbol)); -static void image_error P_ ((char *format, Lisp_Object, Lisp_Object)); -static void x_laplace P_ ((struct frame *, struct image *)); -static void x_emboss P_ ((struct frame *, struct image *)); -static int x_build_heuristic_mask P_ ((struct frame *, struct image *, - Lisp_Object)); +#endif /* TODO */ + return value; +} -/* Define a new image type from TYPE. This adds a copy of TYPE to - image_types and adds the symbol *TYPE->type to Vimage_types. */ -static void -define_image_type (type) - struct image_type *type; +DEFUN ("x-delete-window-property", Fx_delete_window_property, + Sx_delete_window_property, 1, 2, 0, + doc: /* Remove window property PROP from X window of FRAME. +FRAME nil or omitted means use the selected frame. Value is PROP. */) + (prop, frame) + Lisp_Object prop, frame; { - /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. - The initialized data segment is read-only. */ - struct image_type *p = (struct image_type *) xmalloc (sizeof *p); - bcopy (type, p, sizeof *p); - p->next = image_types; - image_types = p; - Vimage_types = Fcons (*p->type, Vimage_types); -} - +#if 0 /* TODO : port window properties to W32 */ -/* Look up image type SYMBOL, and return a pointer to its image_type - structure. Value is null if SYMBOL is not a known image type. */ + struct frame *f = check_x_frame (frame); + Atom prop_atom; -static INLINE struct image_type * -lookup_image_type (symbol) - Lisp_Object symbol; -{ - struct image_type *type; + CHECK_STRING (prop); + BLOCK_INPUT; + prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), SDATA (prop), False); + XDeleteProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), prop_atom); - for (type = image_types; type; type = type->next) - if (EQ (symbol, *type->type)) - break; + /* Make sure the property is removed when we return. */ + XFlush (FRAME_W32_DISPLAY (f)); + UNBLOCK_INPUT; +#endif /* TODO */ - return type; + return prop; } -/* Value is non-zero if OBJECT is a valid Lisp image specification. A - valid image specification is a list whose car is the symbol - `image', and whose rest is a property list. The property list must - contain a value for key `:type'. That value must be the name of a - supported image type. The rest of the property list depends on the - image type. */ - -int -valid_image_p (object) - Lisp_Object object; +DEFUN ("x-window-property", Fx_window_property, Sx_window_property, + 1, 2, 0, + doc: /* Value is the value of window property PROP on FRAME. +If FRAME is nil or omitted, use the selected frame. Value is nil +if FRAME hasn't a property with name PROP or if PROP has no string +value. */) + (prop, frame) + Lisp_Object prop, frame; { - int valid_p = 0; +#if 0 /* TODO : port window properties to W32 */ + + struct frame *f = check_x_frame (frame); + Atom prop_atom; + int rc; + Lisp_Object prop_value = Qnil; + char *tmp_data = NULL; + Atom actual_type; + int actual_format; + unsigned long actual_size, bytes_remaining; - if (CONSP (object) && EQ (XCAR (object), Qimage)) + CHECK_STRING (prop); + BLOCK_INPUT; + prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), SDATA (prop), False); + rc = XGetWindowProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), + prop_atom, 0, 0, False, XA_STRING, + &actual_type, &actual_format, &actual_size, + &bytes_remaining, (unsigned char **) &tmp_data); + if (rc == Success) { - Lisp_Object tem; + int size = bytes_remaining; - for (tem = XCDR (object); CONSP (tem); tem = XCDR (tem)) - if (EQ (XCAR (tem), QCtype)) - { - tem = XCDR (tem); - if (CONSP (tem) && SYMBOLP (XCAR (tem))) - { - struct image_type *type; - type = lookup_image_type (XCAR (tem)); - if (type) - valid_p = type->valid_p (object); - } + XFree (tmp_data); + tmp_data = NULL; - break; - } - } + rc = XGetWindowProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), + prop_atom, 0, bytes_remaining, + False, XA_STRING, + &actual_type, &actual_format, + &actual_size, &bytes_remaining, + (unsigned char **) &tmp_data); + if (rc == Success) + prop_value = make_string (tmp_data, size); - return valid_p; -} + XFree (tmp_data); + } + UNBLOCK_INPUT; -/* Log error message with format string FORMAT and argument ARG. - Signaling an error, e.g. when an image cannot be loaded, is not a - good idea because this would interrupt redisplay, and the error - message display would lead to another redisplay. This function - therefore simply displays a message. */ + return prop_value; -static void -image_error (format, arg1, arg2) - char *format; - Lisp_Object arg1, arg2; -{ - add_to_log (format, arg1, arg2); +#endif /* TODO */ + return Qnil; } /*********************************************************************** - Image specifications + Busy cursor ***********************************************************************/ -enum image_value_type -{ - IMAGE_DONT_CHECK_VALUE_TYPE, - IMAGE_STRING_VALUE, - IMAGE_STRING_OR_NIL_VALUE, - IMAGE_SYMBOL_VALUE, - IMAGE_POSITIVE_INTEGER_VALUE, - IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, - IMAGE_NON_NEGATIVE_INTEGER_VALUE, - IMAGE_ASCENT_VALUE, - IMAGE_INTEGER_VALUE, - IMAGE_FUNCTION_VALUE, - IMAGE_NUMBER_VALUE, - IMAGE_BOOL_VALUE -}; +/* If non-null, an asynchronous timer that, when it expires, displays + an hourglass cursor on all frames. */ -/* Structure used when parsing image specifications. */ +static struct atimer *hourglass_atimer; -struct image_keyword -{ - /* Name of keyword. */ - char *name; +/* Non-zero means an hourglass cursor is currently shown. */ + +static int hourglass_shown_p; - /* The type of value allowed. */ - enum image_value_type type; +/* Number of seconds to wait before displaying an hourglass cursor. */ - /* Non-zero means key must be present. */ - int mandatory_p; +static Lisp_Object Vhourglass_delay; - /* Used to recognize duplicate keywords in a property list. */ - int count; +/* Default number of seconds to wait before displaying an hourglass + cursor. */ - /* The value that was found. */ - Lisp_Object value; -}; +#define DEFAULT_HOURGLASS_DELAY 1 +/* Function prototypes. */ -static int parse_image_spec P_ ((Lisp_Object, struct image_keyword *, - int, Lisp_Object)); -static Lisp_Object image_spec_value P_ ((Lisp_Object, Lisp_Object, int *)); +static void show_hourglass P_ ((struct atimer *)); +static void hide_hourglass P_ ((void)); -/* Parse image spec SPEC according to KEYWORDS. A valid image spec - has the format (image KEYWORD VALUE ...). One of the keyword/ - value pairs must be `:type TYPE'. KEYWORDS is a vector of - image_keywords structures of size NKEYWORDS describing other - allowed keyword/value pairs. Value is non-zero if SPEC is valid. */ +/* Cancel a currently active hourglass timer, and start a new one. */ -static int -parse_image_spec (spec, keywords, nkeywords, type) - Lisp_Object spec; - struct image_keyword *keywords; - int nkeywords; - Lisp_Object type; +void +start_hourglass () { - int i; - Lisp_Object plist; +#if 0 /* TODO: cursor shape changes. */ + EMACS_TIME delay; + int secs, usecs = 0; - if (!CONSP (spec) || !EQ (XCAR (spec), Qimage)) - return 0; + cancel_hourglass (); - plist = XCDR (spec); - while (CONSP (plist)) + if (INTEGERP (Vhourglass_delay) + && XINT (Vhourglass_delay) > 0) + secs = XFASTINT (Vhourglass_delay); + else if (FLOATP (Vhourglass_delay) + && XFLOAT_DATA (Vhourglass_delay) > 0) { - Lisp_Object key, value; - - /* First element of a pair must be a symbol. */ - key = XCAR (plist); - plist = XCDR (plist); - if (!SYMBOLP (key)) - return 0; - - /* There must follow a value. */ - if (!CONSP (plist)) - return 0; - value = XCAR (plist); - plist = XCDR (plist); - - /* Find key in KEYWORDS. Error if not found. */ - for (i = 0; i < nkeywords; ++i) - if (strcmp (keywords[i].name, SDATA (SYMBOL_NAME (key))) == 0) - break; - - if (i == nkeywords) - continue; - - /* Record that we recognized the keyword. If a keywords - was found more than once, it's an error. */ - keywords[i].value = value; - ++keywords[i].count; - - if (keywords[i].count > 1) - return 0; - - /* Check type of value against allowed type. */ - switch (keywords[i].type) - { - case IMAGE_STRING_VALUE: - if (!STRINGP (value)) - return 0; - break; - - case IMAGE_STRING_OR_NIL_VALUE: - if (!STRINGP (value) && !NILP (value)) - return 0; - break; - - case IMAGE_SYMBOL_VALUE: - if (!SYMBOLP (value)) - return 0; - break; - - case IMAGE_POSITIVE_INTEGER_VALUE: - if (!INTEGERP (value) || XINT (value) <= 0) - return 0; - break; - - case IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR: - if (INTEGERP (value) && XINT (value) >= 0) - break; - if (CONSP (value) - && INTEGERP (XCAR (value)) && INTEGERP (XCDR (value)) - && XINT (XCAR (value)) >= 0 && XINT (XCDR (value)) >= 0) - break; - return 0; - - case IMAGE_ASCENT_VALUE: - if (SYMBOLP (value) && EQ (value, Qcenter)) - break; - else if (INTEGERP (value) - && XINT (value) >= 0 - && XINT (value) <= 100) - break; - return 0; - - case IMAGE_NON_NEGATIVE_INTEGER_VALUE: - if (!INTEGERP (value) || XINT (value) < 0) - return 0; - break; - - case IMAGE_DONT_CHECK_VALUE_TYPE: - break; - - case IMAGE_FUNCTION_VALUE: - value = indirect_function (value); - if (SUBRP (value) - || COMPILEDP (value) - || (CONSP (value) && EQ (XCAR (value), Qlambda))) - break; - return 0; - - case IMAGE_NUMBER_VALUE: - if (!INTEGERP (value) && !FLOATP (value)) - return 0; - break; - - case IMAGE_INTEGER_VALUE: - if (!INTEGERP (value)) - return 0; - break; - - case IMAGE_BOOL_VALUE: - if (!NILP (value) && !EQ (value, Qt)) - return 0; - break; - - default: - abort (); - break; - } - - if (EQ (key, QCtype) && !EQ (type, value)) - return 0; - } - - /* Check that all mandatory fields are present. */ - for (i = 0; i < nkeywords; ++i) - if (keywords[i].mandatory_p && keywords[i].count == 0) - return 0; - - return NILP (plist); -} - - -/* Return the value of KEY in image specification SPEC. Value is nil - if KEY is not present in SPEC. if FOUND is not null, set *FOUND - to 1 if KEY was found in SPEC, set it to 0 otherwise. */ - -static Lisp_Object -image_spec_value (spec, key, found) - Lisp_Object spec, key; - int *found; -{ - Lisp_Object tail; - - xassert (valid_image_p (spec)); - - for (tail = XCDR (spec); - CONSP (tail) && CONSP (XCDR (tail)); - tail = XCDR (XCDR (tail))) - { - if (EQ (XCAR (tail), key)) - { - if (found) - *found = 1; - return XCAR (XCDR (tail)); - } - } - - if (found) - *found = 0; - return Qnil; -} - - -DEFUN ("image-size", Fimage_size, Simage_size, 1, 3, 0, - doc: /* Return the size of image SPEC as pair (WIDTH . HEIGHT). -PIXELS non-nil means return the size in pixels, otherwise return the -size in canonical character units. -FRAME is the frame on which the image will be displayed. FRAME nil -or omitted means use the selected frame. */) - (spec, pixels, frame) - Lisp_Object spec, pixels, frame; -{ - Lisp_Object size; - - size = Qnil; - if (valid_image_p (spec)) - { - struct frame *f = check_x_frame (frame); - int id = lookup_image (f, spec); - struct image *img = IMAGE_FROM_ID (f, id); - int width = img->width + 2 * img->hmargin; - int height = img->height + 2 * img->vmargin; - - if (NILP (pixels)) - size = Fcons (make_float ((double) width / FRAME_COLUMN_WIDTH (f)), - make_float ((double) height / FRAME_LINE_HEIGHT (f))); - else - size = Fcons (make_number (width), make_number (height)); - } - else - error ("Invalid image specification"); - - return size; -} - - -DEFUN ("image-mask-p", Fimage_mask_p, Simage_mask_p, 1, 2, 0, - doc: /* Return t if image SPEC has a mask bitmap. -FRAME is the frame on which the image will be displayed. FRAME nil -or omitted means use the selected frame. */) - (spec, frame) - Lisp_Object spec, frame; -{ - Lisp_Object mask; - - mask = Qnil; - if (valid_image_p (spec)) - { - struct frame *f = check_x_frame (frame); - int id = lookup_image (f, spec); - struct image *img = IMAGE_FROM_ID (f, id); - if (img->mask) - mask = Qt; - } - else - error ("Invalid image specification"); - - return mask; -} - - -/*********************************************************************** - Image type independent image structures - ***********************************************************************/ - -static struct image *make_image P_ ((Lisp_Object spec, unsigned hash)); -static void free_image P_ ((struct frame *f, struct image *img)); -static void x_destroy_x_image P_ ((XImage *)); - - -/* Allocate and return a new image structure for image specification - SPEC. SPEC has a hash value of HASH. */ - -static struct image * -make_image (spec, hash) - Lisp_Object spec; - unsigned hash; -{ - struct image *img = (struct image *) xmalloc (sizeof *img); - - xassert (valid_image_p (spec)); - bzero (img, sizeof *img); - img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL)); - xassert (img->type != NULL); - img->spec = spec; - img->data.lisp_val = Qnil; - img->ascent = DEFAULT_IMAGE_ASCENT; - img->hash = hash; - return img; -} - - -/* Free image IMG which was used on frame F, including its resources. */ - -static void -free_image (f, img) - struct frame *f; - struct image *img; -{ - if (img) - { - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - - /* Remove IMG from the hash table of its cache. */ - if (img->prev) - img->prev->next = img->next; - else - c->buckets[img->hash % IMAGE_CACHE_BUCKETS_SIZE] = img->next; - - if (img->next) - img->next->prev = img->prev; - - c->images[img->id] = NULL; - - /* Free resources, then free IMG. */ - img->type->free (f, img); - xfree (img); - } -} - - -/* Prepare image IMG for display on frame F. Must be called before - drawing an image. */ - -void -prepare_image_for_display (f, img) - struct frame *f; - struct image *img; -{ - EMACS_TIME t; - - /* We're about to display IMG, so set its timestamp to `now'. */ - EMACS_GET_TIME (t); - img->timestamp = EMACS_SECS (t); - - /* If IMG doesn't have a pixmap yet, load it now, using the image - type dependent loader function. */ - if (img->pixmap == 0 && !img->load_failed_p) - img->load_failed_p = img->type->load (f, img) == 0; -} - - -/* Value is the number of pixels for the ascent of image IMG when - drawn in face FACE. */ - -int -image_ascent (img, face) - struct image *img; - struct face *face; -{ - int height = img->height + img->vmargin; - int ascent; - - if (img->ascent == CENTERED_IMAGE_ASCENT) - { - if (face->font) - ascent = height / 2 - (FONT_DESCENT(face->font) - - FONT_BASE(face->font)) / 2; - else - ascent = height / 2; - } - else - ascent = (int) (height * img->ascent / 100.0); - - return ascent; -} - - - -/* Image background colors. */ - -/* Find the "best" corner color of a bitmap. XIMG is assumed to a device - context with the bitmap selected. */ -static COLORREF -four_corners_best (img_dc, width, height) - HDC img_dc; - unsigned long width, height; -{ - COLORREF corners[4], best; - int i, best_count; - - /* Get the colors at the corners of img_dc. */ - corners[0] = GetPixel (img_dc, 0, 0); - corners[1] = GetPixel (img_dc, width - 1, 0); - corners[2] = GetPixel (img_dc, width - 1, height - 1); - corners[3] = GetPixel (img_dc, 0, height - 1); - - /* Choose the most frequently found color as background. */ - for (i = best_count = 0; i < 4; ++i) - { - int j, n; - - for (j = n = 0; j < 4; ++j) - if (corners[i] == corners[j]) - ++n; - - if (n > best_count) - best = corners[i], best_count = n; - } - - return best; -} - -/* Return the `background' field of IMG. If IMG doesn't have one yet, - it is guessed heuristically. If non-zero, IMG_DC is an existing - device context with the image selected to use for the heuristic. */ - -unsigned long -image_background (img, f, img_dc) - struct image *img; - struct frame *f; - HDC img_dc; -{ - if (! img->background_valid) - /* IMG doesn't have a background yet, try to guess a reasonable value. */ - { - int free_ximg = !img_dc; - HGDIOBJ prev; - - if (free_ximg) - { - HDC frame_dc = get_frame_dc (f); - img_dc = CreateCompatibleDC (frame_dc); - release_frame_dc (f, frame_dc); - - prev = SelectObject (img_dc, img->pixmap); - } - - img->background = four_corners_best (img_dc, img->width, img->height); - - if (free_ximg) - { - SelectObject (img_dc, prev); - DeleteDC (img_dc); - } - - img->background_valid = 1; - } - - return img->background; -} - -/* Return the `background_transparent' field of IMG. If IMG doesn't - have one yet, it is guessed heuristically. If non-zero, MASK is an - existing XImage object to use for the heuristic. */ - -int -image_background_transparent (img, f, mask) - struct image *img; - struct frame *f; - HDC mask; -{ - if (! img->background_transparent_valid) - /* IMG doesn't have a background yet, try to guess a reasonable value. */ - { - if (img->mask) - { - int free_mask = !mask; - HGDIOBJ prev; - - if (free_mask) - { - HDC frame_dc = get_frame_dc (f); - mask = CreateCompatibleDC (frame_dc); - release_frame_dc (f, frame_dc); - - prev = SelectObject (mask, img->mask); - } - - img->background_transparent - = !four_corners_best (mask, img->width, img->height); - - if (free_mask) - { - SelectObject (mask, prev); - DeleteDC (mask); - } - } - else - img->background_transparent = 0; - - img->background_transparent_valid = 1; - } - - return img->background_transparent; -} - - -/*********************************************************************** - Helper functions for X image types - ***********************************************************************/ - -static void x_clear_image_1 P_ ((struct frame *, struct image *, int, - int, int)); -static void x_clear_image P_ ((struct frame *f, struct image *img)); -static unsigned long x_alloc_image_color P_ ((struct frame *f, - struct image *img, - Lisp_Object color_name, - unsigned long dflt)); - - -/* Clear X resources of image IMG on frame F. PIXMAP_P non-zero means - free the pixmap if any. MASK_P non-zero means clear the mask - pixmap if any. COLORS_P non-zero means free colors allocated for - the image, if any. */ - -static void -x_clear_image_1 (f, img, pixmap_p, mask_p, colors_p) - struct frame *f; - struct image *img; - int pixmap_p, mask_p, colors_p; -{ - if (pixmap_p && img->pixmap) - { - DeleteObject (img->pixmap); - img->pixmap = NULL; - img->background_valid = 0; - } - - if (mask_p && img->mask) - { - DeleteObject (img->mask); - img->mask = NULL; - img->background_transparent_valid = 0; - } - - if (colors_p && img->ncolors) - { -#if 0 /* TODO: color table support. */ - x_free_colors (f, img->colors, img->ncolors); -#endif - xfree (img->colors); - img->colors = NULL; - img->ncolors = 0; - } -} - -/* Free X resources of image IMG which is used on frame F. */ - -static void -x_clear_image (f, img) - struct frame *f; - struct image *img; -{ - if (img->pixmap) - { - BLOCK_INPUT; - DeleteObject (img->pixmap); - img->pixmap = 0; - UNBLOCK_INPUT; - } - - if (img->ncolors) - { -#if 0 /* TODO: color table support */ - - int class = FRAME_W32_DISPLAY_INFO (f)->visual->class; - - /* If display has an immutable color map, freeing colors is not - necessary and some servers don't allow it. So don't do it. */ - if (class != StaticColor - && class != StaticGray - && class != TrueColor) - { - Colormap cmap; - BLOCK_INPUT; - cmap = DefaultColormapOfScreen (FRAME_W32_DISPLAY_INFO (f)->screen); - XFreeColors (FRAME_W32_DISPLAY (f), cmap, img->colors, - img->ncolors, 0); - UNBLOCK_INPUT; - } -#endif - - xfree (img->colors); - img->colors = NULL; - img->ncolors = 0; - } -} - - -/* Allocate color COLOR_NAME for image IMG on frame F. If color - cannot be allocated, use DFLT. Add a newly allocated color to - IMG->colors, so that it can be freed again. Value is the pixel - color. */ - -static unsigned long -x_alloc_image_color (f, img, color_name, dflt) - struct frame *f; - struct image *img; - Lisp_Object color_name; - unsigned long dflt; -{ - XColor color; - unsigned long result; - - xassert (STRINGP (color_name)); - - if (w32_defined_color (f, SDATA (color_name), &color, 1)) - { - /* This isn't called frequently so we get away with simply - reallocating the color vector to the needed size, here. */ - ++img->ncolors; - img->colors = - (unsigned long *) xrealloc (img->colors, - img->ncolors * sizeof *img->colors); - img->colors[img->ncolors - 1] = color.pixel; - result = color.pixel; - } - else - result = dflt; - return result; -} - - - -/*********************************************************************** - Image Cache - ***********************************************************************/ - -static void cache_image P_ ((struct frame *f, struct image *img)); -static void postprocess_image P_ ((struct frame *, struct image *)); -static void x_disable_image P_ ((struct frame *, struct image *)); - - -/* Return a new, initialized image cache that is allocated from the - heap. Call free_image_cache to free an image cache. */ - -struct image_cache * -make_image_cache () -{ - struct image_cache *c = (struct image_cache *) xmalloc (sizeof *c); - int size; - - bzero (c, sizeof *c); - c->size = 50; - c->images = (struct image **) xmalloc (c->size * sizeof *c->images); - size = IMAGE_CACHE_BUCKETS_SIZE * sizeof *c->buckets; - c->buckets = (struct image **) xmalloc (size); - bzero (c->buckets, size); - return c; -} - - -/* Free image cache of frame F. Be aware that X frames share images - caches. */ - -void -free_image_cache (f) - struct frame *f; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - if (c) - { - int i; - - /* Cache should not be referenced by any frame when freed. */ - xassert (c->refcount == 0); - - for (i = 0; i < c->used; ++i) - free_image (f, c->images[i]); - xfree (c->images); - xfree (c); - xfree (c->buckets); - FRAME_X_IMAGE_CACHE (f) = NULL; - } -} - - -/* Clear image cache of frame F. FORCE_P non-zero means free all - images. FORCE_P zero means clear only images that haven't been - displayed for some time. Should be called from time to time to - reduce the number of loaded images. If image-eviction-seconds is - non-nil, this frees images in the cache which weren't displayed for - at least that many seconds. */ - -void -clear_image_cache (f, force_p) - struct frame *f; - int force_p; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - - if (c && INTEGERP (Vimage_cache_eviction_delay)) - { - EMACS_TIME t; - unsigned long old; - int i, nfreed; - - EMACS_GET_TIME (t); - old = EMACS_SECS (t) - XFASTINT (Vimage_cache_eviction_delay); - - /* Block input so that we won't be interrupted by a SIGIO - while being in an inconsistent state. */ - BLOCK_INPUT; - - for (i = nfreed = 0; i < c->used; ++i) - { - struct image *img = c->images[i]; - if (img != NULL - && (force_p || (img->timestamp < old))) - { - free_image (f, img); - ++nfreed; - } - } - - /* We may be clearing the image cache because, for example, - Emacs was iconified for a longer period of time. In that - case, current matrices may still contain references to - images freed above. So, clear these matrices. */ - if (nfreed) - { - Lisp_Object tail, frame; - - FOR_EACH_FRAME (tail, frame) - { - struct frame *f = XFRAME (frame); - if (FRAME_W32_P (f) - && FRAME_X_IMAGE_CACHE (f) == c) - clear_current_matrices (f); - } - - ++windows_or_buffers_changed; - } - - UNBLOCK_INPUT; - } -} - - -DEFUN ("clear-image-cache", Fclear_image_cache, Sclear_image_cache, - 0, 1, 0, - doc: /* Clear the image cache of FRAME. -FRAME nil or omitted means use the selected frame. -FRAME t means clear the image caches of all frames. */) - (frame) - Lisp_Object frame; -{ - if (EQ (frame, Qt)) - { - Lisp_Object tail; - - FOR_EACH_FRAME (tail, frame) - if (FRAME_W32_P (XFRAME (frame))) - clear_image_cache (XFRAME (frame), 1); - } - else - clear_image_cache (check_x_frame (frame), 1); - - return Qnil; -} - - -/* Compute masks and transform image IMG on frame F, as specified - by the image's specification, */ - -static void -postprocess_image (f, img) - struct frame *f; - struct image *img; -{ - /* Manipulation of the image's mask. */ - if (img->pixmap) - { - Lisp_Object conversion, spec; - Lisp_Object mask; - - spec = img->spec; - - /* `:heuristic-mask t' - `:mask heuristic' - means build a mask heuristically. - `:heuristic-mask (R G B)' - `:mask (heuristic (R G B))' - means build a mask from color (R G B) in the - image. - `:mask nil' - means remove a mask, if any. */ - - mask = image_spec_value (spec, QCheuristic_mask, NULL); - if (!NILP (mask)) - x_build_heuristic_mask (f, img, mask); - else - { - int found_p; - - mask = image_spec_value (spec, QCmask, &found_p); - - if (EQ (mask, Qheuristic)) - x_build_heuristic_mask (f, img, Qt); - else if (CONSP (mask) - && EQ (XCAR (mask), Qheuristic)) - { - if (CONSP (XCDR (mask))) - x_build_heuristic_mask (f, img, XCAR (XCDR (mask))); - else - x_build_heuristic_mask (f, img, XCDR (mask)); - } - else if (NILP (mask) && found_p && img->mask) - { - DeleteObject (img->mask); - img->mask = NULL; - } - } - - - /* Should we apply an image transformation algorithm? */ - conversion = image_spec_value (spec, QCconversion, NULL); - if (EQ (conversion, Qdisabled)) - x_disable_image (f, img); - else if (EQ (conversion, Qlaplace)) - x_laplace (f, img); - else if (EQ (conversion, Qemboss)) - x_emboss (f, img); - else if (CONSP (conversion) - && EQ (XCAR (conversion), Qedge_detection)) - { - Lisp_Object tem; - tem = XCDR (conversion); - if (CONSP (tem)) - x_edge_detection (f, img, - Fplist_get (tem, QCmatrix), - Fplist_get (tem, QCcolor_adjustment)); - } - } -} - - -/* Return the id of image with Lisp specification SPEC on frame F. - SPEC must be a valid Lisp image specification (see valid_image_p). */ - -int -lookup_image (f, spec) - struct frame *f; - Lisp_Object spec; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - struct image *img; - int i; - unsigned hash; - struct gcpro gcpro1; - EMACS_TIME now; - - /* F must be a window-system frame, and SPEC must be a valid image - specification. */ - xassert (FRAME_WINDOW_P (f)); - xassert (valid_image_p (spec)); - - GCPRO1 (spec); - - /* Look up SPEC in the hash table of the image cache. */ - hash = sxhash (spec, 0); - i = hash % IMAGE_CACHE_BUCKETS_SIZE; - - for (img = c->buckets[i]; img; img = img->next) - if (img->hash == hash && !NILP (Fequal (img->spec, spec))) - break; - - /* If not found, create a new image and cache it. */ - if (img == NULL) - { - extern Lisp_Object Qpostscript; - - BLOCK_INPUT; - img = make_image (spec, hash); - cache_image (f, img); - img->load_failed_p = img->type->load (f, img) == 0; - - /* If we can't load the image, and we don't have a width and - height, use some arbitrary width and height so that we can - draw a rectangle for it. */ - if (img->load_failed_p) - { - Lisp_Object value; - - value = image_spec_value (spec, QCwidth, NULL); - img->width = (INTEGERP (value) - ? XFASTINT (value) : DEFAULT_IMAGE_WIDTH); - value = image_spec_value (spec, QCheight, NULL); - img->height = (INTEGERP (value) - ? XFASTINT (value) : DEFAULT_IMAGE_HEIGHT); - } - else - { - /* Handle image type independent image attributes - `:ascent ASCENT', `:margin MARGIN', `:relief RELIEF', - `:background COLOR'. */ - Lisp_Object ascent, margin, relief, bg; - - ascent = image_spec_value (spec, QCascent, NULL); - if (INTEGERP (ascent)) - img->ascent = XFASTINT (ascent); - else if (EQ (ascent, Qcenter)) - img->ascent = CENTERED_IMAGE_ASCENT; - - margin = image_spec_value (spec, QCmargin, NULL); - if (INTEGERP (margin) && XINT (margin) >= 0) - img->vmargin = img->hmargin = XFASTINT (margin); - else if (CONSP (margin) && INTEGERP (XCAR (margin)) - && INTEGERP (XCDR (margin))) - { - if (XINT (XCAR (margin)) > 0) - img->hmargin = XFASTINT (XCAR (margin)); - if (XINT (XCDR (margin)) > 0) - img->vmargin = XFASTINT (XCDR (margin)); - } - - relief = image_spec_value (spec, QCrelief, NULL); - if (INTEGERP (relief)) - { - img->relief = XINT (relief); - img->hmargin += abs (img->relief); - img->vmargin += abs (img->relief); - } - - if (! img->background_valid) - { - bg = image_spec_value (img->spec, QCbackground, NULL); - if (!NILP (bg)) - { - img->background - = x_alloc_image_color (f, img, bg, - FRAME_BACKGROUND_PIXEL (f)); - img->background_valid = 1; - } - } - - /* Do image transformations and compute masks, unless we - don't have the image yet. */ - if (!EQ (*img->type->type, Qpostscript)) - postprocess_image (f, img); - } - - UNBLOCK_INPUT; - xassert (!interrupt_input_blocked); - } - - /* We're using IMG, so set its timestamp to `now'. */ - EMACS_GET_TIME (now); - img->timestamp = EMACS_SECS (now); - - UNGCPRO; - - /* Value is the image id. */ - return img->id; -} - - -/* Cache image IMG in the image cache of frame F. */ - -static void -cache_image (f, img) - struct frame *f; - struct image *img; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - int i; - - /* Find a free slot in c->images. */ - for (i = 0; i < c->used; ++i) - if (c->images[i] == NULL) - break; - - /* If no free slot found, maybe enlarge c->images. */ - if (i == c->used && c->used == c->size) - { - c->size *= 2; - c->images = (struct image **) xrealloc (c->images, - c->size * sizeof *c->images); - } - - /* Add IMG to c->images, and assign IMG an id. */ - c->images[i] = img; - img->id = i; - if (i == c->used) - ++c->used; - - /* Add IMG to the cache's hash table. */ - i = img->hash % IMAGE_CACHE_BUCKETS_SIZE; - img->next = c->buckets[i]; - if (img->next) - img->next->prev = img; - img->prev = NULL; - c->buckets[i] = img; -} - - -/* Call FN on every image in the image cache of frame F. Used to mark - Lisp Objects in the image cache. */ - -void -forall_images_in_image_cache (f, fn) - struct frame *f; - void (*fn) P_ ((struct image *img)); -{ - if (FRAME_LIVE_P (f) && FRAME_W32_P (f)) - { - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - if (c) - { - int i; - for (i = 0; i < c->used; ++i) - if (c->images[i]) - fn (c->images[i]); - } - } -} - - - -/*********************************************************************** - W32 support code - ***********************************************************************/ - -/* Macro for defining functions that will be loaded from image DLLs. */ -#define DEF_IMGLIB_FN(func) FARPROC fn_##func - -/* Macro for loading those image functions from the library. */ -#define LOAD_IMGLIB_FN(lib,func) { \ - fn_##func = (void *) GetProcAddress (lib, #func); \ - if (!fn_##func) return 0; \ - } - -static int x_create_x_image_and_pixmap P_ ((struct frame *, int, int, int, - XImage **, Pixmap *)); -static void x_put_x_image P_ ((struct frame *, XImage *, Pixmap, int, int)); - - -/* Create an XImage and a pixmap of size WIDTH x HEIGHT for use on - frame F. Set *XIMG and *PIXMAP to the XImage and Pixmap created. - Set (*XIMG)->data to a raster of WIDTH x HEIGHT pixels allocated - via xmalloc. DEPTH of zero signifies a 24 bit image, otherwise - DEPTH should indicate the bit depth of the image. Print error - messages via image_error if an error occurs. Value is non-zero if - successful. */ - -static int -x_create_x_image_and_pixmap (f, width, height, depth, ximg, pixmap) - struct frame *f; - int width, height, depth; - XImage **ximg; - Pixmap *pixmap; -{ - BITMAPINFOHEADER *header; - HDC hdc; - int scanline_width_bits; - int remainder; - int palette_colors = 0; - - if (depth == 0) - depth = 24; - - if (depth != 1 && depth != 4 && depth != 8 - && depth != 16 && depth != 24 && depth != 32) - { - image_error ("Invalid image bit depth specified", Qnil, Qnil); - return 0; - } - - scanline_width_bits = width * depth; - remainder = scanline_width_bits % 32; - - if (remainder) - scanline_width_bits += 32 - remainder; - - /* Bitmaps with a depth less than 16 need a palette. */ - /* BITMAPINFO structure already contains the first RGBQUAD. */ - if (depth < 16) - palette_colors = 1 << depth - 1; - - *ximg = xmalloc (sizeof (XImage) + palette_colors * sizeof (RGBQUAD)); - if (*ximg == NULL) - { - image_error ("Unable to allocate memory for XImage", Qnil, Qnil); - return 0; - } - - header = &((*ximg)->info.bmiHeader); - bzero (&((*ximg)->info), sizeof (BITMAPINFO)); - header->biSize = sizeof (*header); - header->biWidth = width; - header->biHeight = -height; /* negative indicates a top-down bitmap. */ - header->biPlanes = 1; - header->biBitCount = depth; - header->biCompression = BI_RGB; - header->biClrUsed = palette_colors; - - /* TODO: fill in palette. */ - if (depth == 1) - { - (*ximg)->info.bmiColors[0].rgbBlue = 0; - (*ximg)->info.bmiColors[0].rgbGreen = 0; - (*ximg)->info.bmiColors[0].rgbRed = 0; - (*ximg)->info.bmiColors[0].rgbReserved = 0; - (*ximg)->info.bmiColors[1].rgbBlue = 255; - (*ximg)->info.bmiColors[1].rgbGreen = 255; - (*ximg)->info.bmiColors[1].rgbRed = 255; - (*ximg)->info.bmiColors[1].rgbReserved = 0; - } - - hdc = get_frame_dc (f); - - /* Create a DIBSection and raster array for the bitmap, - and store its handle in *pixmap. */ - *pixmap = CreateDIBSection (hdc, &((*ximg)->info), - (depth < 16) ? DIB_PAL_COLORS : DIB_RGB_COLORS, - &((*ximg)->data), NULL, 0); - - /* Realize display palette and garbage all frames. */ - release_frame_dc (f, hdc); - - if (*pixmap == NULL) - { - DWORD err = GetLastError(); - Lisp_Object errcode; - /* All system errors are < 10000, so the following is safe. */ - XSETINT (errcode, (int) err); - image_error ("Unable to create bitmap, error code %d", errcode, Qnil); - x_destroy_x_image (*ximg); - return 0; - } - - return 1; -} - - -/* Destroy XImage XIMG. Free XIMG->data. */ - -static void -x_destroy_x_image (ximg) - XImage *ximg; -{ - xassert (interrupt_input_blocked); - if (ximg) - { - /* Data will be freed by DestroyObject. */ - ximg->data = NULL; - xfree (ximg); - } -} - - -/* Put XImage XIMG into pixmap PIXMAP on frame F. WIDTH and HEIGHT - are width and height of both the image and pixmap. */ - -static void -x_put_x_image (f, ximg, pixmap, width, height) - struct frame *f; - XImage *ximg; - Pixmap pixmap; - int width, height; -{ -#if 0 /* I don't think this is necessary looking at where it is used. */ - HDC hdc = get_frame_dc (f); - SetDIBits (hdc, pixmap, 0, height, ximg->data, &(ximg->info), DIB_RGB_COLORS); - release_frame_dc (f, hdc); -#endif -} - - -/*********************************************************************** - File Handling - ***********************************************************************/ - -static Lisp_Object x_find_image_file P_ ((Lisp_Object)); -static char *slurp_file P_ ((char *, int *)); - - -/* Find image file FILE. Look in data-directory, then - x-bitmap-file-path. Value is the full name of the file found, or - nil if not found. */ - -static Lisp_Object -x_find_image_file (file) - Lisp_Object file; -{ - Lisp_Object file_found, search_path; - struct gcpro gcpro1, gcpro2; - int fd; - - file_found = Qnil; - search_path = Fcons (Vdata_directory, Vx_bitmap_file_path); - GCPRO2 (file_found, search_path); - - /* Try to find FILE in data-directory, then x-bitmap-file-path. */ - fd = openp (search_path, file, Qnil, &file_found, Qnil); - - if (fd == -1) - file_found = Qnil; - else - close (fd); - - UNGCPRO; - return file_found; -} - - -/* Read FILE into memory. Value is a pointer to a buffer allocated - with xmalloc holding FILE's contents. Value is null if an error - occurred. *SIZE is set to the size of the file. */ - -static char * -slurp_file (file, size) - char *file; - int *size; -{ - FILE *fp = NULL; - char *buf = NULL; - struct stat st; - - if (stat (file, &st) == 0 - && (fp = fopen (file, "rb")) != NULL - && (buf = (char *) xmalloc (st.st_size), - fread (buf, 1, st.st_size, fp) == st.st_size)) - { - *size = st.st_size; - fclose (fp); - } - else - { - if (fp) - fclose (fp); - if (buf) - { - xfree (buf); - buf = NULL; - } - } - - return buf; -} - - - -/*********************************************************************** - XBM images - ***********************************************************************/ - -static int xbm_scan P_ ((char **, char *, char *, int *)); -static int xbm_load P_ ((struct frame *f, struct image *img)); -static int xbm_load_image P_ ((struct frame *f, struct image *img, - char *, char *)); -static int xbm_image_p P_ ((Lisp_Object object)); -static int xbm_read_bitmap_data P_ ((char *, char *, int *, int *, - unsigned char **)); -static int xbm_file_p P_ ((Lisp_Object)); - - -/* Indices of image specification fields in xbm_format, below. */ - -enum xbm_keyword_index -{ - XBM_TYPE, - XBM_FILE, - XBM_WIDTH, - XBM_HEIGHT, - XBM_DATA, - XBM_FOREGROUND, - XBM_BACKGROUND, - XBM_ASCENT, - XBM_MARGIN, - XBM_RELIEF, - XBM_ALGORITHM, - XBM_HEURISTIC_MASK, - XBM_MASK, - XBM_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid XBM image specifications. */ - -static struct image_keyword xbm_format[XBM_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":file", IMAGE_STRING_VALUE, 0}, - {":width", IMAGE_POSITIVE_INTEGER_VALUE, 0}, - {":height", IMAGE_POSITIVE_INTEGER_VALUE, 0}, - {":data", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":foreground", IMAGE_STRING_OR_NIL_VALUE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} -}; - -/* Structure describing the image type XBM. */ - -static struct image_type xbm_type = -{ - &Qxbm, - xbm_image_p, - xbm_load, - x_clear_image, - NULL -}; - -/* Tokens returned from xbm_scan. */ - -enum xbm_token -{ - XBM_TK_IDENT = 256, - XBM_TK_NUMBER -}; - - -/* Return non-zero if OBJECT is a valid XBM-type image specification. - A valid specification is a list starting with the symbol `image' - The rest of the list is a property list which must contain an - entry `:type xbm.. - - If the specification specifies a file to load, it must contain - an entry `:file FILENAME' where FILENAME is a string. - - If the specification is for a bitmap loaded from memory it must - contain `:width WIDTH', `:height HEIGHT', and `:data DATA', where - WIDTH and HEIGHT are integers > 0. DATA may be: - - 1. a string large enough to hold the bitmap data, i.e. it must - have a size >= (WIDTH + 7) / 8 * HEIGHT - - 2. a bool-vector of size >= WIDTH * HEIGHT - - 3. a vector of strings or bool-vectors, one for each line of the - bitmap. - - 4. A string containing an in-memory XBM file. WIDTH and HEIGHT - may not be specified in this case because they are defined in the - XBM file. - - Both the file and data forms may contain the additional entries - `:background COLOR' and `:foreground COLOR'. If not present, - foreground and background of the frame on which the image is - displayed is used. */ - -static int -xbm_image_p (object) - Lisp_Object object; -{ - struct image_keyword kw[XBM_LAST]; - - bcopy (xbm_format, kw, sizeof kw); - if (!parse_image_spec (object, kw, XBM_LAST, Qxbm)) - return 0; - - xassert (EQ (kw[XBM_TYPE].value, Qxbm)); - - if (kw[XBM_FILE].count) - { - if (kw[XBM_WIDTH].count || kw[XBM_HEIGHT].count || kw[XBM_DATA].count) - return 0; - } - else if (kw[XBM_DATA].count && xbm_file_p (kw[XBM_DATA].value)) - { - /* In-memory XBM file. */ - if (kw[XBM_WIDTH].count || kw[XBM_HEIGHT].count || kw[XBM_FILE].count) - return 0; - } - else - { - Lisp_Object data; - int width, height; - - /* Entries for `:width', `:height' and `:data' must be present. */ - if (!kw[XBM_WIDTH].count - || !kw[XBM_HEIGHT].count - || !kw[XBM_DATA].count) - return 0; - - data = kw[XBM_DATA].value; - width = XFASTINT (kw[XBM_WIDTH].value); - height = XFASTINT (kw[XBM_HEIGHT].value); - - /* Check type of data, and width and height against contents of - data. */ - if (VECTORP (data)) - { - int i; - - /* Number of elements of the vector must be >= height. */ - if (XVECTOR (data)->size < height) - return 0; - - /* Each string or bool-vector in data must be large enough - for one line of the image. */ - for (i = 0; i < height; ++i) - { - Lisp_Object elt = XVECTOR (data)->contents[i]; - - if (STRINGP (elt)) - { - if (SCHARS (elt) - < (width + BITS_PER_CHAR - 1) / BITS_PER_CHAR) - return 0; - } - else if (BOOL_VECTOR_P (elt)) - { - if (XBOOL_VECTOR (elt)->size < width) - return 0; - } - else - return 0; - } - } - else if (STRINGP (data)) - { - if (SCHARS (data) - < (width + BITS_PER_CHAR - 1) / BITS_PER_CHAR * height) - return 0; - } - else if (BOOL_VECTOR_P (data)) - { - if (XBOOL_VECTOR (data)->size < width * height) - return 0; - } - else - return 0; - } - - return 1; -} - - -/* Scan a bitmap file. FP is the stream to read from. Value is - either an enumerator from enum xbm_token, or a character for a - single-character token, or 0 at end of file. If scanning an - identifier, store the lexeme of the identifier in SVAL. If - scanning a number, store its value in *IVAL. */ - -static int -xbm_scan (s, end, sval, ival) - char **s, *end; - char *sval; - int *ival; -{ - int c; - - loop: - - /* Skip white space. */ - while (*s < end && (c = *(*s)++, isspace (c))) - ; - - if (*s >= end) - c = 0; - else if (isdigit (c)) - { - int value = 0, digit; - - if (c == '0' && *s < end) - { - c = *(*s)++; - if (c == 'x' || c == 'X') - { - while (*s < end) - { - c = *(*s)++; - if (isdigit (c)) - digit = c - '0'; - else if (c >= 'a' && c <= 'f') - digit = c - 'a' + 10; - else if (c >= 'A' && c <= 'F') - digit = c - 'A' + 10; - else - break; - value = 16 * value + digit; - } - } - else if (isdigit (c)) - { - value = c - '0'; - while (*s < end - && (c = *(*s)++, isdigit (c))) - value = 8 * value + c - '0'; - } - } - else - { - value = c - '0'; - while (*s < end - && (c = *(*s)++, isdigit (c))) - value = 10 * value + c - '0'; - } - - if (*s < end) - *s = *s - 1; - *ival = value; - c = XBM_TK_NUMBER; - } - else if (isalpha (c) || c == '_') - { - *sval++ = c; - while (*s < end - && (c = *(*s)++, (isalnum (c) || c == '_'))) - *sval++ = c; - *sval = 0; - if (*s < end) - *s = *s - 1; - c = XBM_TK_IDENT; - } - else if (c == '/' && **s == '*') - { - /* C-style comment. */ - ++*s; - while (**s && (**s != '*' || *(*s + 1) != '/')) - ++*s; - if (**s) - { - *s += 2; - goto loop; - } - } - - return c; -} - - -/* XBM bits seem to be backward within bytes compared with how - Windows does things. */ -static unsigned char reflect_byte (unsigned char orig) -{ - int i; - unsigned char reflected = 0x00; - for (i = 0; i < 8; i++) - { - if (orig & (0x01 << i)) - reflected |= 0x80 >> i; - } - return reflected; -} - - -/* Create a Windows bitmap from X bitmap data. */ -static HBITMAP -w32_create_pixmap_from_bitmap_data (int width, int height, char *data) -{ - int i, j, w1, w2; - char *bits, *p; - HBITMAP bmp; - - w1 = (width + 7) / 8; /* nb of 8bits elt in X bitmap */ - w2 = ((width + 15) / 16) * 2; /* nb of 16bits elt in W32 bitmap */ - bits = (char *) alloca (height * w2); - bzero (bits, height * w2); - for (i = 0; i < height; i++) - { - p = bits + i*w2; - for (j = 0; j < w1; j++) - *p++ = reflect_byte(*data++); - } - bmp = CreateBitmap (width, height, 1, 1, bits); - - return bmp; -} - - -/* Replacement for XReadBitmapFileData which isn't available under old - X versions. CONTENTS is a pointer to a buffer to parse; END is the - buffer's end. Set *WIDTH and *HEIGHT to the width and height of - the image. Return in *DATA the bitmap data allocated with xmalloc. - Value is non-zero if successful. DATA null means just test if - CONTENTS looks like an in-memory XBM file. */ - -static int -xbm_read_bitmap_data (contents, end, width, height, data) - char *contents, *end; - int *width, *height; - unsigned char **data; -{ - char *s = contents; - char buffer[BUFSIZ]; - int padding_p = 0; - int v10 = 0; - int bytes_per_line, i, nbytes; - unsigned char *p; - int value; - int LA1; - -#define match() \ - LA1 = xbm_scan (&s, end, buffer, &value) - -#define expect(TOKEN) \ - if (LA1 != (TOKEN)) \ - goto failure; \ - else \ - match () - -#define expect_ident(IDENT) \ - if (LA1 == XBM_TK_IDENT && strcmp (buffer, (IDENT)) == 0) \ - match (); \ - else \ - goto failure - - *width = *height = -1; - if (data) - *data = NULL; - LA1 = xbm_scan (&s, end, buffer, &value); - - /* Parse defines for width, height and hot-spots. */ - while (LA1 == '#') - { - match (); - expect_ident ("define"); - expect (XBM_TK_IDENT); - - if (LA1 == XBM_TK_NUMBER); - { - char *p = strrchr (buffer, '_'); - p = p ? p + 1 : buffer; - if (strcmp (p, "width") == 0) - *width = value; - else if (strcmp (p, "height") == 0) - *height = value; - } - expect (XBM_TK_NUMBER); - } - - if (*width < 0 || *height < 0) - goto failure; - else if (data == NULL) - goto success; - - /* Parse bits. Must start with `static'. */ - expect_ident ("static"); - if (LA1 == XBM_TK_IDENT) - { - if (strcmp (buffer, "unsigned") == 0) - { - match (); - expect_ident ("char"); - } - else if (strcmp (buffer, "short") == 0) - { - match (); - v10 = 1; - if (*width % 16 && *width % 16 < 9) - padding_p = 1; - } - else if (strcmp (buffer, "char") == 0) - match (); - else - goto failure; - } - else - goto failure; - - expect (XBM_TK_IDENT); - expect ('['); - expect (']'); - expect ('='); - expect ('{'); - - bytes_per_line = (*width + 7) / 8 + padding_p; - nbytes = bytes_per_line * *height; - p = *data = (char *) xmalloc (nbytes); - - if (v10) - { - for (i = 0; i < nbytes; i += 2) - { - int val = value; - expect (XBM_TK_NUMBER); - - *p++ = ~ val; - if (!padding_p || ((i + 2) % bytes_per_line)) - *p++ = ~ (value >> 8); - - if (LA1 == ',' || LA1 == '}') - match (); - else - goto failure; - } - } - else - { - for (i = 0; i < nbytes; ++i) - { - int val = value; - expect (XBM_TK_NUMBER); - - *p++ = ~ val; - - if (LA1 == ',' || LA1 == '}') - match (); - else - goto failure; - } - } - - success: - return 1; - - failure: - - if (data && *data) - { - xfree (*data); - *data = NULL; - } - return 0; - -#undef match -#undef expect -#undef expect_ident -} - -static void convert_mono_to_color_image (f, img, foreground, background) - struct frame *f; - struct image *img; - COLORREF foreground, background; -{ - HDC hdc, old_img_dc, new_img_dc; - HGDIOBJ old_prev, new_prev; - HBITMAP new_pixmap; - - hdc = get_frame_dc (f); - old_img_dc = CreateCompatibleDC (hdc); - new_img_dc = CreateCompatibleDC (hdc); - new_pixmap = CreateCompatibleBitmap (hdc, img->width, img->height); - release_frame_dc (f, hdc); - old_prev = SelectObject (old_img_dc, img->pixmap); - new_prev = SelectObject (new_img_dc, new_pixmap); - SetTextColor (new_img_dc, foreground); - SetBkColor (new_img_dc, background); - - BitBlt (new_img_dc, 0, 0, img->width, img->height, old_img_dc, - 0, 0, SRCCOPY); - - SelectObject (old_img_dc, old_prev); - SelectObject (new_img_dc, new_prev); - DeleteDC (old_img_dc); - DeleteDC (new_img_dc); - DeleteObject (img->pixmap); - if (new_pixmap == 0) - fprintf (stderr, "Failed to convert image to color.\n"); - else - img->pixmap = new_pixmap; -} - -/* Load XBM image IMG which will be displayed on frame F from buffer - CONTENTS. END is the end of the buffer. Value is non-zero if - successful. */ - -static int -xbm_load_image (f, img, contents, end) - struct frame *f; - struct image *img; - char *contents, *end; -{ - int rc; - unsigned char *data; - int success_p = 0; - - rc = xbm_read_bitmap_data (contents, end, &img->width, &img->height, &data); - if (rc) - { - unsigned long foreground = FRAME_FOREGROUND_PIXEL (f); - unsigned long background = FRAME_BACKGROUND_PIXEL (f); - int non_default_colors = 0; - Lisp_Object value; - - xassert (img->width > 0 && img->height > 0); - - /* Get foreground and background colors, maybe allocate colors. */ - value = image_spec_value (img->spec, QCforeground, NULL); - if (!NILP (value)) - { - foreground = x_alloc_image_color (f, img, value, foreground); - non_default_colors = 1; - } - value = image_spec_value (img->spec, QCbackground, NULL); - if (!NILP (value)) - { - background = x_alloc_image_color (f, img, value, background); - img->background = background; - img->background_valid = 1; - non_default_colors = 1; - } - img->pixmap - = w32_create_pixmap_from_bitmap_data (img->width, img->height, data); - - /* If colors were specified, transfer the bitmap to a color one. */ - if (non_default_colors) - convert_mono_to_color_image (f, img, foreground, background); - - xfree (data); - - if (img->pixmap == 0) - { - x_clear_image (f, img); - image_error ("Unable to create X pixmap for `%s'", img->spec, Qnil); - } - else - success_p = 1; - } - else - image_error ("Error loading XBM image `%s'", img->spec, Qnil); - - return success_p; -} - - -/* Value is non-zero if DATA looks like an in-memory XBM file. */ - -static int -xbm_file_p (data) - Lisp_Object data; -{ - int w, h; - return (STRINGP (data) - && xbm_read_bitmap_data (SDATA (data), - (SDATA (data) - + SBYTES (data)), - &w, &h, NULL)); -} - - -/* Fill image IMG which is used on frame F with pixmap data. Value is - non-zero if successful. */ - -static int -xbm_load (f, img) - struct frame *f; - struct image *img; -{ - int success_p = 0; - Lisp_Object file_name; - - xassert (xbm_image_p (img->spec)); - - /* If IMG->spec specifies a file name, create a non-file spec from it. */ - file_name = image_spec_value (img->spec, QCfile, NULL); - if (STRINGP (file_name)) - { - Lisp_Object file; - char *contents; - int size; - struct gcpro gcpro1; - - file = x_find_image_file (file_name); - GCPRO1 (file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", file_name, Qnil); - UNGCPRO; - return 0; - } - - contents = slurp_file (SDATA (file), &size); - if (contents == NULL) - { - image_error ("Error loading XBM image `%s'", img->spec, Qnil); - UNGCPRO; - return 0; - } - - success_p = xbm_load_image (f, img, contents, contents + size); - UNGCPRO; - } - else - { - struct image_keyword fmt[XBM_LAST]; - Lisp_Object data; - unsigned long foreground = FRAME_FOREGROUND_PIXEL (f); - unsigned long background = FRAME_BACKGROUND_PIXEL (f); - int non_default_colors = 0; - char *bits; - int parsed_p; - int in_memory_file_p = 0; - - /* See if data looks like an in-memory XBM file. */ - data = image_spec_value (img->spec, QCdata, NULL); - in_memory_file_p = xbm_file_p (data); - - /* Parse the image specification. */ - bcopy (xbm_format, fmt, sizeof fmt); - parsed_p = parse_image_spec (img->spec, fmt, XBM_LAST, Qxbm); - xassert (parsed_p); - - /* Get specified width, and height. */ - if (!in_memory_file_p) - { - img->width = XFASTINT (fmt[XBM_WIDTH].value); - img->height = XFASTINT (fmt[XBM_HEIGHT].value); - xassert (img->width > 0 && img->height > 0); - } - - /* Get foreground and background colors, maybe allocate colors. */ - if (fmt[XBM_FOREGROUND].count - && STRINGP (fmt[XBM_FOREGROUND].value)) - { - foreground = x_alloc_image_color (f, img, fmt[XBM_FOREGROUND].value, - foreground); - non_default_colors = 1; - } - - if (fmt[XBM_BACKGROUND].count - && STRINGP (fmt[XBM_BACKGROUND].value)) - { - background = x_alloc_image_color (f, img, fmt[XBM_BACKGROUND].value, - background); - non_default_colors = 1; - } - - if (in_memory_file_p) - success_p = xbm_load_image (f, img, SDATA (data), - (SDATA (data) - + SBYTES (data))); - else - { - if (VECTORP (data)) - { - int i; - char *p; - int nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR; - - p = bits = (char *) alloca (nbytes * img->height); - for (i = 0; i < img->height; ++i, p += nbytes) - { - Lisp_Object line = XVECTOR (data)->contents[i]; - if (STRINGP (line)) - bcopy (SDATA (line), p, nbytes); - else - bcopy (XBOOL_VECTOR (line)->data, p, nbytes); - } - } - else if (STRINGP (data)) - bits = SDATA (data); - else - bits = XBOOL_VECTOR (data)->data; - - /* Create the pixmap. */ - img->pixmap - = w32_create_pixmap_from_bitmap_data (img->width, img->height, - bits); - - /* If colors were specified, transfer the bitmap to a color one. */ - if (non_default_colors) - convert_mono_to_color_image (f, img, foreground, background); - - if (img->pixmap) - success_p = 1; - else - { - image_error ("Unable to create pixmap for XBM image `%s'", - img->spec, Qnil); - x_clear_image (f, img); - } - } - } - - return success_p; -} - - - -/*********************************************************************** - XPM images - ***********************************************************************/ - -#if HAVE_XPM - -static int xpm_image_p P_ ((Lisp_Object object)); -static int xpm_load P_ ((struct frame *f, struct image *img)); -static int xpm_valid_color_symbols_p P_ ((Lisp_Object)); - -/* Indicate to xpm.h that we don't have Xlib. */ -#define FOR_MSW -/* simx.h in xpm defines XColor and XImage differently than Emacs. */ -#define XColor xpm_XColor -#define XImage xpm_XImage -#define PIXEL_ALREADY_TYPEDEFED -#include "X11/xpm.h" -#undef FOR_MSW -#undef XColor -#undef XImage -#undef PIXEL_ALREADY_TYPEDEFED - -/* The symbol `xpm' identifying XPM-format images. */ - -Lisp_Object Qxpm; - -/* Indices of image specification fields in xpm_format, below. */ - -enum xpm_keyword_index -{ - XPM_TYPE, - XPM_FILE, - XPM_DATA, - XPM_ASCENT, - XPM_MARGIN, - XPM_RELIEF, - XPM_ALGORITHM, - XPM_HEURISTIC_MASK, - XPM_MASK, - XPM_COLOR_SYMBOLS, - XPM_BACKGROUND, - XPM_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid XPM image specifications. */ - -static struct image_keyword xpm_format[XPM_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":file", IMAGE_STRING_VALUE, 0}, - {":data", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":color-symbols", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type XPM. */ - -static struct image_type xpm_type = -{ - &Qxpm, - xpm_image_p, - xpm_load, - x_clear_image, - NULL -}; - - -/* XPM library details. */ - -DEF_IMGLIB_FN (XpmFreeAttributes); -DEF_IMGLIB_FN (XpmCreateImageFromBuffer); -DEF_IMGLIB_FN (XpmReadFileToImage); -DEF_IMGLIB_FN (XImageFree); - - -static int -init_xpm_functions (library) - HMODULE library; -{ - LOAD_IMGLIB_FN (library, XpmFreeAttributes); - LOAD_IMGLIB_FN (library, XpmCreateImageFromBuffer); - LOAD_IMGLIB_FN (library, XpmReadFileToImage); - LOAD_IMGLIB_FN (library, XImageFree); - - return 1; -} - -/* Value is non-zero if COLOR_SYMBOLS is a valid color symbols list - for XPM images. Such a list must consist of conses whose car and - cdr are strings. */ - -static int -xpm_valid_color_symbols_p (color_symbols) - Lisp_Object color_symbols; -{ - while (CONSP (color_symbols)) - { - Lisp_Object sym = XCAR (color_symbols); - if (!CONSP (sym) - || !STRINGP (XCAR (sym)) - || !STRINGP (XCDR (sym))) - break; - color_symbols = XCDR (color_symbols); - } - - return NILP (color_symbols); -} - - -/* Value is non-zero if OBJECT is a valid XPM image specification. */ - -static int -xpm_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[XPM_LAST]; - bcopy (xpm_format, fmt, sizeof fmt); - return (parse_image_spec (object, fmt, XPM_LAST, Qxpm) - /* Either `:file' or `:data' must be present. */ - && fmt[XPM_FILE].count + fmt[XPM_DATA].count == 1 - /* Either no `:color-symbols' or it's a list of conses - whose car and cdr are strings. */ - && (fmt[XPM_COLOR_SYMBOLS].count == 0 - || xpm_valid_color_symbols_p (fmt[XPM_COLOR_SYMBOLS].value))); -} - - -/* Load image IMG which will be displayed on frame F. Value is - non-zero if successful. */ - -static int -xpm_load (f, img) - struct frame *f; - struct image *img; -{ - HDC hdc; - int rc; - XpmAttributes attrs; - Lisp_Object specified_file, color_symbols; - xpm_XImage * xpm_image, * xpm_mask; - - /* Configure the XPM lib. Use the visual of frame F. Allocate - close colors. Return colors allocated. */ - bzero (&attrs, sizeof attrs); - xpm_image = xpm_mask = NULL; - -#if 0 - attrs.visual = FRAME_X_VISUAL (f); - attrs.colormap = FRAME_X_COLORMAP (f); - attrs.valuemask |= XpmVisual; - attrs.valuemask |= XpmColormap; -#endif - attrs.valuemask |= XpmReturnAllocPixels; -#ifdef XpmAllocCloseColors - attrs.alloc_close_colors = 1; - attrs.valuemask |= XpmAllocCloseColors; -#else - attrs.closeness = 600; - attrs.valuemask |= XpmCloseness; -#endif - - /* If image specification contains symbolic color definitions, add - these to `attrs'. */ - color_symbols = image_spec_value (img->spec, QCcolor_symbols, NULL); - if (CONSP (color_symbols)) - { - Lisp_Object tail; - XpmColorSymbol *xpm_syms; - int i, size; - - attrs.valuemask |= XpmColorSymbols; - - /* Count number of symbols. */ - attrs.numsymbols = 0; - for (tail = color_symbols; CONSP (tail); tail = XCDR (tail)) - ++attrs.numsymbols; - - /* Allocate an XpmColorSymbol array. */ - size = attrs.numsymbols * sizeof *xpm_syms; - xpm_syms = (XpmColorSymbol *) alloca (size); - bzero (xpm_syms, size); - attrs.colorsymbols = xpm_syms; - - /* Fill the color symbol array. */ - for (tail = color_symbols, i = 0; - CONSP (tail); - ++i, tail = XCDR (tail)) - { - Lisp_Object name = XCAR (XCAR (tail)); - Lisp_Object color = XCDR (XCAR (tail)); - xpm_syms[i].name = (char *) alloca (SCHARS (name) + 1); - strcpy (xpm_syms[i].name, SDATA (name)); - xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1); - strcpy (xpm_syms[i].value, SDATA (color)); - } - } - - /* Create a pixmap for the image, either from a file, or from a - string buffer containing data in the same format as an XPM file. */ - - specified_file = image_spec_value (img->spec, QCfile, NULL); - - { - HDC frame_dc = get_frame_dc (f); - hdc = CreateCompatibleDC (frame_dc); - release_frame_dc (f, frame_dc); - } - - if (STRINGP (specified_file)) - { - Lisp_Object file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - return 0; - } - - /* XpmReadFileToPixmap is not available in the Windows port of - libxpm. But XpmReadFileToImage almost does what we want. */ - rc = fn_XpmReadFileToImage (&hdc, SDATA (file), - &xpm_image, &xpm_mask, - &attrs); - } - else - { - Lisp_Object buffer = image_spec_value (img->spec, QCdata, NULL); - /* XpmCreatePixmapFromBuffer is not available in the Windows port - of libxpm. But XpmCreateImageFromBuffer almost does what we want. */ - rc = fn_XpmCreateImageFromBuffer (&hdc, SDATA (buffer), - &xpm_image, &xpm_mask, - &attrs); - } - - if (rc == XpmSuccess) - { - int i; - - /* W32 XPM uses XImage to wrap what W32 Emacs calls a Pixmap, - plus some duplicate attributes. */ - if (xpm_image && xpm_image->bitmap) - { - img->pixmap = xpm_image->bitmap; - /* XImageFree in libXpm frees XImage struct without destroying - the bitmap, which is what we want. */ - fn_XImageFree (xpm_image); - } - if (xpm_mask && xpm_mask->bitmap) - { - /* The mask appears to be inverted compared with what we expect. - TODO: invert our expectations. See other places where we - have to invert bits because our idea of masks is backwards. */ - HGDIOBJ old_obj; - old_obj = SelectObject (hdc, xpm_mask->bitmap); - - PatBlt (hdc, 0, 0, xpm_mask->width, xpm_mask->height, DSTINVERT); - SelectObject (hdc, old_obj); - - img->mask = xpm_mask->bitmap; - fn_XImageFree (xpm_mask); - DeleteDC (hdc); - } - - DeleteDC (hdc); - - /* Remember allocated colors. */ - img->ncolors = attrs.nalloc_pixels; - img->colors = (unsigned long *) xmalloc (img->ncolors - * sizeof *img->colors); - for (i = 0; i < attrs.nalloc_pixels; ++i) - img->colors[i] = attrs.alloc_pixels[i]; - - img->width = attrs.width; - img->height = attrs.height; - xassert (img->width > 0 && img->height > 0); - - /* The call to XpmFreeAttributes below frees attrs.alloc_pixels. */ - fn_XpmFreeAttributes (&attrs); - } - else - { - DeleteDC (hdc); - - switch (rc) - { - case XpmOpenFailed: - image_error ("Error opening XPM file (%s)", img->spec, Qnil); - break; - - case XpmFileInvalid: - image_error ("Invalid XPM file (%s)", img->spec, Qnil); - break; - - case XpmNoMemory: - image_error ("Out of memory (%s)", img->spec, Qnil); - break; - - case XpmColorFailed: - image_error ("Color allocation error (%s)", img->spec, Qnil); - break; - - default: - image_error ("Unknown error (%s)", img->spec, Qnil); - break; - } - } - - return rc == XpmSuccess; -} - -#endif /* HAVE_XPM != 0 */ - - -#if 0 /* TODO : Color tables on W32. */ -/*********************************************************************** - Color table - ***********************************************************************/ - -/* An entry in the color table mapping an RGB color to a pixel color. */ - -struct ct_color -{ - int r, g, b; - unsigned long pixel; - - /* Next in color table collision list. */ - struct ct_color *next; -}; - -/* The bucket vector size to use. Must be prime. */ - -#define CT_SIZE 101 - -/* Value is a hash of the RGB color given by R, G, and B. */ - -#define CT_HASH_RGB(R, G, B) (((R) << 16) ^ ((G) << 8) ^ (B)) - -/* The color hash table. */ - -struct ct_color **ct_table; - -/* Number of entries in the color table. */ - -int ct_colors_allocated; - -/* Function prototypes. */ - -static void init_color_table P_ ((void)); -static void free_color_table P_ ((void)); -static unsigned long *colors_in_color_table P_ ((int *n)); -static unsigned long lookup_rgb_color P_ ((struct frame *f, int r, int g, int b)); -static unsigned long lookup_pixel_color P_ ((struct frame *f, unsigned long p)); - - -/* Initialize the color table. */ - -static void -init_color_table () -{ - int size = CT_SIZE * sizeof (*ct_table); - ct_table = (struct ct_color **) xmalloc (size); - bzero (ct_table, size); - ct_colors_allocated = 0; -} - - -/* Free memory associated with the color table. */ - -static void -free_color_table () -{ - int i; - struct ct_color *p, *next; - - for (i = 0; i < CT_SIZE; ++i) - for (p = ct_table[i]; p; p = next) - { - next = p->next; - xfree (p); - } - - xfree (ct_table); - ct_table = NULL; -} - - -/* Value is a pixel color for RGB color R, G, B on frame F. If an - entry for that color already is in the color table, return the - pixel color of that entry. Otherwise, allocate a new color for R, - G, B, and make an entry in the color table. */ - -static unsigned long -lookup_rgb_color (f, r, g, b) - struct frame *f; - int r, g, b; -{ - unsigned hash = CT_HASH_RGB (r, g, b); - int i = hash % CT_SIZE; - struct ct_color *p; - - for (p = ct_table[i]; p; p = p->next) - if (p->r == r && p->g == g && p->b == b) - break; - - if (p == NULL) - { - COLORREF color; - Colormap cmap; - int rc; - - color = PALETTERGB (r, g, b); - - ++ct_colors_allocated; - - p = (struct ct_color *) xmalloc (sizeof *p); - p->r = r; - p->g = g; - p->b = b; - p->pixel = color; - p->next = ct_table[i]; - ct_table[i] = p; - } - - return p->pixel; -} - - -/* Look up pixel color PIXEL which is used on frame F in the color - table. If not already present, allocate it. Value is PIXEL. */ - -static unsigned long -lookup_pixel_color (f, pixel) - struct frame *f; - unsigned long pixel; -{ - int i = pixel % CT_SIZE; - struct ct_color *p; - - for (p = ct_table[i]; p; p = p->next) - if (p->pixel == pixel) - break; - - if (p == NULL) - { - XColor color; - Colormap cmap; - int rc; - - BLOCK_INPUT; - - cmap = DefaultColormapOfScreen (FRAME_X_SCREEN (f)); - color.pixel = pixel; - XQueryColor (NULL, cmap, &color); - rc = x_alloc_nearest_color (f, cmap, &color); - UNBLOCK_INPUT; - - if (rc) - { - ++ct_colors_allocated; - - p = (struct ct_color *) xmalloc (sizeof *p); - p->r = color.red; - p->g = color.green; - p->b = color.blue; - p->pixel = pixel; - p->next = ct_table[i]; - ct_table[i] = p; - } - else - return FRAME_FOREGROUND_PIXEL (f); - } - return p->pixel; -} - - -/* Value is a vector of all pixel colors contained in the color table, - allocated via xmalloc. Set *N to the number of colors. */ - -static unsigned long * -colors_in_color_table (n) - int *n; -{ - int i, j; - struct ct_color *p; - unsigned long *colors; - - if (ct_colors_allocated == 0) - { - *n = 0; - colors = NULL; - } - else - { - colors = (unsigned long *) xmalloc (ct_colors_allocated - * sizeof *colors); - *n = ct_colors_allocated; - - for (i = j = 0; i < CT_SIZE; ++i) - for (p = ct_table[i]; p; p = p->next) - colors[j++] = p->pixel; - } - - return colors; -} - -#endif /* TODO */ - - -/*********************************************************************** - Algorithms - ***********************************************************************/ -static XColor *x_to_xcolors P_ ((struct frame *, struct image *, int)); -static void x_from_xcolors P_ ((struct frame *, struct image *, XColor *)); -static void x_detect_edges P_ ((struct frame *, struct image *, int[9], int)); -static void XPutPixel (XImage *, int, int, COLORREF); - -/* Non-zero means draw a cross on images having `:conversion - disabled'. */ - -int cross_disabled_images; - -/* Edge detection matrices for different edge-detection - strategies. */ - -static int emboss_matrix[9] = { - /* x - 1 x x + 1 */ - 2, -1, 0, /* y - 1 */ - -1, 0, 1, /* y */ - 0, 1, -2 /* y + 1 */ -}; - -static int laplace_matrix[9] = { - /* x - 1 x x + 1 */ - 1, 0, 0, /* y - 1 */ - 0, 0, 0, /* y */ - 0, 0, -1 /* y + 1 */ -}; - -/* Value is the intensity of the color whose red/green/blue values - are R, G, and B. */ - -#define COLOR_INTENSITY(R, G, B) ((2 * (R) + 3 * (G) + (B)) / 6) - - -/* On frame F, return an array of XColor structures describing image - IMG->pixmap. Each XColor structure has its pixel color set. RGB_P - non-zero means also fill the red/green/blue members of the XColor - structures. Value is a pointer to the array of XColors structures, - allocated with xmalloc; it must be freed by the caller. */ - -static XColor * -x_to_xcolors (f, img, rgb_p) - struct frame *f; - struct image *img; - int rgb_p; -{ - int x, y; - XColor *colors, *p; - HDC hdc, bmpdc; - HGDIOBJ prev; - - colors = (XColor *) xmalloc (img->width * img->height * sizeof *colors); - - /* Load the image into a memory device context. */ - hdc = get_frame_dc (f); - bmpdc = CreateCompatibleDC (hdc); - release_frame_dc (f, hdc); - prev = SelectObject (bmpdc, img->pixmap); - - /* Fill the `pixel' members of the XColor array. I wished there - were an easy and portable way to circumvent XGetPixel. */ - p = colors; - for (y = 0; y < img->height; ++y) - { - XColor *row = p; - - for (x = 0; x < img->width; ++x, ++p) - { - /* TODO: palette support needed here? */ - p->pixel = GetPixel (bmpdc, x, y); - - if (rgb_p) - { - p->red = 256 * GetRValue (p->pixel); - p->green = 256 * GetGValue (p->pixel); - p->blue = 256 * GetBValue (p->pixel); - } - } - } - - SelectObject (bmpdc, prev); - DeleteDC (bmpdc); - - return colors; -} - -/* Put a pixel of COLOR at position X, Y in XIMG. XIMG must have been - created with CreateDIBSection, with the pointer to the bit values - stored in ximg->data. */ - -static void XPutPixel (ximg, x, y, color) - XImage * ximg; - int x, y; - COLORREF color; -{ - int width = ximg->info.bmiHeader.biWidth; - int height = ximg->info.bmiHeader.biHeight; - unsigned char * pixel; - - /* True color images. */ - if (ximg->info.bmiHeader.biBitCount == 24) - { - int rowbytes = width * 3; - /* Ensure scanlines are aligned on 4 byte boundaries. */ - if (rowbytes % 4) - rowbytes += 4 - (rowbytes % 4); - - pixel = ximg->data + y * rowbytes + x * 3; - /* Windows bitmaps are in BGR order. */ - *pixel = GetBValue (color); - *(pixel + 1) = GetGValue (color); - *(pixel + 2) = GetRValue (color); - } - /* Monochrome images. */ - else if (ximg->info.bmiHeader.biBitCount == 1) - { - int rowbytes = width / 8; - /* Ensure scanlines are aligned on 4 byte boundaries. */ - if (rowbytes % 4) - rowbytes += 4 - (rowbytes % 4); - pixel = ximg->data + y * rowbytes + x / 8; - /* Filter out palette info. */ - if (color & 0x00ffffff) - *pixel = *pixel | (1 << x % 8); - else - *pixel = *pixel & ~(1 << x % 8); - } - else - image_error ("XPutPixel: palette image not supported.", Qnil, Qnil); -} - -/* Create IMG->pixmap from an array COLORS of XColor structures, whose - RGB members are set. F is the frame on which this all happens. - COLORS will be freed; an existing IMG->pixmap will be freed, too. */ - -static void -x_from_xcolors (f, img, colors) - struct frame *f; - struct image *img; - XColor *colors; -{ - int x, y; - XImage *oimg; - Pixmap pixmap; - XColor *p; -#if 0 /* TODO: color tables. */ - init_color_table (); -#endif - x_create_x_image_and_pixmap (f, img->width, img->height, 0, - &oimg, &pixmap); - p = colors; - for (y = 0; y < img->height; ++y) - for (x = 0; x < img->width; ++x, ++p) - { - unsigned long pixel; -#if 0 /* TODO: color tables. */ - pixel = lookup_rgb_color (f, p->red, p->green, p->blue); -#else - pixel = PALETTERGB (p->red / 256, p->green / 256, p->blue / 256); -#endif - XPutPixel (oimg, x, y, pixel); - } - - xfree (colors); - x_clear_image_1 (f, img, 1, 0, 1); - - x_put_x_image (f, oimg, pixmap, img->width, img->height); - x_destroy_x_image (oimg); - img->pixmap = pixmap; -#if 0 /* TODO: color tables. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); -#endif -} - - -/* On frame F, perform edge-detection on image IMG. - - MATRIX is a nine-element array specifying the transformation - matrix. See emboss_matrix for an example. - - COLOR_ADJUST is a color adjustment added to each pixel of the - outgoing image. */ - -static void -x_detect_edges (f, img, matrix, color_adjust) - struct frame *f; - struct image *img; - int matrix[9], color_adjust; -{ - XColor *colors = x_to_xcolors (f, img, 1); - XColor *new, *p; - int x, y, i, sum; - - for (i = sum = 0; i < 9; ++i) - sum += abs (matrix[i]); - -#define COLOR(A, X, Y) ((A) + (Y) * img->width + (X)) - - new = (XColor *) xmalloc (img->width * img->height * sizeof *new); - - for (y = 0; y < img->height; ++y) - { - p = COLOR (new, 0, y); - p->red = p->green = p->blue = 0xffff/2; - p = COLOR (new, img->width - 1, y); - p->red = p->green = p->blue = 0xffff/2; - } - - for (x = 1; x < img->width - 1; ++x) - { - p = COLOR (new, x, 0); - p->red = p->green = p->blue = 0xffff/2; - p = COLOR (new, x, img->height - 1); - p->red = p->green = p->blue = 0xffff/2; - } - - for (y = 1; y < img->height - 1; ++y) - { - p = COLOR (new, 1, y); - - for (x = 1; x < img->width - 1; ++x, ++p) - { - int r, g, b, y1, x1; - - r = g = b = i = 0; - for (y1 = y - 1; y1 < y + 2; ++y1) - for (x1 = x - 1; x1 < x + 2; ++x1, ++i) - if (matrix[i]) - { - XColor *t = COLOR (colors, x1, y1); - r += matrix[i] * t->red; - g += matrix[i] * t->green; - b += matrix[i] * t->blue; - } - - r = (r / sum + color_adjust) & 0xffff; - g = (g / sum + color_adjust) & 0xffff; - b = (b / sum + color_adjust) & 0xffff; - p->red = p->green = p->blue = COLOR_INTENSITY (r, g, b); - } - } - - xfree (colors); - x_from_xcolors (f, img, new); - -#undef COLOR -} - - -/* Perform the pre-defined `emboss' edge-detection on image IMG - on frame F. */ - -static void -x_emboss (f, img) - struct frame *f; - struct image *img; -{ - x_detect_edges (f, img, emboss_matrix, 0xffff / 2); -} - - -/* Transform image IMG which is used on frame F with a Laplace - edge-detection algorithm. The result is an image that can be used - to draw disabled buttons, for example. */ - -static void -x_laplace (f, img) - struct frame *f; - struct image *img; -{ - x_detect_edges (f, img, laplace_matrix, 45000); -} - - -/* Perform edge-detection on image IMG on frame F, with specified - transformation matrix MATRIX and color-adjustment COLOR_ADJUST. - - MATRIX must be either - - - a list of at least 9 numbers in row-major form - - a vector of at least 9 numbers - - COLOR_ADJUST nil means use a default; otherwise it must be a - number. */ - -static void -x_edge_detection (f, img, matrix, color_adjust) - struct frame *f; - struct image *img; - Lisp_Object matrix, color_adjust; -{ - int i = 0; - int trans[9]; - - if (CONSP (matrix)) - { - for (i = 0; - i < 9 && CONSP (matrix) && NUMBERP (XCAR (matrix)); - ++i, matrix = XCDR (matrix)) - trans[i] = XFLOATINT (XCAR (matrix)); - } - else if (VECTORP (matrix) && ASIZE (matrix) >= 9) - { - for (i = 0; i < 9 && NUMBERP (AREF (matrix, i)); ++i) - trans[i] = XFLOATINT (AREF (matrix, i)); - } - - if (NILP (color_adjust)) - color_adjust = make_number (0xffff / 2); - - if (i == 9 && NUMBERP (color_adjust)) - x_detect_edges (f, img, trans, (int) XFLOATINT (color_adjust)); -} - - -/* Transform image IMG on frame F so that it looks disabled. */ - -static void -x_disable_image (f, img) - struct frame *f; - struct image *img; -{ - struct w32_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); - - if (dpyinfo->n_planes * dpyinfo->n_cbits >= 2) - { - /* Color (or grayscale). Convert to gray, and equalize. Just - drawing such images with a stipple can look very odd, so - we're using this method instead. */ - XColor *colors = x_to_xcolors (f, img, 1); - XColor *p, *end; - const int h = 15000; - const int l = 30000; - - for (p = colors, end = colors + img->width * img->height; - p < end; - ++p) - { - int i = COLOR_INTENSITY (p->red, p->green, p->blue); - int i2 = (0xffff - h - l) * i / 0xffff + l; - p->red = p->green = p->blue = i2; - } - - x_from_xcolors (f, img, colors); - } - - /* Draw a cross over the disabled image, if we must or if we - should. */ - if (dpyinfo->n_planes * dpyinfo->n_cbits < 2 || cross_disabled_images) - { - HDC hdc, bmpdc; - HGDIOBJ prev; - - hdc = get_frame_dc (f); - bmpdc = CreateCompatibleDC (hdc); - release_frame_dc (f, hdc); - - prev = SelectObject (bmpdc, img->pixmap); - - SetTextColor (bmpdc, BLACK_PIX_DEFAULT (f)); - MoveToEx (bmpdc, 0, 0, NULL); - LineTo (bmpdc, img->width - 1, img->height - 1); - MoveToEx (bmpdc, 0, img->height - 1, NULL); - LineTo (bmpdc, img->width - 1, 0); - - if (img->mask) - { - SelectObject (bmpdc, img->mask); - SetTextColor (bmpdc, WHITE_PIX_DEFAULT (f)); - MoveToEx (bmpdc, 0, 0, NULL); - LineTo (bmpdc, img->width - 1, img->height - 1); - MoveToEx (bmpdc, 0, img->height - 1, NULL); - LineTo (bmpdc, img->width - 1, 0); - } - SelectObject (bmpdc, prev); - DeleteDC (bmpdc); - } -} - - -/* Build a mask for image IMG which is used on frame F. FILE is the - name of an image file, for error messages. HOW determines how to - determine the background color of IMG. If it is a list '(R G B)', - with R, G, and B being integers >= 0, take that as the color of the - background. Otherwise, determine the background color of IMG - heuristically. Value is non-zero if successful. */ - -static int -x_build_heuristic_mask (f, img, how) - struct frame *f; - struct image *img; - Lisp_Object how; -{ - HDC img_dc, frame_dc; - HGDIOBJ prev; - char *mask_img; - int x, y, rc, use_img_background; - unsigned long bg = 0; - int row_width; - - if (img->mask) - { - DeleteObject (img->mask); - img->mask = NULL; - img->background_transparent_valid = 0; - } - - /* Create the bit array serving as mask. */ - row_width = (img->width + 7) / 8; - mask_img = xmalloc (row_width * img->height); - bzero (mask_img, row_width * img->height); - - /* Create a memory device context for IMG->pixmap. */ - frame_dc = get_frame_dc (f); - img_dc = CreateCompatibleDC (frame_dc); - release_frame_dc (f, frame_dc); - prev = SelectObject (img_dc, img->pixmap); - - /* Determine the background color of img_dc. If HOW is `(R G B)' - take that as color. Otherwise, use the image's background color. */ - use_img_background = 1; - - if (CONSP (how)) - { - int rgb[3], i; - - for (i = 0; i < 3 && CONSP (how) && NATNUMP (XCAR (how)); ++i) - { - rgb[i] = XFASTINT (XCAR (how)) & 0xffff; - how = XCDR (how); - } - - if (i == 3 && NILP (how)) - { - char color_name[30]; - sprintf (color_name, "#%04x%04x%04x", rgb[0], rgb[1], rgb[2]); - bg = x_alloc_image_color (f, img, build_string (color_name), 0) - & 0x00ffffff; /* Filter out palette info. */ - use_img_background = 0; - } - } - - if (use_img_background) - bg = four_corners_best (img_dc, img->width, img->height); - - /* Set all bits in mask_img to 1 whose color in ximg is different - from the background color bg. */ - for (y = 0; y < img->height; ++y) - for (x = 0; x < img->width; ++x) - { - COLORREF p = GetPixel (img_dc, x, y); - if (p != bg) - mask_img[y * row_width + x / 8] |= 1 << (x % 8); - } - - /* Create the mask image. */ - img->mask = w32_create_pixmap_from_bitmap_data (img->width, img->height, - mask_img); - - /* Fill in the background_transparent field while we have the mask handy. */ - SelectObject (img_dc, img->mask); - - image_background_transparent (img, f, img_dc); - - /* Put mask_img into img->mask. */ - x_destroy_x_image ((XImage *)mask_img); - SelectObject (img_dc, prev); - DeleteDC (img_dc); - - return 1; -} - - -/*********************************************************************** - PBM (mono, gray, color) - ***********************************************************************/ - -static int pbm_image_p P_ ((Lisp_Object object)); -static int pbm_load P_ ((struct frame *f, struct image *img)); -static int pbm_scan_number P_ ((unsigned char **, unsigned char *)); - -/* The symbol `pbm' identifying images of this type. */ - -Lisp_Object Qpbm; - -/* Indices of image specification fields in gs_format, below. */ - -enum pbm_keyword_index -{ - PBM_TYPE, - PBM_FILE, - PBM_DATA, - PBM_ASCENT, - PBM_MARGIN, - PBM_RELIEF, - PBM_ALGORITHM, - PBM_HEURISTIC_MASK, - PBM_MASK, - PBM_FOREGROUND, - PBM_BACKGROUND, - PBM_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword pbm_format[PBM_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":file", IMAGE_STRING_VALUE, 0}, - {":data", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":foreground", IMAGE_STRING_OR_NIL_VALUE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type `pbm'. */ - -static struct image_type pbm_type = -{ - &Qpbm, - pbm_image_p, - pbm_load, - x_clear_image, - NULL -}; - - -/* Return non-zero if OBJECT is a valid PBM image specification. */ - -static int -pbm_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[PBM_LAST]; - - bcopy (pbm_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, PBM_LAST, Qpbm)) - return 0; - - /* Must specify either :data or :file. */ - return fmt[PBM_DATA].count + fmt[PBM_FILE].count == 1; -} - - -/* Scan a decimal number from *S and return it. Advance *S while - reading the number. END is the end of the string. Value is -1 at - end of input. */ - -static int -pbm_scan_number (s, end) - unsigned char **s, *end; -{ - int c, val = -1; - - while (*s < end) - { - /* Skip white-space. */ - while (*s < end && (c = *(*s)++, isspace (c))) - ; - - if (c == '#') - { - /* Skip comment to end of line. */ - while (*s < end && (c = *(*s)++, c != '\n')) - ; - } - else if (isdigit (c)) - { - /* Read decimal number. */ - val = c - '0'; - while (*s < end && (c = *(*s)++, isdigit (c))) - val = 10 * val + c - '0'; - break; - } - else - break; - } - - return val; -} - - -/* Read FILE into memory. Value is a pointer to a buffer allocated - with xmalloc holding FILE's contents. Value is null if an error - occurred. *SIZE is set to the size of the file. */ - -static char * -pbm_read_file (file, size) - Lisp_Object file; - int *size; -{ - FILE *fp = NULL; - char *buf = NULL; - struct stat st; - - if (stat (SDATA (file), &st) == 0 - && (fp = fopen (SDATA (file), "rb")) != NULL - && (buf = (char *) xmalloc (st.st_size), - fread (buf, 1, st.st_size, fp) == st.st_size)) - { - *size = st.st_size; - fclose (fp); - } - else - { - if (fp) - fclose (fp); - if (buf) - { - xfree (buf); - buf = NULL; - } - } - - return buf; -} - - -/* Load PBM image IMG for use on frame F. */ - -static int -pbm_load (f, img) - struct frame *f; - struct image *img; -{ - int raw_p, x, y; - int width, height, max_color_idx = 0; - XImage *ximg; - Lisp_Object file, specified_file; - enum {PBM_MONO, PBM_GRAY, PBM_COLOR} type; - struct gcpro gcpro1; - unsigned char *contents = NULL; - unsigned char *end, *p; - int size; - - specified_file = image_spec_value (img->spec, QCfile, NULL); - file = Qnil; - GCPRO1 (file); - - if (STRINGP (specified_file)) - { - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - contents = slurp_file (SDATA (file), &size); - if (contents == NULL) - { - image_error ("Error reading `%s'", file, Qnil); - UNGCPRO; - return 0; - } - - p = contents; - end = contents + size; - } - else - { - Lisp_Object data; - data = image_spec_value (img->spec, QCdata, NULL); - p = SDATA (data); - end = p + SBYTES (data); - } - - /* Check magic number. */ - if (end - p < 2 || *p++ != 'P') - { - image_error ("Not a PBM image: `%s'", img->spec, Qnil); - error: - xfree (contents); - UNGCPRO; - return 0; - } - - switch (*p++) - { - case '1': - raw_p = 0, type = PBM_MONO; - break; - - case '2': - raw_p = 0, type = PBM_GRAY; - break; - - case '3': - raw_p = 0, type = PBM_COLOR; - break; - - case '4': - raw_p = 1, type = PBM_MONO; - break; - - case '5': - raw_p = 1, type = PBM_GRAY; - break; - - case '6': - raw_p = 1, type = PBM_COLOR; - break; - - default: - image_error ("Not a PBM image: `%s'", img->spec, Qnil); - goto error; - } - - /* Read width, height, maximum color-component. Characters - starting with `#' up to the end of a line are ignored. */ - width = pbm_scan_number (&p, end); - height = pbm_scan_number (&p, end); - - if (type != PBM_MONO) - { - max_color_idx = pbm_scan_number (&p, end); - if (raw_p && max_color_idx > 255) - max_color_idx = 255; - } - - if (width < 0 - || height < 0 - || (type != PBM_MONO && max_color_idx < 0)) - goto error; - - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) - goto error; - -#if 0 /* TODO: color tables. */ - /* Initialize the color hash table. */ - init_color_table (); -#endif - - if (type == PBM_MONO) - { - int c = 0, g; - struct image_keyword fmt[PBM_LAST]; - unsigned long fg = FRAME_FOREGROUND_PIXEL (f); - unsigned long bg = FRAME_BACKGROUND_PIXEL (f); - - /* Parse the image specification. */ - bcopy (pbm_format, fmt, sizeof fmt); - parse_image_spec (img->spec, fmt, PBM_LAST, Qpbm); - - /* Get foreground and background colors, maybe allocate colors. */ - if (fmt[PBM_FOREGROUND].count - && STRINGP (fmt[PBM_FOREGROUND].value)) - fg = x_alloc_image_color (f, img, fmt[PBM_FOREGROUND].value, fg); - if (fmt[PBM_BACKGROUND].count - && STRINGP (fmt[PBM_BACKGROUND].value)) - { - bg = x_alloc_image_color (f, img, fmt[PBM_BACKGROUND].value, bg); - img->background = bg; - img->background_valid = 1; - } - - for (y = 0; y < height; ++y) - for (x = 0; x < width; ++x) - { - if (raw_p) - { - if ((x & 7) == 0) - c = *p++; - g = c & 0x80; - c <<= 1; - } - else - g = pbm_scan_number (&p, end); - - XPutPixel (ximg, x, y, g ? fg : bg); - } - } - else - { - for (y = 0; y < height; ++y) - for (x = 0; x < width; ++x) - { - int r, g, b; - - if (type == PBM_GRAY) - r = g = b = raw_p ? *p++ : pbm_scan_number (&p, end); - else if (raw_p) - { - r = *p++; - g = *p++; - b = *p++; - } - else - { - r = pbm_scan_number (&p, end); - g = pbm_scan_number (&p, end); - b = pbm_scan_number (&p, end); - } - - if (r < 0 || g < 0 || b < 0) - { - x_destroy_x_image (ximg); - image_error ("Invalid pixel value in image `%s'", - img->spec, Qnil); - goto error; - } - - /* RGB values are now in the range 0..max_color_idx. - Scale this to the range 0..0xff supported by W32. */ - r = (int) ((double) r * 255 / max_color_idx); - g = (int) ((double) g * 255 / max_color_idx); - b = (int) ((double) b * 255 / max_color_idx); - XPutPixel (ximg, x, y, -#if 0 /* TODO: color tables. */ - lookup_rgb_color (f, r, g, b)); -#else - PALETTERGB (r, g, b)); -#endif - } - } - -#if 0 /* TODO: color tables. */ - /* Store in IMG->colors the colors allocated for the image, and - free the color table. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); -#endif - /* Maybe fill in the background field while we have ximg handy. */ - if (NILP (image_spec_value (img->spec, QCbackground, NULL))) - IMAGE_BACKGROUND (img, f, ximg); - - /* Put the image into a pixmap. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - - img->width = width; - img->height = height; - - UNGCPRO; - xfree (contents); - return 1; -} - - -/*********************************************************************** - PNG - ***********************************************************************/ - -#if HAVE_PNG - -#include - -/* Function prototypes. */ - -static int png_image_p P_ ((Lisp_Object object)); -static int png_load P_ ((struct frame *f, struct image *img)); - -/* The symbol `png' identifying images of this type. */ - -Lisp_Object Qpng; - -/* Indices of image specification fields in png_format, below. */ - -enum png_keyword_index -{ - PNG_TYPE, - PNG_DATA, - PNG_FILE, - PNG_ASCENT, - PNG_MARGIN, - PNG_RELIEF, - PNG_ALGORITHM, - PNG_HEURISTIC_MASK, - PNG_MASK, - PNG_BACKGROUND, - PNG_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword png_format[PNG_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":data", IMAGE_STRING_VALUE, 0}, - {":file", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type `png'. */ - -static struct image_type png_type = -{ - &Qpng, - png_image_p, - png_load, - x_clear_image, - NULL -}; - -/* PNG library details. */ - -DEF_IMGLIB_FN (png_get_io_ptr); -DEF_IMGLIB_FN (png_check_sig); -DEF_IMGLIB_FN (png_create_read_struct); -DEF_IMGLIB_FN (png_create_info_struct); -DEF_IMGLIB_FN (png_destroy_read_struct); -DEF_IMGLIB_FN (png_set_read_fn); -DEF_IMGLIB_FN (png_init_io); -DEF_IMGLIB_FN (png_set_sig_bytes); -DEF_IMGLIB_FN (png_read_info); -DEF_IMGLIB_FN (png_get_IHDR); -DEF_IMGLIB_FN (png_get_valid); -DEF_IMGLIB_FN (png_set_strip_16); -DEF_IMGLIB_FN (png_set_expand); -DEF_IMGLIB_FN (png_set_gray_to_rgb); -DEF_IMGLIB_FN (png_set_background); -DEF_IMGLIB_FN (png_get_bKGD); -DEF_IMGLIB_FN (png_read_update_info); -DEF_IMGLIB_FN (png_get_channels); -DEF_IMGLIB_FN (png_get_rowbytes); -DEF_IMGLIB_FN (png_read_image); -DEF_IMGLIB_FN (png_read_end); -DEF_IMGLIB_FN (png_error); - -static int -init_png_functions (library) - HMODULE library; -{ - LOAD_IMGLIB_FN (library, png_get_io_ptr); - LOAD_IMGLIB_FN (library, png_check_sig); - LOAD_IMGLIB_FN (library, png_create_read_struct); - LOAD_IMGLIB_FN (library, png_create_info_struct); - LOAD_IMGLIB_FN (library, png_destroy_read_struct); - LOAD_IMGLIB_FN (library, png_set_read_fn); - LOAD_IMGLIB_FN (library, png_init_io); - LOAD_IMGLIB_FN (library, png_set_sig_bytes); - LOAD_IMGLIB_FN (library, png_read_info); - LOAD_IMGLIB_FN (library, png_get_IHDR); - LOAD_IMGLIB_FN (library, png_get_valid); - LOAD_IMGLIB_FN (library, png_set_strip_16); - LOAD_IMGLIB_FN (library, png_set_expand); - LOAD_IMGLIB_FN (library, png_set_gray_to_rgb); - LOAD_IMGLIB_FN (library, png_set_background); - LOAD_IMGLIB_FN (library, png_get_bKGD); - LOAD_IMGLIB_FN (library, png_read_update_info); - LOAD_IMGLIB_FN (library, png_get_channels); - LOAD_IMGLIB_FN (library, png_get_rowbytes); - LOAD_IMGLIB_FN (library, png_read_image); - LOAD_IMGLIB_FN (library, png_read_end); - LOAD_IMGLIB_FN (library, png_error); - return 1; -} - -/* Return non-zero if OBJECT is a valid PNG image specification. */ - -static int -png_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[PNG_LAST]; - bcopy (png_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, PNG_LAST, Qpng)) - return 0; - - /* Must specify either the :data or :file keyword. */ - return fmt[PNG_FILE].count + fmt[PNG_DATA].count == 1; -} - - -/* Error and warning handlers installed when the PNG library - is initialized. */ - -static void -my_png_error (png_ptr, msg) - png_struct *png_ptr; - char *msg; -{ - xassert (png_ptr != NULL); - image_error ("PNG error: %s", build_string (msg), Qnil); - longjmp (png_ptr->jmpbuf, 1); -} - - -static void -my_png_warning (png_ptr, msg) - png_struct *png_ptr; - char *msg; -{ - xassert (png_ptr != NULL); - image_error ("PNG warning: %s", build_string (msg), Qnil); -} - -/* Memory source for PNG decoding. */ - -struct png_memory_storage -{ - unsigned char *bytes; /* The data */ - size_t len; /* How big is it? */ - int index; /* Where are we? */ -}; - - -/* Function set as reader function when reading PNG image from memory. - PNG_PTR is a pointer to the PNG control structure. Copy LENGTH - bytes from the input to DATA. */ - -static void -png_read_from_memory (png_ptr, data, length) - png_structp png_ptr; - png_bytep data; - png_size_t length; -{ - struct png_memory_storage *tbr - = (struct png_memory_storage *) fn_png_get_io_ptr (png_ptr); - - if (length > tbr->len - tbr->index) - fn_png_error (png_ptr, "Read error"); - - bcopy (tbr->bytes + tbr->index, data, length); - tbr->index = tbr->index + length; -} - -/* Load PNG image IMG for use on frame F. Value is non-zero if - successful. */ - -static int -png_load (f, img) - struct frame *f; - struct image *img; -{ - Lisp_Object file, specified_file; - Lisp_Object specified_data; - int x, y, i; - XImage *ximg, *mask_img = NULL; - struct gcpro gcpro1; - png_struct *png_ptr = NULL; - png_info *info_ptr = NULL, *end_info = NULL; - FILE *volatile fp = NULL; - png_byte sig[8]; - png_byte * volatile pixels = NULL; - png_byte ** volatile rows = NULL; - png_uint_32 width, height; - int bit_depth, color_type, interlace_type; - png_byte channels; - png_uint_32 row_bytes; - int transparent_p; - double screen_gamma, image_gamma; - int intent; - struct png_memory_storage tbr; /* Data to be read */ - - /* Find out what file to load. */ - specified_file = image_spec_value (img->spec, QCfile, NULL); - specified_data = image_spec_value (img->spec, QCdata, NULL); - file = Qnil; - GCPRO1 (file); - - if (NILP (specified_data)) - { - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - /* Open the image file. */ - fp = fopen (SDATA (file), "rb"); - if (!fp) - { - image_error ("Cannot open image file `%s'", file, Qnil); - UNGCPRO; - fclose (fp); - return 0; - } - - /* Check PNG signature. */ - if (fread (sig, 1, sizeof sig, fp) != sizeof sig - || !fn_png_check_sig (sig, sizeof sig)) - { - image_error ("Not a PNG file: `%s'", file, Qnil); - UNGCPRO; - fclose (fp); - return 0; - } - } - else - { - /* Read from memory. */ - tbr.bytes = SDATA (specified_data); - tbr.len = SBYTES (specified_data); - tbr.index = 0; - - /* Check PNG signature. */ - if (tbr.len < sizeof sig - || !fn_png_check_sig (tbr.bytes, sizeof sig)) - { - image_error ("Not a PNG image: `%s'", img->spec, Qnil); - UNGCPRO; - return 0; - } - - /* Need to skip past the signature. */ - tbr.bytes += sizeof (sig); - } - - /* Initialize read and info structs for PNG lib. */ - png_ptr = fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, - my_png_error, my_png_warning); - if (!png_ptr) - { - if (fp) fclose (fp); - UNGCPRO; - return 0; - } - - info_ptr = fn_png_create_info_struct (png_ptr); - if (!info_ptr) - { - fn_png_destroy_read_struct (&png_ptr, NULL, NULL); - if (fp) fclose (fp); - UNGCPRO; - return 0; - } - - end_info = fn_png_create_info_struct (png_ptr); - if (!end_info) - { - fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL); - if (fp) fclose (fp); - UNGCPRO; - return 0; - } - - /* Set error jump-back. We come back here when the PNG library - detects an error. */ - if (setjmp (png_ptr->jmpbuf)) - { - error: - if (png_ptr) - fn_png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); - xfree (pixels); - xfree (rows); - if (fp) fclose (fp); - UNGCPRO; - return 0; - } - - /* Read image info. */ - if (!NILP (specified_data)) - fn_png_set_read_fn (png_ptr, (void *) &tbr, png_read_from_memory); - else - fn_png_init_io (png_ptr, fp); - - fn_png_set_sig_bytes (png_ptr, sizeof sig); - fn_png_read_info (png_ptr, info_ptr); - fn_png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); - - /* If image contains simply transparency data, we prefer to - construct a clipping mask. */ - if (fn_png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) - transparent_p = 1; - else - transparent_p = 0; - - /* This function is easier to write if we only have to handle - one data format: RGB or RGBA with 8 bits per channel. Let's - transform other formats into that format. */ - - /* Strip more than 8 bits per channel. */ - if (bit_depth == 16) - fn_png_set_strip_16 (png_ptr); - - /* Expand data to 24 bit RGB, or 8 bit grayscale, with alpha channel - if available. */ - fn_png_set_expand (png_ptr); - - /* Convert grayscale images to RGB. */ - if (color_type == PNG_COLOR_TYPE_GRAY - || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - fn_png_set_gray_to_rgb (png_ptr); - - screen_gamma = (f->gamma ? 1 / f->gamma / 0.45455 : 2.2); - -#if 0 /* Avoid double gamma correction for PNG images. */ - /* Tell the PNG lib to handle gamma correction for us. */ -#if defined(PNG_READ_sRGB_SUPPORTED) || defined(PNG_WRITE_sRGB_SUPPORTED) - if (png_get_sRGB (png_ptr, info_ptr, &intent)) - /* The libpng documentation says this is right in this case. */ - png_set_gamma (png_ptr, screen_gamma, 0.45455); - else -#endif - if (png_get_gAMA (png_ptr, info_ptr, &image_gamma)) - /* Image contains gamma information. */ - png_set_gamma (png_ptr, screen_gamma, image_gamma); - else - /* Use the standard default for the image gamma. */ - png_set_gamma (png_ptr, screen_gamma, 0.45455); -#endif /* if 0 */ - - /* Handle alpha channel by combining the image with a background - color. Do this only if a real alpha channel is supplied. For - simple transparency, we prefer a clipping mask. */ - if (!transparent_p) - { - png_color_16 *image_bg; - Lisp_Object specified_bg - = image_spec_value (img->spec, QCbackground, NULL); - - if (STRINGP (specified_bg)) - /* The user specified `:background', use that. */ - { - COLORREF color; - if (w32_defined_color (f, SDATA (specified_bg), &color, 0)) - { - png_color_16 user_bg; - - bzero (&user_bg, sizeof user_bg); - user_bg.red = 256 * GetRValue (color); - user_bg.green = 256 * GetGValue (color); - user_bg.blue = 256 * GetBValue (color); - - fn_png_set_background (png_ptr, &user_bg, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - } - } - else if (fn_png_get_bKGD (png_ptr, info_ptr, &image_bg)) - /* Image contains a background color with which to - combine the image. */ - fn_png_set_background (png_ptr, image_bg, - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - else - { - /* Image does not contain a background color with which - to combine the image data via an alpha channel. Use - the frame's background instead. */ - COLORREF color; - png_color_16 frame_background; - color = FRAME_BACKGROUND_PIXEL (f); -#if 0 /* TODO : Colormap support. */ - Colormap cmap; - - cmap = FRAME_X_COLORMAP (f); - x_query_color (f, &color); -#endif - - bzero (&frame_background, sizeof frame_background); - frame_background.red = 256 * GetRValue (color); - frame_background.green = 256 * GetGValue (color); - frame_background.blue = 256 * GetBValue (color); - - fn_png_set_background (png_ptr, &frame_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - } - } - - /* Update info structure. */ - fn_png_read_update_info (png_ptr, info_ptr); - - /* Get number of channels. Valid values are 1 for grayscale images - and images with a palette, 2 for grayscale images with transparency - information (alpha channel), 3 for RGB images, and 4 for RGB - images with alpha channel, i.e. RGBA. If conversions above were - sufficient we should only have 3 or 4 channels here. */ - channels = fn_png_get_channels (png_ptr, info_ptr); - xassert (channels == 3 || channels == 4); - - /* Number of bytes needed for one row of the image. */ - row_bytes = fn_png_get_rowbytes (png_ptr, info_ptr); - - /* Allocate memory for the image. */ - pixels = (png_byte *) xmalloc (row_bytes * height * sizeof *pixels); - rows = (png_byte **) xmalloc (height * sizeof *rows); - for (i = 0; i < height; ++i) - rows[i] = pixels + i * row_bytes; - - /* Read the entire image. */ - fn_png_read_image (png_ptr, rows); - fn_png_read_end (png_ptr, info_ptr); - if (fp) - { - fclose (fp); - fp = NULL; - } - - /* Create the X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, - &img->pixmap)) - goto error; - - /* Create an image and pixmap serving as mask if the PNG image - contains an alpha channel. */ - if (channels == 4 - && !transparent_p - && !x_create_x_image_and_pixmap (f, width, height, 1, - &mask_img, &img->mask)) - { - x_destroy_x_image (ximg); - DeleteObject (img->pixmap); - img->pixmap = 0; - goto error; - } - /* Fill the X image and mask from PNG data. */ -#if 0 /* TODO: Color tables. */ - init_color_table (); -#endif - - for (y = 0; y < height; ++y) - { - png_byte *p = rows[y]; - - for (x = 0; x < width; ++x) - { - unsigned r, g, b; - - r = *p++; - g = *p++; - b = *p++; -#if 0 /* TODO: Color tables. */ - XPutPixel (ximg, x, y, lookup_rgb_color (f, r, g, b)); -#else - XPutPixel (ximg, x, y, PALETTERGB (r, g, b)); -#endif - /* An alpha channel, aka mask channel, associates variable - transparency with an image. Where other image formats - support binary transparency---fully transparent or fully - opaque---PNG allows up to 254 levels of partial transparency. - The PNG library implements partial transparency by combining - the image with a specified background color. - - I'm not sure how to handle this here nicely: because the - background on which the image is displayed may change, for - real alpha channel support, it would be necessary to create - a new image for each possible background. - - What I'm doing now is that a mask is created if we have - boolean transparency information. Otherwise I'm using - the frame's background color to combine the image with. */ - - if (channels == 4) - { - if (mask_img) - XPutPixel (mask_img, x, y, *p > 0); - ++p; - } - } - } - - if (NILP (image_spec_value (img->spec, QCbackground, NULL))) - /* Set IMG's background color from the PNG image, unless the user - overrode it. */ - { - png_color_16 *bg; - if (fn_png_get_bKGD (png_ptr, info_ptr, &bg)) - { -#if 0 /* TODO: Color tables. */ - img->background = lookup_rgb_color (f, bg->red, bg->green, bg->blue); -#else - img->background = PALETTERGB (bg->red / 256, bg->green / 256, - bg->blue / 256); -#endif - img->background_valid = 1; - } - } - -#if 0 /* TODO: Color tables. */ - /* Remember colors allocated for this image. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); -#endif - - /* Clean up. */ - fn_png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); - xfree (rows); - xfree (pixels); - - img->width = width; - img->height = height; - - /* Maybe fill in the background field while we have ximg handy. */ - IMAGE_BACKGROUND (img, f, ximg); - - /* Put the image into the pixmap, then free the X image and its buffer. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - - /* Same for the mask. */ - if (mask_img) - { - /* Fill in the background_transparent field while we have the mask - handy. */ - image_background_transparent (img, f, mask_img); - - x_put_x_image (f, mask_img, img->mask, img->width, img->height); - x_destroy_x_image (mask_img); - } - - UNGCPRO; - return 1; -} - -#endif /* HAVE_PNG != 0 */ - - - -/*********************************************************************** - JPEG - ***********************************************************************/ - -#if HAVE_JPEG - -/* Work around a warning about HAVE_STDLIB_H being redefined in - jconfig.h. */ -#ifdef HAVE_STDLIB_H -#define HAVE_STDLIB_H_1 -#undef HAVE_STDLIB_H -#endif /* HAVE_STLIB_H */ - -#include -#include -#include - -#ifdef HAVE_STLIB_H_1 -#define HAVE_STDLIB_H 1 -#endif - -static int jpeg_image_p P_ ((Lisp_Object object)); -static int jpeg_load P_ ((struct frame *f, struct image *img)); - -/* The symbol `jpeg' identifying images of this type. */ - -Lisp_Object Qjpeg; - -/* Indices of image specification fields in gs_format, below. */ - -enum jpeg_keyword_index -{ - JPEG_TYPE, - JPEG_DATA, - JPEG_FILE, - JPEG_ASCENT, - JPEG_MARGIN, - JPEG_RELIEF, - JPEG_ALGORITHM, - JPEG_HEURISTIC_MASK, - JPEG_MASK, - JPEG_BACKGROUND, - JPEG_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword jpeg_format[JPEG_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":data", IMAGE_STRING_VALUE, 0}, - {":file", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type `jpeg'. */ - -static struct image_type jpeg_type = -{ - &Qjpeg, - jpeg_image_p, - jpeg_load, - x_clear_image, - NULL -}; - - -/* JPEG library details. */ -DEF_IMGLIB_FN (jpeg_CreateDecompress); -DEF_IMGLIB_FN (jpeg_start_decompress); -DEF_IMGLIB_FN (jpeg_finish_decompress); -DEF_IMGLIB_FN (jpeg_destroy_decompress); -DEF_IMGLIB_FN (jpeg_read_header); -DEF_IMGLIB_FN (jpeg_read_scanlines); -DEF_IMGLIB_FN (jpeg_stdio_src); -DEF_IMGLIB_FN (jpeg_std_error); -DEF_IMGLIB_FN (jpeg_resync_to_restart); - -static int -init_jpeg_functions (library) - HMODULE library; -{ - LOAD_IMGLIB_FN (library, jpeg_finish_decompress); - LOAD_IMGLIB_FN (library, jpeg_read_scanlines); - LOAD_IMGLIB_FN (library, jpeg_start_decompress); - LOAD_IMGLIB_FN (library, jpeg_read_header); - LOAD_IMGLIB_FN (library, jpeg_stdio_src); - LOAD_IMGLIB_FN (library, jpeg_CreateDecompress); - LOAD_IMGLIB_FN (library, jpeg_destroy_decompress); - LOAD_IMGLIB_FN (library, jpeg_std_error); - LOAD_IMGLIB_FN (library, jpeg_resync_to_restart); - return 1; -} - -/* Wrapper since we can't directly assign the function pointer - to another function pointer that was declared more completely easily. */ -static boolean -jpeg_resync_to_restart_wrapper(cinfo, desired) - j_decompress_ptr cinfo; - int desired; -{ - return fn_jpeg_resync_to_restart (cinfo, desired); -} - - -/* Return non-zero if OBJECT is a valid JPEG image specification. */ - -static int -jpeg_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[JPEG_LAST]; - - bcopy (jpeg_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, JPEG_LAST, Qjpeg)) - return 0; - - /* Must specify either the :data or :file keyword. */ - return fmt[JPEG_FILE].count + fmt[JPEG_DATA].count == 1; -} - - -struct my_jpeg_error_mgr -{ - struct jpeg_error_mgr pub; - jmp_buf setjmp_buffer; -}; - - -static void -my_error_exit (cinfo) - j_common_ptr cinfo; -{ - struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; - longjmp (mgr->setjmp_buffer, 1); -} - - -/* Init source method for JPEG data source manager. Called by - jpeg_read_header() before any data is actually read. See - libjpeg.doc from the JPEG lib distribution. */ - -static void -our_init_source (cinfo) - j_decompress_ptr cinfo; -{ -} - - -/* Fill input buffer method for JPEG data source manager. Called - whenever more data is needed. We read the whole image in one step, - so this only adds a fake end of input marker at the end. */ - -static boolean -our_fill_input_buffer (cinfo) - j_decompress_ptr cinfo; -{ - /* Insert a fake EOI marker. */ - struct jpeg_source_mgr *src = cinfo->src; - static JOCTET buffer[2]; - - buffer[0] = (JOCTET) 0xFF; - buffer[1] = (JOCTET) JPEG_EOI; - - src->next_input_byte = buffer; - src->bytes_in_buffer = 2; - return TRUE; -} - - -/* Method to skip over NUM_BYTES bytes in the image data. CINFO->src - is the JPEG data source manager. */ - -static void -our_skip_input_data (cinfo, num_bytes) - j_decompress_ptr cinfo; - long num_bytes; -{ - struct jpeg_source_mgr *src = (struct jpeg_source_mgr *) cinfo->src; - - if (src) - { - if (num_bytes > src->bytes_in_buffer) - ERREXIT (cinfo, JERR_INPUT_EOF); - - src->bytes_in_buffer -= num_bytes; - src->next_input_byte += num_bytes; - } -} - - -/* Method to terminate data source. Called by - jpeg_finish_decompress() after all data has been processed. */ - -static void -our_term_source (cinfo) - j_decompress_ptr cinfo; -{ -} - - -/* Set up the JPEG lib for reading an image from DATA which contains - LEN bytes. CINFO is the decompression info structure created for - reading the image. */ - -static void -jpeg_memory_src (cinfo, data, len) - j_decompress_ptr cinfo; - JOCTET *data; - unsigned int len; -{ - struct jpeg_source_mgr *src; - - if (cinfo->src == NULL) - { - /* First time for this JPEG object? */ - cinfo->src = (struct jpeg_source_mgr *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - sizeof (struct jpeg_source_mgr)); - src = (struct jpeg_source_mgr *) cinfo->src; - src->next_input_byte = data; - } - - src = (struct jpeg_source_mgr *) cinfo->src; - src->init_source = our_init_source; - src->fill_input_buffer = our_fill_input_buffer; - src->skip_input_data = our_skip_input_data; - src->resync_to_restart = jpeg_resync_to_restart_wrapper; /* Use default method. */ - src->term_source = our_term_source; - src->bytes_in_buffer = len; - src->next_input_byte = data; -} - - -/* Load image IMG for use on frame F. Patterned after example.c - from the JPEG lib. */ - -static int -jpeg_load (f, img) - struct frame *f; - struct image *img; -{ - struct jpeg_decompress_struct cinfo; - struct my_jpeg_error_mgr mgr; - Lisp_Object file, specified_file; - Lisp_Object specified_data; - FILE * volatile fp = NULL; - JSAMPARRAY buffer; - int row_stride, x, y; - XImage *ximg = NULL; - int rc; - unsigned long *colors; - int width, height; - struct gcpro gcpro1; - - /* Open the JPEG file. */ - specified_file = image_spec_value (img->spec, QCfile, NULL); - specified_data = image_spec_value (img->spec, QCdata, NULL); - file = Qnil; - GCPRO1 (file); - - if (NILP (specified_data)) - { - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - fp = fopen (SDATA (file), "rb"); - if (fp == NULL) - { - image_error ("Cannot open `%s'", file, Qnil); - UNGCPRO; - return 0; - } - } - - /* Customize libjpeg's error handling to call my_error_exit when an - error is detected. This function will perform a longjmp. */ - cinfo.err = fn_jpeg_std_error (&mgr.pub); - mgr.pub.error_exit = my_error_exit; - - if ((rc = setjmp (mgr.setjmp_buffer)) != 0) - { - if (rc == 1) - { - /* Called from my_error_exit. Display a JPEG error. */ - char buffer[JMSG_LENGTH_MAX]; - cinfo.err->format_message ((j_common_ptr) &cinfo, buffer); - image_error ("Error reading JPEG image `%s': %s", img->spec, - build_string (buffer)); - } - - /* Close the input file and destroy the JPEG object. */ - if (fp) - fclose ((FILE *) fp); - fn_jpeg_destroy_decompress (&cinfo); - - /* If we already have an XImage, free that. */ - x_destroy_x_image (ximg); - - /* Free pixmap and colors. */ - x_clear_image (f, img); - - UNGCPRO; - return 0; - } - - /* Create the JPEG decompression object. Let it read from fp. - Read the JPEG image header. */ - fn_jpeg_CreateDecompress (&cinfo, JPEG_LIB_VERSION, sizeof (cinfo)); - - if (NILP (specified_data)) - fn_jpeg_stdio_src (&cinfo, (FILE *) fp); - else - jpeg_memory_src (&cinfo, SDATA (specified_data), - SBYTES (specified_data)); - - fn_jpeg_read_header (&cinfo, TRUE); - - /* Customize decompression so that color quantization will be used. - Start decompression. */ - cinfo.quantize_colors = TRUE; - fn_jpeg_start_decompress (&cinfo); - width = img->width = cinfo.output_width; - height = img->height = cinfo.output_height; - - /* Create X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) - longjmp (mgr.setjmp_buffer, 2); - - /* Allocate colors. When color quantization is used, - cinfo.actual_number_of_colors has been set with the number of - colors generated, and cinfo.colormap is a two-dimensional array - of color indices in the range 0..cinfo.actual_number_of_colors. - No more than 255 colors will be generated. */ - { - int i, ir, ig, ib; - - if (cinfo.out_color_components > 2) - ir = 0, ig = 1, ib = 2; - else if (cinfo.out_color_components > 1) - ir = 0, ig = 1, ib = 0; - else - ir = 0, ig = 0, ib = 0; - -#if 0 /* TODO: Color tables. */ - /* Use the color table mechanism because it handles colors that - cannot be allocated nicely. Such colors will be replaced with - a default color, and we don't have to care about which colors - can be freed safely, and which can't. */ - init_color_table (); -#endif - colors = (unsigned long *) alloca (cinfo.actual_number_of_colors - * sizeof *colors); - - for (i = 0; i < cinfo.actual_number_of_colors; ++i) - { - int r = cinfo.colormap[ir][i]; - int g = cinfo.colormap[ig][i]; - int b = cinfo.colormap[ib][i]; -#if 0 /* TODO: Color tables. */ - colors[i] = lookup_rgb_color (f, r, g, b); -#else - colors[i] = PALETTERGB (r, g, b); -#endif - } - -#if 0 /* TODO: Color tables. */ - /* Remember those colors actually allocated. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); -#endif - } - - /* Read pixels. */ - row_stride = width * cinfo.output_components; - buffer = cinfo.mem->alloc_sarray ((j_common_ptr) &cinfo, JPOOL_IMAGE, - row_stride, 1); - for (y = 0; y < height; ++y) - { - fn_jpeg_read_scanlines (&cinfo, buffer, 1); - for (x = 0; x < cinfo.output_width; ++x) - XPutPixel (ximg, x, y, colors[buffer[0][x]]); - } - - /* Clean up. */ - fn_jpeg_finish_decompress (&cinfo); - fn_jpeg_destroy_decompress (&cinfo); - if (fp) - fclose ((FILE *) fp); - - /* Maybe fill in the background field while we have ximg handy. */ - if (NILP (image_spec_value (img->spec, QCbackground, NULL))) - IMAGE_BACKGROUND (img, f, ximg); - - /* Put the image into the pixmap. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - UNGCPRO; - return 1; -} - -#endif /* HAVE_JPEG */ - - - -/*********************************************************************** - TIFF - ***********************************************************************/ - -#if HAVE_TIFF - -#include - -static int tiff_image_p P_ ((Lisp_Object object)); -static int tiff_load P_ ((struct frame *f, struct image *img)); - -/* The symbol `tiff' identifying images of this type. */ - -Lisp_Object Qtiff; - -/* Indices of image specification fields in tiff_format, below. */ - -enum tiff_keyword_index -{ - TIFF_TYPE, - TIFF_DATA, - TIFF_FILE, - TIFF_ASCENT, - TIFF_MARGIN, - TIFF_RELIEF, - TIFF_ALGORITHM, - TIFF_HEURISTIC_MASK, - TIFF_MASK, - TIFF_BACKGROUND, - TIFF_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword tiff_format[TIFF_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":data", IMAGE_STRING_VALUE, 0}, - {":file", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type `tiff'. */ - -static struct image_type tiff_type = -{ - &Qtiff, - tiff_image_p, - tiff_load, - x_clear_image, - NULL -}; - -/* TIFF library details. */ -DEF_IMGLIB_FN (TIFFSetErrorHandler); -DEF_IMGLIB_FN (TIFFSetWarningHandler); -DEF_IMGLIB_FN (TIFFOpen); -DEF_IMGLIB_FN (TIFFClientOpen); -DEF_IMGLIB_FN (TIFFGetField); -DEF_IMGLIB_FN (TIFFReadRGBAImage); -DEF_IMGLIB_FN (TIFFClose); - -static int -init_tiff_functions (library) - HMODULE library; -{ - LOAD_IMGLIB_FN (library, TIFFSetErrorHandler); - LOAD_IMGLIB_FN (library, TIFFSetWarningHandler); - LOAD_IMGLIB_FN (library, TIFFOpen); - LOAD_IMGLIB_FN (library, TIFFClientOpen); - LOAD_IMGLIB_FN (library, TIFFGetField); - LOAD_IMGLIB_FN (library, TIFFReadRGBAImage); - LOAD_IMGLIB_FN (library, TIFFClose); - return 1; -} - -/* Return non-zero if OBJECT is a valid TIFF image specification. */ - -static int -tiff_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[TIFF_LAST]; - bcopy (tiff_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, TIFF_LAST, Qtiff)) - return 0; - - /* Must specify either the :data or :file keyword. */ - return fmt[TIFF_FILE].count + fmt[TIFF_DATA].count == 1; -} - - -/* Reading from a memory buffer for TIFF images Based on the PNG - memory source, but we have to provide a lot of extra functions. - Blah. - - We really only need to implement read and seek, but I am not - convinced that the TIFF library is smart enough not to destroy - itself if we only hand it the function pointers we need to - override. */ - -typedef struct -{ - unsigned char *bytes; - size_t len; - int index; -} -tiff_memory_source; - -static size_t -tiff_read_from_memory (data, buf, size) - thandle_t data; - tdata_t buf; - tsize_t size; -{ - tiff_memory_source *src = (tiff_memory_source *) data; - - if (size > src->len - src->index) - return (size_t) -1; - bcopy (src->bytes + src->index, buf, size); - src->index += size; - return size; -} - -static size_t -tiff_write_from_memory (data, buf, size) - thandle_t data; - tdata_t buf; - tsize_t size; -{ - return (size_t) -1; -} - -static toff_t -tiff_seek_in_memory (data, off, whence) - thandle_t data; - toff_t off; - int whence; -{ - tiff_memory_source *src = (tiff_memory_source *) data; - int idx; - - switch (whence) - { - case SEEK_SET: /* Go from beginning of source. */ - idx = off; - break; - - case SEEK_END: /* Go from end of source. */ - idx = src->len + off; - break; - - case SEEK_CUR: /* Go from current position. */ - idx = src->index + off; - break; - - default: /* Invalid `whence'. */ - return -1; - } - - if (idx > src->len || idx < 0) - return -1; - - src->index = idx; - return src->index; -} - -static int -tiff_close_memory (data) - thandle_t data; -{ - /* NOOP */ - return 0; -} - -static int -tiff_mmap_memory (data, pbase, psize) - thandle_t data; - tdata_t *pbase; - toff_t *psize; -{ - /* It is already _IN_ memory. */ - return 0; -} - -static void -tiff_unmap_memory (data, base, size) - thandle_t data; - tdata_t base; - toff_t size; -{ - /* We don't need to do this. */ -} - -static toff_t -tiff_size_of_memory (data) - thandle_t data; -{ - return ((tiff_memory_source *) data)->len; -} - - -static void -tiff_error_handler (title, format, ap) - const char *title, *format; - va_list ap; -{ - char buf[512]; - int len; - - len = sprintf (buf, "TIFF error: %s ", title); - vsprintf (buf + len, format, ap); - add_to_log (buf, Qnil, Qnil); -} - - -static void -tiff_warning_handler (title, format, ap) - const char *title, *format; - va_list ap; -{ - char buf[512]; - int len; - - len = sprintf (buf, "TIFF warning: %s ", title); - vsprintf (buf + len, format, ap); - add_to_log (buf, Qnil, Qnil); -} - - -/* Load TIFF image IMG for use on frame F. Value is non-zero if - successful. */ - -static int -tiff_load (f, img) - struct frame *f; - struct image *img; -{ - Lisp_Object file, specified_file; - Lisp_Object specified_data; - TIFF *tiff; - int width, height, x, y; - uint32 *buf; - int rc; - XImage *ximg; - struct gcpro gcpro1; - tiff_memory_source memsrc; - - specified_file = image_spec_value (img->spec, QCfile, NULL); - specified_data = image_spec_value (img->spec, QCdata, NULL); - file = Qnil; - GCPRO1 (file); - - fn_TIFFSetErrorHandler (tiff_error_handler); - fn_TIFFSetWarningHandler (tiff_warning_handler); - - if (NILP (specified_data)) - { - /* Read from a file */ - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", file, Qnil); - UNGCPRO; - return 0; - } - - /* Try to open the image file. */ - tiff = fn_TIFFOpen (SDATA (file), "r"); - if (tiff == NULL) - { - image_error ("Cannot open `%s'", file, Qnil); - UNGCPRO; - return 0; - } - } - else - { - /* Memory source! */ - memsrc.bytes = SDATA (specified_data); - memsrc.len = SBYTES (specified_data); - memsrc.index = 0; - - tiff = fn_TIFFClientOpen ("memory_source", "r", &memsrc, - (TIFFReadWriteProc) tiff_read_from_memory, - (TIFFReadWriteProc) tiff_write_from_memory, - tiff_seek_in_memory, - tiff_close_memory, - tiff_size_of_memory, - tiff_mmap_memory, - tiff_unmap_memory); - - if (!tiff) - { - image_error ("Cannot open memory source for `%s'", img->spec, Qnil); - UNGCPRO; - return 0; - } - } - - /* Get width and height of the image, and allocate a raster buffer - of width x height 32-bit values. */ - fn_TIFFGetField (tiff, TIFFTAG_IMAGEWIDTH, &width); - fn_TIFFGetField (tiff, TIFFTAG_IMAGELENGTH, &height); - buf = (uint32 *) xmalloc (width * height * sizeof *buf); - - rc = fn_TIFFReadRGBAImage (tiff, width, height, buf, 0); - fn_TIFFClose (tiff); - if (!rc) - { - image_error ("Error reading TIFF image `%s'", img->spec, Qnil); - xfree (buf); - UNGCPRO; - return 0; - } - - /* Create the X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) - { - xfree (buf); - UNGCPRO; - return 0; - } - -#if 0 /* TODO: Color tables. */ - /* Initialize the color table. */ - init_color_table (); -#endif - - /* Process the pixel raster. Origin is in the lower-left corner. */ - for (y = 0; y < height; ++y) - { - uint32 *row = buf + y * width; - - for (x = 0; x < width; ++x) - { - uint32 abgr = row[x]; - int r = TIFFGetR (abgr); - int g = TIFFGetG (abgr); - int b = TIFFGetB (abgr); -#if 0 /* TODO: Color tables. */ - XPutPixel (ximg, x, height - 1 - y, lookup_rgb_color (f, r, g, b)); -#else - XPutPixel (ximg, x, height - 1 - y, PALETTERGB (r, g, b)); -#endif - } - } - -#if 0 /* TODO: Color tables. */ - /* Remember the colors allocated for the image. Free the color table. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); -#endif - - img->width = width; - img->height = height; - - /* Maybe fill in the background field while we have ximg handy. */ - if (NILP (image_spec_value (img->spec, QCbackground, NULL))) - IMAGE_BACKGROUND (img, f, ximg); - - /* Put the image into the pixmap, then free the X image and its buffer. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - xfree (buf); - - UNGCPRO; - return 1; -} - -#endif /* HAVE_TIFF != 0 */ - - - -/*********************************************************************** - GIF - ***********************************************************************/ - -#if HAVE_GIF - -#define DrawText gif_DrawText -#include -#undef DrawText - -static int gif_image_p P_ ((Lisp_Object object)); -static int gif_load P_ ((struct frame *f, struct image *img)); - -/* The symbol `gif' identifying images of this type. */ - -Lisp_Object Qgif; - -/* Indices of image specification fields in gif_format, below. */ - -enum gif_keyword_index -{ - GIF_TYPE, - GIF_DATA, - GIF_FILE, - GIF_ASCENT, - GIF_MARGIN, - GIF_RELIEF, - GIF_ALGORITHM, - GIF_HEURISTIC_MASK, - GIF_MASK, - GIF_IMAGE, - GIF_BACKGROUND, - GIF_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword gif_format[GIF_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":data", IMAGE_STRING_VALUE, 0}, - {":file", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":image", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type `gif'. */ - -static struct image_type gif_type = -{ - &Qgif, - gif_image_p, - gif_load, - x_clear_image, - NULL -}; - - -/* GIF library details. */ -DEF_IMGLIB_FN (DGifCloseFile); -DEF_IMGLIB_FN (DGifSlurp); -DEF_IMGLIB_FN (DGifOpen); -DEF_IMGLIB_FN (DGifOpenFileName); - -static int -init_gif_functions (library) - HMODULE library; -{ - LOAD_IMGLIB_FN (library, DGifCloseFile); - LOAD_IMGLIB_FN (library, DGifSlurp); - LOAD_IMGLIB_FN (library, DGifOpen); - LOAD_IMGLIB_FN (library, DGifOpenFileName); - return 1; -} - - -/* Return non-zero if OBJECT is a valid GIF image specification. */ - -static int -gif_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[GIF_LAST]; - bcopy (gif_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, GIF_LAST, Qgif)) - return 0; - - /* Must specify either the :data or :file keyword. */ - return fmt[GIF_FILE].count + fmt[GIF_DATA].count == 1; -} - -/* Reading a GIF image from memory - Based on the PNG memory stuff to a certain extent. */ - -typedef struct -{ - unsigned char *bytes; - size_t len; - int index; -} -gif_memory_source; - -/* Make the current memory source available to gif_read_from_memory. - It's done this way because not all versions of libungif support - a UserData field in the GifFileType structure. */ -static gif_memory_source *current_gif_memory_src; - -static int -gif_read_from_memory (file, buf, len) - GifFileType *file; - GifByteType *buf; - int len; -{ - gif_memory_source *src = current_gif_memory_src; - - if (len > src->len - src->index) - return -1; - - bcopy (src->bytes + src->index, buf, len); - src->index += len; - return len; -} - - -/* Load GIF image IMG for use on frame F. Value is non-zero if - successful. */ - -static int -gif_load (f, img) - struct frame *f; - struct image *img; -{ - Lisp_Object file, specified_file; - Lisp_Object specified_data; - int rc, width, height, x, y, i; - XImage *ximg; - ColorMapObject *gif_color_map; - unsigned long pixel_colors[256]; - GifFileType *gif; - struct gcpro gcpro1; - Lisp_Object image; - int ino, image_left, image_top, image_width, image_height; - gif_memory_source memsrc; - unsigned char *raster; - - specified_file = image_spec_value (img->spec, QCfile, NULL); - specified_data = image_spec_value (img->spec, QCdata, NULL); - file = Qnil; - GCPRO1 (file); - - if (NILP (specified_data)) - { - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - /* Open the GIF file. */ - gif = fn_DGifOpenFileName (SDATA (file)); - if (gif == NULL) - { - image_error ("Cannot open `%s'", file, Qnil); - UNGCPRO; - return 0; - } - } - else - { - /* Read from memory! */ - current_gif_memory_src = &memsrc; - memsrc.bytes = SDATA (specified_data); - memsrc.len = SBYTES (specified_data); - memsrc.index = 0; - - gif = fn_DGifOpen(&memsrc, gif_read_from_memory); - if (!gif) - { - image_error ("Cannot open memory source `%s'", img->spec, Qnil); - UNGCPRO; - return 0; - } - } - - /* Read entire contents. */ - rc = fn_DGifSlurp (gif); - if (rc == GIF_ERROR) - { - image_error ("Error reading `%s'", img->spec, Qnil); - fn_DGifCloseFile (gif); - UNGCPRO; - return 0; - } - - image = image_spec_value (img->spec, QCindex, NULL); - ino = INTEGERP (image) ? XFASTINT (image) : 0; - if (ino >= gif->ImageCount) - { - image_error ("Invalid image number `%s' in image `%s'", - image, img->spec); - fn_DGifCloseFile (gif); - UNGCPRO; - return 0; - } - - width = img->width = max (gif->SWidth, gif->Image.Left + gif->Image.Width); - height = img->height = max (gif->SHeight, gif->Image.Top + gif->Image.Height); - - /* Create the X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) - { - fn_DGifCloseFile (gif); - UNGCPRO; - return 0; - } - - /* Allocate colors. */ - gif_color_map = gif->SavedImages[ino].ImageDesc.ColorMap; - if (!gif_color_map) - gif_color_map = gif->SColorMap; -#if 0 /* TODO: Color tables */ - init_color_table (); -#endif - bzero (pixel_colors, sizeof pixel_colors); - - for (i = 0; i < gif_color_map->ColorCount; ++i) - { - int r = gif_color_map->Colors[i].Red; - int g = gif_color_map->Colors[i].Green; - int b = gif_color_map->Colors[i].Blue; -#if 0 /* TODO: Color tables */ - pixel_colors[i] = lookup_rgb_color (f, r, g, b); -#else - pixel_colors[i] = PALETTERGB (r, g, b); -#endif - } - -#if 0 /* TODO: Color tables */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); -#endif - - /* Clear the part of the screen image that are not covered by - the image from the GIF file. Full animated GIF support - requires more than can be done here (see the gif89 spec, - disposal methods). Let's simply assume that the part - not covered by a sub-image is in the frame's background color. */ - image_top = gif->SavedImages[ino].ImageDesc.Top; - image_left = gif->SavedImages[ino].ImageDesc.Left; - image_width = gif->SavedImages[ino].ImageDesc.Width; - image_height = gif->SavedImages[ino].ImageDesc.Height; - - for (y = 0; y < image_top; ++y) - for (x = 0; x < width; ++x) - XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); - - for (y = image_top + image_height; y < height; ++y) - for (x = 0; x < width; ++x) - XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); - - for (y = image_top; y < image_top + image_height; ++y) - { - for (x = 0; x < image_left; ++x) - XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); - for (x = image_left + image_width; x < width; ++x) - XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); - } - - /* Read the GIF image into the X image. We use a local variable - `raster' here because RasterBits below is a char *, and invites - problems with bytes >= 0x80. */ - raster = (unsigned char *) gif->SavedImages[ino].RasterBits; - - if (gif->SavedImages[ino].ImageDesc.Interlace) - { - static int interlace_start[] = {0, 4, 2, 1}; - static int interlace_increment[] = {8, 8, 4, 2}; - int pass; - int row = interlace_start[0]; - - pass = 0; - - for (y = 0; y < image_height; y++) - { - if (row >= image_height) - { - row = interlace_start[++pass]; - while (row >= image_height) - row = interlace_start[++pass]; - } - - for (x = 0; x < image_width; x++) - { - int i = raster[(y * image_width) + x]; - XPutPixel (ximg, x + image_left, row + image_top, - pixel_colors[i]); - } - - row += interlace_increment[pass]; - } - } - else - { - for (y = 0; y < image_height; ++y) - for (x = 0; x < image_width; ++x) - { - int i = raster[y* image_width + x]; - XPutPixel (ximg, x + image_left, y + image_top, pixel_colors[i]); - } - } - - fn_DGifCloseFile (gif); - - /* Maybe fill in the background field while we have ximg handy. */ - if (NILP (image_spec_value (img->spec, QCbackground, NULL))) - IMAGE_BACKGROUND (img, f, ximg); - - /* Put the image into the pixmap, then free the X image and its buffer. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - - UNGCPRO; - return 1; -} - -#endif /* HAVE_GIF != 0 */ - - - -/*********************************************************************** - Ghostscript - ***********************************************************************/ - -Lisp_Object Qpostscript; - -/* Keyword symbols. */ - -Lisp_Object QCloader, QCbounding_box, QCpt_width, QCpt_height; - -#ifdef HAVE_GHOSTSCRIPT -static int gs_image_p P_ ((Lisp_Object object)); -static int gs_load P_ ((struct frame *f, struct image *img)); -static void gs_clear_image P_ ((struct frame *f, struct image *img)); - -/* The symbol `postscript' identifying images of this type. */ - -/* Keyword symbols. */ - -Lisp_Object QCloader, QCbounding_box, QCpt_width, QCpt_height; - -/* Indices of image specification fields in gs_format, below. */ - -enum gs_keyword_index -{ - GS_TYPE, - GS_PT_WIDTH, - GS_PT_HEIGHT, - GS_FILE, - GS_LOADER, - GS_BOUNDING_BOX, - GS_ASCENT, - GS_MARGIN, - GS_RELIEF, - GS_ALGORITHM, - GS_HEURISTIC_MASK, - GS_MASK, - GS_BACKGROUND, - GS_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword gs_format[GS_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":pt-width", IMAGE_POSITIVE_INTEGER_VALUE, 1}, - {":pt-height", IMAGE_POSITIVE_INTEGER_VALUE, 1}, - {":file", IMAGE_STRING_VALUE, 1}, - {":loader", IMAGE_FUNCTION_VALUE, 0}, - {":bounding-box", IMAGE_DONT_CHECK_VALUE_TYPE, 1}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type `ghostscript'. */ - -static struct image_type gs_type = -{ - &Qpostscript, - gs_image_p, - gs_load, - gs_clear_image, - NULL -}; - - -/* Free X resources of Ghostscript image IMG which is used on frame F. */ - -static void -gs_clear_image (f, img) - struct frame *f; - struct image *img; -{ - /* IMG->data.ptr_val may contain a recorded colormap. */ - xfree (img->data.ptr_val); - x_clear_image (f, img); -} - - -/* Return non-zero if OBJECT is a valid Ghostscript image - specification. */ - -static int -gs_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[GS_LAST]; - Lisp_Object tem; - int i; - - bcopy (gs_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, GS_LAST, Qpostscript)) - return 0; - - /* Bounding box must be a list or vector containing 4 integers. */ - tem = fmt[GS_BOUNDING_BOX].value; - if (CONSP (tem)) - { - for (i = 0; i < 4; ++i, tem = XCDR (tem)) - if (!CONSP (tem) || !INTEGERP (XCAR (tem))) - return 0; - if (!NILP (tem)) - return 0; - } - else if (VECTORP (tem)) - { - if (XVECTOR (tem)->size != 4) - return 0; - for (i = 0; i < 4; ++i) - if (!INTEGERP (XVECTOR (tem)->contents[i])) - return 0; - } - else - return 0; - - return 1; -} - - -/* Load Ghostscript image IMG for use on frame F. Value is non-zero - if successful. */ - -static int -gs_load (f, img) - struct frame *f; - struct image *img; -{ - char buffer[100]; - Lisp_Object window_and_pixmap_id = Qnil, loader, pt_height, pt_width; - struct gcpro gcpro1, gcpro2; - Lisp_Object frame; - double in_width, in_height; - Lisp_Object pixel_colors = Qnil; - - /* Compute pixel size of pixmap needed from the given size in the - image specification. Sizes in the specification are in pt. 1 pt - = 1/72 in, xdpi and ydpi are stored in the frame's X display - info. */ - pt_width = image_spec_value (img->spec, QCpt_width, NULL); - in_width = XFASTINT (pt_width) / 72.0; - img->width = in_width * FRAME_W32_DISPLAY_INFO (f)->resx; - pt_height = image_spec_value (img->spec, QCpt_height, NULL); - in_height = XFASTINT (pt_height) / 72.0; - img->height = in_height * FRAME_W32_DISPLAY_INFO (f)->resy; - - /* Create the pixmap. */ - BLOCK_INPUT; - xassert (img->pixmap == 0); - img->pixmap = XCreatePixmap (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), - img->width, img->height, - one_w32_display_info.n_cbits); - UNBLOCK_INPUT; - - if (!img->pixmap) - { - image_error ("Unable to create pixmap for `%s'", img->spec, Qnil); - return 0; - } - - /* Call the loader to fill the pixmap. It returns a process object - if successful. We do not record_unwind_protect here because - other places in redisplay like calling window scroll functions - don't either. Let the Lisp loader use `unwind-protect' instead. */ - GCPRO2 (window_and_pixmap_id, pixel_colors); - - sprintf (buffer, "%lu %lu", - (unsigned long) FRAME_W32_WINDOW (f), - (unsigned long) img->pixmap); - window_and_pixmap_id = build_string (buffer); - - sprintf (buffer, "%lu %lu", - FRAME_FOREGROUND_PIXEL (f), - FRAME_BACKGROUND_PIXEL (f)); - pixel_colors = build_string (buffer); - - XSETFRAME (frame, f); - loader = image_spec_value (img->spec, QCloader, NULL); - if (NILP (loader)) - loader = intern ("gs-load-image"); - - img->data.lisp_val = call6 (loader, frame, img->spec, - make_number (img->width), - make_number (img->height), - window_and_pixmap_id, - pixel_colors); - UNGCPRO; - return PROCESSP (img->data.lisp_val); -} - - -/* Kill the Ghostscript process that was started to fill PIXMAP on - frame F. Called from XTread_socket when receiving an event - telling Emacs that Ghostscript has finished drawing. */ - -void -x_kill_gs_process (pixmap, f) - Pixmap pixmap; - struct frame *f; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - int class, i; - struct image *img; - - /* Find the image containing PIXMAP. */ - for (i = 0; i < c->used; ++i) - if (c->images[i]->pixmap == pixmap) - break; - - /* Should someone in between have cleared the image cache, for - instance, give up. */ - if (i == c->used) - return; - - /* Kill the GS process. We should have found PIXMAP in the image - cache and its image should contain a process object. */ - img = c->images[i]; - xassert (PROCESSP (img->data.lisp_val)); - Fkill_process (img->data.lisp_val, Qnil); - img->data.lisp_val = Qnil; - - /* On displays with a mutable colormap, figure out the colors - allocated for the image by looking at the pixels of an XImage for - img->pixmap. */ - class = FRAME_W32_DISPLAY_INFO (f)->visual->class; - if (class != StaticColor && class != StaticGray && class != TrueColor) - { - XImage *ximg; - - BLOCK_INPUT; - - /* Try to get an XImage for img->pixmep. */ - ximg = XGetImage (FRAME_W32_DISPLAY (f), img->pixmap, - 0, 0, img->width, img->height, ~0, ZPixmap); - if (ximg) - { - int x, y; - - /* Initialize the color table. */ - init_color_table (); - - /* For each pixel of the image, look its color up in the - color table. After having done so, the color table will - contain an entry for each color used by the image. */ - for (y = 0; y < img->height; ++y) - for (x = 0; x < img->width; ++x) - { - unsigned long pixel = XGetPixel (ximg, x, y); - lookup_pixel_color (f, pixel); - } - - /* Record colors in the image. Free color table and XImage. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - XDestroyImage (ximg); - -#if 0 /* This doesn't seem to be the case. If we free the colors - here, we get a BadAccess later in x_clear_image when - freeing the colors. */ - /* We have allocated colors once, but Ghostscript has also - allocated colors on behalf of us. So, to get the - reference counts right, free them once. */ - if (img->ncolors) - x_free_colors (FRAME_W32_DISPLAY (f), cmap, - img->colors, img->ncolors, 0); -#endif - } - else - image_error ("Cannot get X image of `%s'; colors will not be freed", - img->spec, Qnil); - - UNBLOCK_INPUT; - } - - /* Now that we have the pixmap, compute mask and transform the - image if requested. */ - BLOCK_INPUT; - postprocess_image (f, img); - UNBLOCK_INPUT; -} - -#endif /* HAVE_GHOSTSCRIPT */ - - -/*********************************************************************** - Window properties - ***********************************************************************/ - -DEFUN ("x-change-window-property", Fx_change_window_property, - Sx_change_window_property, 2, 3, 0, - doc: /* Change window property PROP to VALUE on the X window of FRAME. -PROP and VALUE must be strings. FRAME nil or omitted means use the -selected frame. Value is VALUE. */) - (prop, value, frame) - Lisp_Object frame, prop, value; -{ -#if 0 /* TODO : port window properties to W32 */ - struct frame *f = check_x_frame (frame); - Atom prop_atom; - - CHECK_STRING (prop); - CHECK_STRING (value); - - BLOCK_INPUT; - prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), SDATA (prop), False); - XChangeProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), - prop_atom, XA_STRING, 8, PropModeReplace, - SDATA (value), SCHARS (value)); - - /* Make sure the property is set when we return. */ - XFlush (FRAME_W32_DISPLAY (f)); - UNBLOCK_INPUT; - -#endif /* TODO */ - - return value; -} - - -DEFUN ("x-delete-window-property", Fx_delete_window_property, - Sx_delete_window_property, 1, 2, 0, - doc: /* Remove window property PROP from X window of FRAME. -FRAME nil or omitted means use the selected frame. Value is PROP. */) - (prop, frame) - Lisp_Object prop, frame; -{ -#if 0 /* TODO : port window properties to W32 */ - - struct frame *f = check_x_frame (frame); - Atom prop_atom; - - CHECK_STRING (prop); - BLOCK_INPUT; - prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), SDATA (prop), False); - XDeleteProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), prop_atom); - - /* Make sure the property is removed when we return. */ - XFlush (FRAME_W32_DISPLAY (f)); - UNBLOCK_INPUT; -#endif /* TODO */ - - return prop; -} - - -DEFUN ("x-window-property", Fx_window_property, Sx_window_property, - 1, 2, 0, - doc: /* Value is the value of window property PROP on FRAME. -If FRAME is nil or omitted, use the selected frame. Value is nil -if FRAME hasn't a property with name PROP or if PROP has no string -value. */) - (prop, frame) - Lisp_Object prop, frame; -{ -#if 0 /* TODO : port window properties to W32 */ - - struct frame *f = check_x_frame (frame); - Atom prop_atom; - int rc; - Lisp_Object prop_value = Qnil; - char *tmp_data = NULL; - Atom actual_type; - int actual_format; - unsigned long actual_size, bytes_remaining; - - CHECK_STRING (prop); - BLOCK_INPUT; - prop_atom = XInternAtom (FRAME_W32_DISPLAY (f), SDATA (prop), False); - rc = XGetWindowProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), - prop_atom, 0, 0, False, XA_STRING, - &actual_type, &actual_format, &actual_size, - &bytes_remaining, (unsigned char **) &tmp_data); - if (rc == Success) - { - int size = bytes_remaining; - - XFree (tmp_data); - tmp_data = NULL; - - rc = XGetWindowProperty (FRAME_W32_DISPLAY (f), FRAME_W32_WINDOW (f), - prop_atom, 0, bytes_remaining, - False, XA_STRING, - &actual_type, &actual_format, - &actual_size, &bytes_remaining, - (unsigned char **) &tmp_data); - if (rc == Success) - prop_value = make_string (tmp_data, size); - - XFree (tmp_data); - } - - UNBLOCK_INPUT; - - return prop_value; - -#endif /* TODO */ - return Qnil; -} - - - -/*********************************************************************** - Busy cursor - ***********************************************************************/ - -/* If non-null, an asynchronous timer that, when it expires, displays - an hourglass cursor on all frames. */ - -static struct atimer *hourglass_atimer; - -/* Non-zero means an hourglass cursor is currently shown. */ - -static int hourglass_shown_p; - -/* Number of seconds to wait before displaying an hourglass cursor. */ - -static Lisp_Object Vhourglass_delay; - -/* Default number of seconds to wait before displaying an hourglass - cursor. */ - -#define DEFAULT_HOURGLASS_DELAY 1 - -/* Function prototypes. */ - -static void show_hourglass P_ ((struct atimer *)); -static void hide_hourglass P_ ((void)); - - -/* Cancel a currently active hourglass timer, and start a new one. */ - -void -start_hourglass () -{ -#if 0 /* TODO: cursor shape changes. */ - EMACS_TIME delay; - int secs, usecs = 0; - - cancel_hourglass (); - - if (INTEGERP (Vhourglass_delay) - && XINT (Vhourglass_delay) > 0) - secs = XFASTINT (Vhourglass_delay); - else if (FLOATP (Vhourglass_delay) - && XFLOAT_DATA (Vhourglass_delay) > 0) - { - Lisp_Object tem; - tem = Ftruncate (Vhourglass_delay, Qnil); - secs = XFASTINT (tem); - usecs = (XFLOAT_DATA (Vhourglass_delay) - secs) * 1000000; - } - else - secs = DEFAULT_HOURGLASS_DELAY; + Lisp_Object tem; + tem = Ftruncate (Vhourglass_delay, Qnil); + secs = XFASTINT (tem); + usecs = (XFLOAT_DATA (Vhourglass_delay) - secs) * 1000000; + } + else + secs = DEFAULT_HOURGLASS_DELAY; EMACS_SET_SECS_USECS (delay, secs, usecs); hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay, @@ -13990,6 +8309,76 @@ If the underlying system call fails, value is nil. */) return value; } +DEFUN ("default-printer-name", Fdefault_printer_name, Sdefault_printer_name, + 0, 0, 0, doc: /* Return the name of Windows default printer device. */) + () +{ + static char pname_buf[256]; + int err; + HANDLE hPrn; + PRINTER_INFO_2 *ppi2 = NULL; + DWORD dwNeeded = 0, dwReturned = 0; + + /* Retrieve the default string from Win.ini (the registry). + * String will be in form "printername,drivername,portname". + * This is the most portable way to get the default printer. */ + if (GetProfileString ("windows", "device", ",,", pname_buf, sizeof (pname_buf)) <= 0) + return Qnil; + /* printername precedes first "," character */ + strtok (pname_buf, ","); + /* We want to know more than the printer name */ + if (!OpenPrinter (pname_buf, &hPrn, NULL)) + return Qnil; + GetPrinter (hPrn, 2, NULL, 0, &dwNeeded); + if (dwNeeded == 0) + { + ClosePrinter (hPrn); + return Qnil; + } + /* Allocate memory for the PRINTER_INFO_2 struct */ + ppi2 = (PRINTER_INFO_2 *) xmalloc (dwNeeded); + if (!ppi2) + { + ClosePrinter (hPrn); + return Qnil; + } + /* Call GetPrinter() again with big enouth memory block */ + err = GetPrinter (hPrn, 2, (LPBYTE)ppi2, dwNeeded, &dwReturned); + ClosePrinter (hPrn); + if (!err) + { + xfree(ppi2); + return Qnil; + } + + if (ppi2) + { + if (ppi2->Attributes & PRINTER_ATTRIBUTE_SHARED && ppi2->pServerName) + { + /* a remote printer */ + if (*ppi2->pServerName == '\\') + _snprintf(pname_buf, sizeof (pname_buf), "%s\\%s", ppi2->pServerName, + ppi2->pShareName); + else + _snprintf(pname_buf, sizeof (pname_buf), "\\\\%s\\%s", ppi2->pServerName, + ppi2->pShareName); + pname_buf[sizeof (pname_buf) - 1] = '\0'; + } + else + { + /* a local printer */ + strncpy(pname_buf, ppi2->pPortName, sizeof (pname_buf)); + pname_buf[sizeof (pname_buf) - 1] = '\0'; + /* `pPortName' can include several ports, delimited by ','. + * we only use the first one. */ + strtok(pname_buf, ","); + } + xfree(ppi2); + } + + return build_string (pname_buf); +} + /*********************************************************************** Initialization ***********************************************************************/ @@ -14046,8 +8435,6 @@ syms_of_w32fns () staticpro (&Qsuppress_icon); Qundefined_color = intern ("undefined-color"); staticpro (&Qundefined_color); - Qcenter = intern ("center"); - staticpro (&Qcenter); Qcancel_timer = intern ("cancel-timer"); staticpro (&Qcancel_timer); @@ -14072,21 +8459,6 @@ syms_of_w32fns () = Fcons (Fcons (Qdisplay, Qt), Vtext_property_default_nonsticky); - Qlaplace = intern ("laplace"); - staticpro (&Qlaplace); - Qemboss = intern ("emboss"); - staticpro (&Qemboss); - Qedge_detection = intern ("edge-detection"); - staticpro (&Qedge_detection); - Qheuristic = intern ("heuristic"); - staticpro (&Qheuristic); - QCmatrix = intern (":matrix"); - staticpro (&QCmatrix); - QCcolor_adjustment = intern (":color-adjustment"); - staticpro (&QCcolor_adjustment); - QCmask = intern (":mask"); - staticpro (&QCmask); - Fput (Qundefined_color, Qerror_conditions, Fcons (Qundefined_color, Fcons (Qerror, Qnil))); Fput (Qundefined_color, Qerror_message, @@ -14217,10 +8589,6 @@ If this variable is non-nil, Emacs will pass them on, allowing the system to handle them. */); w32_pass_extra_mouse_buttons_to_system = 0; - DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, - doc: /* List of directories to search for window system bitmap files. */); - Vx_bitmap_file_path = decode_env_path ((char *) 0, "PATH"); - DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape, doc: /* The shape of the pointer when over text. Changing the value does not affect existing frames @@ -14287,13 +8655,6 @@ such a font. This is especially effective for such large fonts as Chinese, Japanese, and Korean. */); Vx_pixel_size_width_font_regexp = Qnil; - DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay, - doc: /* Time after which cached images are removed from the cache. -When an image has not been displayed this many seconds, remove it -from the image cache. Value must be an integer or nil with nil -meaning don't clear the cache. */); - Vimage_cache_eviction_delay = make_number (30 * 60); - DEFVAR_LISP ("w32-bdf-filename-alist", &Vw32_bdf_filename_alist, doc: /* List of bdf fonts and their corresponding filenames. */); @@ -14442,6 +8803,7 @@ versions of Windows) characters. */); defsubr (&Sw32_find_bdf_fonts); defsubr (&Sfile_system_info); + defsubr (&Sdefault_printer_name); /* Setting callback functions for fontset handler. */ get_font_info_func = w32_get_font_info; @@ -14458,69 +8820,6 @@ versions of Windows) characters. */); get_font_repertory_func = x_get_font_repertory; check_window_system_func = check_w32; - /* Images. */ - Qxbm = intern ("xbm"); - staticpro (&Qxbm); - QCconversion = intern (":conversion"); - staticpro (&QCconversion); - QCheuristic_mask = intern (":heuristic-mask"); - staticpro (&QCheuristic_mask); - QCcolor_symbols = intern (":color-symbols"); - staticpro (&QCcolor_symbols); - QCascent = intern (":ascent"); - staticpro (&QCascent); - QCmargin = intern (":margin"); - staticpro (&QCmargin); - QCrelief = intern (":relief"); - staticpro (&QCrelief); - Qpostscript = intern ("postscript"); - staticpro (&Qpostscript); - QCloader = intern (":loader"); - staticpro (&QCloader); - QCbounding_box = intern (":bounding-box"); - staticpro (&QCbounding_box); - QCpt_width = intern (":pt-width"); - staticpro (&QCpt_width); - QCpt_height = intern (":pt-height"); - staticpro (&QCpt_height); - QCindex = intern (":index"); - staticpro (&QCindex); - Qpbm = intern ("pbm"); - staticpro (&Qpbm); - -#if HAVE_XPM - Qxpm = intern ("xpm"); - staticpro (&Qxpm); -#endif - -#if HAVE_JPEG - Qjpeg = intern ("jpeg"); - staticpro (&Qjpeg); -#endif - -#if HAVE_TIFF - Qtiff = intern ("tiff"); - staticpro (&Qtiff); -#endif - -#if HAVE_GIF - Qgif = intern ("gif"); - staticpro (&Qgif); -#endif - -#if HAVE_PNG - Qpng = intern ("png"); - staticpro (&Qpng); -#endif - - defsubr (&Sclear_image_cache); - defsubr (&Simage_size); - defsubr (&Simage_mask_p); - -#if GLYPH_DEBUG - defsubr (&Simagep); - defsubr (&Slookup_image); -#endif hourglass_atimer = NULL; hourglass_shown_p = 0; @@ -14560,84 +8859,6 @@ void globals_of_w32fns () GetProcAddress (user32_lib, "GetClipboardSequenceNumber"); } -/* Initialize image types. Based on which libraries are available. */ -static void -init_external_image_libraries () -{ - HINSTANCE library; - -#if HAVE_XPM - if ((library = LoadLibrary ("libXpm.dll"))) - { - if (init_xpm_functions (library)) - define_image_type (&xpm_type); - } - -#endif - -#if HAVE_JPEG - /* Try loading jpeg library under probable names. */ - if ((library = LoadLibrary ("libjpeg.dll")) - || (library = LoadLibrary ("jpeg-62.dll")) - || (library = LoadLibrary ("jpeg.dll"))) - { - if (init_jpeg_functions (library)) - define_image_type (&jpeg_type); - } -#endif - -#if HAVE_TIFF - if (library = LoadLibrary ("libtiff.dll")) - { - if (init_tiff_functions (library)) - define_image_type (&tiff_type); - } -#endif - -#if HAVE_GIF - if (library = LoadLibrary ("libungif.dll")) - { - if (init_gif_functions (library)) - define_image_type (&gif_type); - } -#endif - -#if HAVE_PNG - /* Ensure zlib is loaded. Try debug version first. */ - if (!LoadLibrary ("zlibd.dll")) - LoadLibrary ("zlib.dll"); - - /* Try loading libpng under probable names. */ - if ((library = LoadLibrary ("libpng13d.dll")) - || (library = LoadLibrary ("libpng13.dll")) - || (library = LoadLibrary ("libpng12d.dll")) - || (library = LoadLibrary ("libpng12.dll")) - || (library = LoadLibrary ("libpng.dll"))) - { - if (init_png_functions (library)) - define_image_type (&png_type); - } -#endif -} - -void -init_xfns () -{ - image_types = NULL; - Vimage_types = Qnil; - - define_image_type (&pbm_type); - define_image_type (&xbm_type); - -#if 0 /* TODO : Ghostscript support for W32 */ - define_image_type (&gs_type); -#endif - - /* Image types that rely on external libraries are loaded dynamically - if the library is available. */ - init_external_image_libraries (); -} - #undef abort void @@ -14670,3 +8891,6 @@ w32_last_error() { return GetLastError (); } + +/* arch-tag: 707589ab-b9be-4638-8cdd-74629cc9b446 + (do not change this comment) */ diff --git a/src/w32gui.h b/src/w32gui.h index 7aedfbc47e..04182c6da8 100644 --- a/src/w32gui.h +++ b/src/w32gui.h @@ -176,3 +176,6 @@ typedef struct { #endif /* EMACS_W32GUI_H */ + +/* arch-tag: 9172e5fb-45a5-4684-afd9-ca0e81324604 + (do not change this comment) */ diff --git a/src/w32heap.c b/src/w32heap.c index 11ec7c1b6c..b40db430ea 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -304,3 +304,6 @@ _heap_term (void) } #endif + +/* arch-tag: 9a6a9860-040d-422d-8905-450dd535cd9c + (do not change this comment) */ diff --git a/src/w32heap.h b/src/w32heap.h index 6abd658b76..7fdf952683 100644 --- a/src/w32heap.h +++ b/src/w32heap.h @@ -103,3 +103,6 @@ IMAGE_SECTION_HEADER * find_section (char * name, IMAGE_NT_HEADERS * nt_header); IMAGE_SECTION_HEADER * rva_to_section (DWORD rva, IMAGE_NT_HEADERS * nt_header); #endif /* NTHEAP_H_ */ + +/* arch-tag: 3ba4cbe1-8a09-4a41-8f37-fd31f7426b3c + (do not change this comment) */ diff --git a/src/w32inevt.c b/src/w32inevt.c index f602f8b820..168a0fb87b 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c @@ -642,8 +642,7 @@ maybe_generate_resize_event () } int -w32_console_read_socket (int sd, struct input_event *bufp, int numchars, - int expected) +w32_console_read_socket (int sd, int expected, struct input_event *hold_quit) { BOOL no_events = TRUE; int nev, ret = 0, add; @@ -670,27 +669,31 @@ w32_console_read_socket (int sd, struct input_event *bufp, int numchars, return nev; } - while (nev > 0 && numchars > 0) + while (nev > 0) { + struct input_event inev; + + EVENT_INIT (inev); + inev.kind = NO_EVENT; + inev.arg = Qnil; + switch (queue_ptr->EventType) { case KEY_EVENT: - add = key_event (&queue_ptr->Event.KeyEvent, bufp, &isdead); + add = key_event (&queue_ptr->Event.KeyEvent, &inev, &isdead); if (add == -1) /* 95.7.25 by himi */ { queue_ptr--; add = 1; } - bufp += add; - ret += add; - numchars -= add; + if (add) + kbd_buffer_store_event_hold (&inev, hold_quit); break; case MOUSE_EVENT: - add = do_mouse_event (&queue_ptr->Event.MouseEvent, bufp); - bufp += add; - ret += add; - numchars -= add; + add = do_mouse_event (&queue_ptr->Event.MouseEvent, &inev); + if (add) + kbd_buffer_store_event_hold (&inev, hold_quit); break; case WINDOW_BUFFER_SIZE_EVENT: @@ -721,3 +724,6 @@ w32_console_read_socket (int sd, struct input_event *bufp, int numchars, UNBLOCK_INPUT; return ret; } + +/* arch-tag: 0bcb39b7-d085-4b85-9070-6750e8c03047 + (do not change this comment) */ diff --git a/src/w32inevt.h b/src/w32inevt.h index 7df989bffd..fb61cb0ef5 100644 --- a/src/w32inevt.h +++ b/src/w32inevt.h @@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA. */ #ifndef EMACS_W32INEVT_H #define EMACS_W32INEVT_H -extern int w32_console_read_socket (int sd, struct input_event *bufp, - int numchars, int expected); +extern int w32_console_read_socket (int sd, int numchars, + struct input_event *hold_quit); extern void w32_console_mouse_position (FRAME_PTR *f, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, @@ -30,3 +30,6 @@ extern void w32_console_mouse_position (FRAME_PTR *f, int insist, unsigned long *time); #endif /* EMACS_W32INEVT_H */ + +/* arch-tag: 7641bd54-199f-4552-8e8a-6a2f5340ef13 + (do not change this comment) */ diff --git a/src/w32menu.c b/src/w32menu.c index 02bd62eb16..5f8f8a4e5e 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -153,7 +153,6 @@ Lisp_Object Vmenu_updating_frame; Lisp_Object Qdebug_on_next_call; extern Lisp_Object Qmenu_bar; -extern Lisp_Object Qmouse_click, Qevent_kind; extern Lisp_Object QCtoggle, QCradio; @@ -2416,3 +2415,6 @@ void globals_of_w32menu () get_menu_item_info = (GetMenuItemInfoA_Proc) GetProcAddress (user32, "GetMenuItemInfoA"); set_menu_item_info = (SetMenuItemInfoA_Proc) GetProcAddress (user32, "SetMenuItemInfoA"); } + +/* arch-tag: 0eaed431-bb4e-4aac-a527-95a1b4f1fed0 + (do not change this comment) */ diff --git a/src/w32proc.c b/src/w32proc.c index 7241784925..edd286e50d 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -2238,3 +2238,6 @@ are supported. Moreover, it slows down `file-attributes' noticeably. */); Vw32_get_true_file_attributes = Qt; } /* end of ntproc.c */ + +/* arch-tag: 23d3a34c-06d2-48a1-833b-ac7609aa5250 + (do not change this comment) */ diff --git a/src/w32reg.c b/src/w32reg.c index 6d3137f1d4..97abbed5d2 100644 --- a/src/w32reg.c +++ b/src/w32reg.c @@ -163,3 +163,6 @@ x_get_string_resource (rdb, name, class) return (w32_get_string_resource (name, class, REG_SZ)); } + +/* arch-tag: 755fce25-42d7-4acb-874f-2fb42336823d + (do not change this comment) */ diff --git a/src/w32select.c b/src/w32select.c index a9cae2a3fe..21f828d1f0 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -479,3 +479,6 @@ set to nil. */); QCLIPBOARD = intern ("CLIPBOARD"); staticpro (&QCLIPBOARD); } + +/* arch-tag: c96e9724-5eb1-4dad-be07-289f092fd2af + (do not change this comment) */ diff --git a/src/w32term.c b/src/w32term.c index 7dad401a13..a9afc99b95 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -248,8 +248,6 @@ static int input_signal_count; extern Lisp_Object Vcommand_line_args, Vsystem_name; -extern Lisp_Object Qface, Qmouse_face; - #ifndef USE_CRT_DLL extern int errno; #endif @@ -569,6 +567,9 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) output_cursor.x, output_cursor.y); x_draw_vertical_border (w); + + draw_window_fringes (w); + UNBLOCK_INPUT; } @@ -653,11 +654,7 @@ x_after_update_window_line (desired_row) xassert (w); if (!desired_row->mode_line_p && !w->pseudo_window_p) - { - BLOCK_INPUT; - draw_row_fringe_bitmaps (w, desired_row); - UNBLOCK_INPUT; - } + desired_row->redraw_fringe_bitmaps_p = 1; /* When a window has disappeared, make sure that no rest of full-width rows stays visible in the internal border. Could @@ -707,34 +704,79 @@ w32_draw_fringe_bitmap (w, row, p) struct frame *f = XFRAME (WINDOW_FRAME (w)); HDC hdc; struct face *face = p->face; + int rowY; hdc = get_frame_dc (f); /* Must clip because of partially visible lines. */ - w32_clip_to_row (w, row, hdc); + rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); + if (p->y < rowY) + { + /* Adjust position of "bottom aligned" bitmap on partially + visible last row. */ + int oldY = row->y; + int oldVH = row->visible_height; + row->visible_height = p->h; + row->y -= rowY - p->y; + w32_clip_to_row (w, row, hdc); + row->y = oldY; + row->visible_height = oldVH; + } + else + w32_clip_to_row (w, row, hdc); - if (p->bx >= 0) + if (p->bx >= 0 && !p->overlay_p) { w32_fill_area (f, hdc, face->background, p->bx, p->by, p->nx, p->ny); } - if (p->which != NO_FRINGE_BITMAP) + if (p->which) { HBITMAP pixmap = fringe_bmp[p->which]; HDC compat_hdc; HANDLE horig_obj; compat_hdc = CreateCompatibleDC (hdc); + SaveDC (hdc); horig_obj = SelectObject (compat_hdc, pixmap); - SetTextColor (hdc, face->background); - SetBkColor (hdc, face->foreground); - BitBlt (hdc, p->x, p->y, p->wd, p->h, - compat_hdc, 0, p->dh, - SRCCOPY); + /* Paint overlays transparently. */ + if (p->overlay_p) + { + HBRUSH h_brush, h_orig_brush; + + SetTextColor (hdc, BLACK_PIX_DEFAULT (f)); + SetBkColor (hdc, WHITE_PIX_DEFAULT (f)); + h_brush = CreateSolidBrush (face->foreground); + h_orig_brush = SelectObject (hdc, h_brush); + + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + DSTINVERT); + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + 0x2E064A); + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + DSTINVERT); + + SelectObject (hdc, h_orig_brush); + DeleteObject (h_brush); + } + else + { + SetTextColor (hdc, face->background); + SetBkColor (hdc, (p->cursor_p + ? f->output_data.w32->cursor_pixel + : face->foreground)); + + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + SRCCOPY); + } SelectObject (compat_hdc, horig_obj); DeleteDC (compat_hdc); @@ -746,6 +788,25 @@ w32_draw_fringe_bitmap (w, row, p) release_frame_dc (f, hdc); } +static void +w32_define_fringe_bitmap (which, bits, h, wd) + int which; + unsigned short *bits; + int h, wd; +{ + fringe_bmp[which] = CreateBitmap (wd, h, 1, 1, bits); +} + +static void +w32_destroy_fringe_bitmap (which) + int which; +{ + if (fringe_bmp[which]) + DeleteObject (fringe_bmp[which]); + fringe_bmp[which] = 0; +} + + /* This is called when starting Emacs and when restarting after suspend. When starting Emacs, no window is mapped. And nothing @@ -1274,9 +1335,9 @@ w32_text_out (s, x, y,chars,nchars) wchar_t * chars; int nchars; { - int charset_dim = w32_font_is_double_byte (s->gc->font) ? 2 : 1; - if (s->gc->font->bdf) - w32_BDF_TextOut (s->gc->font->bdf, s->hdc, + int charset_dim = w32_font_is_double_byte (s->font) ? 2 : 1; + if (s->font->bdf) + w32_BDF_TextOut (s->font->bdf, s->hdc, x, y, (char *) chars, charset_dim, nchars * charset_dim, 0); else if (s->first_glyph->font_type == UNICODE_FONT) @@ -4212,8 +4273,6 @@ static short temp_buffer[100]; This routine is called by the SIGIO handler. We return as soon as there are no more events to be read. - Events representing keys are stored in buffer BUFP, - which can hold up to NUMCHARS characters. We return the number of characters stored into the buffer, thus pretending to be `read'. @@ -4229,11 +4288,10 @@ static short temp_buffer[100]; */ int -w32_read_socket (sd, bufp, numchars, expected) +w32_read_socket (sd, expected, hold_quit) register int sd; - /* register */ struct input_event *bufp; - /* register */ int numchars; int expected; + struct input_event *hold_quit; { int count = 0; int check_visibility = 0; @@ -4253,13 +4311,17 @@ w32_read_socket (sd, bufp, numchars, expected) /* So people can tell when we have read the available input. */ input_signal_count++; - if (numchars <= 0) - abort (); /* Don't think this happens. */ - /* TODO: tool-bars, ghostscript integration, mouse cursors. */ while (get_next_msg (&msg, FALSE)) { + struct input_event inev; + int do_help = 0; + + EVENT_INIT (inev); + inev.kind = NO_EVENT; + inev.arg = Qnil; + switch (msg.msg.message) { case WM_PAINT: @@ -4288,12 +4350,8 @@ w32_read_socket (sd, bufp, numchars, expected) visibility changes properly. */ if (f->iconified) { - bufp->kind = DEICONIFY_EVENT; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp++; - count++; - numchars--; + inev.kind = DEICONIFY_EVENT; + XSETFRAME (inev.frame_or_window, f); } else if (! NILP (Vframe_list) && ! NILP (XCDR (Vframe_list))) @@ -4323,17 +4381,10 @@ w32_read_socket (sd, bufp, numchars, expected) if (f) { - if (numchars == 0) - abort (); - - bufp->kind = LANGUAGE_CHANGE_EVENT; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp->code = msg.msg.wParam; - bufp->modifiers = msg.msg.lParam & 0xffff; - bufp++; - count++; - numchars--; + inev.kind = LANGUAGE_CHANGE_EVENT; + XSETFRAME (inev.frame_or_window, f); + inev.code = msg.msg.wParam; + inev.modifiers = msg.msg.lParam & 0xffff; } break; @@ -4345,22 +4396,18 @@ w32_read_socket (sd, bufp, numchars, expected) { if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) { - dpyinfo->mouse_face_hidden = 1; clear_mouse_face (dpyinfo); + dpyinfo->mouse_face_hidden = 1; } if (temp_index == sizeof temp_buffer / sizeof (short)) temp_index = 0; temp_buffer[temp_index++] = msg.msg.wParam; - bufp->kind = NON_ASCII_KEYSTROKE_EVENT; - bufp->code = msg.msg.wParam; - bufp->modifiers = msg.dwModifiers; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp->timestamp = msg.msg.time; - bufp++; - numchars--; - count++; + inev.kind = NON_ASCII_KEYSTROKE_EVENT; + inev.code = msg.msg.wParam; + inev.modifiers = msg.dwModifiers; + XSETFRAME (inev.frame_or_window, f); + inev.timestamp = msg.msg.time; } break; @@ -4372,22 +4419,18 @@ w32_read_socket (sd, bufp, numchars, expected) { if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) { - dpyinfo->mouse_face_hidden = 1; clear_mouse_face (dpyinfo); + dpyinfo->mouse_face_hidden = 1; } if (temp_index == sizeof temp_buffer / sizeof (short)) temp_index = 0; temp_buffer[temp_index++] = msg.msg.wParam; - bufp->kind = ASCII_KEYSTROKE_EVENT; - bufp->code = msg.msg.wParam; - bufp->modifiers = msg.dwModifiers; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp->timestamp = msg.msg.time; - bufp++; - numchars--; - count++; + inev.kind = ASCII_KEYSTROKE_EVENT; + inev.code = msg.msg.wParam; + inev.modifiers = msg.dwModifiers; + XSETFRAME (inev.frame_or_window, f); + inev.timestamp = msg.msg.time; } break; @@ -4433,13 +4476,10 @@ w32_read_socket (sd, bufp, numchars, expected) iff it is active. */ if (WINDOWP(window) && !EQ (window, last_window) - && !EQ (window, selected_window) - && numchars > 0) + && !EQ (window, selected_window)) { - bufp->kind = SELECT_WINDOW_EVENT; - bufp->frame_or_window = window; - bufp->arg = Qnil; - ++bufp, ++count, --numchars; + inev.kind = SELECT_WINDOW_EVENT; + inev.frame_or_window = window; } last_window=window; @@ -4457,27 +4497,8 @@ w32_read_socket (sd, bufp, numchars, expected) has changed, generate a HELP_EVENT. */ if (help_echo_string != previous_help_echo_string || (!NILP (help_echo_string) && !STRINGP (help_echo_string) && f->mouse_moved)) - { - Lisp_Object frame; - int n; + do_help = 1; - if (help_echo_string == Qnil) - { - help_echo_object = help_echo_window = Qnil; - help_echo_pos = -1; - } - - if (f) - XSETFRAME (frame, f); - else - frame = Qnil; - - any_help_event_p = 1; - n = gen_help_event (bufp, numchars, help_echo_string, frame, - help_echo_window, help_echo_object, - help_echo_pos); - bufp += n, count += n, numchars -= n; - } break; case WM_LBUTTONDOWN: @@ -4491,13 +4512,10 @@ w32_read_socket (sd, bufp, numchars, expected) { /* If we decide we want to generate an event to be seen by the rest of Emacs, we put it here. */ - struct input_event emacs_event; int tool_bar_p = 0; int button; int up; - emacs_event.kind = NO_EVENT; - if (dpyinfo->grabbed && last_mouse_frame && FRAME_LIVE_P (last_mouse_frame)) f = last_mouse_frame; @@ -4506,35 +4524,29 @@ w32_read_socket (sd, bufp, numchars, expected) if (f) { - construct_mouse_click (&emacs_event, &msg, f); + construct_mouse_click (&inev, &msg, f); /* Is this in the tool-bar? */ if (WINDOWP (f->tool_bar_window) && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window))) { Lisp_Object window; - int x = XFASTINT (emacs_event.x); - int y = XFASTINT (emacs_event.y); + int x = XFASTINT (inev.x); + int y = XFASTINT (inev.y); window = window_from_coordinates (f, x, y, 0, 0, 0, 1); if (EQ (window, f->tool_bar_window)) { - w32_handle_tool_bar_click (f, &emacs_event); + w32_handle_tool_bar_click (f, &inev); tool_bar_p = 1; } } - if (!tool_bar_p) - if (!dpyinfo->w32_focus_frame - || f == dpyinfo->w32_focus_frame - && (numchars >= 1)) - { - construct_mouse_click (bufp, &msg, f); - bufp++; - count++; - numchars--; - } + if (tool_bar_p + || (dpyinfo->w32_focus_frame + && f != dpyinfo->w32_focus_frame)) + inev.kind = NO_EVENT; } parse_button (msg.msg.message, HIWORD (msg.msg.wParam), @@ -4572,15 +4584,11 @@ w32_read_socket (sd, bufp, numchars, expected) if (f) { - if ((!dpyinfo->w32_focus_frame - || f == dpyinfo->w32_focus_frame) - && (numchars >= 1)) + if (!dpyinfo->w32_focus_frame + || f == dpyinfo->w32_focus_frame) { /* Emit an Emacs wheel-up/down event. */ - construct_mouse_wheel (bufp, &msg, f); - bufp++; - count++; - numchars--; + construct_mouse_wheel (&inev, &msg, f); } /* Ignore any mouse motion that happened before this event; any subsequent mouse-movement Emacs events @@ -4597,12 +4605,7 @@ w32_read_socket (sd, bufp, numchars, expected) f = x_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) - { - construct_drag_n_drop (bufp, &msg, f); - bufp++; - count++; - numchars--; - } + construct_drag_n_drop (&inev, &msg, f); break; case WM_VSCROLL: @@ -4610,15 +4613,8 @@ w32_read_socket (sd, bufp, numchars, expected) struct scroll_bar *bar = x_window_to_scroll_bar ((HWND)msg.msg.lParam); - if (bar && numchars >= 1) - { - if (w32_scroll_bar_handle_click (bar, &msg, bufp)) - { - bufp++; - count++; - numchars--; - } - } + if (bar) + w32_scroll_bar_handle_click (bar, &msg, &inev); break; } @@ -4694,12 +4690,8 @@ w32_read_socket (sd, bufp, numchars, expected) f->async_visible = 0; f->async_iconified = 1; - bufp->kind = ICONIFY_EVENT; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp++; - count++; - numchars--; + inev.kind = ICONIFY_EVENT; + XSETFRAME (inev.frame_or_window, f); break; case SIZE_MAXIMIZED: @@ -4724,12 +4716,8 @@ w32_read_socket (sd, bufp, numchars, expected) f->left_pos = x; f->top_pos = y; - bufp->kind = DEICONIFY_EVENT; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp++; - count++; - numchars--; + inev.kind = DEICONIFY_EVENT; + XSETFRAME (inev.frame_or_window, f); } else if (! NILP (Vframe_list) && ! NILP (XCDR (Vframe_list))) @@ -4797,16 +4785,7 @@ w32_read_socket (sd, bufp, numchars, expected) Otherwise, the startup message is cleared when the mouse leaves the frame. */ if (any_help_event_p) - { - Lisp_Object frame; - int n; - - XSETFRAME (frame, f); - help_echo_string = Qnil; - n = gen_help_event (bufp, numchars, - Qnil, frame, Qnil, Qnil, 0); - bufp += n, count += n, numchars -= n; - } + do_help = -1; } break; @@ -4856,16 +4835,7 @@ w32_read_socket (sd, bufp, numchars, expected) Otherwise, the startup message is cleared when the mouse leaves the frame. */ if (any_help_event_p) - { - Lisp_Object frame; - int n; - - XSETFRAME (frame, f); - help_echo_string = Qnil; - n = gen_help_event (bufp, numchars, - Qnil, frame, Qnil, Qnil, 0); - bufp += n, count += n, numchars -=n; - } + do_help = -1; } dpyinfo->grabbed = 0; @@ -4877,15 +4847,8 @@ w32_read_socket (sd, bufp, numchars, expected) if (f) { - if (numchars == 0) - abort (); - - bufp->kind = DELETE_WINDOW_EVENT; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp++; - count++; - numchars--; + inev.kind = DELETE_WINDOW_EVENT; + XSETFRAME (inev.frame_or_window, f); } break; @@ -4894,15 +4857,8 @@ w32_read_socket (sd, bufp, numchars, expected) if (f) { - if (numchars == 0) - abort (); - - bufp->kind = MENU_BAR_ACTIVATE_EVENT; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp++; - count++; - numchars--; + inev.kind = MENU_BAR_ACTIVATE_EVENT; + XSETFRAME (inev.frame_or_window, f); } break; @@ -4944,6 +4900,42 @@ w32_read_socket (sd, bufp, numchars, expected) } break; } + + if (inev.kind != NO_EVENT) + { + kbd_buffer_store_event_hold (&inev, hold_quit); + count++; + } + + if (do_help + && !(hold_quit && hold_quit->kind != NO_EVENT)) + { + Lisp_Object frame; + + if (f) + XSETFRAME (frame, f); + else + frame = Qnil; + + if (do_help > 0) + { + if (help_echo_string == Qnil) + { + help_echo_object = help_echo_window = Qnil; + help_echo_pos = -1; + } + + any_help_event_p = 1; + gen_help_event (help_echo_string, frame, help_echo_window, + help_echo_object, help_echo_pos); + } + else + { + help_echo_string = Qnil; + gen_help_event (Qnil, frame, Qnil, Qnil, 0); + } + count++; + } } /* If the focus was just given to an autoraising frame, @@ -5235,6 +5227,9 @@ w32_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, act cursor remains invisible. */ if (w32_use_visible_system_caret) { + /* Call to erase_phys_cursor here seems to use the + wrong values of w->phys_cursor, as they have been + overwritten before this function was called. */ if (w->phys_cursor_type != NO_CURSOR) erase_phys_cursor (w); @@ -5274,6 +5269,14 @@ w32_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, act PostMessage (hwnd, WM_EMACS_TRACK_CARET, 0, 0); } + if (glyph_row->exact_window_width_line_p + && w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA]) + { + glyph_row->cursor_in_fringe_p = 1; + draw_fringe_bitmap (w, glyph_row, 0); + return; + } + switch (cursor_type) { case HOLLOW_BOX_CURSOR: @@ -6369,32 +6372,7 @@ w32_term_init (display_name, xrm_option, resource_name) horizontally reflected compared to how they appear on X, so we need to bitswap and convert to unsigned shorts before creating the bitmaps. */ - { - int i, j; - - for (i = NO_FRINGE_BITMAP + 1; i < MAX_FRINGE_BITMAPS; i++) - { - int h = fringe_bitmaps[i].height; - int wd = fringe_bitmaps[i].width; - unsigned short *w32bits - = (unsigned short *)alloca (h * sizeof (unsigned short)); - unsigned short *wb = w32bits; - unsigned char *bits = fringe_bitmaps[i].bits; - for (j = 0; j < h; j++) - { - static unsigned char swap_nibble[16] - = { 0x0, 0x8, 0x4, 0xc, /* 0000 1000 0100 1100 */ - 0x2, 0xa, 0x6, 0xe, /* 0010 1010 0110 1110 */ - 0x1, 0x9, 0x5, 0xd, /* 0001 1001 0101 1101 */ - 0x3, 0xb, 0x7, 0xf }; /* 0011 1011 0111 1111 */ - - unsigned char b = *bits++; - *wb++ = (unsigned short)((swap_nibble[b & 0xf]<<4) - | (swap_nibble[(b>>4) & 0xf])); - } - fringe_bmp[i] = CreateBitmap (wd, h, 1, 1, w32bits); - } - } + w32_init_fringe (); #ifndef F_SETOWN_BUG #ifdef F_SETOWN @@ -6462,13 +6440,7 @@ x_delete_display (dpyinfo) xfree (dpyinfo->font_table); xfree (dpyinfo->w32_id_name); - /* Destroy row bitmaps. */ - { - int i; - - for (i = NO_FRINGE_BITMAP + 1; i < MAX_FRINGE_BITMAPS; i++) - DeleteObject (fringe_bmp[i]); - } + w32_reset_fringes (); } /* Set up use of W32. */ @@ -6499,6 +6471,8 @@ static struct redisplay_interface w32_redisplay_interface = w32_get_glyph_overhangs, x_fix_overlapping_area, w32_draw_fringe_bitmap, + w32_define_fringe_bitmap, + w32_destroy_fringe_bitmap, w32_per_char_metric, w32_encode_char, NULL, /* w32_compute_glyph_string_overhangs */ @@ -6696,3 +6670,6 @@ the cursor have no effect. */); staticpro (&last_mouse_motion_frame); last_mouse_motion_frame = Qnil; } + +/* arch-tag: 5fa70624-ab86-499c-8a85-473958ee4646 + (do not change this comment) */ diff --git a/src/w32term.h b/src/w32term.h index 269ebf03f0..cf6956c1ef 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -735,3 +735,6 @@ int image_ascent P_ ((struct image *, struct face *)); ? BDF_1D_FONT : BDF_2D_FONT)) typedef DWORD (WINAPI * ClipboardSequence_Proc) (); + +/* arch-tag: f201d05a-1240-4fc5-8ea4-ca24d4ee5671 + (do not change this comment) */ diff --git a/src/w32xfns.c b/src/w32xfns.c index 887320aa74..9f9a64558f 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c @@ -409,3 +409,6 @@ x_sync (f) void *f; { } + +/* arch-tag: 4fab3695-4ad3-4cc6-a2b1-fd2c67dc46be + (do not change this comment) */ diff --git a/src/widget.c b/src/widget.c index eaf8e66e9a..dbf55a34d9 100644 --- a/src/widget.c +++ b/src/widget.c @@ -1016,3 +1016,6 @@ widget_store_internal_border (widget) ew->emacs_frame.internal_border_width = f->internal_border_width; } + +/* arch-tag: 931d28e5-0d59-405a-8325-7d475d0a13d9 + (do not change this comment) */ diff --git a/src/widget.h b/src/widget.h index f941d8648b..c5d4f597ea 100644 --- a/src/widget.h +++ b/src/widget.h @@ -99,3 +99,6 @@ void EmacsFrameSetCharSize P_ ((Widget, int, int)); void widget_store_internal_border P_ ((Widget widget)); #endif /* _EmacsFrame_h */ + +/* arch-tag: 98be17cc-8878-4701-abfa-66f1c04e9cb7 + (do not change this comment) */ diff --git a/src/widgetprv.h b/src/widgetprv.h index d7bec41289..b75ef76902 100644 --- a/src/widgetprv.h +++ b/src/widgetprv.h @@ -77,3 +77,6 @@ extern EmacsFrameClassRec emacsFrameClassRec; /* class pointer */ #endif /* _EmacsFrameP_h */ + +/* arch-tag: 2b579b4c-f697-4f86-b27a-35b7cb1a4a1c + (do not change this comment) */ diff --git a/src/window.c b/src/window.c index fd35ac8a9d..47bbf0806e 100644 --- a/src/window.c +++ b/src/window.c @@ -279,6 +279,7 @@ make_window () p->fringes_outside_margins = Qnil; p->scroll_bar_width = Qnil; p->vertical_scroll_bar_type = Qt; + p->overlay_arrow_bitmap = 0; Vwindow_list = Qnil; return val; @@ -305,7 +306,8 @@ used by that frame. */) } DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, Swindow_minibuffer_p, 0, 1, 0, - doc: /* Returns non-nil if WINDOW is a minibuffer window. */) + doc: /* Returns non-nil if WINDOW is a minibuffer window. +WINDOW defaults to the selected window. */) (window) Lisp_Object window; { @@ -392,6 +394,17 @@ decode_window (window) return XWINDOW (window); } +static struct window * +decode_any_window (window) + register Lisp_Object window; +{ + if (NILP (window)) + return XWINDOW (selected_window); + + CHECK_WINDOW (window); + return XWINDOW (window); +} + DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0, doc: /* Return the buffer that WINDOW is displaying. */) (window) @@ -405,7 +418,7 @@ DEFUN ("window-height", Fwindow_height, Swindow_height, 0, 1, 0, (window) Lisp_Object window; { - return decode_window (window)->total_lines; + return decode_any_window (window)->total_lines; } DEFUN ("window-width", Fwindow_width, Swindow_width, 0, 1, 0, @@ -416,7 +429,7 @@ use (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))). */) (window) Lisp_Object window; { - return make_number (window_box_text_cols (decode_window (window))); + return make_number (window_box_text_cols (decode_any_window (window))); } DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, @@ -489,7 +502,7 @@ To get the edges of the actual text area, use `window-inside-edges'. */) (window) Lisp_Object window; { - register struct window *w = decode_window (window); + register struct window *w = decode_any_window (window); return Fcons (make_number (WINDOW_LEFT_EDGE_COL (w)), Fcons (make_number (WINDOW_TOP_EDGE_LINE (w)), @@ -509,7 +522,7 @@ To get the edges of the actual text area, use `window-inside-pixel-edges'. */) (window) Lisp_Object window; { - register struct window *w = decode_window (window); + register struct window *w = decode_any_window (window); return Fcons (make_number (WINDOW_LEFT_EDGE_X (w)), Fcons (make_number (WINDOW_TOP_EDGE_Y (w)), @@ -528,7 +541,7 @@ display margins, fringes, header line, and/or mode line. */) (window) Lisp_Object window; { - register struct window *w = decode_window (window); + register struct window *w = decode_any_window (window); return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w) + WINDOW_LEFT_MARGIN_COLS (w) @@ -552,7 +565,7 @@ display margins, fringes, header line, and/or mode line. */) (window) Lisp_Object window; { - register struct window *w = decode_window (window); + register struct window *w = decode_any_window (window); return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) + WINDOW_LEFT_MARGIN_WIDTH (w) @@ -632,8 +645,7 @@ coordinates_in_window (w, x, y) scroll bars. */ if (WINDOW_WANTS_MODELINE_P (w) - && *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w) - && *y < bottom_y) + && *y >= bottom_y - CURRENT_MODE_LINE_HEIGHT (w)) { part = ON_MODE_LINE; @@ -662,7 +674,6 @@ coordinates_in_window (w, x, y) } if (WINDOW_WANTS_HEADER_LINE_P (w) - && *y >= top_y && *y < top_y + CURRENT_HEADER_LINE_HEIGHT (w)) { part = ON_HEADER_LINE; @@ -708,7 +719,7 @@ coordinates_in_window (w, x, y) ? (*x >= left_x + WINDOW_LEFT_FRINGE_WIDTH (w)) : (*x < left_x + lmargin_width))) { - *x -= x0; + *x -= left_x; if (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)) *x -= WINDOW_LEFT_FRINGE_WIDTH (w); *y -= top_y; @@ -773,7 +784,7 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\ int x, y; Lisp_Object lx, ly; - CHECK_LIVE_WINDOW (window); + CHECK_WINDOW (window); w = XWINDOW (window); f = XFRAME (w->frame); CHECK_CONS (coordinates); @@ -1831,6 +1842,7 @@ enum window_loop DELETE_BUFFER_WINDOWS, /* Arg is buffer */ GET_LARGEST_WINDOW, UNSHOW_BUFFER, /* Arg is buffer */ + REDISPLAY_BUFFER_WINDOWS, /* Arg is buffer */ CHECK_ALL_WINDOWS }; @@ -2029,6 +2041,17 @@ window_loop (type, obj, mini, frames) } break; + case REDISPLAY_BUFFER_WINDOWS: + if (EQ (w->buffer, obj)) + { + mark_window_display_accurate (window, 0); + w->update_mode_line = Qt; + XBUFFER (obj)->prevent_redisplay_optimizations_p = 1; + ++update_mode_lines; + best_window = window; + } + break; + /* Check for a window that has a killed buffer. */ case CHECK_ALL_WINDOWS: if (! NILP (w->buffer) @@ -2055,6 +2078,7 @@ check_all_windows () DEFUN ("get-lru-window", Fget_lru_window, Sget_lru_window, 0, 1, 0, doc: /* Return the window least recently selected or used for display. +Return a full-width window if possible. If optional argument FRAME is `visible', search all visible frames. If FRAME is 0, search all visible and iconified frames. If FRAME is t, search all frames. @@ -2538,6 +2562,118 @@ adjust_window_margins (w) return 1; } +/* Calculate new sizes for windows in the list FORWARD when the window size + goes from TOTAL to SIZE. TOTAL must be greater than SIZE. + The number of windows in FORWARD is NCHILDREN, and the number that + can shrink is SHRINKABLE. + The minimum size a window can have is MIN_SIZE. + If we are shrinking fixed windows, RESIZE_FIXED_P is non-zero. + If we are shrinking columns, WIDTH_P is non-zero, otherwise we are + shrinking rows. + + This function returns an allocated array of new sizes that the caller + must free. The size -1 means the window is fixed and RESIZE_FIXED_P + is zero. Array index 0 refers to the first window in FORWARD, 1 to + the second, and so on. + + This function tries to keep windows at least at the minimum size + and resize other windows before it resizes any window to zero (i.e. + delete that window). + + Windows are resized proportional to their size, so bigger windows + shrink more than smaller windows. */ +static int * +shrink_windows (total, size, nchildren, shrinkable, + min_size, resize_fixed_p, forward, width_p) + int total, size, nchildren, shrinkable, min_size; + int resize_fixed_p, width_p; + Lisp_Object forward; +{ + int available_resize = 0; + int *new_sizes; + struct window *c; + Lisp_Object child; + int smallest = total; + int total_removed = 0; + int total_shrink = total - size; + int i; + + new_sizes = xmalloc (sizeof (*new_sizes) * nchildren); + + for (i = 0, child = forward; !NILP (child); child = c->next, ++i) + { + int child_size; + + c = XWINDOW (child); + child_size = width_p ? XINT (c->total_cols) : XINT (c->total_lines); + + if (! resize_fixed_p && window_fixed_size_p (c, width_p, 0)) + new_sizes[i] = -1; + else + { + new_sizes[i] = child_size; + if (child_size > min_size) + available_resize += child_size - min_size; + } + } + /* We might need to shrink some windows to zero. Find the smallest + windows and set them to 0 until we can fulfil the new size. */ + + while (shrinkable > 1 && size + available_resize < total) + { + for (i = 0; i < nchildren; ++i) + if (new_sizes[i] > 0 && smallest > new_sizes[i]) + smallest = new_sizes[i]; + + for (i = 0; i < nchildren; ++i) + if (new_sizes[i] == smallest) + { + /* Resize this window down to zero. */ + new_sizes[i] = 0; + if (smallest > min_size) + available_resize -= smallest - min_size; + available_resize += smallest; + --shrinkable; + total_removed += smallest; + + /* Out of for, just remove one window at the time and + check again if we have enough space. */ + break; + } + } + + /* Now, calculate the new sizes. Try to shrink each window + proportional to its size. */ + for (i = 0; i < nchildren; ++i) + { + if (new_sizes[i] > min_size) + { + int to_shrink = total_shrink*new_sizes[i]/total; + if (new_sizes[i] - to_shrink < min_size) + to_shrink = new_sizes[i] - min_size; + new_sizes[i] -= to_shrink; + total_removed += to_shrink; + } + } + + /* Any reminder due to rounding, we just subtract from windows + that are left and still can be shrunk. */ + while (total_shrink > total_removed) + { + for (i = 0; i < nchildren; ++i) + if (new_sizes[i] > min_size) + { + --new_sizes[i]; + ++total_removed; + + /* Out of for, just shrink one window at the time and + check again if we have enough space. */ + break; + } + } + + return new_sizes; +} /* Set WINDOW's height or width to SIZE. WIDTH_P non-zero means set WINDOW's width. Resize WINDOW's children, if any, so that they @@ -2641,6 +2777,7 @@ size_window (window, size, width_p, nodelete_p) int fixed_size, each, extra, n; int resize_fixed_p, nfixed; int last_pos, first_pos, nchildren, total; + int *new_sizes = NULL; /* Determine the fixed-size portion of the this window, and the number of child windows. */ @@ -2665,16 +2802,22 @@ size_window (window, size, width_p, nodelete_p) windows. */ resize_fixed_p = nfixed == nchildren || size < fixed_size; - /* Compute how many lines/columns to add to each child. The + /* Compute how many lines/columns to add/remove to each child. The value of extra takes care of rounding errors. */ n = resize_fixed_p ? nchildren : nchildren - nfixed; - each = (size - total) / n; - extra = (size - total) - n * each; + if (size < total && n > 1) + new_sizes = shrink_windows (total, size, nchildren, n, min_size, + resize_fixed_p, *forward, width_p); + else + { + each = (size - total) / n; + extra = (size - total) - n * each; + } /* Compute new children heights and edge positions. */ first_pos = width_p ? XINT (w->left_col) : XINT (w->top_line); last_pos = first_pos; - for (child = *forward; !NILP (child); child = c->next) + for (n = 0, child = *forward; !NILP (child); child = c->next, ++n) { int new_size, old_size; @@ -2692,7 +2835,7 @@ size_window (window, size, width_p, nodelete_p) /* If this child can be resized, do it. */ if (resize_fixed_p || !window_fixed_size_p (c, width_p, 0)) { - new_size = old_size + each + extra; + new_size = new_sizes ? new_sizes[n] : old_size + each + extra; extra = 0; } @@ -2703,9 +2846,11 @@ size_window (window, size, width_p, nodelete_p) /* Remember the bottom/right edge position of this child; it will be used to set the top/left edge of the next child. */ - last_pos += new_size; + last_pos += new_size; } + if (new_sizes) xfree (new_sizes); + /* We should have covered the parent exactly with child windows. */ xassert (size == last_pos - first_pos); @@ -2853,6 +2998,9 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p) /* This may call adjust_window_margins three times, so temporarily disable window margins. */ + Lisp_Object save_left = w->left_margin_cols; + Lisp_Object save_right = w->right_margin_cols; + w->left_margin_cols = w->right_margin_cols = Qnil; Fset_window_fringes (window, @@ -2863,6 +3011,9 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p) b->scroll_bar_width, b->vertical_scroll_bar_type, Qnil); + w->left_margin_cols = save_left; + w->right_margin_cols = save_right; + Fset_window_margins (window, b->left_margin_cols, b->right_margin_cols); } @@ -3118,9 +3269,10 @@ Returns the window displaying BUFFER. If `display-buffer-reuse-frames' is non-nil, and another frame is currently displaying BUFFER, then simply raise that frame. -The variables `special-display-buffer-names', `special-display-regexps', -`same-window-buffer-names', and `same-window-regexps' customize how certain -buffer names are handled. +The variables `special-display-buffer-names', +`special-display-regexps', `same-window-buffer-names', and +`same-window-regexps' customize how certain buffer names are handled. +The latter two take effect only if NOT-THIS-WINDOW is t. If optional argument FRAME is `visible', search all visible frames. If FRAME is 0, search all visible and iconified frames. @@ -3303,6 +3455,52 @@ displayed. */) return display_buffer_1 (window); } + +DEFUN ("force-window-update", Fforce_window_update, Sforce_window_update, + 0, 1, 0, + doc: /* Force redisplay of all windows. +If optional arg OBJECT is a window, force redisplay of that window only. +If OBJECT is a buffer or buffer name, force redisplay of all windows +displaying that buffer. */) + (object) + Lisp_Object object; +{ + if (NILP (object)) + { + windows_or_buffers_changed++; + update_mode_lines++; + return Qt; + } + + if (WINDOWP (object)) + { + struct window *w = XWINDOW (object); + mark_window_display_accurate (object, 0); + w->update_mode_line = Qt; + if (BUFFERP (w->buffer)) + XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1; + ++update_mode_lines; + return Qt; + } + + if (STRINGP (object)) + object = Fget_buffer (object); + if (BUFFERP (object) && !NILP (XBUFFER (object)->name)) + { + /* Walk all windows looking for buffer, and force update + of each of those windows. */ + + object = window_loop (REDISPLAY_BUFFER_WINDOWS, object, 0, Qvisible); + return NILP (object) ? Qnil : Qt; + } + + /* If nothing suitable was found, just return. + We could signal an error, but this feature will typically be used + asynchronously in timers or process sentinels, so we don't. */ + return Qnil; +} + + void temp_output_buffer_show (buf) register Lisp_Object buf; @@ -5719,38 +5917,32 @@ usage: (save-window-excursion BODY ...) */) DEFUN ("set-window-margins", Fset_window_margins, Sset_window_margins, 2, 3, 0, doc: /* Set width of marginal areas of window WINDOW. -If window is nil, set margins of the currently selected window. -First parameter LEFT-WIDTH specifies the number of character -cells to reserve for the left marginal area. Second parameter -RIGHT-WIDTH does the same for the right marginal area. -A nil width parameter means no margin. */) +If WINDOW is nil, set margins of the currently selected window. +Second arg LEFT-WIDTH specifies the number of character cells to +reserve for the left marginal area. Optional third arg RIGHT-WIDTH +does the same for the right marginal area. A nil width parameter +means no margin. */) (window, left, right) Lisp_Object window, left, right; { struct window *w = decode_window (window); - /* TODO: It doesn't make sense to use FLOATs here, since - the rest of the code assumes they are integers. - So don't allow floats! ++KFS */ + /* Translate negative or zero widths to nil. + Margins that are too wide have to be checked elsewhere. */ if (!NILP (left)) - CHECK_NUMBER_OR_FLOAT (left); - if (!NILP (right)) - CHECK_NUMBER_OR_FLOAT (right); + { + CHECK_NUMBER (left); + if (XINT (left) <= 0) + left = Qnil; + } - /* Check widths < 0 and translate a zero width to nil. - Margins that are too wide have to be checked elsewhere. */ - if ((INTEGERP (left) && XINT (left) < 0) - || (FLOATP (left) && XFLOAT_DATA (left) <= 0)) - XSETFASTINT (left, 0); - if (INTEGERP (left) && XFASTINT (left) == 0) - left = Qnil; - - if ((INTEGERP (right) && XINT (right) < 0) - || (FLOATP (right) && XFLOAT_DATA (right) <= 0)) - XSETFASTINT (right, 0); - if (INTEGERP (right) && XFASTINT (right) == 0) - right = Qnil; + if (!NILP (right)) + { + CHECK_NUMBER (right); + if (XINT (right) <= 0) + right = Qnil; + } if (!EQ (w->left_margin_cols, left) || !EQ (w->right_margin_cols, right)) @@ -5790,15 +5982,17 @@ as nil. */) DEFUN ("set-window-fringes", Fset_window_fringes, Sset_window_fringes, 2, 4, 0, - doc: /* Set width of fringes of window WINDOW. - -If window is nil, set fringes of the currently selected window. -Second parameter LEFT-WIDTH specifies the number of pixels to reserve -for the left fringe. Third parameter RIGHT-WIDTH does the same for -the right fringe. Fourth parameter OUTSIDE-MARGINS non-nil specifies -that fringes are drawn outside of the display margins; by default, fringes -are drawn between display marginal areas and the text area. -A nil width parameter means to use the frame's corresponding fringe width. */) + doc: /* Set the fringe widths of window WINDOW. +If WINDOW is nil, set the fringe widths of the currently selected +window. +Second arg LEFT-WIDTH specifies the number of pixels to reserve for +the left fringe. Optional third arg RIGHT-WIDTH specifies the right +fringe width. If a fringe width arg is nil, that means to use the +frame's default fringe width. Default fringe widths can be set with +the command `set-fringe-style'. +If optional fourth arg OUTSIDE-MARGINS is non-nil, draw the fringes +outside of the display margins. By default, fringes are drawn between +display marginal areas and the text area. */) (window, left, right, outside_margins) Lisp_Object window, left, right, outside_margins; { @@ -5834,9 +6028,7 @@ DEFUN ("window-fringes", Fwindow_fringes, Swindow_fringes, 0, 1, 0, doc: /* Get width of fringes of window WINDOW. If WINDOW is omitted or nil, use the currently selected window. -Value is a list of the form (LEFT-WIDTH RIGHT-WIDTH OUTSIDE-MARGINS). -If a window specific fringe width is not set, its width will be returned -as nil. */) +Value is a list of the form (LEFT-WIDTH RIGHT-WIDTH OUTSIDE-MARGINS). */) (window) Lisp_Object window; { @@ -5861,7 +6053,8 @@ Second parameter WIDTH specifies the pixel width for the scroll bar; this is automatically adjusted to a multiple of the frame column width. Third parameter VERTICAL-TYPE specifies the type of the vertical scroll bar: left, right, or nil. -A width of nil and type of t means to use the frame's corresponding value. */) +If WIDTH is nil, use the frame's scroll-bar width. +If TYPE is t, use the frame's scroll-bar type. */) (window, width, vertical_type, horizontal_type) Lisp_Object window, width, vertical_type, horizontal_type; { @@ -5873,6 +6066,12 @@ A width of nil and type of t means to use the frame's corresponding value. */) if (XINT (width) == 0) vertical_type = Qnil; + if (!(EQ (vertical_type, Qnil) + || EQ (vertical_type, Qleft) + || EQ (vertical_type, Qright) + || EQ (vertical_type, Qt))) + error ("Invalid type of vertical scroll bar"); + if (!EQ (w->scroll_bar_width, width) || !EQ (w->vertical_scroll_bar_type, vertical_type)) { @@ -5896,7 +6095,9 @@ DEFUN ("window-scroll-bars", Fwindow_scroll_bars, Swindow_scroll_bars, 0, 1, 0, doc: /* Get width and type of scroll bars of window WINDOW. If WINDOW is omitted or nil, use the currently selected window. -Value is a list of the form (WIDTH COLS VERTICAL-TYPE HORIZONTAL-TYPE). */) +Value is a list of the form (WIDTH COLS VERTICAL-TYPE HORIZONTAL-TYPE). +If WIDTH is nil or TYPE is t, the window is using the frame's corresponding +value. */) (window) Lisp_Object window; { @@ -6310,6 +6511,11 @@ In the latter case, FUNCTION is called with BUFFER as the first argument, followed by OTHER-ARGS--it can display BUFFER in any way it likes. All this is done by the function found in `special-display-function'. +If the specified frame parameters include (same-buffer . t), the +buffer is displayed in the currently selected window. Otherwise, if +they include (same-frame . t), the buffer is displayed in a new window +in the currently selected frame. + If this variable appears \"not to work\", because you add a name to it but that buffer still appears in the selected window, look at the values of `same-window-buffer-names' and `same-window-regexps'. @@ -6330,6 +6536,11 @@ In the latter case, FUNCTION is called with the buffer as first argument, followed by OTHER-ARGS--it can display the buffer in any way it likes. All this is done by the function found in `special-display-function'. +If the specified frame parameters include (same-buffer . t), the +buffer is displayed in the currently selected window. Otherwise, if +they include (same-frame . t), the buffer is displayed in a new window +in the currently selected frame. + If this variable appears \"not to work\", because you add a regexp to it but the matching buffers still appear in the selected window, look at the values of `same-window-buffer-names' and `same-window-regexps'. @@ -6462,6 +6673,7 @@ This variable automatically becomes buffer-local when set. */); defsubr (&Sspecial_display_p); defsubr (&Ssame_window_p); defsubr (&Sdisplay_buffer); + defsubr (&Sforce_window_update); defsubr (&Ssplit_window); defsubr (&Senlarge_window); defsubr (&Sshrink_window); @@ -6510,3 +6722,6 @@ keys_of_window () initial_define_key (global_map, Ctl('L'), "recenter"); initial_define_key (meta_map, 'r', "move-to-window-line"); } + +/* arch-tag: 90a9c576-0590-48f1-a5f1-6c96a0452d9f + (do not change this comment) */ diff --git a/src/window.h b/src/window.h index cfb1b349d8..c665e9921c 100644 --- a/src/window.h +++ b/src/window.h @@ -254,6 +254,9 @@ struct window /* This is handy for undrawing the cursor. */ int phys_cursor_ascent, phys_cursor_height; + /* Alternate overlay-arrow-bitmap in this window. */ + int overlay_arrow_bitmap; + /* Non-zero means the cursor is currently displayed. This can be set to zero by functions overpainting the cursor image. */ unsigned phys_cursor_on_p : 1; @@ -892,3 +895,6 @@ extern void keys_of_window P_ ((void)); extern int window_box_text_cols P_ ((struct window *w)); #endif /* not WINDOW_H_INCLUDED */ + +/* arch-tag: d4a6942f-e433-4ffe-ac10-2c3574f28577 + (do not change this comment) */ diff --git a/src/xdisp.c b/src/xdisp.c index 73ab892d17..6e3fae7537 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1,5 +1,5 @@ /* Display generation from window structure and buffer text. - Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03 + Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03,04 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -243,6 +243,9 @@ Lisp_Object Qbuffer_position, Qposition, Qobject; /* Cursor shapes */ Lisp_Object Qbar, Qhbar, Qbox, Qhollow; +/* Pointer shapes */ +Lisp_Object Qarrow, Qhand, Qtext; + Lisp_Object Qrisky_local_variable; /* Holds the list (error). */ @@ -291,21 +294,44 @@ int inhibit_eval_during_redisplay; /* Names of text properties relevant for redisplay. */ -Lisp_Object Qdisplay, Qrelative_width, Qalign_to; +Lisp_Object Qdisplay; extern Lisp_Object Qface, Qinvisible, Qwidth; /* Symbols used in text property values. */ +Lisp_Object Vdisplay_pixels_per_inch; Lisp_Object Qspace, QCalign_to, QCrelative_width, QCrelative_height; Lisp_Object Qleft_margin, Qright_margin, Qspace_width, Qraise; -Lisp_Object Qmargin; +Lisp_Object Qcenter; +Lisp_Object Qmargin, Qpointer; extern Lisp_Object Qheight; extern Lisp_Object QCwidth, QCheight, QCascent; +extern Lisp_Object Qscroll_bar; /* Non-nil means highlight trailing whitespace. */ Lisp_Object Vshow_trailing_whitespace; +#ifdef HAVE_WINDOW_SYSTEM +extern Lisp_Object Voverflow_newline_into_fringe; + +/* Test if overflow newline into fringe. Called with iterator IT + at or past right window margin, and with IT->current_x set. */ + +#define IT_OVERFLOW_NEWLINE_INTO_FRINGE(it) \ + (!NILP (Voverflow_newline_into_fringe) \ + && FRAME_WINDOW_P (it->f) \ + && WINDOW_RIGHT_FRINGE_WIDTH (it->w) > 0 \ + && it->current_x == it->last_visible_x) + +#endif /* HAVE_WINDOW_SYSTEM */ + +/* Non-nil means show the text cursor in void text areas + i.e. in blank areas after eol and eob. This used to be + the default in 21.3. */ + +Lisp_Object Vvoid_text_area_pointer; + /* Name of the face used to highlight trailing whitespace. */ Lisp_Object Qtrailing_whitespace; @@ -315,6 +341,10 @@ Lisp_Object Qtrailing_whitespace; Lisp_Object Qimage; +/* The image map types. */ +Lisp_Object QCmap, QCpointer; +Lisp_Object Qrect, Qcircle, Qpoly; + /* Non-zero means print newline to stdout before next mini-buffer message. */ @@ -375,6 +405,13 @@ int multiple_frames; Lisp_Object Vglobal_mode_string; + +/* List of variables (symbols) which hold markers for overlay arrows. + The symbols on this list are examined during redisplay to determine + where to display overlay arrows. */ + +Lisp_Object Voverlay_arrow_variable_list; + /* Marker for where to display an arrow on top of the buffer text. */ Lisp_Object Voverlay_arrow_position; @@ -383,11 +420,17 @@ Lisp_Object Voverlay_arrow_position; Lisp_Object Voverlay_arrow_string; -/* Values of those variables at last redisplay. However, if - Voverlay_arrow_position is a marker, last_arrow_position is its +/* Values of those variables at last redisplay are stored as + properties on `overlay-arrow-position' symbol. However, if + Voverlay_arrow_position is a marker, last-arrow-position is its numerical position. */ -static Lisp_Object last_arrow_position, last_arrow_string; +Lisp_Object Qlast_arrow_position, Qlast_arrow_string; + +/* Alternative overlay-arrow-string and overlay-arrow-bitmap + properties on a symbol in overlay-arrow-variable-list. */ + +Lisp_Object Qoverlay_arrow_string, Qoverlay_arrow_bitmap; /* Like mode-line-format, but for the title bar on a visible frame. */ @@ -775,6 +818,7 @@ static int invisible_text_between_p P_ ((struct it *, int, int)); static int next_element_from_ellipsis P_ ((struct it *)); static void pint2str P_ ((char *, int, int)); +static void pint2hrstr P_ ((char *, int, int)); static struct text_pos run_window_scroll_functions P_ ((Lisp_Object, struct text_pos)); static void reconsider_clip_changes P_ ((struct window *, struct buffer *)); @@ -805,10 +849,11 @@ static struct text_pos display_prop_end P_ ((struct it *, Lisp_Object, static int compute_window_start_on_continuation_line P_ ((struct window *)); static Lisp_Object safe_eval_handler P_ ((Lisp_Object)); static void insert_left_trunc_glyphs P_ ((struct it *)); -static struct glyph_row *get_overlay_arrow_glyph_row P_ ((struct window *)); +static struct glyph_row *get_overlay_arrow_glyph_row P_ ((struct window *, + Lisp_Object)); static void extend_face_to_end_of_line P_ ((struct it *)); static int append_space P_ ((struct it *, int)); -static int make_cursor_line_fully_visible P_ ((struct window *)); +static int make_cursor_line_fully_visible P_ ((struct window *, int)); static int try_scrolling P_ ((Lisp_Object, int, EMACS_INT, EMACS_INT, int, int)); static int try_cursor_movement P_ ((Lisp_Object, struct text_pos, int *)); static int trailing_whitespace_p P_ ((int)); @@ -816,6 +861,7 @@ static int message_log_check_duplicate P_ ((int, int, int, int)); static void push_it P_ ((struct it *)); static void pop_it P_ ((struct it *)); static void sync_frame_with_window_matrix_rows P_ ((struct window *)); +static void select_frame_for_redisplay P_ ((Lisp_Object)); static void redisplay_internal P_ ((int)); static int echo_area_display P_ ((int)); static void redisplay_windows P_ ((Lisp_Object)); @@ -1540,6 +1586,10 @@ glyph_to_pixel_coords (w, hpos, vpos, frame_x, frame_y) ++glyph; } + /* If first glyph is partially visible, its first visible position is still 0. */ + if (hpos < 0) + hpos = 0; + success_p = 1; } else @@ -1571,11 +1621,10 @@ glyph_to_pixel_coords (w, hpos, vpos, frame_x, frame_y) date. */ static struct glyph * -x_y_to_hpos_vpos (w, x, y, hpos, vpos, area, buffer_only_p) +x_y_to_hpos_vpos (w, x, y, hpos, vpos, dx, dy, area) struct window *w; int x, y; - int *hpos, *vpos, *area; - int buffer_only_p; + int *hpos, *vpos, *dx, *dy, *area; { struct glyph *glyph, *end; struct glyph_row *row = NULL; @@ -1614,7 +1663,7 @@ x_y_to_hpos_vpos (w, x, y, hpos, vpos, area, buffer_only_p) else if (x < window_box_right_offset (w, TEXT_AREA)) { *area = TEXT_AREA; - x0 = window_box_left_offset (w, TEXT_AREA); + x0 = window_box_left_offset (w, TEXT_AREA) + min (row->x, 0); } else { @@ -1626,23 +1675,22 @@ x_y_to_hpos_vpos (w, x, y, hpos, vpos, area, buffer_only_p) /* Find glyph containing X. */ glyph = row->glyphs[*area]; end = glyph + row->used[*area]; - while (glyph < end) + x -= x0; + while (glyph < end && x >= glyph->pixel_width) { - if (x < x0 + glyph->pixel_width) - { - if (w->pseudo_window_p) - break; - else if (!buffer_only_p || BUFFERP (glyph->object)) - break; - } - - x0 += glyph->pixel_width; + x -= glyph->pixel_width; ++glyph; } if (glyph == end) return NULL; + if (dx) + { + *dx = x; + *dy = y - (row->y + row->ascent - glyph->ascent); + } + *hpos = glyph - row->glyphs[*area]; return glyph; } @@ -1730,20 +1778,29 @@ get_glyph_string_clip_rect (s, nr) r.y = WINDOW_TO_FRAME_PIXEL_Y (s->w, r.y); -#ifdef HAVE_NTGUI - /* ++KFS: From W32 port, but it looks ok for all platforms to me. */ /* If drawing the cursor, don't let glyph draw outside its advertised boundaries. Cleartype does this under some circumstances. */ if (s->hl == DRAW_CURSOR) { + struct glyph *glyph = s->first_glyph; + int height; + if (s->x > r.x) { r.width -= s->x - r.x; r.x = s->x; } - r.width = min (r.width, s->first_glyph->pixel_width); + r.width = min (r.width, glyph->pixel_width); + + /* Don't draw cursor glyph taller than our actual glyph. */ + height = max (FRAME_LINE_HEIGHT (s->f), glyph->ascent + glyph->descent); + if (height < r.height) + { + int max_y = r.y + r.height; + r.y = min (max_y, s->ybase + glyph->descent - height); + r.height = min (max_y - r.y, height); + } } -#endif #ifdef CONVERT_FROM_XRECT CONVERT_FROM_XRECT (r, *nr); @@ -1866,10 +1923,14 @@ check_it (it) xassert (STRINGP (it->string)); xassert (IT_STRING_CHARPOS (*it) >= 0); } - else if (it->method == next_element_from_buffer) + else { - /* Check that character and byte positions agree. */ - xassert (IT_CHARPOS (*it) == BYTE_TO_CHAR (IT_BYTEPOS (*it))); + xassert (IT_STRING_CHARPOS (*it) < 0); + if (it->method == next_element_from_buffer) + { + /* Check that character and byte positions agree. */ + xassert (IT_CHARPOS (*it) == BYTE_TO_CHAR (IT_BYTEPOS (*it))); + } } if (it->dpvec) @@ -1982,6 +2043,8 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id) it->current.overlay_string_index = -1; it->current.dpvec_index = -1; it->base_face_id = base_face_id; + it->string = Qnil; + IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = -1; /* The window in which we iterate over current_buffer: */ XSETWINDOW (it->window, w); @@ -2002,11 +2065,7 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id) attribute changes of named faces, recompute them. When running in batch mode, the face cache of Vterminal_frame is null. If we happen to get called, make a dummy face cache. */ - if ( -#ifndef WINDOWSNT - noninteractive && -#endif - FRAME_FACE_CACHE (it->f) == NULL) + if (noninteractive && FRAME_FACE_CACHE (it->f) == NULL) init_frame_faces (it->f); if (FRAME_FACE_CACHE (it->f)->used == 0) recompute_basic_faces (it->f); @@ -2185,6 +2244,8 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id) else IT_BYTEPOS (*it) = bytepos; + it->start = it->current; + /* Compute faces etc. */ reseat (it, it->current.pos, 1); } @@ -2206,6 +2267,7 @@ start_display (it, w, pos) row = w->desired_matrix->rows + first_vpos; init_iterator (it, w, CHARPOS (pos), BYTEPOS (pos), row, DEFAULT_FACE_ID); + it->first_vpos = first_vpos; if (!it->truncate_lines_p) { @@ -2447,6 +2509,7 @@ init_to_row_start (it, w, row) struct glyph_row *row; { init_from_display_pos (it, w, &row->start); + it->start = row->start; it->continuation_lines_width = row->continuation_lines_width; CHECK_IT (it); } @@ -3240,6 +3303,8 @@ handle_display_prop (it) && !EQ (XCAR (prop), Qraise) /* Marginal area specifications. */ && !(CONSP (XCAR (prop)) && EQ (XCAR (XCAR (prop)), Qmargin)) + && !EQ (XCAR (prop), Qleft_fringe) + && !EQ (XCAR (prop), Qright_fringe) && !NILP (XCAR (prop))) { for (; CONSP (prop); prop = XCDR (prop)) @@ -3464,6 +3529,64 @@ handle_single_display_prop (it, prop, object, position, text properties change there. */ it->stop_charpos = position->charpos; + if (CONSP (prop) + && (EQ (XCAR (prop), Qleft_fringe) + || EQ (XCAR (prop), Qright_fringe)) + && CONSP (XCDR (prop))) + { + unsigned face_id = DEFAULT_FACE_ID; + + /* Save current settings of IT so that we can restore them + when we are finished with the glyph property value. */ + + /* `(left-fringe BITMAP FACE)'. */ + if (FRAME_TERMCAP_P (it->f) || FRAME_MSDOS_P (it->f)) + return 0; + +#ifdef HAVE_WINDOW_SYSTEM + value = XCAR (XCDR (prop)); + if (!NUMBERP (value) + || !valid_fringe_bitmap_id_p (XINT (value))) + return 0; + + if (CONSP (XCDR (XCDR (prop)))) + { + Lisp_Object face_name = XCAR (XCDR (XCDR (prop))); + + face_id = lookup_named_face (it->f, face_name); + if (face_id < 0) + return 0; + } + + push_it (it); + + it->area = TEXT_AREA; + it->what = IT_IMAGE; + it->image_id = -1; /* no image */ + it->position = start_pos; + it->object = NILP (object) ? it->w->buffer : object; + it->method = next_element_from_image; + it->face_id = face_id; + + /* Say that we haven't consumed the characters with + `display' property yet. The call to pop_it in + set_iterator_to_next will clean this up. */ + *position = start_pos; + + if (EQ (XCAR (prop), Qleft_fringe)) + { + it->left_user_fringe_bitmap = XINT (value); + it->left_user_fringe_face_id = face_id; + } + else + { + it->right_user_fringe_bitmap = XINT (value); + it->right_user_fringe_face_id = face_id; + } +#endif /* HAVE_WINDOW_SYSTEM */ + return 1; + } + location = Qunbound; if (CONSP (prop) && CONSP (XCAR (prop))) { @@ -3489,16 +3612,11 @@ handle_single_display_prop (it, prop, object, position, value = prop; } + valid_p = (STRINGP (value) #ifdef HAVE_WINDOW_SYSTEM - if (FRAME_TERMCAP_P (it->f)) - valid_p = STRINGP (value); - else - valid_p = (STRINGP (value) - || (CONSP (value) && EQ (XCAR (value), Qspace)) - || valid_image_p (value)); -#else /* not HAVE_WINDOW_SYSTEM */ - valid_p = STRINGP (value); + || (!FRAME_TERMCAP_P (it->f) && valid_image_p (value)) #endif /* not HAVE_WINDOW_SYSTEM */ + || (CONSP (value) && EQ (XCAR (value), Qspace))); if ((EQ (location, Qleft_margin) || EQ (location, Qright_margin) @@ -5578,15 +5696,18 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) saved_glyph_row = it->glyph_row; it->glyph_row = NULL; +#define BUFFER_POS_REACHED_P() \ + ((op & MOVE_TO_POS) != 0 \ + && BUFFERP (it->object) \ + && IT_CHARPOS (*it) >= to_charpos) + while (1) { int x, i, ascent = 0, descent = 0; /* Stop when ZV or TO_CHARPOS reached. */ if (!get_next_display_element (it) - || ((op & MOVE_TO_POS) != 0 - && BUFFERP (it->object) - && IT_CHARPOS (*it) >= to_charpos)) + || BUFFER_POS_REACHED_P ()) { result = MOVE_POS_MATCH_OR_ZV; break; @@ -5668,7 +5789,25 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) ++it->hpos; it->current_x = new_x; if (i == it->nglyphs - 1) - set_iterator_to_next (it, 1); + { + set_iterator_to_next (it, 1); +#ifdef HAVE_WINDOW_SYSTEM + if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) + { + if (!get_next_display_element (it) + || BUFFER_POS_REACHED_P ()) + { + result = MOVE_POS_MATCH_OR_ZV; + break; + } + if (ITERATOR_AT_END_OF_LINE_P (it)) + { + result = MOVE_NEWLINE_OR_CR; + break; + } + } +#endif /* HAVE_WINDOW_SYSTEM */ + } } else { @@ -5725,11 +5864,29 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) if (it->truncate_lines_p && it->current_x >= it->last_visible_x) { +#ifdef HAVE_WINDOW_SYSTEM + if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) + { + if (!get_next_display_element (it) + || BUFFER_POS_REACHED_P ()) + { + result = MOVE_POS_MATCH_OR_ZV; + break; + } + if (ITERATOR_AT_END_OF_LINE_P (it)) + { + result = MOVE_NEWLINE_OR_CR; + break; + } + } +#endif /* HAVE_WINDOW_SYSTEM */ result = MOVE_LINE_TRUNCATED; break; } } +#undef BUFFER_POS_REACHED_P + /* Restore the iterator settings altered at the beginning of this function. */ it->glyph_row = saved_glyph_row; @@ -7663,7 +7820,10 @@ clear_garbaged_frames () if (FRAME_VISIBLE_P (f) && FRAME_GARBAGED_P (f)) { if (f->resized_p) - Fredraw_frame (frame); + { + Fredraw_frame (frame); + f->force_flush_display_p = 1; + } clear_current_matrices (f); changed_count++; f->garbaged = 0; @@ -8255,7 +8415,7 @@ update_tool_bar (f, save_match_data) int save_match_data; { #ifdef USE_GTK - int do_update = FRAME_EXTERNAL_TOOL_BAR(f); + int do_update = FRAME_EXTERNAL_TOOL_BAR (f); #else int do_update = WINDOWP (f->tool_bar_window) && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)) > 0; @@ -8319,7 +8479,7 @@ update_tool_bar (f, save_match_data) /* Redisplay the tool-bar if we changed it. */ if (! NILP (Fequal (old_tool_bar, f->tool_bar_items))) w->update_mode_line = Qt; - + UNGCPRO; unbind_to (count, Qnil); @@ -8376,7 +8536,7 @@ build_desired_tool_bar_string (f) int enabled_p = !NILP (PROP (TOOL_BAR_ITEM_ENABLED_P)); int selected_p = !NILP (PROP (TOOL_BAR_ITEM_SELECTED_P)); int hmargin, vmargin, relief, idx, end; - extern Lisp_Object QCrelief, QCmargin, QCconversion, Qimage; + extern Lisp_Object QCrelief, QCmargin, QCconversion; /* If image is a vector, choose the image according to the button state. */ @@ -8652,7 +8812,7 @@ redisplay_tool_bar (f) int change_height_p = 0; #ifdef USE_GTK - if (FRAME_EXTERNAL_TOOL_BAR(f)) + if (FRAME_EXTERNAL_TOOL_BAR (f)) update_frame_tool_bar (f); return 0; #endif @@ -8793,7 +8953,7 @@ get_tool_bar_item (f, x, y, glyph, hpos, vpos, prop_idx) int area; /* Find the glyph under X/Y. */ - *glyph = x_y_to_hpos_vpos (w, x, y, hpos, vpos, &area, 0); + *glyph = x_y_to_hpos_vpos (w, x, y, hpos, vpos, 0, 0, &area); if (*glyph == NULL) return -1; @@ -8977,283 +9137,6 @@ note_tool_bar_highlight (f, x, y) -/*********************************************************************** - Fringes - ***********************************************************************/ - -#ifdef HAVE_WINDOW_SYSTEM - -/* An arrow like this: `<-'. */ -static unsigned char left_bits[] = { - 0x18, 0x0c, 0x06, 0x3f, 0x3f, 0x06, 0x0c, 0x18}; - -/* Right truncation arrow bitmap `->'. */ -static unsigned char right_bits[] = { - 0x18, 0x30, 0x60, 0xfc, 0xfc, 0x60, 0x30, 0x18}; - -/* Marker for continued lines. */ -static unsigned char continued_bits[] = { - 0x3c, 0x7c, 0xc0, 0xe4, 0xfc, 0x7c, 0x3c, 0x7c}; - -/* Marker for continuation lines. */ -static unsigned char continuation_bits[] = { - 0x3c, 0x3e, 0x03, 0x27, 0x3f, 0x3e, 0x3c, 0x3e}; - -/* Overlay arrow bitmap. A triangular arrow. */ -static unsigned char ov_bits[] = { - 0x03, 0x0f, 0x1f, 0x3f, 0x3f, 0x1f, 0x0f, 0x03}; - -/* Bitmap drawn to indicate lines not displaying text if - `indicate-empty-lines' is non-nil. */ -static unsigned char zv_bits[] = { - 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, - 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, - 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, - 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, - 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, - 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, - 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, - 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00}; - -struct fringe_bitmap fringe_bitmaps[MAX_FRINGE_BITMAPS] = -{ - { 0, 0, 0, NULL /* NO_FRINGE_BITMAP */ }, - { 8, sizeof (left_bits), 0, left_bits }, - { 8, sizeof (right_bits), 0, right_bits }, - { 8, sizeof (continued_bits), 0, continued_bits }, - { 8, sizeof (continuation_bits), 0, continuation_bits }, - { 8, sizeof (ov_bits), 0, ov_bits }, - { 8, sizeof (zv_bits), 3, zv_bits } -}; - - -/* Draw the bitmap WHICH in one of the left or right fringes of - window W. ROW is the glyph row for which to display the bitmap; it - determines the vertical position at which the bitmap has to be - drawn. */ - -static void -draw_fringe_bitmap (w, row, which, left_p) - struct window *w; - struct glyph_row *row; - enum fringe_bitmap_type which; - int left_p; -{ - struct frame *f = XFRAME (WINDOW_FRAME (w)); - struct draw_fringe_bitmap_params p; - - /* Convert row to frame coordinates. */ - p.y = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); - - p.which = which; - p.wd = fringe_bitmaps[which].width; - - p.h = fringe_bitmaps[which].height; - p.dh = (fringe_bitmaps[which].period - ? (p.y % fringe_bitmaps[which].period) - : 0); - p.h -= p.dh; - /* Clip bitmap if too high. */ - if (p.h > row->height) - p.h = row->height; - - p.face = FACE_FROM_ID (f, FRINGE_FACE_ID); - PREPARE_FACE_FOR_DISPLAY (f, p.face); - - /* Clear left fringe if no bitmap to draw or if bitmap doesn't fill - the fringe. */ - p.bx = -1; - if (left_p) - { - int wd = WINDOW_LEFT_FRINGE_WIDTH (w); - int x = window_box_left (w, (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) - ? LEFT_MARGIN_AREA - : TEXT_AREA)); - if (p.wd > wd) - p.wd = wd; - p.x = x - p.wd - (wd - p.wd) / 2; - - if (p.wd < wd || row->height > p.h) - { - /* If W has a vertical border to its left, don't draw over it. */ - wd -= ((!WINDOW_LEFTMOST_P (w) - && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) - ? 1 : 0); - p.bx = x - wd; - p.nx = wd; - } - } - else - { - int x = window_box_right (w, - (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) - ? RIGHT_MARGIN_AREA - : TEXT_AREA)); - int wd = WINDOW_RIGHT_FRINGE_WIDTH (w); - if (p.wd > wd) - p.wd = wd; - p.x = x + (wd - p.wd) / 2; - /* Clear right fringe if no bitmap to draw of if bitmap doesn't fill - the fringe. */ - if (p.wd < wd || row->height > p.h) - { - p.bx = x; - p.nx = wd; - } - } - - if (p.bx >= 0) - { - int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); - - p.by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, row->y)); - p.ny = row->visible_height; - } - - /* Adjust y to the offset in the row to start drawing the bitmap. */ - p.y += (row->height - p.h) / 2; - - rif->draw_fringe_bitmap (w, row, &p); -} - -/* Draw fringe bitmaps for glyph row ROW on window W. Call this - function with input blocked. */ - -void -draw_row_fringe_bitmaps (w, row) - struct window *w; - struct glyph_row *row; -{ - enum fringe_bitmap_type bitmap; - - xassert (interrupt_input_blocked); - - /* If row is completely invisible, because of vscrolling, we - don't have to draw anything. */ - if (row->visible_height <= 0) - return; - - if (WINDOW_LEFT_FRINGE_WIDTH (w) != 0) - { - /* Decide which bitmap to draw in the left fringe. */ - if (row->overlay_arrow_p) - bitmap = OVERLAY_ARROW_BITMAP; - else if (row->truncated_on_left_p) - bitmap = LEFT_TRUNCATION_BITMAP; - else if (MATRIX_ROW_CONTINUATION_LINE_P (row)) - bitmap = CONTINUATION_LINE_BITMAP; - else if (row->indicate_empty_line_p) - bitmap = ZV_LINE_BITMAP; - else - bitmap = NO_FRINGE_BITMAP; - - draw_fringe_bitmap (w, row, bitmap, 1); - } - - if (WINDOW_RIGHT_FRINGE_WIDTH (w) != 0) - { - /* Decide which bitmap to draw in the right fringe. */ - if (row->truncated_on_right_p) - bitmap = RIGHT_TRUNCATION_BITMAP; - else if (row->continued_p) - bitmap = CONTINUED_LINE_BITMAP; - else if (row->indicate_empty_line_p && WINDOW_LEFT_FRINGE_WIDTH (w) == 0) - bitmap = ZV_LINE_BITMAP; - else - bitmap = NO_FRINGE_BITMAP; - - draw_fringe_bitmap (w, row, bitmap, 0); - } -} - - -/* Compute actual fringe widths */ - -void -compute_fringe_widths (f, redraw) - struct frame *f; - int redraw; -{ - int o_left = FRAME_LEFT_FRINGE_WIDTH (f); - int o_right = FRAME_RIGHT_FRINGE_WIDTH (f); - int o_cols = FRAME_FRINGE_COLS (f); - - Lisp_Object left_fringe = Fassq (Qleft_fringe, f->param_alist); - Lisp_Object right_fringe = Fassq (Qright_fringe, f->param_alist); - int left_fringe_width, right_fringe_width; - - if (!NILP (left_fringe)) - left_fringe = Fcdr (left_fringe); - if (!NILP (right_fringe)) - right_fringe = Fcdr (right_fringe); - - left_fringe_width = ((NILP (left_fringe) || !INTEGERP (left_fringe)) ? 8 : - XINT (left_fringe)); - right_fringe_width = ((NILP (right_fringe) || !INTEGERP (right_fringe)) ? 8 : - XINT (right_fringe)); - - if (left_fringe_width || right_fringe_width) - { - int left_wid = left_fringe_width >= 0 ? left_fringe_width : -left_fringe_width; - int right_wid = right_fringe_width >= 0 ? right_fringe_width : -right_fringe_width; - int conf_wid = left_wid + right_wid; - int font_wid = FRAME_COLUMN_WIDTH (f); - int cols = (left_wid + right_wid + font_wid-1) / font_wid; - int real_wid = cols * font_wid; - if (left_wid && right_wid) - { - if (left_fringe_width < 0) - { - /* Left fringe width is fixed, adjust right fringe if necessary */ - FRAME_LEFT_FRINGE_WIDTH (f) = left_wid; - FRAME_RIGHT_FRINGE_WIDTH (f) = real_wid - left_wid; - } - else if (right_fringe_width < 0) - { - /* Right fringe width is fixed, adjust left fringe if necessary */ - FRAME_LEFT_FRINGE_WIDTH (f) = real_wid - right_wid; - FRAME_RIGHT_FRINGE_WIDTH (f) = right_wid; - } - else - { - /* Adjust both fringes with an equal amount. - Note that we are doing integer arithmetic here, so don't - lose a pixel if the total width is an odd number. */ - int fill = real_wid - conf_wid; - FRAME_LEFT_FRINGE_WIDTH (f) = left_wid + fill/2; - FRAME_RIGHT_FRINGE_WIDTH (f) = right_wid + fill - fill/2; - } - } - else if (left_fringe_width) - { - FRAME_LEFT_FRINGE_WIDTH (f) = real_wid; - FRAME_RIGHT_FRINGE_WIDTH (f) = 0; - } - else - { - FRAME_LEFT_FRINGE_WIDTH (f) = 0; - FRAME_RIGHT_FRINGE_WIDTH (f) = real_wid; - } - FRAME_FRINGE_COLS (f) = cols; - } - else - { - FRAME_LEFT_FRINGE_WIDTH (f) = 0; - FRAME_RIGHT_FRINGE_WIDTH (f) = 0; - FRAME_FRINGE_COLS (f) = 0; - } - - if (redraw && FRAME_VISIBLE_P (f)) - if (o_left != FRAME_LEFT_FRINGE_WIDTH (f) || - o_right != FRAME_RIGHT_FRINGE_WIDTH (f) || - o_cols != FRAME_FRINGE_COLS (f)) - redraw_frame (f); -} - -#endif /* HAVE_WINDOW_SYSTEM */ - - - /************************************************************************ Horizontal scrolling ************************************************************************/ @@ -9354,7 +9237,10 @@ hscroll_window_tree (window) /* Position cursor in window. */ if (!hscroll_relative_p && hscroll_step_abs == 0) - hscroll = max (0, it.current_x - text_area_width / 2) + hscroll = max (0, (it.current_x + - (ITERATOR_AT_END_OF_LINE_P (&it) + ? (text_area_width - 4 * FRAME_COLUMN_WIDTH (it.f)) + : (text_area_width / 2)))) / FRAME_COLUMN_WIDTH (it.f); else if (w->cursor.x >= text_area_width - h_margin) { @@ -9563,6 +9449,153 @@ redisplay () } +static Lisp_Object +overlay_arrow_string_or_property (var, pbitmap) + Lisp_Object var; + int *pbitmap; +{ + Lisp_Object pstr = Fget (var, Qoverlay_arrow_string); + Lisp_Object bitmap; + + if (pbitmap) + { + *pbitmap = 0; + if (bitmap = Fget (var, Qoverlay_arrow_bitmap), INTEGERP (bitmap)) + *pbitmap = XINT (bitmap); + } + + if (!NILP (pstr)) + return pstr; + return Voverlay_arrow_string; +} + +/* Return 1 if there are any overlay-arrows in current_buffer. */ +static int +overlay_arrow_in_current_buffer_p () +{ + Lisp_Object vlist; + + for (vlist = Voverlay_arrow_variable_list; + CONSP (vlist); + vlist = XCDR (vlist)) + { + Lisp_Object var = XCAR (vlist); + Lisp_Object val; + + if (!SYMBOLP (var)) + continue; + val = find_symbol_value (var); + if (MARKERP (val) + && current_buffer == XMARKER (val)->buffer) + return 1; + } + return 0; +} + + +/* Return 1 if any overlay_arrows have moved or overlay-arrow-string + has changed. */ + +static int +overlay_arrows_changed_p () +{ + Lisp_Object vlist; + + for (vlist = Voverlay_arrow_variable_list; + CONSP (vlist); + vlist = XCDR (vlist)) + { + Lisp_Object var = XCAR (vlist); + Lisp_Object val, pstr; + + if (!SYMBOLP (var)) + continue; + val = find_symbol_value (var); + if (!MARKERP (val)) + continue; + if (! EQ (COERCE_MARKER (val), + Fget (var, Qlast_arrow_position)) + || ! (pstr = overlay_arrow_string_or_property (var, 0), + EQ (pstr, Fget (var, Qlast_arrow_string)))) + return 1; + } + return 0; +} + +/* Mark overlay arrows to be updated on next redisplay. */ + +static void +update_overlay_arrows (up_to_date) + int up_to_date; +{ + Lisp_Object vlist; + + for (vlist = Voverlay_arrow_variable_list; + CONSP (vlist); + vlist = XCDR (vlist)) + { + Lisp_Object var = XCAR (vlist); + + if (!SYMBOLP (var)) + continue; + + if (up_to_date) + { + Lisp_Object val = find_symbol_value (var); + Fput (var, Qlast_arrow_position, + COERCE_MARKER (val)); + Fput (var, Qlast_arrow_string, + overlay_arrow_string_or_property (var, 0)); + } + else if (up_to_date < 0 + || !NILP (Fget (var, Qlast_arrow_position))) + { + Fput (var, Qlast_arrow_position, Qt); + Fput (var, Qlast_arrow_string, Qt); + } + } +} + + +/* Return overlay arrow string at row, or nil. */ + +static Lisp_Object +overlay_arrow_at_row (f, row, pbitmap) + struct frame *f; + struct glyph_row *row; + int *pbitmap; +{ + Lisp_Object vlist; + + for (vlist = Voverlay_arrow_variable_list; + CONSP (vlist); + vlist = XCDR (vlist)) + { + Lisp_Object var = XCAR (vlist); + Lisp_Object val; + + if (!SYMBOLP (var)) + continue; + + val = find_symbol_value (var); + + if (MARKERP (val) + && current_buffer == XMARKER (val)->buffer + && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val))) + { + val = overlay_arrow_string_or_property (var, pbitmap); + if (FRAME_WINDOW_P (f)) + return Qt; + else if (STRINGP (val)) + return val; + break; + } + } + + *pbitmap = 0; + return Qnil; +} + /* Return 1 if point moved out of or into a composition. Otherwise return 0. PREV_BUF and PREV_PT are the last point buffer and position. BUF and PT are the current point buffer and position. */ @@ -9641,16 +9674,54 @@ reconsider_clip_changes (w, b) } } -#define STOP_POLLING \ -do { if (! polling_stopped_here) stop_polling (); \ - polling_stopped_here = 1; } while (0) -#define RESUME_POLLING \ -do { if (polling_stopped_here) start_polling (); \ - polling_stopped_here = 0; } while (0) +/* Select FRAME to forward the values of frame-local variables into C + variables so that the redisplay routines can access those values + directly. */ +static void +select_frame_for_redisplay (frame) + Lisp_Object frame; +{ + Lisp_Object tail, sym, val; + Lisp_Object old = selected_frame; -/* If PRESERVE_ECHO_AREA is nonzero, it means this redisplay is not in + selected_frame = frame; + + for (tail = XFRAME (frame)->param_alist; CONSP (tail); tail = XCDR (tail)) + if (CONSP (XCAR (tail)) + && (sym = XCAR (XCAR (tail)), + SYMBOLP (sym)) + && (sym = indirect_variable (sym), + val = SYMBOL_VALUE (sym), + (BUFFER_LOCAL_VALUEP (val) + || SOME_BUFFER_LOCAL_VALUEP (val))) + && XBUFFER_LOCAL_VALUE (val)->check_frame) + Fsymbol_value (sym); + + for (tail = XFRAME (old)->param_alist; CONSP (tail); tail = XCDR (tail)) + if (CONSP (XCAR (tail)) + && (sym = XCAR (XCAR (tail)), + SYMBOLP (sym)) + && (sym = indirect_variable (sym), + val = SYMBOL_VALUE (sym), + (BUFFER_LOCAL_VALUEP (val) + || SOME_BUFFER_LOCAL_VALUEP (val))) + && XBUFFER_LOCAL_VALUE (val)->check_frame) + Fsymbol_value (sym); +} + + +#define STOP_POLLING \ +do { if (! polling_stopped_here) stop_polling (); \ + polling_stopped_here = 1; } while (0) + +#define RESUME_POLLING \ +do { if (polling_stopped_here) start_polling (); \ + polling_stopped_here = 0; } while (0) + + +/* If PRESERVE_ECHO_AREA is nonzero, it means this redisplay is not in response to any user action; therefore, we should preserve the echo area. (Actually, our caller does that job.) Perhaps in the future avoid recentering windows if it is not necessary; currently that @@ -9706,7 +9777,8 @@ redisplay_internal (preserve_echo_area) /* Record a function that resets redisplaying_p to its old value when we leave this function. */ count = SPECPDL_INDEX (); - record_unwind_protect (unwind_redisplay, make_number (redisplaying_p)); + record_unwind_protect (unwind_redisplay, + Fcons (make_number (redisplaying_p), selected_frame)); ++redisplaying_p; specbind (Qinhibit_free_realized_faces, Qnil); @@ -9803,8 +9875,7 @@ redisplay_internal (preserve_echo_area) /* If specs for an arrow have changed, do thorough redisplay to ensure we remove any arrow that should no longer exist. */ - if (! EQ (COERCE_MARKER (Voverlay_arrow_position), last_arrow_position) - || ! EQ (Voverlay_arrow_string, last_arrow_string)) + if (overlay_arrows_changed_p ()) consider_all_windows_p = windows_or_buffers_changed = 1; /* Normally the message* functions will have already displayed and @@ -10015,6 +10086,9 @@ redisplay_internal (preserve_echo_area) #if GLYPH_DEBUG *w->desired_matrix->method = 0; debug_method_add (w, "optimization 1"); +#endif +#ifdef HAVE_WINDOW_SYSTEM + update_window_fringes (w, 0); #endif goto update; } @@ -10120,6 +10194,11 @@ redisplay_internal (preserve_echo_area) if (FRAME_WINDOW_P (f) || f == sf) { + if (! EQ (frame, selected_frame)) + /* Select the frame, for the sake of frame-local + variables. */ + select_frame_for_redisplay (frame); + #ifdef HAVE_WINDOW_SYSTEM if (clear_face_cache_count % 50 == 0 && FRAME_WINDOW_P (f)) @@ -10180,15 +10259,18 @@ redisplay_internal (preserve_echo_area) } } - /* Do the mark_window_display_accurate after all windows have - been redisplayed because this call resets flags in buffers - which are needed for proper redisplay. */ - for (i = 0; i < n; ++i) + if (!pause) { - struct frame *f = updated[i]; - mark_window_display_accurate (f->root_window, 1); - if (frame_up_to_date_hook) - frame_up_to_date_hook (f); + /* Do the mark_window_display_accurate after all windows have + been redisplayed because this call resets flags in buffers + which are needed for proper redisplay. */ + for (i = 0; i < n; ++i) + { + struct frame *f = updated[i]; + mark_window_display_accurate (f->root_window, 1); + if (frame_up_to_date_hook) + frame_up_to_date_hook (f); + } } } else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf)) @@ -10253,11 +10335,7 @@ redisplay_internal (preserve_echo_area) CHARPOS (this_line_start_pos) = 0; /* Let the overlay arrow be updated the next time. */ - if (!NILP (last_arrow_position)) - { - last_arrow_position = Qt; - last_arrow_string = Qt; - } + update_overlay_arrows (0); /* If we pause after scrolling, some rows in the current matrices of some windows are not valid. */ @@ -10273,8 +10351,8 @@ redisplay_internal (preserve_echo_area) consider_all_windows_p is set. */ mark_window_display_accurate_1 (w, 1); - last_arrow_position = COERCE_MARKER (Voverlay_arrow_position); - last_arrow_string = Voverlay_arrow_string; + /* Say overlay arrows are up to date. */ + update_overlay_arrows (1); if (frame_up_to_date_hook != 0) frame_up_to_date_hook (sf); @@ -10369,13 +10447,20 @@ redisplay_preserve_echo_area (from_where) /* Function registered with record_unwind_protect in redisplay_internal. Reset redisplaying_p to the value it had before redisplay_internal was called, and clear - prevent_freeing_realized_faces_p. */ + prevent_freeing_realized_faces_p. It also selects the previously + selected frame. */ static Lisp_Object -unwind_redisplay (old_redisplaying_p) - Lisp_Object old_redisplaying_p; +unwind_redisplay (val) + Lisp_Object val; { + Lisp_Object old_redisplaying_p, old_frame; + + old_redisplaying_p = XCAR (val); redisplaying_p = XFASTINT (old_redisplaying_p); + old_frame = XCDR (val); + if (! EQ (old_frame, selected_frame)) + select_frame_for_redisplay (old_frame); return Qnil; } @@ -10463,16 +10548,14 @@ mark_window_display_accurate (window, accurate_p) if (accurate_p) { - last_arrow_position = COERCE_MARKER (Voverlay_arrow_position); - last_arrow_string = Voverlay_arrow_string; + update_overlay_arrows (1); } else { /* Force a thorough redisplay the next time by setting last_arrow_position and last_arrow_string to t, which is unequal to any useful value of Voverlay_arrow_... */ - last_arrow_position = Qt; - last_arrow_string = Qt; + update_overlay_arrows (-1); } } @@ -10751,12 +10834,17 @@ run_window_scroll_functions (window, startp) A value of 1 means there is nothing to be done. (Either the line is fully visible, or it cannot be made so, or we cannot tell.) + + If FORCE_P is non-zero, return 0 even if partial visible cursor row + is higher than window. + A value of 0 means the caller should do scrolling as if point had gone off the screen. */ static int -make_cursor_line_fully_visible (w) +make_cursor_line_fully_visible (w, force_p) struct window *w; + int force_p; { struct glyph_matrix *matrix; struct glyph_row *row; @@ -10774,6 +10862,9 @@ make_cursor_line_fully_visible (w) if (!MATRIX_ROW_PARTIALLY_VISIBLE_P (row)) return 1; + if (force_p) + return 0; + /* If the row the cursor is in is taller than the window's height, it's not clear what to do, so do nothing. */ window_height = window_box_height (w); @@ -10870,7 +10961,7 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, int amount_to_scroll = 0; Lisp_Object aggressive; int height; - int end_scroll_margin; + int extra_scroll_margin_lines = last_line_misfit ? 1 : 0; #if GLYPH_DEBUG debug_method_add (w, "try_scrolling"); @@ -10913,11 +11004,13 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, CHARPOS (scroll_margin_pos) = XINT (window_end); BYTEPOS (scroll_margin_pos) = CHAR_TO_BYTE (CHARPOS (scroll_margin_pos)); - end_scroll_margin = this_scroll_margin + !!last_line_misfit; - if (end_scroll_margin) + if (this_scroll_margin || extra_scroll_margin_lines) { start_display (&it, w, scroll_margin_pos); - move_it_vertically (&it, - end_scroll_margin); + if (this_scroll_margin) + move_it_vertically (&it, - this_scroll_margin); + if (extra_scroll_margin_lines) + move_it_by_lines (&it, - extra_scroll_margin_lines, 0); scroll_margin_pos = it.current.pos; } @@ -11052,10 +11145,10 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, /* If cursor ends up on a partially visible line, treat that as being off the bottom of the screen. */ - if (! make_cursor_line_fully_visible (w)) + if (! make_cursor_line_fully_visible (w, extra_scroll_margin_lines <= 1)) { clear_glyph_matrix (w->desired_matrix); - last_line_misfit = 1; + ++extra_scroll_margin_lines; goto too_near_end; } rc = SCROLLING_SUCCESS; @@ -11212,8 +11305,7 @@ try_cursor_movement (window, startp, scroll_step) && INTEGERP (w->window_end_vpos) && XFASTINT (w->window_end_vpos) < w->current_matrix->nrows && (FRAME_WINDOW_P (f) - || !MARKERP (Voverlay_arrow_position) - || current_buffer != XMARKER (Voverlay_arrow_position)->buffer)) + || !overlay_arrow_in_current_buffer_p ())) { int this_scroll_margin; struct glyph_row *row = NULL; @@ -11345,7 +11437,7 @@ try_cursor_movement (window, startp, scroll_step) else { set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); - if (!make_cursor_line_fully_visible (w)) + if (!make_cursor_line_fully_visible (w, 0)) rc = CURSOR_MOVEMENT_MUST_SCROLL; else rc = CURSOR_MOVEMENT_SUCCESS; @@ -11375,7 +11467,7 @@ set_vertical_scroll_bar (w) which reflect the whole buffer size, with special markers indicating narrowing, and scrollbars which reflect only the visible region. - + Note that mini-buffers sometimes aren't displaying any text. */ if (!MINI_WINDOW_P (w) || (w == XWINDOW (minibuf_window) @@ -11387,7 +11479,7 @@ set_vertical_scroll_bar (w) /* I don't think this is guaranteed to be right. For the moment, we'll pretend it is. */ end = BUF_Z (buf) - XFASTINT (w->window_end_pos) - BUF_BEGV (buf); - + if (end < start) end = start; if (whole < (end - start)) @@ -11400,6 +11492,7 @@ set_vertical_scroll_bar (w) set_vertical_scroll_bar_hook (w, end - start, whole, start); } + /* Redisplay leaf window WINDOW. JUST_THIS_ONE_P non-zero means only selected_window is redisplayed. @@ -11422,6 +11515,7 @@ redisplay_window (window, just_this_one_p) struct it it; /* Record it now because it's overwritten. */ int current_matrix_up_to_date_p = 0; + int used_current_matrix_p = 0; /* This is less strict than current_matrix_up_to_date_p. It indictes that the buffer contents and narrowing are unchanged. */ int buffer_unchanged_p = 0; @@ -11612,6 +11706,11 @@ redisplay_window (window, just_this_one_p) MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); if (IT_CHARPOS (it) == PT) w->force_start = Qt; + /* IT may overshoot PT if text at PT is invisible. */ + else if (IT_CHARPOS (it) > PT && CHARPOS (startp) <= PT) + w->force_start = Qt; + + } /* Handle case where place to start displaying has been specified, @@ -11669,7 +11768,7 @@ redisplay_window (window, just_this_one_p) new_vpos = window_box_height (w) / 2; } - if (!make_cursor_line_fully_visible (w)) + if (!make_cursor_line_fully_visible (w, 0)) { /* Point does appear, but on a line partly visible at end of window. Move it back to a fully-visible line. */ @@ -11723,6 +11822,7 @@ redisplay_window (window, just_this_one_p) switch (rc) { case CURSOR_MOVEMENT_SUCCESS: + used_current_matrix_p = 1; goto done; #if 0 /* try_cursor_movement never returns this value. */ @@ -11787,7 +11887,8 @@ redisplay_window (window, just_this_one_p) buffer. */ || !NILP (Vwindow_scroll_functions) || MINI_WINDOW_P (w) - || !try_window_reusing_current_matrix (w)) + || !(used_current_matrix_p = + try_window_reusing_current_matrix (w))) { IF_DEBUG (debug_method_add (w, "1")); try_window (window, startp); @@ -11804,7 +11905,7 @@ redisplay_window (window, just_this_one_p) /* Forget any recorded base line for line number display. */ w->base_line_number = Qnil; - if (!make_cursor_line_fully_visible (w)) + if (!make_cursor_line_fully_visible (w, 1)) { clear_glyph_matrix (w->desired_matrix); last_line_misfit = 1; @@ -11916,7 +12017,8 @@ redisplay_window (window, just_this_one_p) || !NILP (Vwindow_scroll_functions) || !just_this_one_p || MINI_WINDOW_P (w) - || !try_window_reusing_current_matrix (w)) + || !(used_current_matrix_p = + try_window_reusing_current_matrix (w))) try_window (window, startp); /* If new fonts have been loaded (due to fontsets), give up. We @@ -11963,7 +12065,7 @@ redisplay_window (window, just_this_one_p) set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); } - if (!make_cursor_line_fully_visible (w)) + if (!make_cursor_line_fully_visible (w, centering_position > 0)) { /* If vscroll is enabled, disable it and try again. */ if (w->vscroll) @@ -11976,6 +12078,7 @@ redisplay_window (window, just_this_one_p) /* If centering point failed to make the whole line visible, put point at the top instead. That has to make the whole line visible, if it can be done. */ + clear_glyph_matrix (w->desired_matrix); centering_position = 0; goto point_at_top; } @@ -12078,6 +12181,20 @@ redisplay_window (window, just_this_one_p) #endif } +#ifdef HAVE_WINDOW_SYSTEM + if (update_window_fringes (w, 0) + && !just_this_one_p + && (used_current_matrix_p || overlay_arrow_seen) + && !w->pseudo_window_p) + { + update_begin (f); + BLOCK_INPUT; + draw_window_fringes (w); + UNBLOCK_INPUT; + update_end (f); + } +#endif /* HAVE_WINDOW_SYSTEM */ + /* We go to this label, with fonts_changed_p nonzero, if it is necessary to try again using larger glyph matrices. We have to redeem the scroll bar even in this case, @@ -12334,6 +12451,7 @@ try_window_reusing_current_matrix (w) row->visible_height -= min_y - row->y; if (row->y + row->height > max_y) row->visible_height -= row->y + row->height - max_y; + row->redraw_fringe_bitmaps_p = 1; it.current_y += row->height; @@ -12473,7 +12591,6 @@ try_window_reusing_current_matrix (w) if (run.height) { - struct frame *f = XFRAME (WINDOW_FRAME (w)); update_begin (f); rif->update_window_begin_hook (w); rif->clear_window_mouse_face (w); @@ -12494,6 +12611,7 @@ try_window_reusing_current_matrix (w) row->visible_height -= min_y - row->y; if (row->y + row->height > max_y) row->visible_height -= row->y + row->height - max_y; + row->redraw_fringe_bitmaps_p = 1; } /* Scroll the current matrix. */ @@ -12616,7 +12734,8 @@ find_last_unchanged_at_beg_row (w) row is not unchanged because it may be no longer continued. */ && !(MATRIX_ROW_END_CHARPOS (row) == first_changed_pos - && row->continued_p)) + && (row->continued_p + || row->exact_window_width_line_p))) row_found = row; /* Stop if last visible row. */ @@ -12936,8 +13055,7 @@ try_window_id (w) GIVE_UP (10); /* Can use this if overlay arrow position and or string have changed. */ - if (!EQ (last_arrow_position, COERCE_MARKER (Voverlay_arrow_position)) - || !EQ (last_arrow_string, Voverlay_arrow_string)) + if (overlay_arrows_changed_p ()) GIVE_UP (12); @@ -13125,8 +13243,9 @@ try_window_id (w) else { /* There are no reusable lines at the start of the window. - Start displaying in the first line. */ + Start displaying in the first text line. */ start_display (&it, w, start); + it.vpos = it.first_vpos; start_pos = it.current.pos; } @@ -13873,14 +13992,15 @@ usage: (trace-to-stderr STRING &rest OBJECTS) */) arrow. Only used for non-window-redisplay windows. */ static struct glyph_row * -get_overlay_arrow_glyph_row (w) +get_overlay_arrow_glyph_row (w, overlay_arrow_string) struct window *w; + Lisp_Object overlay_arrow_string; { struct frame *f = XFRAME (WINDOW_FRAME (w)); struct buffer *buffer = XBUFFER (w->buffer); struct buffer *old = current_buffer; - const unsigned char *arrow_string = SDATA (Voverlay_arrow_string); - int arrow_len = SCHARS (Voverlay_arrow_string); + const unsigned char *arrow_string = SDATA (overlay_arrow_string); + int arrow_len = SCHARS (overlay_arrow_string); const unsigned char *arrow_end = arrow_string + arrow_len; const unsigned char *p; struct it it; @@ -13907,7 +14027,7 @@ get_overlay_arrow_glyph_row (w) /* Get its face. */ ilisp = make_number (p - arrow_string); - face = Fget_text_property (ilisp, Qface, Voverlay_arrow_string); + face = Fget_text_property (ilisp, Qface, overlay_arrow_string); it.face_id = compute_char_face (f, it.c, face); /* Compute its width, get its glyphs. */ @@ -14346,6 +14466,8 @@ display_line (it) struct it *it; { struct glyph_row *row = it->glyph_row; + int overlay_arrow_bitmap; + Lisp_Object overlay_arrow_string; /* We always start displaying at hpos zero even if hscrolled. */ xassert (it->hpos == 0 && it->current_x == 0); @@ -14361,7 +14483,7 @@ display_line (it) prepare_desired_row (row); row->y = it->current_y; - row->start = it->current; + row->start = it->start; row->continuation_lines_width = it->continuation_lines_width; row->displays_text_p = 1; row->starts_in_middle_of_char_p = it->starts_in_middle_of_char_p; @@ -14404,6 +14526,11 @@ display_line (it) display the cursor there under X. Set the charpos of the first glyph of blank lines not corresponding to any text to -1. */ +#ifdef HAVE_WINDOW_SYSTEM + if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) + row->exact_window_width_line_p = 1; + else +#endif /* HAVE_WINDOW_SYSTEM */ if ((append_space (it, 1) && row->used[TEXT_AREA] == 1) || row->used[TEXT_AREA] == 0) { @@ -14511,7 +14638,26 @@ display_line (it) it->continuation_lines_width += new_x; ++it->hpos; if (i == nglyphs - 1) - set_iterator_to_next (it, 1); + { + set_iterator_to_next (it, 1); +#ifdef HAVE_WINDOW_SYSTEM + if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) + { + if (!get_next_display_element (it)) + { + row->exact_window_width_line_p = 1; + it->continuation_lines_width = 0; + row->continued_p = 0; + row->ends_at_zv_p = 1; + } + else if (ITERATOR_AT_END_OF_LINE_P (it)) + { + row->continued_p = 0; + row->exact_window_width_line_p = 1; + } + } +#endif /* HAVE_WINDOW_SYSTEM */ + } } else if (CHAR_GLYPH_PADDING_P (*glyph) && !FRAME_WINDOW_P (it->f)) @@ -14609,10 +14755,11 @@ display_line (it) it->max_phys_ascent + it->max_phys_descent); /* End of this display line if row is continued. */ - if (row->continued_p) + if (row->continued_p || row->ends_at_zv_p) break; } + at_end_of_line: /* Is this a line end? If yes, we're also done, after making sure that a non-default face is extended up to the right margin of the window. */ @@ -14622,9 +14769,12 @@ display_line (it) row->ends_in_newline_from_string_p = STRINGP (it->object); +#ifdef HAVE_WINDOW_SYSTEM /* Add a space at the end of the line that is used to display the cursor there. */ - append_space (it, 0); + if (!IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) + append_space (it, 0); +#endif /* HAVE_WINDOW_SYSTEM */ /* Extend the face to the end of the line. */ extend_face_to_end_of_line (it); @@ -14665,6 +14815,29 @@ display_line (it) produce_special_glyphs (it, IT_TRUNCATION); } } +#ifdef HAVE_WINDOW_SYSTEM + else + { + /* Don't truncate if we can overflow newline into fringe. */ + if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) + { + if (!get_next_display_element (it)) + { +#ifdef HAVE_WINDOW_SYSTEM + it->continuation_lines_width = 0; + row->ends_at_zv_p = 1; + row->exact_window_width_line_p = 1; + break; +#endif /* HAVE_WINDOW_SYSTEM */ + } + if (ITERATOR_AT_END_OF_LINE_P (it)) + { + row->exact_window_width_line_p = 1; + goto at_end_of_line; + } + } + } +#endif /* HAVE_WINDOW_SYSTEM */ row->truncated_on_right_p = 1; it->continuation_lines_width = 0; @@ -14690,17 +14863,16 @@ display_line (it) mark this glyph row as the one containing the overlay arrow. This is clearly a mess with variable size fonts. It would be better to let it be displayed like cursors under X. */ - if (MARKERP (Voverlay_arrow_position) - && current_buffer == XMARKER (Voverlay_arrow_position)->buffer - && (MATRIX_ROW_START_CHARPOS (row) - == marker_position (Voverlay_arrow_position)) - && STRINGP (Voverlay_arrow_string) - && ! overlay_arrow_seen) + if (! overlay_arrow_seen + && (overlay_arrow_string + = overlay_arrow_at_row (it->f, row, &overlay_arrow_bitmap), + !NILP (overlay_arrow_string))) { /* Overlay arrow in window redisplay is a fringe bitmap. */ if (!FRAME_WINDOW_P (it->f)) { - struct glyph_row *arrow_row = get_overlay_arrow_glyph_row (it->w); + struct glyph_row *arrow_row + = get_overlay_arrow_glyph_row (it->w, overlay_arrow_string); struct glyph *glyph = arrow_row->glyphs[TEXT_AREA]; struct glyph *arrow_end = glyph + arrow_row->used[TEXT_AREA]; struct glyph *p = row->glyphs[TEXT_AREA]; @@ -14724,6 +14896,7 @@ display_line (it) } overlay_arrow_seen = 1; + it->w->overlay_arrow_bitmap = overlay_arrow_bitmap; row->overlay_arrow_p = 1; } @@ -14733,6 +14906,17 @@ display_line (it) /* Remember the position at which this line ends. */ row->end = it->current; + /* Save fringe bitmaps in this row. */ + row->left_user_fringe_bitmap = it->left_user_fringe_bitmap; + row->left_user_fringe_face_id = it->left_user_fringe_face_id; + row->right_user_fringe_bitmap = it->right_user_fringe_bitmap; + row->right_user_fringe_face_id = it->right_user_fringe_face_id; + + it->left_user_fringe_bitmap = 0; + it->left_user_fringe_face_id = 0; + it->right_user_fringe_bitmap = 0; + it->right_user_fringe_face_id = 0; + /* Maybe set the cursor. */ if (it->w->cursor.vpos < 0 && PT >= MATRIX_ROW_START_CHARPOS (row) @@ -14752,6 +14936,7 @@ display_line (it) it->current_y += row->height; ++it->vpos; ++it->glyph_row; + it->start = it->current; return row->displays_text_p; } @@ -14995,6 +15180,8 @@ display_mode_line (w, face_id, format) init_iterator (&it, w, -1, -1, NULL, face_id); prepare_desired_row (it.glyph_row); + it.glyph_row->mode_line_p = 1; + if (! mode_line_inverse_video) /* Force the mode-line to be displayed in the default face. */ it.base_face_id = it.face_id = DEFAULT_FACE_ID; @@ -15011,7 +15198,6 @@ display_mode_line (w, face_id, format) compute_line_metrics (&it); it.glyph_row->full_width_p = 1; - it.glyph_row->mode_line_p = 1; it.glyph_row->continued_p = 0; it.glyph_row->truncated_on_left_p = 0; it.glyph_row->truncated_on_right_p = 0; @@ -15683,6 +15869,117 @@ pint2str (buf, width, d) } } +/* Write a null-terminated, right justified decimal and "human + readable" representation of the nonnegative integer D to BUF using + a minimal field width WIDTH. D should be smaller than 999.5e24. */ + +static const char power_letter[] = + { + 0, /* not used */ + 'k', /* kilo */ + 'M', /* mega */ + 'G', /* giga */ + 'T', /* tera */ + 'P', /* peta */ + 'E', /* exa */ + 'Z', /* zetta */ + 'Y' /* yotta */ + }; + +static void +pint2hrstr (buf, width, d) + char *buf; + int width; + int d; +{ + /* We aim to represent the nonnegative integer D as + QUOTIENT.TENTHS * 10 ^ (3 * EXPONENT). */ + int quotient = d; + int remainder = 0; + /* -1 means: do not use TENTHS. */ + int tenths = -1; + int exponent = 0; + + /* Length of QUOTIENT.TENTHS as a string. */ + int length; + + char * psuffix; + char * p; + + if (1000 <= quotient) + { + /* Scale to the appropriate EXPONENT. */ + do + { + remainder = quotient % 1000; + quotient /= 1000; + exponent++; + } + while (1000 <= quotient); + + /* Round to nearest and decide whether to use TENTHS or not. */ + if (quotient <= 9) + { + tenths = remainder / 100; + if (50 <= remainder % 100) + if (tenths < 9) + tenths++; + else + { + quotient++; + if (quotient == 10) + tenths = -1; + else + tenths = 0; + } + } + else + if (500 <= remainder) + if (quotient < 999) + quotient++; + else + { + quotient = 1; + exponent++; + tenths = 0; + } + } + + /* Calculate the LENGTH of QUOTIENT.TENTHS as a string. */ + if (tenths == -1 && quotient <= 99) + if (quotient <= 9) + length = 1; + else + length = 2; + else + length = 3; + p = psuffix = buf + max (width, length); + + /* Print EXPONENT. */ + if (exponent) + *psuffix++ = power_letter[exponent]; + *psuffix = '\0'; + + /* Print TENTHS. */ + if (tenths >= 0) + { + *--p = '0' + tenths; + *--p = '.'; + } + + /* Print QUOTIENT. */ + do + { + int digit = quotient % 10; + *--p = '0' + digit; + } + while ((quotient /= 10) != 0); + + /* Print leading spaces. */ + while (buf < p) + *--p = ' '; +} + /* Set a mnemonic character for coding_system (Lisp symbol) in BUF. If EOL_FLAG is 1, set also a mnemonic character for end-of-line type of CODING_SYSTEM. Return updated pointer into BUF. */ @@ -15886,6 +16183,20 @@ decode_mode_spec (w, c, field_width, precision, multibyte) obj = b->filename; break; + case 'i': + { + int size = ZV - BEGV; + pint2str (decode_mode_spec_buf, field_width, size); + return decode_mode_spec_buf; + } + + case 'I': + { + int size = ZV - BEGV; + pint2hrstr (decode_mode_spec_buf, field_width, size); + return decode_mode_spec_buf; + } + case 'l': { int startpos = XMARKER (w->start)->charpos; @@ -16503,6 +16814,252 @@ invisible_p (propval, list) return 0; } +/* Calculate a width or height in pixels from a specification using + the following elements: + + SPEC ::= + NUM - a (fractional) multiple of the default font width/height + (NUM) - specifies exactly NUM pixels + UNIT - a fixed number of pixels, see below. + ELEMENT - size of a display element in pixels, see below. + (NUM . SPEC) - equals NUM * SPEC + (+ SPEC SPEC ...) - add pixel values + (- SPEC SPEC ...) - subtract pixel values + (- SPEC) - negate pixel value + + NUM ::= + INT or FLOAT - a number constant + SYMBOL - use symbol's (buffer local) variable binding. + + UNIT ::= + in - pixels per inch *) + mm - pixels per 1/1000 meter *) + cm - pixels per 1/100 meter *) + width - width of current font in pixels. + height - height of current font in pixels. + + *) using the ratio(s) defined in display-pixels-per-inch. + + ELEMENT ::= + + left-fringe - left fringe width in pixels + right-fringe - right fringe width in pixels + + left-margin - left margin width in pixels + right-margin - right margin width in pixels + + scroll-bar - scroll-bar area width in pixels + + Examples: + + Pixels corresponding to 5 inches: + (5 . in) + + Total width of non-text areas on left side of window (if scroll-bar is on left): + '(space :width (+ left-fringe left-margin scroll-bar)) + + Align to first text column (in header line): + '(space :align-to 0) + + Align to middle of text area minus half the width of variable `my-image' + containing a loaded image: + '(space :align-to (0.5 . (- text my-image))) + + Width of left margin minus width of 1 character in the default font: + '(space :width (- left-margin 1)) + + Width of left margin minus width of 2 characters in the current font: + '(space :width (- left-margin (2 . width))) + + Center 1 character over left-margin (in header line): + '(space :align-to (+ left-margin (0.5 . left-margin) -0.5)) + + Different ways to express width of left fringe plus left margin minus one pixel: + '(space :width (- (+ left-fringe left-margin) (1))) + '(space :width (+ left-fringe left-margin (- (1)))) + '(space :width (+ left-fringe left-margin (-1))) + +*/ + +#define NUMVAL(X) \ + ((INTEGERP (X) || FLOATP (X)) \ + ? XFLOATINT (X) \ + : - 1) + +int +calc_pixel_width_or_height (res, it, prop, font, width_p, align_to) + double *res; + struct it *it; + Lisp_Object prop; + void *font; + int width_p, *align_to; +{ + double pixels; + +#define OK_PIXELS(val) ((*res = (double)(val)), 1) +#define OK_ALIGN_TO(val) ((*align_to = (int)(val)), 1) + + if (NILP (prop)) + return OK_PIXELS (0); + + if (SYMBOLP (prop)) + { + if (SCHARS (SYMBOL_NAME (prop)) == 2) + { + char *unit = SDATA (SYMBOL_NAME (prop)); + + if (unit[0] == 'i' && unit[1] == 'n') + pixels = 1.0; + else if (unit[0] == 'm' && unit[1] == 'm') + pixels = 25.4; + else if (unit[0] == 'c' && unit[1] == 'm') + pixels = 2.54; + else + pixels = 0; + if (pixels > 0) + { + double ppi; + if ((ppi = NUMVAL (Vdisplay_pixels_per_inch), ppi > 0) + || (CONSP (Vdisplay_pixels_per_inch) + && (ppi = (width_p + ? NUMVAL (XCAR (Vdisplay_pixels_per_inch)) + : NUMVAL (XCDR (Vdisplay_pixels_per_inch))), + ppi > 0))) + return OK_PIXELS (ppi / pixels); + + return 0; + } + } + +#ifdef HAVE_WINDOW_SYSTEM + if (EQ (prop, Qheight)) + return OK_PIXELS (font ? FONT_HEIGHT ((XFontStruct *)font) : FRAME_LINE_HEIGHT (it->f)); + if (EQ (prop, Qwidth)) + return OK_PIXELS (font ? FONT_WIDTH ((XFontStruct *)font) : FRAME_COLUMN_WIDTH (it->f)); +#else + if (EQ (prop, Qheight) || EQ (prop, Qwidth)) + return OK_PIXELS (1); +#endif + + if (EQ (prop, Qtext)) + return OK_PIXELS (width_p + ? window_box_width (it->w, TEXT_AREA) + : WINDOW_BOX_HEIGHT_NO_MODE_LINE (it->w)); + + if (align_to && *align_to < 0) + { + *res = 0; + if (EQ (prop, Qleft)) + return OK_ALIGN_TO (window_box_left_offset (it->w, TEXT_AREA)); + if (EQ (prop, Qright)) + return OK_ALIGN_TO (window_box_right_offset (it->w, TEXT_AREA)); + if (EQ (prop, Qcenter)) + return OK_ALIGN_TO (window_box_left_offset (it->w, TEXT_AREA) + + window_box_width (it->w, TEXT_AREA) / 2); + if (EQ (prop, Qleft_fringe)) + return OK_ALIGN_TO (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (it->w) + ? WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (it->w) + : window_box_right_offset (it->w, LEFT_MARGIN_AREA)); + if (EQ (prop, Qright_fringe)) + return OK_ALIGN_TO (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (it->w) + ? window_box_right_offset (it->w, RIGHT_MARGIN_AREA) + : window_box_right_offset (it->w, TEXT_AREA)); + if (EQ (prop, Qleft_margin)) + return OK_ALIGN_TO (window_box_left_offset (it->w, LEFT_MARGIN_AREA)); + if (EQ (prop, Qright_margin)) + return OK_ALIGN_TO (window_box_left_offset (it->w, RIGHT_MARGIN_AREA)); + if (EQ (prop, Qscroll_bar)) + return OK_ALIGN_TO (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (it->w) + ? 0 + : (window_box_right_offset (it->w, RIGHT_MARGIN_AREA) + + (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (it->w) + ? WINDOW_RIGHT_FRINGE_WIDTH (it->w) + : 0))); + } + else + { + if (EQ (prop, Qleft_fringe)) + return OK_PIXELS (WINDOW_LEFT_FRINGE_WIDTH (it->w)); + if (EQ (prop, Qright_fringe)) + return OK_PIXELS (WINDOW_RIGHT_FRINGE_WIDTH (it->w)); + if (EQ (prop, Qleft_margin)) + return OK_PIXELS (WINDOW_LEFT_MARGIN_WIDTH (it->w)); + if (EQ (prop, Qright_margin)) + return OK_PIXELS (WINDOW_RIGHT_MARGIN_WIDTH (it->w)); + if (EQ (prop, Qscroll_bar)) + return OK_PIXELS (WINDOW_SCROLL_BAR_AREA_WIDTH (it->w)); + } + + prop = Fbuffer_local_value (prop, it->w->buffer); + } + + if (INTEGERP (prop) || FLOATP (prop)) + { + int base_unit = (width_p + ? FRAME_COLUMN_WIDTH (it->f) + : FRAME_LINE_HEIGHT (it->f)); + return OK_PIXELS (XFLOATINT (prop) * base_unit); + } + + if (CONSP (prop)) + { + Lisp_Object car = XCAR (prop); + Lisp_Object cdr = XCDR (prop); + + if (SYMBOLP (car)) + { +#ifdef HAVE_WINDOW_SYSTEM + if (valid_image_p (prop)) + { + int id = lookup_image (it->f, prop); + struct image *img = IMAGE_FROM_ID (it->f, id); + + return OK_PIXELS (width_p ? img->width : img->height); + } +#endif + if (EQ (car, Qplus) || EQ (car, Qminus)) + { + int first = 1; + double px; + + pixels = 0; + while (CONSP (cdr)) + { + if (!calc_pixel_width_or_height (&px, it, XCAR (cdr), + font, width_p, align_to)) + return 0; + if (first) + pixels = (EQ (car, Qplus) ? px : -px), first = 0; + else + pixels += px; + cdr = XCDR (cdr); + } + if (EQ (car, Qminus)) + pixels = -pixels; + return OK_PIXELS (pixels); + } + + car = Fbuffer_local_value (car, it->w->buffer); + } + + if (INTEGERP (car) || FLOATP (car)) + { + double fact; + pixels = XFLOATINT (car); + if (NILP (cdr)) + return OK_PIXELS (pixels); + if (calc_pixel_width_or_height (&fact, it, cdr, + font, width_p, align_to)) + return OK_PIXELS (pixels * fact); + return 0; + } + + return 0; + } + + return 0; +} + /*********************************************************************** Glyph Display @@ -17573,6 +18130,8 @@ append_glyph (it) glyph->charpos = CHARPOS (it->position); glyph->object = it->object; glyph->pixel_width = it->pixel_width; + glyph->ascent = it->ascent; + glyph->descent = it->descent; glyph->voffset = it->voffset; glyph->type = CHAR_GLYPH; glyph->multibyte_p = it->multibyte_p; @@ -17607,6 +18166,8 @@ append_composite_glyph (it) glyph->charpos = CHARPOS (it->position); glyph->object = it->object; glyph->pixel_width = it->pixel_width; + glyph->ascent = it->ascent; + glyph->descent = it->descent; glyph->voffset = it->voffset; glyph->type = COMPOSITE_GLYPH; glyph->multibyte_p = it->multibyte_p; @@ -17655,21 +18216,44 @@ produce_image_glyph (it) { struct image *img; struct face *face; + int face_ascent, glyph_ascent; xassert (it->what == IT_IMAGE); face = FACE_FROM_ID (it->f, it->face_id); + xassert (face); + /* Make sure X resources of the face is loaded. */ + PREPARE_FACE_FOR_DISPLAY (it->f, face); + + if (it->image_id < 0) + { + /* Fringe bitmap. */ + it->ascent = it->phys_ascent = 0; + it->descent = it->phys_descent = 0; + it->pixel_width = 0; + it->nglyphs = 0; + return; + } + img = IMAGE_FROM_ID (it->f, it->image_id); xassert (img); - - /* Make sure X resources of the face and image are loaded. */ - PREPARE_FACE_FOR_DISPLAY (it->f, face); + /* Make sure X resources of the image is loaded. */ prepare_image_for_display (it->f, img); - it->ascent = it->phys_ascent = image_ascent (img, face); + it->ascent = it->phys_ascent = glyph_ascent = image_ascent (img, face); it->descent = it->phys_descent = img->height + 2 * img->vmargin - it->ascent; it->pixel_width = img->width + 2 * img->hmargin; + /* It's quite possible for images to have an ascent greater than + their height, so don't get confused in that case. */ + if (it->descent < 0) + it->descent = 0; + + /* If this glyph is alone on the last line, adjust it.ascent to minimum row ascent. */ + face_ascent = face->font ? FONT_BASE (face->font) : FRAME_BASELINE_OFFSET (it->f); + if (face_ascent > it->ascent) + it->ascent = it->phys_ascent = face_ascent; + it->nglyphs = 1; if (face->box != FACE_NO_BOX) @@ -17699,6 +18283,8 @@ produce_image_glyph (it) glyph->charpos = CHARPOS (it->position); glyph->object = it->object; glyph->pixel_width = it->pixel_width; + glyph->ascent = glyph_ascent; + glyph->descent = it->descent; glyph->voffset = it->voffset; glyph->type = IMAGE_GLYPH; glyph->multibyte_p = it->multibyte_p; @@ -17718,20 +18304,19 @@ produce_image_glyph (it) /* Append a stretch glyph to IT->glyph_row. OBJECT is the source of the glyph, WIDTH and HEIGHT are the width and height of the - stretch. ASCENT is the percentage/100 of HEIGHT to use for the - ascent of the glyph (0 <= ASCENT <= 1). */ + stretch. ASCENT is the ascent of the glyph (0 <= ASCENT <= HEIGHT). */ static void append_stretch_glyph (it, object, width, height, ascent) struct it *it; Lisp_Object object; int width, height; - double ascent; + int ascent; { struct glyph *glyph; enum glyph_row_area area = it->area; - xassert (ascent >= 0 && ascent <= 1); + xassert (ascent >= 0 && ascent <= height); glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; if (glyph < it->glyph_row->glyphs[area + 1]) @@ -17739,6 +18324,8 @@ append_stretch_glyph (it, object, width, height, ascent) glyph->charpos = CHARPOS (it->position); glyph->object = object; glyph->pixel_width = width; + glyph->ascent = ascent; + glyph->descent = height - ascent; glyph->voffset = it->voffset; glyph->type = STRETCH_GLYPH; glyph->multibyte_p = it->multibyte_p; @@ -17748,7 +18335,7 @@ append_stretch_glyph (it, object, width, height, ascent) glyph->padding_p = 0; glyph->glyph_not_available_p = 0; glyph->face_id = it->face_id; - glyph->u.stretch.ascent = height * ascent; + glyph->u.stretch.ascent = ascent; glyph->u.stretch.height = height; glyph->font_type = FONT_TYPE_UNKNOWN; ++it->glyph_row->used[area]; @@ -17787,20 +18374,16 @@ append_stretch_glyph (it, object, width, height, ascent) of the stretch should be used for the ascent of the stretch. ASCENT must be in the range 0 <= ASCENT <= 100. */ -#define NUMVAL(X) \ - ((INTEGERP (X) || FLOATP (X)) \ - ? XFLOATINT (X) \ - : - 1) - - static void produce_stretch_glyph (it) struct it *it; { - /* (space :width WIDTH :height HEIGHT. */ + /* (space :width WIDTH :height HEIGHT ...) */ Lisp_Object prop, plist; - int width = 0, height = 0; - double ascent = 0; + int width = 0, height = 0, align_to = -1; + int zero_width_ok_p = 0, zero_height_ok_p = 0; + int ascent = 0; + double tem; struct face *face = FACE_FROM_ID (it->f, it->face_id); XFontStruct *font = face->font ? face->font : FRAME_FONT (it->f); @@ -17811,10 +18394,13 @@ produce_stretch_glyph (it) plist = XCDR (it->object); /* Compute the width of the stretch. */ - if (prop = Fplist_get (plist, QCwidth), - NUMVAL (prop) > 0) - /* Absolute width `:width WIDTH' specified and valid. */ - width = NUMVAL (prop) * FRAME_COLUMN_WIDTH (it->f); + if ((prop = Fplist_get (plist, QCwidth), !NILP (prop)) + && calc_pixel_width_or_height (&tem, it, prop, font, 1, 0)) + { + /* Absolute width `:width WIDTH' specified and valid. */ + zero_width_ok_p = 1; + width = (int)tem; + } else if (prop = Fplist_get (plist, QCrelative_width), NUMVAL (prop) > 0) { @@ -17839,38 +18425,54 @@ produce_stretch_glyph (it) x_produce_glyphs (&it2); width = NUMVAL (prop) * it2.pixel_width; } - else if (prop = Fplist_get (plist, QCalign_to), - NUMVAL (prop) > 0) - width = NUMVAL (prop) * FRAME_COLUMN_WIDTH (it->f) - it->current_x; + else if ((prop = Fplist_get (plist, QCalign_to), !NILP (prop)) + && calc_pixel_width_or_height (&tem, it, prop, font, 1, &align_to)) + { + if (it->glyph_row == NULL || !it->glyph_row->mode_line_p) + align_to = (align_to < 0 + ? 0 + : align_to - window_box_left_offset (it->w, TEXT_AREA)); + else if (align_to < 0) + align_to = window_box_left_offset (it->w, TEXT_AREA); + width = max (0, (int)tem + align_to - it->current_x); + zero_width_ok_p = 1; + } else /* Nothing specified -> width defaults to canonical char width. */ width = FRAME_COLUMN_WIDTH (it->f); + if (width <= 0 && (width < 0 || !zero_width_ok_p)) + width = 1; + /* Compute height. */ - if (prop = Fplist_get (plist, QCheight), - NUMVAL (prop) > 0) - height = NUMVAL (prop) * FRAME_LINE_HEIGHT (it->f); + if ((prop = Fplist_get (plist, QCheight), !NILP (prop)) + && calc_pixel_width_or_height (&tem, it, prop, font, 0, 0)) + { + height = (int)tem; + zero_height_ok_p = 1; + } else if (prop = Fplist_get (plist, QCrelative_height), NUMVAL (prop) > 0) height = FONT_HEIGHT (font) * NUMVAL (prop); else height = FONT_HEIGHT (font); + if (height <= 0 && (height < 0 || !zero_height_ok_p)) + height = 1; + /* Compute percentage of height used for ascent. If `:ascent ASCENT' is present and valid, use that. Otherwise, derive the ascent from the font in use. */ if (prop = Fplist_get (plist, QCascent), NUMVAL (prop) > 0 && NUMVAL (prop) <= 100) - ascent = NUMVAL (prop) / 100.0; + ascent = height * NUMVAL (prop) / 100.0; + else if (!NILP (prop) + && calc_pixel_width_or_height (&tem, it, prop, font, 0, 0)) + ascent = min (max (0, (int)tem), height); else - ascent = (double) FONT_BASE (font) / FONT_HEIGHT (font); - - if (width <= 0) - width = 1; - if (height <= 0) - height = 1; + ascent = (height * FONT_BASE (font)) / FONT_HEIGHT (font); - if (it->glyph_row) + if (width > 0 && height > 0 && it->glyph_row) { Lisp_Object object = it->stack[it->sp - 1].string; if (!STRINGP (object)) @@ -17879,11 +18481,11 @@ produce_stretch_glyph (it) } it->pixel_width = width; - it->ascent = it->phys_ascent = height * ascent; + it->ascent = it->phys_ascent = ascent; it->descent = it->phys_descent = height - it->ascent; - it->nglyphs = 1; + it->nglyphs = width > 0 && height > 0 ? 1 : 0; - if (face->box != FACE_NO_BOX) + if (width > 0 && height > 0 && face->box != FACE_NO_BOX) { if (face->box_line_width > 0) { @@ -18038,8 +18640,8 @@ x_produce_glyphs (it) { /* Translate a space with a `space-width' property into a stretch glyph. */ - double ascent = (double) FONT_BASE (font) - / FONT_HEIGHT (font); + int ascent = (((it->ascent + it->descent) * FONT_BASE (font)) + / FONT_HEIGHT (font)); append_stretch_glyph (it, it->object, it->pixel_width, it->ascent + it->descent, ascent); } @@ -18087,9 +18689,8 @@ x_produce_glyphs (it) if (it->glyph_row) { - double ascent = (double) it->ascent / (it->ascent + it->descent); append_stretch_glyph (it, it->object, it->pixel_width, - it->ascent + it->descent, ascent); + it->ascent + it->descent, it->ascent); } } else @@ -18673,7 +19274,7 @@ x_clear_end_of_line (to_x) ARG. If type is BAR_CURSOR, return in *WIDTH the specified width of the bar cursor. */ -enum text_cursor_kinds +static enum text_cursor_kinds get_specified_cursor_type (arg, width) Lisp_Object arg; int *width; @@ -18764,9 +19365,10 @@ set_frame_cursor_types (f, arg) setting of cursor-type. If explicitly marked off, draw no cursor. In all other cases, we want a hollow box cursor. */ -enum text_cursor_kinds -get_window_cursor_type (w, width, active_cursor) +static enum text_cursor_kinds +get_window_cursor_type (w, glyph, width, active_cursor) struct window *w; + struct glyph *glyph; int *width; int *active_cursor; { @@ -18830,7 +19432,13 @@ get_window_cursor_type (w, width, active_cursor) /* Use normal cursor if not blinked off. */ if (!w->cursor_off_p) - return cursor_type; + { + if (glyph != NULL && glyph->type == IMAGE_GLYPH) { + if (cursor_type == FILLED_BOX_CURSOR) + cursor_type = HOLLOW_BOX_CURSOR; + } + return cursor_type; + } /* Cursor is blinked off, so determine how to "toggle" it. */ @@ -18845,6 +19453,11 @@ get_window_cursor_type (w, width, active_cursor) return FRAME_BLINK_OFF_CURSOR (f); } +#if 0 + /* Some people liked having a permanently visible blinking cursor, + while others had very strong opinions against it. So it was + decided to remove it. KFS 2003-09-03 */ + /* Finally perform built-in cursor blinking: filled box <-> hollow box wide [h]bar <-> narrow [h]bar @@ -18859,6 +19472,7 @@ get_window_cursor_type (w, width, active_cursor) *width = 1; return cursor_type; } +#endif return NO_CURSOR; } @@ -18879,36 +19493,53 @@ notice_overwritten_cursor (w, area, x0, x1, y0, y1) enum glyph_row_area area; int x0, y0, x1, y1; { - if (area == TEXT_AREA && w->phys_cursor_on_p) - { - int cx0 = w->phys_cursor.x; - int cx1 = cx0 + w->phys_cursor_width; - int cy0 = w->phys_cursor.y; - int cy1 = cy0 + w->phys_cursor_height; + int cx0, cx1, cy0, cy1; + struct glyph_row *row; - if (x0 <= cx0 && (x1 < 0 || x1 >= cx1)) - { - /* The cursor image will be completely removed from the - screen if the output area intersects the cursor area in - y-direction. When we draw in [y0 y1[, and some part of - the cursor is at y < y0, that part must have been drawn - before. When scrolling, the cursor is erased before - actually scrolling, so we don't come here. When not - scrolling, the rows above the old cursor row must have - changed, and in this case these rows must have written - over the cursor image. + if (!w->phys_cursor_on_p) + return; + if (area != TEXT_AREA) + return; - Likewise if part of the cursor is below y1, with the - exception of the cursor being in the first blank row at - the buffer and window end because update_text_area - doesn't draw that row. (Except when it does, but - that's handled in update_text_area.) */ + row = w->current_matrix->rows + w->phys_cursor.vpos; + if (!row->displays_text_p) + return; - if (((y0 >= cy0 && y0 < cy1) || (y1 > cy0 && y1 < cy1)) - && w->current_matrix->rows[w->phys_cursor.vpos].displays_text_p) - w->phys_cursor_on_p = 0; - } + if (row->cursor_in_fringe_p) + { + row->cursor_in_fringe_p = 0; + draw_fringe_bitmap (w, row, 0); + w->phys_cursor_on_p = 0; + return; } + + cx0 = w->phys_cursor.x; + cx1 = cx0 + w->phys_cursor_width; + if (x0 > cx0 || (x1 >= 0 && x1 < cx1)) + return; + + /* The cursor image will be completely removed from the + screen if the output area intersects the cursor area in + y-direction. When we draw in [y0 y1[, and some part of + the cursor is at y < y0, that part must have been drawn + before. When scrolling, the cursor is erased before + actually scrolling, so we don't come here. When not + scrolling, the rows above the old cursor row must have + changed, and in this case these rows must have written + over the cursor image. + + Likewise if part of the cursor is below y1, with the + exception of the cursor being in the first blank row at + the buffer and window end because update_text_area + doesn't draw that row. (Except when it does, but + that's handled in update_text_area.) */ + + cy0 = w->phys_cursor.y; + cy1 = cy0 + w->phys_cursor_height; + if ((y0 < cy0 || y0 >= cy1) && (y1 <= cy0 || y1 >= cy1)) + return; + + w->phys_cursor_on_p = 0; } #endif /* HAVE_WINDOW_SYSTEM */ @@ -19043,6 +19674,14 @@ erase_phys_cursor (w) if (cursor_row->visible_height <= 0) goto mark_cursor_off; + /* If cursor is in the fringe, erase by drawing actual bitmap there. */ + if (cursor_row->cursor_in_fringe_p) + { + cursor_row->cursor_in_fringe_p = 0; + draw_fringe_bitmap (w, cursor_row, 0); + goto mark_cursor_off; + } + /* This can happen when the new row is shorter than the old one. In this case, either draw_glyphs or clear_end_of_line should have cleared the cursor. Note that we wouldn't be @@ -19111,8 +19750,8 @@ display_and_set_cursor (w, on, hpos, vpos, x, y) int new_cursor_type; int new_cursor_width; int active_cursor; - struct glyph_matrix *current_glyphs; struct glyph_row *glyph_row; + struct glyph *glyph; /* This is pointless on invisible frames, and dangerous on garbaged windows and frames; in the latter case, the frame or window may @@ -19128,9 +19767,7 @@ display_and_set_cursor (w, on, hpos, vpos, x, y) if (!on && !w->phys_cursor_on_p) return; - current_glyphs = w->current_matrix; - glyph_row = MATRIX_ROW (current_glyphs, vpos); - + glyph_row = MATRIX_ROW (w->current_matrix, vpos); /* If cursor row is not enabled, we don't really know where to display the cursor. */ if (!glyph_row->enabled_p) @@ -19139,10 +19776,16 @@ display_and_set_cursor (w, on, hpos, vpos, x, y) return; } + glyph = NULL; + if (!glyph_row->exact_window_width_line_p + || hpos < glyph_row->used[TEXT_AREA]) + glyph = glyph_row->glyphs[TEXT_AREA] + hpos; + xassert (interrupt_input_blocked); /* Set new_cursor_type to the cursor we want to be displayed. */ - new_cursor_type = get_window_cursor_type (w, &new_cursor_width, &active_cursor); + new_cursor_type = get_window_cursor_type (w, glyph, + &new_cursor_width, &active_cursor); /* If cursor is currently being shown and we don't want it to be or it is in the wrong place, or the cursor type is not what we want, @@ -19339,7 +19982,7 @@ clear_mouse_face (dpyinfo) { int cleared = 0; - if (!NILP (dpyinfo->mouse_face_window)) + if (!dpyinfo->mouse_face_hidden && !NILP (dpyinfo->mouse_face_window)) { show_mouse_face (dpyinfo, DRAW_NORMAL_TEXT); cleared = 1; @@ -19416,7 +20059,7 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop) if (charpos < MATRIX_ROW_START_CHARPOS (first)) { *x = *y = *hpos = *vpos = 0; - return 0; + return 1; } else { @@ -19456,7 +20099,7 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop) } *hpos = glyph - row->glyphs[TEXT_AREA]; - return past_end; + return !past_end; } #else /* not 1 */ @@ -19642,6 +20285,187 @@ fast_find_string_pos (w, pos, object, hpos, vpos, x, y, right_p) } +/* See if position X, Y is within a hot-spot of an image. */ + +static int +on_hot_spot_p (hot_spot, x, y) + Lisp_Object hot_spot; + int x, y; +{ + if (!CONSP (hot_spot)) + return 0; + + if (EQ (XCAR (hot_spot), Qrect)) + { + /* CDR is (Top-Left . Bottom-Right) = ((x0 . y0) . (x1 . y1)) */ + Lisp_Object rect = XCDR (hot_spot); + Lisp_Object tem; + if (!CONSP (rect)) + return 0; + if (!CONSP (XCAR (rect))) + return 0; + if (!CONSP (XCDR (rect))) + return 0; + if (!(tem = XCAR (XCAR (rect)), INTEGERP (tem) && x >= XINT (tem))) + return 0; + if (!(tem = XCDR (XCAR (rect)), INTEGERP (tem) && y >= XINT (tem))) + return 0; + if (!(tem = XCAR (XCDR (rect)), INTEGERP (tem) && x <= XINT (tem))) + return 0; + if (!(tem = XCDR (XCDR (rect)), INTEGERP (tem) && y <= XINT (tem))) + return 0; + return 1; + } + else if (EQ (XCAR (hot_spot), Qcircle)) + { + /* CDR is (Center . Radius) = ((x0 . y0) . r) */ + Lisp_Object circ = XCDR (hot_spot); + Lisp_Object lr, lx0, ly0; + if (CONSP (circ) + && CONSP (XCAR (circ)) + && (lr = XCDR (circ), INTEGERP (lr) || FLOATP (lr)) + && (lx0 = XCAR (XCAR (circ)), INTEGERP (lx0)) + && (ly0 = XCDR (XCAR (circ)), INTEGERP (ly0))) + { + double r = XFLOATINT (lr); + double dx = XINT (lx0) - x; + double dy = XINT (ly0) - y; + return (dx * dx + dy * dy <= r * r); + } + } + else if (EQ (XCAR (hot_spot), Qpoly)) + { + /* CDR is [x0 y0 x1 y1 x2 y2 ...x(n-1) y(n-1)] */ + if (VECTORP (XCDR (hot_spot))) + { + struct Lisp_Vector *v = XVECTOR (XCDR (hot_spot)); + Lisp_Object *poly = v->contents; + int n = v->size; + int i; + int inside = 0; + Lisp_Object lx, ly; + int x0, y0; + + /* Need an even number of coordinates, and at least 3 edges. */ + if (n < 6 || n & 1) + return 0; + + /* Count edge segments intersecting line from (X,Y) to (X,infinity). + If count is odd, we are inside polygon. Pixels on edges + may or may not be included depending on actual geometry of the + polygon. */ + if ((lx = poly[n-2], !INTEGERP (lx)) + || (ly = poly[n-1], !INTEGERP (lx))) + return 0; + x0 = XINT (lx), y0 = XINT (ly); + for (i = 0; i < n; i += 2) + { + int x1 = x0, y1 = y0; + if ((lx = poly[i], !INTEGERP (lx)) + || (ly = poly[i+1], !INTEGERP (ly))) + return 0; + x0 = XINT (lx), y0 = XINT (ly); + + /* Does this segment cross the X line? */ + if (x0 >= x) + { + if (x1 >= x) + continue; + } + else if (x1 < x) + continue; + if (y > y0 && y > y1) + continue; + if (y < y0 + ((y1 - y0) * (x - x0)) / (x1 - x0)) + inside = !inside; + } + return inside; + } + } + else + return 0; +} + +Lisp_Object +find_hot_spot (map, x, y) + Lisp_Object map; + int x, y; +{ + while (CONSP (map)) + { + if (CONSP (XCAR (map)) + && on_hot_spot_p (XCAR (XCAR (map)), x, y)) + return XCAR (map); + map = XCDR (map); + } + + return Qnil; +} + +DEFUN ("lookup-image-map", Flookup_image_map, Slookup_image_map, + 3, 3, 0, + doc: /* Lookup in image map MAP coordinates X and Y. +An image map is an alist where each element has the format (AREA ID PLIST). +An AREA is specified as either a rectangle, a circle, or a polygon: +A rectangle is a cons (rect . ((x0 . y0) . (x1 . y1))) specifying the +pixel coordinates of the upper left and bottom right corners. +A circle is a cons (circle . ((x0 . y0) . r)) specifying the center +and the radius of the circle; r may be a float or integer. +A polygon is a cons (poly . [x0 y0 x1 y1 ...]) where each pair in the +vector describes one corner in the polygon. +Returns the alist element for the first matching AREA in MAP. */) + (map, x, y) + Lisp_Object map; + Lisp_Object x, y; +{ + int ix, iy; + if (NILP (map)) + return Qnil; + + CHECK_NUMBER (x); + CHECK_NUMBER (y); + + return find_hot_spot (map, XINT (x), XINT (y)); +} + + +/* Display frame CURSOR, optionally using shape defined by POINTER. */ +static void +define_frame_cursor1 (f, cursor, pointer) + struct frame *f; + Cursor cursor; + Lisp_Object pointer; +{ + if (!NILP (pointer)) + { + if (EQ (pointer, Qarrow)) + cursor = FRAME_X_OUTPUT (f)->nontext_cursor; + else if (EQ (pointer, Qhand)) + cursor = FRAME_X_OUTPUT (f)->hand_cursor; + else if (EQ (pointer, Qtext)) + cursor = FRAME_X_OUTPUT (f)->text_cursor; + else if (EQ (pointer, intern ("hdrag"))) + cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor; +#ifdef HAVE_X_WINDOWS + else if (EQ (pointer, intern ("vdrag"))) + cursor = FRAME_X_DISPLAY_INFO (f)->vertical_scroll_bar_cursor; +#endif + else if (EQ (pointer, intern ("hourglass"))) + cursor = FRAME_X_OUTPUT (f)->hourglass_cursor; + else if (EQ (pointer, Qmodeline)) + cursor = FRAME_X_OUTPUT (f)->modeline_cursor; + else + cursor = FRAME_X_OUTPUT (f)->nontext_cursor; + } + +#ifndef HAVE_CARBON + if (cursor != No_Cursor) +#else + if (bcmp (&cursor, &No_Cursor, sizeof (Cursor))) +#endif + rif->define_frame_cursor (f, cursor); +} + /* Take proper action when mouse has moved to the mode or header line or marginal area AREA of window W, x-position X and y-position Y. X is relative to the start of the text display area of W, so the @@ -19656,19 +20480,62 @@ note_mode_line_or_margin_highlight (w, x, y, area) { struct frame *f = XFRAME (w->frame); Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); - Cursor cursor = dpyinfo->vertical_scroll_bar_cursor; - int charpos; - Lisp_Object string, help, map, pos; + Cursor cursor = FRAME_X_OUTPUT (f)->nontext_cursor; + Lisp_Object pointer = Qnil; + int charpos, dx, dy, width, height; + Lisp_Object string, object = Qnil; + Lisp_Object pos, help, image; if (area == ON_MODE_LINE || area == ON_HEADER_LINE) - string = mode_line_string (w, x, y, area, &charpos); + string = mode_line_string (w, area, &x, &y, &charpos, + &object, &dx, &dy, &width, &height); else - string = marginal_area_string (w, x, y, area, &charpos); + { + x -= WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH (w); + string = marginal_area_string (w, area, &x, &y, &charpos, + &object, &dx, &dy, &width, &height); + } + + help = Qnil; + + if (IMAGEP (object)) + { + Lisp_Object image_map, hotspot; + if ((image_map = Fplist_get (XCDR (object), QCmap), + !NILP (image_map)) + && (hotspot = find_hot_spot (image_map, dx, dy), + CONSP (hotspot)) + && (hotspot = XCDR (hotspot), CONSP (hotspot))) + { + Lisp_Object area_id, plist; + + area_id = XCAR (hotspot); + /* Could check AREA_ID to see if we enter/leave this hot-spot. + If so, we could look for mouse-enter, mouse-leave + properties in PLIST (and do something...). */ + if ((plist = XCDR (hotspot), CONSP (plist))) + { + pointer = Fplist_get (plist, Qpointer); + if (NILP (pointer)) + pointer = Qhand; + help = Fplist_get (plist, Qhelp_echo); + if (!NILP (help)) + { + help_echo_string = help; + /* Is this correct? ++kfs */ + XSETWINDOW (help_echo_window, w); + help_echo_object = w->buffer; + help_echo_pos = charpos; + } + } + if (NILP (pointer)) + pointer = Fplist_get (XCDR (object), QCpointer); + } + } if (STRINGP (string)) { pos = make_number (charpos); - /* If we're on a string with `help-echo' text property, arrange for the help to be displayed. This is done by setting the global variable help_echo_string to the help string. */ @@ -19681,15 +20548,22 @@ note_mode_line_or_margin_highlight (w, x, y, area) help_echo_pos = charpos; } + if (NILP (pointer)) + pointer = Fget_text_property (pos, Qpointer, string); + /* Change the mouse pointer according to what is under X/Y. */ - map = Fget_text_property (pos, Qlocal_map, string); - if (!KEYMAPP (map)) - map = Fget_text_property (pos, Qkeymap, string); - if (KEYMAPP (map)) - cursor = FRAME_X_OUTPUT (f)->nontext_cursor; + if (NILP (pointer) && ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE))) + { + Lisp_Object map; + map = Fget_text_property (pos, Qlocal_map, string); + if (!KEYMAPP (map)) + map = Fget_text_property (pos, Qkeymap, string); + if (!KEYMAPP (map)) + cursor = dpyinfo->vertical_scroll_bar_cursor; + } } - rif->define_frame_cursor (f, cursor); + define_frame_cursor1 (f, cursor, pointer); } @@ -19709,6 +20583,7 @@ note_mouse_highlight (f, x, y) Lisp_Object window; struct window *w; Cursor cursor = No_Cursor; + Lisp_Object pointer = Qnil; /* Takes precedence over cursor! */ struct buffer *b; /* When a menu is active, don't highlight because this looks odd. */ @@ -19746,7 +20621,6 @@ note_mouse_highlight (f, x, y) return; /* Reset help_echo_string. It will get recomputed below. */ - /* ++KFS: X version didn't do this, but it looks harmless. */ help_echo_string = Qnil; /* Convert to window-relative pixel coordinates. */ @@ -19771,6 +20645,8 @@ note_mouse_highlight (f, x, y) if (part == ON_VERTICAL_BORDER) cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor; + else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE) + cursor = FRAME_X_OUTPUT (f)->nontext_cursor; else cursor = FRAME_X_OUTPUT (f)->text_cursor; @@ -19782,7 +20658,7 @@ note_mouse_highlight (f, x, y) && XFASTINT (w->last_modified) == BUF_MODIFF (b) && XFASTINT (w->last_overlay_modified) == BUF_OVERLAY_MODIFF (b)) { - int hpos, vpos, pos, i, area; + int hpos, vpos, pos, i, dx, dy, area; struct glyph *glyph; Lisp_Object object; Lisp_Object mouse_face = Qnil, overlay = Qnil, position; @@ -19792,21 +20668,60 @@ note_mouse_highlight (f, x, y) int obegv, ozv, same_region; /* Find the glyph under X/Y. */ - glyph = x_y_to_hpos_vpos (w, x, y, &hpos, &vpos, &area, 0); + glyph = x_y_to_hpos_vpos (w, x, y, &hpos, &vpos, &dx, &dy, &area); + + /* Look for :pointer property on image. */ + if (glyph != NULL && glyph->type == IMAGE_GLYPH) + { + struct image *img = IMAGE_FROM_ID (f, glyph->u.img_id); + if (img != NULL && IMAGEP (img->spec)) + { + Lisp_Object image_map, hotspot; + if ((image_map = Fplist_get (XCDR (img->spec), QCmap), + !NILP (image_map)) + && (hotspot = find_hot_spot (image_map, dx, dy), + CONSP (hotspot)) + && (hotspot = XCDR (hotspot), CONSP (hotspot))) + { + Lisp_Object area_id, plist; + + area_id = XCAR (hotspot); + /* Could check AREA_ID to see if we enter/leave this hot-spot. + If so, we could look for mouse-enter, mouse-leave + properties in PLIST (and do something...). */ + if ((plist = XCDR (hotspot), CONSP (plist))) + { + pointer = Fplist_get (plist, Qpointer); + if (NILP (pointer)) + pointer = Qhand; + help_echo_string = Fplist_get (plist, Qhelp_echo); + if (!NILP (help_echo_string)) + { + help_echo_window = window; + help_echo_object = glyph->object; + help_echo_pos = glyph->charpos; + } + } + } + if (NILP (pointer)) + pointer = Fplist_get (XCDR (img->spec), QCpointer); + } + } /* Clear mouse face if X/Y not over text. */ if (glyph == NULL || area != TEXT_AREA || !MATRIX_ROW (w->current_matrix, vpos)->displays_text_p) { -#if defined (HAVE_NTGUI) - /* ++KFS: Why is this necessary on W32 ? */ - clear_mouse_face (dpyinfo); - cursor = FRAME_X_OUTPUT (f)->nontext_cursor; -#else if (clear_mouse_face (dpyinfo)) cursor = No_Cursor; -#endif + if (NILP (pointer)) + { + if (area != TEXT_AREA) + cursor = FRAME_X_OUTPUT (f)->nontext_cursor; + else + pointer = Vvoid_text_area_pointer; + } goto set_cursor; } @@ -20062,7 +20977,7 @@ note_mouse_highlight (f, x, y) check_help_echo: /* Look for a `help-echo' property. */ - { + if (NILP (help_echo_string)) { Lisp_Object help, overlay; /* Check overlays first. */ @@ -20128,6 +21043,46 @@ note_mouse_highlight (f, x, y) } } + /* Look for a `pointer' property. */ + if (NILP (pointer)) + { + /* Check overlays first. */ + for (i = noverlays - 1; i >= 0 && NILP (pointer); --i) + pointer = Foverlay_get (overlay_vec[i], Qpointer); + + if (NILP (pointer)) + { + Lisp_Object object = glyph->object; + int charpos = glyph->charpos; + + /* Try text properties. */ + if (STRINGP (object) + && charpos >= 0 + && charpos < SCHARS (object)) + { + pointer = Fget_text_property (make_number (charpos), + Qpointer, object); + if (NILP (pointer)) + { + /* If the string itself doesn't specify a pointer, + see if the buffer text ``under'' it does. */ + struct glyph_row *r + = MATRIX_ROW (w->current_matrix, vpos); + int start = MATRIX_ROW_START_CHARPOS (r); + int pos = string_buffer_position (w, object, start); + if (pos > 0) + pointer = Fget_char_property (make_number (pos), + Qpointer, w->buffer); + } + } + else if (BUFFERP (object) + && charpos >= BEGV + && charpos < ZV) + pointer = Fget_text_property (make_number (charpos), + Qpointer, object); + } + } + BEGV = obegv; ZV = ozv; current_buffer = obuf; @@ -20135,12 +21090,7 @@ note_mouse_highlight (f, x, y) set_cursor: -#ifndef HAVE_CARBON - if (cursor != No_Cursor) -#else - if (bcmp (&cursor, &No_Cursor, sizeof (Cursor))) -#endif - rif->define_frame_cursor (f, cursor); + define_frame_cursor1 (f, cursor, pointer); } @@ -20220,9 +21170,9 @@ expose_area (w, row, r, area) AREA. The first glyph of the text area can be partially visible. The first glyphs of other areas cannot. */ start_x = window_box_left_offset (w, area); - if (area == TEXT_AREA) - start_x += row->x; x = start_x; + if (area == TEXT_AREA) + x += row->x; /* Find the first glyph that must be redrawn. */ while (first < end @@ -20328,13 +21278,13 @@ phys_cursor_in_rect_p (w, r) cursor_glyph = get_phys_cursor_glyph (w); if (cursor_glyph) { - /* r is relative to W's box, but w->phys_cursor.x is relative + /* r is relative to W's box, but w->phys_cursor.x is relative to left edge of W's TEXT area. Adjust it. */ cr.x = window_box_left_offset (w, TEXT_AREA) + w->phys_cursor.x; cr.y = w->phys_cursor.y; cr.width = cursor_glyph->pixel_width; cr.height = w->phys_cursor_height; - /* ++KFS: W32 version used W32-specific IntersectRect here, but + /* ++KFS: W32 version used W32-specific IntersectRect here, but I assume the effect is the same -- and this is portable. */ return x_intersect_rectangles (&cr, r, &result); } @@ -20352,7 +21302,7 @@ x_draw_vertical_border (w) struct window *w; { /* We could do better, if we knew what type of scroll-bar the adjacent - windows (on either side) have... But we don't :-( + windows (on either side) have... But we don't :-( However, I think this works ok. ++KFS 2003-04-25 */ /* Redraw borders between horizontally adjacent windows. Don't @@ -20736,6 +21686,7 @@ syms_of_xdisp () #endif #ifdef HAVE_WINDOW_SYSTEM defsubr (&Stool_bar_lines_needed); + defsubr (&Slookup_image_map); #endif defsubr (&Sformat_mode_line); @@ -20769,16 +21720,16 @@ syms_of_xdisp () staticpro (&Qspace); Qmargin = intern ("margin"); staticpro (&Qmargin); + Qpointer = intern ("pointer"); + staticpro (&Qpointer); Qleft_margin = intern ("left-margin"); staticpro (&Qleft_margin); Qright_margin = intern ("right-margin"); staticpro (&Qright_margin); - Qalign_to = intern ("align-to"); - staticpro (&Qalign_to); + Qcenter = intern ("center"); + staticpro (&Qcenter); QCalign_to = intern (":align-to"); staticpro (&QCalign_to); - Qrelative_width = intern ("relative-width"); - staticpro (&Qrelative_width); QCrelative_width = intern (":relative-width"); staticpro (&QCrelative_width); QCrelative_height = intern (":relative-height"); @@ -20797,6 +21748,16 @@ syms_of_xdisp () staticpro (&Qtrailing_whitespace); Qimage = intern ("image"); staticpro (&Qimage); + QCmap = intern (":map"); + staticpro (&QCmap); + QCpointer = intern (":pointer"); + staticpro (&QCpointer); + Qrect = intern ("rect"); + staticpro (&Qrect); + Qcircle = intern ("circle"); + staticpro (&Qcircle); + Qpoly = intern ("poly"); + staticpro (&Qpoly); Qmessage_truncate_lines = intern ("message-truncate-lines"); staticpro (&Qmessage_truncate_lines); Qcursor_in_non_selected_windows = intern ("cursor-in-non-selected-windows"); @@ -20821,18 +21782,31 @@ syms_of_xdisp () staticpro (&Qbox); Qhollow = intern ("hollow"); staticpro (&Qhollow); + Qhand = intern ("hand"); + staticpro (&Qhand); + Qarrow = intern ("arrow"); + staticpro (&Qarrow); + Qtext = intern ("text"); + staticpro (&Qtext); Qrisky_local_variable = intern ("risky-local-variable"); staticpro (&Qrisky_local_variable); Qinhibit_free_realized_faces = intern ("inhibit-free-realized-faces"); staticpro (&Qinhibit_free_realized_faces); - list_of_error = Fcons (intern ("error"), Qnil); + list_of_error = Fcons (Fcons (intern ("error"), + Fcons (intern ("void-variable"), Qnil)), + Qnil); staticpro (&list_of_error); - last_arrow_position = Qnil; - last_arrow_string = Qnil; - staticpro (&last_arrow_position); - staticpro (&last_arrow_string); + Qlast_arrow_position = intern ("last-arrow-position"); + staticpro (&Qlast_arrow_position); + Qlast_arrow_string = intern ("last-arrow-string"); + staticpro (&Qlast_arrow_string); + + Qoverlay_arrow_string = intern ("overlay-arrow-string"); + staticpro (&Qoverlay_arrow_string); + Qoverlay_arrow_bitmap = intern ("overlay-arrow-bitmap"); + staticpro (&Qoverlay_arrow_bitmap); echo_buffer[0] = echo_buffer[1] = Qnil; staticpro (&echo_buffer[0]); @@ -20870,10 +21844,16 @@ wide as that tab on the display. */); #endif DEFVAR_LISP ("show-trailing-whitespace", &Vshow_trailing_whitespace, - doc: /* Non-nil means highlight trailing whitespace. + doc: /* *Non-nil means highlight trailing whitespace. The face used for trailing whitespace is `trailing-whitespace'. */); Vshow_trailing_whitespace = Qnil; + DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, + doc: /* *The pointer shape to show in void text areas. +Nil means to show the text pointer. Other options are `arrow', `text', +`hand', `vdrag', `hdrag', `modeline', and `hourglass'. */); + Vvoid_text_area_pointer = Qarrow; + DEFVAR_LISP ("inhibit-redisplay", &Vinhibit_redisplay, doc: /* Non-nil means don't actually do any redisplay. This is used for internal purposes. */); @@ -20890,9 +21870,17 @@ See also `overlay-arrow-string'. */); Voverlay_arrow_position = Qnil; DEFVAR_LISP ("overlay-arrow-string", &Voverlay_arrow_string, - doc: /* String to display as an arrow. See also `overlay-arrow-position'. */); + doc: /* String to display as an arrow in non-window frames. +See also `overlay-arrow-position'. */); Voverlay_arrow_string = Qnil; + DEFVAR_LISP ("overlay-arrow-variable-list", &Voverlay_arrow_variable_list, + doc: /* List of variables (symbols) which hold markers for overlay arrows. +The symbols on this list are examined during redisplay to determine +where to display overlay arrows. */); + Voverlay_arrow_variable_list + = Fcons (intern ("overlay-arrow-position"), Qnil); + DEFVAR_INT ("scroll-step", &scroll_step, doc: /* *The number of lines to try scrolling a window by when point moves out. If that fails to bring point back on frame, point is centered instead. @@ -20912,6 +21900,11 @@ Recenter the window whenever point gets within this many lines of the top or bottom of the window. */); scroll_margin = 0; + DEFVAR_LISP ("display-pixels-per-inch", &Vdisplay_pixels_per_inch, + doc: /* Pixels per inch on current display. +Value is a number or a cons (WIDTH-DPI . HEIGHT-DPI). */); + Vdisplay_pixels_per_inch = make_float (72.0); + #if GLYPH_DEBUG DEFVAR_INT ("debug-end-pos", &debug_end_pos, doc: /* Don't ask. */); #endif @@ -20956,6 +21949,7 @@ This variable is not guaranteed to be accurate except while processing This variable has the same structure as `mode-line-format' (which see), and is used only on frames for which no explicit name has been set \(see `modify-frame-parameters'). */); + DEFVAR_LISP ("icon-title-format", &Vicon_title_format, doc: /* Template for displaying the title bar of an iconified frame. \(Assuming the window manager supports this feature.) @@ -21189,3 +22183,5 @@ init_xdisp () } +/* arch-tag: eacc864d-bb6a-4b74-894a-1a4399a1358b + (do not change this comment) */ diff --git a/src/xfaces.c b/src/xfaces.c index c588527eaa..f44b216877 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -1,5 +1,5 @@ /* xfaces.c -- "Face" primitives. - Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003 + Copyright (C) 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation. This file is part of GNU Emacs. @@ -194,6 +194,7 @@ Boston, MA 02111-1307, USA. */ used to fill in unspecified attributes of the default face. */ #include +#include #include #include @@ -264,7 +265,6 @@ Boston, MA 02111-1307, USA. */ #endif /* HAVE_X_WINDOWS */ -#include #include #define abs(X) ((X) < 0 ? -(X) : (X)) @@ -1503,15 +1503,19 @@ face_color_supported_p (f, color_name, background_p) XColor not_used; XSETFRAME (frame, f); - return (FRAME_WINDOW_P (f) - ? (!NILP (Fxw_display_color_p (frame)) - || xstricmp (color_name, "black") == 0 - || xstricmp (color_name, "white") == 0 - || (background_p - && face_color_gray_p (f, color_name)) - || (!NILP (Fx_display_grayscale_p (frame)) - && face_color_gray_p (f, color_name))) - : tty_defined_color (f, color_name, ¬_used, 0)); + return +#ifdef HAVE_X_WINDOWS + FRAME_WINDOW_P (f) + ? (!NILP (Fxw_display_color_p (frame)) + || xstricmp (color_name, "black") == 0 + || xstricmp (color_name, "white") == 0 + || (background_p + && face_color_gray_p (f, color_name)) + || (!NILP (Fx_display_grayscale_p (frame)) + && face_color_gray_p (f, color_name))) + : +#endif + tty_defined_color (f, color_name, ¬_used, 0); } @@ -1524,8 +1528,11 @@ If FRAME is nil or omitted, use the selected frame. */) { struct frame *f; - CHECK_FRAME (frame); CHECK_STRING (color); + if (NILP (frame)) + frame = selected_frame; + else + CHECK_FRAME (frame); f = XFRAME (frame); return face_color_gray_p (f, SDATA (color)) ? Qt : Qnil; } @@ -1542,8 +1549,11 @@ COLOR must be a valid color name. */) { struct frame *f; - CHECK_FRAME (frame); CHECK_STRING (color); + if (NILP (frame)) + frame = selected_frame; + else + CHECK_FRAME (frame); f = XFRAME (frame); if (face_color_supported_p (f, SDATA (color), !NILP (background_p))) return Qt; @@ -2613,6 +2623,69 @@ x_face_list_fonts (f, pattern, pfonts, nfonts, try_alternatives_p) } +/* Check if a font matching pattern_offset_t on frame F is available + or not. PATTERN may be a cons (FAMILY . REGISTRY), in which case, + a font name pattern is generated from FAMILY and REGISTRY. */ + +int +face_font_available_p (f, pattern) + struct frame *f; + Lisp_Object pattern; +{ + Lisp_Object fonts; + + if (! STRINGP (pattern)) + { + Lisp_Object family, registry; + char *family_str, *registry_str, *pattern_str; + + CHECK_CONS (pattern); + family = XCAR (pattern); + if (NILP (family)) + family_str = "*"; + else + { + CHECK_STRING (family); + family_str = (char *) SDATA (family); + } + registry = XCDR (pattern); + if (NILP (registry)) + registry_str = "*"; + else + { + CHECK_STRING (registry); + registry_str = (char *) SDATA (registry); + } + + pattern_str = (char *) alloca (strlen (family_str) + + strlen (registry_str) + + 10); + strcpy (pattern_str, index (family_str, '-') ? "-" : "-*-"); + strcat (pattern_str, family_str); + strcat (pattern_str, "-*-"); + strcat (pattern_str, registry_str); + if (!index (registry_str, '-')) + { + if (registry_str[strlen (registry_str) - 1] == '*') + strcat (pattern_str, "-*"); + else + strcat (pattern_str, "*-*"); + } + pattern = build_string (pattern_str); + } + + /* Get the list of fonts matching PATTERN. */ +#ifdef WINDOWSNT + BLOCK_INPUT; + fonts = w32_list_fonts (f, pattern, 0, 1); + UNBLOCK_INPUT; +#else + fonts = x_list_fonts (f, pattern, -1, 1); +#endif + return XINT (Flength (fonts)); +} + + /* Determine fonts matching PATTERN on frame F. Sort resulting fonts using comparison function CMPFN. Value is the number of fonts found. If value is non-zero, *FONTS is set to a vector of @@ -3243,7 +3316,13 @@ lface_fully_specified_p (attrs) for (i = 1; i < LFACE_VECTOR_SIZE; ++i) if (i != LFACE_FONT_INDEX && i != LFACE_INHERIT_INDEX && i != LFACE_AVGWIDTH_INDEX && i != LFACE_FONTSET_INDEX) - if (UNSPECIFIEDP (attrs[i])) + if (UNSPECIFIEDP (attrs[i]) +#ifdef MAC_OS + /* MAC_TODO: No stipple support on Mac OS yet, this index is + always unspecified. */ + && i != LFACE_STIPPLE_INDEX +#endif + ) break; return i == LFACE_VECTOR_SIZE; @@ -5662,12 +5741,19 @@ cache_face (c, face, hash) face->id = i; /* Maybe enlarge C->faces_by_id. */ - if (i == c->used && c->used == c->size) + if (i == c->used) { - int new_size = 2 * c->size; - int sz = new_size * sizeof *c->faces_by_id; - c->faces_by_id = (struct face **) xrealloc (c->faces_by_id, sz); - c->size = new_size; + if (c->used == c->size) + { + int new_size, sz; + new_size = min (2 * c->size, MAX_FACE_ID); + if (new_size == c->size) + abort (); /* Alternatives? ++kfs */ + sz = new_size * sizeof *c->faces_by_id; + c->faces_by_id = (struct face **) xrealloc (c->faces_by_id, sz); + c->size = new_size; + } + c->used++; } #if GLYPH_DEBUG @@ -5686,8 +5772,6 @@ cache_face (c, face, hash) #endif /* GLYPH_DEBUG */ c->faces_by_id[i] = face; - if (i == c->used) - ++c->used; } @@ -6176,6 +6260,18 @@ better_font_p (values, font1, font2, compare_pt_p, avgwidth) return 1; } + if (! compare_pt_p) + { + /* We prefer a real scalable font; i.e. not what autoscaled. */ + int auto_scaled_1 = (font1->numeric[XLFD_POINT_SIZE] == 0 + && font1->numeric[XLFD_RESY] > 0); + int auto_scaled_2 = (font2->numeric[XLFD_POINT_SIZE] == 0 + && font2->numeric[XLFD_RESY] > 0); + + if (auto_scaled_1 != auto_scaled_2) + return auto_scaled_2; + } + return font1->registry_priority < font2->registry_priority; } @@ -6414,7 +6510,10 @@ best_matching_font (f, attrs, fonts, nfonts, width_ratio, needs_overstrike) || better_font_p (specified, fonts + i, best, 0, 0) || (!non_scalable_has_exact_height_p && !better_font_p (specified, best, fonts + i, 0, 0))) - best = fonts + i; + { + non_scalable_has_exact_height_p = 1; + best = fonts + i; + } } if (needs_overstrike) @@ -7918,3 +8017,6 @@ a font of 10 point, we actually use a font of 10 * RESCALE-RATIO point. */); defsubr (&Sx_font_family_list); #endif /* HAVE_WINDOW_SYSTEM */ } + +/* arch-tag: 8a0f7598-5517-408d-9ab3-1da6fcd4c749 + (do not change this comment) */ diff --git a/src/xfns.c b/src/xfns.c index 92ec2aa335..12df902ae4 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1,5 +1,5 @@ /* Functions for the X window system. - Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 01, 02, 03 + Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000,01,02,03,04 Free Software Foundation. This file is part of GNU Emacs. @@ -126,6 +126,14 @@ static Lisp_Object Vmotif_version_string; #endif /* USE_X_TOOLKIT */ +#ifdef USE_GTK + +/* GTK+ version info */ + +static Lisp_Object Vgtk_version_string; + +#endif /* USE_GTK */ + #ifdef HAVE_X11R4 #define MAXREQUEST(dpy) (XMaxRequestSize (dpy)) #else @@ -171,10 +179,6 @@ static int x_in_use; Lisp_Object Vx_no_window_manager; -/* Search path for bitmap files. */ - -Lisp_Object Vx_bitmap_file_path; - /* Regexp matching a font name whose width is the same as `PIXEL_SIZE'. */ Lisp_Object Vx_pixel_size_width_font_regexp; @@ -182,7 +186,6 @@ Lisp_Object Vx_pixel_size_width_font_regexp; Lisp_Object Qnone; Lisp_Object Qsuppress_icon; Lisp_Object Qundefined_color; -Lisp_Object Qcenter; Lisp_Object Qcompound_text, Qcancel_timer; /* In dispnew.c */ @@ -301,7 +304,7 @@ x_window_to_frame (dpyinfo, wdesc) #ifdef USE_GTK if (f->output_data.x->edit_widget) { - GtkWidget *gwdesc = xg_win_to_widget (wdesc); + GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc); struct x_output *x = f->output_data.x; if (gwdesc != 0 && gwdesc == x->edit_widget) return f; @@ -345,7 +348,7 @@ x_any_window_to_frame (dpyinfo, wdesc) else if (x->widget) { #ifdef USE_GTK - GtkWidget *gwdesc = xg_win_to_widget (wdesc); + GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc); if (gwdesc != 0 && (gwdesc == x->widget || gwdesc == x->edit_widget @@ -397,7 +400,7 @@ x_non_menubar_window_to_frame (dpyinfo, wdesc) else if (x->widget) { #ifdef USE_GTK - GtkWidget *gwdesc = xg_win_to_widget (wdesc); + GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc); if (gwdesc != 0 && (gwdesc == x->widget || gwdesc == x->edit_widget @@ -441,7 +444,7 @@ x_menubar_window_to_frame (dpyinfo, wdesc) #ifdef USE_GTK if (x->menubar_widget) { - GtkWidget *gwdesc = xg_win_to_widget (wdesc); + GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc); int found = 0; BLOCK_INPUT; @@ -487,7 +490,7 @@ x_top_window_to_frame (dpyinfo, wdesc) { /* This frame matches if the window is its topmost widget. */ #ifdef USE_GTK - GtkWidget *gwdesc = xg_win_to_widget (wdesc); + GtkWidget *gwdesc = xg_win_to_widget (dpyinfo->display, wdesc); if (gwdesc == x->widget) return f; #else @@ -513,331 +516,8 @@ x_top_window_to_frame (dpyinfo, wdesc) -/* Code to deal with bitmaps. Bitmaps are referenced by their bitmap - id, which is just an int that this section returns. Bitmaps are - reference counted so they can be shared among frames. - - Bitmap indices are guaranteed to be > 0, so a negative number can - be used to indicate no bitmap. - - If you use x_create_bitmap_from_data, then you must keep track of - the bitmaps yourself. That is, creating a bitmap from the same - data more than once will not be caught. */ - - -/* Functions to access the contents of a bitmap, given an id. */ - -int -x_bitmap_height (f, id) - FRAME_PTR f; - int id; -{ - return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height; -} - -int -x_bitmap_width (f, id) - FRAME_PTR f; - int id; -{ - return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width; -} - -int -x_bitmap_pixmap (f, id) - FRAME_PTR f; - int id; -{ - return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap; -} - -int -x_bitmap_mask (f, id) - FRAME_PTR f; - int id; -{ - return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask; -} - - -/* Allocate a new bitmap record. Returns index of new record. */ - -static int -x_allocate_bitmap_record (f) - FRAME_PTR f; -{ - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); - int i; - - if (dpyinfo->bitmaps == NULL) - { - dpyinfo->bitmaps_size = 10; - dpyinfo->bitmaps - = (struct x_bitmap_record *) xmalloc (dpyinfo->bitmaps_size * sizeof (struct x_bitmap_record)); - dpyinfo->bitmaps_last = 1; - return 1; - } - - if (dpyinfo->bitmaps_last < dpyinfo->bitmaps_size) - return ++dpyinfo->bitmaps_last; - - for (i = 0; i < dpyinfo->bitmaps_size; ++i) - if (dpyinfo->bitmaps[i].refcount == 0) - return i + 1; - - dpyinfo->bitmaps_size *= 2; - dpyinfo->bitmaps - = (struct x_bitmap_record *) xrealloc (dpyinfo->bitmaps, - dpyinfo->bitmaps_size * sizeof (struct x_bitmap_record)); - return ++dpyinfo->bitmaps_last; -} - -/* Add one reference to the reference count of the bitmap with id ID. */ - -void -x_reference_bitmap (f, id) - FRAME_PTR f; - int id; -{ - ++FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].refcount; -} - -/* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS. */ - -int -x_create_bitmap_from_data (f, bits, width, height) - struct frame *f; - char *bits; - unsigned int width, height; -{ - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); - Pixmap bitmap; - int id; - - bitmap = XCreateBitmapFromData (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - bits, width, height); - - - - if (! bitmap) - return -1; - - id = x_allocate_bitmap_record (f); - dpyinfo->bitmaps[id - 1].pixmap = bitmap; - dpyinfo->bitmaps[id - 1].have_mask = 0; - dpyinfo->bitmaps[id - 1].file = NULL; - dpyinfo->bitmaps[id - 1].refcount = 1; - dpyinfo->bitmaps[id - 1].depth = 1; - dpyinfo->bitmaps[id - 1].height = height; - dpyinfo->bitmaps[id - 1].width = width; - - return id; -} - -/* Create bitmap from file FILE for frame F. */ - -int -x_create_bitmap_from_file (f, file) - struct frame *f; - Lisp_Object file; -{ - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); - unsigned int width, height; - Pixmap bitmap; - int xhot, yhot, result, id; - Lisp_Object found; - int fd; - char *filename; - - /* Look for an existing bitmap with the same name. */ - for (id = 0; id < dpyinfo->bitmaps_last; ++id) - { - if (dpyinfo->bitmaps[id].refcount - && dpyinfo->bitmaps[id].file - && !strcmp (dpyinfo->bitmaps[id].file, (char *) SDATA (file))) - { - ++dpyinfo->bitmaps[id].refcount; - return id + 1; - } - } - - /* Search bitmap-file-path for the file, if appropriate. */ - fd = openp (Vx_bitmap_file_path, file, Qnil, &found, Qnil); - if (fd < 0) - return -1; - emacs_close (fd); - - filename = (char *) SDATA (found); - - result = XReadBitmapFile (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - filename, &width, &height, &bitmap, &xhot, &yhot); - if (result != BitmapSuccess) - return -1; - - id = x_allocate_bitmap_record (f); - dpyinfo->bitmaps[id - 1].pixmap = bitmap; - dpyinfo->bitmaps[id - 1].have_mask = 0; - dpyinfo->bitmaps[id - 1].refcount = 1; - dpyinfo->bitmaps[id - 1].file - = (char *) xmalloc (SBYTES (file) + 1); - dpyinfo->bitmaps[id - 1].depth = 1; - dpyinfo->bitmaps[id - 1].height = height; - dpyinfo->bitmaps[id - 1].width = width; - strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file)); - - return id; -} - -/* Remove reference to bitmap with id number ID. */ - -void -x_destroy_bitmap (f, id) - FRAME_PTR f; - int id; -{ - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); - - if (id > 0) - { - --dpyinfo->bitmaps[id - 1].refcount; - if (dpyinfo->bitmaps[id - 1].refcount == 0) - { - BLOCK_INPUT; - XFreePixmap (FRAME_X_DISPLAY (f), dpyinfo->bitmaps[id - 1].pixmap); - if (dpyinfo->bitmaps[id - 1].have_mask) - XFreePixmap (FRAME_X_DISPLAY (f), dpyinfo->bitmaps[id - 1].mask); - if (dpyinfo->bitmaps[id - 1].file) - { - xfree (dpyinfo->bitmaps[id - 1].file); - dpyinfo->bitmaps[id - 1].file = NULL; - } - UNBLOCK_INPUT; - } - } -} - -/* Free all the bitmaps for the display specified by DPYINFO. */ - -static void -x_destroy_all_bitmaps (dpyinfo) - struct x_display_info *dpyinfo; -{ - int i; - for (i = 0; i < dpyinfo->bitmaps_last; i++) - if (dpyinfo->bitmaps[i].refcount > 0) - { - XFreePixmap (dpyinfo->display, dpyinfo->bitmaps[i].pixmap); - if (dpyinfo->bitmaps[i].have_mask) - XFreePixmap (dpyinfo->display, dpyinfo->bitmaps[i].mask); - if (dpyinfo->bitmaps[i].file) - xfree (dpyinfo->bitmaps[i].file); - } - dpyinfo->bitmaps_last = 0; -} - - - - -/* Useful functions defined in the section - `Image type independent image structures' below. */ - -static unsigned long four_corners_best P_ ((XImage *ximg, unsigned long width, - unsigned long height)); - -static int x_create_x_image_and_pixmap P_ ((struct frame *f, int width, int height, - int depth, XImage **ximg, - Pixmap *pixmap)); - -static void x_destroy_x_image P_ ((XImage *ximg)); - - -/* Create a mask of a bitmap. Note is this not a perfect mask. - It's nicer with some borders in this context */ - -int -x_create_bitmap_mask(f, id) - struct frame *f; - int id; -{ - Pixmap pixmap, mask; - XImage *ximg, *mask_img; - unsigned long width, height; - int result; - unsigned long bg; - unsigned long x, y, xp, xm, yp, ym; - GC gc; - - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); - - if (!(id > 0)) - return -1; - - pixmap = x_bitmap_pixmap(f, id); - width = x_bitmap_width(f, id); - height = x_bitmap_height(f, id); - - BLOCK_INPUT; - ximg = XGetImage (FRAME_X_DISPLAY (f), pixmap, 0, 0, width, height, - ~0, ZPixmap); - - if (!ximg) - { - UNBLOCK_INPUT; - return -1; - } - - result = x_create_x_image_and_pixmap (f, width, height, 1, &mask_img, &mask); - - UNBLOCK_INPUT; - if (!result) - { - XDestroyImage(ximg); - return -1; - } - - bg = four_corners_best (ximg, width, height); - - for (y = 0; y < ximg->height; ++y) - { - for (x = 0; x < ximg->width; ++x) - { - xp = x != ximg->width - 1 ? x + 1 : 0; - xm = x != 0 ? x - 1 : ximg->width - 1; - yp = y != ximg->height - 1 ? y + 1 : 0; - ym = y != 0 ? y - 1 : ximg->height - 1; - if (XGetPixel (ximg, x, y) == bg - && XGetPixel (ximg, x, yp) == bg - && XGetPixel (ximg, x, ym) == bg - && XGetPixel (ximg, xp, y) == bg - && XGetPixel (ximg, xp, yp) == bg - && XGetPixel (ximg, xp, ym) == bg - && XGetPixel (ximg, xm, y) == bg - && XGetPixel (ximg, xm, yp) == bg - && XGetPixel (ximg, xm, ym) == bg) - XPutPixel (mask_img, x, y, 0); - else - XPutPixel (mask_img, x, y, 1); - } - } - - xassert (interrupt_input_blocked); - gc = XCreateGC (FRAME_X_DISPLAY (f), mask, 0, NULL); - XPutImage (FRAME_X_DISPLAY (f), mask, gc, mask_img, 0, 0, 0, 0, - width, height); - XFreeGC (FRAME_X_DISPLAY (f), gc); - - dpyinfo->bitmaps[id - 1].have_mask = 1; - dpyinfo->bitmaps[id - 1].mask = mask; - - XDestroyImage (ximg); - x_destroy_x_image(mask_img); - - return 0; -} - static Lisp_Object unwind_create_frame P_ ((Lisp_Object)); static Lisp_Object unwind_create_tip_frame P_ ((Lisp_Object)); -static void x_disable_image P_ ((struct frame *, struct image *)); void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); static void x_set_wait_for_wm P_ ((struct frame *, Lisp_Object, Lisp_Object)); @@ -861,16 +541,6 @@ static Lisp_Object x_default_scroll_bar_color_parameter P_ ((struct frame *, Lisp_Object, char *, char *, int)); -static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object, - Lisp_Object)); -static void init_color_table P_ ((void)); -static void free_color_table P_ ((void)); -static unsigned long *colors_in_color_table P_ ((int *n)); -static unsigned long lookup_rgb_color P_ ((struct frame *f, int r, int g, int b)); -static unsigned long lookup_pixel_color P_ ((struct frame *f, unsigned long p)); - - - /* Store the screen positions of frame F into XPTR and YPTR. @@ -1092,13 +762,11 @@ x_set_wait_for_wm (f, new_value, old_value) #ifdef USE_GTK -static Lisp_Object x_find_image_file P_ ((Lisp_Object file)); - /* Set icon from FILE for frame F. By using GTK functions the icon may be any format that GdkPixbuf knows about, i.e. not just bitmaps. */ int -xg_set_icon(f, file) +xg_set_icon (f, file) FRAME_PTR f; Lisp_Object file; { @@ -1292,7 +960,6 @@ x_set_mouse_color (f, arg, oldval) hourglass_cursor = XCreateFontCursor (dpy, XC_watch); x_check_errors (dpy, "bad hourglass pointer cursor: %s"); - x_check_errors (dpy, "bad nontext pointer cursor: %s"); if (!NILP (Vx_mode_pointer_shape)) { CHECK_NUMBER (Vx_mode_pointer_shape); @@ -1589,7 +1256,7 @@ x_set_menu_bar_lines (f, value, oldval) Lisp_Object value, oldval; { int nlines; -#ifndef USE_X_TOOLKIT +#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) int olines = FRAME_MENU_BAR_LINES (f); #endif @@ -2429,8 +2096,8 @@ create_frame_xic (f) xic = XCreateIC (xim, XNInputStyle, xic_style, - XNClientWindow, FRAME_X_WINDOW(f), - XNFocusWindow, FRAME_X_WINDOW(f), + XNClientWindow, FRAME_X_WINDOW (f), + XNFocusWindow, FRAME_X_WINDOW (f), XNStatusAttributes, status_attr, XNPreeditAttributes, preedit_attr, NULL); @@ -2521,7 +2188,7 @@ xic_set_statusarea (f) XFree (needed); attr = XVaCreateNestedList (0, XNArea, &area, NULL); - XSetICValues(xic, XNStatusAttributes, attr, NULL); + XSetICValues (xic, XNStatusAttributes, attr, NULL); XFree (attr); } @@ -2641,7 +2308,7 @@ x_window (f, window_prompting, minibuffer_only) { int len; char *tem, shell_position[32]; - Arg al[2]; + Arg al[10]; int ac = 0; int extra_borders = 0; int menubar_size @@ -2693,9 +2360,19 @@ x_window (f, window_prompting, minibuffer_only) (xneg ? '-' : '+'), left, (yneg ? '-' : '+'), top); else - sprintf (shell_position, "=%dx%d", - FRAME_PIXEL_WIDTH (f) + extra_borders, - FRAME_PIXEL_HEIGHT (f) + menubar_size + extra_borders); + { + sprintf (shell_position, "=%dx%d", + FRAME_PIXEL_WIDTH (f) + extra_borders, + FRAME_PIXEL_HEIGHT (f) + menubar_size + extra_borders); + + /* Setting x and y when the position is not specified in + the geometry string will set program position in the WM hints. + If Emacs had just one program position, we could set it in + fallback resources, but since each make-frame call can specify + different program positions, this is easier. */ + XtSetArg (al[ac], XtNx, left); ac++; + XtSetArg (al[ac], XtNy, top); ac++; + } } len = strlen (shell_position) + 1; @@ -2754,7 +2431,7 @@ x_window (f, window_prompting, minibuffer_only) { /* XIM server might require some X events. */ unsigned long fevent = NoEventMask; - XGetICValues(FRAME_XIC (f), XNFilterEvents, &fevent, NULL); + XGetICValues (FRAME_XIC (f), XNFilterEvents, &fevent, NULL); attributes.event_mask |= fevent; } #endif /* HAVE_X_I18N */ @@ -2800,7 +2477,7 @@ x_window (f) #ifdef HAVE_X_I18N FRAME_XIC (f) = NULL; -if (use_xim) + if (use_xim) { BLOCK_INPUT; create_frame_xic (f); @@ -2808,7 +2485,7 @@ if (use_xim) { /* XIM server might require some X events. */ unsigned long fevent = NoEventMask; - XGetICValues(FRAME_XIC (f), XNFilterEvents, &fevent, NULL); + XGetICValues (FRAME_XIC (f), XNFilterEvents, &fevent, NULL); if (fevent != NoEventMask) { @@ -2872,7 +2549,7 @@ x_window (f) { /* XIM server might require some X events. */ unsigned long fevent = NoEventMask; - XGetICValues(FRAME_XIC (f), XNFilterEvents, &fevent, NULL); + XGetICValues (FRAME_XIC (f), XNFilterEvents, &fevent, NULL); attributes.event_mask |= fevent; attribute_mask = CWEventMask; XChangeWindowAttributes (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), @@ -3509,6 +3186,19 @@ This function is an internal primitive--use `make-frame' instead. */) ; } + /* Set the WM leader property. GTK does this itself, so this is not + needed when using GTK. */ + if (dpyinfo->client_leader_window != 0) + { + BLOCK_INPUT; + XChangeProperty (FRAME_X_DISPLAY (f), + FRAME_OUTER_WINDOW (f), + dpyinfo->Xatom_wm_client_leader, + XA_WINDOW, 32, PropModeReplace, + (char *) &dpyinfo->client_leader_window, 1); + UNBLOCK_INPUT; + } + UNGCPRO; /* Make sure windows on this frame appear in calls to next-window @@ -3712,8 +3402,17 @@ If omitted or nil, that stands for the selected frame's display. */) { struct x_display_info *dpyinfo = check_x_display_info (display); - return make_number (DisplayCells (dpyinfo->display, - XScreenNumberOfScreen (dpyinfo->screen))); + int nr_planes = DisplayPlanes (dpyinfo->display, + XScreenNumberOfScreen (dpyinfo->screen)); + + /* Truncate nr_planes to 24 to avoid integer overflow. + Some displays says 32, but only 24 bits are actually significant. + There are only very few and rare video cards that have more than + 24 significant bits. Also 24 bits is more than 16 million colors, + it "should be enough for everyone". */ + if (nr_planes > 24) nr_planes = 24; + + return make_number (1 << nr_planes); } DEFUN ("x-server-max-request-size", Fx_server_max_request_size, @@ -4174,9 +3873,6 @@ If DISPLAY is nil, that stands for the selected frame's display. */) for (i = 0; i < dpyinfo->n_fonts; i++) if (dpyinfo->font_table[i].name) { - if (dpyinfo->font_table[i].name != dpyinfo->font_table[i].full_name) - xfree (dpyinfo->font_table[i].full_name); - xfree (dpyinfo->font_table[i].name); XFreeFont (dpyinfo->display, dpyinfo->font_table[i].font); } @@ -4240,5266 +3936,212 @@ x_sync (f) /*********************************************************************** - Image types + Window properties ***********************************************************************/ -/* Value is the number of elements of vector VECTOR. */ - -#define DIM(VECTOR) (sizeof (VECTOR) / sizeof *(VECTOR)) - -/* List of supported image types. Use define_image_type to add new - types. Use lookup_image_type to find a type for a given symbol. */ - -static struct image_type *image_types; - -/* The symbol `image' which is the car of the lists used to represent - images in Lisp. */ - -extern Lisp_Object Qimage; - -/* The symbol `xbm' which is used as the type symbol for XBM images. */ - -Lisp_Object Qxbm; +DEFUN ("x-change-window-property", Fx_change_window_property, + Sx_change_window_property, 2, 6, 0, + doc: /* Change window property PROP to VALUE on the X window of FRAME. +PROP must be a string. +VALUE may be a string or a list of conses, numbers and/or strings. +If an element in the list is a string, it is converted to +an Atom and the value of the Atom is used. If an element is a cons, +it is converted to a 32 bit number where the car is the 16 top bits and the +cdr is the lower 16 bits. +FRAME nil or omitted means use the selected frame. +If TYPE is given and non-nil, it is the name of the type of VALUE. +If TYPE is not given or nil, the type is STRING. +FORMAT gives the size in bits of each element if VALUE is a list. +It must be one of 8, 16 or 32. +If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8. +If OUTER_P is non-nil, the property is changed for the outer X window of +FRAME. Default is to change on the edit X window. + +Value is VALUE. */) + (prop, value, frame, type, format, outer_p) + Lisp_Object prop, value, frame, type, format, outer_p; +{ + struct frame *f = check_x_frame (frame); + Atom prop_atom; + Atom target_type = XA_STRING; + int element_format = 8; + unsigned char *data; + int nelements; + Window w; -/* Keywords. */ + CHECK_STRING (prop); -extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile; -extern Lisp_Object QCdata, QCtype; -Lisp_Object QCascent, QCmargin, QCrelief; -Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask; -Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask; + if (! NILP (format)) + { + CHECK_NUMBER (format); + element_format = XFASTINT (format); -/* Other symbols. */ + if (element_format != 8 && element_format != 16 + && element_format != 32) + error ("FORMAT must be one of 8, 16 or 32"); + } -Lisp_Object Qlaplace, Qemboss, Qedge_detection, Qheuristic; + if (CONSP (value)) + { + nelements = x_check_property_data (value); + if (nelements == -1) + error ("Bad data in VALUE, must be number, string or cons"); -/* Time in seconds after which images should be removed from the cache - if not displayed. */ + if (element_format == 8) + data = (unsigned char *) xmalloc (nelements); + else if (element_format == 16) + data = (unsigned char *) xmalloc (nelements*2); + else + data = (unsigned char *) xmalloc (nelements*4); -Lisp_Object Vimage_cache_eviction_delay; + x_fill_property_data (FRAME_X_DISPLAY (f), value, data, element_format); + } + else + { + CHECK_STRING (value); + data = SDATA (value); + nelements = SCHARS (value); + } -/* Function prototypes. */ + BLOCK_INPUT; + prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False); + if (! NILP (type)) + { + CHECK_STRING (type); + target_type = XInternAtom (FRAME_X_DISPLAY (f), SDATA (type), False); + } -static void define_image_type P_ ((struct image_type *type)); -static struct image_type *lookup_image_type P_ ((Lisp_Object symbol)); -static void image_error P_ ((char *format, Lisp_Object, Lisp_Object)); -static void x_laplace P_ ((struct frame *, struct image *)); -static void x_emboss P_ ((struct frame *, struct image *)); -static int x_build_heuristic_mask P_ ((struct frame *, struct image *, - Lisp_Object)); + if (! NILP (outer_p)) w = FRAME_OUTER_WINDOW (f); + else w = FRAME_X_WINDOW (f); + + XChangeProperty (FRAME_X_DISPLAY (f), w, + prop_atom, target_type, element_format, PropModeReplace, + data, nelements); + if (CONSP (value)) xfree (data); -/* Define a new image type from TYPE. This adds a copy of TYPE to - image_types and adds the symbol *TYPE->type to Vimage_types. */ + /* Make sure the property is set when we return. */ + XFlush (FRAME_X_DISPLAY (f)); + UNBLOCK_INPUT; -static void -define_image_type (type) - struct image_type *type; -{ - /* Make a copy of TYPE to avoid a bus error in a dumped Emacs. - The initialized data segment is read-only. */ - struct image_type *p = (struct image_type *) xmalloc (sizeof *p); - bcopy (type, p, sizeof *p); - p->next = image_types; - image_types = p; - Vimage_types = Fcons (*p->type, Vimage_types); + return value; } -/* Look up image type SYMBOL, and return a pointer to its image_type - structure. Value is null if SYMBOL is not a known image type. */ - -static INLINE struct image_type * -lookup_image_type (symbol) - Lisp_Object symbol; +DEFUN ("x-delete-window-property", Fx_delete_window_property, + Sx_delete_window_property, 1, 2, 0, + doc: /* Remove window property PROP from X window of FRAME. +FRAME nil or omitted means use the selected frame. Value is PROP. */) + (prop, frame) + Lisp_Object prop, frame; { - struct image_type *type; + struct frame *f = check_x_frame (frame); + Atom prop_atom; - for (type = image_types; type; type = type->next) - if (EQ (symbol, *type->type)) - break; + CHECK_STRING (prop); + BLOCK_INPUT; + prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False); + XDeleteProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), prop_atom); - return type; -} + /* Make sure the property is removed when we return. */ + XFlush (FRAME_X_DISPLAY (f)); + UNBLOCK_INPUT; + return prop; +} -/* Value is non-zero if OBJECT is a valid Lisp image specification. A - valid image specification is a list whose car is the symbol - `image', and whose rest is a property list. The property list must - contain a value for key `:type'. That value must be the name of a - supported image type. The rest of the property list depends on the - image type. */ -int -valid_image_p (object) - Lisp_Object object; +DEFUN ("x-window-property", Fx_window_property, Sx_window_property, + 1, 6, 0, + doc: /* Value is the value of window property PROP on FRAME. +If FRAME is nil or omitted, use the selected frame. +If TYPE is nil or omitted, get the property as a string. Otherwise TYPE +is the name of the Atom that denotes the type expected. +If SOURCE is non-nil, get the property on that window instead of from +FRAME. The number 0 denotes the root window. +If DELETE_P is non-nil, delete the property after retreiving it. +If VECTOR_RET_P is non-nil, don't return a string but a vector of values. + +Value is nil if FRAME hasn't a property with name PROP or if PROP has +no value of TYPE. */) + (prop, frame, type, source, delete_p, vector_ret_p) + Lisp_Object prop, frame, type, source, delete_p, vector_ret_p; { - int valid_p = 0; + struct frame *f = check_x_frame (frame); + Atom prop_atom; + int rc; + Lisp_Object prop_value = Qnil; + char *tmp_data = NULL; + Atom actual_type; + Atom target_type = XA_STRING; + int actual_format; + unsigned long actual_size, bytes_remaining; + Window target_window = FRAME_X_WINDOW (f); + struct gcpro gcpro1; - if (CONSP (object) && EQ (XCAR (object), Qimage)) - { - Lisp_Object tem; + GCPRO1 (prop_value); + CHECK_STRING (prop); - for (tem = XCDR (object); CONSP (tem); tem = XCDR (tem)) - if (EQ (XCAR (tem), QCtype)) - { - tem = XCDR (tem); - if (CONSP (tem) && SYMBOLP (XCAR (tem))) - { - struct image_type *type; - type = lookup_image_type (XCAR (tem)); - if (type) - valid_p = type->valid_p (object); - } + if (! NILP (source)) + { + if (NUMBERP (source)) + { + if (FLOATP (source)) + target_window = (Window) XFLOAT (source); + else + target_window = XFASTINT (source); - break; - } + if (target_window == 0) + target_window = FRAME_X_DISPLAY_INFO (f)->root_window; + } + else if (CONSP (source)) + target_window = cons_to_long (source); } - return valid_p; -} + BLOCK_INPUT; + if (STRINGP (type)) + { + if (strcmp ("AnyPropertyType", SDATA (type)) == 0) + target_type = AnyPropertyType; + else + target_type = XInternAtom (FRAME_X_DISPLAY (f), SDATA (type), False); + } + prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False); + rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window, + prop_atom, 0, 0, False, target_type, + &actual_type, &actual_format, &actual_size, + &bytes_remaining, (unsigned char **) &tmp_data); + if (rc == Success) + { + int size = bytes_remaining; -/* Log error message with format string FORMAT and argument ARG. - Signaling an error, e.g. when an image cannot be loaded, is not a - good idea because this would interrupt redisplay, and the error - message display would lead to another redisplay. This function - therefore simply displays a message. */ + XFree (tmp_data); + tmp_data = NULL; -static void -image_error (format, arg1, arg2) - char *format; - Lisp_Object arg1, arg2; -{ - add_to_log (format, arg1, arg2); -} - - - -/*********************************************************************** - Image specifications - ***********************************************************************/ - -enum image_value_type -{ - IMAGE_DONT_CHECK_VALUE_TYPE, - IMAGE_STRING_VALUE, - IMAGE_STRING_OR_NIL_VALUE, - IMAGE_SYMBOL_VALUE, - IMAGE_POSITIVE_INTEGER_VALUE, - IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, - IMAGE_NON_NEGATIVE_INTEGER_VALUE, - IMAGE_ASCENT_VALUE, - IMAGE_INTEGER_VALUE, - IMAGE_FUNCTION_VALUE, - IMAGE_NUMBER_VALUE, - IMAGE_BOOL_VALUE -}; - -/* Structure used when parsing image specifications. */ - -struct image_keyword -{ - /* Name of keyword. */ - char *name; - - /* The type of value allowed. */ - enum image_value_type type; - - /* Non-zero means key must be present. */ - int mandatory_p; - - /* Used to recognize duplicate keywords in a property list. */ - int count; - - /* The value that was found. */ - Lisp_Object value; -}; - - -static int parse_image_spec P_ ((Lisp_Object, struct image_keyword *, - int, Lisp_Object)); -static Lisp_Object image_spec_value P_ ((Lisp_Object, Lisp_Object, int *)); - - -/* Parse image spec SPEC according to KEYWORDS. A valid image spec - has the format (image KEYWORD VALUE ...). One of the keyword/ - value pairs must be `:type TYPE'. KEYWORDS is a vector of - image_keywords structures of size NKEYWORDS describing other - allowed keyword/value pairs. Value is non-zero if SPEC is valid. */ - -static int -parse_image_spec (spec, keywords, nkeywords, type) - Lisp_Object spec; - struct image_keyword *keywords; - int nkeywords; - Lisp_Object type; -{ - int i; - Lisp_Object plist; - - if (!CONSP (spec) || !EQ (XCAR (spec), Qimage)) - return 0; - - plist = XCDR (spec); - while (CONSP (plist)) - { - Lisp_Object key, value; - - /* First element of a pair must be a symbol. */ - key = XCAR (plist); - plist = XCDR (plist); - if (!SYMBOLP (key)) - return 0; - - /* There must follow a value. */ - if (!CONSP (plist)) - return 0; - value = XCAR (plist); - plist = XCDR (plist); - - /* Find key in KEYWORDS. Error if not found. */ - for (i = 0; i < nkeywords; ++i) - if (strcmp (keywords[i].name, SDATA (SYMBOL_NAME (key))) == 0) - break; - - if (i == nkeywords) - continue; - - /* Record that we recognized the keyword. If a keywords - was found more than once, it's an error. */ - keywords[i].value = value; - ++keywords[i].count; - - if (keywords[i].count > 1) - return 0; - - /* Check type of value against allowed type. */ - switch (keywords[i].type) - { - case IMAGE_STRING_VALUE: - if (!STRINGP (value)) - return 0; - break; - - case IMAGE_STRING_OR_NIL_VALUE: - if (!STRINGP (value) && !NILP (value)) - return 0; - break; - - case IMAGE_SYMBOL_VALUE: - if (!SYMBOLP (value)) - return 0; - break; - - case IMAGE_POSITIVE_INTEGER_VALUE: - if (!INTEGERP (value) || XINT (value) <= 0) - return 0; - break; - - case IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR: - if (INTEGERP (value) && XINT (value) >= 0) - break; - if (CONSP (value) - && INTEGERP (XCAR (value)) && INTEGERP (XCDR (value)) - && XINT (XCAR (value)) >= 0 && XINT (XCDR (value)) >= 0) - break; - return 0; - - case IMAGE_ASCENT_VALUE: - if (SYMBOLP (value) && EQ (value, Qcenter)) - break; - else if (INTEGERP (value) - && XINT (value) >= 0 - && XINT (value) <= 100) - break; - return 0; - - case IMAGE_NON_NEGATIVE_INTEGER_VALUE: - if (!INTEGERP (value) || XINT (value) < 0) - return 0; - break; - - case IMAGE_DONT_CHECK_VALUE_TYPE: - break; - - case IMAGE_FUNCTION_VALUE: - value = indirect_function (value); - if (SUBRP (value) - || COMPILEDP (value) - || (CONSP (value) && EQ (XCAR (value), Qlambda))) - break; - return 0; - - case IMAGE_NUMBER_VALUE: - if (!INTEGERP (value) && !FLOATP (value)) - return 0; - break; - - case IMAGE_INTEGER_VALUE: - if (!INTEGERP (value)) - return 0; - break; - - case IMAGE_BOOL_VALUE: - if (!NILP (value) && !EQ (value, Qt)) - return 0; - break; - - default: - abort (); - break; - } - - if (EQ (key, QCtype) && !EQ (type, value)) - return 0; - } - - /* Check that all mandatory fields are present. */ - for (i = 0; i < nkeywords; ++i) - if (keywords[i].mandatory_p && keywords[i].count == 0) - return 0; - - return NILP (plist); -} - - -/* Return the value of KEY in image specification SPEC. Value is nil - if KEY is not present in SPEC. if FOUND is not null, set *FOUND - to 1 if KEY was found in SPEC, set it to 0 otherwise. */ - -static Lisp_Object -image_spec_value (spec, key, found) - Lisp_Object spec, key; - int *found; -{ - Lisp_Object tail; - - xassert (valid_image_p (spec)); - - for (tail = XCDR (spec); - CONSP (tail) && CONSP (XCDR (tail)); - tail = XCDR (XCDR (tail))) - { - if (EQ (XCAR (tail), key)) - { - if (found) - *found = 1; - return XCAR (XCDR (tail)); - } - } - - if (found) - *found = 0; - return Qnil; -} - - -DEFUN ("image-size", Fimage_size, Simage_size, 1, 3, 0, - doc: /* Return the size of image SPEC as pair (WIDTH . HEIGHT). -PIXELS non-nil means return the size in pixels, otherwise return the -size in canonical character units. -FRAME is the frame on which the image will be displayed. FRAME nil -or omitted means use the selected frame. */) - (spec, pixels, frame) - Lisp_Object spec, pixels, frame; -{ - Lisp_Object size; - - size = Qnil; - if (valid_image_p (spec)) - { - struct frame *f = check_x_frame (frame); - int id = lookup_image (f, spec); - struct image *img = IMAGE_FROM_ID (f, id); - int width = img->width + 2 * img->hmargin; - int height = img->height + 2 * img->vmargin; - - if (NILP (pixels)) - size = Fcons (make_float ((double) width / FRAME_COLUMN_WIDTH (f)), - make_float ((double) height / FRAME_LINE_HEIGHT (f))); - else - size = Fcons (make_number (width), make_number (height)); - } - else - error ("Invalid image specification"); - - return size; -} - - -DEFUN ("image-mask-p", Fimage_mask_p, Simage_mask_p, 1, 2, 0, - doc: /* Return t if image SPEC has a mask bitmap. -FRAME is the frame on which the image will be displayed. FRAME nil -or omitted means use the selected frame. */) - (spec, frame) - Lisp_Object spec, frame; -{ - Lisp_Object mask; - - mask = Qnil; - if (valid_image_p (spec)) - { - struct frame *f = check_x_frame (frame); - int id = lookup_image (f, spec); - struct image *img = IMAGE_FROM_ID (f, id); - if (img->mask) - mask = Qt; - } - else - error ("Invalid image specification"); - - return mask; -} - - - -/*********************************************************************** - Image type independent image structures - ***********************************************************************/ - -static struct image *make_image P_ ((Lisp_Object spec, unsigned hash)); -static void free_image P_ ((struct frame *f, struct image *img)); - - -/* Allocate and return a new image structure for image specification - SPEC. SPEC has a hash value of HASH. */ - -static struct image * -make_image (spec, hash) - Lisp_Object spec; - unsigned hash; -{ - struct image *img = (struct image *) xmalloc (sizeof *img); - - xassert (valid_image_p (spec)); - bzero (img, sizeof *img); - img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL)); - xassert (img->type != NULL); - img->spec = spec; - img->data.lisp_val = Qnil; - img->ascent = DEFAULT_IMAGE_ASCENT; - img->hash = hash; - return img; -} - - -/* Free image IMG which was used on frame F, including its resources. */ - -static void -free_image (f, img) - struct frame *f; - struct image *img; -{ - if (img) - { - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - - /* Remove IMG from the hash table of its cache. */ - if (img->prev) - img->prev->next = img->next; - else - c->buckets[img->hash % IMAGE_CACHE_BUCKETS_SIZE] = img->next; - - if (img->next) - img->next->prev = img->prev; - - c->images[img->id] = NULL; - - /* Free resources, then free IMG. */ - img->type->free (f, img); - xfree (img); - } -} - - -/* Prepare image IMG for display on frame F. Must be called before - drawing an image. */ - -void -prepare_image_for_display (f, img) - struct frame *f; - struct image *img; -{ - EMACS_TIME t; - - /* We're about to display IMG, so set its timestamp to `now'. */ - EMACS_GET_TIME (t); - img->timestamp = EMACS_SECS (t); - - /* If IMG doesn't have a pixmap yet, load it now, using the image - type dependent loader function. */ - if (img->pixmap == None && !img->load_failed_p) - img->load_failed_p = img->type->load (f, img) == 0; -} - - -/* Value is the number of pixels for the ascent of image IMG when - drawn in face FACE. */ - -int -image_ascent (img, face) - struct image *img; - struct face *face; -{ - int height = img->height + img->vmargin; - int ascent; - - if (img->ascent == CENTERED_IMAGE_ASCENT) - { - if (face->font) - /* This expression is arranged so that if the image can't be - exactly centered, it will be moved slightly up. This is - because a typical font is `top-heavy' (due to the presence - uppercase letters), so the image placement should err towards - being top-heavy too. It also just generally looks better. */ - ascent = (height + face->font->ascent - face->font->descent + 1) / 2; - else - ascent = height / 2; - } - else - ascent = height * img->ascent / 100.0; - - return ascent; -} - - -/* Image background colors. */ - -static unsigned long -four_corners_best (ximg, width, height) - XImage *ximg; - unsigned long width, height; -{ - unsigned long corners[4], best; - int i, best_count; - - /* Get the colors at the corners of ximg. */ - corners[0] = XGetPixel (ximg, 0, 0); - corners[1] = XGetPixel (ximg, width - 1, 0); - corners[2] = XGetPixel (ximg, width - 1, height - 1); - corners[3] = XGetPixel (ximg, 0, height - 1); - - /* Choose the most frequently found color as background. */ - for (i = best_count = 0; i < 4; ++i) - { - int j, n; - - for (j = n = 0; j < 4; ++j) - if (corners[i] == corners[j]) - ++n; - - if (n > best_count) - best = corners[i], best_count = n; - } - - return best; -} - -/* Return the `background' field of IMG. If IMG doesn't have one yet, - it is guessed heuristically. If non-zero, XIMG is an existing XImage - object to use for the heuristic. */ - -unsigned long -image_background (img, f, ximg) - struct image *img; - struct frame *f; - XImage *ximg; -{ - if (! img->background_valid) - /* IMG doesn't have a background yet, try to guess a reasonable value. */ - { - int free_ximg = !ximg; - - if (! ximg) - ximg = XGetImage (FRAME_X_DISPLAY (f), img->pixmap, - 0, 0, img->width, img->height, ~0, ZPixmap); - - img->background = four_corners_best (ximg, img->width, img->height); - - if (free_ximg) - XDestroyImage (ximg); - - img->background_valid = 1; - } - - return img->background; -} - -/* Return the `background_transparent' field of IMG. If IMG doesn't - have one yet, it is guessed heuristically. If non-zero, MASK is an - existing XImage object to use for the heuristic. */ - -int -image_background_transparent (img, f, mask) - struct image *img; - struct frame *f; - XImage *mask; -{ - if (! img->background_transparent_valid) - /* IMG doesn't have a background yet, try to guess a reasonable value. */ - { - if (img->mask) - { - int free_mask = !mask; - - if (! mask) - mask = XGetImage (FRAME_X_DISPLAY (f), img->mask, - 0, 0, img->width, img->height, ~0, ZPixmap); - - img->background_transparent - = !four_corners_best (mask, img->width, img->height); - - if (free_mask) - XDestroyImage (mask); - } - else - img->background_transparent = 0; - - img->background_transparent_valid = 1; - } - - return img->background_transparent; -} - - -/*********************************************************************** - Helper functions for X image types - ***********************************************************************/ - -static void x_clear_image_1 P_ ((struct frame *, struct image *, int, - int, int)); -static void x_clear_image P_ ((struct frame *f, struct image *img)); -static unsigned long x_alloc_image_color P_ ((struct frame *f, - struct image *img, - Lisp_Object color_name, - unsigned long dflt)); - - -/* Clear X resources of image IMG on frame F. PIXMAP_P non-zero means - free the pixmap if any. MASK_P non-zero means clear the mask - pixmap if any. COLORS_P non-zero means free colors allocated for - the image, if any. */ - -static void -x_clear_image_1 (f, img, pixmap_p, mask_p, colors_p) - struct frame *f; - struct image *img; - int pixmap_p, mask_p, colors_p; -{ - if (pixmap_p && img->pixmap) - { - XFreePixmap (FRAME_X_DISPLAY (f), img->pixmap); - img->pixmap = None; - img->background_valid = 0; - } - - if (mask_p && img->mask) - { - XFreePixmap (FRAME_X_DISPLAY (f), img->mask); - img->mask = None; - img->background_transparent_valid = 0; - } - - if (colors_p && img->ncolors) - { - x_free_colors (f, img->colors, img->ncolors); - xfree (img->colors); - img->colors = NULL; - img->ncolors = 0; - } -} - -/* Free X resources of image IMG which is used on frame F. */ - -static void -x_clear_image (f, img) - struct frame *f; - struct image *img; -{ - BLOCK_INPUT; - x_clear_image_1 (f, img, 1, 1, 1); - UNBLOCK_INPUT; -} - - -/* Allocate color COLOR_NAME for image IMG on frame F. If color - cannot be allocated, use DFLT. Add a newly allocated color to - IMG->colors, so that it can be freed again. Value is the pixel - color. */ - -static unsigned long -x_alloc_image_color (f, img, color_name, dflt) - struct frame *f; - struct image *img; - Lisp_Object color_name; - unsigned long dflt; -{ - XColor color; - unsigned long result; - - xassert (STRINGP (color_name)); - - if (x_defined_color (f, SDATA (color_name), &color, 1)) - { - /* This isn't called frequently so we get away with simply - reallocating the color vector to the needed size, here. */ - ++img->ncolors; - img->colors = - (unsigned long *) xrealloc (img->colors, - img->ncolors * sizeof *img->colors); - img->colors[img->ncolors - 1] = color.pixel; - result = color.pixel; - } - else - result = dflt; - - return result; -} - - - -/*********************************************************************** - Image Cache - ***********************************************************************/ - -static void cache_image P_ ((struct frame *f, struct image *img)); -static void postprocess_image P_ ((struct frame *, struct image *)); - - -/* Return a new, initialized image cache that is allocated from the - heap. Call free_image_cache to free an image cache. */ - -struct image_cache * -make_image_cache () -{ - struct image_cache *c = (struct image_cache *) xmalloc (sizeof *c); - int size; - - bzero (c, sizeof *c); - c->size = 50; - c->images = (struct image **) xmalloc (c->size * sizeof *c->images); - size = IMAGE_CACHE_BUCKETS_SIZE * sizeof *c->buckets; - c->buckets = (struct image **) xmalloc (size); - bzero (c->buckets, size); - return c; -} - - -/* Free image cache of frame F. Be aware that X frames share images - caches. */ - -void -free_image_cache (f) - struct frame *f; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - if (c) - { - int i; - - /* Cache should not be referenced by any frame when freed. */ - xassert (c->refcount == 0); - - for (i = 0; i < c->used; ++i) - free_image (f, c->images[i]); - xfree (c->images); - xfree (c->buckets); - xfree (c); - FRAME_X_IMAGE_CACHE (f) = NULL; - } -} - - -/* Clear image cache of frame F. FORCE_P non-zero means free all - images. FORCE_P zero means clear only images that haven't been - displayed for some time. Should be called from time to time to - reduce the number of loaded images. If image-eviction-seconds is - non-nil, this frees images in the cache which weren't displayed for - at least that many seconds. */ - -void -clear_image_cache (f, force_p) - struct frame *f; - int force_p; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - - if (c && INTEGERP (Vimage_cache_eviction_delay)) - { - EMACS_TIME t; - unsigned long old; - int i, nfreed; - - EMACS_GET_TIME (t); - old = EMACS_SECS (t) - XFASTINT (Vimage_cache_eviction_delay); - - /* Block input so that we won't be interrupted by a SIGIO - while being in an inconsistent state. */ - BLOCK_INPUT; - - for (i = nfreed = 0; i < c->used; ++i) - { - struct image *img = c->images[i]; - if (img != NULL - && (force_p || img->timestamp < old)) - { - free_image (f, img); - ++nfreed; - } - } - - /* We may be clearing the image cache because, for example, - Emacs was iconified for a longer period of time. In that - case, current matrices may still contain references to - images freed above. So, clear these matrices. */ - if (nfreed) - { - Lisp_Object tail, frame; - - FOR_EACH_FRAME (tail, frame) - { - struct frame *f = XFRAME (frame); - if (FRAME_X_P (f) - && FRAME_X_IMAGE_CACHE (f) == c) - clear_current_matrices (f); - } - - ++windows_or_buffers_changed; - } - - UNBLOCK_INPUT; - } -} - - -DEFUN ("clear-image-cache", Fclear_image_cache, Sclear_image_cache, - 0, 1, 0, - doc: /* Clear the image cache of FRAME. -FRAME nil or omitted means use the selected frame. -FRAME t means clear the image caches of all frames. */) - (frame) - Lisp_Object frame; -{ - if (EQ (frame, Qt)) - { - Lisp_Object tail; - - FOR_EACH_FRAME (tail, frame) - if (FRAME_X_P (XFRAME (frame))) - clear_image_cache (XFRAME (frame), 1); - } - else - clear_image_cache (check_x_frame (frame), 1); - - return Qnil; -} - - -/* Compute masks and transform image IMG on frame F, as specified - by the image's specification, */ - -static void -postprocess_image (f, img) - struct frame *f; - struct image *img; -{ - /* Manipulation of the image's mask. */ - if (img->pixmap) - { - Lisp_Object conversion, spec; - Lisp_Object mask; - - spec = img->spec; - - /* `:heuristic-mask t' - `:mask heuristic' - means build a mask heuristically. - `:heuristic-mask (R G B)' - `:mask (heuristic (R G B))' - means build a mask from color (R G B) in the - image. - `:mask nil' - means remove a mask, if any. */ - - mask = image_spec_value (spec, QCheuristic_mask, NULL); - if (!NILP (mask)) - x_build_heuristic_mask (f, img, mask); - else - { - int found_p; - - mask = image_spec_value (spec, QCmask, &found_p); - - if (EQ (mask, Qheuristic)) - x_build_heuristic_mask (f, img, Qt); - else if (CONSP (mask) - && EQ (XCAR (mask), Qheuristic)) - { - if (CONSP (XCDR (mask))) - x_build_heuristic_mask (f, img, XCAR (XCDR (mask))); - else - x_build_heuristic_mask (f, img, XCDR (mask)); - } - else if (NILP (mask) && found_p && img->mask) - { - XFreePixmap (FRAME_X_DISPLAY (f), img->mask); - img->mask = None; - } - } - - - /* Should we apply an image transformation algorithm? */ - conversion = image_spec_value (spec, QCconversion, NULL); - if (EQ (conversion, Qdisabled)) - x_disable_image (f, img); - else if (EQ (conversion, Qlaplace)) - x_laplace (f, img); - else if (EQ (conversion, Qemboss)) - x_emboss (f, img); - else if (CONSP (conversion) - && EQ (XCAR (conversion), Qedge_detection)) - { - Lisp_Object tem; - tem = XCDR (conversion); - if (CONSP (tem)) - x_edge_detection (f, img, - Fplist_get (tem, QCmatrix), - Fplist_get (tem, QCcolor_adjustment)); - } - } -} - - -/* Return the id of image with Lisp specification SPEC on frame F. - SPEC must be a valid Lisp image specification (see valid_image_p). */ - -int -lookup_image (f, spec) - struct frame *f; - Lisp_Object spec; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - struct image *img; - int i; - unsigned hash; - struct gcpro gcpro1; - EMACS_TIME now; - - /* F must be a window-system frame, and SPEC must be a valid image - specification. */ - xassert (FRAME_WINDOW_P (f)); - xassert (valid_image_p (spec)); - - GCPRO1 (spec); - - /* Look up SPEC in the hash table of the image cache. */ - hash = sxhash (spec, 0); - i = hash % IMAGE_CACHE_BUCKETS_SIZE; - - for (img = c->buckets[i]; img; img = img->next) - if (img->hash == hash && !NILP (Fequal (img->spec, spec))) - break; - - /* If not found, create a new image and cache it. */ - if (img == NULL) - { - extern Lisp_Object Qpostscript; - - BLOCK_INPUT; - img = make_image (spec, hash); - cache_image (f, img); - img->load_failed_p = img->type->load (f, img) == 0; - - /* If we can't load the image, and we don't have a width and - height, use some arbitrary width and height so that we can - draw a rectangle for it. */ - if (img->load_failed_p) - { - Lisp_Object value; - - value = image_spec_value (spec, QCwidth, NULL); - img->width = (INTEGERP (value) - ? XFASTINT (value) : DEFAULT_IMAGE_WIDTH); - value = image_spec_value (spec, QCheight, NULL); - img->height = (INTEGERP (value) - ? XFASTINT (value) : DEFAULT_IMAGE_HEIGHT); - } - else - { - /* Handle image type independent image attributes - `:ascent ASCENT', `:margin MARGIN', `:relief RELIEF', - `:background COLOR'. */ - Lisp_Object ascent, margin, relief, bg; - - ascent = image_spec_value (spec, QCascent, NULL); - if (INTEGERP (ascent)) - img->ascent = XFASTINT (ascent); - else if (EQ (ascent, Qcenter)) - img->ascent = CENTERED_IMAGE_ASCENT; - - margin = image_spec_value (spec, QCmargin, NULL); - if (INTEGERP (margin) && XINT (margin) >= 0) - img->vmargin = img->hmargin = XFASTINT (margin); - else if (CONSP (margin) && INTEGERP (XCAR (margin)) - && INTEGERP (XCDR (margin))) - { - if (XINT (XCAR (margin)) > 0) - img->hmargin = XFASTINT (XCAR (margin)); - if (XINT (XCDR (margin)) > 0) - img->vmargin = XFASTINT (XCDR (margin)); - } - - relief = image_spec_value (spec, QCrelief, NULL); - if (INTEGERP (relief)) - { - img->relief = XINT (relief); - img->hmargin += abs (img->relief); - img->vmargin += abs (img->relief); - } - - if (! img->background_valid) - { - bg = image_spec_value (img->spec, QCbackground, NULL); - if (!NILP (bg)) - { - img->background - = x_alloc_image_color (f, img, bg, - FRAME_BACKGROUND_PIXEL (f)); - img->background_valid = 1; - } - } - - /* Do image transformations and compute masks, unless we - don't have the image yet. */ - if (!EQ (*img->type->type, Qpostscript)) - postprocess_image (f, img); - } - - UNBLOCK_INPUT; - xassert (!interrupt_input_blocked); - } - - /* We're using IMG, so set its timestamp to `now'. */ - EMACS_GET_TIME (now); - img->timestamp = EMACS_SECS (now); - - UNGCPRO; - - /* Value is the image id. */ - return img->id; -} - - -/* Cache image IMG in the image cache of frame F. */ - -static void -cache_image (f, img) - struct frame *f; - struct image *img; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - int i; - - /* Find a free slot in c->images. */ - for (i = 0; i < c->used; ++i) - if (c->images[i] == NULL) - break; - - /* If no free slot found, maybe enlarge c->images. */ - if (i == c->used && c->used == c->size) - { - c->size *= 2; - c->images = (struct image **) xrealloc (c->images, - c->size * sizeof *c->images); - } - - /* Add IMG to c->images, and assign IMG an id. */ - c->images[i] = img; - img->id = i; - if (i == c->used) - ++c->used; - - /* Add IMG to the cache's hash table. */ - i = img->hash % IMAGE_CACHE_BUCKETS_SIZE; - img->next = c->buckets[i]; - if (img->next) - img->next->prev = img; - img->prev = NULL; - c->buckets[i] = img; -} - - -/* Call FN on every image in the image cache of frame F. Used to mark - Lisp Objects in the image cache. */ - -void -forall_images_in_image_cache (f, fn) - struct frame *f; - void (*fn) P_ ((struct image *img)); -{ - if (FRAME_LIVE_P (f) && FRAME_X_P (f)) - { - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - if (c) - { - int i; - for (i = 0; i < c->used; ++i) - if (c->images[i]) - fn (c->images[i]); - } - } -} - - - -/*********************************************************************** - X support code - ***********************************************************************/ - -static int x_create_x_image_and_pixmap P_ ((struct frame *, int, int, int, - XImage **, Pixmap *)); -static void x_destroy_x_image P_ ((XImage *)); -static void x_put_x_image P_ ((struct frame *, XImage *, Pixmap, int, int)); - - -/* Create an XImage and a pixmap of size WIDTH x HEIGHT for use on - frame F. Set *XIMG and *PIXMAP to the XImage and Pixmap created. - Set (*XIMG)->data to a raster of WIDTH x HEIGHT pixels allocated - via xmalloc. Print error messages via image_error if an error - occurs. Value is non-zero if successful. */ - -static int -x_create_x_image_and_pixmap (f, width, height, depth, ximg, pixmap) - struct frame *f; - int width, height, depth; - XImage **ximg; - Pixmap *pixmap; -{ - Display *display = FRAME_X_DISPLAY (f); - Screen *screen = FRAME_X_SCREEN (f); - Window window = FRAME_X_WINDOW (f); - - xassert (interrupt_input_blocked); - - if (depth <= 0) - depth = DefaultDepthOfScreen (screen); - *ximg = XCreateImage (display, DefaultVisualOfScreen (screen), - depth, ZPixmap, 0, NULL, width, height, - depth > 16 ? 32 : depth > 8 ? 16 : 8, 0); - if (*ximg == NULL) - { - image_error ("Unable to allocate X image", Qnil, Qnil); - return 0; - } - - /* Allocate image raster. */ - (*ximg)->data = (char *) xmalloc ((*ximg)->bytes_per_line * height); - - /* Allocate a pixmap of the same size. */ - *pixmap = XCreatePixmap (display, window, width, height, depth); - if (*pixmap == None) - { - x_destroy_x_image (*ximg); - *ximg = NULL; - image_error ("Unable to create X pixmap", Qnil, Qnil); - return 0; - } - - return 1; -} - - -/* Destroy XImage XIMG. Free XIMG->data. */ - -static void -x_destroy_x_image (ximg) - XImage *ximg; -{ - xassert (interrupt_input_blocked); - if (ximg) - { - xfree (ximg->data); - ximg->data = NULL; - XDestroyImage (ximg); - } -} - - -/* Put XImage XIMG into pixmap PIXMAP on frame F. WIDTH and HEIGHT - are width and height of both the image and pixmap. */ - -static void -x_put_x_image (f, ximg, pixmap, width, height) - struct frame *f; - XImage *ximg; - Pixmap pixmap; - int width, height; -{ - GC gc; - - xassert (interrupt_input_blocked); - gc = XCreateGC (FRAME_X_DISPLAY (f), pixmap, 0, NULL); - XPutImage (FRAME_X_DISPLAY (f), pixmap, gc, ximg, 0, 0, 0, 0, width, height); - XFreeGC (FRAME_X_DISPLAY (f), gc); -} - - - -/*********************************************************************** - File Handling - ***********************************************************************/ - -static Lisp_Object x_find_image_file P_ ((Lisp_Object)); -static char *slurp_file P_ ((char *, int *)); - - -/* Find image file FILE. Look in data-directory, then - x-bitmap-file-path. Value is the full name of the file found, or - nil if not found. */ - -static Lisp_Object -x_find_image_file (file) - Lisp_Object file; -{ - Lisp_Object file_found, search_path; - struct gcpro gcpro1, gcpro2; - int fd; - - file_found = Qnil; - search_path = Fcons (Vdata_directory, Vx_bitmap_file_path); - GCPRO2 (file_found, search_path); - - /* Try to find FILE in data-directory, then x-bitmap-file-path. */ - fd = openp (search_path, file, Qnil, &file_found, Qnil); - - if (fd == -1) - file_found = Qnil; - else - close (fd); - - UNGCPRO; - return file_found; -} - - -/* Read FILE into memory. Value is a pointer to a buffer allocated - with xmalloc holding FILE's contents. Value is null if an error - occurred. *SIZE is set to the size of the file. */ - -static char * -slurp_file (file, size) - char *file; - int *size; -{ - FILE *fp = NULL; - char *buf = NULL; - struct stat st; - - if (stat (file, &st) == 0 - && (fp = fopen (file, "r")) != NULL - && (buf = (char *) xmalloc (st.st_size), - fread (buf, 1, st.st_size, fp) == st.st_size)) - { - *size = st.st_size; - fclose (fp); - } - else - { - if (fp) - fclose (fp); - if (buf) - { - xfree (buf); - buf = NULL; - } - } - - return buf; -} - - - -/*********************************************************************** - XBM images - ***********************************************************************/ - -static int xbm_scan P_ ((char **, char *, char *, int *)); -static int xbm_load P_ ((struct frame *f, struct image *img)); -static int xbm_load_image P_ ((struct frame *f, struct image *img, - char *, char *)); -static int xbm_image_p P_ ((Lisp_Object object)); -static int xbm_read_bitmap_data P_ ((char *, char *, int *, int *, - unsigned char **)); -static int xbm_file_p P_ ((Lisp_Object)); - - -/* Indices of image specification fields in xbm_format, below. */ - -enum xbm_keyword_index -{ - XBM_TYPE, - XBM_FILE, - XBM_WIDTH, - XBM_HEIGHT, - XBM_DATA, - XBM_FOREGROUND, - XBM_BACKGROUND, - XBM_ASCENT, - XBM_MARGIN, - XBM_RELIEF, - XBM_ALGORITHM, - XBM_HEURISTIC_MASK, - XBM_MASK, - XBM_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid XBM image specifications. */ - -static struct image_keyword xbm_format[XBM_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":file", IMAGE_STRING_VALUE, 0}, - {":width", IMAGE_POSITIVE_INTEGER_VALUE, 0}, - {":height", IMAGE_POSITIVE_INTEGER_VALUE, 0}, - {":data", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":foreground", IMAGE_STRING_OR_NIL_VALUE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} -}; - -/* Structure describing the image type XBM. */ - -static struct image_type xbm_type = -{ - &Qxbm, - xbm_image_p, - xbm_load, - x_clear_image, - NULL -}; - -/* Tokens returned from xbm_scan. */ - -enum xbm_token -{ - XBM_TK_IDENT = 256, - XBM_TK_NUMBER -}; - - -/* Return non-zero if OBJECT is a valid XBM-type image specification. - A valid specification is a list starting with the symbol `image' - The rest of the list is a property list which must contain an - entry `:type xbm.. - - If the specification specifies a file to load, it must contain - an entry `:file FILENAME' where FILENAME is a string. - - If the specification is for a bitmap loaded from memory it must - contain `:width WIDTH', `:height HEIGHT', and `:data DATA', where - WIDTH and HEIGHT are integers > 0. DATA may be: - - 1. a string large enough to hold the bitmap data, i.e. it must - have a size >= (WIDTH + 7) / 8 * HEIGHT - - 2. a bool-vector of size >= WIDTH * HEIGHT - - 3. a vector of strings or bool-vectors, one for each line of the - bitmap. - - 4. A string containing an in-memory XBM file. WIDTH and HEIGHT - may not be specified in this case because they are defined in the - XBM file. - - Both the file and data forms may contain the additional entries - `:background COLOR' and `:foreground COLOR'. If not present, - foreground and background of the frame on which the image is - displayed is used. */ - -static int -xbm_image_p (object) - Lisp_Object object; -{ - struct image_keyword kw[XBM_LAST]; - - bcopy (xbm_format, kw, sizeof kw); - if (!parse_image_spec (object, kw, XBM_LAST, Qxbm)) - return 0; - - xassert (EQ (kw[XBM_TYPE].value, Qxbm)); - - if (kw[XBM_FILE].count) - { - if (kw[XBM_WIDTH].count || kw[XBM_HEIGHT].count || kw[XBM_DATA].count) - return 0; - } - else if (kw[XBM_DATA].count && xbm_file_p (kw[XBM_DATA].value)) - { - /* In-memory XBM file. */ - if (kw[XBM_WIDTH].count || kw[XBM_HEIGHT].count || kw[XBM_FILE].count) - return 0; - } - else - { - Lisp_Object data; - int width, height; - - /* Entries for `:width', `:height' and `:data' must be present. */ - if (!kw[XBM_WIDTH].count - || !kw[XBM_HEIGHT].count - || !kw[XBM_DATA].count) - return 0; - - data = kw[XBM_DATA].value; - width = XFASTINT (kw[XBM_WIDTH].value); - height = XFASTINT (kw[XBM_HEIGHT].value); - - /* Check type of data, and width and height against contents of - data. */ - if (VECTORP (data)) - { - int i; - - /* Number of elements of the vector must be >= height. */ - if (XVECTOR (data)->size < height) - return 0; - - /* Each string or bool-vector in data must be large enough - for one line of the image. */ - for (i = 0; i < height; ++i) - { - Lisp_Object elt = XVECTOR (data)->contents[i]; - - if (STRINGP (elt)) - { - if (SCHARS (elt) - < (width + BITS_PER_CHAR - 1) / BITS_PER_CHAR) - return 0; - } - else if (BOOL_VECTOR_P (elt)) - { - if (XBOOL_VECTOR (elt)->size < width) - return 0; - } - else - return 0; - } - } - else if (STRINGP (data)) - { - if (SCHARS (data) - < (width + BITS_PER_CHAR - 1) / BITS_PER_CHAR * height) - return 0; - } - else if (BOOL_VECTOR_P (data)) - { - if (XBOOL_VECTOR (data)->size < width * height) - return 0; - } - else - return 0; - } - - return 1; -} - - -/* Scan a bitmap file. FP is the stream to read from. Value is - either an enumerator from enum xbm_token, or a character for a - single-character token, or 0 at end of file. If scanning an - identifier, store the lexeme of the identifier in SVAL. If - scanning a number, store its value in *IVAL. */ - -static int -xbm_scan (s, end, sval, ival) - char **s, *end; - char *sval; - int *ival; -{ - int c; - - loop: - - /* Skip white space. */ - while (*s < end && (c = *(*s)++, isspace (c))) - ; - - if (*s >= end) - c = 0; - else if (isdigit (c)) - { - int value = 0, digit; - - if (c == '0' && *s < end) - { - c = *(*s)++; - if (c == 'x' || c == 'X') - { - while (*s < end) - { - c = *(*s)++; - if (isdigit (c)) - digit = c - '0'; - else if (c >= 'a' && c <= 'f') - digit = c - 'a' + 10; - else if (c >= 'A' && c <= 'F') - digit = c - 'A' + 10; - else - break; - value = 16 * value + digit; - } - } - else if (isdigit (c)) - { - value = c - '0'; - while (*s < end - && (c = *(*s)++, isdigit (c))) - value = 8 * value + c - '0'; - } - } - else - { - value = c - '0'; - while (*s < end - && (c = *(*s)++, isdigit (c))) - value = 10 * value + c - '0'; - } - - if (*s < end) - *s = *s - 1; - *ival = value; - c = XBM_TK_NUMBER; - } - else if (isalpha (c) || c == '_') - { - *sval++ = c; - while (*s < end - && (c = *(*s)++, (isalnum (c) || c == '_'))) - *sval++ = c; - *sval = 0; - if (*s < end) - *s = *s - 1; - c = XBM_TK_IDENT; - } - else if (c == '/' && **s == '*') - { - /* C-style comment. */ - ++*s; - while (**s && (**s != '*' || *(*s + 1) != '/')) - ++*s; - if (**s) - { - *s += 2; - goto loop; - } - } - - return c; -} - - -/* Replacement for XReadBitmapFileData which isn't available under old - X versions. CONTENTS is a pointer to a buffer to parse; END is the - buffer's end. Set *WIDTH and *HEIGHT to the width and height of - the image. Return in *DATA the bitmap data allocated with xmalloc. - Value is non-zero if successful. DATA null means just test if - CONTENTS looks like an in-memory XBM file. */ - -static int -xbm_read_bitmap_data (contents, end, width, height, data) - char *contents, *end; - int *width, *height; - unsigned char **data; -{ - char *s = contents; - char buffer[BUFSIZ]; - int padding_p = 0; - int v10 = 0; - int bytes_per_line, i, nbytes; - unsigned char *p; - int value; - int LA1; - -#define match() \ - LA1 = xbm_scan (&s, end, buffer, &value) - -#define expect(TOKEN) \ - if (LA1 != (TOKEN)) \ - goto failure; \ - else \ - match () - -#define expect_ident(IDENT) \ - if (LA1 == XBM_TK_IDENT && strcmp (buffer, (IDENT)) == 0) \ - match (); \ - else \ - goto failure - - *width = *height = -1; - if (data) - *data = NULL; - LA1 = xbm_scan (&s, end, buffer, &value); - - /* Parse defines for width, height and hot-spots. */ - while (LA1 == '#') - { - match (); - expect_ident ("define"); - expect (XBM_TK_IDENT); - - if (LA1 == XBM_TK_NUMBER); - { - char *p = strrchr (buffer, '_'); - p = p ? p + 1 : buffer; - if (strcmp (p, "width") == 0) - *width = value; - else if (strcmp (p, "height") == 0) - *height = value; - } - expect (XBM_TK_NUMBER); - } - - if (*width < 0 || *height < 0) - goto failure; - else if (data == NULL) - goto success; - - /* Parse bits. Must start with `static'. */ - expect_ident ("static"); - if (LA1 == XBM_TK_IDENT) - { - if (strcmp (buffer, "unsigned") == 0) - { - match (); - expect_ident ("char"); - } - else if (strcmp (buffer, "short") == 0) - { - match (); - v10 = 1; - if (*width % 16 && *width % 16 < 9) - padding_p = 1; - } - else if (strcmp (buffer, "char") == 0) - match (); - else - goto failure; - } - else - goto failure; - - expect (XBM_TK_IDENT); - expect ('['); - expect (']'); - expect ('='); - expect ('{'); - - bytes_per_line = (*width + 7) / 8 + padding_p; - nbytes = bytes_per_line * *height; - p = *data = (char *) xmalloc (nbytes); - - if (v10) - { - for (i = 0; i < nbytes; i += 2) - { - int val = value; - expect (XBM_TK_NUMBER); - - *p++ = val; - if (!padding_p || ((i + 2) % bytes_per_line)) - *p++ = value >> 8; - - if (LA1 == ',' || LA1 == '}') - match (); - else - goto failure; - } - } - else - { - for (i = 0; i < nbytes; ++i) - { - int val = value; - expect (XBM_TK_NUMBER); - - *p++ = val; - - if (LA1 == ',' || LA1 == '}') - match (); - else - goto failure; - } - } - - success: - return 1; - - failure: - - if (data && *data) - { - xfree (*data); - *data = NULL; - } - return 0; - -#undef match -#undef expect -#undef expect_ident -} - - -/* Load XBM image IMG which will be displayed on frame F from buffer - CONTENTS. END is the end of the buffer. Value is non-zero if - successful. */ - -static int -xbm_load_image (f, img, contents, end) - struct frame *f; - struct image *img; - char *contents, *end; -{ - int rc; - unsigned char *data; - int success_p = 0; - - rc = xbm_read_bitmap_data (contents, end, &img->width, &img->height, &data); - if (rc) - { - int depth = DefaultDepthOfScreen (FRAME_X_SCREEN (f)); - unsigned long foreground = FRAME_FOREGROUND_PIXEL (f); - unsigned long background = FRAME_BACKGROUND_PIXEL (f); - Lisp_Object value; - - xassert (img->width > 0 && img->height > 0); - - /* Get foreground and background colors, maybe allocate colors. */ - value = image_spec_value (img->spec, QCforeground, NULL); - if (!NILP (value)) - foreground = x_alloc_image_color (f, img, value, foreground); - value = image_spec_value (img->spec, QCbackground, NULL); - if (!NILP (value)) - { - background = x_alloc_image_color (f, img, value, background); - img->background = background; - img->background_valid = 1; - } - - img->pixmap - = XCreatePixmapFromBitmapData (FRAME_X_DISPLAY (f), - FRAME_X_WINDOW (f), - data, - img->width, img->height, - foreground, background, - depth); - xfree (data); - - if (img->pixmap == None) - { - x_clear_image (f, img); - image_error ("Unable to create X pixmap for `%s'", img->spec, Qnil); - } - else - success_p = 1; - } - else - image_error ("Error loading XBM image `%s'", img->spec, Qnil); - - return success_p; -} - - -/* Value is non-zero if DATA looks like an in-memory XBM file. */ - -static int -xbm_file_p (data) - Lisp_Object data; -{ - int w, h; - return (STRINGP (data) - && xbm_read_bitmap_data (SDATA (data), - (SDATA (data) - + SBYTES (data)), - &w, &h, NULL)); -} - - -/* Fill image IMG which is used on frame F with pixmap data. Value is - non-zero if successful. */ - -static int -xbm_load (f, img) - struct frame *f; - struct image *img; -{ - int success_p = 0; - Lisp_Object file_name; - - xassert (xbm_image_p (img->spec)); - - /* If IMG->spec specifies a file name, create a non-file spec from it. */ - file_name = image_spec_value (img->spec, QCfile, NULL); - if (STRINGP (file_name)) - { - Lisp_Object file; - char *contents; - int size; - struct gcpro gcpro1; - - file = x_find_image_file (file_name); - GCPRO1 (file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", file_name, Qnil); - UNGCPRO; - return 0; - } - - contents = slurp_file (SDATA (file), &size); - if (contents == NULL) - { - image_error ("Error loading XBM image `%s'", img->spec, Qnil); - UNGCPRO; - return 0; - } - - success_p = xbm_load_image (f, img, contents, contents + size); - UNGCPRO; - } - else - { - struct image_keyword fmt[XBM_LAST]; - Lisp_Object data; - int depth; - unsigned long foreground = FRAME_FOREGROUND_PIXEL (f); - unsigned long background = FRAME_BACKGROUND_PIXEL (f); - char *bits; - int parsed_p; - int in_memory_file_p = 0; - - /* See if data looks like an in-memory XBM file. */ - data = image_spec_value (img->spec, QCdata, NULL); - in_memory_file_p = xbm_file_p (data); - - /* Parse the image specification. */ - bcopy (xbm_format, fmt, sizeof fmt); - parsed_p = parse_image_spec (img->spec, fmt, XBM_LAST, Qxbm); - xassert (parsed_p); - - /* Get specified width, and height. */ - if (!in_memory_file_p) - { - img->width = XFASTINT (fmt[XBM_WIDTH].value); - img->height = XFASTINT (fmt[XBM_HEIGHT].value); - xassert (img->width > 0 && img->height > 0); - } - - /* Get foreground and background colors, maybe allocate colors. */ - if (fmt[XBM_FOREGROUND].count - && STRINGP (fmt[XBM_FOREGROUND].value)) - foreground = x_alloc_image_color (f, img, fmt[XBM_FOREGROUND].value, - foreground); - if (fmt[XBM_BACKGROUND].count - && STRINGP (fmt[XBM_BACKGROUND].value)) - background = x_alloc_image_color (f, img, fmt[XBM_BACKGROUND].value, - background); - - if (in_memory_file_p) - success_p = xbm_load_image (f, img, SDATA (data), - (SDATA (data) - + SBYTES (data))); - else - { - if (VECTORP (data)) - { - int i; - char *p; - int nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR; - - p = bits = (char *) alloca (nbytes * img->height); - for (i = 0; i < img->height; ++i, p += nbytes) - { - Lisp_Object line = XVECTOR (data)->contents[i]; - if (STRINGP (line)) - bcopy (SDATA (line), p, nbytes); - else - bcopy (XBOOL_VECTOR (line)->data, p, nbytes); - } - } - else if (STRINGP (data)) - bits = SDATA (data); - else - bits = XBOOL_VECTOR (data)->data; - - /* Create the pixmap. */ - depth = DefaultDepthOfScreen (FRAME_X_SCREEN (f)); - img->pixmap - = XCreatePixmapFromBitmapData (FRAME_X_DISPLAY (f), - FRAME_X_WINDOW (f), - bits, - img->width, img->height, - foreground, background, - depth); - if (img->pixmap) - success_p = 1; - else - { - image_error ("Unable to create pixmap for XBM image `%s'", - img->spec, Qnil); - x_clear_image (f, img); - } - } - } - - return success_p; -} - - - -/*********************************************************************** - XPM images - ***********************************************************************/ - -#if HAVE_XPM - -static int xpm_image_p P_ ((Lisp_Object object)); -static int xpm_load P_ ((struct frame *f, struct image *img)); -static int xpm_valid_color_symbols_p P_ ((Lisp_Object)); - -#include "X11/xpm.h" - -/* The symbol `xpm' identifying XPM-format images. */ - -Lisp_Object Qxpm; - -/* Indices of image specification fields in xpm_format, below. */ - -enum xpm_keyword_index -{ - XPM_TYPE, - XPM_FILE, - XPM_DATA, - XPM_ASCENT, - XPM_MARGIN, - XPM_RELIEF, - XPM_ALGORITHM, - XPM_HEURISTIC_MASK, - XPM_MASK, - XPM_COLOR_SYMBOLS, - XPM_BACKGROUND, - XPM_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid XPM image specifications. */ - -static struct image_keyword xpm_format[XPM_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":file", IMAGE_STRING_VALUE, 0}, - {":data", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":color-symbols", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type XBM. */ - -static struct image_type xpm_type = -{ - &Qxpm, - xpm_image_p, - xpm_load, - x_clear_image, - NULL -}; - - -/* Define ALLOC_XPM_COLORS if we can use Emacs' own color allocation - functions for allocating image colors. Our own functions handle - color allocation failures more gracefully than the ones on the XPM - lib. */ - -#if defined XpmAllocColor && defined XpmFreeColors && defined XpmColorClosure -#define ALLOC_XPM_COLORS -#endif - -#ifdef ALLOC_XPM_COLORS - -static void xpm_init_color_cache P_ ((struct frame *, XpmAttributes *)); -static void xpm_free_color_cache P_ ((void)); -static int xpm_lookup_color P_ ((struct frame *, char *, XColor *)); -static int xpm_color_bucket P_ ((char *)); -static struct xpm_cached_color *xpm_cache_color P_ ((struct frame *, char *, - XColor *, int)); - -/* An entry in a hash table used to cache color definitions of named - colors. This cache is necessary to speed up XPM image loading in - case we do color allocations ourselves. Without it, we would need - a call to XParseColor per pixel in the image. */ - -struct xpm_cached_color -{ - /* Next in collision chain. */ - struct xpm_cached_color *next; - - /* Color definition (RGB and pixel color). */ - XColor color; - - /* Color name. */ - char name[1]; -}; - -/* The hash table used for the color cache, and its bucket vector - size. */ - -#define XPM_COLOR_CACHE_BUCKETS 1001 -struct xpm_cached_color **xpm_color_cache; - -/* Initialize the color cache. */ - -static void -xpm_init_color_cache (f, attrs) - struct frame *f; - XpmAttributes *attrs; -{ - size_t nbytes = XPM_COLOR_CACHE_BUCKETS * sizeof *xpm_color_cache; - xpm_color_cache = (struct xpm_cached_color **) xmalloc (nbytes); - memset (xpm_color_cache, 0, nbytes); - init_color_table (); - - if (attrs->valuemask & XpmColorSymbols) - { - int i; - XColor color; - - for (i = 0; i < attrs->numsymbols; ++i) - if (XParseColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), - attrs->colorsymbols[i].value, &color)) - { - color.pixel = lookup_rgb_color (f, color.red, color.green, - color.blue); - xpm_cache_color (f, attrs->colorsymbols[i].name, &color, -1); - } - } -} - - -/* Free the color cache. */ - -static void -xpm_free_color_cache () -{ - struct xpm_cached_color *p, *next; - int i; - - for (i = 0; i < XPM_COLOR_CACHE_BUCKETS; ++i) - for (p = xpm_color_cache[i]; p; p = next) - { - next = p->next; - xfree (p); - } - - xfree (xpm_color_cache); - xpm_color_cache = NULL; - free_color_table (); -} - - -/* Return the bucket index for color named COLOR_NAME in the color - cache. */ - -static int -xpm_color_bucket (color_name) - char *color_name; -{ - unsigned h = 0; - char *s; - - for (s = color_name; *s; ++s) - h = (h << 2) ^ *s; - return h %= XPM_COLOR_CACHE_BUCKETS; -} - - -/* On frame F, cache values COLOR for color with name COLOR_NAME. - BUCKET, if >= 0, is a precomputed bucket index. Value is the cache - entry added. */ - -static struct xpm_cached_color * -xpm_cache_color (f, color_name, color, bucket) - struct frame *f; - char *color_name; - XColor *color; - int bucket; -{ - size_t nbytes; - struct xpm_cached_color *p; - - if (bucket < 0) - bucket = xpm_color_bucket (color_name); - - nbytes = sizeof *p + strlen (color_name); - p = (struct xpm_cached_color *) xmalloc (nbytes); - strcpy (p->name, color_name); - p->color = *color; - p->next = xpm_color_cache[bucket]; - xpm_color_cache[bucket] = p; - return p; -} - - -/* Look up color COLOR_NAME for frame F in the color cache. If found, - return the cached definition in *COLOR. Otherwise, make a new - entry in the cache and allocate the color. Value is zero if color - allocation failed. */ - -static int -xpm_lookup_color (f, color_name, color) - struct frame *f; - char *color_name; - XColor *color; -{ - struct xpm_cached_color *p; - int h = xpm_color_bucket (color_name); - - for (p = xpm_color_cache[h]; p; p = p->next) - if (strcmp (p->name, color_name) == 0) - break; - - if (p != NULL) - *color = p->color; - else if (XParseColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), - color_name, color)) - { - color->pixel = lookup_rgb_color (f, color->red, color->green, - color->blue); - p = xpm_cache_color (f, color_name, color, h); - } - /* You get `opaque' at least from ImageMagick converting pbm to xpm - with transparency, and it's useful. */ - else if (strcmp ("opaque", color_name) == 0) - { - bzero (color, sizeof (XColor)); /* Is this necessary/correct? */ - color->pixel = FRAME_FOREGROUND_PIXEL (f); - p = xpm_cache_color (f, color_name, color, h); - } - - return p != NULL; -} - - -/* Callback for allocating color COLOR_NAME. Called from the XPM lib. - CLOSURE is a pointer to the frame on which we allocate the - color. Return in *COLOR the allocated color. Value is non-zero - if successful. */ - -static int -xpm_alloc_color (dpy, cmap, color_name, color, closure) - Display *dpy; - Colormap cmap; - char *color_name; - XColor *color; - void *closure; -{ - return xpm_lookup_color ((struct frame *) closure, color_name, color); -} - - -/* Callback for freeing NPIXELS colors contained in PIXELS. CLOSURE - is a pointer to the frame on which we allocate the color. Value is - non-zero if successful. */ - -static int -xpm_free_colors (dpy, cmap, pixels, npixels, closure) - Display *dpy; - Colormap cmap; - Pixel *pixels; - int npixels; - void *closure; -{ - return 1; -} - -#endif /* ALLOC_XPM_COLORS */ - - -/* Value is non-zero if COLOR_SYMBOLS is a valid color symbols list - for XPM images. Such a list must consist of conses whose car and - cdr are strings. */ - -static int -xpm_valid_color_symbols_p (color_symbols) - Lisp_Object color_symbols; -{ - while (CONSP (color_symbols)) - { - Lisp_Object sym = XCAR (color_symbols); - if (!CONSP (sym) - || !STRINGP (XCAR (sym)) - || !STRINGP (XCDR (sym))) - break; - color_symbols = XCDR (color_symbols); - } - - return NILP (color_symbols); -} - - -/* Value is non-zero if OBJECT is a valid XPM image specification. */ - -static int -xpm_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[XPM_LAST]; - bcopy (xpm_format, fmt, sizeof fmt); - return (parse_image_spec (object, fmt, XPM_LAST, Qxpm) - /* Either `:file' or `:data' must be present. */ - && fmt[XPM_FILE].count + fmt[XPM_DATA].count == 1 - /* Either no `:color-symbols' or it's a list of conses - whose car and cdr are strings. */ - && (fmt[XPM_COLOR_SYMBOLS].count == 0 - || xpm_valid_color_symbols_p (fmt[XPM_COLOR_SYMBOLS].value))); -} - - -/* Load image IMG which will be displayed on frame F. Value is - non-zero if successful. */ - -static int -xpm_load (f, img) - struct frame *f; - struct image *img; -{ - int rc; - XpmAttributes attrs; - Lisp_Object specified_file, color_symbols; - - /* Configure the XPM lib. Use the visual of frame F. Allocate - close colors. Return colors allocated. */ - bzero (&attrs, sizeof attrs); - attrs.visual = FRAME_X_VISUAL (f); - attrs.colormap = FRAME_X_COLORMAP (f); - attrs.valuemask |= XpmVisual; - attrs.valuemask |= XpmColormap; - -#ifdef ALLOC_XPM_COLORS - /* Allocate colors with our own functions which handle - failing color allocation more gracefully. */ - attrs.color_closure = f; - attrs.alloc_color = xpm_alloc_color; - attrs.free_colors = xpm_free_colors; - attrs.valuemask |= XpmAllocColor | XpmFreeColors | XpmColorClosure; -#else /* not ALLOC_XPM_COLORS */ - /* Let the XPM lib allocate colors. */ - attrs.valuemask |= XpmReturnAllocPixels; -#ifdef XpmAllocCloseColors - attrs.alloc_close_colors = 1; - attrs.valuemask |= XpmAllocCloseColors; -#else /* not XpmAllocCloseColors */ - attrs.closeness = 600; - attrs.valuemask |= XpmCloseness; -#endif /* not XpmAllocCloseColors */ -#endif /* ALLOC_XPM_COLORS */ - - /* If image specification contains symbolic color definitions, add - these to `attrs'. */ - color_symbols = image_spec_value (img->spec, QCcolor_symbols, NULL); - if (CONSP (color_symbols)) - { - Lisp_Object tail; - XpmColorSymbol *xpm_syms; - int i, size; - - attrs.valuemask |= XpmColorSymbols; - - /* Count number of symbols. */ - attrs.numsymbols = 0; - for (tail = color_symbols; CONSP (tail); tail = XCDR (tail)) - ++attrs.numsymbols; - - /* Allocate an XpmColorSymbol array. */ - size = attrs.numsymbols * sizeof *xpm_syms; - xpm_syms = (XpmColorSymbol *) alloca (size); - bzero (xpm_syms, size); - attrs.colorsymbols = xpm_syms; - - /* Fill the color symbol array. */ - for (tail = color_symbols, i = 0; - CONSP (tail); - ++i, tail = XCDR (tail)) - { - Lisp_Object name = XCAR (XCAR (tail)); - Lisp_Object color = XCDR (XCAR (tail)); - xpm_syms[i].name = (char *) alloca (SCHARS (name) + 1); - strcpy (xpm_syms[i].name, SDATA (name)); - xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1); - strcpy (xpm_syms[i].value, SDATA (color)); - } - } - - /* Create a pixmap for the image, either from a file, or from a - string buffer containing data in the same format as an XPM file. */ -#ifdef ALLOC_XPM_COLORS - xpm_init_color_cache (f, &attrs); -#endif - - specified_file = image_spec_value (img->spec, QCfile, NULL); - if (STRINGP (specified_file)) - { - Lisp_Object file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - return 0; - } - - rc = XpmReadFileToPixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - SDATA (file), &img->pixmap, &img->mask, - &attrs); - } - else - { - Lisp_Object buffer = image_spec_value (img->spec, QCdata, NULL); - rc = XpmCreatePixmapFromBuffer (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - SDATA (buffer), - &img->pixmap, &img->mask, - &attrs); - } - - if (rc == XpmSuccess) - { -#ifdef ALLOC_XPM_COLORS - img->colors = colors_in_color_table (&img->ncolors); -#else /* not ALLOC_XPM_COLORS */ - int i; - - img->ncolors = attrs.nalloc_pixels; - img->colors = (unsigned long *) xmalloc (img->ncolors - * sizeof *img->colors); - for (i = 0; i < attrs.nalloc_pixels; ++i) - { - img->colors[i] = attrs.alloc_pixels[i]; -#ifdef DEBUG_X_COLORS - register_color (img->colors[i]); -#endif - } -#endif /* not ALLOC_XPM_COLORS */ - - img->width = attrs.width; - img->height = attrs.height; - xassert (img->width > 0 && img->height > 0); - - /* The call to XpmFreeAttributes below frees attrs.alloc_pixels. */ - XpmFreeAttributes (&attrs); - } - else - { - switch (rc) - { - case XpmOpenFailed: - image_error ("Error opening XPM file (%s)", img->spec, Qnil); - break; - - case XpmFileInvalid: - image_error ("Invalid XPM file (%s)", img->spec, Qnil); - break; - - case XpmNoMemory: - image_error ("Out of memory (%s)", img->spec, Qnil); - break; - - case XpmColorFailed: - image_error ("Color allocation error (%s)", img->spec, Qnil); - break; - - default: - image_error ("Unknown error (%s)", img->spec, Qnil); - break; - } - } - -#ifdef ALLOC_XPM_COLORS - xpm_free_color_cache (); -#endif - return rc == XpmSuccess; -} - -#endif /* HAVE_XPM != 0 */ - - -/*********************************************************************** - Color table - ***********************************************************************/ - -/* An entry in the color table mapping an RGB color to a pixel color. */ - -struct ct_color -{ - int r, g, b; - unsigned long pixel; - - /* Next in color table collision list. */ - struct ct_color *next; -}; - -/* The bucket vector size to use. Must be prime. */ - -#define CT_SIZE 101 - -/* Value is a hash of the RGB color given by R, G, and B. */ - -#define CT_HASH_RGB(R, G, B) (((R) << 16) ^ ((G) << 8) ^ (B)) - -/* The color hash table. */ - -struct ct_color **ct_table; - -/* Number of entries in the color table. */ - -int ct_colors_allocated; - -/* Initialize the color table. */ - -static void -init_color_table () -{ - int size = CT_SIZE * sizeof (*ct_table); - ct_table = (struct ct_color **) xmalloc (size); - bzero (ct_table, size); - ct_colors_allocated = 0; -} - - -/* Free memory associated with the color table. */ - -static void -free_color_table () -{ - int i; - struct ct_color *p, *next; - - for (i = 0; i < CT_SIZE; ++i) - for (p = ct_table[i]; p; p = next) - { - next = p->next; - xfree (p); - } - - xfree (ct_table); - ct_table = NULL; -} - - -/* Value is a pixel color for RGB color R, G, B on frame F. If an - entry for that color already is in the color table, return the - pixel color of that entry. Otherwise, allocate a new color for R, - G, B, and make an entry in the color table. */ - -static unsigned long -lookup_rgb_color (f, r, g, b) - struct frame *f; - int r, g, b; -{ - unsigned hash = CT_HASH_RGB (r, g, b); - int i = hash % CT_SIZE; - struct ct_color *p; - - for (p = ct_table[i]; p; p = p->next) - if (p->r == r && p->g == g && p->b == b) - break; - - if (p == NULL) - { - XColor color; - Colormap cmap; - int rc; - - color.red = r; - color.green = g; - color.blue = b; - - cmap = FRAME_X_COLORMAP (f); - rc = x_alloc_nearest_color (f, cmap, &color); - - if (rc) - { - ++ct_colors_allocated; - - p = (struct ct_color *) xmalloc (sizeof *p); - p->r = r; - p->g = g; - p->b = b; - p->pixel = color.pixel; - p->next = ct_table[i]; - ct_table[i] = p; - } - else - return FRAME_FOREGROUND_PIXEL (f); - } - - return p->pixel; -} - - -/* Look up pixel color PIXEL which is used on frame F in the color - table. If not already present, allocate it. Value is PIXEL. */ - -static unsigned long -lookup_pixel_color (f, pixel) - struct frame *f; - unsigned long pixel; -{ - int i = pixel % CT_SIZE; - struct ct_color *p; - - for (p = ct_table[i]; p; p = p->next) - if (p->pixel == pixel) - break; - - if (p == NULL) - { - XColor color; - Colormap cmap; - int rc; - - cmap = FRAME_X_COLORMAP (f); - color.pixel = pixel; - x_query_color (f, &color); - rc = x_alloc_nearest_color (f, cmap, &color); - - if (rc) - { - ++ct_colors_allocated; - - p = (struct ct_color *) xmalloc (sizeof *p); - p->r = color.red; - p->g = color.green; - p->b = color.blue; - p->pixel = pixel; - p->next = ct_table[i]; - ct_table[i] = p; - } - else - return FRAME_FOREGROUND_PIXEL (f); - } - - return p->pixel; -} - - -/* Value is a vector of all pixel colors contained in the color table, - allocated via xmalloc. Set *N to the number of colors. */ - -static unsigned long * -colors_in_color_table (n) - int *n; -{ - int i, j; - struct ct_color *p; - unsigned long *colors; - - if (ct_colors_allocated == 0) - { - *n = 0; - colors = NULL; - } - else - { - colors = (unsigned long *) xmalloc (ct_colors_allocated - * sizeof *colors); - *n = ct_colors_allocated; - - for (i = j = 0; i < CT_SIZE; ++i) - for (p = ct_table[i]; p; p = p->next) - colors[j++] = p->pixel; - } - - return colors; -} - - - -/*********************************************************************** - Algorithms - ***********************************************************************/ - -static XColor *x_to_xcolors P_ ((struct frame *, struct image *, int)); -static void x_from_xcolors P_ ((struct frame *, struct image *, XColor *)); -static void x_detect_edges P_ ((struct frame *, struct image *, int[9], int)); - -/* Non-zero means draw a cross on images having `:conversion - disabled'. */ - -int cross_disabled_images; - -/* Edge detection matrices for different edge-detection - strategies. */ - -static int emboss_matrix[9] = { - /* x - 1 x x + 1 */ - 2, -1, 0, /* y - 1 */ - -1, 0, 1, /* y */ - 0, 1, -2 /* y + 1 */ -}; - -static int laplace_matrix[9] = { - /* x - 1 x x + 1 */ - 1, 0, 0, /* y - 1 */ - 0, 0, 0, /* y */ - 0, 0, -1 /* y + 1 */ -}; - -/* Value is the intensity of the color whose red/green/blue values - are R, G, and B. */ - -#define COLOR_INTENSITY(R, G, B) ((2 * (R) + 3 * (G) + (B)) / 6) - - -/* On frame F, return an array of XColor structures describing image - IMG->pixmap. Each XColor structure has its pixel color set. RGB_P - non-zero means also fill the red/green/blue members of the XColor - structures. Value is a pointer to the array of XColors structures, - allocated with xmalloc; it must be freed by the caller. */ - -static XColor * -x_to_xcolors (f, img, rgb_p) - struct frame *f; - struct image *img; - int rgb_p; -{ - int x, y; - XColor *colors, *p; - XImage *ximg; - - colors = (XColor *) xmalloc (img->width * img->height * sizeof *colors); - - /* Get the X image IMG->pixmap. */ - ximg = XGetImage (FRAME_X_DISPLAY (f), img->pixmap, - 0, 0, img->width, img->height, ~0, ZPixmap); - - /* Fill the `pixel' members of the XColor array. I wished there - were an easy and portable way to circumvent XGetPixel. */ - p = colors; - for (y = 0; y < img->height; ++y) - { - XColor *row = p; - - for (x = 0; x < img->width; ++x, ++p) - p->pixel = XGetPixel (ximg, x, y); - - if (rgb_p) - x_query_colors (f, row, img->width); - } - - XDestroyImage (ximg); - return colors; -} - - -/* Create IMG->pixmap from an array COLORS of XColor structures, whose - RGB members are set. F is the frame on which this all happens. - COLORS will be freed; an existing IMG->pixmap will be freed, too. */ - -static void -x_from_xcolors (f, img, colors) - struct frame *f; - struct image *img; - XColor *colors; -{ - int x, y; - XImage *oimg; - Pixmap pixmap; - XColor *p; - - init_color_table (); - - x_create_x_image_and_pixmap (f, img->width, img->height, 0, - &oimg, &pixmap); - p = colors; - for (y = 0; y < img->height; ++y) - for (x = 0; x < img->width; ++x, ++p) - { - unsigned long pixel; - pixel = lookup_rgb_color (f, p->red, p->green, p->blue); - XPutPixel (oimg, x, y, pixel); - } - - xfree (colors); - x_clear_image_1 (f, img, 1, 0, 1); - - x_put_x_image (f, oimg, pixmap, img->width, img->height); - x_destroy_x_image (oimg); - img->pixmap = pixmap; - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); -} - - -/* On frame F, perform edge-detection on image IMG. - - MATRIX is a nine-element array specifying the transformation - matrix. See emboss_matrix for an example. - - COLOR_ADJUST is a color adjustment added to each pixel of the - outgoing image. */ - -static void -x_detect_edges (f, img, matrix, color_adjust) - struct frame *f; - struct image *img; - int matrix[9], color_adjust; -{ - XColor *colors = x_to_xcolors (f, img, 1); - XColor *new, *p; - int x, y, i, sum; - - for (i = sum = 0; i < 9; ++i) - sum += abs (matrix[i]); - -#define COLOR(A, X, Y) ((A) + (Y) * img->width + (X)) - - new = (XColor *) xmalloc (img->width * img->height * sizeof *new); - - for (y = 0; y < img->height; ++y) - { - p = COLOR (new, 0, y); - p->red = p->green = p->blue = 0xffff/2; - p = COLOR (new, img->width - 1, y); - p->red = p->green = p->blue = 0xffff/2; - } - - for (x = 1; x < img->width - 1; ++x) - { - p = COLOR (new, x, 0); - p->red = p->green = p->blue = 0xffff/2; - p = COLOR (new, x, img->height - 1); - p->red = p->green = p->blue = 0xffff/2; - } - - for (y = 1; y < img->height - 1; ++y) - { - p = COLOR (new, 1, y); - - for (x = 1; x < img->width - 1; ++x, ++p) - { - int r, g, b, y1, x1; - - r = g = b = i = 0; - for (y1 = y - 1; y1 < y + 2; ++y1) - for (x1 = x - 1; x1 < x + 2; ++x1, ++i) - if (matrix[i]) - { - XColor *t = COLOR (colors, x1, y1); - r += matrix[i] * t->red; - g += matrix[i] * t->green; - b += matrix[i] * t->blue; - } - - r = (r / sum + color_adjust) & 0xffff; - g = (g / sum + color_adjust) & 0xffff; - b = (b / sum + color_adjust) & 0xffff; - p->red = p->green = p->blue = COLOR_INTENSITY (r, g, b); - } - } - - xfree (colors); - x_from_xcolors (f, img, new); - -#undef COLOR -} - - -/* Perform the pre-defined `emboss' edge-detection on image IMG - on frame F. */ - -static void -x_emboss (f, img) - struct frame *f; - struct image *img; -{ - x_detect_edges (f, img, emboss_matrix, 0xffff / 2); -} - - -/* Perform the pre-defined `laplace' edge-detection on image IMG - on frame F. */ - -static void -x_laplace (f, img) - struct frame *f; - struct image *img; -{ - x_detect_edges (f, img, laplace_matrix, 45000); -} - - -/* Perform edge-detection on image IMG on frame F, with specified - transformation matrix MATRIX and color-adjustment COLOR_ADJUST. - - MATRIX must be either - - - a list of at least 9 numbers in row-major form - - a vector of at least 9 numbers - - COLOR_ADJUST nil means use a default; otherwise it must be a - number. */ - -static void -x_edge_detection (f, img, matrix, color_adjust) - struct frame *f; - struct image *img; - Lisp_Object matrix, color_adjust; -{ - int i = 0; - int trans[9]; - - if (CONSP (matrix)) - { - for (i = 0; - i < 9 && CONSP (matrix) && NUMBERP (XCAR (matrix)); - ++i, matrix = XCDR (matrix)) - trans[i] = XFLOATINT (XCAR (matrix)); - } - else if (VECTORP (matrix) && ASIZE (matrix) >= 9) - { - for (i = 0; i < 9 && NUMBERP (AREF (matrix, i)); ++i) - trans[i] = XFLOATINT (AREF (matrix, i)); - } - - if (NILP (color_adjust)) - color_adjust = make_number (0xffff / 2); - - if (i == 9 && NUMBERP (color_adjust)) - x_detect_edges (f, img, trans, (int) XFLOATINT (color_adjust)); -} - - -/* Transform image IMG on frame F so that it looks disabled. */ - -static void -x_disable_image (f, img) - struct frame *f; - struct image *img; -{ - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); - - if (dpyinfo->n_planes >= 2) - { - /* Color (or grayscale). Convert to gray, and equalize. Just - drawing such images with a stipple can look very odd, so - we're using this method instead. */ - XColor *colors = x_to_xcolors (f, img, 1); - XColor *p, *end; - const int h = 15000; - const int l = 30000; - - for (p = colors, end = colors + img->width * img->height; - p < end; - ++p) - { - int i = COLOR_INTENSITY (p->red, p->green, p->blue); - int i2 = (0xffff - h - l) * i / 0xffff + l; - p->red = p->green = p->blue = i2; - } - - x_from_xcolors (f, img, colors); - } - - /* Draw a cross over the disabled image, if we must or if we - should. */ - if (dpyinfo->n_planes < 2 || cross_disabled_images) - { - Display *dpy = FRAME_X_DISPLAY (f); - GC gc; - - gc = XCreateGC (dpy, img->pixmap, 0, NULL); - XSetForeground (dpy, gc, BLACK_PIX_DEFAULT (f)); - XDrawLine (dpy, img->pixmap, gc, 0, 0, - img->width - 1, img->height - 1); - XDrawLine (dpy, img->pixmap, gc, 0, img->height - 1, - img->width - 1, 0); - XFreeGC (dpy, gc); - - if (img->mask) - { - gc = XCreateGC (dpy, img->mask, 0, NULL); - XSetForeground (dpy, gc, WHITE_PIX_DEFAULT (f)); - XDrawLine (dpy, img->mask, gc, 0, 0, - img->width - 1, img->height - 1); - XDrawLine (dpy, img->mask, gc, 0, img->height - 1, - img->width - 1, 0); - XFreeGC (dpy, gc); - } - } -} - - -/* Build a mask for image IMG which is used on frame F. FILE is the - name of an image file, for error messages. HOW determines how to - determine the background color of IMG. If it is a list '(R G B)', - with R, G, and B being integers >= 0, take that as the color of the - background. Otherwise, determine the background color of IMG - heuristically. Value is non-zero if successful. */ - -static int -x_build_heuristic_mask (f, img, how) - struct frame *f; - struct image *img; - Lisp_Object how; -{ - Display *dpy = FRAME_X_DISPLAY (f); - XImage *ximg, *mask_img; - int x, y, rc, use_img_background; - unsigned long bg = 0; - - if (img->mask) - { - XFreePixmap (FRAME_X_DISPLAY (f), img->mask); - img->mask = None; - img->background_transparent_valid = 0; - } - - /* Create an image and pixmap serving as mask. */ - rc = x_create_x_image_and_pixmap (f, img->width, img->height, 1, - &mask_img, &img->mask); - if (!rc) - return 0; - - /* Get the X image of IMG->pixmap. */ - ximg = XGetImage (dpy, img->pixmap, 0, 0, img->width, img->height, - ~0, ZPixmap); - - /* Determine the background color of ximg. If HOW is `(R G B)' - take that as color. Otherwise, use the image's background color. */ - use_img_background = 1; - - if (CONSP (how)) - { - int rgb[3], i; - - for (i = 0; i < 3 && CONSP (how) && NATNUMP (XCAR (how)); ++i) - { - rgb[i] = XFASTINT (XCAR (how)) & 0xffff; - how = XCDR (how); - } - - if (i == 3 && NILP (how)) - { - char color_name[30]; - sprintf (color_name, "#%04x%04x%04x", rgb[0], rgb[1], rgb[2]); - bg = x_alloc_image_color (f, img, build_string (color_name), 0); - use_img_background = 0; - } - } - - if (use_img_background) - bg = four_corners_best (ximg, img->width, img->height); - - /* Set all bits in mask_img to 1 whose color in ximg is different - from the background color bg. */ - for (y = 0; y < img->height; ++y) - for (x = 0; x < img->width; ++x) - XPutPixel (mask_img, x, y, XGetPixel (ximg, x, y) != bg); - - /* Fill in the background_transparent field while we have the mask handy. */ - image_background_transparent (img, f, mask_img); - - /* Put mask_img into img->mask. */ - x_put_x_image (f, mask_img, img->mask, img->width, img->height); - x_destroy_x_image (mask_img); - XDestroyImage (ximg); - - return 1; -} - - - -/*********************************************************************** - PBM (mono, gray, color) - ***********************************************************************/ - -static int pbm_image_p P_ ((Lisp_Object object)); -static int pbm_load P_ ((struct frame *f, struct image *img)); -static int pbm_scan_number P_ ((unsigned char **, unsigned char *)); - -/* The symbol `pbm' identifying images of this type. */ - -Lisp_Object Qpbm; - -/* Indices of image specification fields in gs_format, below. */ - -enum pbm_keyword_index -{ - PBM_TYPE, - PBM_FILE, - PBM_DATA, - PBM_ASCENT, - PBM_MARGIN, - PBM_RELIEF, - PBM_ALGORITHM, - PBM_HEURISTIC_MASK, - PBM_MASK, - PBM_FOREGROUND, - PBM_BACKGROUND, - PBM_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword pbm_format[PBM_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":file", IMAGE_STRING_VALUE, 0}, - {":data", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":foreground", IMAGE_STRING_OR_NIL_VALUE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type `pbm'. */ - -static struct image_type pbm_type = -{ - &Qpbm, - pbm_image_p, - pbm_load, - x_clear_image, - NULL -}; - - -/* Return non-zero if OBJECT is a valid PBM image specification. */ - -static int -pbm_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[PBM_LAST]; - - bcopy (pbm_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, PBM_LAST, Qpbm)) - return 0; - - /* Must specify either :data or :file. */ - return fmt[PBM_DATA].count + fmt[PBM_FILE].count == 1; -} - - -/* Scan a decimal number from *S and return it. Advance *S while - reading the number. END is the end of the string. Value is -1 at - end of input. */ - -static int -pbm_scan_number (s, end) - unsigned char **s, *end; -{ - int c = 0, val = -1; - - while (*s < end) - { - /* Skip white-space. */ - while (*s < end && (c = *(*s)++, isspace (c))) - ; - - if (c == '#') - { - /* Skip comment to end of line. */ - while (*s < end && (c = *(*s)++, c != '\n')) - ; - } - else if (isdigit (c)) - { - /* Read decimal number. */ - val = c - '0'; - while (*s < end && (c = *(*s)++, isdigit (c))) - val = 10 * val + c - '0'; - break; - } - else - break; - } - - return val; -} - - -/* Load PBM image IMG for use on frame F. */ - -static int -pbm_load (f, img) - struct frame *f; - struct image *img; -{ - int raw_p, x, y; - int width, height, max_color_idx = 0; - XImage *ximg; - Lisp_Object file, specified_file; - enum {PBM_MONO, PBM_GRAY, PBM_COLOR} type; - struct gcpro gcpro1; - unsigned char *contents = NULL; - unsigned char *end, *p; - int size; - - specified_file = image_spec_value (img->spec, QCfile, NULL); - file = Qnil; - GCPRO1 (file); - - if (STRINGP (specified_file)) - { - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - contents = slurp_file (SDATA (file), &size); - if (contents == NULL) - { - image_error ("Error reading `%s'", file, Qnil); - UNGCPRO; - return 0; - } - - p = contents; - end = contents + size; - } - else - { - Lisp_Object data; - data = image_spec_value (img->spec, QCdata, NULL); - p = SDATA (data); - end = p + SBYTES (data); - } - - /* Check magic number. */ - if (end - p < 2 || *p++ != 'P') - { - image_error ("Not a PBM image: `%s'", img->spec, Qnil); - error: - xfree (contents); - UNGCPRO; - return 0; - } - - switch (*p++) - { - case '1': - raw_p = 0, type = PBM_MONO; - break; - - case '2': - raw_p = 0, type = PBM_GRAY; - break; - - case '3': - raw_p = 0, type = PBM_COLOR; - break; - - case '4': - raw_p = 1, type = PBM_MONO; - break; - - case '5': - raw_p = 1, type = PBM_GRAY; - break; - - case '6': - raw_p = 1, type = PBM_COLOR; - break; - - default: - image_error ("Not a PBM image: `%s'", img->spec, Qnil); - goto error; - } - - /* Read width, height, maximum color-component. Characters - starting with `#' up to the end of a line are ignored. */ - width = pbm_scan_number (&p, end); - height = pbm_scan_number (&p, end); - - if (type != PBM_MONO) - { - max_color_idx = pbm_scan_number (&p, end); - if (raw_p && max_color_idx > 255) - max_color_idx = 255; - } - - if (width < 0 - || height < 0 - || (type != PBM_MONO && max_color_idx < 0)) - goto error; - - if (!x_create_x_image_and_pixmap (f, width, height, 0, - &ximg, &img->pixmap)) - goto error; - - /* Initialize the color hash table. */ - init_color_table (); - - if (type == PBM_MONO) - { - int c = 0, g; - struct image_keyword fmt[PBM_LAST]; - unsigned long fg = FRAME_FOREGROUND_PIXEL (f); - unsigned long bg = FRAME_BACKGROUND_PIXEL (f); - - /* Parse the image specification. */ - bcopy (pbm_format, fmt, sizeof fmt); - parse_image_spec (img->spec, fmt, PBM_LAST, Qpbm); - - /* Get foreground and background colors, maybe allocate colors. */ - if (fmt[PBM_FOREGROUND].count - && STRINGP (fmt[PBM_FOREGROUND].value)) - fg = x_alloc_image_color (f, img, fmt[PBM_FOREGROUND].value, fg); - if (fmt[PBM_BACKGROUND].count - && STRINGP (fmt[PBM_BACKGROUND].value)) - { - bg = x_alloc_image_color (f, img, fmt[PBM_BACKGROUND].value, bg); - img->background = bg; - img->background_valid = 1; - } - - for (y = 0; y < height; ++y) - for (x = 0; x < width; ++x) - { - if (raw_p) - { - if ((x & 7) == 0) - c = *p++; - g = c & 0x80; - c <<= 1; - } - else - g = pbm_scan_number (&p, end); - - XPutPixel (ximg, x, y, g ? fg : bg); - } - } - else - { - for (y = 0; y < height; ++y) - for (x = 0; x < width; ++x) - { - int r, g, b; - - if (type == PBM_GRAY) - r = g = b = raw_p ? *p++ : pbm_scan_number (&p, end); - else if (raw_p) - { - r = *p++; - g = *p++; - b = *p++; - } - else - { - r = pbm_scan_number (&p, end); - g = pbm_scan_number (&p, end); - b = pbm_scan_number (&p, end); - } - - if (r < 0 || g < 0 || b < 0) - { - xfree (ximg->data); - ximg->data = NULL; - XDestroyImage (ximg); - image_error ("Invalid pixel value in image `%s'", - img->spec, Qnil); - goto error; - } - - /* RGB values are now in the range 0..max_color_idx. - Scale this to the range 0..0xffff supported by X. */ - r = (double) r * 65535 / max_color_idx; - g = (double) g * 65535 / max_color_idx; - b = (double) b * 65535 / max_color_idx; - XPutPixel (ximg, x, y, lookup_rgb_color (f, r, g, b)); - } - } - - /* Store in IMG->colors the colors allocated for the image, and - free the color table. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - - /* Maybe fill in the background field while we have ximg handy. */ - if (NILP (image_spec_value (img->spec, QCbackground, NULL))) - IMAGE_BACKGROUND (img, f, ximg); - - /* Put the image into a pixmap. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - - img->width = width; - img->height = height; - - UNGCPRO; - xfree (contents); - return 1; -} - - - -/*********************************************************************** - PNG - ***********************************************************************/ - -#if HAVE_PNG - -#if defined HAVE_LIBPNG_PNG_H -# include -#else -# include -#endif - -/* Function prototypes. */ - -static int png_image_p P_ ((Lisp_Object object)); -static int png_load P_ ((struct frame *f, struct image *img)); - -/* The symbol `png' identifying images of this type. */ - -Lisp_Object Qpng; - -/* Indices of image specification fields in png_format, below. */ - -enum png_keyword_index -{ - PNG_TYPE, - PNG_DATA, - PNG_FILE, - PNG_ASCENT, - PNG_MARGIN, - PNG_RELIEF, - PNG_ALGORITHM, - PNG_HEURISTIC_MASK, - PNG_MASK, - PNG_BACKGROUND, - PNG_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword png_format[PNG_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":data", IMAGE_STRING_VALUE, 0}, - {":file", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type `png'. */ - -static struct image_type png_type = -{ - &Qpng, - png_image_p, - png_load, - x_clear_image, - NULL -}; - - -/* Return non-zero if OBJECT is a valid PNG image specification. */ - -static int -png_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[PNG_LAST]; - bcopy (png_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, PNG_LAST, Qpng)) - return 0; - - /* Must specify either the :data or :file keyword. */ - return fmt[PNG_FILE].count + fmt[PNG_DATA].count == 1; -} - - -/* Error and warning handlers installed when the PNG library - is initialized. */ - -static void -my_png_error (png_ptr, msg) - png_struct *png_ptr; - char *msg; -{ - xassert (png_ptr != NULL); - image_error ("PNG error: %s", build_string (msg), Qnil); - longjmp (png_ptr->jmpbuf, 1); -} - - -static void -my_png_warning (png_ptr, msg) - png_struct *png_ptr; - char *msg; -{ - xassert (png_ptr != NULL); - image_error ("PNG warning: %s", build_string (msg), Qnil); -} - -/* Memory source for PNG decoding. */ - -struct png_memory_storage -{ - unsigned char *bytes; /* The data */ - size_t len; /* How big is it? */ - int index; /* Where are we? */ -}; - - -/* Function set as reader function when reading PNG image from memory. - PNG_PTR is a pointer to the PNG control structure. Copy LENGTH - bytes from the input to DATA. */ - -static void -png_read_from_memory (png_ptr, data, length) - png_structp png_ptr; - png_bytep data; - png_size_t length; -{ - struct png_memory_storage *tbr - = (struct png_memory_storage *) png_get_io_ptr (png_ptr); - - if (length > tbr->len - tbr->index) - png_error (png_ptr, "Read error"); - - bcopy (tbr->bytes + tbr->index, data, length); - tbr->index = tbr->index + length; -} - -/* Load PNG image IMG for use on frame F. Value is non-zero if - successful. */ - -static int -png_load (f, img) - struct frame *f; - struct image *img; -{ - Lisp_Object file, specified_file; - Lisp_Object specified_data; - int x, y, i; - XImage *ximg, *mask_img = NULL; - struct gcpro gcpro1; - png_struct *png_ptr = NULL; - png_info *info_ptr = NULL, *end_info = NULL; - FILE *volatile fp = NULL; - png_byte sig[8]; - png_byte * volatile pixels = NULL; - png_byte ** volatile rows = NULL; - png_uint_32 width, height; - int bit_depth, color_type, interlace_type; - png_byte channels; - png_uint_32 row_bytes; - int transparent_p; - double screen_gamma; - struct png_memory_storage tbr; /* Data to be read */ - - /* Find out what file to load. */ - specified_file = image_spec_value (img->spec, QCfile, NULL); - specified_data = image_spec_value (img->spec, QCdata, NULL); - file = Qnil; - GCPRO1 (file); - - if (NILP (specified_data)) - { - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - /* Open the image file. */ - fp = fopen (SDATA (file), "rb"); - if (!fp) - { - image_error ("Cannot open image file `%s'", file, Qnil); - UNGCPRO; - fclose (fp); - return 0; - } - - /* Check PNG signature. */ - if (fread (sig, 1, sizeof sig, fp) != sizeof sig - || !png_check_sig (sig, sizeof sig)) - { - image_error ("Not a PNG file: `%s'", file, Qnil); - UNGCPRO; - fclose (fp); - return 0; - } - } - else - { - /* Read from memory. */ - tbr.bytes = SDATA (specified_data); - tbr.len = SBYTES (specified_data); - tbr.index = 0; - - /* Check PNG signature. */ - if (tbr.len < sizeof sig - || !png_check_sig (tbr.bytes, sizeof sig)) - { - image_error ("Not a PNG image: `%s'", img->spec, Qnil); - UNGCPRO; - return 0; - } - - /* Need to skip past the signature. */ - tbr.bytes += sizeof (sig); - } - - /* Initialize read and info structs for PNG lib. */ - png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, - my_png_error, my_png_warning); - if (!png_ptr) - { - if (fp) fclose (fp); - UNGCPRO; - return 0; - } - - info_ptr = png_create_info_struct (png_ptr); - if (!info_ptr) - { - png_destroy_read_struct (&png_ptr, NULL, NULL); - if (fp) fclose (fp); - UNGCPRO; - return 0; - } - - end_info = png_create_info_struct (png_ptr); - if (!end_info) - { - png_destroy_read_struct (&png_ptr, &info_ptr, NULL); - if (fp) fclose (fp); - UNGCPRO; - return 0; - } - - /* Set error jump-back. We come back here when the PNG library - detects an error. */ - if (setjmp (png_ptr->jmpbuf)) - { - error: - if (png_ptr) - png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); - xfree (pixels); - xfree (rows); - if (fp) fclose (fp); - UNGCPRO; - return 0; - } - - /* Read image info. */ - if (!NILP (specified_data)) - png_set_read_fn (png_ptr, (void *) &tbr, png_read_from_memory); - else - png_init_io (png_ptr, fp); - - png_set_sig_bytes (png_ptr, sizeof sig); - png_read_info (png_ptr, info_ptr); - png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, - &interlace_type, NULL, NULL); - - /* If image contains simply transparency data, we prefer to - construct a clipping mask. */ - if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) - transparent_p = 1; - else - transparent_p = 0; - - /* This function is easier to write if we only have to handle - one data format: RGB or RGBA with 8 bits per channel. Let's - transform other formats into that format. */ - - /* Strip more than 8 bits per channel. */ - if (bit_depth == 16) - png_set_strip_16 (png_ptr); - - /* Expand data to 24 bit RGB, or 8 bit grayscale, with alpha channel - if available. */ - png_set_expand (png_ptr); - - /* Convert grayscale images to RGB. */ - if (color_type == PNG_COLOR_TYPE_GRAY - || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) - png_set_gray_to_rgb (png_ptr); - - screen_gamma = (f->gamma ? 1 / f->gamma / 0.45455 : 2.2); - -#if 0 /* Avoid double gamma correction for PNG images. */ - { /* Tell the PNG lib to handle gamma correction for us. */ - int intent; - double image_gamma; -#if defined(PNG_READ_sRGB_SUPPORTED) || defined(PNG_WRITE_sRGB_SUPPORTED) - if (png_get_sRGB (png_ptr, info_ptr, &intent)) - /* The libpng documentation says this is right in this case. */ - png_set_gamma (png_ptr, screen_gamma, 0.45455); - else -#endif - if (png_get_gAMA (png_ptr, info_ptr, &image_gamma)) - /* Image contains gamma information. */ - png_set_gamma (png_ptr, screen_gamma, image_gamma); - else - /* Use the standard default for the image gamma. */ - png_set_gamma (png_ptr, screen_gamma, 0.45455); - } -#endif /* if 0 */ - - /* Handle alpha channel by combining the image with a background - color. Do this only if a real alpha channel is supplied. For - simple transparency, we prefer a clipping mask. */ - if (!transparent_p) - { - png_color_16 *image_bg; - Lisp_Object specified_bg - = image_spec_value (img->spec, QCbackground, NULL); - - if (STRINGP (specified_bg)) - /* The user specified `:background', use that. */ - { - XColor color; - if (x_defined_color (f, SDATA (specified_bg), &color, 0)) - { - png_color_16 user_bg; - - bzero (&user_bg, sizeof user_bg); - user_bg.red = color.red; - user_bg.green = color.green; - user_bg.blue = color.blue; - - png_set_background (png_ptr, &user_bg, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - } - } - else if (png_get_bKGD (png_ptr, info_ptr, &image_bg)) - /* Image contains a background color with which to - combine the image. */ - png_set_background (png_ptr, image_bg, - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); - else - { - /* Image does not contain a background color with which - to combine the image data via an alpha channel. Use - the frame's background instead. */ - XColor color; - Colormap cmap; - png_color_16 frame_background; - - cmap = FRAME_X_COLORMAP (f); - color.pixel = FRAME_BACKGROUND_PIXEL (f); - x_query_color (f, &color); - - bzero (&frame_background, sizeof frame_background); - frame_background.red = color.red; - frame_background.green = color.green; - frame_background.blue = color.blue; - - png_set_background (png_ptr, &frame_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); - } - } - - /* Update info structure. */ - png_read_update_info (png_ptr, info_ptr); - - /* Get number of channels. Valid values are 1 for grayscale images - and images with a palette, 2 for grayscale images with transparency - information (alpha channel), 3 for RGB images, and 4 for RGB - images with alpha channel, i.e. RGBA. If conversions above were - sufficient we should only have 3 or 4 channels here. */ - channels = png_get_channels (png_ptr, info_ptr); - xassert (channels == 3 || channels == 4); - - /* Number of bytes needed for one row of the image. */ - row_bytes = png_get_rowbytes (png_ptr, info_ptr); - - /* Allocate memory for the image. */ - pixels = (png_byte *) xmalloc (row_bytes * height * sizeof *pixels); - rows = (png_byte **) xmalloc (height * sizeof *rows); - for (i = 0; i < height; ++i) - rows[i] = pixels + i * row_bytes; - - /* Read the entire image. */ - png_read_image (png_ptr, rows); - png_read_end (png_ptr, info_ptr); - if (fp) - { - fclose (fp); - fp = NULL; - } - - /* Create the X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, - &img->pixmap)) - goto error; - - /* Create an image and pixmap serving as mask if the PNG image - contains an alpha channel. */ - if (channels == 4 - && !transparent_p - && !x_create_x_image_and_pixmap (f, width, height, 1, - &mask_img, &img->mask)) - { - x_destroy_x_image (ximg); - XFreePixmap (FRAME_X_DISPLAY (f), img->pixmap); - img->pixmap = None; - goto error; - } - - /* Fill the X image and mask from PNG data. */ - init_color_table (); - - for (y = 0; y < height; ++y) - { - png_byte *p = rows[y]; - - for (x = 0; x < width; ++x) - { - unsigned r, g, b; - - r = *p++ << 8; - g = *p++ << 8; - b = *p++ << 8; - XPutPixel (ximg, x, y, lookup_rgb_color (f, r, g, b)); - - /* An alpha channel, aka mask channel, associates variable - transparency with an image. Where other image formats - support binary transparency---fully transparent or fully - opaque---PNG allows up to 254 levels of partial transparency. - The PNG library implements partial transparency by combining - the image with a specified background color. - - I'm not sure how to handle this here nicely: because the - background on which the image is displayed may change, for - real alpha channel support, it would be necessary to create - a new image for each possible background. - - What I'm doing now is that a mask is created if we have - boolean transparency information. Otherwise I'm using - the frame's background color to combine the image with. */ - - if (channels == 4) - { - if (mask_img) - XPutPixel (mask_img, x, y, *p > 0); - ++p; - } - } - } - - if (NILP (image_spec_value (img->spec, QCbackground, NULL))) - /* Set IMG's background color from the PNG image, unless the user - overrode it. */ - { - png_color_16 *bg; - if (png_get_bKGD (png_ptr, info_ptr, &bg)) - { - img->background = lookup_rgb_color (f, bg->red, bg->green, bg->blue); - img->background_valid = 1; - } - } - - /* Remember colors allocated for this image. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - - /* Clean up. */ - png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); - xfree (rows); - xfree (pixels); - - img->width = width; - img->height = height; - - /* Maybe fill in the background field while we have ximg handy. */ - IMAGE_BACKGROUND (img, f, ximg); - - /* Put the image into the pixmap, then free the X image and its buffer. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - - /* Same for the mask. */ - if (mask_img) - { - /* Fill in the background_transparent field while we have the mask - handy. */ - image_background_transparent (img, f, mask_img); - - x_put_x_image (f, mask_img, img->mask, img->width, img->height); - x_destroy_x_image (mask_img); - } - - UNGCPRO; - return 1; -} - -#endif /* HAVE_PNG != 0 */ - - - -/*********************************************************************** - JPEG - ***********************************************************************/ - -#if HAVE_JPEG - -/* Work around a warning about HAVE_STDLIB_H being redefined in - jconfig.h. */ -#ifdef HAVE_STDLIB_H -#define HAVE_STDLIB_H_1 -#undef HAVE_STDLIB_H -#endif /* HAVE_STLIB_H */ - -#include -#include -#include - -#ifdef HAVE_STLIB_H_1 -#define HAVE_STDLIB_H 1 -#endif - -static int jpeg_image_p P_ ((Lisp_Object object)); -static int jpeg_load P_ ((struct frame *f, struct image *img)); - -/* The symbol `jpeg' identifying images of this type. */ - -Lisp_Object Qjpeg; - -/* Indices of image specification fields in gs_format, below. */ - -enum jpeg_keyword_index -{ - JPEG_TYPE, - JPEG_DATA, - JPEG_FILE, - JPEG_ASCENT, - JPEG_MARGIN, - JPEG_RELIEF, - JPEG_ALGORITHM, - JPEG_HEURISTIC_MASK, - JPEG_MASK, - JPEG_BACKGROUND, - JPEG_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword jpeg_format[JPEG_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":data", IMAGE_STRING_VALUE, 0}, - {":file", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type `jpeg'. */ - -static struct image_type jpeg_type = -{ - &Qjpeg, - jpeg_image_p, - jpeg_load, - x_clear_image, - NULL -}; - - -/* Return non-zero if OBJECT is a valid JPEG image specification. */ - -static int -jpeg_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[JPEG_LAST]; - - bcopy (jpeg_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, JPEG_LAST, Qjpeg)) - return 0; - - /* Must specify either the :data or :file keyword. */ - return fmt[JPEG_FILE].count + fmt[JPEG_DATA].count == 1; -} - - -struct my_jpeg_error_mgr -{ - struct jpeg_error_mgr pub; - jmp_buf setjmp_buffer; -}; - - -static void -my_error_exit (cinfo) - j_common_ptr cinfo; -{ - struct my_jpeg_error_mgr *mgr = (struct my_jpeg_error_mgr *) cinfo->err; - longjmp (mgr->setjmp_buffer, 1); -} - - -/* Init source method for JPEG data source manager. Called by - jpeg_read_header() before any data is actually read. See - libjpeg.doc from the JPEG lib distribution. */ - -static void -our_init_source (cinfo) - j_decompress_ptr cinfo; -{ -} - - -/* Fill input buffer method for JPEG data source manager. Called - whenever more data is needed. We read the whole image in one step, - so this only adds a fake end of input marker at the end. */ - -static boolean -our_fill_input_buffer (cinfo) - j_decompress_ptr cinfo; -{ - /* Insert a fake EOI marker. */ - struct jpeg_source_mgr *src = cinfo->src; - static JOCTET buffer[2]; - - buffer[0] = (JOCTET) 0xFF; - buffer[1] = (JOCTET) JPEG_EOI; - - src->next_input_byte = buffer; - src->bytes_in_buffer = 2; - return TRUE; -} - - -/* Method to skip over NUM_BYTES bytes in the image data. CINFO->src - is the JPEG data source manager. */ - -static void -our_skip_input_data (cinfo, num_bytes) - j_decompress_ptr cinfo; - long num_bytes; -{ - struct jpeg_source_mgr *src = (struct jpeg_source_mgr *) cinfo->src; - - if (src) - { - if (num_bytes > src->bytes_in_buffer) - ERREXIT (cinfo, JERR_INPUT_EOF); - - src->bytes_in_buffer -= num_bytes; - src->next_input_byte += num_bytes; - } -} - - -/* Method to terminate data source. Called by - jpeg_finish_decompress() after all data has been processed. */ - -static void -our_term_source (cinfo) - j_decompress_ptr cinfo; -{ -} - - -/* Set up the JPEG lib for reading an image from DATA which contains - LEN bytes. CINFO is the decompression info structure created for - reading the image. */ - -static void -jpeg_memory_src (cinfo, data, len) - j_decompress_ptr cinfo; - JOCTET *data; - unsigned int len; -{ - struct jpeg_source_mgr *src; - - if (cinfo->src == NULL) - { - /* First time for this JPEG object? */ - cinfo->src = (struct jpeg_source_mgr *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - sizeof (struct jpeg_source_mgr)); - src = (struct jpeg_source_mgr *) cinfo->src; - src->next_input_byte = data; - } - - src = (struct jpeg_source_mgr *) cinfo->src; - src->init_source = our_init_source; - src->fill_input_buffer = our_fill_input_buffer; - src->skip_input_data = our_skip_input_data; - src->resync_to_restart = jpeg_resync_to_restart; /* Use default method. */ - src->term_source = our_term_source; - src->bytes_in_buffer = len; - src->next_input_byte = data; -} - - -/* Load image IMG for use on frame F. Patterned after example.c - from the JPEG lib. */ - -static int -jpeg_load (f, img) - struct frame *f; - struct image *img; -{ - struct jpeg_decompress_struct cinfo; - struct my_jpeg_error_mgr mgr; - Lisp_Object file, specified_file; - Lisp_Object specified_data; - FILE * volatile fp = NULL; - JSAMPARRAY buffer; - int row_stride, x, y; - XImage *ximg = NULL; - int rc; - unsigned long *colors; - int width, height; - struct gcpro gcpro1; - - /* Open the JPEG file. */ - specified_file = image_spec_value (img->spec, QCfile, NULL); - specified_data = image_spec_value (img->spec, QCdata, NULL); - file = Qnil; - GCPRO1 (file); - - if (NILP (specified_data)) - { - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - fp = fopen (SDATA (file), "r"); - if (fp == NULL) - { - image_error ("Cannot open `%s'", file, Qnil); - UNGCPRO; - return 0; - } - } - - /* Customize libjpeg's error handling to call my_error_exit when an - error is detected. This function will perform a longjmp. */ - cinfo.err = jpeg_std_error (&mgr.pub); - mgr.pub.error_exit = my_error_exit; - - if ((rc = setjmp (mgr.setjmp_buffer)) != 0) - { - if (rc == 1) - { - /* Called from my_error_exit. Display a JPEG error. */ - char buffer[JMSG_LENGTH_MAX]; - cinfo.err->format_message ((j_common_ptr) &cinfo, buffer); - image_error ("Error reading JPEG image `%s': %s", img->spec, - build_string (buffer)); - } - - /* Close the input file and destroy the JPEG object. */ - if (fp) - fclose ((FILE *) fp); - jpeg_destroy_decompress (&cinfo); - - /* If we already have an XImage, free that. */ - x_destroy_x_image (ximg); - - /* Free pixmap and colors. */ - x_clear_image (f, img); - - UNGCPRO; - return 0; - } - - /* Create the JPEG decompression object. Let it read from fp. - Read the JPEG image header. */ - jpeg_create_decompress (&cinfo); - - if (NILP (specified_data)) - jpeg_stdio_src (&cinfo, (FILE *) fp); - else - jpeg_memory_src (&cinfo, SDATA (specified_data), - SBYTES (specified_data)); - - jpeg_read_header (&cinfo, TRUE); - - /* Customize decompression so that color quantization will be used. - Start decompression. */ - cinfo.quantize_colors = TRUE; - jpeg_start_decompress (&cinfo); - width = img->width = cinfo.output_width; - height = img->height = cinfo.output_height; - - /* Create X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) - longjmp (mgr.setjmp_buffer, 2); - - /* Allocate colors. When color quantization is used, - cinfo.actual_number_of_colors has been set with the number of - colors generated, and cinfo.colormap is a two-dimensional array - of color indices in the range 0..cinfo.actual_number_of_colors. - No more than 255 colors will be generated. */ - { - int i, ir, ig, ib; - - if (cinfo.out_color_components > 2) - ir = 0, ig = 1, ib = 2; - else if (cinfo.out_color_components > 1) - ir = 0, ig = 1, ib = 0; - else - ir = 0, ig = 0, ib = 0; - - /* Use the color table mechanism because it handles colors that - cannot be allocated nicely. Such colors will be replaced with - a default color, and we don't have to care about which colors - can be freed safely, and which can't. */ - init_color_table (); - colors = (unsigned long *) alloca (cinfo.actual_number_of_colors - * sizeof *colors); - - for (i = 0; i < cinfo.actual_number_of_colors; ++i) - { - /* Multiply RGB values with 255 because X expects RGB values - in the range 0..0xffff. */ - int r = cinfo.colormap[ir][i] << 8; - int g = cinfo.colormap[ig][i] << 8; - int b = cinfo.colormap[ib][i] << 8; - colors[i] = lookup_rgb_color (f, r, g, b); - } - - /* Remember those colors actually allocated. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - } - - /* Read pixels. */ - row_stride = width * cinfo.output_components; - buffer = cinfo.mem->alloc_sarray ((j_common_ptr) &cinfo, JPOOL_IMAGE, - row_stride, 1); - for (y = 0; y < height; ++y) - { - jpeg_read_scanlines (&cinfo, buffer, 1); - for (x = 0; x < cinfo.output_width; ++x) - XPutPixel (ximg, x, y, colors[buffer[0][x]]); - } - - /* Clean up. */ - jpeg_finish_decompress (&cinfo); - jpeg_destroy_decompress (&cinfo); - if (fp) - fclose ((FILE *) fp); - - /* Maybe fill in the background field while we have ximg handy. */ - if (NILP (image_spec_value (img->spec, QCbackground, NULL))) - IMAGE_BACKGROUND (img, f, ximg); - - /* Put the image into the pixmap. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - UNGCPRO; - return 1; -} - -#endif /* HAVE_JPEG */ - - - -/*********************************************************************** - TIFF - ***********************************************************************/ - -#if HAVE_TIFF - -#include - -static int tiff_image_p P_ ((Lisp_Object object)); -static int tiff_load P_ ((struct frame *f, struct image *img)); - -/* The symbol `tiff' identifying images of this type. */ - -Lisp_Object Qtiff; - -/* Indices of image specification fields in tiff_format, below. */ - -enum tiff_keyword_index -{ - TIFF_TYPE, - TIFF_DATA, - TIFF_FILE, - TIFF_ASCENT, - TIFF_MARGIN, - TIFF_RELIEF, - TIFF_ALGORITHM, - TIFF_HEURISTIC_MASK, - TIFF_MASK, - TIFF_BACKGROUND, - TIFF_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword tiff_format[TIFF_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":data", IMAGE_STRING_VALUE, 0}, - {":file", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type `tiff'. */ - -static struct image_type tiff_type = -{ - &Qtiff, - tiff_image_p, - tiff_load, - x_clear_image, - NULL -}; - - -/* Return non-zero if OBJECT is a valid TIFF image specification. */ - -static int -tiff_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[TIFF_LAST]; - bcopy (tiff_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, TIFF_LAST, Qtiff)) - return 0; - - /* Must specify either the :data or :file keyword. */ - return fmt[TIFF_FILE].count + fmt[TIFF_DATA].count == 1; -} - - -/* Reading from a memory buffer for TIFF images Based on the PNG - memory source, but we have to provide a lot of extra functions. - Blah. - - We really only need to implement read and seek, but I am not - convinced that the TIFF library is smart enough not to destroy - itself if we only hand it the function pointers we need to - override. */ - -typedef struct -{ - unsigned char *bytes; - size_t len; - int index; -} -tiff_memory_source; - - -static size_t -tiff_read_from_memory (data, buf, size) - thandle_t data; - tdata_t buf; - tsize_t size; -{ - tiff_memory_source *src = (tiff_memory_source *) data; - - if (size > src->len - src->index) - return (size_t) -1; - bcopy (src->bytes + src->index, buf, size); - src->index += size; - return size; -} - - -static size_t -tiff_write_from_memory (data, buf, size) - thandle_t data; - tdata_t buf; - tsize_t size; -{ - return (size_t) -1; -} - - -static toff_t -tiff_seek_in_memory (data, off, whence) - thandle_t data; - toff_t off; - int whence; -{ - tiff_memory_source *src = (tiff_memory_source *) data; - int idx; - - switch (whence) - { - case SEEK_SET: /* Go from beginning of source. */ - idx = off; - break; - - case SEEK_END: /* Go from end of source. */ - idx = src->len + off; - break; - - case SEEK_CUR: /* Go from current position. */ - idx = src->index + off; - break; - - default: /* Invalid `whence'. */ - return -1; - } - - if (idx > src->len || idx < 0) - return -1; - - src->index = idx; - return src->index; -} - - -static int -tiff_close_memory (data) - thandle_t data; -{ - /* NOOP */ - return 0; -} - - -static int -tiff_mmap_memory (data, pbase, psize) - thandle_t data; - tdata_t *pbase; - toff_t *psize; -{ - /* It is already _IN_ memory. */ - return 0; -} - - -static void -tiff_unmap_memory (data, base, size) - thandle_t data; - tdata_t base; - toff_t size; -{ - /* We don't need to do this. */ -} - - -static toff_t -tiff_size_of_memory (data) - thandle_t data; -{ - return ((tiff_memory_source *) data)->len; -} - - -static void -tiff_error_handler (title, format, ap) - const char *title, *format; - va_list ap; -{ - char buf[512]; - int len; - - len = sprintf (buf, "TIFF error: %s ", title); - vsprintf (buf + len, format, ap); - add_to_log (buf, Qnil, Qnil); -} - - -static void -tiff_warning_handler (title, format, ap) - const char *title, *format; - va_list ap; -{ - char buf[512]; - int len; - - len = sprintf (buf, "TIFF warning: %s ", title); - vsprintf (buf + len, format, ap); - add_to_log (buf, Qnil, Qnil); -} - - -/* Load TIFF image IMG for use on frame F. Value is non-zero if - successful. */ - -static int -tiff_load (f, img) - struct frame *f; - struct image *img; -{ - Lisp_Object file, specified_file; - Lisp_Object specified_data; - TIFF *tiff; - int width, height, x, y; - uint32 *buf; - int rc; - XImage *ximg; - struct gcpro gcpro1; - tiff_memory_source memsrc; - - specified_file = image_spec_value (img->spec, QCfile, NULL); - specified_data = image_spec_value (img->spec, QCdata, NULL); - file = Qnil; - GCPRO1 (file); - - TIFFSetErrorHandler (tiff_error_handler); - TIFFSetWarningHandler (tiff_warning_handler); - - if (NILP (specified_data)) - { - /* Read from a file */ - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", file, Qnil); - UNGCPRO; - return 0; - } - - /* Try to open the image file. */ - tiff = TIFFOpen (SDATA (file), "r"); - if (tiff == NULL) - { - image_error ("Cannot open `%s'", file, Qnil); - UNGCPRO; - return 0; - } - } - else - { - /* Memory source! */ - memsrc.bytes = SDATA (specified_data); - memsrc.len = SBYTES (specified_data); - memsrc.index = 0; - - tiff = TIFFClientOpen ("memory_source", "r", &memsrc, - (TIFFReadWriteProc) tiff_read_from_memory, - (TIFFReadWriteProc) tiff_write_from_memory, - tiff_seek_in_memory, - tiff_close_memory, - tiff_size_of_memory, - tiff_mmap_memory, - tiff_unmap_memory); - - if (!tiff) - { - image_error ("Cannot open memory source for `%s'", img->spec, Qnil); - UNGCPRO; - return 0; - } - } - - /* Get width and height of the image, and allocate a raster buffer - of width x height 32-bit values. */ - TIFFGetField (tiff, TIFFTAG_IMAGEWIDTH, &width); - TIFFGetField (tiff, TIFFTAG_IMAGELENGTH, &height); - buf = (uint32 *) xmalloc (width * height * sizeof *buf); - - rc = TIFFReadRGBAImage (tiff, width, height, buf, 0); - TIFFClose (tiff); - if (!rc) - { - image_error ("Error reading TIFF image `%s'", img->spec, Qnil); - xfree (buf); - UNGCPRO; - return 0; - } - - /* Create the X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) - { - xfree (buf); - UNGCPRO; - return 0; - } - - /* Initialize the color table. */ - init_color_table (); - - /* Process the pixel raster. Origin is in the lower-left corner. */ - for (y = 0; y < height; ++y) - { - uint32 *row = buf + y * width; - - for (x = 0; x < width; ++x) - { - uint32 abgr = row[x]; - int r = TIFFGetR (abgr) << 8; - int g = TIFFGetG (abgr) << 8; - int b = TIFFGetB (abgr) << 8; - XPutPixel (ximg, x, height - 1 - y, lookup_rgb_color (f, r, g, b)); - } - } - - /* Remember the colors allocated for the image. Free the color table. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - - img->width = width; - img->height = height; - - /* Maybe fill in the background field while we have ximg handy. */ - if (NILP (image_spec_value (img->spec, QCbackground, NULL))) - IMAGE_BACKGROUND (img, f, ximg); - - /* Put the image into the pixmap, then free the X image and its buffer. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - xfree (buf); - - UNGCPRO; - return 1; -} - -#endif /* HAVE_TIFF != 0 */ - - - -/*********************************************************************** - GIF - ***********************************************************************/ - -#if HAVE_GIF - -#include - -static int gif_image_p P_ ((Lisp_Object object)); -static int gif_load P_ ((struct frame *f, struct image *img)); - -/* The symbol `gif' identifying images of this type. */ - -Lisp_Object Qgif; - -/* Indices of image specification fields in gif_format, below. */ - -enum gif_keyword_index -{ - GIF_TYPE, - GIF_DATA, - GIF_FILE, - GIF_ASCENT, - GIF_MARGIN, - GIF_RELIEF, - GIF_ALGORITHM, - GIF_HEURISTIC_MASK, - GIF_MASK, - GIF_IMAGE, - GIF_BACKGROUND, - GIF_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword gif_format[GIF_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":data", IMAGE_STRING_VALUE, 0}, - {":file", IMAGE_STRING_VALUE, 0}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":image", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type `gif'. */ - -static struct image_type gif_type = -{ - &Qgif, - gif_image_p, - gif_load, - x_clear_image, - NULL -}; - - -/* Return non-zero if OBJECT is a valid GIF image specification. */ - -static int -gif_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[GIF_LAST]; - bcopy (gif_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, GIF_LAST, Qgif)) - return 0; - - /* Must specify either the :data or :file keyword. */ - return fmt[GIF_FILE].count + fmt[GIF_DATA].count == 1; -} - - -/* Reading a GIF image from memory - Based on the PNG memory stuff to a certain extent. */ - -typedef struct -{ - unsigned char *bytes; - size_t len; - int index; -} -gif_memory_source; - - -/* Make the current memory source available to gif_read_from_memory. - It's done this way because not all versions of libungif support - a UserData field in the GifFileType structure. */ -static gif_memory_source *current_gif_memory_src; - -static int -gif_read_from_memory (file, buf, len) - GifFileType *file; - GifByteType *buf; - int len; -{ - gif_memory_source *src = current_gif_memory_src; - - if (len > src->len - src->index) - return -1; - - bcopy (src->bytes + src->index, buf, len); - src->index += len; - return len; -} - - -/* Load GIF image IMG for use on frame F. Value is non-zero if - successful. */ - -static int -gif_load (f, img) - struct frame *f; - struct image *img; -{ - Lisp_Object file, specified_file; - Lisp_Object specified_data; - int rc, width, height, x, y, i; - XImage *ximg; - ColorMapObject *gif_color_map; - unsigned long pixel_colors[256]; - GifFileType *gif; - struct gcpro gcpro1; - Lisp_Object image; - int ino, image_left, image_top, image_width, image_height; - gif_memory_source memsrc; - unsigned char *raster; - - specified_file = image_spec_value (img->spec, QCfile, NULL); - specified_data = image_spec_value (img->spec, QCdata, NULL); - file = Qnil; - GCPRO1 (file); - - if (NILP (specified_data)) - { - file = x_find_image_file (specified_file); - if (!STRINGP (file)) - { - image_error ("Cannot find image file `%s'", specified_file, Qnil); - UNGCPRO; - return 0; - } - - /* Open the GIF file. */ - gif = DGifOpenFileName (SDATA (file)); - if (gif == NULL) - { - image_error ("Cannot open `%s'", file, Qnil); - UNGCPRO; - return 0; - } - } - else - { - /* Read from memory! */ - current_gif_memory_src = &memsrc; - memsrc.bytes = SDATA (specified_data); - memsrc.len = SBYTES (specified_data); - memsrc.index = 0; - - gif = DGifOpen(&memsrc, gif_read_from_memory); - if (!gif) - { - image_error ("Cannot open memory source `%s'", img->spec, Qnil); - UNGCPRO; - return 0; - } - } - - /* Read entire contents. */ - rc = DGifSlurp (gif); - if (rc == GIF_ERROR) - { - image_error ("Error reading `%s'", img->spec, Qnil); - DGifCloseFile (gif); - UNGCPRO; - return 0; - } - - image = image_spec_value (img->spec, QCindex, NULL); - ino = INTEGERP (image) ? XFASTINT (image) : 0; - if (ino >= gif->ImageCount) - { - image_error ("Invalid image number `%s' in image `%s'", - image, img->spec); - DGifCloseFile (gif); - UNGCPRO; - return 0; - } - - width = img->width = max (gif->SWidth, gif->Image.Left + gif->Image.Width); - height = img->height = max (gif->SHeight, gif->Image.Top + gif->Image.Height); - - /* Create the X image and pixmap. */ - if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) - { - DGifCloseFile (gif); - UNGCPRO; - return 0; - } - - /* Allocate colors. */ - gif_color_map = gif->SavedImages[ino].ImageDesc.ColorMap; - if (!gif_color_map) - gif_color_map = gif->SColorMap; - init_color_table (); - bzero (pixel_colors, sizeof pixel_colors); - - for (i = 0; i < gif_color_map->ColorCount; ++i) - { - int r = gif_color_map->Colors[i].Red << 8; - int g = gif_color_map->Colors[i].Green << 8; - int b = gif_color_map->Colors[i].Blue << 8; - pixel_colors[i] = lookup_rgb_color (f, r, g, b); - } - - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - - /* Clear the part of the screen image that are not covered by - the image from the GIF file. Full animated GIF support - requires more than can be done here (see the gif89 spec, - disposal methods). Let's simply assume that the part - not covered by a sub-image is in the frame's background color. */ - image_top = gif->SavedImages[ino].ImageDesc.Top; - image_left = gif->SavedImages[ino].ImageDesc.Left; - image_width = gif->SavedImages[ino].ImageDesc.Width; - image_height = gif->SavedImages[ino].ImageDesc.Height; - - for (y = 0; y < image_top; ++y) - for (x = 0; x < width; ++x) - XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); - - for (y = image_top + image_height; y < height; ++y) - for (x = 0; x < width; ++x) - XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); - - for (y = image_top; y < image_top + image_height; ++y) - { - for (x = 0; x < image_left; ++x) - XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); - for (x = image_left + image_width; x < width; ++x) - XPutPixel (ximg, x, y, FRAME_BACKGROUND_PIXEL (f)); - } - - /* Read the GIF image into the X image. We use a local variable - `raster' here because RasterBits below is a char *, and invites - problems with bytes >= 0x80. */ - raster = (unsigned char *) gif->SavedImages[ino].RasterBits; - - if (gif->SavedImages[ino].ImageDesc.Interlace) - { - static int interlace_start[] = {0, 4, 2, 1}; - static int interlace_increment[] = {8, 8, 4, 2}; - int pass; - int row = interlace_start[0]; - - pass = 0; - - for (y = 0; y < image_height; y++) - { - if (row >= image_height) - { - row = interlace_start[++pass]; - while (row >= image_height) - row = interlace_start[++pass]; - } - - for (x = 0; x < image_width; x++) - { - int i = raster[(y * image_width) + x]; - XPutPixel (ximg, x + image_left, row + image_top, - pixel_colors[i]); - } - - row += interlace_increment[pass]; - } - } - else - { - for (y = 0; y < image_height; ++y) - for (x = 0; x < image_width; ++x) - { - int i = raster[y * image_width + x]; - XPutPixel (ximg, x + image_left, y + image_top, pixel_colors[i]); - } - } - - DGifCloseFile (gif); - - /* Maybe fill in the background field while we have ximg handy. */ - if (NILP (image_spec_value (img->spec, QCbackground, NULL))) - IMAGE_BACKGROUND (img, f, ximg); - - /* Put the image into the pixmap, then free the X image and its buffer. */ - x_put_x_image (f, ximg, img->pixmap, width, height); - x_destroy_x_image (ximg); - - UNGCPRO; - return 1; -} - -#endif /* HAVE_GIF != 0 */ - - - -/*********************************************************************** - Ghostscript - ***********************************************************************/ - -static int gs_image_p P_ ((Lisp_Object object)); -static int gs_load P_ ((struct frame *f, struct image *img)); -static void gs_clear_image P_ ((struct frame *f, struct image *img)); - -/* The symbol `postscript' identifying images of this type. */ - -Lisp_Object Qpostscript; - -/* Keyword symbols. */ - -Lisp_Object QCloader, QCbounding_box, QCpt_width, QCpt_height; - -/* Indices of image specification fields in gs_format, below. */ - -enum gs_keyword_index -{ - GS_TYPE, - GS_PT_WIDTH, - GS_PT_HEIGHT, - GS_FILE, - GS_LOADER, - GS_BOUNDING_BOX, - GS_ASCENT, - GS_MARGIN, - GS_RELIEF, - GS_ALGORITHM, - GS_HEURISTIC_MASK, - GS_MASK, - GS_BACKGROUND, - GS_LAST -}; - -/* Vector of image_keyword structures describing the format - of valid user-defined image specifications. */ - -static struct image_keyword gs_format[GS_LAST] = -{ - {":type", IMAGE_SYMBOL_VALUE, 1}, - {":pt-width", IMAGE_POSITIVE_INTEGER_VALUE, 1}, - {":pt-height", IMAGE_POSITIVE_INTEGER_VALUE, 1}, - {":file", IMAGE_STRING_VALUE, 1}, - {":loader", IMAGE_FUNCTION_VALUE, 0}, - {":bounding-box", IMAGE_DONT_CHECK_VALUE_TYPE, 1}, - {":ascent", IMAGE_ASCENT_VALUE, 0}, - {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, - {":relief", IMAGE_INTEGER_VALUE, 0}, - {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, - {":background", IMAGE_STRING_OR_NIL_VALUE, 0} -}; - -/* Structure describing the image type `ghostscript'. */ - -static struct image_type gs_type = -{ - &Qpostscript, - gs_image_p, - gs_load, - gs_clear_image, - NULL -}; - - -/* Free X resources of Ghostscript image IMG which is used on frame F. */ - -static void -gs_clear_image (f, img) - struct frame *f; - struct image *img; -{ - /* IMG->data.ptr_val may contain a recorded colormap. */ - xfree (img->data.ptr_val); - x_clear_image (f, img); -} - - -/* Return non-zero if OBJECT is a valid Ghostscript image - specification. */ - -static int -gs_image_p (object) - Lisp_Object object; -{ - struct image_keyword fmt[GS_LAST]; - Lisp_Object tem; - int i; - - bcopy (gs_format, fmt, sizeof fmt); - - if (!parse_image_spec (object, fmt, GS_LAST, Qpostscript)) - return 0; - - /* Bounding box must be a list or vector containing 4 integers. */ - tem = fmt[GS_BOUNDING_BOX].value; - if (CONSP (tem)) - { - for (i = 0; i < 4; ++i, tem = XCDR (tem)) - if (!CONSP (tem) || !INTEGERP (XCAR (tem))) - return 0; - if (!NILP (tem)) - return 0; - } - else if (VECTORP (tem)) - { - if (XVECTOR (tem)->size != 4) - return 0; - for (i = 0; i < 4; ++i) - if (!INTEGERP (XVECTOR (tem)->contents[i])) - return 0; - } - else - return 0; - - return 1; -} - - -/* Load Ghostscript image IMG for use on frame F. Value is non-zero - if successful. */ - -static int -gs_load (f, img) - struct frame *f; - struct image *img; -{ - char buffer[100]; - Lisp_Object window_and_pixmap_id = Qnil, loader, pt_height, pt_width; - struct gcpro gcpro1, gcpro2; - Lisp_Object frame; - double in_width, in_height; - Lisp_Object pixel_colors = Qnil; - - /* Compute pixel size of pixmap needed from the given size in the - image specification. Sizes in the specification are in pt. 1 pt - = 1/72 in, xdpi and ydpi are stored in the frame's X display - info. */ - pt_width = image_spec_value (img->spec, QCpt_width, NULL); - in_width = XFASTINT (pt_width) / 72.0; - img->width = in_width * FRAME_X_DISPLAY_INFO (f)->resx; - pt_height = image_spec_value (img->spec, QCpt_height, NULL); - in_height = XFASTINT (pt_height) / 72.0; - img->height = in_height * FRAME_X_DISPLAY_INFO (f)->resy; - - /* Create the pixmap. */ - xassert (img->pixmap == None); - img->pixmap = XCreatePixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - img->width, img->height, - DefaultDepthOfScreen (FRAME_X_SCREEN (f))); - - if (!img->pixmap) - { - image_error ("Unable to create pixmap for `%s'", img->spec, Qnil); - return 0; - } - - /* Call the loader to fill the pixmap. It returns a process object - if successful. We do not record_unwind_protect here because - other places in redisplay like calling window scroll functions - don't either. Let the Lisp loader use `unwind-protect' instead. */ - GCPRO2 (window_and_pixmap_id, pixel_colors); - - sprintf (buffer, "%lu %lu", - (unsigned long) FRAME_X_WINDOW (f), - (unsigned long) img->pixmap); - window_and_pixmap_id = build_string (buffer); - - sprintf (buffer, "%lu %lu", - FRAME_FOREGROUND_PIXEL (f), - FRAME_BACKGROUND_PIXEL (f)); - pixel_colors = build_string (buffer); - - XSETFRAME (frame, f); - loader = image_spec_value (img->spec, QCloader, NULL); - if (NILP (loader)) - loader = intern ("gs-load-image"); - - img->data.lisp_val = call6 (loader, frame, img->spec, - make_number (img->width), - make_number (img->height), - window_and_pixmap_id, - pixel_colors); - UNGCPRO; - return PROCESSP (img->data.lisp_val); -} - - -/* Kill the Ghostscript process that was started to fill PIXMAP on - frame F. Called from XTread_socket when receiving an event - telling Emacs that Ghostscript has finished drawing. */ - -void -x_kill_gs_process (pixmap, f) - Pixmap pixmap; - struct frame *f; -{ - struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - int class, i; - struct image *img; - - /* Find the image containing PIXMAP. */ - for (i = 0; i < c->used; ++i) - if (c->images[i]->pixmap == pixmap) - break; - - /* Should someone in between have cleared the image cache, for - instance, give up. */ - if (i == c->used) - return; - - /* Kill the GS process. We should have found PIXMAP in the image - cache and its image should contain a process object. */ - img = c->images[i]; - xassert (PROCESSP (img->data.lisp_val)); - Fkill_process (img->data.lisp_val, Qnil); - img->data.lisp_val = Qnil; - - /* On displays with a mutable colormap, figure out the colors - allocated for the image by looking at the pixels of an XImage for - img->pixmap. */ - class = FRAME_X_VISUAL (f)->class; - if (class != StaticColor && class != StaticGray && class != TrueColor) - { - XImage *ximg; - - BLOCK_INPUT; - - /* Try to get an XImage for img->pixmep. */ - ximg = XGetImage (FRAME_X_DISPLAY (f), img->pixmap, - 0, 0, img->width, img->height, ~0, ZPixmap); - if (ximg) - { - int x, y; - - /* Initialize the color table. */ - init_color_table (); - - /* For each pixel of the image, look its color up in the - color table. After having done so, the color table will - contain an entry for each color used by the image. */ - for (y = 0; y < img->height; ++y) - for (x = 0; x < img->width; ++x) - { - unsigned long pixel = XGetPixel (ximg, x, y); - lookup_pixel_color (f, pixel); - } - - /* Record colors in the image. Free color table and XImage. */ - img->colors = colors_in_color_table (&img->ncolors); - free_color_table (); - XDestroyImage (ximg); - -#if 0 /* This doesn't seem to be the case. If we free the colors - here, we get a BadAccess later in x_clear_image when - freeing the colors. */ - /* We have allocated colors once, but Ghostscript has also - allocated colors on behalf of us. So, to get the - reference counts right, free them once. */ - if (img->ncolors) - x_free_colors (f, img->colors, img->ncolors); -#endif - } - else - image_error ("Cannot get X image of `%s'; colors will not be freed", - img->spec, Qnil); - - UNBLOCK_INPUT; - } - - /* Now that we have the pixmap, compute mask and transform the - image if requested. */ - BLOCK_INPUT; - postprocess_image (f, img); - UNBLOCK_INPUT; -} - - - -/*********************************************************************** - Window properties - ***********************************************************************/ - -DEFUN ("x-change-window-property", Fx_change_window_property, - Sx_change_window_property, 2, 3, 0, - doc: /* Change window property PROP to VALUE on the X window of FRAME. -PROP and VALUE must be strings. FRAME nil or omitted means use the -selected frame. Value is VALUE. */) - (prop, value, frame) - Lisp_Object frame, prop, value; -{ - struct frame *f = check_x_frame (frame); - Atom prop_atom; - - CHECK_STRING (prop); - CHECK_STRING (value); - - BLOCK_INPUT; - prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False); - XChangeProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - prop_atom, XA_STRING, 8, PropModeReplace, - SDATA (value), SCHARS (value)); - - /* Make sure the property is set when we return. */ - XFlush (FRAME_X_DISPLAY (f)); - UNBLOCK_INPUT; - - return value; -} - - -DEFUN ("x-delete-window-property", Fx_delete_window_property, - Sx_delete_window_property, 1, 2, 0, - doc: /* Remove window property PROP from X window of FRAME. -FRAME nil or omitted means use the selected frame. Value is PROP. */) - (prop, frame) - Lisp_Object prop, frame; -{ - struct frame *f = check_x_frame (frame); - Atom prop_atom; - - CHECK_STRING (prop); - BLOCK_INPUT; - prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False); - XDeleteProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), prop_atom); - - /* Make sure the property is removed when we return. */ - XFlush (FRAME_X_DISPLAY (f)); - UNBLOCK_INPUT; - - return prop; -} - - -DEFUN ("x-window-property", Fx_window_property, Sx_window_property, - 1, 2, 0, - doc: /* Value is the value of window property PROP on FRAME. -If FRAME is nil or omitted, use the selected frame. Value is nil -if FRAME hasn't a property with name PROP or if PROP has no string -value. */) - (prop, frame) - Lisp_Object prop, frame; -{ - struct frame *f = check_x_frame (frame); - Atom prop_atom; - int rc; - Lisp_Object prop_value = Qnil; - char *tmp_data = NULL; - Atom actual_type; - int actual_format; - unsigned long actual_size, bytes_remaining; - - CHECK_STRING (prop); - BLOCK_INPUT; - prop_atom = XInternAtom (FRAME_X_DISPLAY (f), SDATA (prop), False); - rc = XGetWindowProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - prop_atom, 0, 0, False, XA_STRING, - &actual_type, &actual_format, &actual_size, - &bytes_remaining, (unsigned char **) &tmp_data); - if (rc == Success) - { - int size = bytes_remaining; - - XFree (tmp_data); - tmp_data = NULL; - - rc = XGetWindowProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window, prop_atom, 0, bytes_remaining, - False, XA_STRING, + ! NILP (delete_p), target_type, &actual_type, &actual_format, &actual_size, &bytes_remaining, (unsigned char **) &tmp_data); if (rc == Success && tmp_data) - prop_value = make_string (tmp_data, size); + { + if (NILP (vector_ret_p)) + prop_value = make_string (tmp_data, size); + else + prop_value = x_property_data_to_lisp (f, + (unsigned char *) tmp_data, + actual_type, + actual_format, + actual_size); + } - XFree (tmp_data); + if (tmp_data) XFree (tmp_data); } UNBLOCK_INPUT; + UNGCPRO; return prop_value; } @@ -10551,7 +5193,6 @@ selection dialog's entry field, if MUSTMATCH is non-nil.") int count = specpdl_ptr - specpdl; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; char *cdef_file; - char *cprompt; GCPRO5 (prompt, dir, default_filename, mustmatch, file); CHECK_STRING (prompt); @@ -10730,8 +5371,6 @@ syms_of_xfns () staticpro (&Qsuppress_icon); Qundefined_color = intern ("undefined-color"); staticpro (&Qundefined_color); - Qcenter = intern ("center"); - staticpro (&Qcenter); Qcompound_text = intern ("compound-text"); staticpro (&Qcompound_text); Qcancel_timer = intern ("cancel-timer"); @@ -10743,36 +5382,11 @@ syms_of_xfns () = Fcons (Fcons (Qdisplay, Qt), Vtext_property_default_nonsticky); - Qlaplace = intern ("laplace"); - staticpro (&Qlaplace); - Qemboss = intern ("emboss"); - staticpro (&Qemboss); - Qedge_detection = intern ("edge-detection"); - staticpro (&Qedge_detection); - Qheuristic = intern ("heuristic"); - staticpro (&Qheuristic); - QCmatrix = intern (":matrix"); - staticpro (&QCmatrix); - QCcolor_adjustment = intern (":color-adjustment"); - staticpro (&QCcolor_adjustment); - QCmask = intern (":mask"); - staticpro (&QCmask); - Fput (Qundefined_color, Qerror_conditions, Fcons (Qundefined_color, Fcons (Qerror, Qnil))); Fput (Qundefined_color, Qerror_message, build_string ("Undefined color")); - DEFVAR_BOOL ("cross-disabled-images", &cross_disabled_images, - doc: /* Non-nil means always draw a cross over disabled images. -Disabled images are those having an `:conversion disabled' property. -A cross is always drawn on black & white displays. */); - cross_disabled_images = 0; - - DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, - doc: /* List of directories to search for window system bitmap files. */); - Vx_bitmap_file_path = decode_env_path ((char *) 0, PATH_BITMAPS); - DEFVAR_LISP ("x-pointer-shape", &Vx_pointer_shape, doc: /* The shape of the pointer when over text. Changing the value does not affect existing frames @@ -10851,13 +5465,6 @@ such a font. This is especially effective for such large fonts as Chinese, Japanese, and Korean. */); Vx_pixel_size_width_font_regexp = Qnil; - DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay, - doc: /* Time after which cached images are removed from the cache. -When an image has not been displayed this many seconds, remove it -from the image cache. Value must be an integer or nil with nil -meaning don't clear the cache. */); - Vimage_cache_eviction_delay = make_number (30 * 60); - #ifdef USE_X_TOOLKIT Fprovide (intern ("x-toolkit"), Qnil); #ifdef USE_MOTIF @@ -10869,6 +5476,19 @@ meaning don't clear the cache. */); #endif /* USE_MOTIF */ #endif /* USE_X_TOOLKIT */ +#ifdef USE_GTK + Fprovide (intern ("gtk"), Qnil); + + DEFVAR_LISP ("gtk-version-string", &Vgtk_version_string, + doc: /* Version info for GTK+. */); + { + char gtk_version[40]; + g_snprintf (gtk_version, sizeof (gtk_version), "%u.%u.%u", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + Vgtk_version_string = build_string (gtk_version); + } +#endif /* USE_GTK */ + /* X window properties. */ defsubr (&Sx_change_window_property); defsubr (&Sx_delete_window_property); @@ -10914,65 +5534,6 @@ meaning don't clear the cache. */); get_font_repertory_func = x_get_font_repertory; check_window_system_func = check_x; - /* Images. */ - Qxbm = intern ("xbm"); - staticpro (&Qxbm); - QCconversion = intern (":conversion"); - staticpro (&QCconversion); - QCheuristic_mask = intern (":heuristic-mask"); - staticpro (&QCheuristic_mask); - QCcolor_symbols = intern (":color-symbols"); - staticpro (&QCcolor_symbols); - QCascent = intern (":ascent"); - staticpro (&QCascent); - QCmargin = intern (":margin"); - staticpro (&QCmargin); - QCrelief = intern (":relief"); - staticpro (&QCrelief); - Qpostscript = intern ("postscript"); - staticpro (&Qpostscript); - QCloader = intern (":loader"); - staticpro (&QCloader); - QCbounding_box = intern (":bounding-box"); - staticpro (&QCbounding_box); - QCpt_width = intern (":pt-width"); - staticpro (&QCpt_width); - QCpt_height = intern (":pt-height"); - staticpro (&QCpt_height); - QCindex = intern (":index"); - staticpro (&QCindex); - Qpbm = intern ("pbm"); - staticpro (&Qpbm); - -#if HAVE_XPM - Qxpm = intern ("xpm"); - staticpro (&Qxpm); -#endif - -#if HAVE_JPEG - Qjpeg = intern ("jpeg"); - staticpro (&Qjpeg); -#endif - -#if HAVE_TIFF - Qtiff = intern ("tiff"); - staticpro (&Qtiff); -#endif - -#if HAVE_GIF - Qgif = intern ("gif"); - staticpro (&Qgif); -#endif - -#if HAVE_PNG - Qpng = intern ("png"); - staticpro (&Qpng); -#endif - - defsubr (&Sclear_image_cache); - defsubr (&Simage_size); - defsubr (&Simage_mask_p); - hourglass_atimer = NULL; hourglass_shown_p = 0; @@ -10991,36 +5552,7 @@ meaning don't clear the cache. */); #endif } - -void -init_xfns () -{ - image_types = NULL; - Vimage_types = Qnil; - - define_image_type (&xbm_type); - define_image_type (&gs_type); - define_image_type (&pbm_type); - -#if HAVE_XPM - define_image_type (&xpm_type); -#endif - -#if HAVE_JPEG - define_image_type (&jpeg_type); -#endif - -#if HAVE_TIFF - define_image_type (&tiff_type); -#endif - -#if HAVE_GIF - define_image_type (&gif_type); -#endif - -#if HAVE_PNG - define_image_type (&png_type); -#endif -} - #endif /* HAVE_X_WINDOWS */ + +/* arch-tag: 55040d02-5485-4d58-8b22-95a7a05f3288 + (do not change this comment) */ diff --git a/src/xmenu.c b/src/xmenu.c index b46d28626f..08bad9c224 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -99,7 +99,6 @@ Lisp_Object Vmenu_updating_frame; Lisp_Object Qdebug_on_next_call; extern Lisp_Object Qmenu_bar; -extern Lisp_Object Qmouse_click, Qevent_kind; extern Lisp_Object QCtoggle, QCradio; @@ -610,7 +609,7 @@ single_menu_item (key, item, dummy, skp_v) #endif /* not HAVE_BOXES */ #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) - if (!NILP(map)) + if (!NILP (map)) /* Indicate visually that this is a submenu. */ item_string = concat2 (item_string, build_string (" >")); #endif @@ -696,7 +695,7 @@ list_of_items (pane) the scroll bar or the edit window. Fx_popup_menu needs to be sure it is the edit window. */ static void -mouse_position_for_popup(f, x, y) +mouse_position_for_popup (f, x, y) FRAME_PTR f; int *x; int *y; @@ -1093,6 +1092,12 @@ on the left of the dialog box and all following items on the right. CHECK_STRING (title); record_unwind_protect (unuse_menu_items, Qnil); + if (NILP (Fcar (Fcdr (contents)))) + /* No buttons specified, add an "Ok" button so users can pop down + the dialog. Also, the lesstif/motif version crashes if there are + no buttons. */ + contents = Fcons (title, Fcons (Fcons (build_string ("Ok"), Qt), Qnil)); + list_of_panes (Fcons (contents, Qnil)); /* Display them in a dialog box. */ @@ -1116,17 +1121,19 @@ on the left of the dialog box and all following items on the right. and x-popup-dialog; it is not used for the menu bar. If DO_TIMERS is nonzero, run timers. + If DOWN_ON_KEYPRESS is nonzero, pop down if a key is pressed. NOTE: All calls to popup_get_selection should be protected with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */ #ifdef USE_X_TOOLKIT static void -popup_get_selection (initial_event, dpyinfo, id, do_timers) +popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) XEvent *initial_event; struct x_display_info *dpyinfo; LWLIB_ID id; int do_timers; + int down_on_keypress; { XEvent event; @@ -1162,15 +1169,20 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers) event.xbutton.state = 0; #endif } - /* If the user presses a key, deactivate the menu. + /* If the user presses a key that doesn't go to the menu, + deactivate the menu. The user is likely to do that if we get wedged. - This is mostly for Lucid, Motif pops down the menu on ESC. */ + All toolkits now pop down menus on ESC. + For dialogs however, the focus may not be on the dialog, so + in that case, we pop down. */ else if (event.type == KeyPress + && down_on_keypress && dpyinfo->display == event.xbutton.display) { KeySym keysym = XLookupKeysym (&event.xkey, 0); - if (!IsModifierKey (keysym)) - popup_activated_flag = 0; + if (!IsModifierKey (keysym) + && x_any_window_to_frame (dpyinfo, event.xany.window) != NULL) + popup_activated_flag = 0; } x_dispatch_event (&event, event.xany.display); @@ -1217,7 +1229,8 @@ x_activate_menubar (f) return; #ifdef USE_GTK - if (! xg_win_to_widget (f->output_data.x->saved_menu_event->xany.window)) + if (! xg_win_to_widget (FRAME_X_DISPLAY (f), + f->output_data.x->saved_menu_event->xany.window)) return; #endif @@ -1303,6 +1316,7 @@ show_help_event (f, widget, help) } else { +#if 0 /* This code doesn't do anything useful. ++kfs */ /* WIDGET is the popup menu. It's parent is the frame's widget. See which frame that is. */ xt_or_gtk_widget frame_widget = XtParent (widget); @@ -1316,7 +1330,7 @@ show_help_event (f, widget, help) FRAME_X_P (f) && f->output_data.x->widget == frame_widget)) break; } - +#endif show_help_echo (help, Qnil, Qnil, Qnil, 1); } } @@ -1866,6 +1880,12 @@ set_frame_menubar (f, first_time, deep_p) f->output_data.x->saved_menu_event->type = 0; } +#ifdef USE_GTK + /* If we have detached menus, we must update deep so detached menus + also gets updated. */ + deep_p = deep_p || xg_have_tear_offs (); +#endif + if (deep_p) { /* Make a widget-value tree representing the entire menu trees. */ @@ -2066,7 +2086,7 @@ set_frame_menubar (f, first_time, deep_p) xg_crazy_callback_abort = 1; if (menubar_widget) { - /* The third arg is DEEP_P, which says to consider the entire + /* The fourth arg is DEEP_P, which says to consider the entire menu trees we supply, rather than just the menu bar item names. */ xg_modify_menubar_widgets (menubar_widget, f, @@ -2343,17 +2363,13 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) gtk_widget_show_all (menu); gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, 0); - xg_did_tearoff = 0; /* Set this to one. popup_widget_loop increases it by one, so it becomes two. show_help_echo uses this to detect popup menus. */ popup_activated_flag = 1; /* Process events that apply to the menu. */ popup_widget_loop (); - if (xg_did_tearoff) - xg_keep_popup (menu, xg_did_tearoff); - else - gtk_widget_destroy (menu); + gtk_widget_destroy (menu); /* Must reset this manually because the button release event is not passed to Emacs event loop. */ @@ -2439,7 +2455,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) popup_activated_flag = 1; /* Process events that apply to the menu. */ - popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 0); + popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 0, 0); /* fp turned off the following statement and wrote a comment that it is unnecessary--that the menu has already disappeared. @@ -2833,7 +2849,8 @@ create_and_show_dialog (f, first_wv) Fcons (make_number (dialog_id >> (fact)), make_number (dialog_id & ~(-1 << (fact))))); - popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), dialog_id, 1); + popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), + dialog_id, 1, 1); unbind_to (count, Qnil); } @@ -3376,3 +3393,6 @@ The enable predicate for a menu command should check this variable. */); defsubr (&Sx_popup_dialog); #endif } + +/* arch-tag: 92ea573c-398e-496e-ac73-2436f7d63242 + (do not change this comment) */ diff --git a/src/xrdb.c b/src/xrdb.c index 87c8f4b285..ed701c64c6 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -812,3 +812,6 @@ main (argc, argv) XCloseDisplay (display); } #endif /* TESTRM */ + +/* arch-tag: 37e6fbab-ed05-4363-9e76-6c4109ed511f + (do not change this comment) */ diff --git a/src/xselect.c b/src/xselect.c index 21b7ecff8a..b4d61f7c9a 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */ /* Rewritten by jwz */ #include +#include /* termhooks.h needs this */ #include "lisp.h" #include "xterm.h" /* for all of the X includes */ #include "dispextern.h" /* frame.h seems to want this */ @@ -30,6 +31,9 @@ Boston, MA 02111-1307, USA. */ #include "blockinput.h" #include "buffer.h" #include "process.h" +#include "termhooks.h" + +#include struct prop_location; @@ -50,7 +54,9 @@ static struct prop_location *expect_property_change P_ ((Display *, Window, static void unexpect_property_change P_ ((struct prop_location *)); static Lisp_Object wait_for_property_change_unwind P_ ((Lisp_Object)); static void wait_for_property_change P_ ((struct prop_location *)); -static Lisp_Object x_get_foreign_selection P_ ((Lisp_Object, Lisp_Object)); +static Lisp_Object x_get_foreign_selection P_ ((Lisp_Object, + Lisp_Object, + Lisp_Object)); static void x_get_window_property P_ ((Display *, Window, Atom, unsigned char **, int *, Atom *, int *, unsigned long *, int)); @@ -1215,8 +1221,8 @@ static Window reading_selection_window; Converts this to Lisp data and returns it. */ static Lisp_Object -x_get_foreign_selection (selection_symbol, target_type) - Lisp_Object selection_symbol, target_type; +x_get_foreign_selection (selection_symbol, target_type, time_stamp) + Lisp_Object selection_symbol, target_type, time_stamp; { struct frame *sf = SELECTED_FRAME (); Window requestor_window = FRAME_X_WINDOW (sf); @@ -1235,6 +1241,18 @@ x_get_foreign_selection (selection_symbol, target_type) else type_atom = symbol_to_x_atom (dpyinfo, display, target_type); + if (! NILP (time_stamp)) + { + if (CONSP (time_stamp)) + requestor_time = (Time) cons_to_long (time_stamp); + else if (INTEGERP (time_stamp)) + requestor_time = (Time) XUINT (time_stamp); + else if (FLOATP (time_stamp)) + requestor_time = (Time) XFLOAT (time_stamp); + else + error ("TIME_STAMP must be cons or number"); + } + BLOCK_INPUT; count = x_catch_errors (display); @@ -1926,13 +1944,15 @@ anything that the functions on `selection-converter-alist' know about. */) will block until all of the data has arrived. */ DEFUN ("x-get-selection-internal", Fx_get_selection_internal, - Sx_get_selection_internal, 2, 2, 0, + Sx_get_selection_internal, 2, 3, 0, doc: /* Return text selected from some X window. SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. \(Those are literal upper-case symbol names, since that's what X expects.) -TYPE is the type of data desired, typically `STRING'. */) - (selection_symbol, target_type) - Lisp_Object selection_symbol, target_type; +TYPE is the type of data desired, typically `STRING'. +TIME_STAMP is the time to use in the XConvertSelection call for foreign +selections. If omitted, defaults to the time for the last event. */) + (selection_symbol, target_type, time_stamp) + Lisp_Object selection_symbol, target_type, time_stamp; { Lisp_Object val = Qnil; struct gcpro gcpro1, gcpro2; @@ -1956,7 +1976,7 @@ TYPE is the type of data desired, typically `STRING'. */) if (NILP (val)) { - val = x_get_foreign_selection (selection_symbol, target_type); + val = x_get_foreign_selection (selection_symbol, target_type, time_stamp); goto DONE; } @@ -2278,6 +2298,351 @@ Positive means shift the values forward, negative means backward. */) #endif +/*********************************************************************** + Drag and drop support +***********************************************************************/ +/* Check that lisp values are of correct type for x_fill_property_data. + That is, number, string or a cons with two numbers (low and high 16 + bit parts of a 32 bit number). */ + +int +x_check_property_data (data) + Lisp_Object data; +{ + Lisp_Object iter; + int size = 0; + + for (iter = data; CONSP (iter) && size != -1; iter = XCDR (iter), ++size) + { + Lisp_Object o = XCAR (iter); + + if (! NUMBERP (o) && ! STRINGP (o) && ! CONSP (o)) + size = -1; + else if (CONSP (o) && + (! NUMBERP (XCAR (o)) || ! NUMBERP (XCDR (o)))) + size = -1; + } + + return size; +} + +/* Convert lisp values to a C array. Values may be a number, a string + which is taken as an X atom name and converted to the atom value, or + a cons containing the two 16 bit parts of a 32 bit number. + + DPY is the display use to look up X atoms. + DATA is a Lisp list of values to be converted. + RET is the C array that contains the converted values. It is assumed + it is big enough to hol all values. + FORMAT is 8, 16 or 32 and gives the size in bits for each C value to + be stored in RET. */ + +void +x_fill_property_data (dpy, data, ret, format) + Display *dpy; + Lisp_Object data; + void *ret; + int format; +{ + CARD32 val; + CARD32 *d32 = (CARD32 *) ret; + CARD16 *d16 = (CARD16 *) ret; + CARD8 *d08 = (CARD8 *) ret; + Lisp_Object iter; + + for (iter = data; CONSP (iter); iter = XCDR (iter)) + { + Lisp_Object o = XCAR (iter); + + if (INTEGERP (o)) + val = (CARD32) XFASTINT (o); + else if (FLOATP (o)) + val = (CARD32) XFLOAT (o); + else if (CONSP (o)) + val = (CARD32) cons_to_long (o); + else if (STRINGP (o)) + { + BLOCK_INPUT; + val = XInternAtom (dpy, (char *) SDATA (o), False); + UNBLOCK_INPUT; + } + else + error ("Wrong type, must be string, number or cons"); + + if (format == 8) + *d08++ = (CARD8) val; + else if (format == 16) + *d16++ = (CARD16) val; + else + *d32++ = val; + } +} + +/* Convert an array of C values to a Lisp list. + F is the frame to be used to look up X atoms if the TYPE is XA_ATOM. + DATA is a C array of values to be converted. + TYPE is the type of the data. Only XA_ATOM is special, it converts + each number in DATA to its corresponfing X atom as a symbol. + FORMAT is 8, 16 or 32 and gives the size in bits for each C value to + be stored in RET. + SIZE is the number of elements in DATA. + + Also see comment for selection_data_to_lisp_data above. */ + +Lisp_Object +x_property_data_to_lisp (f, data, type, format, size) + struct frame *f; + unsigned char *data; + Atom type; + int format; + unsigned long size; +{ + return selection_data_to_lisp_data (FRAME_X_DISPLAY (f), + data, size*format/8, type, format); +} + +/* Get the mouse position frame relative coordinates. */ + +static void +mouse_position_for_drop (f, x, y) + FRAME_PTR f; + int *x; + int *y; +{ + Window root, dummy_window; + int dummy; + + BLOCK_INPUT; + + XQueryPointer (FRAME_X_DISPLAY (f), + DefaultRootWindow (FRAME_X_DISPLAY (f)), + + /* The root window which contains the pointer. */ + &root, + + /* Window pointer is on, not used */ + &dummy_window, + + /* The position on that root window. */ + x, y, + + /* x/y in dummy_window coordinates, not used. */ + &dummy, &dummy, + + /* Modifier keys and pointer buttons, about which + we don't care. */ + (unsigned int *) &dummy); + + + /* Absolute to relative. */ + *x -= f->left_pos + FRAME_OUTER_TO_INNER_DIFF_X (f); + *y -= f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f); + + UNBLOCK_INPUT; +} + +DEFUN ("x-get-atom-name", Fx_get_atom_name, + Sx_get_atom_name, 1, 2, 0, + doc: /* Return the X atom name for VALUE as a string. +VALUE may be a number or a cons where the car is the upper 16 bits and +the cdr is the lower 16 bits of a 32 bit value. +Use the display for FRAME or the current frame if FRAME is not given or nil. + +If the value is 0 or the atom is not known, return the empty string. */) + (value, frame) + Lisp_Object value, frame; +{ + struct frame *f = check_x_frame (frame); + char *name = 0; + Lisp_Object ret = Qnil; + int count; + Display *dpy = FRAME_X_DISPLAY (f); + Atom atom; + + if (INTEGERP (value)) + atom = (Atom) XUINT (value); + else if (FLOATP (value)) + atom = (Atom) XFLOAT (value); + else if (CONSP (value)) + atom = (Atom) cons_to_long (value); + else + error ("Wrong type, value must be number or cons"); + + BLOCK_INPUT; + count = x_catch_errors (dpy); + + name = atom ? XGetAtomName (dpy, atom) : ""; + + if (! x_had_errors_p (dpy)) + ret = make_string (name, strlen (name)); + + x_uncatch_errors (dpy, count); + + if (atom && name) XFree (name); + if (NILP (ret)) ret = make_string ("", 0); + + UNBLOCK_INPUT; + + return ret; +} + +/* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. + TODO: Check if this client event really is a DND event? */ + +int +x_handle_dnd_message (f, event, dpyinfo, bufp) + struct frame *f; + XClientMessageEvent *event; + struct x_display_info *dpyinfo; + struct input_event *bufp; +{ + Lisp_Object vec; + Lisp_Object frame; + unsigned long size = (8*sizeof (event->data))/event->format; + int x, y; + + XSETFRAME (frame, f); + + vec = Fmake_vector (make_number (4), Qnil); + AREF (vec, 0) = SYMBOL_NAME (x_atom_to_symbol (FRAME_X_DISPLAY (f), + event->message_type)); + AREF (vec, 1) = frame; + AREF (vec, 2) = make_number (event->format); + AREF (vec, 3) = x_property_data_to_lisp (f, + event->data.b, + event->message_type, + event->format, + size); + + mouse_position_for_drop (f, &x, &y); + bufp->kind = DRAG_N_DROP_EVENT; + bufp->frame_or_window = Fcons (frame, vec); + bufp->timestamp = CurrentTime; + bufp->x = make_number (x); + bufp->y = make_number (y); + bufp->arg = Qnil; + bufp->modifiers = 0; + + return 1; +} + +DEFUN ("x-send-client-message", Fx_send_client_event, + Sx_send_client_message, 6, 6, 0, + doc: /* Send a client message of MESSAGE-TYPE to window DEST on DISPLAY. + +For DISPLAY, specify either a frame or a display name (a string). +If DISPLAY is nil, that stands for the selected frame's display. +DEST may be a number, in which case it is a Window id. The value 0 may +be used to send to the root window of the DISPLAY. +If DEST is a cons, it is converted to a 32 bit number +with the high 16 bits from the car and the lower 16 bit from the cdr. That +number is then used as a window id. +If DEST is a frame the event is sent to the outer window of that frame. +Nil means the currently selected frame. +If DEST is the string "PointerWindow" the event is sent to the window that +contains the pointer. If DEST is the string "InputFocus" the event is +sent to the window that has the input focus. +FROM is the frame sending the event. Use nil for currently selected frame. +MESSAGE-TYPE is the name of an Atom as a string. +FORMAT must be one of 8, 16 or 32 and determines the size of the values in +bits. VALUES is a list of numbers, cons and/or strings containing the values +to send. If a value is a string, it is converted to an Atom and the value of +the Atom is sent. If a value is a cons, it is converted to a 32 bit number +with the high 16 bits from the car and the lower 16 bit from the cdr. +If more values than fits into the event is given, the excessive values +are ignored. */) + (display, dest, from, message_type, format, values) + Lisp_Object display, dest, from, message_type, format, values; +{ + struct x_display_info *dpyinfo = check_x_display_info (display); + Window wdest; + XEvent event; + Lisp_Object cons; + int size; + struct frame *f = check_x_frame (from); + int count; + int to_root; + + CHECK_STRING (message_type); + CHECK_NUMBER (format); + CHECK_CONS (values); + + if (x_check_property_data (values) == -1) + error ("Bad data in VALUES, must be number, cons or string"); + + event.xclient.type = ClientMessage; + event.xclient.format = XFASTINT (format); + + if (event.xclient.format != 8 && event.xclient.format != 16 + && event.xclient.format != 32) + error ("FORMAT must be one of 8, 16 or 32"); + + if (FRAMEP (dest) || NILP (dest)) + { + struct frame *fdest = check_x_frame (dest); + wdest = FRAME_OUTER_WINDOW (fdest); + } + else if (STRINGP (dest)) + { + if (strcmp (SDATA (dest), "PointerWindow") == 0) + wdest = PointerWindow; + else if (strcmp (SDATA (dest), "InputFocus") == 0) + wdest = InputFocus; + else + error ("DEST as a string must be one of PointerWindow or InputFocus"); + } + else if (INTEGERP (dest)) + wdest = (Window) XFASTINT (dest); + else if (FLOATP (dest)) + wdest = (Window) XFLOAT (dest); + else if (CONSP (dest)) + { + if (! NUMBERP (XCAR (dest)) || ! NUMBERP (XCDR (dest))) + error ("Both car and cdr for DEST must be numbers"); + else + wdest = (Window) cons_to_long (dest); + } + else + error ("DEST must be a frame, nil, string, number or cons"); + + if (wdest == 0) wdest = dpyinfo->root_window; + to_root = wdest == dpyinfo->root_window; + + for (cons = values, size = 0; CONSP (cons); cons = XCDR (cons), ++size) + ; + + BLOCK_INPUT; + + event.xclient.message_type + = XInternAtom (dpyinfo->display, SDATA (message_type), False); + event.xclient.display = dpyinfo->display; + + /* Some clients (metacity for example) expects sending window to be here + when sending to the root window. */ + event.xclient.window = to_root ? FRAME_OUTER_WINDOW (f) : wdest; + + memset (event.xclient.data.b, 0, sizeof (event.xclient.data.b)); + x_fill_property_data (dpyinfo->display, values, event.xclient.data.b, + event.xclient.format); + + /* If event mask is 0 the event is sent to the client that created + the destination window. But if we are sending to the root window, + there is no such client. Then we set the event mask to 0xffff. The + event then goes to clients selecting for events on the root window. */ + count = x_catch_errors (dpyinfo->display); + { + int propagate = to_root ? False : True; + unsigned mask = to_root ? 0xffff : 0; + XSendEvent (dpyinfo->display, wdest, propagate, mask, &event); + XFlush (dpyinfo->display); + } + x_uncatch_errors (dpyinfo->display, count); + UNBLOCK_INPUT; + + return Qnil; +} + + void syms_of_xselect () { @@ -2293,6 +2658,9 @@ syms_of_xselect () defsubr (&Sx_rotate_cut_buffers_internal); #endif + defsubr (&Sx_get_atom_name); + defsubr (&Sx_send_client_message); + reading_selection_reply = Fcons (Qnil, Qnil); staticpro (&reading_selection_reply); reading_selection_window = 0; @@ -2400,3 +2768,6 @@ A value of 0 means wait as long as necessary. This is initialized from the Qforeign_selection = intern ("foreign-selection"); staticpro (&Qforeign_selection); } + +/* arch-tag: 7c293b0f-9918-4f69-8ac7-03e142307236 + (do not change this comment) */ diff --git a/src/xsmfns.c b/src/xsmfns.c index 5e712fa1b3..e486e5c6e3 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -24,6 +24,9 @@ Boston, MA 02111-1307, USA. */ #ifdef HAVE_X_SM #include +#include +#include + #ifdef HAVE_STRING_H #include #else @@ -47,6 +50,7 @@ Boston, MA 02111-1307, USA. */ #include "lisp.h" #include "termhooks.h" #include "termopts.h" +#include "xterm.h" #ifndef MAXPATHLEN #define MAXPATHLEN 1024 @@ -102,13 +106,10 @@ Lisp_Object Vx_session_previous_id; /* Handle any messages from the session manager. If no connection is open to a session manager, just return 0. - Otherwise returns the number of events stored in buffer BUFP, - which can hold up to *NUMCHARS characters. At most one event is - stored, a SAVE_SESSION_EVENT. */ + Otherwise returns 1 if SAVE_SESSION_EVENT is stored in buffer BUFP. */ int -x_session_check_input (bufp, numchars) +x_session_check_input (bufp) struct input_event *bufp; - int *numchars; { SELECT_TYPE read_fds; EMACS_TIME tmout; @@ -142,16 +143,11 @@ x_session_check_input (bufp, numchars) /* Check if smc_interact_CB was called and we shall generate a SAVE_SESSION_EVENT. */ - if (*numchars > 0 && emacs_event.kind != NO_EVENT) - { - bcopy (&emacs_event, bufp, sizeof (struct input_event)); - bufp++; - (*numchars)--; + if (emacs_event.kind == NO_EVENT) + return 0; - return 1; - } - - return 0; + bcopy (&emacs_event, bufp, sizeof (struct input_event)); + return 1; } /* Return non-zero if we have a connection to a session manager.*/ @@ -403,9 +399,37 @@ ice_conn_watch_CB (iceConn, clientData, opening, watchData) #endif /* ! defined (SIGIO) */ } +/* Create the client leader window. */ +static void +create_client_leader_window (dpyinfo, client_id) + struct x_display_info *dpyinfo; + char *client_id; +{ + Window w; + XClassHint class_hints; + Atom sm_id; + + w = XCreateSimpleWindow (dpyinfo->display, + dpyinfo->root_window, + -1, -1, 1, 1, + CopyFromParent, CopyFromParent, CopyFromParent); + + class_hints.res_name = (char *) SDATA (Vx_resource_name); + class_hints.res_class = (char *) SDATA (Vx_resource_class); + XSetClassHint (dpyinfo->display, w, &class_hints); + XStoreName (dpyinfo->display, w, class_hints.res_name); + + sm_id = XInternAtom (dpyinfo->display, "SM_CLIENT_ID", False); + XChangeProperty (dpyinfo->display, w, sm_id, XA_STRING, 8, PropModeReplace, + client_id, strlen (client_id)); + + dpyinfo->client_leader_window = w; +} + /* Try to open a connection to the session manager. */ void -x_session_initialize () +x_session_initialize (dpyinfo) + struct x_display_info *dpyinfo; { #define SM_ERRORSTRING_LEN 512 char errorstring[SM_ERRORSTRING_LEN]; @@ -466,7 +490,17 @@ x_session_initialize () errorstring); if (smc_conn != 0) - Vx_session_id = make_string (client_id, strlen (client_id)); + { + Vx_session_id = make_string (client_id, strlen (client_id)); + +#ifdef USE_GTK + /* GTK creats a leader window by itself, but we need to tell + it about our client_id. */ + gdk_set_sm_client_id (client_id); +#else + create_client_leader_window (dpyinfo, client_id); +#endif + } } @@ -544,3 +578,6 @@ See also `emacs-save-session-functions', `emacs-session-save' and } #endif /* HAVE_X_SM */ + +/* arch-tag: 56a2c58c-adfa-430a-b772-130abd29fd2e + (do not change this comment) */ diff --git a/src/xterm.c b/src/xterm.c index 82aed60fbd..ae4d4063be 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -132,6 +132,7 @@ extern void _XEditResCheckMessages (); #include #include #define ARROW_SCROLLBAR +#define XAW_ARROW_SCROLLBARS #include #else /* !HAVE_XAW3D */ #include @@ -217,6 +218,17 @@ static String Xt_default_resources[] = {0}; static int toolkit_scroll_bar_interaction; +/* Non-zero means to not move point as a result of clicking on a + frame to focus it (when focus-follows-mouse is nil). */ + +int x_mouse_click_focus_ignore_position; + +/* Non-zero timeout value means ignore next mouse click if it arrives + before that timeout elapses (i.e. as part of the same sequence of + events resulting from clicking on a frame to select it). */ + +static unsigned long ignore_next_mouse_click_timeout; + /* Mouse movement. Formerly, we used PointerMotionHintMask (in standard_event_mask) @@ -287,7 +299,7 @@ extern Lisp_Object Vcommand_line_args, Vsystem_name; extern Lisp_Object Vx_no_window_manager; -extern Lisp_Object Qface, Qmouse_face, Qeql; +extern Lisp_Object Qeql; extern int errno; @@ -336,16 +348,10 @@ static void x_clear_frame P_ ((void)); static void frame_highlight P_ ((struct frame *)); static void frame_unhighlight P_ ((struct frame *)); static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *)); -static int x_focus_changed P_ ((int, - int, - struct x_display_info *, - struct frame *, - struct input_event *, - int)); -static int x_detect_focus_change P_ ((struct x_display_info *, - XEvent *, - struct input_event *, - int)); +static void x_focus_changed P_ ((int, int, struct x_display_info *, + struct frame *, struct input_event *)); +static void x_detect_focus_change P_ ((struct x_display_info *, + XEvent *, struct input_event *)); static void XTframe_rehighlight P_ ((struct frame *)); static void x_frame_rehighlight P_ ((struct x_display_info *)); static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *)); @@ -357,18 +363,15 @@ static void x_flush P_ ((struct frame *f)); static void x_update_begin P_ ((struct frame *)); static void x_update_window_begin P_ ((struct window *)); static void x_after_update_window_line P_ ((struct glyph_row *)); -static struct scroll_bar *x_window_to_scroll_bar P_ ((Window)); +static struct scroll_bar *x_window_to_scroll_bar P_ ((Display *, Window)); static void x_scroll_bar_report_motion P_ ((struct frame **, Lisp_Object *, enum scroll_bar_part *, Lisp_Object *, Lisp_Object *, unsigned long *)); static void x_check_fullscreen P_ ((struct frame *)); -static void x_check_fullscreen_move P_ ((struct frame *)); -static int handle_one_xevent P_ ((struct x_display_info *, - XEvent *, - struct input_event **, - int *, - int *)); +static void x_check_expected_move P_ ((struct frame *)); +static int handle_one_xevent P_ ((struct x_display_info *, XEvent *, + int *, struct input_event *)); /* Flush display of frame F, or of all frames if F is null. */ @@ -570,6 +573,9 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) output_cursor.x, output_cursor.y); x_draw_vertical_border (w); + + draw_window_fringes (w); + UNBLOCK_INPUT; } @@ -649,11 +655,7 @@ x_after_update_window_line (desired_row) xassert (w); if (!desired_row->mode_line_p && !w->pseudo_window_p) - { - BLOCK_INPUT; - draw_row_fringe_bitmaps (w, desired_row); - UNBLOCK_INPUT; - } + desired_row->redraw_fringe_bitmaps_p = 1; /* When a window has disappeared, make sure that no rest of full-width rows stays visible in the internal border. Could @@ -697,11 +699,26 @@ x_draw_fringe_bitmap (w, row, p) Window window = FRAME_X_WINDOW (f); GC gc = f->output_data.x->normal_gc; struct face *face = p->face; + int rowY; /* Must clip because of partially visible lines. */ - x_clip_to_row (w, row, gc); + rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); + if (p->y < rowY) + { + /* Adjust position of "bottom aligned" bitmap on partially + visible last row. */ + int oldY = row->y; + int oldVH = row->visible_height; + row->visible_height = p->h; + row->y -= rowY - p->y; + x_clip_to_row (w, row, gc); + row->y = oldY; + row->visible_height = oldVH; + } + else + x_clip_to_row (w, row, gc); - if (p->bx >= 0) + if (p->bx >= 0 && !p->overlay_p) { /* In case the same realized face is used for fringes and for something displayed in the text (e.g. face `region' on @@ -719,20 +736,49 @@ x_draw_fringe_bitmap (w, row, p) XSetForeground (display, face->gc, face->foreground); } - if (p->which != NO_FRINGE_BITMAP) + if (p->which) { - unsigned char *bits = fringe_bitmaps[p->which].bits + p->dh; - Pixmap pixmap; + unsigned char *bits; + Pixmap pixmap, clipmask = (Pixmap) 0; int depth = DefaultDepthOfScreen (FRAME_X_SCREEN (f)); + XGCValues gcv; + + if (p->wd > 8) + bits = (unsigned char *)(p->bits + p->dh); + else + bits = (unsigned char *)p->bits + p->dh; /* Draw the bitmap. I believe these small pixmaps can be cached by the server. */ pixmap = XCreatePixmapFromBitmapData (display, window, bits, p->wd, p->h, - face->foreground, + (p->cursor_p + ? (p->overlay_p ? face->background + : f->output_data.x->cursor_pixel) + : face->foreground), face->background, depth); + + if (p->overlay_p) + { + clipmask = XCreatePixmapFromBitmapData (display, + FRAME_X_DISPLAY_INFO (f)->root_window, + bits, p->wd, p->h, + 1, 0, 1); + gcv.clip_mask = clipmask; + gcv.clip_x_origin = p->x; + gcv.clip_y_origin = p->y; + XChangeGC (display, gc, GCClipMask | GCClipXOrigin | GCClipYOrigin, &gcv); + } + XCopyArea (display, pixmap, window, gc, 0, 0, p->wd, p->h, p->x, p->y); XFreePixmap (display, pixmap); + + if (p->overlay_p) + { + gcv.clip_mask = (Pixmap) 0; + XChangeGC (display, gc, GCClipMask, &gcv); + XFreePixmap (display, clipmask); + } } XSetClipMask (display, gc, None); @@ -3129,20 +3175,16 @@ x_new_focus_frame (dpyinfo, frame) /* Handle FocusIn and FocusOut state changes for FRAME. If FRAME has focus and there exists more than one frame, puts - a FOCUS_IN_EVENT into BUFP. - Returns number of events inserted into BUFP. */ + a FOCUS_IN_EVENT into *BUFP. */ -static int -x_focus_changed (type, state, dpyinfo, frame, bufp, numchars) +static void +x_focus_changed (type, state, dpyinfo, frame, bufp) int type; int state; struct x_display_info *dpyinfo; struct frame *frame; struct input_event *bufp; - int numchars; { - int nr_events = 0; - if (type == FocusIn) { if (dpyinfo->x_focus_event_frame != frame) @@ -3152,17 +3194,12 @@ x_focus_changed (type, state, dpyinfo, frame, bufp, numchars) /* Don't stop displaying the initial startup message for a switch-frame event we don't need. */ - if (numchars > 0 - && GC_NILP (Vterminal_frame) + if (GC_NILP (Vterminal_frame) && GC_CONSP (Vframe_list) && !GC_NILP (XCDR (Vframe_list))) { bufp->kind = FOCUS_IN_EVENT; XSETFRAME (bufp->frame_or_window, frame); - bufp->arg = Qnil; - ++bufp; - numchars--; - ++nr_events; } } @@ -3188,57 +3225,52 @@ x_focus_changed (type, state, dpyinfo, frame, bufp, numchars) XUnsetICFocus (FRAME_XIC (frame)); #endif } - - return nr_events; } /* The focus may have changed. Figure out if it is a real focus change, by checking both FocusIn/Out and Enter/LeaveNotify events. - Returns number of events inserted into BUFP. */ + Returns FOCUS_IN_EVENT event in *BUFP. */ -static int -x_detect_focus_change (dpyinfo, event, bufp, numchars) +static void +x_detect_focus_change (dpyinfo, event, bufp) struct x_display_info *dpyinfo; XEvent *event; struct input_event *bufp; - int numchars; { struct frame *frame; int nr_events = 0; frame = x_any_window_to_frame (dpyinfo, event->xany.window); - if (! frame) return nr_events; + if (! frame) + return; switch (event->type) { case EnterNotify: case LeaveNotify: - if (event->xcrossing.detail != NotifyInferior - && event->xcrossing.focus - && ! (frame->output_data.x->focus_state & FOCUS_EXPLICIT)) - nr_events = x_focus_changed ((event->type == EnterNotify - ? FocusIn : FocusOut), - FOCUS_IMPLICIT, - dpyinfo, - frame, - bufp, - numchars); + { + struct frame *focus_frame = dpyinfo->x_focus_event_frame; + int focus_state + = focus_frame ? focus_frame->output_data.x->focus_state : 0; + + if (event->xcrossing.detail != NotifyInferior + && event->xcrossing.focus + && ! (focus_state & FOCUS_EXPLICIT)) + x_focus_changed ((event->type == EnterNotify ? FocusIn : FocusOut), + FOCUS_IMPLICIT, + dpyinfo, frame, bufp); + } break; case FocusIn: case FocusOut: - nr_events = x_focus_changed (event->type, - (event->xfocus.detail == NotifyPointer - ? FOCUS_IMPLICIT : FOCUS_EXPLICIT), - dpyinfo, - frame, - bufp, - numchars); + x_focus_changed (event->type, + (event->xfocus.detail == NotifyPointer ? + FOCUS_IMPLICIT : FOCUS_EXPLICIT), + dpyinfo, frame, bufp); break; } - - return nr_events; } @@ -3583,35 +3615,39 @@ glyph_rect (f, x, y, rect) XRectangle *rect; { Lisp_Object window; - int found = 0; + struct window *w; + struct glyph_row *r, *end_row; window = window_from_coordinates (f, x, y, 0, &x, &y, 0); - if (!NILP (window)) - { - struct window *w = XWINDOW (window); - struct glyph_row *r = MATRIX_FIRST_TEXT_ROW (w->current_matrix); - struct glyph_row *end = r + w->current_matrix->nrows - 1; + if (NILP (window)) + return 0; - for (; !found && r < end && r->enabled_p; ++r) - if (r->y >= y) - { - struct glyph *g = r->glyphs[TEXT_AREA]; - struct glyph *end = g + r->used[TEXT_AREA]; - int gx; + w = XWINDOW (window); + r = MATRIX_FIRST_TEXT_ROW (w->current_matrix); + end_row = r + w->current_matrix->nrows - 1; - for (gx = r->x; !found && g < end; gx += g->pixel_width, ++g) - if (gx >= x) - { - rect->width = g->pixel_width; - rect->height = r->height; - rect->x = WINDOW_TO_FRAME_PIXEL_X (w, gx); - rect->y = WINDOW_TO_FRAME_PIXEL_Y (w, r->y); - found = 1; - } - } + for (; r < end_row && r->enabled_p; ++r) + { + if (r->y >= y) + { + struct glyph *g = r->glyphs[TEXT_AREA]; + struct glyph *end = g + r->used[TEXT_AREA]; + int gx = r->x; + while (g < end && gx < x) + gx += g->pixel_width, ++g; + if (g < end) + { + rect->width = g->pixel_width; + rect->height = r->height; + rect->x = WINDOW_TO_FRAME_PIXEL_X (w, gx); + rect->y = WINDOW_TO_FRAME_PIXEL_Y (w, r->y); + return 1; + } + break; + } } - return found; + return 0; } @@ -3776,7 +3812,9 @@ XTmouse_position (fp, insist, bar_window, part, x, y, time) /* If not, is it one of our scroll bars? */ if (! f1) { - struct scroll_bar *bar = x_window_to_scroll_bar (win); + struct scroll_bar *bar; + + bar = x_window_to_scroll_bar (FRAME_X_DISPLAY (*fp), win); if (bar) { @@ -3847,18 +3885,20 @@ XTmouse_position (fp, insist, bar_window, part, x, y, time) /* Scroll bar support. */ -/* Given an X window ID, find the struct scroll_bar which manages it. +/* Given an X window ID and a DISPLAY, find the struct scroll_bar which + manages it. This can be called in GC, so we have to make sure to strip off mark bits. */ static struct scroll_bar * -x_window_to_scroll_bar (window_id) +x_window_to_scroll_bar (display, window_id) + Display *display; Window window_id; { Lisp_Object tail; #ifdef USE_GTK - window_id = (Window) xg_get_scroll_id_for_window (window_id); + window_id = (Window) xg_get_scroll_id_for_window (display, window_id); #endif /* USE_GTK */ for (tail = Vframe_list; @@ -3882,7 +3922,8 @@ x_window_to_scroll_bar (window_id) condemned = Qnil, ! GC_NILP (bar)); bar = XSCROLL_BAR (bar)->next) - if (SCROLL_BAR_X_WINDOW (XSCROLL_BAR (bar)) == window_id) + if (SCROLL_BAR_X_WINDOW (XSCROLL_BAR (bar)) == window_id && + FRAME_X_DISPLAY (XFRAME (frame)) == display) return XSCROLL_BAR (bar); } @@ -5599,6 +5640,11 @@ static XComposeStatus compose_status; static int temp_index; static short temp_buffer[100]; +#define STORE_KEYSYM_FOR_DEBUG(keysym) \ + if (temp_index == sizeof temp_buffer / sizeof (short)) \ + temp_index = 0; \ + temp_buffer[temp_index++] = (keysym) + /* Set this to nonzero to fake an "X I/O error" on a particular display. */ @@ -5618,15 +5664,8 @@ static struct x_display_info *next_noop_dpyinfo; f->output_data.x->saved_menu_event \ = (XEvent *) xmalloc (sizeof (XEvent)); \ bcopy (&event, f->output_data.x->saved_menu_event, size); \ - if (numchars >= 1) \ - { \ - bufp->kind = MENU_BAR_ACTIVATE_EVENT; \ - XSETFRAME (bufp->frame_or_window, f); \ - bufp->arg = Qnil; \ - bufp++; \ - count++; \ - numchars--; \ - } \ + inev.kind = MENU_BAR_ACTIVATE_EVENT; \ + XSETFRAME (inev.frame_or_window, f); \ } \ while (0) @@ -5668,41 +5707,47 @@ x_filter_event (dpyinfo, event) #endif #ifdef USE_GTK -static struct x_display_info *current_dpyinfo; -static struct input_event **current_bufp; -static int *current_numcharsp; static int current_count; static int current_finish; +static struct input_event *current_hold_quit; /* This is the filter function invoked by the GTK event loop. It is invoked before the XEvent is translated to a GdkEvent, - so we have a chanse to act on the event before GTK. */ + so we have a chance to act on the event before GTK. */ static GdkFilterReturn event_handler_gdk (gxev, ev, data) GdkXEvent *gxev; GdkEvent *ev; gpointer data; { - XEvent *xev = (XEvent*)gxev; + XEvent *xev = (XEvent *) gxev; - if (current_numcharsp) + if (current_count >= 0) { + struct x_display_info *dpyinfo; + + dpyinfo = x_display_info_for_display (xev->xany.display); + #ifdef HAVE_X_I18N /* Filter events for the current X input method. GTK calls XFilterEvent but not for key press and release, so we do it here. */ if (xev->type == KeyPress || xev->type == KeyRelease) - if (x_filter_event (current_dpyinfo, xev)) + if (dpyinfo && x_filter_event (dpyinfo, xev)) return GDK_FILTER_REMOVE; #endif - current_count += handle_one_xevent (current_dpyinfo, - xev, - current_bufp, - current_numcharsp, - ¤t_finish); + + if (! dpyinfo) + current_finish = X_EVENT_NORMAL; + else + { + current_count += + handle_one_xevent (dpyinfo, xev, ¤t_finish, + current_hold_quit); + } } else - current_finish = x_dispatch_event (xev, GDK_DISPLAY ()); + current_finish = x_dispatch_event (xev, xev->xany.display); if (current_finish == X_EVENT_GOTO_OUT || current_finish == X_EVENT_DROP) return GDK_FILTER_REMOVE; @@ -5718,28 +5763,29 @@ event_handler_gdk (gxev, ev, data) *FINISH is zero if caller should continue reading events. *FINISH is X_EVENT_DROP if event should not be passed to the toolkit. - Events representing keys are stored in buffer *BUFP_R, - which can hold up to *NUMCHARSP characters. We return the number of characters stored into the buffer. */ static int -handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) +handle_one_xevent (dpyinfo, eventp, finish, hold_quit) struct x_display_info *dpyinfo; XEvent *eventp; - /* register */ struct input_event **bufp_r; - /* register */ int *numcharsp; int *finish; + struct input_event *hold_quit; { + struct input_event inev; int count = 0; + int do_help = 0; int nbytes = 0; struct frame *f; struct coding_system coding; - struct input_event *bufp = *bufp_r; - int numchars = *numcharsp; XEvent event = *eventp; *finish = X_EVENT_NORMAL; + EVENT_INIT (inev); + inev.kind = NO_EVENT; + inev.arg = Qnil; + switch (event.type) { case ClientMessage: @@ -5794,8 +5840,10 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) } /* Not certain about handling scroll bars here */ #endif /* 0 */ + goto done; } - else if (event.xclient.data.l[0] + + if (event.xclient.data.l[0] == dpyinfo->Xatom_wm_save_yourself) { /* Save state modify the WM_COMMAND property to @@ -5806,11 +5854,9 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) /* If we have a session manager, don't set this. KDE will then start two Emacsen, one for the session manager and one for this. */ - if (numchars > 0 #ifdef HAVE_X_SM - && ! x_session_have_connection () + if (! x_session_have_connection ()) #endif - ) { f = x_top_window_to_frame (dpyinfo, event.xclient.window); @@ -5825,41 +5871,36 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) event.xclient.window, 0, 0); } + goto done; } - else if (event.xclient.data.l[0] - == dpyinfo->Xatom_wm_delete_window) + + if (event.xclient.data.l[0] + == dpyinfo->Xatom_wm_delete_window) { - struct frame *f - = x_any_window_to_frame (dpyinfo, + f = x_any_window_to_frame (dpyinfo, event.xclient.window); + if (!f) + goto OTHER; /* May be a dialog that is to be removed */ - if (f) - { - if (numchars == 0) - abort (); - - bufp->kind = DELETE_WINDOW_EVENT; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp++; - - count += 1; - numchars -= 1; - } - else - goto OTHER; /* May be a dialog that is to be removed */ + inev.kind = DELETE_WINDOW_EVENT; + XSETFRAME (inev.frame_or_window, f); + goto done; } + + goto done; } - else if (event.xclient.message_type + + if (event.xclient.message_type == dpyinfo->Xatom_wm_configure_denied) { + goto done; } - else if (event.xclient.message_type - == dpyinfo->Xatom_wm_window_moved) + + if (event.xclient.message_type + == dpyinfo->Xatom_wm_window_moved) { int new_x, new_y; - struct frame *f - = x_window_to_frame (dpyinfo, event.xclient.window); + f = x_window_to_frame (dpyinfo, event.xclient.window); new_x = event.xclient.data.s[0]; new_y = event.xclient.data.s[1]; @@ -5869,45 +5910,55 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) f->left_pos = new_x; f->top_pos = new_y; } + goto done; } + #ifdef HACK_EDITRES - else if (event.xclient.message_type - == dpyinfo->Xatom_editres) + if (event.xclient.message_type + == dpyinfo->Xatom_editres) { - struct frame *f - = x_any_window_to_frame (dpyinfo, event.xclient.window); + f = x_any_window_to_frame (dpyinfo, event.xclient.window); _XEditResCheckMessages (f->output_data.x->widget, NULL, &event, NULL); + goto done; } #endif /* HACK_EDITRES */ - else if ((event.xclient.message_type - == dpyinfo->Xatom_DONE) - || (event.xclient.message_type - == dpyinfo->Xatom_PAGE)) + + if ((event.xclient.message_type + == dpyinfo->Xatom_DONE) + || (event.xclient.message_type + == dpyinfo->Xatom_PAGE)) { /* Ghostview job completed. Kill it. We could reply with "Next" if we received "Page", but we currently never do because we are interested in images, only, which should have 1 page. */ Pixmap pixmap = (Pixmap) event.xclient.data.l[1]; - struct frame *f - = x_window_to_frame (dpyinfo, event.xclient.window); + f = x_window_to_frame (dpyinfo, event.xclient.window); x_kill_gs_process (pixmap, f); expose_frame (f, 0, 0, 0, 0); + goto done; } + #ifdef USE_TOOLKIT_SCROLL_BARS /* Scroll bar callbacks send a ClientMessage from which we construct an input_event. */ - else if (event.xclient.message_type - == dpyinfo->Xatom_Scrollbar) + if (event.xclient.message_type + == dpyinfo->Xatom_Scrollbar) { - x_scroll_bar_to_input_event (&event, bufp); - ++bufp, ++count, --numchars; - goto out; + x_scroll_bar_to_input_event (&event, &inev); + *finish = X_EVENT_GOTO_OUT; + goto done; } #endif /* USE_TOOLKIT_SCROLL_BARS */ - else - goto OTHER; + + f = x_any_window_to_frame (dpyinfo, event.xclient.window); + + if (!f) + goto OTHER; + + if (x_handle_dnd_message (f, &event.xclient, dpyinfo, &inev)) + *finish = X_EVENT_DROP; } break; @@ -5927,19 +5978,11 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) { XSelectionClearEvent *eventp = (XSelectionClearEvent *) &event; - if (numchars == 0) - abort (); - - bufp->kind = SELECTION_CLEAR_EVENT; - SELECTION_EVENT_DISPLAY (bufp) = eventp->display; - SELECTION_EVENT_SELECTION (bufp) = eventp->selection; - SELECTION_EVENT_TIME (bufp) = eventp->time; - bufp->frame_or_window = Qnil; - bufp->arg = Qnil; - bufp++; - - count += 1; - numchars -= 1; + inev.kind = SELECTION_CLEAR_EVENT; + SELECTION_EVENT_DISPLAY (&inev) = eventp->display; + SELECTION_EVENT_SELECTION (&inev) = eventp->selection; + SELECTION_EVENT_TIME (&inev) = eventp->time; + inev.frame_or_window = Qnil; } break; @@ -5956,22 +5999,14 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) XSelectionRequestEvent *eventp = (XSelectionRequestEvent *) &event; - if (numchars == 0) - abort (); - - bufp->kind = SELECTION_REQUEST_EVENT; - SELECTION_EVENT_DISPLAY (bufp) = eventp->display; - SELECTION_EVENT_REQUESTOR (bufp) = eventp->requestor; - SELECTION_EVENT_SELECTION (bufp) = eventp->selection; - SELECTION_EVENT_TARGET (bufp) = eventp->target; - SELECTION_EVENT_PROPERTY (bufp) = eventp->property; - SELECTION_EVENT_TIME (bufp) = eventp->time; - bufp->frame_or_window = Qnil; - bufp->arg = Qnil; - bufp++; - - count += 1; - numchars -= 1; + inev.kind = SELECTION_REQUEST_EVENT; + SELECTION_EVENT_DISPLAY (&inev) = eventp->display; + SELECTION_EVENT_REQUESTOR (&inev) = eventp->requestor; + SELECTION_EVENT_SELECTION (&inev) = eventp->selection; + SELECTION_EVENT_TARGET (&inev) = eventp->target; + SELECTION_EVENT_PROPERTY (&inev) = eventp->property; + SELECTION_EVENT_TIME (&inev) = eventp->time; + inev.frame_or_window = Qnil; } break; @@ -5996,9 +6031,11 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) x_real_positions (f, &x, &y); f->left_pos = x; f->top_pos = y; + + /* Perhaps reparented due to a WM restart. Reset this. */ + FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN; } goto OTHER; - break; case Expose: f = x_window_to_frame (dpyinfo, event.xexpose.window); @@ -6039,7 +6076,8 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) /* Dispatch event to the widget. */ goto OTHER; #else /* not USE_TOOLKIT_SCROLL_BARS */ - bar = x_window_to_scroll_bar (event.xexpose.window); + bar = x_window_to_scroll_bar (event.xexpose.display, + event.xexpose.window); if (bar) x_scroll_bar_expose (bar, &event); @@ -6099,12 +6137,8 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) { f->async_iconified = 1; - bufp->kind = ICONIFY_EVENT; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp++; - count++; - numchars--; + inev.kind = ICONIFY_EVENT; + XSETFRAME (inev.frame_or_window, f); } } goto OTHER; @@ -6136,12 +6170,8 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) if (f->iconified) { - bufp->kind = DEICONIFY_EVENT; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp++; - count++; - numchars--; + inev.kind = DEICONIFY_EVENT; + XSETFRAME (inev.frame_or_window, f); } else if (! NILP (Vframe_list) && ! NILP (XCDR (Vframe_list))) @@ -6154,6 +6184,8 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) case KeyPress: + ignore_next_mouse_click_timeout = 0; + #if defined (USE_X_TOOLKIT) || defined (USE_GTK) /* Dispatch KeyPress events when in menu. */ if (popup_activated ()) @@ -6164,8 +6196,8 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)) { - dpyinfo->mouse_face_hidden = 1; clear_mouse_face (dpyinfo); + dpyinfo->mouse_face_hidden = 1; } #if defined USE_MOTIF && defined USE_TOOLKIT_SCROLL_BARS @@ -6202,6 +6234,15 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) int copy_bufsiz = sizeof (copy_buffer); int modifiers; Lisp_Object coding_system = Qlatin_1; + Lisp_Object c; + +#ifdef USE_GTK + /* Don't pass keys to GTK. A Tab will shift focus to the + tool bar in GTK 2.4. Keys will still go to menus and + dialogs because in that case popup_activated is TRUE + (see above). */ + *finish = X_EVENT_DROP; +#endif event.xkey.state |= x_emacs_to_x_modifiers (FRAME_X_DISPLAY_INFO (f), @@ -6288,51 +6329,44 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) &compose_status); #endif + /* If not using XIM/XIC, and a compose sequence is in progress, + we break here. Otherwise, chars_matched is always 0. */ + if (compose_status.chars_matched > 0 && nbytes == 0) + break; + orig_keysym = keysym; - if (numchars > 1) - { - Lisp_Object c; + /* Common for all keysym input events. */ + XSETFRAME (inev.frame_or_window, f); + inev.modifiers + = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), modifiers); + inev.timestamp = event.xkey.time; - /* First deal with keysyms which have defined - translations to characters. */ - if (keysym >= 32 && keysym < 128) - /* Avoid explicitly decoding each ASCII character. */ - { - bufp->kind = ASCII_KEYSTROKE_EVENT; - bufp->code = keysym; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp->modifiers - = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), - modifiers); - bufp->timestamp = event.xkey.time; - bufp++; - count++; - numchars--; - } - /* Now non-ASCII. */ - else if (HASH_TABLE_P (Vx_keysym_table) - && (NATNUMP (c = Fgethash (make_number (keysym), - Vx_keysym_table, - Qnil)))) - { - bufp->kind = (SINGLE_BYTE_CHAR_P (XFASTINT (c)) - ? ASCII_KEYSTROKE_EVENT - : MULTIBYTE_CHAR_KEYSTROKE_EVENT); - bufp->code = XFASTINT (c); - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp->modifiers - = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), - modifiers); - bufp->timestamp = event.xkey.time; - bufp++; - count++; - numchars--; - } - /* Random non-modifier sorts of keysyms. */ - else if (((keysym >= XK_BackSpace && keysym <= XK_Escape) + /* First deal with keysyms which have defined + translations to characters. */ + if (keysym >= 32 && keysym < 128) + /* Avoid explicitly decoding each ASCII character. */ + { + inev.kind = ASCII_KEYSTROKE_EVENT; + inev.code = keysym; + goto done_keysym; + } + + /* Now non-ASCII. */ + if (HASH_TABLE_P (Vx_keysym_table) + && (NATNUMP (c = Fgethash (make_number (keysym), + Vx_keysym_table, + Qnil)))) + { + inev.kind = (SINGLE_BYTE_CHAR_P (XFASTINT (c)) + ? ASCII_KEYSTROKE_EVENT + : MULTIBYTE_CHAR_KEYSTROKE_EVENT); + inev.code = XFASTINT (c); + goto done_keysym; + } + + /* Random non-modifier sorts of keysyms. */ + if (((keysym >= XK_BackSpace && keysym <= XK_Escape) || keysym == XK_Delete #ifdef XK_ISO_Left_Tab || (keysym >= XK_ISO_Left_Tab @@ -6413,104 +6447,81 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) <= XK_ISO_Last_Group_Lock) #endif )) - { - if (temp_index == sizeof temp_buffer / sizeof (short)) - temp_index = 0; - temp_buffer[temp_index++] = keysym; - /* make_lispy_event will convert this to a symbolic - key. */ - bufp->kind = NON_ASCII_KEYSTROKE_EVENT; - bufp->code = keysym; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp->modifiers - = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), - modifiers); - bufp->timestamp = event.xkey.time; - bufp++; - count++; - numchars--; - } - else if (numchars > nbytes) - { /* Raw bytes, not keysym. */ - register int i; - register int c; - int nchars, len; - - /* The input should be decoded with `coding_system' - which depends on which X*LookupString function - we used just above and the locale. */ - setup_coding_system (coding_system, &coding); - coding.src_multibyte = 0; - coding.dst_multibyte = 1; - /* The input is converted to events, thus we can't - handle composition. Anyway, there's no XIM that - gives us composition information. */ - coding.common_flags &= ~CODING_ANNOTATION_MASK; - - for (i = 0; i < nbytes; i++) - { - if (temp_index == (sizeof temp_buffer - / sizeof (short))) - temp_index = 0; - temp_buffer[temp_index++] = copy_bufptr[i]; - } + { + STORE_KEYSYM_FOR_DEBUG (keysym); + /* make_lispy_event will convert this to a symbolic + key. */ + inev.kind = NON_ASCII_KEYSTROKE_EVENT; + inev.code = keysym; + goto done_keysym; + } - { - /* Decode the input data. */ - coding.destination = (unsigned char *) malloc (nbytes); - if (! coding.destination) - break; - coding.dst_bytes = nbytes; - coding.mode |= CODING_MODE_LAST_BLOCK; - decode_coding_c_string (&coding, copy_bufptr, - nbytes, Qnil); - nbytes = coding.produced; - nchars = coding.produced_char; - if (copy_bufsiz < nbytes) - { - copy_bufsiz = nbytes; - copy_bufptr = (char *) alloca (nbytes); - } - bcopy (coding.destination, copy_bufptr, nbytes); - free (coding.destination); - } + { /* Raw bytes, not keysym. */ + register int i; + register int c; + int nchars, len; - /* Convert the input data to a sequence of - character events. */ - for (i = 0; i < nbytes; i += len) - { - if (nchars == nbytes) - c = copy_bufptr[i], len = 1; - else - c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, - nbytes - i, len); - - bufp->kind = (ASCII_CHAR_P (c) - ? ASCII_KEYSTROKE_EVENT - : MULTIBYTE_CHAR_KEYSTROKE_EVENT); - bufp->code = c; - XSETFRAME (bufp->frame_or_window, f); - bufp->arg = Qnil; - bufp->modifiers - = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), - modifiers); - bufp->timestamp = event.xkey.time; - bufp++; - } + for (i = 0, nchars = 0; i < nbytes; i++) + { + if (ASCII_BYTE_P (copy_bufptr[i])) + nchars++; + STORE_KEYSYM_FOR_DEBUG (copy_bufptr[i]); + } - count += nchars; - numchars -= nchars; + if (nchars < nbytes) + { + /* Decode the input data. */ + int require; + unsigned char *p; + + /* The input should be decoded with `coding_system' + which depends on which X*LookupString function + we used just above and the locale. */ + setup_coding_system (coding_system, &coding); + coding.src_multibyte = 0; + coding.dst_multibyte = 1; + /* The input is converted to events, thus we can't + handle composition. Anyway, there's no XIM that + gives us composition information. */ + coding.common_flags &= ~CODING_ANNOTATION_MASK; + + require = MAX_MULTIBYTE_LENGTH * nbytes; + coding.destination = alloca (require); + coding.dst_bytes = require; + coding.mode |= CODING_MODE_LAST_BLOCK; + decode_coding_c_string (&coding, copy_bufptr, nbytes, Qnil); + nbytes = coding.produced; + nchars = coding.produced_char; + copy_bufptr = coding.destination; + } - if (keysym == NoSymbol) - break; - } - else - abort (); - } - else - abort (); + /* Convert the input data to a sequence of + character events. */ + for (i = 0; i < nbytes; i += len) + { + if (nchars == nbytes) + c = copy_bufptr[i], len = 1; + else + c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, + nbytes - i, len); + inev.kind = (SINGLE_BYTE_CHAR_P (c) + ? ASCII_KEYSTROKE_EVENT + : MULTIBYTE_CHAR_KEYSTROKE_EVENT); + inev.code = c; + kbd_buffer_store_event_hold (&inev, hold_quit); + } + + /* Previous code updated count by nchars rather than nbytes, + but that seems bogus to me. ++kfs */ + count += nbytes; + + inev.kind = NO_EVENT; /* Already stored above. */ + + if (keysym == NoSymbol) + break; + } } + done_keysym: #ifdef HAVE_X_I18N /* Don't dispatch this event since XtDispatchEvent calls XFilterEvent, and two calls in a row may freeze the @@ -6531,63 +6542,41 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) #endif case EnterNotify: - { - int n; + x_detect_focus_change (dpyinfo, &event, &inev); - n = x_detect_focus_change (dpyinfo, &event, bufp, numchars); - if (n > 0) - { - bufp += n, count += n, numchars -= n; - } + f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); - f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); + if (f && x_mouse_click_focus_ignore_position) + ignore_next_mouse_click_timeout = event.xmotion.time + 200; #if 0 - if (event.xcrossing.focus) - { - /* Avoid nasty pop/raise loops. */ - if (f && (!(f->auto_raise) - || !(f->auto_lower) - || (event.xcrossing.time - enter_timestamp) > 500)) - { - x_new_focus_frame (dpyinfo, f); - enter_timestamp = event.xcrossing.time; - } - } - else if (f == dpyinfo->x_focus_frame) - x_new_focus_frame (dpyinfo, 0); + if (event.xcrossing.focus) + { + /* Avoid nasty pop/raise loops. */ + if (f && (!(f->auto_raise) + || !(f->auto_lower) + || (event.xcrossing.time - enter_timestamp) > 500)) + { + x_new_focus_frame (dpyinfo, f); + enter_timestamp = event.xcrossing.time; + } + } + else if (f == dpyinfo->x_focus_frame) + x_new_focus_frame (dpyinfo, 0); #endif - /* EnterNotify counts as mouse movement, - so update things that depend on mouse position. */ - if (f && !f->output_data.x->hourglass_p) - note_mouse_movement (f, &event.xmotion); - goto OTHER; - } + /* EnterNotify counts as mouse movement, + so update things that depend on mouse position. */ + if (f && !f->output_data.x->hourglass_p) + note_mouse_movement (f, &event.xmotion); + goto OTHER; case FocusIn: - { - int n; - - n = x_detect_focus_change (dpyinfo, &event, bufp, numchars); - if (n > 0) - { - bufp += n, count += n, numchars -= n; - } - } - + x_detect_focus_change (dpyinfo, &event, &inev); goto OTHER; case LeaveNotify: - { - int n; - - n = x_detect_focus_change (dpyinfo, &event, bufp, numchars); - if (n > 0) - { - bufp += n, count += n, numchars -= n; - } - } + x_detect_focus_change (dpyinfo, &event, &inev); f = x_top_window_to_frame (dpyinfo, event.xcrossing.window); if (f) @@ -6605,31 +6594,12 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) Otherwise, the startup message is cleared when the mouse leaves the frame. */ if (any_help_event_p) - { - Lisp_Object frame; - int n; - - XSETFRAME (frame, f); - help_echo_string = Qnil; - n = gen_help_event (bufp, numchars, - Qnil, frame, Qnil, Qnil, 0); - bufp += n, count += n, numchars -= n; - } - + do_help = -1; } goto OTHER; case FocusOut: - { - int n; - - n = x_detect_focus_change (dpyinfo, &event, bufp, numchars); - if (n > 0) - { - bufp += n, count += n, numchars -= n; - } - } - + x_detect_focus_change (dpyinfo, &event, &inev); goto OTHER; case MotionNotify: @@ -6665,15 +6635,12 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) /* Window will be selected only when it is not selected now and last mouse movement event was not in it. Minibuffer window will be selected iff it is active. */ - if (WINDOWP(window) + if (WINDOWP (window) && !EQ (window, last_window) - && !EQ (window, selected_window) - && numchars > 0) + && !EQ (window, selected_window)) { - bufp->kind = SELECT_WINDOW_EVENT; - bufp->frame_or_window = window; - bufp->arg = Qnil; - ++bufp, ++count, --numchars; + inev.kind = SELECT_WINDOW_EVENT; + inev.frame_or_window = window; } last_window=window; @@ -6684,7 +6651,8 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) { #ifndef USE_TOOLKIT_SCROLL_BARS struct scroll_bar *bar - = x_window_to_scroll_bar (event.xmotion.window); + = x_window_to_scroll_bar (event.xmotion.display, + event.xmotion.window); if (bar) x_scroll_bar_note_movement (bar, &event); @@ -6699,22 +6667,7 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) has changed, generate a HELP_EVENT. */ if (!NILP (help_echo_string) || !NILP (previous_help_echo_string)) - { - Lisp_Object frame; - int n; - - if (f) - XSETFRAME (frame, f); - else - frame = Qnil; - - any_help_event_p = 1; - n = gen_help_event (bufp, numchars, help_echo_string, frame, - help_echo_window, help_echo_object, - help_echo_pos); - bufp += n, count += n, numchars -= n; - } - + do_help = 1; goto OTHER; } @@ -6773,7 +6726,7 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) Convert that to the position of the window manager window. */ x_real_positions (f, &f->left_pos, &f->top_pos); - x_check_fullscreen_move (f); + x_check_expected_move (f); if (f->want_fullscreen & FULLSCREEN_WAIT) f->want_fullscreen &= ~(FULLSCREEN_WAIT|FULLSCREEN_BOTH); } @@ -6798,10 +6751,8 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) { /* If we decide we want to generate an event to be seen by the rest of Emacs, we put it here. */ - struct input_event emacs_event; int tool_bar_p = 0; - emacs_event.kind = NO_EVENT; bzero (&compose_status, sizeof (compose_status)); if (dpyinfo->grabbed @@ -6841,25 +6792,40 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) #if defined (USE_X_TOOLKIT) || defined (USE_GTK) if (! popup_activated ()) #endif - construct_mouse_click (&emacs_event, &event, f); + { + if (ignore_next_mouse_click_timeout) + { + if (event.type == ButtonPress + && (int)(event.xbutton.time - ignore_next_mouse_click_timeout) > 0) + { + ignore_next_mouse_click_timeout = 0; + construct_mouse_click (&inev, &event, f); + } + if (event.type == ButtonRelease) + ignore_next_mouse_click_timeout = 0; + } + else + construct_mouse_click (&inev, &event, f); + } } } else { struct scroll_bar *bar - = x_window_to_scroll_bar (event.xbutton.window); + = x_window_to_scroll_bar (event.xbutton.display, + event.xbutton.window); #ifdef USE_TOOLKIT_SCROLL_BARS /* Make the "Ctrl-Mouse-2 splits window" work for toolkit scroll bars. */ if (bar && event.xbutton.state & ControlMask) { - x_scroll_bar_handle_click (bar, &event, &emacs_event); + x_scroll_bar_handle_click (bar, &event, &inev); *finish = X_EVENT_DROP; } #else /* not USE_TOOLKIT_SCROLL_BARS */ if (bar) - x_scroll_bar_handle_click (bar, &event, &emacs_event); + x_scroll_bar_handle_click (bar, &event, &inev); #endif /* not USE_TOOLKIT_SCROLL_BARS */ } @@ -6880,14 +6846,6 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) else dpyinfo->grabbed &= ~(1 << event.xbutton.button); - if (numchars >= 1 && emacs_event.kind != NO_EVENT) - { - bcopy (&emacs_event, bufp, sizeof (struct input_event)); - bufp++; - count++; - numchars--; - } - #if defined (USE_X_TOOLKIT) || defined (USE_GTK) f = x_menubar_window_to_frame (dpyinfo, event.xbutton.window); /* For a down-event in the menu bar, @@ -6974,16 +6932,38 @@ handle_one_xevent (dpyinfo, eventp, bufp_r, numcharsp, finish) break; } - goto ret; + done: + if (inev.kind != NO_EVENT) + { + kbd_buffer_store_event_hold (&inev, hold_quit); + count++; + } - out: - *finish = X_EVENT_GOTO_OUT; + if (do_help + && !(hold_quit && hold_quit->kind != NO_EVENT)) + { + Lisp_Object frame; - ret: - *bufp_r = bufp; - *numcharsp = numchars; - *eventp = event; + if (f) + XSETFRAME (frame, f); + else + frame = Qnil; + if (do_help > 0) + { + any_help_event_p = 1; + gen_help_event (help_echo_string, frame, help_echo_window, + help_echo_object, help_echo_pos); + } + else + { + help_echo_string = Qnil; + gen_help_event (Qnil, frame, Qnil, Qnil, 0); + } + count++; + } + + *eventp = event; return count; } @@ -6999,30 +6979,12 @@ x_dispatch_event (event, display) Display *display; { struct x_display_info *dpyinfo; - struct input_event bufp[10]; - struct input_event *bufpp; - int numchars = 10; int finish = X_EVENT_NORMAL; - for (bufpp = bufp; bufpp != bufp + 10; bufpp++) - EVENT_INIT (*bufpp); - bufpp = bufp; - - for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next) - if (dpyinfo->display == display) - break; + dpyinfo = x_display_info_for_display (display); if (dpyinfo) - { - int i, events; - events = handle_one_xevent (dpyinfo, - event, - &bufpp, - &numchars, - &finish); - for (i = 0; i < events; ++i) - kbd_buffer_store_event (&bufp[i]); - } + handle_one_xevent (dpyinfo, event, &finish, 0); return finish; } @@ -7032,19 +6994,16 @@ x_dispatch_event (event, display) This routine is called by the SIGIO handler. We return as soon as there are no more events to be read. - Events representing keys are stored in buffer BUFP, - which can hold up to NUMCHARS characters. We return the number of characters stored into the buffer, thus pretending to be `read'. EXPECTED is nonzero if the caller knows input is available. */ static int -XTread_socket (sd, bufp, numchars, expected) +XTread_socket (sd, expected, hold_quit) register int sd; - /* register */ struct input_event *bufp; - /* register */ int numchars; int expected; + struct input_event *hold_quit; { int count = 0; XEvent event; @@ -7063,9 +7022,6 @@ XTread_socket (sd, bufp, numchars, expected) /* So people can tell when we have read the available input. */ input_signal_count++; - if (numchars <= 0) - abort (); /* Don't think this happens. */ - ++handling_signal; /* Find the display we are supposed to read input for. @@ -7107,35 +7063,21 @@ XTread_socket (sd, bufp, numchars, expected) } #ifdef HAVE_X_SM - BLOCK_INPUT; - count += x_session_check_input (bufp, &numchars); - UNBLOCK_INPUT; + { + struct input_event inev; + BLOCK_INPUT; + /* We don't need to EVENT_INIT (inev) here, as + x_session_check_input copies an entire input_event. */ + if (x_session_check_input (&inev)) + { + kbd_buffer_store_event_hold (&inev, hold_quit); + count++; + } + UNBLOCK_INPUT; + } #endif -#ifdef USE_GTK - /* For GTK we must use the GTK event loop. But XEvents gets passed - to our filter function above, and then to the big event switch. - We use a bunch of globals to communicate with our filter function, - that is kind of ugly, but it works. */ - current_dpyinfo = dpyinfo; - - while (gtk_events_pending ()) - { - current_count = count; - current_numcharsp = &numchars; - current_bufp = &bufp; - - gtk_main_iteration (); - - count = current_count; - current_bufp = 0; - current_numcharsp = 0; - - if (current_finish == X_EVENT_GOTO_OUT) - goto out; - } - -#else /* not USE_GTK */ +#ifndef USE_GTK while (XPending (dpyinfo->display)) { int finish; @@ -7149,17 +7091,39 @@ XTread_socket (sd, bufp, numchars, expected) #endif event_found = 1; - count += handle_one_xevent (dpyinfo, - &event, - &bufp, - &numchars, - &finish); + count += handle_one_xevent (dpyinfo, &event, &finish, hold_quit); if (finish == X_EVENT_GOTO_OUT) goto out; } -#endif /* USE_GTK */ +#endif /* not USE_GTK */ + } + +#ifdef USE_GTK + + /* For GTK we must use the GTK event loop. But XEvents gets passed + to our filter function above, and then to the big event switch. + We use a bunch of globals to communicate with our filter function, + that is kind of ugly, but it works. + + There is no way to do one display at the time, GTK just does events + from all displays. */ + + while (gtk_events_pending ()) + { + current_count = count; + current_hold_quit = hold_quit; + + gtk_main_iteration (); + + count = current_count; + current_count = -1; + current_hold_quit = 0; + + if (current_finish == X_EVENT_GOTO_OUT) + break; } +#endif /* USE_GTK */ out:; @@ -7194,8 +7158,9 @@ XTread_socket (sd, bufp, numchars, expected) pending_autoraise_frame = 0; } - UNBLOCK_INPUT; --handling_signal; + UNBLOCK_INPUT; + return count; } @@ -7250,13 +7215,6 @@ x_draw_hollow_cursor (w, row) struct glyph *cursor_glyph; GC gc; - /* Compute frame-relative coordinates from window-relative - coordinates. */ - x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); - y = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y) - + row->ascent - w->phys_cursor_ascent); - h = row->height - 1; - /* Get the glyph the cursor is on. If we can't tell because the current matrix is invalid or such, give up. */ cursor_glyph = get_phys_cursor_glyph (w); @@ -7273,6 +7231,19 @@ x_draw_hollow_cursor (w, row) wd = min (FRAME_COLUMN_WIDTH (f), wd); w->phys_cursor_width = wd; + /* Compute frame-relative coordinates from window-relative + coordinates. */ + x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); + y = WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y); + + /* Compute the proper height and ascent of the rectangle, based + on the actual glyph. Using the full height of the row looks + bad when there are tall images on that row. */ + h = max (FRAME_LINE_HEIGHT (f), cursor_glyph->ascent + cursor_glyph->descent); + if (h < row->height) + y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h; + h--; + /* The foreground of cursor_gc is typically the same as the normal background color, which can cause the cursor box to be invisible. */ xgcv.foreground = f->output_data.x->cursor_pixel; @@ -7416,6 +7387,13 @@ x_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, activ w->phys_cursor_type = cursor_type; w->phys_cursor_on_p = 1; + if (glyph_row->exact_window_width_line_p + && w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA]) + { + glyph_row->cursor_in_fringe_p = 1; + draw_fringe_bitmap (w, glyph_row, 0); + } + else switch (cursor_type) { case HOLLOW_BOX_CURSOR: @@ -7478,13 +7456,13 @@ x_bitmap_icon (f, file) if (STRINGP (file)) { #ifdef USE_GTK - /* Use gtk_window_set_icon_from_file() if available, + /* Use gtk_window_set_icon_from_file () if available, It's not restricted to bitmaps */ - if (xg_set_icon(f, file)) + if (xg_set_icon (f, file)) return 0; #endif /* USE_GTK */ bitmap_id = x_create_bitmap_from_file (f, file); - x_create_bitmap_mask(f, bitmap_id); + x_create_bitmap_mask (f, bitmap_id); } else { @@ -7494,7 +7472,7 @@ x_bitmap_icon (f, file) FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id = x_create_bitmap_from_data (f, gnu_bits, gnu_width, gnu_height); - x_create_bitmap_mask(f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id); + x_create_bitmap_mask (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id); } /* The first time we create the GNU bitmap and mask, @@ -7763,6 +7741,11 @@ x_connection_closed (dpy, error_message) } #endif +#ifdef USE_GTK + if (dpyinfo) + xg_display_close (dpyinfo->display); +#endif + /* Indicate that this display is dead. */ if (dpyinfo) dpyinfo->display = 0; @@ -8216,65 +8199,24 @@ x_calc_absolute_position (f) Window child; int win_x = 0, win_y = 0; int flags = f->size_hint_flags; - int this_window; /* We have nothing to do if the current position is already for the top-left corner. */ if (! ((flags & XNegative) || (flags & YNegative))) return; - this_window = FRAME_OUTER_WINDOW (f); - - /* Find the position of the outside upper-left corner of + /* Find the offsets of the outside upper-left corner of the inner window, with respect to the outer window. But do this only if we will need the results. */ if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window) - { - int count; - - BLOCK_INPUT; - count = x_catch_errors (FRAME_X_DISPLAY (f)); - while (1) - { - x_clear_errors (FRAME_X_DISPLAY (f)); - XTranslateCoordinates (FRAME_X_DISPLAY (f), - - /* From-window, to-window. */ - this_window, - f->output_data.x->parent_desc, - - /* From-position, to-position. */ - 0, 0, &win_x, &win_y, - - /* Child of win. */ - &child); - if (x_had_errors_p (FRAME_X_DISPLAY (f))) - { - Window newroot, newparent = 0xdeadbeef; - Window *newchildren; - unsigned int nchildren; - - if (! XQueryTree (FRAME_X_DISPLAY (f), this_window, &newroot, - &newparent, &newchildren, &nchildren)) - break; - - XFree ((char *) newchildren); - - f->output_data.x->parent_desc = newparent; - } - else - break; - } - - x_uncatch_errors (FRAME_X_DISPLAY (f), count); - UNBLOCK_INPUT; - } + /* This is to get *_pixels_outer_diff. */ + x_real_positions (f, &win_x, &win_y); /* Treat negative positions as relative to the leftmost bottommost position that fits on the screen. */ if (flags & XNegative) f->left_pos = (FRAME_X_DISPLAY_INFO (f)->width - - 2 * f->border_width - win_x + - 2 * FRAME_X_OUTPUT (f)->x_pixels_outer_diff - FRAME_PIXEL_WIDTH (f) + f->left_pos); @@ -8299,8 +8241,12 @@ x_calc_absolute_position (f) if (flags & YNegative) f->top_pos = (FRAME_X_DISPLAY_INFO (f)->height - - 2 * f->border_width - - win_y + - FRAME_X_OUTPUT (f)->y_pixels_outer_diff + + /* Assume the window manager decorations are the same size on + three sides, i.e. left, right and bottom. This is to + compensate for the bottom part. */ + - FRAME_X_OUTPUT (f)->x_pixels_outer_diff - height + f->top_pos); } @@ -8343,19 +8289,27 @@ x_set_offset (f, xoff, yoff, change_gravity) modified_left = f->left_pos; modified_top = f->top_pos; -#if 0 /* Running on psilocin (Debian), and displaying on the NCD X-terminal, - this seems to be unnecessary and incorrect. rms, 4/17/97. */ - /* It is a mystery why we need to add the border_width here - when the frame is already visible, but experiment says we do. */ - if (change_gravity != 0) + + if (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A) { - modified_left += f->border_width; - modified_top += f->border_width; + /* Some WMs (twm, wmaker at least) has an offset that is smaller + than the WM decorations. So we use the calculated offset instead + of the WM decoration sizes here (x/y_pixels_outer_diff). */ + modified_left += FRAME_X_OUTPUT (f)->move_offset_left; + modified_top += FRAME_X_OUTPUT (f)->move_offset_top; } -#endif XMoveWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), modified_left, modified_top); + + if (FRAME_VISIBLE_P (f) + && FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN) + { + FRAME_X_OUTPUT (f)->check_expected_move = 1; + FRAME_X_OUTPUT (f)->expected_top = f->top_pos; + FRAME_X_OUTPUT (f)->expected_left = f->left_pos; + } + UNBLOCK_INPUT; } @@ -8376,7 +8330,7 @@ x_check_fullscreen (f) /* We do not need to move the window, it shall be taken care of when setting WM manager hints. If the frame is visible already, the position is checked by - x_check_fullscreen_move. */ + x_check_expected_move. */ if (FRAME_COLS (f) != width || FRAME_LINES (f) != height) { change_frame_size (f, height, width, 0, 1, 0); @@ -8390,30 +8344,33 @@ x_check_fullscreen (f) } /* If frame parameters are set after the frame is mapped, we need to move - the window. This is done in xfns.c. + the window. Some window managers moves the window to the right position, some moves the outer window manager window to the specified position. Here we check that we are in the right spot. If not, make a second move, assuming we are dealing with the second kind of window manager. */ static void -x_check_fullscreen_move (f) +x_check_expected_move (f) struct frame *f; { - if (f->want_fullscreen & FULLSCREEN_MOVE_WAIT) + if (FRAME_X_OUTPUT (f)->check_expected_move) { - int expect_top = f->top_pos; - int expect_left = f->left_pos; - - if (f->want_fullscreen & FULLSCREEN_HEIGHT) - expect_top = 0; - if (f->want_fullscreen & FULLSCREEN_WIDTH) - expect_left = 0; + int expect_top = FRAME_X_OUTPUT (f)->expected_top; + int expect_left = FRAME_X_OUTPUT (f)->expected_left; if (expect_top != f->top_pos || expect_left != f->left_pos) - x_set_offset (f, expect_left, expect_top, 1); + { + FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A; + FRAME_X_OUTPUT (f)->move_offset_left = expect_left - f->left_pos; + FRAME_X_OUTPUT (f)->move_offset_top = expect_top - f->top_pos; + + x_set_offset (f, expect_left, expect_top, 1); + } + else if (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN) + FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B; /* Just do this once */ - f->want_fullscreen &= ~FULLSCREEN_MOVE_WAIT; + FRAME_X_OUTPUT (f)->check_expected_move = 0; } } @@ -9576,9 +9533,8 @@ x_list_fonts (f, pattern, size, maxnames) int average_width = -1, resx = 0, dashes = 0; /* Count the number of dashes in NAMES[I]. If there are - 14 dashes, the field value following 7th dash - (PIXEL_SIZE) is zero, the field value following 9th - dash (RESOLUTION_X) is nonzero, and the field value + 14 dashes, the field value following 9th dash + (RESOLUTION_X) is nonzero, and the field value following 12th dash (AVERAGE_WIDTH) is 0, this is a auto-scaled font which is usually too ugly to be used for editing. Let's ignore it. */ @@ -9595,8 +9551,7 @@ x_list_fonts (f, pattern, size, maxnames) } if (allow_auto_scaled_font - || dashes < 14 - || ! (width == 0 && resx != 0 && average_width == 0)) + || dashes < 14 || average_width != 0 || resx == 0) { tem = build_string (names[i]); if (NILP (Fassoc (tem, list))) @@ -9894,6 +9849,7 @@ x_load_font (f, fontname, size) /* Now fill in the slots of *FONTP. */ BLOCK_INPUT; + bzero (fontp, sizeof (*fontp)); fontp->font = font; fontp->font_idx = i; fontp->charset = -1; /* fs_load_font sets it. */ @@ -10303,6 +10259,34 @@ same_x_server (name1, name2) } #endif +/* Count number of set bits in mask and number of bits to shift to + get to the first bit. With MASK 0x7e0, *BITS is set to 6, and *OFFSET + to 5. */ +static void +get_bits_and_offset (mask, bits, offset) + unsigned long mask; + int *bits; + int *offset; +{ + int nr = 0; + int off = 0; + + while (!(mask & 1)) + { + off++; + mask >>= 1; + } + + while (mask & 1) + { + nr++; + mask >>= 1; + } + + *offset = off; + *bits = nr; +} + struct x_display_info * x_term_init (display_name, xrm_option, resource_name) Lisp_Object display_name; @@ -10319,7 +10303,7 @@ x_term_init (display_name, xrm_option, resource_name) if (!x_initialized) { x_initialize (); - x_initialized = 1; + ++x_initialized; } #ifdef USE_GTK @@ -10330,61 +10314,65 @@ x_term_init (display_name, xrm_option, resource_name) char **argv2 = argv; GdkAtom atom; - /* GTK 2.0 can only handle one display, GTK 2.2 can handle more - than one, but this remains to be implemented. */ - if (x_initialized > 1) - return 0; - - x_initialized++; - - for (argc = 0; argc < NUM_ARGV; ++argc) - argv[argc] = 0; + if (x_initialized++ > 1) + { + /* Opening another display. If xg_display_open returns less + than zero, we are probably on GTK 2.0, which can only handle + one display. GTK 2.2 or later can handle more than one. */ + if (xg_display_open (SDATA (display_name), &dpy) < 0) + error ("Sorry, this version of GTK can only handle one display"); + } + else + { + for (argc = 0; argc < NUM_ARGV; ++argc) + argv[argc] = 0; - argc = 0; - argv[argc++] = initial_argv[0]; + argc = 0; + argv[argc++] = initial_argv[0]; - if (! NILP (display_name)) - { - argv[argc++] = "--display"; - argv[argc++] = SDATA (display_name); - } + if (! NILP (display_name)) + { + argv[argc++] = "--display"; + argv[argc++] = SDATA (display_name); + } - argv[argc++] = "--name"; - argv[argc++] = resource_name; + argv[argc++] = "--name"; + argv[argc++] = resource_name; #ifdef HAVE_X11R5 - XSetLocaleModifiers (""); + XSetLocaleModifiers (""); #endif - gtk_init (&argc, &argv2); + gtk_init (&argc, &argv2); - /* gtk_init does set_locale. We must fix locale after calling it. */ - fixup_locale (); - xg_initialize (); + /* gtk_init does set_locale. We must fix locale after calling it. */ + fixup_locale (); + xg_initialize (); - dpy = GDK_DISPLAY (); + dpy = GDK_DISPLAY (); - /* NULL window -> events for all windows go to our function */ - gdk_window_add_filter (NULL, event_handler_gdk, NULL); + /* NULL window -> events for all windows go to our function */ + gdk_window_add_filter (NULL, event_handler_gdk, NULL); - /* Load our own gtkrc if it exists. */ - { - struct gcpro gcpro1, gcpro2; - char *file = "~/.emacs.d/gtkrc"; - Lisp_Object s, abs_file; + /* Load our own gtkrc if it exists. */ + { + struct gcpro gcpro1, gcpro2; + char *file = "~/.emacs.d/gtkrc"; + Lisp_Object s, abs_file; - GCPRO2 (s, abs_file); - s = make_string (file, strlen (file)); - abs_file = Fexpand_file_name(s, Qnil); + GCPRO2 (s, abs_file); + s = make_string (file, strlen (file)); + abs_file = Fexpand_file_name (s, Qnil); - if (! NILP (abs_file) && !NILP (Ffile_readable_p (abs_file))) - gtk_rc_parse (SDATA (abs_file)); + if (! NILP (abs_file) && !NILP (Ffile_readable_p (abs_file))) + gtk_rc_parse (SDATA (abs_file)); - UNGCPRO; - } + UNGCPRO; + } - XSetErrorHandler (x_error_handler); - XSetIOErrorHandler (x_io_error_quitter); + XSetErrorHandler (x_error_handler); + XSetIOErrorHandler (x_io_error_quitter); + } } #else /* not USE_GTK */ #ifdef USE_X_TOOLKIT @@ -10505,6 +10493,11 @@ x_term_init (display_name, xrm_option, resource_name) x_find_modifier_meanings (dpyinfo); /* Get the scroll bar cursor. */ +#ifdef USE_GTK + /* We must create a GTK cursor, it is required for GTK widgets. */ + dpyinfo->xg_cursor = xg_create_default_cursor (dpyinfo->display); +#endif /* USE_GTK */ + dpyinfo->vertical_scroll_bar_cursor = XCreateFontCursor (dpyinfo->display, XC_sb_v_double_arrow); @@ -10526,6 +10519,7 @@ x_term_init (display_name, xrm_option, resource_name) dpyinfo->height = HeightOfScreen (dpyinfo->screen); dpyinfo->width = WidthOfScreen (dpyinfo->screen); dpyinfo->root_window = RootWindowOfScreen (dpyinfo->screen); + dpyinfo->client_leader_window = 0; dpyinfo->grabbed = 0; dpyinfo->reference_count = 0; dpyinfo->icon_bitmap_id = -1; @@ -10550,6 +10544,21 @@ x_term_init (display_name, xrm_option, resource_name) dpyinfo->x_focus_event_frame = 0; dpyinfo->x_highlight_frame = 0; dpyinfo->image_cache = make_image_cache (); + dpyinfo->wm_type = X_WMTYPE_UNKNOWN; + + /* See if we can construct pixel values from RGB values. */ + dpyinfo->red_bits = dpyinfo->blue_bits = dpyinfo->green_bits = 0; + dpyinfo->red_offset = dpyinfo->blue_offset = dpyinfo->green_offset = 0; + + if (dpyinfo->visual->class == TrueColor) + { + get_bits_and_offset (dpyinfo->visual->red_mask, + &dpyinfo->red_bits, &dpyinfo->red_offset); + get_bits_and_offset (dpyinfo->visual->blue_mask, + &dpyinfo->blue_bits, &dpyinfo->blue_offset); + get_bits_and_offset (dpyinfo->visual->green_mask, + &dpyinfo->green_bits, &dpyinfo->green_offset); + } /* See if a private colormap is requested. */ if (dpyinfo->visual == DefaultVisualOfScreen (dpyinfo->screen)) @@ -10595,6 +10604,8 @@ x_term_init (display_name, xrm_option, resource_name) = XInternAtom (dpyinfo->display, "WM_CONFIGURE_DENIED", False); dpyinfo->Xatom_wm_window_moved = XInternAtom (dpyinfo->display, "WM_MOVED", False); + dpyinfo->Xatom_wm_client_leader + = XInternAtom (dpyinfo->display, "WM_CLIENT_LEADER", False); dpyinfo->Xatom_editres = XInternAtom (dpyinfo->display, "Editres", False); dpyinfo->Xatom_CLIPBOARD @@ -10749,6 +10760,12 @@ x_term_init (display_name, xrm_option, resource_name) #endif } +#ifdef HAVE_X_SM + /* Only do this for the first display. */ + if (x_initialized == 1) + x_session_initialize (dpyinfo); +#endif + UNBLOCK_INPUT; return dpyinfo; @@ -10761,6 +10778,8 @@ void x_delete_display (dpyinfo) struct x_display_info *dpyinfo; { + int i; + delete_keyboard_wait_descriptor (dpyinfo->connection); /* Discard this display from x_display_name_list and x_display_list. @@ -10812,6 +10831,18 @@ x_delete_display (dpyinfo) xim_close_dpy (dpyinfo); #endif + /* Free the font names in the font table. */ + for (i = 0; i < dpyinfo->n_fonts; i++) + if (dpyinfo->font_table[i].name) + { + if (dpyinfo->font_table[i].name != dpyinfo->font_table[i].full_name) + xfree (dpyinfo->font_table[i].full_name); + xfree (dpyinfo->font_table[i].name); + } + + if (dpyinfo->font_table->font_encoder) + xfree (dpyinfo->font_table->font_encoder); + xfree (dpyinfo->font_table); xfree (dpyinfo->x_id_name); xfree (dpyinfo->color_cells); @@ -10867,6 +10898,8 @@ static struct redisplay_interface x_redisplay_interface = x_get_glyph_overhangs, x_fix_overlapping_area, x_draw_fringe_bitmap, + 0, /* define_fringe_bitmap */ + 0, /* destroy_fringe_bitmap */ x_per_char_metric, x_encode_char, x_compute_glyph_string_overhangs, @@ -10913,6 +10946,11 @@ x_initialize () x_noop_count = 0; last_tool_bar_item = -1; any_help_event_p = 0; + ignore_next_mouse_click_timeout = 0; + +#ifdef USE_GTK + current_count = -1; +#endif /* Try to use interrupt input; if we can't, then start polling. */ Fset_input_mode (Qt, Qnil, Qt, Qnil); @@ -10962,10 +11000,6 @@ x_initialize () #endif /* SIGWINCH */ signal (SIGPIPE, x_connection_signal); - -#ifdef HAVE_X_SM - x_session_initialize (); -#endif } @@ -10998,6 +11032,16 @@ UNDERLINE_POSITION font properties, for example 7x13 on XFree prior to 4.1, set this to nil. */); x_use_underline_position_properties = 1; + DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", + &x_mouse_click_focus_ignore_position, + doc: /* Non-nil means that a mouse click to focus a frame does not move point. +This variable is only used when the window manager requires that you +click on a frame to select it (give it focus). In that case, a value +of nil, means that the selected window and cursor position changes to +reflect the mouse click position, while a non-nil value means that the +selected window or cursor position is preserved. */); + x_mouse_click_focus_ignore_position = 0; + DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, doc: /* What X toolkit scroll bars Emacs uses. A value of nil means Emacs doesn't use X toolkit scroll bars. @@ -11066,3 +11110,6 @@ default is nil, which is the same as `super'. */); } #endif /* HAVE_X_WINDOWS */ + +/* arch-tag: 6d4e4cb7-abc1-4302-9585-d84dcfb09d0f + (do not change this comment) */ diff --git a/src/xterm.h b/src/xterm.h index 86cda27747..fe0449a3bc 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -183,9 +183,17 @@ struct x_display_info /* The root window of this screen. */ Window root_window; + /* Client leader window. */ + Window client_leader_window; + /* The cursor to use for vertical scroll bars. */ Cursor vertical_scroll_bar_cursor; +#ifdef USE_GTK + /* The GDK cursor for scroll bars and popup menus. */ + GdkCursor *xg_cursor; +#endif + /* X Resource data base */ XrmDatabase xrdb; @@ -289,6 +297,7 @@ struct x_display_info /* Other WM communication */ Atom Xatom_wm_configure_denied; /* When our config request is denied */ Atom Xatom_wm_window_moved; /* When the WM moves us. */ + Atom Xatom_wm_client_leader; /* Id of client leader window. */ /* EditRes protocol */ Atom Xatom_editres; @@ -356,6 +365,23 @@ struct x_display_info use this directly, call x_color_cells instead. */ XColor *color_cells; int ncolor_cells; + + /* Bits and shifts to use to compose pixel values on TrueColor visuals. */ + int red_bits, blue_bits, green_bits; + int red_offset, blue_offset, green_offset; + + /* The type of window manager we have. If we move FRAME_OUTER_WINDOW + to x/y 0/0, some window managers (type A) puts the window manager + decorations outside the screen and FRAME_OUTER_WINDOW exactly at 0/0. + Other window managers (type B) puts the window including decorations + at 0/0, so FRAME_OUTER_WINDOW is a bit below 0/0. + Record the type of WM in use so we can compensate for type A WMs. */ + enum + { + X_WMTYPE_UNKNOWN, + X_WMTYPE_A, + X_WMTYPE_B + } wm_type; }; #ifdef HAVE_X_I18N @@ -605,6 +631,19 @@ struct x_output frame, or IMPLICIT if we received an EnterNotify. FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ int focus_state; + + /* The latest move we made to FRAME_OUTER_WINDOW. Saved so we can + compensate for type A WMs (see wm_type in dpyinfo above). */ + int expected_top; + int expected_left; + + /* The offset we need to add to compensate for type A WMs. */ + int move_offset_top; + int move_offset_left; + + /* Nonzero if we have made a move and needs to check if the WM placed us + at the right position. */ + int check_expected_move; }; #define No_Cursor (None) @@ -970,18 +1009,25 @@ extern void x_handle_selection_request P_ ((struct input_event *)); extern void x_handle_selection_clear P_ ((struct input_event *)); extern void x_clear_frame_selections P_ ((struct frame *)); +extern int x_handle_dnd_message P_ ((struct frame *, + XClientMessageEvent *, + struct x_display_info *, + struct input_event *bufp)); +extern int x_check_property_data P_ ((Lisp_Object)); +extern void x_fill_property_data P_ ((Display *, + Lisp_Object, + void *, + int)); +extern Lisp_Object x_property_data_to_lisp P_ ((struct frame *, + unsigned char *, + Atom, + int, + unsigned long)); + /* Defined in xfns.c */ +extern struct x_display_info * check_x_display_info P_ ((Lisp_Object frame)); extern int have_menus_p P_ ((void)); -extern int x_bitmap_height P_ ((struct frame *, int)); -extern int x_bitmap_width P_ ((struct frame *, int)); -extern int x_bitmap_pixmap P_ ((struct frame *, int)); -extern void x_reference_bitmap P_ ((struct frame *, int)); -extern int x_create_bitmap_from_data P_ ((struct frame *, char *, - unsigned int, unsigned int)); -extern int x_create_bitmap_from_file P_ ((struct frame *, Lisp_Object)); -extern void x_destroy_bitmap P_ ((struct frame *, int)); -extern int x_create_bitmap_mask P_ ((struct frame * , int)); #ifdef USE_GTK extern int xg_set_icon P_ ((struct frame *, Lisp_Object)); @@ -1023,6 +1069,7 @@ extern void x_free_dpy_colors P_ ((Display *, Screen *, Colormap, extern void x_activate_menubar P_ ((struct frame *)); extern int popup_activated P_ ((void)); extern void initialize_frame_menubar P_ ((struct frame *)); +extern void free_frame_menubar P_ ((struct frame *)); /* Defined in widget.c */ @@ -1032,9 +1079,8 @@ extern void widget_store_internal_border P_ ((Widget)); /* Defined in xsmfns.c */ #ifdef HAVE_X_SM -extern void x_session_initialize P_ ((void)); -extern int x_session_check_input P_ ((struct input_event *bufp, - int *numchars)); +extern void x_session_initialize P_ ((struct x_display_info *dpyinfo)); +extern int x_session_check_input P_ ((struct input_event *bufp)); extern int x_session_have_connection P_ ((void)); #endif @@ -1056,3 +1102,6 @@ extern int x_session_have_connection P_ ((void)); (nr).y = (ry), \ (nr).width = (rwidth), \ (nr).height = (rheight)) + +/* arch-tag: 78a7972a-b18f-4694-861a-0780c4b3090e + (do not change this comment) */ diff --git a/update-subdirs b/update-subdirs index 9ce3a641b2..7ac5977d70 100755 --- a/update-subdirs +++ b/update-subdirs @@ -1,7 +1,7 @@ #!/bin/sh # Write into $1/subdirs.el a list of subdirs of directory $1. -# Copyright (C) 1994, 1995, 1997, 1999, 2001 Free Software Foundation, Inc. +# Copyright (C) 1994,95,97,1999,2001,2004 Free Software Foundation, Inc. # # This file is part of GNU Emacs. # @@ -42,5 +42,11 @@ else echo ";; In load-path, after this directory should come ;; certain of its subdirectories. Here we specify them." >> subdirs.el - echo "(normal-top-level-add-to-load-path '($subdirs))" >> subdirs.el + echo "(normal-top-level-add-to-load-path '($subdirs)) +;; Local" "Variables: +;; version-control: never +;; no-byte-compile: t +;; End:" >> subdirs.el fi + +# arch-tag: 56ebcf1b-5c30-4934-b0b4-72d374064704 diff --git a/vms/README b/vms/README index 2c73fa01b5..11e53c0bb7 100644 --- a/vms/README +++ b/vms/README @@ -5,3 +5,8 @@ version of Emacs (currently based on version 19.28, but soon moving to on both VAX and Alpha architectures. For more information see http://vms.gnu.org/software/released1/emacs.html#get_emacs_1928_kit + + +[Update 2003-11-24: I am working on integrating VMS-specific bits + back into the repository. There are some work-in-progress files + in this directory as a result. Do not be alarmed! --ttn] diff --git a/vms/make-mms-derivative.el b/vms/make-mms-derivative.el new file mode 100644 index 0000000000..666ca4ae65 --- /dev/null +++ b/vms/make-mms-derivative.el @@ -0,0 +1,136 @@ +;;; make-mms-derivative.el --- framework to do horrible things for VMS support + +;; Copyright (C) 2003 Free Software Foundation, Inc. + +;; Author: Thien-Thi Nguyen +;; Keywords: maint build vms mms makefile levitte autoconf war-is-a-lose +;; Favorite-TV-Game-Show: L'Eredità + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; Under OpenVMS the standard make-like program is called MMS, which +;; looks for an input file in the default directory named DESCRIP.MMS +;; and runs the DCL command rules therein. As of 2003, the build +;; process requires a hand translation of the Makefile.in and related +;; Emacs-specific methodology to DCL and TPU commands, so to alleviate +;; this pain, we provide `make-mms-derivative', which given a source +;; FILENAME (under `make-mms-derivative-root-dir'), inserts the file +;; contents in a new buffer and loads FILENAME-2mms. The elisp in the +;; -2mms file can (do whatever -- it's emacs -- and) arrange to write +;; out the modified buffer after FILENAME-2mms loading by using: +;; +;; (make-mms-derivative-data 'write-under-root RELATIVE-FILENAME) +;; +;; where RELATIVE-FILENAME is something like "src/descrip.mms_in_in". +;; Over the long run, the convenience procedures provided (see source) +;; will be augmented by factoring maximally the -2mms files, squeezing +;; as much algorithm out of those nasty heuristics as possible. What +;; makes them nasty is not that they rely on the conventions of the +;; Emacs makefiles; that's no big deal. What makes them nasty is that +;; they rely on the conventions of separately maintained tools (namely +;; Autoconf 1.11 under OpenVMS and the rest of GNU), and the separation +;; of conventions is how people drift apart, dragging their software +;; behind mercilessly. +;; +;; In general, codified thought w/o self-synchronization is doomed. +;; That a generation would eat its young (most discriminatingly, even) +;; is no reason GNU cannot build around such woe. + +;;; Code: + +(defvar make-mms-derivative-root-dir "AXPA:[TTN.EMACS.EMACS212_3]" + "Source tree root directory.") + +(defvar make-mms-derivative-data nil + "Alist of data specific to `make-mms-derivative'.") + +(defun make-mms-derivative-data (key &optional newval) + (if newval + (setq make-mms-derivative-data + (cons (cons key newval) make-mms-derivative-data)) + (cdr (assq key make-mms-derivative-data)))) + +(defun make-mms-derivative-write-under-root (rel-filename) + (write-file (expand-file-name rel-filename make-mms-derivative-root-dir))) + +(defmacro make-mms-derivative-progn (msg &rest body) + `(progn + (message "(%s) %s" (point) ,msg) + ,@body)) + +(put 'make-mms-derivative-progn 'lisp-indent-function 1) + +(defun make-mms-derivative-load-edits-file (name) + (make-mms-derivative-data 'edits-filename name) + (let (raw-data + (cur (current-buffer)) + (wbuf (get-buffer-create "*make-mms-derivative-load-edits-file work"))) + (set-buffer wbuf) + (insert-file-contents name) + (keep-lines "^;;;[0-9]+;;") + (goto-char (point-max)) + (while (re-search-backward "^;;;\\([0-9]+\\);;\\(.*\\)$" (point-min) t) + (let* ((i (string-to-number (match-string 1))) + (line (match-string 2)) + (look (assq i raw-data))) + (if look + (setcdr look (cons line (cdr look))) + (setq raw-data (cons (list i line) raw-data))))) + (kill-buffer wbuf) + (set-buffer cur) + (mapcar '(lambda (ent) + (setcdr ent (mapconcat '(lambda (line) + (concat line "\n")) + (cdr ent) + ""))) + raw-data) + (make-mms-derivative-data 'raw-data raw-data)) + (load name)) + +(defun make-mms-derivative-insert-raw-data (n) + (insert (cdr (assq n (make-mms-derivative-data 'raw-data))))) + +(defun make-mms-derivative (file) + (interactive "fSource File: ") + (let ((root (expand-file-name make-mms-derivative-root-dir)) + (file (expand-file-name file))) + (when (file-name-absolute-p (file-relative-name file root)) + (error "Not under root (%s)" root)) + (let ((edits-filename (concat file "-2mms"))) + (unless (file-exists-p edits-filename) + (error "Could not find %s" edits-filename)) + (let ((buf (get-buffer-create + (format "*mms-derivative: %s" + (file-relative-name file root))))) + (message "Munging ...") + (switch-to-buffer buf) + (erase-buffer) + (make-variable-buffer-local 'make-mms-derivative-data) + (insert-file file) + (make-mms-derivative-load-edits-file edits-filename) + (let ((out (make-mms-derivative-data 'write-under-root))) + (when out (make-mms-derivative-write-under-root out)) + (kill-buffer buf) + (unless out (message "Munging ... done"))))))) + +(provide 'make-mms-derivative) + +;;; arch-tag: a5b08625-3952-4053-be16-296220e27bb0 +;;; make-mms-derivative.el ends here diff --git a/vpath.sed b/vpath.sed index a6573e4e4c..0eb98cc829 100644 --- a/vpath.sed +++ b/vpath.sed @@ -5,3 +5,5 @@ vpath %.c $(srcdir)\ vpath %.h $(srcdir)\ \ + +# arch-tag: 56a64b50-e4e8-443a-960f-f13af0f1a545 -- 2.20.1